title: Sorting Vietnamese utf8 index with make-rules in xindy package

text: I am using the `xindy` package to compile the index containing Vietnamese. It works fine except the order within words. The "standard" order is accepted as the following, which is different from the current `xindy` default order: > a à ả ã á ạ ă ằ ẳ ẵ ắ ặ â ầ ẩ ẫ ấ ậ b c d đ e è ẻ ẽ é ẹ ê ề ể ễ ế ệ f g h i > ì ỉ ĩ í ị j k l m n o ò ỏ õ ó ọ ô ồ ổ ỗ ố ộ ơ ờ ở ỡ ớ ợ p q r s t u ù ủ ũ ú > ụ ư ừ ử ữ ứ ự v w x y ỳ ỷ ỹ ý ỵ z I edited the _vietnamese/utf8.pl.in_ (attached below) and tested with this version. However, there are some words that are ordered in an unexpected way. The expected order, for example, should be,   1. Hiên   2. Hiền   3. Hiển   4. Hiễn   5. Hiến   6. Hiện But it is not sorted in that order, i.e., the two last numbers, 5 & 6, are now placed at the positions of 3 & 4. The same happened with words: Lan Làn Lản Lãn Lán Lạn (note the tonal diacritics). The question here is: **Why are the _Lán, Lạn_ sorted before _Lản, Lãn_ , given that the rules provided in the script?** Anyone? Here is the revised make-rules perl script for Vietnamese:               #!/usr/bin/perl          $language = "Vietnamese";     $prefix = "vi";     $script = "latin";          $alphabet = [     ['A',  ['a','A'],['à','À'],['ả','Ả'],['ã','Ã'],['á','Á'],['ạ','Ạ']],     ['Ă',  ['ă','Ă'],['ằ','Ằ'],['ẳ','Ẳ'],['ẵ','Ẵ'],['ắ','Ắ'],['ặ','Ặ']],     ['Â',  ['â','Â'],['ầ','Ầ'],['ẩ','Ẩ'],['ẫ','Ẫ'],['ấ','Ấ'],['ậ','Ậ']],                    [], # a with ogonek (polish)     ['B',  ['b','B']],                    [], # b with hook (hausa)     ['C',  ['c','C']],                    [], # ch (spanish/traditonal)                    [], # cs (hungarian)                    [], # c with caron (many)                    [], # c with acute (croatian, lower sorbian, polish)                    [], # c with circumflex (esperanto)                    [], # c with cedilla (albanian, kurdish, turkish)     ['D',  ['d','D']],                    [], # dh (albanian)                    [], # dz (hungarian)                    [], # dzs (hungarian)                    [], # d+z with caron (croatian)                    [], # d+z with acute (upper sorbian)                    [], # d with caron (slovak/large)     ['Đ',  ['đ','Đ']],                    [], # d with hook (hausa)                    [], # eth (icelandic)     ['E',  ['e','E'],['è','È'],['ẻ','Ẻ'],['ẽ','Ẽ'],['é','É'],['ẹ','Ẹ']],                    [], # e with caron (lower/upper sorbian)     ['Ê',  ['ê','Ê'],['ề','Ề'],['ể','Ể'],['ễ','Ễ'],['ế','Ế'],['ệ','Ệ']],                    [], # e with diaeresis (albanian)                    [], # e with ogonek (polish)     ['F',  ['f','F']],     ['G',  ['g','G']],                    [], # gj (albanian)                    [], # gy (hungarian)                    [], # g with circumflex (esperanto)                    [], # g with breve (turkish)                    [], # g with cedilla/comma (latvian)                    [], # postpalatal fricative (gypsy/northrussian)     ['H',  ['h','H']],                    [], # h with circumflex (esperanto)                    [], # ch (many)                    [], # dotless i (turkish)     ['I',  ['i','I'],['ì','Ì'],['ỉ','Ỉ'],['ĩ','Ĩ'],['í','Í'],['ị','Ị']],                    [], # i with inverted breve below (gypsy/northrussian)                    [], # i with circumflex (kurdish, romanian)                    [], # i with diaeresis (gypsy/northrussian)     ['J',  ['j','J']],                    [], # j with circumflex (esperanto)     ['K',  ['k','K']],                    [], # kh (gypsy/northrussian)                    [], # k with cedilla/comma (latvian)                    [], # k with hook (hausa)                    [], # x (gypsy/northrussian)                    [], # l with stroke (lower/upper sorbian)     ['L',  ['l','L']],                    [], # lj (croatian)                    [], # ll (albanian, spanish/traditonal)                    [], # ly (hungarian)                    [], # l with cedilla/comma (latvian)                    [], # l with stroke (polish)                    [], # l with caron (slovak/large)     ['M',  ['m','M']],     ['N',  ['n','N']],                    [], # nj (albanian, croatian)                    [], # ny (hungarian)                    [], # n with caron (slovak/large)                    [], # n with acute (lower/upper sorbian, polish)                    [], # n with tilde (spanish/modern, spanish/traditional)                    [], # n with cedilla/comma (latvian)     ['O',  ['o','O'],['ò','Ò'],['ỏ','Ỏ'],['õ','Õ'],['ó','Ó'],['ọ','Ọ']],                    [], # o with acute (polish, upper sorbian)     ['Ô',  ['ô','Ô'],['ồ','Ồ'],['ổ','Ổ'],['ỗ','Ỗ'],['ố','Ố'],['ộ','Ộ']],     ['Ơ',  ['ơ','Ơ'],['ờ','Ờ'],['ở','Ở'],['ỡ','Ỡ'],['ớ','Ớ'],['ợ','Ợ']],                    [], # o with diaeresis (hungarian, turkish)     ['P',  ['p','P']],                    [], # ph (gypsy/northrussian)     ['Q',  ['q','Q']],     ['R',  ['r','R']],                    [], # rr (albanian)                    [], # r with caron (czech, slovak/large, upper sorbian)                    [], # r with acute (lower sorbian)                    [], # r with cedilla/comma (latvian)     ['S',  ['s','S']],                    [], # sh (albanian)                    [], # sz (hungarian)                    [], # s with caron (many)                    [], # s with acute (lower sorbian, polish)                    [], # s with circumflex (esperanto)                    [], # s with comma below (romanian)                    [], # s with cedilla (kurdish, turkish)                    [], # z (estonian)                    [], # z with caron (estonian)     ['T',  ['t','T']],                    [], # th (albanian)                    [], # ty (hungarian)                    [], # t with caron (slovak/large)                    [], # t with comma below (romanian)                    [], # c with acute (upper sorbian) @@     ['U',  ['u','U'],['ù','Ù'],['ủ','Ủ'],['ũ','Ũ'],['ú','Ú'],['ụ','Ụ']],                    [], # u with breve (esperanto)                    [], # u with circumflex (kurdish)     ['Ư',  ['ư','Ư'],['ừ','Ừ'],['ử','Ử'],['ữ','Ữ'],['ứ','Ứ'],['ự','Ự']],                    [], # u with diaeresis (hungarian, turkish)     ['V',  ['v','V']],     ['W',  ['w','W']],                    [], # o with tilde (estonian)                    [], # a with diaeresis (estonian)                    [], # o with diaeresis (estonian)                    [], # u with diaeresis (estonian)     ['X',  ['x','X']],                    [], # xh (albanian)     ['Y',  ['y','Y'],['ỳ','Ỳ'],['ỷ','Ỷ'],['ỹ','Ỹ'],['ý','Ý'],['ỵ','Ỵ']],                    [], # y preceded by apostrophe (hausa)                    [], # yogh (english)     ['Z',  ['z','Z']],                    [], # zh (albanian)                    [], # zs (hungarian)                    [], # z with caron (many)                    [], # z with acute (lower sorbian, polish)                    [], # z with dot above (polish)                    [], # thorn (icelandic)                    [], # wynn (english)                    [], # ligature ae (danish, icelandic, norwegian)                    [], # o with stroke (danish, norwegian)                    [], # a with ring above (danish, norwegian, swedish)                    [], # a with diaeresis (finnish, swedish)                    [], # o with diaeresis (finnish, swedish)                    [], # a with ring above (icelandic)     ];          $sortcase = 'Aa';     #$sortcase = 'aA';          $ligatures = [     ];          @special = ('?', '!', '.', 'letters', '-', '\'');          do 'make-rules.pl';


title: How to draw search space tree in a dynamic manner

text: I am visualising the search space for a set of binary variables. I have done it for three variables before; and now I am extending it to six but seems a tedious work to do. Thus, I am wondering if there is any systematic/dynamic way to draw the search tree. For example, I just supply the number of variables and a tree would be drawn with dummy names. is such a tool exist? Here is my code for the three binary variables.               \begin{figure}[htp]     \begin{center}     \begin{tikzpicture}[scale=.8,level/.style={sibling distance=40mm/#1},node distance=1cm]     \node [circle,draw] (root){$$}         child {node (a)at (0,.5){$1$}             child {node  (ab){$2$}             child {node (abc){$3$}}             child {node (abc2){$4$}}             }             child {node  (ab2){$5$}                 child {node (ab2c) at(0.3,0){$6$}}                 child {node (ab2c2){$7$}}             }         }           child {node (a2)at (0,.5){$8$}           child {node  (a2b){$9$}                               child {node at (.2,0) (a2bc){$10$}}                 child {node at(-.2,0) (a2bc2){$11$}}                 }             child {node  (a2b2){$12$}                         child {node  (a2b2c){$13$}}                 child {node (a2b2c2){$14$}}             }         };     \end{tikzpicture}     \end{center}     \caption{search space}     \label{search_space}     \end{figure}      which will draw this ![enter image description here](http://i.stack.imgur.com/jOGX3.jpg)


title: image positioning

text: I'm trying to put an image (test.pdf) inside an page that has already an table, the page is in landscape position. How can I set the positioning of the image on the top right corner of the page, or at 1cm top and 1.2 cm right, even if in that position has already a portion of a cell table. In html, like an position: `fixed; top: 10px; right:20px;`


title: Undefined Control Sequence,Missing $ and Display math should end with $$

text: I am trying to write the below equation and keep getting the various below errors.   1. Undefined control sequence   2. Missing `$` inserted   3. Display math should end with `$$` I don't really understand the problem with my code. FYI...this is the code               \begin{equation}     \label{eqn: current}     $I_{FS} = \sum_{\substack{i}}*\frac{1}{2}*\frac{W}{L}*(V_{gs}-V_{th})^2*(1+\lambdaV_{ds})=\frac{1}{2}*k*(V_{gs}-V_{th})^2*(1+\lambda*V_{ds})*\sum_{\substack{i}}*\frac{W}{L}$     \end{equation}       I have tried putting `\equation` also doesn't work. Previous to that, I used simple `$...$` also, still useless. Would be glad if someone can point out the error and give me a fix for this issue as I am a new user to LaTeX.


title: Package breqn is broken since MiKTeX removed package mh

text: I just updated my MiKTeX 2.9 installation and the package `mh` was removed as is outdated. Now the package `breqn` won't compile. Whenever I compile my document with `breqn` active, I'm prompted to download the package `mh`, which obviously isn't available since it's outdated. If I continue to compile, an emergency stop occurs and the error `File cmbase.sym not found` is thrown. Any suggestions on how to use `breqn`? My MWE...               \documentclass{article}     \usepackage{breqn}     \begin{document}     foo-bar     \end{document}


Few years ago, `lmodern` package was a good way to have high quality fonts by simply adding :               \usepackage{lmodern}      Nowadays, `lmodern` seems less popular. I'm wondering if it is because `LaTeX` default fonts received some improvements which make `lmodern` useless? Or because the package is abandoned? It hard to see if the package is still developed (A search on CTAN about `lmodern` does not return anything anymore) and `texdoc lmodern` is not helpful... So :   1. Is it still usefull to call lmodern package?   2. What is the effects/advantages of this package comparing to normal (default) CM fonts?


title: Using the SCS conference template with multiple authors separated with \and

text: Using the style provided by the conference at http://www.scs.org/ (http://www.scs.org/upload/documents/templates/ConferenceSubmissionLaTeXTemplate.tar.gz), multiple authors with multiple affiliations are recommended to use two columns to display the authors; however, the overwritten `\maketitle` command does not allow use of the `\and` separator in the `\author` definition.               \documentclass[letterpaper,twocolumn,10pt]{article}     \usepackage{scs}          \begin{document}     \title{Something}     \author{Author1\\     Affiliation1     \and     Author2\\     Affiliation2}     \maketitle     \end{document}      results in:               ! Misplaced \crcr.     \endtabular ->\crcr     \egroup \egroup $\egroup     l.48 \maketitle      What is the best way to either redefine the `\and` correctly, or override the author portion of the template's `\maketitle` command to allow multicolumn display of authors?


title: How to align the bottom of each column in \begin{columns}?

text: Option `T` is used to align the top of each column. Is there an option to align the bottom of each column? If no option, how to achieve the same effect? Note: Using option `b` is not the answer because it aligns baseline.


title: Image with axis

text: I need to plot some data in a file (10000 records of 2 points each one) but `PGFPlots` is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image **without** axis and in a `tikzpicture` render the image with axis. Here is my test with an 96 x 96 PNG image: ![enter image description here](http://i.stack.imgur.com/Dad64.png)               \documentclass{article}          \usepackage{pgfplots}          \begin{document}       \pgfdeclareimage[width=5cm]{fondo}{avatarMSM.png}       \begin{tikzpicture}         \draw node[anchor=south west] (nodoFondo) at (axis cs:0,0) {\pgfuseimage{fondo}};         \begin{axis}[             width=5cm,             scale only axis,             enlargelimits=false,             xmin=0,             xmax=96,             ymin=0,             ymax=96,             axis equal=true             ]                \addplot[thick,blue] (0,0) -- (axis cs:96,96);         \end{axis}       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yeNlZ.png) The result has white margins around the image and I can't fit the axis.


title: pgfplots axis enlargelimits

text: > **Possible Duplicate:**   >  Image with axis I want to place an image against the edge of an axis frame, but because of the (unknown to me) value of the enlarged limits, I can't find the coordinates both where to place it and what the height should be. This is what I'm talking about: ![Plot](http://i.stack.imgur.com/5PPvQ.png) And my code looks something like.               \begin{tikzpicture}     \begin{axis}     \addplot[color=colora] file {data.dat};     \node[anchor=base east] at (axis cs:0,0) {\includegraphics[height=1cm,keepaspectratio]{myimage.png}};     \end{axis}     \end{tikzpicture}      Any suggestions?


title: Combining lmodern and tipa

text: When I use `tipa` and `lmodern` in the same document, I always get a couple of font substitution warnings. The document looks fine, though. Is there any way around this? Minimal example:               \documentclass{article}     \usepackage{lmodern}     \usepackage[]{tipa}     \begin{document}     \textesh     \end{document}      pdflatex output:               test.tex|| LaTeX Font Warning: Font shape `T3/lmr/m/n' undefined          test.tex|| LaTeX Font Warning: Some font shapes were not available, defaults substituted.      **EDIT:** See Filtering font substitution warnings caused by the combination of lmodern and tipa if latex crashes when you try Seamus' solution.


title: Error using \tikzexternalize with forest

text: Using `forest` package for simple truth trees, and I want to externalize because there are a lot of them. Here is the code example:               \documentclass{article}     \usepackage[external]{forest}     \tikzexternalize          \begin{document}          \begin{forest}         [$B \rightarrow C$             [$C$                 [$\neg A$                     [$\neg B$                     ]                     [$C$                     ]                 ]                 [$B$                     [$\neg B$                     ]                     [$C$                     ]                 ]             ]         ]     \end{forest}          \end{document}      Here is the error:               Command Line:   texify.exe --src --tex-option=--interaction=errorstopmode     --tex-option=--synctex=-1          .....              ABD: EveryShipout initializing macros forest: Invoking a recursive call to     generate the external picture 'Test2-fores t-1' for the following     context+code: 'dj,8.39996pt,0.4pt,.3333em,.5\pgflinewidt h     ,.3333em,.5\pgflinewidth @@ [$B \rightarrow C$ [$C$ [$\neg A$ [$\neg B$ ] [$C     $ ] ] [$B$ [$\neg B$ ] [$C$ ] ] ] ] ' ! Undefined control sequence.     \forest@temp ->\path                          [draw](node@2.parent anchor)--(node@3.child anchor);     l.24 \end{forest}          ? x No pages of output. Transcript written on Test2.log. texify: latex failed     for some reason (see log file).      Everything works fine if I comment out `\tikzexternalize`.


title: What should I types in bib file in order to get author name like "Lawless, J. F." in output

text: Why when I typed "Lawless, J. F." in `bibtex`, it becomes J. F. Lawless in output? Anyone could help me on this issue? Thanks!


title: Scaling a tikz-cd commutative diagram in TikZ?

text: I'd like to be able to scale some rather complex CDs using the `scale` key, for example `scale=0.5`. In the following MWE the `scale` key seems to have no effect.               \documentclass{amsart}          \usepackage{tikz}     \usepackage{tikz-cd}          \usetikzlibrary{matrix}          \begin{document}          %% Uncomment/comment appropriately:     %\begin{tikzpicture}[column sep=1in,row sep=1in,scale=0.5in]     \begin{tikzpicture}[column sep=1in,row sep=1in]         \matrix (A) [matrix of math nodes]         {             A& B\\             C& D\\         };         \draw[->] (A-1-1) -- (A-1-2);         \draw[->] (A-1-1) -- (A-2-1);         \draw[->] (A-2-1) -- (A-2-2);         \draw[->] (A-2-2) -- (A-1-2);     \end{tikzpicture}          %% Uncommenting the scale option has no effect:     \begin{tikzcd}%[scale=0.5]         A\ar{r}\ar{d}&B\\         C\ar{r}&D\ar{u}\\     \end{tikzcd}          \end{document}      These are very simple examples, and I could easily alter the appropriate dimensions, but the CDs on which I am working are complex and carefully arranged -- I'd rather just be able to scale them if at all possible.


title: Right align text in table

text: \begin{center}     \begin{tabular}{|p{3.35cm}||p{5cm}|l|}     \hline     \thead{Område} & \thead{Positive konsekvenser} & \thead{Negative konsekvenser} \\     \hline \hline     \textbf{Arbejdsfordeling} & Et nyt slags produkt giver næsten altid ny arbejdskraft & \\     \hline     \textbf{Infrastruktur} &  & \\     \hline     \textbf{De fysiske ressourcer} &  & \\     \hline     \textbf{Den offentlige sektor} &  & \\     \hline     \textbf{NGO'er} &  & \\     \hline     \textbf{Befolkningens levevilkår} &  & \\     \hline     \end{tabular}         \end{center}         And it produces this output: ![Table](http://i.stack.imgur.com/CpAH4.jpg) How do I get the text in the left column aligned like the middle column row 2? I use the {p{xcm}} command but i don't know how to align it as with "c", "l" and "r".


title: How to remove title entry in the bibliography contents?

text: I use plain bibliography style for my book. When I compile it, by default, I get the details including the title in my reference. like this: > H. J. C. Berendsen, J. P. M. Postma, W. F. van Gunsteren, a. Dinola, and J. > R. Haak. Molecular dynamics with coupling to an external bath. J. Chem. > Phys., 81:3685-3690,1984. This is too long and I have more than 100 such references which makes the document too long. How can I force it to remove the title from this reference? something like this: > H. J. C. Berendsen, J. P. M. Postma, W. F. van Gunsteren, a. Dinola, and J. > R. Haak. J. Chem. Phys., 81:3685-3690,1984. Your answer will be greatly appreciated. By the way, I still would like to use the plain bibliography style.


title: What is the best way to include Matlab graphics?

text: Which way of exporting Matlab graphics delivers the best result for inclusion in LaTeX? Is it possible to export scalable vector graphics, or even LaTeX graphics?


title: Shift some items of enumerate

text: I have `enumerate` in a slide, I would like the beginning, including the bullet, of the 2nd and the 3rd `\item` shift a little bit on the right, compared to the 1st `\item`:               Item1       Item2       Item3      Does anyone know how to do this?


title: Rotated text in a rotated figure

text: I have some full-page figure rotated ccw added using a `sidewaysfigure` environment. The figures were originally made in Inkscape and were designed for non-rotated viewing and contain some text labels which are also rotated ccw. Luckily all text labels are added at TeX level inside a `picture` environment (exported from Inkscape). When these figures are placed in a `sidewaysfigure` environment the rotated labels are rendered up-side-down wrt to the page orientation (page numbers, headers etc.). This seems wrong to me. Question #1 (about typographical rules): If there are any horizontal text labels in ccw rotated figures, should they be rendered upwards (cw rotated wrt the figure) or downwards (ccw wrt the figure)? Question #2 (about LaTeX): Since I expect the answer to the previous question is that the labels should be rendered upwards, is there any way of automatically rotating selected text labels 180 degrees? This should only affect rotated labels inside `sidewaysfigure` environments. Below is a sample figure:               \begingroup%       \makeatletter%       \providecommand\color[2][]{%         \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%         \renewcommand\color[2][]{}%       }%       \providecommand\transparent[1]{%         \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%         \renewcommand\transparent[1]{}%       }%       \providecommand\rotatebox[2]{#2}%       \ifx\svgwidth\undefined%         \setlength{\unitlength}{1559.05517578bp}%         \ifx\svgscale\undefined%           \relax%         \else%           \setlength{\unitlength}{\unitlength * \real{\svgscale}}%         \fi%       \else%         \setlength{\unitlength}{\svgwidth}%       \fi%       \global\let\svgwidth\undefined%       \global\let\svgscale\undefined%       \makeatother%       \begin{picture}(1,0.45454544)%         \put(0,0){\includegraphics[width=\unitlength]{figure.pdf}}%         \put(0.59090907,0.27272726){\color[rgb]{0,0,0}\rotatebox{90}{\makebox(0,0)[b]{\smash{some text}}}}%       \end{picture}%     \endgroup%      and a `sidewaysfigure` environment instantiating it:               \begin{sidewaysfigure}       \centering       \def\svgwidth{\textheight}       \resizebox{\textheight}{!}{         \endlinechar=255\relax%         \input{figure.pdf_tex}       }       \caption{...}}       \label{...}     \end{sidewaysfigure}


title: How to add color to source code under the listings environment

text: I would like to color a few keywords in my slides under the listings environment In the following contrived example, I would like to color the `__shared__` word with orange and WIDTH with blue. How would I modify this?                   \begin{frame}[fragile]                    \lstset{language=C++,                    basicstyle=\ttfamily\scriptsize,                    keywordstyle=\color{blue}\ttfamily,                    stringstyle=\color{red}\ttfamily,                    commentstyle=\color{green}\ttfamily,                    breakline=true                   }           \begin{lstlisting}         __global__          void MatMulKernelFast(double* d_M,double* d_N,double* d_P,int WIDTH)         {          __shared__ double ds_M[TILE_WIDTH][TILE_WIDTH];          __shared__ double ds_N[TILE_WIDTH][TILE_WIDTH];          }       \end{lstlisting}           \end{frame}      Here is the output of the previous code ![enter image description here](http://i.stack.imgur.com/O3tL4.png)


title: ! Undefined control sequence

text: I am getting an `! Undefined control sequence` error when compiling the following code:               \documentclass[11pt,table,a5paper]{article}     \usepackage{array,ragged2e}     \usepackage{graphicx}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{lipsum}     \usepackage[top=2cm, bottom=2cm, outer=1cm, inner=2.1cm,twoside, headsep=26pt]{geometry}     \usepackage{ifthen}     \usepackage{wrapfig}     \usepackage{comment}     \usepackage{parskip}     \usepackage{framed}      \usepackage{sidecap}     \usepackage{longtable}     \begin{document}     \begin{longtable}{|p{2.7cm}|p{1.0cm}|p{2.4cm}|p{1.0cm}|p{1.3cm}|p{0.8cm}|}      \hline      \rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\      \endfirsthead     \rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\       \endhead      \hline      \newcommand{\dsr}{\rule[-3.5cm]{0pt}{4cm}}      \dsr  XXXXXXX  & \dsr  3.38&  \multirow{1}{*}{\parbox{2.5cm}  {\textcolor{black}{XXXXXXX >2,~\\      ~\\      XXXXXXX~\\      ~\\      XXXXXy XXXXX XXXXX XXXXX}}}      &\dsr 2.36\% & \dsr 0.62\% & \dsr 18 \\\cline{1-2} \cline{4-6}      \hline      \end{longtable}}      \end{document}      How to fix this issue?


title: Problems with \textsc for single glyph

text: Is there a way (simple or otherwise) to import a single character from another font under specific characters, or otherwise alter the character? I'm using the very attractive Garamond font from here, but there is a slight problem - when using `\ae{}` with `\textsc{}`, the font defaults to lower case. A MWE can be gained by downloading the package from the website mentioned, then using this code:               \documentclass[a4paper,10pt]{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{garamond}     \renewcommand{\rmdefault}{ggm}\normalfont          \begin{document}          \garamond     Normal ligature: \ae{}          Capital ligature: \AE{}          Small Caps: \textsc{\AE{}, \ae{}, Isch\ae{}mia}     \end{document}      The result is shown in the following figure (I also did it without Garamond, to be sure it wasn't just a problem with my code). ![MWE Result](http://i.stack.imgur.com/8xo1U.png) Using the provided font sfd files, FontForge, and most of the instructions given here, I have been able to generate a font that corrects the problem, but it loses most of the hanging fonts and whatnot, or rather it utilises them sporadically. Does anyone know how to point LaTeX to use a different glyph, either a modified version of the standard capital or the glyph from the self-built version of the font?


title: Is there some way to embed LaTeX source code in a PDF file?

text: Several times now I have inadvertently lost the .tex file that generated a PDF file with `pdflatex`. Given what I know of the internal structure of PDF files, it should be possible to embed a text file containing the original LaTeX file into the PDF file so that it can be extracted later. I am aware of no technology for doing this, but perhaps you are. Does anybody have something like this?


title: Attach listing to PDF

text: I would like to add listings source as attachment to a PDF (created by `pdflatex`). For `\lstinputlisting` this is pretty easy:               \RequirePackage{listings}     \RequirePackage{embedfile}          \let\lstinputlistingO=\lstinputlisting     \renewcommand{\lstinputlisting}[2][]{\embedfile{\detokenize{#2}}\lstinputlistingO[#1]{#2}}      but how can I do the same with `\begin{listing} ... \end{listing}`? (referenced filename should be the something like `listing 12`)


title: Embedding a Tex file inside a PDF?

text: > **Possible Duplicate:**   >  Is there some way to embed LaTeX source code in a PDF file? Is there any way to tell XeTeX/XeLaTeX (or pdfTeX/pdfLaTeX) to embed a copy of the TeX file inside the PDF (as an attachment perhaps)?


title: Insert tex code in pdf document as metadata

text: I am trying to save the `LaTeX` code needed for generating some document in the document itself as metadata. So far I found the command to set the `pdf` metadata using the `hyperref` package but now I am stuck.... This clearly does not work..               % file.tex     \documentclass[a4paper,10pt]{report}          \usepackage{hyperref,listings}          \hypersetup{         pdfauthor=myself,         pdftitle=Title,         pdfsubject={\lstinputlisting{file.tex}}     }          \begin{document}     Hello world       \end{document}


title: In LyX, how do I indent the paragraph right after an itemize/enumerate environment

text: ![enter image description here](http://i.stack.imgur.com/viBOv.png) See the example above, I want to indent the second paragraph. The generated .tex file is               %% LyX 2.0.4 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{babel}     \begin{document}     First paragraph.     \begin{itemize}     \item item 1     \item item 2     \end{itemize}     Second paragraph.          Third paragraph.     \end{document}      Simply add a blank line after the line `\end{itemize}` will do what I want. But how can I do this in LyX? One possible way is to add a box of TeX code (Evil Red Text) containing one blank line before second paragraph. But I want to know if there are ways without invoving Evil Red Text. Thanks.


title: How to Format C Program Code Block Nicely

text: I am using the following settings to format my code blocks:               % xxxxxxxxxxxxxxxxxxxxxxxxx Code Snippet STARTS xxxxxxxxxxxxxxxxxxxxxx     \lstset{       language=C,                     % choose the language of the code       stepnumber=1,                   % the step between two line-numbers. If it's 1, each line will be numbered      % numbersep=5pt,                 % how far the line-numbers are from the code     %  backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}       showspaces=false,               % show spaces adding particular underscores       showstringspaces=false,         % underline spaces within strings       showtabs=false,                 % show tabs within strings adding particular underscores       tabsize=4,                      % sets default tabsize to 2 spaces       captionpos=t,                   % sets the caption-position to top       breaklines=true,                % sets automatic line breaking       breakatwhitespace=true,         % sets if automatic breaks should only happen at whitespace      % title=\lstname,                % show the filename of files included with \lstinputlisting;      identifierstyle=\color{identifierColor},      caption={Array of Pointers to Strings},      frame=lrtb,      keywordstyle=\color{purple},         % keyword style      commentstyle=\color{blue},           % comment style      stringstyle=\color{violet},          % string literal style      belowcaptionskip = 0.2in,            % Space below caption      abovecaptionskip = 0.2in,            % Space above caption     }     \begin{lstlisting}          int main()     {         char *strings[] = {                             "String1",                              "String2",                             "String3",                             "String4"                           };              char *ptr_swap;   /* A temporary pointer to swap strings */              /* Swap "String2" with 'String3' */         ptr_swap  = names [1];         names [1] = names [2];                             names [2] = ptr_swap;              return 0;     }      % xxxxxxxxxxxxxxxxxxxxxxxxx Code Snippet ENDS xxxxxxxxxxxxxxxxxxxxxx      The Output is as follows: ![enter image description here](http://i.stack.imgur.com/oQJIS.jpg) My Question is: The C Keywords (like: int, char) are NOT differently colored than the rest of the code. I want to obtain a more beautiful output (like in professional books). Please guide me on this issue. Thanks.


title: TeXworks won't open *.cls extensions

text: I've always used MikTeX as the main LaTeX base to compile/write my `*.tex/*.sty/*.cls` files, so I downloaded the specific version 2.9.4521-x64 on my first computer (running Windows 7 Professional); and then the file extensions mentioned above were correctly recognized by the OS, as it can be seen inside a generic folder: > ![enter image description here](http://i.stack.imgur.com/qfkNJ.png) There is a difference regarding the file type (`tipo=type`) `LaTeX Class` and `LaTeX Style` that recognizes automatically the derived extensions; and so on my first machine I've had no problems at all. The problem rised when bought a new computer, same OS, and installed the _same version_ of MikTeX; then when I looked back on the same folder the file extension for class was no more recognized correctly by Windows: > ![enter image description here](http://i.stack.imgur.com/vX6kj.png) Here the file type that describes a class file is recognized as `CLS file`, and not `LaTeX Class`, because I had to _manually_ connect the program that will be able to read the extension, as it can be seen by the different icon appeared in the aforementioned image. I know it may seem as a not-so-dramatic issue, but _I don't know what is causing it_ , and since there is an image proof surely something must have happened. * * * **EDIT:** As karlkoeller suggested, removing the current TeXworks version from the MikTeX distribution and installing a brand new one generates this output: ![enter image description here](http://i.stack.imgur.com/PV1px.png) So it looks like I'm back on where I started.


title: Can I use an easy programming language with XeTeX?

text: TeX is frustrating me. It has only the basics - and even then, I have to search how to divide two numbers. The question is this: can I write my macros in more convenient language like Ruby or Lisp? UPD: I will explain my situation. I'm writing a rulebook for my RPG module, and I need to construct an equipment table. Problem is, my rules are not the simplest ones: http://pastebin.com/Z4Q9TQa5 I want nice fonts, so I use XeLaTeX. I am Russian, so I need polyglossia or babel. Please note that every suggestion is tested against **XeLaTeX,** not LaTeX.


title: How to create an environment with its embedded commands?

text: I would like to create an environment with its commands which can be used like:               \begin{myenv}         \command1         text paragraph 1              \command2         text paragraph 2     \end{myenv}      which translates to:               \begin{someenv}         \begin{env1}             text paragraph 1         \end{env1}         \begin{env2}             text paragraph 2         \end{env2}     \end{someenv}      where `someenv`, `env1` and `env2` are some existing environments in LaTex. How can I do this?


title: Print all elements of a working array created with etoolbox package

text: I am trying to define an array to contain elements and stumbled across the following code and it works. The question is how I can define a command which will print all elements at once without printing each element one by one.               \documentclass{article}      \usepackage{etoolbox}          \newcounter{cnt}          \newcommand\addtext[1]{%     \stepcounter{cnt}%      \csdef{text\thecnt}{#1}}          \newcommand\gettext[1]{%       \csuse{text#1}}               \begin{document}          \addtext{one}     \addtext{two}     \addtext{three}          \gettext{1}     \gettext{2}     \gettext{3}               \end{document}


title: Show stretch/shrink of whitespace in the line

text: Is there an option or package, to show the amount of stretching or shrinking TeX has done to justify each line? If there is none, how could this be implemented? It should look like the black bars the draft option puts besides overfull lines, but with varying width corresponding to the amount of stretching or shrinking done. Shrink in the left margin, stretch in the right. The amount of available stretch and shrink might also be shown. I often insert linebreaks `\\\` and recompile simply to see this, while fine- tuning the layout.


title: Fractions in annotations

text: I want to use the `\frac` command in an annotation to a line               \documentclass{standalone}     \usepackage{pgfplots}     \usepackage{amsmath}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot[dashed]coordinates {(0,0) (1,1)} node[pos=0.5,sloped,yshift=7pt]{$\frac{1}{wuv}$};     \end{axis}     \end{tikzpicture}     \end{document}      However, the line of the fraction has the same style as the line. How can I get a fraction with a normal line? ![enter image description here](http://i.stack.imgur.com/aypAb.png)


title: Efficiently use the empty page between \part and \chapter

text: No author and their publisher wants to publish a blank page, either do I. In my previous question, I have provided the sample page of the opening of `\part` and the opening of chapter as well `\chapter` as well. The layout of the book is like this:   1. The left part of the opening of the `\part`   2. The right part of the opening of the `\part`   3. _(blank)_   4. The opening of the `\chapter` While I was wondering if input some text into such page 3, a new blank spread is created rather than just used up the blank page. For example,   1. The left part of the opening of the `\part`   2. The right part of the opening of the `\part`   3. **Some text such as prelude**   4. _(blank)_   5. _(blank)_   6. The opening of the `\chapter` This does not fulfill my original idea, and creates more empty pages. For one may though a MWE useful, please see below.               \documentclass[12pt,a4paper,headinclude,openright]{scrbook}     \usepackage{scrpage2}     \begin{document}     \part{SMAPLE}     Some text     \chapter{SAMPLE}     Some content...     \end{document}


title: Free fontfamily with latex

text: I am playing with font type on my report - for that I need the list of font- family which can be used with `pdflatex` without installing any external package.


title: \end{tabu} in \newcommand

text: I want to put `\end{tabu}` within a `\newcommand`               \documentclass{article}          \usepackage{tabu}          \newcommand     {\tableBegin}[1]     {         \begin{tabu}[#1]         % some other stuff     }          \newcommand     {\tableEnd}     {\end{tabu}}          \begin{document}          \tableBegin{ccc}     1 & 2 & 3 \\     a & b & c     \tableEnd     %\end{tabu}          \end{document}      But when I use `\tableEnd` instead of `\end{tabu}` I get get following error: `! Missing $ inserted.`


title: Can I cite author name or year in text when using vancouver style?

text: I'm new to this, so please be gentle! I have loaded `natbib`, `babel` and `url` in the preamble. I am using BibTeX and a modified `vancouver` style. When I type `\cite{Smith2013}` it inserts a superscript number for that reference. Is there a command that will insert the author's name or the year of the paper into the text, rather than the actual reference number?


title: XeTeX and Fedora: can't use OTF fonts

text: When trying to compile a document with XeLaTeX, I'm getting the following error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "Linux Libertine Slanted O" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................        Now, I've got the font files installed, `/usr/share/texlive/texmf- dist/fonts/opentype/public/libertineotf` contains the font files that I need. Fontconfig doesn't see those files, however. I tried adding the directory with `fc-cache` and it reports having added 30 new fonts, but I still can't see them when running `fc-list`. Now it all kinda works well on Linux Mint, I'm on Fedora now, and it somehow doesn't work anymore. What am I doing wrong? I'm using Fedora 18, with everything latex related installed from the official repos. `This is XeTeX, Version 3.1415926-2.5-0.9999 (TeX Live 2013/dev)` is what xelatex reports. Fontconfig is the one installed that came with Fedora 18.


title: TOC longer than 1 page messes with Tikz absolute positioning on following pages

text: I have an issue where a TOC on more than one page, ruins the tikz-positioning for the rest of the pdf. Example: ![enter image description here](http://i.stack.imgur.com/NjPQ7.jpg) The header has been moved to the bottom of the page where it usually stays on the top of the page. Now to the code: Load the header into the page like this:               \begin{document}              \input{graphics/pagestyle/titlepage.tex}         \pagecolor{none}         \newpage              \AddToShipoutPicture{\BackgroundPic}              \tableofcontents      \BackgroundPic is defined like this:               \usepackage{kpfonts}     \usepackage[explicit]{titlesec}     \newcommand*\headerbg{       {\begin{tikzpicture}[remember picture,overlay]         \node[yshift=-3cm] at (current page.north west)           {\begin{tikzpicture}[remember picture, overlay]             \draw[fill=WLEBlue1] (0,0) rectangle               (\paperwidth,3cm);               \node (label) at (10,1.5){                 \includegraphics[width=660pt]{graphics/pagestyle/header_bg.png}               };               \node (label) at (1.4,1.5){                 \includegraphics[width=60pt]{graphics/pagestyle/WLE_Logo.png}               };            \end{tikzpicture}           };        \end{tikzpicture}       }       }          \usepackage{eso-pic}     \newcommand\BackgroundPic{     \headerbg     \put(0,0){     \parbox[b][\paperheight]{\paperwidth}{%     \vfill     \centering     \begin{tikzpicture}[remember picture,overlay]         \node at (-10,12.5)           {\begin{tikzpicture}[remember picture, overlay]                 \draw [WLEBlue1, fill=WLEBlue1] (0,0) -- (0.05,0) -- (0.05,-22.2) -- (0.25,-22.2) -- (0.25, -23) -- (0, -23);            \end{tikzpicture}           };     \end{tikzpicture}     \begin{tikzpicture}[remember picture,overlay]     \node at (8.5,12.5)           {\begin{tikzpicture}[remember picture, overlay]                 \draw [WLEBlue1, fill=WLEBlue1] (-1, -23) -- (0, -23) -- (0, -22) -- (-0.08, -22) -- (-0.08, -22.92) -- (-1, -22.92);            \end{tikzpicture}           };     \end{tikzpicture}     \vfill     }}}             \newpage      It works totally fine when the TOC is only 1 page long, with 2 pages it bugs up. Any help is greatly appreciated! Thank you in advance. _Update:_ Posted this as a comment a while ago, but decided to move it up here for more visiblity: Here is an online version at ShareLatex showing the issue. You can see, and edit some example code there and compile it for yourself. _Update:_ Tried removing the nesting of the TikzPictures but it didn't help. Code without nested pictures:               \newcommand*\headerbg{         \begin{tikzpicture}[overlay]             \node(base) at (current page.north west) {};             \node at ($(base)+(9.1,0.7)$){                 \includegraphics[width=660pt]{header_bg.png}             };             \node at ($(base)+(0.5,0.7)$){                 \includegraphics[width=60pt]{WLE_Logo.png}             };         \end{tikzpicture}     }      _Update:_ It's the Chapter Style that is causing the issue, removing the chapter style removes the issue aswell.               \newcommand*\chapterlabel{}     \titleformat{\chapter}       {\gdef\chapterlabel{}        \normalfont\sffamily\Huge\bfseries\scshape}       {\gdef\chapterlabel{\thechapter\ }}{0pt}       {\begin{tikzpicture}[remember picture,overlay]         \node at (0,0)           {\begin{tikzpicture}[remember picture, overlay]             \draw[WLEBlue2, fill=WLEBlue2] (0,0) rectangle               (\textwidth,1cm);             \node[                 inner xsep=1ex,                 text width=\linewidth-2*\pgfkeysvalueof{/pgf/inner xsep},                 align=left] at (9,0.5)                   {\color{white}\chapterlabel#1};            \end{tikzpicture}           };        \end{tikzpicture}       }


title: Mark selected references in bibliography with an asterisk

text: is there a way to indicate/mark certain selected references in the bibliography section. For example I want to use simple natbib citations (author-year) in the main text (standard as they are). However in my reference list (bibliography) I want mark some references (not all) with an asterisk before the main name. Here a short example, but how to add the asterisk? Do I need to introduce a new field (eg. marker) for @article and define a new bibliography style the accounts for the new field?               \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{test,     author={Name},     journal={Journal},     title={TITLE},     year={2011},     }     \end{filecontents}     \documentclass{article}     \usepackage[authoryear]{natbib}     \bibliographystyle{apalike}     \begin{document}     \cite{test}          \bibliography{test}          \end{document}


title: Coloring lines in an algorithm

text: I am using Beamer for creating a presentation and I am trying to highlight some lines in an algorithm. I am actually using `algcompatible`. I found a solution here and created a couple of new commands to highlight some code lines in an algorithm, based on that solution:               \newcommand{\algcolor}[2]{\hspace*{-\fboxsep}\colorbox{#1}{\parbox{\linewidth}{#2}}}     \newcommand{\algemph}[1]{\algcolor{GreenYellow}{#1}}      That works pretty well, but it is failing in some cases, depending on the lines that I want to highlight. For instance, the following algorithm works fine:               \begin{algorithmic}[1]         \FORALL{$elem$ in $collection$}             \STATE $foo(elem)$             \algemph{\STATE $bar(elem)$}         \ENDFOR     \end{algorithmic}      But, if I swap the two statements in the loop:               \begin{algorithmic}[1]         \FORALL{$elem$ in $collection$}             \algemph{\STATE $bar(elem)$}             \STATE $foo(elem)$         \ENDFOR     \end{algorithmic}      I get this error when calling `pdflatex`:               ! Missing \endcsname inserted.     <to be read again>                        \ALG@currentblock@2      l.19 \end{frame}      Here you have a minimal reproducible test case:               \PassOptionsToPackage{dvipsnames}{xcolor} % prevent an option clash     \documentclass{beamer}          \usepackage[dvipsnames]{xcolor}     \usepackage{algcompatible}          \newcommand{\algcolor}[2]{\hspace*{-\fboxsep}\colorbox{#1}{\parbox{\linewidth}{#2}}}     \newcommand{\algemph}[1]{\algcolor{GreenYellow}{#1}}          \begin{document}          \begin{frame}{Test Frame}         \begin{algorithmic}[1]             \FORALL{$elem$ in $collection$}                 \algemph{\STATE $bar(elem)$}                 \STATE $foo(elem)$             \ENDFOR         \end{algorithmic}     \end{frame}          \end{document}      Is it possible to fix the current approach that I am using? Is there any other solution for coloring lines in an algorithm?


title: Strange extra line after forloop in a tabular table

text: I'm trying to generate table lines (`tabular` environment) with `forloop` macro. I've got strange extra line after `forloop`.               \documentclass {article}          \usepackage [utf8] {inputenc}     \usepackage [english] {babel}     \usepackage{forloop}          \begin{document}          \newcounter{n}     \setcounter{n}{2}     \newcounter{i}          \begin{tabular}{|c|c|c|c|}         \hline         1 head             & 1              & 1              & 1                  \\ \hline              \forloop{i}{0}{\value{i} < \value{n}} {%                 1                      & 1                      & 1                      & 1                          \\ \hline         }     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/QsW9r.png) Why that? Notice that if i add one hand-coded line after loop, than everything is fine.


title: How does one install TeX Live in Windows 8?

text: I have Windows 8. I just downloaded the TeX Live distribution from CTAN. When I double click on `install-tl.bat`, I receive the following error message:               PATH=C:\Users\JAKEFI~1\AppData\Local\Temp\7zOFD2B.tmp\tlpkg\tlperl\bin;C:\Progra     m Files\7-Zip\;C:\Program Files\Internet Explorer;;C:\Windows\system32;C:\Window     s;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progra     m Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.AC     E\Core-Static     "C:\Users\JAKEFI~1\AppData\Local\Temp\7zOFD2B.tmp\install-tl"     'perl' is not recognized as an internal or external command,     operable program or batch file.     Press any key to continue . . .      Two questions. (1) Is there any useful information contained in the above error message that would help me to install? (2) If not, are there alternate installation methods? FWIW I have also tried using `install-tl-advanced.bat`. There is no error message, but the computer doesn't do anything either.


title: Alignment of the subsection changed after styling

text: I applied some styling to my page.But my alignment of the sub section headers changed.Here is the code:                \documentclass[12pt,oneside]{book}     \usepackage{graphicx}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usetikzlibrary{shapes.misc,arrows}     \newcommand\titlebar{%     \tikz[baseline,trim left=0cm,trim right=3cm] {             \node [             text = red!70!green,             anchor= base east,                     minimum height=3.5ex] (a) at (3cm,0) {             \textbf{\arabic{chapter}.\thesection}         };        \path[fill=red!70!blue] (a.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (a.east) |- (\textwidth+1cm,-0.75ex);       }%     }          \newcommand\subtitlebar{%     \tikz[baseline,trim left=0cm,trim right=3cm] {         \node [             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (b) at (3cm,0) {             \textbf{\arabic{chapter}.\arabic{section}.\thesubsection}         };        \path[fill=red!70!blue] (b.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (b.east) |- (\textwidth+0.8cm,-0.75ex);     }%     }          \titleformat{\subsection}{\normalfont\sf}{\subtitlebar}{0.2cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\subsection}{-1.8cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesubsection}{\arabic{subsection}}               \titleformat{\section}{\large\sf}{\titlebar}{0.25cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\section}{-2cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesection}{\arabic{section}}     \begin{document}     \begin{titlepage}     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \centering          \includegraphics[scale=0.25]{pec_emblem}\\[0.5cm]          %\textsc{\LARGE PONDICHERRY ENGINEERING COLLEGE}\\[1.5cm]     %\textsc{\Large CASE TOOLS LABORATORY}\\[0.5cm]     %\textsc{\large SOFTWARE REQUIREMENTS SPECIFICATION}\\[0.5cm]     {\LARGE\scshape PONDICHERRY ENGINEERING COLLEGE\\[1.5cm]}     {\Large\scshape CASE TOOLS LABORATORY\\[0.5cm]}     {\large\scshape SOFTWARE REQUIREMENTS SPECIFICATION\\[0.5cm]}          \HRule \\[0.4cm]     %{ \huge \bfseries WEB BLOG}\\[0.4cm]     {\huge\bfseries WEB BLOG\\[0.4cm]}     \HRule \\[1.5cm]          \begin{minipage}{0.4\textwidth}     \begin{flushleft} \large      \emph{Author:}\\      \textsc{Subham Soni}     \end{flushleft}     \end{minipage}     ~     \begin{minipage}{0.4\textwidth}     \begin{flushright} \large     \emph{Supervisor:}\\     \textsc{Mr.M. Thirumaran}     \end{flushright}     \end{minipage}\\[4cm]          %{\Large \today }\\[3cm]     {\Large \today \\[3cm]}     \vfill     \end{titlepage}     \tableofcontents     \chapter{Introduction}     The word \textbf{Blog} is the combination of \textbf{weB} $+$ \textbf{LOG}.A Blog is the combination of a \emph{Journal} and a \emph{Website}.A Blog lets lets you share your experience with many people.A Blog has two owners, the \textsc{Author} and the \textsc{Reader}.The Author visits the Blog administration area and writes a new post.The post consists of a \texttt{Title},\texttt{Content} and some \texttt{Tags}.     \section{Benefits}       Some of the benefits of a Web Blog are :     \begin{itemize}     \item Blogs are totally \emph{searchable}.Blogs can searched for people,events,places or even your own name to see if people are blogging about you.     \item Blogs are completely \emph{interactive}.Readers of the blog can leave comments about the author's posts.Other readers can reply those comments and the author can reply all of them if they want to.     \item Blog posts can be \emph{sorted} by \texttt{topic}.When the others write a post they can write a label to this post for words like \textsf{work},\textsf{home},\textsf{family},\textsf{vacation},etc\ldots\\Then the reader can sort the different topics they have labelled them.     \item Blogs are great because they allow us to \emph{share} our lives with people especially with our friends      \item \textbf{Technorati} is a \texttt{Blog Search Engine} that works just like \emph{Google}, the search engine gives results of the various blogs available based on the query and the \texttt{url} that it is located in.      \end{itemize}     \section{Purpose of Requirements Documents}     The Software Requirements Specification (SRS) will provide a detailed description of the requirements for the Web Blog. This SRS will allow for a complete understanding of what is to be expected of the Web Blog to be constructed. The clear understanding of the Web Blog and its’ functionality will allow for the correct software to be developed for the end user and will be used for the development of the future stages of the project. This SRS will provide the foundation for the project. From this SRS, the Web Blog can be designed, constructed, and finally tested.This SRS will be used by the software engineers constructing the Web Blog and the  end users. The software engineers will use the SRS to fully understand the expectations of this Web Blog to construct the appropriate software. The end users will be able to use this SRS as a “test” to see if the software engineers will be constructing the system to their expectations. If it is not to their expectations the end users can specify how it is not to their liking and the software engineers will change the SRS to fit the end users’ needs.     \section{Objectives}     The \emph{general} and \emph{specific} objectives of the project are described below:     \subsection*{General Objectives}     The general objective of the project is to develop a Web Blog.     \subsection*{Specific Objectives}     In order to achieve the general objective,the following list of specific objectives is set:     \begin{itemize}     \item To develop a  registration system for people to create blogs     \item To develop an interface to create post and edit blogs     \item To develop a comment system for the posts.     \item To develop a search system to search the blog by people,events,places     \item To develop a share system to share the blogs      \end{itemize}     \section{Scope of the Product}     The software product to be produced is a \emph{Web Blog} which will enable people create and maintain their own blogs. The first subsystem is the \emph{registration} system to register the new users. The second subsystem is the \emph{interface} system which helps people to create and post their blogs and edit them(if needed). The third subsystem is \emph{comment} system that is facility for the \texttt{blog owners},\texttt{blog readers} and \texttt{others} to comment about the blog and the comments itself.The fourth subsystem is the \emph{search} system.It allows people to search for the blog(s) by title,people,events or places.The fifth subsystem is the \emph{share} subsystem.This allows people to share the blogs with the social media.These are the five subsystems.\par     There are two end users for the Web Blog. The end users are the Authors and Readers.\par     The Web Blog's objectives is to provide more facilities than a simple journal.Since every day new blogs will be posted or edited, the system's stability depends solely on the \emph{database}.The database must be capable of storing the huge amount of information.The number of blog posts are dependent on the number of records the database can handle.The database must be efficient enough to display the results when a search query is passed to it.The system should be user appropriate, easy to use, provide easy recovery of errors and have an overall end user high subjective satisfaction.      \section{Limitations}     The limitations of this project are:     \begin{itemize}     \item The number of tags available for the posts are limited     \item The appropriate \textsc{U.R.L} is not generated for the blog post.The user has to provide the link manually by searching the blogs      \end{itemize}     \section{Overview}     The SRS is organized into two main sections. The first is The Overall Description     and the second is the Specific Requirements. The Overall Description will describe the requirements of the Web Blog from a general high level perspective. The Specific Requirements section will describe in detail the requirements of the system.     \chapter{General Description}     Describes the general factors that affect the product and its requirements. This section does not state specific requirements. Instead it provides a background for those requirements, which are defined later, and makes them easier to understand.     \section{Product Perspective}     The Web Blog system is independent stand-alone system but for the sharing of the blog posts it uses the \emph{web services} provided by various social media networks like \emph{Facebook},\emph{Twitter},\emph{Google$+$}     \section{Product Functions}     \begin{itemize}     \item \textsc{Registration System}     \begin{itemize}     \item The user has to register before he$/$she can start posting the blogs     \item The user can provide their interests , so that the latest blogs appear on his home screen of his interested topics     \end{itemize}     \item \textsc{Interface System}     \begin{itemize}     \item The user can give details about the blog title,subject and the content of the blog     \item The user (if they want) can  provide additional tags for the blogs     \item The user can create his/her blog by clicking the \textbf{PUBLISH} button     \item The user , if neccesary , can edit his posted blog and update them     \end{itemize}     \item \textsc{Comment System}     \begin{itemize}     \item The reader of the blog can comment on a blog post     \item The reader of the blog can comment on a comment already available     \item The author of the blog can comment on all of these     \end{itemize}     \item \textsc{Search System}     \begin{itemize}     \item The user/reader can search for blogs based on content,title,tags,popularity.     \item The search results can be sorted in the required order     \end{itemize}     \item \textsc{Share System}     \begin{itemize}     \item The reader of the blog can share with others through \textit{Email},\textit{Social Media} like Facebook,Twitter,etc\ldots     \end{itemize}     \end{itemize}     \section{Assumptions and Dependencies}     The assumptions and dependencies of the system are:     \begin{itemize}     \item The \textsl{Save as Draft} option is not implemented in the system     \item The \textsc{U.R.L.} of the blog is not generated     \item The blog content is purely \emph{text-oriented}.There are no formatting options available.     \end{itemize}     \chapter{Specific Requirements}     \section{External Interfaces}     The Web Blog will use the standard input/output devices for a personal computer. This includes the following:     \begin{itemize}     \item Keyboard     \item Mouse     \item Monitor     \end{itemize}     \section{User Interfaces}     \begin{center}     \begin{tabular}{|p{.50\textwidth}|p{.50\textwidth}|}     \hline     \textbf{SCREEN NAME}&\textbf{DESCRIPTION}\\     \hline     Registration&Create an account for the new user for blogging\\     \hline     Login&Provide access to the user for blogging\\     \hline     Create Blog&Interface for the user to create a blog.It consists of a blog title,blog subject,blog content,tags(optional) and the publish button\\     \hline     Edit Blog&Interface for the user to edit the existing blog.Provide a search feature,to search the blog to be edited and then the same interface as Create Blog with contents filled and an update button\\     \hline      Comment Blog&Interface for the user to comment on a blog post.It consists of a textarea and a comment button\\     \hline     Share Blog&Interface for the user to share the blog post.It consists of various buttons to provide a choice of access to share followed by the email address of the people with whom the user wants to share the blog and a share button.\\     \hline     \end{tabular}     \end{center}     \section{Software Interfaces}     The Web Blog is implemented using \textsc{Php}.Since \textsc{Php} has an in-built support for My\textsc{SQL},the My\textsc{SQL} database will be used.     \section{Hardware Interfaces}     The Web Blog is implemented in a \emph{platform-independent} architecture.The software can run on any machine but the server should have a support for \textsc{Php}.     \section{Functional Requirements}     The Functional Requirements of the system are:     \begin{itemize}     \item Register the user     \item Post \& Edit a Blog     \item Comment a Blog     \item Search for a Blog     \item Share a Blog     \end{itemize}     \section{Non Functional Requirements}     The Non Functional Requirements are:     \begin{itemize}     \item User validation during login to ensure the user is authentic     \item Efficient search of blog from the database     \item User validation when a blog is shared to ensure the authenticity of the user and the social media network     \item Displaying the blogs that are updated daily on the user screen based on the tags he$/$she have set      \end{itemize}     \section{Analysis Model}     To produce a model of the system which is correct, complete and consistent we need to construct the analysis model which focuses on structuring and formalizing the requirements of the system.\par      Analysis model contains three models: functional, object and dynamic models. The functional model can be described by use case diagrams.  Class diagrams describe the object model.\par      Dynamic model can also be described in terms of sequence, state chart and activity diagrams. For the purpose of this project we have described the analysis model in terms of the functional model and dynamic models using use case and sequence diagrams.     \end{document}      ![enter image description here](http://i.stack.imgur.com/woF0J.png)


title: Colour themes in beamer not working for lemma/theorem/definition environments

text: I'm currently trying to learn how to use beamer, and I have a presentation in a few days on red-black trees. For thematic reasons, I decided to go with the beaver colour scheme (as it gives me red and black as the main colours, which seemed fitting). However, for all the amsmath-defined environments (lemma, theorem, proof and definition), I still have blue headers with white text, instead of what I would expect from the beaver colour theme. What am I doing wrong? I've attached my minimal working example below.               \documentclass[onlymath]{beamer}          \mode<presentation>     {       \usetheme{Antibes}       \usecolortheme{beaver}       \setbeamercovered{transparent}     }               \usepackage[english]{babel}          \usepackage[latin1]{inputenc}          \usepackage{times}     \usepackage[T1]{fontenc}          \usepackage{tikz}          \usepackage{capt-of}          \usepackage{algorithm, float}     \usepackage[noend]{algpseudocode}     \usepackage{comment}          \title{Red-Black Trees}          \subtitle{Motivation, Description, Performance} % (optional)          \author {Kostya Ross}     \institute {AUT University}     \date {\today}               % If you have a file called "university-logo-filename.xxx", where xxx     % is a graphic format that can be processed by latex or pdflatex,     % resp., then you can add a logo as follows:           \pgfdeclareimage[height=1cm]{university-logo}{aut_logo.jpg}      \logo{\pgfuseimage{university-logo}}          \beamerdefaultoverlayspecification{<+->}               \begin{document}          \begin{frame}       \titlepage     \end{frame}          \begin{frame}{Motivation}{The sorted set problem}     \begin{lemma} %the title of this should be coloured as per beaver, but isn't for some reason     Something for testing.     \end{lemma}     \end{frame}          \end{document}      Am I crazy, or is this doable?


title: Bibtex styles - undefined control sequence

text: The code below shows a .bib file generated with KBibTex which is meant to be a general database for some articles to be written from now on.               @comment{x-kbibtex-personnameformatting=<%l><, %f>}          @book{leh,     author = "Cox, Michael M. and Nelson, David L.",     edition = "5",     publisher = "Omega",     title = "{Lehninger: Principles of Biochemistry}",     year = "2007"     }          @book{lev1,     author = "Levine, Ira N.",     edition = "5",     publisher = "McGraw Hill",     title = "{F{\'i}sicoqu{\'i}mica}",     volume = "1",     year = "2004"     }          @book{lev2,     author = "Levine, Ira N.",     edition = "5",     publisher = "McGraw Hill",     title = "{F{\'i}sicoqu{\'i}mica}",     volume = "2",     year = "2004"     }          @book{reg,     author = "Gonz{\'a}lez, J. R. Regueiro and Lamesa, C. L{\'o}pez and Rodr{\'i}guez, S. Gonz{\'a}lez and Naves, E. Mart{\'i}nez",     booktitle = "{Biolog{\'i}a y patolog{\'i}a del sistema inmune}",     edition = "4",     publisher = "Panamericana",     title = "{Inmunolog{\'i}a}",     year = "2010"     }      I am well able to use it with some styles such as plain, vancouver, ieeetr, etc. However, when using some others, specially chicago and harvard based, I obtain error messages. For example: when using dcu (harvard based) I get: > ! Undefined control sequence. l.3 \harvarditem {Cox \harvardand\ > Nelson}{2007}{leh} ? As that sequence is not written on the .bib, it must be, odd enough, generated by bibtex into .bbl. Any idea how to fix this? Do I need to edit the .bbl? How to? Thanks in advance to all of you. P.S.: might be useful to notice I am using the article template provided by texworks with babel for spanish. **EDIT Oct 9 2013** Here's a MWE:               \documentclass[12pt]{article}      \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}           \begin{document}          \nocite{*}          \bibliography{Docs/latex/books.bib}     \bibliographystyle{dcu}     \end{document}      where books.bib is the code I post before. However, when making the MWE I found that compiling has some sort of influence in the error. I. e.: I was able to run it properly only once right after erasing the useless parts of the document but never after, even though, I 've tried deleting all the auxiliar files. I am even more puzzled than before. Hope this helps.


title: TikZ marking several blocks in a matrix

text: I would like to mark a few blocks in a matrix and I followed directions from other similar questions but I get a weird TikZ behavior .. seems that I can not have more than one marked block in a matrix? What I would like to show is the stencil of a blocked Givens rotations to annihilate non-zero elements under the diagonal starting from some column, where I update a block (red color) over the diagonal and then can work on the trailing columns or row block on the right (green color). UPDATE: Using the answer as input I implemented my final use case.               \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{calc,fit,matrix,arrows,automata,positioning}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \newcommand{\tikzdrawbox}[3][]{%         \tikz[overlay,remember picture]{         \draw[#3,#1]           ($(left#2)+(-0.2em,0.9em)$) rectangle           ($(right#2)+(0.2em,-0.3em)$);}     }          \newcommand\x{\times}          \begin{equation}\label{eq:blockedgivens}     \newcommand\y{\colorbox{myred}{$\times$}}     \newcommand\z{\colorbox{mygray}{$\times$}}       \left(\begin{array}{ccccccccccccccc}         \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 & \tikzmark{left1}\x & \x & \x & \x & \tikzmark{left3}\x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 & \z & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 & \z & \x & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 & \z & \x & \x & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 & \z & \tikzmark{left2} \x \tikzmark{right1} & \x & \x & \x & \tikzmark{left4} \x & \x & \x & \x \tikzmark{right3}\ \\          0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x & \x & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x \tikzmark{right2} & \x & \x & \x \tikzmark{right4} \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x & \x \\          0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 &  0 & \z & \x \\       \end{array}\right)       \tikzdrawbox[thick]{1}{red}       \tikzdrawbox[thick]{2}{red}       \tikzdrawbox[thick]{3}{green}       \tikzdrawbox[thick]{4}{green}     \end{equation}\      ![enter image description here](http://i.stack.imgur.com/VxpYh.png)


title: Problem setting the width of a column with multirow command

text: I have an issue with the width of a column, I have a long word in a cell which is larger than the column width, I've tried with `\parbox`, changing the width of the box and the column, but I can't fix it. Here's the code, I wrote the needed packages, multirow and array: (I'm sorry for the rotated image).                 \documentclass{article}        \usepackage{array}        \usepackage{multirow}        \begin{document}        \begin{table}[H]      \centering      \begin{tabular}{|c|>{\centering\arraybackslash}m{13mm}|>     {\centering\arraybackslash}m{13mm}|>{\centering\arraybackslash}m{13mm}|>          {\centering\arraybackslash}m{13mm}|>{\centering\arraybackslash}m{13mm}|>{\centering\arraybackslash}m{30mm}|}      \hline      \multirow{2}{*}{text} & \multicolumn{4}{|c|}{text text text text text text text} & \multirow{2}{*}{thereisalongwordhere}\\      \cline{2-5}      & text & text & text & text &\\      \hline      \end{tabular}      \end{table}      \end{document}      ![enter image description here](http://i.stack.imgur.com/QzHAA.jpg)


title: Drawing a line that approaches a circle normally

text: I have a `node` (using TikZ and the shapes library)               \node (c0) [circle, draw] at (0,0) {foo};      and a coordinate               \coordinate (c1) at (4,2);      How can I draw a line from `c1` to `c0.north west` such that the line first proceeds horizontally along the `y` coordinate of `c1` (here 2), and then turn towards `c0` at the appropriate point, so that it is normal to the circle when it hits `c0.north west`? Both segments are straight lines, with the bend being either sharp/rounded corners (it doesn't matter). Here's a simple sketch of the above: ![enter image description here](http://i.stack.imgur.com/2HicG.png)


title: paragraph design and single lines

text: By default LaTeX will   * not indent the first paragraph after a section heading   * indent every following paragraph   * not insert a space between paragraphs               \section{heading}     first paragraph which is not indented     second paragraph which is indented but no space in between the paragraphs      So far I like this behavior for longer paragraphs but sometimes there are only very short paragraphs (only one line) or kind of preceding lines before a listing. They become indented as well which sometimes looks very odd. > **Heading** > > Very short first line > > --Indented Line of a longer Paragraph. This is an example for a longer > paragraph which becomes indented and fills more then only one line > > --This is an example line being indented, looking odd: > >   1. here comes an example listing > >   2. announced by the odd-looking short indented line > > Is there a way to have short single lines not automatically not indented but separated by blank lines? **UPDATE** That's the behaviour I would like. Indentation only for paragraphs which follow paragraphs. But by default even a paragraph after a table or listing is beeing indented. from German Wikipedia > In modern books usually only paragraphs following paragraphs are indented. > The first paragraph after a heading, after a blank line or other insertions > --longer quotes, drawings, tables, listings etc.--starts flush left. Further more I think single line paragraphs shouldn't be indented. The probably should be avoided or start flush left.


title: Inconsistent shading

text: > **Possible Duplicate:**   >  How can I avoid compiling twice? I am shading first page using following code.               \begin{tikzpicture}[remember picture,overlay]     \shade[left color=white,right color=orange!60]     (current page.south) rectangle (current page.north east);      \end{tikzpicture}      But I found sometime shading is there on whole page and sometime it is partial (just one strip). I don't know what is reason behind it.How can I fix my problem?


title: How to get this M?

text: I want to get this M in LaTeX: ![enter image description here](http://i.stack.imgur.com/vEoE8.jpg) I don't get this style using `\mathcal{M}`, `\mathbb{M}` nor `\mathfrak{M}`. How can I get it? I don't want to change the font of the whole document, I just want to insert that M with that style.


title: Similar to Excel's line charts?

text: How could I create charts as the follow ones, which were produced by Microsoft Excel? ![basic National Accounting Identities](http://i.stack.imgur.com/aKzxR.jpg) ![consumer loan](http://i.stack.imgur.com/dLnEC.jpg) ![table with numbers for the charts](http://i.stack.imgur.com/14ASy.png)


title: How to format Maxwell equations?

text: Is there a variant of `split` environment from `amsmath` package which would allow for two aligned equations in a row? I want to format two pairs of Maxwell equations in two rows and put single equation number between the rows. Unfortunetely, `split` allows only one alignment tab `&` in a row, and I need three as in the following example:               \documentclass{article}     \usepackage{amsmath}     \DeclareMathOperator{\Div}{div}     \DeclareMathOperator{\Rot}{rot}     \begin{document}     \begin{align}         \label{18.1:1}         %\begin{split}             \Rot\vec{E} &=-\frac{1}{c}\parder{\vec{B}}{t}             ,             &             \Div\vec{B} &=0,             \\         \label{18.1:2}             \Rot\vec{B} &=\frac{1}{c}\parder{\vec{E}}{t}             +\frac{4\pi}{c}\,\vec{j}             ,             &             \Div\vec{E} &=4\pi\rho_{\varepsilon }         %\end{split}         \end{align}     \end{document}      Here every row has its own number.


title: How to lock some part of marginpar area?

text: Consider the following layout. ![enter image description here](http://i.stack.imgur.com/nH1CM.png) I'd like to lock some part of marginpar area. For example, after 6cm from the top, skip 4cm and the margin area continues below.


title: TeXmaker in Ubuntu does not autocomplete bibliography items

text: I was using TeXstudio in Windows, now I switched to TeXmaker in Ubuntu. I love it, but one thing is missing. In TeXstudio, whenever I type `\cite{` the autocomplete window appeared with the name of my bibliography items. And by bibliography items, I don't mean a separate .bib file. I just put them at the end of my document like this :               % ... beginning of the document     \begin{thebibliography}{9}     \bibitem{wikipedia_article} \begin{verbatim} http://en.wikipedia.org/wiki/Article_name \end{verbatim}     \bibitem{mikolajczyk_paper} K. Mikolajczyk (2005) "A Comparison of Affine Region Detectors" ,  International Journal of Computer Vision     \end{thebibliography}          \end{document}      But TeXmaker does not autocomplete the names `mikolajczyk_paper` and `wikipedia_article`. How can I make it work? Thanks for any help !


title: fixed leading 0's with pgfmath

text: I want to calculate a time being printed using `pgfmath`. I have some code similiar to this:               \pgfmathparse{int(mod(\x,60))}\pgfmathresult O'clock      but if the result is between 0 and 9 my time being displayed is something like `11:2` instead of `11:02`. Can I force fixed zeros at the front? I only found something to get them at the end.


How can we break down section and subsection as only section on the header on the beamer? For example, ![enter image description here](http://i.stack.imgur.com/HdBJP.png) AA is from section and DATA is from subsection.               \section{AA}     \subsection{DATA}      Is it possible that 'AA DATA' appear on the center only using section?               \section{AA DATA}      Thank you,


title: Multicolumn width calculated for lX columns

text: I have the following table:               \documentclass{article}     \usepackage{tabu, longtable}          \begin{document}     \begin{longtabu} to \textwidth {|l|l|l|lX|}           1 & Column 2 & 3 & \multicolumn{2}{l|}{Description} \\ \hline      1 & 2 & 3 & A: & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eget est id enim vehicula sodales et quis ipsum. \\ \hline           & & & \multicolumn{2}{p{8cm}|}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eget est id enim vehicula sodales et quis ipsum.} \\ \hline          \end{longtabu}      \end{document}      The last row uses a fixed width for the paragraph (8cm). This does not fit perfectly but shows how the result should look. My question is: Is it possible to replace the fixed value by something else so Latex calculates the correct width of the last two columns for me?


title: Same footer line on every page

text: Is there a way to place the same footer line on every page? Right now, I have a chapter called introduction and in my `introduction.tex` file I have specified a footer line that needs to be added. But the problem is, when the pdf file is being generated, the footer line I specified is only on the last page of the chapter. But I want it on every page in the chapter. Could someone please tell me how I can accomplish this?


title: how to define commands within custom environment

text: I am working on a custom `.cls` for typesetting my CV. I am trying to create a custom environment to provide formatting for job/education history. I would like to specify it as follows:               \begin{cvsection}       \cvdate{xx-xx-xxxx}       \cvcompany{Some company & Co.}       \cvposition{Toilet cleaner}       \cvcomment{I love cleanin' dem toilets!}     \end{cvsection}      So I've defined my environment and tried to use `\newcommand...` within the environment definition. LaTeX doesn't like that so what is the best way to approach this?


title: How to set the width of column in longtable method?

text: I`m trying to put a table in my document. it is bug in both width and height. So I need to use longtable, landscape and fixed width for the column. but I cant. Please help. I want this table fit in the page and if it is necessary, break it to 2 pages. Also I need the titles for columns be on their exact place. now they are not located on top of their columns. here is the code:               \begin{landscape}     \tiny     \begin{center}     \begin{longtable}{|l|l|l|l|l|l|l|l|l|}\\               \caption[Feasible triples for a highly variable Grid]{Feasible triples for      highly variable Grid, MLMMH.} \label{grid_mlmmh} \\          \multicolumn{1}{c}{System} & \multicolumn{1}{c}{Technology} & \multicolumn{1}{c}{Localization Method} & \multicolumn{1}{c}{Accuracy} & \multicolumn{1}{c}{Std RFID components} & \multicolumn{1}{c}{Indirect localization} & \multicolumn{1}{c}{Proximity detection}  & \multicolumn{1}{c}{applications} & \multicolumn{1}{c}{ST advantages}\\      \hline      \endfirsthead               \multicolumn{3}{c}%     {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\     \hline      \multicolumn{1}{c}{System} & \multicolumn{1}{c}{Technology} & \multicolumn{1}{c}{Localization Method} & \multicolumn{1}{c}{Accuracy} & \multicolumn{1}{c}{Std RFID components} & \multicolumn{1}{c}{Indirect localization} & \multicolumn{1}{c}{Proximity detection}  & \multicolumn{1}{c}{applications} & \multicolumn{1}{c}{ST advantages}\\ \hline      \endhead          \hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline     \endfoot          \hline \hline     \endlastfoot          RFID IoT[15] & Passive UHF RFID & Reader range & Reader range & Standard UHF RFID readers and tags & No    & No    & Tracking people’s behaviour & Allowing for proximity detection. \\           &       &       &       &       &       &       &       & Fine grained localization. \\     RSSI RFID [5] & Passive  UHF RFID & RSSI  & ~ 1 m & Standard UHF RFID readers and tags & No    & No    & Localization & Allowing for proximity detection. \\           &       &       &       &       &       &       &       & Fine grained localization. \\     Smart-home RFID [6] & Passive UHF RFID & Reader range & Reader range & Non standard RFID – mobile listeners, master and slave readers & No    & No among tags, slave and mobile readers have low range and can be used for proximity detection & Smart homes & [6] is just a conceptual solution that is more complex than ST-based RFID system \\     Ambient backscatter[10] & Passive technology & Ambient power harvesting and backscattering  & N/A – however it is possible to implement localization based on proximity & Non standard & N/A   & 2.5 ft proximity communication & Power harvesting IoT  & Relying on standard RFID components \\     Enhants [9] & UWB   & Non-RFID – power harvesting & N/A   & Non standard & N/A   & Yes – in the range of 1m to 10 m & Power harvesting IoT – the goal is to continuously locate and detect proximity & Relying on standard RFID components, \\           &       &       &       &       &       &       &       & Localization \\     Holographic [11] & Passive UHF RFID & phase & < 50 cm & Standard UHFreader and tags – reader antenna moves at known trajectory & No    & No    & Localization & Allowing for proximity detection. \\           &       &       &       &       &       &       &       & No need to move readers. \\     PDOA [13] & Passive UHF RFID & phase & < 1m  & Reader that provides phase & No    & No    & Localization & Allowing for proximity detection and limiting the range. \\     WISP with LEDS [14] & Passive UHF RFID, LEDs, camera & optical methods & <1 cm & Modified UHF tag, standard RFID reader, camera & No    & No between the tags. It can detect that two tags are located next to one another by the camera. &       & Much simpler system based on standard RFID tags. \\     Sherlock [12] & Passive UHF RFID, camera & cameras & ~1 m  & UHF RFID with steerable antennas and with cameras & No    & No    & Finding objects in the environment & Much simpler system based on only on RFID components, proximity detection \\     Hand-on RFID [8] & Passive HF RFID  & Proximity & N/A   & Standard HF RFID system & N/A   & Detecting touching of objects & Detection of daily activities & ST can be used for much more applications: localization, social interactions \\     Openbeacon [4] & Active RFID & Proximity and localization based on landmark & ~2m is reported. It can be much less if denser landmark tags are used & Non-standardized active RFID & Yes   & Yes < 1 m detection range & Social interaction, & Active tags are more expensive. For localiz., openbeacon tags need to replace batteries if used as landmark. \\           &       &       &       &       &       &       & Location of people &  \\     ARR [3] & Passive UHF RFID & Proximity & N/A   & Standard UHF RFID with ARR & N/A   & Yes ~ 3 m detection range & Portal & ST can be used as both stationary and mobile tag while ARR is only stationary and it is more complex. \\     Gen 2 listener [7] & Passive UHF RFID & Proximity & N/A   & Gen2 Listener & N/A   & Yes ~ 12  m detection range & Protocol analyzer & Expensive hardware with GNU radio. Stationary compoenent. \\     Sense-a-Tag [1] & Passive UHF RFID & Proximity  & 30cm – depending of the density of landmark tags & Standard UHF RFID with ST & Yes   & Yes < 0.6 m detection range dependant of the distance from the reader & IoT based on standard UHF RFID: &  \\           &       &       &       &       &       &       & Localization, &  \\           &       &       &       &       &       &       & Proximity detection &  \\               \end{longtable}     \end{center}     \end{landscape}


title: Equation array troubles

text: I have a problem and I've been searching forever for a fix to it. I have three equation arrays that are huge. They all have about 10 to 20 equations. LaTeX does not seem to want to split up the equation arrays onto different pages. A consequences of this is that I have huge black vertical spaces separating the equation arrays just so every array is one just one piece of paper. How do I get rid of these black, empty, vertical spaces?


title: Natbib In-Text Citation displays (author?)

text: I have taken a look through many other questions on this subject but cannot seem to fix my issue. Essentially while references display correctly I cannot get the author citation to appear in my text despite running pdflatex followed by bibtex followed by two more runs of pdflatex. Any help would be appreciated. Sample tex file:               \documentclass{article}     \usepackage{natbib}          \begin{document}          Blahblahblah \citet*{Test12}.          \bibliographystyle{plain}     \bibliography{refs}          \end{document}      refs.bib:               @article{Test12,     author = "John Smith",     title = "Test Article",     year = "2012",     journal = "The Test Journal"     }      Output: ![enter image description here](http://i.stack.imgur.com/itBUO.png)


title: citeauthor doesn't yield author name

text: I would like to generate author citations in my text, and I have been following the information in this question. I've got my includes               \usepackage[numbers,                             sort&compress                             ]{natbib}       % Sort numerical keys for multiple cites          \section{Example Chapter}          ~\citeauthor{born_population_2003}     ~\cite{born_population_2003}      I've got my bib file (with standard citations being referenced correctly)               @article{born_population_2003,             title = {Population substructure of North Atlantic minke whales (Balaenoptera acutorostrata) inferred from regional variation of elemental and stable isotopic signatures in tissues},             volume = {43},             issn = {09247963},             url = {http://linkinghub.elsevier.com/retrieve/pii/S092479630300085X},             doi = {10.1016/S0924-7963(03)00085-X},             number = {1-2},             urldate = {2013-08-28},             journal = {Journal of Marine Systems},             author = {Born, {E.W.} and Outridge, P. and Riget, {F.F.} and Hobson, {K.A.} and Dietz, R. and Øien, N. and Haug, T.},             month = sep,             year = {2003},             pages = {1--17},             file = {born2003_1-s2.0-S092479630300085X-main.pdf:/home/ryan/.mozilla/firefox/hauwprbq.default/zotero/storage/PMNU4J6G/born2003_1-s2.0-S092479630300085X-main.pdf:application/pdf}             }      But I'm not sure how I should check the compilation part. I'm using a template provided by my university, which is using a `Makefile`, which uses `latexmk` to compile the document               default:             #latexmk -jobname=$(builddir) -pdfdvi thesis.tex             latexmk -pdfdvi thesis.tex      The output I'm getting looks like this ![enter image description here](http://i.stack.imgur.com/48Bj2.png) Is this some issue with `latexmk`?


title: Why natbib package can not find author?

text: I have a .bib file as following:               %% This BibTeX bibliography file was created using BibDesk.     %% http://bibdesk.sourceforge.net/     %% Saved with string encoding Unicode (UTF-8)           @book{marcu2000theory,         Author = {Marcu, Daniel},         Date-Added = {2013-02-12 04:56:47 +0000},         Date-Modified = {2013-02-12 04:56:47 +0000},         Publisher = {MIT Press},         Title = {The theory and practice of discourse parsing and summarization},         Year = {2000}}      My Latex file:               \documentclass{article} % For LaTeX2e     \usepackage{graphicx}     \usepackage{url}     \usepackage{natbib}          \title{T}          \begin{document}     \maketitle     \cite{marcu2000theory}     \citeauthor{marcu2000theory}          \bibliography{DPSurvey}     \bibliographystyle{plain}          \end{document}      However, I always got the warning:               Author undefined for citation`marcu2000theory' (natbib) on page 1      Could someone point out the mistake?


title: The source code for accent commands

text: I'm using LaTeX on Ubuntu, it calls **TeX Live** here. I'm interested to see source code of accent commands behavior. Where can I find it?


title: Removing overfull and underfull box warnings

text: Always when I want to prepare a document with LaTeX I receive different warnings including underfull and overfull but I don't know how I can handle these warnings. As you can see here I have two tables in LaTeX but I got the same errors for these, please help me change these tables to solve these warnings.               \begin{table}[h]     \renewcommand{\arraystretch}{1.3}       \caption{Contention window size updating}       \label{tab:table1}       \centering       \begin{tabularx}{3.7cm}{ll}       \hline     \bfseries Status & \bfseries CW range \\     \hline\hline     000 & \\     010 & ${CW}_{old}$ * 2\\     100 & \\       \hline     110 & ${CW}_{old}$ * A\\       \hline      001 & ${CW}_{old}$ * B\\       \hline     011 & \\     101 & ${CW}_{min}$\\     111 & \\     \hline     \end{tabularx}          \end{table}          \begin{table}[h]     \renewcommand{\arraystretch}{1}       \caption{The simulation parameters}       \label{tab:table2}       \centering       \begin{tabularx}{7cm}{ll}       \hline     \bfseries Simulation Parameter & \bfseries Value \\     \hline\hline     Traffic type & CBR\\     CBR packet size & 512 byte\\     CBR data rate & 4 packet/s\\     Transport protocol & UDP\\     \end{tabularx}          \end{table}


title: How to easily update Texmaker to latest version?

text: I currently work with Texmaker 3.5 on Windows 7, but after reading a comment on this question I decided to update my version of Texmaker. However, the only way I found to do this is by uninstalling my current version and getting a recent one the Internet. Is it the only way to upgrade my Texmaker? What about my User Commands, current settings and everything? Is there a way to automatically update Texmaker?


title: The statement of a theorem appearing on a new line

text: I'm using the `amsthm` package. The statement of the theorem currently appears immediately after the words "Theorem X." I'd like the statement of the theorem to appear on a new line. Is this possible?


title: Can I count the number of times each reference is cited?

text: I am writing a paper, and I would like to be able to find out automatically how many times each reference is cited. This could either be appended to the references in a printed version, or outputted as a separate file. I've seen Check if an entry is cited multiple times, but it focusses on checking each reference at the point of citation, while I want to do an overall count. The reasons are twofold. Firstly, to see if any references are being 'overcited'. Secondly, if space becomes an issue, to be able to see easily which references are only being cited once and could potentially be removed with minimum fuss.


title: When to use serif and when to use sans serif font family

text: This is not a technical question. However as the FAQs say this place is about > people who love to create well-structured and beautifully typeset documents I take my shot. I am often confused when which font family is more appropriate. Most people would suggest: "take what you like the most". But there are typographicaly reasons and I don't want to pick a font familty randomly. I am looking for some good paper reasoning about the choice of font family, no luck so far. Are there good sources?


title: Align pictures with text

text: I am having problems to align or better put, make my figures being of equal size/margins like my text What I do is this               \documentclass[a4paper,12pt]{book}          %%%%%%%%%%%%%%%%%%%%%%%%%     %%% Document preamble %%%     %%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{appendix}          \usepackage[sort&compress,square,comma,numbers]{natbib}     \usepackage{hypernat}     % for figures     \usepackage{pstricks}     \usepackage{graphicx}      \usepackage[center,tight]{subfigure}     \usepackage{eso-pic}     \usepackage{epigraph}     \usepackage{verbatim}     \usepackage{geometry}                % See geometry.pdf to learn the layout options. \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{tikz}     \usepackage{mathptmx}     \usepackage{accents}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage[todo,colour,check,front]{optional}     \usepackage{slashed}     \usepackage{multirow}     \usepackage{url}          \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \usepackage[utf8]{inputenc}     \usepackage{slantsc}     \usepackage{array}     \usepackage{wasysym}     \usepackage{scalerel}     \usepackage[export]{adjustbox}     \usepackage{graphicx}     \linespread{1.30}          \pagestyle{empty}     \usepackage[T1]{fontenc}          %special font          \usepackage{mathpazo}     \usepackage{slashed}            % for slashed characters in math mode     \usepackage{bbm}                % for \mathbbm{1} (unit matrix)     \usepackage{xspace}             % For spacing after commands               \renewcommand{\textfraction}{1}     \renewcommand{\topfraction}{1.5}     \setcounter{totalnumber}{10}     \setcounter{secnumdepth}{5}     \setcounter{tocdepth}{5}     \usepackage{blindtext}     % adjust page width (needs to be done before fancy headers)     % fancy page headers          %\setcounter{MaxMatrixCols}{30}          \numberwithin{equation}{section}           \setlength{\textwidth}{18cm}          \setlength{\oddsidemargin}{.5cm}     \setlength{\evensidemargin}{.5cm}      \setlength{\headsep}{1cm}      \setlength{\topmargin}{0.25cm}     \setlength{\footskip}{30pt}                     \usepackage[usenames,dvipsnames]{pstricks}      \usepackage{epsfig}      \usepackage{pst-grad} % For gradients      \usepackage{pst-plot} % For axes          \usepackage{fancyhdr}     \usepackage{paralist}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter:\ #1}{}}     \renewcommand{\sectionmark}[1]{}     \fancyhf{}     %\fancyhead[LE,RO]{\begin{footnotesize}\thepage\end{footnotesize}}     \fancyhead[RE,LO]{\begin{small}\textsc{\leftmark}\end{small}}     \renewcommand{\headrulewidth}{0.5pt}               % adjust rest of page layout (needs to be done after fancy headers)     \addtolength{\headheight}{2pt} % bring header closer     \addtolength{\headsep}{10pt}     \addtolength{\topmargin}{-20mm} % enlarge vertical space     \addtolength{\textheight}{25mm}     \addtolength{\textwidth}{5mm}     \addtolength{\oddsidemargin}{-25mm} % adjust odd&even margins for texwidth     \addtolength{\evensidemargin}{-25mm}          % just to generate text for the example               % Add rotating possibility in columns and such     \usepackage{rotating}          \interfootnotelinepenalty=1000               %%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% The document itself %%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}                   \begin{figure}[!ht]         \begin{center}         \minipage{0.8\textwidth}         %\centerline{  \includegraphics[scale=0.65]{./chapter3/figures_susy/q_qq.png}}         \includegraphics[scale=0.65 ]{./chapter3/figures_susy/q_qq.png}                   \caption{The Feynman diagrams bla bla bla }         \endminipage\hill         \label{fig:q_qq}         \end{center}         \end{figure}     \end{document}      I what ever I am trying, my pics are always bigger than the text... thanks Alex ![enter image description here](http://i.stack.imgur.com/ZkFtc.png)


title: Origin of the LaTeX3 term "coffin"?

text: The documentation for the LaTeX3 `xcoffins` package introduces the concept of _coffins_ as follows: > In LaTeX3 terminology, a “coffin” is a box containing typeset material. > Along with the box itself, the coffin structure includes information on the > size and shape of the box, which makes it possible to align two or more > coffins easily. Those objects are very welcome as they ease the process of achieving a particular page layout (in comparison to LaTeX2e tools), as shown, for instance, by Frank Mittelbach in LaTeX3 and pauper's coffins. I find the choice of the term "coffin", if not morbid, at least rather peculiar. That's in no way a criticism; who doesn't like the Addams family? I imagine the LaTeX3 team needed a term that conveys the idea of a "box", but couldn't use the latter term because of its very specific meaning in TeX. Which member of the LaTeX3 team came up with the term "coffin"? Is there any anecdote related to that choice of word?