title: Optimize (or improve, at least) PSTricks code for drawing a beehive

text: Consider the following example. **Code**               % pdflatex -shell-escape test.tex          \documentclass{article}          \usepackage{       auto-pst-pdf,       pst-eucl     }     \usepackage{siunitx}          \begin{document}          \begin{figure}     \def\indryk{5}     \def\bredde{60}     \pstFPdiv\konstA{2}{3}     \pstFPmul\Bb{\konstA}{\bredde}     \pstFPdiv\konstB{6}{5}     \pstFPmul\Ha{\konstB}{\bredde}     \pstFPdiv\konstC{13}{20}     \pstFPmul\Hb{\konstC}{\bredde}     \pstFPdiv\konstD{7}{5}     \pstFPmul\Hc{\konstD}{\bredde}     \pstFPdiv\radiusA{\bredde}{20}     \pstFPdiv\LabelSeparation{\bredde}{12}      \centering       \sisetup{         round-mode=places,         round-precision=0       }       \psset{         unit=0.13cm       }       \begin{pspicture}(8,10)        % Bistadet.        \pnode(\indryk,\indryk){A}        \pnode(!\indryk\space \indryk\space 13 20 div \bredde\space mul add){B1}        \pnode(!\indryk\space \indryk\space 16 20 div \bredde\space mul add){B2}        \pnode(!\indryk\space \indryk\space 19 20 div \bredde\space mul add){B3}        \pnode(!\indryk\space \indryk\space 22 20 div \bredde\space mul add){B4}        \pnode(!\indryk\space \indryk\space 25 20 div \bredde\space mul add){B5}        \pnode(!\indryk\space \indryk\space 28 20 div \bredde\space mul add){B6}        \pnode(!\indryk\space \bredde\space 2 div add \indryk\space 24 5 3 sqrt mul sub 10 div \bredde\space mul add){C}        \pnode(!\indryk\space \bredde\space add \indryk\space 28 20 div \bredde\space mul add){D6}        \pnode(!\indryk\space \bredde\space add \indryk\space 25 20 div \bredde\space mul add){D5}        \pnode(!\indryk\space \bredde\space add \indryk\space 22 20 div \bredde\space mul add){D4}        \pnode(!\indryk\space \bredde\space add \indryk\space 19 20 div \bredde\space mul add){D3}        \pnode(!\indryk\space \bredde\space add \indryk\space 16 20 div \bredde\space mul add){D2}        \pnode(!\indryk\space \bredde\space add \indryk\space 13 20 div \bredde\space mul add){D1}        \pnode(!\indryk\space \bredde\space add \indryk\space){E}        \pnode(!\indryk\space 5 6 div \bredde\space mul add \indryk\space){F}        \pnode(!\indryk\space 1 6 div \bredde\space mul add \indryk\space){G}        \pnode(!\indryk\space 1 6 div \bredde\space mul add \indryk\space  4 20 div \bredde\space mul add){H1}        \pnode(!\indryk\space 1 6 div \bredde\space mul add \indryk\space  7 20 div \bredde\space mul add){H2}        \pnode(!\indryk\space 1 6 div \bredde\space mul add \indryk\space 10 20 div \bredde\space mul add){H3}        \pnode(!\indryk\space 1 6 div \bredde\space mul add \indryk\space 13 20 div \bredde\space mul add){H4}        \pnode(!\indryk\space 5 6 div \bredde\space mul add \indryk\space  4 20 div \bredde\space mul add){I1}        \pnode(!\indryk\space 5 6 div \bredde\space mul add \indryk\space  7 20 div \bredde\space mul add){I2}        \pnode(!\indryk\space 5 6 div \bredde\space mul add \indryk\space 10 20 div \bredde\space mul add){I3}        \pnode(!\indryk\space 5 6 div \bredde\space mul add \indryk\space 13 20 div \bredde\space mul add){I4}        \pspolygon(A)(B6)(C)(D6)(E)        \multido{\iB=1+1,\iD=1+1}{6}{\pcline(B\iB)(D\iD)}        \pcline(G)(H4)        \pcline(F)(I4)        \multido{\iH=1+1,\iI=1+1}{4}{\pcline(H\iH)(I\iI)}        % Betegnelser.       \psset{         nrot=:U       }        \pnode(!0 1 5 div \bredde\space mul \indryk\space add){J}        \pnode(!0 7 5 div \bredde\space mul \indryk\space add){K}        \pcline{|-|}(J)(K)        \ncput*{\SI{\Ha}{\cm}}        \pnode(\indryk,0){L}        \pnode(!\indryk\space \bredde\space add 0){M}        \pcline{|-|}(L)(M)        \ncput*{\SI{\bredde}{\cm}}        \pcline{|<->|}(G)(F)        \ncput*{\SI{\Bb}{\cm}}        \pnode(!\indryk\space 2 mul \bredde\space add \indryk\space){N}        \pnode(!\indryk\space 2 mul \bredde\space add \indryk\space 13 20 div \bredde\space mul add){O}        \pcline{|-|}(N)(O)        \ncput*{\SI{\Hb}{\cm}}        \pnode(!\indryk\space 3 mul \bredde\space add \indryk\space){P}        \pnode(!\indryk\space 3 mul \bredde\space add \indryk\space 7 5 div \bredde\space mul add){Q}        \pcline{|-|}(P)(Q)        \ncput*{\SI{\Hc}{\cm}}        \pstMarkAngle[          MarkAngleRadius=\radiusA,          LabelSep=\LabelSeparation        ]{B6}{C}{D6}{\footnotesize{\SI{150}{\degree}}}       \end{pspicture}     \end{figure}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/vjvlJ.jpg) **Question** I have the desired output but the code is rather messy; can anyone help me simplify if?


title: How to indent a block in beamer?

text: I am creating a presentation using Beamer with the Hannover template. Here is one slide from the presentation:                 \begin{frame}     \frametitle{Vision(Image Acquisition \footnotesize contd.. \large)}     \begin{block}{Camera Calibration}         \begin{itemize}           \scriptsize\item All supported features are queried           \scriptsize\item Sliders are created         \end{itemize}         \bigskip         \begin{enumerate}           \scriptsize\item Automatic driver-made adjustments are disabled           \scriptsize\item Values taken from sliders are set           \scriptsize\item Config file is updated         \end{enumerate}     \end{block}     \bigskip     \begin{block}{Problems}         \begin{itemize}           \scriptsize\item Flickering           \scriptsize\item JPEG Artefacts         \end{itemize}     \end{block}       \end{frame}      As you can see, there are two blocks. The first is the main one, and the second is more like additional remarks. I want the second block to be indented for this reason. How to I manage to do that?


title: How to enumerate the rows of a table

text: I want to automatically enumerate the text rows of a table. Is there an option within `tabular`, or another package? (Of course I do not want the rules to be enumerated.)


title: Re-cover Beamer overlays, while keeping a subphrase uncovered?

text: # Original question In a Beamer presentation that I am writing, I have an `itemize` list and would like to make each item visible one-by-one. Then, starting on the slide after a given item appears, I would like that item to be re-covered in a transparent way. This is easy enough to accomplish using `again covered` with `\setbeamercovered`:               \documentclass{beamer}     \setbeamercovered{again covered={\opaqueness<1->{25}}}     \begin{document}     \begin{frame}{Frame Title}       \begin{itemize}[<+>]       \item Who's on first       \item What's on second       \item I don't know's on third       \end{itemize}       \uncover<+->{-- Abbott and Costello}     \end{frame}     \end{document}      But here's the twist: I would like to modify the above example so that, once uncovered, the words 'Who', 'What', 'I don't know' remain uncovered even after their respective `\item`s are re-covered. The following code tries three different ways to make this work:               \documentclass{beamer}     \setbeamercovered{again covered={\opaqueness<1->{25}}}     \begin{document}     \begin{frame}{Frame Title}       \begin{itemize}[<+>]       \item \uncover<.->{Who}'s on first       \item {\color<.->{black} What}'s on second       \item<+-> I don't know\uncover<.>{'s on third}       \end{itemize}       \uncover<+->{-- Abbott and Costello}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/2CDZm.gif) The first two attempts do not work at all. The third attempt is closer, but still not quite right: I want the triangular item marker to be transparent whenever `'s on third` is re-covered. So, my question is: **How can I cleanly and correctly keep certain subphrases uncovered even when the surrounding context is re-covered?** There might be a way to hook into the item marker and make it transparent, but I would like to avoid this; I will be using an answer with inference rules (set with the `lkproof` package) for which such hooks would be difficult to create (because of my limited TeX knowledge). # Revised question @alexurba's answer is useful and almost, but not quite, does what I need. First, I've slightly modified his suggestion:               \newcommand<>{\myuncover}[1]{%       \alt#2{\mbox{\beamer@endcovered #1}}{\mbox{#1}}}      By using `\alt` and `\mbox` rather than using `\only` and `\makebox[0pt][r]`, we can avoid over-printing the text `#1`. Yet this command interacts poorly with `\color`, as the following example shows:               \documentclass{beamer}     \setbeamercovered{again covered={\opaqueness<1->{25}}}          \makeatletter     \newcommand<>{\alexurbauncover}[1]{%       #1\only#2{\makebox[0pt][r]{\beamer@endcovered #1}}}          \newcommand<>{\myuncover}[1]{%       \alt#2{\mbox{\beamer@endcovered #1}}{\mbox{#1}}}     \makeatother          \begin{document}     \begin{frame}{Frame Title}       \begin{itemize}[<+>]       \item Who's on {\color{structure} first}       \item \myuncover<.->{What}'s on {\color{structure} second}       \item \alexurbauncover<.->{I don't know}'s on {\color{structure} third}       \end{itemize}       \uncover<+>{-- Abbott and Costello}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/RIOkT.gif) The first bullet shows an ordinary `\uncover` and re-cover, which makes the `structure`-colored text appropriately transparent when re-covered. The second bullet shows that the revised `\myuncover` command somehow breaks this treatment of the `structure`-colored text: it stays completely opaque when re- covered. The third bullet shows that this behavior wasn't inadvertantly introduced by my revisions to @alexurba's original `\myuncover`. So, my revised question is: **How can I have something like the above`\myuncover` that correctly respects the `\color` switch in re-covered text?** ## Attempted solution From what I can tell, in the above `\myuncover`, the `\mbox` appears to serve to delimit the scope of `\beamer@endcovered`. Another idea is to end and then restart the covering behavior, such as with               \newcommand<>{\myuncover}[1]{%       \alt#2{\beamer@endcovered #1\beamer@startcovered}{#1}}      However, this command doesn't work the way I would have liked:               \documentclass{beamer}     \setbeamercovered{again covered={\opaqueness<1->{25}}}          \makeatletter     \newcommand<>{\myuncover}[1]{%       \alt#2{\beamer@endcovered #1\beamer@startcovered}{#1}}     \makeatother          \begin{document}     \begin{frame}{Frame Title}       \begin{itemize}[<+>]       \item \myuncover<.->{Who}'s on {\color{structure} first}       \item \myuncover<.->{What}'s on {\color{structure} second}       \item \myuncover<.->{I don't know}'s on {\color{structure} third}       \end{itemize}       \uncover<+>{-- Abbott and Costello}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/rFFIL.gif) My guess is that `\beamer@startcovered` is preventing Beamer from recognizing that `'s on first` etc. is being re-covered, and therefore the `again covered` does not kick in at the right point. But that's just a guess since I don't understand exactly how `\beamer@startcovered` works.


title: Switching off ligatures in LuaLaTeX

text: In order to switch off ligatures for a whole document using LuaLaTeX, I put the following lines into the preamble:               \usepackage{fontspec}        \defaultfontfeatures{Ligatures={NoRequired, NoCommon, NoContextual}}      However, the output document still shows ligatures. I also tried this command:               \usepackage{fontspec}        \defaultfontfeatures{       Ligatures={-Required, +NoRequired, -Common, +NoCommon, -Contextual, +NoContextual,                  -TeX, -Rare, -Historic}}      but with the same result. Any ideas why switching off ligatures is not working? **EDIT:** The anser to my question is hidden in one of the comments on Patrick's answer: It is necessary to explicitly select a font via one of the `fontspec` commands afterwards, in order to have the `Ligatures`setting take effect. For example:               \usepackage{fontspec}      \defaultfontfeatures{Ligatures={NoRequired, NoCommon, NoContextual}}     \setmainfont{Latin Modern Roman}


title: Aligned Table of Notation Sybmols - Works but with Errors

text: I am getting a four (4) errors and 1 Bad Box with the code below. However, the output is the way I need in the PDF. Any ideas why I am getting the errors? And if so, how I can fix it. The error is `Missing $` inserted in this code:               $y_{f}$ & $=$ & \left\{\begin{array}{rl}    1, &\mbox{ if Supplier located at site $f$ is open} \\0, &\mbox{ otherwise} \end{array} \right.\\      * * *               \usepackage{mathtools}       \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tabulary}     \usepackage{booktabs}          \begin{table}[htbp]\caption{Table of Notation My Research}     \vspace{-1.5em}     \begin{center}          \begin{tabular}{r c p{10cm} }     \toprule     $R_{i}$ & $\triangleq$ & Revenue at store $i$\\     $i$ & $\triangleq$ & index value for store locations\\     ${T}_{c}$ & $\triangleq$ & A very long description of this specific variable and is needed in the research and looks good when wrapped and aligned to the left.\\     $TC$ & $\triangleq$ & Total overall cost(\$)\\       \multicolumn{3}{c}{}\\     \multicolumn{3}{c}{\underline{Decision Variables}}\\     $y_{f}$ & $=$ & \left\{\begin{array}{rl}    1, &\mbox{ if Supplier located at site $f$ is open} \\     0, &\mbox{ otherwise} \end{array} \right.\\     \bottomrule         \end{tabular}     \end{center}         \label{tab:TableOfNotationForMyResearch}     \end{table}


title: Adding one more information in my front page - beamer

text: I am creating a slide template for a presentation in LaTex using Beamer and i want to add some more information " **Supervised by** " between "Directed by " and "the institue" , so i put               \documentclass{beamer}     \usetheme{CambridgeUS} % theme     \title[Project's name]{Project 's name }     \author[My name]{\textbf {Directed by: my name}} % auteur     \institute[Rouen University]{\textbf {Rouen University}}     \date{20 july 2012}     \titlegraphic{\includegraphics[width=2cm]{logo_ur.jpg}}     \begin{document}          \begin{frame}     \maketitle     \end{frame}               \end{document}      the result is given by this picture : ![enter image description here](http://i.stack.imgur.com/u3o8r.png) and i want something like this : ![enter image description here](http://i.stack.imgur.com/4Nq0l.png)


title: How can I draw this cycloid diagram with TikZ?

text: Good evening, I'm sorry again abuse their knowledge but I'm very inexperienced using TikZ. Anybody could do me the favor to plot a curve cycloid using TikZ? I appreciate it very ![enter image description here](http://i.stack.imgur.com/M6le1.gif)


title: biblatex output like BibTeX's unsrt style

text: I use `biblatex` in order to have a bibliography per chapter. I tried `chapterbib` and `bibtopic`, but I did not succeed with the former and citations were not sorted with the latter. This what the document looks like :               \documentclass{book}          \usepackage[refsection=chapter, sorting=none]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @ARTICLE{Kresse1993,       author = {Kresse, G. and Hafner, J.},       title = {\textit{Ab initio} molecular dynamics for liquid metals},       journal = {Phys. Rev. B},       year = {1993},       volume = {47},       pages = {558--561},       month = {Jan},       doi = {10.1103/PhysRevB.47.558},       issue = {1},       publisher = {American Physical Society},       url = {http://link.aps.org/doi/10.1103/PhysRevB.47.558}     }          @ARTICLE{Blochl1994,       author = {Bl\"ochl, P. E.},       title = {Projector augmented-wave method},       journal = {Phys. Rev. B},       year = {1994},       volume = {50},       pages = {17953--17979},       month = {Dec},       doi = {10.1103/PhysRevB.50.17953},       issue = {24},       publisher = {American Physical Society},       url = {http://link.aps.org/doi/10.1103/PhysRevB.50.17953}     }          @ARTICLE{Dudarev1998,       author = {Dudarev, S. L. and Botton, G. A. and Savrasov, S. Y. and Humphreys,         C. J. and Sutton, A. P.},       title = {Electron-energy-loss spectra and the structural stability of nickel         oxide: An LSDA+U study},       journal = {Phys. Rev. B},       year = {1998},       volume = {57},       pages = {1505--1509},       month = {Jan},       doi = {10.1103/PhysRevB.57.1505},       issue = {3},       publisher = {American Physical Society},       url = {http://link.aps.org/doi/10.1103/PhysRevB.57.1505}     }          @ARTICLE{Henkelman2006,       author = {Henkelman, G.a and Arnaldsson, A.b and Jonsson, H.b c},       title = {A fast and robust algorithm for Bader decomposition of charge density},       journal = {Computational Materials Science},       year = {2006},       volume = {36},       pages = {354-360},       number = {3},       note = {cited By (since 1996) 559}     }          @ARTICLE{Kresse1996,       author = {G. Kresse and J. Furthmüller},       title = {Efficiency of ab-initio total energy calculations for metals and         semiconductors using a plane-wave basis set},       journal = {Computational Materials Science},       year = {1996},       volume = {6},       pages = {15 - 50},       number = {1},       doi = {10.1016/0927-0256(96)00008-0},       issn = {0927-0256},       url = {http://www.sciencedirect.com/science/article/pii/0927025696000080}     }          \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \chapter{Chapitre 1}          \nocite{Dudarev1998,Henkelman2006,Blochl1994}          \printbibliography          \chapter{Chapitre 2}          \nocite{Kresse1993,Kresse1996}          \printbibliography          \end{document}      With that, I get per chapter bibliography and citation are sorted by appearance. But I do not like the format of references which look like :               [1] S. L. Dudarev et al. “Electron-energy-loss spectra and the structural sta-      bility of nickel oxide: An LSDA+U study”. In: Phys. Rev. B 57 (3 1998),       pp. 1505–1509. doi: 10.1103/PhysRevB.57.1505. url: http://link.        aps.org/doi/10.1103/PhysRevB.57.1505.      I would prefer to have the format we obtain with classic `unsrt` bibliography style :               S. L. Dudarev, G. A. Botton, S. Y. Savrasov, C. J. Humphreys, and A. P.     Sutton. Electron-energy-loss spectra and the structural stability of nickel     oxide: An lsda+u study. Phys. Rev. B, 57:1505–1509, Jan 1998.      How can I change that?


title: Follow up to "Whats the best way to arrange latex documents"

text: A follow up question Whats the best way to arrange latex documents There are couples of characteristics to my data described in original question –   1. Verse numbers are unique    2. Authors name is unique    3. For commentaries I created a unique identification number with a prefix c1, c2 etc to verse numbers.  This is how I arranged the documents, I used “Concatenate” in excel to create individual tex file structure shown below Verses               \section{here verse 1 } \label{v1.1.1}     \section{here verse 2} \label{v1.1.2}   etc etc …. For all verses       All commentaries by Author_Name_A               \paragraph{Here commentary 1 by Author A for verse 1 } \label{c1.1.1.1}     \paragraph{Here commentary 1 by Author A for verse 2 } \label{c1.1.1.2} etc etc ….      All commentaries by Author_Name_B               \paragraph{Here commentary 2 by Author B for verse 1 } \label{c2.1.1.1}     \paragraph{Here commentary 2 by Author B for verse 2 } \label{c2.1.1.2} etc etc ….      All commentaries by Author_Name_C               \paragraph{Here commentary 3 by Author C for verse 1 } \label{c31.1.1}     \paragraph{Here commentary 3 by Author C for verse 2 } \label{c31.1.2} etc etc ….      I ran these files separately in different directory – I got Aux files for each of the above TeX files. Which I copied into my working directory and created new TeX file called “All_Commentaries.TeX” which looks as below               \nameref{v1.1.1}     \nameref{c1.1.1.1}     \nameref{c2.1.1.1}     \nameref{c3.1.1.1}          \newpage           \nameref{v1.1.2}     \nameref{c1.1.1.2}     \nameref{c2.1.1.2}     \nameref{c3.1.1.2}      This is how my main file looks like which produces desired output as shown in the attached image to original question.               \documentclass[fleqn,12pt,a4paper]{article}     \RequirePackage{mypackage}          \includeonly{ All_Commentaries}          \begin{document}          \inclue{ All_Commentaries }     \include{Verse}     \include{ Author_Name_A}     \include{ Author_Name_B}     \include{ Author_Name_C}          \end{document}      Now my question are - Is this approach scalable ? Are there any flaws in this approach, is there a better and efficient approach for this. Many times I get this error `Package hyperref Warning: The anchor of a bookmark and its parent's must not (hyperref) be the same. Added a new anchor on input line 41. ` Your comments and suggestions to improve my work would be appreciated.


title: Separate Beamer navigation bar for some portions of presentation

text: I noticed in this example that the Introduction and Conclusion have their own navigation bars so that their entries are not taking up two extra lines in the main (body) navigation bar throughout the presentation. I know I can leave them out by specifying a blank short name in the section command like `\section[]{My Section Name]`, but then when you get to those sections, e.g. Conclusion that's been discarded from the navigation bar, you're just shown the last section's nav bar with no highlight. I'd prefer to do it the way shown in the linked example so that the Conclusion just has its own nav bar that just says "Conclusion." Is this done with the `parts` functionality, and if so how? And is there a better way? Unfortunately the above example doesn't include code. I'm exploring the parts functionality now, but haven't totally nailed it yet. Here's a rough idea of what I've done so far:               \part{Introduction}     \section{Introduction}     (some intro frames)     \part{Body}     (some body sections and frames)     \part{Conclusion}     \section{Conclusion}     (some conclusion frames)      However, my PDF's Bookmarks list now shows the parts Introduction, Body, and Conclusion as the top-level sections which is not quite what I want. I really just want to break up the navigation bar so it's separate for Intro, Body, and Conclusion, without any mention of those actually part names anywhere. So, I feel like I'm heading down the wrong path here.


title: Regular expression in table

text: I want to print a regular expression in table's column. For example:               \begin{table}[position specifier]     \begin{center}         \begin{tabular}{ c | c }             \hline             comand & regex \\              \hline             HELO & ^\s*HELO\s+(\S+)\s*$ \\             \hline         \end{tabular}         \label{tab:smtp}     \end{center}     \end{table}      But, I have a lot of errors due to `^\s*HELO\s+(\S+)\s*$`. So, what does the simplest way to escape this regex? **EDIT:** I do not have enough reputation to ask to my own question. So the most suitable solution is to use `\verb` comand.


title: Using Liberation font with pdflatex (no XeLaTeX/LuaLaTeX)

text: I am looking for a substitute for the Times font we are using throughout our documents. This is how we load our fonts:               \usepackage{txfonts}     \renewcommand{\ttdefault}{cmtt}     \DeclareMathAlphabet{\mathtt}{OT1}{cmtt}{m}{n}     \SetMathAlphabet{\mathtt}{bold}{OT1}{cmtt}{b}{n}      (I know there's `newtxfonts` out by now, but that's not the issue here.) The Linux Libertine font is an alternative which I could simply load using `\usepackage{libertine}`, but it's looking quite different from Times, and I'm not sure if this will be appreciated. Actually, I would prefer using the Liberation family, but so far I only found instructions that require the `fontspec` package, and hence the use of XeLaTeX/LuaLaTeX. At the current stage, I would prefer not to add this additional requirement so that all documents still can be compiled with `pdflatex`. So: Is there a way to use the Liberation font family in a `pdflatex` environment? ( **EDIT** : In other words, has anyone packaged this font already for `pdflatex`, and I missed that in my search?) If not: I have found The Installation and Use of OpenType Fonts in LaTeX -- would this be the way to go to convert an OTF representation of Liberation for use with `pdflatex`? Which extra steps would be required to create an easy-to- use LaTeX package? Also important for me, perhaps not worth a separate question: Can Liberation also be used as math font, or is there a math font that looks good in a Liberation document?


title: conflicting url.sty

text: This is a minimal example of the problem I am having:               \documentclass[iop]{emulateapj}     \usepackage{verbatim}     \usepackage[colorlinks,urlcolor=blue,citecolor=blue,linkcolor=blue]{hyperref}     \begin{document}     \title{Sample Article Title}     \section{Sample}\label{samplelabel}     This is just to show the problem in \S \ref{samplelabel}     \end{document}      This is the error I am getting:                (/usr/local/texlive/2011/texmf/tex/latex/html/url.sty           ! LaTeX Error: Command \url already defined.                Or name \end... illegal, see p.192 of the manual.           See the LaTeX manual or LaTeX Companion for explanation.      Type  H <return>  for immediate help.      ...                                                         l.102 \newcommand\url{\begingroup \Url}      It is working perfectly on another computer that doesn't have latex2html so I assume this explanation is correct. I am just having problems removing the latex2html along with it's conflicting url.sty. When I try               tlmgr remove latex2html      It says:               latex2html: package not present, cannot remove     tlmgr: no packages removed.      I should just say that I installed the most recent version of latex2html from here, and compiled it using the `./configure`, `make` and `make install` I am relatively new to LaTeX, such that I have never needed to remove a package and tlmgr doesn't seem to work. It would be excellent if someone could help me.


title: Beamer and a for each loop

text: I'm using the `beamer` presentation package and trying to combine the examples from this post How to iterate over a comma separated list? with the `beamer` package. In modifying the top example, chaning               \documentclass{beamer}     \usepackage{xparse}          \ExplSyntaxOn          \NewDocumentCommand{\makeenumerate}{ m }      {       \begin{frame}       \clist_map_inline:nn { #1 } { \frame \fbox{##1} }       \end{frame}      }          \ExplSyntaxOff          \begin{document}          \makeenumerate{a, b ,c, d, ,e }          \end{document}      I want to have a b c d and e all in separate beamer frames. I'm not sure how to get this to work, and which method of iterating over a comma separated list is best to use i've tried them all and none work.


title: How to box the correct answer in Exam class?

text: I have tried using the following code:               \documentclass[12pt]{exam}     \CorrectChoiceEmphasis{\mbox{}}     \begin{document}     \begin{questions}     \question Who is an idot?      \begin{choices}     \choice Not the writer of this post     \CorrectChoiceEmphasis The writter of this post     \end{choices}     \end{questions}     \end{document}


title: Newline, indentation, parskip - when to use what in what stylistic manner?

text: I intend to use `scrbook`. In real-life literature, English and German language, the text often looks like this: > Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy > eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam > voluptua.   >     At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd > gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   >   > Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy > eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam > voluptua.   >     At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd > gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Especially in longer chapters there's often somewhere an empty line followed by a non-indented text. While the regular text often has new lines with indented text. A popular example: The Ultimate Hitchhiker's Guide to the Galaxy on Amazon.com, scroll through it and you will see real-life text that is like this (Page 8 and 9 for example). Another example are the UK Discworld books by Terry Pratchett. My questions:   * Which of the two is a paragraph? The empty line or the indented new line?   * What's the name of the other respectively?   * What's the best way to achieve this in LaTeX?      1. Redefine `\newline` to be indented and use `parskip=half`?     2. Don't parskip and insert vspaces for the empty line?     3. Another possibility?   * Is this good style at all?   * Any other hints or information I did not think about?


title: Remove link from selected references

text: I am using the `hyperref` package, but I would like a way to use `\ref` without making it into a link (but not always). To give an example:               \documentclass[a4paper,10pt]{article}     \usepackage{enumerate}     \usepackage{hyperref}          \begin{document}          \section{Some section} \label{section}          The following is a list placed in Section~\ref{section}:     \begin{enumerate}[1]         \item             first list item         \item \label{item}             second list item         \item             third list item     \end{enumerate}     From my point of view the most interesting is part of this list is part \ref{item}.     \end{document}      My situation is something like this: I would like `hyperref` to make a link to the section when I write `\ref{section}`, but I do not want it to do so when refering to the label `item`, becuase the reference to this label will be place in the same place as the list, and if I refer a lot to the points in the list, then the text will be perforated with links, which looks stupid. Is there a way to select which references are made into links?


title: Prefix Expression to Binary Tree Generator

text: I have some prefix expressions which are too long to feasibly create my own binary trees by hand. I was wondering if there was a latex package which could parse my expressions and automatically create a binary tree? Take for example a smaller expression;               * - J % J 2 + 2 1      I want a binary tree automatically created like so. ![enter image description here](http://i.stack.imgur.com/Xtm1X.png) So my terminals are {J, 0, 1, 2, 3} and my functions are {%, /, *, -, +}. I'm hoping given this much information and the fact that the arity of each function is 2, and terminals obviously 0, that there is a package which could do this for me? Or maybe someone knows of a piece of software which can format an expression like this into tikz picture code.


title: What are the advantages and disadvantages between these coding styles?

text: Some people use the following style               setting     {          a=1         ,b=2         ,c=3         }      and the other ones use the style below               setting     {         a=1,         b=2,         c=3      }      I use the latter style but I wonder why some people prefer the former style? Is there anything I missed?


title: One column text under chapter title in memoir twocolumn mode?

text: I want to have one column text underneath the chapter name in twocolumn mode (where the majority of the text is in twocolumn). I can't. Even using `onecolabstract` doesn't do it.               \documentclass[12pt,twocolumn]{memoir}     \chapterstyle{bianchi}     \begin{document}     \chapter{Example}     One column text that goes across the entire top part          And the rest of the text formatted in two columns     \end{document}      I want the "One column" line to be as wide as the chapter title. Is it possible without loading the `multicol` package? The following shows what I want (using `multicol` - but I'd prefer not to load it unless there's no other way).               \documentclass[12pt]{memoir}     \usepackage{multicol}     \usepackage{lipsum}     \chapterstyle{bianchi}     \begin{document}     \chapter{Example}     \lipsum[1]     \begin{multicols}{2}     \lipsum[2]     \end{multicols}     \end{document}


title: using sagetex hebrew

text: i wrote some code in sagtex and it run ok i use in \sagestr macro however when i insert the following 2 lines               \usepackage[utf8x]{inputenc}     \usepackage[english,hebrew]{babel}      i cannot complie the code and it tell me that "! Missing \endcsname inserted." (if i remove this 2 lines everythings run perfect) (moreover if i remove the hebrew it run) so what can i do in order to run this sorry my english is bad edit : work in linux ubonto 11.10 (i attach my code):               \documentclass{article}     \title{}     \usepackage{amsmath}     \usepackage{sagetex}     \usepackage[utf8x]{inputenc}     \usepackage[english,hebrew]{babel}     \setlength{\sagetexindent}{20ex}     \begin{document}     \maketitle     \begin{sagesilent}     def printMatrix(A):       return "$" +latex(A)+"$"     B=random_matrix(QQ, 3, algorithm='unimodular')     \end{sagesilent}     \sagestr{printMatrix(B)} \\     \end{document}      the error is :               "! Missing \endcsname inserted.     <to be read again>     \protect     l.25 \sagestr{printMatrix(B)}


title: What does "running in backwards compatibility mode" mean and what should I fix to get rid of it?

text: I was typesetting a Tex file, but I got this warning: > _! Package pgfplots Warning: running in backwards compatibility mode > (unsuitable tick labels; missing features). Consider writing > \pgfplotsset{compat=1.6} into your preamble._ Now, I know that adding that line to the preamble solves the problem, but my question focuses more on the "why am I getting this" part of the problem. What should I be looking for in my Tex file? Usually I get a "problem in line X" indication, but here, I'm lost. I don't understand what it is complaining about.


title: Projection of Circle onto Spherical Surface

text: ![enter image description here](http://i.stack.imgur.com/MC772.jpg) I want to draw shapes looks like 15 degrees tilted-semi-sphere and there are circles, placed in a triangular shaped array, on the base area. Then these circles are projected onto surface of sphere. I can drive small circles on the base-plane. However, projections of circles have different shapes. Therefore I don't know how to solve it. I think, there are cylindrical holes and I must find their intersections on the surface of sphere. Thank you all for your response. I wonder is there any way to specify centers of circles or projections in cartesian and not in polar coordinates. Since it is difficult to specify polar coordinates of each small circles, shown below, in an automatic way, in other words using \foreach command.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{pgfplots}     \newcommand\pgfmathsinandcos[3]{%     \pgfmathsetmacro#1{sin(#3)}%     \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current     plane]{%     \pgfmathsinandcos\sinEl\cosEl{#2} % elevation     \pgfmathsinandcos\sint\cost{#3} % azimuth     \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%     \pgfmathsinandcos\sinEl\cosEl{#2} % elevation     \pgfmathsinandcos\sint\cost{#3} % latitude     \pgfmathsetmacro\yshift{\cosEl*\sint}     \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][2]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix  style={scale=#1}}       % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane,dotted] (\angVis:1) arc (\angVis:180:1);       \draw[current plane,dotted] (\angVis+90:1) arc (\angVis+90:0:1);     }     \newcommand\DrawLatitudeCircle[2][3]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane,dotted] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane,dotted] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }     \newcommand\DrawMidCircle[2][4]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }     \newcommand\DrawAxis[2][5]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (1,0) -- (-1,0);     }     \newcommand\DrawSmallCircle[2][6]{       \LatitudePlane{\angEl}{0}       \tikzset{current plane/.prefix style={scale=1}}       \pgfmathsetmacro\sinVis{sin(0)/cos(0)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}            \pgfmathsetmacro\x{(#1*2*\r)*cos(\angRot)-(#2*2*\r*cos(30))*sin(\angRot)}       \pgfmathsetmacro\y{(#1*2*\r)*sin(\angRot)+(#2*2*\r*cos(30))*cos(\angRot)}       \draw[current plane,green!85!black, fill=green!85!black, fill opacity=0.25] ($(\x,\y)+(0:\r)$) arc (\angVis:360+\angVis:\r);     }     \newcommand\DrawSmallCircleShift[2][7]{       \LatitudePlane{\angEl}{0}       \tikzset{current plane/.prefix style={scale=1}}       \pgfmathsetmacro\sinVis{sin(0)/cos(0)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}            \pgfmathsetmacro\x{(#1*2*\r+\r)*cos(\angRot)-(#2*2*\r*cos(30))*sin(\angRot)}       \pgfmathsetmacro\y{(#1*2*\r+\r)*sin(\angRot)+(#2*2*\r*cos(30))*cos(\angRot)}       \draw[current plane,green!85!black, fill=green!85!black, fill opacity=0.25] ($(\x,\y)+(0:\r)$) arc (\angVis:360+\angVis:\r);     }     \begin{document}       \begin{tikzpicture}       \def\R{4}       \def\r{0.35}       \def\angRot{30}       \node (C) at (0,0) {};       \draw (C) -- (0,1);       \def\angEl{20} % elevation angle             \LongitudePlane{\angEl}{\angRot}        \tikzset{current plane/.prefix style={scale=\R}}        % angle of "visibility"        \pgfmathsetmacro\angVis{atan(sin(\angRot)*cos(\angEl)/sin(\angEl))} %        \draw[current plane] (-1,0) node[below left]{$u$} -- (1,0);        \draw[current plane] (0,0,0) -- (0,1,0);        \LongitudePlane{\angEl}{90+\angRot}        \tikzset{current plane/.prefix style={scale=\R}}         % angle of "visibility"        \pgfmathsetmacro\angVis{atan(sin(90+\angRot)*cos(\angEl)/sin(\angEl))} %        \draw[current plane] (-1,0) node[below right]{$v$} -- (1,0);             \foreach \n in {0,-2}         {\foreach \m in {-4,-3,...,0}             {\DrawSmallCircle[\m]{\n}}}        \foreach \n in {-1,-3}         {\foreach \m in {-5,-4,...,-1}             {\DrawSmallCircleShift[\m]{\n}}}        \foreach \n in {-4}         {\foreach \m in {-3,...,0}             {\DrawSmallCircle[\m]{\n}}}        \foreach \n in {-5}         {\foreach \m in {-3,-2,-1}             {\DrawSmallCircleShift[\m]{\n}}}             \draw[current plane] (0,0,0) -- (0,1,0);        \foreach \t in {0,10,...,80} { \DrawLatitudeCircle[\R]{\t} }        \foreach \t in {0} { \DrawMidCircle[\R]{\t} }        \foreach \t in {0,\angRot,...,150} { \DrawLongitudeCircle[\R]{\t} }       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/hRh7j.jpg)


title: How do I draw a B+ tree with tikz in latex with more than 4 Key value pair in a node

text: I'm using               child {node {1 \nodepart{two} 2 \nodepart{three} 3 \nodepart{four} 4 \nodepart{five} 5 \nodepart{six} 7}}      to create a node in btree. However it seems that `\nodepart{five}` and `\nodepart{six}` get ignored and the rest gets cut off (KVP 5 and 6 do not show up). How do I draw more than 4 KVPs?


title: Removing header underline and margins from a single page

text: I'm using the `book` class and `fancyhdr` in TexMaker and I want to use a rotated table which will eventually take up one whole page. The largest problem is the header line as my table will overlap with it but if possible I would also like the margins to be removed/modified if the table becomes to long. I don't really want the table to run over two pages, I only want this to be applied to the single page and I would like to keep the page numbering if possible.               \documentclass[a4paper,11pt,openany]{book}     \usepackage{fancyhdr}      \usepackage[graphicx]{realboxes}     \usepackage{varwidth}     \usepackage{array,booktabs}          \pagestyle{fancyplain}     \fancyhead[L]{}     \fancyhead[R]{}     \fancyhead[C]{}     \fancyfoot[L]{}     \fancyfoot[R]{}     \fancyfoot[C]{Page \thepage\ of \pageref{LastPage}}          \begin{document}     \newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}     \begin{table}[htb]     \centering      \rotatebox{90}{%        \begin{varwidth}{\textheight}           \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}            \hline             \bfseries  Lead Author & \bfseries pH Sensitive &  & &  \bfseries Laser & \bfseries Intensity &  \bfseries pH & \bfseries pH & \bfseries Functionalisation\\                    \bfseries \& Reference & \bfseries Molecule &\bfseries Nanoparticle & \bfseries SPR & \bfseries Wavelength & \bfseries Ratio & \bfseries Range & \bfseries Sensitivity & \bfseries Process \\              \hline \hline                      C.Talley & pMBA & (50 - 80nm) & -  & 632.8nm & $\frac{1430}{1590}$ & 4.4 - 11.2 &1&Lots and lots and lots and lots of text here \\                    \hline            \end{tabular}             \caption{My caption lorem ipsum}\label{tab_b}         \end{varwidth}}     \end{table}     \end{document}


title: Suppress the page number on a specific page

text: **Problem description** : I have 2 images that I'd like them to be in the same page. The problem is that I can't scale their size down and therefore the 2nd one overlaps with the page number. **Question 1** : Is there a way to tell _XeLatex_ not to display the page number of **a particular page** (not for all the pages)? If I try to move the page number to the right footer or right header (with `fancyhdr`), then it overlaps with text the text in some other page. **Question 2** : Is there any other, more clean, way to fit those images in the same page _and_ keep the page number as well? ![enter image description here](http://i.stack.imgur.com/VPNUo.png)


title: Making TikZ path into a hyperlink

text: I'd like to know if there's a way to make an arbitrary closed path in TikZ into a hyperlink; either directly or by turning it into a node. Here's an example of code to work with:               \documentclass[10pt,letterpaper]{article}     \usepackage{tikz}     \usepackage[colorlinks=true,urlcolor=blue,filecolor=magenta]{hyperref}     \begin{document}     \section{The Diagram}     \begin{center}     \begin{tikzpicture}     \node[draw,align=center] at (12, 0.2+.5) {Even \\ more};     \node[draw,align=center] at (12, 1.4+.5) {And \\ more1};     \node[draw,align=center] at (15, 2.8+.5) {Some \\ text };     \node[draw,align=center] at (15,1.8+.5) {More \\ text};     \draw[blue] (11,-.4+.5)--(13,-.4+.5)--(13,1.3+.5)--(16.5,1.3+.5)--(16.5,3.5+.5)--(11,3.5+.5) --(11,-.4+.5);     \end{tikzpicture}     \end{center}     \section{this is the target}     \hypertarget{target}{}     \end{document}      I'd like the path in blue to become a link going to the hypertarget labeled target. Since the path is oddly shaped, it doesn't correspond to any of the well-known node shapes in TikZ. I've tried putting `\hyperlink{target}` around the `\draw[blue]` command, which didn't work. I'm fine either with the blue line being the link or the region inside the blue line being the link. I also don't care if it's still blue after the link is active; I've just colored it to make this question clearer. Thank you for your time.


title: Natbib style showing the citation term in the references list

text: I am writing a PhD thesis that requires me to use both `\citet` and `\citep` style citations (thus requiring natbib, as far as I am aware). I want `citep` references to read `[Mitchell 2013]`, `citet` references to read `Mitchell [2013]` and want the reference list at the end to include the `citep` form, for example:               [Mitchell 2013]: Henry Mitchell, 2013. The Biography.      I'm not too fussed about the exact reference list style, but so far have been able to find any that replicate the `citep` text at the start, other than those which are numeric reference styles. If I don't use natbib then there are many reference styles that include the `citep` at the start, for example `these.bst`, but then I lose `citet`.


title: How to handle only overlays while printing a latex beamer notes

text: Using overlays and showing multiple graphs in the same slides and even text is really great but I am really wondering how can we show each piece of overlay while printing the slides or notes ? It seems some of the slide can have multiple pages in order to accurately show all the graphs and text especially when we use overlays such as `\only<1-3` and `\only<4-5>`. If it is just a regular text and fills only one page then it should be fine. But often times it is more complex than that. Would anyone clarify what can we do under such circumstances ? **EDIT: MINIMAL EXAMPLE ADDED** What I mean here is that on the second slide I have three different tikz picture. Here I didn't include the picture on node (0,0). In my slide I am using the pictures. SO, how can I print all these three pictures on the same page ? In other cases also some of the text doesn't fit on the slides. I hope it is more understandable now. A minimal working example               %\documentclass[mathserif]{beamer}          \documentclass[arial,handout]{beamer}          \usepackage{pgf,pgfpages}     \usepackage{graphicx}     %\usepackage{units}     %\usepackage[utf8]{inputenc}     \usepackage{mathtools}     %\usepackage{amsmath}     \usepackage{animate}               \usepackage{booktabs}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes}           \tikzset{         invisible/.style={opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%           \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path         },       }          \mode<presentation>     {       \usetheme{ift}       \setbeamertemplate{items}[square]     }          \usefonttheme[onlymath]{serif}     \setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}          \definecolor{uibred}{RGB}{170, 0, 0}     \definecolor{uibblue}{RGB}{0, 84, 115}     \definecolor{uibgreen}{RGB}{119, 175, 0}     %\definecolor{uibgreen}{RGB}{50, 105, 0}     \definecolor{uiborange}{RGB}{217, 89, 0}          %% Create a new command called redub for underbraces     \newcommand\redub[2]{%         \colorlet{currentcolor}{.}%         \color{red}%         \underbrace{\color{currentcolor}#1}_{\color{red}#2}%         \color{currentcolor}%     }               %Beamer block template     \setbeamertemplate{blocks}[rounded][shadow=true]          \setbeamercolor{block title}{bg=uibblue,fg=white}     \setbeamercolor{item projected}{fg=white,bg=green}          \beamertemplatenavigationsymbolsempty               %\include{macros}          %\includeonlyframes{current}               \defbeamertemplate{enumerate item}{mycircle}     {       %\usebeamerfont*{item projected}%       %\usebeamercolor[bg]{item projected}%       \begin{pgfpicture}{0ex}{0ex}{1.5ex}{0ex}         %\pgfcircle[fill]{\pgfpoint{0pt}{.75ex}}{1.25ex}         \pgfbox[center,base]{\color{uibblue}\insertenumlabel.}       \end{pgfpicture}%     }     [action]     {\setbeamerfont{item projected}{size=\scriptsize}}     \setbeamertemplate{enumerate item}[mycircle]          \begin{document}          %\setbeamertemplate{background}     % {\includegraphics[width=\paperwidth,height=\paperheight]{slide_bg1}}     %\setbeamertemplate{footline}[ifttheme]          \mode<presentation>          \begin{frame}         \frametitle{Eulerian Salt Flux Decomposition}              \only<1-2>{\begin{itemize}             \item Subtidal Volume discharge rate $Q_f$: through a cross=section A  \\             $Q_f = \langle\int u.dA \rangle$             \item Salt transport rate $F_s$ through a cross-section A \\             $F_s = \langle \int uS.dA \rangle$         \end{itemize}}             \onslide<2->Sub-tidal salt flux decomposed into three parts               \onslide<2->\begin{align*}             F  & = \langle \int(u_0+u_E+U_T)(s_0+s_E+s_T)dA \rangle \\                 & \approx \langle \int(u_0s_0+u_Es_E+u_Ts_T)dA \rangle \\                 & = \redub{Q_fs_0}{\mathclap{\text{     River flow     }}} +                   \redub{F_E}{\substack{\text{Exchange}\\\text{shear dispersion}}} +                   \redub{F_T}{\substack{\text{tidal osciallatory}\\\text{salt transport}}}         \end{align*}              \onslide<3->\begin{itemize}             \item $u_0$ and $s_0$ tidally and cross-sectionally averaged             \item $u_E$ and $s_E$ tidally averaged and cross-sectionally varying              \item $u_T$ and $s_T$ tidally and cross-sectionally varying         \end{itemize}          \end{frame}          \begin{frame}     \frametitle{Age of Water under dye from all Rivers}              \only<1-3>{\begin{tikzpicture}         \centering             \node [](0,0)(start){ hello2};     %       \draw [step=0.5cm,thin,dotted] (-5,-4) grid(5,4);     %       \node [circle]at (-4.5,0){0};     %       \node [circle,radius=0.9cm,fill=red!30,] at (-4.5,0)(a){};             \draw [red,fill=red!30](-4.3,-0.2)circle(0.1cm);             \draw [red,fill=red!30](-3.3,0)circle(0.1cm);             \draw [red,fill=red!30](-2.5,-0.7)circle(0.1cm);             \draw [red,fill=red!30](-4.,-0.8)circle(0.1cm);             \draw [red,fill=red!30](-4.,-1.2)circle(0.1cm);             \draw [red,fill=red!30](4.3,1.6)circle(0.1cm);             \draw [red,fill=red!30](3.3,2.7)circle(0.1cm);             \draw [red,fill=red!30](1.6,3.5)circle(0.1cm);             \draw [red,fill=red!30](1.3,3.5)circle(0.1cm);                   \node [rectangle,text width=4cm,red] at (5.5,3) (return) {$Q_2 = 169 A^{0.616}$     \linebreak Mason et. al. 1998};             \node [rectangle,text width=4cm,red,visible on =<2->] at (5,0) (return) {Smaller near the source     \linebreak Increases away from the source};             \draw [red,visible on =<3->](-3.3,-1.5) circle(0.7cm);%wolf bay small age         \end{tikzpicture}}                  \only<4-5>{\begin{tikzpicture}             \node [](0,0)(start){hello1};     %   \draw [step=0.5,dotted](-5,-4) grid (5,4);          \node [rectangle,text width=4cm,red] at (5,0) (return) {Scale different from    \linebreak 2 year inflows};          \node [rectangle, text width =4cm, red,visible on =<5->] at (5,-2) {Maximum age of 120 days};          \draw [red] (1.5,-1) ellipse(1cm and 0.6cm);          \node [rectangle, text width=4cm, red] at (5,3) {Minimum 7 day flow over 10 yr. interval};         \end{tikzpicture}}                    %             \only<6-7>{\begin{tikzpicture}             \node [](0,0)(start){hello};             \node [rectangle, text width=4cm, red, visible on =<7->] at (5,3) {Mean inflows over 10 yr. interval};             \end{tikzpicture}}     \end{frame}          \end{document}


title: How to stop my letterhead from increasing dinbrief top margin?

text: I have a letterhead macro created with tikz that I'm using with _dinbrief_ but it pushes the entire content of the letter down by 15mm. This would not be a big deal but when I print it out it no longer positions the address properly for DIN standard envelopes with an address window. The fold lines on the left side should be 105 and 210mm from the top, respectively. Here is a minimal example:               % !TEX encoding = UTF-8 Unicode     \documentclass[10pt]{dinbrief}     \usepackage[a4paper]{geometry}     \usepackage{german}     \usepackage{fontspec}     \usepackage{tikz}          \def\briefkopf{     %header     \begin{tikzpicture}[remember picture,overlay]         \node[yshift=-8cm] at (current page.north west)           {\begin{tikzpicture}[remember picture, overlay]             %\draw[help lines] (0, 0) grid (10cm, 8cm);             \draw[line width=0.1cm, color=red] (0, 7cm) --(15cm, 7cm);             \node[above right] at (15cm, 5.5cm) {\Huge{\textbf{Prof. Dr. Dr.}}};            \end{tikzpicture}           };     \end{tikzpicture}     }          \signature{Prof. Dr. Dr. Billiam Bohegas}     \place{Popeldorf}     \address{\briefkopf}     \date{\today\hspace*{31 mm}}          \begin{document}     \begin{letter}{Bob Derp \\ Herp GmbH \\ Alexanderstrasse 3 \\ 10178 Berlin \\ Germany }       \opening{Dear Bob}            Lorem ipsum ominus dominus etc.            \closing{Mit freundlichen Grüßen,}     \end{letter}          \end{document}      ![enter image description here](http://i.stack.imgur.com/qbR2K.jpg) I am not dead-set on using dinbrief. It's a bit old but I do like that it prints the fold lines and positions the address for standard envelopes. I am open to using any other classes as long as they can do those two things.


title: Lack of relevant documentation when using texdoc

text: A few weeks ago I stumbled into this problem when trying to use `texdoc` for the very first time. That issue has been resolved. I completely reinstalled TeXLive 2012, using the `complete` scheme to ensure that I am installing documentation as well. `texdoc -l <packagename>` works fine now, it just fails to find relevant documentation pretty often (e.g. for packages `tikz`, `animate`, which seem pretty important), showing nothing, or listing documentation to packages which are similar but not the "core" or "main" package... for example, I get the following output:               ~> texdoc -l tikz      1 /usr/local/texlive/2012/texmf-dist/doc/latex/hf-tikz/hf-tikz.pdf        = Package documentation      2 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf        = Package documentation      3 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf        = Package documentation      4 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdf        = Package documentation      5 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-inet/tikz-inet-doc.pdf        = Package documentation      6 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf        = Package documentation      7 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-timing/tikz-timing.pdf        = Package documentation      8 /usr/local/texlive/2012/texmf-dist/doc/latex/sa-tikz/sa-tikz-doc.pdf      9 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-qtree/README        = Readme     10 /usr/local/texlive/2012/texmf-dist/doc/latex/sa-tikz/README        = Readme     11 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-3dplot/README        = Readme     12 /usr/local/texlive/2012/texmf-dist/doc/latex/hf-tikz/README        = Readme     13 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-inet/README        = Readme     14 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-timing/README        = Readme     15 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-cd/README        = Readme     16 /usr/local/texlive/2012/texmf-dist/doc/latex/hf-tikz/README.txt     17 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-dependency/README     18 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-dependency/AUTHORS     19 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-3dplot/CHANGELOG     20 /usr/local/texlive/2012/texmf-dist/doc/latex/tikz-dependency/VERSION     Please enter the number of the file to view, anything else to skip:      Lots of interesting stuff, but the main PGF/TikZ manual seems not to be there. Another example would be the package `beamer` for creating slides:               ~> texdoc -l beamer      1 /usr/local/texlive/2012/texmf-dist/doc/latex/beamer-tut-pt/tutorialbeamer.pdf        = [pt]      Please enter the number of the file to view, anything else to skip:       A nice tutorial, but I don't speak portuguese, which is the language this document is in... :) Another example would be the command `texdoc -l animate`, which output consists of only a Polish (!) .html file. Since my whole purpose for using `texdoc` was to **avoid** manually searching the web for documentation of (La)TeX packages (which might not correspond to the version of the packages I have installed...), I would like to know: Is this lack of appropiate documentation for important packages a technical, or rather a political issue? (e.g. the package developers don't include the documentation on CTAN because of licensing issues, or beacuse they want to attract traffic to their websites) or did I screw up (again) and didn't install the documentation properly? Could anyone using TL2012 run a check on their own system and compare the output of `texdoc`?


title: Why do TikZ help lines appear black in PDF?

text: Why is it that TikZ `help lines` are rendered `very thin` and `gray` (as desired) in DVI, but appear black and of normal thickness in PDF? This is true even of the TikZ manual itself. My Adobe Reader is up-to-date. Is there any way to make the help lines render properly in PDF?


title: Simple way to draw a triangle with one side and two angles given

text: What's the simplest way to draw an triangle (not as a node!) with tikz with a given side and two given angles?


title: Cannot use caption in Wrap figure

text: I'm getting an error when caption in wrap figure. My codes are:                \documentclass[12pt,MSc,twoside]{muthesis}     \usepackage{graphicx}     \usepackage{float}     \restylefloat{figure}     \usepackage{wrapfig}     \begin{document}     \begin{wrapfigure}{r}{0.5\textwidth}       \centering       \includegraphics[scale=0.7]{pictures/amazon_result.png}       \caption{Amazon categories after a search}       \label{fig:amazon_result}     \end{wrapfigure}     \end{document}      The error I'm getting is:               Undefined control sequence \caption{Amazon categories after a search}      Any suggestion?


title: Trying to update apacite (Debian problem?)

text: my Debian Wheezy seems to have an old version of apacite package. A file like               \documentclass{book}     \usepackage[natbibapa]{apacite}     \begin{document}     \end{document}      will produce a message, in its log               Package: apacite 2009/03/01 v4.05 APA citation     ! LaTeX Error: Unknown option `natbibapa' for package `apacite'.      Debian's apt-get says               texlive-bibtex-extra is already the newest version.      So I believe I should update it manually. I followed instructions from http://mirror.jmu.edu/pub/CTAN/biblio/bibtex/contrib/apacite/README and How can I manually install a LaTeX package (Debian/Ubuntu Linux)?               root@draper:/usr/local/share/texmf/apacite# cd ..     root@draper:/usr/local/share/texmf# mktexlsr     mktexlsr: Updating /usr/local/share/texmf/ls-R...      mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEMAIN...      mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...      mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...      mktexlsr: Updating /var/lib/texmf/ls-R...      mktexlsr: Done.      But then I try to recompile and it seems that apacite was not updated.               Package: apacite 2009/03/01 v4.05 APA citation     ! LaTeX Error: Unknown option `natbibapa' for package `apacite'.      Any suggestions on what else to try? * * * Following cfr's suggestion, I moved them following the table at http://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages               root@draper:/usr/local/share/texmf# tree     .     ├── apacite     │   └── README     ├── bibtex     │   └── bst     │       └── apacite     │           ├── apacann.bst     │           ├── apacannx.bst     │           ├── apacite.bst     │           └── apacitex.bst     ├── ls-R     └── tex         └── latex             └── apacite                 ├── apa5ex.bib                 ├── apacdoc.sty                 ├── apacite.adx                 ├── apacite.and                 ├── apacite.aux                 ├── apacite.bbl                 ├── apacite.blg                 ├── apacite.drv                 ├── apacite.dtx                 ├── apacite.dtx.old                 ├── apacite.dvi                 ├── apacite.idx                 ├── apacite.ilg                 ├── apacite.ins                 ├── apacite.ins.old                 ├── apacite.log                 ├── apacite.pdf                 ├── apacite.sty                 ├── apacite.toc                 ├── apacxmpl.tex                 ├── dutch.apc                 ├── english.apc                 ├── finnish.apc                 ├── french.apc                 ├── german.apc                 ├── greek.apc                 ├── ngerman.apc                 ├── norsk.apc                 ├── spanish.apc                 └── swedish.apc          7 directories, 36 files     root@draper:/usr/local/share/texmf# texhash     texhash: Updating /usr/local/share/texmf/ls-R...      texhash: Updating /var/lib/texmf/ls-R-TEXLIVEMAIN...      texhash: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...      texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN...      texhash: Updating /var/lib/texmf/ls-R...      texhash: Done.     root@draper:/usr/local/share/texmf#       Trying               kpsewhich apacite      returns nothing. * * * Still stumped with apacite, so I decided to see other ways to solve the main problem. Main problem was how to comply with a rule in 6th edition of APA's Publication Manual regarding references to multiple author works (all authors should be cited the first time, later they can be cited as Smith et al. ) This works:               \usepackage[longnamesfirst]{natbib}     ... (and assuming citations are like \citet{} and \citep{} )     \bibliographystyle{newapa}


title: Problem with producing A0 poster with beamer: only small part of it is displayed

text: I'm working with the newest version of Beamer and am trying to produce a A0 poster from a TEX document (with Kile). The compilation to a DVI file and then to PDF (via DVItoPDF) seems to work fine. But... the produced DVI file consists of a single blank page while the PDF file apparently displays only a small, even tiny part of the poster. I repeated the procedure with an exemplary file, downloaded from here: http://www-i6.informatik.rwth-aachen.de/~dreuw/download/beamerposter- example.zip But the result is the same. Can anybody help me to solve the problem?


title: Macros, htlatex with/without "xhtml, mathml"

text: Following mwe.tex works with `htlatex mwe.tex`. With `htlatex mwe.tex "xhtml, mathml"` it gives correct C_5 but `\S` is like S5, not S_5.               \documentclass{article}          \usepackage{xspace}     \renewcommand*{\S}{\ensuremath{S_5}\xspace}          \begin{document}          Group $C_5$ is subgroup of \S.          \end{document}      Too many things to tweak with htlatex... For example `"xhtml, mathml"` fixed problem that I asked two days ago.


title: PGFPlots: Math operations within coordinates yields error?

text: How can I use math operators within PGFPlots coordinates? When I write something like `\draw (axis cs: 0,0) -- (axis cs: sqrt(3),1)`, I get the following error: > ¡ Argument of \pgfplots@evalute@tikz@coord@system@interface@ has an extra }. However, `\draw (0,0) -> ({sqrt(3)},1)` works fine in Tikz, as long as `sqrt(3)` is written inside of braces `{}`. If I add the braces to the PGFPlots code, I get the follwing error: > ¡ Package PGF Math Error: Could not parse input '-{sqrt(3)}/2' as a floating > po int number, sorry. The unreadable part was near 'sqrt(3)/2'.. ![](http://i.imgur.com/20uiErH.png) MWE:               \documentclass{memoir}          \usepackage{pgfplots}     \pgfplotsset{         compat=1.8,         standard/.style={             axis x line=center,             axis y line=center,             axis z line=center,             xlabel={$x$},             ylabel={$y$},             zlabel={$z$},             axis line style=help lines,             every axis/.append style={font=\tiny},         }     }          \begin{document}          {\centering     \begin{tikzpicture}[scale=1]              \begin{axis}[             standard,             hide z axis,             xmin=-1.25, xmax=1.25,             ymin=-1.25, ymax=1.25,             zmin=0, zmax=2.5,             xtick={-1,1},             xticklabels={$-2r$,$2r$},             ytick=\empty,         ]             % Draw Circle             \draw[blue] (axis cs: 0,0,0)                 ellipse [                 x radius=1, y radius=1];                  % Draw Square             \draw[green]    (axis cs: -0.86602540378,0.5,0) --                         (axis cs: -0.86602540378,-0.5,0) --                         (axis cs: -0.86602540378,-0.5,1) --                         (axis cs: -0.86602540378,0.5,1) --                         (axis cs: -0.86602540378,0.5,0);     %   I can't use math operators within PGFPlots apparently?     %       \draw[green]    (axis cs: -sqrt(3)/2,1/2,0) --     %                   (axis cs: -sqrt(3)/2,-1/2,0) --     %                   (axis cs: -sqrt(3)/2,-1/2,1) --     %                   (axis cs: -sqrt(3)/2,1/2,1) --     %                   (axis cs: -sqrt(3)/2,1/2,0);         \end{axis}          % However, I am able to do so in regular Tikz, as long as I put functions like sqrt() in braces...         \draw[green]    (-{sqrt(3)/2},1/2,0) ->                     (-{sqrt(3)/2},-1/2,0) ->                     (-{sqrt(3)/2},-1/2,1) ->                     (-{sqrt(3)/2},1/2,1) ->                     (-{sqrt(3)/2},1/2,0);     \end{tikzpicture}     }          \end{document}


title: Customizing indexes in songs package

text: I'm going to build a songbook with the "songs" package. I already did some formatting to fit the songbook to my needs. Now I'm going to customize the indexes of the songbook. In a title-index               \newindex{titleidx}{cbtitle}     \indexsongsas{titleidx}{\thepage}     \renewcommand{\songchapter}{\chapter*}     [...]     \showindex{Title index}{titleidx}      I want to add the author of the song to each entry. Actually it's looking like, e. g.:               Lady in Black ..................... 4     Lemon Tree ........................ 6      But I want it to look like, e. g.:               Lady in Black (Uriah Heep) ........ 4     Lemon Tree (Fool's Garden) ........ 6      Can somebody help me with this problem?! :) I hope it's clear, I can't upload images right now. :( Thank you very much and best wishes! // Edit: Full Example (using the latest songs package).               \documentclass[11pt,a4paper,twoside,ngerman]{book}     \usepackage[bookmarks]{hyperref}     \usepackage[chorded]{songs}     \usepackage[utf8x]{inputenc}     \usepackage{textcomp}     \usepackage{geometry}     \usepackage{lastpage}     \usepackage{lmodern}          \renewcommand{\familydefault}{\sfdefault}          \geometry{a4paper, top=15mm, left=20mm, right=20mm, bottom=22.5mm, headsep=2.5mm, footskip=5mm}     \setlength{\headheight}{10mm}          \renewcommand{\lyricfont}{\sffamily}     \renewcommand{\chorusfont}{\sffamily}          \songcolumns{1}     \songpos{0}          \newindex{titleidx}{cbtitle}     \indexsongsas{titleidx}{\thepage}     \renewcommand{\idxtitlefont}{\sffamily\normalfont}          \begin{document}     \showindex{Title index}{titleidx}          \begin{songs}{titleidx}          \beginsong{Lady In Black}[by={Uriah\ Heep}]       \beginverse*         {\nolyrics Intro: \[Em Em]}       \endverse       \beginverse         \memorize         She \[Em]came to me one morning, one \[Em]lonely Sunday morning         Her \[D]long hair flowing in the \[Em]mid-winter wind         I \[Em]know not how she found me, for in \[Em]darkness I was walking         And de\[D]struction lay around me, from a \[Em]fight I could not win         \[Em]Ahh Ahh Ahh \[D]Ahh \[Em]Ahh ... \[Em]Ahh \[D]Ahh \[Em]Ahh \[Em] \[Em] \[Em]       \endverse       \beginverse*         ...       \endverse     \endsong          \beginsong{Lemon Tree}[by={Fool's\ Garden}]       \beginverse*         \nolyrics{Intro: \[Em] ~ \[Bm] ~ \[Em] ~ \[Bm] ~ \[Am] ~ \[Bm] ~ \[Em]}       \endverse       \beginverse         I'm \[Em]sitting here in the \[Bm]boring room         It's \[Em]just another rainy Sunday \[Bm]afternoon         I'm \[Em]wasting my time, I got \[Bm]nothing to do         I'm \[Em]hanging around, I'm \[Bm]waiting for you         But \[Am]nothing ever happens \[Bm] and I \[Em]wonder       \endverse       \beginverse*         ...       \endverse     \endsong          \end{songs}          \end{document}      // Edit 2: Oh, there is another, maybe easy to solve, problem: I want to change the (1-column) width of the "Title Index". Actually it's not wide enough, some entries are broken by the end of line. Any idea?! :)


title: use the same bibliography bib file for two latex source (main and appendix)

text: I have a main latex source and its bibtex file: `./main.tex` and `./main.bib` In `main.tex` the bibliography is included as `\bibliography{main}`, then the pdf is correctly produced with all the needed references at the end. Then I have a subdirectory and the appendix latex file: `./add/appendix.tex`, which is a standalone latex source. In this document I would like to share (some of) the `../main.bib` references, but keeping the main document numbering. Besides, a bibliographic section is only required in the main. Including `\bibliography{../main.bib}` and running `$ bibtex appendix` gets the wrong numbering actually, restarting from one. My problem is actually a bit different of what described here: Multiple LaTeX files using the same bibliography or here: Two Bibliographies: one for main text and one for appendix but still I did not find the solution.


title: Can I have different chapter heading styles based on part of book?

text: For example - if I use `\frontmatter`, `\mainmatter`, `\appendix`, and `\backmatter`... can I use `titlesec` to format the "chapters" differently? I use tikz to style my main chapters and appendix headings, but I want the table of contents and other things in the front to not use the same style, as well as my index at the back. This is what I'm using right now for my chapter header style.               \documentclass{book}     \usepackage{tikz}     \usepackage[explicit]{titlesec}     \usepackage{geometry}     \geometry{       left=2.50in,       right=0.75in,       top=1.25in,       bottom=1.25in,       marginparwidth=1.5in,       marginparsep=.5in,       asymmetric}          \makeatletter     \titleformat{\chapter}       {\normalfont\sffamily\Huge\scshape}       {}       {0pt}       {         \thispagestyle{empty}    % Remove page number on new chapters         \begin{tikzpicture}[remember picture,overlay]           \node[yshift=-3cm] at (current page.north west)             {\begin{tikzpicture}[remember picture, overlay]               \draw[fill=cyan!50] (0,-1) rectangle                 (25cm,3cm);               \draw[fill=cyan!50] (0,-24) rectangle                 (25cm,-25cm);               \ifttl@label% <---------------------- Added condition on \ifttl@label                 \node[anchor=west,xshift=.236\paperwidth,yshift=-.01\paperheight,rectangle]                     {\color{white}\LARGE \MakeUppercase{\@chapapp} \Huge\thechapter};               \fi% <------------------------------- end condition on \ifttl@label              \end{tikzpicture}             };         \end{tikzpicture}\endgraf         \vskip-.7cm         \color{cyan}\Huge\raggedright\leftskip-1cm         \MakeUppercase{#1}\endgraf         }     \titlespacing*{\chapter}{0pt}{10pt}{0pt}{}     \makeatother     \begin{document}       \chapter{test}          \end{document}


title: What are these x and y scaling options for a tikzpicture for?

text: I've googled myself silly already, but I still can't really pinpoint it enough to reassure myself what exactly those options do: What does `x=0.25cm` in the MWE stand for? Does it stand for: "every `cm` measure you'll give in this `tikzpicture`-environment will be scaled, in this specific case by the factor `0.25`"? So what about measures given in `pt` or other units? **MWE**               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     lmodern,     }     \usepackage[T1]{fontenc}     \usepackage{     tikz     }                    \begin{document}     \begin{center}     \begin{tikzpicture}[x=0.25cm,font=\sffamily\small]     %     \draw[style=help lines,step=0.5cm] (0,0) grid (16,4);     %     \draw[->,thick] (-0.1,0) -- (6.5,0) node[anchor=west]{x};     \draw[->,thick] (0,-0.1) -- (0,6.5) node[anchor=south]{y};     %     \foreach \x in {0,1,...,6} \draw [thick](\x cm,-2pt) -- (\x cm,2pt) node[anchor=north,yshift=-2pt]{\x};     \foreach \y in {0,1,...,6} \draw [thick](-2pt,\y) -- (2pt,\y) node[anchor=east,xshift=-2pt] {\y};     %     \begin{scope}[color=black]     \filldraw (1,1) circle (0.08cm) node (A) {} node[anchor=north,fill=white,yshift=-0.1cm] {A};     \filldraw (6,6) circle (0.08cm) node (B) {} node[anchor=west,fill=white,xshift=5pt] {B};     \end{scope}     \draw[very thick] (A) -- (B);     \end{tikzpicture}     \end{center}     \end{document}


title: LuaTeX colored boxes with rounded corners

text: What is the simplest way to make coloured boxes with rounded corners in `luatex`? With `xelatex` I used `pstricks` and it was simple, but with `luatex` it is not working.


title: inserted graphics appears out of the page!

text: This is my code:               \begin{figure}     \begin{center}          \includegraphics[scale=1]{C:/Users/Prathmesh/Desktop/research papers/runoff water harvesting/LaTex/waterpan.png}          \caption{SILT TRAP}     \end{center}     \end{figure}      I tried almost everything I could find online.


title: Separate nomenclatures for different chapters

text: How can I have different nomenclatures for different chapters? I use Chapterbib for the reference. However I could not find any thing for nomenclature.               %-----------------          \documentclass[12pt]{report}           \usepackage{amssymb}      \usepackage[sectionbib]{natbib}%makes reference as a section (not a chapter)      \usepackage{chapterbib}% makes possible to have references at the end of each chapter      \usepackage{hyperref}%heperlinks references      \usepackage[capitalise]{cleveref}      \usepackage{framed}      % Framing content      \usepackage[intoc]{nomencl}     % Nomenclature package [intoc] in table of content      \makenomenclature      \setlength{\nomitemsep}{-\parskip} % Baseline skip between items           \begin{document}           \include{chapter1}      \include{chapter2}      \end{document}               %---------------------------     \chapterfirst chapter}     this is for a reference \citep{Biot1956a}          $F=ma$     \nomenclature{$m$}{Mass}%     \bibliographystyle{model2-names}     \bibliography{bib}     \printnomenclature          %---------------------------     \chapter{second chapter}     this is for a reference \citep{Biot1956b}          $F=ma$     \nomenclature{$F$}{Force}%     \bibliographystyle{model2-names}     \bibliography{bib}     \printnomenclature                 %-------------                 @article{Biot1956b,          author = {Biot, Maurice A.},           doi = {10.1063/1.1722402},          journal = {Journal of Applied Physics},          number = {5},            pages = {459},          title = {{Theory of Deformation of a Porous Viscoelastic Anisotropic Solid}},           volume = {27},             year = {1956}            }            @article{Biot1956a,            author = {Biot, Maurice A.},          journal = {Journal of Applied Mechanics},          pages = {91--96},           title = {{General Soloutions of the Equations of Elasticity and Consolidation for            a Porous Material}},           volume = {78},           year = {1956}            }


title: metapost and pdflatex

text: I'm trying to use figures created with metapost in a TeX document compiled with `pdflatex`, but I have some troubles. I did as advised here, but it fails! My code is this :               \documentclass[10pt]{article}       \usepackage{graphics}       \begin{document}       \includegraphics{figures/TryMetaPost.1}       \end{document}      With plain `latex` I have no problem but with `pdflatex` I obtained:               LaTeX Error: Unknown graphics extension: .1      I tried also with `.mps` and in this case I have (with `pdflatex`)               Cannot convert figures/TryMetaPost1.mps from MPS to PDF      Does anybody see my mistake?


title: How to suppress the operation of a luatex-defined macro on a string if the string is part of macro or a label

text: I'm working towards creating a lualatex-based package that lets users automatically suppress the use of ligatures (for now, ff, fi, fl, ffi, ffl, and ft) for selected words. (For background see this question.) The package is set to work with both English and German language words. The MWE below, which is a very much stripped down version of the package, shows how to suppress the insertion of ligatures for four selected words -- two English, two German. (The correct hyphenation of the selected words -- both at the non-ligation points and potentially elsewhere in the words -- is also taken care of. The little red dashes in the output image, generated by of the showhyphens package, indicate where LuaLaTeX thinks it's OK to insert hyphenation breaks.) Here's the problem I'm trying to solve: The package's main routine (implemented as a lua callback function that operates on process_input_buffer) turns out to be way too greedy for its own good: It tries to perform string substitution operations on _everything_ in the input buffer, including the names and arguments of TeX macros. To make the package suitable for field work, I have to find a way to prevent the main text translation macro from operating on   * string snippets that are parts of TeX macros and on   * the arguments of select instructions, such as `\label` and `\ref`.  (There are probably other cases where the substitution shouldn't be applied either.) Are there any conditionals -- or how might one go about creating such conditionals? -- to check if a string for which a match is found is part of either an already-defined macro or an argument of a `\label` or `\ref` (or `\varioref`, `\cref`, etc) macro? Alternatively, how might one prevent outright the substitution macro from operating on (i) any TeX macros and (ii) the arguments of selected macros? A couple of quick illustrations of these problems:   * Suppose that there's a macro in a document named named `\bookshelfful`. (Not exactly likely, of course, but this is just meant to provide an example.) For such a macro, I don't want my macro operating on it, as it would end up being transformed into `\bookshelf \nobreak\hskip0pt \discretionary{\char\hyphenchar\font}{}{\kern\KERN} \nobreak\hskip0pt ful`. Arggh.   * Should there be a label in the document named "`thm:cufflinks`" (yeah, sure!), it must not get translated into "`thm:cuff\nobreak\hskip0pt \discretionary{\char\hyphenchar\font}{}{\kern\KERN} \nobreak\hskip0pt links`".  Double arrgh.               % !TEX TS-program = lualatex     \documentclass[12pt]{article}     \usepackage[margin=1in]{geometry}     \usepackage[no-math]{fontspec}        %% work around a bug in luaotfload (cf. http://tex.stackexchange.com/q/47031/5001)     \setmainfont[Renderer=Basic]{Latin Modern Roman}     \defaultfontfeatures{Ligatures={TeX,Common}}     \usepackage{showhyphens} % show all hyphenation points     \usepackage{luatexbase,luacode}          \begin{luacode*}          do         local replace = {}              local filter = function ( buf )            for key, val in pairs ( replace ) do                buf = string.gsub ( buf, key, val )            end            return buf         end              function translateinput ( arg1,arg2 )  -- with discretionary hyphen            replace[arg1]=string.gsub(arg2,"|%*|",[[\kernandhyph ]])         end              function enablefilters()            luatexbase.add_to_callback('process_input_buffer', filter, 'filter')         end          end          \end{luacode*}          \newcommand\enableinputtranslation{          \directlua{              enablefilters()          }      }          \newcommand{\kernandhyph}{%        \nobreak\hskip0pt%        \discretionary{\char\hyphenchar\font}{}{\kern\KERN}%        \nobreak\hskip0pt%     }          \newcommand\translateinput[2]{          \directlua{              translateinput ( "\luatexluaescapestring{#1}",                              "\luatexluaescapestring{#2}" )          }     }          % some substitution rules     \translateinput{lfful}{lf|*|ful}    %% e.g., shelf-ful(s) bookshelf-ful(s)     \translateinput{fflink}{ff|*|link}  %%       cuff-link(s)     \translateinput{iflich}{if|*|lich}  %%       reif-lich begreif-lich tarif-lich     \translateinput{uflauf}{uf|*|lauf}  %%       auf-laufen     \translateinput{ufform}{uf|*|form}  %%       auf-formen          \newlength\KERN      \setlength\KERN{0.07ex}  % trial value for amount of kern to be inserted          \begin{document}     shelfful cufflink unbegreiflich Auflaufform           \quad \emph{versus}      \enableinputtranslation  % turn on input translation          shelfful cufflink unbegreiflich Auflaufform     \end{document}      ![enter image description here](http://i.stack.imgur.com/lfdAi.png)


title: beamer with \index creates empty lines in the index

text: I try to build an index in two columns at the end of my slides. To do so, I use the definitions from Create index entries in beamer with 2 columns (latex- community.org):               \documentclass{beamer}      \usepackage{makeidx}      \makeindex      \newenvironment{theindex}       {\let\item\par %definitions for subitem etc       }{}      \newcommand\indexspace{}           \begin{document}           \begin{frame}{test 1}      \index{Laplace}Laplace transform is... \LaTeXe\ can make you happy!      \index{Test}      \end{frame}           \begin{frame}{test 2}      \printindex \end{frame}      \end{document}      However, sometimes the index entry including the page numbers fits in one line, but nevertheless LaTeX makes an empty line after the entry. It looks pretty ugly... What can I do to avoid the empty lines?


title: Vertical space before and after custom environment

text: I've created custom environment with these commands:               \usepackage{relsize}     \newcounter{annotation}     \def\theannotation{\arabic{annotation}}     \newenvironment{annotation}         {\refstepcounter{annotation}\noindent\begin{smaller}             \makebox[1.5cm][l]{NOTE \theannotation}}         {\end{smaller}}      One thing is still missing here - vertical spaces before, and after it. I can add `\vspace`, but using two consecutive annotations doubles `\vspace` (after first and before second annotation). So my question is: how to create vertical space before and after custom environment, so that it doesn't double itself when using with other vertically spaced environments (e.g. `description`). Example usage:               \begin{annotation}         \lipsum[1]     \end{annotation}     \begin{description}         \item[aaa] asdfasdfasdf     \end{description}     \begin{annotation}         \lipsum[1]     \end{annotation}      * * * I've tried lockstep's solution, wchich worked fine for empty document, but fails in my document. I've found, that simply adding line of text causes error. Sample code:               \documentclass[twoside,titlepage]{article}     \usepackage{relsize}     \newcounter{annotation}     \newenvironment{annotation}         {\addvspace{\baselineskip}\refstepcounter{annotation}             \noindent\begin{smaller}             \makebox[1.5cm][l]{UWAGA \theannotation}}         {\end{smaller}\addvspace{\baselineskip}}     \usepackage{lipsum}     \begin{document}         fail                % remove this line, and everything works         \begin{annotation}             \lipsum[1]         \end{annotation}         \begin{annotation}             \lipsum[1]         \end{annotation}     \end{document}      Error msg: `Something's wrong--perhaps a missing \item., l.12 \begin{annotation}` * * * solved using this `\par` is needed before `\addvspace{\baselineskip}`


title: How can I reduce the font size in beamer instead of wrapping text?

text: I am really new to LaTeX/beamer, and now I am coming into this question: In MS powerpoint, when a textbox is filled it can automatically shrink the font size, instead of going over the page. Is there a way that in beamer we can also do this?


title: Can I make a command not gobble spaces?

text: (I'm using ConTeXt, but I suspect the answer will lie in plain TeX.) I've created an environment that takes one argument `myBufferName`, and stores its contents in a buffer of that name. Unfortunately, all spaces after the argument are gobbled, and I don't know how to stop this properly. The usual gobble-stoppers, `{}` and `\`, end up in the buffer verbatim if I put them after `\dostartbuffer`.               \startluacode         -- Print contents of buffer b to stdout and tmp.txt for inspection         function printbuffer(b)             -- Once to stdout ...             print('====')              print(buffers.getcontent(b))             print('====')                  -- ... and once to tmp.txt.             jan = io.open('tmp.txt', 'w')             jan:write(buffers.getcontent(b))             jan:close()         end     \stopluacode          % This environment stores its contents in a custom-named buffer.     % (The #1 merely allows whitespace, like this: `\startMyBuffer [name]`)     \def\startMyBuffer#1[#2]         {% Store the name --- we'll need it when defining stopMyBuffer          \def\myBufferName{#2}          % ConTeXt macro that defines the \start... and \stop... commands.          \dostartbuffer[#2][startMyBuffer][stopMyBuffer]}          %% % Hack I currently use: a dot at the end of the definition.     %% \def\startMyBuffer#1[#2]     %%     {\def\myBufferName{#2}     %%      \dostartbuffer[#2][startMyBuffer][stopMyBuffer].}     %% %                                                   ^     %% %                                                   |     %% % I later remove the dot using Lua.          % On closing the buffer, print its contents.     \def\stopMyBuffer         {\ctxlua             {printbuffer('\myBufferName')}}          % Test it. You'll see the first line loses its leading whitespace :-(     \starttext     \startMyBuffer[myNameIsNobody]         Andra moi ennepe,             mousa,          polutropon.     \stopMyBuffer     \stoptext      When you try running it, this gives               Andra moi ennepe,             mousa,         polutropon.      as the buffer's contents.


title: \midrule before \endhead in longtable environment with booktabs package

text: I am trying to use `longtable` with repeating headers on each page. For example:               Column 1 & Column 2 & Column 3 \endhead \midrule      results in an ugly multi-page table. The horizontal rule separating the headers from the data appears only on the first page. In an attempt to fix it:               Column 1 & Column 2 & Column 3 \midrule \endhead      I'd get the following error upon compile:               ! Misplaced \noalign.     \midrule ->\noalign                          {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...     l.6 ...) & Column 2 & Column 3 \midrule                                                        \endhead      How do I make the horizontal rule also appear on every page? Here's a screenshot of the part of the manual where `\endhead` is described: ![alt text](http://i.stack.imgur.com/NySGW.png)


title: Changing the font size of all the sections or sub sections

text: \documentclass[10pt]{article}     \usepackage{lmodern}     \usepackage{lipsum}     \begin{document}     \section{Hello World}     {\fontsize{20}{24}\selectfont     \lipsum[4]     }     \lipsum[1]     \end{document}      Here I can modify the font for a section , How write a command for all the sections or subsections to have the font size specified?


title: Why there is no output when invoking \usebox{\mybox} outside the minipage in which \sbox{\mybox}{contents} is invoked?

text: \documentclass{article}     \newsavebox{\mybox}     \begin{document}               \fbox{%     \begin{minipage}{5cm}     \sbox{\mybox}{from first minipage}     \usebox{\mybox}     \end{minipage}%     }          %nothing rendered     \fbox{\usebox{\mybox}}          \vspace{3cm}          \fbox{%     \begin{minipage}{5cm}     %nothing rendered     \usebox{\mybox}     \end{minipage}%     }          \end{document}


title: Extented titles for subsections gets my TOC all pilled-up

text: Some of the sections and subsections of my work has extended titles, i.e.: \section{bla bla bla ....... bla}, so when pdflatex creates my pdf, the toc gets all pilled-up, as show in picture. ![pilled-up toc](http://i.stack.imgur.com/YNaln.jpg) How can I prevent this?


title: How do I remove the space before the first item and after the last item of an enumerate list inside a longtable?

text: I have several longtables in one document and they all have a fairly big gap before the first item and after the last item of every enumerate-list. Does anyone know how to get rid of that?               \documentclass[11pt,a4paper]{article}          \usepackage{longtable}          \begin{document}          \begin{longtable}{c|p{10cm}}         \hline         \textbf{test} & \textbf{test}\\         \hline         \hline         test          &              \begin{enumerate}               \item test               \item test            \end{enumerate} \\         \hline          \end{longtable}          \end{document}      ![output](http://i.stack.imgur.com/TXDcL.jpg)


title: color a column red in a table

text: When I try to color a column red, it seems that white lines begin to emerge. Additionally the `\hline` changes width depending on how you zoom into the document in pdf format. It look as if the color infringes on the `\hline`? Here is a MWE:               \documentclass[11pt,english]{article}     \usepackage{longtable,lscape}     \usepackage{color, colortbl}     \usepackage{bigstrut}     \begin{document}          \begin{table}     \resizebox{\textwidth}{!}{     \begin{tabular}{c>{\columncolor{red}}c}     a                  & b          \bigstrut[b]\\     \hline     1 & 2 \\     3 & 4 \bigstrut[t]\\     \hline      5 & 6\\     \end{tabular}     }     \end{table}     \end{document}      Any ideas as to what is going on here?


title: How to switch easily between normal font and sans-serif font for maths?

text: I would like to switch easily to sans-serif font, even for the mathematical symbols. Is it possible? So far is what I have tried :               \documentclass{article}          \def\mySfFamily{\fontfamily{cmbr}\selectfont\sffamily}     \def\N{\mathbf{N}}     \def\R{\mathbf{R}}     \def\Q{\mathbf{Q}}     \def\Z{\mathbf{Z}}     \def\C{\mathbf{C}}               \begin{document}          \begingroup     \mySfFamily     This should be sans-serif : $\R, \Q, \N, \Z, \C$ are sets.     \endgroup          \bigskip          This should be serif : $\R, \Q, \N, \Z, \C$ are sets.          \end{document}      ![enter image description here](http://i.stack.imgur.com/h7y5o.png) But as you see, it doesn't work for maths. I have chosen the font `\fontfamily{cmbr}` because of this post.


title: Using Kile and PdfLaTeX with eps files

text: I'm aware there's a lot of questions regarding using eps files as graphics in pdfLaTeX, and have tried many 'fixes'/'get arounds' based on answers I've read on this forum (amongst others), but still can't get it to work. I'm using Kile 2.1.0 on Ubuntu 12.04 LTS, having recently come from using TeXShop on a Mac. I've read that in order to get Kile to compile my .tex file using PdfLaTeX I need to insert:               \usepackage{epstopdf}      in the preamble, which I have, but it still doesn't work. For example in a test .tex file I have included `\usepackage{epstopdf}` in the preamble, and then in the body written:               \begin{figure}[h!]     \begin{center}     \includegraphics[scale = 0.7]{pic1.eps}     \caption{\textit{A graphic.}}     \label{Label1}     \end{center}     \end{figure}      Upon running PDFLaTeX in Kile I get:               ! Package pdftex.def Error: File `pic1-eps-converted-to.pdf' not found.      Which would suggest to me that epstopdf is doing SOMETHING, maybe putting the converted eps file somewhere silly? Thanks in advance, Olie


title: How do I properly write ā in LaTeX?

text: I need to cite the journal "Sankhyā: The Indian Journal of Statistics" in a paper. I would like to draw the ā character properly (i.e., I'd prefer, if possible, to avoid using some hack, such as `\bar` or `\overline`). _Question_ : How do I properly write ā in LaTeX? I didn't have luck with Detexify (after several attempts in both in capital and lowercase) nor The Comprehensive LATEX Symbol List (searching the file for "ā" and "india" revealed no hits).


title: Free PDF viewer allowing to measure in a document?

text: Adobe Acrobat allows to measure distances in a document, which is helpful and saves making test printouts when trying to get a certain layout right point- perfect. Is there a free (as in beer) PDF viewer that allows the same? Or can a PDF viewer actually be relied on to reproduce distances closely enough on-screen, to the point where one could measure distances directly on the screen?


title: Remove Line Breaks and Underline Text

text: I'm writing a thesis template that follows a style guide. According to the guide, the title of the document needs to appear in several places. In some places, the title text must be broken into several lines and in other places it must be underlined. Ideally the user of the template would only need to input the title once while defining the best way to break the text into multiple lines. For a title input this way, I'm having trouble removing the line breaks and applying the underlining without screwing up the text somehow. This is what I have so far.               \documentclass{article}     \usepackage[normalem]{ulem}          \newcommand{\removelinebreaks}[1]{%           \begingroup\def\\{\relax}#1\endgroup}          \newcommand{\Title}[1]{\gdef\TheTitleField{\removelinebreaks{#1}}}          \Title{This Is A Long Title\\       That Should Be Broken\\       Up Into Several Lines\\       Lets Add A Few Lines \\       To Make This Even Longer     }          \begin{document}          \TheTitleField          \vspace{1in}          \uline{\TheTitleField}          \end{document}      ![enter image description here](http://i.stack.imgur.com/YUMox.png) What's the best way to remove the line breaks and apply underlining such that the text will break where it supposed to?


title: ConTeXt TABLEs, how to automatically fit table size with text with \setupTABLE

text: When I type something like               \bTABLE     \bTR\bTD abc\eTD\bTD abcdefg\eTD\eTR     \bTR\bTD 123456789\eTD\bTD 1234\eTD\eTR     \eTABLE      in ConTeXt, it automatically sets the column widths to fit the text contained within, like so: ![What I want](http://i.stack.imgur.com/hkMYP.png) This is the exactly the output that I want to see. The problem I have is that, in some documents, I use the \setupTABLE command elsewhere to set the TABLE width manually. After I've done that, I don't know how to revert _back_ to this default behaviour. This is what I mean: ![What I don't want](http://i.stack.imgur.com/3iiAx.png) What's the proper way of achieving the effect I'm looking for?