title: How to put synctex file in different directory than pdf without segmentation fault?

text: I want to put output files (`.pdf`) into a `_out` dir and auxiliary files such as `.synctex.gz` or `.toc` into a `_aux` subdir. From the help it seems that the `-d` option is what allows one to do it, but if I try to use it I get a Segmentation fault at the end. Am I using it wrong?               echo '\documentclass{article}     \begin{document}     a     \clearpage     a     \end{document}' > a.tex     mkdir _aux _out          pdflatex -interaction=nonstopmode -synctex=1 -output-directory _aux "a.tex"     synctex view -i "5:1:a.tex" -o "_aux/a.pdf"     echo $?      gives the good output (page 2) and `0` exit status but:               mv _aux/a.pdf _out/     synctex view -i "5:1:a.tex" -o "_out/a.pdf" -d "../_aux/"     echo $?      gives the good output + a line:               Segmentation fault (core dumped)      and `139` exit status and:               synctex view -i "5:1:a.tex" -o "_out/a.pdf" -d "_aux/"     echo $?      gives just:               This is SyncTeX command line utility, version 1.2     Segmentation fault (core dumped)      and `139` exit status. Version: 1.2 on Ubuntu 12.10 from `texlive-full` package.


title: Defining the space between section number and section title

text: I am trying to define the spacing between the section name and section title in latex to get something like this . How can I do it? ![enter image description here](http://i.stack.imgur.com/1BkCJ.png) Also how can I define the margin and all at the first page to get the margin of the title of the paper from the top followed by the authors like this. ![enter image description here](http://i.stack.imgur.com/IkDGw.png)


title: Long table inserting multiple table headers on same page

text: Sometimes on a longtable I get broken output. It will insert the non-first table header at the top of the page. It's very rare and only seems to happen when there's a very specific amount of space remaining on the previous page. ![Reproduction of issue](http://i.stack.imgur.com/LRWsP.png) Any ideas on what causes this output and a work-around? And the document. It's a simplest reproduction I could manage to make. It's not just \needspace that causes it though. The same issue pops up on a longtable immediately after another longtable, and very rarely after a paragraph.               \documentclass[10pt,a4paper,final,twoside]{article}     \usepackage[a4paper,landscape]{geometry}     \usepackage{longtable}     \usepackage{needspace}     \begin{document}     xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz          xyz\\[30pt]     \needspace{10\baselineskip}     \section*{Header}     \begin{longtable}{l l l l l}     \multicolumn{5}{l}{Data (continued)}\\*     \textbf{Addr} & \textbf{Type} & \textbf{Product} & \textbf{Serial} & \textbf{Location} \\*     \hline     \endhead     \multicolumn{5}{l}{Data}\\*     \textbf{Addr} & \textbf{Type} & \textbf{Product} & \textbf{Serial} & \textbf{Location} \\*     \hline     \endfirsthead     25 & Data & Data & Data & Data \\     26 & Data & Data & Data & Data \\     27 & Data & Data & Data & Data \\     28 & Data & Data & Data & Data \\     29 & Data & Data & Data & Data \\     30 & Data & Data & Data & Data \\     31 & Data & Data & Data & Data \\     32 & Data & Data & Data & Data \\     \end{longtable}          \end{document}      I've tested this in pdflatex, xelatex and lualatex on both debian wheezy texlive and miktex, always gives the same bad output.


title: Move names of editors followed by (Ed./Eds.) and a comma before title in biblatex

text: For a stylesheet I am following, I need to move the names of the editors of a book before the book title. In `biblatex`, the default behavior is to print `Ed. by` followed by the names. A similar question has been asked before (Citing @inbook with biblatex: how to put authors/editors before book title?), but the only answer given differs in many respects from what I need, and I don't know how to modify it to suit my needs here. In the MWE, the printed result is: > Lennon, John (1965). This is my article in this book. In _A book with > articles_. Ed. by Paul McCartney, John Lennon, George Harrison & Richard > Starkey. Liverpool: Cavern Club. 65-87. Whereas I need it to be: > Lennon, John (1965). This is my article in this book. In Paul McCartney, > John Lennon, George Harrison & Richard Starkey (Eds.), _A book with > articles_. Liverpool: Cavern Club. 65-87. Notice the uppercase `E` in `Eds.` (which should be `Ed.` in the case of a single editor) and the comma following it.               \documentclass{article}     \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}          \renewcommand*{\finalnamedelim}{\addspace\&\space} % use '&' before last author in citations and bibliography     \renewcommand*{\intitlepunct}{\space} % remove colon after "In:" for articles in books     \DeclareFieldFormat[article, incollection, unpublished]{pages}{#1} % no word 'pages' for articles in the bibliography (print as is)     \DeclareFieldFormat[article, incollection, unpublished]{title}{#1} % no quotes for article titles (print as is)     \renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}} % colon between volume and page ranges for journal articles, period plus space for articles in books          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @incollection{lennon1965,         AUTHOR = "John Lennon",         BOOKTITLE = "A book with articles",         EDITOR = "Paul McCartney and John Lennon and George Harrison and Richard Starkey",         TITLE = "This is my article in this book",         YEAR = "1965",         LOCATION = "Liverpool",         PAGES = "65--87",         PUBLISHER = "Cavern Club"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/KuSw5.png)


title: Table is overlapping text

text: I'm using the IEEE format latex files from here: http://mocha-java.uccs.edu/ieee/ I have the following code:               \begin{center}          \begin{tabular}{|l|l|}          \hline          \multicolumn{2}{|c|}{UHF/VHF Antenna Specifications} \\          \hline          {\bf Model} & 2MCP22 \\     Frequency Range & 144-148 MHz \\     Gain @ 145.9 MHz & 12.25 dBdc \\     Front to back & 25 dB Typical \\     Beamwidth & 38° \\     Feed impedance & 50 Ohms Unbalanced \\     VSWR & 1.4: Max \\     Input Connector & ‘N’ Female \\     Power Handling & 1.5 KW \\     Stacking Distance & 9.5-10 ft \\     Boom length & 18’ 7” \\     Boom Diameter & 1-1/2”, Tapering to 1” \\     Elements/Type & 22 / 3/16” Aluminum Rod \\     Turning radius & 10 ft \\     Wind area & $2.5 ft^2$ \\     Weight / Ship Wt. & 12.5 lbs / 14 lbs UPS  \\     \hline     {\bf Model} & 436CP42 U/G \\     Frequency Range & 430-438 MHz \\     Gain & 16.8 dBdc \\     Beamwidth & 21° circular \\     Polarity & Circular, RHC or LHC \\     Front to Back & 25 dB Typical \\     Ellipticity & 1.5 dB Typical \\      VSWR & 1.5:1 and better \\     Feed impedance & 50W, Unbalanced \\     Connector & ‘N’ Female \\     Power handling & 1 kW \\     Stacking Distance & E=68” H=68” \\     Turning radius & 95° \\     Wind Area & $2 ft^2$ \\      Mast Size & 1-1/2 to 2 Inches \\      Weight / Ship Wt. & 7.8 lbs / 10 lbs UPS \\     \hline     {\bf Model} & 2.4-15R \\     Frequency Range & 2.4-2.5 GHz \\     Gain & 15 dBi \\     Front to Back & 16 dB \\     VSWR & 1.5:1 Max \\     Polarity & Vertical / Horizontal \\     Feed Impedance & 50 Ohms \\     Feed Connector & ‘N’ Female \\     Power Handling & 500 W \\     Boom Length & 25” \\     Radome Diameter & 3.3” \\     Mast Size & 1-1/4 to 2 Inches \\     Wind Area & 1 $ft^2$ \\          Wind Rating & 100 mph \\           Weight & 1 lb \\          \hline          \end{tabular} \\          \end{center}      For some reason the table is overlapping the text directly after it, I've posted a picture here: https://docs.google.com/leaf?id=0BxtHMBPFxja0OTU4MTViNzItMjQ4ZS00MTgwLWE5OTktMWY3NGJkZjU1ZDQy&hl=en&authkey=CN_7j70D I've tried wrapping it in a               \begin{table}          ...table here...          \end{table}      but I get errors doing that This is going to drive me crazy, trying \\ or \newpage or something to get it on it's own isn't helping. EDIT: Clarified overlapping problem. EDIT2: Here is a minimal example               \documentclass[final]{ieee}          \begin{document}          \begin{center}     \begin{tabular}{|l|l|}       \hline       {\bf Model} & 2.4-15R \\       Frequency Range & 2.4-2.5 GHz \\       Gain & 15 dBi \\       Front to Back & 16 dB \\       VSWR & 1.5:1 Max \\       Polarity & Vertical / Horizontal \\       Feed Impedance & 50 Ohms \\       Feed Connector & ‘N’ Female \\       Power Handling & 500 W \\       \hline     \end{tabular} \\          \end{center}     \PARstart The GENSO network will consist of a MCC, GSS and AUS. Each satellite communicates with an individual MCC which acts as a server. All data and voice transmissions for the given satellite are downloaded by different GSS's throughout the world and routed to the correct MCC where it is retained for later dissemination. [...]          \end{document}      The other `ieee` class is from the site I linked initially at the top.


title: glossaries in French

text: I try to get a glossary in French. So I started with a sample (in english) from `glossaries` package. I run `latex` then `makeglossaries` then `latex` (x2), everything was fine with the sample. I run the same sample using `xindy` option for the `glossaries` package and adding `\usepackage[spanish]{babel}` like it's suggested in the guide of glossaries package, everything is working very well. But here start my problem, if I change spanish by french, I get an error message from xindy: `ERROR: Syntax Error in (INDEXENTRY :TKEY (:|EMPTYSET@INDEXeNDCSNAME|) :LOCREF "{}{11}" :ATTR "pageglsnumberformat").` Here is my latex code :                \documentclass{report}      \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}          \usepackage[french]{babel}          \usepackage[xindy,toc,acronym]{glossaries}          % Define a new glossary type called notation     \newglossary[nlg]{notation}{not}{ntn}{Notation}          \makeglossaries          % Notation definitions               \newglossaryentry{not:emptyset}{type=notation,     name={$O$},     text={00},     description={The empty set},     sort={O}}          % Main glossary definitions               \newglossaryentry{gls:card}{name=cardinality,     description={The number of elements in the specified set}}          % Acronym definitions          \newacronym{nf}{NF}{new foundations}          \begin{document}     \title{Sample Document using the glossaries Package}     \author{Nicola Talbot}          \maketitle          \tableofcontents          \printglossaries          \chapter{Introduction}          $\gls{not:emptyset}$           \gls{gls:card}          \gls{nf}     \end{document}      I goggled this but I found nothing. Please, someone can help me?


title: Visualize connection between two slanted TikZ scopes

text: Using TikZ is it possible to draw a connection between the two green rectangles? The idea is to show that the lower green grid is a more detailed view of the upper one. I'm also open to other ideas ;D My current result: ![Grid zoom](http://i.stack.imgur.com/8JGWG.png) What I want is to connect the corners of the rectangle with the corresponding corners of the other rectangle. LaTeX:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \pagestyle{empty}          \begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]                   \begin{scope}[  % Upper layer             yshift=90,every node/.append style={             yslant=0.5,xslant=-1},yslant=0.5,xslant=-1                          ]             \fill[white,fill opacity=.9] (0,0) rectangle (5,5);             \draw[step=10mm, green] (1,1) grid (4,4);             \draw[green,very thick] (1,1) rectangle (4,4);             \draw[black,dashed] (0,0) rectangle (5,5);         \end{scope}              \begin{scope}[  % Lower layer             yshift=170,every node/.append style={                 yslant=0.5,xslant=-1},yslant=0.5,xslant=-1               ]             \fill[white,fill opacity=0.6] (0,0) rectangle (5,5);             \draw[step=10mm, black] (2,2) grid (5,5);             \draw[step=3.33mm, green] (2,2) grid (3,3);             \draw[black,very thick] (2,2) rectangle (5,5);             \draw[black,dashed] (0,0) rectangle (5,5);             \draw[green,very thick] (2.05,2.05) rectangle (3,3);         \end{scope}     \end{tikzpicture}          \end{document}


title: How to change hyphenation language without Babel?

text: I would like to change hyphenation pattern in `pdlatex` without using `babel`, because `babel` **kills** my document class in my language (hungarian). Unfortunately I cannot find a way to change the pattern even using the hint in `hyph-utf8` package:               \language=\l@hu      but this one says that 'Missing number, treated as zero'. The other one does not work either:               \hyphenrules{langname}      and tells me the 'Missing number...' message again (I think the latter macro uses `\l@hu`).


title: Good style to avoid deep nesting in formulation of a theorem

text: This is not a technical question per se; it is a question concerning good style (in writing a theorem) I hope it doesn't get closed... In this question of mine, the answer also mentioned that "nesting several enumerations is bad style." To see exactly what he meant, consider the following image: ![enter image description here](http://i.stack.imgur.com/KN4an.jpg) Some heavy nesting can be seen here :) Although the picture just says "text" and "bla", this is just an anonymization I used for a theorem, which had exactly this structure. So in the contex of formulating such a theorem, where cases have to be distinguished, what would be considered a good style to avoid such a nesting ?


title: xypic: Text inside square

text: I have a very basic square:               \xymatrix{       A \ar[r] \ar[d] & B \ar[d] \\       C \ar[r] & D     }      What is the easiest way to place the text "hi" in the center of the square?


title: bookmarksnumbered option of hyperref in beamer document

text: I wanted to put section numbers in pdf bookmarks of a beamer document. But section numbers didn't show up. What is the problem?               \documentclass{beamer}          \hypersetup{       bookmarksnumbered=true     }          \begin{document}          \section{Hello}          \begin{frame}Test\end{frame}          \section{Beamer}          \begin{frame}Test\end{frame}          \section{World}          \begin{frame}Test\end{frame}          \end{document}      I'm using MikTeX 2.9.


title: Problem With updmap-sys

text: I ran the TeX Live 2012 update this morning on my 64-bit Kubuntu 12.04 linux system (`tlmgr update --all`) and received the following error:               tlmgr: package log updated at /usr/local/texlive/2012/texmf-var/web2c/tlmgr.log     running mktexlsr ...     done running mktexlsr.     running mtxrun --generate ...     done running mtxrun --generate.     running updmap-sys ...          updmap-sys failed (status 1), output:     updmap is using the following updmap.cfg files (in precedence order):       /usr/local/texlive/2012/texmf/web2c/updmap.cfg       /usr/local/texlive/2012/texmf-dist/web2c/updmap.cfg     dvips output dir: "/usr/local/texlive/2012/texmf-var/fonts/map/dvips/updmap"     pdftex output dir: "/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap"     dvipdfmx output dir: "/usr/local/texlive/2012/texmf-var/fonts/map/dvipdfmx/updmap"     pxdvi output dir: "/usr/local/texlive/2012/texmf-var/fonts/map/pxdvi/updmap"          ERROR:  The following map file(s) couldn't be found:             ${PKGNAME}.map (in /usr/local/texlive/2012/texmf-dist/web2c/updmap.cfg)                  Did you run mktexlsr?                  You can disable non-existent map entries using the option               --syncwithtrees.               tlmgr: exiting unsuccessfully (status 1). Running `updmap-sys --syncwithtrees` gives the following:               david@dd:~$ updmap-sys --syncwithtrees     updmap is using the following updmap.cfg files (in precedence order):       /usr/local/texlive/2012/texmf-config/web2c/updmap.cfg       /usr/local/texlive/2012/texmf/web2c/updmap.cfg       /usr/local/texlive/2012/texmf-dist/web2c/updmap.cfg     Missing map files found, disabling             ${PKGNAME}.map (in /usr/local/texlive/2012/texmf-dist/web2c/updmap.cfg)     in /usr/local/texlive/2012/texmf-config/web2c/updmap.cfg     Do you really want to continue (y/N)? y     answer =y=     Creating new config file /usr/local/texlive/2012/texmf-config/web2c/updmap.cfg     Use of uninitialized value in subroutine entry at /usr/local/texlive/2012/bin/x86_64-linux/updmap line 1332,  line 1.     Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/local/texlive/2012/bin/x86_64-linux/updmap line 1332,  line 1. I'm lost at this point. Can anyone at TUG help?


title: Easy way to port environment defined in framed to mdframed?

text: I've been working on environment based on framed package, but wanted to port to mdframed due to fact that it plays better with footnotes and has more features and more active development. The issue is that I do not know mdframed internals or how to create more advanced styles with it. Also, I found the manual lacking in description on how to create advanced styles. Is there any porting guide/reference for conversion of framed environments to mdframed environments? Or maybe at least ideas for converting this specific environment? The environment in question is placing a line and one or two of 6 icons on margin. It has separate version for line and set of icons for odd, onepage and even situations, also separate icon sets for frames that fit on page, start of longer frames, middle frames and final frames. Frames could look like this:               icon | ......          |               ( on this even page, line is placed on left          |                 and icon on top, because it is start of frame)          | ......       ~ page break            ...... |                   |      ( on this odd page, line is placed on right                   |icon    and icon in middle, because it's internal frame)                   |            ...... |       ~ page break          | ......        ( and here it's on left again,     icon | ......          while ending icon is at bottom of frame)      or differently depending on how they lay out on pages. I got this working like I want. The relevant code looks a little like this (you can skip the %config block, but I placed it for for code to be complete and working) with lines and icons replaced by simpler versions:               \usepackage{framed}          % config     \newcommand\singletopleft{STL}     \newcommand\singletopright{STR}     \newcommand\singlebottomleft{SBL}     \newcommand\singlebottomright{SBR}     \newcommand\firstleft{FL}     \newcommand\firstright{FR}     \newcommand\middleleft{ML}     \newcommand\middleright{MR}     \newcommand\lastleft{LL}     \newcommand\lastright{LR}     \newcommand\decorleft[1]{\vrule height #1 width 0.5pt\hspace{1mm}}     \newcommand\decorright[1]{\hspace{1mm}\vrule height #1 width 0.5pt}          % \mirrorframe{left content}{right content}{minimum height}{content}     \makeatletter     \newcommand\mirrorframe[4]{%     \dimen1=#3\savebox0{#4}\dimen0=\ht0\relax     \ifdim\dimen0<\dimen1%     \dimen2=0.5\dimen1%     \advance\dimen2 by -0.5\dimen0%     \dimen0=\dimen1%     \else\dimen2=0pt\fi     \def\0{\raisebox{\dimen2}{\begin{minipage}[t]{\wd0}\usebox0\end{minipage}}}%     \def\1{\llap{\vbox to \dimen0{#1}\decorleft{\dimen0}}\0}%     \def\2{\0\rlap{\decorright{\dimen0}\vbox to \dimen0{#2}}}%     \ifodd\count0\2\else\if@twoside\1\else\2\fi\fi}     \makeatother          % \begin{mirrortest}[minimum height] ... \end{mirrortest}     \newenvironment{mirrortest}[1][2\baselineskip]{%     \def\FirstFrameCommand{\mirrorframe{\hbox{\firstleft}\vfill}{\hbox{\firstright}\vfill}{#1}}%     \def\MidFrameCommand{\mirrorframe{\vfill\hbox{\middleleft}\vfill}{\vfill\hbox{\middleright}\vfill}{#1}}%     \def\LastFrameCommand{\mirrorframe{\vfill\hbox{\lastleft}}{\vfill\hbox{\lastright}}{#1}}%     \def\FrameCommand{\mirrorframe{\hbox{\singletopleft}\vfill\hbox{\singlebottomleft}}{\hbox{\singletopright}\vfill\hbox{\singlebottomright}}{#1}}%     \MakeFramed{\advance\hsize-\width \FrameRestore}\ignorespaces}{\endMakeFramed}      I use it like this:               \usepackage{lipsum}     \begin{document}     \begin{mirrortest}     \lipsum[1-20]     \end{mirrortest}     \end{document}      The mdframed package internals seems to be a lot more complicated, that's why I don't know yet how to approach the conversion. Any help/directions would be appreciated!


title: Hyperlinking page numbers and possessive in natbib

text: I am using `natbib` for citations and often have to   1. reference specific page numbers of sources, and    2. reference sources in the possessive.  I am using `hyperref` for internal hyperlinks and I have not been able to find a way for `hyperref` to link either the possessive or the page numbers (in some cases - it seems to work with citet). MWE shown below, with a partial solution found on this site. Any suggestions?               \documentclass{article}     \usepackage{natbib}       \def\citeaposay#1{\citeauthor{#1}'s (\citeyear{#1})}     \usepackage{etoolbox}          % This code is from      %http://tex.stackexchange.com/questions/24136/natbib-and-hyperref-for-author-year-style-produces-two-links          \makeatletter          % Current citation \cite or \citet?     \newbool{NAT@bool@patch}          % Closing parenthesis already printed in hyperlink?     \newtoggle{NAT@tog@close}          % Flag \cite and \citet     \pretocmd{\citet}       {\global\booltrue{NAT@bool@patch}}       {}% Do nothing if patch works       {}% Do nothing if patch fails          \pretocmd{\cite}       {\global\booltrue{NAT@bool@patch}}       {}% Do nothing if patch works       {}% Do nothing if patch fails          % Don't print postnote if already printed in hyperlink     \newcommand\NAT@postnote[1]{%       \iftoggle{NAT@tog@close}         {}         {#1}}          % Don't print closing bracket if already printed in hyperlink     % NB: We have to reset this so that all brackets are printed in multi-citations     \renewcommand\NAT@@close{%       \ifbool{NAT@bool@patch}         {\iftoggle{NAT@tog@close}            {\global\togglefalse{NAT@tog@close}}            {}}         {\ifNAT@par\NAT@close\fi}}          % Patch main cite command to issue new postnote command     \patchcmd{\NAT@citex}       {\else\NAT@cmt#2}       {\else\NAT@postnote{\NAT@cmt#2}}       {}% Do nothing if patch works       {}% Do nothing if patch fails          % Patch main cite command to include postnote/closing bracket in hyperlink     \patchcmd{\NAT@citex}       {\@citea\NAT@hyper@{%          \NAT@nmfmt{\NAT@nm}%          \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%            {\@citeb\@extra@b@citeb}%          \NAT@date}}       {\@citea\NAT@hyper@{%          \NAT@nmfmt{\NAT@nm}%          \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%            {\@citeb\@extra@b@citeb}%          \ifbool{NAT@bool@patch}            {\global\toggletrue{NAT@tog@close}%             \NAT@date%             \ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi\fi%             \NAT@close}            {\NAT@date}}}       {}% Do nothing if patch works       {}% Do nothing if patch fails          % Reset flags after citation is printed     \apptocmd{\NAT@citex}       {\global\boolfalse{NAT@bool@patch}%        \global\togglefalse{NAT@tog@close}}       {}% Do nothing if patch works       {}% Do nothing if patch fails          % Don't break hyperlinks between name and year     \renewcommand\hyper@natlinkbreak[2]{#1}          \makeatother          \usepackage{hyperref}     \hypersetup{         colorlinks=true,        citecolor=red      }          \begin{filecontents}{\jobname.bib}     @Book{adams,       title = {The Restaurant at the End of the Universe},       author = {Douglas Adams},       series = {The Hitchhiker's Guide to the Galaxy},       publisher = {Pan Macmillan},       year = {1980}}     \end{filecontents}          \begin{document}     \bibpunct[]{(}{)}{;}{a}{,}{,}          \noindent     citet with page numbers: \citet[:23-25]{adams} is a good book. (here both parentheses should be hyperlinked) \\     citep with page numbers: As suggested by him \citep[:23-25]{adams}. (here :23-25 should be hyperlinked)\\     citeyear with page numbers: As suggested by him (\citeyear[:23-25]{adams}). (here :23-25 should be hyperlinked)\\     citeaposay with possessive: \citeaposay{adams} book suggests... (here 's should be hyperlinked)          \bibliographystyle{plainnat}     \bibliography{\jobname}          \end{document}


title: Indentation inside of text

text: I know that the title of this question might be a little bit confusing, but I don't know how can I solve my problem and even how to search for the solution. I want to make inside a long text something what looks like:               Title       Some text     Title2       Some text       But I don't want to break the whole text using section or subsection comment. And I am looking for a solution more elegant that normal tab before 'Some text'. Even the enumerate or itemize environment is not what I am looking for. I just want to make `Title` as a bold text and in the next line have some text.


title: Illogical twoside margins

text: Shouldn't the `twoside` option produce a wider margin at the binding/spine edge, rather than the other way around? I'm using `\documentclass[twoside]{report}`.


title: In Lyx how do I fix the border shift for binding?

text: WIth regards to piping answers into Lyx GUI, I am continuing the my question from here. The layout of chapters starting on the odd pages appears to be correct, however the shift left or right I believe to compensate for the binding of the pages appears to be shifting TOWARDS the binding, should it be shifting away from the binding? how can I fix this. Observe the binding side has a smaller margin... ![PDF image](http://i.stack.imgur.com/zWwpG.png) Expand the loerem ipsoms to but here is what i have in my `.lyx` file.               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass report     \options openright,twoside     \use_default_options true     \maintain_unincluded_children false     \language british     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format pdf2     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing single     \use_hyperref true     \pdf_keywords "Software Diversity, Monoculture,Security, Randomising,Randomizing, Java, Data Structures, ANTRL4, ANTLR"     \pdf_bookmarks true     \pdf_bookmarksnumbered false     \pdf_bookmarksopen false     \pdf_bookmarksopenlevel 1     \pdf_breaklinks false     \pdf_pdfborder false     \pdf_colorlinks false     \pdf_backref false     \pdf_pdfusetitle true     \papersize default     \use_geometry false     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine basic     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 2     \tocdepth 2     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 2     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Title     Front Title Page     \end_layout          \begin_layout Author     Author     \end_layout          \begin_layout Date     Date     \end_layout          \begin_layout Chapter*     Abstract     \end_layout          \begin_layout Standard     My Abstract     \end_layout          \begin_layout Chapter*     Acknowledgements     \end_layout          \begin_layout Standard     my ack     \end_layout          \begin_layout Chapter     the first chapter     \end_layout          \begin_layout Section     lorem ipsom lorem      \end_layout          \begin_layout Standard     ipsom lorem ipsom……     \end_layout                    \begin_layout Standard     \begin_inset CommandInset bibtex     LatexCommand bibtex     btprint "btPrintAll"     bibfiles "/myPath/here"     options "bibtotoc,plain"          \end_inset               \end_layout          \end_body     \end_document


title: inner and outer margin misplacement in book

text: I am using the book style `\documentclass[11pt,openright]{book}` but the title, index starting and all the capters have larger margin in the right proper of documents opening on the left. I tried to change the option to `\documentclass[11pt,openleft]{book}` but there is no change on the page positioning. Another option is to change the margins definition using this:               \usepackage[a4paper,inner=3.5cm,outer=2.5cm]{geometry}      but it seems like an improper work-around to me. I'm sure there is a way to properly set it from the book class already. Is there any other parameter to tune? or sould I apply the geometry solution and forget aobut it?


title: Insert title page into table of contents

text: I'm trying to format a thesis to university requirements. The university requires the front matter to conform to the following:   * Everything up to the table of contents has a roman page number (but this isn't displayed on the title page)   * The table of contents includes entries for the title page, abstract, and table of contents, with their roman page number listed. I can't seem to get either of these things right. Here is an MWE:               \documentclass[12pt,letterpaper]{report}     %for split boxes and title page     \usepackage{array}     %for title page     \usepackage{graphicx}     %for double spacing in abstract     \usepackage{setspace}          \usepackage{filecontents}          \begin{filecontents}{title.tex}     \begin{titlepage}     \begin{center}      \vspace*{1in}      \MakeUppercase{The Title of}\\[12pt]      \MakeUppercase{My Thesis}\\      % ----------------------------------------------------------------      \vspace{1.5cm}      by\\[12pt]      Nathan G. Glenn\\[14pt]       % ----------------------------------------------------------------      \vspace{2cm}     Submitted to Brigham Young University in partial fulfillment of\\[12pt] graduation requirements for University Honors \\[5pt]           \vfill      % ----------------------------------------------------------------          Linguistics Department\\[12pt]     Some University\\[12pt]     {November 2012}      \vfill          \begin{tabbing}%        \hspace{3in}\= \kill % set up one tab position        \centering\arraybackslash Advisor: My Advisor  \> Honors Representative: My Rep\\[12pt]        \centering\arraybackslash Signature: \hspace{0.5cm}\makebox[1.8in]{\hrulefill} \> Signature: \hspace{0.5cm} \makebox[1.8in]{\hrulefill}     \end{tabbing}     \end{center}     \end{titlepage}     \end{filecontents}          \begin{filecontents}{abstract.tex}     \begin{center}     \vspace*{1in}     ABSTRACT\\[36pt]          \MakeUppercase{The Title of}\\[12pt]     \MakeUppercase{My Thesis}\\[36pt]          Nathan G. Glenn\\[12pt]     Linguistics Department\\[12pt]     Bachelor of Arts\\[36pt]          \end{center}     \doublespacing     Is the page number roman like it should be?          \singlespacing     \end{filecontents}     \begin{document}          \pagenumbering{roman}     \input{title.tex}     \clearpage          \pagenumbering{arabic}     \input{Abstract}     \clearpage     \tableofcontents          \chapter{Title and Abstract Should Appear Above Me in the ToC}     \chapter{Introduction}     \chapter{LitReview}     \end{document}      If you compile this, you will see that I have not managed to make the front matter use roman lettering, and I haven't even attempted to add the front matter items to the ToC because I do not know how. Can anyone show me how to do this properly?


title: Strange error when combining Beamer, Animate, Tikz and Listings

text: I'm working on some slides where I show how code is actually executed in Java. Therefore I'm working with the animate package to generate animations. Without going into details, I've written a macro to help me generate an image for the animation. These images are generated by Tikz:               \newcommand{\methodexec}[4]{\begin{tikzpicture}[yscale=-1]     \draw (0,0) rectangle (10,5);     \begin{scope}[xshift=0cm,yshift=0cm]     \node[anchor=north west] (C) at (0,0) {\begin{minipage}{3in}\lstinputlisting[linebackgroundcolor={\ifthenelse{\value{lstnumber}=#2}{\color{green}}{}}]{programs/#1}\end{minipage}};     \end{scope}     \begin{scope}[yscale=-1,yshift=-5 cm]     \setcounter{tmpA}{1}     \foreach \n in {#3} {      \coordinate (X) at (8.5,0.5*\arabic{tmpA});      \node[pointerbox] (box\n) at (X) {};      \node[pointerdot] (ptr\n) at (X) {};      \node[anchor=west] (\n) at (box\n.east) {\small{\texttt{\n}}};      \addtocounter{tmpA}{1}     }     \end{scope}     \begin{scope}[xshift=0.25,yshift=2.5 cm]     #4     \end{scope}     \end{tikzpicture}}      An example of this macro is `\methodexec{code.java}{1}{}{}` This all works fine except when I integrate these pictures into animate:               \begin{animateinline}{1}     \methodexec{code.java}{1}{}{}\newframe     \methodexec{code.java}{2}{}{}     \end{animateinline}      The compiler compiles the images correcly but reports some errors:               <a0,fr0> (./programs/code.java) ! Argument of \l@lstlisting has an extra }. <inserted text> \par l.11 }\newframe Runaway argument? ! Paragraph ended before \l@lstlisting was complete. <to be read again> \par l.11 }\newframe       Of course you can argue that I could ignore the errors. However I assume that there is something wrong with my code and furthermore Kile has the annoying behavior to open the `.vrb` file of the frame when an error is reported (I compile such frames in `fragile` mode). EDIT: as MWE: in `test.tex`:               \documentclass[handout]{beamer}     \usepackage{tikz,listings,lstlinebgrd}     \usepackage[controls]{animate}     \usetikzlibrary{calc,shapes,fit}     \lstset{language=Java,basicstyle=\tiny\ttfamily,breaklines=true}     \tikzset{pointer/.style={->,thick,black},pointerdot/.style={fill=black,circle,inner sep=0pt,minimum size=0.125cm},pointerbox/.style={draw=black,rectangle,minimum size=0.25 cm}}     \newcounter{tmpA}     \newcommand{\methodexec}[4]{\begin{tikzpicture}[yscale=-1]     \draw (0,0) rectangle (10,5);     \begin{scope}[xshift=0cm,yshift=0cm]     \node[anchor=north west] (C) at (0,0) {\begin{minipage}{3in}\lstinputlisting[linebackgroundcolor={\ifthenelse{\value{lstnumber}=#2}{\color{green}}{}}]{programs/#1}\end{minipage}};     \end{scope}     \begin{scope}[yscale=-1,yshift=-5 cm]     \setcounter{tmpA}{1}     \foreach \n in {#3} {      \coordinate (X) at (8.5,0.5*\arabic{tmpA});      \node[pointerbox] (box\n) at (X) {};      \node[pointerdot] (ptr\n) at (X) {};      \node[anchor=west] (\n) at (box\n.east) {\small{\texttt{\n}}};      \addtocounter{tmpA}{1}     }     \end{scope}     \begin{scope}[xshift=0.25,yshift=2.5 cm]     #4     \end{scope}     \end{tikzpicture}}     \begin{document}     \begin{frame}[fragile]{Some title}     \begin{animateinline}{1}     \methodexec{code.java}{1}{}{}\newframe     \methodexec{code.java}{2}{}{}\newframe     \methodexec{code.java}{3}{}{}     \end{animateinline}     \end{frame}     \end{document}      And `code.java` (in the `programs` directory):               foo     bar     baz      Any ideas? A workaround (like for instance a variant of the `listings` package) is helpful as well. EDIT2: It clearly has something to do with the `listings` package, because using `minted` solved the problem. But that doesn't explain why `listings` actually produces this error. * * * **John Wickerson adds:** I made a more minimal MWE, which rules out TikZ as the culprit. Beamer, Animate and Listings all remain suspects.               \documentclass{beamer}     \usepackage{listings}     \usepackage{animate}     \usepackage{filecontents}     \begin{filecontents*}{code.java}     foo     bar     baz     \end{filecontents*}     \begin{document}     \begin{frame}[fragile]{Some title}     \begin{animateinline}{1}     \lstinputlisting{code.java}     \end{animateinline}     \end{frame}     \end{document}


title: Vertical centred alignment of text in table cell

text: I would like to know how to put vertical centered text inside a table cell. The problem with m column type is that i'm actually using tabularx to auto detect the width of the columns               \newcolumntype{Y}{>{\small\centering\arraybackslash}X}     \begin{tabularx}{\textwidth}{YYY}        & Lorem ipsum \newline Lorem ipsum dolor sit amet, consectetur adipisicing & Lorem ipsum \newline Lorem ipsum dolor sit amet, consectetur adipisicing \\     Lorem ipsum Lorem ipsum dolor sit amet, consectetur adipisicing & A & B \\     Lorem ipsum Lorem ipsum dolor sit amet, consectetur adipisicing & C & D \\     \end{tabularx}      I would like to vertical centering in the boxes the A, B, C, D text


title: Tex Live Utility (Mac Os X): language problem

text: I just made a fresh install of OS X Mavericks and got Tex Live Utility through their Google Code website. The strange thing is that it is in chinese language. And I can't find the button to change it. Anyone else having this problem? Or anybody who knows where to change the language?


title: How can I change the geometry of a page on the chapter header page only, and return to normal on the next page?

text: **Edit:** It would appear that I wasn't clear in my reasoning as to why I wanted to do this.. I would like to design a way that I can have a chapter intro page that is full width, so I can fill it up with information that is designed to only be on that page... Perhaps something like an image with a blurb under the image giving some context about the relation between the chapter topic and that image... like what many textbooks do. The actual content would only start on the next page, but those pages would have different margins, presumably for room to put margin notes. I'm aware that I can use `changepage` to temporarily change the margin of a paragraph or block on the page, but I was hoping to change the whole page at once, and change back on the next page. There would be no changing of margins mid-paragraph of text. * * *               \documentclass[twoside]{report}          \usepackage{etoolbox}     \usepackage{lipsum}     \usepackage{geometry}          \preto{\chapter}{\newgeometry{left=.75in,right=.75in}}     \appto{\chapter}{\restoregeometry} %% <--- This line doesn't work.          \begin{document}       \lipsum       \chapter{Test}       \lipsum[1-15]     \end{document}      Using etoolbox, I can get `\geometry` to run before `\chapter` with the `\preto` command, but `\appto{\chapter}{\restoregeometry}` is not working... Is it because it doesn't work how I think it does?


title: Change the color of numberings in inline itemization

text: \begin{inparaenum}[1)]         \item  number one item         \item  number two item         \item  number three item      \end{inparaenum}      Is it possible to change the color of the number, When I use \textcolor{red}{1)} it is showing red color but it stopped itemizing. So instead of 1,2 3 I just got 1,1,1, for all the items.


title: Creating a new environment with one optional argument

text: I want to create a new environment with one optional argument in LaTeX. Here is what I used:               \newenvironment{argument}[1][]{%     \par     \noindent     \textbf{Argument#1:}     \noindent}     {}      When there is no argument, it typesets the ':' right after the word 'Argument', which is how it should be. However, when the optional argument is used, LaTeX doesn't add a space between the word 'Argument' and the optional argument provided. In other words, what I want to achieve is that if the optional argument is provided (e.g. A), then LaTeX should add a space after the word 'Argument', like: **Argument A:** some text and when there is no optional argument, it should be like (without the space): **Argument:** some text


title: Open PDF to a Prescribed Bookmark

text: ## Background: I have a _one_ page document with header information at the top. I would like the document to automatically scrolling past this header when it is opened. The following theorem is only relevant in case you are wondering why I don't just generate two versions of the document. * * * ## Theorem: I should _not_ generate a version without this info (until release). _Proof_ : This information is extremely relevant to me. So I need to have that there. But, this is really not useful for anyone when they _start_ to review a document. However, once the reviewer wants to provide me feedback, then that information becomes relevant as they need to tell me which version of which document they are commenting on. Thus this information needs to always be there. QED. :-) * * * ## Question: I am wondering if there is some kind of `\hyperset{}` call which will tell the PDF reader to open the document, at the `\phantomsection` labelled `start of doc` (in the MWE below). In the references section below is a link to a similar titled question, but I don't see how to use that to open to a particular bookmark. One solution would be to compute the coordinate and use `\hypersetup{XYZ=left top zoom}`, but wondering if there is an easier way. The MWE below has a bookmark which if you click on will take you to the spot where I'd like the document to open to automatically. ## References:   * How to set LaTeX so that PDF reader opens PDF file in a prespecified view?   * Add PDF bookmark manually * * * ## Code:               \documentclass{article}     \usepackage[paperwidth=6.0in, paperheight=25in]{geometry}     \usepackage{lipsum}     \usepackage{hyperref}          \hypersetup{pdfstartview=FitH}          \begin{document}     This part at the top of the file contain information related to     this file including:     \begin{itemize}         \item file name,         \item file version,         \item edit history,         \item list of things still to be completed, etc..     \end{itemize}     And this info can be quite long, in a few cases.     So the PDF should open with the following rule at the top.     \hrule\medskip          \phantomsection     \label{start of doc}     \pdfbookmark{Start of Doc}{start of doc}     \textbf{Begin of Actual Document:}          This is the start of the actual document, the info     above can be quite long, so I would prefer that the      document open to this point in the page.          \bigskip     \textbf{Dummy text to fill page:}     \lipsum[1-8]     \end{document}


title: No correct output

text: After installation of the last version of MiKTeX and TikZ, I created following document:               \documentclass{article}     \usepackage{tikz}     \begin{document}     The version of Tikz is : \pgfversion     \begin{tikzpicture}     \draw (0,0) circle (1) ;     \end{tikzpicture}     \end{document}      After running of "Build and running current file" with TeXnicCenter I received as answer:               LaTeX-Result: 0 Error(s),  0 Warning(s), 0 Bad Box(es), 1 Page(s)     BibTex-Result: 0 Error(s), 0 Warning(s)       and as output :   * "The version of TikZ is 2.10"   * as drawing a set of four curved lines wich intersect each other but no circle at all. Could some body help me please? P.S. I'm working under Windows XP 32-bit.


title: How to align a node vertical to one node and horizontal to another node?

text: Is it possible to align node c vertical to node a and horizontal to node b. If I combine the "below=of" and "right=of" parameter, Tikz ignores the first one.               \begin{tikzpicture}       \node[draw, circle, xshift=2cm](a){A};       \node[draw, circle, minimum width=2cm, yshift=-2cm](b){B};       \node[draw, below=of a, right=of b](c){C};     \end{tikzpicture}


title: Question marks instead of citations, bibliography not showing up

text: I've browsed topics allready here but nothing really helped. I'm building it through: pdflatex -> bibtex -> pdflatex -> pdflatex, but it's still the same. bibliografia.bib               @BOOK{Nodzynski,     AUTHOR = {Nodzyński M., Warszycki T.},     TITLE =  {Verilog HDL Podręcznik języka dla projektantów układów cyfrowych},     YEAR =   {Praca dyplomowa PW, Warszawa 2003}     }      ending of document.tex               \newpage     \bibliography{bibliografia}      fragment of content               \cite{Nodzynski}      I think problem is in my package preamble, bad order or sth like that.               \usepackage[numbers,sort&compress]{natbib}       \usepackage{hypernat}          \usepackage{extsizes}              \usepackage[final]{graphicx}     \usepackage[a4paper,left=3.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}          \usepackage[hide]{todo}                         \usepackage[basic,physics]{circ}               \usepackage[sf,bf,outermarks]{titlesec}          \usepackage{tocloft}                             \usepackage{expdlist}       \usepackage{flafter}          \usepackage{array}           \usepackage{listings}              \definecolor{mygreen}{rgb}{0,0.6,0}     \definecolor{mygray}{rgb}{0.5,0.5,0.5}     \definecolor{mymauve}{rgb}{0.58,0,0.82}          \lstset{ %       backgroundcolor=\color{white},         basicstyle=\ttfamily,            breakatwhitespace=false,           breaklines=true,                      captionpos=b,                         commentstyle=\color{mygreen},           deletekeywords={...},              escapeinside={\%*}{*)},               extendedchars=true,                 frame=single,                          keepspaces=true,                        keywordstyle=\color{blue},              language=Verilog,                        morekeywords={*,...},                 numbers=left,                         numbersep=5pt,                       numberstyle=\tiny\color{mygray},        rulecolor=\color{black},              showspaces=false,                    showstringspaces=false,            showtabs=false,                      stepnumber=2,                        stringstyle=\color{mymauve},            tabsize=2,                          title=\lstname             }          \usepackage[format=hang,labelsep=period,labelfont={bf,small},textfont=small]{caption}       \usepackage{appendix}         \usepackage{floatflt}        \usepackage{here}          \usepackage{makeidx}          \usepackage[table]{xcolor}          \usepackage{epstopdf}      Any help appreciated.


title: Insert text line in array

text: I am looking for a (clean) way to keep text aligned in a situation like the following:               thesis under the direction of:         [tab] Title [&] Name [&] University         with the supervision of:         [tab] Title [&] Name [&] University         [tab] Title [&] Name [&] University         [tab] Title [&] Name [&] University      The (dirty) way I found so far is to fix empirically the width of the first and second column. Here's an MWE               \documentclass[11pt]{article}     \begin{document}     \begin{titlepage}          \vspace*{\fill}          \noindent{\emph{thesis under the direction of}}\\[.3cm]     \hspace*{.4cm}\begin{tabular}{p{.1\textwidth}p{.4\textwidth}l}     Title & First Name Last Name  &  University A\\     \end{tabular}          \vspace*{.5cm}          \noindent{\emph{with the supervision of}}\\[.3cm]     \hspace*{.4cm}\begin{tabular}{p{.1\textwidth}p{.4\textwidth}l}     Title & First Name Last Name &  University B\\     Title & First Name Last Name &  University C\\     \end{tabular}     \end{titlepage}     \end{document}      I was just curious to know whether there would be a cleaner, more systematic way of doing that? Thanks!


title: Column Whitespace

text: I am using the below table and I am getting A LOT of white space between my first column and my models. The space between my models is fine.               \begin{table}\caption{Regression table\label{tab1}}     \begin{center}     \begin{tabular}{l r l r l r l}     \hline     & \multicolumn{2}{c}{Model 1}&\multicolumn{2}{c}{Model 2}&\multicolumn{2}{c}{Model 3}\\     \hline     \hline     Variable 1 & 12.758 & * &  13.822 & *** & 2.123 & *\\     \hline     \textit{*p < 0.05, ** p < 0.01, *** p < 0.001}     \end{tabular}     \end{center}     \end{table}      How can I trim this down so I do not need to use landscape?


title: \aftergroup a list of tokens

text: `\aftergroup` executes the next token after the end of the current group. Is there a variant, `\Vaftergroup{\some\tokens\a\b}` that would put `\some\tokens\a\b` after the current group ends? Of course, one can do `\aftergroup\some\aftergroup\tokens\aftergroup\a\aftergroup\b`, but when the list is longer, it becomes messy. This is motivated by an answer that works but is ugly.


title: Multicolumn 3 out of 6 doesn't work

text: I'm trying to make a multicolumn in a 7 columns tabular.               \documentclass{article}     \begin{document}     \begin{tabular}{|l|l|l|l|l|l|l|}     \hline     & \multicolumn{6}{c|}{Parameters}\\     \hline     We don't care * & \multicolumn{2}{l|}{cause it's a test} & \multicolumn{2}{l|}{cause it's a test} & \multicolumn{2}{l|}{cause it's a test}\\     \hline     Punctuation ? & \multicolumn{3}{c|}{yes+} & empty & empty & empty \\ %& \multicolumn{3}{c|}{no}\\     \hline     \end{tabular}     \end{document}      The "yes" cell is not working, I have a small cell (1 column) and a large "empty" right after it. The last two empties are ok.


title: Missing $ problems while generating table

text: first of I do very thank both contributors from the "Creating simple table (picture included)" topic -- I'm not able to mark the right answer as I was anonymous; both suggestions were very helpful, even the deleted one. Now to the problem:               \documentclass{article}          \usepackage{booktabs}     \usepackage{caption}     \usepackage{siunitx}               \usepackage{etoolbox}     \preto\tabular{\shorthandoff{-}}     %As I am using Czech babel, I have to include two aforementioned commands      %(I was not able to use cline, cmidrule, bottomrule, toprule etc. without them)                    \begin{document}          \begin{table}[h]         \captionsetup%         {%             singlelinecheck = off,             justification   = raggedright,             labelfont       = bf,         }         \centering         \begin{minipage}[b]{1.0\textwidth}             \caption{name}%             \begin{tabular}{@{}l SS }                 \toprule                                     & \multicolumn{2}{l}{blaaaa of Ah ($j$)}  \\                 \cmidrule{2-3}               Blaueue ($i$) &   $i-2$       &   $i-1$     \\         \midrule         1       &   $X_{a,b}$   &   $\dots$ \\         $j-1$       &   $999.9$ &   $\dots$ \\         \bottomrule             \end{tabular}         \end{minipage}               \end{table}          \noindent Reference: J. Johnson -- Whatever          \end{document}      Things, which quite bother me, are: 1) I'm getting an incredible amount of error messages, e.g.:               ! Missing $ inserted.      <inserted text>                      $     l.30           Blaueue ($i$)    &   $i-2$       &                                                 $i-1$     \\)      or               ! Missing $ inserted.     <inserted text>                      $     l.33    $j-1$       &   $999.9$ &                                 $\dots$ \\      or               l.26    \midrule     l.34    \bottomrule      I don't think I've forgotten to include $ anywhere? I'm getting same problems even while excluding               \usepackage{etoolbox}     \preto\tabular{\shorthandoff{-}}      2) Is there any command for reference under the table? Google didn't help me with this one. 3) Any way to avoid that the table will be larger then the size of page? 4) I'm still new to (La)TeX. Do your codes look as bad as mine? I mean the mathematical mode part, where it seems to be utterly full of $$ :-).


title: Showing an image with the topic in table of contents in beamer

text: In beamer, there is a facility to show the table of contents slide each time I switch to a new section, where the new section will be lighted and others dimmed. Can I find a way of showing an image along with the highlighted section ? It needn't necessarily be a background image, even one with simple `\includegraphics{...}` will do. I am using the theme Juan-Les-Pins.


title: How to add a box of a fixed size (width and height) around a graphic of varying sizes?

text: I've found lots of references for ways to create a box around text, but none for around graphics. I want the border frame around the graphic to all be the same size, with a graphic inside the box, centered vertically and horizontally, and a caption outside the box. This box would need to be able to be placed side by side so it effectively makes a grid. EDIT: Here is a working demo               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage[letterpaper, margin=1in]{geometry}          \begin{document}     \setlength\unitlength{1in}               \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{infinity_80_gf_2010}}     \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{Plus80_2010}}     \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{comfort_achp_Puron}}               \bigskip          \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{Pref_Vent_VA}}     \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{infinity_98}}     \framebox(2,2){\includegraphics[width=1.875in,height=1.875in,keepaspectratio]{infinity_80_gf_2010}}          \end{document}      This is the result: ![result](http://i.stack.imgur.com/f36Aj.png)


title: How to fix this problem with tikz knots and decorations?

text: Using the `knots` package, which is part of Andrew Stacey's spath3, one can draw beautiful paths that cross each other. However, there are problems when combining it with decorations:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{knots}     \usepgfmodule{decorations}          \begin{document}         \begin{tikzpicture}             \draw[decoration={markings, mark=at position 0.5 with {\arrow{>}}},postaction={decorate}] (0,1) -- (1,1);             \draw[knot=black,decoration={markings, mark=at position 0.5 with {\arrow{>}}},postaction={decorate}] (0,0) -- (1,0);         \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/lro3j.png) As you can see, adding the `knot` style to the path makes the decoration white, or invisible or whatever. It doesn't depend on the order in which I specify the styles. How can I avoid this? Is it a feature or a bug?


title: Redefine output for a specific TS1 code point (=glyph?)

text: By now I know how to make \textminus in tex4ht work, but this does not seem to be enough to display a proper minus with the `\num` macro of `siunitx`. Joseph Wright provided a workaround, but I'd like to know how to make this work at a more general level.               \documentclass{scrartcl}     \usepackage{textcomp}     \pagestyle{empty}          \DeclareTextSymbolDefault\homegrowntextminus{TS1}     \DeclareTextSymbol\homegrowntextminus{TS1}{61}          \begin{document}       +5 \homegrowntextminus 5     \end{document}      Is there a way to configure `tex4ht` so that it prints a proper minus sign (as in the `pdflatex` output below) when converting to HTML **without** knowing or modifying `\homegrowntextminus`? ![+5 -5](http://i.stack.imgur.com/i7thi.png) GitHub MWE: https://github.com/krlmlr/lm-template/tree/tex4ht-own-textminus.


title: Longtable with dynamic footer

text: In the example below, what I want is for the foot row, which `longtable` adds on every page break, to be the opposite background color of the row above it. It seems that the footer code is evaluated only once. I guess it's stored in a box. Is there a way to force `longtable` not to evaluate the code until it inserts it into the page? Bonus question: if I do not add `\\\` before the line commands (`thickline`, `thinline`), I get some "noalign" error and the document fails to compile. This forced me to write really ugly "fixup" code, i.e. `\\\\[-3.1ex]`, otherwise I get empty lines in the table. Is there a more elegant solution to this?               \documentclass{article}\pagestyle{empty}          \usepackage{array, booktabs, longtable, colortbl}     \usepackage[usenames, svgnames]{xcolor}          \usepackage{pgfplots}          \newcounter{curRowNum}     \newcommand\incRowNum{\stepcounter{curRowNum}}          \newcommand{\headcol}{\rowcolor{red!25}}     \newcommand{\rowcol}{\rowcolor{red!10}}     \newcommand{\thickline}{\arrayrulecolor{black}\specialrule{0.1em}{0pt}{0pt}\arrayrulecolor{black}}     \newcommand{\thicklinec}{\arrayrulecolor{purple}\specialrule{0.1em}{0pt}{0pt}\arrayrulecolor{black}}          \begin{document}     \setcounter{curRowNum}{0}     \begin{longtable}[!hc]{>{\incRowNum}c}       \caption{MWE longtable coloring test.}\label{tbl:long_color} \\       \thickline       \headcol \multicolumn{1}{c}{ID} \\       \thickline     \endfirsthead       \caption*{Table \ref {tbl:long_color} - Cont.: MWE longtable coloring test.} \\       \thickline       \headcol \multicolumn{1}{c}{ID} %       \pgfmathparse{isodd(\thecurRowNum)}%       \typeout{[Head] Odd: \pgfmathresult - Row: \thecurRowNum}%       \ifnum1=\pgfmathresult\relax%         \\ \thickline %       \else%         \\ \thicklinec %       \fi%     \endhead       \pgfmathparse{int(isodd(\thecurRowNum))}%       \ifnum1=\pgfmathresult\relax%          \\[-3.1ex] \thickline %       \else%         \\[-3.1ex] \thicklinec \rowcol %       \fi%       \multicolumn{1}{>{\incRowNum}r}{\emph{End}}%       \pgfmathparse{int(isodd(\thecurRowNum))}%       \ifnum1=\pgfmathresult\relax%         \\ \thicklinec %       \else%         \\ \thicklinec %       \fi%     \endfoot             \thecurRowNum \\     \rowcol \thecurRowNum \\             \thecurRowNum \\ \newpage     \rowcol \thecurRowNum \\             \thecurRowNum \\     \rowcol \thecurRowNum \\ \newpage             \thecurRowNum \\     \end{longtable}     \end{document}


title: subcaption package incompatible with memoir class?

text: When I try to compile a document with the `memoir` class and the subcaption package I get the following error: > ! Package `subcaption` Error: This package can't be used in cooperation with > the `subfig` package. I presume this is because the `memoir` class loads the `subfig` package. Is that correct? Is there a way to make them work together?


title: Help getting started with Hebrew in babel

text: I want to write a document that will contain only Hebrew text (and some diagrams). I understand that babel is probably the best way to do it but I am getting utterly confused and haven't been able to attain Hello World level yet. So I am asking for a minimal working example of a Hello World in Hebrew. If that matters, I work in TeXnicCenter but am ready to switch anything else that runs under windows if necessary. EDIT: This is the file that produces the 100 errors:               \documentclass{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage{hebrew}      \newfontfamily{\hebrewfont}{New Peninim MT}     \setmainfont{New Peninim MT}          \begin{document}     \maketitle     \end{document}


title: Forcing specific numbers for tables

text: I'm working on a paper which will include several tables from a book. I would like to keep the same table numbers as in the book, it makes it easier for people reading the paper in this case. They'll know what table 8.2 is. **Is it possible to force specific numbers to tables?** I initially thought of removing tables numbers altogether (I suppose it's possible but haven't checked), but this is not the best solution as I still need to reference the tables in the text. The tables in the book are not necessarily sequential, so I need to force numbers such as 8.2, 8.5 and 10.1. As a secondary question, the _m.n_ format for the table numbers is not just a mere example: this is how the table numbers are in this case. Is it possible to force tables like this? If the above are not possible I'll the normal automatic table numbering and use footnotes to reference the original tables, but I hope there's a more straightforward solution. Thank you.


title: Manipulate a LaTeX2e counter with LaTeX3

text: I have some `expl3` code where I want to manipulate a counter which is defined by a package using LaTeX2e code. If I want to manipulate the counter `foo`, I could either mixing up LaTeX2e code with LaTeX3 code:               % some expl3 code     \addtocounter{foo}{123}     % more expl3 code      or I could do it using only `expl3` commands:               % some expl3 code     \int_gadd:Nn \c@foo { 123 }     % more expl3 code      Which way of manipulating the counter is preferable? Or does it not matter which way I choose? **Edit:** Here is a MWE, using the `datenumber` package:               \documentclass{article}     \usepackage{datenumber,xparse}          \makeatletter     \ExplSyntaxOn          \cs_new_protected:Npn \juhu_futuredate:n #1     {       \setdatetoday       \int_gadd:Nn \c@datenumber { #1 } % \addtocounter{datenumber}{#1}       \setdatebynumber{\thedatenumber}       In ~ #1 ~ days ~ is ~ \datedate.     }          \NewDocumentCommand{\futuredate}{m}     {       \juhu_futuredate:n { #1 }     }          \ExplSyntaxOff     \makeatother          \begin{document}          \futuredate{7}          \end{document}      The `datenumber` package defines the `datenumber` counter and assigns an integer to it with the `\setdatetoday` command. `\datedate` prints a date depending on the value given to `\setdatebynumber`. Of course, I could define an own integer and pass it to the `\setdatebynumber` command, but the integer given by `\setdatetoday` is nontrivial and I want to avoid to do the calculations on my own.


title: Introducing LaTeX

text: In my college, there isn't any course where you can learn anything about LaTeX, so I've been thinking on doing a little workshop or seminar in order to give other students and teachers a chance at trying it out and learning the basics. I'd like your advice in many things:   * Has any of you done anything similar? If yes, how did it go?   * I think that the installation and configuration in Windows is a troublesome aspect, but many people in my college use it, so I'd have to show it, should I do it at the beginning or at the end?   * What do you think is better for initiating non-LaTeX people, something like a beamer presentation showing the commands and the result or magnifying the typing of the commands in place (or de-commenting) and compiling to show?   * Is it better if people can try things during the "course" in a preinstalled computer or will they get distracted and not follow the ideas properly? Any other advice you can give will be appreciated.


title: How to type Hindi words in LaTeX

text: I am writing a thesis and have to write some Hindi words using LaTeX. When I use               \usepackage{devanagari}       removed. For example:      {\dn school}       the output generated is ![output of the above code](http://i.stack.imgur.com/TnbEo.jpg) I want output to be like this: स्कूल


Well, the title says it all: TikZ's decoration option for paths derails pgfplots axis' formatting. Included in the MWE is my whole preamble concerning TikZ. If I run the MWE below, I get the following output but I'd rather not uncomment the `decoration={brace}` line. If I leave it in, it looks like this: ![abc](http://i.stack.imgur.com/gxuZA.png) So, is there a solution to this with `decoration={brace}` staying active? Or did I make some error? datadump **MWE**               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     tikz,     pgfplots,     amsmath     }          \usepackage[T1]{fontenc}     \usepackage{     lmodern,     textcomp     }          \usetikzlibrary{calc,trees,shadows,positioning,arrows,chains,shapes.geometric,%         decorations.pathreplacing,decorations.pathmorphing,shapes,%         matrix,shapes.symbols,patterns,intersections}          \pgfdeclarelayer{background layer}     \pgfdeclarelayer{foreground layer}     \pgfsetlayers{background layer,main,foreground layer}          \tikzset{     >=open triangle 45,       line/.style={draw, thick, ->},       kapitel/.style={         node distance=0.8cm,             rectangle,             drop shadow={opacity=0.5},             minimum width=4em,             minimum height=4em,             text width=12em,         font=\sffamily\bfseries,         draw={black!80, very thick},             fill=black!40,             %top color=white,         %bottom color=white!20!blue,             on chain},       every join/.style={->, thick, shorten >=1pt},         abschnitt/.style={         node distance=0.5cm,             rectangle,             drop shadow={opacity=0.5},         rounded corners,              minimum height=2em,              minimum width=4em,             text width=10em,         draw=black!80,             fill=black!20,             %shade,         font=\sffamily,             %top color=white!80!black,             %bottom color=white,         %text centered,         on chain},       decoration={brace},     }                    \def\parsedate#1-#2!{%         \pgfmathparse{#1+1/12*(1#2-101)}%     }          \begin{document}     \begin{center}     \begin{tikzpicture}     \begin{axis}[         width=14cm, height=8cm,         axis lines*=left,         ymin=0,         enlargelimits=upper,         /pgf/number format/1000 sep={},         x coord trafo/.code={\expandafter\parsedate#1!}     ]     \addplot [no markers] table [col sep=semicolon] {datadump.csv};%\datatable};     \end{axis}     \end{tikzpicture}     \end{center}          \end{document}


title: Subscript in Figure Captions

text: How do I make text subscript in a figure caption? I've tried both `\textsubscript{}` and `\protect\textsubscript{}` but both throw errors.


title: Asymptote: when white isn't white

text: I'm trying to display a white 3D ball with Asymptote (3D PDF), but it always turns up gray: ![enter image description here](http://i.stack.imgur.com/svETS.png)               import graph3;     import solids;          defaultrender.merge=true;     size(10cm,0);          currentprojection=orthographic(-Z);          //currentlight=Headlamp;     //currentlight=light(-10,1,1);     //currentlight=White;     currentlight=Viewport;          draw(unitsphere,rgb(1,1,1));      I understand it's a lighting issue, and I've tried playing with its settings (the lines commented out in my source are some of my attempts), but I **never** manage to have white be white. If I understand correctly, **I need a whiter diffuse component in my light** , but I cannot see how to achieve that. And the documentation is not very clear… * * * This will be part of a molecular model, and the rendering I'm going for it something like this: ![enter image description here](http://i.stack.imgur.com/YM8IR.png)


title: How can I align 2 plots vertically?

text: I have two plots with tikzpicture above each other. (they have quite difficult text files as source, so I can not show them here). The plots have the same width, the problem is that the legend is different in size --> One plot is more to the left than the other) What Can I do, to align them vertically? Thank You very much !!


title: Why does \setacronymstyle{long-short-desc} overwrite \renewcommand*{\glsentryfmt}?

text: I am currently writing a paper with an extended glossary. Therefore, I use the `glossaries` package. I want the first appearance of a glossary entry being indicated by a symbol preceding the name of the entry. Until some recent changes to the package this could be achieved with the following code:               \defglsdisplayfirst[\glsdefaulttype]{#1}      (In above case, nothing would be changed but the content of the last brackets is responsible for the first entry's appearance, see my extended example below.) Now, the same thing is achieved with the following code:               \renewcommand*{\glsentryfmt}{%         \ifglsused{\glslabel}{}{}         \glsgenentryfmt     }      (In this example, the first entry would not be changed but `\ifglsused` makes it possible to insert anything in the second brackets which would precede the actual entry which is inserted with `\glsgenentryfmt`.) I find the new approach more difficult but it is explained in glossaries- user.pdf on page 100 at the bottom and is more flexible of course. After fiddling around with the package and doing some adjustments I found out that changing the acronym style makes `\renewcommand*{\glsentryfmt}` (and so on) useless as can be tested with the following code:               \documentclass{article}          \usepackage{MnSymbol}          \newcommand{\glmarker}{$\smalltriangleright$}          \usepackage{glossaries}     \makeglossaries          % overwriting the first appearance of a glossary entry     % in previous versions this was done with     %     %   \defglsdisplayfirst[\glsdefaulttype]{\glmarker\,#1}     %     % now, it is done with the following command (see glossaries-user.pdf, p. 100     % bottom)     \renewcommand*{\glsentryfmt}{%         \ifglsused{\glslabel}{}{\glmarker\,}         \glsgenentryfmt     }          \setglossarystyle{altlist}          % with setting the acronymstyle to 'long-short-desc' overwrites the adjustments     % for the first appearance of an gls entry (it does not matter whether     % \setacronymstyle is triggered before or after \renewcommand*{\glsentryfmt}          %\setacronymstyle{long-short-desc}          \newglossaryentry{example}{         name={example},         description={             an example is an example        }     }          \begin{document}          This is the first appearance of an entry in the glossary: \gls{example}. This     is the second appearance of an entry in the glossary: \gls{example}.          \printglossaries          \end{document}      Not setting the acronym style results in the following output (which I intended but displays acronyms not as `long-short-desc`): ![example w/o setting new acronym style](http://i.stack.imgur.com/f6qcY.png) But setting the new acronym style results in the following output _without_ the marker I would like to add before the first appearance of the entry. And the code defining the first appearance of an entry is still active! ![example w/ setting new acronym style](http://i.stack.imgur.com/4YexD.png) I also tried switching the appearance of setting the new acronym style and defining the new appearance of the first entry in the code but, unfortunately, this did not result in a working example. Is this intended and I am doing something wrong? I did not have this problem when I used the (now) out-dated variant of defining the appearance of a first entry.


title: Installing and using MPlib

text: I have been able to find the manual for MPlib on CTAN, but where can I find the C sources for the library itself? Sorry for asking such a basic question.


title: ConTeXt: Too much hyphenation

text: I am trying to control the amount of automatic hyphenation in my document. But all the options I specify don't seem to have any effect. The following MWE shows two paragraphs with six hyphenated words. This happens through out the rest of the document. Any suggestions are welcome. ![excessive hyphenation](http://i.stack.imgur.com/ozlHJ.png) Also, I would like to disable hyphenation completely in the margin text. `align=flushleft` still gives hyphenated words. In latex, `\hyphenpenalty=10000` completely disables hyphenation. Is there a similar option in `context`? **MWE**               \setupbodyfont[modern,11pt]     \setuplayout[width=12cm]     \setuptolerance[horizontal,stretch]     \definefontfeature [default] [default] [expansion=quality]     \setupalign [hz]     \starttext     Various Monte Carlo methods are the most popular tool for propagating      uncertainty during robust design and optimisation. Theoretically, Monte Carlo     methods can generate arbitrarily accurate estimates of mean and variance.     However, the convergence is slow and many engineering scenarios do not justify     the computational expense demanded by the nonlinear Monte Carlo     methods.          The proposed Inexpensive Monte Carlo (IMC) method is a cost efficient     alternative to the nonlinear Monte Carlo method under certain assumptions.     Judicious use of IMC method can greatly speed-up uncertainty propagation for      robust design algorithms. This chapter outlines motivation behind the proposed     IMC method. Probable application areas are identified along with a survey      of various alternative methods available presently.      The basic formulation of IMC method is presented. The      implementation details and the effectiveness of the methods are explored using a     simple algebraic model problem. The limitations of the IMC method are also     demonstrated in a clear fashion using the model problem. Finally, the last     section compares performance of the proposed IMC methods with the more     traditional moment methods for the model problem.     \stoptext


title: Converting TeX to MS-Word for recruiters asking for resumes in word files

text: What do you do when you have spent considerable effort finessing your resume in TeX and a recruiter asks you for your resume in MS-Word? Do you:   1. Spend the time to produce something that looks half as good as the TeXed result,   2. Ignore the openings advertised by that recruiter, or   3. Somehow convert the resume to a draft in Word that you then edit? If you take the third approach, please share what you do. I've used Word over the years when someone had been passing a form that needed filling, but I have yet to learn the actual basics, hence my question. _Let me comment here on the answers to benefit from the ability to format_ **Solution: Use TeX4ht's htlatex** A resume is likely to use either tabbing or tabular environments extensively. If you run htlatex on the file:               \documentclass{article}          \begin{document}          \begin{tabbing}   Job A {\centering Years A} \` Company A \\   Job B {\centering Years B} \` Company B \\ \end{tabbing}          \begin{tabular}{lcr}   Job 1 & Years 1 & Company 1 \\   Job 2 & Years 2 & Company 2 \\ \end{tabular}          \end{document}      You will find that `tabular` is handled correctly, but `tabbing` is not. **Solution: Use online conversion tools** One did indeed produce a decent output, but it would be nice to know that the web site is not run by a marketer, a spammer, or worse. Sites that provide a program to download to one's own computer reduce somewhat this worry.


title: Yet another issue on spanning columns

text: There are a lot of examples on spanning columns and rows in a table. I tried them to create a table like this but failed!                          +-----------------------------+                | A  |  B |  C |  D | E  | F  |      +----+----+-----------------------------+      | 1  | 2  | 30 | 40 | 50 | 60 | 70 | 80 |      |    | 3  | 31 | 41 | 51 | 61 | 71 | 81 |      +----+----+-----------------------------+      | 4  | 5  | 32 | 42 | 52 | 62 | 72 | 82 |      |    | 6  | 33 | 43 | 53 | 63 | 73 | 83 |      +----+----+-----------------------------+      Here is the code I wrote               \begin{table*}         \centering         \caption{Prefetchers coverage}         \label{prefetch-coverage}         \begin{tabular}{ |c|c|c|c|c|c|c|c|}             \cline{3-8}             \\multicolumn{2}{c}{}      &       &   A   &   B   &   C   &    D   &   E   &   F \\              \hline                                     1  &   2   &  30   &  40   &  50   &  60    &  70   &  80   \\             \cline{2-8}                                        &   3   &  31   &  41   &  51   &  61    & 71    &  81   \\             \hline                                     4  &   5   &  32   &  42   &  52   &  62    & 72    &  82   \\              \cline{2-8}                                        &   6   &  33   &  43   &  53   &  63    & 73    &  83   \\             \hline         \end{tabular}     \end{table*}          The output however is fragmented in the first row. Where did I miss?


title: List of Abbreviations / Glossary without extra packages?

text: I finished my dissertation and I have now been asked to add a list of abbreviations/glossary just after the table of contents. I have searched several examples but all seem to require extra packages that do not work on my mac (using texpad on mac os x maverick) so I was wondering if some generous soul could guide me through how to do that on a mac. It could also be done manually without packages as long as there is a good formatting. Thanks in advance.


title: Place two logo on top right and top left in beamer presentation

text: I have a beamer presentation and use the PaloAlto theme. As you can see in the code sample I have two logos over each other. I'd like to place one on the left hand and the other on the right side. Would please help?               \logo{\includegraphics[height=0.8cm]{images/city_magazine_custom_logo}\hspace{-60pt}       \includegraphics[height=0.8cm]{images/ses50}\hspace{-10pt}       }


title: Change chapter title format in scrreprt without titlesec?

text: I'm working with `scrreprt` and I have loaded `minitoc` to have a short TOC after each chapter title. However when I give the `\chapter` command I get: > 1 Chapter Title I'd like to have: > Chapter 1 > > Chapter Title like in the ordinary `report` document-class (which I'm not using because I like the page size and fonts of the `scrreprt` doc-class). I've seen in this other thread the following piece of code but it requires the `titlesec` package. I'm not familiar with that package, besides I think I would get errors and warnings on top of what I'm already getting now.               \renewcommand*{\chapterformat}{%     \mbox{\scalebox{1.5}{\chapappifchapterprefix{\nobreakspace}}%     \scalebox{4}{\color{gray}\thechapter\autodot}\enskip}}      Can someone please help me get the result I'm wanting?


title: Background color for inline math with linebreaks?

text: What's the simplest way to achieve coloured background for the inline equation in the following example:               \documentclass{article}     \begin{document}     Completely unimportant text      $ABC_{1234} = ABC_{1234} + ABC_{1234} - ABC_{1234} + ABC_{1234} - ABC_{1234} + ABC_{1234} - ABC_{1234} + ABC_{1234} - ABC_{1234} + ABC_{1234} - ABC_{1234} + ABC_{1234} - ABC_{1234}$     Some more text.     \end{document}      So the result would look like: ![enter image description here](http://i.stack.imgur.com/6LJjW.jpg)


title: Centered section title in fancyhdr

text: `fancyhdr` automatically puts the section title on the right header. When I try               \begin{document}          \pagestyle{fancy}          \chead{\rightmark}     \rhead{}     \cfoot{\thepage}          \end{document}      nothing appears in the header. Help!


title: Perfect overlapping of dotted nodes in matrices

text: If you have a TikZ matrix of nodes, where every node is dotted, the dots do not overlap properly. Please see the attached code:               \documentclass[margin=1cm]{standalone}          \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \begin{tikzpicture}[every node/.style={draw,dotted}]     \matrix[matrix of nodes]{     text & text\\     text & text\\     };     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/QCxML.png) However, if you simply draw two nodes in the correct positions, the dots overlap correctly:               \documentclass[margin=1cm]{standalone}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}      \node [draw,dotted,minimum size=20mm]at (0,0){text};      \node [draw,dotted,minimum size=20mm]at (0,-2){text};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pMKYH.png) Is it possible to make the nodes inside the matrix to behave like those outside?


title: Footer in Beamer

text: I found in this related topic Add Footer Text to All Slides in Beamer a nice code for footer in `beamer` with the `Frankfurt` theme.               \setbeamertemplate{footline}[text line]{%     \parbox{\linewidth}{\vspace*{-8pt}some text\hfill\insertshortauthor\hfill\insertpagenumber}}     \setbeamertemplate{navigation symbols}{}      That is exactly what I need. But when I add it to my presentation I lost default "navigation" icons. So my questions are:   * Is it possible to have footer with these icons?   * How to change background color of this footer? Thank you very much!


title: Left align after \specialcell in a centered table

text: I'm outputting descriptive tables from Stata using `estpost` and `esttab` into TeX format, and then importing them in LyX. I use `\refcat` to label my survey questions, and since some of them are very long I need to put linebreaks using `\specialcell` (I already do this in Stata). However, these seem to center automatically, which turns out ugly. Can I adjust my Stata code to have my labels (`\refcats`) align left? This is my Stata code (updated after comment):               local opin_padres P64_rev_1_lf-P65_rev_5_lf P74_rev_1_lf-P75_rev_5_lf          estpost su `opin_padres' if tratamiento==0     est store P1          estpost su `opin_padres' if tratamiento==1     est store P2          estpost su `opin_padres'      est store P3          esttab P1 P2 P3 using `opinpadres', replace longtable booktabs addnotes(Todos las variables han sido ponderadas en porcentajes (\%)) ///         refcat(P64_rev_1_lf "\multicolumn{4}{\textbf{El rendimiento de los alumnos depende en gran parte de su\\situaci\'on familiar}}\\" ///         P65_rev_1_lf "\multicolumn{4}{\textbf{La educaci\'on es una prioridad para los\\padres de los alumnos de su secci\'on}}\\" ///         P74_rev_1_lf "\multicolumn{4}{\textbf{C\'omo es su relaci\'on con los padres de alumnos?}}\\" ///         P75_rev_1_lf "\multicolumn{4}{\textbf{C\'omo es su relaci\'on con la comunidad en la que se encuentra la escuela?}}\\", nolabel) ///         mtitle("Control" "Tratamiento" "\textbf{Total}") cells(mean(fmt(1))) label nonum collabels(none) noobs      And this the TeX code of the table:               {     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \begin{longtable}{l*{3}{c}}     \toprule\endfirsthead\midrule\endhead\midrule\endfoot\endlastfoot                     &\multicolumn{1}{c}{Control}&\multicolumn{1}{c}   {Tratamiento}&\multicolumn{1}{c}{\textbf{Total}}\\     \midrule     \multicolumn{4}{\textbf{El rendimiento de los alumnos depende en gran parte de su\\situaci\'on familiar}}&            &            &            \\     \hspace{0.2cm}Muy de acuerdo&        39.1&        34.3&        36.6\\     \hspace{0.2cm}De acuerdo&        51.6&        50.7&        51.1\\     \hspace{0.2cm}Indiferente&         0.0&         4.5&         2.3\\     \hspace{0.2cm}En desacuerdo&         9.4&        10.4&         9.9\\     \hspace{0.2cm}Muy en desacuerdo&         0.0&         0.0&         0.0\\     \multicolumn{4}{\textbf{La educaci\'on es una prioridad para los\\padres de los alumnos de su secci\'on}}&            &            &            \\     \hspace{0.2cm}Muy de acuerdo&        18.8&        10.4&        14.5\\     \hspace{0.2cm}De acuerdo&        45.3&        50.7&        48.1\\     \hspace{0.2cm}Indiferente&        18.8&        22.4&        20.6\\     \hspace{0.2cm}En desacuerdo&        12.5&        11.9&        12.2\\     \hspace{0.2cm}Muy en desacuerdo&         4.7&         4.5&         4.6\\     \multicolumn{4}{\textbf{C\'omo es su relaci\'on con los padres de alumnos?}}&            &            &            \\     \hspace{0.2cm}Muy buena&        31.2&        21.5&        26.4\\     \hspace{0.2cm}Buena &        54.7&        69.2&        62.0\\     \hspace{0.2cm}Regular&        14.1&         9.2&        11.6\\     \hspace{0.2cm}Mala  &         0.0&         0.0&         0.0\\     \hspace{0.2cm}Muy mala&         0.0&         0.0&         0.0\\     \multicolumn{4}{\textbf{C\'omo es su relaci\'on con la comunidad en la que se encuentra la escuela?}}\\&            &            &            \\     \hspace{0.2cm}Muy buena&        23.4&        10.9&        17.2\\     \hspace{0.2cm}Buena &        68.8&        79.7&        74.2\\     \hspace{0.2cm}Regular&         7.8&         9.4&         8.6\\     \hspace{0.2cm}Mala  &         0.0&         0.0&         0.0\\     \hspace{0.2cm}Muy mala&         0.0&         0.0&         0.0\\     \bottomrule     \multicolumn{4}{l}{\footnotesize Todos las variables han sido ponderadas en porcentajes (\%)}\\     \end{longtable}     }      This is the latest version of my preamble:               % Packages for tables     \usepackage{booktabs}% Pretty tables     \usepackage{threeparttablex}% For Notes below table     \usepackage{longtable}%Long tables          % *****************************************************************     % siunitx     % *****************************************************************     \newcommand{\sym}[1]{\rlap{#1}} % Thanks to Joseph Wright & David Carlisle          \usepackage{siunitx}     \sisetup{         detect-mode,         group-digits            = false,         input-symbols           = ( ) [ ] - +,         table-align-text-post   = false,         input-signs             = ,         }             % Character substitution that prints brackets and the minus symbol in text mode. Thanks to   David Carlisle     \def\yyy{%     \bgroup\uccode`\~\expandafter`\string-%     \uppercase{\egroup\edef~{\noexpand\text{\llap{\textendash}\relax}}}%     \mathcode\expandafter`\string-"8000 }          \def\xxxl#1{%     \bgroup\uccode`\~\expandafter`\string#1%     \uppercase{\egroup\edef~{\noexpand\text{\noexpand\llap{\string#1}}}}%     \mathcode\expandafter`\string#1"8000 }          \def\xxxr#1{%     \bgroup\uccode`\~\expandafter`\string#1%     \uppercase{\egroup\edef~{\noexpand\text{\noexpand\rlap{\string#1}}}}%     \mathcode\expandafter`\string#1"8000 }          \def\textsymbols{\xxxl[\xxxr]\xxxl(\xxxr)\yyy}               % *****************************************************************     % Estout related things     % *****************************************************************     \let\estinput=\input % define a new input command so that we can still flatten the document          \newcommand{\estwide}[3]{         \vspace{.75ex}{             \textsymbols% Note the added command here             \begin{tabular*}             {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}             \toprule             \estinput{#1}             \bottomrule             \addlinespace[.75ex]             \end{tabular*}             }         }             \newcommand{\estauto}[3]{         \vspace{.75ex}{             \textsymbols% Note the added command here             \begin{tabular}{l*{#2}{#3}}             \toprule             \estinput{#1}             \bottomrule             \addlinespace[.75ex]             \end{tabular}             }         }          % Allow line breaks with \\ in specialcells     \newcommand{\specialcell}[2][c]{%     \begin{tabular}[#1]{@{}l@{}}#2\end{tabular}                        %%%     }          % *****************************************************************     % Custom subcaptions     % *****************************************************************     % Note/Source/Text after Tables     % The new approach using threeparttables to generate notes that are the exact width of the table.     \newcommand{\Figtext}[1]{%     \begin{tablenotes}[para,flushleft]     \hspace{6pt}     \hangindent=1.75em     #1     \end{tablenotes}     }     \newcommand{\Fignote}[1]{\Figtext{\emph{Note:~}~#1}}     \newcommand{\Figsource}[1]{\Figtext{\emph{Source:~}~#1}}     \newcommand{\Starnote}{\Figtext{\textit{* p < 0.1, ** p < 0.05, *** p < 0.01.}\\  Errores est\'andares corregidos por correlaci\'on y heteroskedasticidad a nivel de escuela entre par\'entesis.}}% Add significance note with \starnote


title: Why does pgf not understand relative dimensions (ex, em, sp)?

text: The below MWE draws a number of rectangles using low-level `pgf` commands, each specified with a different unit that Latex understands. However, `pgf` doesn't seem to be able to determine the relative units `ex`, `em` and `sp`. Is there a reason for that? By way of context, I was trying to declare a new shape with a size relative to the current text. As the shape isn't meant to contain any text, it seemed a better approach than making it relative to a non-existent `\pgfnodeparttextbox`. If `pgf` can't cope with relative units in this context, is there a better approach to setting the initial size of a shape? ![Boxes drawn with different units in pgf](http://i.stack.imgur.com/NWVWL.png)               \documentclass[a4paper]{article}     \usepackage{tikz}          \begin{document}          \newdimen\ptdim     \newdimen\pcdim     \newdimen\indim     \newdimen\bpdim     \newdimen\cmdim     \newdimen\mmdim     \newdimen\dddim     \newdimen\ccdim     \newdimen\spdim     \newdimen\exdim     \newdimen\emdim          \begin{tikzpicture}       \ptdim=12pt       \pcdim=2pc       \indim=2in       \bpdim=100bp       \cmdim=3cm       \mmdim=20mm       \dddim=40dd       \ccdim=10cc       \spdim=500sp       \exdim=5ex       \emdim=5em       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\ptdim}{\ptdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\pcdim}{\pcdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\indim}{\indim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\bpdim}{\bpdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\cmdim}{\cmdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\mmdim}{\mmdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\dddim}{\dddim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\ccdim}{\ccdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\spdim}{\spdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\exdim}{\exdim}}       \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\emdim}{\emdim}}       \pgfusepath{stroke}       \node[below] at (\ptdim,0) {pt};       \node[below] at (\pcdim,0) {pc};       \node[below] at (\indim,0) {in};       \node[below] at (\bpdim,0) {bp};       \node[below] at (\cmdim,0) {cm};       \node[below] at (\mmdim,0) {mm};       \node[below] at (\dddim,0) {dd};       \node[below] at (\ccdim,0) {cc};       \node[below] at (\spdim,0) {sp};       \node[below] at (\exdim,0) {ex};       \node[below] at (\emdim,0) {em};     \end{tikzpicture}     \end{document}


title: How to do a small box synchronized translation?

text: I would like to do something similar to the Artscroll Bibles, with a Hebrew text and a small box on the top with a synchronized translation. In the following picture, the box in question is the upper left one, which contains another translation of the main interlinear text. Both text are verse numbered, so the problem is how to sync them. Using two parallel columns is not an option here. What I have in mind is more a synced minipage. ![like this](http://www.artscroll.com/images/insides/i/inc1h-ex-1.jpg)


title: Add space in `brqalign`

text: Some time ago David Carlisle wrote an awesome `brqalign` function in this answer: http://tex.stackexchange.com/a/51543/4011. See the cited code below. How can I add space between the rows of `brqalign`?               \documentclass{article}     \usepackage[leqno]{amsmath}          \renewcommand\theequation{\alph{equation}}          \newenvironment{brqalign}{%     % START CODE     %%%%%%%%%%%%     % Do everything an a box, as you can not remove     % things from the main vertical list.     \setbox0\vbox\bgroup     % Allow \\ for ends of row.     \let\\\cr     % Use an \halign (I experimented with using one     % of the AMS alignments but they tend to want to      % be full width, or already in math mode, so just     % use a primitive \halign here with two display math     % entries in its preamble.     \halign\bgroup       \refstepcounter{equation}\theequation)\quad       \hfil$\displaystyle##$&$\displaystyle{}##$\hfil\cr}%     {%     % END CODE     %%%%%%%%%%     % Finish the \halign.     \crcr\egroup     % Now, at this point the vertical list being assembled in     % box0 contains all the rows of the alignment these will be     % a sequence of \hboxes (which will all be forced to be the     % same width) and baselineskip glue. (While testing with the     % AMS alignments there was additional glue and penalties     % as well.     %     % We will discard all the glue and penalties but assemble     % a horizontal list of the boxes in box1.     % start by making box1 and empty hbox.     \global\setbox1\null     % Then loop backwards up the vertical list discarding any glue     % and penalties and grabbing hold of each box.     \loop     % This combination removes two adjacent glue items     % or glue followed by penalty, it may be more than needed     % but better be safe than sorry.     \unskip\unskip\unpenalty\unskip\unpenalty     % Glue and penalties we discard, but the boxes have the     % formula so remove this one from the current list and     % save it in box 4.     \setbox4\lastbox     % If there was no box box4 is void and we reached the top     % of the original vertical alignent so stop.     \ifvoid4     \else     % Otherwise Put this box4 at the front of the horizontal     % list being built in box1, followed by an em of space.     \global\setbox1\hbox{\box4\hskip 1em\unhbox1}%     % Go round the loop again.     \repeat     % End the group for the working box 0.     % The horizontal list is globally assigned     % to box 1 so will be visible after this group end.     \egroup     % Now put out all the boxes flush left, the usual paragraph breaker     % will fit as many on a line as it can. As each box is the same width     % vertical alignment is automatic.     \begin{flushleft}\unhbox1 \end{flushleft}%     % Ignore white space after the end of the environment     \ignorespacesafterend     }          \begin{document}          \begin{brqalign}       x^2 + y^2 &= 1\\       a + b &= c\\       r-x &= y+z \\       f - y &= z\\       a - b &= 2d\\       r+x &= 2y-3z     \end{brqalign}               \end{document}


title: section numbering format

text: I am trying to format a legal document so that it follows this format.                 Article 1.          1.01 First section            bla bla bla          1.02 Second section            bla bla bla          etcetera.      I tried using this to get things working the way I wanted:               \usepackage{etoolbox}  %needed to make chapters continuous on page     %% Need with {etoolbox} package     \makeatletter     \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \makeatother          % change % chapter to article and center it     \renewcommand{\chaptername}{Article}     \renewcommand{\thechapter}{\Alph{chapter}}     \titleformat{\chapter}[hang]{\LARGE\bfseries\centering}{\chaptertitlename\ \thechapter}{0.125in}{\LARGE}          %Format section numbering     \def\thesection{\arabic{section}.}     \def\thesubsection{\arabic{section}.0\arabic{subsection}}     \def\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}          % Set section number depth to level 3     \setcounter{secnumdepth}{3}      Now, the problem is how to get a leading zero in the section and then have it increment correctly. Once I reach the 10 level, the section is shown as: "1.010", which is wrong. It should read "1.10". I can accomplish this in MS Word; however, I can find no way to do it in LaTeX. Does anyone have a solution?