title: Getting a virtual font to work in LaTeX

text: In a quest for greater understanding of all thing LaTeX, I've been playing around with virtual fonts (eg. replacing a hyphenation character and How to create a virtual font?). However, I can't get LaTeX to recognize my new TFM file and I think the problem lies with my lack of understanding of the `\pdfmapline` command. Here are the steps I took: Copied a known working font from my tex directory:               cp /usr/share/texmf-texlive/fonts/tfm/public/cm/cmr10.tfm .      Created a human-readable format:               tftopl cmb10 cmb10      Edited `cmb10.pl` and saved the new file to `foobar.vpl`. In this case I've mapped the letter b->a just to see if what I've done had some effect (see sec. 6 here). Next I compiled the file to a binary format:               vptovf foobar.vpl      This creates `foobar.tfm` and `foobar.vf`. From reading around, it seems that the `\pdfmapline` looks in the local directory, so for the time being, I can leave the files where they are. Now my LaTeX document looks like:               \documentclass{article}     \pdfmapline{=foorbar cmr10}          \begin{document}     aaaa bbbb aaaa     \font\test=foobar aaaa bbbb aaaa \the\font     \end{document}      This compiles but it does not replace any of the b's with a's.


title: How can I input part of a file in verbatim?

text: I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or use some other form of code representation such as the lstlisting package). I noticed that the catchfile package can help me with reading code as verbatim (as described here) and that the catchfilebetweentags package does essentially the other part of the job (as described in the answers to this question, yet I'm still struggling to do both simultaneously. Any ideas? Thank you.


title: How best to run through a series of elements {a,1,i}, {b,2,ii}, etc

text: I am rewriting a package I wrote for XeLaTeX to handle unicode blocks. This means dealing with setting up character classes for all characters from block "BlockName" starting at codepoint 1234 and ending at codepoint 5678. Right now I have a macro that takes three inputs, and transforms them as:               \newcounter{glyphcounter}     \newcommand{\@defineUnicodeClass}[3]{      \newXeTeXintercharclass#1      \forloop{glyphcounter}{#2}{\value{glyphcounter}<#3}\XeTeXcharclass\value{glyphcounter}=#1}      \XeTeXcharclass#3=#1}      This then gets called many, many times:               \@defineUnicodeClass{\AegeanNumbersClass}{65792}{65855}     \@defineUnicodeClass{\AlphabeticPresentationFormsClass}{64256}{64335}     \@defineUnicodeClass{\AncientGreekMusicalNotationClass}{119296}{119375}     ...      I'd like to compact this in such a way that I can simply define the list of blocks, a la `{{AegeanNumbers,65792,65855},{AlphabeticPresentationForms,64256,64335},{AncientGreekMusicalNotation,119296,119375},...}` and then run through this list to generate everything for each block. I was thinking about writing the data definition as `{AegeanNumbers,65792,65855,AlphabeticPresentationForms,64256,64335,AncientGreekMusicalNotation,119296,119375,...}`, so just a concatenated string in which every first%3 term is a new block definition, then having a macro that checks whether the input is empty, and if not takes the first three terms in that list, deals with them, then recurses with the list "tail", but I'm having a hard time implementing this in TeX. If this is the best way to go about it, how do I do so? If not, what's a better way to run through this kind of data? I had a look at http://maraist.org/comma-separated-lists-in-latex_08-2009 to figure out how to get the head/tail splitting to happen, but I am not having much luck getting this to work in XeLaTeX. I tried               \def\myTestCommand#1,#2{#1}      just to see whether it would do something, but calling it with "\myTestCommand{a,b,c,d}" just leads to a "runaway argument?" error. I also had a look at the `\forcsvlist` command from the etoolbox package, but from what I can tell this only understands a comma separated list in which every element is the same kind of thing, and has no concept of tuples. I could write a switching macro with two state variable macros to effect an "if states empty, fill first var, if one filled, fill second var, if both filled, call the following macro and empty both vars" but if someone has a cleaner approach, that would be much preferred.


title: Inserting pages into LaTeX's floating material queue

text: I have sort of a strange formatting requirement. For the situation where a figure and its caption are too large to fit on a single page, the caption needs to appear by itself on the page directly preceding the caption. What's more, the formatting for this page is very specific (and involves geometry changes which are a lot like even pages in a two-sided printing even though the document is single sided, cf. this question--blame whoever designs dissertation formatting requirements for this, not me). It's easy enough to construct the page with the caption and the page with the figure. What I need is a way to insert this material into whatever queue LaTeX uses for outputting figures and further to ensure that the two pages stay together. Note that I don't want to use the `\FloatBarrier` macro since the goal isn't to start outputting floats now, I simply need to add two new floats and for them to stay together on successive pages. It looks a bit like I could use `\@freelist` to grab an insertion number, construct a box for the page and then cause the output routine to be called, but the kernel source is far from clear to me.


title: Filling triangle doesn't seem to work with PGF/TikZ

text: I was wondering if anyone had any clue on why my triangles are not filled in red within the following piece of code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,3d}          \usepackage[active, pdftex, tightpage]{preview}     \PreviewEnvironment[{[]}]{tikzpicture}     \newcounter{number}          \begin{document}     \begin{tikzpicture}[x  = {(-0.5cm,-0.5cm)},                         y  = {(0.9659cm,-0.25882cm)},                         z  = {(0cm,1cm)}]     \begin{scope}[canvas is yx plane at z=0]     \foreach \x / \y / \label in     {1 / 0.4 / 1,     0.9 / 0.4 / 0,     1 / 0.5 / 1,     0.7 / 0.3 / 0,     0.8 / 0.4 / 0,     0.9 / 0.5 / 0,     1 / 0.6 / 1,     0.7 / 0.4 / 0,     0.4 / 0.4 / 0,     0.6 / 0.4 / 0,     0.5 / 0.4 / 0,     0.8 / 0.5 / 0,     0.9 / 0.6 / 0,     1 / 0.7 / 1,     0.7 / 0.5 / 0,     0.5 / 0.5 / 0,     0.4 / 0.5 / 0,     0.6 / 0.5 / 0,     0.8 / 0.6 / 0,     0.9 / 0.7 / 0,     1 / 0.8 / 1,     0.7 / 0.6 / 0,     0.6 / 0.6 / 0,     0.5 / 0.6 / 0}     {     \addtocounter{number}{1}     \pgfmathparse{\value{number}}\let\k\pgfmathresult     \draw (8 * \x, 8 * \y) node[inner sep=0, outer sep = -0.1pt,color=black,fill,circle] (node-\k) {};     };          \foreach \x / \y / \z / \trash in     {     4/5/8/0,     9/11/16/0,     9/16/17/0,     11/10/18/0,     11/18/16/0,     10/8/15/0,     10/15/18/0,     8/5/12/0,     8/12/15/0,     5/2/6/0,     5/6/12/0,     2/1/3/0,     2/3/6/0,     17/16/24/0,     16/18/23/0,     16/23/24/0,     18/15/22/0,     18/22/23/0,     15/12/19/0,     15/19/22/0,     12/6/13/0,     12/13/19/0,     6/3/7/0}     {     \draw[fill=red]  (node-\x) --  (node-\y) --  (node-\z) -- cycle;     }     \end{scope}     \end{tikzpicture}     \end{document})


title: Typography: floating vs inline illustrations

text: I understand the use and purpose of floats containing figures and tables. It makes a lot of sense if you think about the overall aesthetics of the page. However I find the graphical distance between the point of reference and the figure itself is often distracting and cumbersome to read. When a figure is referenced more than once, or represents a standalone item in the document this is clearly a good compromise. However there are times where an illustration is part of the discourse (think about an illustration aiding a subtle point in an explanation) and putting it in a float feels unnatural and distracting. Currently, when I feel an inline figure is more appropriate I just wrap the `\includegraphics` or tikz code in a `center` environment. Are there better ways? More specifically: does the `center` environment put the correct spacing? Which penalties should be set (and how) around the picture to avoid unpleasant pagebreaks?


title: \ShortStack Align

text: `Some sentence.... \shortstack[]{a\\\b\\\c}` it produces like > >                       a >                       b >     Some sentence.... c >   But I would like to produce something like this > >                           a >     Some Sentence...      b >                           c >   I want to align the "Some sentence....." with be instead of c.


title: tex4ht on MiKTeX fails on the simplest document

text: Document:               \documentclass{article}     \begin{document}     This is just some sample text.     \end{document}      Error:               mk4ht oolatex nodecolon     mk4ht (Version 1.1)     htlatex nodecolon "xhtml,ooffice" "ooffice/! -cmozhtf" "-cooxtpipes -coo"          d:\Marci\temp>latex "-cooxtpipes -coo" \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode xhtml.a.b.c.\input  nodecolon      latex: Invalid command-line option     latex: Data: unknown option          d:\Marci\temp>latex "-cooxtpipes -coo" \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode xhtml.a.b.c.\input  nodecolon      latex: Invalid command-line option     latex: Data: unknown option          d:\Marci\temp>latex "-cooxtpipes -coo" \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode xhtml.a.b.c.\input  nodecolon      latex: Invalid command-line option     latex: Data: unknown option          d:\Marci\temp>tex4ht nodecolon  -i/tex4ht/ht-fonts/ooffice -ewin32/tex4ht.env      ----------------------------     tex4ht.c (2012-07-25-19:36 Windows MiKTeX)     tex4ht nodecolon        -i/tex4ht/ht-fonts/ooffice        -ewin32/tex4ht.env      --- warning --- Can't find/open file `nodecolon.dvi'     --- error --- Can't find/open file `nodecolon.dvi'          d:\Marci\temp>t4ht nodecolon "ooffice/! -cmozhtf" -ewin32/tex4ht.env      ----------------------------     t4ht.c (2012-07-25-19:28 MiKTeX)     t4ht nodecolon        ooffice/!        -cmozhtf        -ewin32/tex4ht.env      (C:/Users/Marci/AppData/Roaming/MiKTeX/2.9/tex4ht/base/win32/tex4ht.env)     --- warning --- Can't find/open file `ooffice/!.lg'


title: Scale font in TikZ plots

text: I have a lot (~100) of TikZ plots, autogenerated with a popular matlab script. I want to resize the font of the plots, because it is currently too large. I googled a bit, and found some answers (even from this stackexchange). None of them seems to apply to my case. I have tried `\scalefont` and `\small` so far. A typical `.tikz` file is like this:               \begin{tikzpicture}       \begin{axis}[%          width=\figurewidth,          height=\figureheight,          scale only axis,          xmin=0.6,          xmax=1.4,          xlabel={$\text{S/S}_{\text{mindrag}}$},          ymin=74000,          ymax=94000,          ylabel={b},          title={$\text{M}_{\text{des}}\text{ =0.77 AR =9.3}$}        ]       % Tons of lines...       \end{axis}     \end{tikzpicture}%      What I have is:               \begin{figure}[htbp]       \centering       \subfloat{\input{plots/WTO_plot_1_1.tikz}}       \subfloat{\input{plots/WTO_plot_1_3.tikz}}       \subfloat{\input{plots/WTO_plot_1_5.tikz}}\\            \subfloat{\input{plots/WTO_plot_3_1.tikz}}       \subfloat{\input{plots/WTO_plot_3_3.tikz}}       \subfloat{\input{plots/WTO_plot_3_5.tikz}}\\            \subfloat{\input{plots/WTO_plot_5_1.tikz}}       \subfloat{\input{plots/WTO_plot_5_3.tikz}}       \subfloat{\input{plots/WTO_plot_5_5.tikz}}\\            \caption{MTOW}       \label{figs}     \end{figure}      I am looking for a "global" solution, one which does not need to edit every single file.


title: Triangle with text in it

text: I have an automaton in tikz and would like to have some text within a triangle of the right size. How can I do that efficiently? * * * I have tried using a regular polygon, but I can't shrink it to the right size: `minimum height` and `minimum size` have no effect. So is there any parameter that controls the size?                  \begin{tikzpicture}[auto,>=latex]          \node[state,inner sep=0pt,minimum size=.3cm] at (0,0) (init) {};          \node[state,inner sep=0pt,minimum size=.3cm] at (-5,-1.3) (idelta)          {};         \node[draw,minimum height=.5cm,regular         polygon,regular polygon sides=3] at (-5,-1.3) {foo};               \path[->]           (init)+(0,.5cm) edge (init)          (init) edge node[] {bar} (idelta);        \end{tikzpicture}


title: Page number consistency

text: I am working with a book using `memoir` class. My question involves the page numbering of the `\frontmatter` portion of the document. I am under the impression that the frontmatter should be consistently numbered. For instance, if the title page is on `page ii` then why is the next frontmatter page with text `page i` and not `page v`. I was under the impression that page numbering never skips unless called for. My publisher requires that all pages have a number (whether shown or not) I would be willing to simply supress numbering and reset the page counter to the appropriate number on the copyright page, but that solution seems inelegant or improper for TeX. And for complete context, the first text page in the frontmatter is my copyright page. Here is my `MWE:`               \documentclass[letterpaper,twoside,openright]{memoir}     \usepackage{lipsum}               %   Title Page     \newlength\drop     \makeatletter     \newcommand*{\titleGM}{\begingroup% Gentle Madness     \drop = 0.1\textheight     \vspace*{\baselineskip}     \vfill     \hbox{%     \hspace*{0.2\textwidth}%     \rule{1pt}{\textheight}     \hspace*{0.05\textwidth}%     \parbox[b]{0.75\textwidth}{     \vbox{%     \vspace{\drop}     {\noindent\HUGE\bfseries Guide to the\\[0.5\baselineskip]     Blah and Blah}\\[2\baselineskip]     {\Large\itshape Upper Level}\\[4\baselineskip]     {\Large The Author}\par     \vspace{0.5\textheight}     {\noindent Blah Blah Blah, 2013}\\[\baselineskip]     }% end of vbox     }% end of parbox     }% end of hbox     \vfill     \null     \endgroup}     \makeatother                     %       Footer                  \makeevenfoot{ruled}     {}{Copyright \copyright \hspace{0.2em} }{\thepage}      \makeoddfoot{ruled}     {\thepage}{Copyright \copyright \hspace{0.2em} }{}          %   Docuemnt     \begin{document}     \frontmatter     \begin{titlingpage}     \thispagestyle{empty}     \titleGM     \end{titlingpage}          \newpage     \pagestyle{ruled}     \lipsum[2]     \clearpage          \mainmatter     \lipsum[1-2]     \end{document}      Subsidiary questions (maybe separate question) Why doublepage cleared after title page?


title: adding a coloured-box in flowchart

text: I am trying to make a `flowchart` in `Latex`, I want to put some of steps in a coloured box with a label, e.g. **Deterministic Annealing** , I added `scope` part but it doesn't compile with the new change.               \documentclass[useAMS,usenatbib,usegraphicx]{mn2e}     \usepackage{verbatim}     \usepackage{bm}     \usepackage{subfigure}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric,backgrounds,fit,arrows}               \tikzstyle{decision} = [diamond, draw,          text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt, minimum height=5em]     \tikzstyle{block} = [rectangle, draw,          text width=5em, text centered, rounded corners, minimum height=5em]     \tikzstyle{line} = [draw, -latex']     \tikzstyle{cloud} = [draw, ellipse, node distance=2cm,         minimum height=2em]     \begin{document}          \begin{figure}     \flushleft     \begin{tikzpicture}[node distance = 1.45cm, auto]     \tiny         % Place nodes         \node [cloud] (start) {Start};         \node [block, below of=start, node distance=1.5cm] (kde) {\tiny Apply KDE};         \node [block, below of=kde, node distance=1.5cm] (init) {\tiny Initialize $\beta = \beta_0$\\$\hat{M}= \hat{M_0}$};         \node [block, below of=init] (Centroid) {\tiny Update $\mu_c$, $\mu_{c'}$\\ $\sigma_c$,$\sigma_{c'}$\\ $\theta$};         \node [block, below of=Centroid,text width=2.8cm] (Softassign) {\tiny Update $Q_{ij}$\\$M^{0}_{ij}\leftarrow \exp(\beta Q_{ij})$};         \node [block, below of=Softassign] (slack) {\tiny Update \\$\hat{M^{1}_{ij}}$ \\ $\hat{M^{0}_{ij}}$};         \node [decision, below of=slack,text width=1.25cm] (Sinkhorn) {\tiny Convergence\\ of $\hat M$ \\ or $I > I_1$};         \node [decision, left of=Sinkhorn, node distance=2.8cm,text width=1.25cm] (Convergence of match matrix) {\tiny Convergence\\ of $M$ \\ or $I > I_0$};         \node [block, below of =Sinkhorn,text width=1.0cm,yshift=-0.5cm] (End of Deterministic Annealing) {\tiny $\beta\leftarrow \beta_r\beta$};         \node [decision, right of=End of Deterministic Annealing, node distance=2.2cm] (Deterministic Annealing) {\tiny $\beta \geq \beta_f $};         \begin{scope}         \node[rectangle,draw,minimum width=1cm][fit = (Centroid)(Softassign)(slack)(Sinkhorn)(Convergence of match matrix)(End of Deterministic Annealing)(Deterministic Annealing),fill=red!20] (DA) {};         \node [above right] at (DA.north west) { Deterministic Annealing};         \end{scope}         \begin{scope}         \node[rectangle,draw,minimum width=1cm][fit = (Softassign)(slack)(Sinkhorn)(Convergence of match matrix),fill=green!20] (SA) {};         \node [above left] at (SA.north east) { Softassign};         \end{scope}              \node [block, right of=slack, node distance=3.2cm] (SVD) {\tiny Update\\ translations\\ via SVD};         \node [decision, right of=init, node distance=3.2cm,text width=1.8cm] (Zero Points) {\tiny $\Delta C_{\gamma}\ll 1$ \\ and \\ $\Delta C_{\zeta}\ll 1$};         \node [cloud, right of=Zero Points, node distance=2.0cm] (stop) {Stop};         % Draw edges         \path [line] (start) -- (kde);         \path [line] (kde) -- (init);         \path [line] (init) -- (Centroid);         \path [line] (Centroid) -- (Softassign);         \path [line] (Softassign) -- (slack);         \path [line] (slack) -- (Sinkhorn);         \path [line] (Sinkhorn) --+(1.5,0) -- +(1.5,3) -- node {No}(slack);         \path [line] (Sinkhorn) -- node[above] {Yes} (Convergence of match matrix);         \path [line] (Convergence of match matrix) |-  node[above][left]  {Yes}(End of Deterministic Annealing);         \path [line] (Convergence of match matrix) |- node[above] {No}(Centroid);         \path [line] (End of Deterministic Annealing) -- (Deterministic Annealing);         \path [line] (Deterministic Annealing) |- node[above] {No}(Centroid);         \path [line] (Deterministic Annealing) -| node[above][right] {Yes}(SVD);         \path [line] (SVD) -- (Zero Points);         \path [line] (Zero Points) -- node [above]{No}(init);     %     \path [line,dashed] (expert) -- (init);         \path [line] (Zero Points) -- node[above]{Yes}(stop);     \end{tikzpicture}     \caption{The heuristic colour calibration procedure flowchart. The parameters in flowchart are explained in Table \ref{tab:initial} with details.}     \label{fig:flowchart}     \end{figure}          \end{document}      What I basically want to have in my flow-chart: **1. The written labels and coloured-boxes should not overlap with each other and with lines or boxes.** **2. Figure out how to make the boxes appear which are missing again.** Update: ![enter image description here](http://i.stack.imgur.com/Vid8f.png) Could somebody point out what would be my mistake?


title: Need some help with perfecting the layout

text: ![](http://i.stack.imgur.com/UxTS7.png) ![](http://i.stack.imgur.com/HHeEc.png)               \documentclass{article}     \usepackage{amsmath}     \setlength{\parindent}{0pt}     \newcommand{\fac}{n!}                \newcommand\test[3]{\left(\begin{array}{@{\,}c@{\,}} #1 \\ #2 \end{array}\middle|\ \ #3 \right)}     \begin{document}          Dit gedeelte is gewijd aan de wiskundige berekening van de inproducten tussen de vectoren $u_0(E), u_1(E), v(x)$ en $w(p)$. Twee bestaande formules zullen hierbij van cruciaal belang blijken te zijn.\\          De eerste formule zegt dat          \begin{align*}     \sum_{n=0}^{\infty} \frac{(a)_n}{\fac}F_1 \test{-n,b}{a}{y}_1 F_1& \test{-n}{a}{x} t^n\\     &=(1-t)^{b-a}(1-t+yt)^{-b} e^{\frac{xt}{t-1}}F_1 \test{b}{a}{\frac{xyt}{(1-t)(1-t+yt)}},\\     \end{align*}     waarbij $|t| <1.$\\          De tweede formule is de volgende benadering:          \begin{equation*}     \lim_{z \rightarrow \infty} F_1 \test{c}{a}{z} = \lim_{z \rightarrow \infty} \frac{\Gamma(a)}{\Gamma(c)} e^z z^{c-a} \sum_{n=0}^{\infty} \frac{(a-c)_n (1-c)_n}{\fac} z^{-n}     \end{equation*}     \end{document}      * * * Looking at the arrows you can see that the spacing is different. On the second picture the spacing between the letters seems bigger, the spacing between the two lines is also bigger In the equation I didn't manage to get the alignment right. I'm assuming that one line is flushedleft and the other centered. The fraction in the first image is much smaller than in the 2nd one.


title: Help modifying a memoir chapter style

text: I'm very new to TeX and I'm from a graphic design background, so I apologize if I'm missing something very obvious. I want to modify the memoir style `VZ14`. What I would like is: > =====h double line======== Chapter title =====h double line======= so that the top line is a little thicker than the bottom. And I don't want Chapter numbers.               \makeatletter      \newcommand\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}      \setlength\midchapskip{10pt}      \makechapterstyle{VZ14}{         \renewcommand\chapternamenum{}          \renewcommand\printchaptername{}          \renewcommand\chapnamefont{\small\scshape}          \renewcommand\printchapternum{%         \chapnamefont\null\thickhrulefill\quad         \@chapapp\space\thechapter\quad\thickhrulefill}     \renewcommand\printchapternonum{%         \par\thickhrulefill\par\vskip\midchapskip         \hrule\vskip\midchapskip     }     \renewcommand\chaptitlefont{\small\scshape\centering}     \renewcommand\afterchapternum{%     \par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}     \renewcommand\afterchaptertitle{%     \par\vskip\midchapskip\hrule\nobreak\vskip\afterchapskip}     }     \makeatother     \chapterstyle{VZ14}


title: How to increase space between two columns in moderncv

text: I was able to increase width of the column but I want to increase the space between `\cventry` that is date and the contents.


title: How does one stop automatic line spacing increases when typesetting tall math symbols?

text: Often when typesetting mathematics, one wants to use math symbols in line. When these are certain symbols, or more often, decorated symbols, whose height is sufficiently large, the line spacing (that is, the space between the current line and the previous one) is increased in order to compensate for the height of the symbol. A usual example is `$\widetilde{f}$`, for instance. I would like to stop this from happening, even if it leads to possible overlap of symbols between the two lines. Is this possible? Another one that will certainly induce a lineskip increase is `\overset{\alpha}{\to}`. I would also like this not to induce a lineskip increase. If it is relevant, I am using XeLaTeX with unicode-math and the Lucida fonts, but I would very much prefer a general solution, as I encounter this problem with computer modern (and the `$\widetilde{f}$`) as well.


title: How to get a shaded bar in beamer

text: I would like to add a shaded bar at the bottom of a beamer presentation, with my name and the frame number. Eventually I'd like to center the frametitle with a line below to separate from the main part. Look at the image to see what I mean. ![enter image description here](http://i.stack.imgur.com/PWF17.jpg) I can add the background image, but I cannot do the bar at the bottom. I tried to define the footline myself, failed so I tried with an existing outertheme. Here is my code :               \documentclass{beamer}          \setbeamercovered{invisible}     \usefonttheme{serif,professionalfonts}          \definecolor{orangeiut}{RGB}{247,158,4}           \setbeamertemplate{navigation symbols}{}     \pgfdeclareimage[height=96mm,width=128mm]{nombidon}{fond}     \setbeamertemplate{background}{\pgfuseimage{nombidon}}          \setbeamercolor{itemize item}{fg=orangeiut}     \setbeamerfont{itemize item}{size=\large}     \setbeamertemplate{itemize item}{\ding{226}}          \useoutertheme{infolines}          \usepackage[french]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage[T1]{fontenc}     \usepackage{multimedia}     \usepackage{graphicx}     \usepackage{array}     \usepackage{tikz}     \usepackage{manfnt}     \usepackage{pifont}      Anybody knows how to solve that problem ?


title: Issues With Tabular And Left-Side Spacing

text: I'm having an issue where my "Course Work" section, which is tabular, is offset by a space or two - whereas ever other section lines up perfectly. I've read up on the tabular environment but could only find information on adjusting spacing between columns and not before them. This is my code and the output, with the red highlighting the undesired space: ![enter image description here](http://i.stack.imgur.com/goFU5.png)               \section{\textsc{Course Work}}     \begin{tabular}{lllll}      Molecular Biomechanics                & \ \ & Stem Cell Biology      & \ \ & Bioinstrumentation \\       Eukaryotic Molecular Biology          & \ \ & Infectious Diseases    & \ \ & Biochemistry       \\      Graduate Bioinformatics Seminar       & \ \ & Differential Equations & \ \ & Genetics           \\      Undergraduate Research in MCD Biology & \ \ & Computational Biology  & \ \ & Statistics         \\     \end{tabular}      Any ideas on how I can fix this? _I also apologize beforehand for using "blank columns" to adjust column spacing. I know it isn't the proper way to do that, but when my friend initially taught me some basic LaTeX that was how he did it and I just haven't felt the need to change it yet since learning more about the tabular environment._


title: Error: Can't find the format file pdflatex.fmt

text: I have TeX Live installed on my MacBook Pro running `MacOSX 10.8` through `macports`. Recently on trying to compile a LaTeX file through `pdflatex` I got the error               /opt/local/share/texmf-texlive/tex/generic/hyph-utf8/patterns/tex/hyph-fr.tex)     )     ! I can't find file `dehypht-x-2012-05-30.tex'.     <to be read again>                         \relax      l.180   \repeat          (Press Enter to retry, or Control-D to exit)     Please type another input file name:      ! Emergency stop.     <to be read ' instead of a filename.     I can't find the format file `pdflatex.fmt'!      After some googling I figured that maybe `sudo fmtutil-sys --all` might fix that but it ends in the following error:               This is a summary of all `failed' messages:     `pdftex -ini  -jobname=pdftex -progname=pdftex -translate-file=cp227.tcx *pdfetex.ini' failed     `pdftex -ini  -jobname=etex -progname=etex -translate-file=cp227.tcx *etex.ini' failed     `pdftex -ini  -jobname=pdfetex -progname=pdfetex -translate-file=cp227.tcx *pdfetex.ini' failed     `pdftex -ini  -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' failed     `pdftex -ini  -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' failed     `xetex -ini  -jobname=xetex -progname=xetex -etex xetex.ini' failed     `xetex -ini  -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed      Any clues as to what I could do here?               farhat$ pdflatex --version     pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/MacPorts 2013_1)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.5.16; using libpng 1.5.17     Compiled with zlib 1.2.8; using zlib 1.2.8     Compiled with poppler version 0.22.5


title: How to mark a theorem not under its section?

text: Take an example, if a theorem written in section 1, it will be marked Theorem 1.x . In spite of those, can it be marked Theorem 2.x without moved into section 2? It sounds a bit strange, but it is a problem someone will really meet once in a while, such as in using Laeqed to convert a single theorem to an image file. In this case it will be shown as Theorem 0.1 since the information of section is not concluded.


title: caption above figure using knitr

text: This is a question originally asked on stackoverflow, but it seems to receive no attention and answers there. Since it's related to latex, I'm posting it also here hoping to receive some hints. I would like to place the caption above the figure using knitr in texmaker. I know that this question has already been asked, and I understand that the solution suggested so far is to use:               \begin{figure}      \caption{This is a caption above the figure}      <<a-plot, echo=FALSE>>=      plot(1)      @      \end{figure}       But in this way I cannot show the code (given echo=FALSE), while I would like to show the code for R AND the graph plotted with that R codes, with the caption above the graph.


title: Ordering references with bracketed years in biblatex 2.7

text: In `biblatex` version 2.5, bibliographic entries with the `YEAR` field in brackets in the `.bib` source were still sorted in the bibliography as if the field was without brackets. Cf. the example below:               \documentclass{article}     \usepackage{filecontents}     \usepackage[style=authoryear]{biblatex}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1972,         AUTHOR = "John Lennon",         TITLE = "Peace on earth",         YEAR = "1972",         LOCATION = "London",         PUBLISHER = "Music Press"}     @BOOK{lennon1974,         AUTHOR = "John Lennon",         TITLE = "More peace on earth",         YEAR = "[1974]",         LOCATION = "London",         PUBLISHER = "Music Press"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \nocite{lennon1972}\nocite{lennon1974}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/Mogxr.png) This is no longer the case with `biblatex` version 2.7. I don't know what determines their sorting anymore, but it seems like the entries with the `YEAR` field in brackets is always put first in the sorted list under that author. ![enter image description here](http://i.stack.imgur.com/ZryCj.png) What can I do to get the sorting behavior of `biblatex` version 2.5 back?


title: Texmaker gives an error: could not start the command

text: The Texmaker version is 4.0.2. I have installed the TeXWorks a couple of months ago and it works fine. Now I want to try TeXMaker, and it gives               error: could not start the command      ![enter image description here](http://i.stack.imgur.com/W9au1.png) I just checked that `C:/Program Files/Asymptote/asy.exe` and `C:/Program Files/gs/gs9.07/bin/gswin32c.exe` do not exist


title: How can I center a Sweave verbatim chunk?

text: I have a very simple sweave chunk with two lines, like this:               <<results=verbatim>>==     quantile(foo$bar)     @      How can I center this element? I've tried embracing the chunk with `\begin{center}` to no avail.


title: Collapse/expand in document

text: Perhaps this is a dumb question. I write a small `pdf-book` on coding and use there many examples using `listings` package. But the amount of code expands text too much, for every 5 lines of text there is 10-20 lines of listings. I wish there was a way to show code on demand (like spoiler). May be there is some format supported by latex which would allow to do such thing ?


title: MikTeX fails to download the listings package

text: I'd like to use the `listings` page to include code snippets in my master thesis. I used the `\usepackage{listings}` command but it failed with the following error message:               downloading http://piotrkosoft.net/pub/mirrors/CTAN/systems/win32/miktex/tm/packages/listings.tar.bz2...     pdflatex.EXE: Error response from server: 404          ! LaTeX Error: File `listings.sty' not found.      Previously, other packages have been downloaded fine. What am I doing wrong?


title: How can I add every glossary entry to the index?

text: I know, there are similar questions around, but I couldn't find a solution to what I want. E.g. here, all acronyms in the document are set to the index. I think, indexing should be done manually so that every index reference shows just 1 or 2 pages in the document. If the work of a glossary is done, I think this list should also appear in the index. This way, using the index will guide the lector at least to the short glossary explanation. * * * In detail: I am using `imakeidx` and `glossaries`. When I write `\gls{}` somewhere to set an entry in the main glossary, I don't want an index link to this place, but to the page where the glossary entry is written. Therefore the command `\newglossaryentry{glo:AD}{name=Active Directory, description={Active Directory is an...}}` should somehow automatically contain an `\index{name}` resp. `\index{Active Directory}`. When I think, the appearance in the text is important enough, I will add manually `\gls{glo:AD}\index{Active Directory}` and obtain an index entry with two referenced page numbers.


title: How do I draw shapes inside a tikz node?

text: I know how to draw different shapes using tikz, like this:               \documentclass{minimal}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}     \draw (0,0) ellipse (1 and 1.5)           (0,2.5) circle (1)           (2.5,0) circle (1.5);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Yujp4.jpg) However, I would like to put a number of different shapes together inside a node, and I couldn't yet find a simple way to do that. I will make a little figure to include in a large diagram which is already made of several nodes. If this is not possible, or not easy, then how do I include a JPG or EPS file in a node? Thank you!


title: Re-formatting natbib entries?

text: I have a bibtex entry like this:               @inproceedings{key,       title={ Title },       author={ Authors },       booktitle={To Appear in the Proceedings of the ACM Long Conference Name},       conference={{Short Conference Name}},       year={2013}     }      I want to make this appear as follows:               <Number> <Short conference name 2013> Publication reference..............                                           written here................................      order by the year (in decending order). Is there anyway I can do this?


title: How do I typeset the ground symbol ⏚ in LaTeX?

text: How do I type the ground symbol ⏚ in LaTeX? I am not trying to create a ground node in a circuit diagram (which is answered in a different question). Instead, I just want to be able to type the symbol ⏚ in math mode.


title: Make a TOC but hide it from the document

text: For my masters thesis I would like to have a TOC list but hide the chapter, section and subsection from the PDF document. Is there any way to do that. In other words. `\subsection*{subsection}` hides it from TOC, is there any reverse method as to hide from document body but show in TOC ? Best, Abhi


title: Manual linebreak with justification but without empty line afterwards

text: What do I write at the end of a paragraph if my text is a couple letters short of being flush from left to right and I want the last line stretched slightly so that no empty space is left that the end? If I do the obvious,               \documentclass{article}     \begin{document}          X Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah     blah blah  blah  blah blah Blah blah blah blah blah blah blah blah.           Y Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah     blah blah blah blah blah Blah blah blah blah.          A Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah     blah blah  blah  blah blah Blah blah blah blah blah blah blah blah.      \linebreak     % Unwanted empty line appears here          B Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah     blah blah blah blah blah Blah blah blah blah.     \end{document}      then an extra empty line appears after that and separate the paragraphs. How do I prevent this empty line from appearing? To clarify: I would like to have two paragraphs, not one. Indeed getting rid of the paragraph break would remove the empty line between paragraphs when using manual line-break. But that would make A and B one paragraph instead of two. See standard formatting in paragraphs X and Y. Is there a way which does not require use of braces? Using braces might annoy those with whom I share article who want to revert to original formatting. Deleting all manual code of one type can be automated; but removing braces must be done manually since they are used in many places. EDIT: Have any attempts to turn the command into one line added after the paragraph desired to be formatted or to automate this for whole document where last line has whitespace shorter than a certain length, like was discussed in Avoid just nearly filled last lines, been successful?


title: Alignment of Margin caption with floatrow and caption

text: I want my captions in marginpar to be left aligned. I am using `raggedright` option in `caption` package along with `floatrow` package. The captions are left aligned only for long captions. ![enter image description here](http://i.stack.imgur.com/cZ812.png) **MWE**               \documentclass{report}          \usepackage{geometry,caption,floatrow}          \geometry{showframe=true, includemp,marginparwidth=5cm, marginparsep=1em}     %     \newlength{\figWidthForMarginCap}%     \setlength{\figWidthForMarginCap}{\textwidth}%     \addtolength{\figWidthForMarginCap}{-1em}%     \addtolength{\figWidthForMarginCap}{\marginparsep}%     %     \captionsetup{       format=plain,       margin=0em,       labelsep=newline,       justification=raggedright     }     %     \begin{document}       \thisfloatsetup{%         capposition=beside,         capbesidewidth=\marginparwidth,         capbesideposition={bottom,right},         floatwidth=\figWidthForMarginCap       }       \begin{figure}         \centering         \rule{3cm}{2cm}         \caption{Small Caption}         %\caption{This is a needlessly long caption to which runs at least two lines.}       \end{figure}     \end{document}


title: Converting FSU LaTeX template to LyX

text: I wrote my dissertation thesis in LyX and FSU has a LaTeX template for theses. I was wondering if someone could help me convert the LaTeX template to LyX so that I could compile everything in my preferred program. The FSU LaTeX template can be downloaded here. Thanks in advance!


title: Avoiding "minus sign" dash in listings commentstyle

text: Is there a general way to get `listings` package to   * typeset a hyphen as a minus character in the rest of the code (the default behavior), but   * typeset a hyphen as a _true hyphen_ if it occurs in comments (using roman typeface)? Here is relatively minimal example demonstrating my concern. Note the minus sign character in the second comment.               \documentclass{article}     \usepackage{listings}     \lstset{language=C, commentstyle=\rmfamily, columns=flexible}          \begin{document}     \noindent     $x = a - b$  // perform standard sanity-check     \begin{lstlisting}     x = a - b // perform listings sanity-check     \end{lstlisting}     \end{document}      ![enter image description here](http://i.stack.imgur.com/6rpDd.png) Techniques that do not seem to suffice:   1. using `literate` for replacements. As best I can tell, those affect both `basicstyle` and `commentstyle`, so they would not differentiate as desired.   2. using `escapechar` to render comment differently. If at all possible, I would like a general solution that does not require any change to the original program source code (presuming use of `\lstinputlisting`). **Revision** (in response to Marco's answer below). It would be ideal if it could properly handle any form of legal comment without needing to edit source code, for example:               \begin{lstlisting}     x = a - b // perform $5 worth of listings sanity-check [ideally]     \end{lstlisting}      Note: my question is related to past question about hyphens and minus sign however in my case, I like the use of the minus sign in the actual code, just not in the comment.


title: How to make sure images & content are in the right order?

text: I have several big figures to insert to the article, however, the `Content- Part-2` jumps to the front of figures (`Figure-1` & `Figure-2` in code), where is at the end of `Content-Part-1`. Code shown below:               \section{Content-Part-1}       ~Some content~          \begin{figure}[htbp]       \centering       \includegraphics[bb=0 0 769 607, scale=0.45]{figure/fig01.png}       \caption{Figure-1 description}     \end{figure}          \begin{figure}[htbp]       \centering       \includegraphics[bb=0 0 770 569, scale=0.45]{figure/fig02.png}       \caption{Figure-2 description}     \end{figure}          \section{Content-Part-2}       ~Some content~      Output:               Content-Part-1     Content-Part-2     Figure-1     Figure-2      The desired one like:               Content-Part-1     Figure-1     Figure-2     Content-Part-2      How can I make them in right order (just make the content after figures, not with `\newpage`)? * * * **EDIT** : I tried use `h`, `h!`, etc, but still not work, nothing changed. :( Btw, I put a minimal working example HERE, as there're several images. * * * ### MWE:               \documentclass{article}     \usepackage{CJKutf8}          % Package & settings for graphic     \usepackage[pdftex]{graphicx}     \graphicspath{./figure/}     \DeclareGraphicsExtensions{.png,.jpg,.jpeg,.pdf}          \title{Title}     \author{Author names}          \begin{document}     \begin{CJK}{UTF8}{gbsn}       \maketitle       \bibliographystyle{unsrtnat}       \setcitestyle{super, square, aysep={}, yysep={;}}            \begin{abstract}         ~abstract content~       \end{abstract}            \newpage       \section{Introduction}         通常，为了能够使用为不同业务流程设计的组件，往往会在已有的模块基础上进一步构建成大型应用。而使用面向服务的方法不仅能够规范交互性，而且在事务处理过程中提供了更大的灵活性。因此，一个面向服务的架构必须把重心放在如何描述和组织服务上，以支持动态性、自动查找和使用性。如果服务变得越来越复杂，那么基本的“请求－响应”机制就会变得难以运用了。一些中期甚至长期的服务需要一个合适的功能，以实现分别为用户和响应的服务（或者两个服务）之间建立一个异步通信。而Web的消息通知服务正满足以上这些需求。Web服务是自包含的、模块化的服务应用，它可以通过网络描述、发布、定位，以及调用。从简单的“请求－响应”处理到完整的业务流程的交互，Web服务均采用封装的事务功能。              我们提出的服务架构所采用的新型LBS基础核心服务是基于Web服务构建的，从而克服了平台依赖性、系统封闭性，以及分布式计算环境等带来的限制。            \section{A Section}         开发的客户端经过在有线和无线的环境下测试。客户端平台为PDA（Microsoft WindowsCE，iPAQ5550）和WIPI手机（WIPI，SamSung X9300，Arm9，4MB）。            \begin{figure}[htbp]         \centering         \includegraphics[bb=0 0 750 500, scale=0.45]{figure/fig01.png}         \caption{figure 01}       \end{figure}            \begin{figure}[htbp]         \centering         \includegraphics[bb=0 0 750 500, scale=0.45]{figure/fig02.png}         \caption{figure 02}       \end{figure}            \begin{figure}[htbp]         \centering         \includegraphics[bb=0 0 750 500, scale=0.45]{figure/fig03.png}         \caption{figure 03}       \end{figure}            \section{Conclusion}         本论文中提出的LBS基本核心Web服务克服了平台的依赖性，同时提高了分布式计算性能。该基本核心服务不依赖服务器平台，不会因为服务器平台的不同而需重新架构。并且由于采用Web服务系统架构，客户端的开发并不会受限于编程语言。          \end{CJK}     \end{document}


title: Import files with pgfplotstable and split tables across multiple pages

text: I am using `pgfplotstable` to import files with many rows and columns with which to create custom tables. Some tables are quite long, covering many pages. Is there a way to automatically assign the number of rows to display on a page? I could not find anything in the documentation. My first attempts are included in the MWE which simply repeats code for each page required. There must be a better, more efficient way. Perhaps a Do While or For... syntax exists?               \documentclass{article}     \usepackage{pgfplotstable}      \usepackage{booktabs}      \usepackage{filecontents}          \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     \end{filecontents}          {\large Table 1}          \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},     skip rows between index={5}{83}, % {43}{83}     % requires booktabs to place horiz rules     every head row/.style={before row=\toprule, after row=\midrule},      every last row/.style={after row=\bottomrule}     ]{testdata.dat}          \newpage         {\large Table 1 (cont.)}          \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},     skip rows between index={0}{5}, % {0}{43}     % skip rows between index={10}{83},     every head row/.style={before row=\toprule, after row=\midrule},      every last row/.style={after row=\bottomrule}     ]{testdata.dat}     \end{document}


title: Can \items be made indented all the way down?

text: Can `\item`s be made indented all the way down? Using the standard `itemize` environmnet, and a `\hspace` the first line gets indented. However, if the bullet point is on more than one line, it looks a bit strange to me because the rest the other lines are not indented:               \begin{itemize}     \large{\item \hspace{0.3cm} Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text}\vspace{0.4cm}     \end{itemize}      ![enter image description here](http://i.stack.imgur.com/OSH4l.png) Is there a way to make the "of" and "field" vertically aligned with "It" in my example?


title: Character - changes to { in verbatim environment

text: I have witten html/jsf code and some comments in Latex verbatim environment:               \begin{verbatim}     Predloga dokumenta:     <f:view>     <!– korenski element-->          <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>        <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>      <!– deklaracija knjižnic-->      <html>       <head>       ...       </head>      <body>       <h:form>        <%-- (Form components) --%>        <!– JSF obrazec-->        </h:form>      </body>      </html>      </f:view>      \end{verbatim}      But in output(PDF and DVI files) I get:               Predloga dokumenta:     <f:view>     <!{ korenski element-->          <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>        <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>      <!{ deklaracija knjižnic-->      <html>       <head>       ...       </head>      <body>       <h:form>        <%-- (Form components) --%>        <!{ JSF obrazec-->        </h:form>      </body>      </html>      </f:view>       What have I messed up? I thought that everything in verbatim environment should stay same also in output file.


title: No borders on left/right side of tikz nodes

text: I want to draw something like the following (photoshop'd) rendering: ![photoshop'd](http://i.stack.imgur.com/HNQ0g.png)   This image consists of three `\node`s, each using a different border. The whole thing is pinned on a `chain`, because in my actual situation I am creating something like the syntax diagram in the TikZ tutorial (p60). Right now, I have a MWE that renders borders between the L, C and R `\node`s as well, but I want those to disappear without a change to the 'outside' borders. My actual code:   ![actual](http://i.stack.imgur.com/30MRd.png)               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{chains,scopes,shapes.misc}          \begin{document}          \begin{tikzpicture}[start chain,         node distance=5mm,         every node/.style={on chain},         connect/.style={join=by ->},         point/.style={coordinate},         l/.style={draw, fill=cyan!50, rounded rectangle, rounded rectangle right arc=0},         c/.style={draw, fill=green!50},         r/.style={draw, fill=orange!50, rounded rectangle, rounded rectangle left arc=0},         cozy/.style={node distance=-\pgflinewidth}]     \node[point] (p1) {};     \node [l, connect] (l) {L};     {[cozy]     \node [c] (c) {C};     \node [r] (r) {R};     }     \node[point, connect] (p2) {};     \end{tikzpicture}     \end{document}      ## Custom Borders (revised) I have followed this example, @Harish Kumar's answer, and this answer. I tried drawing the borders manually, using slightly different approaches for each section of my shape. All of them have their own drawbacks:   * _applied in L:_ leaving the `\node`'s `line width` at the default (`\pgflinewidth`), `draw=none` will cause the `\node` to contain surrounding space of width `0.5*\pgflinewidth`. In order to draw a border within the `\node`'s dimensions, the border must not grow beyond this space. Unfortunately, part of the the border's inside is drawn behind the filler, leaving it looking too slim. Additionally, the eastern anchor points now look as if they're off by a bit.   * _applied in C:_ setting the `\node`'s `line width=0` at least makes sure all the anchor points (esp. eastern & western) in the right place. However, this way, the entire border is drawn behind the filler.   * _applied in R:_ setting the `\node`'s `line width=0`, and drawing the border _outside_ of the filler. This causes the border to be outside the `\node`'s dimensions, making it overlap with connecting objects. ![custom borders](http://i.stack.imgur.com/J9ERG.png)               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{calc,chains,scopes,shapes.misc,backgrounds}     \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfdeclarelayer{foreforeground}     \pgfsetlayers{background,main,foreground,foreforeground}          \begin{document}          \begin{tikzpicture}[start chain,         node distance=5mm,         every node/.style={on chain},         connect/.style={join=by ->},         point/.style={coordinate},         l/.style={line width=\pgflinewidth, fill=cyan!50, rounded rectangle, rounded rectangle right arc=0, append after command={% <= for the border             \pgfextra{\begin{pgfinterruptpath}\begin{pgfonlayer}{foreground}                 \draw[] let \p1=($(\tikzlastnode.north east)+(-0.5\pgflinewidth,-0.5\pgflinewidth)$),                     \p2=($(\tikzlastnode.north west)+(0,-0.5\pgflinewidth)$),                     \p3=($(\tikzlastnode.south west)+(0,0.5\pgflinewidth)$),                     \p4=($(\tikzlastnode.south east)+(-0.5\pgflinewidth,0.5\pgflinewidth)$),                     \n1={0.5*(\y2-\y3)} in                     (\p1) -- (\p2) arc(90:270:\n1) -- (\p4);             \end{pgfonlayer}\end{pgfinterruptpath}}         }},         c/.style={line width=0, fill=green!50, append after command={% <= for the border             \pgfextra{%                                  \begin{pgfinterruptpath}\begin{pgfonlayer}{foreground}                     \draw[] let \p1=($(\tikzlastnode.north east)+(0,-0.5\pgflinewidth)$),                     \p2=($(\tikzlastnode.north west)+(0,-0.5\pgflinewidth)$),                     \p3=($(\tikzlastnode.south west)+(0,0.5\pgflinewidth)$),                     \p4=($(\tikzlastnode.south east)+(0,0.5\pgflinewidth)$) in                     (\p1) -- (\p2) (\p3) -- (\p4);                 \end{pgfonlayer}\end{pgfinterruptpath}             }         }},         r/.style={line width=0, fill=orange!50, rounded rectangle, rounded rectangle left arc=0, append after command={% <= for the border             \pgfextra{%                                  \begin{pgfinterruptpath}                 \draw[] let \p1=($(\tikzlastnode.north east)+(0,0.5\pgflinewidth)$),                     \p2=($(\tikzlastnode.north west)+(0,0.5\pgflinewidth)$),                     \p3=($(\tikzlastnode.south west)+(0,-0.5\pgflinewidth)$),                     \p4=($(\tikzlastnode.south east)+(0,-0.5\pgflinewidth)$),                     \n1={0.5*(\y1-\y4)} in                     (\p3) -- (\p4) arc(-90:90:\n1) -- (\p2);                 \end{pgfinterruptpath}             }         }}     ]     \node[point] (p1) {};     \node [l, connect] (l) {L};     {[node distance=-0.5\pgflinewidth]     \node [c] (c) {C};}     {[node distance=0]     \node [r] (r) {R};}     \node[point, connect] (p2) {};          \node[font=\tiny, cyan, below=of l] (lbl l-se) {l.se};     \draw[red,->] (lbl l-se) -- (l.south east);          \begin{pgfonlayer}{foreforeground}%apparently, using layer 'foreground' in 'append after command' brings the entire node to the front, which we don't want!     \node[font=\tiny, green, below=of c, yshift=2mm] (lbl c-ne) {c.ne};     \draw[red,->] (lbl c-ne) -- (c.north east);     \end{pgfonlayer}          \node[font=\tiny, orange, below=of r] (lbl r-sw) {r.sw};     \draw[red,->] (lbl r-sw) -- (r.south west);     \end{tikzpicture}     \end{document}      **How do I make sure my custom borders are within the`\node`'s borders, and drawn _on top_ of `\node`'s filler color?** I have attempted to use `\begin{pgfonlayer}{foreground}` to bring borders to the foreground, but all that seems to do in `append after command` is bring the entire `\node` to the foreground, with the border still behind the filler.


title: Managing notation in long document

text: I'm writing a long document with a lot of math in it. While I write, I would like to be able to keep track of whether I've used a certain symbol before or not. I tried making a table, but I gave up at 2 pages. Is there a better way to do this in latex? Edit: I'll try the nomencl and glossary packages like you guys suggest. The example output in the documentation looks nice. Thanks for the replies.


title: Different line spacing in text and footnotes when using \usepackage[para]{footmisc}

text: Hope this hasn't already been addressed: I would like my linespacing in the footnotes to be small whilst having double or more linespace in the text. I've been using `\usepackage[doublespacing]{setspace}` and `\usepackage[para]{footmisc}` in order to have as many as possible footnotes on the same line. The problem is, that `\usepackage[doublespacing]{setspace}` should only change the text body and not the footnotes, but that is not the case in my file. This link says "Footmisc knows about this [my problem], and preserves the change. However, you must load setspace before footmisc." Maybe I don't understand what 'load' means, but I can't seem to make it work, even if I make a new file at compile it in the suggested order. Someone have any suggestions as to what the problem might be, or to try different packages? Thanks!


title: Positioning images in titlehead

text: I'm trying to position four images inside the corners of the `\titlehead` environment. My approach didn't work.               \titlehead{         \centering         \includegraphics[height=20mm,keepaspectratio]{upper_left}         \hfill         \includegraphics[height=20mm,keepaspectratio]{upper_right}         \vfill         \includegraphics[height=20mm,keepaspectratio]{lower_left}         \hfill         \includegraphics[height=20mm,keepaspectratio]{lower_right}     } %end titlehead


title: Beamer and indentation with alltt

text: The following beamer code               \begin{frame}[fragile]     \frametitle{PROC TEMPLATE for a fancy graph (part 2)}     \begin{alltt}           rowaxes;             rowaxis /label = 'Infant Mortality (\%)'              griddisplay = on;             rowaxis /label = '' griddisplay = on;           endrowaxes;         layout overlay;            scatterplot x = unemployment              y = infantmortality;           loessplot x = unemployment             y = infantmortality/nomarkers;           loessplot x = unemployment                y = infantmortality/smooth = 1;           ellipse  x = unemployment y = infantmortality                  /type = predicted;          endlayout;     \end{alltt}     \end{frame}      Indents as shown until the line starting "ellipse" which is set flush left. Adding a paragraph marker after "unemployment" does not help. Any ideas?


title: How do I set units in pgfplots without square brackets?

text: This MWE:               \documentclass{article}     % translate with >> pdflatex -shell-escape <file>          % This file is an extract of the PGFPLOTS manual, copyright by Christian Feuersaenger.     %      % Feel free to use it as long as you cite the pgfplots manual properly.     %     % See     %   http://pgfplots.sourceforge.net/pgfplots.pdf     % for the complete manual.     %     % Any required input files (for <plot table> or <plot file> or the table package) can be downloaded     % at     % http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/     % and     % http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/          \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \pagestyle{empty}          \usepgfplotslibrary{units}          \begin{document}     \begin{tikzpicture}       \begin{axis}[change x base,         x SI prefix=kilo,x unit=m,         y SI prefix=milli,y unit=N,         xlabel=Distance,ylabel=Force]         \addplot coordinates {             (1000,1)             (2000,1.1)             (3000,1.2)             (4000,1.3)         };       \end{axis}     \end{tikzpicture}     \end{document}      results in units set in square brackets. This conflicts to the SI-brochure 8 and the German standard DIN 1313. How can I switch that off or change it to "/ _unit_ " or "+in+ _unit_ "? I am not able to report that on sourceforge which is a pity as this wrong unit formatting is getting more and more popular. If Mr. Feuersänger is reading here on TEX.SX, I am having this feature requests regarding the units:   * never use brackets at all, but slash or "in" (Edit: for slash notation round brackets for divided units could be useful as mentioned in the comments. E.g. `$a$/(m/s^2)`)   * possibility to set unit after the symbol (axis label) or between the last two tick labels (or in place of the second last ticks label if to less space)   * allow `siunitx`-syntax   * automatically set angle units (`°`, `'` and `''`) and time units (`^h`, `^min` and `^s`) (not to be confused with time period units (`a`, `h`, `min` and `s`)) directly next to each tick label   * set powers of ten or units like `%`, `‰` or `ppm` between the last two tick labels


title: How to prevent aligned equations to shift when adding a non-aligned line break?

text: I have an equation in the aligned environment to align the equal signs together. However, the last equation is too long, and I want to break it up. When I insert a linebreak, all the equations above the last one shift to the right. The code:               \begin{equation}     \begin{aligned}     \log\left(p\left(s|\alpha\right)\right) & = \sum\limits_{i=1}^O\left(\log\left(\frac{1}{\prod\limits_{k=1}^K\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)}\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(-\log\left(\prod\limits_{k=1}^K\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(\sum\limits_{k=1}^K\left(-\log\left(\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right)\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(\sum\limits_{k=1}^K\left(-\log\left(\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right)\right) + \log\left(\Gamma\left(\alpha_0\right)\right) -\log\left(\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right)     \end{aligned}     \end{equation}      What I want               \begin{equation}     \begin{aligned}     \log\left(p\left(s|\alpha\right)\right) & = \sum\limits_{i=1}^O\left(\log\left(\frac{1}{\prod\limits_{k=1}^K\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)}\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(-\log\left(\prod\limits_{k=1}^K\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(\sum\limits_{k=1}^K\left(-\log\left(\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right)\right) + \log\left(\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)}\right) + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right) \\     &= \sum\limits_{i=1}^O\left(\sum\limits_{k=1}^K\left(-\log\left(\Gamma\left(\hat{\mathcal{S}}_k^i+1\right)\right)\right) + \log\left(\Gamma\left(\alpha_0\right)\right) -\log\left(\Gamma\left(\sum\limits_{k=1}^K\left(\hat{\mathcal{S}}_k^i+a_k\right)\right)\right) \\     \qquad\qquad + \log\left(\prod\limits_{k=1}^K \frac{\Gamma\left(\hat{\mathcal{S}}_k^i+\alpha_k\right)}{\Gamma\left(\alpha_k\right)}\right)\right)     \end{aligned}     \end{equation}      I don't want to use &+ because then it gets aligned with the equal signs, and I want it indented a bit further.


title: \protect on \rule in \caption does not work

text: I would like to put a `\rule`command inside a caption. Classical solution is supposed to be `\protect{}` but that's not working. I still get `Error: Argument of \@caption has an extra }.` Why? Here is a minimum example. (using MiKTeX 2.9 on XP)               \documentclass[]{revtex4-1}     \begin{document}         \begin{figure}             \caption{\protect{ \rule{.6em}{.2ex} }}         \end{figure}     \end{document}


title: Make entire document heavier using pdfrender

text: This is a follow up question to this answer of this question. The code given in the answer above seems to break for any extensible horizontal bars such as the vinculum, square root bar, and `\overline{...}`. In addition, footnotes are also not made heavier. What do I need to do this make pdfrender work over every part of the document? Example:               \documentclass[12pt]{article}     \usepackage{amsmath,amsthm, amssymb}     \usepackage{pdfrender,xcolor}     \begin{document}          \pdfrender{StrokeColor=black,TextRenderingMode=2,LineWidth=1pt}          Quadratic Formula.     \begin{equation*}       x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}     \end{equation*}          Law of Quadratic Reciprocity.     \begin{equation*}       \Bigl(\frac{p}{q}\Bigr)       \Bigl(\frac{q}{p}\Bigr)       =        (-1)^{\frac{p-1}{2} \frac{q-1}{2}}     \end{equation*}          Complex norm.     \begin{equation*}     a^2 + b^2 = (a+bi) (\overline{a+bi})     \end{equation*}     \end{document}      which gives the output: ![enter image description here](http://i.stack.imgur.com/TQdIP.png)


title: Reliability block diagram

text: I've been trying to figure out how to draw a reliability block diagram and I've run into several good examples on how to draw diagrams. Here are a bunch: http://www.texample.net/tikz/examples/tag/block-diagrams/ Unfortunately, I am very new to LaTex and I have problems trying to understand which command does what. One example that I've specifically looked at is this one: http://www.texample.net/tikz/examples/nav1d/. I would like to add parallell blocks at some places to create a diagram like the one below but I have no idea how. Any help is greatly appreciated. ![enter image description here](http://i.stack.imgur.com/oaFTz.png)


title: hyperref causes problem with doc.sty

text: Try the following code. Without `hyperref` everything is fine and there’s the right entry in the index. With `hyperref` this entry disappears. (The codeline entries which are not shown here ar not touched by using `hyperref`)               \documentclass{ltxdoc}          %\usepackage{hyperref}     \usepackage{doc}          \EnableCrossrefs     \CodelineIndex          \begin{document}     Test\DescribeMacro{\name}          \PrintIndex     \end{document}      Is there a way to use both packages?


title: Class/package for German documentation

text: I’m writing the `musuos` class and I’m writing the documentation with `ltxdoc.cls` and `doc.sty` which seems to work. But the documentation is in German so it’s not very nice to get `(environment)` in the index instead of `(Umgebung)`. ![index output](http://i.stack.imgur.com/invsi.jpg) Is there a package that allows to change such entries? BTW: Is there a better class/package to write a manual, or even one whose output looks better (like the one of the `biblatex` documentation)?


title: Change beamer notes list type for in-frame notes

text: When you use the `\note{}` command within a frame, the notes are appended to a notes frame after the current frame. If you use `\note[item]{}`, each note is an item in an enumerated list. Can this be changed to an itemized list with the same in-frame note command, i.e. so that `\note[item]{}` appends an itemized list rather than enumerated?


title: minted creating garbage output on PDF file

text: Good Day, I'm using texlive 2013 which I updated today 20JULY13. When I attempt to compile my LaTeX file using only the most basic minted statements               \begin{minted}{c}     Test     \end{minted}      results in my compiled PDF file to contain:               \PY{err}{\PYZbs{}}\PY{n}{makeatletter}     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{reset}\PY{     \PY{err}{\PYZbs{}}\PY{n}{let}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{ul}\PY     \PY{err}{\PYZbs{}}\PY{n}{let}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{bc}\PY     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{tok}\PY{er     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{toks}\PY{e     \PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{tok}\PY{p}{\PYZob{}}\PY{err}{\PYZsh     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{k}{do}\PY{err     \PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{@}\PY{n}{it}\PY{p}{\PYZob{}}\PY{err}{\PYZbs{     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PY}\PY{err}{\PYZsh{}}\PY{l+m+mi     \PY{err}{\PYZbs{}}\PY{n}{expandafter}\PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\     \PY{err}{\PYZbs{}}\PY{n}{expandafter}\PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\     \PY{err}{\PYZbs{}}\PY{n}{expandafter}\PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\     \PY{err}{\PYZbs{}}\PY{n}{expandafter}\PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\     \PY{err}{\PYZbs{}}\PY{n}{expandafter}\PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PYZti}\PY{p}{\PYZob{}}\PY{err}{     \PY{o}{\PYZpc{}} \PY{k}{for} \PY{n}{compatibility} \PY{n}{with} \PY{n}{earlier} \PY{n     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PYZat}\PY{p}{\PYZob{}}\PY{err}{     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PYZlb}\PY{p}{\PYZob{}[\PYZcb{}}     \PY{err}{\PYZbs{}}\PY{n}{def}\PY{err}{\PYZbs{}}\PY{n}{PYZrb}\PY{p}{\PYZob{}]\PYZcb{}}     \PY{err}{\PYZbs{}}\PY{n}{makeatother}      Anyone else experienced this? If so did you find a conflicting package or a logical reason why this is suddenly happening? Thank You.


title: eforms puts out "0 0 0"

text: I've just intalled AcroTex, but it doesn't work correctly.               \documentclass[12pt]{letter}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage{hyperref}     \usepackage[pdftex]{eforms}     \begin{document}     \begin{Form}          \begin{tabular}{rl}         \checkBox{a}{12pt}{12pt}{a} & hello world! \\     \end{tabular}          \end{Form}     \end{document}      Running PDFLaTex puts out a PDF with the following content:               0 0 0 hello world!      texlive puts out this error:               ! Undefined control sequence.     \@eqBC ...@empty \else \HyColor@XZeroOneThreeFour     {#1}{\eq@BC }{}{}\edef \eq...      Is my installation corrupt? I'm running TeXLive 2007 that came with the fedora-repositories. I put the AcroTex files in the `/usr/share/texmf/tex/latex/acrotex` and ran:               sudo latex /usr/share/texmf/tex/latex/acrotex/acrotex.ins     sudo texhash      I have no clue what is wrong here. Any ideas are highly appreciated!


title: pict2e doesn't draw filled circles at specified point

text: When compiling the pict2e code below I don't get the expected output of a red circle with a "white hole" (doughnut shaped figure). Instead it places one of the circles slightly off the specified center point.               \begin{picture}(80,80)       {\color{xred}\put(40,40){\circle*{80}}}       {\color{white}\put(40,40){\circle*{40}}}       \put(40,40){\circle{80}}       \put(40,40){\circle{40}}     \end{picture}      Output: ![Output](http://i.imgur.com/FJvDvjw.png) Can anyone explain this seemingly strange behavior?


title: What is $TEXMFCNF for?

text: I just got told, in the comments to my answer to the question How to install "vanilla" TeXLive on Debian or Ubuntu?, that I shouldn't set the environment variable `$TEXMFCNF` if I install TeXLive myself (rather than letting my distribution do it for me). I checked, and on one machine where I've installed TL2010 on top of an existing Ubuntu distribution then I hadn't set `$TEXMFCNF` and everything had been working just fine. On another machine, I had set `$TEXMFCNF` (and everything had been working just fine as well). The difference between the two machines is that on the first I have admin rights and so installed TL2010 in to `/usr/local/` whereas on the other I don't and so installed TL2010 in to `$HOME/local/`. When I set and unset `$TEXMFCNF` on the second machine then I get different answers for `kpsewhich texmf.cnf`, _but_ the two answers are in the same basic place. So it seems that `kpsewhich` can figure out where `texmf.cnf` is based on ... what? I'm not sure what information `kpathsea` has to deduce the location of `texmf.cnf`. With $TEXMFCNF set to `$HOME/local/texlive/2010/texmf/web2c/` then `kpsewhich texmf.cnf` reports `$HOME/local/texlive/2010/texmf/web2c/texmf.cnf`. With it unset, then `kpsewhich` reports `/somewhere/else/texlive/2010/texmf.cnf`, **but** `$HOME/local` is a symlink to `/somewhere/else` so these are in the same installation of TL2010. `kpsewhich` itself is in `$HOME/local/bin` but the file there is actually a symlink to somewhere in the TL texmf-tree. Lastly, I have no idea why I started setting `$TEXMFCNF`. The reason why is lost in the mists of time. I suspect that it is because once long ago I was happy with the TeX installation provided for me except that I didn't like the value of the home texmf tree, so I had my own `texmf.cnf` which overrode this. So, to the question(s):   1. (the main one): Is setting `$TEXMFCNF` good, bad, or ugly?   2. (the what's-going-on one): How does `kpathsea` even start knowing where to look? As in, it has to find a configuration file somewhere telling it where to find all the other stuff, so how does it deduce where to find it? (To focus thoughts on that last one, I can well believe that `kpsewhich` can deduce something from its location; so if I _copied_ `kpsewhich` in to `$HOME/local/bin` rather than symlinked then would that break everything?)


title: spacing with wedge and bigwedge with bigger index

text: I have this math code:               \[     \bigwedge_{i,j \in \underline{n},\atop { i \neq j,\atop k,l \in \underline{|\sigma|}}} x_{i,k} \neq x_{j,l} \wedge     \bigwedge_{i \in \underline{n},\atop k \in \underline{|\sigma|-1}} x_{i,k+1} = x_{i,k} + 1 \wedge     \bigwedge_{i \in \underline{n},\atop k \in \underline{|\sigma|}} Q_{\sigma_k} x_{i,k}     \]      The vertical space around `\bigwedge` is quite huge and it looks a bit odd. I would like to have the "content" of the `\bigwedge` (e.g. `x_{i,k}\neq...`) much more close to it, then maybe the `\wedge` slightly more separated from the content and more close to the next `\bigwedge`. How can I do that?


title: Is italic + less-space formatting of \subparagraph typographically sensible?

text: As discussed in Difference between \paragraph and \subparagraph in scrreprt?, my formatting does not make a difference between `\paragraph`, as the proposed workaround does have no effect, if the option `halfparskip` is active (and I want to use it). (example see below) My **questions** :   What do you think about changing the `\subparagraph`so that it's title is not fat, but just italic?   And what about removing the skip above a `\subparagraph`, so that it remains visually attached to the text block before? _I tried to show how both options could look like in a very quick and dirty example (see below), as I don't know how to redefine the`\subparagraph` properly._               \documentclass[11pt, a4paper,  halfparskip     ]{scrreprt}          \usepackage[ngerman]{babel}          \newcommand{\textblock}{Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.      }          \begin{document}          \paragraph{Paragraph1} \textblock          \subparagraph{Subparagraph1} \textblock          \textblock          \subsubsection*{now with fixed subparagraph:}          \hspace{\parindent}\hspace{\parindent}      \makeatletter      \newlength{\myindent}      \setlength{\myindent}{\parindent}      \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\myindent}%        {3.25ex \@plus1ex \@minus .2ex}%        {-1em}%        {\raggedsection\normalfont\sectfont\nobreak\size@subparagraph}%      }           \paragraph{Par2}    \textblock          \subparagraph{SubPar2}  \textblock          \subsubsection*{What would you think about that?}          \paragraph{Par3}     \textblock     \\\emph{SubPar3} \hspace{1mm} \textblock          \subsubsection*{\dots or that?}          \paragraph{Par4}     \textblock\smallskip     \\\emph{SubPar4} \hspace{1mm} \textblock               \end{document}


title: biblatex: No pagebreak in bibliography entry

text: Is it possible to tell `biblatex` to never split a bibliography entry across two pages? Ideally this should work for both `\cite` and `\fullcite`.


title: How to redefine the \emph command in Beamer?

text: I am using the Beamer class and would like to redefine `\emph` to use `\bfseries` instead of `\itshape`. I have tried the following command:               \renewcommand<>{\emph}[1]{{\only#2{\bfseries}#1}}      but I get the following error               ! LaTeX Error: Command \beamerx@\emph already defined.               Or name \end... illegal, see p.192 of the manual.      I cannot understand: Why is it a problem that `\emph` already is defined when I am using `\ _re_ newcommand`?


title: How to make glossaries and nomenclature work together?

text: I am using `nomencl` along with `glossaries`. But I am getting either one of them in the output. I want to use `glossaries` for acronyms and `nomencl` for mathematical equations. How can we do that if we want to both of them in our document output? I also want put them in table of contents at a time. I am using               pdflatex document makglossaries document pdflatex document      to compile the document. The other way using latexmk is not working for me. I wonder why this happens. I am using the MiKTeX distribution and ActivePerl on Windows XP/Vista.


title: Multi-line footer for single page

text: I need to add a copyright notice to my paper, and do not want it to break the layout, so I want to place it into the footer/header area of the initial page. Text may be multi-line. It should be displayed on the first page _only_.


title: xparse regression? Unable to create environment with single optional argument

text: I've created a custom environment for displaying code examples in a `beamer` presentation (for an introductory LaTeX couse no less), but compiling my "old" code suddenly results in an error. According to the old log file the version is `xparse 2011/10/09 v2900`. The definition is (slightly cleaned for brevity):               \NewDocumentEnvironment{codeblock}{o}{         \IfNoValueTF{#1}             {\begin{exampleblock}{Code}}             {\begin{exampleblock}{Code: #1}}}     {\end{exampleblock}}      and the error is               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! LaTeX error: "xparse/expandable-ending-optional"     !      ! Argument specification for expandable command ends with optional argument.     !      ! See the LaTeX3 documentation for further information.     !      ! For immediate help type H <return>.     !...............................................        when compiled using `xparse 2012/08/29 v4160` on my up-to-date TeX Live 2012 installation. First step in debugging this problem is to create a MWE, but this results in a quite separate error. The code               \documentclass{article}     \usepackage{xparse}          \NewDocumentEnvironment{xptest}{o}{\begin{center}         \IfNoValueTF{#1}{\textbf{Test}}{\textbf{Test: #1}}\par}       {\end{center}}          \begin{document}     \begin{xptest}[Arg]       World     \end{xptest}          \begin{xptest}       World     \end{xptest}     \end{document}      does not yield the expected result (i.e. two pieces of centered text with a bold first line) but this: ![Unexpected result](http://i.stack.imgur.com/VbtkR.png) I've read the documentation for my currently installed version of `xparse`, but this makes no mention of any limitation regarding terminating optional arguments. Is this a regression or expected but yet undocumented behaviour?


title: Command takes effect before environment

text: Is it possible to add a `\vspace{-\baselineskip}` inside, .e.g., longtable (or other environment} to take effect before the environment starts? MWE which has no effect.               \documentclass{article}     \usepackage{longtable}     \usepackage{blindtext}          \begin{document}          \blindtext          \begin{longtable}{ll}     \vspace{-\baselineskip} \\ % this has no effect                                % why \\ are really needed since caption has them?     \caption{testing table} \\     \hline     aaaa & bbbb \\     cccc & dddd \\     \hline     \end{longtable}          \end{document}      There is a MWE with the problem of having a messed reference in the LOT.               \documentclass[captions=tableheading]{scrartcl}          \usepackage{blindtext}          \usepackage{hyperref}     \usepackage{tabu,longtable}     %\usepackage{threeparttable} % the package below already loads it     \usepackage[referable]{threeparttablex}     \usepackage{booktabs}     \usepackage{caption}               \usepackage{etoolbox}     \makeatletter     \chardef\TPT@@@asteriskcatcode=\catcode`*     \catcode`*=11     \expandafter\patchcmd\csname\string\threeparttable\endcsname         {\TPT@hookin{tabular}}         {\TPT@hookin{tabular}\TPT@hookin{tabu}} % allow threeparttable with tabu         {}{}     \catcode`*=\TPT@@@asteriskcatcode     \makeatother          \makeatletter % fix referencing of LOT while using longtabu         \newcounter{dummy}         \newcommand{\setdummy}{\refstepcounter{dummy} \\}         \let\oldlongtabu\longtabu\def\dummytabu{\vspace{-\baselineskip}\oldlongtabu} % correct the \\ in \setdummy         \def\enddummytabu{\endlongtabu}         \def\dummycap{\setdummy\caption}     \makeatother                    \begin{document}          \listoftables          \bigskip          \blindtext          % LOT reference does not work     \begin{ThreePartTable}     \begin{TableNotes}     \footnotesize     \item[a] \label{tn:aa} A note     \item[b] Another note     \end{TableNotes}     \begin{longtabu}{ll}     \caption{A long table 1}     \label{tab:test1} \\     \toprule     Column 1 & Column 2 \\     \midrule     \endfirsthead     \toprule     Column 1 & Column 2 \\     \midrule     \endhead     \cmidrule{2-2}     \multicolumn{2}{r}{\textit{continued}}     \endfoot     \bottomrule     \insertTableNotes     \endlastfoot     % the contents of the table     A& B\tnotex{tn:aa} \\     \midrule     %\newpage % just testing page break     C\tnote{b} & D \\     \end{longtabu}     \end{ThreePartTable}          \blindtext          % LOT reference works fine     \begin{ThreePartTable}     \begin{TableNotes}     \footnotesize     \item[a] \label{tn:bb} A note     \item[b] Another note     \end{TableNotes}     \begin{longtable}{ll}     \caption{A long table 2}     \label{tab:test2} \\     \toprule     Column 1 & Column 2 \\     \midrule     \endfirsthead     \toprule     Column 1 & Column 2 \\     \midrule     \endhead     \cmidrule{2-2}     \multicolumn{2}{r}{\textit{continued}}     \endfoot     \bottomrule     \insertTableNotes     \endlastfoot     % the contents of the table     A& B\tnotex{tn:bb} \\     \midrule     %\newpage % just testing page break     C\tnote{b} & D \\     \end{longtable}     \end{ThreePartTable}          \blindtext          % LOT reference works fine (with vskip correction)     \begin{ThreePartTable}     \begin{TableNotes}     \footnotesize     \item[a] \label{tn:cc} A note     \item[b] Another note     \end{TableNotes}     \begin{dummytabu}{ll}     \dummycap{A long table 3}     \label{tab:test3} \\     \toprule     Column 1 & Column 2 \\     \midrule     \endfirsthead     \toprule     Column 1 & Column 2 \\     \midrule     \endhead     \cmidrule{2-2}     \multicolumn{2}{r}{\textit{continued}}     \endfoot     \bottomrule     \insertTableNotes     \endlastfoot     % the contents of the table     A& B\tnotex{tn:cc} \\     \midrule     %\newpage % just testing page break     C\tnote{b} & D \\     \end{dummytabu}     \end{ThreePartTable}          \blindtext          \end{document}


title: Setting the word space with ragged2e

text: I am working on Lyx with Preamble, I used to set the word space with `everysel` as below:               \usepackage{everysel}     \EverySelectfont{%     \fontdimen2\font=0.3em% interword space     }      However, the design I am working on has to perform well in a very small format, hence I opt to use `ragged2e` to set ragging right with hyphenation:               \usepackage{ragged2e}     \RaggedRight      With a sense of despondency, this seems to disable the `everysel`, the manual said when `ragged2e` is called upon, the `everysel` is automatically loaded, however, I don't seem to be able to get it working. So to sum up, my question is, how to set the text ragging right, with hyphenation and maintaining the control of word space?


title: Why is there no pgfmath macro that expands directly to the result?

text: Is there a specific reason that there is no default macro (e.g. `\pgfmath{<expression>}`) that directly expands to the result of the evaluated `<expression>`? It always strikes me as particularly cumbersome when I have to type `\pgfmathparse{\linewidth-2.7cm}\pgfmathresult` just to calculate some length that's only used once. Since such macros would come quite handy for single-use calculations I tried to define my own, but to no avail. Can you help me out with these definitions or at least expain why such a thing is not possible? What bothers me is the fact that both my `\pgflength` and the default `\pgfmathresult` are just macros (according to `\show`) and both ultimately expand to a sequence of numbers. `:-(`               \documentclass{article}          \usepackage{pgf}          \newcommand\pgfmath[1]{\pgfmathparse{#1}\pgfmathresult}     \newcommand\pgftrunc[1]{\pgfmathparse{int(#1)}\pgfmathresult}     \newcommand\pgflength[1]{\pgfmathparse{#1}\pgfmathresult pt}          \begin{document}     % Fails:     %\hspace{\pgflength{1cm+2cm}}          % Error message:     % ! Missing number, treated as zero.     % <to be read again>      %                  \begingroup      % l.14     \hspace{\pgflength{1cm+2cm}}          % Works:     \pgfmathparse{1cm+2cm}     \hspace{\pgfmathresult pt}          % Curiously this also fails:     %\edef\mylength{\pgflength{1cm+2cm}}          % Error message:     % ! Incomplete \iffalse; all text was ignored after line 24.     % <inserted text>      %                 \fi           \end{document}


title: How to make apostrophes appear normally when copy-pasting from a MS Word document?

text: I have a report written in MS Word which I would like to turn into a LaTeX document. I copy-pasted the content of the document in my LaTeX editor (TeXShop, LaTeX, pdfTeX) and everything comes out fine except for the apostrophes `'` which come out as `?` (so for example, instead of outputting `I'm`, `I?m` is output instead). In my LaTeX editor, the apostrophes appear as they should, it's only in the compiled pdf document that they are turned into `?`. For a strange reason, I've noticed that if I delete (in the editor) an apostrophe and retype the same apostrophe in the editor, then they are output normally. This trick doesn't work if I do Find and Replace, so the solution I have up to now is simply to manually delete and retype each apostrophe in the text. This however is very time consuming so I would love to find a better solution!


title: Citation with some text inside square brackets

text: I'd like to add a citation which looks like this:               [_Text_ Citation_01, pages]      For example:               [See: 155, pp.89--99]      How can I do this using **standard** `\cite{}` command (without `natbib` or anything else)? **P.S. The text might be in Cyrillic!**


title: How to change the style of menukeys

text: Maybe I am just stupid, but I don't manage to change the style of the output of `menukeys`. The manual of this package lists in Section 4.2.1 some predefined styles. However, I can't find any hint of how to tell the package which style to use. Here's a minimal example:               \documentclass{article}     \usepackage{menukeys}     \begin{document}     Hello World!          \menu{File > Quit}          \end{document}


title: How to "Disable Editing" of a document in LyX?

text: Sometimes it is useful to open a document as `read-only` (e.g. when copy/pasting from an old document to a newer one, and wanting to avoid any accidental modifications to the old document). This functionality resembles the one in LibreOffice, specifically the 'Edit File' button which is toggled on by default, and can be toggled off to disable editing. How can I open a document in LyX and disable editing?


title: force section and subsection to capital letters

text: hi Im trying to renew the section cmd to make all sections in capitals. i have tried stuff like               \newcommand{\tmpsection}[1]{}     \let\tmpsection=\section     \renewcommand{\section}[1]{\tmpsection{\uppercase{#1}}}      but no luck. can anyone help ? :)


title: Can Pgfplots extra tick grid line be drawn behind the axis line?

text: In the example code below, the extra tick at x=0.45 has its gray grid line drawn over the x axis line. At other ticks there is a normal major grid line, and it is ok. I assume the extra tick is not drawn like the major grid, even if the extra tick style is set to major as in my code. Can I somehow draw the extra grid line before the axis line? Or just make is somehow get drawn like other grid lines? That way the gray line would be hidden behind the black line.               \documentclass{report}          \usepackage{pgfplots}         \pgfplotsset{         /tikz/font={\tiny},         compat=newest,         /pgfplots/tick align=outside,         /pgfplots/tick style={solid, black, thin}}          \begin{document}          \begin{tikzpicture}          \begin{axis}[         width=6cm,height=6cm,         xmin=0.35, xmax=0.71,         axis x discontinuity=parallel,         xtickmin=0.45,         extra x ticks={0.45},         extra x tick style={grid=major}, % Why is this not drawn like the majorgrids?         xmajorgrids,         ymin=0, ymax=3.1,         ytick={1,2,3},         extra y ticks={0},         extra y tick style={grid=none}, % no y=0 grid line through the discontinuity section of x axis         ymajorgrids,         title style={align=center},         axis lines*=left]          \addplot [line width=1pt]     coordinates{(0.45,3.0031)(0.5,1.30614)(0.55,0.67405)(0.6,0.412165)(0.65,0.283491)(0.7,0.211098)};          \end{axis}     \end{tikzpicture}%     \end{document}      ps. The picture above presents also the problem discussed in How to make the tick thickness as the axis line?. The tick of y=0 at origin is a thin one. Here is also a picture presenting the problem: ![enter image description here](http://i.stack.imgur.com/HPSgP.png)


title: Running multiple Winedt processes on Windows 7 x64

text: Is it possible to run multiple versions of Winedt, Build: 20100317 (v. 6.0) on Windows 7 x64 system to edit multiple projects?


title: How to set the width of the cell and allow it to take multiple lines?

text: I have a table below               \documentclass[a4paper,12pt]{article}     \begin{document}     \begin{quote}       \begin{tabular}{|c|c|c|c|c|}         \hline         \multicolumn{4}{c}{Table title}\\         \hline         Fuze Type & Weight & Muzzle Velocity & From sea level\\         \hline         Time & Vehicle wt: 5000              Tyre wt: 100&40000 m/s & 0m\\         \hline         Degrees & Minutes & Mil &Range in m & Time of flight in s\\         \hline       \end{tabular}     \end{document}        1. I want the second column to be of fixed width and if the length of text in this column is more, text will be allowed to take multiple lines without changing the width. Edit:Can you also tell me how to do the same in longtable.(|>{\centering}p{2cm}| doesn't seem to work in longtable.   2. I want left and right edges of the top row visible.   3. I need the last columns of rows 2 and 3 invisible(no borders), since there is no data in those cells.


title: equivalent \addlinespace command for table columns?

text: I just discovered the Latex command `\addlinespace` which increases the whitespace between the rows in a table. I was wondering if there is a command like that to increase the whitespace between the columns?


title: Intersection with rays in TikZ

text: can anyone tell me how to calculate intersections of rays and objects in TikZ? Normally the syntax is `intersection of p1--p2 and p3--p4`, but I would like to intersect the line segment from p1 to p2 with a ray starting at p3 and going into a direction e. Is that possible with TikZ?


title: How can I list tabulars in the contents, or make tables with invisble captions

text: Is there a way to have simple tabulars be listed in the list of tables? I'd even put them in by hand if I knew how.. My tables look like this right now:               \begin{center}     \begin{tabular}{l c l}     \multicolumn{3}{c}{LB medium} \\     1\% w/v & & tryptone \\     0.5\% w/v & & yeast extract \\     0.5\% w/v & & NaCl \\      & & \\      & & \\     \end{tabular}          \quad          \begin{tabular}{l c l}     \multicolumn{3}{c}{LB$_{Amp}$-Agarplate, pH 7} \\     1\% w/v & & tryptone \\     0.5\% w/v & & yeast extract \\     0.5\% w/v & & NaCl \\     1,5\% w/v & & Agar-Agar \\     0,01\% w/v & & Ampicillin \\     \end{tabular}     \end{center}      If I change it to a `table` environment, the caption is below the table and has a section number in front of it, which messes up my formatting and just doesn't look good. Is there a way to make captions completely invisible in the text and list it in the contents? Or insert a completely invisble table (caption included) and list that in the list of tables?


title: Ratio of the expression and the corresponding description fix in Beamer

text: I want to modify the display of my equation little bit. Below is the code which I used to show the ratio of two expressions and use a pointer for the descrption of the items. I was able to show the expressions but I was wondering if it is possible to use them as a real fraction just like the expression we get while using `\frac` function.               \tikzstyle{na} = [baseline=-.5ex]               \begin{equation*}     a_i(t,x) =             \tikz[baseline]{                 \node[fill=blue!20,anchor=base] (t1)                 {$ \tau C_i(t,x,\tau )\partial \tau$};             } /             \tikz[baseline]{                 \node[fill=red!20, ellipse,anchor=base] (t2)                 {$C_i(t,x,\tau) \partial \tau$};             }      \end{equation*}               \begin{itemize}[<+-| alert@+>]      \item Coriolis acceleration             \tikz[na] \node[coordinate] (n1) {};         \item Transversal acceleration             \tikz[na]\node [coordinate] (n2) {};     \end{itemize}          % Now it's time to draw some edges between the global nodes. Note that we     % have to apply the 'overlay' style.     \begin{tikzpicture}[overlay]             \path[->]<1-> (n1) edge [bend right] (t1);             \path[->]<2-> (n2) edge [bend right] (t2);          \end{tikzpicture}      The output of the above code is as follows: ![enter image description here](http://i.stack.imgur.com/fGmS0.png)


title: Spaces inside Cyrillic listings

text: I want to include source file using listing package. In that file there are some cyrillic symbols in comments. I setup listings like:               \lstset{extendedchars=\true,basicstyle=\ttfamily} And in result I get no spaces between russian words: `вд` instead of desired `в д`. Not working minimal sample:               \documentclass[a4paper]{article}     \usepackage{xltxtra}     \usepackage{xunicode}     \usepackage{fontspec}     \usepackage{polyglossia}     \usepackage{listings}     \lstset{extendedchars=\true,basicstyle=\ttfamily}     \setmonofont[Scale=0.8]{DejaVu Sans Mono}          \begin{document}     \begin{lstlisting}     привет мир     \end{lstlisting}     \end{document}      I'm using XeTeX. @Micha If I try to use `libertine` package with xetex I get errors like:               Cannot use \XeTeXOTfeaturetag with nullfont; not an OpenType Layout font. [ ]{Linux Libertine O}] Also I tried to run in pdflatex with literate setup, it works, thanks. But in xetex I get the same problem. Is it possible to use listings in such way with xetex?