title: Does the lualatex shell enable behavior differ from pdflatex on purpose?

text: I am trying to use TikzEdt, an editor for TikZ graphics. For some tasks TikZ needs to call other commands so I tried to enable this by the parameter `\--shell-escape` passed to `lualatex` (on Windows, MiKTeX 2.9). Strangely this fails to enable the feature. After some fiddling around it turns out that it even fails with this MWE:                   \documentclass{standalone}              \begin{document}         \write18{echo SHELL ENABLED}         \end{document}      TikzEdt appends the switch and calls `lualatex test.tex --shell-escape` which does not seem to work. The same command with pdflatex works nicely. It turns out that other than in pdflatex the order of arguments seem to play a role in lualatex, `lualatex --shell-escape test.tex` runs nicely. Unfortunately TikzEdt only allows to append switches not insert switches. Is this a bug in lualatex or is TikzEdt using a wrong assumption?


title: Alignment issues with lists in a table in ConTeXt

text: This issue has been answered many times for LaTeX, but I couldn't find any explanation for ConTeXt. Here is a sample that shows the alignment problem :               \starttable[|cB|p(4cm)|p(4cm)|]         \DC\DL[2]\DR         \NC \VL \REF[cB]{Foo}             \VL \REF[cB]{Bar}             \VL \AR         \HL         \VL Things             \VL                 \startitemize[packed]                     \item Carrot                     \item Tomato                 \stopitemize             \VL                 \startitemize[packed]                     \item Rice                     \item Superman                     \item Onion                     \item Chocolate                 \stopitemize             \VL\AR         \HL     \stoptable      And here is the result with mkiv: ![enter image description here](http://i.stack.imgur.com/V5aKc.png) As you can see, the list on the right-most cell is not aligned properly to the top. When compiling, I'm getting a few `Underfull \vbox (badness 10000) detected` but I have not clue how to resolve this. Any suggestions ? Thanks :)


title: Chapter.Part.Section numbering

text: Is it possible to have numbering such that my Chapters can contain Parts which contain Sections? Currently I have:               Chapter         Section{foo}         Section{far}         Part{baz}             Section{bar}         Part{Caz}             Section{Coo}      which is being numbered:                3.1 Foo      3.2 Far      I Baz         3.3 Bar      II Caz         3.4 Coo      I want to have:                3.1 Foo      3.2 Far      I Baz          I.1 Bar      II Caz          II.1 Coo      As I'm writing this question I'm thinking perhaps it's easiest to disable `chapter` numbering in each `Part`, rather than having the `Parts` as subsections to `Chapter`:               Chapter         Section{foo}         Section{far}     Part{baz} % Disable chapter numbering...         Section{bar}     Part{Caz} % Disable chapter numbering...         Section{Coo}     % Re-enable chapter numbering...      But I'm not sure (a) if this is the best solution or (b) how to achieve this.


title: Using foreach to generate computed indices in a plot

text: I have a table with 8 columns, and I want to generate 4 plots (1 vs 0, 3 vs 2, 5 vs 4, and 7 vs 6). I was going to use foreach to generate the plots using               \begin{tikzpicture}     \begin{axis}     \foreach \x in {0,...,3} {     \addplot table[x index = \x * 2, y index = \x * 2 + 1]\table     }     \end{axis}     \end{tikzpicture}      where `\table` is a stored table. But I don't seem to permitted to do arithmetic on the indices. Is there a way to do this ? Update: not-quite-m WE:               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \begin{tikzpicture}     \pgfplotstableread{     -1.5875 -1.5324 -1.4773 -1.4222 -1.3671 -1.312  -1.2569 -1.2018     -1.5875 -1.5324 -1.4773 -1.4222 -1.3671 -1.312  -1.2569 -1.2018     0.013166    0.013156    0.013147    0.013141    0.013137    0.013135    0.013135    0.013139     0.013156    0.013146    0.013138    0.013132    0.013128    0.013127    0.013128    0.013131     }\loadedtable     \pgfplotstabletranspose[colnames from=,input colnames to=r]\transtable\loadedtable       \begin{axis}     \foreach \x in {0,...,1} {       \pgfmathtruncatemacro{\Xcol}{\x * 2}       \pgfmathtruncatemacro{\Ycol}{1 + \x * 2}       \addplot[mark=,color=blue] table[x index =\Xcol,y index =\Ycol]\transtable;     }       \end{axis}     \end{tikzpicture}     \end{document}


title: How to display command name and its value

text: Latex displays the command values by default - I am finding it more difficult to display the command names along with the values. I have a list of commands that I would like to loop over and print each one's name and value.               \documentclass[11pt,letterpaper]{article}     \usepackage{tikz}  % defines foreach          \begin{document}          \def\one{this is one}     \def\two{this is two}     \def\three{this is three}          \def\CMDs{\one,\two,\three}  % list of commands I would like to loop over          \foreach \cmd in \CMDs     {         \string\cmd = \cmd \\ % should be name = value     }          \end{document}      But the `\string` is not resolving the \cmd, its just printing cmd. Even tried `\expandafter\string\csname\cmd\endcsname = \cmd` as suggested here - no use, it is expanding and printing the value on both sides, not the name. Please advice on how to achieve this. In case one would like to know the background, this is for my CVMaker project - to keep track of internal variables and dump their values on demand, as debug-aid for the package users.


title: package glossaries: acronymstyle using footnote affects main-glossary?

text: I have two seperate glossaries. One for acronyms and one for general explanations (main). For acronyms i used the footnote-style. This works as expected: one first use of the acronym a footnote is displayed. For general explanations i prefer a link to the glossary (no footnote). But there seems to be a problem. On first occurrence, the explanation isn't shown as a link. Maybe the footnote-style of acronyms is interfering... **Question:** How can i modify the given code to link the explanation to the glossary on first occurrence (...and make all explanations shown in italic)?               \documentclass{article}     \usepackage[colorlinks]{hyperref}     \usepackage[nonumberlist, shortcuts, acronyms]{glossaries}          \makenoidxglossaries           \setacronymstyle{footnote-sc}          %% List of Acronyms     \newacronym{IOM}{IOM}{Institute Of Medicine}           %% List of Explanations     \newglossaryentry{leukemia}{name={leukemia}, plural={leukemia} ,     description={A group of cancers that usually begins in the bone marrow}}          \begin{document}          \ac{IOM} \ac{IOM} \ac{IOM} \\                                                % Works correctly     \gls{leukemia} \gls{leukemia} \gls{leukemia}                 % First occurrence of leukemia isn't linked to glossary               \printnoidxglossary[style=altlist,title=Glossary]     \printnoidxglossary[type=\acronymtype, nogroupskip, title=Abbreviations]          \end{document}      ![leukemia isn't linked when used the first time](http://i.stack.imgur.com/wGsGJ.jpg)


title: tikz doesn't work with L7x encoding in beamer

text: In my `beamer` document I use `L7x` encoding and I want to import `tikz` picture, however, it doesn't work, so what's the best way to import it in my presentation? My idea is to make a printscreen of this picture in the document, produced by other document class, and then input it as a picture, but I believe there is a better solution. The example of document, which doesn't work in beamer               \documentclass{beamer}          \usepackage[utf8x]{inputenc}     \usepackage[L7x]{fontenc}          \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}        \frame{          \tikzstyle{c}=[draw, shape=circle, minimum size=25pt,inner sep=0pt]          \begin{tikzpicture}[auto,>=latex']         \node at (0,0) (d02) {$x(k)$};         \node at (-1,0) [coordinate] (p1) {};         \node at (-4,-1) [c, line width=1pt] (d12) {$\uparrow 2$};         \node at (-5,-1) [coordinate] (p2) {};         \node at (-8,-2) [c, line width=1pt] (d22) {$\uparrow 2$};         \node at (-9,-2) [coordinate] (p3) {};         \node at (-12,-3) [c, line width=1pt] (d32) {$\uparrow 2$};              \begin{scope}[line width=1pt]             \foreach \j/\i in {0/1,1/2,2/3}                     {\draw[<-]  (d\j2) -- (p\i);}         \end{scope}          \end{tikzpicture}        }     \end{document}


title: Can't break a line in \maketitle with \raggedright

text: (This is, in a sense, a follow-up to Insert text between title and author). When using `\raggedright` in the preamble, LaTeX throws an error when I use a linebreak command `\\\` in `\maketitle`. How can I circumvent this?               \documentclass{article}     \raggedright % turn off right-edge text justification and hyphenation     \usepackage{titling}         \pretitle{\begin{flushleft}\LARGE\textbf} % left aligned title with LARGE bold type         \posttitle{\vskip .25ex\hrule\par\end{flushleft}} % add hrule under title         \preauthor{\begin{flushleft}\large} % left align author         \postauthor{\par\end{flushleft}}         \predate{\begin{flushleft}} % left align date         \postdate{\par\end{flushleft}\vspace{-3ex}} % reduce space after \maketitle          \begin{document}     \title{Review}     \author{\textbf{Paul McCartney}\\ University of Liverpool}     \date{\today}     \maketitle     \noindent Here my review begins     \end{document}      > ! Argument of \reserved@a has an extra }. > > \par > > l.14 ...Paul McCartney}\ University of Liverpool}


title: Siunitx: Overfull hbox warnings when including significance stars.

text: I use `siunitx` to decimal align the contents of tables that I create with Stata's `estout`, as shown in the MWE below. I think the output is perfect, with the numbers being aligned on the decimal point and "pseudo"-centered under the "ß / SE" and "Margin" columns. The problem is that I get an `overfull hbox` warning for every single cell. I've played around with `table-space-text-post` to include the asterisk, but without any luck. Does anyone have a solution for this problem?               \documentclass{scrartcl}          \usepackage{lmodern}          \newcommand{\sym}[1]{\rlap{#1}}          \usepackage{siunitx}     \sisetup{             detect-mode,             tight-spacing               = true,             group-digits                = false ,             input-signs             = ,             input-symbols               = ( ) - + *,             input-open-uncertainty  = ,             input-close-uncertainty = ,             table-align-text-post   = false,             % table-space-text-pre  = -,             % table-space-text-post = *             }          \usepackage{booktabs}          \begin{document}     \begin{tabular*}     {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{3}{S[table-format=1.3,table-column-width=11mm]S[table-format=1.3,table-column-width=11mm]}}     \toprule     &\multicolumn{2}{c}{(1)}                    &\multicolumn{2}{c}{(2)}                    &\multicolumn{2}{c}{(3)}                    \\     &\multicolumn{2}{c}{Column One}              &\multicolumn{2}{c}{Column Two X}&\multicolumn{2}{c}{Column Three XX}\\     &\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         &\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         &\multicolumn{1}{c}{$\beta$ / SE}         &\multicolumn{1}{c}{Margin}         \\     \midrule     \hspace{0.1cm} 18--24&      -0.176         &      -0.044         &      -0.256         &      -0.047         &      -0.820\sym{***}&      -0.101\sym{***}\\                         &     (0.152)         &                     &     (0.188)         &                     &     (0.310)         &                     \\     \hspace{0.1cm} 25--34&       0.067         &       0.017         &       0.047         &       0.009         &      -0.046         &      -0.006         \\     \bottomrule     \addlinespace[.75ex]     \end{tabular*}     \end{document}


title: use fncychap for only some chapters

text: I am going to use `fncychap` package. Since I am creating each chapter separately and then put them together, this package works on table of contents too. Is there any way to do not work for this part?


title: What is the purpose of %TCIDATA tags in a LaTeX document?

text: I recently had to edit a LaTeX file which has had numerous maintainers in the last couple of years. The header contains a block of `%TCIDATA` tags:               %TCIDATA{OutputFilter=latex2.dll}     %TCIDATA{Version=5.00.0.2570}     %TCIDATA{Created=Thu Jul 15 15:10:55 1999}     %TCIDATA{LastRevised=Monday, October 02, 2006 18:14:51}     %TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}     %TCIDATA{<META NAME="PrintViewPercent" CONTENT="100">}     %TCIDATA{<META NAME="SaveForMode" CONTENT="1">}     %TCIDATA{Language=American English}      What do these tags do? Who parses them? I googled `tcidata` and `tcidata latex` but found no meaningful results.


title: tick mark separation

text: My graphs have two ticks on the x-axis. I'd like to have 3 graphs across a page and include y-axis labels. Right now that wont fit. Is it possible to move the x-tick marks closer together so the graphs aren't as wide? ![enter image description here](http://i.stack.imgur.com/wsoW2.png) Code:               \begin{figure}[tbp]     \centering     \begin{subfigure}{0.26\linewidth}     \caption{Average Playback Version}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.15,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,1.1666666666666667) (1,5)};     \addplot         coordinates{(0,2.8333333333333335) (1,5)};     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Playback Smoothness}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.15,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,0.4289845892077917) (1,1)};     \addplot         coordinates{(0,0.3173238794109962) (1,1)};     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Prefetching Overhead}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.15,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,0) (1,0.01747354295543597)};     \addplot         coordinates{(0,0) (1,0.025513165391867983)};     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \caption{iPad: Long-Term Decreases 4 Mbps - 0.5 Mbps}     \end{figure}


title: XeLaTeX Bad/Inconsistent Kerning

text: I'm running xubuntu 12.04.3 LTS with tex-full 2013 package. The kerning is terrible. For example, I have fonts-linuxlibertine 5.3.0 installed, latest and greatest; when I compile using XeLaTeX, both libertine and biolinum fontfaces get poor/inconsistent kerning. ![Linux Biolinum O](http://i.imgur.com/UuMBV86.png) Fig 1. Linux Biolinum O. See kerning differences in "Brief".               \documentclass[letterpaper,12pt,notitlepage]{article}     \usepackage{fontspec}     \setmainfont{Linux Biolinum O}      \title{Jones Construction Creative Brief}     \begin{document}     \maketitle     \end{document}      Edit: Tested on other pdf readers ![Adobe Reader](http://i.imgur.com/eEgpcNO.png) Fig 2. Seen on Adobe Reader Win7. It looks significantly better on Adobe Reader though that Br pair still looks questionable. I'm not sure if I have a real problem at this point, everything looks much more acceptable. I might just need to manually kern some things.


title: Memoir Headings

text: What is the best way to customize the headings at the top of each page in a `memoir` document? For example, if I want just the page number at the top of every left page, and just the chapter title (say, in italics) at the top of every right page? What if I don't want any header on left pages, but just the page number as a footer in the corner?


title: Titled & Untitled Questions in same document

text: I need to have sections in an exam I am writing. The first 10 questions are multiple choice, which I would like to number simply 1-10. For the extended response, I would like to title the questions. Is there a way to do this in the exam class? Thank you for your help.


title: How do I draw a plot with a variable line width in pgfplots?

text: I have highly dimensional data for which I'd like to draw a plot where I vary the line-width, somewhat similar to the famous Minard chart: ![Minard Napoléon losses chart](http://i.stack.imgur.com/ACHY2.png) I suspect this can be done with some combination of `point meta` and `line width={\pgfplotspointmetatransformed/1000 * 2pt}` somewhere, but I can't quite figure out how to do this. For scatter-plots with markers I found how to do this (`pgfplots` manual, version 1.5, page 84), and varying the colour can be done using a 1-D coloured mesh plot. Linked below is a way to fix this for quiver plots, and below I linked a question how to do this in 'pure' `tikz`. Maybe it would be possible with a clever decoration (fill a rectangle perpendicular to the plot?) but I suspect this would not look very nice (I haven't tried this yet). I could fill the area between y-dy and y+dy, but this is not the same as varying the line width, because the area that is filled is estimated into ±y, not perpendicular to the local line direction. ![Close, but not quite what I seek.](http://i.stack.imgur.com/LBmfi.png) My data are discrete, so the varying line width can be, too ( **NOTE: see update below!** ). Maybe it can be done with a `for`-loop. The question is:   * How do I vary the line width of a `pgfplots`-plot according to a particular function? Some sample data, where I would plot column 1 as a function of column 0, and seek to map column 2 to the line-width:               2006 5213 48     2007 5112 47     2008 5260 49     2009 5161 53     2010 4647 57     2011 4413 62     2012 4309 65      Bonus question: If this succeeds, it would be very neat if I could draw a very thin grid through this line, so that the line width can be more easily seen. Not even Minard has done this :) **EDIT 2012-06-01** : contrary to an earlier answer I gave to a comment, I realise now that I'm really looking for a _continuously_ changing line width, e.g. an appropriately calculated and filled polygon. Using `calc` and `intersections` I can get the result below, but I haven't yet managed to get it into a plot (though this question on using a macro as a coordinate or this one on consistency with tikz and pgfplots might help), and of course I should automate it with my input data (with `pgfplotstable`). I like the geometric calculations with `calc`, but otherwise I'm beginning to suspect it may be easier for me to calculate the corners of the polygon externally and then filling them with `pgfplots` later. OTOH it would be cool to have a solution where I can plug in any series of numbers (particularly since my final plot will contain many such lines).               \documentclass{standalone}     \usepackage{pgfplots,pgfplotstable}     \usetikzlibrary{calc}     \usetikzlibrary{intersections}     \begin{document}%     \begin{tikzpicture}     \begin{axis}     \coordinate (a) at (0, 0);     \coordinate (b) at (1, 3);     \coordinate (c) at (2, 1);     \coordinate (aba) at ($(a)!.01cm!90:(b)$);     \coordinate (abb) at ($(a)!.01cm!-90:(b)$);     \coordinate (baa) at ($(b)!.04cm!90:(a)$);     \coordinate (bab) at ($(b)!.04cm!-90:(a)$);     \coordinate (bca) at ($(b)!.04cm!90:(c)$);     \coordinate (bcb) at ($(b)!.04cm!-90:(c)$);     \coordinate (cba) at ($(c)!.1cm!90:(b)$);     \coordinate (cbb) at ($(c)!.1cm!-90:(b)$);          \coordinate (lowsect) at (intersection of abb--baa and cba--bcb);%a_1--a_2 and b_1--b_2);     \coordinate (hisect) at (intersection of aba--bab and cbb--bca);%a_1--a_2 and b_1--b_2);          \addplot[fill=black] coordinates {(abb) (lowsect) (cba) (cbb) (hisect) (aba)} -- cycle;     %\path[fill=black] (abb) -- (lowsect) -- (cba) -- (cbb) -- (hisect) -- (aba) -- cycle;     \end{axis}     \end{tikzpicture}     \end{document}      ![beginning of attempt to plot with variable line width](http://i.stack.imgur.com/2pLKs.png) Related questions:   * How can I draw a quiver plot with varying line thickness?   * lines with variable width in TikZ (to convert handwritten Xournal files to tikz)   * Trait with variable thickness


title: Avoid page break after \item-followed-by-newline

text: My document has multiple occurrences of the code fragment               \item~\newline     \begin{center}     \includegraphics{...}     \end{center}     \item      and occasionally, the first `item` comes right at the end of a page, so the item label is separated from the figure. How can I avoid this? (I use this construct so as to get the item label _above_ the figure instead of aligned with the figure's bottom, which is what happens by default).


title: How do I create parallel text aligned by paragraph?

text: I would like to create parallel text in multiple languages. With some success, I have tried some existing packages to do that. However, one thing I found very difficult is to align each paragraph but use different font sizes and (thus) independent line spacing for each language. This would be useful for languages where the texts are very different in length (for example Chinese and English). Any ideas on how to do this?


title: Edit gummi ".bst"

text: I'm using gummi and I need to change my bibliography language to spanish and I don't know how to do it. When I wrote various authors, the word "AND" appeared instead of "Y". May you tell how to find and edit ".bst" file? I'm using Ubuntu 12.04. If exist other best way, I'll appreciate an example how to do it. Thanks!!!!


title: Indian rupee symbol

text: India has recently introduced a new symbol for its currency, the Indian rupee -- see http://en.wikipedia.org/wiki/Indian_rupee_sign. How can I typeset this in TeX / LaTeX?


title: Pop-up references in PDF output

text: I once saw a maths journal which offered PDFs of published papers, where the bibliographic references were formatted as PDF annotations: if you moused over a reference in the text, the bibliography entry would appear in a pop-up window, without having to jump to the end of the file and inevitably have to spend ages re-finding where you were in the text. Does anyone know of a way of producing this effect automatically using BibTeX?


title: Correct kerning of hyperlinks in math mode

text: I use hyperlinks in math mode to if a reader does not read my thesis sequentially and finds a very arcane symbol somewhere, he may just click it and go to where it is defined. However, adding links changes the kerning making subscripts and superscripts more spaced out and other ugly things. Consider this MWE:               \documentclass{article}          \usepackage{amsmath, amssymb, fontspec, unicode-math, tikz}     \usepackage[colorlinks=true, linkcolor=black]{hyperref}          \begin{document}          Let \hypertarget{a}{$X\colon[0,1]\times\Omega\to\mathbb{R}$} be a stochastic     process.          \tikz[overlay, baseline, anchor=base west, inner sep=0, blue]       \node {${X}_t$};%     \tikz[overlay, baseline, anchor=base west, inner sep=0, red, opacity=0.5]       \node {$\hyperlink{a}{X}_t$};          \end{document}      The output is ![bad kerning](http://i.stack.imgur.com/xPFdE.png) I'm using LuaLaTeX and texlive 2013. Is there any way to correct the kerning?


title: Splitting a float with code listings

text: Using the `floats` and `listings` packages, I have defined a float for code listings and a shortcut for using it as follows:               \usepackage{floats}     \usepackage{listings}          \newfloat{program}{tbphH}{lop}[section]     \floatname{program}{Program}          \newcommand{\codefrom}[2][Matlab]     {     \begin{program}[p]         \lstinputlisting[language=#1]{#2}         \caption{#2}         \label{#2}     \end{program}     }      Now, if a code file is too long, it will just continue down outside the page. Instead, I would like to automatically split the float at the end of the page, and continue on the next page. Is there any way to accomplish this without sacrificing the float structure? If not, is there another way to get numbering etc as easily as with a float?


title: ctable extensions: colored horizontal and extended vertical rules - need help

text: I'm working on my `ctable` LaTeX package, planning to allow for optional `key=value` arguments for `\FL`, `\ML`, `\LL`, such that one can make a `3pt` thick, red-colored toprule with `\FL[w=3pt,c=red]`; also, vertical rules should extend, unlike in the package `booktabs`, currently used by `ctable`, where get broken. My current problem is that I try to use `\@ifnextchar` to detect the optional argument.   My test below starts with a little demo that shows that `\@ifnextchar` hands over `\BB`'s optional argument to `\AA`.   But the same construct in my `\FL` hands over nothing, and the optional argument is printed as text, including the brackets. Could someone help me out please?   Here is my test:               \documentclass[a5paper]{article}     \usepackage{charter,xkeyval,colortbl}     \pagestyle{empty}\parindent0pt          \makeatletter          % for a demo of \@ifnextchar     % If \BB see an optional argument, it calls \AA with it.     % With no optional argument, \AA[default] is called.     \def\AA[#1]{===#1===}     \def\BB{\@ifnextchar[{\AA}{\AA[default]}}          \newlength\savedwidth     \define@key{rules}{w}{\global\savedwidth\arrayrulewidth\global\arrayrulewidth#1}     \define@key{rules}{c}{\gdef\rulecolor{#1}}          \def\XX[#1]{\setkeys{rules}{#1}}          \def\FL{%       \noalign{%         \setkeys{rules}{w=2pt,c=blue}   % set the defaults         \@ifnextchar[{\XX}{}            % optional arg? call \XX with it       }%       \arrayrulecolor{\rulecolor}%       \hline%       \noalign{\global\arrayrulewidth\savedwidth} % restore width       \arrayrulecolor{black}                  % and color       \rule{0pt}{3ex}   % strut for extra whitespace under the rule     }          \begin{document}     % Here's the demo:     \BB[argument]\\\BB          \medskip     % now a table with a default toprule     \begin{tabular}{|r|l|}\FL       Hello World & Here I am\\     Using FL with & no arg     \end{tabular}          \medskip     % and a table with a thick red toprule     \begin{tabular}{|r|l|}\FL[c=red,w=4pt]       Hello World & Here I am\\     Using FL with & c=red     \end{tabular}     \end{document}


title: Adding in extra vertical space with a new bullet point (using easylist)

text: I'm using `easylist` to take notes and so far have really liked it. The only big problem I'm running into is it just doesn't quite look good sometimes because if you have multiple lines of text, then you make a new bullet point, the line spacing within a bullet point is the same spacing as the line spacing to the next bullet point. I would like to make it so every time I create a new bullet point, there are a few extra pixels of vertical space. Currently my easy list import looks like this               \usepackage[ampersand]{easylist}          \ListProperties(Hide=100, Hang=true, Progressive=8ex, Style*=$\bullet$ ,     Style2*=\textbf{--} ,Style3*=$\circ$ ,Style4*=\tiny$\blacksquare$ )      and so I would have something like               & This is a header note and blah blah blah blah blah until this note is 2 lines long     % Want a bigger vertical space here than occurred between the two lines in the first note     && These are my sub notes


title: How do I make sure that \pageref{LastPage} doesn't get colored like the other links identified by hyperref?

text: I am using `hyperref` together with `lastpage`. My problem is that `\pageref{LastPage}` gets the same color as the links identified with `hyperref`. I want it to be just the ordinary color (e.g. black) Allow me to adapt the chosen answer to my previous question about `lastpage`:               \documentclass{scrartcl}          \usepackage{hyperref}     \hypersetup{colorlinks,breaklinks,                 urlcolor=Maroon,                 linkcolor=Maroon}          \usepackage{lastpage}     \usepackage{scrpage2}          \cfoot{\thepage\ of \pageref{LastPage}}          \pagestyle{scrheadings}          \begin{document}          \href{mailto:my_email@email.com}{my_email@email.com}          \newpage     text     \newpage     text     \end{document}      I tried `\usepackage{color}` and then modifying the `\cfoot...` line to `\cfoot{\thepage\ of \color{black}\pageref{LastPage}}`, but to no avail.


title: boxed verbatim environment disappears

text: I want to center a box containing a verbatim environment. The (almost)MWE below is my attempt to use the answer at center /verbatim text in /figure .               \documentclass{article}     \usepackage{verbatimbox}     \usepackage{amsmath}          \begin{document}     The table at \verb!http://www.census.gov/govs/state/10lottery.html!     lists the following data for the 2010 Texas lotteries:          \begin{center}     \begin{verbbox}       Income               Apportionment of funds     (ticket sales      Prizes  Administration  Proceeds       excluding                               available       commissions)       3,542,210       2,300,182   184,980     1,057,048     \end{verbbox}     \end{center}          Since     %     \begin{equation*}     \frac{2,300,182}{3,542,210} = 0.649363533 \approx 65\%     \end{equation*}     %     Texas returned 65 cents on the dollar in lottery payouts in 2010 --     three cents more than the national average.          \end{document}      In the output, the boxed text has disappeared: ![enter image description here](http://i.stack.imgur.com/R3xxD.png)


title: How do I search the hidden TeX Live folders in Mac OS X?

text: I considered asking this on Super User, and I also thought that TeX users on the Mac would be better able to help and be helped. I'll let the mods decide. I opened `texdoc color` and came to `grfguide.pdf`. I am greeted with this: ![alt text](http://i.stack.imgur.com/T1jLL.png)   I understand that all default TeX Live packages are installed in a "protected" folder. Using another app (called Afloat), I found out that `grfguide.pdf` can be found in `/usr/local/texlive...` I will want to "process the `dtx` files" to see further documentation. Now, Spotlight doesn't search the protected folders. I won't be able to just type in `sty` or `dtx` or `ins`. How do I search the TeX Live folders on a Mac?


title: How to reference a paragraph with § symbol and without a dot?

text: I'd like to add a clickable reference to `\paragraph`, but instead of having just a clickable number with a dot after it, I'd like to add a `\S` sign to the link too (NOT the name of the paragraph!) and remove the dot. For example,               \paragraph{Name}\label{p1}     \ref{p1}      gives me a clickable number of the paragraph, say, "1." (with the dot after the number). How to change it to a clickable text "§ 1" (with sign `\S` and without a dot)?


title: Make a horizontal line from the current indented location to the right margin

text: I want to be able to do something like:               \hspace{2cm} \hrule      and have LaTeX give me a line that goes from 2cm past the left margin, to the right margin. I've looked around and as a LaTeX newbie it seems to be a non- trivial thing to do.


title: How to get character code defined with \let (! Improper alphabetic constant)

text: Here's a example with the "`! Improper alphabetic constant`" error:               %% this is ok       \newcount\mychar     \mychar=\number`a\relax     \showthe a       % shows You can't use `the letter a' after \the     \showthe\mychar  % shows 97          %% this is not ok     \let\Char=a          \showthe\Char    % shows You can't use `the letter a' after \the     \mychar=\number`\Char\relax  % here error comes     \showthe\mychar      Setting the counter should expand till non-expandable token (in this case it's `\relax`). Question: why is `\Char` not expanded?


title: Command doing the same job as StrBefore but being expandable

text: I am looking for a command allowing me to get 3 as output if the input is 3.2. `\StrBefore{3.2}{.}` works fine for this purpose but is not expandable and I need to call it in another macro inside a `\setcounter` command where it is expected to have a number and then to expand the `\StrBefore` command. Is there a work around using `\StrBefore` or do I need a different function and which one?               \documentclass{book}          \usepackage{xstring}          \newcounter{try}          \newcommand{\foo}[1]{\StrBefore{#1}{.}}          \newcommand\test[1]{\setcounter{try}{\foo{#1}}%     \arabic{try}}          \begin{document}          Result of foo\{3.2\}: \foo{3.2}     Result of test\{3.2\}: \test{3.2}          \end{document}


title: How to make this table fit on a landscape page?

text: \documentclass[twoside, a4paper, 11pt]{article}     \usepackage{ragged2e}     \usepackage{booktabs,tabularx}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{verbatim}     \usepackage{amsmath, amssymb}     \usepackage{natbib}     %\def\pgfsysdriver{pgfsys-dvipdfm.def}     \usepackage{tikz}     \usepackage{enumerate}     \usetikzlibrary{matrix, arrows}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{listings}     \usepackage{color}     %\usepackage{hyperref}     \usepackage{float}     \usepackage{multicol}     \usepackage{booktabs}     \usepackage{lscape}     \usepackage{cases}     \usepackage{multirow}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{lscape}     \usepackage{longtable}     \usepackage{caption}     \usepackage[update,prepend]{epstopdf}     %\usepackage{mathpazo}     %\usepackage{eulervm}     %\usepackage{iwona}     \usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}     \usepackage[official]{eurosym}          \setlength{\textwidth}{6.5in}     \setlength{\oddsidemargin}{0in}     \setlength{\evensidemargin}{0in}     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}          \linespread{1.5}          \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}          \raggedbottom          \everymath{\displaystyle}           \newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}          \renewcommand\textfraction{.1}          \begin{document}              \begin{landscape}         % Table generated by Excel2LaTeX from sheet 'Sheet1'         \begin{table}[htbp]           \centering           \caption{Add caption}             \begin{tabular}{ccccccccccccc}             \toprule             Dependent variable: & $CoJPoD_{sov \ system|sov}$ &       & $\Delta CoJPoD_{sov \ system|sov}$ &       & $CoJPoD_{sov|sov \ system}$ &       & $CoJPoD_{bank \ system|sov}$ &       & $\Delta CoJPoD_{bank \ system|sov}$ &       & $CoJPoD_{sov|bank \ system}$ &  \\             \midrule                   &       &       &       &       &       &       &       &       &       &       &       &  \\                   & \textbf{(1)} & \textbf{(2)} & \textbf{(3)} & \textbf{(4)} & \textbf{(5)} & \textbf{(6)} & (7)   & (8)   & (9)   & (10)  & (11)  & (12) \\                   &       &       &       &       &       &       &       &       &       &       &       &  \\             Constant & -11.116*** & -10.212*** & -6.668*** & -5.740*** & 13.194*** & 13.903*** & -7.270*** & -7.551*** & -6.224*** & -6.290*** & 16.927*** & 17.078*** \\                   & (-2.975) & (-3.600) & (-2.980) & (-3.000) & (3.634) & (3.570) & (-2.607) & (-2.931) & (-2.907) & (-3.312) & (4.759) & (3.880) \\             Market Ret (6 months rolling) (\%) & 0.001*** &       & 0.001*** &       & 0.000 &       & 0.000 &       & 0.000* &       & -0.000* &  \\                   & (3.065) &       & (3.696) &       & (-0.016) &       & (1.086) &       & (1.652) &       & (-1.862) &  \\             Market Vol (6 months rolling) (\%) & 0.008 &       & 0.009 &       & 0.008 &       & -0.008 &       & -0.002 &       & -0.001 &  \\                   & (0.696) &       & (1.143) &       & (0.464) &       & (-1.049) &       & (-0.301) &       & (-0.083) &  \\             Market Ret (1 month avg) (\%) &       & 0.025*** &       & 0.020*** &       & -0.020** &       & 0.011** &       & 0.012*** &       & -0.029** \\                   &       & (3.235) &       & (3.606) &       & (-2.118) &       & (2.283) &       & (3.247) &       & (-2.530) \\             Market Vol (1 month avg) (\%) &       & -0.020*** &       & -0.017*** &       & 0.001 &       & -0.010*** &       & -0.006*** &       & 0.004 \\                   &       & (-4.329) &       & (-5.025) &       & (0.105) &       & (-3.444) &       & (-2.804) &       & (0.449) \\             Log GDP & 0.913*** & 0.840*** & 0.550*** & 0.475*** & -1.180*** & -1.239*** & 0.602** & 0.626*** & 0.522*** & 0.529*** & -1.492*** & -1.505*** \\                   & (2.922) & (3.529) & (2.960) & (3.008) & (-3.878) & (-3.778) & (2.570) & (2.893) & (2.913) & (3.324) & (-4.890) & (-3.976) \\             Debt/GDP (\%) & 0.004*** & 0.004*** & 0.002** & 0.002** & 0.004* & 0.004* & 0.003*** & 0.003*** & 0.002** & 0.002** & 0.003 & 0.003 \\                   & (2.836) & (2.861) & (1.981) & (1.975) & (1.775) & (1.764) & (2.657) & (2.689) & (2.062) & (2.075) & (1.540) & (1.566) \\             Reserve/Debt (\%) & 0.069** & 0.071** & 0.043** & 0.045** & 0.075** & 0.073** & 0.051*** & 0.053*** & 0.036*** & 0.037*** & 0.057** & 0.055** \\                   & (2.512) & (2.372) & (2.130) & (1.964) & (2.405) & (2.367) & (2.974) & (3.099) & (2.746) & (2.803) & (2.204) & (2.202) \\             Term Spread (\%) & 0.042*** & 0.042*** & 0.038*** & 0.037*** & 0.012 & 0.015** & 0.012*** & 0.010*** & 0.009*** & 0.008*** & -0.003 & -0.002 \\                   & (6.331) & (6.990) & (7.131) & (7.323) & (1.330) & (1.985) & (4.036) & (4.962) & (3.790) & (5.111) & (-0.248) & (-0.186) \\             VSTOXX (\%) & 0.004*** & 0.004*** & 0.003*** & 0.003*** & 0.008*** & 0.008*** & 0.003*** & 0.003*** & 0.001*** & 0.001*** & 0.007*** & 0.007*** \\                   & (4.920) & (4.380) & (4.450) & (3.916) & (7.650) & (8.089) & (6.285) & (6.200) & (3.514) & (3.497) & (5.211) & (6.388) \\                   &       &       &       &       &       &       &       &       &       &       &       &  \\             Bank fixed effects & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes   & Yes \\             No. of observations & 620   & 620   & 620   & 620   & 620   & 620   & 620   & 620   & 620   & 620   & 620   & 620 \\             Adjusted R\^2 & 0.728 & 0.720 & 0.774 & 0.761 & 0.822 & 0.822 & 0.718 & 0.721 & 0.772 & 0.774 & 0.784 & 0.785 \\             \bottomrule             \end{tabular}%           \label{tab:addlabel}%         \end{table}%              \end{landscape}     \end{document}      Does anyone have any ideas as to how I can fit this table nicely on a landscape A4 page? For the current code, columns (7) onwards does not fit onto the page. I have tried `\scalebox` however that makes the numbers so small that it's barely readable. Any suggestions would be appreciated. EDIT: ![enter image description here](http://i.stack.imgur.com/oJpbU.png)


title: How to draw checkmark inside a colored circle in latex?

text: Referring to this question, how can I draw a checkmark inside a solid circle as shown as a picture? Regards ![http://i.stack.imgur.com/ZefqB.png](http://i.stack.imgur.com/ZefqB.png)


title: Impressive overview page and beamer handout mode

text: I've been playing with Impressive. It allows you to do all sorts of funky eye- candy things. The overview page feature is useful, but it's awkward if you have many slides to one frame. The overview contains one page for each _page_ of the PDF. It would be nice if I could automatically get a list of which pages are supressed by the `handout` option and pass that to impressive to have them ignored by the overview page. I'm sure this is a feature that will be put into Impressive soon, but for now, is there a hacky way to get a list of pages that `handout` ignores?


title: How can I put a line above a section heading and prevent a page break between?

text: We have designed a class for some journal. We wanted our **section titles** to be separated by a horizontal line from the previous line. Here is the code:               \def\section{%         \vskip 1.2\@bls%         \hrule height 1pt%         \@startsection{section}{1}{\z@}{-1pt}{1pt}{\normalfont\large\bfseries}%     }      There are two problems, though:   1. Sometimes, when a page (or column) ends, the horizontal line remains at the preceding page (or column), and the paragraph title is printed on the new page (or column). I read something about setting some **penalty** value to fix this, but I wasn't successful.   2. We like our section titles to be **aligned left** , but LaTeX **justifies** and **hyphenates** them. Adding the command `\flushleft` changed nothing. * * * ### Edit: Using **Stefan Kottwitz** 's excellent answer, I changed the above code as follows. Unfortunately, it still does not work: LaTeX typesets the section heading after the horizontal line, without any line/paragraph break whatsoever.               \def\section{%         \begin{minipage}{7cm} %         \vskip 1.2\@bls%         \hrule height 1pt%              \raggedright\@startsection{section}{1}{\z@}{-1pt}{1pt}{\normalfont\large\bfseries}%         \protect\end{minipage}%     }


title: Multiple colour themes in one beamer presentation

text: I'm preparing a single seminar talk on three more-or-less unrelated results. In order to visually separate these results, I wanted to give each one a different (custom) colour theme for the corresponding beamer slides. I know I could make three different presentations and stitch their pdf output together, but I'd prefer not to do this. So, my question is: > Is there any way to switch colour themes partway through a beamer document?


title: A dynamic variable as content of a glossary entry

text: Based on the macro defined here, I would like to use it to create a glossary with a variable in the description. Here is my MWE:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{glossaries}     \makeglossaries      \newcommand\referenceSente{}      \newcommand{\defReferenceSente}[1]         {\gdef\referenceSente{#1}}           % MACRO FOR DEFINITION           \newcommand{\keyDef}[2]{%         %CREATE THE GLOSSARY ENTRY         \newglossaryentry{#1}{name={#1},description={%             #2\\(\referenceSente)             }}         % PRINT THE DEFINITION         \textbf{\gls{#1}} : \textit{#2}\par\vspace{.3cm}     }     \newenvironment{myEnvironment}[1]{\defReferenceSente{#1}}{\par}          \begin{document}          \begin{myEnvironment}{firstReference}     \keyDef{first term}{first definition}     \end{myEnvironment}          \begin{myEnvironment}{secondReference}       \keyDef{second term}{second definition}     \end{myEnvironment}          \printglossaries     \end{document}      With the result : ![MWE](http://i.stack.imgur.com/7lMBj.png) The command `\keyDef{<term>}{<definition>}` serves to create a definition which is 1) printed in the document, and 2) added to the glossary, followed with the current value of the variable `referenceSente`, in parentheses. The problem is that for the first entry of the glossary, the content inside the parentheses should (firstReference) instead of (secondReference). It seems that when the code is compiled, the glossary uses the last very value of the variable for all the items, instead of the value it had when the definition was declared. I have no idea how to "ask the glossary" to use the correct value, instead of the last recorded in the document.


title: Incorrect Reference Link

text: I have 2 equations. When I use `\ref{}` for the second equation, it gives the correct number but directs to the wrong place. How can I fix this? Thanks               \documentclass[12pt]{article}     \usepackage{amsmath}     \numberwithin{equation}{subsection}     \usepackage{hyperref}     \begin{document}     \section{Chapter 16}     \subsection{16.2}     \begin{equation}     \int_{C}f(x,y)ds=\int_{a}^{b}f\left(x(t),y(t)\right)\cdot |\vec{r}\,'(t)|\cdot dt     \label{2d}     \end{equation}     \subsection{16.3}     See \ref{2d}     \subsection{16.6}     \begin{equation}     |\vec{r}_x\times \vec{r}_y|=\sqrt{1+\left(\dfrac{\partial f}{\partial x}\right)^2+\left(\dfrac{\partial f}{\partial y}\right)^2}      \label{area}     \end{equation}     \subsection{16.7}     See \ref{area}     \end{document}


title: Delayed execution when writing to ToC in amsart

text: Consider the following example using the `amsart` document class:               \documentclass{amsart}% http://ctan.org/pkg/amsart     \newcommand{\addtotoc}[1]{\addtocontents{toc}{#1}}          \begin{document}          \tableofcontents     \section{First section}     \addtotoc{abc}     \section{Second section}     \subsection{First subsection}     \addtotoc{def}     \subsection{Second subsection}     \end{document}      The document class `amsart` seems to exhibit a delay in processing content to the table of contents; here is the `.toc` file's content:               \contentsline {section}{\tocsection {}{1}{First section}}{1}     abc     \contentsline {section}{\tocsection {}{2}{Second section}}{1}     def     \contentsline {subsection}{\tocsubsection {}{2.1}{First subsection}}{1}     \contentsline {subsection}{\tocsubsection {}{2.2}{Second subsection}}{1}      ![ToC](http://i.stack.imgur.com/4fdrm.png) Why does the entry `abc` end up after the first section (as expect), but `def` does not end up after the first subsection?


title: How to make the space between figures on a line small when using command 'figure'?

text: \begin{figure}[H]         \centering         \subcaptionbox{}{\includegraphics[width=6cm,height=3cm]{gaussian.eps}}         \subcaptionbox{}{\includegraphics[width=6cm,height=3cm]{star.eps}}         \subcaptionbox{}{\includegraphics[width=6cm,height=3cm]{heart.eps}}         \label{fig:exmmmf}     \end{figure}      I want these three figures one by one stay closer?


title: Multiple parents for entries with `glossaries`

text: I am using the package `glossaries` to produce an index. I am using `sub- entries`and the field `parent`in my glossary entries definition. In order to ease the use of my index I would like some entries to be displayed several times and in different places. My first try was to simply declare in the glossary entry that the entry has severyl parents by setting               parent={key1,key2}      However it seems that this is not supported by the `glossaries` package. Is there any other way?


title: BibTeX file is not compatible with Springer svmono class

text: In the Springer provided template for a monograph, I am unable to use a BibTeX file for the references. I have made a `.bib` file, named `DG_Refrences`, containing all the details of necessary references. Now in the Springer provided template for a monograph, named `book.tex`, before the last line `\end{document}`, I added               \bibliographystyle{havard}     \bibliography{DG_References}      My Tex file reads as follows: %----------------------------------------------------               \documentclass[graybox,envcountchap]{SVmono}                                 % choose options for [] as required from the list                            % in the Reference Guide          \usepackage{mathptmx}     \usepackage{helvet}     \usepackage{courier}     \usepackage{type1cm}          \usepackage{makeidx}         % allows index generation     \usepackage{graphicx}        % standard LaTeX graphics tool                                  % when including figure files     \usepackage{multicol}        % used for the two-column index     \usepackage[bottom]{footmisc}% places footnotes at page bottom                                  % see the list of further useful packages                                  % in the Reference Guide      %---This portion I have added, but on a click the hyperlinks does not give any link to go--               \usepackage{natbib}                  \usepackage[pdfpagelabels=true,plainpages=false,colorlinks=true,         linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}      %-----------------------------------------------------------------               \makeindex             % used for the subject index                            % please use the style svind.ist with                            % your makeindex program                         \begin{document}          \author{Authors Name(s)}     \title{Title goes here}          \maketitle          \frontmatter          \include{dedic}     \include{foreword}     \include{preface}     \include{acknow}          \tableofcontents          \include{acronym}               \mainmatter     \include{part}     \include{Chapter1/Chapter1}     \include{appendix}               \backmatter     \include{glossary}     \include{solutions}                    \bibliographystyle{havard}     \bibliography{DG_References}               \printindex     \end{document}      %---------------------------------------------------- But when I cite some reference, like `\cite{wu2007duality}`, the generated pdf file is giving a `?` symbol. Please help. I am also unable to use the `hyperref` package in the Springer template.


title: Link biblatex bibliography to citations without printing backrefs

text: In my biblatex bibliography, I have numbers like [1] next to my references. When I click on the citation [1], it links to the bibliography [1] (thanks to the hyperref package). Is there a way to have such a link in the opposite direction? So from the bibliography, I can quickly see where a reference was cited? This solution is almost what I want, but it requires that the citation page numbers be printed, and I don't want that. I realize this wouldn't make sense if I cite a reference more than once, but that's rarely the case for me.


title: Number equations within array

text: I want to number sub-items of an array I have in order to refer to the right equation and not to the set of equations (SEE the pictures attached): Figure that should call 1.35a, 1.35b, 135.c, 1.36a, 1.36b and 1.36c (and should have also sublabels): ![vv](http://i.stack.imgur.com/kvETS.png). Picture that should have sublabels: ![vv](http://i.stack.imgur.com/9Ubo6.png) I found two similar posts (like Subequations and Sub-numbering equations within array) but they don't apply and I couldn't implement in my example. I tried to replace my "equation" entries for subequations and label each line but it didn't work. What should I try? An example of the array I have so far is (the example is for 1.34):               \begin{equation}      \left\{         \def\arraystretch{1.8}       \begin{array}{l}     \frac{\partial r}{\partial l} = \frac{-2r\cos\theta}{R_E\sin^3\theta} \left( \frac{r^2\sin^3\theta}{R_E(1+3\cos^2\theta)}\right) = \frac{-2r^3\cos\theta}{R_E(1+3\cos^2\theta)} \\          \frac{\partial r}{\partial q} =  \frac{R^2_E\sin\theta}{r^2} \left( \frac{r^2\sin^3\theta}{R_E(1+3\cos^2\theta)}\right) = \frac{R_E\sin^4\theta}{(1+3\cos^2\theta)} \\          \frac{\partial r}{\partial \xi} = 0          \end{array}          \right.     \label{sc_parar}     \end{equation}


title: Decimal values in polar pie chart

text: I have plotted a polar pie chart in LaTeX. Here is the code:               \begin{document}          \begin {tikzpicture}[thick]     \tikzstyle{every node}=[font=\LARGE]          \pie[polar, text=inside]{10.5/A, 20.8/B, 30.2/C, 40.4/D}               \end{tikzpicture}     \end{document}      I would like to add decimal values instead of integer. Like > 10.45, 20.78, 30.67, 40.10. How can I do that?


title: Creating organized table of content for a randomly organized content

text: I am working on an ever evolving document, which will contain my notes on certain topics which I learned outside school. I would like to use Latex to document it as it can sometimes contains math and on the side not it just looks better. Here is the an example: > **Topic** : What not to do in Latex. > > Tag: latex, > > Content: My tip, learning on how not to screw up things in latex. > > * * * > > _**Topic_** : Do not short +ve and -ve of battery. > > Tag: Engineering > > Content: Never do this, as you could die. > > * * * > > **Topic** : Always use jack-stand when changing oil > > Tag: Cars > > Content: Seriously don't do this, you could kill yourself. > > * * * > > **Topic** : Latex again > > Tag: Latex > > Content: Some new content, notes, tips on latex. etc. etc. The sections above are in random order thus I am planning to use sections*{Topic}. However I would like to create a hyperlinked table of content to organize them which should look like following: > Cars > >   1. Always use jack-stand when changing oil. > > > Latex > >   1. What not to do in Latex. >   2. Latex again > > > Engineering > >   1. Do not short +ve and -ve of battery. > … and so on.   In above example I used only one tag per topic, but multiple tags should contain the topic listed in each one of them (duplicate content) So questions I have:   1. Is this doable in Latex?   2. Is there an alternate way of organizing ever-evolving document with content in random order?  One solution I have is to manually create the Tags as sections and content as subsections, but I can see this getting tedious as the document length increases. Thus looking for an automated solution.


title: Expl3 syntax highlighting for TeXworks

text: Does anyone have a syntax pattern for TeXworks’s `syntax-patterns.txt` that will correctly highlight Expl3 code? _I.e._ , something that will recognize that the entirety of `\cs_new:Npn` is a command sequence—although highlighting the `:Npn` suffix differently might not be a bad idea.


title: Create element in pdf that doesn't print to paper

text: I'm creating a fancy header with hyperlinks (see here) for a large document. However, if/when this document is printed, this header is not useful and uses up ink and space. Is it possible to include an element in a pdf file such that it is not actually printed to paper but does display on screen?


title: Prefix for \externaldocument references in \cleveref

text: The question Special case for last element with \foreach manually changed the references, and added the ability to have a prefix on references. Can I do the same thing using `\cleveref`? (Note: This is a `\cleveref` version of the question Automatically add prefix to references from another document?) **Approach 1:** Have a `\crefex`, or renaming of `\cref`, which allows for the addition of a prefix. For example               documentclass{article}     \usepackage{cleveref, xr}     \crefname{equation}{}{}     \crefname{figure}{figure}{Figure}     \newcommand{\crefex}[2][]  { %     \cref{#2} %But modify to add #1 as a prefix...     }     \begin{document}         \section{sec1}\label{sec:sec1}         \begin{equation}    1 = 1 \label{eq:eq1}    \end{equation}         \begin{figure}\caption{fig1}\label{fig:fig1}\end{figure}     \crefex[TA.]{sec:sec1}, \crefex[TA.]{eq:eq1}, \crefex[TA.]{fig:fig1}     \end{document}      which should output as the references if `\crefex` was completed.               section TA.1, (TA.1), figure TA.1      **Approach 2:** Alternatively, it could autodetect if there is an external reference, and add in some sort of a prefix defined as a variable? Create a file called `external_document.tex` with the following text and compile it a few times.               \documentclass{article}     \usepackage{cleveref}     \crefname{equation}{}{}     \crefname{figure}{figure}{Figure}     \begin{document}         \section{sec1}\label{sec:sec1}         \begin{equation}    1 = 1 \label{eq:eq1}    \end{equation}         \begin{figure}\caption{fig1}\label{fig:fig1}\end{figure}         \cref{sec:sec1}, \cref{eq:eq1}, \cref{fig:fig1}     \end{document}      Then create another file with:               \documentclass{article}     \usepackage{cleveref, xr}     \crefname{equation}{}{}     \crefname{figure}{figure}{Figure}     \externaldocument[EX.]{external_document}     \begin{document}         \section{sec1}\label{sec:sec1}         \begin{equation}    1 = 1 \label{eq:eq1}    \end{equation}         \begin{figure}\caption{fig1}\label{fig:fig1}\end{figure}         \cref{sec:sec1}, \cref{eq:eq1}, \cref{fig:fig1}         \subsection{External References}         \cref{EX.sec:sec1}, \cref{EX.eq:eq1}, \cref{EX.fig:fig1}     \end{document}      This will correctly spit out both the internal and external references. How might we add in autodetection of the external references which adds the prefix of the `\externaldocument` as described above?


title: White space unexpectedly lost when trimming a string

text: I'm trying to follow the example given here               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \seq_new:N \l_ae_insertQuotedMatter_seq     \tl_new:N  \l_ae_insertQuotedMatter_trash_tl     \NewDocumentCommand{\removeQuotes}{m}         {           \seq_set_split:Nnn  \l_ae_insertQuotedMatter_seq {} {#1}           \seq_pop_left:NN   \l_ae_insertQuotedMatter_seq \l_ae_insertQuotedMatter_trash_tl           \seq_pop_right:NN  \l_ae_insertQuotedMatter_seq \l_ae_insertQuotedMatter_trash_tl           \use:x  { \seq_map_function:NN \l_ae_insertQuotedMatter_seq \exp_not:n }         }     \ExplSyntaxOff     \pagestyle{empty}     \begin{document}          \removeQuotes{"Hello World"}          \end{document}      But this does more than I want. The white space is lost. Two provisos: (1) I would prefer not to have to write `\removeQuotes{"Hello\ World"}`. Also, (2) I would prefer not to have to load an entire new package (such as `xstring`) just to accomplish this one task. **UPDATE** I've also tried something along the lines of:               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \NewDocumentCommand{\removeQuotes}{m}         {           \tl_reverse:n { \tl_tail:n { \tl_reverse:n { \tl_tail:n { #1 } } } }         }     \ExplSyntaxOff     \pagestyle{empty}     \begin{document}          \removeQuotes{"Hello World"}          \removeQuotes{"Hello\ World"}          \end{document}      But I get the error:               ! Argument of \tl_tail:n has an extra }.     <inserted text>                      \par      l.12     \removeQuotes{"Hello World"}          ?       Any suggestions?


title: argument in \begin{subtable}

text: I use `\begin{subtable}{.5\textwidth}...\end{subtable}` to produce two (or more) subtables side by side (from the `subcaption` package). But I don't understand what `{.5\textwidth}` means. I tried different values, it looks like it is related to the position of the subtables or the spacing between them. I tried to find the documentation for it on Google, but no luck. Where I can find it or can anyone please explain it a little for me?


title: How to calibrate memoir's \sloppybottom and \flushbottom behavior?

text: Memoir provides the command `\sloppybottom` which "lets TeX put an extra line at the bottom of a page to avoid a widow on the following page." [1] However it also seems to set `\raggedbottom` which is not something I want. If I add a `\flushbottom` after the `\sloppybottom` command I get the somewhat strange behavior of TeX adding an extra line at the top of a page to avoid a widow. Is there a way to get TeX to fill the page like with `\flushbottom` when using `\sloppybottom` but still having the top of all pages aligning? (That is, the bottoms would align to except when one extra line is need to avoid widows)


title: How to create an unnumbered theorem?

text: I'm looking for a way to create a new theorem without numbering. I found Theorem without numbering and tried the accepted answer, but I get the error "Command * already defined". This is the code I'm using:               \documentclass[11pt]{article}          \usepackage{mdframed}          \newtheorem*{hulprule}{Rule settings}     \newenvironment{drule}[3]         {\begin{mdframed}[backgroundcolor=lightgray]\begin{hulprule}\begin{enumerate}[-]                         \item \textbf{Events}:{#1}                         \item \textbf{Conditions}:{#2}                         \item \textbf{Actions}:{#3}}         {\end{enumerate}\end{hulprule}\end{mdframed}}          \begin{document}          \begin{drule}             {test}             {test}             {test}         \end{drule}          \end{document}      Strangely enough, the _drule_ environment works perfectly without the `*`. How can I solve this?


title: how to draw plots without data in tikz?

text: I want to draw this plot. I know how to do it with data. But here I don't have any data. And I want to draw this. How would I do it? ![enter image description here](http://i.stack.imgur.com/ikufc.png)


title: TikZ: vertically aligning text in nodeparts

text: I can't seem to vertically align text in different nodeparts of the same node. This MWE               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}     \begin{document}          \begin{tikzpicture}     \tikzstyle{bplus}=[rectangle split, rectangle split horizontal, rectangle split ignore empty parts,draw]     \tikzstyle{every node}=[bplus]     \node {\huge{I} \nodepart {two} \huge{h} \nodepart {three} \huge{g} \nodepart {four} \huge{x} } ;     \end{tikzpicture}          \end{document}      gives: ![enter image description here](http://i.stack.imgur.com/ucg66.jpg) I'd like to have the text aligned on some baseline, preferably centred as if a complete word. I tried               \begin{tikzpicture}[every node/.style = {anchor = base}] ...      amongst other things, but it didn't work.


title: Drawing a multiplexer with tikz

text: I want to draw a logical circuit with a multiplexer. Is there any symbol provided by the TikZ package? I'm using the TikZ library `circuits.logic` to draw logical circuit symbols. Or is there any possibility to built a multiplexer by myself and provide the number of inputs I need (so I can connect them to other logical symbols)?


title: error using breqn : Double subscript \mathsub

text: I changed to using 2 columns, and many equations do not fit any more. I heard about breqn package, so I am trying to see if it will help. Using breqn package on auto-generated code, which compiles OK with `\begin{align*}` and `\end{align*}` I am getting an error which I do not understand. MWE is below. Please note the line of code here is auto-generated. So I kept it as is. There was other lines, but kept the one giving the error This works:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \begin{document}     \begin{align*}     q^{\prime}(t) &= \operatorname{Re}\left(  \overset{\hat{B}}{\overbrace{\left(  \omega_{n}q_{0}e^{i\frac{\pi}{2}}+q_{0}^{\prime}\right)  }}e^{i\omega_{n}t}\right)     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Lq7Pt.jpg) While this gives the error. I used `dmath` and removed the `&`, that is all.               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{breqn}     \begin{document}          \begin{dmath}     q^{\prime}(t) = \operatorname{Re}\left(  \overset{\hat{B}}{\overbrace{\left(  \omega_{n}q_{0}e^{i\frac{\pi}{2}}+q_{0}^{\prime}\right)  }}e^{i\omega_{n}t}\right)          \end{dmath}     \end{document}      error               (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd)     ! Double subscript.     <recently read> \mathsub           l.9 ...^{i\frac{\pi}{2}}+q_{0}^{\prime}\right)  }}                                                       e^{i\omega_{n}t}\right)     ?       **question:** What do I need to fix the above so I can use breqn? Using Tex Live 2012 debian package on Linux mint.


title: How to eliminate the square?

text: To illustrate the movement of a horse on a chessboard, I used the following commands. How to eliminate the square that appears to the right of the figure?![enter image description here](http://i.stack.imgur.com/O4bAA.jpg) ![enter image description here](http://i.stack.imgur.com/Rt45a.jpg)


title: Disabling the draft option in a package

text: Within a package I'm making, I want ignore the default draft behavior and write my own. I have tried:               \DeclareOption{draft}{     MYCOMMANDS     ...     \OptionNotUsed     }     \ProcessOptions      If `draft` is used, my commands are run, but all other features of the `draft` option (e.g. disabling images and hyperlinks) are still enabled. I want to disable the `draft` option from the document class level from my package and prevent it from being passed to any packages. Is this possible to do from my package?


title: Using tikz command inside tikzpicture environment (alignment problem)

text: This is a followup question to Expandable nested boxes with TikZ. When using the `\tikz` command inside the `tikzpicture` environment, the positioning of the contents is altered. Here are the two examples: ![enter image description here](http://i.stack.imgur.com/jTka1.png) And the code responsible:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{backgrounds,shapes.multipart}          \begin{document}          Here we have a     \begin{tikzpicture}[show background rectangle]       \node[draw, rectangle split, rectangle split parts=2] at (0,0)         { foo%           \nodepart{two}             bar         };     \end{tikzpicture} picture.          Here we have a     \begin{tikzpicture}[show background rectangle]       \tikz{         \node[draw, rectangle split, rectangle split parts=2] at (0,0)           { foo%             \nodepart{two}               bar           };       }     \end{tikzpicture}     picture.          \end{document}      The lower left corner of the node in the second example is just right in the middle of the picture, so there must be a very good reason it is there. :-) Which one?


title: Citations across tex files

text: I have a strange problem that I can't resolve. In my main *.tex file I have               \input{Chapter1VB.tex}     \input{vbq.tex}     \newpage     \input{Chapter2VB.tex}      In the first tex file I have               \begin{thm}\label{thm1.3}      In the third I have               (which exists by Theorem~\cite{thm1.3}      No matter how many times I 'latex' or 'pdflatex' I keep getting a warning that thm1.3 is undefined. Any thoughts?


title: How to linebreak part ToC entries using tocloft/titletoc and the book class

text: I'm currently writing a LaTeX document in the book documentclass. In my ToC I want the actual titles of certain entries (parts in my case) to come in a newline after a generic name of the section-type ('Part') followed by the number ('I', 'II', ...), so it should look like this: > Part I > > Title of first part > > Part II > > Title of second part I'm using the tocloft package to customize the ToC and its manual actually has an example that excactly describes how to achieve this. Apparently, for whatever reason, the newline command (see MWE) has no effect with the book class. Any suggestions on what is the problem here?               \documentclass{book}     \usepackage{tocloft}     \renewcommand{\cftpartpresnum}{\partname\ }     \renewcommand{\cftpartaftersnumb}{\\ }     \begin{document}       \tableofcontents       \part{Title of first part}       \part{Title of second part}     \end{document}      EDIT 1: I've followed @locksteps advice and tried to implement a solution with the `titletoc`package. However, now I'm stuck with the problem that for part entries for whatever reason the lablenummer is always attached to the actual title, for chapter and so on one can call the label independently               \documentclass{book}     \usepackage{titletoc}     \titlecontents{part}[0pt]{}{}{\Large\bfseries Part\\*}{}[]     \titlecontents{chapter}[0pt]{}{Chapter \thecontentslabel\\*}{}{}[]     \begin{document}        \tableofcontents        \part{The first part}        \chapter{The first chapter}     \end{document}


title: Bad intersection of lines in TikZ

text: Consider the following:               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[line width = 4]     \coordinate (a) at (0,0);     \coordinate (b) at (1,0);     \coordinate (c) at (1,1);     \draw (a) -- (intersection of a--b and b--c);     \draw (c) -- (intersection of a--b and b--c);     \end{tikzpicture}     \end{document}      Which produces: ![enter image description here](http://i.stack.imgur.com/4i8Yj.png) How can I fill the corner? Adding `[cap=rounded]` didn't solve the issue. I know that I could do something like `\draw (a) -- (b) -- (c)` but I _need_ to obtain the same effect using intersection. Thanks! **EDIT 1:** I try to figure out how to handle two _independent_ line segments and their intersection. For example:               \begin{tikzpicture}[scale=4,line width=7]     \coordinate (a1) at (0,0);     \coordinate (b1) at (1,1);     \coordinate (b2) at (1,-1);     \draw (b1) -- (b2);     \foreach \x in {0,20,30,40,45}     {     \coordinate (a2) at (\x:10);     \draw (a1) -- (intersection of a1--a2 and b1--b2);     }     \end{tikzpicture}      Here, I don't know in advance (well I do, but for the sake of the question I don't), where the two segments intersect and whether or not the intersection point is a common end point. ![enter image description here](http://i.stack.imgur.com/oodNT.png)


title: Section numbers behind section title

text: I'm an absolute newbie to TeX. I'm trying to get the section numbers of a section to be at the end of the title. In other words, something like "Question 4.2". Instead I get "4.2 Question 4.2" which is not great. Also, the numbers should follow with indentation. For example:               Question 4.2       4.2.1 ....       4.2.2 ....      Any ideas how I can accomplish this?


title: Picture & box overlap

text: In my code, I have:               \newcommand{\headwarning}[1]%     {\needspace{4\baselineskip}\colorbox{darkboxcolor}{\parbox{\linewidth}{\color{lighttextcolor}\textbf{#1}}}\nopagebreak[0]\vspace{0mm}}%     \newcommand{\warning}[1]%     {\vspace{2px}{\textbf{#1}}\vspace{4px}}      Colors are defined elsewhere. And in the text section:               \begin{wrapfigure}{r}{3cm}     \begin{tabular}{@{}c@{}}     \textcolor{blue}{\rule{3cm}{3cm}} \\% Dummy image replacement     \end{tabular}     \end{wrapfigure}          \headwarning{Lorem ipsum dolor sit amet}          \warning{Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}      But the headwarning box covers the picture on the right. How can I shorten this box correctly? As an end result, I'm after something like this: ![enter image description here](http://i.stack.imgur.com/d2JKU.png)


title: Why Different Commands for Seemingly Similar Tasks?

text: Take a look at the following list:   * `\textit`, `\it`, `\emph`, `\itshape`, `\mathit`   * `\textbf`, `\bf`, `\bfseries`, `\mathbf`   * ... One might say, for instance, that:   * `\mathbf` and `\mathit` are for math mode, while the others are for normal mode. Or   * `\bf` and `\it` are for plain TeX and obsolete, while the others are for LaTeX. However, my real question is: What was the need to redefine a command? Couldn't the normal mode commands be carried over to the math mode, or plain TeX commands be carried over to LaTeX? PS: Perhaps there are other differences which I don't know. Please mention them in your answer, too.


title: Coloring columns in a table with colortbl and booktabs

text: I have created a rather complicated table with some columns that I want to color. For the table, I chose the `booktabs` and `tabularx` packages. For coloring the columns, I use `colortbl`. The problem that I have is that `\midrule`s show a white space, and the result does not please me at all. Here is a MWE:               \documentclass[a5paper]{article}     \usepackage{xcolor}     \usepackage{booktabs,colortbl,tabularx}     \begin{document}     \pagestyle{empty}     \begin{table*}[!htb]       \centering       \begin{tabularx}{4cm}{>{\columncolor{gray}}cX>{\columncolor{gray}}c}         \toprule         1&2&3\\         \midrule         one&two&three\\         one&two&three\\         \cmidrule{2-3}         one&two&three\\         \midrule         un&deux&trois\\         \bottomrule       \end{tabularx}       \caption{caption}     \end{table*}     \end{document}      ![latex result](http://i.stack.imgur.com/MCb53.png) Looking around I found that `booktabs` supports `colortbl` in its latest version. However, it seems that it only supports colored horizontal lines. I tried not using `booktabs` and replacing `midrule`s for `hline`s. My huge table looks too crowded (once you booktab, you never go back, I guess). My question is: is it possible to achieve a correct coloring in `midrule`s ? Since I fear that the response is no: what low-cost recommendation do you have in order to color the columns of my table? (When I say low-cost, I mean that I do not want to re-write my table contents)


title: Is LaTeX scriptable through AppleScript and to what extent?

text: Before I go full into this software and explore it thoroughly, I have some questions that need to be answered. How far can I automate _or_ script LaTex using AppleScript? I am choosing applescript because of its Human-Language syntax and native intent on the Mac platform, integrating applications. There are many applications I am learning for my life's vocation. I understand there are a range of other possible scripting languages such as perl, ruby, python and others; I have been looking at LaTex for a while now because I consider myself to be a citizen scientist - also the earth is not exactly in the best shape at this time. If there any additional resources all of you can recommend _in addition to_ the use of AppleScript already present, I would also greatly appreciate that.


title: How to make gray-colored text in ConTeXt beta?

text: As I know, in ConTeXt stable, one can use `\color[gray:3]{}` to display the text inside the brackets with a very light gray color, e.g.:               \setupcolor[rgb]     \starttext         \color[gray:3]{This is some text.}     \stoptext      After upgrading to ConTeXt beta, this no longer works in my document. `\color[red]{}`, however, does change the text to red.   * Was the syntax for creating gray colors changed in recent betas?   * How can I create a range of gray colors (from white to black) using numbers in ConTeXt?


title: latex \right] not show up in pdf

text: The following is a piece of LaTeX code displaying a function. But in the PDF file generated , the right bracket "]", which is last thing in the equation, does not show up. However, if I replace "\right]" with just "]", then the right bracket show up. But I want the larger right bracket "\right]", not the small one "]". This code has another problem: the two fractions have different sizes! The first fraction is taller and the second fraction is shorter. The second fraction turns out to have smaller font size on the PDF, which I do not like. Could anyone please point out to me how I can insert a large right bracket and have all the fractions use the same font size as those non-fractions (i.e. fractions should be twice the height as those non-fraction numbers)?               $\textbf{E} = E_0 \left[\frac{1}{\sqrt{2}} \textbf{\hat{x}} cos(kz-\omega t) + \frac{i}{\sqrt{2}} \textbf{\hat{y}} cos\left(kz-\omega t+\frac{\pi}{2}\right)\right]$      ![enter image description here](http://i.stack.imgur.com/5iUxb.png)


title: How to control label positions in tikz-euclide

text: My goal in trying to learn `tkz-euclide` is so that I can be able to get an arbitrary point from a circle and define the other elements of my figure from that. So far, from what I can understand from the examples given in the manual (I don't know any French), I came up with the following code.               \documentclass[tikz]{standalone}          \usepackage{tkz-euclide}     \usetkzobj{all}           \begin{document}     \begin{tikzpicture}         \tkzDefPoint(0,0){O} % Defines a point         \tkzGetRandPointOn[circle=center O radius 1.5cm]{A} % Gets random point of the circle with center at O and radius 1.5cm         \tkzDrawCircle(O,A) % Draws the circle         \tkzDefPointBy[rotation=center O angle 100](A) % Defines a point...             \tkzGetPoint{C} % named C         \tkzDefPointBy[rotation=center O angle 78](A) % Defines a point...             \tkzGetPoint{B} % named B         \tkzDrawPoints(O,A,B,C) % Draws dots         \tkzDrawSegments(C,B B,A A,O O,C) % Draws the segments         \tkzLabelPoints(O,A,B,C)    % Labels the points         %\node [below] at (O) {$O$};         %\node [above] at (A) {$A$};         %\node [left] at (B) {$B$};         %\node [left] at (C) {$C$};     \end{tikzpicture}     \end{document}      This is nice. But the random positioning of the points screws up the positioning of the labels. (Try compiling several times to see.) I have tried setting up the nodes through the usual `\node` commands but I still end up with the same problem.How can I control the behavior of the labels so that they would not overlap with other elements of the figure? ## Edit I read this mod comment on my list of questions: _Have you considered accepting an answer or starting a bounty for this question?_ Indeed, I have considered accepting an answer since the solution now looks trivial with `tikz` but I would still like to see a `tkz-euclide`-based solution, too. So I thought I would prolong accepting an answer for a short while. So how about starting a bounty instead? Well, why not?


title: Best ratios of number of letters per line and of number of lines per page

text: I am actually writing a master thesis in LaTeX but I didn't really like the default page style of the document style book. Therefore I tried to make my own page style and I resized manually the margins. Now comes the question: is there a best ratio of number of letters per line (I count a space as a letter), and number of lines per page if the size of the page is a classical A4 format in order to get the text as readable as possible? Also what should be the best size of the police? I have not really find a precise information on this subject so far. Moreover, I tried to determine for myself those ratios using books and articles, but it seems that those ratios differ widely depending on the size of the pages, on the publisher, on the author... Actually, a page of my thesis counts between 70 and 75 letters per line (in 12pt) and between 38 and 42 lines per page. However I am not totally satisfied of those settings. On the one hand, I think that a page is too heavy to read with these settings (which maybe depends also a bit on the size of the letters), on the other hand I want a page to contain enough informations: somehow I don't want a reader to have to turn continuously the pages, since this "breaks" the reading. I know that one could always argue that this is a subjective question, but I am almost sure that there are very accurate such ratios and that this question has already been studied scientifically. Does anyone know a good reference for this problem? As usual, thanks in advance!


title: TikZ picture too tall

text: I am typesetting the following equation:               \documentclass[12pt]{article}     \usepackage{tikz}     \begin{document}          \begin{equation}     f\left(     \begin{tikzpicture}[scale=0.5]     \tikzstyle{every node}=[fill,shape=circle,minimum size=3pt,inner sep=0pt];     \path (0:0cm) node (center) {};     \path (0:1cm) node (v1) {};     \path (72:1cm) node (v2) {};     \path (2*72:1cm) node (v3) {};     \path (3*72:1cm) node (v4) {};     \path (4*72:1cm) node (v5) {};     \draw (center) -- (v1)     (center) -- (v2)     (center) -- (v3)     (center) -- (v4)     (center) -- (v5)     (v1) -- (v2)     (v2) -- (v3)     (v3) -- (v4)     (v4) -- (v5)     (v5) -- (v1);     \end{tikzpicture}     \right)     \end{equation}               \end{document}        However, the brackets become almost twice the size of what is needed. Is there any way of removing the white space below the graph?


title: TabularX vertical alignment

text: Since the enumiten Package (and therefore leftmargin=*) doesnt work in custom environments, I was trying to trick a bit, doing the items in a table like this (don't ask..) :                 \documentclass[fleqn,10pt,twocolumn]{article} % Document font size and equations        \usepackage{tabularx}       \renewcommand\tabularxcolumn[1]{m{#1}}       \newcommand{\localtextbulletone}{{\raisebox{.45ex}{\rule{.6ex}{.6ex}}}}            \newenvironment{parameters}           {Parameters:\\            \tabularx{\linewidth}{>{\raggedright\arraybackslash}p{0.3cm}X@{}}    }           {\endtabularx}                \newcommand{\parameter}[2] %Name, Description       {\localtextbulletone & #1: #2\\}            \begin{document}       \begin{parameters}       \parameter{Test}{This is a long text to illustrate the alignment of the item...        blablabla long text long text long text long text long text long text long text long        text long text long text}       \end{parameters}      \end{document} I needed to set the tabularxcolumn to 'm' instead of 'p' for other tables in my document. In this case I would like to set it back to p, but only in this particular environment so the bullets are top aligned and not centered. If I try to just do the analoge `\renewcommand\tabularxcolumn[1]{p{#1}}`inside the environment, latex is not happy. How can I reset the tabularxcolumn just for this environment? Many Thanks in advance


title: Makefile that prevents tex directory from being cluttered with build output

text: I am using `xelatex`, `biber` and `makeglossaries` to generate my bachelor thesis. All of them are creating a huge amount of temporary files that are cluttering, not only my root document directory, but the whole directory structure of my thesis. Previously I've made extensive use of `find` and `rm` in a `clean` target of my `Makefile` to get rid of all the crap. Currently my idea was to to copy all the content that is needed to build the thesis in a `.build` subdirectory and `cd` into that directory inside the Makefile before beginning to compile. I tried to use `output-directory` switches of xelatex and biber (makeglossaries doesn't have one), but with no luck. That's why i want to generate the pdf inside a subdirectory, that i can safely remove with all the content, after the compilation and copying the created `pdfs`, using `rm -rf .build/*`. Here is the Makefile (the interesting part in the `screen` or `print` target, as you will):               #     # Makefile for Bachelorthesis     #     # @ supresses command output     #     # conditionals are not allowed to have a starting tab,      # otherwise they will be sent to the shell     #     DEBUG='true'     ROOT_DIR=$(shell pwd)     BUILD_DIR=$(ROOT_DIR)/.build     XELATEX_OPTS=-output-directory=$(BUILD_DIR)     BIBER_OPTS=--output_directory=$(BUILD_DIR)     .PHONY : clearscr clean screen print          all: copy_sources screen print copy_output          copy_sources:         rsync --verbose --checksum --recursive --human-readable --progress --exclude=output --exclude=.git* $(ROOT_DIR)/ $(ROOT_DIR)/.build          copy_output:         cp --update $(BUILD_DIR)/*.pdf $(ROOT_DIR)/output          screen:         @echo "Building screen version ..."         @cd $(BUILD_DIR)     ifeq ($(DEBUG) , 'true')         @echo "\n------------------ xelatex --------------------\n"              xelatex thesis $(XELATEX_OPTS) | grep --ignore-case warning         @echo "\n------------------- biber ---------------------\n"          biber thesis $(BIBER_OPTS)         @echo "\n--------------- makeglossaries ----------------\n"                  makeglossaries thesis         @echo "\n------------------ xelatex --------------------\n"          xelatex thesis $(XELATEX_OPTS) | grep --ignore-case warning          else         xelatex thesis $(XELATEX_OPTS) > /dev/null           biber thesis $(BIBER_OPTS) > /dev/null                   makeglossaries thesis > /dev/null            xelatex thesis $(XELATEX_OPTS) > /dev/null               endif          print:         @echo "Building print version ..."         cd $(BUILD_DIR)     ifeq ($(DEBUG) , 'true')         @echo "\n------------------ xelatex --------------------\n"          xelatex thesis_print $(XELATEX_OPTS) | grep --ignore-case warning         @echo "\n------------------- biber ---------------------\n"              biber thesis_print $(BIBER_OPTS)                 @echo "\n--------------- makeglossaries ----------------\n"          makeglossaries thesis_print         @echo "\n------------------ xelatex --------------------\n"              xelatex thesis_print $(XELATEX_OPTS) | grep --ignore-case warning            else         xelatex thesis_print $(XELATEX_OPTS) > /dev/null                     biber thesis_print $(BIBER_OPTS) > /dev/null                     makeglossaries thesis_print > /dev/null          xelatex thesis_print $(XELATEX_OPTS) > /dev/null                 endif          clean:         @echo "I will clean up this mess ..."         @rm -rf $(BUILD_DIR)/*         # remove the following commands, if the build was started in the BUILD_DIR successfully         @rm -f *.out *.nav *.snm *.toc *.log *.bcf *.bbl *.blg *.lof *.lol *.lot *.run.xml *.xdy *.glo *.glg *.gls *.idx *.ist *-blx.bib .*.bbl.swp *.mtc* *.maf         @find . -name \*.aux  -type f -delete         @find . -name \*.bbl  -type f -delete         @find . -name \*.bak  -type f -delete         @find . -name \*.blg  -type f -delete         @find . -name \*.fls  -type f -delete         @find . -name \*.fdb_latexmk  -type f -delete         @find . -name \*.vsdx  -type f -delete         @find $(ROOT_DIR) -name '*in Konflikt stehende*' -delete          clearscreen:         clear      This is the root directory of the document after compiling, a horrible amount of temporary garbage:                   abstract.aux     _dump        synctooutput.sh   thesis.lol   thesis.mtc6       thesis_print.gls   thesis_print.mtc2  thesis_print.run.xml     abstract.tex     frontpage    synctooutput.sh~  thesis.lot   thesis.mtc7       thesis_print.ist   thesis_print.mtc3  thesis_print.tex     affidavit.aux    header       thesis.aux        thesis.maf   thesis.mtc8       thesis_print.lof   thesis_print.mtc4  thesis_print.toc     affidavit.tex    LICENSE      thesis.bcf        thesis.mtc   thesis.mtc9       thesis_print.log   thesis_print.mtc5  thesis.run.xml     appendix         license.aux  thesis.glg        thesis.mtc0  thesis.out        thesis_print.lol   thesis_print.mtc6  thesis.tex     attachments      license.tex  thesis.glo        thesis.mtc1  thesis.pdf        thesis_print.lot   thesis_print.mtc7  thesis.toc     bibliography     Makefile     thesis.gls        thesis.mtc2  thesis_print.aux  thesis_print.maf   thesis_print.mtc8  tikz_pgf     bibtexEntry.tex  output       thesis.ist        thesis.mtc3  thesis_print.bcf  thesis_print.mtc   thesis_print.mtc9  todos.sh     content          README       thesis.lof        thesis.mtc4  thesis_print.glg  thesis_print.mtc0  thesis_print.out   variables     document.tex     resources    thesis.log        thesis.mtc5  thesis_print.glo  thesis_print.mtc1  thesis_print.pdf      It seems that xelatex and co are not using the directory that was set by the _output-directory_ -switch, instead they use the _working directory_ of the Makefile. I've even tried it /wo the option only using the `cd` command before starting to compile, with the same result. Please help me to get rid of all the temp files :)


title: How to save the intersection points as nodes for multiple use later?

text: The following MWE will not compile because `\n` is not recognized in `\foreach`.               \documentclass[border=5mm]{standalone}     \usepackage{tikz}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}         \draw [red, smooth, name path=first] plot coordinates {(1,1)(2,3)(4,6)(5,2)(7,5)};         \draw [blue, smooth, name path=second] plot coordinates {(1,5)(2,1)(4,3)(5,5)(7,1)};         \path [name intersections={of=first and second, total=\n}];         \foreach \i in {1,...,\n}{\draw (intersection-\i) circle [radius=3pt];}     \end{tikzpicture}     \end{document}      My objective is to save the intersection points as nodes for multiple use later. How to do this?


title: How do I make an attached file display like a link?

text: I'm embedding an external file in my pdf with `\usepackage{attachfile2}` and`\textattachfile[color=1 1 1]{description}{file.pdf}`. How can I make the text look the same as it would if I had used the `hyperref` package and done something like `\hyperref{file.pdf}{description}`? (By look the same, I mean black text, cyan border that disappears on printing, hand icon on mouse over, name of file in a box on hover (at least in acrobat/reader).)


title: eps graphic doesn't show up in dvi output

text: I tried to use `\munepsfig` in my document, no error, no warning. Just my image doesn't show, what could be actually wrong? Which file should I check to know the problem? Anyway, I use a template given by someone else, it worked perfectly, this happened when I change the image. Edit: just found out that `\munepsfig{}` is actually a new command, but no other than `\begin{figure}\includegraphics{}\end{figure}`, but it still didn't show (when I just use the normal figure), is there something wrong here? The example I had:               \documentclass[11pt, a4paper]{memoir}      \usepackage{graphicx}      \begin{document}      \chapter{testing}           \begin{figure}[h]        \includegraphics[scale=0.4]{logo2.eps}        \caption{testing}      \end{figure}      \end{document}


title: Beamer - titlepage overlay?

text: I would like to have an overlay on the titlepage of my beamer presentation. More specifically I would like to have two versions of my title (one English, one German) that can be switched. Most preferably such that the surrounding box and the rest of this frame do not change (get shifted). Schematically the document looks like this:               \documentclass{beamer}     \mode<presentation>     {       \usetheme{Madrid}     }     %more setup stuff          \title[]{Title A}     %\title[]{Title B}          \begin{document}       \begin{frame}         \titlepage         %some logos etc.        \end{frame}     \end{document}      Now my goal would be to have one slide with "Title A" and one with "Title B", just as if I would use overlay specifications on a normal slide. Is there a way to do this within beamer? * * * Edit: Here's an explicit example of two titles that are of different length and for which there should be no change in the surrounding title box. See discussion below.               \title[]{%     \only<1>{This is a rather short title}%     \only<2>{Und dies ist eine deutlich längere Version, die sich über mehrere Zeilen erstreckt}%     }      Without any special treatment the titles are of different height and the rest of the frame shifts when switching.


title: Equivalent to "in" operator

text: I want to write a command that responds to an argument being in one set of reference strings or another. The argument takes a (musical) note name, and the command will print an accidental depending on whether the argument is in `(a, h, c, d, e, f, g)`, `(ces, des, es, fes, ges, as, b)` or `(cis, dis, eis, fis, gis, ais, his)` (German note names). In a programming language I would use the `in` operator to achieve this, but I don't know how to do it in LaTeX. What I would like to write is               \notewithacc{c}\\     \notewithacc{cis}\\     \notewithacc{des}      and get               \natural c\\     \sharp cis\\     \flat des      as the output.


title: Format ToC in KOMA-Script

text: I want to make the page number _italic_ in the ToC.               \documentclass{scrbook}          \usepackage{blindtext}     \usepackage{tocstyle}     \usetocstyle{nopagecolumn}     \begin{document}          \tableofcontents          \blinddocument          \end{document}      Similar to Pretty Table of Contents and Modifying mini-toc content


title: Generate table with dynamic number of columns

text: Is it possible to create a table with with a dynamic number of columns that depend on some given width, e.g., `\textwidth`? For example, given a fixed- width table `t` with `size(t) <= 0.5\textwidth` that has three columns and looks as follows,               A & B & C \\     D & E & F \\     G & H & I \\     J & K & L \\      I am asking if it is possible to translate it dynamically into something like:               A & B & C  &  G & H & I \\     D & E & F  &  J & K & L \\


title: What would be the appropriate technique for typesetting a "where" list of variable specifications after an equation?

text: I'm often finding I need to lay out an equation in a manner resembling the following source:               \begin{align*}         x = y + z     \end{align*}     where $y = $ the value of $y$;           $z = $ the value of $z$.      Of course, that precise code puts all the "where" definitions on the one line, as parts of the same paragraph. What would be the best way to specify that list, such that it appears similarly to that above source, i.e., like this?                     x = y + z     where y = the value of y;           z = the value of z.      Preferably, the equals signs in the list would be aligned with the one in the actual equation.


title: How do I produce a "white" space/line between multiple, underscored columns?

text: Our corporate design was recently updated and so far, I was able to adapt our tex template towards the origninal and new word template. However, there is one "issue" I was not able to solve: ![Custom table with white vertical spaces](http://i.stack.imgur.com/3rpwr.png) Adding a horizontal line below the headers (A, B, C) is no problem, but I can´t figure out how to produce the "white" space between the columns displayed in the image above. Even if I use one of the Latex table generators, there seems to be no option to add a non-continous line.It is either or - no line or a continous line. This I the code I use for my custom table.               \newenvironment{mytable}     {       \begin{center}       \def\arraystretch{1} %Seems to be better than to use %\renewcommand{\baselinestretch}{1} % Zeilenabstand       \tabulinesep=1.2mm %Minimal cell padding according to http://mirror.ctan.org/macros/latex/contrib/tabu/tabu.pdf       \begin{longtabu}[l]     }     {       \end{longtabu}       %\renewcommand{\baselinestretch}{1.5}%        \end{center}     }          \setlength{\tabcolsep}{1pt}     \newcommand{\btable}[4]{     %\bhead{#1}     \begin{mytable}{#2}     \caption{#1}\\          \rowfont{\color{title}\bfseries}          #3\\     \hline     \endhead          #4          \end{mytable}     \vspace{-6ex}     }


title: Does anyone know the name of this template?

text: Although I like LaTeX, I am a bit bored of the default template and would like to use something looking more like this: http://www.ens- lyon.fr/DSM/SDMsite/M2/stages_M2/Debierre2012.pdf Does anyone the name of this specific template? Or something looking alike?


title: If I have two nodes defined at the end points of a diagonal of a rectangle, how can I define nodes for the other two corners?

text: I have two nodes which I want to define to be opposite corners of a rectangle. I would like to be able to define nodes at the other pair of opposite corners. I tried the following, but it gives me errors:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \begin{document}          %% ATTEMPT 1     %% ERROR: doesn't match its definition     \begin{tikzpicture}       \node (A) at (0,0) {1};       \node (C) at (5,3) {3};       \node (B) at ($ (A) ! (C) ! ($ (A) + (1,0) $) $) {B};     \end{tikzpicture}          %% ATTEMPT 2     %% ERROR: doesn't match its definition     \begin{tikzpicture}       \node (A) at (0,0) {1};       \node (C) at (5,3) {3};       \node (tB) at ($ (A) + (1,0) $ ) {tB};       \node (B) at ($ (A) ! (C) ! (tB)$) {B};     \end{tikzpicture}          \end{document}      Why isn't my projection working?


title: Creating a new variable from two variables, chosing primarily one and only the other if the first is missing

text: i am creating a new variable from two old ones in spss, the old ones have a few missing ones. I want the new variable to have the same value as var1, but if var1 has a missing value than the new variable should have the same value as var2. I tried this syntax but it doesn´t work compute newvar=var1. IF var1 NE SYSMIS, newvar = var1. IF var1 EQ SYSMIS, newvar =var2. Execute. Does anyone know how to do this? Best regards Stella


title: Change item font style when referencing

text: I constructed my own list `longmainenum` which has bold item labels. Now when referencing them with `cleveref`'s `\cref`I want to have the bold font removed. A minimal example:               \documentclass{scrartcl}     \usepackage{cleveref, enumitem}          \newlist{longmainenum}{enumerate}{1}     \setlist[longmainenum]{label=\textbf{(\alph*)}}          \creflabelformat{longmainenumi}{\textmd{#1}}          \begin{document}          \begin{longmainenum}         \item\label{here} Something.         \item More.     \end{longmainenum}          \labelcref{here}.          \end{document}      Unfortunately, I cannot remove the bold font with `\textmd`. It still remains bold face. (Oddly enough, when I try to add an additional font command like, e.g., `\textit`, it works.)