title: Abstract page problems

text: I am using a report document classe. I have an abstract and an acknowledgement sections before the toc. This is my definition for Acknowledgements. I took it from someplace in the web, so there might be errors.               \makeatletter     \newcommand\ackname{Acknowledgements}     \if@titlepage       \newenvironment{acknowledgements}{%           \titlepage           \null\vfil           \@beginparpenalty\@lowpenalty           \begin{center}%             \bfseries \ackname             \@endparpenalty\@M           \end{center}}%          {\par\vfil\null\endtitlepage}     \else       \newenvironment{acknowledgements}{%           \if@twocolumn             \section*{\abstractname}%           \else             \small             \begin{center}%               {\bfseries \ackname\vspace{-.5em}\vspace{\z@}}%             \end{center}%             \quotation           \fi}           {\if@twocolumn\else\endquotation\fi}     \fi     \makeatother      Every time I compile my file I get the following:               (../abstract/abstract.tex)pdfTeX warning (ext4): destination with the same identifier (name{page.a}) has been already used, duplicate ignored     [1]) (../ack/root.texpdfTeX warning (ext4): destination with the same identifier (name{page.a}) has been already used, duplicate ignored      My guess is that its trying to typeset these two pages to the same page as the title page.


title: How do I reference an appendix when it is defined with \chapter*?

text: I have a problem with the reference of an annex. In the main `.tex` file I put               %... couple of lines before this     \include{ThesisChapter4} %      \include{ThesisAppendixA} % Appendix A      and in `Appendix A` I write this:               \chapter*{Appendix A}     \label{ThesisAppendixA} \thispagestyle{plain} %\pagenumbering{roman}          \begin{figure}[ht]      \centering      \includegraphics[scale=1]{images/heike/img1}      \label{image1}     \end{figure}      In the page of ThesisChapter4, I tried to refer to the chapter of Appendix A with this:                A complete procedure is provided in chapter \ref{chap:Appendix A}.      However, when I look at the created PDF, this is shown as                A complete procedure is provided in chapter ??.      I have actually managed to refer to different figures before, however so far these refer to labels in the same file (for instance, in thesis chapter 4, I refer to a certain figure in the thesis chapter 4). When I tried to reference to chapter Appendix A, it fails. I tried to refer to the label also (image1) but it also fails. Does anyone know how to fix above problem?


title: Animate subitemize in beamer

text: I know there is a way to 'animate' the `enumerate` in beamer using the following:               \begin{enumerate}         \item<1-> Item 1;         \item<2-> Item 2;         \item<3-> Item 3;         \item<4-> Item 4.     \end{enumerate}      However I wanted to 'animate' a `subitem` and display it's number, e.g., 1.x - 1.2. Is this possible? I want something like this:               \begin{enumerate}         \item<1-> Item 1;         \begin{enumerate}             \item<1.1-> Item 1.1;             \item<1.2-> Item 1.2.         \end{enumerate}         \item<2-> Item 2;         \item<3-> Item 3;         \item<4-> Item 4.     \end{enumerate}


title: AucTeX (in Emacs) doesn't seem to find certain packages

text: I am using `AucTeX` in `emacs v23` in `PFD-mode`. When invoking the `pdflatex` compiler through `C-c C-c LaTeX` I get a `[...] file <some_package>.sty not found` error for some particular packages. For example, consider the following `foo.tex` file:               \documentclass{article}          \usepackage{algorithm}     \usepackage{algpseudocode}          \begin{document}          \begin{algorithm}       \caption{Some advanced stuff here.}       \begin{algorithmic}         \Function{Increment}{$x$}         \State \Call{Return}{$x+1$}         \EndFunction       \end{algorithmic}     \end{algorithm}          \end{document}      Compiling the file using AucTeX (`C-c C-c LaTeX`) yields:               ERROR: LaTeX Error: File `algpseudocode.sty' not found.      However, if I invoke `pdflatex foo.tex` via the terminal, everything works alright. The only packages I have so far experienced this behavior with are `algpseudocode` and `fmtcount`, included in the Linux packages `texlive- science` and `texlive-latex-extra`, respectively. The packages are, apparently, there; for example, I get the following in the terminal:               $ locate -b fmtcount.sty     /usr/share/texmf-texlive/tex/latex/fmtcount/fmtcount.sty     $ dpkg -l | grep texlive-latex-extra     ii  texlive-latex-extra      2009-10ubuntu1           TeX Live: LaTeX  supplementary packages     ii  texlive-latex-extra-doc  2009-10ubuntu1           TeX Live: Documentation files for texlive-latex-extra      What I find particularly confusing is that I get no such error for package `footmisc`, which is also part of `texlive-latex-extra`. (Please bear in mind that I do not have root access in the machine I'm experiencing this problem at. If it is needed, I can ask the administrators to do the fix - once I know what that might be - but I doubt they'd be willing to start attempting various approaches to it.) * * * **Update**               $ kpsewhich algpseudocode.sty     /auto/pkg/texlive-2009/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty      It appears that the problem is caused by the `pdflatex` program invoked by AucTeX. As I mentioned above, if I run `pdflatex foo.tex` manually through the terminal, it works, and the first line of `foo.log` is:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2010.6.1)  15 FEB 2012 17:15      If, on the other hand, I invoke the compiler through `C-c C-c LaTeX` in AucTex, the `foo.log` file is as follows (notice the difference between the TeX distributions seen in the first line):               This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2011.4.5)  15 FEB 2012 13:24     entering extended mode     **\input foo.tex     (./foo.tex (/auto/pkg/tetex-3.0/share/texmf-dist/tex/latex/base/article.cls     Document Class: article 2004/02/16 v1.4f Standard LaTeX document class     (/auto/pkg/tetex-3.0/share/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/auto/pkg/tetex-3.0/share/texmf-dist/tex/latex/algorithms/algorithm.sty     Package: algorithm           Document Style `algorithm' - floating environment     (/auto/pkg/tetex-3.0/share/texmf-dist/tex/latex/float/float.sty     Package: float 2001/11/08 v1.3d Float enhancements (AL)     \c@float@type=\count87     \float@exts=\toks14     \float@box=\box26     \@float@everytoks=\toks15     \@floatcapt=\box27     )     (/auto/pkg/tetex-3.0/share/texmf-dist/tex/latex/base/ifthen.sty     Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     )     \@float@every@algorithm=\toks16     \c@algorithm=\count88     )          ! LaTeX Error: File `algpseudocode.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:      ! Emergency stop.     <read *>           l.5 ^^M          *** (cannot \read from terminal in nonstop modes)               Here is how much of TeX's memory you used:      346 strings out of 94499      4143 string characters out of 1173445      49441 words of memory out of 1000000      3593 multiletter control sequences out of 10000+50000      3640 words of font info for 14 fonts, out of 500000 for 2000      580 hyphenation exceptions out of 1000      23i,0n,17p,157b,36s stack positions out of 1500i,500n,5000p,200000b,5000s     PDF statistics:      0 PDF objects out of 300000      0 named destinations out of 131072      1 words of extra memory for PDF output out of 65536     No pages of output.      I'm afraid I can't figure out how to point AucTeX to the _correct_ `pdflatex` installation, though. In case it's useful, I have the following AucTeX-related lines in my `.emacs` file:               (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq-default TeX-master nil)     (add-hook 'LaTeX-mode-hook               (lambda ()                 (TeX-fold-mode 1)))     (add-hook 'LaTeX-mode-hook 'visual-line-mode)     (add-hook 'LaTeX-mode-hook 'flyspell-mode)     (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)     (add-hook 'LaTeX-mode-hook 'TeX-PDF-mode)     (add-hook 'LaTeX-mode-hook 'turn-on-reftex)     (setq reftex-plug-into-AUCTeX t)


title: Are the line breaks allowed in the PGF 3.0 tree graph nodes?

text: The node/child layout of the trees allows to break node text into multiple lines. I tried the same with graph but luaLatex compilation never completed (using Texmaker) and I had to stop it, which produced errors such as `Undefined control sequence \\\` Is it possible to break node text with graphs too?               \documentclass[10pt,landscape,letterpaper]{article}     \usepackage{tikz}          \usetikzlibrary{graphs, graphdrawing}     \usegdlibrary{trees, layered}          \begin{document}          \begin{tikzpicture}     \graph [         binary tree layout,         sibling distance=4mm,         level distance=8mm,         components go right top aligned,         component sep=1pt,         nodes=draw     ]     {         Supervisor         -- Current Employee %\\ Current Employee Position             -- {                 Subordinate 1--{Worker 01,Worker 02},                 Subordinate 2--{SubSubordinate 21--{Worker 21,Worker 22,Worker 23}             },             Subordinate 3-- SubSubordinate01--{Worker 11,Worker 12}         };     };     \end{tikzpicture}     \end{document}      The above MWE works, but if I removed the comment, it would not... The purpose of this MWE is to avoid having to do lots of node size and position calculations for the org chart I am working on. EDIT: Just to clarify, it seems that node text in the graph layout is directly used as a node name for the purposes of linking nodes together, aligning layers/levels etc, thus new lines and even comas break the compilation. It appears as graph layout is in very beta state at the moment, usable only for the very simplistic one-two word nodes with no punctuation involving new lines or comas :( I'll try to bring this to Till's attention on Sourceforge, let's see what comes out of that.


title: Increase Vertical Line Length in Algorithm Block

text: I would like to increase the line length of the vertical line between the start and the end of the block in the following example using the `algorithm2e` package:               \documentclass{article}          \usepackage[linesnumbered, boxed, vlined]{algorithm2e}          \begin{document}          \begin{algorithm}     \ForEach{\begin{tabular}[t]{l} condition 1\\ condition 2\end{tabular}}{     stuff     }     \end{algorithm}          \end{document}      The output is: ![output1](http://i.stack.imgur.com/QAwO4.png) The output I desire is: ![updated](http://i.stack.imgur.com/dH3jr.png)


title: bibtex package option date

text: i want to make my bibliography to follow the chem-acs style. So i use bibtex style=chem-acs, the output looks almost correctly except the formate of the date. It uses somehow the month and the year, i want it to use only the year. I looked up the package options and found the option date=... with possibilities like "short, comp, long,..and year" So it looks perfect, i need only the year! But once i use date=year i get errors when i compile it :( all other options for date work fine... Can anybody give me a hint why bibtex is behaving like this? thanks!


title: Bibtex (apacite) problem - unwanted space between volume and number

text: I am writing my thesis with LaTeX. I'm citing the used references with `apacite`. All in all it worked all perfectly. However I'm facing one problem: In the bibliography I always have space between the _volume_ and the _number_ of an article. So it looks like this: _Mustermann, M. (2013). Title of the article. Journal of the article, **4 (2)** , 28-35._ It, however, should look like this: _Mustermann, M. (2013). Title of the article. Journal of the article, **4(2)** , 28-35._ Here is my TeX file:                   \documentclass[a4paper,11pt]{article}              \usepackage{fullpage}         \usepackage[ngerman]{babel}         \usepackage{apacite}                   \begin{document}                   \section{First Chapter}              Any Text which is cited \cite{test}.                            \bibliographystyle{apacite}         \bibliography{apa}          \end{document}      And the related file is this:               @article{test,       title={{Title of the article}},       author={Mustermann, Max},       journal={Journal of the article},       volume={4},       number={2},       pages={28--35},       year={2013}     }      I know it's not much, but my professor criticized it and I want to change it. I read, that I need to alter the .bst-File of `apacite`, but I have no idea in which way.


title: How do I get bmpsize working with htlatex?

text: I have the following `test.tex`:               \documentclass{article}     \usepackage{tex4ht}     \usepackage{bmpsize}     \usepackage{graphicx}     \begin{document}     \includegraphics[natwidth=1594.7871bp,natheight=1147.85222bp,width=0.65\textwidth,height=0.65\textwidth]{torus-lores-bw.png}     \end{document}      Running `latex` gives:               D:\Documents\GitHub\book\foo>latex test.tex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     (D:\Documents\GitHub\book\foo\test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\usepackage.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("D:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize-base.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\fp\fp-basic.sty"     `Basic Fixed Point Arithmetic',  Version 1.2d (C) Michael Mehlich             )      ("D:\Program Files\MiKTeX 2.9\tex\latex\fp\fp-snap.sty"     `Fixed Point Snap Off',          Version 1.0a (C) Michael Mehlich             )     ) ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize-dvips.def"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.4ht"     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file     ::::::::::::::::::::::::::::::::::::::::::     ) ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty"     --- needs --- tex4ht test ---     (D:\Documents\GitHub\book\foo\test.tmp)     l.1437 --- TeX4ht warning --- No file test.xref ---     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\latex.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\fontmath.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\article.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\graphics.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\dvips.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\graphicx.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     No file test.aux.          LaTeX Warning: File `torus-lores-bw.png' not found on input line 6.          <torus-lores-bw.png>     ! Undefined control sequence.     \b:graphics ...ght !*?: " }\egroup \fi \fi \E:IMG                                                       \HCode {<!--tex4ht:graphic...     l.6 ...,height=0.65\textwidth]{torus-lores-bw.png}          ?      If I remove the `tex4ht` package, or the `bmpsize` package, everything works fine. (Well, it works fine if there's a .png file with the right name available. But you get this error even if there isn't.)


title: Tikz - Nodes highlighting / background coloring

text: Here is the MWE, it works leaving the unicode devanagari text.               \documentclass[fleqn,12pt,a4paper]{article}     \usepackage{tikz}     \usepackage{tabularx}     \usepackage{color}     \begin{document}          \newcounter{sbnodecount}     \newcommand\sbtabnode[1]{\addtocounter{sbnodecount}{1} \tikz \node (\arabic{sbnodecount}) {#1};}          \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt]     \tikzstyle{every path}+=[thick, rounded corners]          \begin{table}[!htb]      \begin{center}        \begin{tabular}{|c|c|c|c|c|}        \hline     Class   & one & Two & Three \\      \hline     I  & \sbtabnode{A ()}& \sbtabnode{B} & \sbtabnode{C} \\     II & \sbtabnode{D }& \sbtabnode{E} & \sbtabnode{F} \\     III  & \sbtabnode{G} & \sbtabnode{H } & \sbtabnode{I} \\      IV  & \sbtabnode{J} & \sbtabnode{K} & \sbtabnode{L} \\     V    & \sbtabnode{M}& \sbtabnode{N} & \sbtabnode{O } \\     VI  & \sbtabnode{P} & \sbtabnode{Q} & \sbtabnode{R}   \\     VII & \sbtabnode{S} & \sbtabnode{T} & \sbtabnode{U}  \\     VIII   & \sbtabnode{V)} & \sbtabnode{V} & \sbtabnode{X} \\     \hline          \end{tabular}           \caption{Alphabets}     %   \end{minipage}     \end{center}          \begin{tikzpicture}[overlay]     % Define the circle paths     \draw [blue](1.north west) -- (3.north east) -- (3.south east) -- (3.south west) -- (5.south east) -- (4.south west) -- cycle;     \draw [red] (7.north west) -- (8.north east) -- (6.north west) -- (6.north east) -- (21.south east) -- (19.south west)  -- cycle;     \draw [orange] (2.north west) -- (2.north east) -- (5.south east) -- (5.south west) -- cycle;     \draw [green] (22.north west) -- (22.north east) -- (22.south east) -- (22.south west) -- cycle;     \draw[black] (1.north west) -- (3.north east) -- (6.south east) -- (7.north east) -- (16.north east) -- (18.north east) -- (18.south east) -- (17.south east) -- (20.south east) -- (19.south west) -- cycle;     % Labels     \node [left=2cm,above=1cm,minimum width=0pt] at (3) (A) { Group A};     \draw[orange] [stealth-,out=5,in=180] (2) to (A);     \node [below=5cm,right=2cm,minimum width=0pt] at (3) (B) {Group B};     \draw[blue] [stealth-,out=0,in=180] (3) to (B);     \node [right=5cm,below=2cm,minimum width=0pt] at (21) (C) {Group C};     \draw[red] [stealth-,out=350,in=90] (21) to (C);     \node [left=5cm,below=2cm,minimum width=0pt] at (22) (D) {Group D};     \draw[green] [stealth-,out=-180,in=0] (22) to (D);          \node [below=5cm,right=2cm,minimum width=0pt] at (18) (E) {Group E};     \draw[black] [stealth-,out=0,in=180] (18) to (E);               \end{tikzpicture}          \end{table}     \end{document}       ![enter image description here](http://i.stack.imgur.com/COHyT.png) Its works ok for me. However lines overlapping over each other kills the spirit of highlighting. Is it possible to separate the lines so that the highlighted area can be seen clearly. Since these are all going through same node its may not be easy to separate. Is it possible that for few change the background to some light color and some show a border line so that the difference can be seen clearly. I would really appreciate your help


title: Bib sorting without author

text: This is what one of my sources looks like               @misc{Madlena11,      Author={Chavala Madlena},     Publisher={Guardian},        Title = {Telecomix: tech support for the Arab spring},      url = {http://www.guardian.co.uk/technology/2011/jul/07/telecomix-arab-spring}     }      However, sometimes I have a source that doesn't have an `Author` such as:               @misc{RT12,      %Author={},     Publisher={RT TV Network},        Title = {Anti-ACTA day: Angry crowds take action},      url = {http://rt.com/news/acta-protests-rallies-europe-089/}     }      My problem is when the `Author` is not listed it doesn't sort by `Publisher` or even display the publisher in the references, nor the URL. How can I fix this?


title: Usage of minted inside a new environment, inside IfFileExists

text: I want to conditionally load `minted` and define an environment, but after using `IfFileExists` I'm running into an error:               FancyVerb Error:       Extraneous input `resetoptions \setkeys {minted@opt}{frame=single} \begin {fi     gure}[htp] \centering \begin {minipage}{9cm} \begin {VerbatimOut}{\jobname .pyg     }' between \begin{Rcode}[<key=value>] and line end     .     \FV@Error ... {FancyVerb Error:     \space \space #1     }          l.35 \begin{Rcode}      The solution for embedding the `minted` environment inside another came from here. The code I'm running is shown below:               \documentclass{article}          \usepackage{xcolor}          \IfFileExists{minted.sty}{     \usepackage{minted}     \usepackage{pgfkeys}     \pgfkeys{         /terminal/.cd,         caption/.code={\pgfkeyssetvalue{terminal/caption}{\caption{##1}}},         label/.code={\pgfkeyssetvalue{terminal/label}{\label{##1}}},     }     \pgfkeyssetvalue{terminal/label}{}     \pgfkeyssetvalue{terminal/caption}{\caption{}}     \makeatletter     \newenvironment{Rcode}{%       \VerbatimEnvironment       \minted@resetoptions       \setkeys{minted@opt}{frame=single}       \begin{figure}[htp]         \centering         \begin{minipage}{9cm}               \begin{VerbatimOut}{\jobname.pyg}}     {%           \end{VerbatimOut}           \minted@pygmentize{r}           \DeleteFile{\jobname.pyg}         \end{minipage}       \end{figure}}     \makeatother     }{}          \begin{document}     \begin{Rcode}     # Als je specifieke elementen wil aanhalen gebruik dan     c(1,2,3,7,10,15)     # Voor een rij van elementen gebruik     1:15     \end{Rcode}     \end{document}


title: RTL theorem numbering problem - mdframed and xelatex

text: I have a problem with wrong numbering order when using mdframed theorem style. As in the MWE, the second theorem number should 2.1.1 (reading from right to left, 1.1 for the section and 2 for the theorem number) but the counter appears in the middle between chapter and section numbers. I have tried to redefine the counter using               \renewcommand{\thetheorem}{\arabic{theorem}.\thesection}      but it didn't work.               \documentclass{book}          \usepackage[framemethod=tikz]{mdframed}     \usepackage{amsmath, amssymb}          \usepackage{polyglossia}     \setdefaultlanguage[locale=morocco]{arabic}      \setmainfont{Times New Roman}          \mdtheorem{theorem}{Theorem}[section]          \renewcommand{\thetheorem}{\arabic{theorem}.\thesection}          \begin{document}          \chapter{A chapter}     \section{A section}          \begin{theorem}       There exists some $x$ such that $x^2=2$.     \end{theorem}          \begin{theorem}[A second theorem]       For all $x, y \in \mathbb{R}$:       \begin{itemize}         \item $x(-y) = (-x)y = -(xy)$:         \item $(-x)(-y) = xy$.       \end{itemize}     \end{theorem}          \end{document}


title: Arrows and nodes in TikZ

text: I wish to draw arrows not necessarily at the end of the line, nor in the middle. I would also like to write a node directly above (or below, or to the right, ...) the arrow. I saw this question, but it doesn't answer all my questions - first of all, it puts the arrow in the middle of the line. I know I can modify that by playing with `mark=at position 0.5`, but it's very possible that I'd like a certain position in one line, and a different in the other, i.e. use `\draw[mystyle 0.5]` for the middle, `\draw[mystyle 0.75]` for having it three-quarters way through etc.. In addition it doesn't solve the nodes issue. Can anyone give me a hand please?


title: Trouble creating basic tables

text: I am currently writing my dissertation in LaTeX, ran into a brick wall creating a simple table. I want it to look similar to this (Quick mockup done in Numbers) ![Needed style](http://i.stack.imgur.com/sf6Jq.png) The main issues I'm facing resolve making the table fit the width of the page without the text spanning on line, I have tried in the traditional tabular and tabularx, but can't seem to get anywhere. Any assistance would be welcome, thanks ! What I currently have:               \begin{tabularx}{\textwidth}{l|X}      \textbf{Date Commencing:} & 9th September 2013 \\       \textbf{Weeks Objectives} & My objectives for this week are as follows: \\ Investigate potential project ideas Run project ideas by lecturers     \textbf{Progress} & Date Commencing text goes here \\     \end{tabularx}


title: Configurable spacing after \dots

text: LaTeX adds some space after the ellipsis `\textellipsis`. This is enhanced by `ellipsis` package, which only adds space before certain characters (and also gives the option to configure “easily” the spacing between the dots and after): ![enter image description here](http://i.stack.imgur.com/WBBrS.png) However the spacing is “wrong”, for instance `…!`, `…:` or `…?` does not need the same amount (see `:` versus `?`). However, I'm lost in the `ellipsis.sty` and I don't understand half of it. ## How can we set a certain amount to each different character? It would be great to have something like               \SetEllipsisSpacing       {         . = .1em,         ? = .08em,         ! = .09em,         : = .1em,       }     \SetEllipsisSpacing       {         { . } { .1em }         { ? } { .08em }         { ! } { .09em }         { : } { .1em }       }      instead of the current (and only) option `\def\ellipsispunctuation{,.:;!?}`. Here is a minimal compilable example.               \documentclass{scrartcl}     \usepackage[LY1,T1]{fontenc}     \usepackage[utf8]{inputenx}     \usepackage{lmodern} % Just here to be an example, I use a different font     \usepackage{ellipsis}          %\def\ellipsisgap{.1em}          %\DeclareTextCommandDefault{\textellipsis}     %  {{\fontencoding{LY1}\selectfont\char133}}          \begin{document}     a…! …: …?     \end{document}      * * * This comes because I discovered that the LY1 encoding has an ellipsis character, so I can define               \DeclareTextCommandDefault{\textellipsis}       {{\fontencoding{LY1}\selectfont\char133}}      but it needs some adjusting. ![enter image description here](http://i.stack.imgur.com/mRSil.png)


title: itemize environment with a bracket

text: I want to enclose an itemize environment with a bracket inside an itemize environment.               \documentclass[a4paper]{article}      \usepackage{enumitem}      \usepackage{pifont}     \begin{document}     \begin{itemize}[label=\ding{42}, leftmargin=2cm]        \item  Example I        \item Example II             \begin{itemize}                         \left.                                \begin{array}{ll}             \item SubExample II-1             \item SubExample II-2                               \end{array}                           \right \}=Text              \end{itemize}         \item Example III         \item Example IV                     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/F67UZ.jpg) Is there any way to do that in itemize environnment Please Prof. Harish Kumar what can i do in this case with long text and short text and vice-versa as you see below : ![enter image description here](http://i.stack.imgur.com/Fq6KK.jpg)               \documentclass[a4paper]{article}     \usepackage{tikz,xparse}     \usetikzlibrary{decorations.pathreplacing,}     \newcommand{\tikzmark}[1]{\tikz[baseline={(#1.base)},overlay,remember picture] \node[outer sep=0pt, inner sep=0pt] (#1) {\phantom{A}};}          %% syntax     %%%\mybrace{<first>}{<second>}[<Optional text>]     \NewDocumentCommand\mybrace{mmo}{%     \IfValueTF {#3}{%     \begin{tikzpicture}[overlay, remember picture,decoration={brace,amplitude=1ex}]       \draw[decorate,thick] (#1.north east) -- (#2.south east) node[midway, right=0.1cm] {$=$}node[midway, right=0.5cm,text=black,text width = 2in,] {{#3}};     \end{tikzpicture}%     }%     {%     \begin{tikzpicture}[overlay, remember picture,decoration={brace,amplitude=1ex}]       \draw[decorate,thick] (#1.north east) -- (#2.south east);     \end{tikzpicture}%     }%     }%          \begin{document}     \begin{itemize}        \item  Example I        \item Example II             \begin{itemize}             \item long text bla bla bla\tikzmark{a}             \item short text bla\tikzmark{b}              \end{itemize}         \item Example III         \item Example IV     \end{itemize}     \mybrace{a}{b}[Text comes here to describe these to items and justify for your case]          \end{document}


title: Missing footnote and marginpar with package thmbox or package thmtools with option thmbox

text: I am using package `thmbox` to write theorems. If I include `footnote` or `marginpar` within the body of a theorem, the following problems arise: the text of the `footnote` is simply missing, while the `marginpar` produces the error `Float(s) lost.`, and then the text of the `marginpar` is also missing. The same occurs with package `thmtools` with optin `thmbox`. It seems that the first problem can be solved following the answers in this question. Is there a better solution? What about the second problem? An example follows.               \documentclass{article}          % LaTeX original ==> OK     %\newtheorem{theorem}{Theorem}          % package thmbox ==> wrong     \usepackage{thmbox}     \newtheorem{theorem}{Theorem}          % package thmtools with option thmbox ==> wrong     %\usepackage{thmtools}     %\declaretheorem[thmbox=M]{theorem}          \begin{document}          \begin{theorem}          Marginpar\marginpar{marginpar.}          Footnote\footnote{footnote.}     \end{theorem}          \end{document}


title: Problem with kerning using LuaLaTeX

text: I am having a problem with kerning while using LuaLaTeX. In my example, the pair “AT” does not render well. This is clear by comparing LuaLaTeX output with XeLaTeX's, which from the same code renders the pair correctly. In this image, LuaLaTeX output is on the left: ![kerning](http://i.stack.imgur.com/dbnz3.jpg) With small caps the problem seems to appear only when I put them inside an `\mbox`, as shown in the last line of my example. (Could this be related to hyphenation, perhaps? Words protected from hyphenation are rendered with good kerning.) I have been trying to pinpoint the source of the problem, but I am clueless. (I am new to LaTeX.) My system is equipped with TeX Live 2011, just installed with as few packages as I could. The code used:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Minion Pro}          \begin{document}          \mbox{}\newline     \huge FOUNDATIONS\newline     \huge \textsc{foundations}\newline     \huge \textsc{\mbox{foundations}}          \end{document}


title: Titlepage with tikz

text: I need some help with a titlepage for tikz I want to create the following... 3 red lines, a gray space a green space but I already fail with just creating a line across the whole page... `\draw (0,0) -- (\pagewidth,0)` fails :-(, it only creates a line of 2 cm or so... I hope anyone is good with tikz and can create this for me. ![reference image](http://www.imgdumper.nl/uploads5/4fd84c3605619/4fd84c3604677-page.jpg) **Update** @Tobi I now have the following:               \documentclass{report}     \usepackage{graphicx}     \usepackage{tikz}     \usetikzlibrary{       calc,       positioning     }     \begin{document}     \begin{titlepage}     \begin{tikzpicture}[overlay,remember picture]       \coordinate (SW) at (current page.south west);       \coordinate (SE) at (current page.south east);       \coordinate (NW) at (current page.north west);       \coordinate (NE) at (current page.north east);            % commented out because it is not necessary to compile,        % but one should note that the background is here,        % because of overlapping parts.       %\node at ($(current page.south west)$){       %  \begin{tikzpicture}[overlay]       %    %\includegraphics[width=\paperwidth]{./figures/cover_spaceshuttle.jpg}       %  \end{tikzpicture}};              \fill[blue,very nearly opaque] ($(SW)!0.2!(SE)$) -| ($(SE)!1.95!(NE)$) -- cycle;       \fill[red,very nearly opaque] ($(SW)!0.2!(SE)$) -| ($(SE)!1.95!(NE)$) -- cycle;       \draw[white,fill] ($(SW)$) rectangle ($(SE)!0.1!(NE)$);       \fill[blue,very nearly opaque] ($(SW)!0.2!(SE)$) -| ($(SE)!1.95!(NE)$) -- cycle;       \draw[red] ($(SW)!0.20!(SE)$) -- ($(NW)!0.61!(NE)$);       \draw[red] ($(SW)!0.10!(NW)$) -- ($(SE)!0.10!(NE)$);       \node at ($(SW)!0.1!(NW)$) [         anchor=north,         xshift=6.40cm,         yshift=0.13cm,         minimum width=\paperwidth,         align=center,         outer sep=0pt,         font=\sffamily]{something};     \end{tikzpicture}     \end{titlepage}     \end{document}      This code generates the following page ![Current situation and prefered situation](http://i.stack.imgur.com/bQDVi.png) Now the blue fill fills all the way to the top, on the left side. But I only want to let it fill at about $(SW)!0.05!(NW)$, the right side. How do I achieve this? Thanks in advance


title: is there a package to produce random quite english text?

text: im trying to develop a layoutaware OCR system. I would like to unit test parts of the system by creating controlled random text using certain layouts. Afterwards the resulting images undergo controlled deterioration to emulate the scanning process. Since the random but known text will be available I would be able to train my layout/OCR system.


title: Align Text as right or left in a tabular environment

text: How can I arrange text in tabular environment. For example, the Main and Email to start at left align and the contents in right column to left align ?               \begin{tabular}{c|l}     {Mail} & 1234 XXXX st,\\     {Email} &{gagagasgsdv@xxxx.com}     \end{tabular}


title: Using "ä", "ö" and "ü" with glossaries-Package

text: I am trying to write my 'Matura work' for school in LaTeX. Therefore I am using MacTeX and Texshop and normally it works pretty fine. But at the moment I have some trouble with a glossary entry:               \newglossaryentry{gloss:iosgerät}{name={\emph{iOS-Gerät}},description={iPhone, iPod Touch, iPad und Apple TV werden mit iOS betrieben. In dieser Arbeit wird Apple TV jedoch nicht gemeint, wenn von iOS-Geräten die Rede ist.}}      Picture of console-output: ![http://db.tt/LmapdUYH](http://i.stack.imgur.com/XJTL5.png) Some days ago I read that Xindy can help to fix issues like this but I have no Idea how to use Xindy instead of MakeIndex. I should have a engine like this:               #!/bin/sh     bfname=$(dirname "$1")/"`basename "$1" .tex`"     makeindex -s "$bfname".ist -t "$bfname".alg -o "$bfname".acr "$bfname".acn     makeindex -s "$bfname".ist -o "$bfname".gls -t "$bfname".glg "$bfname".glo      Please help me.


title: How to update tikz properly, or how to revert what I did

text: I used to be able to compile the following LaTeX:               \documentclass{article}          \usepackage{tikz}     %\usetikzlibrary{arrows,backgrounds,plotmarks} % even simpler          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.      \end{document}      However, I noticed I was using tikz 1.68, so I have tried to update tikz to version 2.1. Now, this example won't work, the error is:               ! Undefined control sequence.     l.875 \pgfsetsnakesegmenttransformation     {\pgf@snake@mirror\pgf@snake@raise}      In order to update tikz, I downloaded pgf as a pgf_2.10.tds.zip file, extracted it in /usr/share/texmf/, replaced the old files, and ran texhash. What went wrong?


title: Section title with subtitle

text: I'm using the `memoir` class, I would like to create a more fancy section title, but I don't have the necessary skills in LaTeX. I found many fancy section titles on this forum, but I don't know how to customize it to make it look the way I want it. Is it possible to modify the section title to look like this (I drew this myself in OmniGraffle): ![enter image description here](http://i.stack.imgur.com/4ZjHu.png) However, with these options:   * Date and subtitle are optional, not all sections have them   * Date is not necessarily today, but some day in the past   * No section number is shown   * both section title and subtitle can be longer than single line Any help greatly appreciated!


title: Recreate Picture in Latex

text: I am trying to recreate the image below in Latex. I have used the tikzpicture environment to plot the straight lines on an axis. However the curves are proving difficult. Does anyone have any ideas on what would be the best way to draw the curves. ![enter image description here](http://i.stack.imgur.com/348KY.jpg) Thanks


title: How to know that latexmk picks up my configuration file?

text: I've put `.latexmkrc` file into my working directory, but it doesn't seem to be doing anything. Is there a way to check that latexmk picks up my configuration file?


title: How to make a table's columns fill up the page horizontally?

text: I would like to stretch out the content of the table/`tabular`-environment over as many columns on the first and second page as possible. How can I achieve that? **MWE**               \documentclass[     11pt     ]{scrartcl}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage{     booktabs,     longtable,     multicol     }               \begin{document}     %\begin{multicols}{3}     \begin{longtable}{rr}     \toprule     Number & Letter\\     \midrule     \endhead     \bottomrule     \endfoot     1     & A \\     2     & B \\     3     & C \\     4     & A \\     5     & B \\     6     & C \\     7     & A \\     8     & B \\     9     & C \\     10    & A \\     11    & B \\     12    & C \\     13    & A \\     14    & B \\     15    & C \\     16    & A \\     17    & B \\     18    & C \\     19    & A \\     20    & B \\     21    & C \\     22    & A \\     23    & B \\     24    & C \\     25    & A \\     26    & B \\     27    & C \\     28    & A \\     29    & B \\     30    & C \\     31    & A \\     32    & B \\     33    & C \\     34    & A \\     35    & B \\     36    & C \\     37    & A \\     38    & B \\     39    & C \\     40    & A \\     41    & B \\     42    & C \\     43    & A \\     44    & B \\     45    & C \\     46    & A \\     47    & B \\     48    & C \\     49    & A \\     50    & B \\     51    & C \\     52    & A \\     53    & B \\     54    & C \\     55    & A \\     56    & B \\     57    & C \\     58    & A \\     59    & B \\     60    & C \\     61    & A \\     62    & B \\     63    & C \\     64    & A \\     65    & B \\     66    & C \\     67    & A \\     68    & B \\     69    & C \\     70    & A \\     71    & B \\     72    & C \\     73    & A \\     74    & B \\     75    & C \\     76    & A \\     77    & B \\     78    & C \\     79    & A \\     80    & B \\     81    & C \\     82    & A \\     83    & B \\     84    & C \\     85    & A \\     86    & B \\     87    & C \\     88    & A \\     89    & B \\     90    & C \\     91    & A \\     92    & B \\     93    & C \\     94    & A \\     95    & B \\     96    & C \\     97    & A \\     98    & B \\     99    & C \\     100   & A \\     101   & B \\     102   & C \\     103   & A \\     104   & B \\     105   & C \\     106   & A \\     107   & B \\     108   & C \\     109   & A \\     110   & B \\     111   & C \\     112   & A \\     113   & B \\     114   & C \\     115   & A \\     116   & B \\     117   & C \\     118   & A \\     119   & B \\     120   & C \\     121   & A \\     122   & B \\     123   & C \\     124   & A \\     125   & B \\     126   & C \\     127   & A \\     128   & B \\     129   & C \\     130   & A \\     131   & B \\     132   & C \\     133   & A \\     134   & B \\     135   & C \\     136   & A \\     \end{longtable}     %\end{multicols}     \end{document}      **The Goal** (quickly edited in Gimp, thus very low quality) ![enter image description here](http://i.stack.imgur.com/zEAZf.png)


title: Error, command already defined - IOP article with mhchem

text: I am using LyX to prepare an article. The document class is 'IOP article' and I am using the mhchem package to typeset chemical formulae in the paper. I include `\usepackage[version=3]{mhchem}` in the LaTeX preamble. I am thrown 11 errors when I try to preview the document:   * LaTeX Error: Command \leftroot already defined.   * LaTeX Error: Command \uproot already defined.   * etc.. Suggestion/solutions much appreciated.


title: How to insert a graphic/figure into LaTeX from Word?

text: I am trying to include a figure into LaTeX from a paper originally created using MS Word. I have already converted all the text/equations into LaTeX but I can't figure out how to get the figures over without re-drawing them using LaTeX code (which I do not want to do). The image is a plain box (like a `tabular`) one row by 7 columns with numbers inside each cell. Then I inserted arrows of varying length above and below the box (several short ones and one much longer). I am trying to use the `graphicx` package with the `\includegraphics` command. I copied the figure (box and arrows) from my original article into a blank Word doc. The figure only takes up the first 4 or 5 lines of the blank document. I then selected/highlighted the image and printed the selection using 'PDFCreator'. This allowed me to save the image as a `.eps` file. I then copied and pasted the eps file into the folder where all my `.tex` files are saved. When I compile the document using `pdftexify` there is a blank space where the image should be. In the console I get the following message when I compile the document:               [27] <Fig3-eps-converted-to.pdf, id =105, 391.4625pt x 74.2774pt>     <use Fig3-eps-converted-to.pdf>     Overfull \hbox 1.46153pt too wide) in paragraph at lines 511--516     []      My code looks like this:               \documentclass[12pt]{article}          \usepackage{graphicx}     \usepackage{epstopdf}     \begin{document}          %Text          \includegraphics{fig3.eps}          %text          \end{document}      I have read the sections on graphics in 'LaTeX: A Document Preparation System' and 'The Not So Short Introduction to LaTeX2e' but I still can't figure this out. Should I maybe use a PNG image since it is a pretty basic figure? Any advice on how to properly transfer images from a word doc to .eps format and/or how to get those `.eps` files into LaTeX properly would be a huge help.


title: Emacs, preview-latex, sseq

text: I like using preview-latex in Emacs. I have been working a lot with spectral sequences lately and so I would like to get the figures I draw in `sseq` to show up in preview-latex. So far no luck. Does anybody have any ideas on how to make this work? Currently the image does seem to compile but I just see a black box. No actual image appears. Example for people to play with:               \documentclass{article}         \usepackage{sseq}     \newcommand{\Zp}{Z_p}     \newcommand{\Zl}{Z_l}     \begin{document}     \[         \begin{sseq}[entrysize=3.5cm,grid=dots]{0...3}{0...3}         \ssmoveto 0 0         \ssdrop{H_0(\Zp,H_0(\Zl^k))}         \ssmoveto 0 1         \ssdrop{H_0(\Zp,H_1(\Zl^k))}         \ssmoveto 0 2         \ssdrop{H_0(\Zp,H_2(\Zl^k))}         \ssmoveto 0 3         \ssdrop{H_0(\Zp,H_3(\Zl^k))}         \ssmoveto 1 0         \ssdrop{H_1(\Zp,H_0(\Zl^k))}         \ssmoveto 1 1         \ssdrop{H_1(\Zp,H_1(\Zl^k))}         \ssmoveto 1 2         \ssdrop{H_1(\Zp,H_2(\Zl^k))}         \ssmoveto 1 3         \ssdrop{H_1(\Zp,H_3(\Zl^k))}         \ssmoveto 2 0         \ssdrop{H_2(\Zp,H_0(\Zl^k))}         \ssmoveto 2 1         \ssdrop{H_2(\Zp,H_1(\Zl^k))}         \ssmoveto 2 2         \ssdrop{H_2(\Zp,H_2(\Zl^k))}         \ssmoveto 2 3         \ssdrop{H_2(\Zp,H_3(\Zl^k))}         \ssmoveto 3 0         \ssdrop{H_3(\Zp,H_0(\Zl^k))}         \ssmoveto 3 1         \ssdrop{H_3(\Zp,H_1(\Zl^k))}         \ssmoveto 3 2         \ssdrop{H_3(\Zp,H_2(\Zl^k))}         \ssmoveto 3 3          \ssdrop{H_3(\Zp,H_3(\Zl^k))}         \end{sseq}         \]     \end{document}


title: Figure in Beamer

text: I want to make slide using `beamer`. Is it possible figure is in the top left side and quote is in the top right side of the figure? Is there any special environment for quote?               \begin{frame}[t]{Factorization Methods}     \begin{figure}[htb]     \includegraphics[width=0.15\textwidth]{gauss.jpeg}     \end{figure}          \textbf{``The problem of distinguishing prime numbers from composites, and of resolving composite numbers into their prime factors, is one of the most important and useful in all of arithmetic."}- Carl Friedrich Gauss                    \vspace*{10pt}          \begin{itemize}     \item Pollard's $p-1$ algorithm (1974)     \vspace*{10pt}     \item Dixon's Random Squares Algorithm (1981)     \vspace*{10pt}     \item Quadratic Sieve (QS): Pomerance (1981)     \vspace*{10pt}     \item Williams' $p+1$ method (1982)     \end{itemize}     \end{frame}


title: How to draw a circular, inclined road in 3D?

text: I want to draw the road which is similar to the following (but please ignore grass, soil, and the surrounding scenery for the sake of simplicity), ![enter image description here](http://i.stack.imgur.com/HDbZt.jpg) to illustrate a physics problem about circular motion. I have not tasted the power of `pst-solides3d` because of its lengthy documentation. My attempt is as follows but it looks not so good in 2D.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node}     \begin{document}     \begin{pspicture}[dimen=m](-5,0)(5,4)         \pscustom[fillstyle=solid,fillcolor=gray]{\pspolygon(-5,0)(-5,1)(-1,0)\scale{-1 1}\pspolygon(-5,0)(-5,1)(-1,0)}         \bgroup             \psset{linecolor=lightgray}             \psline(0,4)(0,3.5)             \psline(0,3.25)             \psellipticarc{->}(0,3.5)(1,.25){-90}{270}         \egroup         \pcline[linestyle=none](-5,1)(-1,0)\naput[nrot=:U,npos=.25,labelsep=-.5\pslinewidth]{\rput(.5,.5){\small car}\psframe(0,.25)(1,.75)\psline[linewidth=3pt](.25,0)(.25,.25)\psline[linewidth=3pt](.75,0)(.75,.25)}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nBiAv.png) I want to draw the complete circuit first and move the viewport such that it looks like the first image above. I believe your answer will help me to learn the rest easily.


title: Line breaks in listings

text: Is there a way like _wrap the line after at most 60 letters_ but it should **not break inside some commands** like `listings` does? Example:                   \documentclass[a5paper]{article}         \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc}         \usepackage{listings}         \usepackage{xcolor}              \lstset{%           language=[LaTeX]TeX,           backgroundcolor=\color{gray!25},           basicstyle=\ttfamily,           breaklines=true,           columns=fullflexible         }              \begin{document}         \begin{lstlisting}         The roadrunner is the fastest running bird \remark{Check this again with a zoologist!}.         \end{lstlisting}         \end{document}      Output:                   The roadrunner is the fastest running bird \         remark{Check this again with a zoologist!}.      That should not happen! In my eyes this problem is not discussed in `verbatim` environment that can break too long lines.


title: Double occurrences of names in Index with biblatex

text: I use `biblatex` with `indexing` option; moreover, inside the text I have some names to index, with the usual `\index{}` command. Since I have the same authors in the bibliography and in the text, in the Index I find two occurrences of the same name, the first one coming from text, the second one from bibliography, for example: > Homer, 27, 45, 79   >  Homer, 107 But it's wrong and confusing. How can I unify the names occurrences? A minimal example:               \documentclass{article}     \usepackage{fontspec}     \usepackage[style=philosophy-verbose,scauthors=true,classical=true,%     volumeformat=romansc,indexing]{biblatex}     \usepackage{filecontents}     \usepackage{imakeidx}     \indexsetup{othercode=\footnotesize}     \makeindex[intoc=true]     \begin{filecontents*}{\jobname.bib}     @book{strawson:1966,       author         = {Peter Strawson},       title          = {The Bounds of Sense},       publisher      = {Routledge},       location       = {London},       year           = {1966},     }     \end{filecontents*}     \addbibresource{\jobname.bib}          \begin{document}     De nobis ipsis silemus\footcite{strawson:1966}: De re autem, quae agitur,     petimus, as Strawson\index{Strawson, Peter} told     \newpage     De nobis ipsis silemus: De re autem, quae agitur,     petimus, as Strawson\index{Strawson, Peter} told     \newpage     De nobis ipsis silemus\footcite{strawson:1966}: De re autem, quae agitur,     petimus, as Strawson told     \newpage     De nobis ipsis silemus     De nobis ipsis silemus: De re autem, quae agitur,     petimus, as Strawson\index{Strawson, Peter} told     \newpage     De nobis ipsis silemus\footcite{strawson:1966}: De re autem, quae agitur,     petimus, as Strawson told          \printbibliography     \printindex     \end{document}      where you'll note the double occurrence of Strawson. In `example.idx` I read               \indexentry{Strawson, Peter}{1}     \indexentry{Strawson, Peter@Strawson, Peter}{1}     \indexentry{Strawson, Peter}{2}     \indexentry{Strawson, Peter@Strawson, Peter}{3}     \indexentry{Strawson, Peter}{4}     \indexentry{Strawson, Peter@Strawson, Peter}{5}     \indexentry{Strawson, Peter@Strawson, Peter}{5}


title: Graphics: Area between curves

text: I'm currently trying to figure out how to create certain graphics containing two curves and shaded the area between them: ![enter image description here](http://i.stack.imgur.com/qWYqZ.png) ![enter image description here](http://i.stack.imgur.com/SXPgb.png) with `tikz` and `pgftools`. In the first drawing the curves are: f(x)=1/2*x^2-2*x+5 and g(x)=-1/10*x^2+2 and a=1, b=4. In the second one the curves could be f(x)=-1/6*x^2+2, g(x)=1/4*x^2 with x_1=-2.19 and x_2=2.19. I've read through several threads here but I can't seem to figure out what the code could be so I hope you can help me to deliver my course some nice graphics :)


title: How should I prevent images from floating between list and paragraph before

text: I have a list which has some text that describes the list and an image that gets in between of those: ![enter image description here](http://i.stack.imgur.com/sVR7J.png) The LaTeX code looks similar to this:               \begin{figure}...\end{figure}          \textbf{\textit{Technische Kriterien}}     \begin{itemize}         \item Bla bla bla...         \item Bla bla bla...         \item Bla bla bla...         \item Bla bla bla...         \item Bla bla bla...         \item Bla bla bla...     \end{itemize}      How can I prevent the image to get in between of the paragraph before the list? I tried `\FloatBarrier` as suggested in this answer, but it didn't work. Using `\goodbreak` before "Technische Kriterien" without `FloatBarrier` worked. With `\FloatBarrier`, it didn't work. Is this a good way to solve this problem? How should I solve this problem?


title: cleveref and subcaption: how to handle subfigure reference?

text: Given               \usepackage{caption}     \usepackage{subcaption}     \usepackage{cleveref}     \crefname{subfigure}{figure}{figures}     \Crefname{subfigure}{Figure}{Figures}          \begin{figure}[h]     \centering     \begin{subfigure}{.5\textwidth}     \label{abc}     \caption{..}     \centering     \begin{tikzpicture}[scale=1]     \node at (0,1) {$d_1=1$};     \end{tikzpicture}     \end{subfigure}%     \begin{subfigure}{.5\textwidth}     \subcaption{...}     \label{...}     \centering     \begin{tikzpicture}[scale=1]     \node at (0,1) {$d_1=1$};     \end{tikzpicture}     \end{subfigure}     \caption{...}     \end{figure}      why does the command `\cref{abc}` not produce something like figure 2.a, but instead gives the name of the section ?


title: Conflict between titlesec and colortbl

text: I'm getting a conflict between `titlesec` and `colortbl` that I can't seem to fix. The minimal working example is below. As soon as I put a `\section` in, pdflatex errors with `! Missing number, treated as zero. <to be read again> } l.9 \section{First Section}` In order to make it work I have to either:   * Not use `sections` (obviously not feasible)   * Not use my section style (but the journal requires it!)   * Not use coloured tables (but I want to!) Can you help me make this document with my section heading style included and coloured cells in the table? Thanks, Sven. _Edited below to include the full set of`titlesec` and `titleformat` command I use_               \documentclass{article}          \usepackage{colortbl}     \usepackage{textcase}     \usepackage[explicit]{titlesec}     \titleformat{\section}       {\normalfont\bfseries\filcenter}{\thesection}{1em}{\MakeTextUppercase{#1}}     \titlespacing*{\subsection}{0pt}{1em}{0em}     \titlespacing*{\subsubsection}{0pt}{1em}{0em}     \titleformat*{\subsection}{\bfseries}     \titleformat*{\subsubsection}{\bfseries}               \begin{document}          \section{First Section}     \subsection{a sub Sec}     If I define a section (by uncommenting above)... it fails.     \subsubsection{Again}          If I then do one of:     \begin{itemize}     \item{Remove the table (and colortbl package}     \item{Remove my section formatting above}     \end{itemize}     ... my doc will compile, but I won't have the style I want.          \begin{table}[!ht]     \begin{tabular}{ |c|l|l } \hline     \rowcolor{red} A    & B     & C     \\ \hline     Hello World         & other     & \cellcolor{blue}stuff\\ \hline     \end{tabular}     \caption{How can I get colored table cells and keep my section heading format?}     \end{table}          \end{document}      For reference in case of package conflicts, here is the list of other packages I'm using in my complete document (but don't seem to affect this particular bug):               \usepackage[left=18mm,top=20mm,right=18mm,bottom=25mm,includehead,nofoot,headheight=0pt,headsep=5mm]{geometry}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{dcolumn}     \usepackage{hyperref}     \usepackage{tabularx}     \usepackage{subfig}     \usepackage{url}     \usepackage[capitalise,noabbrev]{cleveref}     \usepackage{epstopdf}     \usepackage[absolute]{textpos}


title: How can I dump Lua code to a format file?

text: From this format:               %% testformat.ini     \input plain     \directlua {tex.enableprimitives('', tex.extraprimitives())}     \directlua {     testFunction = function ()        tex.print("This was print by Lua's testFunction.\par")     end     }     %% \directlua {testFunction()}     %% \bye     \dump      I create a testformat.fmt with `$ luatex -ini testformat.ini`, but when trying to use it with the following test file:               %% test-testformat.tex     \directlua{testFunction()}     \bye      the globaly defined function testFunction is lost:               $ luatex -fmt testFormat.fmt test-testformat.tex      This is LuaTeX, Version beta-0.70.1-2011120612      (./test-testformat.tex     ! LuaTeX error <\directlua >:1: attempt to call global 'testFunction' (a nil va     lue)     stack traceback:         <\directlua >:1: in main chunk.     l.2 \directlua{testFunction()}          ?       Should I do another trick in Lua or it simply can't be dumped and I must use something like `\everyjob{\directlua{dofile("testformat.lua")}}`?


title: Example box with automatic numbering?

text: Working with LaTeX, I was just wondering how do you create a box around a set of related text such as an example in a textbook? I found `\framebox` or `\makebox`, but I can't figure out how to make it auto number such as Example 1.1 (for first example in chapter 1), or even manually add to it.


title: Problem with hline on alternating row colour table

text: I've created a table where the rows alternate in colour however /hline is acting unusually. The first and second /hline work normally however after this alternating /hlines only show as a small dash next to the vertical column line               \usepackage[table]{xcolor}          \begin{table}[ht]        \rowcolors{2}{gray!25}{white}       \begin{tabular}{l | l|}         \hline         \rowcolor{gray!25}         text part 1 & test part 2  \\                        Priority & High \\ \hline         text part 1 & test part 2  \\                        Priority & High \\ \hline %this hline doesnt show         text part 1 & test part 2  \\                        Priority & High \\ \hline         text part 1 & test part 2  \\                        Priority & High \\ \hline %this hline doesnt show         text part 1 & test part 2  \\                        Priority & High \\ \hline         text part 1 & test part 2  \\                        Priority & High \\ \hline       \end{tabular}       \end{table}      Does anybody know what I'm doing wrong? Thanks.


title: How can I tell AUCTeX to turn off math mode for the argument of shortintertext?

text: I would like to have AUCTeX turn off math mode for the argument of the `shortintertext` command from the `mathtools` package. I customized the variable `texmathp-tex-command` to add the following line to my `init.el` file:               '(texmathp-tex-commands (quote (("shortintertext" arg-off))))      However when I enter a dollar in the argument of `shortintertext` I get the following message in the minibuffer:               Math mode started with `align` cannot be closed with dollar      which indicates that the argument is still in math mode. I am using Emacs 24.3 with package install of auctex.


title: How to make an automatic title head in my own class but with some user definable texts?

text: Using my created document class will output an automated title header. My own created document class is entitled `myclass`. Is there a possible way for this not to become automated? I'd like to create a command for this but I don't really know how to. I simply want a command for each of this: "school name", next line is "dept name" and after which is command for the "college name". And this should appear at the upper center of the paper. This is my code:               \AtBeginDocument     {     \begin{center}     \headrule     \par     \sffamily     \par     \par     {\Large\textbf{SchoolName}}\\          {\large\textbf{College name}}\\      {\large Dept name}\\      \end{center}      \noindent Name: \makebox[3in]{\hrulefill} \hfill Section: \makebox[2in]              {\hrulefill}\\     \noindent Year\&Course: \makebox[2in]{\hrulefill} \hfill Date: \makebox[2in]         {\hrulefill}\\     \begin{center}     Goodluck!     \end{center}      How could I create the command for those three? The code above, automatically prints the text in static. What if the user wants to modify the content of the text? Here is the sample PDF output of this `.cls` file code ![sample image output](http://i.stack.imgur.com/C7Vg4.png)


title: Arrows in TikZ tree

text: I've been trying to create a tree consisting out of parents and nodes connected with arrows. I have created almost what I had in mind, except from that the arrows point the wrong direction. could anyone be of help here?               \begin{tikzpicture}[      label distance=3mm,     every label/.style={blue},     event/.style={rectangle,thick,draw,text width=3cm,text centered,anchor=north},     edge from parent/.style={very thick,draw=black!70,-latex},     edge from parent path={(\tikzparentnode.south) -- ++(0,-0.50cm)-| (\tikzchildnode.north)},     level 1/.style={sibling distance=4cm,level distance=1cm,growth parent anchor=south,nodes=event},     level 2/.style={sibling distance=4cm},     ]     \node [event] {result}         child {node {cause1}}         child {node {cause2}}         child {node {cause3}             child{ node {subcause31}}             child{ node {subcause32}}             child{ node {subcause33}}             };\end{tikzpicture}]


title: Change size of axis ticks

text: I'm having trouble with my x-axis: I have a bunch of year I want to plot in a bar plot but I can't fit all the years in the x-axis (xticks). How can I reduce their size?


title: htlatex on file including files from subdirectories, and output directory

text: Parts of my issue has already been answered in different questions on this site and elsewhere, however none of them solves my problem as a whole. A question about just specifying the output directory can be found here: Specify output directory for htlatex I've constructed a big number of different `.tex`-files which are all combined in different ways through a few main, standalone `.tex`-files. This makes changing a specific thing about the big "end-file" much simpler, as each chapter has its own directory with all of its components. As of right now, I have one directory with `.tex`-files containing the bodytext of the project. In the second directory, I have standalone files which `\include` the bodytext-files and all of the preamble which decides how the text should look in the end. In the third directory I have all the images, some of which are used several times throughout the chapters. The fourth directory is called "output", and is simply where I want to have all of the results after running a shellscript of some sort. Now, the problem that I've stumbled upon was not something I gave much thought to to begin with. The parts of the text that are supposed to be printed or read directly on the computer screen, are converted to `.pdf`, with the `pdflatex myfile.tex` command. I also add `pdflatex -output-directory=output/. myfile.tex` in order for the files to end up where I want them. I earlier struggled with getting all of the included paths to find their specified files, but this issue was solved by pathing everything from the root folder instead of from each document. This is also why the commands which are supposed to convert the `.tex`s are run in the root folder. So the `.pdf`-converting works just fine, however I would like to have a similarly easy process with `.html` as well. I've tried using `htlatex myfile.tex “” “” -doutput/` which works fine since it copies the `.html` and `.css` to the output directory. But the command doesn't work well on the files which include other files within them. This is my try at an MWE which reproduces the same errors on a smaller scale: I have three test directories: source, texs and output. source contains myfile.tex myfile.tex:               \documentclass{article}     \begin{document}     This is myfile.tex     \end{document}      texs contains include.tex:               \documentclass{article}     \usepackage{standalone}     \begin{document}     \input{source/myfile.tex}     \end{document}      output is where I want the results of the conversion-command to end up. Now, if the root folder is my working directory and I run the command `$ pdflatex -output-directory=output texs/include.tex` everything works just fine. I get the `.pdf`, `.log` and `.aux` in the output folder. However, when I try the command: `$ htlatex texs/include.tex "" "" -doutput/` which should work (and it does with files that does not `\include` other files), I get the error:               This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2014/05/01>     Babel <3.9k> and hyphenation patterns for 78 languages loaded.     (./texs/include.tex     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/usepackage.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/latex/standalone/standalone.sty     (/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifluatex.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2014/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2014/texmf-dist/tex/generic/xkeyval/xkeyval.tex     (/usr/local/texlive/2014/texmf-dist/tex/generic/xkeyval/keyval.tex)))     ! Extra \else.     l.227     \else          ?      When continuing i instead get `! Extra \fi.` and so on... **How can I make this work at least somewhat as painless as the`.pdf`-command?** Also, when running the command, all the temporary files (`.4ct`, `.4tc`, `.aux` etc.) are still in the working directory where the conversion command was run. This, I would like to have a solution to. **How do I get rid of all the temporary files in the working directory when converting a`.tex -file to`.html`using`htlatex`?** I have also happened upon another problem... It seems that `htlatex` does not like the commands used in the included document, as I get the error:               [3     ! Undefined control sequence.     <write> ...{1}{x1-10001}{QQ2-1-1}{\subsection:ttl                                                        {Connecting to UPPMAX}}}{\...     l.37           ?


title: epslatex graph problem

text: I am using the `epslatex` image generated by `gnuplot` in my LaTeX document for example if I have a picture `example.tex`, I use it in LaTeX as               \begin{figure}[t]     \input{example}     \end{figure}      The above command is working well in the normal document class. But I am writing a paper for AIAA and they have a class name `aiaa.cls` in which the picture when Imported by above command appears really weird. The axis labels and image run here and there. Could someone suggest me whats wrong?


title: TikZ - curly braces end at the same node, but there is a gap

text: I created a timeline with TikZ. The problem is, that there is a little gap between the ends of the braces that end at the same node. ![gap between curly braces](http://i.stack.imgur.com/KCG2q.png) And here is my code:               \begin{tikzpicture}[y=1cm, x=1cm, thick, font=\footnotesize]              % axis       \draw[line width=1.2pt, ->, >=latex'](0,0) -- coordinate (x axis) (10,0);                 % time points     \draw (3,-4pt) node(t_k){} --          (3,4pt) node[anchor=south] {$t_{k}$};     \draw (5,-4pt) node(t_k_opt) {} --          (5,4pt) node[anchor=south] {};           \draw (7,-4pt) node(t_k_opt_impl) {} --          (7,4pt) node[anchor=south] {$t_{k}+\triangle^{\text{opt}}+\triangle^{\text{impl}}$};               % curly braces     \draw[decorate,decoration={brace,amplitude=3pt,mirror}]          (3,-2.5) node(t_k_unten){} --          (5,-2.5) node(t_k_opt_unten){};      \node at (4,-3){$\triangle^{\text{opt}}$};     \draw[decorate,decoration={brace,amplitude=3pt,mirror}]          (t_k_opt_unten) --          (7,-2.5) node(t_k_opt_impl_unten){};      \node at (6,-3){$\triangle^{\text{impl}}$};          % vertical dotted lines     \draw[dotted] (t_k)--(t_k_unten);     \draw[dotted] (t_k_opt)--(t_k_opt_unten);     \draw[dotted] (t_k_opt_impl)--(t_k_opt_impl_unten);          \end{tikzpicture}      I'd be glad, if someone could help!


title: Creating form boxes with labels

text: I want to recreate a form with LaTeX, that can be filled by hand or --- of course --- via LaTeX. How can I create the boxes, with a footnotesized label at the top and enough space for the text to be filled? ![form box](http://i.stack.imgur.com/V6wEM.png)


title: Multibib: how to reset references counter?

text: Im using a complex template to write my document. It is old and I'm having a problem. I have two separate reference list, "Internet References" and "Literature". The problem is that the references counter "[3]" on "internet References" always starts with number 3 and it should start from 1 "1". The template uses `multibib` package. My biblio files are: `weblinks.bib` and `literature.bib` (main file is `literature.bib`). I digged in all files of my project and can not find any counter that I can reset, so I assume that is some kind of "internal" counter. Anyone knows how to reset that special counter? In main file `Diploma_Thesis.tex`:               % For the two different reference lists ...     \usepackage{multibib}     \newcites{weblink}{Internet References}     .     .     \addcontentsline{toc}{chapter}{Literature}     \label{lit}     \bibliography{literature}     \bibliographystyle{alphadin}     % the style of bibliography     % start a new page          \newpage     \addcontentsline{toc}{chapter}{Internet References}     \label{wlit}     \bibliographyweblink{weblinks}     \bibliographystyleweblink{abbrv}     \newpage      The result in Literature section on PDF: ![enter image description here](http://i.stack.imgur.com/49Rw1.jpg)


title: Odd behaviour when dashes are add in a table?

text: Using the following MWE :               \documentclass[12pt,a4paper]{report}     \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}     \usepackage{booktabs}     \usepackage{siunitx}     \usepackage{multirow}          \begin{document}               \begin{table}[H]         \caption{Power levels of Background loads}         \parskip-5pt             \centering         \begin{tabular}{llS[table-format=4.0]}         \toprule         \multicolumn{2}{c}{\textbf{Loads}} & \textbf{Power Consumption} (\si{kWh})\\         \midrule         \textbf{Background} & Fans (Slide) & 350\--- 600\--- 750 \\          & Dehumidifier (Therm)  & 500\--- 620\--- 785  \\          & Refrigerator (Therm) & 480\--- 580\--- 725 \\          & Heater (Therm) & 750\--- 1000\--- 1500 \\          \bottomrule         \end{tabular}          \label{powertable2}     \end{table}          \end{document}      I get the following table : ![enter image description here](http://i.stack.imgur.com/fJVn5.png) But when I remove the dashes I get : ![enter image description here](http://i.stack.imgur.com/ahlw4.png) As you can see in the second pic, the numbers are centered. I want the numbers to remain centered even when I use the dashes `\\---`. Why do they indent to the right when dashes are added ?


title: How to get horizonzal alignment right for nested rectangles?

text: I know that nesting tikz pictures is considered bad, but I did it anyway as I don't want to mess around with manual positioning. I'm nesting several rectangles similar to another question for circles. The problem is that the rectangles aren't centered correctly, which can be seen at the left and right stacking vertical lines. ![nesting](http://i41.tinypic.com/4ralgp.png) Is this a problem caused by nesting or am I doing something different wrong?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}     \begin{tikzpicture}[         class/.style={           draw,           align=center,           rectangle,           rounded corners=20pt,           minimum size=0pt,           inner sep=5pt,           outer sep=0pt,         },         label/.style={           rectangle,           align=center,           inner sep=6pt,           outer sep=4pt, % shifts labels a bit down           node distance=0pt,         },       ]            \node [class] (csl) {         \begin{tikzpicture}           \node [class] (ptime) {             \begin{tikzpicture}               \node [class] (mcfl) {                 \begin{tikzpicture}                   \node [class] (rpl) {                     \begin{tikzpicture}                       \node [class] (tal) {                         \begin{tikzpicture}                           \node [class,rounded corners=5pt] (cfl) {CFG};                           \node [label, below=of cfl] {TAG, LIG, CCG, HG };                         \end{tikzpicture}                       };                       \node [label, below=of tal] {RPG, (2,2)-MCFG};                     \end{tikzpicture}                   };                   \node [label, below=of rpl] {MCFG, LCFRS};                 \end{tikzpicture}               };               \node [label, below=of mcfl] {RCG, simple LMG \\ (= PTIME)};             \end{tikzpicture}           };           \node [label, below=of ptime] {CSG};         \end{tikzpicture}       };          \end{tikzpicture}     \end{document}


title: A walking matchstick man

text: I'd like to create a presentation with a walking guy. I have to graphics, with a guy in two different positions. How do I make them appear in appropriate moments while moving right at the same time? Thanks for your help:)               \documentclass[a4paper]{article}          \usepackage[cp1250]{inputenc}     \usepackage{polski}     \usepackage{amsmath,amssymb,amsthm}     \usepackage{calc,ifthen}     \usepackage{pgf}     \usepackage{tikz}     \usepackage{animate}     \newcommand{\bt}{\begin{tikzpicture}}     \newcommand{\et}{\end{tikzpicture}}          \begin{document}     \bt     \draw (0,-0.25)circle(0.75cm);     \draw (0,-1)--(0,-3.5);      \draw(0,-1.5)--(-1,-2.5)--(-0.5,-3)--(-0.25,-3);      \draw(0,-1.5)--(1,-2.5)--(1.5,-2)--(1.25,-2);      \draw(0,-3.5)--(0,-4.5)--(-0.5,-5.5)--(0,-5.5);      \draw(0,-3.5)--(1,-4)--(0.5,-5)--(1,-5);      \et     }     \end{animateinline}          \bt     \draw (0,-0.25)circle(0.75cm);     \draw (0,-1)--(0,-3.5);     \draw(0,-1.5)--(-1,-2)--(-0.75,-2.5)--(-0.5,-2.5);     \draw(0,-1.5)--(0.5,-2.75)--(1.25,-2.5)--(1,-2.35);     \draw(0,-3.5)--(0.5,-4.5)--(-0.5,-5)--(-0.25,-5.25);     \draw(0,-3.5)--(0.5,-5.5)--(1,-5.5);     \et     \end{document}


title: problem using option fleqn in amsmath package

text: I'm using the following code. What should I do if I don't want the fixed indent from the left margin of my page?                \documentclass[fleqn,oneside]{article}     \usepackage{amsmath}     ....     \begin{align}     a_1& =b_1+c_1\\     a_2& =b_2+c_2-d_2+e_2     \end{align}


title: Linux Libertine, libertineotf package and bold

text: Being interested by using the Linux Libertine font, I made some test with XeLaTeX and pdfLaTeX. My idea was to find a font that is suitable for use in xelatex, pdflatex and outside of any TeX flavour. I was surprised to see that bold typefaces were heavier in pdflatex (with the package libertine) than in xelatex (using the `\setmainfont` command). Then I tried the following code with xelatex :               \documentclass{report}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     %\usepackage{libertineotf}     \begin{document}     \chapter{Test}     This is a text (or so it seems).     \textbf{This is a bold text}     \end{document}      By commenting either the `\setmainfont` or the `\usepackage{libertineotf}` line, I noticed that the bold (chapter title for instance) where heavier when using the package. The same difference shows when using the libertine package (libertine, not libertineotf) with pdflatex. Does anyone know if there a reason for that? Is there a way to have both giving the same result? Thanks


title: switching between math-styles with \mathversion?

text: This is a follow-up to this question. It explains switching math fonts within a single document with `unicode-maths` `\mathversion` command. The `unicode-math` docs have it that               \setmathfont{math-style=Tex}{Cambria Math}      is equivalent to               \unimathsetup{math-style=Tex}     \setmathfont{Cambria Math}      Now if I want to use a math font that is by design upright e.g. the Neo Euler font. I have to use               \setmathfont{math-style=upright}{euler.otf}      If I want to switch between the Euler font and another one that is italic by design, say XITS. Using               \setmathfont[version=XM]{xits-math.otf}     \setmathfont[version=NE,math-style=upright]{euler.otf}      to be able to use `\mathversion{NE}` and `\mathversion{XM}` as in this example               \documentclass{minimal}     \usepackage{unicode-math}     \setmathfont[version=XM]{xits-math.otf}     \setmathfont[version=NE,math-style=upright]{euler.otf}     \begin{document}     \[a+b\]     \mathversion{NE}     \[a+b\]     \mathversion{XM}     \[a+b\]     \end{document}      does not work. `math-style` as a package option is not switched as well, so everything is typeset upright. I haven’t found a way around this, as package options are set when the package is loaded.


title: Continue line numbers in listings package?

text: I have been using the `listings` package to present my source code in LaTeX. However, I can't get the line numbers to continue between two separate user- defined listings that have been given the same name. For example, the following code just seems to start the line number at 1 for each listing block rather than sequentially numbering them:               \usepackage{listings}          \lstnewenvironment{bash}[1][]{     #1,     language = bash,     numbers = left,     firstnumber = auto}          \begin{document}          \begin{bash}[name=Test]     echo xyz     \end{bash}     \begin{bash}[name=Test]     echo xyz     \end{bash}          \end{document}      I'm aware I can set the number manually each time with `\firstnumber = last`, but this kind of defeats the object of naming your listing. I presume I'm missing something here. Any help would be greatly appreciated.


title: Array inside Algorithm with underbrace and sidebrace

text: I'm writing my master's thesis (using LyX's thesis template) and am trying to display an algorithm. Since LyX's algorithm support doesn't quite cut it for me, I've decided to go ERT with LaTeX code (sigh!). One of the steps in the algorithm that I want to display creates a two- dimensional array; and rather than describe it or show real code, I figured I'd draw a 2D array. This is easily done.   The complicated part occurs when I try to put an `underbrace` to show the dimensionality of the array. I tried to follow this post, but I get the following error:               ! Extra alignment tab has been changed to \cr.     <template> \endtemplate           l.80     }          ? h     You have given more \span or & marks than there were     in the preamble to the \halign or \valign now in progress.     So I'll assume that you meant to type \cr instead.      Now, since I'm using LyX, I can't really force it to ignore and continue (this particular error comes from `pdflatex`ing my MWE on the command line, posted below). What I really want to do is add an `underbrace` to span all columns with the inline math `$|p_1|$`; I also need a brace that spans all rows with the inline math `$|p_1|$` (This is a square array, with `$|p_1|$` many rows and columns). I'd appreciate any help in solving this issue. **Minimal Working Example** :               \documentclass{IEEEtran} %using this documentClass just for the MWE          % increases link area for cross-references and autoname them     \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}          % that links to image floats jumps to the beginning     % of the float and not to its caption     \usepackage{hyperref}     \usepackage[figure]{hypcap}          % the pages of the TOC is numbered roman     % and a pdf-bookmark for the TOC is added     \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%       \frontmatter       \pdfbookmark[1]{\contentsname}{}       \myTOC       \mainmatter }          % enables calculations     \usepackage{calc}          % increases the bottom float placement fraction     \renewcommand{\bottomfraction}{0.5}          % avoids that floats are placed above its sections     \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}          % for footnotes in tables     \usepackage{footnote}          % for linewrapping in urls     \usepackage{url}          % for including sourcecode     \usepackage{listings}               % for centering captions     \usepackage{caption}          \usepackage{algorithm, algpseudocode}     \usepackage{amsmath, amssymb}               \begin{document}          \begin{algorithm}     \caption{Computing Similarity Matrix}     \label{alg:simMatrix}     \begin{algorithmic}[1]          \For {i $\leftarrow$ 1 ... max($|p_2| - |p_1|$, 0)}         \State $p_1 \leftarrow p_1 \bigcup$ NULL     \EndFor          \For {i $\leftarrow$ 1 ... max($|p_2| - |p_1|$, 0)}         \State $p_2 \leftarrow p_2 \bigcup$ NULL     \EndFor          \State answer $\leftarrow         \begin{array}{|c|c|c|}             \hline             0.0 & \ldots & 0.0 \\ \hline             \vdots & \ddots & \vdots \\ \hline             0.0 & \ldots & 0.0 \\ \hline         % don't forget to add underbrace and sidebrace to indicate height and width of the table.         \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{2}{@{}l@{}}{%           \raisebox{.5\normalbaselineskip}{%           \rlap{$\underbrace{\hphantom{\mbox{0.0\hspace*{\dimexpr4\arraycolsep+\arrayrulewidth}0.0}}}_{\ell}$}}%         }         \end{array}     $          \For {r $\leftarrow$ 1 ... $|p_1|-1$}         \For {c $\leftarrow$ 1 ... $|p_1|-1$}             \If {$p_1$[$r-1$] == $p_2$[$c-1$]}                 \State answer[r][c] $\leftarrow$ answer[r-1][c-1] $+1$             \Else                 \State answer[r][c] $\leftarrow$ $0.0$             \EndIf         \EndFor     \EndFor               \State \Return answer          \end{algorithmic}     \end{algorithm}               \end{document}      **Technical Details** :   * Mac OS X 10.7.5 (Lion)   * LyX Version 2.0.6   * MikTex Version 2.0 (Build 150)


title: Underbraces with text inside a list

text: I am using uderbraces to annotate text. When I want to have an itemized list though, the bits of text involving underbraces are awkwardly indented w/r/t the bullet point. Is there a way to have it be normally aligned (non- indented). Example:               \documentclass[pdf]{beamer}     \usepackage{xcolor}     \usepackage{amsmath}          \makeatletter     \newcommand{\redub}{}     \def\redub#1{%      \@ifnextchar_%       {\@redub{#1}}       {\@latex@warning{Missing argument for \string\redub}\@redub{#1}_{}}%     }     \def\@redub#1_#2{%       \colorlet{currentcolor}{.}%       \color{red}%       \underbrace{\color{currentcolor}#1}_{\color{red}#2}%       \color{currentcolor}%     }     \makeatother     \begin{document}     \begin{frame}     \begin{itemize}       \item SAMPLE       \item          \[           \redub{\text{sample}}_{\mathclap{\text{sample}}}}{\text{sample}}         \]     \end{itemize}     \end{frame}     \end{document}      So, the text under the first bullet point is not indented with respect to the bullet point. The text under the second bullet point is indented. I'm trying to get them to be aligned.


title: Oval in picture environment has discontinuous corners

text: I am trying to create a rounded rectangle so I used the `\oval` command inside the picture environment but the corners do not connect and are of a different thickness. How can I fix this? MWE:               \documentclass{book}     \begin{document}     \setlength{\unitlength}{0.1mm}     \begin{picture}(1600,1000)       \put(850,475){\oval(1300,750)}     \end{picture}     \end{document}      ![Screenshot of oval](http://i.stack.imgur.com/gDf4v.png)


title: autoref in French documents incompatible with TeX4ht

text: I'm currently using MiKTeX 2.9 on Windows 7 and can't get to compile a French document correctly. Here is a very minimal example:               \documentclass[francais]{article}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{hyperref}          \begin{document}     Voir \autoref{test}.     \begin{figure}       \caption{Test}       \label{test}     \end{figure}     \end{document}      pdflatex compiles this without any errors or warnings. htlatex will only produce the correct results if I specify another language, like ngerman. For francais, however, I get the following warning:               l.7 --- TeX4ht warning --- \Link{x1-21}? ---     ! Missing \endcsname inserted.     <to be read again>                        \special     l.7 Voir \autoref{test}                            .      and this output in HTML if I ignore the warning:               Voir  :autoreffigure1.      It seems that the activation of the colon character by babel conflicts with the internal command names used by TeX4ht. So I tried to use `\shorthandoff{:}` immediately after loading babel, as is suggested here, to no effect.   I also installed the newest version of `frenchb.ldf` from http://daniel.flipo.free.fr/frenchb/ (mentioned in babel documentation) and used the documentation there to alleviate some other problems. But the command `\noextrasfrench`, again issued right after loading babel, did not help either.   Then I resorted to directly editing `frenchb.ldf` -- I commented out any occurence of `\initiate@active@char` and `\declare@shorthand` containing colons. This produces the correct results, but throws warnings like this one:               ! Missing control sequence inserted.     <inserted text>                     \inaccessible     l.6 \begin{document}      Besides, it's hardly a permanent solution. Any help would be appreciated. Thanks in advance. PS. Just specifying a language without babel apparently translates expressions like "figure" in the above example -- does anyone now how that works and to what extent it is capable of internationalization/localization?


title: How to build two lines aligned maps

text: I would like to write a map between two objects, with a map below which specify where any single object is sent. To be more precise. I want to write `$A \rightarrow B$`, and right below it `$\alpha \mapsto \beta$`. I tried with the command `$\underset$` but the maps below gets too smaller, and it's not aligned to the map above. What is the right command? I apologize if this question has been already asked. To me it looks elementary, nevertheless I couldn't find it nor here nor googling around. Thank you very much for your time!


title: Use expl3 variable decimal representation outside of expl3 block

text: Suppose, I have a floating point value inside expl3 block. Can I use it's decimal representation outside of expl3 block? This doesn't work:               \documentclass{article}     \usepackage{expl3}     \begin{document}     \ExplSyntaxOn          \fp_new:N  \val     \fp_set:Nn \val{6.5}          \fp_set:Nn \val \fp_to_decimal:N \val     \ExplSyntaxOff     \val     \end{document}


title: Draw crosses in tikz

text: If I do `\draw (1,1) circle (1pt)` tikz draw a little circle with diameter `1pt` at `(1,1)`. How can I define a path `cross` such that `\draw (1,1) cross (1pt)` draws a little cross with diameter `1pt` (adjustable in size just like the circle)?


title: hyperlinking in bibliography

text: I am using a Ubuntu 12.04 machine in which I have loaded LaTeX (packages from CTAN, not the default ones). I want to bring hyperlinks in the bibliography files. Though my bib file contains all the informations (including the doi and hyperlinks) after compiling they do not appear in the pdf. I believe it is due to some some of my commands in the header files, because when I write a Physical Rev articles using REVTeX, they do appear in the place. For reference, I am giving the necessary parts               \documentclass[12pt]{amsart}     \usepackage{amsmath,amscd,amsfonts,amssymb, color, cite, bbm}     \usepackage{latexsym, graphicx, pstricks,rotating,subfig}     \usepackage[pdftex,bookmarks,colorlinks]{hyperref}     \usepackage[all]{hypcap}     \usepackage[square,sort,comma,numbers]{natbib}     \definecolor{darkblue}{rgb}{0.0,0.0,0.3}     \hypersetup{colorlinks=true,citecolor=darkblue,     unicode=true,pdfauthor=rsg,bookmarks=false}     \newtheorem{prop}{Proposition}     \newtheorem{definition}{Definition}     \newtheorem{rem}{Remark}     \newtheorem{eg}{Example}     \newtheorem{theorem}{Theorem}     \newtheorem{lemma}{Lemma}     \newtheorem{corollary}{Corollary}     \setlength{\oddsidemargin}{0pt}     \setlength{\evensidemargin}{0pt}     \setlength{\textwidth}{6.7in}     \setlength{\topmargin}{-0.5in}     \setlength{\textheight}{9in}     \newtheorem{note}{Note}      and as usual it ends with               \bibliographystyle{h-physrev}     \bibliography{biblio}      I could not find out what mistake I am making. For reference, I have picked up the style file h-physrev. I am not sure where this is a duplicate question. Solutions given in the related questions does not seem to work.


title: Texmaker 4.3 Open First Page as a Righthand Page

text: I am using TexMaker 4.3 on OSX 10.9.4. When I click on View PDF in TexMaker, the document opens. However, although it is a double sided document, the first page appears in the preview window as a left hand page. Is there a way to open the document with the first page being on the righthand side? ( Apologies if the layout in this question is a mess: my browser seems to have gremlins right now :-) )               \documentclass[12pt,english,british,twoside,openany]{scrbook}     \usepackage{blindtext}     \usepackage[automark,headsepline,footsepline=.25pt]{scrlayer-scrpage}     \usepackage{microtype}     \usepackage{ragged2e}     \usepackage{graphicx}     \usepackage[british]{babel}     \pagestyle{scrheadings}     \addtokomafont{pageheadfoot}{\slshape}     \addtokomafont{pagehead}{\tiny}     \addtokomafont{pagefoot}{\small}     \addtokomafont{disposition}{\rmfamily}% rm for chapter headings     \ohead{\leftmark}     \ihead{Ben Francis}     \ofoot{\mytitle}     \cfoot{\pagemark}     \renewcommand\thepart{\Alph{part}}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}%JB: Just as an example     \renewcommand*{\partpagestyle}{empty}     \usepackage{geometry}         \geometry{paperwidth=5.06in,paperheight=7.81in,         verbose,         tmargin=0.5in,         bmargin=1in,         inner=0.75in,         outer=0.5in,         headheight=0.1in,         headsep=0.15in,         footskip=0.45in,         twoside}     \newcommand{\mytitle}{Tears in the Rain}           \begin{document}      \title{\mytitle}         \author{}         \date{}     \frontmatter     \maketitle         \begin{titlepage}                 \begin{flushright}         {\huge \mytitle}         \par\end{flushright}{\huge \par}         \end{titlepage}              \begin{titlepage}                 \noindent\includegraphics[width=4in,height=2in]{../images/bensig} % image file not included                 \vspace*{0.5in}                 \begin{flushright}         \Huge{Tears in the Rain}         \par\end{flushright}{\Huge \par}              \clearpage         \thispagestyle{empty}              \begin{center}                 \emph{Copyright}         \end{center}         \begin{center}                 \textcopyright{ 2014 Ben Francis All rights reserved.}         \end{center}         \vspace*{0.5in}         \begin{center}         \begin{minipage}[t]{0.5\paperwidth}             No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form, or by any means; mechanical, electrical, photocopying, scanning, recording or otherwise, without prior written consent from the publishers. Every effort has been made to contact all copyright holders. The author and publisher will gladly rectify any omissions.         \end{minipage}         \end{center}         \vspace*{0.5in}         \begin{center}                 ISBN:         \end{center}         \vspace*{0.2in}         \begin{center}                 A CIP Record for this book is available from the British         Library.         \end{center}         \vspace*{0.1in}         \begin{center}                 Typeset in \LaTeXe         \end{center}     \end{titlepage}          \tableofcontents          \addchap{Preface}         \input{./pref.tex}     \addchap{Introduction}         \input{./intro.tex}          \mainmatter          \part{Genesis}     \addchap{One}         \input{./one_one.tex}         \input{./one_two.tex}         \input{./one_three.tex}         \input{./one_four.tex} %etc          \end{document}


title: How may I insert white vertical space between subequations?

text: I have the following MWE               \documentclass[11pt]{article}     \usepackage{empheq}          \newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}          \begin{document}     \begin{subequations}     \begin{empheq}[box=\widefbox]{align}       a & = b \\       c & = d     \end{empheq}     \end{subequations}     \end{document}      and I'd like to insert some variable-size vertical white space between the subequations to make them look nicer in the box. How may I do this?


title: Multi columns in latex

text: I am having problems with tables in latex. Here is what I want:               Regressors                 Model 1                                  Model 2                        Coefficient1  Lower1  Upper1           Coefficient2  Lower2 Upper2      $beta_{concern_2}$        0.1903627  0.01208  0.89934           0.17054127  0.12093922 0.389928       and here is my latex code               \begin{table} [h!]     \begin{center}     \begin{tabular}{lcrl}     \hline          \multicolumn{1}{l}{Regressors} & \multicolumn{3}{c}{Model 1 }\\ \hline          & Coefficient & Lower limit & Upper Limit  \\          \multicolumn{3}{r}{Model 2 }\\          & Coefficient & Lower limit & Upper Limit  \\         $\beta_{concern_2}$     & 0.19036273    &0.01208    &   0.89934  & 0.17054127 & 0.12093922 & 0.389928 \\         \hline     \end{tabular}     \caption{Regression Coefficients of model 1 and model 2 }     \label{beta}     \end{center}     \end{table}      This does not work as I want. Can someone please fix this? Thanks Günal


title: Centre justifying equations in align environment

text: Apologies if this has been asked before, but I couldn't find it after searching in a few places. I'm currently working with arrays of equations like the following:               \begin{align}          y_i^3=y_i^2&=z_i^2=z_i^3 &&\text{if\, $1\leq i\leq n-1$}\\          y_iz_iy_i=y_i,\quad &z_iy_iz_i=z_i &&\text{if\, $1\leq i\leq n-1$}\\          y_iz_i&=z_{i+1}y_{i+1} &&\text{if\, $1\leq i\leq n-2$}          \end{align}      But I'd really like to drop the `&`'s in the equations themselves, so that the equations are centre justified, the "if..." bits are left justified, and I still have labels on each line. If I drop the `&`'s and change the `&&`'s to `&&&`'s, then I get everything I want except that the equations are right justified. Can anyone help?


title: pgfplots tick lines are behind const plot

text: The tick lines in the plot are in a layer behind the actual plot. Have a look at this example below:               \documentclass[11pt, oneside]{article}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}       \begin{tikzpicture}         \begin{axis}[ymin=0,ymax=1,enlargelimits=false]             \addplot                 [const plot,fill=blue,draw=black]                 coordinates                 {(0,0.1) (0.1,0.15) (0.15,0.02) (0.3,0.62)                 (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)                 (0.8,0.58) (0.9,0.55) (1,0.52)}             \closedcycle;         \end{axis}       \end{tikzpicture}     \end{document}      which produces this plot: ![Image showing ticks behind the plot.](http://i.stack.imgur.com/dGG9I.png) It is clear that the plot has been drawn on top of the tick marks, the tick for 0.2 clearly shows this: it is mostly covered by the plot. I would be grateful if someone could guide me on how I can bring the tick marks ontop of the plot so those ticks on the bottom and right sides that are covered can be seen.