title: Renewing section with bfseries and makeuppercase on LyX

text: I want to define a new section style with the following               \renewcommand\section{%       \@startsection{section}{1}                     {\z@}%                     {-3.5ex \@plus -1ex \@minus -.2ex}%                     {2.3ex \@plus.2ex}%                     {\normalfont\normalsize\bfseries}%     }      But whenever I try a \MakeUppercase                               {\normalfont\normalsize\bfseries\MakeUppercase}%      I get an error "File does not exist". If, instead, I place a \uppercase                               {\normalfont\normalsize\bfseries\uppercase}%      The section title at the ToC is not uppercase. Any ideas on this? Minimum (not so minimal) working example with all the packages I'm using to define all the things I need.               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[10pt,twoside,english,portuges,brazil]{article}     \usepackage{mathptmx}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[a5paper]{geometry}     \geometry{verbose,tmargin=2cm,bmargin=1.5cm,lmargin=2.5cm,rmargin=1.5cm}     \usepackage{babel}     \usepackage{refstyle}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{esint}     \usepackage{nomencl}     % the following is useful when we have the old nomencl.sty package     \providecommand{\printnomenclature}{\printglossary}     \providecommand{\makenomenclature}{\makeglossary}     \makenomenclature     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}     \hypersetup{pdftitle={DESENVOLVIMENTO DE UM MODELO DE INTERFACES MATERIAIS COM DANO NÃO-LOCAL ENRIQUECIDO COM X-FEM},      pdfauthor={David Roza Jose},      pdfsubject={Dissertação de Mestrado - UFSC}}     \usepackage{breakurl}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.          \AtBeginDocument{\providecommand\figref[1]{\ref{fig:#1}}}     \RS@ifundefined{subref}       {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}}       {}     \RS@ifundefined{thmref}       {\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}       {}     \RS@ifundefined{lemref}       {\def\RSlemtxt{lemma~}\newref{lem}{name = \RSlemtxt}}       {}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \numberwithin{equation}{section}     \numberwithin{figure}{section}     \numberwithin{table}{section}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{placeins}          %Indent first paragraph     \usepackage{indentfirst}          %Set empty style at cleardoublepage     \let\origdoublepage\cleardoublepage     \newcommand{\clearemptydoublepage}{%     \clearpage     {\pagestyle{empty}\origdoublepage}%     }          \let\cleardoublepage\clearemptydoublepage          %Setting section style     \renewcommand\section{%       \@startsection{section}{1}                     {\z@}%                     {-3.5ex \@plus -1ex \@minus -.2ex}%                     {2.3ex \@plus.2ex}%                     {\normalfont\normalsize\bfseries}%     }          %Setting subsection     \renewcommand\subsection{%       \@startsection{subsection}{2}                     {\z@}%                     {-3.25ex\@plus -1ex \@minus -.2ex}%                     {2.3ex \@plus.2ex}%     %                {1sp}% No space after subsubsections                     {\normalfont\normalsize\MakeUppercase}% normal size, boldface     }          %Redefining sub-subsection     \renewcommand\subsubsection{%       \@startsection{subsubsection}{3}                     {\z@}%                     {-3.25ex\@plus -1ex \@minus -.2ex}%                     {2.3ex \@plus.2ex}%                     {\normalfont\normalsize\bfseries}% normal size, medium     }          %New section pages with plain style     \let\stdsection\section     \renewcommand*{\section}{\cleardoublepage{\thispagestyle{plain}}\stdsection}          %Citations     \usepackage[alf]{abntex2cite}          \usepackage{graphicx}          %Auto-break long equations     \usepackage{breqn}     \gdef\wrap@breqn@environ#1#2{     \expandafter\let\csname breqn@oldbegin@#1\expandafter\endcsname\csname #1\endcsname     \expandafter\let\csname breqn@oldend@#1\expandafter\endcsname\csname end#1\endcsname     \expandafter\gdef\csname breqn@begin@#1\endcsname{%     \expandafter\let\csname #1\expandafter\endcsname\csname breqn@oldbegin@#1\endcsname%     \begin{#2}%     }     \expandafter\gdef\csname breqn@end@#1\endcsname{%     \expandafter\let\csname end#1\expandafter\endcsname\csname breqn@oldend@#1\endcsname%     \end{#2}%     \expandafter\let\csname #1\expandafter\endcsname\csname breqn@begin@#1\endcsname%     \expandafter\let\csname end#1\expandafter\endcsname\csname breqn@end@#1\endcsname%     }     \expandafter\let\csname #1\expandafter\endcsname\csname breqn@begin@#1\endcsname     \expandafter\let\csname end#1\expandafter\endcsname\csname breqn@end@#1\endcsname     }     \wrap@breqn@environ{equation}{dmath}     \wrap@breqn@environ{equation*}{dmath*}          %Setting headers     \usepackage{fancyhdr}          \fancyhf{}     \fancyhead[OC]{\leftmark}     \fancyhead[OR]{\thepage}     \fancyhead[EC]{\leftmark}     \fancyhead[EL]{\thepage}          %Changing some titles     \addto\captionsbrazil{%        \renewcommand{\contentsname}%         {\begin{center}{\normalsize{SUMÁRIO}}\end{center}}%      }               \addto\captionsbrazil{%        \renewcommand{\listfigurename}%         {\begin{center}{\normalsize{LISTA DE FIGURAS}}\end{center}}%      }          \renewcommand\nomname{Lista de Símbolos}     \addto\captionsbrazil{%     \renewcommand{\refname}%     {\begin{center}{\normalsize{REFERÊNCIAS}}\end{center}}%      }          %TOC with empty style     \addtocontents{toc}{\protect\thispagestyle{empty}}               %Lists without style     \newcommand{\emptypage}[1]{%       \cleardoublepage       \begingroup       \let\ps@plain\ps@empty       \pagestyle{empty}       #1       \cleardoublepage}          \makeatother          \begin{document}          \pagestyle{fancy}          \section{This should be capitalized here and at ToC}          Anything          \end{document}


title: With beamer, prevent animation from restarting on 2-step slide

text: I have a slide with an animation with autoplay on the top and two graphs at the bottom. The graphs appear in two stages. At the moment, the animation restart when I go to the second step, how I can prevent that? To be clearer, I would like the animation to stay on its last frame (instead of restarting) as I advance to the second part of the slide. The code so far:               \frame{     \frametitle{Example 1}     \begin{center}     \includemovie[autoplay,mouse]{10em}{7em}{Pics/bar_cubic.avi}     \end{center}          \hfill          \begin{columns}        \hfill        \centering        \column{0.5\textwidth}        \includegraphics<1>[width=1.\textwidth]{Pics/reaction_bar_quad.pdf}        \includegraphics<2>[width=1.\textwidth]{Pics/reaction_bar.pdf}        \hfill        \centering        \column{0.5\textwidth}        \includegraphics<1>[width=1.\textwidth]{Pics/energy_bar_quad.pdf}        \includegraphics<2>[width=1.\textwidth]{Pics/energy_bar.pdf}        \hfill     \end{columns}     } %%%


title: Wrong point when barycentric coordinates in triangle add up to one

text: I am trying to plot points on a triangle using areal coordinates (barycentric coordinates that add up to one). Using TikZ and the barycentric coordinate system, however, this gives the wrong point in some cases, as shown in the following example:               \documentclass{minimal}     \usepackage[margin=2mm,papersize={55mm,50mm}]{geometry}     \usepackage{tikz}          \begin{document}                               \noindent     \begin{tikzpicture}          \coordinate (L1) at (0:0);     \coordinate (L2) at (0:5);     \coordinate (L3) at (60:5);          \draw[thick] (L1) -- coordinate[midway](md3) (L2)                       -- coordinate[midway](md1) (L3)                       -- coordinate[midway](md2) (L1) -- cycle;           \draw[very thin,dotted] (L1) -- (md1) (L2) -- (md2) (L3) -- (md3);          \fill[color=blue]  (barycentric cs:L1=8,L2=1,L3=1) circle (0.04);     \draw[color=red]   (barycentric cs:L1=0.8,L2=0.1,L3=0.1) circle (0.04);     \draw[color=green] (barycentric cs:L1=0.08,L2=0.01,L3=0.01) circle (0.04);          \fill[color=blue]  (barycentric cs:L1=1,L2=8,L3=1) circle (0.04);     \draw[color=red]   (barycentric cs:L1=0.1,L2=0.8,L3=0.1) circle (0.04);     \draw[color=green] (barycentric cs:L1=0.01,L2=0.08,L3=0.01) circle (0.04);          \fill[color=blue]  (barycentric cs:L1=1,L2=1,L3=8) circle (0.04);     \draw[color=red]   (barycentric cs:L1=0.1,L2=0.1,L3=0.8) circle (0.04);     \draw[color=green] (barycentric cs:L1=0.01,L2=0.01,L3=0.08) circle (0.04);          \end{tikzpicture}     \end{document}      which results in ![triangle with points using barycentric coordinates](http://i.stack.imgur.com/J1mnZ.png) All points have two equal coordinates, so they should lie on the medians. When the coordinates add up to 0.1 or 10 the points plot ok, but when they add up to 1 the points are clearly wrong (and not even by the same amount if you permute the coordinates). This only happens for some points, e.g. point (0.6,0.2,0.2) plots ok. Can someone explain why this inaccuracy appears? I have tried to understand what `\tikzdeclarecoordinatesystem{barycentric}` does in tikz.code.tex, where a division is probably to blame, but it is not clear to me.


title: XeLaTeX: xtabular package fails to work

text: I am trying to make my resume neat and tidy. So, going for `LaTeX/XeLaTex`. Resume Here The problem is, even though I use the `xtab` package to put my long tables across multiple pages, for some reason, the tables get broken even before reaching the bottom margin! I also tried to decrease the bottom margin by using the `anysize` package and `\margin{1cm}{1cm}{0cm}{-10cm}`. But no use. Any way out of this problem?


title: \citep does not work using natbib package

text: The `\citep` command does not display the author and year, instead it displays a number. This is the head file.               \usepackage{times}     \usepackage{a4wide}     \usepackage{fancyheadings}          \usepackage{natbib} % various citation commands     \usepackage{siunitx}          \usepackage{epsfig}     \usepackage{pifont}     \usepackage{fancybox}     \usepackage{amssymb}      This is the end, references are stored in DM.bib               \bibliographystyle{apalike}     \bibliography{DM}      Can anyone tell me what is wrong with it? I want to cite author and year, but not just a number.


title: Work out maximum possible characters per line

text: I'm dynamically generating LaTeX source and compiling it. The documents contain only tables and each table cell in each column has the same width. I need to work out how many columns are required and figured the best way to do this would be to work out the total possible characters in a line and divide it by the (known) cell width. What is the best way to go about this?


title: Space between emphasized word and parenthesis

text: When I have the following text               (\emph{WSJ})      the J will touch the parenthesis in an ugly way (my opinion). Is LaTeX supposed to keep some space there? How can I get some more space there in a a nice way?


title: How to draw a line between two paragraphs of my text?

text: Its just as the title sys. Thanks.


title: Fine tuning the ccfonts package

text: A little background the package ccfonts does not have any bold characters hence when you use it it loads the computer modern bold. Now there is an option for this package: "boldsans" when it uses a condensed sans-serif version of computer modern for bold. Now here is what I am after: I want cmbright bold to be used instead. How can I make that happen? EDIT: I want the bold used in math mode to be cmbright as well! EDIT-2: Nobody? :(


title: Passing multiple arguments to an \ifthenelse routine

text: I have recently discovered LaTeX, trying to experiment wiht it to prepare a complicated industrial document (laboratory test instructions). A typical set of instructions contains a long sequence of standard tests (each identified by a numbering system). Since some tests are repeated a number of times in a test sequence, I have created a system shown in the attached sample, where a single instruction such as `\TestDetails{107}` calls the necessary instructions for test 107. However none of the routines describing the tests have arguments. I am now facing the problem to introduce options in some of the tests (ie test 107 is to be performed in condition A at some point of the sequence, and condition B at another point, which would require changes in the instructions..) Is this possible with the ifthenelse option taken? if not, what would be the recommended approach?               \documentclass[a4paper, 11pt]{report} % Mode production     \usepackage[utf8]{inputenc} % UTF-8 encoding for code editing     \usepackage[T1]{fontenc} % Usual fonts     \usepackage{ifthen} % Use of logic tests     %----------------------------------------------     \newcommand{\SandAndDust}[0]{%     Some text for sand and dust test.     } %          \newcommand{\VoltageProof}[0]{%     Some text for voltage proof text.     } %          \newcommand{\TestDetails}[1]{%     \ifthenelse{\equal{#1}{100}}{\SandAndDust}{}%     \ifthenelse{\equal{#1}{107}}{\VoltageProof}{}%     }%          \begin{document}          \TestDetails{100}          \TestDetails{107}          \end{document}


title: MikTeX 2.9: libertine suddenly broken

text: MikTeX 2.9: 'libertine' seems to have broken at some point today (9 Dec leading into 10 Dec). The following code should produce some material in libertine:               \documentclass[a4paper,10pt]{article}     \usepackage[no-math]{fontspec}     \usepackage{libertine}          \begin{document}     1234567890 This text should be typeset in Libertine     \end{document}      Expected output: ![enter image description here](http://i.stack.imgur.com/lTvQR.png) Actual output: ![enter image description here](http://i.stack.imgur.com/m7BPy.png) (I should stress that I have seen the output of a specific TeX file change over the course of the day, without any modifications to the file -- I was getting the right output in the afternoon, and now it's not working.) Completely uninstalling and reinstalling MikTeX didn't fix the problem. Further, different repositories seem to have different packages. For example, anorien.csc.warcick.ac.uk has the 'libertine' package, whereas mirror.ox.ac.uk has libertine-legacy and libertineotf. (Edit: I just checked back, and it has now switched to 'libertine'.) For what it's worth, the `xelatex` error messages are as follows: > LaTeX Font Warning: Font shape `EU1/fxl/m/n' undefined (Font) > using`EU1/lmr/m/n' instead on input line 5. > > LaTeX Font Warning: Font shape `EU1/fxl/bx/n' undefined (Font) > using`EU1/fxl/m/n' instead on input line 6. Does anyone know what's happening with the repositories? Is anyone able to get libertine to work on MikTeX?                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX        expl3.sty    2012/11/21 v4332 L3 Experimental code bundle wrapper      l3names.sty    2012/09/24 v4230 L3 Namespace for primitives     l3bootstrap.sty    2012/07/16 v3991 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2012/11/10 v4306 L3 Basic definitions      l3expan.sty    2012/08/28 v4149 L3 Argument expansion         l3tl.sty    2012/09/28 v4244 L3 Token lists        l3seq.sty    2012/09/09 v4212 L3 Sequences and stacks        l3int.sty    2012/09/26 v4237 L3 Integers      l3quark.sty    2012/11/04 v4268 L3 Quarks        l3prg.sty    2012/09/09 v4212 L3 Control structures      l3clist.sty    2012/09/09 v4212 L3 Comma separated lists      l3token.sty    2012/11/01 v4251 L3 Experimental token manipulation       l3prop.sty    2012/09/09 v4212 L3 Property lists        l3msg.sty    2012/09/09 v4212 L3 Messages       l3file.sty    2012/09/09 v4212 L3 File and I/O operations       l3skip.sty    2012/11/04 v4260 L3 Dimensions and skips       l3keys.sty    2012/11/02 v4256 L3 Experimental key-value interfaces         l3fp.sty    2012/11/10 v4305 L3 Floating points        l3box.sty    2012/11/04 v4259 L3 Experimental boxes     l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2012/08/03 v4049 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2012/11/09 v4298 L3 Experimental additions to l3kernel        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       xparse.sty    2012/11/21 v4332 L3 Experimental document command parser     fontspec-patches.sty    2012/05/06 v2.2b Advanced font selection for XeLaTeX/Lu     aLaTeX     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX     fontspec-xetex.sty    2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaL     aTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth     er characters in Unicode lower plane      eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive        xetex.def    2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)          fontspec.cfg     libertine.sty    2011/06/06 - 5.1.2: Font libertine - (License GPL) Michael Nie     dermair     lettrine.sty    2012/07/20 v1.63 (Daniel Flipo)     lettrine.cfg         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)          fxl.inc          fxb.inc          fxk.inc          fxi.inc        t3cmr.fd    2001/12/31 TIPA font definitions      ***********


title: A center environment for plain TeX

text: In TeX, one can center a single line of text with `\centerline`. How would one implement a center justification environment for a single long line of text in plain TeX without the addition of any packages. That is, the first line of TeX should justify to the center. Any wrapping text should also justify to the center.


title: Correct way to typset esssup (essential supremum)

text: What is the correct way to typeset essential supremum, with the limits underneath the operator? My first try was `\operatorname{ess}\sup\limits_{x\in[0, 1]}`, but this puts the `x\in[0, 1]` under the `sup` only. The best I got was using `\operatorname*{ess\,sup}_{x\in[0, 1]}`, but I'm not sure if `\,` is the correct amount of space. Is there some way to trick `\limits` to working here?


title: \tag{} causes line break in align environment. how to prevent?

text: while using the `leqno` and `fleqn` options of `amsmath` package `tag`s tend to cause line-breaks: MWE:               \documentclass{article}      \usepackage[leqno, fleqn]{amsmath}     \usepackage{mhchem}          \begin{document}          \begin{align}     \cee{     MgO_{(s)} + 2HCl_{(aq)} &-> MgCl2_{(aq)} + H2O_{(l)} \tag{Exp 1}\\      Mg_{(s)} + 2HCl_{(aq)} &-> MgCl2_{(aq)} + H2_{(g)} \tag{Exp 2}     }     \end{align}          \end{document}        This prints: ![enter image description here](http://i.stack.imgur.com/nRWLI.png) How can I prevent this? Any help is appreciated.


title: Classicthesis chapter number gets black

text: ![Image is here](http://i.stack.imgur.com/tqRMY.jpg) The chapter number is black, but it should be light gray. I have not modified anything in the layout files and have downloaded fresh one. Has anyone got a clue where I can change to adjust the color back to light gray?


title: table floating outside Beamer slide

text: The problem is , I created a Table in Beamer, its not fitting in the slide, some part of it was floating outside the slide area. Any fix for this please


title: What is the drawback (if any) when loading pst-all?

text: I am curious whether or not there is a drawback when we always load `pst-all`. Is there such a drawback or side effect?


title: Citation Style Language (CSL)

text: How can I use Citation Style Language(CSL) in LaTeX Bibliography? It seems fantastic, there is 2,803 Citation Style right now in Zotero Style Repository. > The Citation Style Language (CSL) is an XML format for describing the > formatting of in-text citations, notes and bibliographies. CSL offers: > >   * An open format that may be used by any application >   * The ability to write compact and robust styles >   * Extensive support for style requirements >   * Automatic style localization >   * Easy distribution and updating of styles >   * A fast growing library with thousands of freely available styles >


title: Suggestions for making a Jeopardy game?

text: I've been looking to make Jeopardy-type games in LaTeX. After some googling and tinkering, I haven't found anything satisfactory (I've looked into these links: Jeopardy Review, CTAN, AcroTeX, and this one here). I'm not good enough with TeX to do this myself, and it seems such thing is out there somewhere, but I can't find it. I've found tons of decent Jeopardy games, but nothing which take math code (for example, BYOJeopardy is great for Jeopardy but bad for math, whereas the other things I linked are great for math but not good for Jeopardy). I suspect this would be done with beamer (which I have plenty of experience with).


title: Invisible citations

text: Is there a simple way to make citations created by `\cite{ref1}` invisible in the final manuscript (so that you can produce one version with the citations and a separate one without them)?


title: Make macros with random (but specific) output

text: I try to find a way to make a               \newcommand      so that it has different outputs, that it chooses randomly. In the best case the macro should also avoid word repetitions (something like, only choose this word if it hasnt been used for 50 words). In this macro I want to group similar words, I use a lot in the document. For example if I often write the same name, it should sometimes just print the family name and other times the full name. **Edit** another example: the macro should print "the group" or "the group of people" or any different synonym, so that I just have one macro for this pool of words.


title: Tikz with positioning does not work with DVI

text: I have the following Tikz picture:               \begin{tikzpicture}       \node (a) {A};       \node [below=2cm of a] (b) {B};     \end{tikzpicture}      When I compile this code with PDF-LaTeX, I get the expected result: "B" appears 2 cm below "A". When I compile the exact same code with plain LaTeX, in the DVI file, "A" and "B" are in the same position, mashed together. In the PS file, after another re-compilation, they appear correctly again. Is there some way or workaround to work with PGF/Tikz with positioning straight with the DVI preview?


title: Todonotes problem: No line connecting notes to text

text: When using the `todonotes` package, all notes are missing correct lines. That is, instead of having a line connecting the note and the text, the line connects to the note itself (with default color you cannot see this, since both the line and the background of the note has the same color; resulting in no line). See code below and the result it produces. What can the problem be? * * *               \documentclass[11pt,reqno]{article}     \usepackage{todonotes}     \author{name}          \begin{document}     \title{Title}     \maketitle          \section{Introduction}     Bla bla bla \todo{where is the line?} Bla blah          More Blah, \todo{and now?} blah           \end{document}       ![example of failed todonotes](http://i.stack.imgur.com/dS5lT.png)


title: All Tikz text overlapping

text: All of the Tikz examples I've tested have the same issue, where text is all in the same place, as opposed to the nodes where it should be. For example:                \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,           thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]                \node[main node] (1) {1};           \node[main node] (2) [below left of=1] {2};           \node[main node] (3) [below right of=2] {3};           \node[main node] (4) [below right of=1] {4};                \path[every node/.style={font=\sffamily\small}]             (1) edge node [left] {0.6} (4)                 edge [bend right] node[left] {0.3} (2)                 edge [loop above] node {0.1} (1)             (2) edge node [right] {0.4} (1)                 edge node {0.3} (4)                 edge [loop left] node {0.4} (2)                 edge [bend right] node[left] {0.1} (3)             (3) edge node [right] {0.8} (2)                 edge [bend right] node[right] {0.2} (4)             (4) edge node [left] {0.2} (3)                 edge [loop right] node {0.6} (4)                 edge [bend right] node[right] {0.2} (1);         \end{tikzpicture}      Comes out displayed as: ![No text on any nodes](http://i.stack.imgur.com/IaWkw.png) And in this example in particular, all of the text is lumped together behind the nodes like so: ![Texted lumped together](http://i.stack.imgur.com/MKb8l.png) These are unaltered examples from the Tikz site, and I've tried putting them in barebones .tex documents to no avail. I'm on Ubuntu 12.04 and I installed TeXLive from tug, but I was experiencing the same issue with the repository version. I'm using xdvi to display the documents. Any help would be greatly appreciated.


title: How to force natbib citation to respect general page margins

text: When citing with double surnames in 'Harvard style' with the `natbib` package, it sometimes happens to have the start of the citation at the end of one line. It seems that `natbib` doesn't allow line-brakes inside a double surnames (even when there is a space between the names). So the question arises, how is it possible to avoid this problem? An example, of the practical consequence of this behavior can be seen below: ![enter image description here](http://i.stack.imgur.com/eDmAE.png) I'm new to LaTeX, use a complex thesis template, and don't know how to reduce the margins, in order to reproduce the situation in the screenshot before. Therefore the minimal example code requires further alignment settings. Would be very thankful if you consider a try to solve the problem.               \documentclass[11pt]{article}          \usepackage[authoryear, numbers, comma, sort&compress]{natbib} %     \usepackage{verbatim} %          \begin{filecontents*}{\jobname.bib}          @article{mochales2009,      author = {Mochales Palau, Raquel and Ieven, Aagje},      title = {Funny Article About the Name of the Elephant},      journal = {Elephant Intelligence and Human Reactions},      year = {2009},      numpages = {22},      publisher = {Serious Publisher},      address = {Western Pacific, Easter Islands},     }          \end{filecontents*}          \begin{document}          Other argumentation based issues are ambiguity of theory, ambiguity of argumentation itself and subjectivity of the interpretation of written arguments \citep[p. 21]{mochales2009}. They used the structured part of the Araucaria corpus.          \end{document}


title: Formatting chapter headings using the titlesec package

text: I'm trying to do a very simple task but I'm a beginner in LaTeX, so I have some doubts. I'd like to change the chapter style. Instead of Chapter 1 Introduction I'd like to have **C H A P T E R 1** (bold, centered, underlined and one single space between the letters) Introduction. Can someone help me with this?


title: Change Verbatim Font To PCR

text: I'm writing a document using LaTeX, and I would like to use the PCR font inside of a verbatim block. This question is almost identical to mine, but when I try to apply it to use PCR, I can't get it to work. **This is what I am trying:**               % From the question I linked above:     \makeatletter     \newcommand{\verbatimfont}[1]{\def\verbatim@font{#1}}%     \makeatother          ...          \verbatimfont{pcr}     \begin{verbatim}     This should be in pcr.     \end{verbatim}      It simply outputs: > pcrThis should be in pcr. It works fine with `\verbatimfont{\scshape}`, but I can't get it to work with an actual custom font. Do I need to make my own `\pcr` command to achieve this? Thanks in advance!


title: Backups for tlpkg during tlmgr update

text: Just now I decided to see what is the content of `/usr/local/texlive/2013/tlpkg/backups`. There are 447 `tar.xz` files using around 500mb of disk space. Is it safe to delete all those files? I use `tlmgr` once a week.


title: how to cite a report and working paper?

text: I'm facing following errors. I want to cite a certain report in my paper, but it is not working.   1. There were undefined references.   2. Citation 'jeff2000' undefined. Here's the MWE:               \documentclass[10pt,a4paper]{article}      \usepackage[utf8]{inputenc}      \usepackage{amsmath}      \usepackage{amsfonts}      \usepackage{fancyhdr}      \usepackage{amssymb}      \usepackage{apacite}      \bibliographystyle{apacite}      \begin{document}      \cite{Jeff2000}     \bibliography{RefEAINew}      \end{document}       `RefEAINew.bib` contains               @report{Jeff2000,     author = {Jeff Borland, and Peter Dawkins, and David Johnson, and Ross Williams},     title = {Returns to Investment in Higher Education},     institution = {University of Melbourne},     year = {2000},     }


title: Error with newcommand and \def

text: Can anyone ples help with this problem:               \documentclass[fontsize=12pt,paper=a4,headsepline]{scrartcl}       \usepackage{chemfig,chemmacros}       \def\nc{\arrow{0}[,0]}            \begin{document}       What it is:       \schemedebug{true}       \schemestart       \chemfig{A}       \chemsign{+}       \chemfig{A}       \arrow{->}       \chemfig{C}       \schemestop            What I want:       \schemedebug{true}       \schemestart       \chemfig{A}\arrow{0}[,0]       \chemsign{+}\arrow{0}[,0]       \chemfig{A}       \arrow{->}       \chemfig{C}       \schemestop            the usage of arrow{0}[,0] is very annoying, so I tried this:       %\schemedebug{true}       %\schemestart       %\chemfig{A}\nc       %\chemsign{+}\nc       %\chemfig{A}       %\arrow{->}       %\chemfig{C}       %\schemestop       \end{document}        But all I get is this error:               %! Undefined control sequence.     <recently read> \node


title: xindy: merge-rule to ignore leading numbers

text: I use texindy to generate an index. There are several indexed terms with a leading number. I want these terms to be sorted as if the leading numbers weren't there. This I attempted to achieve with the following merge-rule in my xindy stylesheet:               (merge-rule "^[0-9]+ (.*)" "\1" :eregexp)      Texindy is invoked like this:               texindy --debug level=2 -L czech -M lang/czech/utf8 -M stylesheet.xdy indexfile.idx      However, the result suggests the rule doesn't get applied: terms with a leading number are sorted according to the number, which results in them being at the very beginning of the index. It seems there might be an issue with rule precedence, as xindy applies some rules to normalize numbers included in terms by zero-padding them. The log sample below documents complete processing of one term with leading number.               apply rules once: '1 Kron 29, 10- 13' => '0000001' ' Kron 29, 10- 13'     apply rules once: ' Kron 29, 10- 13' => 'NIL' 'NIL'     apply rules once: 'Kron 29, 10- 13' => 'NIL' 'NIL'     apply rules once: 'ron 29, 10- 13' => 'NIL' 'NIL'     apply rules once: 'on 29, 10- 13' => 'NIL' 'NIL'     apply rules once: 'n 29, 10- 13' => 'NIL' 'NIL'     apply rules once: ' 29, 10- 13' => 'NIL' 'NIL'     apply rules once: '29, 10- 13' => '0000029' ', 10- 13'     apply rules once: ', 10- 13' => 'NIL' 'NIL'     apply rules once: ' 10- 13' => 'NIL' 'NIL'     apply rules once: '10- 13' => '0000010' '- 13'     apply rules once: '- 13' => 'NIL' 'NIL'     apply rules once: ' 13' => 'NIL' 'NIL'     apply rules once: '13' => '0000013' ''     Final merge-rule result: '1 Kron 29, 10- 13' -> '0000001 Kron 0000029, 0000010- 0000013'      How to solve this? EDIT: minimal example: document (document.tex):               \documentclass[a4paper]{article}          \usepackage[utf8]{inputenc}          \usepackage{multind}     \makeindex{index}          \begin{document}          This paragraph contains term without a number:      Term\index{index}{Term}          This paragraph contains term beginning with a number:     1st Term\index{index}{1 Term}          Let's add a random\index{index}{random} word to the index.          \printindex{index}{The Testing Index}          \end{document}      xindy stylesheet (stylesheet.xdy):               ;; ignore leading numbers when sorting and grouping     (merge-rule "^[0-9]+ (.*)" "\1" :eregexp)      commands to compile:               pdflatex document     texindy -M stylesheet.xdy index.idx     pdflatex document      expected result: index with two letter groups, R and T, with "Term" and "1 Term" under T actual result: index with three letter groups: R, T and default (no letter). "1 Term" falls into default.


title: Add dot to the end of section numbering in PDF bookmarks

text: I have dots at the end of section, subsection, etc. titles using the `secdot` package. And I'd like to insert a dot at the end of each section number in the PDF bookmarks too (I'm using `hyperref`). Here is a screenshot what I'd like to achieve (see section 5 in the bookmarks on the left ), and a minimal working example (included packages and parts of the preamble which may cause problems, clashes): ![MWE](http://i.stack.imgur.com/zTiSo.png)               \documentclass[12pt]{article}          \usepackage[a4paper, hscale=0.85, vscale=0.85]{geometry}     \usepackage[T1]{fontenc}     \usepackage{url}     \usepackage{hyperref}     \usepackage{xcolor}     \usepackage[dotinlabels]{titletoc}     \usepackage{secdot}          \hypersetup{bookmarks=true,%         bookmarksnumbered=true,%         pdfencoding=unicode,%         colorlinks=true,%         pdfborder={0 0 0},%         linkcolor=red,%         menucolor=green,%         citecolor=blue,%         urlcolor=blue,%         filecolor=blue}          \sectiondot{section}     \sectiondot{subsection}     \sectiondot{subsubsection}     \sectiondot{paragraph}     \sectiondot{subparagraph}          % changing the style of \paragraph and \subparagraph titles, so     % text after \paragraph and \subparagraph are broken into new lines     \makeatletter         \renewcommand\paragraph{%             \@startsection{paragraph}{4}{0mm}%                 {-\baselineskip}%                 {.3\baselineskip}%                 {\normalfont\normalsize\bfseries}}         \renewcommand\subparagraph{%             \@startsection{subparagraph}{5}{0mm}%                 {-\baselineskip}%                 {.3\baselineskip}%                 {\normalfont\normalsize\bfseries}}     \makeatother          \setcounter{secnumdepth}{5}               \begin{document}          \section{section}          section          \subsection{subsection}          subsection          \subsubsection{subsubsection}          subsubsection          \paragraph{paragraph}          paragraph          \subparagraph{subparagraph}          subparagraph          \end{document}      I've started to look into `hyperref`'s code, but I couldn't find the part that I have to modify/patch/renew.


title: Creating a dependency tree (\RequirePackage) for packages used in my document

text: **Is there a way of creating a dependency tree for packages`\RequirePackage`ing each other for those packages used in my document, ideally with the respective required options and version numbers? Are there any tools or packages for this purpose?** This is very important for debugging package options conflicts (see "Package options and \RequirePackage: order of commands and option conflicts?"; see also "What are best practices for package authors to deal with package conflicts?"). For example, I don't need to load `graphicx` explicitly because `dtklogos` (which I'm using) already requires/loads it. In fact `graphicx` also requires/loads `graphics` and also `keyval`, which is incidentally also required/loaded by `microtype`. Etc. I would like to give an example involving package option conflicts, but as the relevant dependencies are cumbersome to figure out and debug, no example is on my mind right now (I've bumped into several, but since they didn't compile, I abandoned them and have forgotten about them); this is one thing this question can actually help to address.


title: equation, equation number and itemize bullet all on the same line

text: I think the following sample says it all. I need to get the item bullet in the right place on the same line as the equation, and have this followed by an normal equation number. Someone asked the same question but the answers all give one of the undesired results exhibited below. This problem crops up a lot if you are writing lists of conditions and some need a text Preamble while some are just equations. Thanks for any help anyone can offer.               \documentclass{article}     \begin{document}          \begin{itemize}     \item This item looks fine in terms of both number and bullet because the bullet sensibly appears on a line with some text on it, preceeding an equation like     \begin{equation}     2+2=4,     \end{equation}     but if there is no text in the item there is no way to get it right, for example     \item     \begin{equation}     2+2=4;     \end{equation}     The bullet is on the wrong line.     \item $\displaystyle 2+2=4;$ \\     No equation number.     \begin{equation}     \bullet \quad 2+2=4.     \end{equation}     Bullet in wrong position.     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/e5dzH.png)


title: Specific layout when adding nornmal text below a tabular in a table-environment

text: > **Possible Duplicate:**   >  Align Note below table I have a tabular inside a table-environment and wish to add some explanatory text directly below the tabular within the float. Of course I know that I should explain the contents of the table in my normal text and will do so. But in this case I need some special information given directly below the tabular. So far, I've come up with the solutuion below. But there are two problems I can't solve.   1. I'd like the text to be justified like the normal text (full-justification, in German "Blocksatz"), neither centered nor left-justified nor right-justified. I haven't found a way to manually set the text justified.   2. I'd like the text to be of the same width as the tabular above and, while justified, be placed directly below the centered tabular. The width of the tabular is not given manually (by the starred tabular-version or the like), but determined by the contents of the tabular. I thought about adding multicolums to the table, but that is only conditionally feasible as I need to set every line break manually and still have no justified text. Is there any way to solve one or preferraby both of these issues?               \documentclass{scrartcl}     \usepackage{blindtext}     \begin{document}     \begin{table}[htbp]     \centering     \begin{tabular}{ll}     some text & some more text\\     some text & which determines the width of the tabular\\     \end{tabular}\\     \blindtext     \caption{Test}     \end{table}     \end{document}


title: n-up printing of beamer slides with empty right-hand side

text: I'm creating a presentation with LaTeX beamer and want to print out some handouts. The handout should fit onto a A4 page and should have the following format. The page is (virtually) split in 4 parts. On the upper and lower left hand side are slides _n_ and _n+1_ , on the upper and lower right hand side should be some lines. So each participant can write some (side)notes on it. How can I realize this?


title: Matching Rotated \hyperref in arbitrarily rotated x-label in Pgfplots

text: Similar to this question: How to make pgfplots vertical labels have proper hyperref erence box? Except, that I am trying to get hyperref working with angled rotated x-axis labels: ![plot](http://i.stack.imgur.com/LksD4.png) ![plot2](http://i.stack.imgur.com/GZJgT.png) Got it working, thanks to @Jake. ![fin](http://i.stack.imgur.com/H3Q27.png) **Update** : Got it sorted with href. Thanks.               \newcommand{\nenameref}[1]{\noexpand\nameref{{#1}}}     \newcommand{\nehref}[1]{\noexpand\href{{#1}}}     \begin{tikzpicture}     \def\labellist{{"\nehref{www.google.com}{google}","\nenameref{testtwo}","reallylonglabel"}},


title: Automatically citing all entries in a class in a bib file

text: I usually add my publications to my CV from my bib file (using biblatex). At first, I used to manually cite each entry, but as the list grows, it's becoming a chore (especially since there are quite a few publications in between my CV updates and I can never seem to remember the chronological order). I would like to be able to tell `biblatex` to scan my bib file, pull out all `@article` entries and cite them under a heading "Journal publications", then all the `@inproceedings` entries and cite them under "Conference proceedings" and so on (i.e., without individually citing them). I can manage naming/styling the sections and headings, but I'm stuck at doing the automatic citing. How can I do this? Here's a very minimal example without the frills to get started: ### The .bib file:               @article{Doe2012a,         author  = {J. Doe},         title   = {Lorem Ipsum -- Part I},         journal = {J. Dolor Sit Am.},         volume  = {1},         pages   = {1--10},         month   = {1},         year    = {2012},     }          @article{Doe2012b,         author  = {J. Doe},         title   = {Lorem Ipsum -- Part II},         journal = {J. Dolor Sit Am.},         volume  = {2},         pages   = {11--20},         month   = {2},         year    = {2012},     }          @book{Doe,         author    = {J. Doe},         title     = {Lorem Ipsum -- Complete Works},         publisher = {{Dolor S. Amet and Sons}},         year      = {2011},     }      ### The .tex file:               \documentclass{article}     \usepackage{biblatex,lipsum}     \addbibresource{path/to/bib/file}          \begin{document}     \section{Lorem Ipsum}     \lipsum[1]     \subsection{Publications}     %Scan the bib file and print all @article entries in descending order here!          \section{Dolor sit Amet}     \lipsum[1]     \end{document}


title: Book in two (or three) languages in LaTeX

text: I am writing a book in two languages: a Russian version and an English version. Is it possible to do this in the same file? Something like `\tltext{Hello world!}{Здравствуй, мир!}`, and mark at the start of the preamble which variant is needed. The idea is that if I needed to change something, I wouldn't have to do it in both files.


I have a question that may be subjective but I will try to make it as less subjective as possible. > Is this the correct way to format a book in LaTeX? What I have done is the following:               Main.tex - This file contains the structure of the book.          Separate file for each chapter:           Chapter1.tex          Chapter2.tex     etc..      Each chapter file is set up in the following way:               \chapter{Chapter name}          \section{Section name}          \subsection{subsection name}      Then these chapter files are added to the main file through `input` Is this the correct way of formatting? Or in other words, is there a more efficient way to do this or am I do this correctly? Can I improve on this? Thanks a lot for your time! EDIT: I am referring to the input files and how they should be structured and if the way I have structured my chapters is also correct.


How can I produce exercises in one part of a LaTeX document with selected answers in another? I could, of course, simply typeset the questions and the answers separately, but this is too likely lead to divergence in the labels for the questions and the answers as the document is edited. What I'd really like is a command that would allow me to typeset exercises at the point at which the command was used and which took an optional argument for a solution to be stored until a final section (chapter, or part) "Selected Exercise Answers". I'd like the questions (and the selected answers) to be labeled in the output by Chapter.Section.Question or even Chapter.Question.


title: Is there a package to pull out Answer Keys from Exercises to the last page?

text: > **Possible Duplicate:**   >  How can I produce exercises in one part of a LaTeX document with selected > answers in another? I am writing a book containing exercises for the readers. To ease writing phase, I will type each question followed by its answer. When the input file is compiled by latex.exe, I want all answers to be moved to the last page. Is there a package to do that?


title: Table of contents not dotfilling?

text: Is this wrong? ![Table of Contents](http://i.stack.imgur.com/BIlh8.png) It seems the ToC does dotfilling only for sections and not subsections. Why is this happening and how can I fix it? I'm using `\tableofcontents` and nothing else to generate this ToC, the document class is `article`. Edit: Yes; I want to fill the space in the sections with dots, from the end of the section title to the beginning of the number, just like how it fills with dots the subsection 5.1 MWE below:                  \documentclass[a4paper,spanish]{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{geometry}     \usepackage[spanish]{babel}     \usepackage{graphicx}      \usepackage{wrapfig}     \usepackage{setspace}     \usepackage[right]{eurosym}     \usepackage{rotating}     \usepackage{ccicons}     \usepackage{multirow}     \usepackage{tabu}     \usepackage{amsmath,amssymb,amsthm,amscd}     \usepackage{amsmath}     \graphicspath{{./Imagenes/}} %Lugar en el que se guardarán las imágenes     \itemsep 1ex     \newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}     \begin{document}          \tableofcontents % Índice          \newpage % Salto de página          \section{Los tres tipos generales de conocimiento} % Sección superior     bar     \section{Superioridad del saber-que}     foo     \section{Lo inefable}     barfoo     \section{Las condiciones de la verdad}     foobar     \section{Las fuentes del conocimiento}     bar     \subsection{La experiencia sensorial}     foo     \end{document}


title: How to do a recursive renewcommand?

text: I'm trying to renew a command in terms of its old definition... something similar to this:               \renewcommand{\vec}[1]{\vec{\mathbf{#1}}}      But this seems to send the interpreter in an infinite loop. How do I do this properly?


title: table header problems with \multicolumn

text: I have been trying to produce some aesthetically appealing tables for my MSc thesis. This link has helped me a lot: Professional-looking tables with alternating row colors? A challenge, however, remains. I really do not know how to use the information presented by the aforementioned link to produce a table with a multiple-line heading. I will try to make things a tad easier to understand with an example: This is the code I have:               \begin{table}[htp]     \begin{center}     \renewcommand{\arraystretch}{1.5}     \begin{tabular}{l r r}     \topline     \headcol statement & \multicolumn{2}{c}{mean rates}  \\     \headcol  & system A & system B \\     \midline           1. statement 1 & \textbf{4.2} & 4.1\\     \rowcol 2. statement 2 & \textbf{3.8} & 3.7 \\           3. statement 3 & \textbf{4.2} & 4.0 \\     \rowcol 4. statement 4 & \textbf{4.3 }& 4.2\\     \bottomlinec     \end{tabular}     \end{center}     \caption[First table]{First table}     \label{tab:statements_group_1}     \end{table}      I used the following definitions (from the previous link)               \documentclass{article}     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{colortbl}% http://ctan.org/pkg/colortbl     \usepackage{amsmath}% http://ctan.org/pkg/amsmath     \usepackage{xcolor}% http://ctan.org/pkg/xcolor     \usepackage{graphicx}% http://ctan.org/pkg/graphicx     \colorlet{tableheadcolor}{gray!25} % Table header colour = 25% gray     \newcommand{\headcol}{\rowcolor{tableheadcolor}} %     \colorlet{tablerowcolor}{gray!10} % Table row separator colour = 10% gray     \newcommand{\rowcol}{\rowcolor{tablerowcolor}} %     % Command \topline consists of a (slightly modified) \toprule followed a \heavyrule rule of colour tableheadcolor (hence, 2 separate rules)     \newcommand{\topline}{\arrayrulecolor{black}\specialrule{0.1em}{\abovetopsep}{0pt}%     \arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \midline consists of 3 rules (top colour tableheadcolor, middle colour black, bottom colour white)     \newcommand{\midline}{\arrayrulecolor{tableheadcolor}  \specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%     \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \rowmidlinecw consists of 3 rules (top colour tablerowcolor, middle colour black, bottom colour white)     \newcommand{\rowmidlinecw}{\arrayrulecolor{tablerowcolor}  \specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%     \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \rowmidlinewc consists of 3 rules (top colour white, middle colour black, bottom colour tablerowcolor)     \newcommand{\rowmidlinewc}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%     \arrayrulecolor{tablerowcolor}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \rowmidlinew consists of 1 white rule \newcommand{\rowmidlinew}   {\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \rowmidlinec consists of 1 tablerowcolor rule     \newcommand{\rowmidlinec}{\arrayrulecolor{tablerowcolor}  \specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}}     % Command \bottomline consists of 2 rules (top colour      \newcommand{\bottomline}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%      \arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%      \newcommand{\bottomlinec}{\arrayrulecolor{tablerowcolor}  \specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%      I was wondering if you could help me find out why part of the header (mean rates) is not coloured in dark grey.


title: Labeling Drawing of Euclidean Vector

text: I would like to know how I would go about labeling the Euclidean vectors in a diagram. For example, if I use the code provided below to draw a diagram which depicts three vectors, how would I label the appropriate vectors as, say, **u** , **v** , and **u** - **v**? I am disappointed by the lack of antialiasing and quality of rasterization of the lines when I view the generated postscript or PDF file using the GNU Document Viewer (for reference, I am using Ubuntu 10.10, 64-bit at the time of this writing). Would using an EPS file instead of providing the following inline commands result in a higher-quality output? If so, could you please recommend an application that can generate these kinds of vector diagrams?               \setlength{\unitlength}{1cm}     \begin{picture}(5,5)     \linethickness{1pt}     \put(0,0){\vector(3,2){3}}     \put(0,0){\vector(2,3){2}}     \put(2,3){\vector(1,-1){1}}     \end{picture}


title: How to fix diferent position of the line (space between the line and a page number and paragraphs) in the header using \pagestyle{uheadings}

text: I have noticed that in the document I am working on the line in the header is changing position page to page. Basically there are two slightly (but notably) different vertical spaces between the line and the page number. I managed to find out that the line's position is different using `\doublespacing` and `\singlespacing`. Here is MWE: (need to be run twice - with `\doublespacing` and `\singlespacing` to see the difference of the line position)               \documentclass[12pt,a4paper,oneside]{mwbk}     \usepackage{enumitem}     \usepackage[cp1250]{inputenc}     \fussy     \addtolength{\textwidth}{1,5cm}     \addtolength{\hoffset}{0cm}     \addtolength{\textheight}{0cm}     \addtolength{\voffset}{0cm}          \usepackage{setspace}     \pagestyle{uheadings}          \usepackage{lipsum}          \begin{document}          \doublespacing         %different position when using \singlespacing     %\singlespacing          \lipsum[1-10]           \end{document}      Have you any idea **how I can fix the position of the line while I am using different spacing in the document** and the line has different position depending on what is in the code -- single or double spacing.


title: Extra table of content in my document

text: How could I produce an extra table of content ? I want to add a TOC describing the content of another document, is that possible in a simple way ? I know I could write the style and everything but I'd like something à la minipage with new sections in it. (edit: I use LaTeX)


title: Replacing labels in EPS file by LaTeX - text not where it should be

text: I am spawning a `.eps` file with `octave` by using this `.m` file:               function dummy     xlim([0 81]);     x = [0:0.01:81];     y=x.^0.5+x.^0.4+x.^0.3+x.^0.2+x.^0.1;     plot (x,y*1.85,"-;aaaa;",'linewidth',2,x,y*1.00,"-;bbbb;",'linewidth',2,x,y*1.25,"-;cccc;",'linewidth',2,x,x/2,"-;dddd;",'linewidth',2);     legend ("location", "northwest");     xlabel ("kkkk");     ylabel ("yyyy");     set (gca (), "xtick",[]);     set (gca (), "ytick",[]);     set (gca (), "fontname","DejaVuSans");     print('-dtex', 'dummy.tex');     endfunction      and including it with this LaTeX "container":               \documentclass[12pt]{article}     \usepackage{psfrag}     \usepackage[dvips]{graphicx,color}     \thispagestyle{empty}              % You can run this by typing the following commands:         %    latex 2dplot.tex         %    dvips -o 2dplot.ps 2dplot.dvi          \begin{document}          % The syntax of the "psfrag" command is:     %    \psfrag{tag}[<posn>][<psposn>][<scale>][<rot>]{replacement}     % See the file pfgguide.ps for full documentation.          \begin{figure}     \psfrag{aaaa}{\small{$y$}}     \psfrag{bbbb}{\small{$s_1 \cdot y$}}     \psfrag{cccc}{\small{$s_2 \cdot y$}}     \psfrag{dddd}{\small{$k(\Sigma + n + g)$}}     \psfrag{kkkk}{\small{$k$}}     \psfrag{yyyy}{\small{$y$}}     \includegraphics{dummy.eps}     \end{figure}               \end{document}      But the `psfrag` replacements show up at bottom left corner of the page.   Running `latex ./dummy.tex` does not yield any errors.


title: pgfplots scale legend position when below xlabel

text: When using matlab2tikz to generate a .tikz from Matlab where the legend location is set to 'SouthOutside' (below the ylabel of figure), the position of the legend will cover the ylabel unless the legend position is manually shifted with the "at={(0.5,-0.17)}" in the "legend style" parameter of tikzpicture options. This issue has been brought up in the past on one of the developer's webpages. The package pgfplots allows you to easily adjust the width and height of the figure with the variables I chose to call "\figureheight" and "\figurewidth" so I figured I could create a linear curve fit to relate the legend position to the figure height. I was able to do this, but I can't figure out how to convert the variable "\figureheight" to a value which can be manipulated in the following way, where this line would be where it is in the MWE:               at={(0.5,(0.0704*\figurewidth - 0.3572)}      Since \figurewidth is in inches, I was wondering if there's a way to "strip" the unit and let it behave as a double, then multiply by 0.0704 and subtract 0.3572 Here's a MWE of the problem:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{amsmath}          \newlength\figureheight     \newlength\figurewidth          \begin{document}          \setlength\figureheight{2.0in}      \setlength\figurewidth{2.0in}     \begin{figure}         \begin{tikzpicture}             \begin{axis}[             width=\figurewidth,             height=\figureheight,             xlabel={x label text},             ylabel={y label text},             legend style={at={(0.5,-0.17)},anchor=north,legend cell align=left} %             ]                  \addplot coordinates {(0,0) (1,1)};             \addlegendentry{Legend Entry 1}                  \addplot coordinates {(0,1) (1,2)};             \addlegendentry{Legend Entry 2}                  \end{axis}         \end{tikzpicture}         \caption{2" tall figure, x label covered} %     \end{figure}     %now with a larger figure, the xlabel will no longer be hidden     \setlength\figureheight{3.0in}      \setlength\figurewidth{3.0in}     \begin{figure}         \begin{tikzpicture}             \begin{axis}[             width=\figurewidth,             height=\figureheight,             xlabel={x label text},             ylabel={y label text},             legend style={at={(0.5,-0.17)},anchor=north,legend cell align=left} %             ]                  \addplot coordinates {(0,0) (1,1)};             \addlegendentry{Legend Entry 1}                  \addplot coordinates {(0,1) (1,2)};             \addlegendentry{Legend Entry 2}                  \end{axis}         \end{tikzpicture}         \caption{3" tall figure, x label visible} %     \end{figure}          \end{document}      The output looks like this: ![enter image description here](http://i.stack.imgur.com/wxPP2.png) Thanks in advance! Solution provided by Jake see below for direct answer. Here is matlab2tikz modified to make these changes automatically: The only change from the unmodified matlab2tikz is when you have `set(hlegend,'Location','SouthOutside')` in Matlab. I added code in three sections: near line 1200: within `if ~isempty(axisLabel)` and under `if length(label) > 1` statement:               m2t.axesContainers{end}.options = ...                 addToOptions(m2t.axesContainers{end}.options, ...                             [axis, 'label style'], '{align=center}');           end             m2t.axesContainers{end}.options = ...%RESOLVE SOUTHOUTSIDE LEGEND ISSUES                 addToOptions(m2t.axesContainers{end}.options, ...%RESOLVE SOUTHOUTSIDE LEGEND ISSUES                 [axis, 'label style'], ['{name=' axis 'label}']);%RESOLVE SOUTHOUTSIDE LEGEND ISSUES      around line 3622:               case 'southoutside'               position = [0.5, -outside_dist];               position_string='xlabel.south';%RESOLVE SOUTHOUTSIDE LEGEND ISSUES               anchor = 'north';      around line 3700:               % append to legend options       if ~isempty(anchor) %RESOLVE SOUTHOUTSIDE LEGEND ISSUES           if exist('position_string')%reference the xlabel so legend doesn't cover label when figure is scaled               lStyle = {lStyle{:}, ...%RESOLVE SOUTHOUTSIDE LEGEND ISSUES                     sprintf('at={(%s)}', position_string), ...%RESOLVE SOUTHOUTSIDE LEGEND ISSUES                     sprintf('anchor=%s', anchor)};%RESOLVE SOUTHOUTSIDE LEGEND ISSUES           else %hard code the leged position - works well for legends inside the axes             lStyle = {lStyle{:}, ...                     sprintf('at={(%.15g,%.15g)}', position), ...                     sprintf('anchor=%s', anchor)};           end       end


title: Using minted to define a new environment

text: Can I define a newenvironment that has inside it a minted environment? eg and environment that would be a quickhand for the following code:               \begin{figure}[htp]         \centering         \begin{minipage}{9cm}             \begin{minted}[frame=single]{ruby}     some minted code...             \end{minted}         \end{minipage}         \caption{a caption}     \end{figure}      I've tried using both the normal `\newenvironment` and the `\NewEnviron` from the `environ` package. Nothing seems to work, as I always get:               Paragraph ended before \FV@BeginScanning was complete.\par  \end{terminal}      Extra }, or forgotten \endgroup.     \begin{VerbatimOut} on input line 87 ended by \end{minipage}.     Extra }, or forgotten \endgroup.      MWE:               \documentclass{article}     \usepackage{minted}     \usepackage{pgfkeys}     \usepackage{color}     \usepackage{environ}     \usemintedstyle{bw}          \definecolor{bg}{rgb}{0.95,0.95,0.95}          \pgfkeys{         /terminal/.cd,         caption/.code={\pgfkeyssetvalue{terminal/caption}{\caption{#1}}},         label/.code={\pgfkeyssetvalue{terminal/label}{\label{#1}}},     }          \pgfkeyssetvalue{terminal/label}{}     \pgfkeyssetvalue{terminal/caption}{\caption{}}          \NewEnviron{terminal}[1]{     \begingroup         %\pgfkeys{/terminal/.cd,caption={}}         \begin{figure}[\thefigpos]         \centering         \begin{minipage}{9cm}     \begin{minted}[frame=single]{ruby}     \BODY     \end{minted}              \end{minipage}         %\pgfkeysvalueof{terminal/caption}         %\pgfkeysvalueof{terminal/label}         \end{figure}     \endgroup     }          \begin{document}          \begin{terminal}     a tryout     \end{terminal}     \end{document}


title: miktex 2.7 on win 7 problem: metafont modes not seen by initexmf, Yap

text: I am using MikTeX 2.7 + WinEdt 5.x on WinXP for many years without problems. But after I installed it on another machine running Win 7, MikTeX appears to work partially: it compiles all LaTeX documents, produces ps and pdf outputs, generates necessary pk fonts but does not preview documents by Yap. Yap reports an error: "METAFONT: unknown ljfour mode". What could be the reason of this problem within Windows 7 ? Regards


title: easy list with beamer?

text: Can we use in beamer? Is there any efficient way to itemize and sub itemize in beamer?? The following code not working               \documentclass[mathserif,serif]{beamer}     \usepackage[at]{easylist}          \begin{document}     \author[Nck]{Newbie}     \title[Eco'trics]{Introduction to Statistics and Econometrics}     \subtitle{TA}     \institute[Blah]{Learning Univ}     \subject{Econometrics}          \begin{frame}{Variance and Covariance}          \begin{easylist}[itemize]     @\textbf{Def 4.2.1} -             \begin{align*}             V(X) &= E[ X - E(X)]^2\\             &=E(X^2) - [E(X)]^2             \end{align*}     @ \textbf{Thm 4.2.1} - If $\alpha$ and $\beta$ are constants, we have:                 \[                 V(\alpha X  + \beta) = \alpha^2V(X)                 \]     @\textbf{Covariance}, deonoted by $Cov(X,Y)$ or $\sigma_{xy}$ is a measure of the relationship between two random variables X and Y and is defined as :      @@ $Cov(X,Y) = E[(X-E(X))(Y-E(Y))] = E(XY) - E(X) E(Y)$          \end{easylist}     \end{frame}      Also whats the use of Subject? Does it appear anywhere on the beamer?


title: Italic Correction for Linux Libertine Font

text: I was looking for a new font for the manuals of my LaTeX packages and found the _Linux Libertine_ most pleasing. However it seems that it **doesn't support italic correction** (yet). I assume that a font normally defines the correct italic correction for every character, but I would settle if _any_ extra amount would be added after italic text. At the moment a text used in `\meta{...}` hits the closing angle symbol because of the missing italic correction:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{libertine}     \begin{document}     (\textit{X})          \def\metastyle{\textit}     \def\meta#1{{\metastyle {\ensuremath \langle #1\/\ensuremath \rangle }}}     \meta{X}     \end{document}      I had the idea of the very quick and very dirty trick `\let\/\,` which works in this case, but not for general `\textit{...}` uses. (`\/` is for explicit italic correction and `\,` adds a small space, IIRC half a normal space) Checking the definition of `\textit` revealed that it finally uses `\@@italiccorr` which is let to the original `\/` _primitive_. Defining this macro as well to `\,` seems to add the small space also on other places where it is not wanted. Is there a better way to get some decent italic correction for this font? It doesn't have to be perfect, just better then the current one (i.e. literally "better than nothing").


title: Adding my own format to lyx

text: I have written a LaTeX math document with lyx (using document ams class), but now my teacher sent me some LaTeX code which should make the style as he wants it. I tried a few options to insert the LaTeX code, none worked: 1) add (through lyx) the LaTeX code itself - This didn't work, since there were double definitions, both in the lyx default generated LaTeX code, and the LaTeX code I inserted. 2) through MiKTeX TeXworks- I exported my lyx document to LaTeX, and tried to change all the definitions before `\begin{document}` to the ones my teacher sent me - This didn't compile, complained about missing definitions, xtra, xtra. 3) through bakoma - i tried opening my exported lyx code, and then inserting the code my teacher sent me at the beginning - This actually worked, but the bibliography and figure placement got ruined - the figures were put at the end, and the bibliography disappeared. Anyone has any ideas ? What should be the right way to tackle my problem? Attached is the code my teacher sent me               %&latex     \documentclass[11pt]{article}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{bm}     \usepackage{latexsym}     \usepackage{epsfig}     \usepackage{hyperref}     %\usepackage[normalem]{ulem} %\usepackage[top=80pt,bottom=80pt, left=85pt, right=85pt]{geometry} %\usepackage{setspace} %\onehalfspacing          \setlength{\evensidemargin}{.25in} \setlength{\textwidth}{6in} \setlength{\topmargin}{-0.4in}     \setlength{\textheight}{8.5in}          \newcommand{\handout}[5]{        \renewcommand{\thepage}{#1-\arabic{page}}        \noindent        \begin{center}        \framebox{           \vbox{         \hbox to 5.78in {{\sf Randomized Algorithms}     \hfill \sf #2 }            \vspace{4mm}            \hbox to 5.78in { {\Large \hfill #5  \hfill} }            \vspace{2mm}            \hbox to 5.78in { {\em #3 \hfill #4} }           }        }        \end{center}        \vspace*{4mm}     }          \newcommand{\lecture}[4]{\handout{#1}{#2}{Lecture date: #3}{Scribe: #4}{Lecture #1}}               \textwidth=6in \oddsidemargin=0.25in \evensidemargin=0.25in \topmargin=-0.1in \footskip=0.8in     \parindent=0.0cm     \parskip=0.3cm     \textheight=8.00in \setcounter{tocdepth} {3} \setcounter{secnumdepth} {2} \sloppy               \newtheorem{theorem}{Theorem}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{fact}[theorem]{Fact}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{remark}[theorem]{Remark}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{question}[theorem]{Question}     \newtheorem{answer}[theorem]{Answer}     %\newtheorem{exercise}[theorem]{Exercise}     \newtheorem{example}[theorem]{Example}     \newtheorem{algorithm}[theorem]{Algorithm}     %\newtheorem{exercise}[theorem]{Exercise}     \newenvironment{exercise}{\noindent \textbf{Exercise}}{}%[theorem]{Exercise}     \newenvironment{challenge}{\noindent \textbf{Challenge}}{}%[theorem]{Exercise}     \newenvironment{kitbag}{\noindent \textbf{Kitbag Exercise}}{}     \newenvironment{proof}{\noindent \textbf{Proof}}{$\Box$}     \newenvironment{proof-sketch}{\noindent \textbf{Sketch of Proof}}{$\Box$}          \newcommand{\ignore}[1]{}          \renewcommand{\Pr}{{\textup{Pr}}}     \renewcommand{\P}{{\bf P}}     \newcommand{\Px}{\mathop{\bf P\/}}     \newcommand{\E}{{\bf E}}     \newcommand{\Ex}{\mathop{\bf E\/}}          \newcommand{\Var}{{\bf Var}}     \newcommand{\Cov}{{\bf Cov}}     \newcommand{\Varx}{\mathop{\bf Var\/}}          \newcommand{\bits}{\{-1,1\}}          \newcommand{\nsmaja}{\textstyle{\frac{2}{\pi}} \arcsin \rho}          \newcommand{\Inf}{\mathrm{Inf}}     \newcommand{\I}{\mathrm{I}}     \newcommand{\J}{\mathrm{J}}          \newcommand{\eps}{\epsilon}     \newcommand{\lam}{\lambda}     \newcommand{\N}{\mathbb N}     \newcommand{\R}{\mathbb R}     \newcommand{\Z}{\mathbb Z}     \newcommand{\C}{\mathbb C}     \newcommand{\CalE}{{\mathcal{E}}}          \newcommand{\CalU}{{\mathcal{U}}}     \newcommand{\F}{{\mathcal{F}}}     \newcommand{\CalC}{{\mathcal{C}}}     \newcommand{\CalM}{{\mathcal{M}}}     \newcommand{\CalR}{{\mathcal{R}}}     \newcommand{\CalS}{{\mathcal{S}}}     \newcommand{\CalV}{{\mathcal{V}}}     \newcommand{\CalX}{{\boldsymbol{\mathcal{X}}}}     \newcommand{\CalG}{{\boldsymbol{\mathcal{G}}}}     \newcommand{\CalY}{{\boldsymbol{\mathcal{Y}}}}     \newcommand{\CalZ}{{\boldsymbol{\mathcal{Z}}}}     \newcommand{\CalF}{{\mathcal{Z}}}     \newcommand{\boldG}{{\boldsymbol G}}     \newcommand{\boldQ}{{\boldsymbol Q}}     \newcommand{\boldR}{{\boldsymbol R}}     \newcommand{\boldS}{{\boldsymbol S}}     \newcommand{\boldX}{{\boldsymbol X}}     \newcommand{\bfX}{{\boldsymbol X}}     \newcommand{\boldB}{{\boldsymbol B}}     \newcommand{\boldY}{{\boldsymbol Y}}     \newcommand{\boldZ}{{\boldsymbol Z}}     \newcommand{\boldV}{{\boldsymbol V}}     \newcommand{\boldsigma}{{\boldsymbol \sigma}}     \newcommand{\boldupsilon}{{\boldsymbol \upsilon}}     \newcommand{\hone}{{\boldsymbol{H1}}}     \newcommand{\htwo}{\boldsymbol{H2}}     \newcommand{\hthree}{\boldsymbol{H3}}     \newcommand{\hfour}{\boldsymbol{H4}}     \newcommand{\poly}{\boldsymbol{poly}}               \newcommand{\sgn}{\mathrm{sgn}}     \newcommand{\Maj}{\mathrm{Maj}}     \newcommand{\Thr}{\mathrm{Thr}}     \newcommand{\littlesum}{{\textstyle \sum}}          \newcommand{\half}{{\textstyle \frac12}}          \newcommand{\Stab}{\mathbb{S}}     \newcommand{\StabThr}[2]{\Gamma_{#1}(#2)}     \newcommand{\TestFcn}{\Psi}          \renewcommand{\phi}{\varphi}     \def \la      {\langle}     \def \ra      {\rangle}          \newcommand{\x}{\mathbf{x}}     \renewcommand{\o}{\mbox{o}}     \renewcommand{\O}{\mbox{O}}     \newcommand{\h}{\mathbf{H}}     \newcommand{\va}{\mbox{var}}     \renewcommand{\d}{\mbox{d}}     \renewcommand{\C}{\mathcal C}     \newcommand{\qed}{\hfill $\square$}     \begin{document}          \lecture{10}{Moni Naor}{Jan 2, 2011}{Itay Gonshorovitz}                    \end{document}


title: Could I change the default column sep of `aligned` from \quad to \qquad globally?

text: I need your help: to change the default column sep of `aligned` from `\quad` to `\qquad` globally, thanks.


title: Use (or redefine a) \tag command in text mode

text: In some times I have to set a tag in front of a text math formula. It seems better to define a command `\TAG`, as `$\TAG{Pythagoras' Equation}a^2+b^2=c^2$` to get `<Pythagoras' Equation> a^2+b^2=c^2`. The `\TAG` command need fit several conditions:   1. give a convenience to change the l(r)angle globally;   2. the content could be broken down, but do not at left angle;   3. it'd better be put in math mode. Of course the amsmath `\tag` command might be modified to suit my demand, but I don't know how to do. @ TH.: O.K.   1. Think about an onerous editor who likes green color than black or a pair of parenthese than a pair of angle.   2. When the content of \TAG is very long, it cannot overlap the right margin, and its suitable break line point mustn't at the left delimiter as most of people want.   3. The command is in math mode, so it can be affected by \mathsurround, \everymath, etc. add an image http://i.stack.imgur.com/ZUgVk.png


title: Skipping Chapter numbering but getting the Chapter layout

text: I'd like to set up the structure of my report as follows. Different chapters should have a nice big heading, like the one of the Chapter environment, and should be separated in the table of contents as well. Each chapter can then contain some sections and subsections. My only problem with this environment is the numbering: numbering of sections should proceed unaltered by the fact that we are passing from one chapter to another. In other words there should be no counter for chapters in the total numbering. How it is:               \documentclass[11pt]{report}     \usepackage{geometry}                      \geometry{letterpaper}                       \usepackage[all]{xy}     \usepackage{mdframed}     \usepackage{amsthm}     \usepackage{makeidx}          \numberwithin{equation}{section}     \makeindex          \begin{document}     \maketitle          \chapter{First chapter}     \section{Section1}     \section{section2}          \chapter{Second chapter}     \section{section3}     \section{section4}          \end{document}      Basically I'd like the discrete numbering features of the part environment, but the graphical layout of the chapter env.


title: \fullcite not printing references in APA format.

text: I am using `biblatex` and `biblatex-apa` for formatting references in APA format. I am using `\fullcite` to print the full reference in APA format as I have to describe the printed reference. In my case I cannot use the `\printbibliography` function to print the reference. The problem using `\fullcite` is that it is not printing reference in APA format, it is using `AND` instead of `&`. Here is the example: using `\fullcite`               Darwin, C., Ekman, P., and Prodger, P. (2002). The expression of the emo-     tions in man and animals. Oxford University Press, USA      using `\printbibliography`               Darwin, C., Ekman, P., & Prodger, P. (2002). The expression of the emotions     in man and animals. Oxford University Press, USA      My question is how to incorporate `&` instead of `AND` in the `\fullcite` function. Any help will be greatly appreciated.


title: TikZ to non-PDF

text: How do I tell TikZ to output to a standalone image file? Like JPG, PNG, etc? Yes, there is a way to output it to PDF, then do a snapshot. But this is for mathematical-visual comparisons, and I need precision trimming so that I can put the images side-by-side in a Word document. Here's a sample using the `standalone` class. It only takes care of the length, but the width stays the same as the `textwidth`               \documentclass{standalone}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}       \draw [step=0.5] (-1.4,-1.4) grid (1.4,1.4);     \end{tikzpicture}          \end{document}      I want the whole PDF to be trimmed to the edges of the `tikzpicture`. Or, even better, trim the PDF so that that I can leave (custom) margins around the graphic.


title: Incorrect delimiter size in math mode

text: The following code               \documentclass{article}          \begin{document}          \[     \left|\tilde{\theta}\right|     \]     \[     \left|\theta\right|     \]     \end{document}      produces the following output using `pdfLaTeX` (TeXLive 2012 updated) ![](http://i.stack.imgur.com/Ty5hj.png) Apparently, there is something wrong with the size of `|` in the tilded-theta case. The same also applies to parentheses, etc. Can I fix this? Of course I can always manually choose the size of `|` each time (e.g. with `\big|`, etc), however, I'd rather not do that. This question maybe linked to this one.


title: Internal bibliography with biblatex

text: I would like to have a paper's bibliography entries _inside_ its .tex file instead of outside in a .bib file. Is this possible with biblatex? My reason for asking this is that I want to find the most convenient way to produce documents that uses biblatex from just one file to make collaboration on papers easier and to be able to handle submissions of papers to journals.


title: tikz and tables: node increases row height

text: I'm trying to add arrows to a table in my beamer presentation using the package `tikz`. Because I don't want the table to look different from the other tables in the presentation, I didn't use `\matrix` (or is it feasible to create matrices that look exactly like tables?). The problem ist that the `\node` command which defines the target of the arrow increases the row height (see screenshot). This slight difference in height is very annoying in the context of animations. How can I avoid that? I'm using `tikz` for the first time. Please let me know if I'm doing it completely wrong or if there are better solutions. Thank you! **Screenshot:** ![enter image description here](http://i.stack.imgur.com/Rx4AF.png) **My code:**               \documentclass[12pt]{beamer}          \usepackage[american]{babel}     \usepackage[utf8]{inputenc}          %tables     \usepackage{booktabs}     \usepackage{array}          % arrows     \usepackage{tikz}     \usetikzlibrary{shapes,backgrounds,fit,positioning}     \tikzset{every picture/.style={remember picture}}               \begin{document}          \frame{       \frametitle{frame}            \begin{center}         \begin{tabular}{ccc}           \textbf{foo} & \textbf{bar} & \textbf{baz}\\           \hline           2 & 3 & 4 \\           3 & 3 & 6 \\           3 & 1 & \tikz[baseline]{\node[rounded corners,fill=blue!15,anchor=base] (main_arrow_target) {9};} \\         \end{tabular}       \end{center}            \begin{center}            \tikz[baseline]{ \node[rounded corners,fill=blue!15,anchor=base] (arrow_main_start) {         \begin{tabular}{c>{\centering\arraybackslash}p{2cm}>{\centering\arraybackslash}p{2cm}}           \textbf{x} & \textbf{y} & \textbf{z}\\           \hline           a & 2 & 7 \\           b & 3 & 4 \\           c & 8 & 6 \\           d & \tikz[baseline]{\node (chose_option) {7};} & \tikz[baseline]{\node (z_start) {2};} \\           & & \\           & \multicolumn{2}{c}{\tikz[baseline]{\node (value_left) {};} index: 9 \tikz[baseline]{\node (value_right) {};}}\\         \end{tabular}       };}       \end{center}            \begin{tikzpicture}[overlay]         \path[very thick,->] (arrow_main_start.north east) edge [bend right] (main_arrow_target.east);         \path[very thick,->] (chose_option.south) edge [bend right] (value_left.north);         \path[very thick,->] (z_start.south) edge [bend left] (value_right.north);       \end{tikzpicture}     }          \frame{       \frametitle{frame}            \begin{center}         \begin{tabular}{ccc}           \textbf{foo} & \textbf{bar} & \textbf{baz}\\           \hline           2 & 3 & 4 \\           3 & 3 & \tikz[baseline]{\node[rounded corners,fill=blue!15,anchor=base] (main_arrow_target) {6};} \\           3 & 1 & 9 \\         \end{tabular}       \end{center}            \begin{center}            \tikz[baseline]{ \node[rounded corners,fill=blue!15,anchor=base] (arrow_main_start) {         \begin{tabular}{c>{\centering\arraybackslash}p{2cm}>{\centering\arraybackslash}p{2cm}}           \textbf{x} & \textbf{y} & \textbf{z}\\           \hline           a & 3 & 2 \\           b & 9 & 6 \\           c & 0 & 7 \\           d & \tikz[baseline]{\node[] (chose_option) {2};} & \tikz[baseline]{\node[] (z_start) {8};} \\           & & \\           & \multicolumn{2}{c}{\tikz[baseline]{\node (value_left) {};} index: 6 \tikz[baseline]{\node (value_right) {};}}\\         \end{tabular}       };}       \end{center}            \begin{tikzpicture}[overlay]         \path[very thick,->] (arrow_main_start.north east) edge [bend right] (main_arrow_target.east);         \path[very thick,->] (chose_option.south) edge [bend right] (value_left.north);         \path[very thick,->] (z_start.south) edge [bend left] (value_right.north);       \end{tikzpicture}     }          \end{document}


title: TeX Gyre Pagella and itemize enviroment gives font warnings

text: \documentclass{article}     \usepackage{tgpagella}          \begin{document}     \begin{itemize}         \item test1         \item test2         \item test3     \end{itemize}     \end{document}      Compiling the above minimal LaTeX file with a fresh installation of TeX Live 2011 on Linux gives the following warnings:               LaTeX Font Warning: Font shape `OMS/qpl/m/n' undefined     (Font)              using `OMS/cmsy/m/n' instead     (Font)              for symbol `textbullet' on input line 7.     ...     LaTeX Font Warning: Some font shapes were not available, defaults substituted.      It works absolutely fine with the default Computer Modern fonts. It seems like this is just a problem with tgpagella not defining its own bullet symbols. What is the best way to deal with this sort of warning? Can it be safely ignored and is there a way to stop it appearing every time I compile (without disabling other warnings)? It's especially annoying when using Vim because the focus moves to the error window every time I compile the document!


title: Citing a dictionary with BibTeX

text: Does BibTeX (ore one of its variants) have a dictionary entry? I have not been able to find much on this respect after a few searches on google and here.


title: How does the enumitem package place the labels?

text: In the following screenshot, I would like the 1st item A) in the inline mode to be at the same level of indentation of the labels A) to D) in the first list. To do that I would like to know how the `enumitem` package places the labels. ![enter image description here](http://i.stack.imgur.com/C4Hzf.png) Here is the code that I've used.               \documentclass{article}         \usepackage[utf8]{inputenc}         \usepackage{amsmath}         \usepackage{enumitem}              \newlist{choices}{enumerate}{1}         \setlist[choices]{label*=\Alph*)}         \newcommand{\choice}{\item}              \newcounter{choice}         \renewcommand\thechoice{\Alph{choice}}         \newcommand\choicelabel{\thechoice)}         \newcommand\choicestarlabel{{\large $\square$}}              \newenvironment{inlineChoices}{%             \setcounter{choice}{0}%                 \def\choice{%                 \refstepcounter{choice}%                 \ifnum\value{choice}>1\relax                     \penalty -50\hskip 1em plus 1em\relax                 \else                     \hspace{\labelindent}% WRONG SPACING !!!                 \fi                 \choicelabel                 \nobreak\enskip             }%             \ifvmode\else\enskip\fi             \ignorespaces         }{}          \begin{document}          \noindent Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla          \begin{choices}         \choice $\dfrac{4}{7}$         \choice $\dfrac{8}{24}$         \choice $\dfrac{44}{121}$         \choice $\dfrac{9}{11}$     \end{choices}          \noindent Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla          \begin{inlineChoices}         \choice $\dfrac{4}{7}$         \choice $\dfrac{8}{24}$         \choice $\dfrac{44}{121}$         \choice $\dfrac{9}{11}$     \end{inlineChoices}          \end{document}


title: Can we convert DVI or PostScript into TeX?

text: Basically that is the question - if we have a DVI file can we get on the base on it the original TeX file?


title: Building a title block for a class

text: I am trying to build a class with a title block (using titling) such that the end user enters data into two fields. One variable is sopchaptertitle, and the other is sopchapternumber. I want to then concatenate them, and place the resulting title some distance from the top of the page and centered on the page. This will be followed by some distance of white space and the first section. It should look something like this: ![enter image description here](http://i.stack.imgur.com/FKBQ5.png) This is my code:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{sop}          % Passes and class options to the underlying article class     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions     \LoadClass{article}          % Redefine the page margins     \RequirePackage[left=1in,right=1in,top=.75in,bottom=.75in]{geometry}          % Modifications to the section titles     \renewcommand*\thesection{\arabic{section}.0}     \renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}     \renewcommand*\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}          % Title block     \RequirePackage{titling}     \newcommand{\sopchaptertitle}[1]{\newcommand{\thesopchaptertitle}{#1}}     \newcommand{\sopchapternumber}[1]{\newcommand{\thesopchapternumber}{#1}}     \let\oldtitle\title     \renewcommand{\title}[1]{\oldtitle{#1}\newcommand{\mythetitle}{#1}}     \let\oldpretitle\pretitle     \renewcommand{\pretitle}[1]{\oldpretitle{#1}\newcommand{\mythepretitle}{#1}}     \let\oldposttitle\posttitle     \renewcommand{\posttitle}[1]{\oldposttitle{#1}\newcommand{\mytheposttitle}{#1}}     \renewcommand{\maketitle}{%     \mythepretitle{\setlength{\droptitle}{12.0cm}\begin{center}\LARGE}     \mythetitle{\thesopchaptertitle\ \thesopchapternumber}     \mytheposttitle{\par\end{center}\vskip 0.5em}     }     %.... a page N of M section (which works)     % For easier customization of itemized, enumerated, and other lists     \RequirePackage{enumitem}     % For hyperlinked cross-references     \RequirePackage{hyperref}     % Ensure first page is correct style     \thispagestyle{plain}     % That's all, folks!     \endinput      It is being fed this:               \documentclass[10pt]{sop}     %     % SOP Standard Form Data     \sopchaptertitle{This is my procedure title}     \sopchapternumber{this is my procedure number D.4}     %...more of the above     %Here begins the actual document     \begin{document}          \maketitle          \section{Main Title}          \section{Approval}     Approval1....\makebox[1.5in]{\hrulefill}\\\vspace{1.5in}     Approval2....\makebox[1.5in]{\hrulefill}          \newpage          \section{Purpose and Discussion}     %...more of the above...     \end{document}      And I am getting these errors:               (/usr/share/texmf/tex/latex/oberdiek/rerunfilecheck.sty)))     ! Missing = inserted for \ifnum.     <to be read again>                         M     l.4 \sopchaptertitle                         {this is my procedure title}     ?      ! Missing number, treated as zero.     <to be read again>                         M     l.4 \sopchaptertitle                         {this is my procedure title}     ?       And               (/usr/share/texmf/tex/generic/oberdiek/gettitlestring.sty)) (./sop-test.out)     (./sop-test.out)     ! Undefined control sequence.     \HyOrg@maketitle ->\mythepretitle                                        {\setlength {\droptitle }{12.0cm}\begin {c...     l.15           ?      ! Extra }, or forgotten \endgroup.     \HyOrg@maketitle ...12.0cm}\begin {center}\LARGE }                                                        \mythetitle     {\thesopchapt...         l.15           ?      ! Undefined control sequence.     \HyOrg@maketitle ... {center}\LARGE } \mythetitle                                                        {\thesopchaptertitle \ \th...     l.15           ?      ! Undefined control sequence.     \HyOrg@maketitle ...apternumber } \mytheposttitle                                                        {\par \end {center}\vskip ...     l.15           ?      ! Missing } inserted.     <inserted text>                      }     l.15           ?       The braces seem balanced, and everything but the `droptitle` seems to work. Could someone please explain why `droptitle` is not functioning?


title: utf8 math characters from source code file with minted in XeLaTeX

text: I want `XeLaTeX/minted` to display all my mathematical characters from my .java source file. More detailed: I file my programming homework in PDF documents in my university. I have been using LaTeX and `listings` to import my source code. I do a lot of mathematical programming and use a lot of mathematical symbols in my comments. As listings doesn't support utf-8 characters I have slowly been switching to `minted` + `XeLaTeX`. I keep common mathematical characters in a text file on my computer and copy them over to my .java files when commenting. Let's consider following .tex file which I compile with `$ xelatex -shell- escape minimal`.               \documentclass[a4paper,oneside]{article}     \usepackage{fontspec}     \usepackage{xunicode}     %\usepackage{unicode-math}          % default, bw, perldoc     \usepackage{minted}     \usemintedstyle{perldoc}          \begin{document}          Document symbols.          ≠≤≥×·÷±∓√~≈≅⇔¬∧∨∀∃∅∈∉⊆⊂∪∩∆ℕℤℝℂ∞Σ∑∏∫π          \begin{minted}{java}     // Java code     // ≠≤≥×·÷±∓√~≈≅⇔¬∧∨∀∃∅∈∉⊆⊂∪∩∆ℕℤℝℂ∞Σ∑∏∫π     \end{minted}          \end{document}      It only displays the characters `×·÷±√~¬∞∑` (PDF). Why is that? And is there a solution?


title: Paragraph line break alignment in table

text: I'm doing the following:               \begin{tabular}{         p{0.20\textwidth}         p{0.20\textwidth}         p{0.20\textwidth}         p{0.20\textwidth}     }            2009 &       2010 &       2011 &       2012 \\            \hline            Menores custos &       Menores custos &       Liberdade de comercialização &       Liberdade de comercialização \\          \end{tabular}      And getting the following: ![enter image description here](http://i.stack.imgur.com/J5OLd.jpg) How can I get rid of these big spaces and turn them into into 'normal' spaces, giving a better perspective of left alignment putting the words "Liberdade" and "de" together? ![enter image description here](http://i.stack.imgur.com/s8Q3M.jpg) I need to keep these `0.2\textwidth` column widths.


title: Markup a citation (\citep) with pdfcomment's \pdfmarkupcomment

text: When I try to mark-up text that contains a citation, I have trouble. Here's an attempt at a _minimal working example_ called `mwe-pdfcomment.tex`               \documentclass[11pt]{article}     \usepackage[square,sort,comma,numbers]{natbib}     %pdfcomment stuff below:     \usepackage[opacity=1.0,version=1]{pdfcomment}     \usepackage{tikz}     \usetikzlibrary{calc}     \pdfcommentsetup{color=yellow,opacity=1.0}     %pdfcomment stuff above     \author{John Doe} \title{Sample Document}     \begin{document}          \maketitle          \section{Introduction}          According to a handbook \pdfmarkupcomment[color=yellow,opacity=1.0,markup=Highlight]{        {\citep{texbook}}  %commenting this line out works     Blah     }{Why do you think this citation is important?},     this paragraph---and certainly this     section---should be longer than one sentence.          \bibliographystyle{plain}   % (uses file "plain.bst")     \bibliography{mwe}      % expects file "mwe.bib"     \end{document}      and the corresponding `mwe.bib`               @BOOK{texbook,        author = "Donald E. Knuth",        title= "The {{\TeX}book}",        publisher = "Addison-Wesley",        year = 1984     }      Initially, I got the error               ! Argument of \@citex has an extra }.      which is why I put an extra set of `{}` around the `\citep` stuff. However, that leads to the following error:               ! Package soul Error: Reconstruction failed.      Does \pdfcomment allow for citations inside the markup? If so, how? There are related questions Problem when using pdfcomment in figure captions and then referencing and possibly Conflict between amsmath and pdfcomment


title: Get error when I add "pos=x" to the node[] command for the last edge using cycle

text: Why this code works               \documentclass{standalone}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}     \draw (pi,.5)--(pi,-.5)--(-pi,-.5)--(-pi,.5)--cycle node[above]{vv} ;     \end{tikzpicture}          \end{document}      But when I change the `node[above]` to `node[above,pos=.5]` I get error?


title: Skipping sections when compiling (without \include)

text: I'm writing a semi-long report with ten-ish sections - in other words, just short enough so that it's practical to keep it all in one file without getting lost. However, for compiling it'd be extremely useful to be able to skip some sections and get a shorter version for reading and discussion with collaborators. I believe that I have been told that it is possible to compile only some sections of a document by using a symbol in relation with the `\sections` to be skipped, and that this is possible without chopping up the document in smaller pieces and cleverly using `\include`, but I'm unable to find it despite massive googling. Does this "skip sections when compiling" sound familiar? I'd be very greatful if someone could tell me what the command is? :)


title: Read command with varying input arguments

text: Out of curiosity I'd like to define a LaTeX command that looks like: `\newcommand{\trigger}{out1,out2,...,outn}` with a rather strange function (at least, I couldn't find anything like this elsewhere): First of all, the number of arguments `out1,out2,...` etc. are variables. Then, every time the `\trigger` command is used in the document's content, a different _string_ is printed: first `out1`, then `out2`, etc. and finally `outn`. After `outn` is printed, the whole thing should be reset such that the next _string_ will be `out1` again. So the first problem I have is to make a command that can read the comma separated list between `{}` and the second problem is how to print just one them every time the newly defined command is called.


title: Multiple footnotes in minipage - how to typeset as paragraph ?

text: I have a table in a `minipage` with multiple, short footnotes. These are typeset one per line. However, I would like to have these in 'paragraph' mode to save space. I have tried `\usepackage[para]{footmisc}` but it does not seem to do anything. Is there a way to do this?               \documentclass{article}     \usepackage[para]{footmisc}     \usepackage{booktabs}     \begin{document}     \renewcommand{\footnoterule}{\vspace{-2pt}}     \begin{table}     \caption{My caption}     \begin{minipage}{\textwidth}     \begin{tabular}{ll}     \toprule      A & B \\     \midrule     test\footnote[1]{note1} & text \\     test\footnote[2]{note2} & text\footnote[3]{note3} \\     \bottomrule     \end{tabular}     \end{minipage}     \end{table}     \end{document}


title: How can I repair a Minion Pro font installation that lacks certain features?

text: I was overzealous in my installation of Minion Pro and accidentally installed metrics that I do not have. Specifically (it seems), I unzipped `metrics- opticals.zip`, when I shouldn't have. As a result, certain packages (e.g. `classicthesis`) report an error:               !pdfTeX error: pdflatex (file MinionPro-BoldCapt.pfb): cannot open Type 1 font file for reading      Is there a way to repair this (short of purchasing the "opticals" that my installation now expects to be there)? * * * I understand that when I use the `MinionPro` package directly, I can choose the `noopticals` option (the default), but I'm using `classicthesis`, and don't see a way to disable opticals there.


title: Change node distance for particular nodes

text: How do you change the node distance to the left for a                \node[state]         (q4) [below left of=q3] {$homing$};       Ok, it's a little bit on the left, but I want it to move it more to the left. How can I do that ?


title: Which font is the most comfortable for on-screen viewing?

text: It is subjective question. I actually want to put it in the Community Wiki but I cannot find the check box to mark it as a Community Wiki question. Among fonts listed in The LaTeX font catalogue with math support, which one is the most comfortable to be viewed on the screen?


title: Using \pause with graphics animation

text: How can I hide the animation in my code?. I use this image (`.gif`).               \documentclass[compress,red]{beamer}     \usepackage{etex}     \mode<presentation>     \usetheme{Warsaw}          \usepackage[applemac]{inputenc}%les accents pour mac     \usepackage{subfigure}     \usepackage{multicol}     \usepackage{animate}     \usepackage{amsmath}     \usepackage{epsfig}     \usepackage{graphicx}     \usepackage[all,knot]{xy}       \xyoption{arc}     \usepackage{url}     \usepackage{array,ragged2e}     \usepackage{multimedia}     \usepackage{hyperref}     \usepackage{setspace}     \usepackage{multirow}          \begin{document}     \section{section1}          \frame{\frametitle{Titre de la fenetre}     \begin{itemize}       \item point1         \pause       \item point2        \pause       \item point3        \pause       \item point4       \animategraphics[height=1cm,width=1cm, autoplay,loop]{1}{listefigures/shadowscanner/im}{1}{11}         \pause       \item point5     \end{itemize}     }          \end{document}


title: A package for package-loading management?

text: Many packages require loading before/after hyperref or other dependencies. Is there a package to manage this?               \usepackages{ellipsis,[hidelinks]hyperref,titlesec}      Would, I believe, reverse the order of loading there. I'm not looking for a package that will analyze what it is loading—more of something that takes predefined relations and applies them like a package manager would. Does something like this exist, or is it another opportunity to show off `expl3`?