title: Getting pdflatex to find fonts in the same directory as the LaTeX source file

text: I have a document which I render with pdflatex that uses some various "weird" (i.e., not generally included in a standard TeX distribution) fonts. It would be convenient for me to be able to bundle these fonts with the document, so it could be easily rendered on other machines, without installing these extra packages. Say my directory structure looks like this:               mydocument.tex     texmf/         doc/         enc/         map/         opentype/         tex/         tfm/         type1/         vf/      Is there perhaps a command I can add to my document's header which instructs pdflatex to search inside the `texmf` directory next to the document for fonts? This would be much more convenient than having to copy the contents of that directory into `~/texmf` or `/usr/share/texmf` or wherever on each machine I'd like to render my document on. **Edit:** As a test, I'm trying to load the font `Gillius`. For what it's worth, here's my TeX code which is instructing my document to use this font:               \renewcommand*\familydefault{\sfdefault}     \usepackage[T1]{fontenc}     \usepackage[default]{gillius}      I have tried running `pdflatex` with the command: `TEXMFHOME=./texmf pdflatex invoice.tex`, which seems to mostly work - at the very least, the `gillius.sty` file is properly located for the font. However, it seems unable to locate the font's files in `texmf/tfm/` \- namely, this is the error I get:               $ TEXMFHOME=./texmf pdflatex invoice.tex           [... omitted for brevity ...]          (./texmf/tex/T1GilliusADF-LF.fd)     kpathsea: Running mktextfm GilliusADF-Regular-lf-t1     /usr/share/texmf/web2c/mktexnam: Could not map source abbreviation G for GilliusADF-Regular-lf-t1.     /usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input GilliusADF-Regular-lf-t1     This is METAFONT, Version 2.718281 (TeX Live 2012)               kpathsea: Running mktexmf GilliusADF-Regular-lf-t1     ! I can't find file `GilliusADF-Regular-lf-t1'.     <*> ...nonstopmode; input GilliusADF-Regular-lf-t1          Please type another input file name     ! Emergency stop.     <*> ...nonstopmode; input GilliusADF-Regular-lf-t1          Transcript written on mfput.log.     grep: GilliusADF-Regular-lf-t1.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input GilliusADF-Regular-lf-t1' failed to make GilliusADF-Regular-lf-t1.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font T1/GilliusADF-LF/m/n/10=GilliusADF-Regular-lf-t1 at 10.0pt not loadable:      Metric (TFM) file not found.     <to be read again>                         relax      l.91 \begin{document}          ?      I have verified that the file `pdflatex` mentions does indeed exist, at `./texmf/tfm/GilliusADF-Regular-lf-t1.tfm`. Is there perhaps some other environment variable that controls where `pdflatex` searches for `*.tfm` files?


title: Outsource some text fragments

text: I have to type many books in Latex, where some chapters are quite similar to each other. My idea was to do one chapter in a directory and outsource the differences in a subdirectory where the main file is. like this:                 CONTENT       |       |       |---Book1       |---differences       |       |---Book1       |---differences       |      The several book files would include the content file, while the content file includes the differences file. My question now is: is it possible to NOT include the whole differences file? so I could say in the contents file:                ...some text...      \include code-fragment 1 from differences     ...some other common text     \include code-fragment 2 from differences      so I would not have to make plenty differences files for everything that is not common. I hope my question is clear :) Many thanks


title: beamer + minted most basic example fails (not the "fragile" problem)

text: I'm failing to get the simplest possible beamer+minted example to work. Here's my latex code               \documentclass{beamer}     \usepackage{minted}     \begin{document}     \begin{frame}[fragile]     \begin{minted}{python}     class X(object):         pass     \end{minted}     \end{frame}     \end{document}      I'm running pdflatex like this               pdflatex -shell-escape main      and keep getting the following errors               ! Argument of \@gobble has an extra }.     <inserted text>                      \par      l.14 \end{document}          Runaway argument?     ! Paragraph ended before \@gobble was complete.     <to be read again>                         \par      l.14 \end{document}          ! Argument of \@firstofone has an extra }.     <inserted text>                      \par      l.14 \end{document}          Runaway argument?     ! Paragraph ended before \@firstofone was complete.     <to be read again>                         \par      l.14 \end{document}          ! Undefined control sequence.     \beamer@saveanother ->\let \beamer@savedif                                                 =\ifbeamer@anotherslide      l.14 \end{document}          ! Incomplete \iffalse; all text was ignored after line 14.     <inserted text>                      \fi      l.14 \end{document}          Runaway text?     rm "main.pyg/\def \gdef {}\def \let \next =\relax \gdef {}{\par }\def \ETC.     ! Forbidden control sequence found while scanning text of \write.     <inserted text>                      }     l.14 \end{document}          Runaway text?     rm "main.pyg/\def \gdef {}\def \let \next =\relax \gdef {}{\par }\def \ETC.     ! Forbidden control sequence found while scanning text of \write.     <inserted text>                      }     l.14 \end{document}          sh: -c: line 0: unexpected EOF while looking for matching `"'     sh: -c: line 1: syntax error: unexpected end of file     [2] (./main.aux)      If I simply ignore those errors (e.g., by passing -interaction=nonstopmode), I do get a mostly good looking pdf document; the thing is that there is an extra page at the end containing the word "document" in it. Any ideas what could be wrong? I tried this example on two different linux systems, and got the same error both times. Thanks.


title: Is there an easy-to-use, all-encompassing table package?

text: I've been frustrated in recent applications with designing tables in LaTeX that have the properties I desire. I can almost always achieve the formatting I want, but a large part of my frustration comes from the fact that _every formatting change is ad-hoc or appears like a hack_. I am not a fan of this style of LaTeX design. I was wondering if there is a _single_ package that allows me to create a table environment with the following properties:   1. I can specify the horizontal and vertical alignments of every row and column, individually.   2. I can specify the height and width of every row and column, individually, either in terms of fixed lengths or stretching.   3. Failing to specify one of the above yields a pleasing default behavior similar to the default tabular settings.   4. The table is capable of spanning multiple pages without breaking. The ideal formatting for me would be one for which, at the beginning of the environment, one can declare all the relevant spacing and alignment parameters for both rows and columns, and then the body of the table follows. Note that in the default tabular environment, this is true _only_ of the columns; the formatting for each row appears in the body.


title: shading Plots with other format

text: I have the following data:               Year     upper       lower     2007     3.2         -.81     2008     2.0         -.29     2009     1.8         -.95     2010     -.5         -3.9     2011     -2.         -7.3      And I'd like a graph that fills the area between upper and lower. The effect I'm going for is similar to Fill between two curves in pgfplots.. **First question:** If my data were organized as below, I think I could easily just use a fill command:               Year     upper     2007     3.2       2008     2.0       2009     1.8       2010     -.5       2011     -2.              2011     -7.3     2010     -3.9      2009     -.95     2008     -.29      2007     -.81      Is there a way to use pgfplots, or any other tool, to plot the graph with shading between upper and lower boundary in this data format? **Second question:** Also, I would like the shaded region between years 2009.5 and 2010.5 to have a different color. Is there a way to do this without having these points in my data? After cobbling together solutions to other questions on this site, the closest I've come is the below minimal non-working example. I'm able to create macros for the new interpolated values, and I hoped to concatenate those into the existing table, but was unable to use the macros in the tableread command. I'm still woefully short of my goal, but this is advanced stuff for me.               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots, pgfplotstable}     \usetikzlibrary{calc}          \pgfplotstableread{     Year     upper       lower     2007     3.2         -.81     2008     2.0         -.29     2009     1.8         -.95     2010     -.5         -3.9     2011     -2.         -7.3     }\datatable               \begin{document}                % Interpolate 2009.5 upper     \pgfplotstablegetelem{2}{lower}\of\datatable     \pgfmathsetmacro{\y}{\pgfplotsretval}     \pgfplotstablegetelem{3}{lower}\of\datatable     \pgfmathsetmacro{\x}{\pgfplotsretval}     \pgfmathsetmacro{\firstupper}{\y-(\y-\x)/2}          % Interpolate 2009.5 lower     \pgfplotstablegetelem{2}{upper}\of\datatable     \pgfmathsetmacro{\y}{\pgfplotsretval}     \pgfplotstablegetelem{3}{upper}\of\datatable     \pgfmathsetmacro{\x}{\pgfplotsretval}     \pgfmathsetmacro{\firstlower}{\y-(\y-\x)/2}          % Interpolate 2010.5 upper     \pgfplotstablegetelem{3}{lower}\of\datatable     \pgfmathsetmacro{\y}{\pgfplotsretval}     \pgfplotstablegetelem{4}{lower}\of\datatable     \pgfmathsetmacro{\x}{\pgfplotsretval}     \pgfmathsetmacro{\firstupper}{\y-(\y-\x)/2}          % Interpolate 2010.5 lower     \pgfplotstablegetelem{3}{upper}\of\datatable     \pgfmathsetmacro{\y}{\pgfplotsretval}     \pgfplotstablegetelem{4}{upper}\of\datatable     \pgfmathsetmacro{\x}{\pgfplotsretval}     \pgfmathsetmacro{\secondlower}{\y-(\y-\x)/2}          \begin{tikzpicture}     \begin{axis}[         /pgf/number format/1000 sep={},     xmin=2007,     xmax=2011,     ymin=-8,     ymax=5,         enlarge x limits=false     ]     \addplot [draw=none, stack plots=y,forget plot] table [y=lower] {\datatable};     \addplot [draw=none, fill=gray, opacity=.5,stack plots=y] table [y expr=\thisrow{upper}-\thisrow{lower}] {\datatable} \closedcycle;     \addplot [stack plots=y, stack dir=minus,forget plot, draw=none] table [y expr=\thisrow{upper}-\thisrow{lower}] {\datatable};     \end{axis}     \begin{axis}[         /pgf/number format/1000 sep={},     xmin=2007,     xmax=2011,     ymin=-8,     ymax=5,         enlarge x limits=false     ]     \addplot [draw=none, stack plots=y, forget plot, restrict x to domain=2009.5:2010.5] table [y=lower]{\datatable};     \addplot [draw=none, fill=white,opacity=.5,stack plots=y, restrict x to domain=2009.5:2010.5] table [y expr=\thisrow{upper}-\thisrow{lower}] {\datatable} \closedcycle;     \end{axis}           \end{tikzpicture}          \end{document}      Thanks!


title: Trouble getting table centered

text: I'm using the aastex document class (trying to get a table done in the Astrophysical Journal format) and I have this table I'm trying to produce but it keeps getting right justified almost to the point of cutting off the table. I'm not sure how to fix this and I've tried a few things I've found on Google to no benefit. Here's my (shortened code):               \documentclass{aastex}     \usepackage{longtable}     \begin{document}          \begin{center}     \begin{longtable}{c|c|c|c|c|c|c|c|c|c|c}     \caption{NGC2264 Protostars}\\     \hline     \multicolumn{1}{c}{Name} & \multicolumn{1}{c}{RA} & \multicolumn{1}{c}{DEC} &     \multicolumn{1}{c}{Mean I1} & \multicolumn{1}{c}{Mean I2} & \multicolumn{1}{c}{Alpha K2} & \multicolumn{1}{c}{Class} & \multicolumn{1}{c}{Alpha K8} & \multicolumn{1}{c}{Av} & \multicolumn{1}{c}{Avg Av}\\     \hline     \hline     Mon-000101 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39  & I     & 0.39  & 31.1  & 31.1 \\     Mon-000171 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45  & I     & 0.45  & 33.7  & 33.7 \\     Mon-000174 & 100.27621 & 9.563802 & 11.605 & 10.134 & 0.95  & I     & 1.29  & 30.8  & 30.8 \\     Mon-000191 & 100.28709 & 9.495832 & 9.231 & 8.105 & 1     & I     & 1.01  & 0     & 0 \\     Mon-000323 & 100.25761 & 9.576176 & 9.385 & 8.513 & 0.31  & I     & 0.04  & 16.8  & 16.8 \\     \end{longtable}     \end{center}     \end{document}      Lookin' for some pointers. Thank you.


title: problem with math equations

text: I want to use calibri in text and cambria math fonts for equations, with lualatex. When there are no equations to my file everything works ok, but when I add an equation I get an error message "Undefined control sequence." this is my file:               \documentclass[12pt,a4paper]{article}     \usepackage{polyglossia}     \setdefaultlanguage{greek}     \setotherlanguage{english}     \usepackage{fontspec}     \usepackage{unicode-math}     \setmainfont{Calibri}     \setmathfont{Cambria Math}     \begin{document}     some text\\     Ορισμένο ολοκλήρωμα: % definite integral     $\int_{\alpha}^{\beta}f(x)dx = \dfrac{3}{\sqrt{5}-2}$          \end{document}      and the log file when the error occures               ! Undefined control sequence.     l.13 $\int_{\alpha}^{\beta}f(x)dx = \dfrac     {3}{\sqrt{5}-2}$     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf" [1     {C:/Users/user/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]     (C:/Users/user/Documents/LaTeX/test_lualatex.aux     luatex-hyphen: loading patterns and exceptions for: greek (\language24)     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"     luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf")     LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.     )     Here is how much of LuaTeX's memory you used:     20047 strings out of 494734     100000,552014 words of node,token memory allocated     310 words of node memory still in use:     nodes     avail lists: 1:52,2:67,3:23,4:41,5:14,6:49,7:3,8:2,9:511,10:981,11:520,12:229     23203 multiletter control sequences out of 65536+200000     47 fonts using 14496391 bytes     61i,4n,63p,829b,249s stack positions out of 5000i,500n,10000p,200000b,50000s     <C:/Windows/Fonts/cambria.ttc(CambriaMath:1)><C:/Windows/Fonts/cambria.ttc(Cambr     iaMath:1)><C:/Windows/Fonts/calibri.ttf>     Output written on test_lualatex.pdf (1 page, 71199 bytes).     PDF statistics: 27 PDF objects out of 1000 (max. 8388607)     0 named destinations out of 1000 (max. 131072)     1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: LuaLaTeX and multilanguage support

text: I've a little issue managing fixed names in my TeX class. I'm using the `babel` package for multilanguage hyphenation support so far, but I would like to deactivate the fixed names provided by `babel`. I know it's possible to renew all fixed strings/names via:               \addto\captions<LANG>{       \renewcommand{...}         {...}     }      but to be honest, I would appreciate to do it just by `\newcommand{}{}` my own. So that there is no link between the choosen hyphanation language and my used fixed names or any other dependency. Is there any option to turn off the fixed names of `babel` (`\RequirePackage[englisch.hyphen]{babel}` not working)? Or is there any alternative way to get multilanguage hyphenation in LuaLaTeX?


title: Fill area in tikzpicture

text: Can somebody help? The fill area is not symmetric. The goal is to be symmetric.               \documentclass[10pt]{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \pagestyle{empty}     \begin{document}     \definecolor{zzttqq}{rgb}{0.6,0.2,0.0}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]     \draw[->,color=black] (-4.0,0.0) -- (4.0,0.0);     \foreach \x in {-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0}     \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};     \draw[->,color=black] (0.0,-0.5) -- (0.0,5.5);     \foreach \y in {,1.0,2.0,3.0,4.0,5.0}     \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};     \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};     \clip(-4.0,-0.5) rectangle (4.0,5.5);     \draw[color=zzttqq,fill=zzttqq,fill opacity=0.1, smooth,samples=50,domain=-2.0:2.0] plot(\x,{(\x/2.0)^(4.0)-\x^(2.0)+5.0}) -- (2.0,0.0) -- (-2.0,0.0) -- cycle;     \draw[smooth,samples=100,domain=-4.0:4.0] plot(\x,{((\x)/2.0)^(4.0)-(\x)^(2.0)+5.0});     \begin{scriptsize}     \draw[color=black] (-4.140000000000001,6.140000000000001) node {$f$};     \end{scriptsize}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/mJI7u.png)


title: Having trouble cross-referencing figures

text: I'm having a bit of trouble trying to reference figures in my latex document. Here is my latex code:               \documentclass[12pt]{article}     \begin{document}          \begin{figure}       Here is a figure       \label{fig:test1}       \caption{Here is a caption}     \end{figure}     Here is some text. See figure~\ref{fig:test1}.          \end{document}      I compile it twice with `pdflatex test.tex` but in the resulting pdf I get a blank space where there should be a number for the figure reference. For example, instead of "See figure 1." I get "See figure ." How do I fix this problem?


title: Force aligned equation (all the way) to the left?

text: How do I force the following aligned output all the way to the upper left (right next to the enumerated list item)? I still want the 2nd and 3rd lines to be aligned with it's above equal sign.               \documentclass{article}     \usepackage{amsmath,amssymb,amsfonts}     \usepackage{enumerate}          \begin{document}       \begin{enumerate}[(a)]       \item          \begin{align*}           P(A \XOR B) &= P(A)+P(B)-2P(A\cap B)           \\ &= 0.15 + 0.10 - 0.05           \\ &= 0.20         \end{align*}       \end{enumerate}     \end{document}


title: Highlight foreground text using overpic?

text: I am using the `overpic` package to edit a pre-created pdf by writing notes in between the lines using `\put(){$$}` for each line. Im having difficulty however using the `soul` package and `\hl` to highlight the existing writing of pdf as it highlights it in the foreground. Is there a way to highlight the existing writing on the pdf in the background and maintain the original writing thus highlighting it?               \documentclass[11pt,a4paper]{article}     \usepackage{overpic}     \usepackage{eso-pic}     \usepackage{soul}     \begin{document}     \begin{figure}     \vspace*{-28ex}     \hspace*{-30ex}     \begin{overpic}[width=9in,page=14]{file.pdf/jpg %%}     \put(20,29){}%using the number 10,20 puts writing over the highlight below%%i need the number to be the same so where would I incorporate my vspace and hspace and textwidth for the sHIPOUT%     \AddToShipoutPictureBG*{     \put(30,115){\hl{\qquad\qquad\qquad% using \qquad to make a space for what is supposed       to be highlighted%}}}     \end{overpic}     \end{figure}     \clearpage     \begin{figure}     \vspace*{-28ex}     \hspace*{-30ex}     \begin{overpic}[width=9in,page=15]{file.pdf/jpg %%}     \end{overspace}     \end{figure}     \end{document}      mY question is how do I get the Background to line up the same as any other \put within the overpic? Ive tried vspace and hspace separately on the shipout but doesnt seem to work, also how do i get it to go on just one page?


title: Tips to improve look of a thesis?

text: I am writing a thesis at the moment and wondered if anyone has any hints/tips to make it look neat and professional? I currently have (in my opinion) nice looking tables and page border titles etc.. I was just wondering if there are anything else that is worth adding?


title: tikz node in text is slightly raised

text: I have defined the following command:               \pgfkeys{tikz/protein/.style={fill=#1,shape=rectangle,rounded corners}}     \newcommand{\protein}[2]{       \protect\tikz \protect\node [protein=#1] {\small{#2}};}      It works fine, the only problem I have is that when I embed it in normal text, it appears slightly raised, messing up the line spacing. Is there any way to fix that, so that the embedded tikz is vertically centered on the line?


title: table out of margin: any suggestion?

text: I try to put a very large table inside a pdf:               \begin{table}     \begin{center}        \caption{ \textit{Title}. Some comments.}         \begin{tabular}{llllllll}         \hline         Parameter       & bbbbbb & cccccc & dddddd & eeeee & fffff & gggggg & hhhhh \\ \hline         Parameter 1     & 111111  & 111111  & 111111 & 111111 & 111111 & 111111 & 111111 \\         Parameter 2     & 0.0    & 0.0   & 0.0  & 0.0  & 0.0  & 0.0  & 0.0      \\         Parameter 3   & 0.0    & 0.0   & 0.0  & 0.0  & 0.0  & 0.0  & 0.0        \\         Parameter 4   & 444444  & 444444  & 444444 & 444444 & 444444 & 444444 & 444444 \\          Parameter ...   & .....  & .....  & ..... & ..... & ..... & ..... & ..... \\ \hline              \end{tabular}      \end{center}     \end{table}      I read the help in Table out of margin but I can't be able to found a very simple way to show this table because also in this case the table go out from the margin. Maybe I make some mistakes using `\sisetup{table- format=1.4e06,exponent-product = \cdot}`. Can You help me to found a solution? Thanks.


title: Best choice for open type font: PostScript outlines (OT CFF) or True Type outlines (OT TTF)?

text: I'd like to buy an open type font which is provided in two versions: with PostScript outlines (OT CFF) or with True Type outlines (OT TTF), as technical format. What would be the best choice for PDF(La)TeX/Xe(La)TeX/Lua(La)TeX use?


title: Cannot show my citations

text: \documentclass{article}          \usepackage[authoryear]{natbib}          \bibliographystyle{plainnat}               \begin{document}          \section{Background}\label{sec:intro}          Most of the restaurants nowadays are using conventional food-ordering method where the customers place their orders to the waiters and the waitresses directly. This has been time-wasting and paper-wasting \citep*{Bora2012}.The device is connected to the restaurant’s database, all the information of the meals will be shown on the screen. The customers can place the orders by just touch on the screen of the device while the waiters and waitresses can concentrate to serve the customer order. It is believed to be able to improve the restaurant’s services \citep*{Purnama2007}.            \end{document}      ![The output of the citation](http://i.stack.imgur.com/tDCIR.png) this is example of my bib file..               @article{Bora2012,     author = {Bora, Paresh R and Gupta, Eshan},     file = {:C$\backslash$:/Users/Ruby/AppData/Local/Mendeley Ltd./Mendeley      Desktop/Downloaded/Bora, Gupta - 2012 - APPLICATION ON ORDER MANAGEMENT SYSTEM IN RESTAURANTS.pdf:pdf},     keywords = {android,tablet,touch technology,wi-fi,wireless food ordering system},     number = {2},     pages = {59--62},     title = {{APPLICATION ON ORDER MANAGEMENT SYSTEM IN RESTAURANTS}},     volume = {1},     year = {2012}     }      Why does my output show like this? Thank for help :) I have put my file in same folder


title: Right aligning a quote with extra indentation

text: I want to insert a quote into a document, have it aligned to the right, italic, with some extra indentation from the right margin, this is what i've managed so far:               \documentclass{book}      \usepackage{lipsum}     \begin{document}          \hfill\textit{This is a very boring,}          \hfill\textit{text without any substance} {\vspace{0.5em}}          \hfill\textit{A future book}          \hfill\textit{Ann Onymous}          \lipsum[5]          \end{document}      This is what it looks like: ![HAVE](http://i.stack.imgur.com/omXft.png) But what I want it to look like is like this: ![WANT](http://i.stack.imgur.com/uMJlf.png)


title: What's the differences between the kernel commands \trivlist and \list?

text: LaTeX defines the two environments `\trivlist` and `\list`. Both can be used creating own environments. **What exactly is the differences between`\trivlist` and `\list`?**


title: how to put caption (a) below 2 pictures

text: ![enter image description here](http://i.stack.imgur.com/JFubt.png) I am rephrasing my question... I want to obtain attached Image.. I have coded as below.. But I do not obtain required output.. Can you help me modify my code?               \begin{document}     \begin{figure}[ht]     \begin{subfigure}{\textwidth}     \centering     \includegraphics[width=6cm]{c1.eps}     \includegraphics[width=6cm]{c2.eps}     \caption{}%{V} \label{fig:a}     \end{subfigure}     \begin{subfigure}{\textwidth}     \centering     \includegraphics[width=6cm]{c3.eps}     \includegraphics[width=6cm]{c4.eps}     \caption{}%{P} \label{fig:b}     \end{subfigure}     \caption{Variation} \label{fig:wind_speed}     \end{figure}     \end{document}


title: When does \nopagebreak work?

text: There are many examples where `\nopagebreak` doesn't work as expected:   * Nopagebreak nopagebreak nopagebreak - why won't LaTeX listen to me?   * How to make longtable respect \nopagebreak in the beginning?   * nopagebreak between rule and custom theorem env   * thmtools: How to prevent pagebreak between theorem and proof?   * Why can't I prevent page break?   * [texhax] nopagebreak not working What is an example case where `\nopagebreak` does have an effect? And what are the rules determining whether or not `\nopagebreak` will work?


title: bibliography style: merging the alpha style with the style of abbrv for author information

text: I like alphanumerical citations written as in alpha.bst style, with initials of authors and years, but I would like that the information of authors name be as in abbrv style. In alpha style I will get: [ML12] Eva Monclús and Eva Lahoya. ....... In abbrv style I will get: [1] E. Monclús and E. Lahoya ........ The style I am looking for would get: [ML12] E. Monclús and E. Lahoya ........


title: Rotate and lap words

text: I want to rotate the word flower 5 times and the rotations should lap over the c. That's what I got so far:               \clap{\rotatebox[origin=c]{0}{flower}}\clap{\rotatebox[origin=c]{20}         {flower}}\clap{\rotatebox[origin=c]{45}{flower}}         \clap{\rotatebox[origin=c]{60}{flower}}\clap{\rotatebox[origin=c]{80}{flower}}      Could somebody please help me?


title: Remove padding at top of page

text: I am writing a paper using a collection of mandated styles. They add vertical spacing above things like equations and tables. However, if the item with padding is the very first item on a page, I am not supposed to have the padding. The instructions say to open it in a PDF editor and pull the content up on those pages. Is there anything I can add that tells latex: Do not place any vertical spacing above anything when it is the first item on the page.               Given two object attribute vectors, such as $A$ and $B$ in Figure \ref{fig:triangle}; vector cosine defines similarity as the cosine of the angle, $\Theta$, $     Equation \ref{eq:vectorcosine} calculates vector cosine using ``dot product'' and ``magnitude'' vector operations.     The result will be -1 when the $\Theta$ is 180$^\circ$, 0 when $\Theta$ is 90$^\circ$, and 1 when $\Theta$ is 0$^\circ$.     Therefore, it is possible to infer that -1 means $A$ is opposite of $B$ while 1 means that $A$ is the same as $B$.          \begin{equation}     \textrm{S}(A,B) = \cos(\theta) = \frac{A\cdot B}{\left\Vert A\right\Vert \left\Vert B\right\Vert}     \label{eq:vectorcosine}     \end{equation}


title: How to insert a trademark symbol? (tm)

text: How do you insert a trademark symbol in LaTeX? That is, the "TM" superscript.


title: Is it possible to know and use the number of items of one list?

text: The following code gives one way to use circled numbers in one list. For the moment this solution uses one parameter given by the user which is the "width" of the total number of items of the list.               % Sources :     %   1) http://tex.stackexchange.com/questions/7032/good-way-to-make-pgftextcircled-numbers     %   2) http://tex.stackexchange.com/questions/33738/customize-diameter-of-a-circle-around-numbers/33744#33744          \documentclass{article}         \usepackage[utf8x]{inputenc}         \usepackage{enumitem}         \usepackage{tikz}              \newbox\nodebox         \newcommand\pgftextcircled[2][0]{%             \ifnum#1=0%                 \setbox\nodebox\hbox{#2}%             \else%                 \setbox\nodebox\hbox{0}\wd\nodebox\dimexpr\wd\nodebox*#1\relax             \fi             \begin{tikzpicture}[baseline=(a.base)]%                 \node[                     draw,circle,                     outer sep=0pt,                     inner sep=0.5pt                 ](a){\hbox to \wd\nodebox{\hss#2\hss}};             \end{tikzpicture}%         }               \begin{document}          \begin{enumerate}[label=\protect{\pgftextcircled[1]{\arabic*}}]         \item Item n°1         \item Item n°2         \item Item n°3         \item Item n°4         \item Item n°5         \item Item n°6         \item Item n°7         \item Item n°8     \end{enumerate}          \begin{enumerate}[label=\protect{\pgftextcircled[2]{\arabic*}}]         \item Item n°1         \item Item n°2         \item Item n°3         \item Item n°4         \item Item n°5         \item Item n°6         \item Item n°7         \item Item n°8         \item Item n°9         \item Item n°10         \item Item n°11         \item Item n°12     \end{enumerate}          \end{document}      Could it be possible to define one environment `enumerateCircle` which knows automatically the length of the list so as to use the following syntax ?               \begin{enumerateCircle}         \item Item n°1         \item Item n°2         \item Item n°3         \item Item n°4         \item Item n°5         \item Item n°6         \item Item n°7         \item Item n°8     \end{enumerateCircle}          \begin{enumerateCircle}         \item Item n°1         \item Item n°2         \item Item n°3         \item Item n°4         \item Item n°5         \item Item n°6         \item Item n°7         \item Item n°8         \item Item n°9         \item Item n°10         \item Item n°11         \item Item n°12     \end{enumerateCircle}


title: xparse: Define new command with multiple optional parameters

text: I'd like to define a new command with optional parameters using the `xparse` package. Please consider the following example:               \documentclass{minimal}     \usepackage{xparse}          \DeclareDocumentCommand{\mycommand}{ O{mydefault} m o o o }{%             p:#2%             \IfNoValueTF{#3}%                 {}%                 { p:#3}%             \IfNoValueTF{#4}%                 {}%                 { p:#4}%             \IfNoValueTF{#5}%                 {}%                 { p:#5}             p:#1     }     \begin{document}     \mycommand[one]{two} \par % p:two p:one     \mycommand[one]{two}[three] \par % p:two p:three p:one     \mycommand[one]{two}[three][four] \par % p:two p:three p:four p:one     \mycommand[one]{two}[three][four][five] \par % p:two p:three p:four p:five p:one     \mycommand[one]{two}[three][][five] \par % p:two p:three p: p:five p:one     \mycommand[one]{two}[][][five] % p:two p: p: p:five p:one     \end{document}      ![enter image description here](http://i.stack.imgur.com/LZGIU.png) The problem now is that when I'm leaving some parameters empty between two others that are filled in, LaTeX also displays those empty parameters. Applied to the last example I'd like to get `p:two p:five p:one`.


title: Some Literate tool to create fast Mind maps in RSweaveLatex?

text: I am looking for literate tools for mind-map-generation that would work nicely with RSweaveLatex. It is possible that there is no need for tools such as Labyrithm (which is apparently broken, at least in Ubuntu) or Dia (stopped to use it a long time ago) but I could reuse the existing software packages. I was unable to find any such pkg here or I am using wrong words. Anyway I am looking for some literate mind-map-tool which I could use as spontaneously as RSweaveLatex, otherwise I will use just pen-and-paper! _Perhaps, some label such as`creativity` or something like that would describe this kind of innovative questions that do not necessarily have solution -- but trying to find a certain type of solution, perhaps not existing yet._


title: Does TeX always insert the macro \par?

text: When the input processor encounters two characters with category code 5 in a row (in other words, a blank line), it inserts the `\par` macro. When `\vbox{Abc.}` ends, TeX ends the current paragraph, but not by inserting the `\par` macro. It seems that TeX is inserting the `\par` primitive instead. Am I understanding correctly what TeX is doing in this case? What about other places where TeX inserts `\par`? When is it the macro `\par`, and when the primitive?               \catcode`@=11     \let\@@par\par     \def\par{\typeout{Macro!}\@@par}          Abc.          \vbox{Abc.\tracingall}


title: Mathematics program used to make the figures?

text: I was wondering what kind of program was used to make these graphs / figures ? I know that the authors used LaTeX. ![Figure 0](http://i.stack.imgur.com/Tp2O2.jpg) ![Figure 1](http://i.stack.imgur.com/tLxa5.jpg) ![Figure 2](http://i.stack.imgur.com/T8pYD.jpg) ![Figure 3](http://i.stack.imgur.com/VIIUT.jpg)


title: TiKZ make lines connecting nodes have the same endpoints

text: Using the MWE below:               \documentclass{standalone}     \usepackage{tikz}     \usepackage{tikz-qtree}     \usepackage{tikz-qtree-compat}     \usepackage{ textcomp }          \begin{document}     \begin{tikzpicture}     \Tree [        .TP [            .T' \node(C){T+verb}; [               .vP \qroof{`ana}.DP [                  .v' \node(B){v+{\textlangle}verb{\textrangle}}; [                      .VP [                          .V' \node(A){V+{\textlangle}verb{\textrangle}}; \qroof{taalib}.DP                       ]                  ]               ]           ]       ]     ]     \draw [semithick,->] (A) to[out=270,in=180] (B);     \draw [semithick,->] (B) to[out=270,in=180] (C);     \end{tikzpicture}     \end{document}      I get output like this: ![End of first arrow and beginning of second arrow don't match](http://i.stack.imgur.com/2b2xU.jpg) The tree would look a lot better and I think be more intuitionally correct if the endpoint of the arrow from "V+" and the starting point of the arrow from "v+" were in the same place, perhaps with a small black dot to connect them. That would better show that the same verb is doing both movements. Does anyone know how to accomplish this?


title: Only show header if section number > 0

text: The current section name + chapter.section number is shown in the header. This is normal behaviour (what I want). Example: ![enter image description here](http://i.stack.imgur.com/UMjUs.png) How can I remove the header text, if there is no section on the page. The following example illustrate my problem. The header is "1.0" but I want to show nothing. Example: ![enter image description here](http://i.stack.imgur.com/DmiWr.png) Here my MWE:               \documentclass{scrbook}     \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{#1}{}}          \fancyhead{}     \fancyhead[LE]{\makebox[2cm][r]{}{}}     \fancyhead[RO]{\rightmark\hspace*{0.2cm}\thesection}               \begin{document}          \chapter{An example chapter}          \blindtext[25]          \section{An example section}          \blindtext     \end{document}


title: tcolorbox doesn't print offset correctly?

text: Edit: It turned out to be my PDF viewer. * * * So I made this little `tcolorbox` and the distance between each subsequent pair of rules does not match for all rules: ![http://i.imgur.com/I1lA91z.png](http://i.stack.imgur.com/nPfKD.png) The code I have is this:               \documentclass{article}     \usepackage[skins]{tcolorbox}     \definecolor{bg}{HTML}{F8FAFF}     \definecolor{col1}{HTML}{80B2FF} %4 Outer right borderline     \definecolor{col2}{HTML}{99C2FF} %3     \definecolor{col3}{HTML}{B2D1FF} %2     \definecolor{col4}{HTML}{CCE0FF} %1 Outer left borderline     \newdimen\BLW % BorderLine Width     \BLW\dimexpr 5pt\relax     \newdimen\BLS % BorderLine Sep     \BLS\dimexpr 0pt\relax     \newdimen\BLLa % ``Gap'' between first and second line     \BLLa\dimexpr -\BLW-\BLS-(\dimexpr 3\BLW/4)/2\relax\relax     \newdimen\BLLb % between second and third line     \BLLb\dimexpr -\BLW-\BLS-(\dimexpr 3\BLW/4)-\BLS-(\dimexpr 9\BLW/16)/2 \relax\relax\relax     \newdimen\BLLc % between third and fourth line     \BLLc\dimexpr -\BLW-\BLS-(\dimexpr 3\BLW/4) -\BLS-(\dimexpr 9\BLW/16)-\BLS-(\dimexpr 27\BLW/64)/2 \relax\relax\relax\relax          \begin{document}     \begin{tcolorbox}[       width=\linewidth-6pt,       frame hidden,       colback=bg,       freelance,       arc=0pt,       boxrule=0pt,       frame code={         \draw[col1,line width=\BLW]  % right           ([xshift=-\BLW/2]frame.north west) -- ([xshift=-\BLW/2]frame.south west);         \draw[col2,line width=3\BLW/4]            ([xshift=\BLLa]frame.north west) -- ([xshift=\BLLa]frame.south west);         \draw[col3,line width=9\BLW/16]            ([xshift=\BLLb]frame.north west) -- ([xshift=\BLLb]frame.south west);         \draw[col4,line width=27\BLW/64]            ([xshift=\BLLc]frame.north west) -- ([xshift=\BLLc]frame.south west);       }     ]     some stuff     \end{tcolorbox}          BLW: \the\BLW\relax          BLS: \the\BLS\relax          $\frac{3}{4}$ BLW: \the\dimexpr3\BLW/4\relax          $\frac{9}{16}$ BLW: \the\dimexpr9\BLW/16\relax          $\frac{27}{64}$ BLW: \the\dimexpr27\BLW/64\relax          BLLa: \the\BLLa\relax          BLLb: \the\BLLb\relax          BLLc: \the\BLLc\relax          \end{document}      As you can see the `\dimexpr` values are in fact correct, while the offset of the borderlines/rules is not. (This offset should be equal to the `\BLS`, but instead it's all over the place.) To understand how I calculated the placement of the rules to create a static offset about `\BLS`, consider this picture: ![http://i.imgur.com/2yVmTp1.png](http://i.stack.imgur.com/MVjA7.png) Printed values with the `\the` command show correct values, but the tcolorbox


title: Gap at origin when using axis lines*=left in conjunction with line width spec via axis line style

text: Please forgive the strange graph displayed here - I am simply trying to display a replicable chunk of code in the presence of all the packages I am attempting to use and want to avoid displaying data generated outside of my tex code. Whatever solution I come up would ideally generalize to `groupplot` (i.e. I am trying to avoid drawing my axes from scratch via `\draw`). I am attempting to compile this in XeLaTeX. The following chunk:               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{fontspec}     \usepackage{fixltx2e}     \definecolor{nice_blue}{HTML}{377EB8}     \definecolor{nice_green}{HTML}{4DAF4A}               \begin{document}     \begin{tikzpicture}     \node at (.75,4.5) {\fontspec{Arial}w\textsubscript{1}};     \node at (1.25,5) {\fontspec{Arial}w\textsubscript{2}};     \node at (1.75,5.45) {\fontspec{Arial}w\textsubscript{3}};     \node[color=nice_green] at (5.35,3.5) {\fontspec{Arial}Well-being};     \begin{axis}[         axis lines*=left,         ytick=\empty,         xtick=\empty,         xmin=0,         xmax=12,         ymin=0,         ymax=12,         xlabel=\fontspec{Arial}Household Produced Investments x\textsubscript{ch},         ylabel=\fontspec{Arial}Market Purchased Investments x\textsubscript{cm},         axis line style = {line width=2.83464567pt},         enlarge x limits=false     ]     \addplot[->, nice_blue, line width=2.83464567pt] plot coordinates{(1,1)(5,5)};     \addplot[->, nice_green, line width=2.83464567pt] plot coordinates{(7,7)(8.5,9)};     \end{axis}     \end{tikzpicture}     \end{document}       Should yield the following plot: ![enter image description here](http://i.stack.imgur.com/Qz6xC.png) I would like to know how to get a clean "mitred" corner in my axis with no gap as opposed to the gap shown in the zoomed image below: ![enter image description here](http://i.stack.imgur.com/1y8Nd.png)


title: biblatex-chicago with option authordate does not work anymore

text: sorry if I just got something stupidly wrong, but I encountered a serious problem with the biblatex-chicago package.... Have to say: I just updated to the most recent MacTex version and this might be the reason, but I cannot find anything... thats my preamble (that worked perfectly fine 2 weeks ago!)               \documentclass[10pt,oneside,a4paper]{scrartcl}               \usepackage[utf8]{inputenc}     \usepackage{graphics}     \usepackage{csquotes}     \usepackage[ngerman]{babel}     \setcounter{secnumdepth}{-1}          \clubpenalty=10000     \widowpenalty=10000     \displaywidowpenalty=10000          % ********************************BIBLATEX**************************     \usepackage[language=german,isbn=false,backend=bibtexu,authordate,babel=other]{biblatex-chicago}          \bibliography{/Users/moritzklenk/Documents/ZOTERO/EXPORTS/MyLibrary.bib}          % *************************************************************************      but just of now it gives my this error:               (/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/biblatex.cfg)))     /usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty:92: Missing \endcsname inserted.     <to be read again>                         \global      l.92 \csuse{cms@\cms@style}      If I get rid of the "authordate" option everything is just fine (except it is not using the author-date option for inline references, of course). What is wrong here? All help is very much appreciated!!! Little bit desperate here...


title: Ellipsis with a period/fullstop

text: While quoting how ellipsis should be used if few sentences are omitted in between. (ommissions are not clauses or words or phrases, but sentences). For example if there is a passage like: `This is a book. That is a pen. That is my bag`. So, I am quoting now omitting the middlle sentence. The tex source code:               ``This is a book.\ldots That is my bag''      Here is the tex output: ![image](http://i.stack.imgur.com/1tOEO.png) So in the above example if I use a period and `\ldots`, then the spacing between the period and ellipsis doesn't appear fine. **EDIT: 1** I'm following MLA style guide. And I am using `mla-paper` package.


title: How can you place a figure caption inside a table using LyX?

text: I have 3 graphs I would like to use in a LyX document. In order to save space I have placed the 3 graphs into a 2x2 table and in the final box I have inserted the figure caption. ![See Image](http://i.stack.imgur.com/EyaHL.png) When I try and open the file as a PDF it gives me a whole list of errors. Is there a way to place the caption in the table (or place the caption over a section of an image) so that I can save some space?


title: Figure in beamer moves around

text: This is a `MWE` of my code:               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows}          \mode<presentation> {     \usetheme{Frankfurt}     \usecolortheme{dolphin}     }          \begin{document}          \begin{frame}          \begin{columns}[c]          \column{.7\textwidth}     \only<1>{       \begin{tikzpicture}         \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};       \end{tikzpicture}     }     \only<2>{       \begin{tikzpicture}         \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};         \draw[green,thick,rounded corners] (4.8,5.2) ellipse (0.28 and 1.5);         \draw[->, line width=2pt, -triangle 60] (6.3,5.2) -- (5.2,5.2);       \end{tikzpicture}     }     \only<3>{       \begin{tikzpicture}         \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};         \draw[green,thick,rounded corners] (5.8,3) ellipse (0.28 and 1.5);         \draw[->, line width=2pt, -triangle 60] (7.1,3) -- (6.1,3);       \end{tikzpicture}     }          \column{.35\textwidth}     \vspace{-1.cm}     \setbeamercolor{normal text}{fg=gray,bg=}     \setbeamercolor{alerted text}{fg=black,bg=}     \usebeamercolor{normal text}     \begin{itemize}     \item \alert<+>{Some text goes here sdsdf sdfsdfsdfsdf.}\\[4ex]     \item \alert<+>{Some more text here sdfdsf.}\\[4ex]     \item \alert<+>{And some text here.}     \end{itemize}          \end{columns}          \end{frame}          \end{document}      This creates three slides with the same image: ![enter image description here](http://i.stack.imgur.com/UcOTO.png) ![enter image description here](http://i.stack.imgur.com/AdPbR.png) ![enter image description here](http://i.stack.imgur.com/6IwJH.png) It might not be noticeable when seen separate but the grey square does not maintain a fixed position within the slides. How do I get it to stop moving around? Here's the grey square I use: ![enter image description here](http://i.stack.imgur.com/l17cX.png)


title: Package mh cannot be found

text: > ! LaTeX Error: File `mh.sty' not found. However, `mh` is assuredly included in my TexLive2011 installation. Why am I getting this error? OS: Kubuntu 64-bit Editor: TexWorks


title: Why doesn't \lstinline work in table column?

text: \documentclass[14pt]{extarticle}     \usepackage{xcolor}     \definecolor{deepblue}{rgb}{0,0,0.5}     \definecolor{deepred}{rgb}{0.6,0,0}     \definecolor{deepgreen}{rgb}{0,0.5,0}     \usepackage{listings}     \lstloadlanguages{[LaTeX]TeX}     \lstdefinestyle{listLaTeX}{       language={[LaTeX]TeX},       extendedchars=true,       belowcaptionskip=5pt,       xleftmargin=0.5cm,       numbers=left,       numberstyle=\scriptsize\ttfamily\bf,       frame=single,       breaklines=true,       breakatwhitespace=true,       breakindent=0pt,       basicstyle=\small\ttfamily,       keywordstyle=\color{deepblue}\ttfamily,       identifierstyle=\color{deepred}\ttfamily,       commentstyle=\color{deepgreen}\ttfamily,       morekeywords={},       emphstyle=\color{red},       emph={},       columns=fullflexible,       showstringspaces=false     }     \begin{document}     Test -- \lstinline[style=listLaTeX]!\Huge!!          \begin{tabular}{|p{0.29\linewidth}|p{0.29\linewidth}|p{0.29\linewidth}|}     \hline     1&2&3\\     \lstinline[style=listLaTeX]!\Huge!&2&3\\%This line has an error!!!!     \hline     \end{tabular}     \end{document}


title: how to customize size of the image through arguments?

text: Relating from this link, Create command to inline an image in a question? is there a way so the image can be modified? Example `\Image[20][10]` where 20 is the height and 10 is the width.


title: \mbox does not draw a box inside align*

text: `\mbox` doesn't work inside `align*`:               \begin{document}     \usepackage{mhchem}              \begin{align*}          \ce{K_w} &= \ce{[H3O+][OH^-]} \\         -\log \ce{K_w} &= -\log ( \ce{[H3O+][OH^-]} ) \\         -\log \ce{K_w} &= - ( \log \ce{[H3O+]} + \log \ce{[OH^-]} )  & \text{(Using log law for RHS.)}\\         -\log \ce{K_w} &= -  \log \ce{[H3O+]} - \log \ce{[OH^-]} \\         -\log \ce{K_w} &= -  \log \ce{[H3O+]} + - \log \ce{[OH^-]} \\         \mbox{ \ce{pK_w} &= \ce{pH} + \ce{pOH} }\\         \end{align*}          \end{document}


title: Wrap text to quote it later in the same document

text: I was wondering if there's a way to do the following:   * to wrap an excerpt of text in an environment and to label it;   * to quote it (entirely) later in the same document, via a `\ref` command or similar. By doing so, one could modify the wrapped text, without having to update all of the later references to it in the document. I'm aware that a simple workaround would be to use `\input{}` both in the first and in the later occurrences of the wrapped sentence; I only wanted to know if there's something more specific. More in detail, my purpose is to wrap some text that I have to cite in an answer letter to the reviewer of a submitted paper. Suppose I wrote in a first version of the paper that:               it is clear that 2+2=5      Now the reviewer makes me pay attention to the fact that there's an error. I correct it and: 1 - in the revised version of the paper I write:               \wraptext{twoplustwo}{it is clear that 2+2=4}      provided that `\wraptext{}{}` is the command I was looking for; 2 - in the answer to the reviewer, I specify: > the error has been corrected, as you can see in the following reported > excerpt:               \citewrappedtext{twoplustwo}      again provided that `\citewrappedtext{}` is the command to recall the excerpt. This way, one can later modify again the sentence:               \wraptext{twoplustwo}{it is obvious that 2+2=4}      without having to correct the quotes, too.


title: How to draw two opposite arrows on the same curve?

text: How can I draw opposite arrows on the same curve? The following image shows my aim. ![!](http://i.stack.imgur.com/fLUWL.jpg)


title: "I cannot decorate an empty path" when placing label above plot

text: I'm trying to place a label above a curve with tikz and pgfplots. My solution below produces the expected output, but only when I ignore the error message during compiling:               Package PGF Error: I cannot decorate an empty path. [  \end{axis}]      What does it mean and how do I fix it? There clearly is a visible path, and it does get decorated when I skip over the error. Example below:               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \usetikzlibrary{decorations.markings}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}           \begin{document}          \pgfmathdeclarefunction{poiss}{1}{%       \pgfmathparse{(#1^x)*exp(-#1)/(x!)}%     }          \begin{tikzpicture}[node distance=10mm]         \begin{axis}[           compat=newest,           ymax=0.16,           xlabel=$k$,           ylabel=$P(k)$,           domain=0:25,samples at = {0,...,25},           label/.style 2 args={%             postaction={ decorate,                decoration={ markings, mark=at position #1 with \node#2;}               }}%           ]           \addplot[red,mark=o,%                    label={0.45}%                          {[above]{$\lambda=10$}}%             ] {poiss(10)};       \end{axis}     \end{tikzpicture}          \end{document}


title: how to set the \quad space between the equation and equation number with centered

text: How to set the `\quad` space between the equation and equation number with centered output i.e equation will be centered the output should be like below > A + b (1) > > A + b (2)


title: Subfloat under each other

text: I want to put two subfloat figures under each other but they keep being beside each other. This is the script used:               \begin{figure}[t]     \subfloat[A]{\includegraphics[width=\linewidth]{a}\label{a}}     \subfloat[B]{\includegraphics[width=\linewidth]{b}\label{b}}     \caption{abc}      \label{abc}     \end{figure}


title: How to typeset a backslash and get line breaks in URLs?

text: I have a lot of Windows file/folder paths and register paths in my document. And I'm having 2 problems:   1. The `\` is seen as and escape character which obviously doesn't compile. `\\` Starts a new line rather than escaping the `\`. I tried `$$` too, but that didn't work either.   2. There is no line breaking, so the paths go out of the page margin. At the first question, is there a quick way to solve this rather then changing all `\` to `/` ? At the second question, I tried `\path{}` from the `url` package but that didn't help.


title: Quotes are not formatted correctly

text: Here is data about my problem that I consider relevant: a) I'm using lualatex b) Here is my prelude:               \documentclass[b5paper,twoside]{memoir}      \usepackage{graphicx}     \usepackage{polyglossia}     \usepackage{fontspec}          \setmainfont{Fanwood}     \setdefaultlanguage{english}          \begin{document}     ...      c) And here is the latex input of one of the problematic fragments:               A not very precise answer to      this question would be      ``a system for which the     predictive  power of current human rationality is limited''      Now, the problem is that there are no openning quotation marks in the output, I get something like this:               ``a system for ... "       (there is a closing quotation mark with the correct glyph). The problem is somehow related to the font Fanwood; if I comment it everything works. But Fanwood has a glyph for open quotation marks at Unicode U+201C, I checked in "Character Map", a font and unicode inspector of Linux. So I suspect that there is something more... Question: how do I get around this problem? This of course could be the duplicate of some question, if so, please point it to me please! So far no luck.


title: Reference a book without authors with a shortened title (biblatex)

text: I have a book without (known) authors. Its title is very long, so I'd like to shorten it in _citations_ , but not in the bibliography. I've tried to use `SHORTTITLE`, but then that shortened title also appears as the title in the bibliography, plus the title in the citation appears in italics, whereas I would like it in an upright font. I.e. I would like to see this in the citation: > I like the _IPA_ (Handbook of the IPA 1999) And this in the bibliography: > _Handbook of the International Phonetic Association. A guide to the use of > the International Phonetic Alphabet_ (1999). Cambridge: Cambridge University > Press. But this is as far as I have gotten with it:               \documentclass{article}     \usepackage{filecontents}     \usepackage[style=authoryear]{biblatex}          \begin{filecontents}{\jobname.bib}     @BOOK{ipa1999,         TITLE = "Handbook of the International Phonetic Association",         YEAR = "1999",         LOCATION = "Cambridge",         PUBLISHER = "Cambride University Press",         SHORTTITLE = "Handbook of the IPA",         SUBTITLE = "A guide to the use of the International Phonetic Alphabet"}     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     I like the \textit{IPA} \parencite{ipa1999}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/lU1d9.png)


title: Problem while compiling friggeri CV template with: ' fontspec error: "font-not-found"'

text: I have somme problem while I'm trying to compile template CV from: http://www.latextemplates.com/template/friggeri-resume-cv . I have install texlive-full package on Ubuntu and tryied to compiled this template with command: lualatex cv_10.tex And I get:               : /home/lgadawski/.texmf-var/luatex-cache/generic/names/otfl-names.lua          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "HelveticaNeue" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.53 \newfontfamily\bodyfont[]{Helvetica Neue}      I have also trying to do this on Windows with MikTex with same result. I spent some hours but couldn't find explanation why is that and how could I properly compile it and built my own CV. Regards!


title: Footnote inside stackrel

text: I am writing an equation and I'd like to put above the equal sign $(=)$ a footnote describing shortly the reason for that equality. I tried               \[x^2\stackrel{\footnote{foo}}{=}x\ast x\]      but this only shows the footnote's number above the equal sign but no `foo` on the bottom of the page. Any idea? What is the best way to do this kind of trick?


title: figurename (captionname) changing

text: I have a problem with my algorithms, I'm using the mcode-package: I would like the caption to say Algorithmus 1.1 for example. If I try it with a figure environment it does not work, because I don't have a pagebrak, when my algorithm ist very long. So, I googled, and came up with this solution:               \documentclass[german,11pt,twoside,a4paper,final,titlepage,openany]{amsbook}     \usepackage[ngerman]{babel}     \usepackage[latin1]{inputenc}     \usepackage[pdftex]{graphicx}     \usepackage{mathrsfs,amssymb}     \usepackage{amsbsy,amsmath}     \usepackage{float}     \usepackage{subcaption}     \usepackage[framed,numbered]{mcode}     \begin{document}          \begin{lstlisting}          function y = PolyValMatrix(p,x)          y = zeros(size(p,1),size(x,1));         xt = x';         for i = 1:size(p,2)             n = size(p,2)-i;             y = y + p(:,i)*(xt.^n);         end     end          \end{lstlisting}     \renewcommand*\figurename{Algorithmus}     \captionof{figure}{Algorithmus}\label{algo:875}          \end{document}       But the problem is: Once I insert another figure after this, it also calls it Algorithmus, and not Abbildung (figure) how I would like it. Can anyone please help me? Sorry for the german words :) Edit: This one is running correctly:                \documentclass[german,11pt,twoside,a4paper,final,titlepage,openany]{amsbook}      \usepackage[ngerman]{babel}      \usepackage[latin1]{inputenc}          \usepackage{graphicx}               %% don't use [pdftex]      \usepackage{mathrsfs,amssymb}      \usepackage{amsbsy,amsmath}      \usepackage{float}      %\usepackage{subcaption}      \usepackage[framed,numbered]{mcode}     \addto\captionsngerman{\renewcommand\lstlistingname{Algorithmus}}  %% Use this since                                                                    %%  you are using babel     \begin{document}     \begin{lstlisting}[float=htb,                     caption={Algorithmus\label{algo:875}},                     %captionpos=b    %% if you want caption below                     ]          function y = PolyValMatrix(p,x)     y = zeros(size(p,1),size(x,1));     xt = x';         for i = 1:size(p,2)         n = size(p,2)-i;         y = y + p(:,i)*(xt.^n);         end     end          \end{lstlisting}          Here we refer~\ref{algo:875}               \end{document}       And this one isn't, but in my eyes it's exactly the same, apart from the not using float (but that doesn't make a difference...)                 \documentclass[german,11pt,twoside,a4paper,final,titlepage,openany]{amsbook}       \usepackage[ngerman]{babel}       \usepackage[latin1]{inputenc}       \usepackage{graphicx}       \usepackage{mathrsfs,amssymb}       \usepackage{amsbsy,amsmath}       \usepackage{float}       %\usepackage{subcaption}       \usepackage[framed,numbered]{mcode}       \addto\captionsngerman{\renewcommand\lstlistingname{Algorithmus}}  %% Use this since            \begin{document}       Here we refer ~\ref{algo:875}       \begin{lstlisting}[%float=htb,                     caption={Algorithmus\label{algo:875}},                     captionpos=b    %% if you want caption below                           ]       %Benötigte Funktionen       function y = PolyValMatrix(p,x)            y = zeros(size(p,1),size(x,1));         xt = x';       for i = 1:size(p,2)             n = size(p,2)-i;            y = y + p(:,i)*(xt.^n);              end     end          \end{lstlisting}          Here we refer ~\ref{algo:875}     \end{document}


title: How can I use curly braces provided by YandY Mathtime in a MathtimePro2 doc?

text: I'm using MathTimePro2 as my math fonts in my documents, so how can I replace curly braces such as `\lbrace`, `\rbrace`, `\underbrace`, `\{`, `\}` etc provided by MTP2 to ones given by YandY MathTime? Thanks.


title: Prevent floats on a single page OR change page margins for a single page

text: I've got a particular problem with a custom chapter style. Essentially my chapter title is on the _left_ page, then there is a picture on top of the right page (waves, see below) and below the picture, the chapter content (bla ble bli blo) starts.               +--------+--------+     |        |~~~~~~~~|     | Ch. 6  |~~~~~~~~|     |        |        |     |        |bla ble |     |        |bli blo |     +--------+--------+      I've got it working using a modification of `\chapter{}` for the left page, then               \newpage     \ThisULCornerWallPaper{1.0}{waves}     \phantom{placeholder}     \vspace{200pt}      and then the chapter content starts. The problem is that floats don't know the top right area is taboo for them, so I might get:               +--------+--------+     |        |~[    ]~|     | Ch. 6  |~[Fig1]~|     |        |        |     |        |        |     |        |bla ble |     +--------+--------+      So `{figure}` first, then placeholder and `\vspace`, then content. I've been looking into two solutions without success: A) Preventing floats on this first page. I don't know how to do this without affecting all of the document (i.e. flafter) or setting the very first float manually to `[b]`. I haven't found a way to tell floats to just avoid a certain page or a certain area. B) Setting the top margin for this page only. I've looked into `geometry` package, namely               \newgeometry{top=300pt}     \restoregeometry      But this doesn't work. First of all, `\newgeometry` uses `\clearpage`, but I don't want clearpages, I just want to change one page margin. I've deleted the clearpages and made my own `\newcommands`, but...               \newsamepagegeometry{top=300pt}     \restoresamepagegeometry      ...doesn't work because it both sets _and_ unsets the margins for the current page, instead of setting them for the current page and unsetting them for the next. So I tried `\afterpage{...}` but there seems to be a known (or at least observed) issue that prevents               \newsamepagegeometry{top=300pt}     \afterpage{\restoresamepagegeometry}      from working, while manual placement of `\restoresamepagegeometry` among the next page text works fine. The above code apparently does not execute `\restoresamepagegeometry` at all, so the geometry remains at `top=300pt` for the rest of the document. Any solution or an idea where to look would be most appreciated.


title: How do I vary the height of braces without varying the width?

text: I am trying to highlight pieces of a formula with some text on the side, but one of those pieces is multiple lines. The solution that I came up with was to use braces in an array to highlight the groups. Unfortunately, the result doesn't look very good because the small brace is much narrower and has a different weight than the big brace. How can I fix this so it doesn't look so strange? One option is to find a different kind of brace that doesn't vary in width when it varies in height. I hoped that `]` would do this, but indeed it varies in width.               \documentclass{article}     \usepackage{multirow}     \usepackage{amsmath}          \begin{document}     \begin{align*}     \begin{array}{ll@{}l}       w & \}                       & \textrm{one element} \\       x & \multirow{2}{*}{\bigg\}} & \multirow{2}{*}{\textrm{two elements}} \\       y &                          & \\       z & \}                       & \textrm{another element}      \end{array}     \end{align*}     \end{document}      Here is the result of the code. I would like for the left and right edges of all three braces to be aligned. Here the gap between the brace and `one element` is much larger than the gap between the brace and `two elements`. ![strange width of braces](http://i.stack.imgur.com/dQHKR.gif)


title: It doesn't hyphenate words ending with “—”

text: # UPDATE Well. After a while, I decided to see again about this “problem”, and just discovered that in pdfLaTeX, using `\usepackage[utf8]{inputenc}` _and_ the `—` (the unicode —, _not_ the ligature `---`) it works perfect (at least in what I tried). **Minor edit:** as @cfr mentions in her answer (I forgot it), it is in fact possible to use `---` (the ligature) if you use T1 encoding and `\hyphenchar\font=\string"7F`. In both methods (wether I use the em-dash `—` or `---`) **_microtype_** works perfectly. Now, the problem remains in XeLaTeX. I would like to clear my idea: I want the em-dash to behave correctly; it doesn't matter if I have to type `—` (the unicode em-dash —) or `---` (the usual LaTeX way); it should (among others) hyphenate words correctly; be always together to the word; in case it's followed by a comma/period, they should be together; and, **_microtype_** should work, e.g., the hyphen should still hang in the margin. Of course, there is a basic solution (which works in any engine): indicate to XeLaTeX the breaking points, for instance `ocur\-recone\-stedoc\-umento---`. But I'm looking for an automatic solution. If you have anything to say, please, say it, it's welcomed! * * * _Note: Every`—` you see in the code is an em-dash._ I'writing a paper, and XeLaTeX doesn't hyphenate words which end with `–` (traditional LaTeX `---`). After reading the comments, I realized this is a common problem also in LaTeX (not only XeLaTeX). Here it is a minimal working example: This code (full example at the bottom of the question) outputs               —Hola, esto es un texto absurdo —para ejemplificar lo que ocurreconestedocumento— con algunas palabras más.      ![enter image description here](http://i.stack.imgur.com/ekXN5.png) If we substitute the last `—` by a comma, for example it hyphenates correctly               —Hola, esto es un texto absurdo —para ejemplificar lo que ocurreconestedocumento, con algunas palabras más.      ![enter image description here](http://i.stack.imgur.com/6G5xQ.png) Moreover, if the phrase ends with `—.` XeLaTeX (or whoever is doing this) takes the full stop to the next line               —Hola, esto es un texto absurdo —para ejemplificar lo que ocurreconestedocumento—.      ![enter image description here](http://i.stack.imgur.com/O9VMY.png) Here is a full minimal working example               \documentclass{scrartcl}     \usepackage[hmargin = 4cm]{geometry}     \usepackage{fontspec}          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          —Hola, esto es un texto absurdo —para ejemplificar lo que ocurreconestedocumento— con algunas palabras más.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \end{document}      # Any ideas?


title: Better looking nested subscripts and superscripts

text: I have a situation where I need to subscript a superscript in math mode (and actually, subscript that subscript in some cases). (Please don't waste time telling me to change my notation; this is the notation used historically and I can't change it). I've noticed that LaTeX doesn't handle this very well, and it is very difficult to tell that the subscripted superscript is subordinate, particularly in the case of numbers like 1, 2, and 3. Is there a way to adjust this? I've tried               A^{a_{{}_1}}      which looks okay, but is far from ideal. Any suggestions?


title: Limit backrefs to each chapter in per-chapter bibliography

text: If I cite a source in both Chapter 1 and Chapter 2 the back-ref list of the Chapter 1 bibliography will also contain the entry for the respective page in Chapter 2 (and viceversa). Is there a way to limit the backrefs to each chapter? Here is a MWE:               \documentclass{book}          \usepackage[style=authoryear-comp,refsegment=chapter, backref,     backend=biber]{biblatex}     \defbibheading{bibbook}[\bibname]{\chapter{#1}}     \defbibheading{subbib}[\refname\space\chaptername\space       \ref*{refsegment:\therefsection\therefsegment}]{%       \setcounter{secnumdepth}{0}%       \section{#1}}     \addbibresource{biblatex-examples.bib}          \usepackage{hyperref}          \begin{document}          \mainmatter     \chapter{First}     \textcite{glashow}          \chapter{Fooo}     \textcite{glashow}          \backmatter     \printbibheading[heading=bibbook]     \bibbysegment[heading=subbib]          \end{document}      ![enter image description here](http://i.stack.imgur.com/OXGDm.jpg)


title: Beamer Bibliography Icon

text: I want to list my references in a beamer presentation using `thebibliography` environment, with the nice little   * book icon (`\beamertemplatebookbibitems`) and    * article icon (`\beamertemplatearticlebibitems`) in front of each source. Is there an icon for websites too? something like `\beamertemplatewebsitebibitems`? If not, is there a way to implement this easily ?


title: side by side minipages with keepaspectratio=true

text: This question may seem superficially similar to side by side minipage figures but in fact I believe its different. This code produces a result which is messed up (the text should be under the respective image left justified and everything should be lined up nicely and the images should be flush left and right) as can be seen from the screenshot that follows this code. If we remove the `keepaspectratio=true` as shown in the commented out lines then the layout does look a lot better but the images become distorted. I want to use this as a template for different images so its important that the specifics of the image not be used. Note that the three last sections of the code separated by `\vspace{1ex}` are each identical so there is actually a lot less unique code than might appear from the length. Firstly, how can I fix this? Secondly, how can I change it so that not only is it fixed but that every time I make some small change the entire layout and look changes dramatically as has already happened twice? This is so frustrating. Thanks.               \documentclass{article}     \usepackage{colortbl}     \usepackage[top=1in,bottom=1in,left=0.5in,textwidth=7.5in]{geometry}     \usepackage{graphicx}     \usepackage{lipsum}          \setlength{\fboxsep}{0pt}     \begin{document}          \begin{center}      \colorbox{blue}{\parbox[t][0.5cm][c]{\textwidth}{\bfseries{HEADER}}}     \end{center}           \lipsum[2]          \noindent\begin{minipage}[b]{.5\textwidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some text.     \end{minipage}     \hfill     \begin{minipage}[b]{.5\linewidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some more text.     \end{minipage}          \vspace{1ex}          \noindent\begin{minipage}[b]{.5\textwidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some text.     \end{minipage}     \hfill     \begin{minipage}[b]{.5\linewidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some more text.     \end{minipage}          \vspace{1ex}          \noindent\begin{minipage}[b]{.5\textwidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some text.     \end{minipage}     \hfill     \begin{minipage}[b]{.5\linewidth}     %\includegraphics[width=\linewidth, height=.25\textheight]{elephant}     \includegraphics[width=\linewidth, height=.25\textheight, keepaspectratio=true]{elephant}     Some more text.     \end{minipage}          \end{document}      ![screenshot](http://i.stack.imgur.com/6ToCI.png) For creative commons info on image look here


title: Change enumerate label alignment in Beamer

text: I would like to add enumerated lists to a Beamer presentation. Here is a minimal example:               \documentclass{beamer}          \setbeamertemplate{enumerate subitem}{\Alph{enumii}}     \setbeamerfont{itemize/enumerate subbody}{size=\normalsize}          \begin{document}          \begin{frame}          \begin{enumerate}     \item First level item     \begin{enumerate}     \item Second level item 1     \item Second level item 2     \item Second level item 3     \item Second level item 4     \item Second level item 5     \item Second level item 6     \item Second level item 7     \item Second level item 8     \item Second level item 9     \item Second level item 10     \item Second level item 11     \end{enumerate}     \end{enumerate}          \end{frame}     \end{document}      If you look at the pdf output you can see that the alignment of the alphabetical labels A, B, C etc. looks ugly. Especially the D below C, and I and J between H and K. Here is an image of the output: ![beamer-enumerate-list-example](http://i.stack.imgur.com/T0Yt1.jpg) I would like the to center the labels horizontally (within `\labelwidth`). That is, the horizontal centers of the letters would be placed on a vertical line. How can I do it in Beamer? I would like to avoid `enumitem` package as it does not work well with Beamer. Previously I had errors with `enumitem` in Beamer similar to those reported here: Dealing with long description environment items > ! TeX capacity exceeded, sorry [grouping levels=255]. errors


title: Compile-error using pgfgant:: "Missing number, treated as zero"

text: I'm trying to compile a tex file containing performance analysisdata I recieve from an application. However the compiler fails with 2 errors. The first seems to because of a deprecated function in "group peaks", but the second one I really can't figure out. Here's my code:                   \documentclass{article}          \usepackage[empty]{fullpage}      \usepackage[pdftex,active,tightpage]{preview}      \setlength\PreviewBorder{1mm}      \usepackage{pgfgantt}      \begin{document}      \begin{preview}      \noindent \resizebox{\textwidth}{!}{      \noindent \begin{tikzpicture}      \begin{ganttchart}[vgrid,x unit=0.122699cm,group left shift=0, group right  shift=0, group peaks={0}{}{.4}]{163} \\      \gantttitlelist{0, ..., 162}{1} \\      \ganttgroup[group/.style={fill=brown}]{Title1}{47.528000}{55.143002}      \ganttgroup[group/.style={fill=pink}]{}{31.235001}{38.120998}      \ganttgroup[group/.style={fill=blue}]{}{15.351000}{22.355000}      \ganttgroup[group/.style={fill=purple}]{}{39.223000}{46.444000}      \ganttgroup[group/.style={fill=green}]{}{23.455999}{30.150000}      \ganttgroup[group/.style={fill=red}]{}{140.309998}{146.031998}      \ganttgroup[group/.style={fill=yellow}]{}{1.048000}{6.955000}      \ganttgroup[group/.style={fill=yellow}]{}{132.285995}{139.251007}      \ganttgroup[group/.style={fill=green}]{}{154.936005}{161.061005}      \ganttgroup[group/.style={fill=blue}]{}{147.087006}{153.880005}      \ganttgroup[group/.style={fill=gray}]{}{56.182999}{64.136002}      \ganttgroup[group/.style={fill=pink}]{}{162.119003}{162.858994}      \ganttgroup[group/.style={fill=red}]{}{8.086000}{14.280000}      \\      \ganttgroup[group/.style={fill=red}]{Title2}{1.000000}{0.000000}      \ganttgroup[group/.style={fill=purple}]{}{31.209000}{30.209000}      \ganttgroup[group/.style={fill=green}]{}{147.063004}{146.063004}      \ganttgroup[group/.style={fill=pink}]{}{23.430000}{22.430000}      \ganttgroup[group/.style={fill=blue}]{}{140.283997}{139.283997}      \ganttgroup[group/.style={fill=blue}]{}{8.040000}{7.040000}      \ganttgroup[group/.style={fill=purple}]{}{162.095993}{161.095993}      \ganttgroup[group/.style={fill=pink}]{}{154.912003}{153.912003}      \ganttgroup[group/.style={fill=gray}]{}{47.504002}{46.504002}      \ganttgroup[group/.style={fill=brown}]{}{39.195999}{38.195999}      \ganttgroup[group/.style={fill=red}]{}{132.248001}{131.248001}      \ganttgroup[group/.style={fill=green}]{}{15.324000}{14.324000}      \\      \ganttbar[bar/.style={fill=pink}]{Title3}{163.306000}{162.858002}      \ganttbar[bar/.style={fill=green}]{}{24.966999}{30.149000}      \ganttbar[bar/.style={fill=purple}]{}{40.833000}{46.442001}      \ganttbar[bar/.style={fill=gray}]{}{57.873001}{64.134003}      \ganttbar[bar/.style={fill=pink}]{}{32.761002}{38.118999}      \ganttbar[bar/.style={fill=blue}]{}{148.289993}{153.878006}      \ganttbar[bar/.style={fill=yellow}]{}{2.729000}{6.953000}      \ganttbar[bar/.style={fill=green}]{}{156.117996}{161.059998}      \ganttbar[bar/.style={fill=red}]{}{141.552994}{146.031006}      \ganttbar[bar/.style={fill=red}]{}{9.573000}{14.279000}      \ganttbar[bar/.style={fill=brown}]{}{49.120998}{55.140999}      \ganttbar[bar/.style={fill=yellow}]{}{133.998001}{139.246994}      \ganttbar[bar/.style={fill=blue}]{}{16.949001}{22.354000}      \\      \ganttbar[bar/.style={fill=green}]{Title4}{24.971001}{23.975000}      \ganttbar[bar/.style={fill=red}]{}{141.557007}{140.612000}      \ganttbar[bar/.style={fill=red}]{}{9.577000}{8.646000}      \ganttbar[bar/.style={fill=purple}]{}{40.838001}{39.984001}      \ganttbar[bar/.style={fill=yellow}]{}{2.743000}{1.982000}      \ganttbar[bar/.style={fill=blue}]{}{148.294006}{147.427994}      \ganttbar[bar/.style={fill=brown}]{}{49.125000}{48.222000}      \ganttbar[bar/.style={fill=yellow}]{}{134.003006}{133.005997}      \ganttbar[bar/.style={fill=green}]{}{156.121994}{155.128006}      \ganttbar[bar/.style={fill=pink}]{}{32.765999}{31.770000}      \ganttbar[bar/.style={fill=gray}]{}{57.876999}{56.945000}      \ganttbar[bar/.style={fill=blue}]{}{16.954000}{16.211000}      \ganttbar[bar/.style={fill=pink}]{}{163.309006}{162.455994}      \\      \ganttbar[bar/.style={fill=brown}]{Title5}{47.528999}{48.119999}      \ganttbar[bar/.style={fill=blue}]{}{147.087006}{147.289001}      \ganttbar[bar/.style={fill=green}]{}{23.455999}{23.966000}      \ganttbar[bar/.style={fill=red}]{}{140.309998}{140.550995}      \ganttbar[bar/.style={fill=pink}]{}{31.235001}{31.760000}      \ganttbar[bar/.style={fill=gray}]{}{56.182999}{56.872002}      \ganttbar[bar/.style={fill=purple}]{}{39.223000}{39.832001}      \ganttbar[bar/.style={fill=blue}]{}{15.351000}{15.947000}      \ganttbar[bar/.style={fill=yellow}]{}{132.285995}{132.996994}      \ganttbar[bar/.style={fill=red}]{}{8.086000}{8.572000}      \ganttbar[bar/.style={fill=pink}]{}{162.119003}{162.304001}      \ganttbar[bar/.style={fill=yellow}]{}{1.057000}{1.728000}      \ganttbar[bar/.style={fill=green}]{}{154.936005}{155.117004}      \\      \ganttbar[bar/.style={fill=yellow}]{Title6}{133.998993}{133.003006}      \ganttbar[bar/.style={fill=blue}]{}{16.949001}{15.953000}      \ganttbar[bar/.style={fill=red}]{}{9.574000}{8.577000}      \ganttbar[bar/.style={fill=green}]{}{24.966999}{23.969999}      \ganttbar[bar/.style={fill=green}]{}{156.117996}{155.121002}      \ganttbar[bar/.style={fill=brown}]{}{49.122002}{48.125000}      \ganttbar[bar/.style={fill=purple}]{}{40.833000}{39.838001}      \ganttbar[bar/.style={fill=yellow}]{}{2.738000}{1.742000}      \ganttbar[bar/.style={fill=red}]{}{141.552994}{140.557007}      \ganttbar[bar/.style={fill=gray}]{}{57.873001}{56.875999}      \ganttbar[bar/.style={fill=pink}]{}{163.306000}{162.309006}      \ganttbar[bar/.style={fill=blue}]{}{148.291000}{147.294006}      \ganttbar[bar/.style={fill=pink}]{}{32.762001}{31.766001}      \\      \ganttgroup[group/.style={fill=gray}]{Title7}{57.873001}{56.873001}      \ganttgroup[group/.style={fill=yellow}]{}{132.285995}{131.285995}      \ganttgroup[group/.style={fill=yellow}]{}{133.998001}{132.998993}      \ganttgroup[group/.style={fill=red}]{}{140.309998}{139.309998}      \ganttgroup[group/.style={fill=red}]{}{141.552994}{140.552994}      \ganttgroup[group/.style={fill=blue}]{}{147.087006}{146.087006}      \ganttgroup[group/.style={fill=blue}]{}{148.289993}{147.291000}      \ganttgroup[group/.style={fill=yellow}]{}{1.057000}{0.057000}      \ganttgroup[group/.style={fill=yellow}]{}{2.738000}{1.738000}      \ganttgroup[group/.style={fill=red}]{}{8.086000}{7.086000}      \ganttgroup[group/.style={fill=red}]{}{9.573000}{8.574000}      \ganttgroup[group/.style={fill=blue}]{}{15.351000}{14.351000}      \ganttgroup[group/.style={fill=green}]{}{154.936005}{153.936005}      \ganttgroup[group/.style={fill=blue}]{}{16.949001}{15.949000}      \ganttgroup[group/.style={fill=green}]{}{156.117996}{155.117996}      \ganttgroup[group/.style={fill=green}]{}{23.455999}{22.455999}      \ganttgroup[group/.style={fill=green}]{}{24.966999}{23.966999}      \ganttgroup[group/.style={fill=pink}]{}{31.235001}{30.235001}      \ganttgroup[group/.style={fill=pink}]{}{32.761002}{31.761999}      \ganttgroup[group/.style={fill=purple}]{}{39.223000}{38.223000}      \ganttgroup[group/.style={fill=pink}]{}{162.119003}{161.119003}      \ganttgroup[group/.style={fill=purple}]{}{40.833000}{39.833000}      \ganttgroup[group/.style={fill=pink}]{}{163.306000}{162.306000}      \ganttgroup[group/.style={fill=brown}]{}{47.528000}{46.528999}      \ganttgroup[group/.style={fill=brown}]{}{49.122002}{48.122002}      \ganttgroup[group/.style={fill=gray}]{}{56.182999}{55.182999}      \\      \ganttbar[bar/.style={fill=yellow}]{Title8}{138.634003}{137.901001}      \ganttbar[bar/.style={fill=yellow}]{}{140.147003}{139.238007}      \ganttbar[bar/.style={fill=blue}]{}{23.274000}{22.344000}      \ganttbar[bar/.style={fill=blue}]{}{21.937000}{21.500000}      \ganttbar[bar/.style={fill=blue}]{}{20.476999}{20.094000}      \ganttbar[bar/.style={fill=brown}]{}{54.556999}{54.109001}      \ganttbar[bar/.style={fill=blue}]{}{18.927000}{18.236000}      \ganttbar[bar/.style={fill=brown}]{}{56.007999}{55.132000}      \ganttbar[bar/.style={fill=red}]{}{15.183000}{14.270000}      \ganttbar[bar/.style={fill=red}]{}{13.981000}{13.608000}      \ganttbar[bar/.style={fill=red}]{}{142.934006}{142.238007}      \ganttbar[bar/.style={fill=red}]{}{12.281000}{11.686000}      \ganttbar[bar/.style={fill=red}]{}{145.684998}{145.059998}      \ganttbar[bar/.style={fill=red}]{}{146.848999}{146.022003}      \ganttbar[bar/.style={fill=yellow}]{}{7.880000}{6.944000}      \ganttbar[bar/.style={fill=yellow}]{}{6.772000}{6.227000}      \ganttbar[bar/.style={fill=yellow}]{}{5.462000}{4.873000}      \ganttbar[bar/.style={fill=purple}]{}{44.400002}{43.702999}      \ganttbar[bar/.style={fill=yellow}]{}{4.276000}{3.618000}      \ganttbar[bar/.style={fill=purple}]{}{42.715000}{42.160000}      \ganttbar[bar/.style={fill=purple}]{}{47.348999}{46.432999}      \ganttbar[bar/.style={fill=pink}]{}{37.554001}{37.081001}      \ganttbar[bar/.style={fill=blue}]{}{150.126999}{149.408997}      \ganttbar[bar/.style={fill=blue}]{}{151.811996}{151.171997}      \ganttbar[bar/.style={fill=blue}]{}{153.309998}{152.776993}      \ganttbar[bar/.style={fill=blue}]{}{154.776001}{153.865005}      \ganttbar[bar/.style={fill=purple}]{}{45.930000}{45.337002}      \ganttbar[bar/.style={fill=pink}]{}{35.976002}{35.592999}      \ganttbar[bar/.style={fill=pink}]{}{34.471001}{33.828999}      \ganttbar[bar/.style={fill=gray}]{}{59.768002}{58.973999}      \ganttbar[bar/.style={fill=gray}]{}{61.529999}{60.803001}      \ganttbar[bar/.style={fill=gray}]{}{63.355999}{63.120998}      \ganttbar[bar/.style={fill=gray}]{}{64.994003}{64.125000}      \ganttbar[bar/.style={fill=pink}]{}{38.937000}{38.110001}      \ganttbar[bar/.style={fill=green}]{}{157.796005}{157.130997}      \ganttbar[bar/.style={fill=green}]{}{159.300995}{158.682999}      \ganttbar[bar/.style={fill=green}]{}{160.738998}{160.151001}      \ganttbar[bar/.style={fill=green}]{}{161.968994}{161.050003}      \ganttbar[bar/.style={fill=green}]{}{31.059000}{30.139999}      \ganttbar[bar/.style={fill=green}]{}{29.782000}{29.249001}      \ganttbar[bar/.style={fill=brown}]{}{51.089001}{50.363998}      \ganttbar[bar/.style={fill=green}]{}{28.235001}{27.903999}      \ganttbar[bar/.style={fill=brown}]{}{52.856998}{53.022999}      \ganttbar[bar/.style={fill=green}]{}{26.718000}{26.068001}      \ganttbar[bar/.style={fill=red}]{}{11.033000}{10.341000}      \ganttbar[bar/.style={fill=yellow}]{}{135.613007}{134.841003}      \ganttbar[bar/.style={fill=yellow}]{}{137.276001}{137.087997}      \ganttbar[bar/.style={fill=red}]{}{144.302002}{143.595001}      \end{ganttchart}      \end{tikzpicture}      }      \end{preview}      \end{document}       Here's what the errors say: \- ! Package pgfkeys Error: I do not know the key '/pgfgantt/group peaks', to which you passed '{0}{}{.4}', and I am going to ignore it. Perhaps you misspelled it.See the pgfkeys package documentation for explanation.Type H for immediate help.... } \- ! Missing number, treated as zero.\protect } To sum up, 2 questions:   * What should I replace group peaks with?   * Why causes the "Missing number, treated as zero" error ? I have tried compiling with Texmaker, MikTex and Texworks. Any help will be greatly appreciated! Thank you.


title: Tikz Nodes Positions and Shapes with a General Number of Nodes

text: My purpose is rather simple: use `tikzpictures` to draw tables of numbers, where the numbers are drawn inside colored boxes with fancy shapes, with different shapes and colors for different numbers. Below I boxed numbers according to whether they were odd, even, or prime (and treated 1 as a special number). The idea is to use the colors and shapes to spot patterns. My original plan was to use this to teach prime numbers, but I have since thought of other things that could be fun to do. As I'm new to `tikz` (a few days on it only), there are still some basic things that are eluding me. Here are the improvements and alterations I'd like to make on the basic table displayed below.   1. **Resize the shapes to approximately the same "size"** There are several interpretations of what that might mean, any reasonable one will be fine. Right now, the boxes adapt to the size of the numbers, with single-digit numbers having small boxes, two-digit numbers larger boxes, and three-digit numbers even larger. I'd like the numbers to shrink rather than the boxes. You can also see that I had trouble getting the `star` shape to align with the other shapes. I did fool around with `anchor`, `inner sep` and `outer sep`, but that's all I know of at this time.   2. **Control the direction in which the numbers are running** I am asking this as a separate question, by popular demand: Tikz Nodes Order and Shapes with a General Number of Nodes To be clear, I will be generating tables of different sizes, some with 10 numbers, some with 100 numbers, possibly more, some with longer rows, some with longer columns, and I'd like the shapes to resize automatically and proportionately. I haven't thought through the choice of shapes and colors, it's a first pass. Feel free to beautify ;-) This is the code so far:               \RequirePackage[svgnames,x11names]{xcolor}     \documentclass[tikz,convert=false,margin=0pt]{standalone}%     \usetikzlibrary{shapes.geometric}% polygon, ellipse, star, diamond, etc.     \usepackage{tkz-euclide}% \pgfmathisprime command     \usepackage{rotating}% sideways environment          \begin{document}%     \begin{tikzpicture}[%       every node/.style = {         shape = circle         , align = center         , scale = 2         , anchor = base         , font = \fontfamily{pzc}\selectfont% common font       } ,       % Prime Numbers       PrimeStyle/.style = {         regular polygon         , regular polygon sides = 3         , rounded corners = .5em         , inner sep = 0pt          , outer sep = 0pt         , draw = DarkGreen, thick         , fill = green!70!black         , text = white       } ,       % Even Numbers        EvenStyle/.style = {         shape = circle         , inner sep = 2pt         , draw = DarkRed, thick         , fill = red!70!black         , text = white       } ,       % Non-Prime Odd Numbers       OddStyle/.style = {         shape = diamond         , rounded corners = .5em         , inner sep = 1pt         , draw = DarkBlue, thick         , fill = blue!70!black         , text = white       } ,        % Number One       OneStyle/.style = {         shape = star         , rounded corners = .5em         , inner sep = 2pt         , scale = 0.9         , draw = white!70!black, thick         , fill = blue!50!green!50!         , text = black       }     ]%     %       % Set Grid Dimensions        \newcommand{\xa}{1}       \newcommand{\xb}{10}       \newcommand{\ya}{1}       \newcommand{\yb}{10}       \pgfmathsetmacro{\yc}{\yb-1}% \yb minus one     %        % Change styles of numbers according to set membership       \foreach \x in {\xa,...,\xb}         \foreach \y in {\ya,...,\yb}             {\pgfmathtruncatemacro{\label}{\x - \xb * (\y - \yb) }              \pgfmathparse{int(mod(\label,2))}              \let \r \pgfmathresult              \ifnum \r = 1                \tikzset{EvenStyle/.style = {OddStyle}}              \fi              \pgfmathisprime{int(\label)}              \let \s \pgfmathresult              \ifnum \s = 1                \tikzset{EvenStyle/.style = {PrimeStyle}}              \fi              \pgfmathparse{int(\label)}              \let \t \pgfmathresult              \ifnum \t = 1                \tikzset{EvenStyle/.style = {OneStyle}}              \fi              \node [EvenStyle]  (\x\y) at (1.5*\x, -1.5*\y) {\label};}        \foreach \x in {\xa,...,\xb}         \foreach \y [count = \yi] in {\ya,...,\yc}           \draw (\x\y)(\x\yi) (\y\x)(\yi\x) ;     \end{tikzpicture}%     \end{document}%          % doesn't work, why?     % \foreach \k in {1,2,3,5,7,11,13}     %  \tikzset{EvenStyle/.style = {PrimeStyle}} ;      This is the immediate predecessor to this question: Looking for Elegance and Convenience in Code with Many Numbers where Harish Kumar showed me how to write general code using `foreach` loops. This is where I learned of a slightly different way of defining the grid: Selecting specific nodes and changing style (for those nodes) This is where I learned about the `\pgfmathisprime` command from the `tikz- euler` package: How to produce a list of prime numbers in LaTeX Here I saw one of several examples where I learned how to use `ifnum` with `int` and `mod` and `\pgfmathparse` : How to use mod operation in latex with tikz ![enter image description here](http://i.stack.imgur.com/8TT4U.png)


title: Missing pdf when using \usetikzlibrary{external} in LyX

text: I'm trying to use the externalization library in LyX to speed up compilation and generate separate PDF files with each of my tikz figures. But for some reason LyX does not output a separate PDF file that only includes the figure. Here's the tex file as exported from LyX:               \documentclass[12pt,english]{article}       \usepackage[T1]{fontenc}       \usepackage[latin9]{inputenc}       \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2.5cm,rmargin=2.5cm,headheight=1cm,headsep=0.8cm,footskip=1.5cm}     \setcounter{secnumdepth}{0}     \setcounter{tocdepth}{2}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}          \makeatletter     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize[]      \tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" & convert "\image".pdf "\image".eps}}          \makeatother          \usepackage{babel}     \begin{document}     \tikzstyle{place}=[circle,draw=blue,fill=blue!20,line width=2pt]     \begin{tikzpicture}     \node at (0,0) [place] {Ti\textit{k}Z};     \end{tikzpicture}     \end{document}      Under Tools > Preferences > File Handling I changed the converter for LaTeX (pdflatex) -> PDF (pdflatex) to `pdflatex -shell-escape $$i` When I compile on my Windows machine I only get the PDF file with the main document, it does not create a separate file with the figure and it does not speed up the compilation at all. What am I missing?


title: How to change output file directory in latex?

text: I'm using **MikTeX 2.9** (`pdflatex`) and **WinEdt 8.2**. I know that all output files such as `.tex`, `.pdf`, `.dvi`, `.log` are important and I cannot simply delete them so I would like to ask how to get files (`.pdf` and `.tex`) in one directory and other files in another directory. I have already found very similar questions here with answers, but I was not still able to sort it out. I have found out that I should use `--output- directory=dir` and `--aux-directory=dir` but I don't exactly know how to work with it. Could anyone help me with this problem?


title: Changing heading of appendix

text: \documentclass{mwrep}     \begin{document}     \tableofcontents     \chapter{Blabla}     Aaaa     \chapter{Lablab}     Silly equation \ref{eq:silly} in appendix \ref{ap:1}.     \appendix     \chapter{Something more}\label{ap:1}     \begin{equation}\label{eq:silly}     2+2=5     \end{equation}     \end{document}      I got:               Contents     1. Blabla     2. Lablab     A. Something more      I need:               Contents     1. Blabla     2. Lablab     Appendix A. Something more      How can make every appendix in form: "Appendix A", "Appending B" etc? **EDIT:** I need a change at ToC and in the document (header of chapter). How can I change a name of 'Appendix' if I want to use other word?


title: Significant figures with pgfplots

text: Is there a possibility with pgfplots to print numbers with no decimals for the nodes? By this, I mean printing '2' instead of '2.0e0'. In my case, I want to remove the decimal part and add the percent sign, which would give'2%' instead of '2.0e0'. \-- Furthermore, how can I put the text node '1%' on the top of the corresponding bar ? (if the bar is negative, it won't be anymore on the top) \-- Here is a sample code and a picture which I want to improve. ![enter image description here](http://i.stack.imgur.com/VB1Wu.jpg)               \documentclass{standalone}     \usepackage{filecontents,pgfplots,pgfplotstable}          \begin{filecontents}{data.dat}     id a b  name     0 1.1 20 Name1     1 2.2 -10 Name2     2 3.3 15 Name3     \end{filecontents}               \begin{document}          \pgfplotstableread{data.dat}{\donnees}          \begin{tikzpicture}     \begin{axis}[ybar,xtick={0,1,2},xticklabels={a,b,c},point meta=explicit symbolic,nodes near coords=$\pgfplotspointmeta\%$]          \addplot table [x={id}, y={b},,meta expr=\thisrow{id}] {\donnees};          \end{axis}     \end{tikzpicture}          \end{document}


title: Backward compatibility of Beamer problem - Keyval error

text: I'm stuck with a problem for compiling a "not so old" beamer document I've made last year, and it seems that there is a big problem of backward compatibility between my new version of beamer (3.33) and the one I used before (3.24). here is a minimalist example that compile with the older version and not the newer :               \documentclass{beamer}          \begin{document}     \begin{frame}           \tableofcontents[currentsection,othersections,hideothersubsections,hidesubsections]     \end{frame}          \begin{frame}[margin=0pt]          \end{frame}     \end{document}      here are the relevant output of the compiler : the older :               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     LaTeX2e <2011/06/27>      Babel <3.9f> and hyphenation patterns for 6 languages loaded.      Document Class: beamer 2012/10/15 development version 3.24 A class for typesett ing presentations (rcs-revision 24853e6b98cf)      the newer :               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     [...]      LaTeX2e <2011/06/27> Babel <3.9k> and hyphenation patterns for 6 languages loaded.     [...]      Document Class: beamer 2013/12/02 3.33 A class for typesetting presentations (rcs-revision 332bfd3ce558)     [...]      ! Package keyval Error: othersections undefined.      [...]      ! Package keyval Error: margin undefined.      There are a other keys that trigger exactly the same kind of error (bg, fg). Is it a known problem ? I could'nt find relevant answer on the web, and would welcome any solution other than keep compiling on my old computer or rewrite my presentations. Maybe a package to load, or somthing like that ? or a magic incantation ? Thanks for reading, many thanks if you have answers ;)