title: How can you tell whether a given macro is meant to be used in text mode or maths mode?

text: I recently read answer that discouraged the use of `\ensuremath` on the grounds that one should know whether each command is meant to be used in math mode or text mode. Given a command, how can you tell whether it's meant for use in math mode, text mode, or both? (Note that I'm asking for a practical way to tell this for commonly used LaTeX commands, not something that works in general.) Edit: I meant to say, 'other than trial and error'.


title: Wildcard character use in TeXWorks find

text: Is it possible to use wildcard characters in `TeXworks` when you search for something? I can see that there is a "Regular expression" option, but I was thinking along the lines of something more user friendly. My Example where for instance `*` would be the wildcard character: Searching for something like `\setcounter{subsection}{*L1}` would ideally return all of the following from my code using such functions.   * `\setcounter{subsection}{3}\subsection{}\writeVerseParams{40001004}{ypos}{F}{L1}`   * `\setcounter{subsection}{4}\subsection{}\writeVerseParams{40001005}{ypos}{F}{L1}`   * `\setcounter{subsection}{5}\subsection{}\writeVerseParams{40001006}{ypos}{F}{L1}`   * etc...


title: Find optimal kerning for space between inline math and text

text: When I write something like               $\mathrm{C}^*$-algebra      for a C*-algebra, the space between * and - is too large. How do I change this? Are there general criteria on how much such space should be shrinked?


title: I have 3 data series and 2 different y-axis. How can I add, outside the graph, the legend for each of three series?

text: Does someone know how can i change the position of my legend to right-side of my graph? I try many things but i can't. Please give me some help! Here is my code!               \resizebox{\textwidth}{!}{     \begin{minipage}{1.3\textwidth}     \begin{center}     \begin{tikzpicture}          \begin{axis}[ /pgf/number format/.cd, use comma, 1000 sep={}, scale only axis, xmin=2006,xmax=2012, ymin=65, ymax=125, axis y line*=left, xlabel=Year, ylabel=\color{black}$Percentage(\%)$]         \addplot[black] coordinates {         %Government Debt     (2006, 68.3608)     (2007, 68.0186)     (2008, 74.963)     (2009, 89.5022)     (2010, 102.7844)     (2011, 114.9962)     (2012, 121.9426)};     \end{axis}     %     \begin{axis}[ scale only axis, xmin=2006,xmax=2012, ymin=-15, ymax=5, axis y line*=right, axis x line=none, ylabel=\color{blue}$Percentage (\%)$]%     \addlegendimage{/pgfplots/refstyle=Hplot}     \addlegendentry{$Debt$}         \addplot[blue, mark=+] coordinates {         %Total Budget Balance         (2006, -1.5862)     (2007, -1.9186)     (2008, -5.624)     (2009, -9.7638)     (2010, -13.0882)     (2011, -8.0618)     (2012, -6.4806)};     \addlegendentry{$TBB$}     %         \addplot[blue,mark=o] coordinates {     %Real per capita GDP growth rate     (2006, 3.7266)     (2007, 3.3016)     (2008, -0.5192)     (2009, -4.1474)     (2010, -0.4744)     (2011, -1.2876)     (2012, -2.4802)             };     \addlegendentry{$GDPpc GR$}     \end{axis}     \end{tikzpicture}     \end{center}     \end{minipage}}      ![My graph](http://i.stack.imgur.com/Udr6l.png)


title: Repeatedly being stymied by missing packages using Texmaker

text: Ok, so I started using Texmaker to make PDF files, and I am being repeatedly stymied by missing packages. (Windows 7 OS here). Apparently, there is supposed to be a way for them to be downloaded automatically, but this does not seem to be the case for me. I have tried googling around for how to make it automatically add packages but I cannot seem to find anything, and the terminology is very, very confusing. Yes it is using MikTeX. Yes, I am using Texmaker. Currently just adding the {mcode} package has become a full day project. Why is this so hard? How do I go about making Texmaker just download whatever package it needs? ![enter image description here](http://i.stack.imgur.com/RXxlz.png)


title: What is the proper way to ensure/avoid non-break with item and subitem?

text: This is a rather basic question, but I wanted to know what the proper bracketing is or options to protect page breaks between items in 'itemize'. That is, items can be broken across pages but not within the item itself. Please direct me accordingly if this is a duplicate.               \begin{itemize}       \item A       % can page break here       \item B         \subitem Keep this with B on the same page       % can page break here      \item C      \end{itemize}


title: knitr compiling time with large datasets

text: I noticed that with a large dataset `knitr` takes an unexpected long time to compile my document: about 23 minutes from when `knitr` completes the last chunk to when it writes the .tex. I don't understand what it is doing while taking so long because according to the log this long time span occurs between                 |.................................................................| 100%        inline R code fragments      and               output file: mydocument.tex          [1] "mydocument.tex"      without `knitr` echoing anything in the log to give indication of what it is computing. Looking at when the file was last modified, it appears that the cache from the last chunk has not been updated during this long time span. Actually no file in the document folder/sub-folders is modified during this time. What is `knitr` processing just before writing the .tex file? Is there anyway to speed this up through caching? Could help if I set `cache=TRUE` as default?


title: How to specify array row height with slashbox?

text: I'm having issues with `\backslashbox`. As you can see from the picture, it's, for lack of a better word, ugly. I want to make the row height smaller to force the slashbox smaller as well. I tried using `\arraystretch`, but that didn't affect the slashbox. Is there any way I _can_ make it looks nicer while still using `\backslashbox`? Here is a snippet of the code:               \documentclass[11pt]{article}     \usepackage{setspace}     \doublespacing     \usepackage{array}     \usepackage{slashbox}          \begin{document}          \begin{equation}     \mbox D^{\frac 1 2}_{mm^\prime}=\begin{array}{r | r r}     \mbox{\backslashbox{$m$\kern-1em}{\kern-1em$m^{\prime\prime}$}}& \frac 1 2 & -\frac 1 2 \\ \hline     \frac 1 2 & a & b \\     -\frac 1 2 & c & d     \end{array}     \end{equation}          \end{document}      ![enter image description here](http://i.stack.imgur.com/9YHB8.png)


title: Tracing a border formed by circles

text: Suppose I have some code that draws a few circles. These circles overlap each other in such a way that they form one "group" -- there are no groups of circles completely separated from the rest. For instance:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \draw (3,1) circle[radius=1];     \draw (3,2) circle[radius=1.5];     \draw (1,2) circle[radius=0.7];     \draw (0.9,1.2) circle[radius=1.2];     \draw (1,0) circle[radius=0.8];     \end{tikzpicture}     \end{document}      ![circles](http://i.stack.imgur.com/Ldc2y.png) I would like to be able to draw only the "border" formed by these circles, without any of the other lines. It would be like drawing the border of the silhouette formed by all the circles. It would look something like this: ![border](http://i.stack.imgur.com/HCJud.png) Now for that one, I just painted over the lines in Paint.NET with a brush - if you look closely you can see the imperfections. I would prefer to be able to do it in LaTeX directly. I understand that one option would be to manually calculate the position of the arcs and draw them in. However, it would be nice if there was a way for LaTeX to do the calculations for me and draw the border of the circles, without me having to solve a large amount of intersection equations. Is this possible?


title: How to combine and simplify the following PostScript operators?

text: ## Background Let               \def\RR#1{(2^(#1/10))}     \def\TT#1{(#1)}      be the radius and angle functions, respectively. Christoph defined a PS operator `AAA` as follows.               /AAA {AlgParser cvx exec exch AlgParser cvx exec exch RadtoDeg PtoC} def       It can be used to translate               \pscircle*[linecolor=red](!\RR{7*Pi/2} \TT{7*Pi/2} AAA){2pt}      from polar infix to polar postfix. However `7*Pi/2` are repeated, it breaks DRY (Don't Repeat Yourself) principle and cannot make use of `t` as explained shortly below. I modified Herbert's operators as follows               /BBB {/TT ED TT AlgParser cvx /t ED  /RR ED RR AlgParser cvx /r ED r t RadtoDeg PtoC} def     /CCC { AlgParser cvx /t ED  AlgParser cvx exec t RadtoDeg PtoC} def      to allow me to write two styles as follows.               \pscircle*[linecolor=green](!{(2^(t/10))} {(3*Pi/2)} BBB){2pt}     \pscircle*[linecolor=blue](!\RR{t} \TT{5*Pi/2} CCC){2pt}      The first does not make use of `\RR` and `\TT` and the last does make use of `\RR` and `\TT`. ## Complete code               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot}     \pstVerb     {         /AAA {AlgParser cvx exec exch AlgParser cvx exec exch RadtoDeg PtoC} def          /BBB {/TT ED TT AlgParser cvx /t ED  /RR ED RR AlgParser cvx /r ED r t RadtoDeg PtoC} def         /CCC { AlgParser cvx /t ED  AlgParser cvx exec t RadtoDeg PtoC} def     }               \def\RR#1{(2^(#1/10))}     \def\TT#1{(#1)}          \begin{document}     \begin{pspicture}[showgrid](-3,-3)(3,3)       \psplot[algebraic,polarplot]{TwoPi}{TwoPi 2 mul}{\RR{x}}         \pscircle*[linecolor=red](!\RR{7*Pi/2} \TT{7*Pi/2} AAA){2pt}         \pscircle*[linecolor=green](!{(2^(t/10))} {(3*Pi/2)} BBB){2pt}         \pscircle*[linecolor=blue](!\RR{t} \TT{5*Pi/2} CCC){2pt}     \end{pspicture}          \end{document}      ## Question Can I combine `BBB` and `CCC` to create `DDD` as simple as `AAA` but they must still work for the following?               \pscircle*[linecolor=green](!{(2^(t/10))} {(3*Pi/2)} DDD){2pt}     \pscircle*[linecolor=blue](!\RR{t} \TT{5*Pi/2} DDD){2pt}      Bonus question: I still don't understand why Herbert used only one `exec` while Christoph used 2 `exec`s? What does `exec` do actually?


title: How do I avoid clashes with macro names in packages?

text: This is a follow-up to this question on contributing to CTAN, but it applies to the situation when writing ones own package for private use. In brief, the question is: > Is there a way to avoid name-clashes with defining macros? In a bit more detail, I know that `\newcommand` checks this, but I find that I need the flexibility of `\def`. Also, I tend to define a lot of _internal_ commands that then get used in various ways in the ones that the user actually uses and I suspect that many others do the same. It's a lot harder to go through every package and check that every command is "clean", especially since many will be defined via the `\csname` construction. On the other hand, because most of the commands are internal, I'd be quite happy to simply add a unique prefix to each of them to avoid such a conflict. For example, at the moment all my internal commands are prefixed `\my@` and external ones `\my` (with the exception of one package that was written specifically for one paper which gets `\hopf@` and `\hopf` respectively). So, expanding on my question above: >   1. Is there a convention on CTAN to avoid conflicting names? >   2. Is there an automatic way to avoid conflicts when loading a package? > (I should confess that I strongly doubt that there is a positive answer to the second question since so many packages rely on being able to redefine macros defined by other packages; still, the programmers seem to be able to cope with this so I do wonder if TeXperts can as well.)


title: How to change subsection title within a frame through overlay in beamer?

text: On a given `beamer` slide with three bullet points that are uncovered sequentially, I want the subsection title to alternate with every new bullet that shows up.               \uncover<1>{\subsection{Subsection title A}}     \uncover<2>{\subsection{Subsection title B}}     \uncover<3>{\subsection{Subsection title C}}     \begin{frame}     \begin{itemize}     \item<1>Bullet A     \item<2>Bullet B     \item<3>Bullet C     \end{itemize}     \end{frame}      I already tried several variations of `\uncover`, like `\only`, `\onslide`, `\visible`.


title: problem with chemical structure numbering

text: I would like to have a numbering of chemistry related structures to appear like this. Compound 1a and 1b are useful, whereas compound 1c and 2a are harmful. I would not like to generate the references myself. I can generate the image is in `png / jpg / bmp/ gif / tif / emf / svg` format not in `eps` format.               Compound    R1  R2     Toluene, 1a CH3 H     Ethyl benzene, 1b   C2H5    H     Chlorobenzene, 1c   Cl  H     o-chlorotoluene, 2a CH3 Cl      The modified question is "The question is how can i label 1a, 1b, 1c and 2a in the running matter. And how can i insert the reference where ever i wish." See the included pdf image! ![enter image description here](http://i.stack.imgur.com/hDD7E.png)


title: What's the better way to include a Tikz sheme into a beamer presentation

text: I have this Tikz schem ![enter image description here](http://i.stack.imgur.com/tYxx8.png) Code               \documentclass[border=10pt]{standalone}     %\usepackage[margin=1cm]{geometry}     \usepackage{tikz,xcolor}     \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,}     \tikzset{     b/.style={draw, rectangle, rounded corners=2ex,minimum height=0.5in, minimum width=2in,align=center},     c/.style={draw, rectangle, rounded corners=2ex, minimum height=0.5in, minimum  width=2in,align=center, rotate=-90},     ar/.style={rounded corners=2ex,->,>=latex },       myarrow/.style args={#1 colored by #2 and #3}{         -stealth,line width=#1,#2,postaction={draw,-stealth,#3,line width=(#1)/3,         shorten <=(#1)/3,shorten >=2*(#1)/3},        }     }          \begin{document}     \begin{tikzpicture}          \node (block1) [b] {Application InOut};         \node (block2) [b,below= 4cm of block1] {Logical de calcul \\ d'indicateurs};         \node (block3)[c, right=2cm of block1]  {API Java \\ \color{red} (requetes, recuperation \\ \color{red}desresulats)};     % connections within block A     \draw[ar] ([xshift=-1cm]block1.south) --++ (0,-2cm) -- ++(0.5,0) -- ([xshift=-0.5cm]block2.north);     \draw[ar] ([xshift= 1cm]block1.south) |- ([yshift=1cm]block3.south);     \draw[ar] ([yshift=-1cm]block3.south) -| (block1.south);     \node (block4) [c,right=9cm of block1] {Services Web \\ \color{red} (REST)};     \node (block5) [c, right= 11cm of block1] {MicMac \\ \color{red} (simulation)};     % connections within block B     \draw[ar] ([yshift=0.5cm]block4.north)  -- ([yshift=0.5cm]block5.south);     \draw[ar] ([yshift=-0.5cm]block5.south) -- ([yshift=-0.5cm]block4.north);     % connection between blocks A and B     \draw[ar] ([yshift=0.5cm]block3.north)  -- node[above]{\parbox[t]{3cm}{- Choix du scenario\\     - Fichiers meteo}} ([yshift=0.5cm]block4.south);     \draw[ar] ([yshift=-0.5cm]block4.south) --node[below]{\parbox[t]{3cm}{- Apport d'zaote \\     - Apport de pesticide}} ([yshift=-0.5cm]block3.north);     \node(n1)[draw,fill opacity=0.2,fill=blue, fit=(block1)(block2)(block3),inner sep=3em,     label={[inner sep=0pt,yshift=-0.5cm]above:MEANS}     ]{};     \node(n2)[draw,fill opacity=0.2,fill=blue, fit=(block4)(block5),inner sep=3em,     label={[inner sep=0pt,yshift=-0.5cm]above:RECORD}     ]{};     \draw[myarrow=10pt colored by blue!50!white and white] (block2.south) --node[right,xshift= 0.2cm](){\color{red} (Indicateurs)} ++(0,-1.5cm);     \end{tikzpicture}     \end{document}      Now I wan't to include into a beamer frame so I do like that :               \documentclass[hyperref={pdfpagemode=FullScreen, colorlinks=true}, xcolor={dvipsnames, svgnames, table}]{beamer}          \usefonttheme{professionalfonts} % using non standard fonts for beamer     %\usefonttheme{serif} % default family is serif     %\usepackage{fontspec}     %\setmainfont{Liberation Serif}          \usepackage[utf8]{inputenc}     \usepackage{default}     %\usepackage{xcolor}          \usepackage{tikz}     \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,}     \tikzset{     b/.style={draw, rectangle, rounded corners=2ex,minimum height=0.5in, minimum width=2in,align=center},     c/.style={draw, rectangle, rounded corners=2ex, minimum height=0.5in, minimum  width=2in,align=center, rotate=-90},     ar/.style={rounded corners=2ex,->,>=latex },       myarrow/.style args={#1 colored by #2 and #3}{         -stealth,line width=#1,#2,postaction={draw,-stealth,#3,line width=(#1)/3,         shorten <=(#1)/3,shorten >=2*(#1)/3},        }     }               %\usepackage{concrete}     \usetheme{Goettingen}     %\usetheme{Hannover}     \usepackage[frenchb]{babel}     \author{Author}     \title{Project}     \date{22 avril 2014}     \institute{Institute}     \begin{document}     \begin{frame}     \frametitle{Schéma}     \resizebox{10cm}{!}{%     \begin{tikzpicture}          \node (block1) [b] {Application InOut};         \node (block2) [b,below= 4cm of block1] {Logical de calcul \\ d'indicateurs};         \node (block3)[c, right=2cm of block1]  {API Java \\ \color{red} (requêtes, récupération \\ \color{red}des résultats)};     % connections within block A     \draw[ar] ([xshift=-1cm]block1.south) --++ (0,-2cm) -- ++(0.5,0) -- ([xshift=-0.5cm]block2.north);     \draw[ar] ([xshift= 1cm]block1.south) |- ([yshift=1cm]block3.south);     \draw[ar] ([yshift=-1cm]block3.south) -| (block1.south);     \node (block4) [c,right=10cm of block1] {Services Web \\ \color{red} (REST)};     \node (block5) [c, right= 12cm of block1] {MicMac \\ \color{red} (simulation)};     % connections within block B     \draw[ar] ([yshift=0.5cm]block4.north)  -- ([yshift=0.5cm]block5.south);     \draw[ar] ([yshift=-0.5cm]block5.south) -- ([yshift=-0.5cm]block4.north);     % connection between blocks A and B     \draw[ar] ([yshift=0.5cm]block3.north)  -- node[above]{\parbox[t]{4cm}{\begin{itemize}                                                                             \item[-] Choix du scénario                                                                             \item[-] Fichiers météo                                                                             \item[-] Valeurs d'autres paramètres à définir                                                                            \end{itemize} }} ([yshift=0.5cm]block4.south);     \draw[ar] ([yshift=-0.5cm]block4.south) --node[below]{\parbox[t]{4cm}{\begin{itemize}                                                                            \item[-] Apport d'azote                                                                            \item[-] Apport de pesticide                                                                            \item[-] Apport d'eau                                                                            \item[-] Rendement                                                                            \item[-] D'autres résultats selon les besoins de MEANS                                                                           \end{itemize} }} ([yshift=-0.5cm]block3.north);     \node(n1)[draw,fill opacity=0.2,fill=blue, fit=(block1)(block2)(block3),inner sep=3em,     label={[inner sep=0pt,yshift=-0.5cm]above:MEANS}     ]{};     \node(n2)[draw,fill opacity=0.2,fill=blue, fit=(block4)(block5),inner sep=3em,     label={[inner sep=0pt,yshift=-0.5cm]above:RECORD}     ]{};          \draw[myarrow=10pt colored by blue!50!white and white] (block2.south) --node[right,xshift= 0.2cm](){\color{red} (Indicateurs)} ++(0,-1.5cm);     \end{tikzpicture}     } %     \end{frame}          \end{document}       I get this result : ![enter image description here](http://i.stack.imgur.com/R232g.png) As you can see the result is not the same. Can someone could help me to solve this?


title: PgfplotsTable: How to merge cell contents of two tables to one table?

text: I have two tables (sorry, inline tables are not working with `pgfplotstable` 2011/12/19 on my system, even with the option format=inline):   1. Data table (data.csv): > X,A,B   >  U,1.1,1.2   >  V,2.1,2.2   2. References table (references.csv): > X,A,B   >  U,ref1,ref2   >  V,ref2,ref1 I want to read both tables with PgfplotsTable and create a new table with `{cell content}={cell content of data.csv}\citep{cell content of references.csv}`. I tried to do this with pgfkeys in the preprocessing step, but was not able to get it working this way. Obviously the macro `\ori` does not get expanded in the argument of `\pgfkeyssetvalue`. Therefore I tried to expand only the second argument of `\pgfkeyssetvalue` using `\exp_args:Nnx` from package `expl3`:               \documentclass{article}     \usepackage[numbers]{natbib}     \usepackage{pgfplotstable}     \usepackage{ifthen}     \usepackage{expl3}     %     \begin{document}         \pgfplotstableread[col sep=comma, trim cells=true]{data.csv}\data         \pgfplotstableread[col sep=comma, trim cells=true, header=false]{references.csv}\references         \pgfplotstabletypeset[             string type,             preproc cell content/.append code={%                 \pgfmathtruncatemacro{\col}{\pgfplotstablecol-1}                 \ifthenelse{\col>0}{                     \pgfmathtruncatemacro{\row}{\pgfplotstablerow+1}                     \pgfplotstablegetelem{\row}{\col}\of{\references}                     \pgfkeysgetvalue{/pgfplots/table/@cell content}{\ori}                     \expandafter\def\expandafter\ori\expandafter{\ori\citep{\pgfplotsretval}}                     \ExplSyntaxOn                     \exp_args:Nnx \pgfkeyssetvalue {/pgfplots/table/@cell content} {\ori}                     \ExplSyntaxOff                 }{}             },         ]\data         \begin{thebibliography}{9}             \bibitem{ref1} ref1              \bibitem{ref2} ref2          \end{thebibliography}     \end{document}      With this code I obtain the following errors (just one example here):               ! Undefined control sequence.     \pgfplotstable@result ...ular}{ccc}X&A&B \\U&\ori                                                        &\ori \\V&\ori &\ori \\\en...     l.24    ]\data          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      What I'm doing wrong and how is the best way to do such a table operation?


title: Gill Sans - possible to use on Linux with pdflatex?

text: There are numerous old posts whose topic relates to using the font Gill Sans in LaTeX documents. The most notable are perhaps this post from 2007 and this one from 2010. The former gives a solution for XeLaTeX, which I don't particularly feel inclined to convert to, and the latter gives a solution which involves using otfinst to package OpenType fonts from the Arkandis Digital Foundry (ADF), a more attractive solution. However, I note that -- in Britain, at least -- the font was released into the public domain in 2011. I was wondering, therefore, if a package now existed for it so I could use it in standard LaTeX documents. If not, what is the best way for me to go about creating such a package, so that both myself and others can use it?.


title: Reference style in between author-year and numbers and its LaTeX implementation

text: I am at a technical university where there are no templates and rules for writing a dissertation, especially not regarding the bibliography style. My supervisor prefers the author-year style, as it is a case with most publications in my field. After all, being in a small field with not so many researchers and papers, the paper behind a reference in the text such as "Smith et al. (2004)" is immediately obvious to a reader without checking the list in the back matter. However, for aesthetic and other reasons like my research being close to computer science, I prefer the numerical style which my supervisor does not approve. Hence, I am looking for a compromise in between the two. Does anyone have a recommendation for a style which would be in between, and its LaTeX/BibTeX implementation? My idea was to use something like: In their research, Smith et al. [4-6] show that... or: In their 2004 paper [4], Smith et al. show... I have seen also the footnote style, as a fusion between the two styles, but having >300 references would result in too much space used for the footnote area.


title: Font package needed for PDF built using TEX?

text: This question might sound stupid (I am not a CS major). I built my grad school application resume using Latex (based on a CS grad suggestion :) ) and successfully generated the required PDF. I understand that Computer modern font is the default font but I used the **\usepackage[font]** option to use _New Century Schoolbook_ with a little help from here: http://www.rpi.edu/dept/arc/training/latex/resumes/ It says there that to use New Century Schoolbook , you need to have it in your system. So my question is this: **if someone reads my PDF in a system that doesnt support New Century Schoolbook, will they face issues reading it?** Or is the fact that ' you need to have font installed in your system' ( as given in the site above) apply only to TEX file and not the PDF file? Or do I have it wrong and New Century Schoolbook is as common as Times New Roman or Arial?


title: Adding a document number as a first line in \documentclass{article}

text: I would like to add a document name in a small font, as a very first line of the title page inside the article environment, something like: * * * > >     review of project number: 1234 >   >                                     Title >                                    Author >


title: TikZ library for Computer Science

text: Is there a Computer Science library for TikZ? I am looking for a library for drawing standard data structures (array, linked list, stack, queue, pointers, trees, etc) in a consistent way. I would also be happy to hear how hard would it be to create such a library for an intermediate LaTeX user (understands some macros, can't write macros independently) in terms of work-days.


title: Include subfigures in poster

text: I am trying to write a poster for a conference presentation, so far everything works fine except for 2 figures that I want to include (both should be on the same row with one common caption). I keep getting errors for some reason.The Packages that I am using are:               \usepackage{palatino}     \usepackage[latin1]{inputenc}     \usepackage{epsf}     \usepackage{graphicx,psfrag,color,pstcol,pst-grad}     \usepackage{amsmath,amssymb}     \usepackage{latexsym}     \usepackage{calc}     \usepackage{multicol}       \usepackage{amsmath,amsfonts,latexsym,amssymb,enumerate,amsthm,array,bm,amscd,overcite,psfrag,epsfig}     \usepackage{capt-of}     \usepackage{subfig}      I have tried using:               \begin{center}          \mbox{\subfigure%[Feasible Case \label{fig:Feas_Case}]     {\includegraphics[scale=0.4]{FeasibleCase.eps} }\qquad     \subfigure%[Infeasible Case \label{fig:Infeas_Case}]     {\includegraphics[scale=0.4]{InfeasibleCase.eps} }     }     \captionof{figure}{My Feas-inf figures}      \label{fig:Feas_Infeas}          \end{center}      But I keep getting these errors:               ! Undefined control sequence.     <argument> \subfigure     {\includegraphics [scale=0.4]{FeasibleCase.eps} }\qqua...     l.593 }     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     File: FeasibleCase.eps Graphic file (type eps)     <FeasibleCase.eps>     ! Undefined control sequence.     <argument> ...easibleCase.eps} }\qquad \subfigure     {\includegraphics [scale=0...     l.593 }     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     File: InfeasibleCase.eps Graphic file (type eps)     <InfeasibleCase.eps>      I am not sure what to do to fix this. Any idea? (I have also tried using the package \usepackage{subfigure} instead of \usepackage{subfig}, and that gives me even more errors.)


title: Code folding in LaTeX

text: The editor that I use, Texmaker, provides code folding only for things in the language, like `\section` and `\begin{foo} ... \end{foo}`. I would like to be able to make my own folding sections, like in Visual C++ where I can write `#pragma region foo ... #pragma endregion`. Specifically, the first thing that I want to hide in any code is the includes at the beginning, in the case of LaTeX, the `\usepackage{}` commands. I had the idea of making a custom environment:               \newenvironment{folding}{}{}     \begin{folding}     \usepackage{geometry}     \end{folding}      However, this won't build. Can anybody explain why? Is there a way to define an environment such that this would work?


title: Beamer - Uncover within Equation Mode

text: I have an equation and I would like to uncover part of it at a time. Take y = 2x + 3.               \begin{equation*}     y = 2x + 3     \end{equation*}      I would like to uncover the 3               \begin{equation*}     y = 2x + \uncover<2->{3}     \end{equation*}      That syntax for uncover does not seem to do anything.


title: Resets page numbering after table of contents

text: I am numbering my index pages with roman numerals, but I'm writing the document using restructuredText that is parsed into LaTeX. I have a preamble that contains all the necessary setup, but after the table of contents, it resets the page numbering back to 1, so \listoftables and \listoffigures show up at page (i) and (ii) respectively instead of (iii) and (iv) like they should. Since my table of contents could change, I don't want to use fixed page numbering. There is a question that suggests rewriting \tableofcontents to storing the page number, but I have tried that and it didn't work. Since I am new here, I cannot comment on that one. I would be willing to accept that I cannot fix this as long as I could disable page numbering for the TOC. The following are the used classes and packages from the generated output:               % Generated by Sphinx.     \def\sphinxdocclass{report}     \documentclass[letterpaper,10pt, openany, oneside, english]{sphinxmanual}     \usepackage[utf8]{inputenc}     \DeclareUnicodeCharacter{00A0}{\nobreakspace}     \usepackage{cmap}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{times}     \usepackage[Sonny]{fncychap}     \usepackage{longtable}     \usepackage{sphinx}     \usepackage{multirow}     % Include packages     \usepackage{lastpage}     \usepackage[table]{xcolor}     \usepackage{csvsimple}     \usepackage[hypcap]{caption}     \usepackage{booktabs}     \usepackage{wrapfig}     \usepackage{hyperref}     \usepackage[nottoc]{tocbibind}     \hypersetup{colorlinks,%         citecolor=black,%         filecolor=black,%         linkcolor=black,%         urlcolor=blue,%     pdftex}     \definecolor{lightgray}{gray}{0.9}     \let\oldtabular\tabular     \let\endoldtabular\endtabular      Since I have no control over when the table of contents will be called on, I also redefined the table of contents like this:               % Redefine table of contents to include the tables and figures     \newcounter{mypageno}     \let\oldtableofcontents\tableofcontents     \renewcommand{\tableofcontents}{%       \oldtableofcontents%       \cleardoublepage%       \setcounter{mypageno}{\value{page}}%       \pagenumbering{roman}%       \setcounter{page}{\value{mypageno}}%       \listoftables%       \listoffigures%       \cleardoublepage%       \pagenumbering{arabic}%     }


title: TikZ, standalone and circuite.ee.IEC, strange bounding box

text: I'm using `standalone` to create PDF output of a `tikzpicture`. But I run into a problem when I use the circuit library. Here's a mwe that shows that simply adding the line `\usetikzlibrary{circuits.ee.IEC}` throws off the boundary of the resulting PDF file.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}          \usetikzlibrary{circuits.ee.IEC}     \begin{tikzpicture}       \draw [help lines] (0,0) grid (10,10);     \end{tikzpicture}          \end{document}      Which (on my machine) produces the following PDF (note the huge amount of whitespace to the left of (0,0), the bottom left corner of the grid). Any help appreciated! ![enter image description here](http://i.stack.imgur.com/nxK4U.jpg)


title: Newcommand: What cannot be done?

text: It is not the first time I tried to create a new command unsuccessfully. Some things I found out did not work (getting "undefined control sequence" or other errors).   * Use a quote-endquote argument.              \newcommand{\mytest}[1]{       \quote #1 \endquote     }        * Use the `\verb` command with the argument              \newcommand{\mytest}[1]{       \verb+#1+     }        * Use the `begin{lstlisting}` environment:              \newcommand{\mytest}[1]{       \begin{lstlisting}       #1       \end{lstlisting}     }      Do you know where I can find an exhaustive list of what I can do with `\newcommand` and what I cannot? and even better, why?


title: Looking for TikZ flourishes and vignettes

text: I'm a sucker for the fancy section markers (commonly called vignettes or ornaments). For an example, look at the beautiful symbol beneath the {TeX} logo on this site, or this flourish below ![example flourish](http://i.stack.imgur.com/LPA4q.jpg) However, all the solutions I've seen involve the use of a dingbat font. Are there any solutions out there that use TikZ? ## Related Where can I find vignettes to separate sections? End of paragraph with ornament


title: How to improve the style of this LaTeX line

text: I have the following line in TeX and my problem is that the `backslash` is too small and the text under the `bigcup` becomes very cumbersome:               $$ess \ supp(f) = W \ \backslash \bigcup_{\Omega \subset W      \text{ open and }  f|_{\Omega}=0 \text{ a.e.}} \Omega$$      Is there any way to remedy those difficulties?


title: How to line up the arrow and structure in chemfig

text: I have the following problems:   1. in the first reaction scheme the arrow is too high and I would like to bring it a little down.   2. in the second reaction scheme the third chemical structure (after the arrow) is a little bit low and I would like to bring it up.   3. in the third structure I would like to connect A to C not to B. Thanks a lot.               \documentclass[12pt,doublespacing,letterpaper]{report}          \usepackage{chemfig}               \begin{document}               \setatomsep{2em}     \setbondoffset{1pt}     \setdoublesep{3pt}     \setbondstyle{line width=1pt}                         \schemestart[0,1.2,thick]     \chemfig{R_3B}     \+     \chemfig{CH_2=CH-C(=[:90]O)-CH_3}     \arrow{%     ->[\footnotesize H$_2$O]%       []%      }[,2,thick]      \chemfig{R-CH_2-CH-C(=[:90]O)-CH_3}     \schemestop          \bigskip               \schemestart[0,2,thick]       \scriptsize\chemfig{[:-30]*6(-=-(-[,1.2]BF_3K)=-=)}       \arrow{0}[,0]\+{1em,1em ,17pt}       \scriptsize\chemfig{HO-[:75,,2](-[:115])(-[:150])-(-[:65]OH)(-[:-45])-[:-90]}      \arrow{%      ->[\footnotesize SiO$_2$]%       [\footnotesize H$_2$O]%       }       \scriptsize\chemfig{*6(-=-(-[,1.1]B?-[:60,1.1]O-[:10](-[:60])(-[:20])-[:-60](-[:45])(-[:-5])-[:-145]O-[:-195]?)=-=-)}     \schemestop               \bigskip          \scriptsize\chemfig{*6(-=-(-A(-[:90]B*5(-C-*6(-=-=-)=-D=))-[:-30,1.2]OEt)=-=)}                    \end{document}


title: Place numbers on edges between nodes in tikz

text: I am creating a graph of connected nodes and I want to have numbers on all edges that connect the nodes. At the moment it looks as follows:               \begin{figure}[H]     \begin{tikzpicture}     \node[shape=ellipse, draw=black, fill=gray!50] (a) at (7,-4) {a};     \node[shape=ellipse, draw=black, fill=gray!50] (b) at (7,1) {b};     \draw[solid] (b) -- (a) ;     \end{tikzpicture}     \end{figure}      If I want the line between a and b have an assigned number, how shall I do?


title: how to generate Mathematica code into more-appealing LaTeX code?

text: Subscript[R, c] (Subscript[m, d] (g+Overscript[y, ¨]) sin(Subscript[\[Alpha], c]+Subscript[\[Theta], 1])+Subscript[k, d] cos(Subscript[\[Alpha], c]+Subscript[\[Theta], 1]) (Subscript[d, c] cos(Subscript[\[Omega], c]+Subscript[\[Theta], 1])-Subscript[R, 1] sin(Subscript[\[Alpha], 1])))+Overscript[x, ¨] (Subscript[R, c] Subscript[m, d] cos(Subscript[\[Alpha], c]+Subscript[\[Theta], 1])+Subscript[m, 2] Subscript[R, 2] cos(Subscript[\[Alpha], 2]+Subscript[\[Theta], 1]))+Subscript[m, 2] Subscript[R, 2] sin(Subscript[\[Alpha], 2]+Subscript[\[Theta], 1]) (g+Overscript[y, ¨])<Subscript[\[Theta], 1]^\[Prime]\[Prime] (-Subscript[d, c] Subscript[R, c] Subscript[m, d] sin(Subscript[\[Alpha], c]-Subscript[\[Omega], c])+d Subscript[m, 2] Subscript[R, 2] sin(\[Omega]-Subscript[\[Alpha], 2])+Subscript[IG, 2])+(Subscript[\[Theta], 1]^\[Prime])^2 (Subscript[d, c] Subscript[R, c] Subscript[m, d] cos(Subscript[\[Alpha], c]-Subscript[\[Omega], c])+d Subscript[m, 2] Subscript[R, 2] cos(\[Omega]-Subscript[\[Alpha], 2]))


title: Surface plot of data does not produce expected result

text: I would like to make a surface plot of data.txt. I use the following code as a MWE.               \documentclass{article}          \usepackage{tikz,pgfplots}     \pgfplotsset{compat = 1.8}          \begin{document}          \begin{tikzpicture}      \begin{axis}       \addplot3[surf, mesh/ordering = y varies] table {data.txt};      \end{axis}     \end{tikzpicture}          \end{document}      This code produces the following result: ![Observed result](http://i.imgur.com/9KmdASa.png) Using the same data in Matlab gives me the following surface plot, so this is the expected result. ![Expected result](http://i.imgur.com/eP6iSnI.jpg) I have searched quite a bit, but I just cannot find out what is wrong. I expect some sort of incorrect indexing.


title: pgfkeys "/handlers/first char syntax" generating error

text: I'm trying to follow the example from the `tikz` manual (2.10-CVS development version), but I'm not meeting success. Here's my MWE               \documentclass{article}     \usepackage{pgfkeys}     \pgfkeys       {         /handlers/first char syntax=true,         /handlers/first char syntax/the character "/.initial=\hello,       }     \newcommand{\hello}[1]{Quoted: #1.}          \pagestyle{empty}     \begin{document}          Hello: \pgfkeys{"Does this work"}     \end{document}      But I'm getting the following error:               ! Undefined control sequence.     \pgfkeys@syntax@handlers ->\pgfutil@ifnextchar                                                     \relax \pgfkeys@syntax@@handl...     l.8   }          ?       Any suggestions?


title: Shorthand for empty line or \\ \indent

text: This page says that `\\` starts a new paragraph. However, it does not end up looking the same as inserting an empty line in my source code (which I have always used to define paragraphs), which also indents the new line. The latter describes the visual effect I am looking for, but since I am typing out a conversation (which means a lot of indented newlines), I hope to find a more elegant command for this, so I don't have to fill my source code with empty lines or `\\ \indent` everywhere. Is there such a command?


title: Dimension too large in pgf plot

text: I am trying to create a pgf plot which includes (among others) a constant function f(x)=1. My x-axis should be restricted to some range (see below), and there is also a restriction on the y-axis. This is the minimal code that reproduces the issue:               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[         xmin=0,         xmax=.1,         ymin=0,         ymax=2]         \addplot {1};     \end{axis}     \end{tikzpicture}     \end{document}      This code produces the error               LaTeX Font Info:    External font `cmex10' loaded for size     (Font)         <7> on input line 11.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)         <5> on input line 11.     ! Dimension too large.     <recently read> \pgf@xx          l.11           \end{axis}          I can't work with sizes bigger than about 19 feet.     Continue and I'll use the largest value I can.     ! Dimension too large.      The last seven lines of the error message repeat 5 times. This happens no matter what values I use for the `ymin` and `ymax` parameters, but only for certain `xmin` and `xmax`. From trying different values, my guess would be that `xmin`-`xmax` has to be greater than approximately 0.15 for LaTeX to compile this successfully, but in my use case it has to be a range from `xmin=.0005` to `xmax=.0027`. Why does LaTeX throw an error when the range is too small (or is there something else wrong with my code)?               ~ $ pdflatex -version     pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)


title: Formatting issues on x-axis and y-axis in latex

text: I have a latex code to generate graphs from a text file. The contents of the text file are like this:               0.01    0.119693    48.43196     0.02    0.1310796   6214.208     0.03    0.1289268   12973.42     0.04    0.1286408   17064.04     0.05    0.128663    19556.76     0.06    0.1289252   21224.36     0.07    0.1283098   22407.22      Here is the latex code:               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{width=6cm,compat=newest}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         scale only axis,         xlabel={$Applied\; Load\;(packets\;per\;cycle\;per\;node) $},         xtick={0.01,0.02,0.03,0.04,0.05,0.06,0.07},         ylabel={$Throughput\;(in\;flits\;per\;cycles)$},         ytick={0,0.05,0.1,0.15},         legend style={font=\small,at={(0.5,0.96)},anchor=north,style={nodes={right}}},         legend pos=outer north east,         legend cell align=left,     ]     \addplot[color=red,mark=*, mark options={fill=red}]         table[x index=0,y index=1] {DOR_data.txt};              \legend{DOR}          \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[         scale only axis,         xlabel={$Applied\; Load\;(packets\;per\;cycle\;per\;node) $},         xtick={0.01,0.02,0.03,0.04,0.05,0.06,0.07},         ylabel={$Delay\;(in\;cycles)$},         ytick={0,1000,5000,10000,15000,20000},         legend style={font=\small,at={(0.5,0.96)},anchor=north,style={nodes={right}}},         legend pos=outer north east,         legend cell align=left,     ]     \addplot[color=red,mark=*, mark options={fill=red}]         table[x index=0,y index=2] {DOR_data.txt};                   \legend{DOR}          \end{axis}     \end{tikzpicture}          \end{document}      This is how the graph comes out: ![enter image description here](http://i.stack.imgur.com/9HPVb.jpg) Now, there are 2 issues:   1. There is no y-axis pointers on the graph on the left.   2. In x-axis, 10^(-2) is overlapping with the x-label. I want them to show as 0.01, 0.02 etc.  This same code has worked for me previously. This is weird.


title: xstring StrSubstitute and table

text: I got a problem with `xstring` `\StrSubstitute` in combination with a table. I would like to replace newline (`\\`) in a variable with the `\newline` command to generate a second line in a paragraphed table cell. Therefore I got the following code, which works fine for the first output (if I put `\addr` to the left column), but for the second output in the right column I get a               Undefined control sequence error      I have no idea how to fix this and why the first output works but not the second. Thanks for any help. edit: added MWE               \documentclass{article}          \usepackage[a4paper,top=1.27cm,left=1cm,right=1cm,bottom=2cm]{geometry}     \usepackage{ifpdf}     \usepackage{graphicx}     \usepackage[utf8x]{inputenc}     \usepackage{longtable}     \usepackage{xstring}          \def\address{Test123\\Test234}          \providecommand{\test}[1][0pt]{%     Test1 & Test\newline Test2\tabularnewline     \ifx\@empty\address\else     \saveexpandmode\expandarg     \StrSubstitute{\address}{\empty\\}{\empty\newline}[\addr]%     \restoreexpandmode     \addr & Address \tabularnewline     Address    & \addr   \tabularnewline     \fi     }        \begin{document}          \begin{tabular}{p{2cm}|p{2cm}}     \test     \end{tabular}               \end{document}


title: Changing Margins on thesis

text: Quick question to anyone who has used this LaTeX template: http://www.latextemplates.com/template/masters-doctoral-thesis Any ideas on how to change the left margin to get more words onto one page?


title: Fake sheet effect

text: How can recreate this effect in LaTeX? ![enter image description here](http://i.stack.imgur.com/Jn8Sv.png)


title: Node positioning relative to 2 other nodes

text: I'm wanting to align/position a node relative to 2 others. Basically I'd like everything to be in rows and columns (whose is determined by the largest member). In this specific instance, I'd like node `j` to be centered on the intersection of the red and blue lines in the picture below. This would cause the 2 decision diamonds to be evenly spaced like `f` and `g`.               \documentclass{article}          \usepackage{tikz}     \begin{document}     \pagestyle{empty}          \usetikzlibrary{shapes, arrows, calc, positioning}          % Define block styles     \tikzstyle{state}   = [ rounded rectangle, draw,                              text centered,                              minimum height=3em                            ]     \tikzstyle{test}    = [ diamond,                              draw,                              shape aspect=2,                              inner sep = 0pt,                             text width = 7em,                             text centered                           ]     \tikzstyle{action}  = [ rectangle, draw,                             text width=8em,                             inner sep = 5pt,                              minimum height=5em                           ]          \begin{tikzpicture}[node distance = 1.25em, align = flush center, font = \small]         % Place nodes         \node [test] (f) {fLorem ipsum dolor sit amet};         \node [test, right=of f] (g) {gLorem ipsum dolor};         \node [test, below=of f] (h) {hLorem ipsum dolo};         \node [action, below=of h] (i) {iLorem ipsum dolor sit amet, consectetur adipiscing elit.};         \node [action, right=of i, fill=gray] (j) {jLorem ipsum dolor sit amet, consectetur adipiscing elit.};         \node [test, below=of i] (l) {lLorem ipsum dolor};         \node [test, below=of j, fill=gray] (m) {mLorem ipsum dolor};              \draw [red] (g) -- +(0,-10);         \draw [blue] (i) -- +(10,0);     \end{tikzpicture}          \end{document}      ![alignment](http://i.stack.imgur.com/M2jbO.png) I've read some promising things about `chains` but think it might be over kill for my use.


title: Problem with \includegraphics in beamer  -- greek language doesn't work

text: I use this code:               \documentclass{beamer}          \setbeamertemplate{navigation symbols}{}     \usepackage{subfigure}          \usepackage[english,greek]{babel}     \usepackage[utf8x]{inputenc}     \graphicspath{{/home/user/images/}}          \begin{document}               \section{intro}     \subsection{intro1}               \begin{frame}     \frametitle{test}     \setbeamercovered{transparent}          \begin{figure}              \includegraphics[scale=0.5]{imag1}          \end{figure}          \end{frame}          \end{document}      and get 100 errors. The problem lies with `\includegraphics`; if I remove it it's OK. (The image is PNG and it is working with this layout in LaTeX.) Is there some conflict with `babel`? **\---------------UPDATED----------------------------------------** I noticed that in kile settings at the build section at the PDFLatex ,even though i had it to "xelatex" it showed "pdflatex" ,so i changed it again and now it works **BUT** now the greek language doesn't work!I can't see anything greek.I haven't changed anything! **\--------------------UPDATED 2-----------------------------------------**               \documentclass{beamer}          \setbeamertemplate{navigation symbols}{}     \usepackage{subfigure}          \usepackage[english,greek]{babel}     \usepackage[utf8x]{inputenc}          \newcommand{\gr}{\greektext}     \newcommand{\EN}{\latintext}          \begin{document}          Καλημέρα     \section{Ημέρα}          Καθόλου ελληνικά          \begin{frame}     \frametitle{test}     \setbeamercovered{transparent}          Καλησπέρα          \EN English \gr          \end{frame}          \end{document}


title: Part title in list of figures and tables?

text: I'm using KOMAScript. I have a `\listoffigures` and a `\listoftables`. My document has several `\part{}`'s. In the two lists the figures and tables are already grouped (small vertical space) by the chapters. What I'd like to have additionally to the ("anonymous") chapter vspace grouping is the part title over each "part group" of figures and tables in the two lists. Is this somehow possible without having to code a list from scratch?


title: General items in Non-Persian font using the XePersian package?

text: Working on a book I first run into the page numbering problem that is discussed elsewhere, but I guess the problem is more general. When I try the following code, I get a Persian date in the footer and I get Persian page numbers. I really tried a lot, including the redefinition of `\pagemark` from the `scrpage2` package. But I think this should not be necessary for users of this package. When I use `\begin{latin}` I expect everything inside there to behave latin. This includes date expressions, page numbers, question marks for missing citations, and so on. The package is great and I would like to use it. Maybe there is a way to use parts of it to get the type setting of single sentences done (that's what I need, I am a linguist) and leave out the things that effect the whole document.               \documentclass{scrbook}          \usepackage{hyperref}               \usepackage{scrpage2}\ohead{\lr{\headmark}}\ihead{\pagemark}\cfoot{}\ofoot[]{\lr{Draft of \today}}          \usepackage{xepersian}\renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}\let\cite=\latincite          \settextfont{XB Niloofar}           %\def\pagemark{{\lr{\pnumfont\thepage}}}          \begin{document}     \begin{latin}               \frontmatter          \pagestyle{scrheadings}          \chapter*{Preface}               We thank for discussion.          \newpage          We thank the \LaTeX{} developers for support.          \mainmatter          \chapter{Chapter Title}          Some text.          \newpage          Even more text.          \appendix               \end{latin}     \end{document}


title: Neatly aligning the bib entries by equal signs

text: Every time someone post biblatex bib-file entries, the various fields (author, title, year, journaltitle, etc) are all neatly aligned with an equal sign- column in the middle. I would like my own bib-file to be that neat, but I cannot find any information about this. For an example a not-so-neat bib-file, see the added image. I appreciate any help! Anders ![Example of not-so-neat bib-entries](http://i.stack.imgur.com/RU81F.png)


title: Letter in Appendix missing in XePersian

text: The following example shows that there is the letter "A." missing in the caption of the appendix in the pdf when xepersian is used. Is there a way to fix this?               \documentclass{scrbook}          \usepackage{hyperref}               \usepackage{scrpage2}          \usepackage{xepersian}          \settextfont{XB Niloofar}                \begin{document}     \begin{latin}               \frontmatter          \pagestyle{scrheadings}          \chapter*{Preface}               We thank for discussion.          \newpage          We thank the \LaTeX{} developers for support.          \mainmatter          \chapter{Chapter Title}          Some text.          \newpage          Even more text.          \appendix     \chapter{Appendix}          This is an appendix.          \end{latin}     \end{document}


title: fancy header/footer on pages with chapter beginning

text: I'd like to produce `report` class document with one style of page numbering. I've declared:               \usepackage{fancyhdr}     \fancyfoot[R]{\thepage}     \pagestyle{fancy}      but on pages with new chapter the page numbers are centered. How can I protect my `fancy` setting form overwriting by `chapter` settings or how can I define my own header and footer for those pages? Thanks for any approach.


title: How can I check if the current code is inside a certain environment?

text: I would like to define a command which checks if it is executed inside a certain environment. Like this:               \documentclass{article}          \newenvironment{myenv}[0]{at start}{ at end}          \newcommand{\inner}[0]{%       % if iside a myenv       (inner)       % else       \begin{myenv}       (inner)%       \end{myenv}       % end     }          \begin{document}          \begin{myenv}       \inner     \end{myenv}          \inner          \end{document}      See the definition of `\inner`. Is an if-condition of this form possible?


title: When using more than 16 math alphabets, \mathtt uses italic font

text: I know that in TeX, you can only use 16 math alphabets but XeTeX extends this so I was curious to enlarge the number of my math alphabets and I had to redefine some internals of LaTeX. Here is my minimal working example:               \documentclass{article}     \DeclareSymbolFont{AMSa}{U}{msa}{m}{n}     \DeclareSymbolFont{AMSb}{U}{msb}{m}{n}     \DeclareSymbolFont{MnSyA}         {U}  {MnSymbolA}{m}{n}     \DeclareSymbolFont{MnSyB}         {U}  {MnSymbolB}{m}{n}     \DeclareSymbolFont{MnSyC}         {U}  {MnSymbolC}{m}{n}     \DeclareSymbolFont{MnSyD}         {U}  {MnSymbolD}{m}{n}     \DeclareSymbolFont{MnSyE}         {U}  {MnSymbolD}{m}{n}     \makeatletter     \def\select@group#1#2#3#4{%      \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi      {%      \ifmmode       \ifnum\csname c@mv@\math@version\endcsname<\@cclvi          \begingroup            \escapechar\m@ne            \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%            \globaldefs\@ne  \math@fonts          \endgroup          \init@restore@version          \xdef#1{\noexpand\use@mathgroup\noexpand#2%                  {\number\csname c@mv@\math@version\endcsname}}%          \global\advance\csname c@mv@\math@version\endcsname\@ne        \else          \let#1\relax          \@latex@error{Too many math alphabets used in                        version \math@version}%             \@eha        \fi      \else \expandafter\non@alpherr\fi      #1{#4}%      }%     }     \def\document@select@group#1#2#3#4{%      \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi      {%      \ifmmode        \ifnum\csname c@mv@\math@version\endcsname<\@cclvi          \begingroup            \escapechar\m@ne            \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%            \globaldefs\@ne  \math@fonts          \endgroup          \expandafter\extract@alph@from@version              \csname mv@\math@version\expandafter\endcsname              \expandafter{\number\csname                            c@mv@\math@version\endcsname}%               #1%          \global\advance\csname c@mv@\math@version\endcsname\@ne        \else          \let#1\relax          \@latex@error{Too many math alphabets used                        in version \math@version}%             \@eha       \fi      \else \expandafter\non@alpherr\fi      #1{#4}%      }%     }     \makeatother               \DeclareSymbolFont{testa}   {U}{cmr10} {m}{n}     \DeclareSymbolFont{testb}{U}{cmr10}{bx}{n}     \DeclareSymbolFont{testc}{U}{cmr10}{m}{it}     \DeclareSymbolFont{testd}{U}{cmr10}{m}{n}     \DeclareSymbolFont{lettersA}{U}{txmia}{m}{it}               \begin{document}     \[ \mathtt{Test}\]         \end{document}      But this makes the word `test` to appear in italic. You can delete any of the `\DeclareSymbolFont` and then `\mathtt` worked as expected. This shows that this only happens when the number of math alphabets exceeds 16. Why does this happen and how should one fix this? **Update1:** I tried the same thing with LuaTeX and I got expected result so it seems that something is wrong with XeTeX. **Update2:** Another minimal working example:               \documentclass{article}          \usepackage{amsfonts}     \usepackage{MnSymbol}          \makeatletter     \def\select@group#1#2#3#4{%      \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi      {%      \ifmmode       \ifnum\csname c@mv@\math@version\endcsname<\@cclvi          \begingroup            \escapechar\m@ne            \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%            \globaldefs\@ne  \math@fonts          \endgroup          \init@restore@version          \xdef#1{\noexpand\use@mathgroup\noexpand#2%                  {\number\csname c@mv@\math@version\endcsname}}%          \global\advance\csname c@mv@\math@version\endcsname\@ne        \else          \let#1\relax          \@latex@error{Too many math alphabets used in                        version \math@version}%             \@eha        \fi      \else \expandafter\non@alpherr\fi      #1{#4}%      }%     }     \def\document@select@group#1#2#3#4{%      \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi      {%      \ifmmode        \ifnum\csname c@mv@\math@version\endcsname<\@cclvi          \begingroup            \escapechar\m@ne            \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%            \globaldefs\@ne  \math@fonts          \endgroup          \expandafter\extract@alph@from@version              \csname mv@\math@version\expandafter\endcsname              \expandafter{\number\csname                            c@mv@\math@version\endcsname}%               #1%          \global\advance\csname c@mv@\math@version\endcsname\@ne        \else          \let#1\relax          \@latex@error{Too many math alphabets used                        in version \math@version}%             \@eha       \fi      \else \expandafter\non@alpherr\fi      #1{#4}%      }%     }          \makeatother          \DeclareSymbolFont{testa}{U}{txmia}{m}{it}     \DeclareSymbolFont{testb}{U}{txmia}{m}{it}     \DeclareSymbolFont{testc}{U}{txmia}{m}{it}     \DeclareSymbolFont{testd}{U}{txmia}{m}{it}          \DeclareSymbolFont{lettersA}{U}{txmia}{m}{it}          \begin{document}     \[ \mathtt{Test} \mathcal{L}\]     \end{document}      No problem with LuaLaTeX, but with XeLaTeX, this time, `\mathtt` is fine but you get italic with `\mathcal`.


title: PGFplot Axis Labels Detaching From Graph

text: ## Update: Aug 04, 2013   * With the current version of TeXLive 2013, the second MWE below still exhibits the same behavior if the `\todo[inline]` is commented out after the first run.    * Furthermore, the problem now also _does_ show up if the `standalone` class is used. Although my update from 2012 indicates the problem did _not_ show up with the `standalone` class, I can now reproduce it with TeXLive 2012 as well. So, either I did not test carefully enough earlier to notice the problem, or some other package changes occurred after Oct 11, 2012 to cause the problem to come back with the `standalone` pacakge.   * As this problem _does_ resolve itself after subsequent runs, perhaps this question should be closed. However, it is not at all obvious what happened when this occurs in a real document. I suspect that a tweak to the `todonotes` package would be required to correct this. * * * ## Update: Oct 11, 2012   * With the current version of TeXLive 2012, this problem no longer occurs with the `standalone` class. However using the `article` class, this problem still reproducible. The MWEs below have been updated.   * As Joseph Wright pointed out in the comments, this problems _does_ resolve itself upon the 3rd run -- only the output of the 2nd run exhibits the problem.  * * * In a previous question about scaling pgfplots graph, I mentioned that an attempt to scale the graph resulted in the axis labels begin detached from the axis. I haven't gotten an answer that uses released code to that question, but I am seeing similar behavior now even without any scale option applied. Unfortunately, I am not yet able to reproduce a MWE. This problem only happens sometimes in my larger document, and making changes to unrelated portions of my document either causes or fixes issues where the axis labels are detached from the axis. This time, the problem showed up on a graph which was a place holder and the source code for that is below. This graph below itself works just fine, and _most_ of time works fine when it is included in another file, but _does not always_ work. The outer box is from the geometry package. When I include this in a test case things work fine. I will continue to hunt for a proper MWE as I fully understand the difficulties in debugging a problem without being able to reproduce it, but was hoping that someone else has seem similar issues and knows that they are related to so I know where to look for the problem.               % This works just fine, but sometimes has problems when included in another file     \documentclass{article}     \usepackage{standalone}     \usepackage{pgfplots}     %     \begin{document}     %     \pgfkeys{/pgfplots/axis labels at tip/.style={             xlabel style={                 at={(current axis.right of origin)},                  xshift=1.5ex, anchor=center             },             ylabel style={                 at={(current axis.above origin)},                  yshift=1.5ex, anchor=center             }         }     }     %     \begin{tikzpicture}     \begin{axis}[             clip=false,             minor tick num=0, %             axis y line=center,             axis x line=middle,              axis on top=true,             axis labels at tip,             unbounded coords=jump, %             tick label style={font=\small}, %             legend style={font=\footnotesize},             xmin=-5,             xmax=5,              ymin=-1.0,             ymax=5.0,              xlabel=$x$,             ylabel=$y$,         ]      \end{axis}      \end{tikzpicture}     \end{document}      The `axis labels at tip` is from this previous question about scaling. I don't think that is related to the problem here, but I included that as that is how I had this graph set up. * * * **UPDATE: June 20, 2011** I was only seeing this problem when generating a large number of pages, so was difficult to figure out what was causing this. But, have now managed to track this down further and come up with the following MWE. Run the following using pdflatex, then comment out the `\todo` line, and re- run. Upon subsequent run, I get a two page document, with the text "Basic axis:" on first page, and the y-axis label at the top of the 2nd page, a small amount of the tip of the y-axis is visible near the bottom of the page. Here is the output of the first run: ![enter image description here](http://i.stack.imgur.com/QbGNO.png) and here is the output of the 2nd run: ![enter image description here](http://i.stack.imgur.com/z2SWC.png) Note how the top portion of the axis is at the bottom of Page 2, and the `y` label is near the top right. To make these images usable I tweaked the MWE below with:   1. `\usepackage[paperheight=10.0cm, paperwidth=12.5cm]{geometry}`, and   2. `xlabel=$\textcolor{red}{x}$, ylabel=$\textcolor{red}{y}$`. ## Code:               \documentclass{article}     \usepackage{pgfplots}     \usepackage{todonotes}     %     \begin{document}     %     \todo[inline]{Something to do}% Comment this line after 1st run     %     Basic axis:          \begin{minipage}{0.55\linewidth}     \begin{tikzpicture}     \begin{axis}[             axis y line=center, axis x line=middle,              xmin=-2.5, xmax=2.5, ymin=-2.5, ymax=2.5,              axis on top=true,             xlabel=$x$, ylabel=$y$,         ]      \end{axis}     \end{tikzpicture}     \end{minipage}     \end{document}      So, now I just remove all .AUX files before running (unless I specifically need multiple runs) and that seems to fix my problem. I do not think that this is only cause of these kind of problem, and if I can reproduce this problem with a different method I will post that here. For instance, this problem on scaling pgfplots graph did not require a re-run to produce similar behavior.


title: How to make theorem title (such as Theorem, lemma, definition, etc) in margin while theorem number as usual.

text: How to make the theorem style like:               1.1.3. There is a theorem.         Theorem                 it may be several lines.                 The theorem 1.1.3 end.          1.1.1. There is a lemma.           lemma                 The lemma 1.1.1 end.      (for oneside documentclass)


title: KOMA script - Page heading for unnumbered chapter vs. automark

text: I'm using the following document structure based on KOMA script classes and styles               \documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}     \usepackage[nouppercase,headsepline]{scrpage2}     \pagestyle{scrheadings}     \clearscrheadfoot     \automark[section]{chapter}     \chead{\headmark}      (plus some more stuff I'm not listing here). This works very well in general. But I do have an unnumbered chapter like this                 \addcontentsline{toc}{chapter}{Bla bla}       \chapter*{Bla bla}      and I want its title (no number) to appear in the heading of right pages (left pages blank as there are no numbered sections in this chapter). As was to be expected, this does not work out of the box, it currently lists the name of the previous chapter (list of figures). How can I make it work? Would a manually issued `\markboth{}{Bla bla}` be the right way to go? From the KOMA script documentation I'm not quite sure how that would interfere with the automark stuff.


title: How to create table with inner columns inside larger columns?

text: I want to create this kind of table with 3 large columns and at one point the column is divided to two smaller columns. Please note that the column not divided in the whole space. **How can create the table with custom column sizes inside the larger columns?**               |------------------------------------------------------------|     |                |          A          |       Most Mon      |     -------------------------------------------------------------|     |  Methods       | Time [s] | RunCount | Time [s] | RunCount |     |----------------|---------------------|---------------------|     |    C           |          |          |    4     |    1     |     |    D           |          |          |    5     |    2     |     |    E           |          |          |    6     |    3     |     -------------------------------------------------------------|


title: Error with article(Noweb) in LyX 2.0.0

text: When I tried to include an _R_ plot with the following code into article(Noweb) in LyX 2.0.0               <<fig=TRUE>>=     library(graphics)     pairs(iris)     @      I got the following error message:               {C:/Users/MYaseen208/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]     ! Missing $ inserted.     <inserted text>                      $     l.146 ...ir.Hp5960/lyx_tmpbuf2/sweave_example-007}          I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.     ! LaTeX Error: File `C:/Users/MYaseen208/AppData/Local/Temp/lyx_tmpdir.Hp5     960/lyx_tmpbuf2/sweave_example-007' not found.      Any idea to fix this problem. Thanks


title: Graphic Jumps Up in Beamer

text: Consider the following code:               \begin{frame}{title}         \hfill\includegraphics[width=7cm]{1.pdf}\hfill\hfill              \vspace{2cm}               \hfill\includegraphics[width=7cm]{2.pdf}\hfill\hfill     \end{frame}      This creates two slides: `1.pdf` is shown on both, while `2.pdf` is only shown on the second one. The problem is that when you move from the first slide to the second, `1.pdf` jumps a little up, as if it is making room for `2.pdf` (although there are plenty of room left for it!) Here's a demonstration: ![Image](http://i.stack.imgur.com/8Cept.png) You can get the source + PDF from here, and see it for yourself. (It is best to view the PDF in the full-screen mode.) I tried absolute positioning of `1.pdf`, using `textpos` (and a bunch of other techniques). However, this seems to be an overkill, and, moreover, placing the graphic at the center of the page (horizontally) seems hard. Any suggestions?


title: Use of \small in the equation environment

text: My equations are a little too large for the normal `eqnarray` environment, so I've been using the `\small` delimiters around the `\begin{eqnarray} ... \end{eqnarray}`. Unfortunately, this causes the the equation numbering to follow in size. Is there a way to reduce the size of an equation without reducing its numbering?


Want to make the following rectangular box in TeX. Is this possible? ![enter image description here](http://i.stack.imgur.com/MceMJ.jpg)


title: How to use the Bradhley Hand font?

text: I've checked the Mathfonts that can be used through Beamer Class , I've successfully used most of the fonts , but when i tried to include the Bradhley Hand font , it did not work (it shows ordinary characters) ?! How Can i use it ? EDIT : for example when i use the following :               \documentclass[serif]{beamer}      \usepackage{mathpazo}      \renewcommand{\rmdefault}{ibh}      \begin{document}     \begin{frame}     $\frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } }     { \sqrt[3]{\rho(i) - 2} + \sqrt[3]{\rho(i) - 1} } $     \end{frame}     \end{document}      it gives : ![!](http://s17.postimg.org/7l1dobbu7/123456.png)


title: How can I test for the current font?

text: The situation is the following, I have one font _a_ with one feature and another font _b_ with another feature and I am writing a command that if the current font is a need to switch to font _b_ but if the font is _c_ needs to do nothing. Basically:               if currentfont is a set font b      How can this be accomplished? * * * _**EDIT:_** Okey I will admit that I asked this question because I was working on a solution for this question and I thought this if else question was a separate question (was I wrong?) but now I am stuck for real... I have spent some time trying to follow the suggestions from the answers here but I keep failing. This example:               \documentclass[oneside]{memoir}         \usepackage[osf]{mathpazo}         \usepackage{helvet}         \usepackage{ifthen}              \makeatletter         \renewcommand*{\thechapter}{%             \ifthenelse{%                 \equal{\f@family}{pplj}%         }%             {%             {\fontfamily{ppl}\selectfont%             \textsc{\roman{chapter}}}%         }%         {%             \textsc{\roman{chapter}}%         }%     }%     \makeatother     \renewcommand{\cftchapterpagefont}{\fontfamily{pplj}\selectfont\bfseries}     \renewcommand{\cftsectionpagefont}{\fontfamily{pplj}\selectfont}     \captionnamefont{\sffamily\scshape\small}     \captiontitlefont{\sffamily\small}          \begin{document}          \tableofcontents          \chapter{The number 4 is more than 2}          \section{The number 4 is}         If I write chapter \ref{anotherChapter} like this is         looks oki.         But the number in the header is a small i not a \textsc{i} and same         thing in the table of content and the chapter header\dots     \begin{figure}         \caption{Lorem ipsum}         \center \LARGE LOREM IPSUM     \end{figure}     \section{More than 4}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur     tempus facilisis nunc, sit amet suscipit ligula fermentum ac. Ut     fringilla, elit eget facilisis venenatis, risus massa viverra sem, a     placerat massa odio a mauris     \chapter{Another chapter}     \label{anotherChapter}     \end{document}      Gives this error (edited):               ! Undefined control sequence.     <argument> \equal                        {\f@family }{pplj}     l.29 \chapter{The number 4 is more than 2}          ?      Seems I have gotten myself into a lot of trouble using these old style numbers... What am I doing wrong?


title: How to include list environment in "titlepage"

text: I've bee writing my own class for meeting notes, and I want to have an `fbox` with everyone who has attended the meeting, preferably in a list (`itemize` or my own custom list). Is there a way to do this in the title, so that the list is always rendered with the command `\maketitle`? I've seen plenty of variables defined in making your own "title page" (in quotes, because it won't be a page on its own), but no environments/lists. MWE of what I'm after:               \documentclass{article}          \begin{document}     \begin{minipage}{0.6\linewidth}       {\Huge Meeting}\\       \today\\       Start time: XX:XX\\       End time: XX:XX     \end{minipage}     \fbox{     \begin{minipage}{0.4\linewidth}       \textbf{Attendees}       \begin{itemize}         \item Member one         \item Member two         \item etc.       \end{itemize}     \end{minipage}     }     %% End of the stuff I want the \maketitle command to create.     \end{document}      I want to know if it's possible to get the Attendee's included the same way title usually is e.g.               \title{Meeting}     \begin{attendees}     \item Member one     \item Member two     \item etc.     \end{attendees}     \starttime{XX:XX}     \endtime{XX:XX}     \maketitle      Any other ways of achieving the same thing in a class are welcome!


title: Implementing a pullquotes algorithm in LaTeX

text: In pullquotes, I provided a manual technique for typesetting pullquotes in LaTeX. The technique was to typeset the material in two long narrow columns and then position them so as to join them together. A typical left column would look like the image below. ![enter image description here](http://i.stack.imgur.com/BnfP2.jpg) I am trying to automate the solution provided by this answer and would like some help **on designing and implementation of the algorithm to achieve it.** For simplicity, we will assume that the display will be on a full page or that the available space on the page is adequate to hold the text. The user input is envisaged to be of the following form               \begin{pullquote}[_nlines_]{<picturefile>}     ...text     \end{pullquote}      the optional argument can be extended at a later stage to provide a key value interface to specify the position of the image such as `vcenter`, `top`, `\bottom` `posy` etc.   1. Measure the picture height and width.   2. Translate height of image into baselines.   3. Insert all material in `boxA`.    4. Split `boxA` at _nlines_ and store in `boxB`.    5. Insert `\par` on top of `boxB` and compensate for `\parskip` and `lineskip`.   6. Insert `\parshape` or `\hangindent` command to allow for image window.   7. Insert image.   8. Split boxB at end of image, end paragraph.   9. Iterate to add enough material to complete the left column. (This is possibly not reliable).   10. Repeat for right column with cut on left.   11. Position images.   12. Typeset. In the algorithm, I omitted run-of-the-mill sections for brevity, such as measurements etc. Playground MWE below.               \documentclass{article}     \usepackage{lipsum,xcolor,graphicx}     \usepackage[latin]{babel}     \newcommand\lorem{Fusce adipiscing justo nec ante. Nullam in enim.      Pellentesque felis orci, sagittis ac, malesuada et, facilisis in,      ligula. Nunc non magna sit amet mi aliquam dictum. In mi. Curabitur      sollicitudin justo sed quam et quadd et quadd. }     \parindent0pt     \def\exampletext{\lipsum}     \fboxsep=0pt     \fboxrule=1pt     \hfuzz=\maxdimen     \def\addgraphic{\includegraphics[width=3cm]{./graphics/amato}}     \raggedright     \begin{document}     \hsize 0.49\linewidth     \setbox3=\vbox{%     \exampletext}     \boxmaxdepth0pt               \setbox1\vsplit3to 8\baselineskip          \setbox1=\vbox{%        \unvbox1        \rule{\hsize}{2pt}        \vskip-\baselineskip         \leavevmode         \vbox to -8pt{%            \hbox to \dimexpr 1.25\hsize{\hfill\addgraphic}         }        {{\hangindent-2cm            \lorem\par}}        \lorem     }     \fbox{\box1}     {{\color{purple}\box3}}     \end{document}


title: How to have inline code and line numbering with minted?

text: I'm using the code found in this answer to allow `minted` to provide inline code. But, unfortunately, this breaks line numbering, which is not shown anymore. How can I have both inline code _and_ line numbering with `minted`? * * * MWE: no inline code with line numbering:               \documentclass[a6paper,10pt]{article}          \usepackage{minted}          \begin{document}          Ciao \mint[linenos]{c}/int a = 1;/ Prova          \begin{minted}[linenos]{c}         int a = 1;     \end{minted}          \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/41l82.png) MWE with inline code, line numbering not working:               \documentclass[a6paper,10pt]{article}          \usepackage{minted}          \makeatletter     % avoid space tokens since we're in horizontal mode     \renewcommand\mint[3][]{%       \DefineShortVerb{#3}%       \minted@resetoptions       \setkeys{minted@opt}{#1}%       \SaveVerb[aftersave={%         \UndefineShortVerb{#3}%         \minted@savecode{\FV@SV@minted@verb}%         \minted@pygmentize{#2}%         \DeleteFile{\jobname.pyg}}]{minted@verb}#3}     \renewcommand\minted@savecode[1]{%       \immediate\openout\minted@code\jobname.pyg\relax       \immediate\write\minted@code{#1}%       \immediate\closeout\minted@code}     \renewcommand\minted@pygmentize[2][\jobname.pyg]{%       \def\minted@cmd{pygmentize -l #2 -f latex -F tokenmerge         \minted@opt{gobble} \minted@opt{texcl} \minted@opt{mathescape}         \minted@opt{linenos} -P "verboptions=\minted@opt{extra}"         -o \jobname.out.pyg #1}%       \immediate\write18{\minted@cmd}%       \ifthenelse{\equal{\minted@opt@bgcolor}{}}%        {}%        {\begin{minted@colorbg}{\minted@opt@bgcolor}}%       \input{\jobname.out.pyg}%       \ifthenelse{\equal{\minted@opt@bgcolor}{}}%        {}%        {\end{minted@colorbg}}%       \DeleteFile{\jobname.out.pyg}}     \makeatother     \RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}          \begin{document}          Ciao \mint[linenos]{c}/int a = 1;/ Prova          \begin{minted}[linenos]{c}         int a = 1;     \end{minted}               \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/bVTOd.png)


title: Remove "Tech. Rep." Output from SIAM bibtex style

text: I've got the following Problem using the SIAM bibtex style. Consider the following bib entry               @TECHREPORT{Pap1,       author = {Author One},       title = {Paper Title},       institution = {My Institute},       year = {2011},       number = {XXX/YY-ZZ},       month = {December},     }      and               \nocite{Pap1}     \bibliographystyle{siam}      \bibliography{bibfile}      to generate the bibliography. Then the output is                A. ONE, Paper title, Tech. Rep. XXX/YY-ZZ, My Institute, December 2011.      How can I remove the "Tech. Rep." from the output? Setting type={} in the bibtex entry does not help and type={~} removes the "Tech. Rep. but inserts an unwanted whitespace before the number.


title: How to add other info to the title page (e.g. class, professor)?

text: I am new to LaTeX and trying to write my first paper with it. I need help on the title page. I want something that says                                              Initial Planning Report                                   Author 1 Author 2 Author 3 Author 4                                                 Class:                                                 Professor:                                                 Date:      I am able to make the 4 authors and the title. But when I try to add centered text under the authors' names, it only puts it under the 4th authors name. And also, is there a way I could have the authors be aligned vertically instead of horizontally?


title: Custom background on beamer slide - outline of pgf path rectangle

text: I'm trying to make custom background for my slides in beamer presentation, gradient one to be exact. It is going pretty good, mainly because of other people questions here, but I have one problem that I just couldn't solve. When I use code like this:               \pgfdeclareverticalshading{myshadingE}{100bp}{color(0bp)=(black);color(100bp)=(white)}     \usebackgroundtemplate{     \begin{tikzpicture}     \pgfpathrectangle{(0,0)}{\pgfpoint{\paperwidth}{\paperheight}}     \pgfshadepath{myshadingE}{45}      \pgfusepath{stroke}     \end{tikzpicture}}      I do have my gradient and all, but there is black outline (edges of the rectangle) visible on left and top side of slide. Can anyone help me with that one? ^^"


title: How to write reactions spanning more lines?

text: I would like to insert a few reactions in my latex document which need to be on more lines, similarly to the reactions shown below. What is the easiest way to achieve this? Up to now I only wrote very single reactions using \ce{} into equations environment. Is there an easy extension to that? ![enter image description here](http://i.stack.imgur.com/iiPfT.png)


title: Special characters are losing format every time I open a document

text: Ok I was working with this document at home and at work in Gummi. I was using a template where everything is set for spanish so everything was working fine. Today I come to work and I find that when I open my document on Gummi all the characters that were á, é, ó, í, ú and ñ are getting switched by weird stuff like MetodologÃÂa and I'm getting an error.               [24]) [25] (./capitulo_03.tex [26]     Cap\'{\i }tulo 3.          ./capitulo_03.tex:1: Package inputenc Error: Unicode char \u8: not set up for     use with LaTeX.      Here is line 1 of the file where the error is supposedly found               \chapter{MetodologÃÂa}      If I change the word MetodologÃÂa to Metodología the problem gets fixed on that line but then it shows the next similar error. Worst thing is that I changed all the words using find/replace but when I closed and opened again all the format was gone again.               % El documento está pensado para ser impreso en hojas por ambos lados (twoside)     % openright causa que los capítulos empiecen en hoja impar     \documentclass[12pt,letterpaper,twoside,openright]{report}     \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}      %Uso de tildes si desarrolla en Linux     %\usepackage[latin1]{inputenc}   %Uso de tildes si desarrolla en Windows     \usepackage{setspace} %define comandos \singlespacing, \onehalfspacing, \doublespacing     \usepackage[left=3.5cm, right=2.5cm, top=3.5cm, bottom=3.5cm]{geometry}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{array}     \usepackage{algorithm}     \usepackage{algpseudocode}     \algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}     \floatname{algorithm}{Algoritmo}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \usepackage{epsfig}     \usepackage{titlesec}     \usepackage{url}     \usepackage[pdftex,         breaklinks=true,         linktoc=page,         pdfborder={0 0 0},         pdftoolbar=true,         colorlinks=true,         linkcolor=blue,         citecolor=blue,         filecolor=blue,         urlcolor=blue]{hyperref}     \titleformat{\chapter}[display]      {\normalfont\LARGE\bfseries\centering}{\chaptertitlename\     \thechapter}{20pt}{\Huge}          \begin{document}     % Se incluye: portada, hoja de aprobación, copyright, dedicatoria, prefacio, agradecimientos, tabla de contenido, índices de figuras, de cuadros, de abreviaturas, resumen     \pagenumbering{roman}     \include{paginasIniciales}     \pagenumbering{arabic}     \include{capitulo_01}   % 1. IntroducciÃÂ³n     \include{capitulo_02}   % 2. Marco TeÃÂ³rico     \include{capitulo_03}   % 3. MetodologÃÂa     \include{capitulo_04}   % 4. Desarrollo     \include{capitulo_05}   % 5. Conclusiones     \part*{A P Ã N D I C E S}     \appendix     \include{apendice_1}    % ApÃÂ©ndice I     \include{apendice_2}    % ApÃÂ©ndice II     \include{apendice_3}    % ApÃÂ©ndice III          % ------------ Comienza la bibliografÃÂa ---------------     \newpage     \footnotesize     \singlespacing     \bibliographystyle{apalike}     \bibliography{mybib}     \end{document}


title: Spacing and alignment in equations

text: I didn't find a solution about how to add units to equations. I have my code               \begin{equation}       \eta = \frac{\Phi}{P}      [lm \cdot W^{-1}]       \label{eq:mv}     \end{equation}      which is centered by default. I need this:   1. Add some wide space (about 2 or 3 centimeters) between `\eta = \frac{\Phi}{P}` and `[lm \cdot W^{-1}]`.   2. Keep the alignment for the first part only `\eta = \frac{\Phi}{P}` so this would be centered and the other part would be right to it. Can you give me a hint, please?


title: Why does this error keep popping up even though I clearly fixed it?

text: This is the code I have:                   \begin{align}          \vec{l} \cdot \vec{n} & = \left \langle 1,2,3 \right \rangle$ \cdot \left \langle                  3,-3,1 \right \rangle \\                                & = 3 - 6 + 3 \\                                & = 0 \\          \end{align}      Now for some reason, I keep getting this message:                "Missing } inserted <inserted text> } \end{align}"      I clearly have completed my `}`.


title: Conditionally generate word explanations in appendix

text: Is there a way to declare a set of conceptual keywords with their explanation that will be taken and compiled into the appendix when one of the keywords is used throughout the documents body? For example, when having a text containing a `keyword`, the appendix should contain a section with the explanation of `keyword`:               I use the \AddExplanationToAppendixFor{keyword} in the text.      Appendix:               keyword: A very special word I would like to elaborate on: bla blah      It would be awesome if the resulting PDF would contain a hyperref to the respective appendix's section:               I use the keyword¹ in the text.      How could this be realized?