title: Redefining infolines in beamer

text: I'm realizing my first presentation in beamer. I'm using the CambridgeUS theme, and I want to redefine the infolines so I can show   * the title of the presentation on the headline   * author, institute, date and counter on the footline I wrote the following code               \makeatletter     \setbeamertemplate{headline}{     \leavevmode%     \hbox{%     \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%         \usebeamerfont{section in head/foot}\insertshorttitle\hspace*{2ex}     \end{beamercolorbox}%     }     \makeatother          \makeatletter     \setbeamertemplate{footline}{     \leavevmode%     \hbox{%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%         \usebeamerfont{title in head/foot}\insertshortauthor     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshortinstitute     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%         \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}         \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}      \end{beamercolorbox}}%     \vskip0pt%     }     \makeatother      but i got the following error > File ended while scanning use of \beamer@sbtexec I think the error is in the definition of headline. In fact, if I wrote the following code               \makeatletter     \setbeamertemplate{headline}{     \leavevmode%     \hbox{%     \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%         \usebeamerfont{section in head/foot}\insertshorttitle\hspace*{2ex}     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshortinstitute     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%         \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}         \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}      \end{beamercolorbox}}%     \vskip0pt%     }     \makeatother      all work well, but I had to define two useless beamercolorbox. Where is the error? Also, I would like to hide the headlines in the first frame of the presentation. How can I do?


title: Wrong path in Texworks :pdflatex not found

text: I installed MacTeX on a MacBook Pro Retina Mavericks release. I get the following error :               pdflatex not found.       The reason is that `pdflatex` (`pdftex`) are in `/usr/texbin/texbin` and not in `/usr/texbin` as expected. I do not know how to change the path in Preferences > Typesetting. I have installed last fink release (0.36.1) installed and I read that this could explain why I got the wrong path. I'm not an expert on this path setting. Is there anybody that could help me ?


title: Reduce vertical space between large table and text located above to fit in the same page

text: I need to fit one portion of text and threeparttable (fixed position in the manuscript) underneath, on a single page but I am not being able to. The table is large and would only fit in one page. One solution would be to reduce font size of the table or change the text format to eliminate large space between text (above) and table below.Please advise. MWE:               \documentclass[preprint,12pt,authoryear]{elsarticle}          \usepackage{amssymb}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{url}     \usepackage{lscape}     \usepackage{rotating}     \usepackage{threeparttable}     \usepackage{caption}     \usepackage{float}               \begin{document}     \begin{frontmatter}          \begin{table}[H]     \caption{Title of the table}\label{table}     \begin{threeparttable}     %\centering     \scriptsize     \hspace{-3cm}     \rotatebox{0}{     \begin{tabular}{l c c c c c c c c}     \end{tabular}     \begin{tablenotes}     \end{tablenotes}     \end{threeparttable}     \end{table}          \end document       Any feedback is highly appreciated, Thanks!


title: pandoc support for LaTeX ctable?

text: I use `ctable` to make my LaTeX tables. My ultimate goal is to produce a presentation of HTML5 slides. The tables that I need to present are all created in LaTeX with `ctable`. For example, I have my LaTeX `ctable` saved in `table.tex`. Then I try               pandoc -s table.tex -o table.md      to create a markdown version of the table, so that I can then use               pandoc -s --mathjax -S -i -t slidy table.md -o table.html      to produce the HTML5 slides. However, the first step               pandoc -s table.tex -o table.md      just produces a completely empty file table.md. How can create an HTML5 slideshow with tables created in LaTeX `ctable`? Here is an example `ctable`, so this code would be the contents of `table.tex` referenced above.               \ctable[botcap,caption={Basic descriptive statistics for GSS data},label=tab:gss1,pos=!tbp,]{lrrr}{}{\FL     \multicolumn{1}{l}{}&\multicolumn{1}{c}{N}&\multicolumn{1}{c}{mean}&\multicolumn{1}{c}{std. dev.}\ML     age&$1969$&$   48.19$&$   17.69$\NN     children&$1971$&$    1.89$&$    1.67$\NN     income&$1142$&$27580.59$&$57601.05$\LL     }


title: Timer of TEX-compilation through WinEdt

text: Is there a way to get the TeX compilation time (texify, pdflatex, etc) by some commands in a WinEdt macro? The system i have is win 7. There is a system command time.exe returning something like 13:09:43.67. Here 44.67 is seconds and miliseconds. How to get them into a WinEdt string? I need analyze time up to msecs, not merely seconds.


title: How to preview LaTeX equation or document in TexMaker?

text: My code:                \begin{document}         \begin{equation}         2*x+y         \end{equation}      \end{document}      I found that F2 can compile as LaTeX. Compile result:                Process started           Process exited with error(s)      How to fixed and preview it?


title: Path-related errors with TexLive2011

text: I was playing around with the path settings in tlmgr and the following error came up:               Updating symlinks ...     Executing action path add     Can't exec "kpsewhich": Too many levels of symbolic links at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 588.     Use of uninitialized value $TEXMFSYSVAR in scalar chomp at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 588.     Can't exec "kpsewhich": Too many levels of symbolic links at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 589.     Use of uninitialized value $TEXMFSYSCONFIG in scalar chomp at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 589.     Can't exec "kpsewhich": Too many levels of symbolic links at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 590.     Use of uninitialized value $TEXMFLOCAL in scalar chomp at /usr/local/texlive/2011/bin/x86_64-linux/tlmgr line 590.     Completed.      The original default paths were: ![enter image description here](http://i.stack.imgur.com/eq37Y.png) Now I cannot access tlmgr or in fact compile using Latex packages at all. Please help me to revert changes and regain functionality of TL2011. I'm using Ubuntu 64 bit, Xfce.


title: Figure placement without the next section being forced on a new page

text: I am trying to include an image, which I want within the section in which it is referred to. When I try to use the `\FloatBarrier` command, the figure stays within the section, however the next section goes on a new page thus leaving a lot of blank space after the figure, before the next section starts. Is there a way to keep a figure within the required section and also not force the next section to a new page? (I mean, is there a command opposite to `\clearpage?`)


title: When to emphasize text in formal texts?

text: Text can be emphasized in LaTeX using `\emph` or `\textit`. For what kinds of text or situations is it recommended to use such emphasis in formal texts? For example, in an article, paper or thesis, when and on what elements should one apply emphasis (or italics)?


title: Using another program for grammar and spell checking latex documents

text: Admittedly, I am spoiled by having my nice red and green squiggles in word, and I write my LaTeX documents in an editor that supports some of these features (TeXStudio if it matters). However, I have come to appreciate how much (in terms of grammar and spell checking and suggestions) Word (and I'm sure other products as well) do, and I find it distinctly lacking in my IDE. Word has interop capability that allows other programs to call its functions that perform these roles. I have two primary questions:   1. Are there any programs that actually do this (with Word, or any other API type calling, but with visual, real time output (squiggles))?   2. Are there any IDEs that support adding these types of hooks? The actual code to make this work (at least with word interop) is very small, and if there exists a way to add the hooks I would be willing to code it (and share of course). **To Clarify** : 1) this is about grammar, not just spelling. 2) This is about the IDE experience, not output.


title: Word "Appendix" in ToC with memoir class

text: There are a lot of Q'n'As around this topic but I could find the answer neither here nor in the memoir manual. Help me please. I'd like to modify the ToC in such a way, that the word "Appendix" appears in the beginning of each appendix line (now starting with A, B etc). I've tried the appendix package but I get 'option clash' error with `\usepackage[titletoc]{appendix}`.


title: big trees in TikZ - avoiding the "grouping levels" limit

text: I have a problem with the following code:               \begin{tikzpicture} [level distance=4mm]         \path [             every node/.style={ball color=red,inner sep=1.5pt},             level 2/.style={sibling distance=22mm},             level 5/.style={sibling distance=3mm}             ]             node{} child foreach \perI in {1,...,6} {                 node{} child { node{} child { node{} child {                 node{} child foreach \perII in {1,...,5} {                     node{} child { node{} child { node{} child { node{} child {                     node{} child { node{} child { node{} child { node{} child {                     node{} child { node{} child { node{} child { node{} child {                     node{} child { node{} child { node{} child { node{} child {                     node{} child { node{} child { node{} child { node{} child {                         node{}                     }}}}}}}}}}}}}}}}}}}}                 }}}}             }         ;     \end{tikzpicture}      When I compile it with pdflatex (using MiKTeX), I get the following error message:               ! TeX capacity exceeded, sorry [grouping levels=255].      I guess I hit a bound on the level of recursion .. Is there some way around this?   Note that I actually need an even longer tree (48 levels in total) - do not ask why, long story.. My only idea is to generate the long path under the second `foreach` command in advance and then re-use it in each node, i.e. 30 times - but I do not know how to do this.   (I tried `\path[save to=\tmpPath]`, but it seems to save it with absolute co- ordinates, so I did not manage to get the 30 copies I need.)


title: Arrow head at end of spiral curve

text: Folks, Here is my MWE. I need to draw a spiral for trigonometry more than one revolution. How to place an arrow head on the spiral where it meets the terminal end?               \begin{tikzpicture}[scale=1.5, cap=round, color = blue];     \draw [->] [thick, domain= 0  : 25.   90, variable=\t,smooth,samples=500] plot  ({\t r}:  {0.001 *\t*\t}  );     \centring     \draw[blue,very thick] (0,0)--(45:1cm) node[right]{};     \draw[blue] (1,1) node{};     \draw (45: 2cm) node{$\bullet$};     \draw [blue, thick](0,0) --(1.4142,0)node[below]{};     \draw[blue, thick](1.4142,0)--(1.4142,1.4142);     \draw( 30: 7 mm) node [  right] {$A$};      %nodes     \node at (0.7071, 0.7071)[ above left] {$\sqrt2$};     \node at (0.7071, 0)[ below ] {$1$};     \node at (1.4142, 0.7071)   [  right ] {$1$};     % axis      \draw[->]  [blue, thick](0,0)--(2,0) node [right] {$x$};     \draw[->]  [blue, thick](0,0) --(0,2) node [right] {$y$};     \draw[-]  [blue, ultra thick]( 0,0) --( 1.4142,0){};     \draw[-]  [blue, ultra thick]( 0,0) --( 1.4142,1.4142 ){};     \draw( 0,0) node [below left] {};     \end{tikzpicture}


title: hyperlinked wallpaper

text: I have been using               \usepackage{wallpaper}     \ULCornerWallPaper{0.1}{image.jpg}      I wonder if there is a way to add a hyperlink to the image so that by clicking on the image, a URL opens.


title: TikZ-equivalent of bordermatrix with automatic alignment of labels

text: I would like to create a TikZ matrix (containing pictures in the cells) and annotate rows/columns of this matrix is the same manner as \bordermatrix allows. This is (approximately) a picture of what I am after: ![bordermatrix with image](http://i.stack.imgur.com/wApMv.png) and this is the MWE that generated it:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix,positioning}     \begin{document}     \begin{tikzpicture}       \matrix (M) [         matrix of nodes,         nodes in empty cells,         inner sep=0pt,         left delimiter={(},         right delimiter={)}       ]{         \node[draw=none,fill=none] {           \begin{tikzpicture}             \path[use as bounding box] (0, 0) rectangle (1, 1);             \fill (0.5, 0.5) circle[radius=0.5];           \end{tikzpicture}         }; & \\         & \node[draw=none, fill=none] {           \begin{tikzpicture}             \path[use as bounding box] (0, 0) rectangle (2, 2);             \fill (1.0, 1.0) circle[radius=1.0];           \end{tikzpicture}         }; \\       };       \node[left=12pt of M-1-1.west] {\(A\)};       \node[above left=21pt and 27pt of M-2-1.west] {\(B\)};     \end{tikzpicture}     \end{document}      How can I get rid of the hard-coded relative positioning of the label nodes, and make them automatically (1) placed right outside of the left delimiter, and (2) centered to the row? **Update** : This is the solution by adapting percusse's example in "How can I add size of Tikz drawing into size of equation":               % corner node (unindented slightly to get away from parenthesis)     \node[anchor=south east, left=6pt] (M-0-0) at (M-1-1.north west) {};          % iterate over each row and their corresponding labels     \foreach[count=\i] \v in {\(A\),\(B\)}{            % label of this row, based on size of diagonal element       \node (M-\i-0) at (M-0-0 |- M-\i-\i) {};            % put the text (specified in the loop) at the label       \path (M-\i-0.north) -- (M-\i-0.south) node [midway, left] { \v };     }


title: How do I cite LaTeX in BibLaTex?

text: I apologize if this question has been asked before, but I can't find any information on how to cite LaTeX in my documents. EDIT: My report contains an explanation of LaTeX, and how it has helped me in my internship. Thus, I wish to cite LaTeX in my report. Example: LaTeX is a high quality typesetting system (citation here). I used it for blah blah blah


title: Vertical aligning for simple numbers

text: I need to typset a series of fractions with no line inside some paragraphs of text (they were used as proportional symbols). It is very simple, actually: $^2_1$, $^4_2$,$^8_4$ But when it comes to `$^{12}_{6}$`, the two numbers are not aligned vertically. If I use a fraction `$\frac{12}{6}$` the alignment is good, but the horizontal line shouldn't be there. Any suggestions? Thank you, A               \documentclass{article}     \begin{document}          I need this $^{12}_{6}$ aligned vertically like this $\frac{12}{6}$.          \end{document}      Following all answers, I have to say all of them work fine, but they do not produce a result which is identical to `$^{12}_{6}$`. The problem arises when you have more than one instance in the same context, and I believe the `$^{12}_{6}$` spacing is the optimal one. See the picture:               \documentclass{article}               \newcommand{\myfrac}%  % macro with LaTeX-style syntax         [2]{\begin{array}{@{}c@{}}\scriptstyle #1 \\[-1.2ex]\scriptstyle #2\end{array}}     \begin{document}          \noindent Myfrac plus smash as by the example by Harish and Harold compared with optimal vertical spacing: $^{1}_{2}$, \smash{$\myfrac{22}{6}$}, $^{4}_{2}$, $^{2}_{1}$; can you see the difference? My proofreader will kill me, my proofreader will kill me, my proofreader will kill me :-).               \end{document}        ![The 2 in the second fraction is positioned lower](http://i.stack.imgur.com/QUMKf.png)


title: pslegend bounding box odd while using Cirkuit

text: This question is regarding `pst-plot` and more specifically `\pslegend`. The code below produces the two following plots: ![enter image description here](http://i.stack.imgur.com/WtP2o.png) ![enter image description here](http://i.stack.imgur.com/wNVr6.png) One of these figures is generated without the `\pslegend` and it appears to have the correct bounding box. The figure which includes the `\pslegend` appears not to have the correct bounding box. The two `.txt` data files can be found at this address. Could anyone explain what I have done to cause this? I'm on pdfTeX, version 3.1415926-2.4-1.40.13 (TeX Live 2012) The code which surrounds everything from the first `\readdata` to `\end{psgraph}` is lifted from Cirkuit's pstricks wrapper (see http://kde- apps.org/content/show.php/?content=107098). Cirkuit is a Qt GUI front end for preparation of circuit diagrams pstricks and TikZ diagrams. I'm fairly sure it's something in the wrapper commands that's giving me problems, not the pstricks stuff.               \documentclass{article}     \usepackage[utf8x]{inputenc}          \usepackage{multido,pst-all,graphicx,amsmath}     \pagestyle{empty}     \thispagestyle{empty}          \begin{document}     \newbox\graph     \begin{TeXtoEPS}     \readdata{\ihigh}{halfwavehighimpedanceid.txt}     \readdata{\ilow}{halfwavelowimpedanceid.txt}          % Remove this \pslegend in the correct box example...     \pslegend[rt]{\blue\rule[1ex]{2em}{1pt} & $I_D$ Lower Z\\     \red\rule[1ex]{2em}{1pt} & $I_D$ Higher Z     }          \psset{llx=-1cm,lly=-1cm, xAxisLabel={Time [ms]}, xAxisLabelPos={c,-0.3in}, yAxisLabel={Voltage [V]}, yAxisLabelPos={-0.3in,c}}          \begin{psgraph}[axesstyle=axes,xticksize=0 10,yticksize=0 50,subticks=0,Dx=10, Dy=2, Oy=0](0,0)(50,10){7cm}{5cm}     \pstScalePoints(1e3,1e0){}{}     \listplot[linecolor=blue,linewidth=2pt]{\ilow}     \listplot[linecolor=red,linewidth=2pt]{\ihigh}          \end{psgraph}          \box     \graph     \end{TeXtoEPS}     \end{document}


title: Spacing problem with customized chapter style

text: I customized the chapter style like (`book` class): ![enter image description here](http://i.stack.imgur.com/Kp2oJ.png) More space between the Chapter title (`1 row`) and the Lines ![enter image description here](http://i.stack.imgur.com/5fD0w.png) Less space between the Chapter title (`2 or more rows`) and the Lines How to solve this problem? **Code:**               \usepackage{titlesec,microtype}          \newcommand{\thicktitlerule}{\titlerule[0.5 ex]}     \titleformat{\chapter}[display]      { \vspace{ -1 em } \large } %\normalsize      {\flushright \sffamily {\chaptNum\thechapter \vspace{1 ex}} \\\thicktitlerule}      {-24 pt}      {\titlerule\vspace{1 ex} \flushright \huge \bfseries}        [\vspace{1ex}] %\vspace{.2 em} \titlerule \vspace{0.5 em}          \titleformat{name=\chapter,numberless}[display]      {\vspace{ -1 em } \bfseries \normalsize}      {\makebox[\textwidth]{\thicktitlerule}}      {-2 pt}      {\titlerule\vspace{1 ex}\flushright \huge}        [\vspace{1ex}]


title: Question about suitablity of Latex for university works with strictly specified page layout

text: I don't have prior experience with Latex so I'm wondering if it would meet my needs well. So I need to write some reports on my studies in university. Problem is, we don't seem to have Latex template for these works and the document layout is strictly ordered. So for example the left margin must be 3.5cm, right margin 3.0cm, page number must be at the center of the page and not at the bottom of the page. Line spacing must be "1.5" and there must be certain number of lines between paragraphs. I know Latex is great for making good looking papers, but what about situation like this, where there are stupid rules for page layout, which must be followed? Would it be hard for me, as the Latex newbie, to meet these criteria with Latex?


title: Listings environment within another environment

text: \newtheorem{alg}{Algorithm}[subsection]          \begin{alg}\label{alg:1}     \begin{lstlisting}[frame = single, breaklines = true, numbers = left]     test code     \end{lstlisting}     \end{alg}      How can I prevent the above code damaging the code frame like below: ![](http://i.imgur.com/rGJcxXX.png) I have tried using the `caption = ...` argument but that limits my freedom without making a lot more code.


title: Patching commands to remove surrounding whitespace

text: I'm using the `todonotes` package to add little margin notes to my text, however writing               Hello\todo{test} World!      removes the interword space as is already pointed out in this question. So I tried               \pretocmd{\todo}{\@bsphack}{}{}     \apptocmd{\todo}{\@esphack}{}{}      and this adds the interword space but simply outputs all parameters instead of passing them to `\todo`. Full MWE:               \documentclass{article}          \usepackage{etoolbox}     \usepackage{todonotes}          \makeatletter     \pretocmd{\todo}{\@bsphack}{}{}     \apptocmd{\todo}{\@esphack}{}{}     \makeatother          \begin{document}     Hello\todo{test} World!     \end{document}


title: sidefootnote problem

text: I use memoir class and, in some situations, I use the `\sidefootnote` command. It works but not the right justification. I've tried with `\newcommand*{\sidefootform}{\rightskip=\z@ \@plus 2em}` but I've got an error message (command already in use). I've tried with `\renewcommand*{\sidefootform}{\rightskip=\z@ \@plus 2em}` but error message. I've tried with:               \usepackage{ragged2e}     \newcommand*{\sidefootform}{\RaggedRight}      but no effect at all. Any suggestion? Thanks PM


title: How to use Roboto Condensed font?

text: It's a very nice font and available from Google Font. Is it a way I can use it? Many tanks!


title: How to avoid the "perhaps a missing \item." message in itemize/enumerate

text: If one has a itemize environment, with no items inside :               \begin{itemize}     \end{itemize}      the compilation will complain "perhaps a missing \item". I would like to modify the environment itemize (or enumerate) such that in case there is no `\item`, the compilation doest NOT fail, and simply display nothing. **EDIT** I think that by trying to extract a MWE from my actual problem, i missed the point. So, i reformulated the question here.


title: TikZ failing to draw

text: I'm trying to use TikZ to make flow charts in my LaTeX files, but I'm getting an error. Here's the LaTeX I'm using:               \documentclass[11pt]{article}     \usepackage{tikz}          \begin{document}     Some text     \tikzstyle{decision} = [diamond, draw, fill=blue!20, text width=4.5em, text badly centered, node distance=2.5cm, inner sep=0pt]     \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{line} = [draw, very thick, color=black!50, -latex']     \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=2.5cm, minimum height=2em]          \begin{tikzpicture}[scale = 2, node distance = 2cm, auto]     \node [block] (init) {initialize model};     \node [cloud, left of=init] (expert) {expert};     \node [cloud, right of=init] (system) {system};     \node [block, below of=init] (identify) {identify candidate models};     \node [block, below of=identify] (evaluate) {evaluate candidate models};     \node [block, left of=evaluate, node distance=3cm] (update) {update model};     \node [decision, below of=evaluate] (decide) {is best candidate better?};     \node [block, below of=decide, node distance=3cm] (stop) {stop};     \end{tikzpicture}          \end{document}      I literally copied-and-pasted this code from an example document, just to use as a test. And here's the error it produces: > Package pgfkeys Error: I do not know the key '/tikz/ellipse' and I am going > to ignore it. Perhaps you misspelled it. Well, I didn't misspell it. I get a similar error message for the diamond as well. How can I fix this? Thanks a ton!


title: Large document txt to pdf

text: I have about 2 million lines of LaTeX code in a txt file, and my computer cannot copy and paste it into ShareLatex so that I could compile it. Is there a better way I could get the latex document from this? IF the PDF size would be too large, what would be a better way to display this 2 million line latex document?


title: How to draw tangens of arbitrary functions y=f(x) at given point (x,y) of f(x) using PStricks?

text: I'm relative new using PStricks and I don't know exactly how to draw a tangens of y=f(x) at a given point of the curve. I know, by simple mathematics that can be done by constructing the associate differential triangle at the point, [(x,y), dx, dy]. But, I think that PStricks should have a "easy-way" to do it automatically. Please, can you help me?


title: How to include (print) Latex source code in generated pdf?

text: I want to include the source code of my latex generated pdf file in the pdf file itself as printed text. Is there any way to do this?


title: Citations using biblatex together with Tufte style are producing weird results

text: I'm having some problems with the citations in the Tufte class. I have several questions related to this which i will post below, but first i will provide a minimum working example, test.tex:               \documentclass[nohyper,nobib,nofonts]{tufte-book}          \usepackage[utf8]{inputenc}       \usepackage[american]{babel}       \usepackage[backend=bibtex]{biblatex}       \addbibresource{testBib.bib}       \usepackage{hyphenat}       \usepackage{csquotes}            \begin{document}          \chapter{chapter}       Some text~\autocite{bobylev}.       \section{section}       Lots and lots of more text~\autocite{Zhong}.       \subsection{subsection}       Delicious yummy text~\autocite{xu2004}. OmNomNom~\autocite{Lockerby}.          \printbibliography          \end{document}      And a simple bibliography testBib.bib:               @article{bobylev,      author = {Bobylev, A. V.},      title = {The Chapman–Enskog and Grad methods for solving the      Boltzmann equations},      journaltitle = {Soviet Physics - Doklady},      number = {27},      year = {1982}     }          @article{Zhong,      author = {X. Zhong, R.W. Maccormack and  D.R. Chapman},      title = {Stabilization of the Burnett equations and application to high-altitude     hypersonic flows},      journaltitle = {AIAA Journal},      year = {1993}     }          @article{Lockerby,      title = "High-resolution Burnett simulations of micro Couette flow and heat transfer ",      journaltitle = "Journal of Computational Physics ",      year = "2003",      author = "Lockerby, D.A. and Reese J.M."     }          @article{xu2004,       title={Microchannel flow in the slip regime: gas-kinetic BGK--Burnett solutions},       author={Xu, K. and Li, Z.},       journaltitle={Journal of Fluid Mechanics},       year={2004}     }      Which produces the following: ![toc](http://i.stack.imgur.com/YTAuD.png) ![main body](http://i.stack.imgur.com/jouaF.png) ![bibliography](http://i.stack.imgur.com/EYBYv.png) In order to get numbered chapters, sections and subsection (not default in tufte-book class) i've done the following changes to tufte-common.def, changed               \setcounter{secnumdepth}{-1}      to               \setcounter{secnumdepth}{2}      and added               \setcounter{tocdepth}{2}      All of this compiles "fine", but produces the following errors and warnings ![errors](http://i.stack.imgur.com/4Cl5q.png) Questions:   1. The errors seems to have something to do with the changes i made in tufte-common.def, but how else to achieve numbered chapters, sections and subsections?   2. Why doesn't the contents show sections and subsections, isn't that what \setcounter{tocdepth}{2} does?   3. I have to manually delete the test.bbl and test-blx.bib files or add a new entry to the bibTest.bib file to update the bibliography, i.e. changes I've done in the .bib file won't show unless i do this. That can't be right can it?   4. The bibliography is not ordered in the order they are cited and vice versa, I would prefer that the first citation in my text appear as [1], the second number as [2] etc. Not the way they do now, [1],[3],[2],[4]. I know that biblatex has options for sorting and different cite styles, but non of my efforts has yielded the results I'm looking for. Surely there must be a way to achieve references ordered in ascending order? I've also tried using baceknd=biber but that only produces more error messages.   5. Does anyone have any experience with the warning? Interpretations and ideally a way to fix them. Additional information: Using tufte-book class v3.5.0, MiKTeX 2.9 and Sublime Text 2.0.2 as text editor. I realize this is a rather long post with many questions so I will be very grateful for answers to any or all of my questions :)


title: Getting extra space with this combination of \color and \label

text: If I type `{\bfseries\color{red}Theorem 1. }{\itshape\label{two} This is a test.}`, I get too much space between "1." and "This". Here's a file that shows what I mean:               \documentclass{article}          \usepackage{color}          \begin{document}          {\bfseries Theorem 1. }{\itshape This is a test.}          {\bfseries Theorem 1. }{\itshape\label{one} This is a test.}          {\bfseries\color{red}Theorem 1. }{\itshape This is a test.}          {\bfseries\color{red}Theorem 1. }{\itshape\label{two} This is a test.} %too much space between "1." and "This"          {\bfseries\color{red}Theorem 1. }{\itshape\label{three}This is a test.}          \end{document}      In every case except for the one with the comment after it, the space between "1." and "This" is the same (and I assume correct). Is there a way to automatically stop this from happening? Here's what my .log file says when the `color` package is loaded:               ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\color.sty"     Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg"     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package color Info: Driver file: dvips.def on input line 130.          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvips.def"     File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     )     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"     File: dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     ))


title: Troubles using koma-moderncv

text: I am some trouble writing a CV using _koma-moderncv_ package. I am running MikTex 2.9 with TexnicCenter RC 1. I have installed the package via the package manager that comes along with MikTex. After doing this I downloaded and opened the example provided at http://ctan.org/pkg/koma-moderncvclassic. With the exception that I modified the options of babel and csquotes I have touched nothing. Never the less I get the following warnings when compiling:               LaTeX Warning: Reference `lastpage' on page 1 undefined on input line 138.          [1               {C:/Users/john.doe/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]          LaTeX Warning: Reference `lastpage' on page 2 undefined on input line 148.          [2]          LaTeX Warning: Empty bibliography on input line 151.          Package atveryend Info: Empty hook `BeforeClearDocument' on input line 154.     Package atveryend Info: Empty hook `AfterLastShipout' on input line 154.     (C:\Users\john.doe\Documents\Ansoegning\Skabelon\cvbasic.aux)     Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 154.     Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 154.     Package rerunfilecheck Info: File `cvbasic.out' has not changed.     (rerunfilecheck)             Checksum: E64A0148F1EE05FA86DCDCCFFE737411;205.               LaTeX Warning: There were undefined references.               Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                cvbasic     (biblatex)                and rerun LaTeX afterwards.      The result seems to be that I don't get the correct page-numbering. I am running `pdflatex`, `bibtex`, `pdflatex`, `pdflatex`. In the `bibtex` step I get the errors `I found no \citation commands---while reading...`, `I found no \bibdata commands---while reading...` and `I found no \bibstyle commands--- while reading...` Has anyone experienced similar problems and what was the solution?


title: Using "cases" inside "equation" gives error[with "amsmath" loaded]

text: I'm trying to use the `cases` environment inside an `equation` environment. The sample code is quite simple:               \begin{equation*}             X(\omega) = \begin{cases}                             1 \text{se $\omega \in A$} \\                             0 \text{se $\omega \in A^c$}                         \end{cases}          \end{equation*}      Compiling it with Kile results in this error:               Missing $ inserted      and some other messages about ending delimiters not present. I have `\usepackage{amsmath}` at the beginning of my document. Also I must tell you that I have an other piece of code, which is identical, and which works fine:                \begin{equation*}       B_i = \begin{cases}             A_i^c \text{se $i \in I$,}             \\             A_i \text{se $i \in I \smallsetminus I'$}.             \end{cases}      \end{equation*}      Also this piece gave me some errors the other day, then I changed the `\begin{equation*} ... \end{equation*}` to `$$` and `$$` and it worked. Replace `$$` with the equation environment and the error was magically gone. I've already tried doing this with that piece of code, but nothing changes.


title: How to number the chapter of references and appendixes in Table Of Contents

text: Partial code of my main file:               \pagenumbering{arabic}     \setlength{\headheight}{12pt}     \pagestyle{plain}     \include{chap1}      \include{chap2}     \include{ch3}     \include{Experiment} % Extract Correlation     \addcontentsline{toc}{chapter}{ \hskip 4em References}     \bibliographystyle{apacite}     \bibliography{SpecialStudy}          \newpage     \pagestyle{plain}     \theappendix     \addcontentsline{toc}{chapter}{ \hskip 4em Appendixes}     \include{appendixA_refactoring_approach}      With this code I'll get:                    // bah bah bah     3    Test0          3.1 hello          3.2 hello2     4    Test1          4.1 Intro          4.2 Experiment Objective          4.3 Research Question          References           Appendixes           I really want to number References and Appendixes like below. How should I code?                    3    Test0          3.1 hello          3.2 hello2     4    Test1          4.1 Intro          4.2 Experiment Objective          4.3 Research Question     5    References     6    Appendixes


title: Remove chapter from ToC

text: \documentclass{mwrep}         \begin{document}     \tableofcontents     \chapter{c1}     \chapter{c2}     \chapter*{c3}     \chapter*{c4}     \section*{s}     \chapter{c5}     \end{document}      I know `chapter*` removes a chapter from numbering. How can I remove it also from ToC? I want to remove c4 but not c3.


title: Figure at the bottom of same page as another item

text: I'm writing up lecture notes which include quick questions for the reader, together with upside-down answers at the bottom of the page. The code I'm currently using for this has basically the following form:               \begin{question} % A custom theorem environment for the questions     Here's the question.     \end{question}          \begin{figure}[b]     \flushright \rotatebox{180}{Here's the answer.}     \end{figure}      The trouble is that if the question appears near the bottom of the page, there may not be room for the figure at the bottom, and the answer appears on the next page. I'd prefer the question and answer always to appear on the same page, if necessary by inserting a page break before the question. (Or at least, I think I'd prefer that -- I would like to see the effect and compare). So that the comments make sense, here's the original version of my question, which I now realize wasn't properly getting at what I really want to do: How can I force a figure to appear at the bottom of the same page (never the next page) where it's defined? My question is almost a duplicate of this one, in that an answer to my question would also be an answer to that one. The difference is that I also don't want the figure to appear on the previous page, and it seems like the technical problems with doing that distracted anyone from addressing what I'd like to do here.


title: What is required to format a document with alternating margins?

text: What is exactly the command or the document class which is required to format a document such that it has alternating margins? Default values for margin space which are appropriate for dissertations are desired.


title: scrreprt: No extra page per chapter

text: Is it possible to configure koma-script's scrreprt so, that it does not create a page only for the chapter information on the start of a new chapter? I am aware that scrartcl does not do this with part's but I'd like to use scrreprt. **Update:** Turns out that I confused               \include{}      with               \input{}      Include starts a new page for every included file....


title: Koma-Script: How to reduce the size of the footer

text: I'd like to reduce the size of the footer in the following example, because I want to get rid of the extra whitespace area under the footer.               \documentclass[a4page]{scrartcl}     \usepackage{scrpage2}     \pagestyle{scrheadings}          \ihead[left head]{left head}      \ohead[2010/11]{2010/11}     \ifoot[\today]{\today}          \cfoot[Authors]{Authors}           \setheadsepline{.4pt}     \setfootsepline{.4pt}          \begin{document}     \section{Section 1}     Text...     \end{document}      Can this be accomplished somehow?


title: How to create a \citejournal, \citebooktitle, \cite... command in biblatex?

text: In biblatex we find the commands `\citetitle`, `\citeauthor` ... In scientific articles etc. you sometimes need to cite other entries of the bibliography. For example, you need to cite just the name of a journal. So you need a command like `\citejournal`. Does anyone know how to create commands like these?


title: Followup regarding flexible partial derivative macros

text: With reference to Can I have a flexible partial derivative macro?, maybe I should just be happy with the cool package and move on. But... It sure would be nice if one could specify `inset/outset` and `shorten=true/false` as options to a specific instance rather than as separate style options. For example: `\pderiv[inset][n]{f}{x}`, or perhaps `\pderiv[n,inset]{f}{x}`. Has anyone tried to modify the package to behave like that? Also, how about the op's request in the original article to be able to display in the form `f_{xxy}`?


title: Second figure on page is covering text in the bottom of the paragraph above

text: I'm trying to create a page which will have three figures on it as well as some text. However in my output the top of the second figure is obscuring the bottom of the text above it. I've tried using `[H]`, `[!h]` and `[t]` but it doesn't alter it. The only thing that seems to work is placing `[b]` after the figure but that sticks it to the very bottom of the page which looks awful (plus I want to place a third figure there). I've included the preamble in the code along with the relevant page.               \documentclass[fleqn, a4paper]{article}     \usepackage{color}     \newcommand{\hilight}[1]{\colorbox{yellow}{#1}}     \usepackage{graphicx}     \setlength{\parskip}{0.25cm}     \usepackage{float}          \begin{document}               \newpage               \begin{figure}[!h]     \includegraphics{PreisachPeriodicp0.1full}     \caption{Full output for p=0.1}     \label{fig:fullp0.1}     \end{figure}          Figures X-Y show the output of this model over various different values for the parameter p. The blue line tracks the population fraction ($\mu$) of the phenotypes who operate under threshold 1. The red line is for threshold 2 and the green line for threshold 3. Figure \ref{fig:fullp0.1} shows the output over 100 time steps when p is equal to 0.1. It appears from this that all three sub-populations are tending toward periodic equilibrium. This can be seen more easily in figure YY which depicts a period of time much further into the future.               \begin{figure}[!h]     \includegraphics{PreisachPeriodicp0.1}     \caption{End output for p=0.1}     \label{fig:p0.1}     \end{figure}               \end{document}      Here's how it turns out: ![enter image description here](http://i.stack.imgur.com/8TY10.png)


title: Formula for population variance, issues with placement?

text: From trying to construct the formula by hand, I had come up with the following:               \sigma^2 = \frac{\sum_{i=1}^{n}(x_i - \mu)^2} {n}      Now this looks fairly correct, however the `_i=1` and `^n` do not show above and below, rather above and right as you would expect it: ![enter image description here](http://i.stack.imgur.com/ktdb0.gif) I cannot find an example or reference to find the correct one. What should be used?


title: A LaTeX3 macro to typeset chemical compounds?

text: Out of curiosity I wonder how would a macro coded in `expl3` that does the basics of `mhchem` (as in section **basics** in `mhchem` manual) looks like? ![mhchem](http://i.stack.imgur.com/tADJk.png) I have found examples in TeX and LuaTeX in http://wiki.contextgarden.net/Programming_in_LuaTeX but their input style is too close to math (in my view, not as convenient as`mhchem`). So gurus please showcase the power of `expl3`.


title: siunitx: centering table headings (or other text contents)

text: I'm trying to center-align the two-line heading of the rightmost column of the following table. Given that I use decimal point alignment, I guess the centre of the headings should be aligned with the decimal point. ![alt text](http://i.stack.imgur.com/ZB1OY.png) The code I used is below. I put _table-text-alignment=center_ but it doesn't make any difference, as it can be seen.               \begin{table}[htp]         \centering         \begin{tabular}{                 @{}                l                 S[group-separator={,}, group-four-digits=true,table-format=5.0]                  S[group-separator={,}, group-four-digits=true,table-format=5.0]                 >{\bfseries}S[table-format=3.2, table-text-alignment=center]                 @{}                 }               \toprule               \textbf{Product Group} & \textbf{Production Size} & \textbf{Number of Failures} & \textbf{Failure Rates} \\               & & & \textbf{(per 1,000 items)} \\               \midrule               %  \addlinespace               this is foo1 & 11111 & 1111 & 11.11\\               this was foo2 & 22222 & 2222 & 222\\               this will be foo3 & 33333 & 3333 & 3.33\\               foo4 & 44444 & 4444 & 44.4\\               foo5 & 55555 & 5555 & 5.5\\               \bottomrule         \end{tabular}     \end{table}      I'm not sure what I'm doing wrong.


title: Customizing header's title

text: How do I to make this header text takes this form `Chapitre 1. Spécification des besoins` ? **EDIT :** Transformation : CHAPITRE 1. SPECIFICATION DES BESOINS >> Chapitre 1. Spécification des besoins ![enter image description here](http://i.stack.imgur.com/Wweb3.png)


title: Error using a defined function with expl3 inside the command \color

text: In the following MWE my personal definition of `\marco_prop_get:nn` works unless it isn't inside the macro `\color`. The snippet is:               \ExplSyntaxOn     \cs_new_protected:Npn \marco_prop_get:nn #1 #2      {       \prop_get:cn  { l_marco_ #1 _collection_prop } { #2 }      }     \color{ \marco_prop_get:nn { color } {my-title} } My~ Title     \ExplSyntaxOff      I am a little bit confused because the using of `\prop_get:Nn` works well.               \ExplSyntaxOn     \prop_new:N \l_marco_color_collection_prop     \prop_put:Nnn \l_marco_color_collection_prop {my-title} {red}     \color{ \prop_get:Nn\l_marco_color_collection_prop {my-title} } My~ Title     \ExplSyntaxOff      Here the MWE:               \documentclass{article}     \usepackage{xcolor}     \usepackage{expl3}          \begin{document}     \def\foo{red}     \color{\foo}\foo          \ExplSyntaxOn     \cs_set:Npn \foo { blue }     \ExplSyntaxOff     \color{\foo}\foo          \ExplSyntaxOn     \prop_new:N \l_marco_color_collection_prop     \prop_put:Nnn \l_marco_color_collection_prop {my-title} {red}     \color{ \prop_get:Nn\l_marco_color_collection_prop {my-title} } My~ Title     \ExplSyntaxOff          \ExplSyntaxOn     \cs_new_protected:Npn \marco_prop_get:nn #1 #2      {       \prop_get:cn  { l_marco_#1_collection_prop } { #2 }      }     \exp_after:wN \color \exp_after:wN { \marco_prop_get:nn { color } {my-title} } My~ Title          %\color {  \marco_prop_get:nn { color } {my-title} } My~ Title     \ExplSyntaxOff     \end{document}      Can you explain please why does my command fail without `\exp_after:wN`. Please note I am using the svn version of expl3.


title: biblatex. supress \bibstring if two curly braces are used

text: I have a `mvreference` with the field `volumes`. Its format is declared by biblatex as `\DeclareFieldFormat{volumes}{#1~\bibstring{volumes}}`. How can I force biblatex to _not_ use the `\bibstring`-command if the entry is wrapped in **two curly braces** , like in the case of the MWE, but use it, if there it is only wrapped in **one**?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=verbose-ibid,backend=biber]{biblatex}          \begin{filecontents*}{mybib.bib}     @mvreference{mylexA,         shorthand       = {mylex},         title           = {Lexikon in mehreren Bänden},         volumes         = {{Lexikon in 20 Bänden in zwei Teilen. Zwei Supplement-Bde. mit Anh.}},         editor          = {Some One},         location        = {München},         year            = {1997-2001}     }     \end{filecontents*}          \addbibresource{mybib.bib}          \begin{document}          Welcome.     \nocite{*}     \printbibliography          \end{document}


title: Transformed text as from a specific viewport

text: Is there a possibility to shear (any) LaTeX text or the output of a mathematical formula as it would be obtained as a result from looking at a different angle/viewport? I do not mean mere rotating of text, that would not be sufficient.


title: Align equations with conditions

text: I am using the following equation with boundary conditions, ![enter image description here](http://i.stack.imgur.com/CzGsd.png) I would like to position the equation centrally aligned and would like to keep the boundary condition to the right. But the equation is a little bit centre- left aligned and boundary conditions are not exactly at right. Would anyone suggest a better alignment for this case? Here is the snippet, if anyone likes to help!               \subsubsection{Outflow}     For the outflow boundary condition, the pressure is specified as a Dirichlet boundary condition, assigned with free-stream pressure and the density $\rho$ and the velocity $\vec{u}$ are specified as a Neumann boundary condition,     \begin{align}     p &= p_\infty & \text{ on }  \Gamma_{out} \\     \frac{\partial \rho}{\partial \hat{n}} &= 0  & \text{ on }  \Gamma_{out} \\      \frac{\partial \vec{u}}{\partial \hat{n}} &= 0  & \text{ on }  \Gamma_{out}     \end{align}


title: LaTeX symbol for "\leftrightarrow" with "\triangleq"

text: In LaTeX, does it exist any symbol for ![enter image description here](http://i.stack.imgur.com/XBR8X.png)


title: text positioning in musixtex without adding horizontal space

text: I am writing a musical exercise book with musixtex. I'm trying to typeset a single stave with some text positioned beneath it. There are no notes, only the key signatures change and I would like to annotate each bar with the key signature name. These two examples demonstrate what I am trying to achieve:               \documentclass[11pt,a4paper,BCOR=12mm,DIV=24,headsepline=true,parskip=half]{scrbook}          \usepackage{musixtex}          \begin{document}          % First example, right layout but text missing     \begin{music}     \generalsignature{0}     \nostartrule     \nobarnumbers     \startpiece\addspace\afterruleskip     \generalsignature{+1}\ignorenats\Changecontext     \generalsignature{+2}\ignorenats\Changecontext     \generalsignature{+3}\ignorenats\Changecontext     \generalsignature{+4}\ignorenats\Changecontext     \generalsignature{+5}\ignorenats\Changecontext     \generalsignature{-1}\ignorenats\Changecontext     \generalsignature{-2}\ignorenats\Changecontext     \generalsignature{-3}\ignorenats\Changecontext     \generalsignature{-4}\ignorenats\Changecontext     \generalsignature{-5}\ignorenats\Changecontext     \setdoublebar     \endpiece     \end{music}          % Second example, adding text messes up layout     \begin{music}     \generalsignature{0}     \nostartrule     \nobarnumbers     \startpiece\addspace\afterruleskip     \lcharnote{P}{\smalltype{C-Dur}}     \generalsignature{+1}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{G-Dur}}     \generalsignature{+2}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{D-Dur}}     \generalsignature{+3}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{A-Dur}}     \generalsignature{+4}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{E-Dur}}     \generalsignature{+5}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{H-Dur}}     \generalsignature{-1}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{F-Dur}}     \generalsignature{-2}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{B-Dur}}     \generalsignature{-3}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{Es-Dur}}     \generalsignature{-4}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{As-Dur}}     \generalsignature{-5}\ignorenats\Changecontext     \lcharnote{P}{\smalltype{Des-Dur}}     \setdoublebar     \endpiece     \end{music}     \end{document}      Please note that this example has to be compiled in a three step process:               $ pdflatex example.tex     $ musixflx example.tex     $ pdflatex example.tex      ![enter image description here](http://i.stack.imgur.com/eipfP.png) In the first example, the layout is correct, but the text is not included yet. In the second example, I tried to include the text, but this adds unwanted horizontal space and the layout is messed up, although the documentation promises in section 2.6.13 that no horizontal space will be added. Also, it would be nice if the text would be centered within each bar. Does anyone have an idea how to fix the example, or a different solution to achieve the same thing? Thank you!


title: How to align a series of TikZ pictures at the baseline

text: I am trying to align a series of pictures made up of letters, using TikZ. Having tried almost all combinations of the `baseline` key it is obvious I am missing something. Here is a MWE (currently adjusting with an approximate manual `baseline=-4pt`). It is obvious from the image that the adjustment only applies to the first letter. How can I fix this? ![enter image description here](http://i.stack.imgur.com/EsJBP.jpg)               \documentclass{article}     \usepackage{pgf,tikz}     \makeatletter     \begin{document}     \gdef\drawfontframe#1{%       \tikz[baseline=-4pt]{%         \node[rectangle,draw,inner sep=0pt,outer sep=0pt] (X){#1};         \draw[red, line width=0.4pt] (X.text)  circle(0.4pt)[fill=red] -- (X.base east);}%     }     \Huge A test %     \@tfor\next:=qwerty\do{%     \def\Z#1{\drawfontframe{#1}}%     \expandafter\Z\expandafter{\next}.%     }     \end{document}


title: siunitx: Bold single numeric cells

text: I'm struggling to make a single numeric cell in an `siunitx` table bold. (A similar question for making a _whole_ column bold is available here.) I want to define a simple macro which I can set for the largest value in a row to make it bold. A quick MWE:               \documentclass{standalone}     \usepackage{siunitx}     \usepackage{times}          \newcommand{\maxf}[1]{\ensuremath{\mathbf{#1}}}          \begin{document}               \begin{tabular}{S[table-format=1.2]S[table-format=2.2]}     \sisetup{detect-weight=true,detect-inline-weight=math}     {A} & {B} \\     1.01 & \maxf{11.1}\\     \maxf{2.1} & 1.94 \\     \end{tabular}           \end{document}      (I use `times` because the math font (CM) and text font (Times) are slightly different in my document ... this is just to highlight that need to format numbers in math mode.) As I understand it, the following line should make `siunitx` listen for bold in math font.               \sisetup{detect-weight=true,detect-inline-weight=math}      But then I get the following: ![bold not aligned](http://i.stack.imgur.com/z16qM.png) ... the decimals are not aligned in either column. If I instead try:               \newcommand{\maxf}[1]{\ensuremath{\boldmath #1}}      ...with `boldmath` used in page 18 of the `siunitx` documentation (have never seen this command before), the numbers do not appear bold. * * *   * How can I define a macro (`\maxf`) to make single numeric cells bold in math mode and keep decimals aligned in `siunitx`?   * If this is not possible or convenient, what highlighting options are available? For example, I notice that underlining using `\newcommand{\maxf}[1]{\ensuremath{\underline{#1}}` breaks decimal alignment. * * * **EDIT** , with Joseph's code below, I get the following (no bold): ![enter image description here](http://i.stack.imgur.com/slw0m.png) **EDIT3** This was because I had an older version of `siunitx` (v 2.3). I later upgraded to version 2.5 and it worked. * * * **EDIT2** I solved my original highlighting needs by shading the cells of the max results instead.               \documentclass{standalone}     \usepackage{siunitx}     \usepackage{times}     \usepackage[table]{xcolor}          \newcommand{\maxf}[1]{{\cellcolor[gray]{0.8}} #1}          \begin{document}               \begin{tabular}{S[table-format=1.2]S[table-format=2.2]}     \sisetup{detect-weight=true,detect-inline-weight=math}     {A} & {B} \\     1.01 & \maxf{11.1}\\     \maxf{2.1} & 1.94 \\     \end{tabular}           \end{document}      ![enter image description here](http://i.stack.imgur.com/6vNwv.png)


title: fontspec related font setting compiles on Linux, but not on Windows

text: I have this portion of code:               \documentclass{scrartcl}     \usepackage{amsmath, fontspec}     \usepackage[math-style=TeX, bold-style=TeX]{unicode-math}          \setmathfont[StylisticSet=0]{xits-math.otf}     \setmathfont[range={\mathcal,\mathbfcal}, StylisticSet=1]{xits-math.otf}          \begin{document}     \[ p + q = 1 \]     \[ \mathcal{AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz} \]     \end{document}      As you can see, I'm selecting a stylistic set for `xits-math.otf`. I do this, to get a representation of calligraphic letters in math mode, that conforms to guidelines at my institute. Now, Because of the line `\setmathfont[range={\mathcal,\mathbfcal}, StylisticSet=1]{xits-math.otf}` the document doesn't compile on Windows. On Linux, it does compile fine. When the line is commented out, it _does_ compile on Windows as well. I'm using TeXlive on both systems (Fedora 20 and Windows 7), with pretty much all packages installed, and I made sure, that `xits-math.otf` is found on both machines (on Windows, the files in question are installed into `C:\Windows\Fonts\`). **_Why?_** `xelatex` version on Linux: > XeTeX 3.1415926-2.6-0.9999.3 (TeX Live 2014/dev) `xelatex` version on Windows: > XeTeX 3.14159265-2.6-0.99991 (TeX Live 2014/W32TeX)


title: Title, abstract, and text beginning on same page

text: What I want to do, is to create a document, which starts off with a title- minipage, abstract, and then start the main section. Ideally, i would like to do it on the same page, kind of like a magazine article, rather than a bound book (which is how the latex titlepage appears. Something like this:               \documentclass[notitlepage]{report}     \begin{document}     \begin{titlething}          Formatting for title + author etc., perhaps even with     \end{titlething}     \maketitle      \begin{abstract}        abstract-text     \end{abstract}     \section{First bit}     If you want to ramp your text straight onto the title page, start the text at      something that does not cause a page break, like a section.  Here's a handy      place to introduce some of your woofy conventions, like quotes in equations.     \chapter{New Page}     A new chapter starts a new page.       \end{document}      My idea was perhaps to set the title page in a minipage? I'm trying to keep chapters in the document though, if that's a help, because i have a considerable collection in the 'report' style. A minipage does not work. \nopagebreak[4] does not work. Actually 'notitlepage' option does work. What is happening is that when you create a chapter, then that starts on a new page. This is what most of my documents look like. So if you really want to start text on the first page, consider using something like a section to introduce things before the first chapter. Wendy is happy now. :)


title: Trying to Install qtree

text: I copied the `qtree.sty` file to my `/usr/share/texmf-texlive/tex/latex directory` (pretty much everywhere there, in `graphics/` , `base/` even in `qtree/`) but when I run Lyx and insert the following command LaTeX Preamble:               \usepackage{qtree}      I keep getting > File `qtree.sty` not found


title: Where to put the institute information in the article document class?

text: I've seen in other document classes that one can input the authors' institutes via special commands, for example in `revtex4` I can put               \title{Aggregation According to Classical Kinetics---From Nucleation to      Coarsening}     \author{Yossi Farjoun}     \email{yfarjoun@math.mit.edu}     \thanks{Corresponding author}     \affiliation{G. Mill\'an Institute of Fluid Dynamics, Nanoscience and Industrial     Mathematics, Universidad Carlos III de Madrid, Spain}     \author{John C. Neu}%     \email{neu@math.berkeley.edu}     \affiliation{Department of Mathematics, University of California, Berkeley}      and it gets typeset nicely: ![](http://i.stack.imgur.com/UHRcO.png) --snip-- ![](http://i.stack.imgur.com/4ZOj3.png) Is there a nice of doing the same with plain-old `article`?


title: Get authoryear citation using Natbib

text: I would like to have a citation to give the author(s)'s abbreviated name(s) and the year of publication of the citation, in other words if the citation is by Alex Hock, Tom Geek in 2009 then the cited text should look like : `[HG09]` or `[HG'09]` How do I get this? I am using _natbib_ with _authoryear, square, numbers_ options and what I get is `Hock and Geek [2009]`. Is this possible using natbib or should I have to use some other package?


title: Why does lualatex return with exit code 1 even though a PDF was built?

text: Using TeXLive 2011, I invoke `lualatex` on a TeX file from the command line. The PDF builds (mostly correctly, although the source TeX file has many many errors and warnings, none fatal). However, the exit code (`%ERRORLEVEL%`) is set to 1, which is normally used to indicate an error. Why does this happen?


title: Using a previously defined command in a loop

text: I have the following defined:               \newcommand{\pl}{\ensuremath{p^L}\xspace}     \newcommand{\pr}{\ensuremath{p^R}\xspace}     \newcommand{\xx}{\ensuremath{_{XX}}\xspace}     \newcommand{\xc}{\ensuremath{_{XC}}\xspace}      And I would now like to define               \newcommand{\plxx}{\ensuremath{\pl\xx}\xspace}     \newcommand{\plxc}{\ensuremath{\pl\xc}\xspace}     ...      and so on. (I actually more than four...) I tried to adapt this solution               \documentclass{minimal}     \usepackage{pgffor}          \newcommand{\pl}{\ensuremath{p^L}}     \newcommand{\xx}{_{XX}}     \newcommand{\xc}{_{XC}}          \foreach \p in {xx,xc}{         \expandafter\xdef\csname pl\p\endcsname{%          \noexpand\ensuremath{\pl\p}%         }%       }%          \begin{document}     $\plxc$      \end{document}      But it gives me the error               ! Missing $ inserted.     <inserted text>                     $     l.15 $\plxc                $     ! Missing $ inserted.     <inserted text>                     $     l.16 \end{document}      Really sorry to bother you with this, since I already asked a similar question but I'm not able to adapt the solution to the other one...


title: How to determine the true size of a font?

text: A colleague of mine is submitting a research proposal to one of the UK research councils, whose guidelines stipulate a minimum font-size of 10pt. My colleague, who is of course using LaTeX, uses the `amsart` document class with the `10pt` option (which, in fact, I think it's the default). Looking at the `.log` file one sees that the 10pt version of the fonts are indeed being loaded. However word has come back that the proposal falls foul of the research council's guidelines because the font-size in the PDF file that my colleague submitted is actually 9.6pt! Alas, no information has been given as to how this font-size was determined. ### Questions   1. When is 10pt _not_ really 10pt?   2. And how can one determine the true font size of a LaTeX-generated PDF document? Thanks in advance! ### Added This just in: it seems that the culprit was the default scaling of `helvetica`, which according to the PSNFSS2e documentation (PDF file) is smaller than 1. This still leaves the second question.


title: Changing size of footnote symbols in titlesec-formatted chapter titles

text: I am using `titlesec` to define the formatting of Chapter titles. At present, footnote symbols within these titles appear in the same format, but my author would like them to be somewhat smaller. The `\titleformat` block looks like this:               \titleformat{\chapter}      {\LARGE\bfseries} % format of title      {\makebox[0.5in][l]{\thechapter}} % chapter number      {0em} % no additional space between number-box and title      ...      Is there a command I can use within this block to specify the size of footnote symbols in the title itself (and nowhere else)? I am using `footmisc` for footnotes.


title: Listings settings for command line arguments

text: I am typesetting a set of instructions which includes several (Unix) command line arguments. I have been using the `listings` package to include these arguments, but the colouring is less than ideal. Weird words like "test" are bolded. Is there something more like Pygments, which can highlight flags and filenames and the like? As an example something like               program-name -some-option-flag -some-other-option-flag -i /location/of/input/file -o /location/of/output/file


title: \minitoc on the \part-page

text: I would like to modify the `\part`page such that it shows a table of contents of that part. Preferably also one or two levels deeper than the toc in the beginning of the document. In styling the \part page Alan Munn shows how to edit the page,               \documentclass{report}          \usepackage{titlesec,minitoc}       \titleclass{\part}{top}     \titleformat{\part}     {\centering\normalfont\Huge\bfseries}      {}      {0pt}      {}          \begin{document}     \tabkeofcontents          \part{This is the Part}     \minitoc %\parttoc,\doparttoc          \chapter{This is its first chapter}     \chapter{This is its second chapter}     \end{document}      but how do I add the 'minitoc'? In the above snippet neither `\minitoc` nor `\parttoc`or `\doparttoc` have any effect. `\minitoc` only works for chapters - not parts. Is there any other option or a smart modification I did not find?


title: How to remove entry "Listings" from table of content (toc)

text: How can I use `\lstlistoflistings` to create a list of listings, but not have this list as an entry in the table of content? Normally, a star helps to hide things like that and I use _memoir_ as document class which supports and helps hiding lists like `\tableofcontents*`, `\listoffigures*`, `\listoftables*`, ... But adding the star like that: `\lstlistoflistings*` does not help. I don't want to patch any of the class file or other packages if not really needed. (I use _tex_ seldom enough to get annoyed if I want to have the listings list in the toc and then can't remember anymore what I changed). At the moment I use _latexmk_ to typeset my files. And so I currently have a _.latexmkrc_ file with a hook that delete this entry from the content before it gets added to the toc, like this:               add_cus_dep("toc", "toc", 0, "removelistingfromtoc");     sub removelistingfromtoc {       $origin = "$_[0].toc";       $dest = "$_[0].toc.unpatched";       system("mv '$origin' '$dest' && grep -v '\\contentsline.*{List of Listings}' ".              "'$dest' > '$origin'");       return 0;     }      This removes for example the following line from the toc file:               \contentsline {chapter}{List of Listings}{}{section*.3}      _(I changed the name "Listing" to "List of Listings". Btw: Any author with english as their native language might help me to critic if this "List of Listings" is a proper and common term)_


title: Appendices in PDF Outline appear as children of first appendix and problem with headers

text: I have a problem similar to the one in Appendices in PDF Outline appear as childs of last section But the solution hasn't worked for me, and I even get errors when I try to `\includepackage{bookmark}`. So the problems are:   1. Appendices in the PDF outline appear as children of first appendix; ![enter image description here](http://i.stack.imgur.com/w3Ys0.png)   2. The PDF bookmark for the appendices points to the first two chapters;   3. At the references/bibliography the headers are set with the previous chapter values; I've been all day trying to solve this and I just gave up. Could anyone please help me. I've posted a mini sample here: http://dl.dropbox.com/u/958361/The%20Problem.zip


title: How to sweave Matlab or Mathematica code into LaTeX.

text: There is a package called `pgfsweave` for R. It can sweave R code into a LaTeX document. I found we can gain some advantage from this method.   1. The report document can reproduce.   2. The font in figure keeps consistent with main font of document. I think "sweave" code is the best method for data-oriented report (especially for LaTeX). By sweave, we can separate data (or figure) from the document, through LaTeX, we can separate content from document style. Unfortunately, I didn't find a corresponding package or some equivalent method for matlab and mathematica. I know some packages, like `psfrag` or `matlab2tikz`, that work well. But we need a more powerful tool to do this that can change our workflow and that can make our life easier. Is that possible? How do you solve this problem? Does it meet the philosophy of matlab or mathematica?


title: Using picins to place two figures in one paragraph

text: How can I put two figures wrapped around one paragraph using `picins`? I am using the following code.               \documentclass{article}          \usepackage{picins}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{caption}          \begin{document}          \pichskip{15pt}% Horizontal gap between picture and text     \parpic[l][t]{%       \begin{minipage}{40mm}         \includegraphics[width=\linewidth]{example-image-a}%         \captionof{figure}{This is figure 1.}       \end{minipage}     }          \pichskip{15pt}% Horizontal gap between picture and text     \parpic[r][b]{%       \begin{minipage}{40mm}         \includegraphics[width=\linewidth]{example-image-b}%         \captionof{figure}{This is figure 2.}       \end{minipage}     }     \lipsum[1]          \end{document}      whose result is as follows. Ideally, I want to have figure 1 at the left/top of the paragraph while figure 2 at the bottom/right. How can I place the figures in the desired locations using `picins` package? ![enter image description here](http://i.stack.imgur.com/4hCVe.png)


title: pgf-tikz problem with 'declare function'

text: I need to make a plot of a non-linear functions. To get familiar with the 'declare function' capability of `pgf-tikz`, I tried the following code:               \documentclass[10pt]{article}     \usepackage{amsmath}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \begin{document}       \thispagestyle{empty}         \begin{tikzpicture}[scale=2.0,           declare function={             func(\x,\a) = 1.0/(\x^\a);           }]     % draw grid             \draw[very thin,color=gray] (0.0,0.0) grid (2.0,2.0);      % draw axes            \draw[->] (0.0,0.0) -- (2.0,0.0) node[right] {$x$};           \draw[->] (0.0,0.0) -- (0.0,2.0) node[above] {$y$};          % draw functions           \draw[blue]  plot[domain=0.5:2.0,samples=100] (\x,{func(\x,1.0)});           \draw[red]   plot[domain=0.8:2.0,samples=100] (\x,{func(\x,2.0)});            \draw[green] plot[domain=0.5:2.0,samples=100] (\x,{func(\x,0.5)});        \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/0RhHG.png) So what I expect to see are three lines corresponding to `1/x`, `1/x^2`, and `1/sqrt(x)`. The last function call did not give the correct function. Since I'm new to using the math functionality of `pgf-tikz`, I suspect I'm doing something wrong or I'm overlooking something. I'd be glad to get some pointers that   * help me fix this problem; and    * get some advice about how to best/better approach this problem. The function I will need to plot is going to be more complicated, but also smooth and under some limits approaches `1/x`.


title: Trying to create a trifold leaflet on A3 paper using xelatex

text: I'm trying to make the program for my wedding. Basically what I want is for each program to be a single sheet of A3 printed front and back in landscape orientation and folded into three panels. This being a kind of fancy affair, I'd like to use my nice Hoefler font for the main text and the nice small caps. Here's the minimal example:               \documentclass[a3paper]{leaflet}     \usepackage{lipsum}     \usepackage{fontspec}     \setmainfont[Mapping=tex-text, Numbers=OldStyle]{Hoefler Text}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Hoefler Text}     \begin{document}     \lipsum\lipsum\lipsum\lipsum     \end{document}      This document will compile with xelatex, but it apparently overrides the A3 paper setting back to default letter paper size and shifts the orientation back to portrait. If I comment out the lines about fontspec and the font setting commands the document and compile with latexmk, then it comes out just fine. Apparently some people have run into similar problems when using the hyperref package with the leaflet class. Anybody got any ideas how to fix this?


title: Location of Type3 font being used in my document?

text: When I was looking at the types of fonts being used in my LaTeX document compiled using `pdflatex`, I found one Type3 font called `F209`. A Google search told me that Type3 fonts are also called `pk` fonts in LaTeX. Upon looking at my log, I saw this entry. `MiKTeX\2.9\fonts\pk\ljfour\jknappen\ec\dpi600\ectt1200.pk` Does anyone know what this font type is and what is actually displayed? This Type3 font is only displayed when I use the package `\usepackage[T1]{fontenc}`. Is it really necessary to use this package as other people have recommended?


title: warning about pdfpages with hyperref

text: Package `pageslts` prints out this warning since I use `pdfpages` and `hyperref` in the same document. > Package pageslts Warning: Package pdfpages detected. (pageslts) Using > hyperref with pdfpages can cause problems. See (pageslts) > ftp://ftp.ctan.org/tex-archive/ (pageslts) macros/latex/contrib/pax/ > (pageslts) for project pax (PDFAnnotExtractor).. What does this mean? Am I supposed to change anything in the document or when am I going to see any problem?


title: Add comments to bibliography

text: In chemistry journals one often notices bibliography entries which contain a comment, _cf._ attachment. How to get such results using BibTeX/LaTeX? ![enter image description here](http://i.stack.imgur.com/BCnli.png)


title: One way links to glossaries

text: Is there any way to have hyperlinks to the glossaries/acronyms (using glossaries package) in only one direction? What I want is a link to the page where an acronym is used, in the list of acronyms. But I would like to disable the links to the page of the list acronyms, which are currently everywhere an acronym is used. I was not able to find an answer after trying a lot of things. Is there any other way than to add an asterisk at every reference? Any help is appreciated! EDIT: MWE as suggested (reference: How to combine Acronym and Glossary)               \documentclass{article}     \usepackage{hyperref}     \usepackage[acronym]{glossaries}     \makeglossaries          \newacronym{cd}{CD}{compact disk}          \begin{document}     \noindent     First use \gls{cd}\\     subsequent \gls{cd}          \printglossaries          \end{document}      ![current output](http://i50.tinypic.com/24gr82d.png) What I want would look like this: ![output needed](http://i47.tinypic.com/1zn0fm8.png) A similar question is unanswered here: Disable hyperlinks in some entries for glossaries


title: Margins for proof environment

text: The code below is (almost) the `proof` environment of `amsthm`:               \newenvironment{proof}[1][\proofname]%     {%     \par\pushQED{\qed}\normalfont\topsep6\p@\@plus6\p@\relax%     \trivlist\item[\hskip\labelsep\bfseries#1\@addpunct{.}]\ignorespaces%     }{%     \popQED\endtrivlist\@endpefalse%     }%      I know how to control the left indentation with a `\hangindent` but I would like to know how to control the `rightmargin` in a simple way?


title: Tikz-Draw smooth path to form a spectrum peak

text: I am using `tikz` to recreate the following image ![enter image description here](http://i.stack.imgur.com/B9v1s.png) What I am trying to do is draw an "extended" and "smooth" trapezoidal shape. My code is               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       %axes       \draw[very thick] (0,0)--(8,0);       \draw[very thick] (0,0)--(0,5) coordinate (y);       \draw (8,0) node[below] {\eng{Energy}};       \node [draw=none,rotate=90, yshift=0.3cm] at (0,5) {\eng{Counts}};       %1st peak       \draw[thick,blue] (7.3,0)--(7,3)--(5,4)--(4.7,0);       \draw[blue,dashed] (7,0)--(7,3);       \draw[blue,dashed] (5,4)--(5,0);       \draw[blue] (7,3) node[above,right] {$4$};       \draw[blue] (5,4) node[above,left] {$3$};       \draw[blue] (6,4.5) node[above] {$\delta E$};       %2nd peak       \draw[thick,red] (3.3,0) -- (3,2.5) -- (1,3.5) -- (0.7,0);       \draw[red,dashed] (3,0)--(3,2.5);       \draw[red,dashed] (1,0)--(1,3.5);       \draw[red] (3,2.5) node[above,right] {$1$};       \draw[red] (1,3.5) node[above,left] {$2$};       \draw[red] (2,4.5) node[above] {$\delta E$};     \end{tikzpicture}     \end{document}      and my output is ![enter image description here](http://i.stack.imgur.com/v8c39.png) What I'd like to do is make the angles 1,2,3,4 smoother. Also I'd like to make a bit smoother-like having a small tail-the red and blue lines that touch the x-axis. How can these be achieved?


title: How to adjust the width of abstract?

text: I would like to change my abstract's text width. For now I have something like this:               \begin{abstract}     \lipsum     \end{abstract}      I have tried wrapping my text with               \begin{minipage}{0.85\textwidth}     ...     \end{minipage}      But then : I don't know if that's the correct way + the problem is with centering this text after resizing it. **EDIT** The beginning of the document:               \documentclass[a4paper,12pt]{article}     \usepackage{times}          % Use the Times font.     \usepackage[T1]{fontenc}    % Check that ÖÄÅöäå come out ok!     \usepackage[utf8]{inputenc}     \usepackage{epsfig}         % If you embed EPS pictures.          \setlength{\parindent}{0mm} % Do not indent the 1st line of a paragraph.     \setlength{\parskip}{3mm}   % Add space between paragraphs.          % Save some paper by stuffing more text on each page:     % A4: 210mm x 297mm, approximately 35 mm margins on every side.     \addtolength{\topmargin}{-18mm}         \addtolength{\textheight}{30mm}         \addtolength{\oddsidemargin}{-6mm}      \addtolength{\textwidth}{14mm}               \begin{document}     ...


title: Wrap figure floats and Hebrew

text: I'm trying to create a wrap-float but even if there's nothing in the text it won't work. I'm using LyX 2.0.5.1. This is my MWE:               % Preview source code          %% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english,hebrew]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9,cp1255]{inputenc}     \usepackage{float}     \usepackage{wrapfig}     \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \usepackage{theorem}     \theorembodyfont{\upshape}     \newtheorem{theorem}{\R{משפט}}[section]     \AtBeginDocument{\make@lr\thetheorem}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{fullpage}     \usepackage{adjustbox}          \makeatother          \usepackage{babel}     \begin{document}     \begin{wrapfigure}{o}{0.5\columnwidth}%     \caption{}     \end{wrapfigure}%          שלום שלום          שלום שלום           \end{document}      So even without any text it says > \end{wrapfigure} % I've run across a `}' that doesn't seem to match > anything. For example,`\def\a#1{...}' and `\a}' would produce this error. If > you simply proceed now, the`\par' that I've just inserted will cause me to > report a runaway argument that might be the root of the problem. But if your > `}' was spurious, just type`2' and it will go away.


title: Spacing of fractions in TeX Gyre Pagella Math

text: Using `TeX Gyre Pagella Math` with `xelatex`, some objects like `\frac12` just seem way too large compared to the rest of the equations. Have a look: ![Ugly fractions in TeX Gyre Pagella Math](http://i.stack.imgur.com/iM8kV.png) In the first line, the numerator looks like it's floating away. The second line using a `\scriptstyle` size looks better, but the baseline is off. Finally, the exponent in the very last line also looks off. Here it seems like it's sitting way too low. Do I have a weird impression of these things, or does this simply not look nice? Can I somehow fix it? MWE:               \documentclass[varwidth,convert]{standalone}          \usepackage{mathtools}          \usepackage[math-style=ISO,bold-style=upright]{unicode-math}     \setmainfont[Ligatures={TeX,Common}]{TeX Gyre Pagella}     \setmathfont{TeX Gyre Pagella Math}          \begin{document}          \begin{tabular}{@{}l@{}}     This is quite ugly:\\     \multicolumn{1}{c}{     \( \displaystyle   \frac12 \int x = 0.5 \int x \)     } \\     \multicolumn{1}{c}{     \( \displaystyle {\scriptstyle \frac12} \int x = 0.5 \int x \)     } \\     \multicolumn{1}{c}{     \( \displaystyle   e^{\frac12 x+1} = e^{0.5 x+1} \)     }          \end{document}


title: I have two versions of Texlive on Ubuntu and I don't know how to indicate that one should be used

text: I recently ran into a problem when compiling a doc, where latex indicated a missing package, while Ubuntu indicated that it was installed. The missing package in question is `pst-node.sty` but I think that's irrelevant. All the packages in the compilation came from `/usr/local/texlive/2013/texmf- dist/tex/latex/`. Indeed, when I do               echo $PATH      the only tex-relevant path I get is               /usr/local/texlive/2013/bin/x86_64-linux      But `kpsewhich pst-node.sty` returns nothing. However:               $ locate pst-node.sty     /usr/share/texlive/texmf-dist/tex/latex/pst-node/pst-node.sty      And using Synaptic, I can indeed see that pst-node is installed, through the `texlive-pstricks` package. My question: how can I have only one LaTeX distribution on my computer? I'm happy keeping the one managed by Ubuntu (for simplicity), as I do not need very fine-grained Latex package management.


title: Tikz labels are shifted dependent on the letters size

text: ## General description of the intrinsic behavior The labels in a tikz picture are shifted (e.g. by above) exactly to the extreme of the letters in the labels, i.e. it takes the descender (see Wikipedia's entry for descender) of the letters into account like at the letter "g" (or the "p" of Sphinx). ![enter image description here](http://i.stack.imgur.com/99Nqu.png) ## Different aspect (why that question) But then the following examples do not look symmetric anymore.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \coordinate (leadl) at (1,0);     \coordinate (leadr) at (2,0);     \fill (leadl)  circle[radius=2pt];     \fill (leadr)  circle[radius=2pt];     \node[above] at (leadl) {left};     \node[above] at (leadr) {right};     \end{tikzpicture}     \end{document}      ![Example with labels above](http://i.stack.imgur.com/ggqUM.png)               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}     \coordinate (leadl) at (1,0);     \coordinate (leadr) at (2,0);     \fill (leadl)  circle[radius=2pt];     \fill (leadr)  circle[radius=2pt];     \node[below] at (leadl) {lelele};     \node[below] at (leadr) {rerere};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Dz7h7.png) ## Issue to be solved What is the easiest way to work around this (in some cases wished) feature? I do not want to analyze every character in all nodes' labels that I am typing.


title: Adjustbox does not reduce table and tikzpicture widths

text: I'm redesigning lecture notes for a university class since the students wanted to read the notes on their tablets, e-book readers, etc. So I've written a Makefile with different targets for different page sizes. The only problem I have is with some PGF/TikZ figures and some tables that are too large to fit on a small paper size. I'd like to use `adjustbox` to reduce the size of tables and figures drawn in PGF/TikZ, if they are too large to fit on the defined paper size. However, it doesn't really work.               \documentclass[10pt]{article}          % set page size with geometry     \usepackage[nohead,%         nofoot,%         nomarginpar,%         paperwidth=106.68mm,%         paperheight=142.24mm,%         tmargin=2.5mm,%         rmargin=2.5mm,%         bmargin=2.5mm,%         lmargin=2.5mm]{geometry}          \usepackage{float}          \usepackage{tikz}          \usepackage{adjustbox}          %define lengths for maximum figure and table width and height     \newlength{\maxtabfigwidth}     \newlength{\maxtabfigheight}          \setlength{\maxtabfigwidth}{\textwidth}     \setlength{\maxtabfigheight}{\textheight}          % decrease height a bit letting captions fit to one page     \addtolength{\maxtabfigheight}{-2.5em}          \pagestyle{empty}          \begin{document}          \section*{Example \#1}          The width of the table isn't reduced to \texttt{\textbackslash{}maxtabfigwidth}.          \begin{adjustbox}{center,%         max width={\maxtabfigwidth},%         max totalheight={\maxtabfigheight},%         captionbelow={A wide table},%         float={table}[h!]}     \begin{tabular}{p{6cm}p{6cm}}     \hline     wide & table \\\hline     \end{tabular}     \end{adjustbox}          \section*{Example \#2}          The width of the tikzpicture isn't reduced to \texttt{\textbackslash{}maxtabfigwidth}.          \begin{adjustbox}{center,%         max width={\maxtabfigwidth},%         max totalheight={\maxtabfigheight},%         captionbelow={A wide tikzpicture},%         float={figure}[H]}     \begin{tikzpicture}     \fill[black] (0cm, 0cm) -- (0cm, -3cm) -- (12cm, -3cm) -- (12cm, 0cm) -- cycle;     \end{tikzpicture}     \end{adjustbox}          \section*{Example \#3}          The height of the tikzpicture is reduced to\texttt{\textbackslash{}maxtabfigheight}, however it is not centered.          \begin{adjustbox}{center,%         max width={\maxtabfigwidth},%         max totalheight={\maxtabfigheight},%         captionbelow={A tall tikzpicture},%         float={figure}[H]}     \begin{tikzpicture}     \fill[black] (0cm, 0cm) -- (0cm, -15cm) -- (5cm, -15cm) -- (5cm, 0cm) -- cycle;     \end{tikzpicture}     \end{adjustbox}          \end{document}      ![mwe](http://i.stack.imgur.com/QVtTk.png) So the question is what am I missing or doing wrong? Is there any other approach for scaling down tables and figures if they don't fit on a small paper size?


title: Title of beamer presentation runs outside the screen

text:
the title does not continue on a second line but runs outside the screen ![Title page](http://i.stack.imgur.com/Dp7jk.jpg) Different .sty files are used but i'm not sure where the problem is located. The main .tex files is as follows               \documentclass{beamer}     \usepackage[english]{babel}     \usepackage{calc}     \usepackage[absolute,overlay]{textpos}     \usepackage{}     \mode<presentation>{\usetheme{tud}}     \title[Master thesis defence]     {The influence of the leading edge thickness on the force coefficients for airfoils at $90^\circ$ angle of attack}     %\subtitle     %\institute[TU Delft]{Delft University of Technology}     \author{M. Van Roosbroeck}     \date{\today}          % Insert frame before each subsection (requires 2 latex runs)     \AtBeginSubsection[] {         \begin{frame}<beamer>\frametitle{\titleSubsec}             \tableofcontents[currentsection,currentsubsection]  % Generation of the Table of Contents         \end{frame}     }     % Define the title of each inserted pre-subsection frame     \newcommand*\titleSubsec{Outline}     % Define the title of the "Table of Contents" frame     \newcommand*\titleTOC{Outline}          % define a symbol which can be removed if you don't need it     \newcommand{\field}[1]{\mathbb{#1}}     \newcommand{\Zset}{\field{Z}}          \begin{document}          {     % remove the next line if you don't want a background image     \usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{images/background-titlepage.jpg}}%     \setbeamertemplate{footline}{\usebeamertemplate*{minimal footline}}     \frame{\titlepage}     }      I think the problem is located in the following peace of code which is in an .sty file :               \DeclareOptionBeamer{shadow}[true]{\def\beamer@themerounded@shadow{#1}}     \ExecuteOptionsBeamer{shadow=false}     \ProcessOptionsBeamer          \mode<presentation>          \defbeamertemplate*{title page}{}{         \newsavebox\titleBox         \newsavebox\subtitleBox         \newsavebox\instituteBox         \newsavebox\authorBox         \newsavebox\dateBox         \sbox{\titleBox}{\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}         \ifx\insertsubtitle\@empty%             \sbox{\subtitleBox}{}         \else%             \sbox{\subtitleBox}{\usebeamercolor[fg]{subtitle}\usebeamerfont{subtitle}\insertsubtitle}         \fi%         \sbox{\instituteBox}{\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute}         \sbox{\authorBox}{\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor}         \sbox{\dateBox}{\usebeamercolor[fg]{date}\usebeamerfont{date}\insertdate}         \newlength{\titleBoxWidth}         \newlength{\titleBoxInnerWidth}         \setlength{\titleBoxInnerWidth}{\maxof{\wd\titleBox}{\maxof{\wd\subtitleBox}{\maxof{\wd\instituteBox}{\maxof{\wd\authorBox}{\wd\dateBox}}}}}         \setlength{\titleBoxWidth}{\titleBoxInnerWidth}         \addtolength{\titleBoxWidth}{1cm}              \begin{textblock*}{\titleBoxWidth}(0.5cm,2.5cm)         \begin{beamercolorbox}[sep=2mm,leftskip=3mm,rightskip=3mm,wd=\titleBoxWidth,center]{title block body}         \begin{beamercolorbox}[sep=0pt,vmode,wd=\titleBoxInnerWidth,left]{}             \begin{beamercolorbox}[wd=\wd\titleBox]{title}                 \usebox{\titleBox}%             \end{beamercolorbox}%             \ifx\insertsubtitle\@empty%             \else%                 \vskip1mm                 \begin{beamercolorbox}[wd=\wd\subtitleBox]{subtitle}                     \usebox{\subtitleBox}%                 \end{beamercolorbox}             \fi%             \vskip1mm             \begin{beamercolorbox}[wd=\wd\instituteBox]{institute}                 \usebox{\instituteBox}%             \end{beamercolorbox}             \vskip7mm             \begin{beamercolorbox}[wd=\wd\authorBox]{author}                 \usebox{\authorBox}%             \end{beamercolorbox}             \vskip1mm             \begin{beamercolorbox}[wd=\wd\dateBox]{date}                 \usebox{\dateBox}%             \end{beamercolorbox}             \vskip0pt         \end{beamercolorbox}         \end{beamercolorbox}         \end{textblock*}     }          \addtobeamertemplate{frametitle}{\hspace*{0.5cm}}          \setbeamertemplate{blocks}[rounded][shadow=\beamer@themerounded@shadow]     \setbeamertemplate{items}[circle]     \setbeamertemplate{sections/subsections in toc}[circle]          \mode     <all>      I hope somebody can help me. Many Thanks The following solution is suggested: Replace the the line with `\sbox{\titleBox}{...}` with               \sbox\titleBox{\parbox{\linewidth}{%
                  \usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}}
        which has as a consequence an error in the compilation referring to: `\useinnertheme[shadow]{tux}` deactivating this line results in a successful compilation but has alternative output ![enter image description here](http://i.stack.imgur.com/8vgCT.jpg) how to solve this? Thanks in advance


title: Warnings ignored if written in a custom auxiliary file (but not if written in .aux file)

text: For the class I'm working on, I'd like to display some warnings very early in the `.log` files. Writing the corresponding `\ClassWarning` or `\ClassWarningNoLine` commands in:   * the `.aux` file is okay but the drawback is that this file is read at least twice (at the begin and end of the document) so the warnings are duplicated,   * a customized auxiliary file is okay, except that reading this file with `\input` (or `\InputIfFileExists`) doesn't work: anything is displayed and my question is: why? Here is a MWE that shows the trouble: the `.log` file contains `Warning from .aux file.` (twice) but doesn't contain `Warning from .foo file.`.               \begin{filecontents*}{myclass.cls}     \NeedsTeXFormat{LaTeX2e}     \RequirePackage{etoolbox}%     \LoadClass{article}     %     \newwrite\foofile     \immediate\openout\foofile=\jobname.foo     %     \write\@auxout{%       \protect\ClassWarningNoLine{myclass}{%         Warning from .aux file%       }%     }%     \write\foofile{%       \protect\ClassWarningNoLine{myclass}{%         Warning from .foo file%       }%     }%     \InputIfFileExists{\jobname.foo}{}{}     \endinput     \end{filecontents*}     %     \documentclass{myclass}     \begin{document}     \ref{bar}     \end{document}


title: Fixing overfull hbox in table of contents removes too many dots

text: This question on the memoir table of contents has an answer that works well, however, the dots end too soon (in my opinion). Is there a way to make the dots more like the default without triggering the overfull hboxes? (The WME is take directly from the above question):               \documentclass[oneside, draft]{memoir}          \usepackage[showframe]{geometry}     \usepackage{lipsum}          \newcommand{\repeattext}[1]{#1 #1 #1 #1 #1 #1}          \makeatletter     \renewcommand{\@pnumwidth}{3em} %even adjusting this down doesn't really help     \renewcommand{\@tocrmarg}{4em}     \makeatother          \begin{document}          \tableofcontents          \chapter{Chapter 1}         \lipsum         \section{Section 1.1}   \repeattext{\repeattext{\lipsum[1-150]}}          \chapter{Chapter 2}         \lipsum[2]         \section{Section 2.1}   \repeattext{\repeattext{\lipsum[1-150]}}          \chapter{Chapter 3}         \lipsum[2]         \section{Section 3.1}   \lipsum[2]          \end{document}      Here's some example images (first has the dots I like, but an overfull hbox, second removes the hbox but doesn't have enough dots): ![Image of overfull hbox](http://i.stack.imgur.com/EwIUu.png) ![Image of not enough dots](http://i.stack.imgur.com/0bc3l.png) I found this in `texdoc memman`               \newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}      Perhaps those sizes are involved in the spacing.