title: URW Garamond installation on OS X

text: I'm trying to install the URW Garamond font (to be used with math design) on OS X 10.9 / MacTeX 2014. I downloaded and ran the getnonfreefonts script (without any error messages). However when I try to compile the following:               \documentclass{article}     \usepackage[urw-garamond]{mathdesign}     \begin{document}     \blindtext       A formula:       \[         \underbrace{\frac{\sin^{2}\vartheta}{\Theta_{lm}(\vartheta)}\left(\frac{\partial^{2}}{\partial\vartheta^{2}}+\frac{\cos\vartheta}{\sin\vartheta}\frac{\partial}{\partial\vartheta}\right)\Theta_{lm}(\vartheta)+\sin^{2}(\vartheta)(l(l+1))}_{m^{2}}=\underbrace{-\frac{1}{\Phi_{m}(\varphi)}\frac{\partial^{2}}{\partial\varphi^{2}}\Phi_{m}(\varphi)}_{m^{2}}       \]       and another one:       \[         P_l (x)\equiv\frac {1}{2^l}\sum_{k=0}^{\lfloor l/2\rfloor} (-1)^k \frac{(2l-2k)!}{k!(l-k)!(l-2k)!} x^{l-2k}       \]     \end{document}      I still get               !pdfTeX error: /usr/texbin/pdflatex (file ugmr8a.pfb): cannot open Type 1 font      file for reading      ==> Fatal error occurred, no output PDF file produced!      Any help would be appreciated!


title: pageslts error: very old endfloat in texlive 2013

text: The package pageslts complains about "very old endfloat package detected", but the recent endfloat version 2.5d is loaded. A minimum working example showing this error is:               \documentclass{article}     \usepackage{pageslts}     \usepackage{endfloat}     \begin{document}     \pagenumbering{arabic}     asdf     \end{document}      Compiling this with pdflatex (pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) on Mac OS X) throws the error               ! Package pageslts Error: Incompatible, very old endfloat package detected..      and warns about               Package pageslts Warning: Incompatible package lastpage detected:      Something in the logic of checking the packagedate in pageslts.sty seems to go wrong. Any help appreciated.


title: How can I superimpose tikzpicture on a certain part of the page?

text: I have a `beamer` slide, with some text and some graphics, and I want to superimpose a `tikz` picture on it. Is that possible?


title: Get rid of toc in header with Beamer

text: I am using this               \documentclass{beamer}          \usepackage{beamerthemesplit}          %\usetheme{Berkeley}     %\usecolortheme{beetle}     \usepackage{graphicx}     \usepackage{verbatim}               \mode<presentation> {     %\usetheme{Madrid} % My favorite!     \usetheme{Boadilla} % Pretty neat, soft color.     %\usetheme{default}     %\usetheme{Warsaw}     %\usetheme{Bergen} % This template has nagivation on the left     \usetheme{Frankfurt} % Similar to the default with an extra region at the top.     %\usecolortheme{seahorse} % Simple and clean template     %\usetheme{Darmstadt} % not so good     % Uncomment the following line if you want page numbers and using Warsaw theme      \setbeamertemplate{footline}[page number]     \setbeamercovered{transparent}     \setbeamercovered{invisible}     % To remove the navigation symbols from the bottom of slides%     \setbeamertemplate{navigation symbols}{}      }          \usepackage{graphicx}     \usepackage{beamerthemesplit}               %\input{style.tex}     \titlegraphic{\includegraphics[width=2cm]{VUB_logo_notext.jpg}\hspace*{6.75cm}~%        \includegraphics[width=2cm]{CMS.jpg}     }          \title{Title}     %\titlegraphic{\hspace{45.5\baselineskip}\includegraphics[scale=0.24]{VUB_logo_notext.jpg}      %\hspace{39\baselineskip} \includegraphics[scale=0.113]{CMS.jpg}}                \subtitle{Dissertation defence}     \author{Author}     \date{\today}          \begin{document}          \begin{frame}             \titlepage         \end{frame}      so couple of questions : 1- The toc in in my titlepage... How can I get rid of it? 2- How can I put the graphics before my title ie arrange them in the page ? 3-How can I add a slide (like brief CV) which should not be included in the toc ? I ve tried \section{Brief CV*} but is always there.. thanks Alex


title: Where is the error? - TikZ (angles)

text: In my thesis I'm doing a drawing with `TikZ`, but I get an error that I do not understand. Consider this code (simplified from the original, but still quite significant):               \documentclass[border=.5cm]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc,hobby}          \begin{document}          \begin{tikzpicture}[use Hobby shortcut]     % definitions and macros     \def\pSpess{.5}     \def\pL{2.5}     \def\pAng{55}     \def\pRaggio{4}     \pgfmathsetmacro{\pRaggioMin}{\pRaggio-\pSpess}          % coordinates          % above     \draw (-5,.7) arc (235:270:\pRaggio cm) -- ++(\pL,0) -- ++(0,\pSpess) -- ++(-\pL,0) arc (270:180+\pAng:\pRaggioMin cm) -- (-5,.7) node (a) [pos=.5] {} -- cycle;         \coordinate (cmu) at ($(a)+(90+\pAng:.15)$); %centro momento         \coordinate (imu) at ($(cmu)+(180+\pAng:.5)$); %inizio momento         \coordinate (ccmu) at ($(cmu)+(90+\pAng:.25)$); %punto intermedio momento         \coordinate (fmu) at ($(cmu)+(\pAng:.5)$); %fine momento     \draw [->] (imu) .. (ccmu) .. (fmu);          % bottom     \draw (-5,-.7) arc (125:90:\pRaggio cm);     \end{tikzpicture}               \end{document}      As you can see the design is not correct (there is a clear intersection that should not be there). However I do not understand what's wrong. Can anyone help me? ![enter image description here](http://i.stack.imgur.com/qsCD6.png)


title: Line-breaking long cell contents when using longtable through datatool

text: I'm trying to display a table loaded from a CSV file and displaying it like this:               \DTLloadrawdb[]{myDB}{myDB.csv}     \DTLdisplaylongdb[%         caption={myDB caption},%         label={tab:myDB},%         contcaption={myDB (continued)},%         foot={\em Table continued on next page},%         lastfoot={\em End of Table}%     ]{myDB}      This works except that one of the columns contain some long text strings that push the rest of the table off of the side of the page. The datatool documentation says that it is using the longtable environment for this and to look up how to align contents in the longtable documentation, but I can't figure out how to get this to work. I want the table centered on the page and all the cell contents left-aligned and lines broken if there is too much content. I'm not trying to break the cells across multiple pages, just the cell contents over multiple lines on the same page.


title: Include figure from PDF file

text: I want to include a figure from another PDF. There is the quick way, where I take a screen shot, save as my desired format and the `\includegraphics[scale=xx]{<file path>}` but this is messing up the scaling, want the text size in the image to match the text size of my document. I'm condering using `\includepdf[pages=x,trim= l r b t,clip]{<file path>}`. I'd like to know, in general, if there is a smarter way. # Example I want to include a chart from a user manuel `usemanual.pdf` showing relations between variables when defining a input grid for a computational model, in my document `Thesis.tex`


title: Vertical space before list environment

text: I use list environments for short text. In `myitem` environment I define new space between items. How I can reduce vertical space before first item? This space is bigger than between paragraphs.                \documentclass[12pt]{article}      \usepackage{lipsum}           \newenvironment{myitem}{\begin{itemize}         \setlength{\leftmargin}{-5.0cm}         \setlength{\itemindent}{0.0cm}         \setlength{\itemsep}{0pt}          \setlength{\parskip}{0pt}          \setlength{\parsep}{0pt}}               {\end{itemize}}           \begin{document}      \lipsum[1]      \lipsum[2]      \begin{myitem}      \item lorem ipsum dolor  lorem ipsum dolor  lorem ipsum dolor  lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor       \item lorem ipsum dolor      \item lorem ipsum dolor      \item lorem ipsum dolor      \end{myitem}       \lipsum[3]      \end{document}      ![enter image description here](http://i.stack.imgur.com/Loejc.png)


title: How to show the pages where references were used in the bibliography?

text: Is it somehow possible to show the numbers ob those pages in the bibliography, where a certain reference was used? This could be comparable to the glossary. For example I used `\cite{me2012}` on pages 1 , 3 and 12, then the reference should show: > me (2012). unimportant paper, no name journal, 1(1):1-15; cited on: 1, 3, 12 or: > me (2012). unimportant paper, no name journal, 1(1):1-15; 1, 3, 12 instead of > me (2012). unimportant paper, no name journal, 1(1):1-15


title: Trouble compiling an example from the LaTeX Graphics Companion

text: I've been trying to compile code samples from the wonderful _The LaTeX Graphics Companion. Second Edition, by Michel Goossens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel HerbertVoB IT Addison_ , but I've run into trouble. Here is an example of code I'm trying to compile (page 45):               \usepackage{multido , pict2e}     \begin{picture} (11S,60) (-45,-30)     \ linethickness {1.6pt}     \multido{\ iA=-30+10,\ iB=15+ 5 } { S }     { \put (\ iA ,O) {\ circle{\ } } }     \put ( 50 , 0 ) { \ c ir c l e * {50     \ end{picture}      Is there a special package to run that kind of example?


title: TikZ: Crop images after placing them

text: I have a ton of microscopy images to include in a report, some of these images have rather uninteresting information I want to crop. Since I add scale bars using TikZ and therefore require all image dimensions to be precisely known I have used TikZ to crop the images. In memoir this leads to subfigures being slightly askew, see attached image. I have noticed the same behavior for figures displaying two or more subfigures of different bulk. ![Unevenly placed images](http://i.stack.imgur.com/Zmx16.png) Here is the code:               \documentclass{memoir}     \usepackage{mwe}     \usepackage{siunitx}     \usepackage{graphicx}     \usepackage{tikz}     \newsubfloat{figure}     \begin{document}          \begin{figure}     \subbottom[]{     \tikz{     \draw (0,0) node[name=micrograph]{\includegraphics[width=.45\textwidth]{example-image}};     \draw[ultra thick, white] (micrograph.south west)++(0.05*0.45\textwidth,0.05*0.45\textwidth)--++(0.45*0.54177\textwidth,0)node[above,white,midway]{100 \si{\micro\meter}};}     }     \subbottom[]{     \tikz{     \clip (0,0)++(-.3\textwidth,-.3\textwidth) rectangle ++(.45\textwidth,.45\textwidth);     \draw (0,0) node[name=micrograph]{\includegraphics[width=.6\textwidth]{example-image}};     \draw[ultra thick, white] (micrograph.south west)++(0.05*0.5\textwidth,0.05*0.5\textwidth)--++(0.5*0.25806\textwidth,0)node[above,white,midway]{100 \si{\micro\meter}};}     }     \end{figure}     \end{document}      How can I ensure the two images end up aligned?


title: Simple table with background color and borders - hhline

text: I'm trying to make simple table with different background colors for cells with borders. I've read that you have to use `\hhline` in order not to get the borders overwritten but it doesn't work (some borders are missing).               \documentclass[12pt,titlepage]{report}          \usepackage{colortbl}     \usepackage{multirow}     \usepackage{hhline}          \begin{document}          \definecolor{good}{rgb}{0.80,1,0.51}     \definecolor{some}{rgb}{1,0.91,0.38}     \definecolor{bad}{rgb}{1,0.5,0.5}          \begin{table}     \centering     \def\arraystretch{1.6}%     \begin{tabular}{| p{2.2cm}|p{3.6cm}|p{3.6cm}|p{3.6cm}|}     \hhline{|-|-|-|-|}      & \textbf{a} & \textbf{b} & \textbf{c} \\     \hhline{|-|-|-|-|}     \textbf{a} & \cellcolor{some} b  & \cellcolor{good} c  & \cellcolor{bad} d \\      \hhline{|-|-|-|-|}     \textbf{a} & \cellcolor{some} b  & \cellcolor{good} c  & \cellcolor{bad} d \\      \hhline{|-|-|-|-|}     \textbf{a} & \cellcolor{some} b  & \cellcolor{good} c  & \cellcolor{bad} d \\      \hline     \end{tabular}     \caption{table.}     \label{tab:tab1}     \end{table}               \end{document}


title: How to change a tension symbol from an arrow to a pair of plus and minus signs?

text: \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-circ}     \begin{document}     \begin{pspicture}[showgrid](4,4)     \pnodes         (0,2){A}         (4,2){B}         \resistor         [             intensitylabel=$i_1$,             intensitylabeloffset=.3,             tensionlabel=$v_1$,             tensionoffset=-.5,             tensionlabeloffset=-.8,         ](A)(B){$R$}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/zQu0j.png) I want to change the above diagram to the following. ![enter image description here](http://i.stack.imgur.com/mzSyR.png) How to change the tension symbol from an arrow to a pair of plus and minus signs?


title: "Dimension too large" using geometry package

text: So, I have an interesting problem with a really (really really ...) large equation that I am trying to typeset. Basically, crunching the file through pdflatex gives:                   This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) (preloaded format=pdflatex)         restricted \write18 enabled.         entering extended mode         (./test5.tex         LaTeX2e <2014/05/01>         Babel <3.9k> and hyphenation patterns for 79 languages loaded.         (c:/texlive/2014/texmf-dist/tex/latex/base/article.cls         Document Class: article 2007/10/19 v1.4h Standard LaTeX document class         (c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo))         (c:/texlive/2014/texmf-dist/tex/latex/geometry/geometry.sty         (c:/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)         (c:/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty)         (c:/texlive/2014/texmf-dist/tex/generic/oberdiek/ifvtex.sty)         (c:/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty))         (c:/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty         For additional information on amsmath, use the `?' option.         (c:/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty         (c:/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))         (c:/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)         (c:/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty))         (c:/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty         (c:/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (./test5.aux)         *geometry* driver: auto-detecting         *geometry* detected driver: pdftex         (c:/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd)         (c:/texlive/2014/texmf-dist/tex/latex/amsfonts/umsb.fd)         Overfull \hbox (8381.87427pt too wide) detected at line 110         [] \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []              Overfull \hbox (8377.93834pt too wide) detected at line 114         \OT1/cmr/m/n/10 0 \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []              Overfull \hbox (8331.86671pt too wide) detected at line 118         \OT1/cmr/m/n/10 0 \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []              Overfull \hbox (7988.59111pt too wide) detected at line 122         \OT1/cmr/m/n/10 0 \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []              Overfull \hbox (5905.06718pt too wide) detected at line 126         \OT1/cmr/m/n/10 0 \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []         [1{c:/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]         Overfull \hbox (8873.18288pt too wide) detected at line 210         [] \OMS/cmsy/m/n/10 ^^@ [] [] ^^@ [] [] ^^@ [] [] ^^@ [] []         [2] (./test5.aux) )         (see the transcript file for additional information)<c:/texlive/2014/texmf-dist         /fonts/type1/public/amsfonts/cm/cmex10.pfb><c:/texlive/2014/texmf-dist/fonts/ty         pe1/public/amsfonts/cmextra/cmex7.pfb><c:/texlive/2014/texmf-dist/fonts/type1/p         ublic/amsfonts/cm/cmmi10.pfb><c:/texlive/2014/texmf-dist/fonts/type1/public/ams         fonts/cm/cmmi5.pfb><c:/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/c         mmi7.pfb><c:/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><         c:/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb><c:/texlive/         2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/texlive/2014/texmf-         dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb><c:/texlive/2014/texmf-dist/font         s/type1/public/amsfonts/cm/cmsy5.pfb><c:/texlive/2014/texmf-dist/fonts/type1/pu         blic/amsfonts/cm/cmsy7.pfb>         Output written on test5.pdf (2 pages, 582701 bytes).         SyncTeX written on test5.synctex.gz.         Transcript written on test5.log.      Increasing the dimensions of the paper seems to hit a limitation somewhere...                   This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) (preloaded  format=pdflatex)          restricted \write18 enabled.         entering extended mode         (./test5.tex         LaTeX2e <2014/05/01>         Babel <3.9k> and hyphenation patterns for 79 languages loaded.         (c:/texlive/2014/texmf-dist/tex/latex/base/article.cls         Document Class: article 2007/10/19 v1.4h Standard LaTeX document class         (c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo))         (c:/texlive/2014/texmf-dist/tex/latex/geometry/geometry.sty         (c:/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)         (c:/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty)         (c:/texlive/2014/texmf-dist/tex/generic/oberdiek/ifvtex.sty)         (c:/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty))         ! Dimension too large.         <to be read again>                     \relax          l.15 \geometry{papersize={25000pt,60in}}      Here's the paper size section of the file...                   \usepackage{geometry}         \geometry{papersize={25000pt,60in}}      I've tried specifying long lengths in inches and points. Thoughts on how to push the limits of page/layout size further?


title: pdflatex custom command for texstudio only run in cmd

text: I've just installed MikTex by which TexStudio came aswell as the editor. So far the editor seems fine. My only problem arises once I have to compile and actually look at what I've created. For now every time I compile something it goes into my C:\users\myname folder. But my tex file is saved under C:\Development\latexWorkspace under the name helloWorld.tex. I've read through some forums and found out i could do               pdflatex -aux-directory=C:\Development\latexWorkspace -output-directory=C:\Development\latexWorkspace C:\Development\latexWorkspace\helloWorld.tex      So I thought, hey I just change the build in execution of pdflatex in TexStudio. So i changed that command under Options > Configure TexStudio > Commands > PdfLatex to               pdflatex -aux-directory=C:\Development\LatexWorkspace -output-directory=C:\Development\LatexWorkspace %.tex      However i was just given the message: Error: Could not start the command: pdflatex -aux- directory=C:\Development\LatexWorkspace -output- directory=C:\Development\LatexWorkspace "HelloWorld".tex I even copied that Error right into CMD and it ran just fine as expected. Can it be that TexStudio use a custom shell to run commands or such? How can i make it output everything to that folder of mine I want it to?


title: Equation number with an apostrophe

text: I am writing two equations in an `align` environment:               \begin{align}     x^2+y^2=z^2, \\     x^2=7,     \end{align}      I would like the first equation to be labelled with e.g. (1.1) and the second equation to be labelled (1.1'), rather than (1.2). Is this possible to automate? Do I need to use a hack to manually place the equation number after my second equation? e.g.               \newcommand{\hack}{\hfill({\eqnum}')} % Sketch - I don't know what command to use.     \begin{align}     x^2+y^2=z^2, \\\nonumber     x^2=7,\hack     \end{align}      If so, what command can I use to get the equation number? i.e. what should my command `\hack` be?


title: How do remove equation number in an algorithm

text: Here is the code. Even I have used the command `\nonumber` still I can see the equation number               \begin{document}          \begin{algorithm}          \DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon instead     \KwIn{$A,B,C$ }          \KwOut{Optimal value for $x_{2}$ and $\lambda$}     Initialisation: \textit{$\lambda(0)=2\pi/3$ and $\epsilon=10^{-6}$}\\     i=0\\     Compute $x_{2}$     \begin{equation}     x_{2}(i)=\frac {A^2B^2}{\sin\lambda(i)\sqrt{A+B-2C+2\sec\lambda(i)}} \nonumber      \end{equation}\\     Update $\lambda$     \begin{equation}     \lambda(i+1)=\arctan\bigg( -\frac{A}{2Bx_{2}-1} \bigg)  \nonumber      \end{equation}\\     i=i+1\\     repeat till $|\lambda(i+1)-\lambda(i) |<\epsilon$     \caption{algo}     \label{algo:max}     \end{algorithm}               \end{document}


title: How can I define a greedy macro?

text: I have a feeling this is a duplicate somewhere, but how can I ensure that TeX will keep scanning until `\relax` or something similar?               \documentclass{article}     \usepackage{xparse}          \pagestyle{empty}     \setlength\parindent{0pt}          \begin{document}          Plain:          \def\test#1/#2/#3{       year:#1   \newline       month:#2  \newline       day:#3    \newline     }     \test 01/02/03          \bigskip          Expl3:          \ExplSyntaxOn     \cs_new:Npn \test:w #1/#2/#3 {       year:#1   \newline       month:#2  \newline       day:#3    \newline     }          \test:w 01/02/03     \ExplSyntaxOff          \bigskip          Keys:          \ExplSyntaxOn     \keys_define:nn { test } {       date .code:n = { \test:w #1 },       title .code:n = { title: #1 \newline},     }          \keys_set:nn {test} { title = hello, date = 15/16/17, title = hi}     \ExplSyntaxOff     \end{document}      ![output](http://i.stack.imgur.com/tmHiW.png) I realize that I could introduce some token—perhaps the quark `\q_stop`—to the `l3keys` `.code:n` usage to terminate it 'normally'. Is there a way to go about doing this without such an introduction?


title: Text in an equation

text: This is best explained by example. Suppose I have the following:               \[         \begin{align*}         C_3 \rightarrow 6 automorphisms\\         C_4 \rightarrow 8 automorphisms\\         C_5 \rightarrow 10 automorphisms         \end{align*}     \]      How can I get the word "automorphisms" to display as if it were not enclosed by the brackets?


title: Using breqn in unnumbered equation in LyX

text: I finally found a way to use automatic line breaking in long math formulas in LyX from the last post in: http://stackoverflow.com/questions/2904807/lyx-breaking-long-formula-lines I soon realized (when I was making beamer class presentations) that my formula was numbered in the generated PDF. Is there a way to get rid of this numbering without ERT?


title: Package "complexity" with option "small"

text: I'm using the package `complexity` to typeset complexity classes (e.g. NP). For some reason the `small`-option does no show any effect (font size does not change). Any ideas?


title: Syntax similar to \centering for right and left?

text: For images we can use `\centering` is there anything to position the image to right side or left side of the page.


title: Copy from PDF without line breaks at end of each line

text: When I produce the PDF, open it and copy the paragraph into notepad, there is a forced line break at the end of every line in the PDF. Is there a way to get over this, so that I can copy the paragraph as continuous text? (Of course, I can just copy the paragraph from my `.tex` file. But the point is that I want other people to be able to copy text from my pdf.) My MWE:               \documentclass[11pt,a4paper]{article}     \usepackage[cp1250]{inputenc}     \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.     \end{document}


title: Remove trailing zeros when using siunitx

text: Consider the following example:               \documentclass{article}          \usepackage{multido}     \usepackage[       round-mode = places,       round-precision = 4     ]{siunitx}          \ExplSyntaxOn       \cs_new_eq:NN \calc \fp_eval:n     \ExplSyntaxOff          \newcommand*\horse[1]{\calc{3.5*sin(pi/#1)}}          \begin{document}          \multido{\i=2+1}{5}{\num{\horse{\i}}\quad}          \end{document}      ![output](http://i.stack.imgur.com/O5HB8.jpg) Is it possible to remove the trailing zeros from the numbers? (In this case it means getting `3.5` instead of `3.5000` and `1.75` instead of `1.7500`.) **Update** It seems that it's not possible to achieve what I would like; should the question therefore be closed?


title: Plot theoretical Binomial distribution with pgfplots

text: I am trying to plot the theoretical binomial distribution with `pgfplots` but don't get the desired output:               \documentclass{article}     \usepackage{pgfplots}     \usepackage{python}     \begin{document}               \begin{python}%     import numpy as np     from scipy import special     N,p=150,.5     def f(n):         return special.binom(N,n)*p**n*(1-p)**(N-n)     s = map(f,range(1,N))     np.savetxt("bernoulli.dat",s,fmt='%0.5f')     \end{python}%               \begin{tikzpicture}       \begin{axis}[]         \addplot[%         hist={density,bins=150,data min=0,data max=150},         fill=green,         ]%         table [y index=0] {bernoulli.dat};       \end{axis}     \end{tikzpicture}          \end{document}      Output: ![output](http://i.stack.imgur.com/d7ByN.png) Any idea what's wrong with this? **Edit** You have to compile this one with `pdflatex` and `--shell-escape`. `bernoulli.dat` looks like this:               0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00001     0.00001     0.00003     0.00005     0.00010     0.00017     0.00031     0.00052     0.00085     0.00137     0.00213     0.00324     0.00478     0.00686     0.00958     0.01302     0.01723     0.02219     0.02782     0.03396     0.04035     0.04669     0.05261     0.05773     0.06168     0.06418     0.06504     0.06418     0.06168     0.05773     0.05261     0.04669     0.04035     0.03396     0.02782     0.02219     0.01723     0.01302     0.00958     0.00686     0.00478     0.00324     0.00213     0.00137     0.00085     0.00052     0.00031     0.00017     0.00010     0.00005     0.00003     0.00001     0.00001     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000


title: Is it possible for LyX to put space automatically after $ $ environment?

text: When I edit document, I usually don't see if there is space after inline equation or not. I have to compile and look where my text spills with equations. Is it possible to redefine this environment or do something to make LyX put defaultly a space bar after every $ $? Thanks in advance


title: 3D projection of a text with Tikz

text: I have a problem with the text showing the inter-elements spacing, I would like it to be in the same orientation as my structure, is there an easy Tikz solution ? ![enter image description here](http://i.stack.imgur.com/W4oAv.png) Code :               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \tdplotsetmaincoords{40}{-30}          \begin{document}     \begin{tikzpicture}[tdplot_main_coords]          \def \r{0.5};     \def \d{1.5};     \def \nx{2};     \def \ny{2};     \def \bord{0.11};     \def \hsub{0.1};          \definecolor{cuivre}{rgb}{0.9,0.7,0.4};     \definecolor{ceram}{rgb}{0.92,0.95,0.95};          %masse     \filldraw[fill=gray] (\d-\r-\bord,\d-\r-\bord,-\hsub)              --++ (\nx*\d-\r/2,0,0)             --++ (0,\ny*\d-\r/2,0)             --++ (-\nx*\d+\r/2,0,0)             -- cycle;           %cadre     \filldraw[fill=cuivre] (\d-\r-\bord,\d-\r-\bord,0)              --++ (\nx*\d-\r/2,0,0)             --++ (0,\ny*\d-\r/2,0)             --++ (-\nx*\d+\r/2,0,0)             -- cycle;           %sub1     \filldraw[fill=ceram] (\d-\r-\bord,\d-\r-\bord,0)              --++ (0,0,-\hsub)             --++ (0,\ny*\d-\r/2,0)             --++ (0,0,\hsub)             -- cycle;          %sub2     \filldraw[fill=ceram] (\d-\r-\bord,\d-\r-\bord,0)              --++ (0,0,-\hsub)             --++ (\nx*\d-\r/2,0,0)             --++ (0,0,\hsub)             -- cycle;          %trous     \foreach \x in {1,...,\nx}{         \foreach \y in {1,...,\ny}{             \filldraw[fill=ceram] (\d*\x,\d*\y,0) circle (\r);           }     }          \foreach \x in {2,...,\nx}{         \foreach \y in {2,...,\ny}{             \filldraw[fill=ceram] (\d*\x-\d/2,\d*\y-\d/2,0)              circle (\r);           }     }          %espace inter trou 1     \draw[dashed] (\d, \nx*\d,\hsub) --++ (0,1.5,0);     \draw[dashed] (2*\d, \nx*\d,\hsub) --++ (0,1.5,0);     \draw[<->] (\d, \nx*\d+1.5,\hsub) -- (2*\d, \nx*\d+1.5,\hsub) node     [font=\footnotesize,midway, fill=white, anchor=center]{1.5mm};          \end{tikzpicture}     \end{document}


title: How can I minimize the distance between 2 values on the x-axis?

text: I am totally new to `pgf` plots... My plot looks like this right now: ![My plot looks like this right now:](http://i.stack.imgur.com/yncaN.png) How can I minimize the distance between "EOD" und "LOD"? That is my code:               \begin{axis}[height=6cm,     ybar stacked,     ylabel=Anzahl,     xlabel=Serotypen,     xtick={EOD,LOD},     symbolic x coords={EOD,LOD},     legend cell align=left,     enlargelimits={abs=10pt},     legend style={at={(1.4,0.8)},anchor=west},     legend entries={PI-2a, PI-2b, PI-2a und PI-1, PI-2b und PI-1}];         %      \addplot table{./Ergebnisse/K_P_1/PI-2a.txt};     \addplot table{./Ergebnisse/K_P_1/PI-2b.txt};     \addplot table{./Ergebnisse/K_P_1/PI-2a1.txt};     \addplot table{./Ergebnisse/K_P_1/PI-2b1.txt};     \end{axis}     \end{tikzpicture}     \end{figure}      How can I generally define the distance between 2 x ticks? E.g. if they are too close? Each single `*.txt` file looks like this:               EOD/LOD Anzahl          EOD 6          LOD 3


title: stmaryrd and boldsymbol: avoid warnings

text: Here are two examples: 1               \documentclass[a4paper,10pt]{article}     \usepackage{amsmath}     \begin{document}         $\boldsymbol x$     \end{document}      2               \documentclass[a4paper,10pt]{article}     \usepackage{amsmath}     \usepackage{stmaryrd}     \begin{document}         $\boldsymbol x$     \end{document}      As far as I can see, both versions produce the same output when compiled with `pdflatex`: there is a single "x" in bold italics. However, when I compile document 2, I also get the following warning:               LaTeX Font Warning: Font shape `U/stmry/b/n' undefined     (Font)              using `U/stmry/m/n' instead on input line ….      Why do I get this warning (which seems to suggest that Latex was _not_ able to find the right font) but correct output? How do I avoid the warning? I need both of the following in my document:   * _bold_ versions of normal math symbols (something that I can easily produce without `stmaryrd`)   * _regular_ versions of some symbols that are only provided in `stmaryrd`


title: Do multiplication rules differ in TikZ compared to standard TeX?

text: I'd like to scale a line according to `\figscale`. Here it is said that the below syntax should work in general, but in this graphic it does not. As the picture shows, the numbers are just concatenated to, e.g., `-0.53cm` instead of `-0.5 * 3cm = 1.5cm`, although I'd like to multiply them. Writing `-0.5*\figscale`works well. _Why is the solution provided in thelink not applicable here?_               \def \figscale{3cm}          \begin{figure}         \centering         \begin{tikzpicture}             \draw (-1.0,2) -- (0,2) node[midway, anchor=south] {$A$};             \draw (-0.5\figscale,1) -- (0,1) node[midway, anchor=south] {$B$};             \draw (-1.0\figscale,0) -- (0,0) node[midway, anchor=south] {$C$};         \end{tikzpicture}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/NiMIx.png)


title: How to remove/change the vertical spacing before and after an \algorithm environment?

text: I saw a question that tells me how to change the spacing _in_ an algorithm environment, but I don't know how to do remove/change the space before and after an algorithm environment like:               % remove the space here     \begin{algorithm}     \begin{algorithmic}     [...]     \end{algorithmic}     \end{algorithm}     % remove the space here


title: How can I get cleveref / enumitem to print, not 'item (e)', but 'Proposition 1 (e)'?

text: I currently make use of `enumitem` and `cleveref` to show references to theorems. Sometimes, I want to reference a point in a list inside of a theorem. It should show `[Name of theorem type, e.g. Propsiton] [Number] [number inside list]`, but it shows `item [number inside list]` How can I get this? ## MWE               \documentclass[a4paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage{enumitem}     \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}     \usepackage{framed}     \usepackage[german,nameinlink]{cleveref}     \newframedtheorem{satz}{Satz}[section]     \newframedtheorem{proposition}[satz]{Proposition}     \crefname{proposition}{Proposition}{Propositionen}     \begin{document}     \section{adfa}     adsfasdfasdf asdf asdf asd fasdfasd asd fasdf asdf     asdfasdfa sasdfas dfasdf asdf          \begin{proposition}\leavevmode         \begin{enumerate}[label=\alph*), ref=\theenumi{} (\alph*)]             \item asdfasdf asdf asdf sdf             \item  sdfas dasdfasd fasdf asdf asdf              \item asdfasd asdf asdf sad f             \item \label{prop:15.2d} a fa ssd fas df             \item \label{prop:15.2e} sdf asd asdf sad f         \end{enumerate}     \end{proposition}          As shown in \cref{prop:15.2d} ...     \end{document}      ## Rendered ![enter image description here](http://i.stack.imgur.com/jE8Vl.png) "Punkt" is German for "item".


title: How to wrap text in table cell?

text: this code:               %%%%%%%%%%%%%%%%%%Table: Valence  x valence crosstab      \begin{table*}[t]         \centering             \begin{tabular}{c c c c c c c}                 \toprule                 \midrule                     & & \multicolumn{5}{c}{Predicted valence }\\ \cmidrule{3-7}                     && Negative  & Little negative & Neutral & Little positive & Positive  \\ \cmidrule{3-7}                     \multicolumn{1}{c}{\multirow{5}{*}{\begin{sideways}Actual valence\end{sideways}}}   &                     \multicolumn{1}{l}{Negative}& 59.0 & 18.0 & 17.3 & 5.8 &  \\                     \multicolumn{1}{c}{}    &                     \multicolumn{1}{l}{Little negative}& 0.9 & 66.6 & 16.7 & 10.7 & 5.1  \\                     \multicolumn{1}{c}{}    &                     \multicolumn{1}{l}{Neutral} &1.4 & 16.6 & 70.8 & 8.0 & 3.1  \\                     \multicolumn{1}{c}{}    &                        \multicolumn{1}{l}{Little positive} &0.3 & 11.2 & 20.0 & 68.0 & .5  \\                     \multicolumn{1}{c}{}    &                     \multicolumn{1}{l}{Positive} & 4.9 & 7.8 & 17.5 & 69.9  \\                 \midrule                 \bottomrule             \end{tabular}             \centering             \caption{Classification results for the valence dimension.}             \label{tab:sam_count}     \end{table*}     %%%%%%%%%%%%%%%%%         prduces this: ![screeshot](http://i.stack.imgur.com/R7yFR.png) I want the vertical text "actual valence" to have an newline in between. How to I accomplish this?


title: Settting PGFplots axis environment options by means of \newcommand and {\newlength,\setlength}

text: Because I often use the same options for multiple axes in my LaTeX documents, I use the following code to simplify my life.               \documentclass{article}     \usepackage{pgfplots}     \newcommand{\linecolora}{blue}     \newcommand{\marka}{o}     \newcommand{\plotoptsa}{color=\linecolora,mark=\marka}     \newcommand{\xlabela}{Test test 123}     \newlength\figurewidth     \setlength{\figurewidth}{\columnwidth}     \newcommand{\axisoptsa}{width=100,xlabel=\xlabela}     \newcommand{\axisoptsb}{ymin=-8,ymax=-3}     \begin{document}         \begin{tikzpicture}             \begin{axis}[\axisoptsa,\axisoptsb]                 \expandafter\addplot\expandafter[\plotoptsa] coordinates                     {                         (2,-2.8559703)                         (3,-3.5301677)                         (4,-4.3050655)                         (5,-5.1413136)                         (6,-6.0322865)                         (7,-6.9675052)                         (8,-7.9377747)                     };              \end{axis}              \end{tikzpicture}     \end{document}      It works like a charm! However, if I change `width=100` into the defined `width=\figurewidth`, I get `Missing \endcsname inserted.` error. Using               \expandafter\begin{axis}\expandafter[\axisoptsa,\axisoptsb]      does not help.


title: Page break after \maketitle

text: Hi I have some problem again with my first page, this is my code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}          \title{balalla}     \author{someone}          \begin{document}          \centering \includegraphics[scale=0.5]{logo_inria}     \nopagebreak     \maketitle               \end{document}      Can someone tell me how to avoid the page break?


title: How do I make future equations renumber as extensions of previous equations?

text: I'm looking to do the following automatically rather than manually               \documentclass{article}     \usepackage{amsmath}          \begin{document}     These equations are pretty important.              \begin{align}             \label{eqn:one}     a+b&=c\\             \label{eqn:two}     d+e&=f\\             \label{eqn:three}   g+h&=i         \end{align}          But as it turns out, we can actually do better by recalling         that $a=1$, so we have              \begin{equation*}             \tag{\ref{eqn:one}A}                 1+b=c\\         \end{equation*}          Furthermore, $c=d=e=2$, so we have              \begin{align*}             \tag{\ref{eqn:one}B}    1+b&=2\\             \tag{\ref{eqn:two}A}    2+2&=f         \end{align*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/SE3GE.png) In other words, I'd like to provide a switch that tells an equation to display a number based on which iteration of a previous equation it is. Non- requirements:   * I can manually instruct it which equation is its ancestor; I don't need it to "figure it out" automatically.   * I also don't care what the format of these numbers is as I presume any solution will make that easy to change (so e.g. I'd be just as happy with 1.1, 1.2 instead of 1A, 1B).   * Finally, there is no need to support automatic re-labeling, as I can manually re-label the important future iterations so long as the label "grabs" the tagged-displayed number in references. Requirement:   * The one thing that is essential is that I would like to automate the sub-numbering process so I don't risk messing it up by moving equations around / deleting them. Unfortunately I'm not sure what this is _called_. Sub-referencing equations? Self-referencing equation numbering?


title: Will XeTeX or LuaTeX support COLR table in OpenType fonts?

text: Announced at the Microsoft //build conference: > A data structure, implemented as a new 'COLR' table in OpenType, breaks down > the base glyph into a separate set of glyphs, each with its own z-order and > single color reference. The color references are handled has palette > indices, with a separate table, 'CPAL' in OpenType that resolves the RGBA > colors actually used for the glyph. Video here: http://channel9.msdn.com/Events/Build/2013/3-191 Original announcement on Typophile: http://typophile.com/node/104174


title: e-Tex and TexWriter

text: I'm using TexWriter as a LaTeX editor on my iPad. When I try to compile a document I get the following error:"!package etoolbox Error: Not running under e-TeX." I'm also using enumitem package. Is there a way to get around this?


title: pgfplots - box plots min and max x-values

text: Im using the following code from pgfplots to create box plots:                \begin{tikzpicture}       \begin{axis}       [         ytick={1},         yticklabels={},         y=0.7cm       ]         \addplot+[boxplot]         table[row sep=\\, y index = 0] {         data\\           2\\ 2\\ 3\\ 3\\ 4\\ 4\\ 4\\ 4 \\         };       \end{axis}     \end{tikzpicture}      This produced a box plot like **first** one in the following picture: ![box plots, first on is the actual one, second is how i would like it to look](http://i.stack.imgur.com/PXzYG.png) In the first box plot it appears as if my data was on a scale from 2 to 4, since all of my results are in that range. The actual range for the data was from 0 to 6. Therefore i would like to show that in the box plot. This is shown in the **second** box plot in the picture. How can i do this?


title: Trouble with 3D axis in pgfplots

text: I have texlive 2012 and have drawn a curve in three dimensions with pgfplots. That has not been a problem. The axes occurs in a way not appear well suited. In the code I indicated that ymax = 1.5, however the figure shows that the maximum value of y is 8. Something similar happens with ymin. Also I have a problem with caption space. Can anyone tell me any suggestions?               \documentclass{memoir}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[scale=1.5,axis equal,view={95}{50},       axis lines=center,       axis on top,       xmin=-3.5,xmax=3.5,       ymin=-0.5,ymax=1.5,       zmin=-3,zmax=3,       xlabel={$x$},ylabel={$y$},zlabel={$z$},       every axis x label/.style={       at={(axis cs:\pgfkeysvalueof{/pgfplots/xmax},0,0)},       xshift=-0.6em,yshift=-0.1em                        },       every axis y label/.style={       at={(axis cs:0,\pgfkeysvalueof{/pgfplots/ymax},0)},       xshift=0.6em,yshift=-2ex                   },       every axis z label/.style={       at={(axis cs:0,0,\pgfkeysvalueof{/pgfplots/zmax})},       xshift=-0.2em,yshift=1em                  }       ]       \addplot3[blue,domain=-3:3,samples y=0] ({x},{x^2/(1+x^2)},{x^3/(1+x^2)});       \legend{$\Ran f$}     \end{axis}     \end{tikzpicture}     \end{document}      ![Gráfico de \(x,x²/\(1+x²\),x³/\(1+x²\)\)](http://i.stack.imgur.com/P48xH.png)


title: Fill a contour-plot

text: I did some calculations in Mathematica that gave me a contour plot: ![enter image description here](http://i.stack.imgur.com/y4D1I.png) To include the output I wanted to however draw it with pfgplot. But there I don't get it to work, first of all the y-axis doesn't start at 0 and second I cannot find a specifier to fill the areas between the lines. The part that is white in the plot I am trying to reproduce is an area of complex values that I wanted to exclude as well. My MWE up to now looks like               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.7}          \begin{document}          \begin{tikzpicture}          \begin{axis}[          xlabel = $x$          , ylabel = $y$         , domain = 1:2          , y domain = 0:90         , view = {0}{90}         ]              \addplot3[             contour gnuplot={number = 30,labels={false}},                  thick             ]{-2.051^3*1000/(2*3.1415*(2.99*10^2)^2)/(x^2*cos(y)^2)};          \end{axis}       \end{tikzpicture}     \end{document}      with the following output ![enter image description here](http://i.stack.imgur.com/ilDKD.png) It should be a common problem but I couldn't find a solution. Another thing that I tried was using addplot3 with surf, but the way how the colors are put together didn't seem to work right               \addplot3[surf,shader=interp,samples=2, patch type=bilinear]


title: \chapter command and skak package

text: Is there a way to write a chapter title using chess figurines? I'm using the `skak` package and               \chapter{\mainline{1.e4 e6 2.d4 b6}}      doesn't work. Same error using the `\variation` command. I'll post the exact error output when I'll be back home if needed.


title: TeXstudio - Make recognition of bibliography changes work with output_directory parameter

text: I have a problem regarding TeXstudio (on a Windows machine, using MiKTeX) and the `output_directory` parameter of `biber`. I changed this parameter together with the `pdflatex` parameter `aux-directory`, so that the entries in the configuration menu looked like this:               pdflatex.exe -synctex=1 -interaction=nonstopmode -aux-directory=temp %.tex     biber.exe  --output_directory=temp %      This worked great so far. All the aux and `biber` processing files were stored in the subfolder "temp". Today though, I noticed that some TeXstudio specific functionalities are missing: If I include a new entry in my bib-file, the program does not recognize the change. That means, no new entries are suggested through the auto-complete feature. Additionally, the compiling process after pressing the `F1` key does not include `biber` compilation. If I set the preferences back to normal, everything works fine again. Does anyone know how it is able to use these features, but with the possibility of a tidy folder structure?


title: Writing greek text in LaTeX

text: Is it possible to compile the following example using pdfLaTeX showing the correct font for greek text, and not the default CMR?               \documentclass[a4paper]{article}          \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{tgheros}     \usepackage[T1]{fontenc}          \begin{document}          \section{Εισαγωγή}          Αυτό είναι ελληνικό κείμενο.     \selectlanguage{english} this is latin text.     \selectlanguage{greek} και αυτό είναι ελληνικό κείμενο.          \[     a = b + \gamma     \]          \end{document}


title: Graphic alignment

text: I want to position three graphics next to each other, so that they are aligned at the top line. I used \begin{minipage}, but that does't work like I want it to...               \begin{figure}     \begin{minipage}[t]     \includegraphics[width=2cm,angle=90]{test1}     \end{minipage}     \begin{minipage}[t]     \includegraphics[width=2.5cm,angle=90]{test2}     \end{minipage}     \begin{minipage}[t]     \includegraphics[width=2cm]{test3}     \end{minipage}     \end{figure}      Could somebody help me?


title: Capitalising prefix of second name in citation with biblatex

text: The `\Cite` command in biblatex capitalises the first prefix in a list of names:               \cite: de Jonge and de Bruin     \Cite: De Jonge and de Bruin      Unfortunately in Dutch publications _all_ prefices need to be capitalised. Basically I need: De Jonge and De Bruin. This is only valid in the text, in the bibliography I still need "Jonge, M. de and T. de Bruin" (this was achieved with the hack outlined at How can I have the prefix to a name in the citations but NOT the bibliography). Does anyone know how I can fix this in biblatex?


title: How to write sub lemmas

text: I want to code like that, Lemma 1. I will marry if, Case (i) I found a soul mate Case (ii) never married How would I code this in LaTeX, I have used `\newtheorem{lemma}{Lemma}` but I dont know how to get the pointwise cases.


title: Automatic way to match matrix heights

text: I have a simple matrix equation, but one of the matrices has subscripts and superscripts on both lines:               \documentclass{article}      \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}          \begin{document}          \[     \begin{vmatrix} x_2 \\x_2' \end{vmatrix}      =      \begin{vmatrix} \frac{d_2}{f_1}&-\frac{d_1d_2}{f_1}\\-\frac{1}{f_1}&1-\frac{d_1}{f_1} \end{vmatrix}     \begin{vmatrix} x_1\\x_1' \end{vmatrix}     \]               \end{document}      so the matrices are slightly different heights (top line in example below - red rule added to demonstrate). It wouldn't look so bad if they were very different. I can use `\vphantom\frac...` to enlarge the two smaller matrices:               \[     \begin{vmatrix} x_2 \vphantom{\frac{d_2}{f_1}}\\x_2'\vphantom{\frac{d_2}{f_1}} \end{vmatrix}      =      \begin{vmatrix} \frac{d_2}{f_1}&-\frac{d_1d_2}{f_1}\\-\frac{1}{f_1}&1-\frac{d_1}{f_1} \end{vmatrix}      \begin{vmatrix} x_1\vphantom{\frac{d_2}{f_1}}\\x_1'\vphantom{\frac{d_2}{f_1}} \end{vmatrix}     \]      (second line in example image) but is there a way to make all the matrix heights in an equation match - either within a particular equation, or something I can do globally? ![matrix height mismatch](http://i.stack.imgur.com/SYNLi.png)


title: \pfill probably conflicting with other commands or packages

text: Friends, I'm stuck with the following issue: I have a document with several indices. The `splitidx` package deals with them with no problems. It happens that I have some very long index entries, so I decided to make them look more aesthetic: Styling very long index entries to look more aesthetic **lockstep** provided an amazing solution that works like a charm. This solution works in my other documents. Unfortunately, when I try to use it in my "production document", it does not work. **egreg** suggested me to reduce my document to a minimal example, so here it is. Thankfully it still does not work:               % since the first example was full of "package noise",     % I left only the needed ones.     \documentclass[12pt,oneside]{book}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{savesym}          \usepackage[useindex]{splitidx}     \savesymbol{newindex}     \makeindex     \orignewindex[My custom index]{stl}     \AtWriteToIndex{stl}{\let\thepage\thesongnum}          \usepackage{idxlayout}     \usepackage[lyric]{songs}          \newindex{reltitleidx}{cbreltitle}          \begin{document}          \showindex{{\normalfont\bfseries My songs index}}{reltitleidx}          \begin{songs}{reltitleidx}          \beginsong{Funny song}[by={},sr={}]          \sindex[stl]{Cool@\textbf{Cool}!Stuff}          \beginchorus     This is my chorus.     \endchorus          \beginverse     Verse 1.     \endverse          \beginverse     Verse 2.     \endverse          \beginverse     Verse 3.     \endverse          \endsong          \end{songs}          \printindex*          \end{document}      Any help is really appreciated. **EDIT 1:** I forgot to mention. `\pfill` seems to raise the errors. If I remove it from my `ist` style file, the document is successfully compiled. There are the commands: `pdflatex mydocument.tex`, `splitindex mydocument.idx`, `makeindex -s mystyle.ist mydocument-stl.idx`, `pdflatex mydocument.tex`. **EDIT 2:** Errors raised: > `! Undefined control sequence. <recently read> \efill l.4 \item > \textbf{Cool}\efill` and > `! Undefined control sequence. \pfill ...ll \penalty 500 \strut \nobreak > \dotfil ~\ignorespaces l.5 \subitem Stuff\pfill 1` **EDIT 3:** I owe **egreg** a drink. The first error is gone! The index is properly generated, but this annoying error still bugs me: > `! Undefined control sequence. \pfill ...ll \penalty 500 \strut \nobreak > \dotfil ~\ignorespaces l.5 \subitem Stuff\pfill 1` **EDIT 4:** It's now solved, thanks to **egreg** 's fantastic solution. `=)` **EDIT 5:** For completeness sake, my style file is based on `gind.ist`. Since those commands were not defined in terms of others, the above errors raised. Once you correctly define them, the errors are gone.


title: Centering a \framebox

text: Before asking, I have checked Centered box, text inside it flushed right?, Questions about \fbox, and Any way to center text within a \parbox?. Here I have tested various centering methods (my intention is to use `\centering` only) on `\framebox` and `\makebox` alike.               \framebox{This is a sentence of text.}\par     \makebox{This is a sentence of text.}\par          {\indent \centering\framebox{This is a sentence of text.}}\par     {\indent \centering\makebox{This is a sentence of text.}}\par          \framebox{\centering This is a sentence of text.}\par     \makebox{\centering This is a sentence of text.}\par          \framebox[5cm]{\centering This is a sentence of text.}\par     \makebox[5cm]{\centering This is a sentence of text.}\par          \framebox[\linewidth]{This is a sentence of text.}\par     \makebox[\linewidth]{This is a sentence of text.}\par          \framebox[5cm]{\centering This is a sentence of text.}\par     \makebox[5cm]{\centering This is a sentence of text.}\par          \framebox{\centering\parbox{5cm}{This is a sentence of text.}}\par     \makebox{\centering\parbox{5cm}{This is a sentence of text.}}\par          \parbox{5cm}{\centering\framebox{This is a sentence of text.}}\par     \parbox{5cm}{\centering\makebox{This is a sentence of text.}}\par          \begin{center}     \framebox{This is a sentence of text.}\par     \makebox{This is a sentence of text.}     \end{center}      The only standard LaTeX method (no packages) I can achieve is using the center environment (the last one). Is that so, and why? An image is shown below. ![enter image description here](http://i.stack.imgur.com/4Q0is.jpg)


title: How can one reduce the size of ternary graphs when they are many on a page?

text: I need help on how I can reduce the magnification of my ternary plots so that the four graphs can be accommodated on the page.At present what I have is a little more than what a page can accommodate even when I have reduced the width and the height to 5.6cm as shown in the code below.Thanks.               \documentclass[12pt,a4paper]{article}     \setlength{\topmargin}{-1.5cm}     \setlength{\textheight}{22.45cm}     \setlength{\textwidth}{15.75cm}     \setlength{\oddsidemargin}{0.5cm}     \usepackage{pgfplots,subcaption}%ternary figure info begin     \usepgfplotslibrary{ternary}     \pgfplotsset{compat=1.8}     \begin{document}     \newpage     \begin{figure}%     \begin{subfigure}{\columnwidth}\centering       \begin{tikzpicture}         \begin{ternaryaxis}[                ternary limits relative=false,                width=5.6cm,                height=5.6cm,                ymax=1.0,                no markers,               clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=B,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=A,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=C,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },         ]     \addplot3 [black,dashed] coordinates {            (0.8998, 0.1002, 0.0000)                  (0.8920,   0.0972, 0.0108)                  (0.8923,   0.0862, 0.0215)                  (0.8984,   0.0711, 0.0305)                   (0.9061,  0.0563, 0.0376)                   (0.9138,  0.0431, 0.0431)                   (0.9207,  0.0317, 0.0476)                   (0.9268,  0.0220, 0.0512)                   (0.9322,  0.0136, 0.0542)                   (0.9369,  0.0063, 0.0568)                   (0.9410,  0.0000, 0.0590)           };          \addplot3 [black,dashed] coordinates {            (0.7988, 0.2012, 0.0000)                 ( 0.8049,   0.1756, 0.0195)                  (0.8259,   0.1393, 0.0348)                  (0.8465,   0.1075, 0.0461)                  (0.8639,   0.0817, 0.0544)                  (0.8782,   0.0609, 0.0609)                     (0.8900,   0.0440, 0.0660)                  (0.8999,   0.0300, 0.0701)                  (0.9081,   0.0184, 0.0735)                  (0.9152,   0.0085, 0.0763)                  (0.9212,   0.0000, 0.0788)             };          \addplot3 [black,dashed] coordinates {              (0.6960,   0.3040, 0.0000)              (0.7316,   0.2416, 0.0268)              (0.7716,   0.1827, 0.0457)              (0.8034,   0.1376, 0.0590)              (0.8282,   0.1031, 0.0687)              (0.8477,   0.0762, 0.0762)             (0.8634 ,         0.0546,   0.0820)             (0.8762,    0.0371, 0.0867)             (0.8869,    0.0226, 0.0905)             (0.8958,    0.0104, 0.0938)             (0.9035,    0.0000, 0.0965)             };          \addplot3 [black,dashed] coordinates {             (0.5910,          0.4090,   0.0000)              (0.6636,   0.3028, 0.0336)               (0.7204,  0.2237, 0.0559)               (0.7621,  0.1665, 0.0714)                (0.7935, 0.1239, 0.0826)                (0.8178, 0.0911, 0.0911)               (0.8371,  0.0652, 0.0977)              (0.8527,   0.0442, 0.1031)              (0.8656,   0.0269, 0.1075)              (0.8765,   0.0124, 0.1112)              (0.8857,   0.0000, 0.1143)             };          \addplot3 [black,dashed] coordinates {             (0.4839,   0.5161,  0.0000)              (0.5964,  0.3632,  0.0404)              (0.6684,   0.2653, 0.0663)              (0.7193,   0.1965, 0.0842)               (0.7571,  0.1457, 0.0972)              (0.7861,   0.1070, 0.1070)              (0.8090,   0.0764, 0.1146)               (0.8276,   0.0517,    0.1207)              (0.8429,    0.0314,    0.1257)              (0.8557,   0.0144, 0.1299)               (0.8666,  0.0000, 0.1334)             };          \addplot3 [black,dashed] coordinates  {         (0.3754,    0.6246, 0.0000)               (0.5264,  0.4262, 0.0474)               (0.6122,  0.3102, 0.0776)               (0.6722,  0.2295, 0.0983)               (0.7165,  0.1701, 0.1134)               (0.7504,  0.1248, 0.1248)               (0.7773,  0.0891, 0.1336)               (0.7990,  0.0603, 0.1407)               (0.8169,  0.0366, 0.1465)               (0.8318,  0.0168, 0.1514)               (0.8446,  0.0000, 0.1554)                };          \addplot3 [black,dashed] coordinates {         (0.2683,    0.7317, 0.0000)                (0.4495, 0.4955, 0.0551)                (0.5478, 0.3618, 0.0904)                (0.6166, 0.2684, 0.1150)                (0.6678, 0.1993, 0.1329)                (0.7073, 0.1464, 0.1464)                (0.7386, 0.1046, 0.1568)                (0.7640, 0.0708, 0.1652)                (0.7849, 0.0430, 0.1721)                (0.8025, 0.0198, 0.1778)                (0.8174, 0.0000, 0.1826)                };          \addplot3 [black,dashed] coordinates {         (0.1671,    0.8329, 0.0000)                (0.3590, 0.5769, 0.0641)                (0.4669, 0.4265, 0.1066)                (0.5445, 0.3189, 0.1367)                (0.6034, 0.2380, 0.1586)                (0.6494, 0.1753, 0.1753)                (0.6862, 0.1255, 0.1883)                (0.7163, 0.0851, 0.1986)                (0.7412, 0.0518, 0.2070)                (0.7621, 0.0238, 0.2141)                (0.7800, 0.0000, 0.2200)                };          \addplot3 [black,dashed] coordinates {               (0.0767,  0.9233, 0.0000)               (0.2386,  0.6853, 0.0761)               (0.3478,  0.5218, 0.1304)               (0.4321,  0.3975, 0.1704)               (0.4995,  0.3003, 0.2002)               (0.5540,  0.2230, 0.2230)               (0.5985,  0.1606, 0.2409)               (0.6355,  0.1094, 0.2552)               (0.6665,  0.0667, 0.2668)               (0.6928,  0.0307, 0.2765)              (0.7154,   0.0000, 0.2846)                };     \node at (zticklabel cs:0.5) [anchor=north] {$X_{C}$ $\rightarrow$ };       \end{ternaryaxis}     \end{tikzpicture}     \caption{Isoplot of B in the B-C-A system at T1.}     \label{fig:a:first}     \end{subfigure}     \begin{subfigure}{\columnwidth}\centering     \begin{tikzpicture}       \begin{ternaryaxis}[                ternary limits relative=false,                width=5.6cm,                height=5.6cm,                ymax=1.0,                no markers,                clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=B,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=A,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=C,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },       ]              \addplot3 [black,dashed] coordinates {     (0.8993,    0.1007, 0.0000)     (0.8941,    0.0953, 0.0106)     (0.8885,    0.0892, 0.0223)     (0.8834,    0.0816, 0.0350)     (0.8797,    0.0722, 0.0481)     (0.8779,    0.0611, 0.0611)     (0.8778,    0.0489, 0.0733)     (0.8791,    0.0363, 0.0846)     (0.8813,    0.0237, 0.0950)     (0.8841,    0.0116, 0.1043)     (0.8872,    0.0000, 0.1128)                         };              \addplot3 [black,dashed] coordinates {     (0.7971,    0.2029, 0.0000)     (0.7887,    0.1902, 0.0211)     (0.7854,    0.1717, 0.0429)     (0.7870,    0.1491, 0.0639)     (0.7920,    0.1248, 0.0832)     (0.7990,    0.1005, 0.1005)     (0.8069,    0.0772, 0.1159)     (0.8150,    0.0555, 0.1295)     (0.8231,    0.0354, 0.1415)     (0.8308,    0.0169, 0.1523)     (0.8382,    0.0000, 0.1618)                           };              \addplot3 [black,dashed] coordinates {     (0.6933,    0.3067, 0.0000)     (0.6902,    0.2788, 0.0310)     (0.6966,    0.2427, 0.0607)     (0.7081,    0.2043, 0.0876)     (0.7217,    0.1670, 0.1113)     (0.7359,    0.1321, 0.1321)     (0.7497,    0.1001, 0.1502)     (0.7628,    0.0712, 0.1660)     (0.7751,    0.0450, 0.1799)     (0.7864,    0.0214, 0.1922)     (0.7968,    0.0000, 0.2032)                            };           \addplot3 [black,dashed] coordinates {     (0.5882,    0.4118, 0.0000)     (0.5972,    0.3625, 0.0403)     (0.6150,    0.3080, 0.0770)     (0.6357,    0.2550, 0.1093)     (0.6567,    0.2060, 0.1373)     (0.6768,    0.1616, 0.1616)     (0.6956,    0.1218, 0.1826)     (0.7130,    0.0861, 0.2009)     (0.7288,    0.0542, 0.2170)     (0.7433,    0.0257, 0.2310)     (0.7565,    0.0000, 0.2435)                          };           \addplot3 [black,dashed] coordinates {     (0.4823,    0.5177, 0.0000)     (0.5073,    0.4434, 0.0493)     (0.5358,    0.3714, 0.0928)     (0.5644,    0.3049, 0.1307)     (0.5917,    0.2450, 0.1633)     (0.6170,    0.1915, 0.1915)     (0.6402,    0.1439, 0.2159)     (0.6614,    0.1016, 0.2370)     (0.6806,    0.0639, 0.2555)     (0.6981,    0.0302, 0.2717)     (0.7140,    0.0000, 0.2860)                        };                \addplot3 [black,dashed] coordinates {     (0.3769,    0.6231, 0.0000)     (0.4178,    0.5240, 0.0582)     (0.4553,    0.4358, 0.1089)     (0.4903,    0.3568, 0.1529)     (0.5227,    0.2864, 0.1909)     (0.5526,    0.2237, 0.2237)     (0.5799,    0.1680, 0.2521)     (0.6047,    0.1186, 0.2767)     (0.6272,    0.0746, 0.2982)     (0.6476,    0.0352, 0.3172)     (0.6662,    0.0000, 0.3338)                               };          \addplot3 [black,dashed] coordinates {           (0.2737,    0.7263, 0.0000)     (0.3264,    0.6062, 0.0674)     (0.3698,    0.5042, 0.1260)     (0.4091,    0.4136, 0.1773)     (0.4454,    0.3328, 0.2218)     (0.4789,    0.2606, 0.2606)     (0.5098,    0.1961, 0.2941)     (0.5380,    0.1386, 0.3234)     (0.5638,    0.0872, 0.3490)     (0.5873,    0.0413, 0.3714)     (0.6088,    0.0000, 0.3912)                                   };                \addplot3 [black,dashed] coordinates {     (0.1751,    0.8249, 0.0000)     (0.2299,    0.6931, 0.0770)     (0.2742,    0.5806, 0.1452)     (0.3144,    0.4799, 0.2057)     (0.3522,    0.3887, 0.2591)     (0.3878,    0.3061, 0.3061)     (0.4213,    0.2315, 0.3472)     (0.4525,    0.1643, 0.3833)     (0.4814,    0.1037, 0.4149)     (0.5080,    0.0492, 0.4428)     (0.5326,    0.0000, 0.4674)                               };                 \addplot3 [black,dashed] coordinates {     (0.0833,    0.9167, 0.0000)     (0.1239,    0.7885, 0.0876)     (0.1591,    0.6727, 0.1682)     (0.1928,    0.5650, 0.2422)     (0.2261,    0.4643, 0.3096)     (0.2593,    0.3704, 0.3704)     (0.2920,    0.2832, 0.4248)     (0.3239,    0.2028, 0.4733)     (0.3544,    0.1291, 0.5165)     (0.3835,    0.0617, 0.5549)     (0.4110,    0.0000, 0.5890)                                            };     \node at (zticklabel cs:0.5) [anchor=north] {$X_{C}$ $\rightarrow$ };     \end{ternaryaxis}       \end{tikzpicture}     \caption{Isoplot of B in B-C-A system at T2.}     \label{fig:a:second}     \end{subfigure}     %%%nextnext     \begin{subfigure}{\columnwidth}\centering     \begin{tikzpicture}       \begin{ternaryaxis}[                ternary limits relative=false,                width=5.6cm,                height=5.6cm,                ymax=1.0,                no markers,                clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=B,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=A,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=C,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },       ]              \addplot3 [black,dashed] coordinates {     (0.8993,    0.1007, 0.0000)     (0.8955,    0.0941, 0.0105)     (0.8912,    0.0870, 0.0218)     (0.8865,    0.0795, 0.0341)     (0.8819,    0.0709, 0.0472)     (0.8777,    0.0612, 0.0612)     (0.8743,    0.0503, 0.0754)     (0.8719,    0.0384, 0.0897)     (0.8707,    0.0259, 0.1034)     (0.8703,    0.0130, 0.1167)     (0.8709,    0.0000, 0.1291)                           };              \addplot3 [black,dashed] coordinates {     (0.7971,    0.2029, 0.0000)     (0.7891,    0.1898, 0.0211)     (0.7827,    0.1738, 0.0435)     (0.7789,    0.1548, 0.0663)     (0.7778,    0.1333, 0.0889)     (0.7789,    0.1106, 0.1106)     (0.7819,    0.0872, 0.1309)     (0.7862,    0.0641, 0.1497)     (0.7912,    0.0418, 0.1670)     (0.7967,    0.0203, 0.1830)     (0.8024,    0.0000, 0.1976)                             };              \addplot3 [black,dashed] coordinates {     (0.6936,    0.3064, 0.0000)     (0.6861,    0.2825, 0.0314)     (0.6839,    0.2529, 0.0632)     (0.6863,    0.2196, 0.0941)     (0.6920,    0.1848, 0.1232)     (0.6997,    0.1502, 0.1502)     (0.7087,    0.1165, 0.1748)     (0.7182,    0.0845, 0.1973)     (0.7280,    0.0544, 0.2176)     (0.7376,    0.0262, 0.2362)     (0.7470,    0.0000, 0.2530)                           };           \addplot3 [black,dashed] coordinates {     (0.5890,    0.4110, 0.0000)     (0.5873,    0.3714, 0.0413)     (0.5924,    0.3261, 0.0815)     (0.6019,    0.2787, 0.1194)     (0.6139,    0.2317, 0.1544)     (0.6273,    0.1864, 0.1864)     (0.6412,    0.1435, 0.2153)     (0.6551,    0.1035, 0.2414)     (0.6687,    0.0663, 0.2650)     (0.6818,    0.0318, 0.2864)     (0.6943,    0.0000, 0.3057 )                         };           \addplot3 [black,dashed] coordinates {     (0.4841,    0.5159, 0.0000)     (0.4915,    0.4577, 0.0509)     (0.5044,    0.3965, 0.0991)     (0.5204,    0.3357, 0.1439)     (0.5379,    0.2773, 0.1848)     (0.5559,    0.2221, 0.2221)     (0.5739,    0.1704, 0.2557)     (0.5915,    0.1226, 0.2860)     (0.6085,    0.0783, 0.3132)     (0.6246,    0.0375, 0.3379)     (0.6399,    0.0000, 0.3601)                           };                \addplot3 [black,dashed] coordinates {             (0.3798,    0.6202, 0.0000)             (0.3974 ,         0.5423,   0.0603)              (0.4171,   0.4663, 0.1166)              (0.4381,   0.3933, 0.1686)              (0.4597,   0.3242, 0.2161)             (0.4815,    0.2593, 0.2593)             (0.5028,    0.1989, 0.2983)             (0.5236,    0.1429, 0.3335)             (0.5434,    0.0913, 0.3653)             (0.5623,    0.0438, 0.3939)            (0.5802,     0.0000, 0.4198)                                 };          \addplot3 [black,dashed] coordinates {                    (0.2776,0.7224,       0.0000)             (0.3032,0.6271, 0.0697)            (0.3274, 0.5381, 0.1345)            (0.3514, 0.4540, 0.1946)            (0.3756, 0.3746, 0.2498)            (0.3997, 0.3002, 0.3002)            (0.4234, 0.2306, 0.3460)            (0.4466, 0.1660, 0.3874)            (0.4689, 0.1062, 0.4249)            (0.4902, 0.0510, 0.4588)            (0.5105, 0.0000, 0.4895)                 };                \addplot3 [black,dashed] coordinates {           ( 0.1791, 0.8209, 0.0000)           (0.2072,  0.7135, 0.0793)          (0.2319,   0.6145, 0.1536)          (0.2559,   0.5209, 0.2232)          (0.2801,   0.4319, 0.2880)          (0.3044,   0.3478, 0.3478)          (0.3287,   0.2685, 0.4028)          (0.3529,   0.1941, 0.4530)          (0.3766,   0.1247, 0.4987)          (0.3996,   0.0600, 0.5404)          (0.4218,   0.0000, 0.5782)               };                 \addplot3 [black,dashed] coordinates {              (0.0861,   0.9139, 0.0000)             (0.1072 ,        0.8035,    0.0893)             (0.1259,    0.6993, 0.1748)             (0.1442,    0.5991, 0.2567)            (0.1632,     0.5021, 0.3347)            (0.1831,     0.4085, 0.4085)            (0.2039,     0.3184, 0.4777)            (0.2254,     0.2324, 0.5422)            (0.2474,     0.1505, 0.6021)            (0.2695,     0.0730, 0.6575)           (0.2916,            0.0000,   0.7084)                            };     \node at (zticklabel cs:0.5) [anchor=north] {$X_{C}$ $\rightarrow$ };     \end{ternaryaxis}       \end{tikzpicture}     \caption{Isoplot of B in B-C-A system at T3.}     \label{fig:a:second}     \end{subfigure}          \begin{subfigure}{\columnwidth}\centering       \begin{tikzpicture}         \begin{ternaryaxis}[                ternary limits relative=false,                width=5.6cm,                height=5.6cm,                ymax=1.0,                no markers,                clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=B,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=A,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=C,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },         ]     \addplot3 [black,dashed] coordinates {           (0.8993,  0.1007, 0.0000)           (0.8962, 0.0934,  0.0104)           (0.8926,  0.0859, 0.0215)           (0.8886,  0.0780, 0.0334)           (0.8843,  0.0694, 0.0463)           (0.8801,  0.0600, 0.0600)          (0.8760,   0.0496, 0.0744)          (0.8725,   0.0383, 0.0893)          (0.8697,   0.0261, 0.1042)          (0.8677,   0.0132, 0.1191)          (0.8665,    0.0000, 0.1335)         };          \addplot3 [black,dashed] coordinates {                (0.7972,   0.2028, 0.0000)              (0.7899,   0.1891, 0.0210)              (0.7832,   0.1734, 0.0434)              (0.7780,   0.1554, 0.0666)              (0.7745,   0.1353, 0.0902)               (0.7730,  0.1135, 0.1135)               (0.7732,  0.0907, 0.1361)               (0.7749,  0.0675, 0.1576)               (0.7777,  0.0445, 0.1778)               (0.7813,  0.0219, 0.1968)               (0.7855,  0.0000, 0.2145)        };          \addplot3 [black,dashed] coordinates {                (0.6939,   0.3061, 0.0000)              (0.6857,   0.2829, 0.0314)              (0.6808,   0.2554, 0.0638)              (0.6795,   0.2244, 0.0962)              (0.6812,   0.1913, 0.1275)              (0.6852,   0.1574, 0.1574)              (0.6909,   0.1236, 0.1855)              (0.6978,   0.0907, 0.2115)              (0.7053,   0.0589, 0.2358)              (0.7133,   0.0287, 0.2580)              (0.7214,   0.0000, 0.2786)         };          \addplot3 [black,dashed] coordinates {                (0.5898,   0.4102, 0.0000)              (0.5847,   0.3738, 0.0415)              (0.5849,   0.3321, 0.0830)              (0.5892,   0.2876, 0.1232)               (0.5964,  0.2422, 0.1614)               (0.6056,  0.1972, 0.1972)               (0.6161,  0.1536, 0.2303)               (0.6272,  0.1118, 0.2610)                (0.6386, 0.0723, 0.2891)                (0.6500, 0.0350, 0.3150)                (0.6613, 0.0000, 0.3387)         };          \addplot3 [black,dashed] coordinates {              (0.4854, 0.5146, 0.0000)           (0.4867,  0.4620, 0.0513)               (0.4931, 0.4055, 0.1014)           (0.5028,  0.3480, 0.1492)           (0.5149,  0.2911, 0.1940)           (0.5283,  0.2359, 0.2359)           (0.5426,  0.1830, 0.2744)           (0.5572,  0.1328, 0.3100)           (0.5719,  0.0856, 0.3425)          (0.5863,   0.0414, 0.3723)           (0.6003,  0.0000, 0.3997)       };          \addplot3 [black,dashed] coordinates {               (0.3817, 0.6183,       0.0000)           (0.3907,  0.5484, 0.0609)         (0.4027,    0.4778, 0.1195)          (0.4168,   0.4082, 0.1750)           (0.4325,  0.3405, 0.2270)          (0.4492,   0.2754, 0.2754)          (0.4665,   0.2134, 0.3201)         (0.4839,    0.1548, 0.3613)         (0.5011,    0.0998, 0.3991)         (0.5181,    0.0482, 0.4337)         (0.5345,    0.0000, 0.4655)      };           \addplot3 [black,dashed] coordinates {            (0.2799, 0.7201, 0.0000)            (0.2954, 0.6341, 0.0705)            (0.3113, 0.5510, 0.1377)            (0.3281, 0.4703, 0.2016)            (0.3460, 0.3924, 0.2616)            (0.3645, 0.3178, 0.3178)            (0.3836, 0.2466, 0.3698)            (0.4028, 0.1792, 0.4180)            (0.4220, 0.1156, 0.4624)            (0.4408, 0.0559, 0.5033)            (0.4593, 0.0000, 0.5407)     };            \addplot3 [black,dashed] coordinates {           (0.1814,  0.8186, 0.0000)           (0.1996,  0.7204, 0.0800)           (0.2163,  0.6270, 0.1567)           (0.2332,  0.5368, 0.2300)           (0.2508,  0.4495, 0.2997)           (0.2691,  0.3655, 0.3655)           (0.2881,  0.2848, 0.4271)           (0.3076,  0.2077, 0.4847)           (0.3273,  0.1345, 0.5382)           (0.3470,  0.0653, 0.5877)           (0.3666,  0.0000, 0.6334)     };          \addplot3 [black,dashed] coordinates {             (0.0877,  0.9123, 0.0000)           (0.1017,  0.8085, 0.0898)           (0.1143,  0.7086, 0.1771)           (0.1269,  0.6112, 0.2619)           (0.1401,  0.5159, 0.3440)           (0.1543,  0.4229, 0.4229)           (0.1694,  0.3322, 0.4984)           (0.1855,  0.2444, 0.5702)            (0.2024, 0.1595, 0.6381)            (0.2200, 0.0780, 0.7020)            (0.2379, 0.0000, 0.7621)      };     \node at (zticklabel cs:0.5) [anchor=north] {$X_{C}$ $\rightarrow$ };       \end{ternaryaxis}     \end{tikzpicture}     %%%%%\label  {X$_{C}$}     \caption{Isoplot of B in B-C-A system at T4.}     \label{fig:d:first}     \end{subfigure}     %\caption{Isoplot curves}%     \end{figure}     \end{document}


% gettingstarted.tex     \hoffset=-72.27pt     \voffset=-72.27pt     \hsize=72.27pt     \vsize=72.27pt     \special{papersize=\the\hsize,\the\vsize}          \parindent=0pt     \nopagenumbers          \input pstricks          \def\tiny{\fontsize{10pt}{12pt}\selectfont}          \pspicture(\hsize,\vsize)     \psframe(\hsize,\vsize)     \rput{45}(0.5\hsize,0.5\vsize){\bf\tiny xport}     \endpspicture          \bye      How to define font size in plain TeX such that it works as font size defined in article?


title: Change lineno's number format for section headings (bold font)

text: This is a follow-up to the question Change from old style numbers to lining numbers in lineno's linenumbers environment I've discovered that the suggestion given there doesn't target the line number that gets printed in the margin next to section headings. They are still being printed with old style numbers. How can I make these appear as lining numbers as well?               \documentclass{article}     \usepackage{lipsum,fontspec,lineno}         \setmainfont[Numbers=OldStyle]{Linux Libertine O}         \renewcommand\linenumberfont{\scriptsize\addfontfeatures{Numbers=Lining}}          \begin{document}         \begin{linenumbers}             \section{My first section}                 \lipsum[1]             \section{My second section}                 \lipsum[2]         \end{linenumbers}     \end{document}      ![enter image description here](http://i.stack.imgur.com/V3Me7.png)


title: Representation of complex number with exponents with siunitx (workaround)?

text: It looks like `siunitx` (by @Joseph Wright) has a limitation regarding complex numbers with exponents:               \documentclass[]{article}     \usepackage[]{siunitx}     \begin{document}     \num{1 + 2 i}\\ %ok, complex number     \num{2e6}\\ %ok, number with exponent     \num{1 + 2e6 i}\\ %not ok, ! siunitx error: "invalid-token-in-exponent"     \end{document}      **Is there a workaround for this?** The only way I found is               \num[parse-numbers=false]{1 + (\num[parse-numbers=true]{2e6}) i + 1}      which defeats the purpose. (I am using `siunitx` version 2.5c.) Note that `siunitx` can handle exponents in complex number, but in the case that the exponent is the same for both parts, for example `\num{1+2i e10}`, which is a different case.


title: Change the orientation of Arrow of xtwocell in the 2cell option for xy

text: I'm trying to make a diagram similar to this (from wikipedia) ![Kan extension diagram](http://upload.wikimedia.org/wikipedia/commons/c/cb/Right_Kan_Extension.png) Except that I want to the double arrow $\eta$ two be pointing from node $B$ toward the middle of arrow $X$ (it is, after all, a natural transformation from $RF$ to $X$). I'm trying to use the `\xtwocell` command of the 2cell package for xy. In subsection 3 (Excursions) of section 25.4 (extra options) of chapter 25 (two- cell) on page 47 of the xyrefer manual, it is stated > `\xtwocell[⟨hop⟩]{⟨displace⟩}...` connects to the ⟨pos⟩ displaced by > ⟨displace⟩ from the relative cell location specified by ⟨hop⟩. The > displacement can be any string of valid XY-pic commands, but they must be > enclosed within a group {...}. When the cell location is the target, a null > grouping {} must be given. When used with the <\omit> nudge, such excursions > allow a labelled Arrow to be placed anywhere within an XY-pic diagram; > furthermore the Arrow can be oriented to point in any direction. Of course the manual gives no examples and makes no further comment about how to change the orientation of the Arrow (in this manual, capitalized "Arrow" refers to the double arrow between arrows, i.e. the 2-cell). What does he mean by "any string of valid XY-pic commands"? What may the displacement argument for `\xtwocell` be? Any experiments I tried (eg <1>,dr,[0,1]) typing in the curly braces just ended up in the $A$ node text, so not being interpreted as a displacement or position or orientation. How do I change the orientation of the Arrow? How do I achieve the "orientation in any direction" that was promised me? Here is my simple markup               \xymatrix{     A\ar[d]\ar[r]\xtwocell[0,1]{}\omit{<2>} & B\\     C\ar@{.>}[ur] &     }      which gives the following image ![bad diagram](http://i.imgur.com/yDpZ2Vd.png) I want to change the direction that double arrow is pointing, point it to the corner object $C$, or reverse it. I can shift it by changing the number in `\omit{<2>}`, but how to change the orientation? (Google showed me that the same question is asked here on the xy mailing list, but never answered) See also my question at Label the source/target object in the middle of compositemaps from 2cell package of xy? for another attempted method at this diagram.


title: IEEEtran and subfig - figures overflow onto second column

text: \documentclass[final,journal,letterpaper,twocolumn]{IEEEtran}     \usepackage[demo]{graphicx}     \usepackage[caption=false,font=footnotesize]{subfig}     \usepackage{fixltx2e}          \begin{document}     \section{Introduction}          some moo text     \\     \begin{figure}       \subfloat[]{\label{subfig:a} \includegraphics[height=6cm]{test.png}}% < shame we need to force the linebreak       \subfloat[]{\label{subfig:b} \includegraphics[height=6cm]{test.png}}     \end{figure}          \newpage          more moo text          \end{document}      I start with my MWE because I think if this is compiled and run it is easier to see the problem. Basically, the figure overflows onto the second column. I can fix this by forcing a line break - but should I have to? Can I get this to behave appropriately by some other means? P.S to run the MWE just create a small png file called test.png with a filled colour. I wasn't sure of other means to demonstrate the problem.


title: anchor arrow start position

text: Attached below is the minimum working example. I would like the arrow to end at the west anchor of the node "operation". I tried anchor and few other possibilities but they don't seem to affect the edge position.               \documentclass{article}       \usepackage{tikz}       \usetikzlibrary{shapes,positioning}       \begin{document}         \tikzstyle{data}=[circle,shade,fill=blue!60, draw]     \tikzstyle{operator}=[shape=rectangle, rounded corners, fill=cyan, draw=cyan]             \begin{tikzpicture}     \node[data] (uncurated) {content};       \path node[operator] (schematize) [below = of uncurated.south]{operation}     edge[<-,thick]  node[auto]{\tiny flow} (uncurated.south);       \end{tikzpicture}       \end{document}      ![output](http://i.stack.imgur.com/gk1MB.png)


title: Beamer table of contents custom bullets: Long section titles do not align

text: I have redefined the table of contents bullets in my slides to a circled number. However, long section titles which span more than one line do not align with the text from the previous line but with the section number. How can I fix this? Minimal working example               \documentclass{beamer}          \usepackage{tikz}     \newcommand*\circled[1]{\tikz[baseline=(char.base)]{                 \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}          \setbeamertemplate{section in toc}{         \protect\usebeamercolor[fg]{enumerate item}%         \protect\circled{\inserttocsectionnumber}~\inserttocsection%     }          \begin{document}          \section{some really long title some really long title some really long title              some really long title}          \begin{frame}{Contents}         \tableofcontents[currentsection,hideallsubsections,subsubsectionstyle=hide]     \end{frame}          \end{document}


title: Label counter in loop

text: I want to label my figures like this:               \label{fig:scatterysX}      Where is x a number which changes to some kind of step counter (numeric). I tried `\newcounter{foo}`, `\stepcounter{foo}` in the loop, and `\value{foo}` on x but this doesn't seem to work. Please provide a working example.


title: natbib and abbrvnat: Reference per order of appearance

text: I am using the package `natbib` with `\bibliographystyle{abbrvnat}` which produces almost exactly what I want (I can switch by between `\cite` , `\citet` ...etc), however, I am facing the following two problems:   1. References are not appearing in order of appearance. I can use `\bibliographystyle{unsrtnat}` but then, references will show the complet first and last name, which I don't want.   2. References are shown in the format : L1. FamilyName1, L2. FamilyName2. Reference Tile. Journal Name, year. which I want to switch, so instead, I want to get: FamilyName1.L1 , FamilyName2.L2 . Reference Tile. Journal Name, year. Does anyone have an idea?


title: remove space between paper title and abstract in AAAI

text: I want to remove the space between the title and abstract (marked as red box in the following pic) to save some space for my paper, I've seen some similar questions and people suggest using /vspace, I wonder is there a cleaner solution to this?![enter image description here](http://i.stack.imgur.com/jhZyv.png) and here is what I've got so far               \documentclass[letterpaper]{article}     \usepackage{aaai}     \usepackage{times}     \usepackage{helvet}     \usepackage{courier}     \frenchspacing     \setlength{\pdfpagewidth}{8.5in}     \setlength{\pdfpageheight}{11in}     \pdfinfo{     /Title (Insert Your Title Here)     /Author (Put All Your Authors Here, Separated by Commas)}     \setcounter{secnumdepth}{0}        \begin{document}     \title{Formatting Instructions for Authors Using \LaTeX{}}     \maketitle     \begin{abstract}     \begin{quote}     AAAI creates ...     \end{quote}     \end{abstract}          \noindent Congratulations...     \vfill     \break          \section{Copyright}     All papers submitted for publicatio          \end{document}


title: Drawing quadrilateral in TikZ

text: Using TikZ package, is there an easy way to generate the following diagram given in the link below? http://mathworld.wolfram.com/vanAubelsTheorem.html I tried using `\draw` command to draw individual lines, but it becomes really painful to make things align. Could someone show me an elegant way?


title: Where is the documentation for the nth package

text: The ctan entry has no documentation and `texdoc nth` does not find an entry. Any idea where to find documentation for the package options?


title: Multi-page one-column abstract in a two-column document

text: I'm making a two-column document, but I need a one-column abstract. The code:               \twocolumn[     \begin{@twocolumnfalse}     \maketitle     \begin{abstract}     ...     \end{abstract}     \end{@twocolumnfalse}     ]      doesn't work, because the abstract is longer enough to use two pages and page don't break. I also tried making a one-column document and used the multicol environment only for the document "text" (not the abstract), but then i had problems with the figure environment. So, how can I make a one-column abstract?


title: How to change the font for metauml?

text: I am using the `emp` package in order to use `metauml` for drawing UML-models. So far so good. this is a minimal example:               \documentclass{scrartcl}          \usepackage{emp}          \ifx\pdftexversion\undefined     \usepackage[dvips]{graphicx}     \else     \usepackage[pdftex]{graphicx}     \DeclareGraphicsRule{*}{mps}{*}{}     \fi          \begin{document}     \begin{empfile}     \begin{empcmds}     input metauml;     \end{empcmds}          \begin{figure}     \centering     \begin{emp}[classdiag](20, 20)     Class.A("A")()();     Class.B("B")()();     B.e = A.w + (-20, 0);     drawObjects(A, B);     link(inheritance)(B.e -- A.w);     \end{emp}     \caption{A class diagram}     \end{figure}          \end{empfile}     \end{document}      It looks like the text in the graph is using Time New Roman. How can I change the font to something else? I already tried something like `\empaddtoTeX{\usepackage[default]{lato}}` but it didn't change anything.


title: Resetting column-formatted margins after \printindex

text: When I make an index, or two, and print them at the end of a document, they show up in columns, just I would like. However, when adding further sections after the printed index, they continue formatting under the two-column format. How can I reset the margins and layot settings to normal?


title: Bibliography : avoid extra spaces (justification) for a single item

text: I've been creating my bibliography in the usual way :               \nocite*     \bibliographystyle{plain}      \bibliography{books}       `books` being the `.bib` file. How could I avoid something like in this example for 1: ![enter image description here](http://i.stack.imgur.com/cj05D.png) I've paid attention to other similar issues in there but something like `\raggedright` doesn't satisfy me. I simply would like no justification for the first entry.


title: Prevent odd break line in pagenotes

text: Using `memoir` class, `pagenotes` package. Here is a screenshot of the problem: ![odd breakline](http://i.stack.imgur.com/hKc6E.png) Number 6 should follow the rest of the text, hence be in the following page. This is the code I'm using:               % Document size      \documentclass[a5paper,11pt,titlepage,openright]{memoir}     \setstocksize{216mm}{154mm}     \settrimmedsize{215mm}{153mm}{*}     \settrims{1mm}{1mm}     \setulmarginsandblock{20mm}{22mm}{*}     \setlrmarginsandblock{22mm}{15mm}{*}     \checkandfixthelayout     \trimLmarks          % Packages     \usepackage[british]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{type1cm}     \usepackage{nameref}     \usepackage{eurosym}     \usepackage{enumerate}     \usepackage{lettrine}     \usepackage{amsmath}     \usepackage{float}     \usepackage{hyperref}     \hypersetup{colorlinks=false,pdfborder=0 0 0}     \usepackage{tikz}     \usepackage{booktabs}     \usepackage{graphicx}     \usepackage{units}     \usepackage{endnotes}     \usepackage{tipa}     \usepackage{longtable}     \usepackage{epigraph}     \usepackage{wasysym}     \usepackage{etoolbox}     \usepackage{stfloats}     \usepackage{caption}[2010/01/03]          % Chapter titles     \usepackage{calc,fourier}     \usepackage[T1]{fontenc}     \makeatletter     \setlength\midchapskip{7pt}     \makechapterstyle{VZ21}{       \renewcommand\chapnamefont{\Large\scshape}       \renewcommand\chapnumfont{\Large\scshape\centering}       \renewcommand\chaptitlefont{\huge\bfseries\centering}       \renewcommand\printchaptertitle[1]{%         \setlength\tabcolsep{7pt}   % used as indentation on both sides         \settowidth\@tempdimc{\chaptitlefont ##1}%         \setlength\@tempdimc{\textwidth-\@tempdimc-2\tabcolsep}%     \chaptitlefont     \ifdim\@tempdimc > 0pt\relax    % one line     \begin{tabular}{c}       \toprule  ##1\\ \bottomrule     \end{tabular}     \else   % two+ lines     \begin{tabular}{         >{\chaptitlefont\arraybackslash}p{\textwidth-2\tabcolsep}}       \toprule ##1\\ \bottomrule         \end{tabular}     \fi }     }     \makeatother     \chapterstyle{VZ21}          % Fix \url width     \renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z}          % Width     \newcolumntype{M}{>{\begin{varwidth}{40mm}}l<{\end{varwidth}}} %M is for Maximal column     \linespread{1.1}          % Fix pagenotes     \let\pagenote=\endnote     \makeatletter     \renewcommand*\prenotetext{%       \list{}{%         \setlength\leftmargin{2.3em}%         \setlength\topsep{-\baselineskip}}       \item}     \renewcommand*\postnotetext{\endlist\bigskip\medskip}     \makeatother          \renewcommand*\idtextinnotes[1]{#1.\vspace*{-\baselineskip}}     \renewcommand*\notenuminnotes[1]{#1.\vspace*{-\baselineskip}}     \makepagenote          \renewcommand\enoteheading{\chapter {\notesname}%       \mbox{}\par\vskip-\baselineskip}     \renewcommand\enoteformat{\noindent\theenmark.\hspace{5pt}}     \renewcommand\notesname{Notes}          % Section title     \setsecheadstyle{\large\uppercase}          \renewcommand*{\pagenotesubhead}[3]{\section*{#1 #2\ --\ #3}}     \renewcommand*{\pagenotesubheadstarred}[3]{\section*{#3}}          \begin{document}          \mainmatter     \pagestyle{headings}               Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}      Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}      Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}      Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}      Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}      Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}}           \printpagenotes*          \backmatter     \clearpage               \end{document}


title: How to use \graphicspath?

text: I am using MikTex 2.9 and TeXstudio for my TeX preparation. I want to give a path to my figures folder containing all the figures, plots etc. required for my work. I used `\graphicspath` to give the direction, I got error, while `\includegraphics` works fine. Why `\graphicspath` gives error.               \documentclass[12pt]{article}          \usepackage{graphicx}          \graphicspath{D:/LATEX/Reports@IIT/figures}          \begin{document}     \includegraphics[width=4.5cm,height=4cm,angle=0]{logo.jpg}          \end{document}      > Error: Package pdftex.def Error: File `logo.jpg' not found               \documentclass[12pt]{article}          \usepackage{graphicx}          \begin{document}          \includegraphics[width=4.5cm,height=4cm,angle=0]{D:/LATEX/Reports@IIT/figures/logo.jpg}          \end{document}      This works fine.


title: How do I use same figure multiple times?

text: Is there a way to use same figure multiple times -- without reinserting it? That is I don't want to pay it's weigth several times in the output pdf file. I remember I saw someone telling `adjustbox` can do it, but I can't find it in its manual.


title: How do I use nameref's label with addcontentsline

text: I am trying to use the `nameref` `\label` functionality alongside the use of `\addcontentsline` that creates invisible sections and subsections that appear in the `\tableofcontents`. The commands can be seen below:               \documentclass{article}          \usepackage{nameref}          \newcommand{\fakesection}[1]{%       \par\refstepcounter{section}% Increase section counter       \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}% Add section to ToC       \label{sec:\thesection}     }     \newcommand{\fakesubsection}[1]{%       \par\refstepcounter{subsection}% Increase subsection counter        \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}% Add subsection to ToC        \label{subsec:\thesubsection}     }     \begin{document}               \fakesection{Fs}     \fakesubsection{s}     \nameref{sec:\thesection}          \end{document}      However, when I try to do this there is no output! Blank page.


title: How can I get proper Matlab syntax when typesetting Matlab source code using the algorithm package?

text: I'm currently using the `algorithm` package for typesetting Matlab source code in my document. However, the way keywords are typeset doesn't match the Matlab syntax. For instance, `\EndFor` is typeset as "end for" instead of "end", which is the terminating keyword of a for loop in Matlab. How can I fix this? I have the following code:               \usepackage{algorithm}      \usepackage{algpseudocode}          \floatname{algorithm}     \begin{algorithm}[H]      \begin{algorithmic}\State     alpha=0;  rho=0;\State     \For {$r=1:p$}\State         rho=rho+1/(r\^{}2);\State         alpha=alpha+1/(r\^{}4);     \EndFor \State     \end{algorithmic}      \end{algorithm}


title: Pgftables: How to automatically add row headers?

text: Here is a MWE:               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}          Here is the multiplication table in roman numeral.           \pgfplotstabletypeset[string type]{       i   ii   iii       ii  iv   vi        iii vi   ix      }          I would love it to include the column headers:     \begin{quote}      1 \quad 2 \quad 3      \end{quote}     and the same row headers.           But, I have no idea how to achieve this efficiently with \verb|pgfplotstable|.     I do not want the solution to rely on the number being consecutive;      ideally, it would take a list such as      \begin{quote}     \begin{verbatim}       \def\ROMANS{I,II,III}     \end{verbatim}     \end{quote}     \end{document}      ![Sample Output](http://i.stack.imgur.com/XKJ0B.jpg)