title: Ruled Algorithms in columns/minipages

text: I'm using Benoit Guillon's algo styles for Lyx (at http://bgu.perso.libertysurf.fr/) in 2.0 to get nice algorithms ruled with line numbers. This is just a wrapper for the algorithm and algorithmic packages in LaTex. What I'd like to do is put two algorithms side-by-side in my single-column paper. Normally, I'd turn to floats, minipages, and sub-floats as one would for figures. However, (despite the fact that no sub-float is defined for algorithm) the ruled style of the encompassing float creates a rule across all subfloats/minipages and only one algorithm caption from inside is listed in the ruled title area. The latex export is at the bottom. A tight cropped clipping shows the output when lines 93-138 are removed: ![Output Missing Left Alg title, no gutter in rule](http://i.stack.imgur.com/eHTK7.png) Notice that the algorithm title is the right side alg--the left algorithm title and number is lost. Also, there's no gutter in the rule. What I really want is just to make separate minipages, then set my algorithm floats in there, but I understand this is not supported in Lyx (according to the embeddable objects manual.) If I try, I get the latex error:               Underfull \hbox (badness 10000) in paragraph at lines 122--123     []\T1/cmr/bx/n/10 Parameters:      []          [1          {C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]          ! LaTeX Error: Float(s) lost.      (The "underfull hbox" message shows up four times--lines 61, 80, 101, 122.) So, I guess I'm left with four questions, in order of preference for an answer:   * Is there another trick to isolating the extent of a float and putting two floats side-by-side?   * Is there a slick way of defining a sub-float layout for the document that would create two rules and apply a local caption to each? I have no experience with sub-float definition.   * Is there a slick way to define the commands from Guillon's "article (algo)" class in a local layout? I'd be willing to do that, or even work up a candidate layout, though I'm a newbie at Lyx layouts/styles.   * If I'm forced to ERT, how would folks set this in plain LaTex? Thanks.               %% LyX 2.0.4 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{color}     \usepackage{float}     \usepackage{amsmath}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \floatstyle{ruled}     \newfloat{algorithm}{tbp}{loa}     \providecommand{\algorithmname}{Algorithm}     \floatname{algorithm}{\protect\algorithmname}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \floatstyle{ruled}     \newfloat{algorithm}{tbp}{loa}     \floatname{algorithm}{Algorithm}     \usepackage[noend]{algorithmic}     \newcommand{\forbody}[1]{ #1 \ENDFOR}     \newcommand{\ifbody}[1]{ #1  \ENDIF}     \newcommand{\whilebody}[1]{ #1  \ENDWHILE}     \renewcommand{\algorithmicprint}{\textbf{draw}}      \usepackage{algolyx}          \makeatother          \usepackage{babel}     \begin{document}          \section{Intro}          blah          \begin{algorithm}     \textbf{Parameters:} $a,b$     \begin{algor}[1]     \item [{while}] $b\neq0$          \begin{algor}[1]     \item [{.}] $t\gets b$     \item [{.}] $b\gets a\;\mod t$     \item [{.}] $a\gets t$      \end{algor}     \item [{endwhile}]~     \item [{.}] \textbf{return} $a$     \end{algor}     \caption{\textsc{\label{alg:Gcd1}Gcd1}}     \end{algorithm}               One float, two minipages inside (Gcd2 and 3):          \begin{algorithm}     \begin{minipage}[t]{0.48\columnwidth}%     \textbf{Parameters:} $a,b$     \begin{algor}[1]     \item [{while}] $b\neq0$          \begin{algor}[1]     \item [{.}] $t\gets b$     \item [{.}] $b\gets a\;\mod t$     \item [{.}] $a\gets t$      \end{algor}     \item [{endwhile}]~     \item [{.}] \textbf{return} $a$     \end{algor}     \caption{\label{alg:Gcd2}\textsc{GcdLeft}}     %     \end{minipage}\hfill{}%     \begin{minipage}[t]{0.48\columnwidth}%     \textbf{Parameters:} $a,b$     \begin{algor}[1]     \item [{while}] $b\neq0$          \begin{algor}[1]     \item [{.}] $t\gets b$     \item [{.}] $b\gets a\;\mod t$     \item [{.}] $a\gets t$      \end{algor}     \item [{endwhile}]~     \item [{.}] \textbf{return} $a$     \end{algor}     \caption{\label{alg:Gcd3}\textsc{GcdRight}}     %     \end{minipage}     \end{algorithm}               Just in minipages on a line          \begin{center}     \begin{minipage}[t]{0.48\columnwidth}%     \textbf{}     \begin{algorithm}     \textbf{Parameters:} $a,b$     \begin{algor}[1]     \item [{while}] $b\neq0$          \begin{algor}[1]     \item [{.}] $t\gets b$     \item [{.}] $b\gets a\;\mod t$     \item [{.}] $a\gets t$      \end{algor}     \item [{endwhile}]~     \item [{.}] \textbf{return} $a$     \end{algor}     \textbf{\caption{\textbf{\label{alg:Gcd4}}\textsc{GcdLeftPage}}     }          \end{algorithm}     %     \end{minipage}\hfill{}%     \begin{minipage}[t]{0.48\columnwidth}%     \textbf{}     \begin{algorithm}     \textbf{Parameters:} $a,b$     \begin{algor}[1]     \item [{while}] $b\neq0$          \begin{algor}[1]     \item [{.}] $t\gets b$     \item [{.}] $b\gets a\;\mod t$     \item [{.}] $a\gets t$      \end{algor}     \item [{endwhile}]~     \item [{.}] \textbf{return} $a$     \end{algor}     \textbf{\caption{\textbf{\label{alg:Gcd5}}\textsc{GcdRightPage}}     }          \end{algorithm}     %     \end{minipage}     \par\end{center}          end     \end{document}


title: How to show grid labels when using starred pspicture?

text: I need grid labels even when I use `\pspicture*`. How to do this? ![enter image description here](http://i.stack.imgur.com/b1auU.png)               \documentclass{article}     \usepackage{pstricks}     \psset{linecolor=red}     \begin{document}     \figure[h]\centering     \begin{pspicture}[showgrid](1,1)     \psline(-1,-1)(2,2)     \end{pspicture}     \caption{without clipping}     \endfigure               \figure[h]\centering     \begin{pspicture*}[showgrid](1,1)     \psline(-1,-1)(2,2)     \end{pspicture*}     \caption{with clipping}     \endfigure          \end{document}


title: Should I put a space between a number and its unit?

text: No too much more to say. `\( 2.63\si\ohm \)` looks odd. But it might be the correct way. `\( 2.64\,\si\ohm \)` looks much better IMO. What about the `\,`? Sould it be bigger, smaller or there is no really a convention for that? Thanks.


title: Chapter style, horizontal line

text: I'd like to change the chapter name style so that it appears in this way ![enter image description here](http://i.stack.imgur.com/DJ9jP.jpg) How can I do? Thank you! :)


title: One inch margins and the geometry package

text: Using               \usepackage[margin=1in]{geometry}      I can create a margin of 1 inch around my document. What would be the equivalent commands if I used the native LaTeX commands such as \textwidth, \evensidemargin, etc?


title: vertical subseteq symbol in label of subfloat

text: Math symbols (`\subseteq` and `\supseteq`) are rotated and rendered successfully in text mode with the aid of `\rotatebox{}{}`. In the commented section below, there is a problem with getting these symbols into the subfloat label. I'm using `pdflatex` `This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010)` Any ideas? Thanks.               \documentclass[a4paper]{article}          \usepackage{graphicx}     \usepackage{subfig}     \usepackage{tikz}     \usepackage{stmaryrd}     \usepackage{fouriernc}     \usepackage{MnSymbol}     \usepackage{colonequals}     \usepackage{ulem}     \usepackage{fancybox}           \usetikzlibrary{arrows, shapes, patterns}     \pagestyle{myheadings}          \begin{document}     \rotatebox{90}{$\supseteq$}     \rotatebox{90}{$\subseteq$}          \begin{figure}     \centering     %\subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\rotatebox{90}{$\supseteq$}]{     \subfloat[Text $\overline{A\cup B}$,\;$\downarrow$]{      \begin{tikzpicture}[scale=0.5, auto, swap]        \draw (-1,0) circle (1);        \draw (2,0) circle (1);        \node at (-2,1) [above left] {$A$};        \node at (3,1) [above right] {$B$};      \end{tikzpicture}     }\qquad     \caption{Sets}     \end{figure}     \end{document}      EDIT: Addition of parameter `origin=c` to `\subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\protect\rotatebox[origin=c]{-90}{$\subseteq$}]{` Without as seen in the picture. ![enter image description here](http://i.stack.imgur.com/QNFFR.jpg) Error while compiling `Runaway argument? origin=c\caption@ifstrut {\ifhmode \@finalstrut \strutbox \fi }{} ! Paragraph ended before \Grot@box@kv was complete. <to be read again> \par l.30 ...ownarrow$\protect\rotatebox[origin=c]{-90} {$\subseteq$}]{`


title: Reference style: Author last name, first initial + sorting by in-text citation

text: I'm writing a paper and the journal that i'm trying to submit to requires the following style:   1. Jin WG, Cheung YK, Zienkiewicz OC. Trefftz method for Kirchhoff plate bending problems. International Journal for Numerical Methods in Engineering 1991; 36 : 765-781.   2. Reismann H. Elastic Plates: Theory and Application . Wiley: New York, 1988;1-10.   3. Oestreicher, N., The cost of adjuvant chemotherapy in patients with early-stage breast carcinoma, Cancer 2005; 104(10) , pp. 2054 - 2062, DOI: 10.1002/cncr.21464. And the Reference needs to be sorted by in-text citation (order of appearance of the source). I know using unsrt style i can get it to sort by citation and using acm style, the reference starts with author's last name and then its first name initial. I have no idea how to combine these two to get what i want. Any suggestions would be much appreciated.


title: Change font size of \texttt globally?

text: I'm using TeX Gyre Pagella as the main font of a document which is typeset using a font size of 10pt. For the technical terms, I want to replace the default Computer Modern Typewriter with Bera Mono \-- mostly because of the dotted zero. The problem is that now the terms marked with `\texttt{}` appear too large compared to the rest of the text.               \documentclass[pdftex,fontsize=10pt]{scrbook}          \usepackage{tgpagella}             \usepackage[scaled]{beramono}      \usepackage[T1]{fontenc}                \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non velit in ligula volutpat     condimentum. Now for some technical terms: \texttt{Phasellus}, \texttt{ultrices} aliquam     \texttt{nulla}, in imperdiet magna feugiat sed. Ugh, the technical terms are too large                  compared to the rest of the text.      \end{document}      How can I tell (pdf)LaTeX to use a smaller font size (9pt?) for the `\texttt{}` parts only?


title: Internal PDF viewer of Texmaker deforms the preview pdf

text: I use Texmaker 4.1.1 (and MiKTeX 2.9). After a complete reinstallation of my computer, the internal PDF viewer of Texmaker started to deform the preview of the PDF document. Meaning the pages looked ''clinched''. The lines more narrow, the font too low and too wide... (The output PDF document looks normal.) Does anyone have any idea why that is? * * * edit: I have added a picture to visualise what I mean edit #2: tex source for the example below:               \documentclass[12pt]{article}     \usepackage[]{}     \usepackage{lingmacros}     \usepackage{tree-dvips}     \begin{document}          \section*{Notes for My Paper}          Don't forget to include examples of topicalization.     They look like this:          {\small     \enumsentence{Topicalization from sentential subject:\\      \shortex{7}{a John$_i$ [a & kltukl & [el &        {\bf l-}oltoir & er & ngii$_i$ & a Mary]]}     { & {\bf R-}clear & {\sc comp} &        {\bf IR}.{\sc 3s}-love   & P & him & }     {John, (it's) clear that Mary loves (him).}}     }          \subsection*{How to handle topicalization}          I'll just assume a tree structure like (\ex{1}).          {\small     \enumsentence{Structure of A$'$ Projections:\\ [2ex]     \begin{tabular}[t]{cccc}         & \node{i}{CP}\\ [2ex]         \node{ii}{Spec} &   &\node{iii}{C$'$}\\ [2ex]             &\node{iv}{C} & & \node{v}{SAgrP}     \end{tabular}     \nodeconnect{i}{ii}     \nodeconnect{i}{iii}     \nodeconnect{iii}{iv}     \nodeconnect{iii}{v}     }     }          \subsection*{Mood}          Mood changes when there is a topic, as well as when     there is WH-movement.  \emph{Irrealis} is the mood when     there is a non-subject topic or WH-phrase in Comp.     \emph{Realis} is the mood when there is a subject topic     or WH-phrase.          \end{document}      ![previewed document](http://i.stack.imgur.com/1oo8k.png)


title: Adjusting the gb4e {exe} environment locally

text: In my thesis I make extensive use of the `exe` environment of the `gb4e`package and I love it. However, three of my approximately 100 examples need to have an alternative layout. Instead of the usual design I need the second and the following lines of these three examples to start where the opening bracket of the `exe` environment starts. So, ideally, in (1) the _bdfs_ line and in (2) the _bdfs_ and the _cdfs_ line start where the opening bracket starts. Does anyone know how to locally generate this variation? ![enter image description here](http://i.stack.imgur.com/bjhaq.png) This is created with the following code:               \documentclass{article}          \usepackage[ngerman]{babel}%dt.Silbentrennung          \usepackage{gb4e}          \begin{document}          \begin{exe}     \ex asdf asdf          bsdf bsdf % ideally, this line starts where the opening bracket starts     \ex asdf asdf          bsdf bsdf % ideally, this line starts where the opening bracket starts          csdf csdf % ideally, this line starts where the opening bracket starts     \end{exe}     \end{document}      Edditional note: As Alan Munn highlighted in a comment the numbering in linguistics is continuously starting with 1. Therefore, the command / environment needs to be numbered according to its position. It has to be sensitive for previous examples and the following examples need to be sensitive to the command / environment.


title: How to decorate a tikz rectangle with a box on north center part?

text: I want to make a rectangle like the image in which I could add an image with `\includegraphics`. I have the following rectangle code:               \begin{tikzpicture}[overlay,remember picture]             \draw [xshift=3mm,line width=7pt,rounded corners=7pt, draw=black]             ($ (current page.north west) + (15mm,-15mm) $)             rectangle             ($ (current page.south east) + (-15mm,15mm) $);     \end{tikzpicture}      ![Example](http://i.stack.imgur.com/4bIEf.png)


title: References showing question marks

text: In LyX, I'm using the reference style apsrev.bst, which I downloaded from here: http://www.maik.ru/pub/tex/revtex4/ This reference style is the one used in Physical Review. But now when I add references, they show up as question marks in brackets (?). Why does this happen? how can I fix it? Thank you for any efforts


title: Elegant way to write multilingual document

text: We want to generate a document that contains parts in different languages (e.g. Dutch, French and English). The problem is that these languages have different hyphen patterns and notations (e.g. in French one writes a space before a colon). Is there an elegant way to swap between languages, something like:               \documentclass{article}     \usepackage[dutch,english,french]{babel}     \begin{document}     \begin{english}     The list contains three items: one, two, and three.     \end{english}     \begin{dutch}     De lijst bevat drie elementen: \'e\'en, twee en drie.     \end{dutch}     \begin{french}     La liste contient trois \'el\'ements: un, deux et trois.     \end{french}     \end{document}


title: Table alignment help

text: I have three fairly minor problems, but I can't seem to figure out how to fix them. ![enter image description here](http://i.stack.imgur.com/fCneQ.png) **First Problem:** Even though I have 'gaps' in my Latex editor between the semi-colon and the number after it (e.g. for the first row, I have (0.0; 0.0)), this does not show up in the table. I suspect the problem has something to do with the `siunitx` package. **Second Problem** : Is there anyway for the 95% confidence intervals (the numbers in brackets) to be better aligned with the number above it? I'd like the numbers in brackets to be moved more to the left - possibly have the semi- colon in line with the decimal point above it. **Third Problem** : Although not shown in this particular table, when I put the "-" sign, `siunitx` complains with a 'misplaced sign token' message. In my MWE below, I attempted to fix that, but it didn't seem to work.               \documentclass{article}     \usepackage{booktabs}     \usepackage{siunitx}     \sisetup{input-symbols = {( ) -}}     \begin{document}     \begin{table} [H]     \centering     \caption[Presentation of survival data for the whole sample ($N = \num{11 959}$)]     {Presentation of survival data for the whole sample ($N = \num{11 959}$).\\    [\medskipamount] Legend:     Y:~Year; RS:~Risk Set; G:~Graduated; AE:~Academically Excluded; C:~Censored; HRG:~Hazard Ratio --~Graduates;     HRAE: Hazard Ratio --~Academically Excluded}     \label{table:SurvivalAll}     \begin{tabular*}{\textwidth}{     @{\extracolsep{\fill}}     S[table-format=1.0]     S[table-format=5.0,group-four-digits=true]     S[table-format=4.0]     S[table-format=3.0]     S[table-format=4.0]     S[table-format=2.1]     S[table-format=2.1]     @{}     }     \toprule     {\bfseries Y} & {\bfseries RS} & {\bfseries G} &     {\bfseries AE} & {\bfseries C} &     {\bfseries HRG} & {\bfseries HRAE}\\     & & & & & {(\%)} & {(\%)} \\     \midrule     1 & 11959 & 0 & 725 & 1619 & 0.0 & 6.1 \\      & & & & &  (0.0; 0.0) & (6.0; 6.1) \\     2 & 9615 & 0 & 474 & 1513 & 0.0 & 4.9 \\     & & & & &  (0.0; 0.0) & (4.0; 5.0) \\     3 & 7628 & 1271 & 335 & 966 & 16.7 & 4.4 \\     & & & & &  (16.0; 17.0) & (4.0; 5.0) \\     4 & 5056 & 2797 & 145 & 405 & 55.3 & 2.9 \\         & & & & &  (54.0; 57.0) & (2.0; 3.0) \\     5 & 1709 & 1144 & 77 & 170 & 66.9 & 4.5 \\         & & & & &  (65.0; 69.0) & (4.0; 5.0) \\     6 & 318 & 236 & 15 & 24 & 74.2 & 4.7 \\         & & & & &  (65.0; 69.0) & (4.0; 5.0) \\     7 & 43 & 27 & 7 & 5 & 62.8 & 16.3 \\      & & & & & (48.0; 77.0) & (5.0; 27.0) \\     8 & 4 & 3 & 0 & 1 & 75.0 & 0.0 \\     & & & & &  (33.0; 117.0) & (0.0; 0.0) \\     \bottomrule     \end{tabular*}     \end{table}     \end{document}


title: Include custom index chapter title in table of contents in ConTeXt

text: # Problem The following code is used to prevent pagination from being applied to the index:               \setuphead[chapter,section][       number=no,       page=yes,       continue=no,     ]          \definehead[StyleIndex][chapter]     \setuphead[StyleIndex][       page=no,     ]      The index is typeset as follows:               \startbackmatter       \chapter{Index}       \placeindex     \stopbackmatter      That code causes the chapter title to be displayed on a new page, which I can avoid (as desired) using:               \startbackmatter       \StyleIndex{Index}       \placeindex     \stopbackmatter      However, that causes the Index to be removed from the table of contents (ToC), which is not desired. I had expected that it would inherit the _chapter_ 's behaviour and be included in the ToC. # Question How would you create a distinct style for chapter headings that differs from the heading style used for an index page while having both included in the ToC?


title: How do I install a .dtx file?

text: When I run:               tex algorithms.dtx      for example, I get this message.                 ! Undefined control sequence.     l.34 \documentclass                        {ltxdoc}     ?      Help?


title: Displaymath environment that can align equations and squeezes math

text: I have a long equation to align. Without squeezing the math, it is just barely longer than `\textwidth`. However, the `align` environment doesn't squeeze the math at all, which results in a badbox.               \documentclass[11pt]{article}     \usepackage{amsmath}     \begin{document}      Using ``\verb|\[...\]|'':      \[       1+2+3+4+5+6+7+8+9+10       = 11+12+13+14+15+16+17+18+19+20+21      \]           Using ``align'':      \begin{align*}       1+2+3+4+5+6+7+8+9+10       &= 11+12+13+14+15+16+17+18+19+20+21\\       &= 11+12+13+14+15+16+17+18+19+20+21      \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/NhZSa.png) ## Question: How can I align equations in a `displaymath` environment that will also squeeze the math in order to avoid a badbox? I want the best of both worlds:   1. the squeezing of math (as when using `\[...\]`) and   2. the ability to align equations (as when using `align`).


title: Error after installing font using otftotfm - "unknown version of OS/2 table (0004)"

text: I want to use an open-source .TTF font in my document named Lato. It's a family of fonts, that can be downloaded free of charge at http://www.latofonts.com/. I tried using `otftotfm` with the following parameters to install the font:               otftotfm -a -e ec  -fkern -fliga --verbose --vendor Lato Lato-Regular.ttf T1--Lato-Regular      Afterwards I made a small `fd` file called `t1lato.fd`, with these contents:               \ProvidesFile{t1lato.fd}        [2014/06/07 scalable font definitions for T1/Lato.]          \DeclareFontFamily{T1}{Lato}{}          \DeclareFontShape{T1}{Lato}{m}{n}{<-> T1--Lato--Regular}{}     \DeclareFontShape{T1}{Lato}{m}{it}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{m}{sl}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{m}{sc}{<->ssub * Lato/m/n}{}          \DeclareFontShape{T1}{Lato}{b}{n}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{b}{it}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{b}{sl}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{b}{sc}{<->ssub * Lato/m/n}{}          \DeclareFontShape{T1}{Lato}{bx}{n}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{bx}{it}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{bx}{sl}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{bx}{sc}{<->ssub * Lato/m/n}{}          \DeclareFontShape{T1}{Lato}{sb}{n}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{sb}{it}{<->ssub * Lato/m/n}{}          \DeclareFontShape{T1}{Lato}{l}{n}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{l}{it}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{l}{sl}{<->ssub * Lato/m/n}{}     \DeclareFontShape{T1}{Lato}{l}{sc}{<->ssub * Lato/m/n}{}          \endinput      (Honestly, I just want to use the regular roman font, just for the sake of completion I mention a variety of different font shapes.) I made a small test file, `lato.tex` to test the result:               \documentclass[a4paper,12pt]{article}          \usepackage[top=10mm,bottom=10mm,left=10mm,right=10mm]{geometry}          \usepackage[T1]{fontenc}          \usepackage{microtype}          \pdfmapfile{Lato.map}          \renewcommand\rmdefault{Lato}     \renewcommand\sfdefault{Lato}          \begin{document}          aaa \large  bbb     \end{document}      The above file produces a fatal error:               !pdfTeX error: pdflatex.exe (file .../.texlive2013/texmf-var/fonts/     truetype/Lato/Lato/Lato-Regular.ttf): unknown version of OS/2 table (0004)      ==> Fatal error occurred, no output PDF file produced!      I can't find much related to the error. Neither on TeX.SX, nor on google (I'm just getting results related to issues with Macintosh computers). The result is strange; I always got instant result for any other fonts I installed. I'd still like to use this font, but I'm not sure how. Does anyone know a solution to this problem? I'd like to avoid LuaLaTeX and the `fontspec` package where possible; otherwise I'd have to change a dozen fonts in my main document to use `fontspec` instead (I installed those fonts with the same method without any problems).


title: Special non-standard font sizes for different types

text: The more I read about fontsizes in LaTeX, the more confused I've become. I don't know how to meet my requirements, which are the following: text = 11pt --> This works. footnotes = 9pt --> This works. section = 15pt --> ?? subsection = 13pt --> ?? These values are for Arial. I also got them for Times New Roman (each one increased by 1). Concerning sections and subsections I read about scalefont, titlesec, sectsty,... but I could not work out a solution. For example, if I use the following approach               \documentclass[a4paper, 11pt, oneside, titlepage]{article}     \usepackage{scalefnt}     \usepackage{sectsty}     \sectionfont{\scalefont{1.36}}     \subsectionfont{\scalefont{1.18}}     \usepackage[ansinew]{inputenc}     \usepackage[ngerman]{babel}      \usepackage[scaled]{helvet}                                                                      \usepackage[T1]{fontenc}          \begin{document}     \section{Kapitel 1}     \subsection{Kapitel 1.1}     \end{document}      Latex prints a warning > LaTex Font Warning: Font shape 'T1/cmr/bx/n' in size <19.584> not availabe > > size <20.74> substituted How can I change this situation?


title: How to detect words starting with # in listings package?

text: I am writing some code with the listings package and I need to detect the words starting with the number sign (`#`) and apply certain style. For example, if I have this code:                something #foo anotherThing      I would like to put blue colors to '#foo'. So far I have:               \lstset{     ....     identifierstyle=\idstyle,      }      And then:                \makeatletter      \newcommand*\idstyle{%              \expandafter\id@style\the\lst@token\relax      }      \def\id@style#1#2\relax{%              \ifcat#1\relax\else                      \ifnum`#1=\uccode`#1%                         \small\ttfamily\color{red!100!black}                     \fi                      \ifnum\pdfstrcmp{#1}{\#}=0              \small\ttfamily\color{blue!100!black}                   \fi                \ifnum`#1= 35%                              \small\ttfamily\color{blue!100!black}                      \fi              \fi      }      \makeatother      So I am trying to put a blue color for words starting with `#`. The first try (using `\pdfstrcmp`) works perfect with others type of characters but not with `#`. I cannot scape it. I tried to scape `#` in lots of ways such as `\#`, `\#\`, `|\verb#|`, etc et, but no one worked. In the second try, I am trying to go by comparing the unicode value, but I am not successful either. Notice also that at the same time I wanted to put colors (different color) to words that start with uppercase. So how can I have both at the same time (set different colors to both, words that start with uppercase and those that start with `\#`? Sorry for the question but I am newbie with Latex... Any ideas how can I get this?


title: Limits not showing properly when placed in a fraction

text: I am trying to apply a limit law in which the limit is distributed to both the numerator and the denominator. However, the `\lim_{x\to \infty}` does not render properly when I place it in a fraction (`\frac{\lim_{x\to \infty}}{\lim_{x\to \infty}}`). The `_{x\to \infty}` part shows up next to the lim. Any help would be greatly appreciated.


title: How to uninstall TeX Live on Mac which is installed through command "sudo port install texlive +full"?

text: At the beginning, my purpose is to set up AUCTeX with Emacs. I just do like below   1. Download AUCTeX, then `cd` to the directory, `make` and `sudo make install`.   2. It works well when the `.tex` file only contains english characters. But when I create a `.tex` with Japanese characters and enter command `C-c C-c`. It will prompt error message `LaTeX Error: This file needs format 'pLaTeX2e' but this is 'LaTeX2e'` I search on google and find It is because LaTex2e don't support Japanese characters. I should install **pLaTeX2e** as well. At last I found command               $ sudo port install texlive +full      on the site http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Mac#f8cc2ba3. It is really a horrible command; it uses almost 7GB storage but the issue is still not resolved. Anyone who has any suggestion to delete this file completely or resolve this error issue?


title: TL update affects fixme handling of options?

text: A few hours ago, the following code worked fine (albeit in a larger document):               \documentclass{article}     \RequirePackage{xkvltxp}     \RequirePackage[draft,envface=\itshape,marginface={\footnotesize\setlength{\baselineskip}{1em}}]{fixme}             \begin{document}            This is some text.          \end{document}      This was using TeX Live 2014 with updates a couple of days old. A few minutes ago, I updated TeX Live and discovered that the code fails:               This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)      restricted \write18 enabled.     entering extended mode     (./prawf3.tex     LaTeX2e <2014/05/01>     Babel <3.9k> and hyphenation patterns for 78 languages loaded.     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2014/texmf-dist/tex/latex/xkeyval/xkvltxp.sty     (/usr/local/texlive/2014/texmf-dist/tex/generic/xkeyval/xkvutils.tex     (/usr/local/texlive/2014/texmf-dist/tex/generic/xkeyval/keyval.tex)))     ! TeX capacity exceeded, sorry [input stack size=5000].     \@nomath ...e \@font@warning {Command \noexpand #1                                                       invalid in math mode}\fi      l.4           !  ==> Fatal error occurred, no output PDF file produced!      The culprit appears to be `\footnotesize`. That is, the following compiles without error:               \documentclass{article}     \RequirePackage{xkvltxp}     \RequirePackage[draft,envface=\itshape,marginface={\setlength{\baselineskip}{1em}}]{fixme}            \begin{document}            This is some text.          \end{document}      However, in the class file this came from, I have to remove the `marginface` key altogether. If I only remove the font size command, I get complaints about `\else` be an undefined control sequence. Moreover, precisely this code for the font size is included in the default options executed by `fixme.sty`:               \ExecuteOptionsX[fx]<%       mode,status,lang,log,note,face,layout,envlayout,targetlayout>{%       mode=singleuser,%       status=final,%       lang=english,%       langtrack=false,%       defaultlang=english,%       nosilent,%       author=fixme,%       target=thepage,%       layout=margin,%       innerlayout={layout=inline},%       envlayout=plain,%       targetlayout=plain,%       inlineface=\bfseries,%       marginface=\footnotesize,%       envface=\bfseries,%       targetface=\itshape}      For what it is worth, here is the output from the TeX Live update listing the updated packages:               tlmgr: package repository http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet     tlmgr: saving backups to /usr/local/texlive/2014/tlpkg/backups     [ 1/29, ??:??/??:??] update: biblatex [6723k] (34385 -> 34433) ... done     [ 2/29, 00:18/01:21] update: biblatex-true-citepages-omit [72k] (33305 -> 34437) ... done     [ 3/29, 00:23/01:43] update: bidi [3069k] (33647 -> 34458) ... done     [ 4/29, 00:28/01:26] update: cd [85k] (15878 -> 34452) ... done     [ 5/29, 00:30/01:32] update: context-letter [25k] (31331 -> 34432) ... done     [ 6/29, 00:34/01:44] update: context-simpleslides [858k] (28300 -> 34438) ... done     [ 7/29, 00:37/01:44] update: cuisine [266k] (15878 -> 34453) ... done     [ 8/29, 00:39/01:47] update: dehyph-exptl [298k] (34404 -> 34459) ... done     [ 9/29, 00:41/01:50] update: documentation [95k] (34417 -> 34426) ... done     [10/29, 00:48/02:07] update: dvips [610k] (34213 -> 34421) ... done     [11/29, 00:51/02:09] update: europecv [628k] (15878 -> 34454) ... done     [12/29, 00:54/02:09] update: grundgesetze [231k] (33289 -> 34439) ... done     [13/29, 01:02/02:26] update: hyph-utf8 [1675k] (33887 -> 34440) ... done     [14/29, 01:06/02:18] update: hyphen-base [22k] (31131 -> 34424) ... done     [15/29, 01:08/02:22] update: kotex-oblivoir [358k] (34243 -> 34430) ... done     [16/29, 01:13/02:28] update: media9 [4989k] (34386 -> 34456) ... done     [17/29, 01:21/02:03] update: newpx [914k] (33379 -> 34431) ... done     [18/29, 01:30/02:11] update: pdftex [2871k] (34215 -> 34421) ... done     [19/29, 01:36/02:03] update: pst-func [2945k] (34156 -> 34441) ... done     [20/29, 01:41/01:55] update: tetex [383k] (34229 -> 34421) ... done     [21/29, 02:00/02:15] update: tex4ht [872k] (33926 -> 34450) ... done     [22/29, 02:05/02:16] update: texlive-docindex [204k] (34396 -> 34445) ... done     [23/29, 02:08/02:18] update: texlive-scripts [85k] (34371 -> 34451) ... done     [24/29, 02:10/02:20] update: thalie [389k] (31018 -> 34435) ... done     [25/29, 02:12/02:20] update: tugboat [800k] (32478 -> 34457) ... done     [26/29, 02:15/02:20] update: xkeyval [439k] (34020 -> 34442) ... done     [27/29, 02:17/02:20] auto-install: fullminipage (34455) [245k] ... done     [28/29, 02:18/02:20] auto-install: latexdemo (34434) [457k] ... done     [29/29, 02:19/02:19] update: collection-latexextra [5k] (34302 -> 34455) ... done     tlmgr: package log updated: /usr/local/texlive/2014/texmf-var/web2c/tlmgr.log     running mktexlsr ...     done running mktexlsr.     running mtxrun --generate ...     done running mtxrun --generate.     running updmap-sys ...     done running updmap-sys.     regenerating language.dat     regenerating language.def     regenerating language.dat.lua     regenerating fmtutil.cnf in /usr/local/texlive/2014/texmf-var     running fmtutil-sys --no-error-if-no-engine=luajittex --no-error-if-no-format --byengine pdftex ...     done running fmtutil-sys --no-error-if-no-engine=luajittex --no-error-if-no-format --byengine pdftex.     running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.dat" ...     done running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.dat".     running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.def" ...     done running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.def".     running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.dat.lua" ...     done running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/usr/local/texlive/2014/texmf-var/tex/generic/config/language.dat.lua".      I'm guessing the update of `xkeyval` is likely to be implicated but does anybody know what is going on or of any work around? (I'm guessing this might affect more than just `fixme` though I have no idea why `\footnotesize` should be more problematic than, say, `\itshape` or `\setlength`.) I don't understand the reference in the error message to `math mode`.


title: Is there / should there be a naming convention for expl3 extensions?

text: In other programming languages, there is a (sometimes pretty loose) standard on how to name modules / packages / etc. Does `expl3` have such a convention in place or, if not, what should it be? Say you created a `Shape` object (for whatever reason) for LaTeX and you wished to publish it to CTAN (for whatever reason). Would you name it:   * `ltx3shape`   * `expl3shape` (weird, since in the future it won't be 'experimental' anymore)   * `ltx3-shape`   * `latex3-shape`   * ...   * ???


title: Indication for footnote is not on right place

text: Code               \documentclass{article}     \usepackage{amstext,amsfonts,amsmath,amssymb}     \usepackage[a4paper]{geometry}     \usepackage{graphicx}          \newfont{\xrm}{wncyr10 scaled 1000}     \newfont{\xbfh}{wncyb10 scaled \magstep4}          \newcommand{\ch}{ch}     \newcommand{\Ch}{Ch}     \newcommand{\cy}{\symbol{'17}}     \newcommand{\Cy}{\symbol{'07}}     \newcommand{\dz}{\symbol{'12}}     \newcommand{\Dz}{\symbol{'02}}     \newcommand{\dy}{dj}     \newcommand{\Dy}{Dj}     \newcommand{\sh}{sh}     \newcommand{\Sh}{Sh}     \newcommand{\zh}{zh}     \newcommand{\Zh}{Zh}          \begin{document}         \begin{center}                 \xbfh NEKA\footnote{\xrm ovde stoji ne\sh to} RE\Ch ENICA              \end{center}          \end{document}         gives ![a busy cat](http://i.imgur.com/wNRGVJ7.png) Problem is 1 in title (for footnote), is not on appropriate place (it should be at the top of word). It's probably because I use different font (then standard), but I a beginner in Tex and I don't know how to solve this problem.


title: Including BibTex references from files

text: I have:   * A file with my dissertation: /home/robottinosino/dissertation.tex   * A directory with my references: /home/robottinosino/references/   * A set of 9 BibTex files to reference: /home/robottinosino/references/00{1..9}.bib The current list of 9 references is bound to grow. Question:   * How can I "automatically" include the BibTex files in /home/robottinosino/references/ in my Bibliography section _and_ format these according to my Uni's guidelines? (conference proceedings, journal articles, ...) Is there a system that does this automatically? Is there a "best practice"?


title: How to include graphics with width in the exam class?

text: I am trying to compose an exam with a figure as part of the question. However, I am having trouble using the standard `\includegraphics` command with `pdflatex`. I can not specify the arguments to `\includegraphics` in the square brackets. If I remove the square bracket (optional arguments), then it compiles without issue. I've tried wrapping it in the `\fullwidth{}` command to no avail. Here is a minimal example:               \documentclass[addpoints,11pt]{exam}     \usepackage{graphics}     \begin{document}     \begin{questions}     \question[] True/False questions.     \begin{parts}     \part[2] True or False.\vspace*{1in}     An image:     \begin{figure}         \includegraphics[width=\textwidth]{file-which-exists}       \end{figure}     \end{parts}     \end{questions}          \end{document}`


title: How to generate an AFP document by using LaTeX compiler?

text: I'm working on a new program who have to generate an AFP file. I would like to generate this kind of file by using a powerful language like LaTeX. Because I hate Dialog (HP solution), is there a LaTeX compiler to generate AFP file or do I have to generate a PS file then convert it to AFP file? AFP file is an IBM format: http://en.wikipedia.org/wiki/Advanced_Function_Presentation


title: Failsafe ways of using verbatim commands

text: All my ideas on how to do clever things with code examples and listings results further or later in 'Emergency Stop' errors. Let me briefly review what I am doing now and what I actually wanted to achieve: I have provided for some years now a LaTeX template which includes a `demo.tex` which shows all the possibilities of the template. For me it is used mainly for testing purposes (and I found _many_ bugs in packages using it). For the users it is a great 'howto manual' provided with their template. Currently the users have to look into the code to see how the example worked. For the upcoming release I want to change that by providing the source in the pdf. Also it would have been great if it was possible to provide everything as a style file, and not just a `.tex` file. The idea was to provide `\AddDemo` and `\PrintDemo`, so that these could be defined wherever and printed on request. Especially this would allow not only me, but also package writers to provide their own example code. However from the answers of related questions posted here in the last few days I have given up on this idea. Still there is the idea to show code and results side by side (or top/bottom). Here the `showexpl` package provides something useful. BUT: it fails if placed in a command. This makes it unusable, since I must test if the example can be executed. The code below demonstrates this:               \documentclass{scrbook}          \usepackage{showexpl}     \usepackage{soul}          \providecommand{\IfDefined}[2]{%     \ifcsname #1\endcsname        #2 %     \else          % do nothing     \fi     }     \begin{document}     \IfDefined{so}{     \begin{LTXexample}     \so{letterspacing}, \ul{underlining}      \st{overstriking} and \hl{highlighting}.      \end{LTXexample}     }     \end{document}      Any other `\ifdef` command would probably result in the same error. If there is no way to use verbatim material in any kind of command I will have to fall back to simple `lstlisting` environments and placing every code twice. Any improvement for my code related to my idea of providing general example code is welcome.


title: LyX participates in the Google Summer of Code - which project ideas could be suggested?

text: This year, LyX participates in the Google Summer of Code. This is a great opportunity to get improvements and new features implemented. I appreciate that LyX makes entering the TeX and LaTeX world easier, I'm sure there are many LaTeX users who started with it. And for sure, many LaTeX friends use LyX for rapid writing. So this question goes to both LyX and LaTeX users, who are interested in supporting the GUI way of TeX and LaTeX: Which improvements would you suggest to the LyX project? I.e. which feature do you miss, what would you suggest as a project idea? We will make sure that the LyX project will see the ideas here. ### Postscript (added by Charles) The LyX team have put up a page with their project proposals at LyX 2013 Summer of Code Ideas. The deadline (May 3rd) has passed.


title: Create environment within my own latex class?

text: How can I automate multiple choice question type in my own class in LaTeX?


title: how to fix Missing \begin{document}

text: I have tried everything I can think of. I removed almost everything from my document to give it the most simplest of entries, and I STILL get this error message. What am I doing wrong? How can fix this so that I may see my document in a pdf? See below my MWE:               \documentclass[pdftex,12pt,a4paper]{report}      \usepackage[pdftex]{graphicx}{options}      \pagestyle{headings}      \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}      \begin{document}      \input{./title.tex}      \section{Introduction}      \label{sec:intro)      \subsection      \subsubsection      \subsubsection      \subsubsection      \subsubsubsection      \subsection      \subsubsection      \subsubsection      \subsubsection      \end{document}


title: Upgrading from TexMakerX to TexStudio on OSX

text: How do install TexStudio so that it keeps all of my settings from TexMakerX or will it simply overwrite the old program?


title: Can I make some vertical material disappear if it occurs next to a page break?

text: I'd like to place a horizontal rule above each section title, to separate the new section from the text before it. But I don't want the rule to appear if the section begins on a new page, since that would place the rule at either the bottom of one page or the top of the next, both of which would look bad. I think the first step is to put a `\nobreak` after the `\hrule`, so that it'll never appear at the very bottom of a page, but it can still appear at the top of one. To prevent that, what I'd _like_ to do is emit the rule conditionally, only if there's other material on the current page already, but because of the way TeX's page builder works, the page break might not be chosen until after the rule has already been added to the main vertical list. In other words, the condition isn't known at the time when the decision is made. So I don't think that'll work. I know that an output routine has access to the material that didn't fit on the page, so it can put it back onto the "recent contributions" list. Can it remove things from the beginning of that material? If so, how could it determine whether the new page begins with this rule it should remove? Alternatively, when TeX discards glue and penalties that follow a page break, can I make it discard a rule box too?


title: Getting a tikz picture to have an equation number

text: I make a lot of commutative diagrams and am trying to switch to Tikz from amcd,diagrams, etc. I often have to refer to these diagrams in the text and would rather have them as equations (i.e. with and equation number) rather than a figure. I have tried just putting it in an equation environment but it neither centers the diagram (as ma)


title: Using Graphite fonts on XeLaTeX

text: I want to use a Graphite font as the main font in a XeLaTeX document, but fontspec doesn't support Graphite fonts yet. Currently I'm using XeTeX's native way to change fonts, but that's cumbersome, as I have to define one font for each size-family-series combination I want to use. Is there some hack to make fontspec work with Graphite fonts or perhaps some other way to change the whole default family so that stuff like `\Large` and `\emph` just works™?


title: Tried to draw a network protocol but always get error

text: I tried to draw the following diagram in LaTeX ![enter image description here](http://i.stack.imgur.com/a6Csa.png) I reference the method from here: I can successfully compile the code from above link, but when I attempted to draw more lines between A and B by modifying the number in the:               \draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-4-2.south west)--(m-4-2.south east);     \draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-7-2.south east)--(m-7-2.south west);      I always got the error message said:               Package pgf Error: No shape named m-5-2 is known.      Any solution for this problem? Thanks.


title: How to insert slashed o "ø" into an author's name in my bibliography

text: In my bibliography I have a reference to an author with a Danish name: Nørregaard. The problem is that to do the slashed o I need to type `\o`. However, I can't do this `N\orregaard` and if I do this `N\o rregaard` then I get a space in the name. How do I solve this problem?


title: \itemize dash appears in gray in PDF

text: I'm writing my report with Latex and I have some itemize environnement. In PDF, the dashes are gray and not black as the text is. Could you help me ? Thank you. EDIT : Also the cadratin dashes (--) are grey


title: Dictionary-style paragraphs

text: Is there a way to write a dictionary using LaTeX: that is, how do you construct the shape of the paragraphs so that they look like so-called hanging paragraphs and that there is a certain spacing between them, i.e. two dictionary entries?


title: Is hyperref's pdfborder option broken in TL 2010?

text: In TeX Live 2010, using `\usepackage[pdfborder={0 0 0}]{hyperref}` results in the warning               Package hyperref Warning: Invalid value `0 0 0'     (hyperref)                for option `pdfborder'.     (hyperref)                Option setting is ignored on input line 3790.      The same warning occurs using `\hypersetup{pdfborder=0 0 0}`. Both of these are verbatim from the `hyperref` manual.


title: Lyx drop-in table replacement to allow table footnotes

text: I want to be able to use footnotes in LyX while preserving the LyX table structure. Any way to force LyX to use a different environment for its built- in tables that allows that? I.e. some code to put in the preamble. This page recommended `longtabular` (couldn't find it anywhere) or `tabu`. Edit: I tried to use the approach in this question to replace `tabular` with `tabu`, but it seems to get `pdftex` stuck in an infinite loop.               % Replace tabular with tabu.     \let\oldtabular\tabular     \let\endoldtabular\endtabular     \renewenvironment{tabular}{\tabu}{\endtabu}      Edit 2: As it has been indicated that tabu is unreliable/unmaintained, any other environment you would recommend for this purpose?


title: How to get consistent positioning for a node with \usebox containing a \tikzpicture

text: I'm using `beamer` and `tikz` to create an animation of a photon travelling between snowflakes. I have ten `Koch snowflake`s (hence the `\newcommand` in my MWE) typeset with `decorate{ decorate{ decorate{ decorate{...`, and subsequently I have many slides within a frame. Since each slide takes about 20 seconds to typeset, I have decided to use `\savebox` and `\usebox` to save time (I tried externalization first, but I rely heavily on external macros, external references, pointers from one `tikzpicture` to another, and therefore gave up). However, I don't know how to match the coordinate systems of the `tikzpicture` inside the `savebox` and the one containing the node where I use the `savebox`. This question appears related, but since my image is off in both coordinates, not only vertically, it appears my issue is a different one.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc,spy,fit,positioning,backgrounds,arrows,shapes,intersections,decorations.fractals,decorations.markings,external}     \newcommand{\snowflake}[2]{         \path[fill,draw] decorate{ decorate{ decorate{ decorate{ #1 ++(-150:.5*#2/0.866) -- ++(60:#2) -- ++(-60:#2) -- cycle }}}};     }     \newsavebox{\manyflakes}     \savebox{\manyflakes}{     \begin{tikzpicture}[decoration={Koch snowflake,amplitude=1pt,segment     length=1pt,start radius=1pt},draw=blue,fill=white,very thin]     \snowflake{(1.81, 1.42)}{0.89}     \end{tikzpicture}     }     \begin{document}     \begin{tikzpicture}     \node[anchor=south west,inner sep=0] at (0,0) {\usebox{\manyflakes}};     \filldraw[red] (1.81, 1.42) circle [radius=0.1];     \end{tikzpicture}     \end{document}      ![Output with photon not centred as desired](http://i.stack.imgur.com/4Mywq.png) How do I match the coordinate systems of the `savebox` with the one of the `tikzpicture`, so that the circle at `1.81, 1.42` is exactly in the middle of the snowflake?


title: Placing temporary files outside of dropbox for compilation: issues with openout_any and nomenclature

text: So I store my TeX source files in dropbox for backup and synchronization. Of course, it's annoying when you compile to have dropbox upload and download the changes to the temporary files, so you want to put these somewhere else. Since I use Mac OS X and Linux, I chose `/var/tmp/texBuild` as my output directory for these files. My Makefile includes simply:               TMPDIR = /var/tmp/texBuild     FC = pdflatex -output-directory $(TMPDIR)      When creating a nomenclature, it complained that it was not authorized to write to that directory. A quick search gave me an answer: edit the `texmf.cnf` to change the variable `openout_any` from `p` to `a`. However I then found this question: Open a file whose name start with a dot and other strangely named files? where it is suggested to not do that system wide. Where can I set this environment variable? In my Makefile? Should I rather pick another output directory than `/var/tmp`? I realize I could have just made a comment to that other question but hopefully my question is sufficiently different to warrant its own question.


title: Own document variables with and without arguments

text: I use the following to introduce new document variables to my document. They should behave like `\author` or `\title`. So when they're used without parameter, they should print the corresponding variable. If they're called with parameter, they should set the corresponding variable to this value.               \newcommand*{\tutor}[1]{\gdef\@tutor{#1}}      Works ok, but I have to use               \tutor{new defined name}      to define the value and               \@tutor      to get the name printed instead of just using               \tutor      What's the simplest way to introduce `\tutor` as desired?


title: Using soul with indirect formatting applied (using macro with 2 parameters, one possibly optional)

text: This is a followup to Using soul with indirect formatting applied, where it was determined that using `\soulregister` allows the `soul` macros to have font switching macros within the parameters (specifically `\ul` in this case). However, I am not able to get this to work if the macro has more than one parameter. ### Single Parameter: `\ApplyStyleA` This seems to work fine if the macro has one mandatory parameter, as per the answer in Using soul with indirect formatting applied. ### Two Mandatory Parameters: `\ApplyStyleB` However, if the macro has _two mandatory_ parameters, then I get: > Extra }, or forgotten \endgroup ### Two Parameters (one optional): `\ApplyStyleC` Or, for the case where there is _one optional_ parameter and _one mandatory_ parameter, I get: > TeX capacity exceeded, sorry [input stack size=5000] ## Notes:   * The MWE as is below compiles fine as the two problematic lines are commented out. So, one needs to uncomment one of those to reproduce the problem. ## Code:               \documentclass{article}     \usepackage{xparse}     \usepackage{xcolor}     \usepackage{soul}     \usepackage{xspace}               %% ----------------------------------------------------------------     %%                http://tex.stackexchange.com/questions/36894/     %%                    underline-omitting-the-descenders     %%     %%     \makeatletter     \ExplSyntaxOn         \cs_new:Npn \white_text:n #1           {             \fp_set:Nn \l_tmpa_fp {.01}             \fp_mul:Nn \l_tmpa_fp {#1}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{\fp_to_decimal:N \l_tmpa_fp em}}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{-\fp_to_decimal:N \l_tmpa_fp em}}           }         \NewDocumentCommand{\whiten}{ m }             {               \int_step_function:nnnN {1}{1}{#1} \white_text:n             }     \ExplSyntaxOff          \NewDocumentCommand{ \varul }{ D<>{5} O{0.2ex} O{0.1ex} +m } {%     \begingroup     \setul{#2}{#3}%     \def\SOUL@uleverysyllable{%        \setbox0=\hbox{\the\SOUL@syllable}%        \ifdim\dp0>\z@           \SOUL@ulunderline{\phantom{\the\SOUL@syllable}}%           \whiten{#1}%           \llap{%             \the\SOUL@syllable             \SOUL@setkern\SOUL@charkern           }%        \else            \SOUL@ulunderline{%              \the\SOUL@syllable              \SOUL@setkern\SOUL@charkern            }%        \fi}%         \ul{#4}%     \endgroup     }%     \makeatother     %% ----------------------------------------------------------------               \newcommand{\ApplyStyleA}[1]{\textit{#1}}     \soulregister\ApplyStyleA{1}          \newcommand{\ApplyStyleB}[2]{\textit{#1}}     \soulregister\ApplyStyleB{2}          \newcommand{\ApplyStyleC}[2][]{\textit{#2}}     \soulregister\ApplyStyleC{2}          \begin{document}     This one works just fine:     \varul{\ApplyStyleA{special text}\xspace}%          \medskip     These one leads to ``Extra \}, or forgotten \verb|\endgroup|."     %\varul{\ApplyStyleB{special text}{second paramater}\xspace}%          \medskip     This one leads to ``TeX capacity exceeded, sorry [input stack size=5000]"     %\varul{\ApplyStyleC[first optional paramater]{special text}\xspace}%     \end{document}


title: How do I reduce the indentation of items in an enumeration?

text: I am trying to condense a two-level enumeration of some kind of requirements in a figure, with the text referencing the items of the enumeration. I am using a table to separate the two columns (tried `\twocolumn` and `\onecolumn` but this didn't have the desired effect) and generate the figure border. Here is an example of what I managed to do: ![examples](http://i.stack.imgur.com/xuTpF.png) Figure 1.2 is essentially what I want, except that references to the items in the list do not work: a `\ref` refering to e.g. item 1e displays as "5", i.e. only the nested list is shown, and it is shown using arabic numerals instead of letters. Figure 1.2 was created using the bare list environment, i.e. like this:               \begin{figure}     \newcounter{ctr:templatelang-req}     \newcounter{ctr:templatelang-req:sub}[ctr:templatelang-req]     \begin{tabular}{|p{0.48\textwidth}p{0.45\textwidth}|}     \hline     \begin{list}{\arabic{ctr:templatelang-req}.}{\usecounter{ctr:templatelang-req}\leftmargin=1.4em}       \item SDF         \begin{list}{\alph{ctr:templatelang-req:sub}.}{\usecounter{ctr:templatelang-req:sub}\leftmargin=1.4em}           \item \label{templatelang-req:target-sort}Target sort           \item \label{templatelang-req:cons-attr}Constructor attribute           \item \label{templatelang-req:other-attrs}Other attributes           \item \label{templatelang-req:sort-refs}References to other sorts           \item \label{templatelang-req:literals-1}Literal text (excl. layout)           \item \label{templatelang-req:option-op}Option operator \texttt{A?}           \item \label{templatelang-req:repetition-op}Repetition operators \texttt{A*} and \texttt{A+}           \item \label{templatelang-req:list-op}List operators \texttt{\{A S\}*} and \texttt{\{A S\}+}         \end{list}       \end{list} &     \begin{list}{\arabic{ctr:templatelang-req}.}{\usecounter{ctr:templatelang-req}\leftmargin=1.4em}       \setcounter{ctr:templatelang-req}{1}       \item Pretty printer         \begin{list}{\alph{ctr:templatelang-req:sub}.}{\usecounter{ctr:templatelang-req:sub}\leftmargin=1.4em}           \item \label{templatelang-req:literals-2}Literal text (incl. layout)           \item \label{templatelang-req:wordwrap}Optional: word wrap           \item \label{templatelang-req:alignment}Optional: alignment           \item \label{templatelang-req:tabstops}Optional: tab stops         \end{list}\vspace{1ex}       \item Completion templates         \begin{list}{\alph{ctr:templatelang-req:sub}.}{\usecounter{ctr:templatelang-req:sub}\leftmargin=1.4em}           \item \label{templatelang-req:literals-3}Literal text (incl. layout)           \item \label{templatelang-req:placeholder-text}Placeholder text         \end{list}     \end{list} \\     \hline     \end{tabular}     \caption{Required information to encode in our syntax templates}     \label{fig:templatelang:requirements}     \end{figure}      Figure 1.3 is the result of using the `enumerate` environment. The only "hack" here is the use of `\setcounter{enumi}{1}` to start the outer enumeration in the second column at the proper number. With figure 1.3, `\ref` works fine: it includes both levels and uses the correct type of numbers. I.e., a reference to item 1e is displayed as 1e. Code for figure 1.3:               \begin{figure}     \begin{tabular}{|p{0.48\textwidth}p{0.45\textwidth}|}     \hline     \begin{enumerate}       \item SDF         \begin{enumerate}           \item \label{templatelang-req:target-sort}Target sort           \item \label{templatelang-req:cons-attr}Constructor attribute           \item \label{templatelang-req:other-attrs}Other attributes           \item \label{templatelang-req:sort-refs}References to other sorts           \item \label{templatelang-req:literals-1}Literal text (excl. layout)           \item \label{templatelang-req:option-op}Option operator \texttt{A?}           \item \label{templatelang-req:repetition-op}Repetition operators \texttt{A*} and \texttt{A+}           \item \label{templatelang-req:list-op}List operators \texttt{\{A S\}*} and \texttt{\{A S\}+}         \end{enumerate}       \end{enumerate} &     \begin{enumerate}       \setcounter{enumi}{1}       \item Pretty printer         \begin{enumerate}           \item \label{templatelang-req:literals-2}Literal text (incl. layout)           \item \label{templatelang-req:wordwrap}Optional: word wrap           \item \label{templatelang-req:alignment}Optional: alignment           \item \label{templatelang-req:tabstops}Optional: tab stops         \end{enumerate}\vspace{1ex}       \item Completion templates         \begin{enumerate}           \item \label{templatelang-req:literals-3}Literal text (incl. layout)           \item \label{templatelang-req:placeholder-text}Placeholder text         \end{enumerate}     \end{enumerate} \\     \hline     \end{tabular}     \caption{Required information to encode in our syntax templates}     \label{fig:templatelang:requirements}     \end{figure}      So my question is foremost: **how do I reduce the indentation of the list items in the enumerate environment, when using the memoir class?** I tried the things suggested here on stackoverflow, which is how I arrived at figure 1.2, but since this breaks `\ref` it doesn't really help me. I also tried to insert `\setlength{\leftmargin}{0pt}` at various places, as is suggested by figure 8.2 on page 149 (the layout parameters of general lists) of the memoir manual, but this didn't help either. Do I really need to use an extra package just to reduce the indentation of these enumerations, as suggested here?


title: set pdfauthor using complex list-processing macro

text: I have created a macro, `\joinlist`, that adds commas or other delimiters between the elements of an `etoolbox` internal list. It has special handling for lists of just two elements ("a and b"). It also knows how to put a different delimiter between the last two items of longer lists ("a, b, and c"). Here is the definition, created by me:               % typical use: \joinlist{\listmacro}{, }{, and }{ and }          \RequirePackage{etoolbox}          \newcommand{\@join@ignore}[1]{} % used to ignore current list element when counting     \newcount\@join@listlength % used to count length of list     \newcount\@join@currentnum % used to track current list element number          \newcommand{\joinlist}[4]{%       %       % count list elements       \@join@listlength 0 %       \forlistloop{\advance\@join@listlength 1\relax\@join@ignore}{#1}%       %       % now join list elements, tracking current element number       \@join@currentnum 0 %       \forlistloop{%         \advance\@join@currentnum 1 %         \ifnumequal{\the\@join@currentnum}{1}%         {}% first         {% not first           \ifnumequal{\the\@join@currentnum}{\the\@join@listlength}%           {% last             \ifnumequal{\the\@join@listlength}{2}%             {#4}% last of exactly two             {#3}% last of more than two           }%           {#2}% neither first nor last         }%       }%       {#1}}      Save the above as `join-list.sty`, then consider the following small example showing a problem:               \documentclass{article}          \usepackage{hyperref}     \usepackage{join-list}          \begin{document}              \newcommand{\people}[0]{}         \listadd{\people}{a}         \joinlist{\people}{, }{, and }{ and }  % a              \listadd{\people}{b}         \joinlist{\people}{, }{, and }{ and }  % a and b              \listadd{\people}{c}         \joinlist{\people}{, }{, and }{ and }  % a, b, and c              \hypersetup{pdfauthor=\joinlist{\people}{, }{, and }{ and }}          \end{document}      `\joinlist` works fine for creating document body content. We see "a", then "a and b", then "a, b, and c" as expected. Unfortunately, using this in `\hypersetup{pdfauthor=...}` does not work as hoped. Instead, it sets the document's PDF author metadata to "0 1110 1 , and a1 , and b1 , and c". Clearly something has gone badly wrong with expanding/evaluating the `\joinlist` macro in this context. What am I doing wrong here? How can I fix this? Are there other ways that my `\joinlist` macro could be improved? Does a similar macro already exist in some widely-available package? (I searched but found none.)


title: Multiple overlaid rectangles as TikZ node

text: I'm trying to create a TikZ flowchart where I need to differentiate between serial and parallel streams. Here's an example with serial to parallel: ![serial to parallel nodes](http://i.stack.imgur.com/u6frQ.jpg) I've managed to create a multiple stack of rectangles, but struggle to centre text and it can't be incorporated as a node shape. I could always manually draw it all, but I'm wondering whether there's an easier way to accomplish this? Particularly, is there a way to create a TikZ style with multiples overlaid rectangles that could easily be incorporated into nodes? Here's my code, which recreates the bottom rectangle, with poorly centred text:               \newcommand{\pstack}[3]{     \draw[fill=white, minimum height=4em] #1 rectangle #2;     \draw[fill=white, minimum height=4em] #1 ++(-0.05,0.05) ++(-0.05,0.05) rectangle +#2;     \draw[fill=white, minimum height=4em, thick] #1 ++(-0.1,0.1) ++(-0.1,0.1) rectangle +#2;     \path #1 -- +#2 node[pos=0.75] {#3};     }     \begin{tikzpicture}[node distance = 2cm, auto]%[scale=.8, z={(-.707,-.3)}]         \pstack{(0,0)}{(2,1)}{some text};     \end{tikzpicture}


title: MinionPro font with some symbols from kpfonts

text: At this moment I'm using MinionPro package. But I don't like most of the `MnSymbol`'s symbols. I discovered that I really like some symbols from `kpfonts` (if anyone suggest anything better, I will be listening to you, but I'm looking only for _no rounded_ symbols). I would like to get from `kpfonts` this:   * All relation symbols (`=`, `≤`, `>`, `≠`, `~`, `\subset`, ... all of them).   * All the operators (`\times`, `+`, `–`, `÷`, ... ).   * About the big operators, I would like to keep the integrals from MinionPro package (`minionint` option), and all the rest is welcome (well, I will replace the `\sum` symbol anyway, so it doesn't matter if it comes or not).   * All the arrows (or arrows like).   * All the delimiters, except, if possible the _base_ parenthesis and the _base_ bracket (which are original from Minion Pro font and look good). _I'm not sure about this, but what I really hate from minion are`\langle`/`\rangle` and parenthesis (except the base ones)._   * Also, I'm interested in the blackboard bold alphabet. But not the caligraphic alphabet (as I use `swash` from Minion Pro).   * About the accents, I'm not sure at all, as I can't compare easily both of them. So this is up to you. By the way, what I want to keep from MinionPro are:   * All the symbols from the original font (like `\partial`).   * All the greek letters and `\mathrm`, `\mathit`, `\mathnormal`, and the numbers from MinionPro.   * The prime symbol, and (I repeat) may be the accents, I'm not sure an listen to your opinion. May be I forgot something, but this is all at this moment. Any idea or suggestion is welcome. Every approximation (not all the points, but some of them) will be also welcome. The reason why I want this (to give you the idea so you could think yourself and tell your opinion) is that I prefer the _cut_ symbols rather than the _rounded_ ones. By the way, I think that some other symbols simply don't look good or don't fit the Minion Pro font. And I think `kpfonts` is pretty full of good symbols which may fit better Minion. Again, I will listen to whatever you have to suggest. To give a starting point, this is my actual template:               \documentclass{scrartcl}     \usepackage[%         opticals,%         smallfamily,%         textosf,%         footnotefigures,%         swash,%         openg,%         fourierbb,%         minionint,%         italicgreek,%         mathlf,%         mathtabular,%         onlytext,%     ]{MinionPro}     \usepackage[notext]{kpfonts}     \makeatletter       \DeclareSymbolFont{operators}  {T1} {\Mn@Math@Family}{m} {n}       \DeclareSymbolFont{letters}    {OML}{MinionPro-TOsF} {m} {\Mn@Math@LetterShape}       \SetSymbolFont{operators}{bold}{T1} {\Mn@Math@Family}{eb}{n}       \SetSymbolFont{letters}  {bold}{OML}{MinionPro-TOsF} {eb}{\Mn@Math@LetterShape}       \DeclareMathAlphabet\mathbf    {T1} {\Mn@Math@Family}{eb}{n}       \DeclareMathAlphabet\mathit    {T1} {\Mn@Math@Family}{m} {it}       \SetMathAlphabet\mathit  {bold}{T1} {\Mn@Math@Family}{eb}{it}       \DeclareMathVersion{tabular}       \SetSymbolFont{operators}{tabular}    {T1} {\Mn@Math@TFamily}{m}{n}       \SetSymbolFont{letters}  {tabular}    {OML}{MinionPro-TOsF}  {m}{\Mn@Math@LetterShape}       \SetMathAlphabet\mathit  {tabular}    {T1} {\Mn@Math@TFamily}{m}{it}            \DeclareMathVersion{boldtabular}       \SetSymbolFont{operators}{boldtabular}{T1} {\Mn@Math@TFamily}{eb}{n}       \SetSymbolFont{letters}  {boldtabular}{OML}{MinionPro-TOsF}  {eb}{\Mn@Math@LetterShape}       \SetMathAlphabet\mathit  {boldtabular}{T1} {\Mn@Math@TFamily}{eb}{it}     \makeatother     \begin{document}     \[         \int_a^b f(x) \, \mathrm{d}x = 3 + 2 = 5 \subset \mathbb{N}     \]     \end{document}


title: How to automate a workflow: several files in 1 master .tex

text: I have the following situation: I have to produce 60+ files in latex, each one from a .txt file, and with one master file (tex): I mean, I have a 1- or 2-page file per situation (a .txt file, in UTF8 with its own file name), and I need to compile them with the same master .tex file. After that, the produced pdf file should take the .txt name (otherwise it'll overwrite the same file and at the end I´ll have only one "master.pdf" Can it be possible, rathe than copy/paste for each one? I'm using OSX 10.8.3, and TeXShop


title: How to position qtrees

text: Suppose, I have 2 qtrees, that I want to put below each other:               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree,tikz-qtree-compat}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}     \Tree     [.{1}         [.1-1 ]         [.\node (1) {1-2}; ]     ]     \node [below = 0.5cm of 1.south] (note-1) {la la la};     \draw[-]           (note-1.north) -- (1.south);     \Tree     [.{2}         [.2-1 ]         [.2-2 ]     ]     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/t5PAW.png) Now trees overlap. The 1-st has a comment 'la la la', residing in a separate node. If I didn't have it, I could put both trees into nodes and position nodes. But how to position bare qtrees? So their roots would match horizontally and the 2-nd tree would be below 'la la la'.


title: Undo option in LatexDraw

text: The GUI LatexDraw for generating PStricks codes does not have "undo" option. What other better GUIs are available for generating PStricks codes? http://latexdraw.sourceforge.net/


title: What are these weird symbols showing up in my source code listings?

text: I have a LaTeX document, and am trying to embed some Java code via the listings package. I have the following LaTeX source:               \documentclass{article}     \usepackage{listings}     \title{Sample Document}     \begin{document}          \section*{Source Code:}          \lstset{ language=Java }     \lstinputlisting{example.java}          \end{document}      And, for the most part, the code shows up nicely. But, in certain places I get these weird symbols where spaces should be (code coloring added): ![In certain places there are weird |_| symbols instead of spaces](http://i.stack.imgur.com/lm3qj.png) It appears that, within any quoted string, the spaces are converted to these U-like symbols. Any idea why this is happening?


title: kpathsea: "I can't find file `ptmr8t+10'."

text: Using latexmk 4.39 on Arch Linux, I get a compile error regarding "ptmr8t+10". `tlmgr search --global --file ptmr8t` gives me the "times" package which is already installed but `tlmgr search --global --file ptmr8t+10` comes up empty. What exactly is happening there and how I can resolve this? **Output tail of`latexmk paper.tex`**               kpathsea: Running mktextfm ptmr8t+10     /usr/local/texlive/2013/texmf-dist/web2c/mktexnam: Could not map source abbreviation  for ptmr8t+10.     /usr/local/texlive/2013/texmf-dist/web2c/mktexnam: Need to update ?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t+10     This is METAFONT, Version 2.718281 (TeX Live 2013)               kpathsea: Running mktexmf ptmr8t+10     ! I can't find file `ptmr8t+10'.     <*> ...jfour; mag:=1; nonstopmode; input ptmr8t+10          Please type another input file name     ! Emergency stop.     <*> ...jfour; mag:=1; nonstopmode; input ptmr8t+10          Transcript written on mfput.log.     grep: ptmr8t+10.log: Datei oder Verzeichnis nicht gefunden     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t+10' failed to make ptmr8t+10.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font csnameendcsname=ptmr8t+10 at 10.0pt not loadable: Metric (TFM) file not      found.     <to be read again>                         relax      l.25 \begin{document}


title: I would like to change the footnote style

text: I need to do footnote like at the jpg file.....the footnote line on the same perfil of the number, and I want, also, to control the distance beewteen the text (Then I can) and the line of the footnote. Please can you help?![enter image description here](http://i.stack.imgur.com/LgSwq.jpg)


title: How to change cellspacing of a table in latex?

text: I've tried searching the answer here, but I did not find it. I have a plenty of 25x25 table with long entries. The table should fit in an A4 sheet of paper. I tried using "landscape". It helped a bit, but there are some tables which still don't fit. Can anyone tell me how can I change cellspacing of the table, that is the distance between borders of its elements?


title: How to make a wrapper for \input

text: I would like to make a wrapper for `\input` to include TikZ figures. I have tried something like this:               \newcommand{\inputtikz}[1]{%     \tikzsetnextfilename{#1}     \input{figures/{#1}.tikz}     }      but with this construction I get: > LaTeX Error: File `myFigure.tikz' not found. What is the right way to do something like this? Does somebody know of any good tutorials or other reading material on LaTeX macros?


title: how to open old 'tex metric font' file in ubuntu/windows?

text: I've been given a ''tex metric font'' file which was apparently used, by the person who gave it to me, to make a spreadsheet on Windows in the late 80s. I know nothing about LaTeX (neither does he), can anyone help me to work out how to open this file in Ubuntu (12.04) or Windows? Thanks, A


title: How do I format the header text of the table of contents?

text: I'm new here, I have tried to solve most of the problems with my TEX code and so far I have been successful in solving all of them except for this one. I would like to show the word "CONTENTS" in the header of the table of contents section in cyan. Here is a minimal working example:               \documentclass[oneside,english]{book}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{amsmath}     \usepackage{fancyhdr}     \usepackage{lipsum}     \usepackage{xcolor}          \pagestyle{fancy}     \fancyhead[LO,RE]{\thepage}          \renewcommand\contentsname{TABLE OF CONTENTS}          \makeatletter     %     \makeatother     %     \usepackage{babel}     \begin{document}     \tableofcontents{}     %     \chapter{ZXCVB}     \lipsum{}     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \chapter{ZXCVB}     \lipsum     %     \end{document}      In my actual code, I successfully changed a List of Symbols and a Bibliography parts by doing the following:               \chapter*{List of symbols}     \markboth{\textcolor[cmyk]{1,0,0,0}{List of symbols}}{}     \markright{\textcolor[cmyk]{1,0,0,0}{List of symbols}}{}      And               \renewcommand\bibsection{\chapter*{Bibliography}}     \markboth{\textcolor[cmyk]{1,0,0,0}{Bibliography}}{}     \markright{\textcolor[cmyk]{1,0,0,0}{Bibliography}}{}      But this doesn't seem to work on the Table of Contents. Just a little bit of context: I'm using a custom class from my university, and somehow that class only colors the headers of the numbered chapters and sections, that's why I had to manually set the colors of the unnumbered sections. Thanks in advance!


title: What font is this smiling sun character in?

text: I'm hoping this question is not too far off topic for this group. I created a logo for my wife's business that incorporated a smiling sun character. I now only have it as an image file, but I would like to use this character again. Unfortunately, I can no longer find the font that it is in. I have searched through all the fonts on my system and can't locate it. Can anyone tell me what font this character is in? ![logo with smiling sun](http://beta.healingscents.com/images/HSLogo.png)


title: Two different numbering styles for equations in the same document

text: Earlier in the document, there's some equations labeled like this:               (1)  (some space) \frac{1}{/2}=0.5          (2)  (some space) hi      Now, I want to do something like this and switch the equation number and start over:               (a)  (some space) hello      How can I do this?


title: aligning numerical data in columns on decimal marker

text: I created this table: ![enter image description here](http://i.stack.imgur.com/B0YTz.png) I use this code:               \documentclass[12pt,twoside,a4paper,openright]{report}     \usepackage{color}     \usepackage[portuguese]{babel}     \usepackage[utf8]{inputenc}     \usepackage[hidelinks]{hyperref}     \usepackage[official]{eurosym}     \usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}     \usepackage{fancyhdr}     \usepackage{graphicx}     \graphicspath{  {fig/} }     \usepackage{mathtools}     \usepackage[round]{natbib}     \usepackage{xr}     \usepackage{siunitx}     \usepackage{booktabs, multicol, multirow}     \usepackage{pdflscape}     \usepackage{emptypage}     \usepackage{epstopdf}     \usepackage{setspace}     \usepackage{nomencl}     \usepackage{tabularx}     \usepackage{amsmath}     \usepackage{booktabs}     \usepackage{ragged2e}     \usepackage{tikz}     \usepackage{gensymb}     \usepackage{array}     \usepackage{tabularx}     \usepackage{dcolumn}     \usepackage{booktabs}     \usepackage{makecell}          \newcolumntype{R}{>{\raggedleft\arraybackslash}X}     \newcolumntype{L}{>{\raggedright\arraybackslash}X}     \newcolumntype{C}{>{\centering\arraybackslash}X}                    \newcommand{\mc}{\multicolumn} % handy shortcut macro     \newcolumntype{Z}{>{\centering\arraybackslash}X} % handy shortcut macro     \newcolumntype{d}[1]{D{.}{\cdot}{#1}} % and yet another handy shortcut macro     \newcolumntype{,}{D{,}{,}{-2}}          \setcellgapes{2pt}     \makegapedcells     \renewcommand\cellalign{lc}          \begin{document}          \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabularx}{\textwidth}{@{}cLcccccc@{}}       \cmidrule[0.8pt]{2-6}      & Amostra & \multicolumn{2}{c}{H60} & \multicolumn{2}{c}{H60 Modificado} \\        \cmidrule{2-6}       &  \textbf{Série} & 1  & 2  & 1   & 2 \\       &  \textbf{Data de Formação} & 10/mar & 22/abr & 08/abr & 10/abr \\       &  \textbf{Data de Medição} & 27/mar & 28/abr & 11/abr & 11/abr \\     \addlinespace       \multirow{6}{*}{\rotatebox[origin=C]{90}{Estruturais}} & \textbf{Filler Efectivo (\%)} & 18,25 & 18,3  & 17,6  & 17,1 \\       & \textbf{Gramagem ($g.m^{-2}$)} & 83,8  & 85,0  & 82,8  & 83,0 \\       & \textbf{Massa Volúmica ($g.cm^{-3}$)} & 0,72  & 0,7   & 0,7   & 0,7 \\       & \textbf{Índice de Mão ($cm^3.g^{-1}$)} & 1,40  & 1,4   & 1,5   & 1,5 \\       & \textbf{Resistência ao ar Gurley 100ml (s)} & 3,8   & 5,3   & 4,1   & 3,4 \\       & \textbf{Rugosidade  ar Bendtsen, FL ($ml.min^{-1}$)} & 192   & 199,8 & 414,1 & 410,2 \\     \addlinespace     \multirow{6}{*}{\rotatebox[origin=C]{90}{Mecânicas}} & \textbf{Índice de Rebentamento ($kPa.m^2.g^{-1}$)} & 1,76  & 2,1   & 2,3   & 2,3 \\       &  \textbf{Índice de Tracção ($N.m.g^{-1}$)} & 34,6  & 37,2  & 42,5  & 43,4 \\       &  \textbf{Extensão (\%)} & 2,9   & 2,7   & 2,8   & 2,6 \\       &  \textbf{Tensile Stiffness ($kN.m^{-1}$)} & 535  & 521,7 & 593,7 & 609,6 \\       &  \textbf{Índice T.E.A. ($J.g^{-1}$)} & 0,7   & 0,7   & 0,9   & 0,8 \\       &  \textbf{Índice de Rasgamento ($mN.m^2.g^{-1})$} & 5,6   & 5,7   & 5,7   & 5,5 \\     \addlinespace     \multirow{3}{*}{\rotatebox[origin=C]{90}{Ópticas}} &   \textbf{C.E.D.L. ($m^2.kg^{-1})$} & 48,5  & 47,6  & 43,4  & 43,7 \\       &  \textbf{Opacidade (\%)} & 88,1  & 88,1  & 86,2  & 85,9 \\       &  \textbf{Brancura R457 (\%)} & 84,6  & 84,9  & 84,6  & 85,8 \\         \cmidrule[0.8pt]{2-6}         \end{tabularx}%       \label{tab:addlabel}%     \end{table}%      But, I want to center the numbers (in columns) with commas. How I can do it ?


title: How can I break a macro / how to realize a switch or array-structure

text: I'm looking for a way to realize a macro with a `switch/case` control structure (or an `array` solution), as it exists in every programming language. MWE:               \documentclass[ngerman,12pt]{article}     \usepackage{etoolbox}          \newcommand*\foo[1]{%         \ifstrequal{#1}{givemea}{box}{}%         \ifstrequal{#1}{drawmea}{circle}{}%         \ifstrequal{#1}{applesidontlikeare}{green}{}%         \ifstrequal{#1}{life}{is full of surprises}{}%     }     \begin{document}     \foo{life}     \end{document}      As you can think of, if I have let's say 500 entries the process will slow down very much, as it compares to _every single value_ in the macro. A `\break` or `\return` command would be very useful, so the macro aborts if the value is found. Addition: My strings also will contain numbers (at every position). Or are there any packages I can use for the job? (Since there will be a lot of entries, I consider to split up the one macro into many: `\fooa`, `\foob`, ... So, if I invoke `\foo{life}` it checks the first letter `l`, and then invokes `\fool{life}`. That also will speed up the process.)


title: Nested lists in \foreach loop in TikZ

text: I want to draw a bunch of nodes with different styles (a, b, ...) at different points (named 00, 01, ...). I am using the following code:               \foreach \n/\lst in {       a/{00, 14, 20, 34},       b/{01, 11, 23, 33} } {       \foreach \xy in \lst {         \node[\n] at (\xy) {\n};       }     }      with the hope that `\lst` would be assigned a list, and `\xy` would be assigned elements from this list. However, I get error `Package pgf Error: No shape named {01, 11, 23, 33} is known.` How to fix this?


title: Preserve alphabetical order in index when the entry has a TikZ code

text: Friends, as a follow up to Overlapping TikZ nodes to look as a tape strip, I added a TikZ code to an index entry using the `splitidx`package. Consider this code:               \documentclass{article}          \usepackage[useindex]{splitidx}          \newindex[Index of Foo]{iof}          \makeindex          \usepackage{tikz}     \usetikzlibrary{chains,backgrounds}          \usepackage{xstring}          \tikzset{         tape node/.style={             on chain,             draw,             inner sep=1pt,             outer xsep=0pt,             minimum height=0.2cm,             minimum width=0.2cm         }     }          \newcommand*\myblackbox[1]{%         \node[             tape node         ] {\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};     }          \newcommand*\mygraybox[1]{%         \begin{pgfonlayer}{background}             \node[                 tape node,                 gray!60             ] {\color{gray!60}\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};        \end{pgfonlayer}     }          \DeclareRobustCommand*\drawboxes[1]{%     \begin{tikzpicture}[             start chain=going right,             node distance=0pt         ]         \IfSubStr{#1}{A}{\myblackbox{A}}{\mygraybox{A}}%         \IfSubStr{#1}{N}{\myblackbox{N}}{\mygraybox{N}}%         \IfSubStr{#1}{C}{\myblackbox{C}}{\mygraybox{C}}%         \IfSubStr{#1}{Q}{\myblackbox{Q}}{\mygraybox{Q}}%         \IfSubStr{#1}{P}{\myblackbox{P}~}{\mygraybox{P}~}     \end{tikzpicture}     }          \begin{document}          \sindex[iof]{\drawboxes{AC} Oranges}     \sindex[iof]{\drawboxes{ANCQ} Grapes}     \sindex[iof]{\drawboxes{CP} Bananas}     \sindex[iof]{\drawboxes{Q} Avocado}     \sindex[iof]{\drawboxes{P} Strawberry}          \printindex*          \end{document}      It works like a charm, but unfortunately, due to the TikZ code added to the beginning of the entry, the alphabetical order is lost: ![List of foo](http://i.stack.imgur.com/WL0g7.png) I have a wild guess: by passing some regular expression pattern to the `splitindex` parser tool, I could somehow make the generated index ignore the TikZ code at the beginning of the entry. If possible, I'd like to stick with the `splitidx` package, as it can handle several indices I have in the document. Any help is appreciated.


title: fancyvrb alternate commandchars and \textcolor

text: The following works:               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{color}     \begin{document}          \begin{Verbatim}[commandchars=\\\{\}]     test\textcolor{red}{foo}test     \end{Verbatim}          \end{document}      but the following does not:               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{color}     \begin{document}          \begin{Verbatim}[commandchars=&<>]     test&textcolor<red><foo>test     \end{Verbatim}          \end{document}      I get this error message:               ERROR: Argument of \textcolor has an extra }.          --- TeX said ---     <inserted text>                      \par      l.7 test&textcolor<red><foo>test          --- HELP ---     From the .log file...          I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.      I've tried all combinations of backslash-escaping the command chars but no luck. How can I use `&`, `<`, and `>` as the command characters? (Or if it's not possible, why?)


title: Overlapping TikZ nodes to look as a tape strip

text: Friends, I need to highlight specific letters. My set contains only `A`, `N`, `C`, `Q` and `P`, so I decided to make them look as a tape strip (ressembles a good old Turing Machine tape). The following code poorly tries to achieve that. Since I had an immutable set of letters and a defined order, I used the `xstring` package.               \documentclass{article}          \usepackage{tikz}     \usepackage{xstring}          \newcommand*\myblackbox[1]{%       \begin{tikzpicture}         \node[draw,inner sep=1pt, minimum height=0.2cm, minimum width=0.2cm] {\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};       \end{tikzpicture}}          \newcommand*\mygraybox[1]{%       \begin{tikzpicture}         \node[draw,inner sep=1pt, draw=gray!60, minimum height=0.2cm, minimum width=0.2cm] {\color{gray!60}\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};       \end{tikzpicture}}          \DeclareRobustCommand*\drawboxes[1]{%     \IfSubStr{#1}{A}{\myblackbox{A}}{\mygraybox{A}}%     \IfSubStr{#1}{N}{\myblackbox{N}}{\mygraybox{N}}%     \IfSubStr{#1}{C}{\myblackbox{C}}{\mygraybox{C}}%     \IfSubStr{#1}{Q}{\myblackbox{Q}}{\mygraybox{Q}}%     \IfSubStr{#1}{P}{\myblackbox{P}~}{\mygraybox{P}~}}          \begin{document}          \drawboxes{ACQ} Hello world.          \end{document}      This is the output: ![Strip](http://i.stack.imgur.com/WGXtG.png) The squares are arranged side by side. So far so good, but I'd like to make them slightly overlap each others, like this: ![Strip 2](http://i.stack.imgur.com/waHJl.png) The black boxes have higher priority, so they need to be on top of the gray ones. My solution is very simple, so I understand that a possible solution might have another method. Any ideas?


title: How to put a tilde under the symbol in math mode?

text: It is very easy to put a tilde _over_ the symbol in math mode. Simply type `$\tilde{a}$`. But how to put a tilde _under_ the symbol in math mode?


title: Caption with longtable and pgfplotstabletypeset

text: The 'longtable' documentation says to use               \caption{Your caption here}      for captions, but I can't see where to specify the 'longtable' options in the example where pgfplotstabletypeset and longtable is used together. MWE: You'll see currently the Table 1 text is just included, but that would mean it would be excluded from ToC and index of tables.               \documentclass{article}               % MWE from http://tex.stackexchange.com/questions/40411/import-files-with-pgfplotstable-and-split-tables-across-multiple-pages     \usepackage{pgfplotstable}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{array}     \usepackage[a4paper,top=4in,bottom=4in,right=1in,left=1in]{geometry} %%% change the margins in your file suitably.     \usepackage{filecontents}          \usepackage{pgfplotstable}      \usepackage{booktabs}      \usepackage{filecontents}     \usepackage{longtable}          \begin{document}     \begin{filecontents}{testdata.dat}     Idx  Nam Dim Grd     1   Ady 53  F     2   Bar 72  C     3   Cor 83  B     4   Dar 58  D     5   Esa 68  C     6   Foo 67  C     7   Gar 74  C     8   Hur 65  D     9   Jaz 85  B     10  Ker 91  A     1   Ady 53  F     2   Bar 72  C     3   Cor 83  B     \end{filecontents}          {\large Table 1}          \pgfplotstableset{     begin table=\begin{longtable},     end table=\end{longtable},     }          \pgfplotstabletypeset[col sep=space,     header=true,         columns={Idx,Nam,Dim,Grd},      % display specified columns     columns/Idx/.style={fixed,fixed zerofill,precision=0,column type=r},     columns/Nam/.style={column type=l,string type},     columns/Dim/.style={fixed,fixed zerofill,precision=1,column type=r},     columns/Grd/.style={column type=l,string type},     % requires booktabs to place horiz rules     every head row/.style={before row=\toprule, after row=\midrule\endhead},      every last row/.style={after row=\bottomrule}     ]{testdata.dat}          \end{document}      Would I put it in the `\pgfplotstableset` or `\pgfplotstabletypeset` sections, and with what syntax?


title: linking inside PDF generated by pdflatex

text: I have seen some PDF documents where figure numbers, citations, table numbers are highlighted and clickable. The click on any of these colored text allows one to jump to the resulting location. What package I can use to for these features?