title: fontspec, lua, microtype: Renderer=Basic no longer working for specific font styles

text: You may have noticed that, as of now,* letterspacing small capitals is not as easy as it was in pdfTeX, where we could simply combine `\textsc` with microtype's `\textls`. Consider this example, which should give you non- letterspaced small caps; letterspaced u&lc; and letterspaced u&lc again: (ex. 1)               \documentclass{article}     \usepackage{fontspec,microtype}          \listfiles     \setmainfont[     %Renderer=Basic     ]{Minion Pro}          \begin{document}     \textsc{Lorem Ipsum}\par     \textls{Lorem Ipsum}\par     \textls{\textsc{Lorem Ipsum}}\par     \end{document}      The workaround (!) for this problem is to set `Renderer=Basic`.** If you uncomment the respective line in my example, you'll find the small caps properly letterspaced. However, globally putting the Renderer to Basic mode may cause problems in other places, as it seems to disable some OpenType features (the whole Renderer thing doesn't seem to be documented that well in the fontspec doc, but I can elaborate on that if you're interested). In earlier versions of fontspec, what I did was this: (ex. 2)               \documentclass{article}     \usepackage{fontspec,microtype}     \setmainfont[SmallCapsFeatures={Renderer=Basic}]{Minion Pro}     \begin{document}     \textsc{Lorem Ipsum}\par     \textls{Lorem Ipsum}\par     \textls{\textsc{Lorem Ipsum}}\par     \end{document}      ...which would put the Renderer to Basic mode for small capitals only, leaving it on Full everywhere else -- a workaround I was pretty happy with. Unfortunately, this became impossible in more recent versions of fontspec. We can still use the Renderer key (as in example 1), but not as an option for a specific font style:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     ! LaTeX error: "keys/key-unknown"     ! The key 'fontspec/Renderer' is unknown and is being ignored.     ! See the LaTeX3 documentation for further information.     ! For immediate help type H <return>.     !...............................................      What I'd like to know, basically, is if there's an alternative way of selecting Basic mode for small caps only, or what other ways you guys would suggest to make small caps and microtype's letterspacing work together again -- other than redefining the small caps commands to include `Renderer=Basic`, which doesn't seem all-too elegant to me:               \textls{\textsc{\addfontfeatures{Renderer=Basic}Lorem Ipsum}}      * * * * This is LuaTeX, Version beta-0.70.1-2011082320 (rev 4277)   fontspec.sty 2011/09/13 v2.2 Advanced font selection for XeLaTeX/LuaLaTeX   luaotfload.sty 2011/04/21 v1.25 OpenType layout system   microtype.sty 2011/08/18 v2.5 Micro-typographical refinements (RS)   ** thanks to Hans and Ulrike for mentioning it, http://archive.contextgarden.net/message/20110615.105120.bf868745.en.html


title: Including only the parts of a document corresponding to a conditional expression

text: Suppose I have a LaTeX document, which uses a conditional. Ie.               \ifdefined\submit         [....]     \else         [....]     \fi      So, if we have, say, defined               \def\submit{}      then the first part of the conditional is parsed (or whatever the right term is), otherwise the second part is. Is there some way within TeX, to postprocess the document to strip out all the conditionals, and only include the parts corresponding to `\ifdefined\submit` if `\submit` is defined and the other parts if not? It is not a big deal, but was curious whether such a thing is possible.


title: Adding circled numbers to beginning of the arrow using tikzpicture

text: I would like to draw something similar to the following image using `tikzpicture`. I succeed in drawing the arrows but I could not put numbers at the beginning of them. I used the idea in Drawing network protocols to draw the arrows. Can you help me about it? Thanks! Below you can see what I have done. ![enter image description here](http://i.stack.imgur.com/qODiz.png)               \begin{tikzpicture}     \tikzstyle{every node}=[font=\tiny]     \matrix (m)[matrix of nodes, column  sep=2cm,row  sep=8mm, nodes={draw=none, anchor=center,text depth=0pt} ]{     {\normalsize \textbf{$ P_i $}} & $ (pk,v,g, \Z_p, t_1, t_2, id) $ and names of parties are public  & {\normalsize \textbf{$ P_j $}}\\[-4mm]     $ x_i\in_r \Z_p $ & & $ x_j\in_r \Z_p$ \\[-7mm]     & $h_i=g^{x_i}$, $ PK log(g,h)\{\xi: h=g^{\xi}\} $ & \\     $ h = \sum g^{x_i} = g^x $ & $h_j=g^{x_j}$, $ PK log(g,h)\{\xi: h=g^{\xi}\} $ &   $    h = \sum g^{x_i} = g^x $ \\     & \textbf{. . . . . . . . . . . . . . . . . . . . . . . . . . . . .} & \\          $ r_i \in \Z_p $  & $ V^1_i = VE((g^{r_i},s_ih^{r_i}), h;\emptyset)\{(v_i,s_i)\in R\} $ &           \\ };          \draw[shorten <=-1cm,shorten >=-1cm] (m-1-1.south east)--(m-1-1.south west){};     \draw[shorten <=-1cm,shorten >=-1cm] (m-1-3.south east)--(m-1-3.south west);     \draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-3-2.south west)--(m-3-2.south east);     \draw[shorten <=-1cm,shorten >=-1cm,-latex](m-4-2.south east)--(m-4-2.south west);          \draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-6-2.south west)--(m-6-2.south east);          \end{tikzpicture}


title: How can I convert md to pdf with pictures in and handle the error 'Could not find image..'?

text: I want to use pandoc to convert md format document into pdf format,latex template has been written, and example content which will be converted as follows(named as "example.md"):               picture one:     ![1](../images/1/1.1.png?raw=true)     picture two:     ![2](../images/1/1.2.png?raw=true)          And the two pictures '1.1.1.png' and '1.2.png' are in 'images', use win7 cmd as follows:               pandoc  --latex-engine=xelatex  --template=latex.template.tex example.md -o example.pdf      But results display error:               pandoc: Could not find image '../images/1/1.1.png?raw=true', skipping...     pandoc: Could not find image '../images/1/1.2.png?raw=true', skipping...     pandoc: Error producing PDF from Tex source.     !Unable to load picture or PDF file '../images/1/1.1.png?raw=true'     <to be read again>                       }     1.172 ...yu/1.1.png?raw=true}      So what's the matter with the error, and the pictures are exactly existing in 'images', How can I handle the error? Thanks!


title: How to use dot2texi in Lyx

text: I am trying to use dot2texi package in Lyx to generate graphs, and I include the following in the preamble of the document:               \usepackage[all]{xy}     \usepackage{dot2texi}     \usepackage{tikz}      \usetikzlibrary{shapes,arrows}     \usepackage{pgfplots}     % recommended as of Pgfplots 1.3:     \pgfplotsset{compat=newest}      And I insert a block of Tex code inside my Lyx document:               \begin{dot2tex}[neato,options=-tmath]     digraph G      {         node [shape="circle"];          a_1 -> a_2 -> a_3 -> a_4 -> a_1;     }     \end{dot2tex}}      as taken from the example here: http://www.fauskes.net/code/dot2tex/documentation/#the-dot2texi-latex-package However, when I view the document in PDF format, it doesn't show anything nor throw any error - nothing. Btw, I am using the latest Lyx 2.0.0. Any suggestion what could have gone wrong here. Thanks.


title: Tabs in a Beamer Presentation

text: I am putting together a beamer presentation with some programming code. However, the verbatim package by default places the code on the left most fringe of the slide. I want the slide to be a little closer to the center of the slide, but still left alligned. How can I do this? can't find anything on google               \begin{frame}[fragile]     \begin{center}     \begin{verbatim}     > library(memisc)     > x <- round(rnorm(3),1)     > y <- round(rnorm(3)*2,1)     > mytable <- genTable(y ~ x)     > toLatex( mytable )     \end{verbatim}     \end{center}     \end{frame}


title: Code indentation gets lost in Beamer

text: For any unknown reason I have to use `verbatim` instead of `listings`. Note: This issue also appear when using `listings` but Herbert's answer can fix it. Unfortunately, the trick Herbert used there cannot be applied here. I attempted to use the same trick but it failed as follows.               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage{lmodern}               \begin{document}          \defverbatim[colored]     \Lst     {         \begin{verbatim}                 class Foo                 {                         public static void Main()                         {                                 Console.WriteLine("hello xport");                         }                 }         \end{verbatim}     }          \begin{frame}{hello xport}     \Lst     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/SG0To.png) * * * It was compiled by `pdflatex` and `latex->dvips->ps2pdf` provided by TeX Live 2010 on Windows 7. And my editor is TeXnicCenter. * * * ## Caution: If you want to try my code above, you must copy them in Edit mode. Copying the code directly from the rendered HTML will make my original tabs changed to spaces. :-)


title: Drawing a regular polygon encompassed by a circle

text: I would like to replicate the sort of diagrams shown below - a regular polygon in dashed lines encompassed by a solid lined unit circle with vectors going from the origin to each labelled vertex in an xy-plane. How would one go about doing this in TikZ? ![enter image description here](http://i.stack.imgur.com/UQFkE.png)


title: Wide table in twoside document

text: I am using a twoside document style and have a wide table crossing the right margin if it is on a right page. How can I disable the twoside style for just the table to center it. What is the correct way to solve this? This is a MWE.               \documentclass[11pt, a4paper, titlepage]{book}     \usepackage{booktabs}     \usepackage{color,graphicx}     \usepackage{geometry}          \usepackage[utf8]{inputenc}          \usepackage{ngerman}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}                    \geometry{  a4paper,                 twoside,                 includemp,                 includehead,                 top = 30mm,                 headsep = 10mm,                 bindingoffset = 10mm,                 inner = 20mm,                 outer = 40mm,                 bottom = 45mm,                 marginparsep = 10mm,                 marginparwidth = 30mm     }     \savegeometry{myText}               \begin{document}      aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo iaeoiaeo iaeoiaeo aeo eaoiaeoiaeoi oiaeo iaeoiaeo           \begin{table}[hp]     \begin{tabular}{p{2.5cm} l p{3.5cm} p{5cm} }     \hline     \cline{1-2}     wiiiiide text \\     \hline     abcd  wide text     &  abcd  wide abcd  wide text           & abcd  wide text  abcd  wide text   \\     abcd                       & abcd  wide text            & abcd  wide text   &   \\     abcd                       & abcd           & abcd  &   \\     abcd           & abcd   &1     &  \\     abcd                   & abcd    & 1    &   \\     \hline     \end{tabular}     \caption{\mbox{Looooooooong caption)}}      \end{table}      \end{document}


title: Algorithms disappear when I use multicols

text: This is my code:               \documentclass[11pt]{llncs}     \usepackage[utf8]{inputenc}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{dsfont}     \usepackage{multicol}     \usepackage{fixltx2e}     \usepackage{multicol}     \newcommand\blfootnote[1]{%       \begingroup       \renewcommand\thefootnote{}\footnote{#1}%       \addtocounter{footnote}{-1}%       \endgroup       }       \usepackage[T1]{fontenc}      \usepackage{comment}      \usepackage{amsmath}                                     \setcounter{MaxMatrixCols}{20}     \usepackage[margin=1in]{geometry}     \usepackage[boxruled, linesnumbered]{algorithm2e}     \usepackage{xcolor}     \usepackage{setspace}     \usepackage{hyperref}     \definecolor{bl}{rgb}{0.0,0.2,0.6}      \definecolor{dark-red}{rgb}{0.4,0.15,0.15}     \definecolor{dark-blue}{rgb}{0.15,0.15,0.4}     \definecolor{medium-blue}{rgb}{0,0,0.5}     \usepackage{sectsty}     \hypersetup{         colorlinks, linkcolor={dark-red},         citecolor={dark-blue}, urlcolor={medium-blue}     }     \usepackage{graphicx}     \usepackage[compact]{titlesec}      \begin{document}     \begin{multicols}{2}     \begin{algorithm}[!h]     \label{alg:quad}         \SetAlgoLined         \KwData{\textsc{Something} $S$, \textsc{Another thing} $A$}         do something with $S$\;         do another thing with $A$\;     \end{algorithm}     \columnbreak     \begin{algorithm}[!h]     \label{alg:cbl}         \SetAlgoLined         \KwData{\textsc{Something} $S$, \textsc{Another thing} $A$}             do something with $S$\;             do another thing with $A$\;     \end{algorithm}     \end{multicols}     \end{document}      The page appears blank. When I remove `\begin{multicols}...\end{multicols}`, the page returns to normal. What I'm trying to do is to display those very short two algorithms side by side. What shall I do?


title: Apacite - Different citation output for multiple authors

text: I have a question that I haven't been able to solve, even though I got through the documentation , web pages and `apacite.bst` code (although I'm quite new with this stuff). The problem is as follows: Using `apacite` citation style package, I'd like               \citeA{ref} argued that the value of ...       to be rendered as > _Borges and collaborators (2006) argued that the value of ..._ and at the same time, if the citation is not textual, the code               was proved \cite{ref}.      should be rendered as > _was proved (Borges et al., 2006)._ In summary, when a citation results in an "et al.", I would like it to have different outputs whether it is a text citation (and colaborators) or a normal citation (et al.). Already tested `renewcommand \BOthers` but it affects both types of citation. Can you help me?


title: Which unit of measurement for textwidth?

text: Which `unit of measurement` should I use to specify `\textwidth`? I used to specify `\textheight` in cm but read in some doc that one should always use multiples of `\baselineskip`. Indeed, the output improved considerably and I got rid of almost all badness messages. Hence I would like to know which unit is optimal for the specification of `\textwidth` or, in general, horizontal lengths? Of course it is not `\baselineskip` but what then? My current specification is as follows:               \usepackage[                                                textwidth=16cm,       outer=2cm,       textheight=45\baselineskip,       headheight=\baselineskip,       includehead=true,       heightrounded,     ]{geometry}


title: placing citations at the end of sentence

text: Is it possible to move all the citations that i have cited to appear at the end of the line in the compiled pdf doc. For example if i do               The common \cite{cite1} trend in much of the preceding work is that      the citation will come right after the word common and before trend Is there a method where i can say globally to make all the citations appear at the end, without having to manually move them ?


title: pgfgantt, wrap text in label

text: I have task explanations that are pretty long and because of that it is pushing my gantt chart off of the page. Is there anyway to be able to wrap the text so that it continues below the task title? I want to eventually be able to fill out all of the Objectives and Tasks and have them be nice rectangular packets next to the chart. Here is my code:               \documentclass[11pt,a4paper,oneside]{article}     \usepackage{fancyhdr}     \usepackage{indentfirst}     \usepackage{pgf}     \usepackage{pgfgantt}     \usepackage{pgfcalendar}     \usepackage{rotating}          \begin{document}     \pagebreak     \begin{rotate}{270}     \begin{ganttchart}[y unit title=0.6cm,     y unit chart=0.7cm,     vgrid,     title height=.85,     hgrid=true,     canvas/.style={fill=yellow!25, draw=blue, solid, very thick},      bar/.style={fill=gray, rounded corners=3pt},     bar left shift=.05,      bar right shift=-.05,      bar top shift=.3,      bar height=.3,vgrid={*1{blue, dashed}},      bar label font=\normalsize\color{black!50},     bar label anchor/.append style={align=left, text width=8mm},     group right shift=0,group top shift=.6,group height=.3,group peaks={}{}{0}]{23}     \gantttitle{2012}{5}     \gantttitle{2013}{12}     \gantttitle{2014}{6}\\     \gantttitlelist{8,...,12}{1}     \gantttitlelist{1,...,12}{1}     \gantttitlelist{1,...,6}{1}\\               \ganttgroup[group label anchor/.style={left=3.5cm}     ]{Objective 1: Continuous news coverage of 911 events presented by Worldnet (Voice of America). Please Note: This news program was recorded by the non-profit Television Archive. The video is available as a "loan" only: This means it may be streamed but not downloaded. Network URL: http://www.ibb.gov}{1}{4}\\     \ganttbar{\textbf{Task a} International Union, United Automobile Workers of America     This is from the UAW-AFL faction that split with Homer Martin from the majority UAW-CIO HD6350.A8}{4}{2} \\     \ganttbar{\textbf{Task b}}{4}{2} \\     \ganttbar{\textbf{Task c}}{4}{2} \\          \ganttgroup{Objective 2:}{4}{6} \\     \ganttbar{Task a}{4}{6} \\     \ganttbar{Task b}{4}{6} \\          \ganttgroup{Objective 3}{4}{6} \\     \ganttbar{Task a}{4}{2} \\     \ganttbar{Task b}{4}{2} \\     \ganttbar{Task c}{4}{2} \\     \ganttbar{Task d}{4}{2} \\          \ganttgroup{Objective 4}{4}{6} \\     \ganttbar{Task a}{4}{2} \\     \ganttbar{Task b}{4}{2} \\          \ganttgroup{Objective 5}{4}{6} \\     \ganttbar{Task a}{4}{2} \\     \ganttbar{Task b}{4}{2} \\     \ganttbar{Task c}{4}{2} \\     \end{ganttchart}          \end{rotate}     \end{document}


title: How to doublespace a sidewaystable using setspace?

text: As a follow-up to a previous question, How to doublespace a table using setspace?, I found that the solution is not compatible with the sidewaystable environment defined in the `rotating` package. I have modified the example in the answer from the previous question to demonstrate:               \documentclass{article}     \usepackage{amsmath}     \usepackage{setspace}     \usepackage{lipsum}     \usepackage{rotating}     \newcommand\Factor{1.9}          \makeatletter     \def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else        \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner           \@parmoderr\@floatpenalty\z@         \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname            \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n            \@tfor \@tempa :=#2\do                             {\if\@tempa h\advance\@tempcnta \@ne\fi                              \if\@tempa t\advance\@tempcnta \tw@\fi                              \if\@tempa b\advance\@tempcnta 4\relax\fi                              \if\@tempa p\advance\@tempcnta 8\relax\fi              }\global\count\@currbox\@tempcnta}\@fltovf\fi         \global\setbox\@currbox\vbox\bgroup         \def\baselinestretch{\Factor}\@normalsize         \boxmaxdepth\z@         \hsize\columnwidth \@parboxrestore}     \makeatother          \begin{document}     \begin{spacing}{\Factor}     \lipsum[1]     \begin{sidewaystable}[ht]     \begin{tabular}{rlll}       \hline      & col1 & col2 & col3 \\        \hline       50 & 19 & 7 & 26 \\        100 & 10 & 20 & 29 \\        150 & 1 & 7 & 2 \\        200 & 0 & 0 & 10 \\      \hline     \end{tabular}     \end{sidewaystable}     \end{spacing}     \end{document}      Running `pdflatex` on this document returns the error:               ! Extra }, or forgotten \endgroup.     \color@endbox ->\egroup           l.40 \end{sidewaystable}      How can I get around this?


title: How to fix tikz.sty problem

text: I have installed ubuntu10.04 (32bit). My .tex editor is "kile2.1 beta 4". Whenever I compile the following command with kile shows an error 'tikz.sty' not found.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (0,0)--(4,2);     \end{tikzpicture}     \end{document}      How can I fix this problem in my system ubuntu10.04


title: Custom list of environments (per section)

text: I'd like to have a list of my custom environments at the start of each section. I read this post, but wasn't able to get the titletoc to help me. The given response worked for floats, but I couldn't see how to adapt it to (non- floating) environments. Here is a MWE of what I have so far; it works the way I want to, except for the spacing issues between the commas. It follows along the lines of the discussion in the above post, by creating a file for each section (hacked from the ntheorem package). So, my questions are: how could I fix the spacing issues between the commas? Is it bad to create lots of auxiliary files (.prb1, .prb2, etc)? Have I re- invented a wheel? I'd also welcome any other feedback.               \documentclass{article}     \usepackage{ifthen}          \newcounter{probfilecounter}     \setcounter{probfilecounter}{0}     \newcounter{index}     \newcounter{linecount}     \newread\File          \let\stdsection\section     \renewcommand\section{\stepcounter{probfilecounter}\stdsection}          \makeatletter          \def\listproblems{%     \openin\File=\jobname.prb\thesection%     %\@input{\jobname .prb\thesection}%     \setcounter{linecount}{0}%     \loop\unless\ifeof\File%     \stepcounter{linecount}%     \read\File to\fileline %     \repeat%     \closein\File%     % re-open the file     \setcounter{index}{0}%     \openin\File=\jobname.prb\thesection%     \loop\unless\ifeof\File%     \stepcounter{index}%      \read\File to\fileline%     %\fileline         \ifthenelse{\theindex=1}%         {Problems in this section: \fileline}%         {%         \ifthenelse{\theindex<\thelinecount}%         {, \fileline}%         {}%         }%     \repeat%     \closein\File%     }%          \def\prb@enablelistofproblems{%     \begingroup%     \makeatletter%     \if@filesw%     \setcounter{index}{0}%     \whiledo{\value{index}<\theprobfilecounter}{%     \stepcounter{index}%      \expandafter\newwrite\csname tf@prb\theindex\endcsname%     \immediate\openout \csname tf@prb\theindex\endcsname \jobname.prb\theindex\relax%      }%     \fi%     \@nobreakfalse%     \endgroup}%          \AtEndDocument{\prb@enablelistofproblems}          \makeatother          % define the problem environment     \newcounter{problem}     \newenvironment{problem}{         \refstepcounter{problem}%         \textbf{Problem \theproblem} \par         \addtocontents{prb\theprobfilecounter}{\theproblem}     }{}          \begin{document}          \section{intro}     \listproblems          \begin{problem}      second problem     \end{problem}          \begin{problem}      another problem     \end{problem}          \section{another section}     \listproblems          \begin{problem}      another problem     \end{problem}          \begin{problem}      another problem     \end{problem}          \end{document}


title: What is the Necessity of $...$ Around Numbers?

text: I typed up an assignment with a lot of numbers in LaTeX and turned it in to my adviser. When he returned it to me with some corrections, one of which was a lot of `$` around my numbers. I understand that `$` are necessary around some mathematical formulas, but I was just using numbers like `-2` and `4`. I did not see any change in the font of the numbers when I added the `$` either. Since my adviser did not want to give me an explanation, what is the rationale?


title: pxfont upgreek... Why can't i use?

text: I'm trying to use **pxfont** upright greek letters in math as the way below but it doesn't work. When i write `\alpha` I would like to see `\upalpha` from px. My main font is libertine.               \documentclass[11pt,a4paper]{article}%     \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[T1]{fontenc}     \usepackage{libertine}     \usepackage[libertine,liby,libaltvw,vvarbb]{newtxmath}     \DeclareSymbolFont{greeksymbols}{OML}{npxmi}{m}{it}     \DeclareMathSymbol{\alpha}{\mathalpha}{greeksymbols}{11}     \DeclareMathSymbol{\beta}{\mathalpha}{greeksymbols}{12}     \DeclareMathSymbol{\gamma}{\mathalpha}{greeksymbols}{13}     \DeclareMathSymbol{\delta}{\mathalpha}{greeksymbols}{14}     \DeclareMathSymbol{\epsilon}{\mathalpha}{greeksymbols}{15}     \DeclareMathSymbol{\zeta}{\mathalpha}{greeksymbols}{16}     \DeclareMathSymbol{\eta}{\mathalpha}{greeksymbols}{17}     \DeclareMathSymbol{\theta}{\mathalpha}{greeksymbols}{18}     \DeclareMathSymbol{\iota}{\mathalpha}{greeksymbols}{19}     \DeclareMathSymbol{\kappa}{\mathalpha}{greeksymbols}{20}     \DeclareMathSymbol{\lambda}{\mathalpha}{greeksymbols}{21}     \DeclareMathSymbol{\mu}{\mathalpha}{greeksymbols}{22}     \DeclareMathSymbol{\nu}{\mathalpha}{greeksymbols}{23}     \DeclareMathSymbol{\xi}{\mathalpha}{greeksymbols}{24}     \DeclareMathSymbol{\pi}{\mathalpha}{greeksymbols}{25}     \DeclareMathSymbol{\rho}{\mathalpha}{greeksymbols}{26}     \DeclareMathSymbol{\sigma}{\mathalpha}{greeksymbols}{27}     \DeclareMathSymbol{\tau}{\mathalpha}{greeksymbols}{28}     \DeclareMathSymbol{\upsilon}{\mathalpha}{greeksymbols}{29}     \DeclareMathSymbol{\phi}{\mathalpha}{greeksymbols}{30}     \DeclareMathSymbol{\chi}{\mathalpha}{greeksymbols}{31}     \DeclareMathSymbol{\psi}{\mathalpha}{greeksymbols}{32}     \DeclareMathSymbol{\omega}{\mathalpha}{greeksymbols}{33}     \DeclareMathSymbol{\varepsilon}{\mathalpha}{greeksymbols}{34}     \DeclareMathSymbol{\vartheta}{\mathalpha}{greeksymbols}{35}     \DeclareMathSymbol{\varpi}{\mathalpha}{greeksymbols}{36}     \DeclareMathSymbol{\varrho}{\mathalpha}{greeksymbols}{37}     \DeclareMathSymbol{\varsigma}{\mathalpha}{greeksymbols}{38}     \DeclareMathSymbol{\varphi}{\mathalpha}{greeksymbols}{39}     \DeclareMathSymbol{\partial}{\mathalpha}{greeksymbols}{64}          \renewcommand{\alpha}{\upalpha}     \renewcommand{\beta}{\upbeta}     \renewcommand{\theta}{\uptheta}     \renewcommand{\gamma}{\upgamma}     \renewcommand{\sigma}{\upsigma}     \renewcommand{\varepsilon}{\upvarepsilon}     \renewcommand{\delta}{\updelta}     \renewcommand{\epsilon}{\upepsilon}     \renewcommand{\zeta}{\upzeta}     \renewcommand{\eta}{\upeta}     \renewcommand{\kappa}{\upkappa}     \renewcommand{\lambda}{\uplambda}     \renewcommand{\mu}{\upmu}     \renewcommand{\nu}{\upnu}     \renewcommand{\xi}{\upxi}     \renewcommand{\pi}{\uppi}     \renewcommand{\rho}{\uprho}     \renewcommand{\upsilon}{\upupsilon}     \renewcommand{\phi}{\upphi}     \renewcommand{\chi}{\upchi}     \renewcommand{\psi}{\uppsi}     \renewcommand{\omega}{\upomega}     \renewcommand{\varepsilon}{\upvarepsilon}     \renewcommand{\vartheta}{\upvartheta}     \renewcommand{\varpi}{\upvarpi}     \renewcommand{\varphi}{\upvarphi}     \renewcommand{\varpi}{\upvarpi}     \renewcommand{\varsigma}{\upvarsigma}     \renewcommand{\varrho}{\upvarrho}     \begin{document}     $\alpha\beta\gamma\mu\varpi\pi\varsigma\sigma\rho\zeta\delta\varepsilon$          These letters should come from pxfont.     \end{document}


title: Misplaced \noalign

text: Unfortunately I cannot solve the error with noalign on my own:               ! Misplaced \noalign.     \hline ->\noalign                        {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...     l.12 ... & \centering{B} & \centering{C} \\ \hline          I expect to see \noalign only after the \cr of     an alignment. Proceed, and I'll ignore this case.      I already tried it with `\cline`, but this didn't work either. By searching the web I found out that in all cases `\\\` at the end of the line is missing. However, I have a `\\\` at the end of the line:               \documentclass[12pt,a4paper]{article}     \usepackage{multicol}     \usepackage{multirow}          \begin{document}          \begin{tabular}{|p{40pt} p{60pt}|p{120pt}|}     \hline     \multicolumn{3}{|p{220pt}|}{\multirow{2}{220pt}{\centering{\textbf{Title}}}} \\     \multicolumn{3}{|c|}{} \\ \hline     \centering{A} & \centering{B} & \centering{C} \\ \hline     \end{tabular}          \end{document}      I'd appreciate any help.


title: How to include Maple code in LaTeX?

text: At here Fanciest way to include Mathematica code in LaTeX we can include Mathematica in LaTeX. I want to include the code               restart:     with(geom3d):     eqS:=Equation(sphere(S,(x-1)^2 + (y-1)^2 +(z-1)^2 -121=0,[x,y,z],'centername'=T)):     L:=[]:     for x from -5 to 10  do     for y from -5 to 10  do     for z from -5 to 10  do  if  x<>xcoord(T) and y<>ycoord(T) and z <> zcoord(T) and   type(x,integer) and type(y,integer)and type(z,integer) and eqS then     L:=[op(L), [x,y,z]] fi;     od: od: od:      nops(L);        I tried               \begin{lstlisting}[language=Maple,caption={}]     restart:     with(geom3d):     eqS:=Equation(sphere(S,(x-1)^2 + (y-1)^2 +(z-1)^2 -121=0,[x,y,z],'centername'=T)):     L:=[]:     for x from -5 to 10  do     for y from -5 to 10  do     for z from -5 to 10  do  if  x<>xcoord(T) and y<>ycoord(T) and z <> zcoord(T) and   type(x,integer) and type(y,integer)and type(z,integer) and eqS then     L:=[op(L), [x,y,z]] fi;     od: od: od:      nops(L);       L;     \end{lstlisting}      How to include Maple code in LaTeX?


title: Classicthesis - Multiline section headings do not work

text: I am using `classicthesis` for my thesis project. Some section names are very long and either go into the right 'padding area' or are split into multiple line. Often this creates ugly word hyphenations. Unfortunately, trying to include linebreaks explicitely               \section{This is a very very \\ very long section heading}      does not really work. While it does create a linebreak the second line is simply not visible in the generated pdf output. With `classicthesis` there are many packages involved at once and I have not been able to create a minimal example for this problem. Therefore, I'm just asking for pointers what the problem could be and suggestions that could solve the problem.


title: Glyph insertion

text: I use Linux and have available to me the "compose" key, and thus can type characters like '°', 'ß', 'ï', 'į', 'ḯ', etc. Is it inherently "bad" to use the compose key to insert the characters, should I use LaTeX commands such as `\ss` instead of 'ß'? Does it even matter in the long run?


title: Page number missing from page following paper size change in pdflatex

text: I have a pdflatex document in which I switch paper sizes, just for one page, to display a large image. The page number is purposefully omitted from the larger page. I created macros for performing the switch to the larger size page also for switch back. The first normal sized page after the image is missing a page number, but subsequent pages seem to work OK. Also, if I don't manually insert a page break with `\clearpage`, it seems that the page is bottomless and my text goes on and on, invisible beyond the bottom of the page (this isn't demonstrated in the MWE below). Here is a minimal working example. Any idea what's going on here?               \documentclass{article}     \usepackage{pdflscape}          % Macros for changing paper size     \newcommand{\startPaperSizeB}{%       \clearpage       \begingroup       \setlength{\pdfpagewidth}{11in}       \setlength{\pdfpageheight}{17in}       \setlength{\paperwidth}{\pdfpagewidth}       \setlength{\paperheight}{\pdfpageheight}       \setlength{\textwidth}{526pt}% This one matters       \setlength{\textheight}{984pt}% This one matters       \pagestyle{empty}% No page number       }          \newcommand{\stopPaperSizeB}{\endgroup \clearpage}% The order of these commands makes no difference          \begin{document}     Some stuff on the first page here.          \startPaperSizeB     \begin{landscape}          Text on second page, intended for large image.          \end{landscape}     \stopPaperSizeB          Why no page number here?          \clearpage          Page numbers start working here, no problem.          \end{document}


title: Animations in LaTeX

text: I am a new user of LaTeX and this site. I have seen that many answers in this site have animations. However I am not able to produce any of these animations. For example, I asked a question and a got this answer, but when I compile this with `pdflatex`, I get this pdf which does not have any animation. What am I doing wrong?


title: Too much spacing in my table rows

text: My problem is that there appears to be a double-spacing between my rows. The spacing is also too much in between the lines of my column headers. I'm very new to LaTex and I don't know how to rectify this. Here's what I've done (with only a small fraction of the data set):               \documentclass[10pt,fullpage]{aastex}     \usepackage{longtable}     \usepackage{pdflscape}     \begin{document}     \begin{landscape}     \begin{center}     \begin{longtable}{c c c c c c c c c c c}     %Header for the first page of the table...     \caption{NGC2264 Protostars}\\     \hline \hline \\ [-.8ex]         \multicolumn{1}{c}{Name} &          \multicolumn{1}{c}{RA} &          \multicolumn{1}{c}{DEC} &                            \multicolumn{1}{c}{Mean I1} &          \multicolumn{1}{c}{Mean I2} &          \multicolumn{1}{c}{Alpha K2} &          \multicolumn{1}{c}{Class} &          \multicolumn{1}{c}{Alpha K8} &          \multicolumn{1}{c}{Av} &          \multicolumn{1}{c}{Avg Av}\\ [0.5ex] \hline         \\ [-.8ex]     \endfirsthead     %Header for the rest of the table's pages...     \multicolumn{1}{c}{{\tablename} \thetable{} -- Continued} \\ [0.5ex]         \hline \hline \\ [-.8ex]         \multicolumn{1}{c}{Name} &          \multicolumn{1}{c}{RA} &         \multicolumn{1}{c}{DEC} &          \multicolumn{1}{c}{Mean I1} &          \multicolumn{1}{c}{Mean I2} &          \multicolumn{1}{c}{Alpha K2} &          \multicolumn{1}{c}{Class} &          \multicolumn{1}{c}{Alpha K8} &          \multicolumn{1}{c}{Av} &          \multicolumn{1}{c}{Avg Av}\\ [0.5ex] \hline         \\ [.8ex]     \endhead     \\\hline     \endfoot          %Begin data...         Mon-000101 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39  & I     & 0.39  & 31.1  & 31.1 \\         Mon-000171 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45  & I     & 0.45  & 33.7  & 33.7 \\         Mon-000174 & 100.27621 & 9.563802 & 11.605 & 10.134 & 0.95  & I     & 1.29  & 30.8  & 30.8 \\         Mon-000191 & 100.28709 & 9.495832 & 9.231 & 8.105 & 1     & I     & 1.01  & 0     & 0 \\         \hline     %End data.     \end{longtable}     \end{center}     \end{landscape}     \end{document}      As a bonus question: How do I get the top of the page 'Table 1::NGC 2264..' to have 'NGC 2264...' under 'Table 1::' rather than beside it? ![enter image description here](http://i.stack.imgur.com/IUJcf.png)


title: How to change fontsize in lstlisting without losing bold syntax highlighting?

text: If I load the listing package to set nice code and change the font size (like suggested there: Shrinking monospace style for listings package), I lose the syntax highlighting, because the font does not get bold anymore.               \usepackage{listings}     \lstset{       language={[Sharp]C},       basicstyle=\ttfamily\tiny     }          \begin{lstlisting}       int a = 5;       //int should be bold, it's not.       //commenting out basicstyle makes it bold, but to big     \end{lstlisting}      Is there some way to change the font size of listings without losing code highlighting?


title: moderncv and page numbers not displaying if text too long

text: I am using the `moderncv` package with the `classic` style. I find that the page numbers do not appear if the text on the last page goes all the way to the bottom and is just on the verge of requiring another page. This is the best minimal example I could develop, which I created by modifying the template that comes with the moderncv package:               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{classic}     \moderncvcolor{blue}          \usepackage[scale=0.75]{geometry}          \firstname{John}     \familyname{Doe}     \title{Resume title}     \address{street and number}{postcode city}{country}\mobile{+1~(234)~567~890}     \phone{+2~(345)~678~901}     \fax{+3~(456)~789~012}     \email{john@doe.org}     \homepage{www.johndoe.com}     \extrainfo{additional information}     \quote{Some quote}          \begin{document}          \makecvtitle          \section{Education}     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}          \section{Master thesis}     \cvitem{title}{\emph{Title}}     \cvitem{supervisors}{Supervisors}     \cvitem{description}{Short thesis abstract}          \section{Experience}     \subsection{Vocational}     \cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%     Detailed achievements:%     \begin{itemize}%     \item Achievement 1;     \item Achievement 2, with sub-achievements:       \begin{itemize}%       \item Sub-achievement (a);       \item Sub-achievement (b), with sub-sub-achievements (don't do this!);         \begin{itemize}         \item Sub-sub-achievement i;         \item Sub-sub-achievement ii;         \item Sub-sub-achievement iii;         \end{itemize}       \item Sub-achievement (c);       \end{itemize}     \item Achievement 3.     \end{itemize}}     \cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}     \subsection{Miscellaneous}     \cventry{year--year}{Job title}{Employer}{City}{}{Description}          \section{Languages}     \cvitemwithcomment{Language 1}{Skill level}{Comment}     \cvitemwithcomment{Language 2}{Skill level}{Comment}     \cvitemwithcomment{Language 3}{Skill level}{Comment}          \section{Computer skills}     \cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}     \cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}     \cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}          \section{Interests}     \cvitem{hobby 1}{Description}     \cvitem{hobby 2}{Description}     \cvitem{hobby 3}{Description}          \section{Extra 1}     %\cvlistitem{UNCOMMENT THIS LINE OUT AND THE NUMBERS WILL DISAPPEAR.}     \cvlistitem{Item 2}     \cvlistitem{Item 2}     \cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}     \cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}     \cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}     \cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}          \section{Extra 2}     \cvlistdoubleitem{Item 1}{Item 4}     \cvlistdoubleitem{Item 2}{Item 5\cite{book1}}     \cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}          \section{References}     \begin{cvcolumns}       \cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}       \cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}       \cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textbf{those} also (all available upon request).}     \end{cvcolumns}          \end{document}      Note the line about two-thirds of the way through:               %\cvlistitem{UNCOMMENT THIS LINE OUT AND THE NUMBERS WILL DISAPPEAR.}      I find that if I uncomment this line, then the page numbers disappear. With it commented out, the page numbers appear.


title: How to make a document with light colors printer friendly?

text: I have a document with some text in light colors. It's looking good on screen but I need to print it. Unfortunately, once printed on a black and white laser printer, the light blue is no longer legible due to dithering. How can I render a document in which the text is going to be correct once printed ?               \documentclass[10pt,a4paper]{moderncv}     \moderncvtheme[blue]{classic}     \usepackage[utf8]{inputenc}     \usepackage[scale=0.8]{geometry}          \firstname{F}     \familyname{T}     \title{Title}     \address{43}{City}     \mobile{112-555-555}     \email{<mail>}          \begin{document}     \maketitle          \section{Blue text}          \end{document}


title: Vertical alignment in matrix alignment with cylinder

text: In the following MWE, the nodes in the matrix are not properly vertically aligned:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes}          \begin{document}          \begin{tikzpicture}[sibling distance=6mm,level distance=1.3cm,every node/.style={inner sep=4pt, text depth=0pt, minimum width=24mm,minimum height=24mm,align=center,inner sep=2pt}]              \matrix [draw=red] {         \node[draw=black, rectangle] {A}; & \node[draw=black,cylinder,shape border rotate=90,shape aspect=.25] {B\\ C\\ D}; & \node[draw=black,cylinder,shape border rotate=90,shape aspect=.25] {Bbbbbbbb\\ Cccccccc\\ Dddddddd};\\         };     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/sFe6v.png) It seems that the problem is introduced by the `cylinder` shape since the second cylinder is aligned worse than the second. By the way, why is the `cylinder`'s aspect dependent on the text it contains?


title: Fit only the height on a node

text: I've been trying to get the `fit` key in TikZ to scale a node so that it matches only the height of it's fit nodes but I haven't been successful. I'm trying to get the red box to be the size of the blue boxes: ![enter image description here](http://i.stack.imgur.com/bDvAz.png)               \documentclass{article}     \usepackage{tikz}     \usepackage{lipsum}          \usetikzlibrary{positioning,fit}     \newcommand{\filler}[1]{\begin{minipage}{12cm}\small\lipsum[#1]\end{minipage}}     \thispagestyle{empty}          \begin{document}          \begin{tikzpicture}[node distance=0pt,outer sep = 2pt, text centered]     \tikzstyle{box}=[rectangle,draw,inner sep=0em]          \tikzstyle{vline}=[box, rotate=90, fill=red!20, minimum height=1cm]     \tikzstyle{hline}=[box, fill=blue!20, minimum width=10cm]          \node[vline] (a) at (0,0) {\textbf{How do I extend this node to fit?}};     \node[hline] (b1) [below right = of a.south east] {\filler{1}};     \node[hline] (b2) [below = of b1] {\filler{2}};     \node[hline] (b3) [below = of b2] {\filler{3}};     \end{tikzpicture}          \end{document}      **Question:** for node `a`, how do I keep the x dimension fixed, while the y dimension scales to the height of nodes `(b1,b2,b3)`?


title: Define aliases for indices

text: We defined the following command to generate an index for a publication               \newcommand{\markindex}[1]{\index{#1}#1}      In a text, it is however possible that one uses synonyms interleaved (e.g.), abbrevations or shorter versions (e.g. traveling salesman istead of traveling salesman problem) due to the context of the sentence:               A \markindex{graph} consists out of a set of \markindex{nodes} or \markindex{vertices} and a set of \markindex{edges}.      As a result, the compiler generates an index with: > nodes, 1,2,7,9   >  vertices 1,2,5,6,7 We are looking for a method to define an alias               \indexalias{nodes}{vertices}      Such that not only `nodes` contains a `see vertices` entry, but all the page numbers are grouped on conto of `vertices`. This centralizes data (otherwise it is possible that readers miss the entries of `nodes` when they look up `vertices`) and makes it more compact (two references to the same page are "compressed" in one reference). Is there a package (or an option in `\makeidx` we've overlooked) for this?


title: Adjusting the overall width of a table

text: My table extends past the margin of my `.pdf` file. I already set the margin using the `geometry` package. How will I be able to adjust the width of my table so that it will be within the specified margins?


title: Make a length negative

text: I was wondering if there is a way to have a `\negate` command which makes lengths negative. So you could do things like:               \newlength{\negativeabovecaptionskip}     \setlength\negativeabovecaptionskip{\negate{\abovecaptionskip}}          \the\abovecaptionskip %prints: 10pt     \the\negativeabovecaptionskip %prints: -10pt          %%But also:     \newlength{\negativeparskip}     \setlength\negativeparskip{\negate{\parskip}}          \the\parskip %prints: 15pt plus 2pt minus 1pt     \the\negativeparskip %prints: -15pt plus 1pt minus 2pt     %(notice that the the plus/minus values switched possitions)      Any ideas?


title: circle node on an ellipse

text: I want to put this node on an ellipse at about the 35% mark               \node[draw, circle, inner sep = .08cm, scale = .75] (location) {2};          \documentclass{article}     \begin{document}     \usepackage{tikz}     \usetikzlibrary{arrows, decorations.markings, decorations.pathreplacing}     \begin{tikzpicture}     \begin{scope}[decoration = {markings, mark = at position 0.3 with {\arrow{>}},} ]       \clip (-5,0) rectangle (1,2.5);       \draw[postaction = decorate] (-2,0) ellipse (3cm and 2cm);     \end{scope}     \end{tikzpicture}     \end{document}      How could I achieve this?


title: Error using the package makeidx

text: My index is working smoothly with the command               \makeindex       alone. However, when I put               \usepackage{makeidx}\makeindex      compilation gives two errors as               1. Command \see already defined.     \newcommand*\see[2]{\emph{\seename} #1}     2. Command \printindex already defined.     ...command\printindex{\@input@{\jobname.ind}}      Packages I am using are:               \usepackage{amsmath}%     \usepackage{amsfonts}%     \usepackage{amssymb}%     \usepackage{amsmath,amscd}%     \usepackage{amsmath,chemarrow}%     \usepackage{amsmath,thmtools}%      \usepackage{amsmath,diagrams}%     \usepackage{amsfonts,mathrsfs}%     \usepackage{amsfonts,eucal}%     \diagramstyle[labelstyle=\scriptstyle]%     \usepackage{graphicx}%     \usepackage{xy}%     \usepackage{bez123,calc,curves,ebezier,epic,eepic,multiply,rotating}%     \usepackage[bookmarks]{hyperref}%     \usepackage{MnSymbol}%     \usepackage{etoolbox}%     \usepackage{manfnt}%     \usepackage{xcolor}%     \usepackage{slashed}     \NeedsTeXFormat{LaTeX2e}      I am curious where is the clash. I am using MikTeX 2.9 with TeXnicCenter.


title: Who maintains babel now?

text: Who manages `babel` now? It is said on CTAN that Johannes L. Braams is no longer active on this package. I'd like to contribute `babel`'s support for Russian in LuaLaTeX.


title: arrows.meta in tikz

text: I have an up-to-date MikTeX 2.9 installation with tikz/pgf 3.0, but trying to compile               \documentclass[tikz,border=0.125cm]{standalone}     \usetikzlibrary{arrows.meta}     \begin{document}     \begin{tikzpicture}[line width=4pt]     \draw [red!50!black, -Stealth] (0,0) -- (3,0);     \draw [green!50!black, -{Stealth[slant=-0.5]}] (0,1) -- (3,1);     \draw [blue!50!black, {Square[slant=-0.5,length=\the\pgflinewidth]}-{Stealth[slant=-0.5]}] (0,2) -- (3,2);     \end{tikzpicture}     \end{document}      (taken from TikZ: configuring arrow tip appearance not working according to documentation) gives 906 errors beginning with               ! Undefined control sequence.     l.28 \pgfarrowsaddtolengthscalelist                                        \pgfarrowlength      The arrows.meta library has               \ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.meta.code.tex,v 1.12 2013/12/13 15:11:58 tantau Exp $      in its header. What am I doing wrong? **EDIT:** In the end it says               ! I can't find file `tikzlibrary.code.tex'.      Where do I get this file from and where shall I put it? I don't find it in the zip file from sourceforge.


title: Error in mathematical symbols in "Article" document class

text: When I use the mathematical symbols, with an error, the compiler stops. for example for `\leq` or `\mu`. What is the reason and solution for this?


title: beamer: repeat variations of a frame

text: In latex beamer I want to do the following:   1. repeat a frame (from some slides before)   2. repeat it again, but make some words grey (or better opaqueness 50%) others red   3. repeat it again but without the grey words from the previous slide Is there an elegant way to this except of a copy and paste solution?


title: How to give arguments to a tex file during compilation?

text: I have a file called `main.tex`, which looks like this:               \begin{document}     \input{a.tex}     \end{document}      I want to know if it is possible to have it take this file `a.tex` in argument, such that I could compile it in a manner that depending on the argument it gives a different output automatically. Something like `pdflatex main.tex < a.tex > a.pdf`


title: Change format of hyperref generated PDF bookmarks

text: In a generic way, how can I change the format of bookmarks generated automatically by `hyperref` (or `bookmark`)? By generic, I mean the ability the customize the bookmark format for `part`, `chapter`, `section`, etc. without having to modify the document TeX. Ideally it will be contained in a class wrapper. Bookmark format ideas:   * Unnumbered parts, numbered chapters, unnumbered sections/subsections (but they all are numbered - `not@star`).   * Part format: "Part <#>: " or ", Part <#>"   * Move number to after the title MWE:               \document{scrbook}     \usepackage{hyperref}     \usepackage[numbered]{bookmark}     \begin{document}     \part{Test Part}     \chapter{Test Chapter}     \section{Test Section}     \part{Test Part}     \chapter{Test Chapter}     \section{Test Section}     \end{document}      Here's the index output (evince) marked up with what I would like to do. Perhaps rewriting a `bookmark`/`hyperref` command would do? ![sample output](http://i.stack.imgur.com/BMrkm.png)


title: Different numbering scheme per chapter

text: I would like to change the numbering scheme for my theorems per chapter. That's because I have smaller and bigger chapters. Bigger chapters need subsections for proper structuring, and so my theorems are numbered within subsections. For smaller chapters there won't be any subsections so I would like to have my theorems numbered within sections. (That means one less number). What I'm trying to accomplish is: # Chapter 1. ## Section 1.1. ### Subsection 1.1.1. **Theorem 1.1.1.1.**   **Theorem 1.1.1.2.** # Chapter 2. ## Section 2.1. **Theorem 2.1.1.**   **Theorem 2.1.2.** How can I do that? MWE: (randomize section titles and theorem body text as you please)               \documentclass{book}     \usepackage{amsthm}     \newtheorem{theorem}{Theorem}[subsection]     \begin{document}     \chapter{}     \section{}     \subsection{}     \begin{theorem}\end{theorem}     \chapter{}     \section{}     \begin{theorem}\end{theorem}     \begin{theorem}\end{theorem}     \end{document}      Note: egreg's answer includes a version incorporating the hack he gave me here.


title: Amsthm numbering depending on section depth

text: I'm using `amsthm` and `thmtools` to define custom theorem environments, definition environments, etc. All such environments share the same counter. Is it possible to vary the numbering format depending on the section depth? I want to achieve the following numbering format: 1 Section 1.1 Theorem 1.2 Definition 1.1 Subsection 1.1.1 Theorem 1.1.2 Lemma


title: Width of epigraphs

text: How can I set the width of an epigraph for automatic fitting of text inside epigraph? I would like that the line between text and source have the same width of the above text. This in every epigraph! Example of what I don't like:   1. Too long a line              \setlength{\epigraphwidth}{0.8\textwidth}     \epigraph{All models are wrong, but some are useful.}{George E. P. Box}      ![Too long a line](http://i.stack.imgur.com/MnNgQ.png)   2. Too short a line and it adds a new line that I don't like              \epigraph{All models are wrong, but some are useful.}{George E. P. Box}      ![enter image description here](http://i.stack.imgur.com/8e1Dt.png) **UPDATE** : the miminal source               \documentclass{book}     \usepackage[italian]{babel}          \usepackage{epigraph}     \renewcommand{\epigraphsize}{\small}          %\setlength{\epigraphwidth}{0.8\textwidth}          \renewcommand{\textflush}{flushright} \renewcommand{\sourceflush}{flushright}          \let\originalepigraph\epigraph      \renewcommand\epigraph[2]{\originalepigraph{\textit{#1}}{\textsc{#2}}}          \begin{document}          \epigraph{All models are wrong, but some are useful.}{George E. P. Box}          \end{document}


title: Keyboard character is undefined error

text: I'm trying to compile a simple ISO-8859-2 document,               \documentclass[twocolumn]{article}          \usepackage[czech]{babel}     \usepackage[latin2]{inputenc}     \usepackage[T1]{fontenc}          \usepackage[paperwidth=18cm, paperheight=13cm]{geometry}          \begin{document}     České vysoké učení technické v Praze     \end{document}      The compilation fails at the "č" letters. It keeps saying               ! Package inputenc Error: Keyboard character used is undefined     (inputenc) in inputencoding `latin2'.      despite the fact that "č" is a latin2 character.


title: How to use \mathcal with subscript? Undefined control sequence..

text: I am trying to have a cursively written l (L) with a subscript A. I tried this: If A has a straight line $\matchcal{l\subscript{A}}$ But I'm getting undefined control sequence. Why is this?


title: Suppress header on first page of section

text: I created a header using KOMA-Script. How can I suppress this header on the first page of a section?


title: how to create this cover page?

text: How could I create a cover page in a report as follows? ![enter image description here](http://i.stack.imgur.com/RepEO.jpg) Especially I would like to know how to create this grey and red area.


How can I write curly capital Greek letters, looking like math cal? In particular I need curly `\Pi`. I want to have both version regular `\Pi` and curly `\Pi` in one text.


title: XDVI and composition managers

text: I am trying to use XDVI (as shipped by TeXLive 2010) in a Linux X11 desktop which is using the Compiz compositing manager. Now, when the DVI file being displayed changes, I have to click on the window to have it update: simply giving focus to the window does not cause XDVI to reload the file because (I guess) Compiz makes it believe that it is always being mapped onscreen. Is there a way to have XDVI behave more reasonably in my situation?


title: Feynman diagram using feynmf - keeping lines straight after vertex, keeping line flat

text: \documentclass[a4paper,11pt]{report}     \usepackage{feynmp}     \usepackage[pdftex]{graphicx}     \DeclareGraphicsRule{*}{mps}{*}{}     \begin{document}     \begin{figure}     \label{fig:ele_int_conv}     \centering     \parbox{0.5\textwidth}{     \begin{fmffile}{nonres}     \begin{fmfgraph*}(250,125)     \fmfleft{i1,i2}     \fmfright{o1,o2,o3,o4}     \fmf{fermion,lab=$q$}{i1,v1}     \fmf{fermion,lab=$\bar{q}$}{i2,v1}     \fmf{boson,lab=$Z$}{v1,v2}     \fmf{fermion,lab=$\mu^+$}{v2,v3,o1}     \fmf{boson,lab=$\gamma^*$}{v3,v4}     \fmf{fermion,lab=$e^+$ (missed)}{v4,o2}     \fmf{fermion,lab=$e^-$}{v4,o3}     \fmf{fermion,lab=$\mu^-$}{v2,o4}          \end{fmfgraph*}     \end{fmffile}      Minimal working example produces this which is generally fine, but I would like to make the central "Z" line exactly horizontal, and I would like the \mu^+ line to be straight, and only have one label.


title: LatexIt: how to include code?

text: I am trying to use LatexIt for code inclusion in the presentation (keynote). I have added the `\usepackage{listings}` in the `body templates => preamble` and the MWE* is here:               \begin{lstlisting}     public class test{     }     \end{lstlisting}      So, when I try to "Latex it!" it gives errors:               Missing $ inserted.     Missing \endgroup inserted.     Missing \endgroup inserted.     Missing } inserted.     Missing } inserted.      and so on. Any tips? *Should be MNWE = Minimal Not Working Example. Screenshot: ![enter image description here](http://i.stack.imgur.com/Xhw5t.png)


title: The word "Print" appears after every source using \printbibliography

text: I am using the following:               \documentclass[a4paper, 11pt]{article}     \usepackage[english,swedish]{babel}     \usepackage{graphicx}     \usepackage[T1]{fontenc}     \usepackage{xcolor,colortbl}     \usepackage[backend=bibtex,style=mla]{biblatex}          \nocite{*}          ...               \begin{document}          text... \footcite{source}          \printbibliography[heading=none]               \end{document}      Why is there's an extra "print" after each source? ![enter image description here](http://i.stack.imgur.com/kB1o8.png)


title: Math symbols not showing while using fontspec

text: Math, symbols are not showing when i am using the `fontspec` package. Here i paste the command and output please tell me as to how i can rectify this. Command:               \documentclass[10pt,amssymb]{revtex4}     \usepackage{amsmath,fontspec}     \setmainfont[Mapping=tex-text]{URW Bookman L}     \begin{document}               \begin{align*}     \lim_{n\to\infty}n\left(a^{1/n}-1\right) &= \lim_{x\to\infty}\frac{a^{1/x}-1}{\frac{1}{x}} = \lim_{x\to\infty}\frac{e^{\ln(a)/x}-1}{\frac{1}{x}}\\\     &= \lim_{x\to\infty}\frac{-\frac{1}{x^2}\ln(a)e^{\ln(a)/x}}{-\frac{1}{x^2}}\\\     &= \lim_{x\to\infty}\ln(a)e^{\ln(a)/x} = \ln(a).     \end{align*}     So there *is* a pointwise limit, and $\lim\limits_{n\to\infty}f_n(a) = \ln(a)$.     \end{document}      **OUTPUT:** ![enter image description here](http://i.stack.imgur.com/j8rQc.png) -- **ADDED- LOG FILE**               his is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) (format=xelatex 2010.7.11)  8 DEC 2010 10:45     entering extended mode      %&-line parsing enabled.     **trial.tex     (./trial.tex     LaTeX2e <2005/12/01>     Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng     erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,      french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc     us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por     tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,      turkish, ukenglish, ukrainian, loaded.     (/usr/share/texmf/tex/latex/revtex/revtex4.cls     Document Class: revtex4 2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for do     cumentation)      Copyright (c) 2001 The American Physical Society.      mailto:revtex@aps.org      Licensed under the LPPL:     http://www.ctan.org/tex-archive/macros/latex/base/lppl.txt      Arthur Ogawa <ogawa@teleport.com>      Based on work by David Carlisle <david@dcarlisle.demon.co.uk>.     ltxutil: portions licensed from W. E. Baxter (web@superscript.com)     Class revtex4 Info: Repairing broken LateX \@sect on input line 596.     \intertabularlinepenalty=\count79     \@tbpen=\count80     \@arstrutbox@hline=\box26     Class revtex4 Info: Repairing broken LaTeX \@xbitor on input line 1610.     ltxgrid: portions licensed from W. E. Baxter (web@superscript.com)     \c@linecount=\count81     \output=\toks14     \@protection@box=\box27     \@topmark@saved=\toks15     \footins@saved=\box28     \pagesofar=\box29     \footbox=\box30     \pagegrid@col=\count82     Class revtex4 Info: Incorporating package {textcase}  [1998/11/12 v0.06 Text on     ly upper/lower case changing (DPC)]. on input line 3682.     (/usr/share/texmf/tex/xelatex/xetexurl/url.sty     \Urlmuskip=\muskip10     Package: url 2004/03/15  ver 3.1  Verb mode for urls, etc.     )     \c@affil=\count83     \absbox=\box31     \c@part=\count84     \c@section=\count85     \c@subsection=\count86     \c@subsubsection=\count87     \c@paragraph=\count88     \c@subparagraph=\count89     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \c@figure=\count90     \c@table=\count91          (/usr/share/texmf/tex/latex/natbib/natbib.sty     Package: natbib 2007/02/05 8.0 (PWD)     \bibhang=\skip43     \bibsep=\skip44     LaTeX Info: Redefining \cite on input line 602.     \c@NAT@ctr=\count92     )     \widetext@top=\box32     \widetext@bot=\box33          (/usr/share/texmf/tex/latex/revtex/revsymb.sty     Package: revsymb 2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for documenta     tion)     LaTeX Info: Redefining \REV@mathfrak on input line 118.     ))     (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty     Package: amssymb 2002/01/22 v2.2d          (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty     Package: amsfonts 2001/10/25 v2.2f     \@emptytoks=\toks16     \symAMSa=\mathgroup4     \symAMSb=\mathgroup5     LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'     (Font)                  U/euf/m/n --> U/euf/b/n on input line 132.     LaTeX Info: Redefining \frak on input line 135.     LaTeX Info: Redefining \Bbb on input line 137.     ))          Class revtex4 Warning: No Society specified, using generic APS style.          (/usr/share/texmf/tex/latex/revtex/aps.rtx     File: aps.rtx 2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for documentatio     n)     )     (/usr/share/texmf/tex/latex/revtex/10pt.rtx     File: 10pt.rtx 2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for documentati     on)     )     (/usr/share/texmf/tex/latex/amsmath/amsmath.sty     Package: amsmath 2000/07/18 v2.13 AMS math features     \@mathmargin=\skip45          For additional information on amsmath, use the `?' option.     (/usr/share/texmf/tex/latex/amsmath/amstext.sty     Package: amstext 2000/06/29 v2.01          (/usr/share/texmf/tex/latex/amsmath/amsgen.sty     File: amsgen.sty 1999/11/30 v2.0     \@emptytoks=\toks17     \ex@=\dimen102     ))     (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty     Package: amsbsy 1999/11/29 v1.2d     \pmbraise@=\dimen103     )     (/usr/share/texmf/tex/latex/amsmath/amsopn.sty     Package: amsopn 1999/12/14 v2.01 operator names     )     \inf@bad=\count93     LaTeX Info: Redefining \frac on input line 211.     \uproot@=\count94     \leftroot@=\count95     LaTeX Info: Redefining \overline on input line 307.     \classnum@=\count96     \DOTSCASE@=\count97     LaTeX Info: Redefining \ldots on input line 379.     LaTeX Info: Redefining \dots on input line 382.     LaTeX Info: Redefining \cdots on input line 467.     \Mathstrutbox@=\box34     \strutbox@=\box35     \big@size=\dimen104     LaTeX Font Info:    Redeclaring font encoding OML on input line 567.     LaTeX Font Info:    Redeclaring font encoding OMS on input line 568.     \macc@depth=\count98     \c@MaxMatrixCols=\count99     \dotsspace@=\muskip11     \c@parentequation=\count100     \dspbrk@lvl=\count101     \tag@help=\toks18     \row@=\count102     \column@=\count103     \maxfields@=\count104     \andhelp@=\toks19     \eqnshift@=\dimen105     \alignsep@=\dimen106     \tagshift@=\dimen107     \tagwidth@=\dimen108     \totwidth@=\dimen109     \lineht@=\dimen110     \@envbody=\toks20     \multlinegap=\skip46     \multlinetaggap=\skip47     \mathdisplay@stack=\toks21     LaTeX Info: Redefining \[ on input line 2666.     LaTeX Info: Redefining \] on input line 2667.     )     (/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty     Package: fontspec 2006/12/24 v1.13 Advanced font selection for XeLaTeX          (/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty     Package: ifxetex 2006/08/21 v0.3 Provides ifxetex conditional     )     \c@zf@newff=\count105     \c@zf@index=\count106     \c@zf@script=\count107     \c@zf@language=\count108          (/usr/share/texmf/tex/latex/tools/calc.sty     Package: calc 2005/08/06 v4.2 Infix arithmetic (KKT,FJ)     \calc@Acount=\count109     \calc@Bcount=\count110     \calc@Adimen=\dimen111     \calc@Bdimen=\dimen112     \calc@Askip=\skip48     \calc@Bskip=\skip49     LaTeX Info: Redefining \setlength on input line 75.     LaTeX Info: Redefining \addtolength on input line 76.     \calc@Ccount=\count111     \calc@Cskip=\skip50     )     (/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty     Package: xkeyval 2006/11/18 v2.5f package option processing (HA)          (/usr/share/texmf/tex/latex/xkeyval/xkeyval.tex     \XKV@toks=\toks22     \XKV@depth=\count112     File: xkeyval.tex 2006/11/18 v2.5f key=value parser (HA)          (/usr/share/texmf/tex/latex/xkeyval/keyval.tex)))     (/usr/share/texmf/tex/latex/lm/lmodern.sty     Package: lmodern 2007/01/14 v1.3 Latin Modern Fonts     LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'     (Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 13.     LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'     (Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 14.     LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'     (Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 15.     LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'     (Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 16.     LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'     (Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 17.     LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'     (Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 18.     LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'     (Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 19.     LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'     (Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 20.     LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'     (Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 22.     LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'     (Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 23.     LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'     (Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 24.     LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'     (Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 25.     LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'     (Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.     LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'     (Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 27.     LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'     (Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 28.     LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'     (Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 29.     )     (/usr/share/texmf/tex/latex/base/fontenc.sty     Package: fontenc 2005/09/27 v1.99g Standard LaTeX package          (/usr/share/texmf/tex/xelatex/euenc/eu1enc.def     File: eu1enc.def 2006/08/13 v0.1a Experimental unicode font encoding     )     LaTeX Font Info:    Try loading font information for EU1+lmr on input line 100.               (/usr/share/texmf/tex/xelatex/euenc/lm/eu1lmr.fd     File: eu1lmr.fd 2007/01/14 v1.3 Font defs for Latin Modern     ))     LaTeX Info: Redefining \itshape on input line 1050.     LaTeX Info: Redefining \slshape on input line 1053.     LaTeX Info: Redefining \scshape on input line 1056.     LaTeX Info: Redefining \upshape on input line 1059.          fontspec.cfg loaded.     (/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg))     \c@zf@famc@Veljovic LT Book=\count113     Package fontspec Info: Defining font family for "Veljovic LT Book" with options      [Mapping=tex-text] on input line 4.     Package fontspec Info: Could not resolve font Veljovic LT Book/B (it might not      exist) on input line 4.     Package fontspec Info: Could not resolve font Veljovic LT Book/I (it might not      exist) on input line 4.     Package fontspec Info: Could not resolve font Veljovic LT Book/BI (it might not      exist) on input line 4.      (./trial.aux)     \openout1 = `trial.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for EU1/lmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     Class revtex4 Info: Patching LaTeX tabular. on input line 6.     Class revtex4 Info: cite was not loaded (OK!) on input line 6.     Class revtex4 Info: multicol was not loaded (OK!) on input line 6.     \symlegacymaths=\mathgroup6     LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'     (Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 6.     LaTeX Font Info:    Redeclaring math accent \acute on input line 6.     LaTeX Font Info:    Redeclaring math accent \grave on input line 6.     LaTeX Font Info:    Redeclaring math accent \ddot on input line 6.     LaTeX Font Info:    Redeclaring math accent \tilde on input line 6.     LaTeX Font Info:    Redeclaring math accent \bar on input line 6.     LaTeX Font Info:    Redeclaring math accent \breve on input line 6.     LaTeX Font Info:    Redeclaring math accent \check on input line 6.     LaTeX Font Info:    Redeclaring math accent \hat on input line 6.     LaTeX Font Info:    Redeclaring math accent \dot on input line 6.     LaTeX Font Info:    Redeclaring math accent \mathring on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Delta on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Theta on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Xi on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Pi on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Phi on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Psi on input line 6.     LaTeX Font Info:    Redeclaring math symbol \Omega on input line 6.     LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 6.     LaTeX Font Info:    Redeclaring symbol font `operators' on input line 6.     LaTeX Font Info:    Encoding `OT1' has changed to `EU1' for symbol font     (Font)              `operators' in the math version `normal' on input line 6.     LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'     (Font)                  OT1/lmr/m/n --> EU1/VeljovicLTBook(0)/m/n on input line      6.     LaTeX Font Info:    Encoding `OT1' has changed to `EU1' for symbol font     (Font)              `operators' in the math version `bold' on input line 6.     LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'     (Font)                  OT1/lmr/bx/n --> EU1/VeljovicLTBook(0)/m/n on input lin     e 6.     LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'     (Font)                  EU1/VeljovicLTBook(0)/m/n --> EU1/VeljovicLTBook(0)/m/n      on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathrm' in version `normal'     (Font)                  EU1/VeljovicLTBook(0)/m/n --> EU1/VeljovicLTBook(0)/m/n      on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'     (Font)                  OT1/lmr/m/it --> EU1/VeljovicLTBook(0)/m/it on input li     ne 6.     LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'     (Font)                  OT1/lmr/bx/n --> EU1/VeljovicLTBook(0)/bx/n on input li     ne 6.     LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'     (Font)                  OT1/lmss/m/n --> EU1/lmss/m/n on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'     (Font)                  OT1/lmtt/m/n --> EU1/lmtt/m/n on input line 6.     LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'     (Font)                  EU1/VeljovicLTBook(0)/m/n --> EU1/VeljovicLTBook(0)/bx/     n on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathrm' in version `bold'     (Font)                  EU1/VeljovicLTBook(0)/m/n --> EU1/VeljovicLTBook(0)/bx/     n on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'     (Font)                  OT1/lmr/bx/it --> EU1/VeljovicLTBook(0)/bx/it on input      line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'     (Font)                  OT1/lmss/bx/n --> EU1/lmss/bx/n on input line 6.     LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'     (Font)                  OT1/lmtt/m/n --> EU1/lmtt/bx/n on input line 6.     LaTeX Font Info:    Try loading font information for OML+lmm on input line 9.          (/usr/share/texmf/tex/latex/lm/omllmm.fd     File: omllmm.fd 2007/01/14 v1.3 Font defs for Latin Modern     )     LaTeX Font Info:    Try loading font information for OMS+lmsy on input line 9.          (/usr/share/texmf/tex/latex/lm/omslmsy.fd     File: omslmsy.fd 2007/01/14 v1.3 Font defs for Latin Modern     )     LaTeX Font Info:    Try loading font information for OMX+lmex on input line 9.          (/usr/share/texmf/tex/latex/lm/omxlmex.fd     File: omxlmex.fd 2007/01/14 v1.3 Font defs for Latin Modern     )     LaTeX Font Info:    External font `lmex10' loaded for size     (Font)              <10> on input line 9.     LaTeX Font Info:    External font `lmex10' loaded for size     (Font)              <7> on input line 9.     LaTeX Font Info:    External font `lmex10' loaded for size     (Font)              <5> on input line 9.     LaTeX Font Info:    Try loading font information for U+msa on input line 9.          (/usr/share/texmf/tex/latex/amsfonts/umsa.fd     File: umsa.fd 2002/01/19 v2.2g AMS font definitions     )     LaTeX Font Info:    Try loading font information for U+msb on input line 9.          (/usr/share/texmf/tex/latex/amsfonts/umsb.fd     File: umsb.fd 2002/01/19 v2.2g AMS font definitions     ) [1] (./trial.aux) )      Here is how much of TeX's memory you used:      4577 strings out of 191470      72073 string characters out of 1925444      165455 words of memory out of 1500000      7727 multiletter control sequences out of 10000+200000      7134 words of font info for 33 fonts, out of 1200000 for 2000      605 hyphenation exceptions out of 8191      29i,10n,43p,295b,187s stack positions out of 5000i,500n,6000p,200000b,15000s          Output written on trial.pdf (1 page).      **ERROR 2**               This is XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2011/dev) (format=xelatex 2010.7.20)  9 DEC 2010 09:35     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **trial.tex     (./trial.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, po     lish, ukrainian, russian, hungarian, danish, indonesian, latin, uppersorbian, s     erbian, coptic, turkmen, portuguese, kurmanji, slovenian, pinyin, farsi, sanskr     it, icelandic, catalan, irish, basque, bulgarian, bokmal, nynorsk, mongolian, m     ongolianlmc, german, ngerman, swissgerman, latvian, welsh, ukenglish, usenglish     max, lithuanian, monogreek, greek, dutch, interlingua, slovak, finnish, german-     x-2009-06-19, ngerman-x-2009-06-19, esperanto, assamese, bengali, gujarati, hin     di, kannada, malayalam, marathi, oriya, panjabi, tamil, telugu, galician, armen     ian, swedish, italian, ancientgreek, ibycus, estonian, romanian, arabic, lao, f     rench, czech, spanish, loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count80     \c@section=\count81     \c@subsection=\count82     \c@subsubsection=\count83     \c@paragraph=\count84     \c@subparagraph=\count85     \c@figure=\count86     \c@table=\count87     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty     Package: fontspec 2010/07/14 v2.0b Advanced font selection for XeLaTeX/LuaLaTeX               (/usr/share/texlive/texmf-dist/tex/latex/expl3/expl3.sty     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3names.sty     Package: l3names 2010/07/11 v1981 L3 Experimental Naming Scheme for TeX Primiti     ves     )     Package: expl3 2010/07/13 v1982 L3 Experimental code bundle wrapper          (/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty     Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)     \et@xins=\count88     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3basics.sty     Package: l3basics 2010/06/07 v1942 L3 Experimental basic definitions     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3expan.sty     Package: l3expan 2010/06/10 v1948 L3 Experimental Argument Expansion module     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3tl.sty     Package: l3tl 2010/05/22 v1919 L3 Experimental Token Lists     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3intexpr.sty     Package: l3intexpr 2010/06/15 v1957 L3 Integer Expressions     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3quark.sty     Package: l3quark 2010/03/21 v1853 L3 Experimental Quark Commands     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3seq.sty     Package: l3seq 2010/03/29 v1879 L3 Experimental sequences and stacks     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3toks.sty     Package: l3toks 2010/05/25 v1933 L3 Experimental Token Registers     \l_tmpb_toks=\toks14     \l_tmpc_toks=\toks15     \g_tmpa_toks=\toks16     \g_tmpb_toks=\toks17     \g_tmpc_toks=\toks18     \c_empty_toks=\toks19     \l_tl_replace_toks=\toks20     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3int.sty     Package: l3int 2010/05/25 v1933 L3 Experimental Integer module     \l_tmpa_int=\count89     \l_tmpb_int=\count90     \l_tmpc_int=\count91     \g_tmpa_int=\count92     \g_tmpb_int=\count93     \c_max_int=\count94     \g_tl_inline_level_int=\count95     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3prg.sty     Package: l3prg 2010/03/21 v1853 L3 Experimental control structures     \g_prg_inline_level_int=\count96     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3clist.sty     Package: l3clist 2010/03/29 v1878 L3 Experimental comma separated lists     \g_clist_inline_level_int=\count97     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3token.sty     Package: l3token 2010/04/11 v1890 L3 Experimental token investigation and manip     ulation     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3prop.sty     Package: l3prop 2010/03/21 v1857 L3 Experimental Property Lists     \g_prop_inline_level_int=\count98     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3msg.sty     Package: l3msg 2010/03/23 v1866 L3 Experimental LaTeX Messages module     \l_msg_redirect_classes_prop=\toks21     \l_msg_redirect_names_prop=\toks22     \l_msg_redirect_fatal_prop=\toks23     \l_msg_redirect_error_prop=\toks24     \l_msg_redirect_warning_prop=\toks25     \l_msg_redirect_info_prop=\toks26     \l_msg_redirect_log_prop=\toks27     \l_msg_redirect_trace_prop=\toks28     \l_msg_redirect_none_prop=\toks29     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3io.sty     Package: l3io 2010/05/22 v1923 L3 Experimental i/o module     \g_iow_streams_prop=\toks30     \g_ior_streams_prop=\toks31     \l_iow_stream_int=\count99     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3skip.sty     Package: l3skip 2010/05/25 v1933 L3 Experimental skip registers     \l_tmpa_skip=\skip43     \l_tmpb_skip=\skip44     \l_tmpc_skip=\skip45     \g_tmpa_skip=\skip46     \g_tmpb_skip=\skip47     \l_tmpa_dim=\dimen103     \l_tmpb_dim=\dimen104     \l_tmpc_dim=\dimen105     \l_tmpd_dim=\dimen106     \g_tmpa_dim=\dimen107     \g_tmpb_dim=\dimen108     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3box.sty     Package: l3box 2010/05/22 v1919 L3 Experimental Box module     \l_tmpb_box=\box26     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3keyval.sty     Package: l3keyval 2010/04/11 v1890 L3 Experimental keyval processing     \l_KV_level_int=\count100     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3keys.sty     Package: l3keys 2010/05/24 v1931 L3 Experimental key-value support     \l_keys_choice_int=\count101     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3precom.sty     Package: l3precom 2010/02/09 v1793 L3 Experimental precompilation module     \g_gen_sym_int=\count102     \g_ggen_sym_int=\count103     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3xref.sty     Package: l3xref 2010/02/09 v1786 L3 Experimental cross referencing     \g_xref_all_curr_immediate_fields_prop=\toks32     \g_xref_all_curr_deferred_fields_prop=\toks33     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3file.sty     Package: l3file 2010/03/21 v1853 L3 Experimental file loading     )     (/usr/share/texlive/texmf-dist/tex/latex/expl3/l3fp.sty     Package: l3fp 2010/07/08 v1979 L3 Experimental floating-point operations     \l_fp_input_a_integer_int=\count104     \l_fp_input_a_decimal_int=\count105     \l_fp_input_b_integer_int=\count106     \l_fp_input_b_decimal_int=\count107     \l_fp_input_a_sign_int=\count108     \l_fp_input_b_sign_int=\count109     \l_fp_split_sign_int=\count110     \l_fp_mul_a_i_int=\count111     \l_fp_mul_a_ii_int=\count112     \l_fp_mul_a_iii_int=\count113     \l_fp_mul_a_iv_int=\count114     \l_fp_mul_a_v_int=\count115     \l_fp_mul_a_vi_int=\count116     \l_fp_mul_b_i_int=\count117     \l_fp_mul_b_ii_int=\count118     \l_fp_mul_b_iii_int=\count119     \l_fp_mul_b_iv_int=\count120     \l_fp_mul_b_v_int=\count121     \l_fp_mul_b_vi_int=\count122     \l_fp_mul_output_int=\count123     \l_fp_div_count_int=\count124     \l_fp_div_offset_int=\count125     \l_fp_output_sign_int=\count126     \l_fp_output_integer_int=\count127     \l_fp_output_decimal_int=\count128     \l_fp_round_discard_int=\count129     \l_fp_round_position_int=\count130     \l_fp_tmp_int=\count131     \c_one_hundred_million=\count132     \c_one_thousand_million=\count133     \l_fp_tmp_dim=\dimen109     \l_fp_round_precision_int=\count134     )     (/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty     Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     \calc@Acount=\count135     \calc@Bcount=\count136     \calc@Adimen=\dimen110     \calc@Bdimen=\dimen111     \calc@Askip=\skip48     \calc@Bskip=\skip49     LaTeX Info: Redefining \setlength on input line 76.     LaTeX Info: Redefining \addtolength on input line 77.     \calc@Ccount=\count137     \calc@Cskip=\skip50     ))     (/usr/share/texlive/texmf-dist/tex/latex/xpackages/xbase/xparse.sty     Package: xparse 2010/05/23 v1927 Generic document command parser     \c_xparse_shorthands_prop=\toks34     \l_xparse_m_args_int=\count138     \l_xparse_mandatory_args_int=\count139     \l_xparse_processor_int=\count140     \l_xparse_total_args_int=\count141     )     ! I can't find file `binhex.tex'.     l.22 \input binhex.tex                              % before expl syntax!     (Press Enter to retry, or Control-D to exit)     Please type another input file name:      ! Emergency stop.     l.22 \input binhex.tex                              % before expl syntax!     End of file on the terminal!               Here is how much of TeX's memory you used:      4080 strings out of 494556      70746 string characters out of 3159734      98441 words of memory out of 3000000      7329 multiletter control sequences out of 15000+200000      3640 words of font info for 14 fonts, out of 3000000 for 9000      669 hyphenation exceptions out of 8191      38i,0n,35p,201b,53s stack positions out of 5000i,500n,10000p,200000b,50000s     No pages of output.


title: Math mode horizontal space difference between \ (backslash) and \; (backslash semicolon) and what to use for multiplication

text: In this code:               \documentclass{article}     \begin{document}     \begin{equation}     c = a b     \end{equation}     \end{document}      I would like to insert a space between 'a' and 'b' (as opposed to `\cdot` or `\times`). Usually, I just write a simple backslash:               c = a \ b      This seems to produce the same spacing as:               c = a \; b      Is there a difference? What kind of spacing do you recommend to use for multiplication: `\``` (backslash) or `\,` (backslash comma) or `\:` (backslash colon) or `\;` (backslash semicolon) or some other spacing?


title: Adding section to appendix causes a compile error

text: ## Background Include multiple appendixes in a book. (Using KOMA Script v2.) ## Problem I have isolated the problem and created a minimal example to demonstrate the issue:   * Preamble   * Working LyX File   * Broken LyX File The _only_ difference (according to gVim's `diff` tool) between `good.lyx` and `bad.lyx` are the following lines:               \begin_layout Subsection     jasper.php     \end_layout          \begin_layout Standard     TODO     \end_layout      Loading `good.lyx` into LyX works as expected: a PDF can be created. Loading `bad.lyx` into LyX does not work as expected. The following error results: > Missing number, treated as zero. > > \end{document} > > A number should have been here; I inserted '0'. (If you can't figure out why > I needed to see a number, look up `weird error' in the index to The > TeXbook.) ## Questions   * Why does typing one more subsection cause an error?   * How can the error be resolved so that any number of sections and subsections can be added to the appendix? Thank you!


title: How do I debug pgfkeys?

text: I'm sure if you're reading this question you are already familiar with my love for `pgfkeys`. However, it is absolutely _impossible_ to debug: `\tracingmacros` is a total mess, with every key expanding to dozens of complex internal macros. I would like to be able to debug it the same way I can debug a program built by hand using `\def`: watch the keys absorb their arguments, expand their values or execute their code, and proceed to the next key. I don't care how `\pgfk@try` or whatever is defined, only that it looks for a key and does or doesn't find it, acting accordingly. Currently, I debug by intimidation: `\tracingmacros=1` and lots of scrolling plus a bit of pattern recognition for the repetitive macro noise. It's too much to hope that there is some way of coercing `pgfkeys` into producing nicer output; it would require the author to have hand-coded a selectively populated call stack. I'm wondering, though, if anyone else familiar with this package could tell me how _they_ figure out what's going on with their keys. Related: How to best debug LaTeX? (by Yossi Farjoun; not coincidentally, this question is also really his, from a recent chat conversation.)


title: Reflect line of text about y axis

text: Is there an easy way (i.e. without using TikZ, say) to write a line of text backwards? By which I roughly mean, the entire text is reflected about the y axis. I only need it for a Beamer heading, not anything more general like a hyphenated paragraph. This question may be related.


title: "! Bad character code (258)." error in package program.sty

text: I just added `\usepackage{tikz}`, and I got the "No room for new \dimen" error, which I was able to fix (I think) by just including the etex package as suggested at the link. However, a different part of document is now giving errors. My document uses the _program_ library, and I get this bad character error code in a style file that belongs to it. If I get rid of the tikz and etex libraries (and comment out my tikz figure code), the document compiles fine. Is there something that can be done about this?


title: Supplying string parameters to Sweave document

text: This must be a simple question but I don't figure out how I can do it. I would like to produce a pdf report using Sweave. And actually, many many reports. I shortened and simplified the sweave code to get to the point. Here's the code (short.rnw) :               \documentclass[a4paper,11pt]{article}     \usepackage[latin1]{inputenc}     \usepackage[OT1]{fontenc}     \usepackage{graphicx}     \usepackage{Sweave}          \begin{document}       \section*{MySection}            \begin{figure}[htbp]     \caption*{MyCaption}     <<echo=FALSE,results=tex>>=     file=paste(getwd(),"fig","boxp.png",sep="/")     cat("\\includegraphics[width=0.5\\textwidth]{",file,"}",sep="")     @     \end{figure}          \end{document}      As you can see, this code simply includes a graphic named "boxp.png" in the report. I actually don't need sweave to do this but what I really want to do is to generate multiple reports with a varying filename. So, is there a way to pass a string parameter (or any kind of parameter) to build the report without having to rewrite the sweave template each time ? I generate the reports from a bash script with the command 'R CMD Sweave short.rnw', the string parameters being defined before this call. EDIT :               #!/bin/bash          for f in ${files}     do          prog1 f      # prog1 is a program which generates figures in a directory dir     # this directory has a name depending on f name     # for instance if f="foo.txt", then dir="./foo_dir"          ###     #And now HERE I have to create my report with the images     #in foo_dir     # And I don't know how I can specify the varying names of dir     # in my template...          done      Thanks. Tony


title: Code highlighting for imported source files

text: I have several source code files that I would like to include in my document. I know that I can use `verbatiminput` to get the lines from the file, and use `lstlisting` to highlight the code, but I cannot seem to use them both together. What I have in mind is something like:               \usepackage{listings}     \usepackage{verbatim}     \begin{document}         \lstset{language=Java}         \begin{lstlisting}[frame=single]             \verbatiminput{filename.java}         \end{lstlisting}     \end{document}      But naturally this does not work, as the `\verbatiminput{filename.java}` will not get executed inside of the `lstlisting`.


title: Customizing the table of contents using TikZ with memoir?

text: I would like to use a customize table of contents like this one: How to customize the table of contents using TikZ? (see the "edit 2") but instead of using the `book` class, I want to use `memoir`. Unfortunately, everything works fine with the `book` class but when I try to create my file with the `memoir` class I have this error:               ! Use of \reserved@a doesn't match its definition. \def \reserved@a { \def \@currenvir {tikzpicture}\edef \@currenvli...      I tried to locate the part of the code causing this without success. Any help would be appreciated. Edit : the code:               \documentclass{memoir}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{kpfonts}     \usepackage[tmargin=2cm,rmargin=3.8cm,lmargin=3.8cm,bmargin=2cm]{geometry}     \usepackage{tikz}     \definecolor{doc}{RGB}{0,60,110}     \usepackage{titletoc}     \contentsmargin{0cm}     \titlecontents{chapter}[0pc]     {\addvspace{30pt}%     \begin{tikzpicture}[remember picture, overlay]%     \draw[fill=doc!30,draw=doc!30] (-4,-.1) rectangle (-1,.5);%     \pgftext[left,x=-3.7cm,y=0.2cm]{\color{white}\Large\sc\bfseries chapter\ \thecontentslabel};%     \end{tikzpicture}\color{doc!40}\large\sc\bfseries}%     {}     {}     {\;\titlerule\;\large\sc\bfseries Page \thecontentspage     \begin{tikzpicture}[remember picture, overlay]     \draw[fill=doc!25,draw=doc!20] (2pt,0) rectangle (6,0.1pt);     \end{tikzpicture}}%     \titlecontents{section}[2.4pc]     {\addvspace{1pt}}     {\contentslabel[\thecontentslabel]{2.4pc}}     {}     {\hfill\small \thecontentspage}     []     \titlecontents*{subsection}[4pc]     {\addvspace{-1pt}\small}     {}     {}     {\ --- \small\thecontentspage}     [ \textbullet\ ][]          \makeatletter     \renewcommand{\tableofcontents}{%         \chapter*{%     \vspace*{-20\p@}%     \begin{tikzpicture}[remember picture, overlay]%     \pgftext[right,x=15cm,y=0.2cm]{\color{doc!30}\Huge\sc\bfseries \contentsname};%     \draw[fill=doc!30,draw=doc!30] (13,-.75) rectangle (20,1);%     \clip (13,-.75) rectangle (20,1);     \pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%     \end{tikzpicture}}%     \@starttoc{toc}}     \makeatother     \begin{document}     \tableofcontents     \chapter{Questions of Design}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Drawing}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Technique}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \end{document}


title: TikZ style attribute for adding default node text?

text: Is there a TikZ style attribute for adding default text to a node? For instance, I want to be able to do something like the following:               \begin{tikzpicture}[%       stuff/.style={%         draw,         text=Bla bla       },     ]          \node at (0,0) [stuff] {};     \node at (0,1) [stuff] {};     \node at (0,2) [stuff] {};     \node at (0,3) [stuff] {};     \end{tikzpicture}      to produce a picture containing 4 nodes, each with the text "Bla bla". I want to be able to create nodes with the same text without having to add it manually.