title: TikZ: two ellipses in different planes

text: How can show that two ellipses are in different planes?               \documentclass[convert = false, border = 1cm]{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}       \pgfmathsetmacro{\as}{2};       \pgfmathsetmacro{\bs}{1.95};       \pgfmathsetmacro{\cs}{sqrt(\as^2 - \bs^2)}       \pgfmathsetmacro{\al}{3};       \pgfmathsetmacro{\bl}{2.25};       \pgfmathsetmacro{\cl}{sqrt(\al^2 - \bl^2)}       \pgfmathsetmacro{\xs}{abs(\cs - \cl)}            \draw (0, 0) ellipse [x radius = \as cm, y radius = \bs cm];       \draw (\xs, 0) ellipse [x radius = \al cm, y radius = \bl cm];            \filldraw[black] (-\cs, 0) circle [radius = .1cm];            \filldraw[black] (-\cl + \xs, 0) circle [radius = .1cm];     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/q6BIe.png) From the image, we see that both ellipses are in the same plane. How can I rotate the small ellipse to make it appear as if the smaller ellipse is in a different plane? Using `rotate around` doesn't achieve that look. **Edit 2:** I am a little hesitant about using `xslant` and `yslant` since it appears that the ellipse is being shifted and stretched. Here is a poor picture(my phone camera flash refused to work) of two ellipse in different planes. ![enter image description here](http://i.stack.imgur.com/hsiZv.jpg) If adjust my smaller ellipse, it stretches and appears to shift dramatically. From the image below, the focus appears to be in the center of smaller ellipse now and it has elongated. ![enter image description here](http://i.stack.imgur.com/R02tl.png) **Edit:** So I found this post Why isn't the arc drawn on the good plane using tikz-3dplot in Tait-Bryan convention but I don't fully understand the code. However, the poster was able to rotate ellipse and have a better visual appeal and the poster could define the plane it is in such as `xy`, `yz`, and `xz`. How could I adapt this code to my situation?


title: Drawing circles in LaTeX

text: How do I draw a circle and its surrounding polygons, for example an octagon, in LaTeX?


title: Fixing errors in citations using biblatex

text: I'm trying out biblatex which so far seems wonderful when it works. The process creates a plethora of files, and when I make a mistake (eg referring to a bibliographical entry incorrectly), I get to a point where I can't run either latex or biber without an error. The only way I can figure out to get out of this mess is to remove the .bbl file. Some details:   * I'm using biblatex v1.1 and biber 0.7.2.   * the error I get in latex is "Undefined control sequence...\missing {referencex}" and then it seems that the .bcf file is incomplete   * I'm running latex with whatever the defaults in TeXShop are, and using biber from the command line Some questions:   * Is this the correct workflow?   * Is there an easier way to have it automatically deal with errors or do I manually have to remove these files when things get messed up?   * can I get texshop to remove .bbl files using the trash aux files menu command?


title: Best figure format practice to use?

text: What is the best file format to use when typesetting in LaTeX? I really prefer eps for all my Matlab work, and now I found here on site ( Which figure type to use: pdf or eps? ) that people recommend pdf instead. Also, I like converting with LaTeX so I can get more or less realtime preview in DVI. But problems arise when I have raster graphics to include - since it is not possible to make DVIs with rasters I currently encapsulate them in eps, but it looks bad - if I don't enter any sizing options, image looks enlarged, and automatically smudgy and bad. The same problem occurs with epss from Matlab, but scaling them down doesn't make them smudgy since it is real vectors. How come they appear enlarged?


title: Insert a symbol at the end of line

text: I want to insert a symbol (`\Box`) at the end of the line.


title: Incorrectly Formatted Font in PDF?

text: I'm looking at a pdf generated with LuaTex with an embedded FontAwesome (CIDType2C) and I see the following: in the TopDict there is a FontMatrix [.001 0 0 .001 0 0], and then in the CID Font Dict for all the characters there is another FontMatrix [.001 0 0 .001 0 0] While these are both equal to the default they are both explicitly specified in the font. According to the CFF spec, when a FontMatrix is specified (not-defaulted) in both the TopDict and the FontDict they should be multiplied together. This is giving a matrix of [.000001 0 0 .000001 0 0] but it is clearly incorrect as it's making all the characters 1000x too small. I saw an earlier thread (from 5 years ago) talking about embedded pdf fonts being forced to [.001 0 0 .001 0 0] regardless of FontMatrix settings but I've seen and handled plenty of fonts where this is not the case. For now I'm going to hack my reader to skip multiplication when both the TopDict and FontDict FontMatrices specify 1/1000 for transformation, but I believe this is an error with the font output.


title: Vim-Latex: Double-Quote Automatically Replaced

text: I use Vim with Vim-Latex plugin to edit my LaTeX documents. I have the problem that whenever I want to insert a double quote ("), it automatically get replace by (``). Any idea how can I disable that while still having Vim-Latex enabled?


title: Multivariate polynomial long division using LaTeX

text: How do I typeset polynomial long division using multiple variables in LaTeX? I am hoping to be able to do polynomial long division using 2 or more divisors. Currently, the packages I am using are:               \usepackage[psamsfonts]{amsfonts}     \usepackage{sudoku}     \usepackage{natbib}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{epsfig}     \usepackage{makeidx}     \usepackage{array}     \usepackage{enumerate}     \usepackage[usenames]{color}     \usepackage{setspace}     \usepackage{latexsym}     \usepackage[dvips]{graphicx}     \usepackage{eucal}     \usepackage{polynom}      I know that there are a lot of packages that I am using which are unrelated to my question, but I wouldn't want to use conflicting packages. I thought the the `polynom` package would be my solution, but one of the disclaimers in the package is that "Multivariate polynomials are currently not supported." Any help would be greatly appreciated.


title: Writing a line from two sibling nodes in a TikZ tree

text: Recently I am struggling on TikZ and it is really difficult to find options and solutions considering it is such a huge and comprehensive library. What I actually would like to do is drawing, in a tree, a line that connects two adjacent sibling nodes. That's all. What is the best solution?


title: Using \lccode / \lowercase{...} trick with double quote mark

text: My question was inspired by this question in which it is described how to map `"#1"` in maths mode to `\text{#1}`:               \begingroup\lccode`~=`"       \lowercase{\endgroup\def~}#1"{\text{#1}}     \mathcode`"="8000      As an exercise I decided to make a function `DefineMathText` such that `\DefineMathText{\~}` would turn all occurences of `~#1~` within maths mode into `\text{#1}`:               \documentclass{article}     \usepackage{amsmath}     \def\DefineMathText#1{         \begingroup         \lccode`~=`#1\lowercase{\endgroup%           % do \def~#1~{\text{#1}}           \def~##1~{\text{##1}}}         % make #1 active in maths mode         \mathcode`#1="8000     }     \begin{document}     \DefineMathText{\~}     This is a test: $a+b+c ~ test~$.     \end{document}      It works. **But** , when I try to make the special character a double quote ", it fails:               \DefineMathText{"}     This is a test: $a+b+c " test"$.     % Runaway argument?     % test"$ \end {document}     % File ended while scanning use of ".      Attempt 2 suffers from the same error:               \DefineMathText{\"}      I think it may have something to do with `"` being matched to the right quote only. Yet if I do the definition directly (the first 3-liner) everything compiles and works. **Is there some way I can get`\DefineMathText` to work with a double quote " ?** Possibly related: I guess this is the same question as asking how to do `\DefineShortVerb{"}` in the `fancyvrb` package (say for some odd reason I wanted to map `"xxxx"` to `\verb!xxxx!`). P.S. - this question is independent of how use(ful|less) the functionality is. `\text{...}` is not that hard to type and possibly clearer in the source.


title: How to arrange mdframed side by side?

text: How to arrange `mdframed` side by side, like `mdframed1` `mdframe2`               \begin{mdframed}[roundcorner=10pt]      table 1     \end{mdframed}     \leavevmode     \hspace{2cm}     \begin{mdframed}[roundcorner=10pt]      table 2     \end{mdframed}


title: Adjust a Grid of Photos

text: I am using the following code snippet to place 11 figures into a 3x4 grid:               \begin{figure}[htbp]     \caption{\label{fig:aliev-panfilov-frames}The result of monodomain model     combined with Aliev-Panfilov.}     \subfigure[t=0]{\includegraphics[width=.32\textwidth]{figs/AP/1}}     \subfigure[t=10]{\includegraphics[width=.32\textwidth]{figs/AP/50}}     \subfigure[t=20]{\includegraphics[width=.32\textwidth]{figs/AP/100}}\\     \subfigure[t=30]{\includegraphics[width=.32\textwidth]{figs/AP/150}}     \subfigure[t=40]{\includegraphics[width=.32\textwidth]{figs/AP/200}}     \subfigure[t=50]{\includegraphics[width=.32\textwidth]{figs/AP/250}}\\     \subfigure[t=60]{\includegraphics[width=.32\textwidth]{figs/AP/300}}     \subfigure[t=70]{\includegraphics[width=.32\textwidth]{figs/AP/350}}     \subfigure[t=80]{\includegraphics[width=.32\textwidth]{figs/AP/400}}\\     \subfigure[t=90]{\includegraphics[width=.32\textwidth]{figs/AP/450}}     \subfigure[t=100]{\includegraphics[width=.32\textwidth]{figs/AP/501}}     \end{figure}      which result in the following figure: ![Grid](http://i.stack.imgur.com/jVHwN.png) As you see, the pictures seem a bit small and there is a lot of white space in the page. How can I reduce the space between the pictures and make the margin smaller to make the pictures look larger? Note that, I don't want to change the margin for all the pages of the document.


title: Problems with tikz tree growth on secondary levels in trees

text: I have the following code:               \begin{tikzpicture}[grow=right, sloped]     \tikzstyle{level 1}=[level distance=1.3cm, sibling distance=1cm]     \tikzstyle{level 2}=[level distance=1.2cm, sibling distance=1cm]     \node[bag] {$S_i$}         child[grow=left] {             node[bag] {$S_{i+1}^{(1)}$}                         child {                     node[end, label=left:                         {$S$}] {}                     edge from parent[-latex]                     node[above] {$W$}                 }                 child {                     node[end, label=left:                         {$S$}] {}                     edge from parent[-latex]                     node[above] {$B$}                 }                 child {                     node[end, label=left:                         {$S$}] {}                     edge from parent[-latex]                     node[above] {$B$}                 }                 edge from parent[-latex]                 node[above] {$W$}         }         child[grow=right] {             node[bag] {$A$}                     child {                     node[bag] {$ \dots S_{i+1}^{(k_1)}$}                     edge from parent[-latex]                     node[above] {$w$}             }             child {                     node[bag] {$S_{i+1}^{(2)}$}                     child {                          node[bag] {$S_{i+2}^{(2)(k_{\dots})}$}                          edge from parent[-latex]                          node[above] {u}                     }                     child {                          node[bag] {$S_{i+2}^{(2)(2)}$}                          edge from parent[-latex]                          node[above] {u}                     }                     edge from parent[-latex]                     node[above] {$w$}             }             child {                     node[bag] {$S_{i+1}^{(1)}$}                     child {                          node[bag] {$S_{i+2}^{(1)(k_{\dots})}$}                          edge from parent[-latex]                          node[above] {u}                     }                     child {                          node[bag] {$S_{i+2}^{(1)(2)}$}                          edge from parent[-latex]                          node[above] {u}                     }                     child {                          node[bag] {$S_{i+2}^{(1)(1)}$}                          edge from parent[-latex]                          node[above] {u}                     }                     edge from parent[-latex]                     node[above] {$w$}             }             edge from parent[-latex]                     node[above] {$B$}         };     \end{tikzpicture}      Having in preamble               \tikzstyle{bag} = [text width=1.5em, text centered]     \tikzstyle{end} = [circle, minimum width=3pt,fill, inner sep=0pt]      My problem is that the branch on the right generates collisions and the tree does not expand automatically. Basically speaking nodes do overlap. How can i avoid this??? Thanks


title: Citing in the form "(Name, Year)"

text: Im currently writing a paper with the iop/emulateapj template (http://hea- www.harvard.edu/~alexey/emulateapj/). I want the following citation style to work: > Defining what life is is a complex matter (Smith, 2012). However, the work > of Anderson et al. (2013) models life as a random walk, with successful > applications to the social sciences. However, what I get instead is this: > Defining what life is is a complex matter (Smith 2012). However, the work of > Anderson et al. (2013) models life as a random walk, with successful > applications to the social sciences. Note that the comma after the citation to Smith's work is what I want. My bibliography looks like this:               \begin{thebibliography}{}     \bibitem[Anderson et al.(2013)]{And13} Anderson, T., 2012, Journal of Life,      289, pp. 1209-1250.     \bibitem[Smith(2012)]{Smith12} Smith, H., 2012, Journal of The Matrix,      143, pp. 313-320.     \end{thebibliography}      And my code in that part of the LaTeX code looks like this:               Defining what life is is a complex matter \citep{Smith2012}. However, the work of      \citet{And13} models life as a random walk, with successful applications      to the social sciences.      How can I do this?


title: How to center a specific caption?

text: I'm having a problem with centering my figure captions. Particuarly, I know that we can use `\usepackage[justification=centering]{caption}` to center captions, however, I'm interested in just centering a specific caption. I've read the caption manual but no luck, so my question is: How can I center a specific caption?


title: Why should I avoid the a4 and aeguill packages?

text: In this answer am I being told, that I shouldn't use the `a4` and the `aeguill` packages. Why should I do that, and what should I use instead?


title: New environment using mdframed

text: I'm trying to write a collection of problems and their solutions for my course's textbook. I've created an exercise environment. I'm currently using the `mdframed` package to create a leftbar that spans the exercise descriptions. Here are some of my issues and questions:   * Is it possible to create an exercise environment like mine so that "Exercise ---" appears on the same line as the exercise description (so no line breaks)?   * Should the leftbar in my example be changed any? Does it go too far above/below the text? It seems like the bar goes farther above the text than it does below the text.    * How would I change my example so that instead of a leftbar, the entire exercise environment (not including the solutions) is shaded a light gray?              \documentclass[11pt]{article}          \usepackage{amsmath,amssymb,amsfonts}     \usepackage{color, linegoal}     \usepackage{amsthm,array}     \usepackage[framemethod=tikz]{mdframed}     \usepackage[margin=1.2in]{geometry}          % Exercise environment     \definecolor{ExerciseColor}{gray}{0.65}          \newenvironment{exercise}[1]     {\mdfsetup{     skipabove=\topsep,     skipbelow=\topsep,     innertopmargin=0pt,     innerbottommargin=4pt,     leftmargin=-13pt,     splitbottomskip=0ex,     splittopskip=0ex,     topline=false,     leftline=true,     bottomline=false,     rightline=false,     innerrightmargin=0pt,     innerlinewidth=2pt,     font=\normalfont,     frametitle={\textbf{Exercise #1.}},      linecolor=ExerciseColor,     }     \begin{mdframed}%     }     {\end{mdframed}}          % Solution environment     \newenvironment{solution}{\begin{proof}[\itshape Solution]}{\end{proof}}          \begin{document}     \title{Title}     \author{Author}     \date{\today}     \maketitle          \section*{\centering \bfseries \S 1.3 Exercises}          \begin{exercise}{1.3.1}     Here is an exercise. Here is an exercise. Here is an exercise. Here is an exercise. Here is an exercise. Here is an equation:     \[     a + b = c.     \]     Here is an exercise.      \end{exercise}     \begin{solution}     Here is my solution. Here is an equation:     \[     1+2 = 3.     \]     Here is my solution.      \end{solution}          \begin{exercise}{1.3.5}     Here is an exercise. Here is an exercise. Here is an exercise. Here is an exercise. Here is an exercise. Here is an equation:     \[     a + b = c.     \]     Here is an exercise.      \end{exercise}     \begin{solution}     Here is my solution.     \end{solution}          \end{document}      ![Output:](http://i.stack.imgur.com/fWnxU.png)


title: pdfLatex warning : PDF inclusion : invalid other resource which is no dict : ignored

text: i am receiving this problem when attempting to add an existing PDF into a latex document               pdfTeX warning: /usr/texbin/pdflatex (file ./filename.pdf): PDF inclusion     : invalid other resource which is no dict (key 'ProcSets', type <array>); ignored.      Any help on this, happening on 2 different file i am trying to include in the PDF output


title: How do I add a static number to \recurselevel?

text: I currently have:               \dorecurse{8}{          \startcombination[3*3]     {\externalfigure[confcard.pdf][page=\recurselevel, width=98mm]}}     {\externalfigure[confcard.pdf][page=\recurselevel+2, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+4, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+6, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+8, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+10, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+12, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+14, width=98mm]}{}     {\externalfigure[confcard.pdf][page=\recurselevel+16, width=98mm]}{}     \stopcombination     }      Because I've got some _incredibly_ fiddly layout requirements that normal imposition won't handle. (Specifically, double-sided imposition mapping 18 90mmx54mm pages to one double-sided a4 page. I've decided to use external figure, since filterpages won't pipe to combinepages. However, as I'm trying to solve this in the general case by using dorecurse, how do I manipulate \recurselevel to add a static modifier for each one? The final layout is               {first side}     [1,3,5]     [7,9,11]     [13,15,17]     {second side}     [6,4,2]     [12,10,8]     [18,16,14]


title: Upright blackboard lower case greek in mtpro2

text: I have yet another problem with the `mtpro2` package in LaTeX. The claim is that they have lower blackboard greek both italic and upright. However there is no way of accessing the upright version in LaTeX, in plain TeX you just use `\mhbi\upmu` for example and it works however `\mathbb{\upmu}` does not work in LaTeX. Any ideas for a work around?


title: Asymptote: globally define latexmkrc

text: In section 7 of the Asymptote manual is suggested that for a better use of the LaTeX integration via `latexmk` one need to put the file `latexmkrc` into the folder of its own `*.tex` file. However I was wandering if it was possible to define this command globally in `latexmk` avoiding to put the file `latexmkrc` every time it is needed.


title: How can I get an 'undefined control sequence \begin{thebibliography}{1}'?

text: I am trying to add a bibliography to my document. I create a test.tex:               \documentclass[twocolumn, a4paper]{ieicejsp}     \bibliographystyle{plain}     \begin{document}          Cite\cite{GDE3}     \bibliography{bibliography}          \end{document}      I run the `bibtex` command and get a               test.aux=>text.bbl      Done!      Then I try to run the `LaTeX` and get an error:               'undefined control sequence \begin{thebibliography}{1}'      But the contents of `text.bbl` file are:               \begin{thebibliography}{1}          \bibitem{GDE3}     Saku Kukkonen and Jouni Lampinen.     \newblock Gde3: the third evolution step of generalized differential evolution.     \newblock In {\em IEEE Congress on Evolutionary Computation}, pages 443--450,       2005.          \end{thebibliography}      Please, what am i missing? EDIT1: The exact error message was:               This is pTeXk, Version 3.141592-p3.1.11 (euc) (Web2C 7.5.4)      %&-line parsing enabled.     (./test.tex     pLaTeX2e <2006/11/10>+0 (based on LaTeX2e <2009/09/24> patch level 0)     (./ieicejsp.cls     Document Class: ieicejsp      ) (./test.aux) (./test.bbl     ! Undefined control sequence.     <argument> \refname                          \@mkboth {\refname }{\refname }     l.1 \begin{thebibliography}{1}      EDIT2: As Joseph Wright suggested, adding               \newcommand*{\refname}{Bibliography}      just before the               \begin{document}      command solved the problem. Thank you! You have no idea how much you helped me.


title: How to draw straight lines along a smooth curve in tikz?

text: I want to draw straight lines along a smooth path in tikz. I tried to use the `decorations.markings-solution` described in Drawing paths/nodes along a path in Tikz and used it like this:               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \begin{document}     \pagestyle{empty}          \begin{tikzpicture}[       decoration={         markings,         mark=between positions 0.125 and 0.90 step 0.0625 with {\draw[thin] (0,-0.2)--(0,0.2);},       }     ]         \draw[thick,postaction={decorate}] (-2.5,-1) to (-2,-0.5)             to [out=45,in=180] (0,-1.5)             to [out=0,in=180] (2,-1)             to [out=0,in=-90] (2.5,0)             to [out=90,in=0] (1.5,1.5)             to [out=170,in=0] (0,1.5)             to [out=180,in=45] (-2,-0.2)             to [out=220,in=45] (-2.5,-1);     \end{tikzpicture}               \end{document}      The result looks like this: ![enter image description here](http://i.stack.imgur.com/7v8oW.png) However, this is not what I want. I want two pictures and in the first one, the straight lines should remain straight, i.e. I want them only to be shifted and not to be rotated. How can I achieve that? According to the tikz documentation, the reason why the lines are rotated is that `decoration.markings` automatically uses a coordinate system, where the x-axis is tangent to the curve. Is there any way to use the global coordinate system? In a second picture, I would like the straight lines to be rotated, but I want to do this myself. To calculate the degree of rotation, I need the current number of my line, which should be given by `\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}` and the total number of lines. How do I get this?


title: Preventing floats of being before section

text: I have a rather large file with many chapters, before every chapter I use `\cleardoublepage` to get to a new doublepage but flushing all floats beforehand. In the beginning I also had position specifiers on all floats but I then had the issue that all floats were pushed to the end. This answer suggests to remove the position specifiers, and that worked fine for me. However, I now have the problem of sometimes seeing the following order               float     chapter title      instead of               chapter title     float      as it is in my document. I know there's a `\FloatBarrier` command but if I use it after the `\section{chapter title}` command, the float gets pushed to the next page, which is not what I want. I wonder, how do I properly place floats and prevent them to be before my chapter titles? * * * A minimum working example is given here:               \documentclass[11pt,a4paper,twoside]{article}          \begin{document}          \section{Section 1}     \cleardoublepage          \section{Section 2}          \begin{table}       \begin{tabular}{|l|}         This is just a table \\       \end{tabular}     \end{table}          \end{document}


title: How to create a math environment with one row on one side, and two on the other?

text: I have the following math equations:               \begin{align*}     &\mathcal{H} = \mathcal{H}^{(0)} + \mathcal{H}^{(1)} \\     &\mathcal{H}^{(0)} = -\frac{\hbar^2}{2m}(\nabla_{1}^{2} + \nabla_{2}^{2}) - \frac{e^2}{r_1} - \frac{e^2}{r_2}\\      &\mathcal{H}^{(1)} = \left(\frac{e^2}{R_{ab}} + \frac{e^2}{r_{12}} - \frac{e^2}{r_{a1}} - \frac{e^2}{r_{b2}}\right)     \end{align*}      I would like to have the first equation vertically centred on the left, drop the where, and simply have the other two on the right side in two different rows. How can this be achieved? I've tried using tables, but this requires tabu or arrays. Source I would like an amsmath only solution, but if this isn't possible then anything that isn't floating would be great.


title: How can i get a HUGE LaTeX picture?

text: I can't find a way to get a huuuge LaTeX "picture" This is my best attempt, http://www.forkosh.com/mimetextutorial.html Fill in:                \Huge s=\frac{v^2+v_o}{2a}      so, how is the best way to get a huge one?


title: Increase the thickness of node border in TikZ

text: Suppose I have a node in the shape of a circle. How can I make its border thicker?               \node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};


title: How to force the use of external graphics for selected figures while externalization is enabled?

text: I would like to force using external graphics (if exist) for a few figures in my document. The following does what I want but document-wide:               \tikzset{external/mode=graphics if exists}      however, I would like to apply it for selected figures only. Is there any command working similar way to               \tikzset{external/export next=false}      but instead of remaking the `tikz` figure, make `tikz` use the external graphics?


title: Controlling numbering of theorems in Beamer

text: I have a theorem that is too long for one frame. As `\allowframebreaks` does not work within the `\theorem` environment, I am trying to find a workaround. I can simply end the theorem environment on one frame and begin a new theorem environment on the next, thus splitting my theorem into two. However, this upsets the numbering system. Is it possible to manually change the theorem count so that I can re-use the last theorem number?               \documentclass{beamer}     \usetheme{CambridgeUS}     \setbeamertemplate{theorems}[numbered]          \begin{document}          \begin{frame}     \begin{theorem}     This is the beginning of Theorem 1.     \end{theorem}     \end{frame}          \begin{frame}     \begin{theorem}[cont.]     This is the continuation of Theorem 1.     \end{theorem}     \end{frame}          \begin{frame}     \begin{theorem}     This is Theorem 2.     \end{theorem}     \end{frame}          \end{document}


title: Combining Helvetica and Symbol fonts with mathspec

text: I want to combine Helvetica and Symbol fonts so that Helvetica handles the Latin letters, while Symbol handles the Greek letters. Mathspec and XeLaTeX does a reasonably good job of this, but I cannot get the parentheses and the percentage symbol (and possible other things) to look right. For example, the following code               \documentclass[10pt]{article}     \usepackage{mathspec}     \setmainfont{Helvetica}     \setmathsfont(Digits,Latin,Greek)[Uppercase=Italic,Lowercase=Italic]{Helvetica}     \begin{document}     \Huge This looks right: $L_e$ (\%)          \Huge This looks wrong: $L_e\,(\%)$      \end{document}      produces the following document: ![enter image description here](http://i.stack.imgur.com/Bxj0h.jpg) (In order to keep things simple, I omitted the `\setmathsfont(Greek){Symbol}` command, since the problem shows up without it.) How do I make XeLaTeX use Helvetica for the the parentheses and the percentage symbol when I am in math mode?


title: BibTex trouble: publisher/address location and removing fullstops

text: I have the same problem as at Editing .bst file to modify printing of publisher and address information but I just don't get the solution. When Guido writes "change publisher to address and address to publisher in the body of the two functions" It simply doesn't work. I have taken:               FUNCTION {format.org.or.pub}     { 't :=       ""       address empty$ t empty$ and         'skip$         {           t empty$             { address "address" bibinfo.check *             }             { t *               address empty$                 'skip$                 { ", " * address "address" bibinfo.check * }               if$             }           if$         }       if$     }      And turned it to:               FUNCTION {format.org.or.pub}     { 't :=       ""       publisher empty$ t empty$ and         'skip$         {           publisher "publisher" bibinfo.check *           t empty$             'skip$             { publisher empty$                 'skip$                 { ":  " * }               if$               t *             }           if$         }       if$     }      and not only am I stuck with the ", " but there is no change in the position of the publisher and address. I have also changed               FUNCTION {format.publisher.address}     { publisher "publisher" bibinfo.warn format.org.or.pub     }      to:               FUNCTION {format.publisher.address}     { address "address" bibinfo.warn format.org.or.pub     }      Must I change `format.publisher.address` to `format.address.publisher`? Another question: My Journal names look like "J. Funny. Names." and I need them to look like "J Funny Names". All my bib entries are entered with the fullstops after the abbreviations. Can I tell BibTeX to remove them some how? I found some code "remove.dots" which works well for author names but not for journal names. My code reads:               {           journal           remove.dots           "journal" bibinfo.check           "journal" output.check           format.vol.num.pages output         }      Any idea what is wrong?


title: 3 out of 5 appendices missing

text: EDIT: This problem has been solved. It was as easy as this: one of the appendices had an `\end{document}`due to a copy-paste mistake. So if you ever have this problem, search for something like that. I apologize for any time wasted on problem solving here guys... I have a problem including appendices in my latex article. When I compile, just 2 of the 5 appendices I have included in the code are actually included in the pdf. Both the text and the TOC are missing from the 3 last appendices. TexShop compiles without complaints. The code used are:               \documentclass[a4paper,english,12pt]{article}          \usepackage{graphicx, tabularx, amssymb, amsmath, wasysymb, booktabs, url, fancyhdr}     \usepackage{appendix, enumerate, geometry, parskip, cite}     \usepackage[hang,small,bf]{caption}     \usepackage{geometry, parskip}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \begin{document}          %Document contents          %------------- The Bibliography -------------     \addcontentsline{toc}{section}{References}     \newpage     \bibliography{Bibliography/ref}     \bibliographystyle{plain}   %unsrt          %------------- Appendices -------------     \newpage     \appendix     \addappheadtotoc          \input Appendices/appendix_group-logs     \input Appendices/appendix_spgr-task     \input Appendices/appendix_group-contract     \input Appendices/appendix_group-contract-revised     \input Appendices/appendix_group-agreement          \end{document}      Does somebody have an idea about what's going on? Thanks in advance! =)


title: Are there alternatives to nicefrac that does not shrink numerator and denominator

text: I want a fraction like nicefrac, but with normal size denominator and numerator. Is there a package for that?


title: Sort subsections alphabetically

text: We need to make a paper that describes a list of interfaces. The assignment however says we need to sort the interfaces alphabetically. Because this list is quite long (20+) I am looking for a way to sort the subsections (each subsection describes an interface) alphabetically. Without having to move code myself. Is there a package that can handle this? Here is a sample of the code:               \newcommand{\interfaceItem}[5]{        \subsection{#1}\label{interfaceItem:#1}        \paragraph{Paragraph 1}#2        \paragraph{Paragraph 2}#3        \paragraph{Paragraph 3}#4        \paragraph{Paragraph 4}#5     }


title: RTL Refrences in XePersian package

text: In my Persian paper all references are in Latin script. How I can insert references (Bibliography) RTL in XePersian, and how I can convert digits in URLs to west Arabic. MWE:               \documentclass{article}     \usepackage[]{hyperref}     \usepackage{xepersian}     \settextfont{Yas}     \setdigitfont{Yas}     \begin{document}          % 1st issue     \url{http://www.theregister.co.uk/2006/06/15/wikipedia_can_damage_your_grades}          % 2nd issue     برای nها ....          ابتدا nام          \end{document}


title: ! Missing $ inserted. <inserted text> $

text: I am new to LaTeX and I am using it to write a report with several chapters (main page in which I include the other pages). I got this error:               C:\Users\hussam\Desktop\thèse\latex\thèse\thèse.brf          ! Missing $ inserted.          <inserted text>                           $          l.52      without any other information. `thèse.brf` is a totally white page. I looked at line 52 of all my documents but couldn't find any problem.


title: How to write letters in bold in the math mode?

text: In mathematics, a letter, say, g, can stand for a scalar, while a letter in bold, e.g., **g** stands for a vector. Here is my question: How can one turn the letter into bold in the math mode? For example, how can I turn g here into bold?               $$-\nabla p+\mu\nabla^2u+g\delta(x-x_0)=0 $$


title: TeX works very slowly

text: LaTeX compiler on my Debian system works very slowly. For example, file including only a few lines of text compiles several minutes. All this time LaTeX does something, but what exactly it does is what I can't figure out. I think it is unnormal. I have texlive installed on my computer:               $ tex --version       TeX 3.1415926 (TeX Live 2009/Debian)       kpathsea version 5.0.0       Copyright 2009 D.E. Knuth.          $ cat easyfile.tex       \documentclass[12pt,a4paper]{article}       \usepackage[english,russian]{babel}       \begin{document}       Here is some text.       \end{document}            $ latex easyfile.tex      This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     (./easyfile.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for   english,usenglishmax,dumylang,nohyphenation, bulgarian, ukrainian, russian, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size12.clo))     (/usr/share/texmf-texlive/tex/generic/babel/babel.sty     (/usr/share/texmf-texlive/tex/generic/babel/english.ldf     (/usr/share/texmf-texlive/tex/generic/babel/babel.def))     (/usr/share/texmf-texlive/tex/generic/babel/russianb.ldf     (/usr/share/texmf-texlive/tex/latex/cyrillic/t2aenc.def)          Package babel Warning: No input encoding specified for Russian language on  input line 136.          )) (./easyfile.aux (/usr/share/texmf-texlive/tex/latex/cyrillic/t2acmr.fd))     [1] (./easyfile.aux) )     Output written on easyfile.dvi (1 page, 240 bytes).     Transcript written on easyfile.log.      Can somebody help me?


title: Is there something like \providetikzstyle similar to \providecommand?

text: I have `standalone` figures that I include in my document. These figures use statements like `\providecommand{\HypotenuseLabel}{$h$}` which allows the figure to have a default label, and which can be over written via `\newcommand{\HypotenuseLabel}{$x^2+y^2$}` in the main file that includes this figure to customise this diagram for that particular application. This figure also has statements like `\tikzstyle{HypotenuseLineStyle}=[red, very thick, opacity=0.5]` which are used to draw this particular line. I would like to change this to something of the nature `\providetikzstyle` so that this style only gets defined in the figure if it is not already defined. Is there an easy way to do this? Here is a related question but for environments.


title: If we are about to write a minimal ConTeXt primer, what to cover?

text: I need to write a ConText primer for those who never used ConTeXt, and have no LaTeX background. What should I cover in order to give a precise overview of this system?


title: How to avoid superfluous space in the initial state of a tikz automaton

text: When drawing tikz automata, I always omit the inital text and only use an arrow to indicate that a state is initial. To this end, I add               \tiksset[initial text={}]      to the preamble of my tex file. This works fine so far, but when I was positioning several automata horizontally in a figure, I noticed that the initial arrow occupies to much space. You can see this phenomenon in the following picture. The red rectangle shows the bounding box. ![tikz picture](http://i.stack.imgur.com/4TNYj.png) I suspect that this happens because the node for the text is still there and has a nonnegative size. However, I would like to have the bounding box start where the arrow starts. Does anyone know how to achieve this without changing the bounding box by hand? Tanks! The picture above results from the following code.                   \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{automata}     \tikzset{initial text={}}          \begin{document}          \begin{tikzpicture}         \node[state, initial] {};         \draw[red, dashed] (current bounding box.south west) rectangle (current bounding box.north east);     \end{tikzpicture}          \end{document}


title: Bibtex with no references title

text: I am working on writing a scientific poster in LaTeX, and I want to include a few references for my work. Because this is a poster, I have my own customized headers for different sections, and don't want my related works to have a separate title. Essentially I have something like this:               \begin{textblock}{5.5}(19.5,11)     \CHead{Related Work} %a newcommand header I wrote     \bibliographystyle{acm}     \bibliography{mybib}     \end{textblock}      And it comes out with a header called "Related Work" like I want, but it also under that says "References", which I don't want. I found a few websites that said that I could override this with something like               \renewcommand\refname{}      But all this does is take the word "References" out, but the space allotted for the title is still there. Is there a way to completely eliminate the title and any space it may take up?


title: Centering a subcaption

text: I have three figures that I want to place next to each other. That is fine. In addition, however, each `subfigure` has a caption on its own and the crucial thing with these is that I have to have two lines for each of them generated by a linebreak. I managed that using `\newline`, but now the subcaption always starts on the left edge of the subfigures and is not centered any more (which does not look nice). What can I do to resolve my problem?               \documentclass{scrartcl}     \usepackage{graphix,subcaption}          \begin{document}       \begin{figure}[t]         \centering           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{\centering Nice image1.\newline Another line.}               \label{fig:NiceImage1}           \end{subfigure}           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{\centering Nice image 2.\newline Another line.}               \label{fig:NiceImage2}           \end{subfigure}           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{\centering Nice image 2.\newline Another line.}               \label{fig:NiceImage3}           \end{subfigure}


title: Printing pages in Colour: hyperref and glossaries

text: I am using the packages `hyperref` and `glossaries` and the the links are appearing in colour in the pdf. I have some colour in a few pages which I want to print in colour. Now, the problem is that the links are also printing in colour. When I use `\usepackage[hidelinks]{hyperref}` I get the following error. `Option clash for package hyperref. \usepackage`. How to solve this issue?


title: Problems in citing in Beamer

text: I'm trying to cite an article in a `frame` and display the URL at the same time (`Beamer`). But all I get for the citation is a print out of the key. As for the URL I can't make it work.               \documentclass{beamer}     \usetheme{Warsaw}     \usepackage[english]{babel}      \usepackage{csquotes}      \usepackage[]{biblatex}     \addbibresource{science.bib}     \begin{document}     \begin{frame}          In  \textcite{Jilvero2012181} found in   --i want to print the url here--%     \end{frame}     \end{document}      `science.bib` is in the same folder with the main `.tex` document. The `.bib` file contains the following               @article{Jilvero2012181,     title = "Heat requirement for regeneration of aqueous ammonia in post-combustion       carbon dioxide capture ",     journal = "International Journal of Greenhouse Gas Control ",     volume = "11",     number = "0",     pages = "181 - 187",     year = "2012",     note = "",     issn = "1750-5836",     doi = "http://dx.doi.org/10.1016/j.ijggc.2012.08.005",     url = "http://www.sciencedirect.com/science/article/pii/S1750583612001909",     author = "Henrik Jilvero and Fredrik Normann and Klas Andersson and Filip Johnsson",     keywords = "Chilled ammonia",     keywords = "Post-combustion",     keywords = "\{CO2\} capture",     keywords = "Aqueous ammonia",     keywords = "Heat requirement "     }      I am using TeXworks. Any suggestions?


title: Word clouds in LaTeX

text: In this question a solution using ConTeXt. I'm not familiar with this engine (i.e. ConTeXt), and thus I don't know how to "translate" Aditya's answer to LaTeX... I downloaded IBM's tool, and now what...? Anyone tried it with LaTeX? I want invoke IBM's tool on my LaTeX's text and obtain a .png. What should be the best way to achieve this?


title: Undefined control sequence \subfloat - using subcaption

text: I get the same error as in this question, however I had already switched from the `subfig` package to `subcaption` a while back. I am trying to recompile a TeX file on Linux that was fine before on OS X. So I find this in my class file:               % \usepackage{subfig} % --- this replaces subfigure      \usepackage{subcaption} % --- this replaces subfig      I look into the `subcaption` documentation, and in §3.4.4 it does mention the `\subfloat` command. Reading other Stackexchange posts on this, I gather that many people believe `subcaption` does _not_ define `subfloat` while others insist they _do_ get that command. My interpretation from this is that perhaps `subfloat` was part of a specific version of `subcaption` and maybe was removed later?


title: Mouseover with Hyperref Internal Links

text: I have a PDF that is heavily internally linked. (I use terms and link them to the appendix definition with `\term{termname}{displaytext}`, which uses `\hyperlink` from the hyperref package.) I'm trying to create mouseover text to be part of that command. (1) Is there a way inside hyperref to have a mouseover for `\hyperlink`? I have tried cooltooltips, but it creates URL hyperlinks, not internal reference links, so it won't work with what I want to do. (2) Is there a way to make cooltooltips create an internal link instead of a URL link? I've also examined the tooltip code published on several answers (but not as a package) by a user, where he creates a `\tooltip` command. Unfortunately, his command nulls out my links. (I've tried `\tooltop{\term{name}{display}}` and `\term{name}{\tooltip{display}}`. The internal links don't work.) (3) Is there a way to modify that code so that it accepts an internal reference argument? TLDR version: I want to create a command `\term{internal link}{display}{mouseover}`, and none of the existing packages seem to allow this. * * * Added code example:               \documentclass[12pt,oneside]{book}          \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage[log-declarations=false]{xparse}%To enable better command creation     \usepackage[%ALWAYS LOAD THIS LAST             colorlinks=false,             pdfborder={0 0 0},     %        pdftitle=\booktitle,     %        pdfauthor=\theauthor,             pdfpagemode=UseNone,             bookmarksopen=true,             bookmarks=true          ]{hyperref}               \colorlet{Conds}{Black}     \colorlet{Terms}{Green}          \newenvironment{terms}{\small\bfseries\color{Terms}}{}     \newenvironment{conds}{\ttfamily\color{Conds}}{}          \newcommand\envtype{}     \DeclareDocumentCommand \Link {o m O{}}{%         \begin{\envtype}%         \IfNoValueTF{#1}{\lowercase{\hyperlink{\envtype:#2}}{#2#3}}{\lowercase{\hyperlink{\envtype:#1}}{#2#3}}%         \end{\envtype}%         }               %%%%Specific Links:     \newcommand{\term}{\renewcommand{\envtype}{terms}\Link}     \newcommand{\cond}{\renewcommand{\envtype}{conds}\Link}     %%(Many other link types cut)          \begin{document}     Lots of text. \term{Test} this if you can. Trying it with cooltooltips \cond{foo}[bars] everything up.          \newpage     \hypertarget{terms:test}{Here's my link: Test is a term.}          \hypertarget{conds:foo}{Here's another link: Foo is a condition.}     \end{document}      The reason for the complicated \Link command is two-fold: First, it handles the \lowercase problem correctly, allowing me to always reference the lowercased version for the link. Secondly, I have 5 types of keywords, each with their own formatting, all of which use \Link, and coding it once makes the document work consistently.


title: Local \theorempreskipamount and \theorempostskipamount of ntheorem

text: It seems that `\theorempreskipamount` and `\theorempostskipamount` cannot be set locally meaning that they will keep the same value for all the defined environments even though the user may wish different values for theorems, definitions or proofs. Is there a work around to avoid that?


title: how to redefine the `\\` in a tabular environment?

text: I want to redefine the tabular environment, such that each for example               \begin{tabular}{c|c}     AAA&BBB\\     CCC&DDD\\     \end{tabular}      would produce (for example)               AAA,BBB;CCC,DDD;      **Question 1** In order to redefine the `&`, i use the following :               \catcode`\&=\active     \gdef&{,}      Which works, but i don't know if it is safe. In particular, this works only if i put this outside from the definition of `tabular`, but i would prefer to have it inside, so that this definition vanishes when i quit the `Tabular`. **Question 2** I don't know how to redefine the `\\\`.


title: How to sort the order of pages so that they can be printed in a folded book?

text: I am using ConTeXt to print a book. Each page is A5, but the print store can only print on A4 paper, so they print 2 pages on each side of the A4 paper. I used this code to specify the layout:               \setuppagenumbering[location=bottom, alternative=doublesided]     \setuppapersize[A5]      The print store does not know how to properly sort these A5 pages for printing. They requested I give them a PDF set for A4 paper, already sorted properly. If there are 100 pages, then the first piece of paper would look like this:               (front of 1st paper)      ________ ________     |        |        |     |        |        |     |        |        |     |__100___|____1___|          (back of 1st paper)           ________ ________     |        |        |     |        |        |     |        |        |     |____2___|___99___|      The second piece of paper would look like this:               (front of 2nd paper)      ________ ________     |        |        |     |        |        |     |        |        |     |___98___|____3___|          (back of 2nd paper)      ________ ________     |        |        |     |        |        |     |        |        |     |____4___|___97___|      The pages are then assembled like this:                     /|=====>>/|=====>>/|     100->/ |  98->/ |  96->/ |         /  |     /  |     /  |        / 99|    / 97|    / 95|        |\  |    |\  |    |\  |        | \ |    | \ |    | \ |        |  \     |  \     |   |        |   |    |   |    |   |        | 1 |    | 3 |    | 5 |         \  |     \  |     \  |          \ |<-2   \ |<-4   \ |<-6           \|=====>>\|=====>>\|      I have tried internal options in ConTeXt and pdfbook, but I cannot see any options which sorts the pages in this way.


title: Beamer: Mixing absolute overlays with relative overlays

text: I have the following code snippet that creates the overlays in the desired order. However, setting the `beamerpauses`-counter myself is quite ugly. How can I avoid setting the counter myself and get the same output? The problem seems to come from mixing `\only` with relative overlay numbers, but I'm not sure how to avoid this.               \documentclass{beamer}     \begin{document}     \begin{frame}{Slide}     \begin{itemize}     \item Blabla     \item Blabla     \item<3-> Blabla     \end{itemize}     \only<1-2>{         A\only<2>{B}     }     \only<3->{ \setcounter{beamerpauses}{3}         \only<+>{First:}         \only<.>{$1+1=$}         \only<+>{$2$}         \only<+>{Second:}     }     \end{frame}     \end{document}


title: Set width of text (included from external file) only - keep rest of page as is

text: # What I want I have a document that includes text from several external `.tex` files. These files can contain `\section{}` commands or `\begin{quote}` environments. Furthermore, I use the `lineno` package to number the lines of the includes files. To allow writing notes to the printing documents, I would like to limit the width of the included text. This width, however, should only affect the included text and not other parts of the document. ## Code example Basically, my code should look like this:               \chapter{Entry number 10}     Text text text text text text text text text text text text text          % HELP ME: command to set text width          \linenumbers     \input{external.tex}     \nolinenumbers          % HELP ME: command to reset text width      ## How the result should look like               ENTRY NUMBER 10     ===============          Text text text text text text text text text text text text text          1. Included part 10-a     ---------------------          2. Text of the included part that has     3. a smaller text width that even works     4. when quotations or other subsections     5. are used.          6. Note the line numbers.      # Minimal Example Here is an example to demonstrate what I want and what does not work:               \documentclass{article}     \usepackage{lineno}     \usepackage{lipsum}          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % imagine this part is included from a file %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % show line numbers     \linenumbers          % HELPME: something that does not correctly work     \par\begingroup\rightskip12em          % a paragraph with correct margin     \section{This is an example for a very long subtitle}     \lipsum[1]          % margin is ignored for quoted text     \begin{quote}     \lipsum[1]     \end{quote}          % margin is ignored for item lists     \begin{itemize}     \item \lipsum[1]     \end{itemize}           \par\endgroup          % no line numbers beyond this     \nolinenumbers     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \end{document}      Note that text in the `quote` environment and the list does not have a correct margin. # What I tried   * `minipage`: Works perfectly, but does not work if the included document is longer than one page. A `minipage` environment that floats over many pages would help   * `\newgeometry{}` command of the `geometry` package: Works perfectly, but always begins a whole new page. I, however, want the change to only affect the included part and not the surrounding text.   * Using `adjustwidth` environment from the `changepage` package: This does not work when the text in the environment contains `\section{}` commands.    * Using an environment and change its width: Had several issues... For instance, the margin was ignored as soon as the included text contained a `quote`. Other environment could not cope with `\section{}` commands in the included text. # Another problem               \documentclass{report}          \usepackage{changepage}          \begin{document}          \chapter{Text1}          \begin{adjustwidth}{1cm}{2cm}          \section{Text2}          Text3          \begin{quote}     Text4     \end{quote}          \end{adjustwidth}          \end{document}      The reason why I did not use `adjustwidth` before was that the above example has a compilation error: "Something's wrong--perhaps a missing \item." in the line of `\begin{quote}`. The error disappears when I remove either of   * the line `\chapter{Text1}`   * the line `\section{Text2}`   * the line `Text3`   * the `adjustwidth` environment How can this be? **Edit** : I asked a new question (Strange compilation problem using adjustwidth environment from changepage package) and close this one.


title: how to flip margin watermark in a two sided document

text: I have a problem that i didn't figure out how to solve it. I want that the background flips each time we turn the page. This way pair pages will have the background margin on the left , and the impair pages will have the background margin photo at right. I wish i was clear.               \usepackage{background} %see the background doc for more info          \backgroundsetup{%         scale=1,              angle=0,              opacity=.7,           color =black,         contents={\begin{tikzpicture}[remember picture,overlay]         \node at ([yshift=0cm,xshift=-9.7cm]current page) {\includegraphics[scale=1.10]{Margin.png}};         \end{tikzpicture}}       }


title: Use of rnd in pgfplots

text: The following code fails to compile due to the use of `rnd`:               \documentclass{article}     \usepackage{tikz,pgfplots}     \pgfplotsset{width=7cm,compat=1.3}     \begin{document}          \begin{tikzpicture}     \begin{axis}     \addplot {x};         \draw [] (axis cs: 0,0)           \foreach \i in {1,...,10} {             -- ++ (axis direction cs: 0.2,rnd)             };        \end{axis}     \end{tikzpicture}     \end{document}      Why is this happening and how can it be rewritten to work as intended?


title: Remove 'and' from biblatex' text citations

text: Since version 2.7, `biblatex` adds the word `and` before the last citation in a string of text citations. That's pretty nice, but this catch-all behavior is not always appropriate, as in the example below. The question is, how can I suppress the addition of `and` in cases where I know it would not be appropriate?               \documentclass{article}     \usepackage{filecontents}     \usepackage[style=authoryear]{biblatex}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1972,         AUTHOR = "John Lennon",         TITLE = "Peace on earth",         YEAR = "1972",         LOCATION = "London",         PUBLISHER = "Music Press"}     @BOOK{lennon1974,         AUTHOR = "John Lennon",         TITLE = "More peace on earth",         YEAR = "1974",         LOCATION = "London",         PUBLISHER = "Music Press"}     @BOOK{mccartney1975,         AUTHOR = "Paul McCartney",         TITLE = "Let's talk about music instead",         YEAR = "1975",         LOCATION = "London",         PUBLISHER = "Music Press"}     @UNPUBLISHED{harrisonms,         AUTHOR = "George Harrison",         TITLE = "My dirty secrets about the Beatles"}     @BOOK{starr1985,         AUTHOR = "Richard Starkey",         TITLE = "My life",         YEAR = "1985",         LOCATION = "London",         PUBLISHER = "Music Press"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     You can find a lot of interesting material on the Beatles,     such as \textcites{lennon1972}{lennon1974}{mccartney1975},     the never published manuscript by \citeauthor{harrisonms},     and finally Ringo Starr's autobiography \parencite{starr1985}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/BiFHG.png)


title: Section+Subsection in the header AND chapter in the footer using book (memoir)

text: I' writing my thesis in LyX with `book` (`memoir`) style. I would like to personalize the headers and footers but I cannot use the `fancy` package since I'm in the `memoir` style. So (being a novice in LaTeX) I tried to use pre-existing code that I modified to create a new page style. The headers work fine; I got the section and the subsections respectively on the even and odd pages. I also got the page number on the footer on both pages but I cannot add the chapter number on the footer. How could I proceed to get the footer with the current chapter number on each page in addition to the pre-existing page number?                 \nouppercaseheads              \makepagestyle{mystyle}              \makeheadrule {mystyle}{\textwidth}{\normalrulethickness}               \setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}                   %head         \makeevenhead{mystyle}{\small\leftmark}{}{}          \makeoddhead{mystyle}{}{}{\small\rightmark}              %foot         \makeevenfoot {mystyle} {\small\thepage} {\small\leftmark} {}         \makeoddfoot {mystyle} {} {\small\leftmark} {\small\thepage}              \makeatletter              \makepsmarks{mystyle}{%           \createmark{section}{left}{shownumber}{}{\space}           \createmark{subsection}{right}{shownumber}{}{\space}           \createmark{chapter}{right}{shownumber}{\@chapapp\ }{\space }}              \makeatother              \pagestyle{mystyle}


title: I am getting error with my longtable when I use footnotes

text: Here is the code:               \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}         \usepackage{booktabs,caption,fixltx2e}     \usepackage{threeparttable}     \usepackage[fleqn]{mathtools}     \usepackage{float}             \usepackage{lscape}     \usepackage{longtable}                    \begin{document}     \begin{landscape}      \thispagestyle{empty}      \resizebox{\linewidth}{!}{\begin{threeparttable}         \begin{longtable}[c]{cllllll}         \caption{Table caption} \label{tablelabel} \\         \toprule            some toprule \\         \midrule         \endhead              longtable              \bottomrule         \end{longtable}      \begin{tablenotes}[para,flushleft]         Footnote tex      \end{tablenotes}      \end{threeparttable}      \end{landscape}     \end{document}      and the error that I get:               [58])     Runaway argument?     {\begin {threeparttable} \begin {longtable}[c]{cllllll} \caption {Ads\ETC.     ! File ended while scanning use of \Gscale@box@dd.     <inserted text>                      \par      l.169 \input ch2          ?


title: Enabling "--shell-escape" on TeXworks under MiKTeX

text: After resolving the problem on my previous question, I applied to finally install Gnuplot 4.6; _and after a successful installation_ I had to allow the `\--shell-escape` option on TeXworks, so I added a new Typesetting Tool on the Preferences menu, called `pdfLaTeX+ShellEscape`. The lines of code inserted into the tool configuration are listed below:               $synctexoption     -undump=pdflatex     --shell-escape     $fullname      The problem is that when I try to compile my MWE (MYname.tex) with the above specified option:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     %     \begin{document}     \begin{tikzpicture}     %     \begin{axis}[no markers,samples=30]     \addplot gnuplot{atanh(x)};     \end{axis}     %     \end{tikzpicture}     %     \end{document}      I get this messge:               ! Package pgfplots Error: Sorry, the gnuplot-result file 'MYname.pgf-plot.table'     could not be found. Maybe you need to enable the shell-escape feature? For      pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke      '>> gnuplot <file>.gnuplot' manually on the respective gnuplot file..          See the pgfplots package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.7     \addplot gnuplot{atanh(x)};     ?       I am running TeXworks 0.44, and until now it didn't show this kind of stubbornness because I compiled every document without problems. I did also some research and I found that I could write `-enable-write18` but _even after this try I get the same errmsg_ and so I'm stuck again with the plots problem (although I discovered a powerful program like Gnuplot I don't know how to set LaTeX properly). P.S. : Sorry for the deleted question with the same title, that issue was created by a simple human error.


title: How to make a code fragment in ieeetran class

text: What I wish to achieve is rectangle around code, with code in the font format as shown. How should I achieve this format? ![Code Fragment example code](http://i.stack.imgur.com/CU60e.gif)


title: BibTeX - escape @ sign

text: How can I escape an 'at sign' (`@`) is BibTeX? I'm trying to cite a paper with "SETI@Home" in the title, and BibTeX complains. I tried `\@` or `@@` but neither seem to work.


title: Mix hyperref and varioref

text: I like that `hyperref` gives me results like               \ref{eq:first-equation}   % yields "equation (1)"      and that `varioref` gives results like               \vref{eq:first-equation}  % yields "1 on the following page"      but I would like even more if the resulting `vref` yielded "equation (1) on the following page," to distinguish from tables, etc. Is there any way to get this to happen? My current preamble includes               % ...     \usepackage{varioref}     \usepackage{refstyle}     % ...     \usepackage[unicode=true]{hyperref}     % ...      in this order, if it matters. * * * When I remove `refstyle` and switch it out for `cleveref`, all of my `\eqref`s break. For example               \eqref{4-range-of-validity}      used to produce `equation (8)` but now produces `(??)`.


title: Creating a Feynman loop diagram with feynmf

text: I try to draw this Feynman diagram with feynmf in latex: ![Feynman diagram wanted to draw](http://i.stack.imgur.com/4Dn5W.png) Here is my ansatz:               \begin{fmffile}{edm_neutrino}         \begin{fmfchar*}(50,40)     \fmfkeep{vlm1}     \fmfleft{o}\fmflabel{$\nu_\tau$}{o}     \fmfright{i}\fmflabel{$\nu_\tau$}{i}     \fmftop{g}\fmflabel{$\gamma_\mu$}{g}     \fmf{plain, tension=1.5}{i,v1} \fmflabel{$Y_{ib}$}{v1}     \fmf{phantom, label=$\tau_j$, tension=0.8, left=1.0,tag=1}{v2,v1}     \fmf{dashes_arrow, label=$W^+$, left=-1.0, tension=0.4}{v2,v1}     \fmf{plain, tension=2.5}{v2,o}     \fmfposition     \fmfipath{p[]}     \fmfiset{p1}{vpath1(__v2,__v1)}     \fmfi{fermion}{subpath (0,2length(p1)/3) of p1}     \fmfi{fermion}{subpath (2length(p1)/3,length(p1)) of p1}     \fmfi{photon}{point length(p1)/3 of p1 -- point 2length(p1)/3 of p1}     %should go to g     \end{fmfchar*}          \end{fmffile}      But I don't know how to connect the point on the W^- line to the external point g Is there any possibility to write something like that?                \fmfi{photon}{point 2length(p1)/3 of p1 -- point g}      This line is not correct, I know. But how to fix? Thank you very much for reading! matthias


title: Advanced graphical formatting for LaTeX: graphics outside margins

text: I've been learning LaTeX for a year now, and I've gotten quite confident with it when it comes to academics texts. I am really happy with how my thesis worked out. Now, I want to start making more visually appealing and less appealing documents. What I want to do and have currently no idea how, is to put horizontal color boxes in the absolute margin of the left side, so as there is no white in the left side of the page. More or less what I want to do can be seen in this document (made by word): https://drive.google.com/file/d/0B0LE3gpWwmAaYmo5QzhZRmRZMUk/edit?usp=sharing Any idea on how to tackle this?


title: Manually sorting nomenclature elements (with grouping)

text: I am using `nomencl` package and I have grouped Nomenclature section into List of Abbreviations and List of Symbols. The order in List of Symbols is not what I wanted. how is it possible to sort the List of Symbols subsection manually. the sample code is:               \usepackage{nomencl}     \usepackage{ifthen}     \renewcommand{\nomgroup}[1]{      \ifthenelse{\equal{#1}{A}}{\item[\bfseries\sffamily\large{List of Abbreviations}]}{      \ifthenelse{\equal{#1}{S}}{\item[\bfseries\sffamily\large{List of Symbols}]}{}}     }     \begin{document}     \printnomenclature     \nomenclature[a]{PDF}{Probability Density Function}     \nomenclature[s]{$\gamma$}{Phase noise}     \nomenclature[s]{$\jmath$}{Imaginary unit}     \nomenclature[s]{$a$}{Vector of unknowns}     \nomenclature[s]{$\hat{a}$}{Vector of floats}     \nomenclature[s]{$\check{a}$}{Vector of fixed}     \end{document}      the order in symbol group will output as: $\check{a}$ , $\gamma$, $\hat{a}$, $\jmath$ and $a$ so I want to manually sort it into $a$, $\hat{a}$, $\check{a}$, $\gamma$ and $\jmath$ as an example.


title: Math in table doesn't work

text: I have a table, which code is:               \documentclass[a4paper]{report}          \usepackage{booktabs}     \usepackage{fullpage}     \usepackage{multirow}     \usepackage{array}     \usepackage{threeparttable}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}          \begin{table}[h!]        \begin{threeparttable}         \begin{tabular}{llc}         \toprule     \multicolumn{2}{c}{Cluster} & Logic expression\tnote{1}\\         \midrule     1&High performer& $ F\land E\land P\land N $ \\     2&Cash provider& $ F\land E\land P\land \lneg N $ \\     3&AMF& $ F\land E\land \lneg P\land N $\\     4&Doubtful case& $(F\land E\land \lneg P\land \lneg N)\lor (\lneg F\land \lneg E\land P\land N)$ \\     5&Low performer& $\lneg E\land (\lneg F\lor \lneg N\lor P)(F\lor \lneg P)$ \\     6&Possible AMF& $E\land \lneg F\land \lneg P\land N$ \\     7&CFO& $E\land \lneg F\land (P\lor \lneg N)$ \\     8&SCF needy& $\lneg F\land E\land \lneg P\land N$ \\     9&Potential cash provider& $\lneg F\land \lneg E\land P\land \lneg N$ \\         \bottomrule         \end{tabular}%       \begin{tablenotes}         \item[1] Convention: AND $\rightarrow \land$, OR $\rightarrow \lor$, negation $\rightarrow \lnot$.        \end{tablenotes}       \caption{Logic expressions for each cluster.}       \label{boolean}%       \end{threeparttable}     \end{table}          \end{document}      Now... It does not compile, giving me the error:               ! Undefined control sequence.     l.20 2&Cash provider& $ F\land E\land P\land \lneg N $ \\      I know more or less where the problem is (or at least I suppose to know): is like as latex looks at the equations as if they are written one after the other, like:               $ F\land E\land P\land N $     $ F\land E\land P\land \lneg N $      or something like that, and therefore returns an error when it sees the second `$...$`; the problem is that I don't have any idea on how to solve the issue...   * Changing `$...$` with `\\(...\\)` makes no difference;   * Changing `$...$` with `\begin{math}...\end{math}` makes no difference as well, the same as put a `\begin{math}` before the first equation and one `\end{math}` after the last (my desperate tentative :D );   * General purpose google searches didn't give relevant results (unfortunately). I am quite sure it's something trivial... but I cannot understand what!


title: Problems in installing the latest edition of Texmaker

text: I am trying to install Texmaker 4.1 on 32-bit Ubuntu 12.04 LTS. I downloaded the file from the official site and I am trying to install by using the following command:               sudo dpkg -i texmaker_ubuntu_12.04_4.1_i386.deb      However, this results in an error of whose origin I am unable to pinpoint. The error message is as follows:               $ sudo dpkg -i texmaker_ubuntu_12.04_4.1_i386.deb      Selecting previously unselected package texmaker.     (Reading database ... 617874 files and directories currently installed.)     Unpacking texmaker (from texmaker_ubuntu_12.04_4.1_i386.deb) ...     dpkg: error processing texmaker_ubuntu_12.04_4.1_i386.deb (--install):      trying to overwrite '/usr/share/texmaker/doc14hu.png', which is also in package texmaker-data 3.4-1~ubuntu12.04.1     dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Errors were encountered while processing:      texmaker_ubuntu_12.04_4.1_i386.deb      What can I do to remedy the situation? Any help and advice is greatly appreciated. EDIT: The issue is solved, I used the following command to install the program:               sudo dpkg -i --force-overwrite texmaker_ubuntu_12.04_4.1_i386.deb       However, a lot of overwriting were performed as I inferred from the output in the terminal. I think this syntax was necessary since I have a previous version of Texmaker installed but it should be noted that when I tried after uninstalling the previous version of the Texmaker I ran into exactly the same issues.


title: lstlistoflistings entry in table of contents name is always 'Contents'

text: I'm trying to add a list of code listings to my document, with a reference to it in the TOC. By simply calling               \lstlistoflistings      I end up getting everything I need (the list of listings, an entry in the TOC, etc) EXCEPT for the fact that the entry is always named 'Contents'. I was able to change the title of the listing page itself by running the command               \renewcommand\lstlistlistingname{List of Code}      but this doesn't change the reference in the table of contents. EDIT: Adding a minimal working example               \documentclass{Thesis}          \usepackage{listings}          \begin{document}     \renewcommand\lstlistlistingname{List of Code}          \tableofcontents          \lstlistoflistings          \lstset{caption=Some Code}     \begin{lstlisting}     Some code     \end{lstlisting}     \end{document}


title: Package pdfpages: includepdf gives strange font on first included page. Only in Preview and Skim

text: I have a 4 page pdf `abstract.pdf` generated from another latex file that I want to include in a latex document. I did it like this:               \documentclass[a4paper]{article}     \usepackage{pdfpages}     \begin{document}     \includepdf[pages=-]{../abstract/abstract.pdf}     \end{document}      My problem is that the text on the first included page looks strange, while starting from the second page everything looks good. Text from the first page of the original `abstract.pdf`: ![original](http://i.stack.imgur.com/HxP7K.png) Text from the first page of the included `abstract.pdf`: ![included](http://i.stack.imgur.com/XJUnJ.png) Starting from page 2, the text looks fine again. When I optimize the pdf filesize with the following GhostScript command, the text from page 1 isn't even selectable anymore and only outlines seem to remain:               gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET \     -dBATCH -sOutputFile=out.pdf in.pdf      I have this problem when opening the pdf with Preview and Skim. If I open the pdf with Adobe Acrobat, the text looks normal and is selectable after optimizing with GhostScript. What goes wrong? I would like my pdf to be of equal quality when opening with Preview or Skim. I am using MacTeX2013 on Mac OS X 10.8.4.


title: Biblatex clear URL field for entries in a certain category

text: Can you please help me to process biblatex entries. I want to...   1. Print separate bibliographies for online and offline entries   2. Both `@online` entries and `@misc` entries with a url-field should go into the 'online' category. All other entries should go into the 'offline' category.   3. I want don't want to display the `url` and `urldate` of offline entries. I have tried combining answers from the following webpages:   * url field for certain reference types with biblatex   * separating two types of articles from bibtex using `\printbibliography` When should I use `\AtEveryCitekey` and when should I use `\AtEveryBibitem`? Can I issue multiple `\AtEvery***` commands, or will one command replace the other? Here is my minimal (not fully) working example. I can always either get the categorization or the clearing of fields to work, but not both:               \documentclass{article}     \usepackage{biblatex}          \DeclareBibliographyCategory{online}     \DeclareBibliographyCategory{offline}     \AtEveryCitekey{%         \ifboolexpr{%              test {\ifentrytype{online}}             or             ( test {\ifentrytype{misc}}               and not test {\iffieldundef{url}}             )         }         { \addtocategory{online}{\thefield{entrykey}}\clearfield{url}\clearfield{urldate} }         { \addtocategory{offline}{\thefield{entrykey}} }     }               \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{c1,           author         = "Authors1",           title          = "{Title of article}",           collaboration  = "Collaboration",           year           = "2012",           url            = "http://www.sciencedirect.com/",           urldate        = "2012-07-12",     }     @online{c2,           author         = "Authors2",           title          = "{Title of website}",           year           = "2011",           url            = "http://www.gmx.at/",           urldate        = "2012-06-10",     }     @misc{c3,           author         = "Authors3",           title          = "{Title of video}",           year           = "2012",           howpublished   = "Youtube video",           url            = "http://youtube.com/watch/123",           urldate        = "2012-06-06",           }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \cite{c1,c2,c3}          \printbibliography[category=offline,title={Offline Articles}]          \printbibliography[category=online,title={Online Articles}]          \end{document}


title: Formal Writing Style Correction on Latex

text: > **Possible Duplicate:**   >  How to perform advanced spell checking of latex documents? Microsoft Word has a nifty property of style correction, where it can find phrasal verbs, passive voice and things that usually are not suitable for scientific writing. Is there any editor that support this for latex?


title: Reference a todonotes missingfigure?

text: I am using the `todonotes` package's `missingfigure` command as placeholders for images that I will add to my document in the future. Is there anyway to `\ref{}` these images? That is, I want to add text like:               `This is shown in Figure \ref{OneOfMyMissingFigures}.`      Is this possible? I didn't see any way to give it a label in the `todonotes` documentation.


title: titlesec - set top margin for the appendix and bibliography

text: A while ago I was helped using titlesec to format the chapter title for my thesis. Today a reviewer says that the appendix and the bibliography need 1in top margin. How do I do it? Thanks.               \documentclass[letter, 12pt]{report}     \usepackage{cite}     \usepackage{amsthm}     \usepackage{amsmath}     \newtheorem{definition}{Definition}     \usepackage[tight,footnotesize]{subfigure}     \usepackage{graphicx}     \usepackage{fullpage}     \usepackage[breaklinks = true]{hyperref}      \usepackage{color}     \usepackage{caption}     \usepackage{url}     %\usepackage{lscape}     %\usepackage{times}     %\usepackage{minted}     %\usepackage{listings}          \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}     \usepackage{setspace}     \doublespacing     \usepackage{indentfirst}     \usepackage[top=1.0in, bottom=1.25in, left=1.5in, right=1.0in]{geometry}          \usepackage{etoolbox}          \patchcmd{\thebibliography}{\chapter*{\bibname}}{\chapter*{\MakeUppercase{\bibname}}}{}{}          \usepackage{titlesec}      \titlespacing*{\chapter}{0pt}{1in}{20pt}      \titleformat{\chapter}[display]        {\centering\normalfont\normalsize}{\MakeUppercase{\chaptertitlename} \thechapter}{0pt}{\small}           \titleformat{\section}          {\normalfont\normalsize\bfseries}{\thesection}{1em}{}      \titleformat{\subsection}          {\normalfont\normalsize\bfseries}{\thesubsection}{1em}{}      \titleformat{\subsubsection}          {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}          \begin{document}     \raggedright     \setlength{\parindent}{1cm}     \chapter{INTRODUCTION}     \chapter{PROBLEM}     \appendix          \chapter{CODES}     \chapter{LIST OF PUBLICATIONS}          \begin{thebibliography}{100}     \bibitem{Niesen}     Niesen.     \newblock Social networks/blogs now account for one in every four and a half minutes online.     \newblock {\em http://blog.nielsen.com/nielsenwire/global/social-media-accounts-for-22-percent-of-time-online/}.     \newblock (June 2010).     \end{thebibliography}     \end{document}


title: Non-uniform spacing in table of contents (XeLaTex book, tocloft, Indic script)

text: I am typesetting a book in XeLaTex (TexLive 2012 on Windows) in Sanskrit. I am using the tocloft package for table of contents. I want the font size to be bigger in the TOC, for which I use the following               \renewcommand\cftchapfont{\LARGE\bfseries}     \renewcommand\cftsecfont{\Large}     \renewcommand\cftchappagefont{\LARGE\bfseries}     \renewcommand\cftsecpagefont{\Large}      However, this has the undesired side-effect of making the spacing between section entries non-uniform. The spacing is now different depending on the glyphs above or below the characters. When I remove the above four lines, the spacing is perfectly uniform, but the default font size is too small. Any idea how to increase the font without impacting the spacing? Here is an MWE.               \documentclass{book}     \usepackage{titlesec}      \usepackage[titles]{tocloft}     \usepackage{polyglossia}     \usepackage{fontspec}     \setmainlanguage{sanskrit}     \setotherlanguage{english}     \setmainfont[Script=Devanagari]{Arial Unicode MS}     \newfontfamily\devanagarifont[Script=Devanagari]{Arial Unicode MS}     \newfontfamily{\englishfont}{Times New Roman}     \newcommand{\devanagarinumeral}[1]{%       \devanagaridigits{\number\csname c@#1\endcsname}}     \renewcommand\cftchapfont{\LARGE\bfseries}     \renewcommand\cftsecfont{\Large}     \renewcommand\cftchappagefont{\LARGE\bfseries}     \renewcommand\cftsecpagefont{\Large}     \usepackage{hyperref,bookmark}     \hypersetup{colorlinks,linkcolor=blue}     \pagenumbering{arabic}     \renewcommand{\thepage}{\large \devanagarinumeral{page}}     \begin{document}     \tableofcontents     \pagebreak     \chapter[कृत्तद्धितप्रकरणम्]{कृत्तद्धितप्रकरणम्}     \section[जगताम्]{जगताम्}     \section[अध्यात्मरामगङ्गा]{अध्यात्मरामगङ्गा}     \section[भक्तेषु]{भक्तेषु}     \section[मे]{मे}     \section[कथयिष्यामि]{कथयिष्यामि}     \section[ब्रूहि तत्त्वं]{ब्रूहि तत्त्वं}     \section[मया]{मया}     \chapter[धातुप्रकरणम्]{धातुप्रकरणम्}     \section[राज्यदानम्]{राज्यदानम्}     \section[पूर्णेन एकत्वम्]{पूर्णेन एकत्वम्}     \section[साक्षात्कथितं तव]{साक्षात्कथितं तव}     \section[तेऽभिहितम्]{तेऽभिहितम्}     \section[पुरा मम]{पुरा मम}     \section[प्राह]{प्राह}     \section[कश्यपस्य वरो दत्तः]{कश्यपस्य वरो दत्तः}     \end{document}


title: How to specify anchor styles in {forest} trees?

text: I'm using {forest} to make a simple tree and I want the edges for all nodes to be filled arrows (southward directed) of a larger than normal size (so that the image I'm creating resizes well when shrunken down). I've gotten as far as specifying the arrows, but am stuck... How do I transform the itty bitty arrows into nice big filled arrows?               \begin{forest}      for tree={edge=->}     [{\textbf{Footbridge Dilemma}}, circle, draw, text width = 5em, text centered       [{\textbf{Push \\Man}}, circle, draw, text width = 5em, text centered          [{\textbf{Man \\Dies}}, circle, draw, text width = 5em, text centered            [{\textbf{Workmen \\Saved}}, circle, draw, text width = 5em, text centered]          ]       ]       [{\textbf{Don't Push}}, circle, draw, text width = 5em, text centered          [{\textbf{Man \\Lives}}, circle, draw, text width = 5em, text centered            [{\textbf{Workmen Die}}, circle, draw, text width = 5em, text centered]          ]       ]     ]     \end{forest}


title: What is a good practice to achieve vertical placement? (e.g. a Titlepage)

text: **My titlepage looks right now like this:** ![enter image description here](http://i.stack.imgur.com/6aXjp.png) **using this code:**               \documentclass[a4paper,11pt,oneside,titlepage,german,final]{scrreprt}     \usepackage{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{hyperref}     \usepackage{stfloats}     \begin{document}          \begin{titlepage}          \begin{flushright}     \textbf{\textsc{University XY}}\\     {\small{\textsf{Department Z\\}}}     \end{flushright}          \begin{center}     \bigskip     {\huge{Masterthesis}}\\     \bigskip     {\huge{\textbf{How to vertical align in Latex}}}\\     \bigskip     {\today}\\     \end{center}          \textbf{Author}     \smallskip     \hrule     \smallskip     \begin{tabular}{ll}     Some: & texts \\      \end{tabular}     \end{titlepage}     \end{document}      * * * What I would like to know is, how I should define the _placements_ of the text-elements properly and not as some gross, linebreak, lineskip disaster. Where I would like to place the elemets:   1. the _Univerity_ should stay at the top-right corner, right aligned   2. the _author_ and following, should be at the bottom, left aligned, and in any case stay on this page   3. the _title_ should be at the center between the _University_ and the _author_   4. _Masterthesis_ should be at between _University_ and _title_   5. the _date_ should be between _title_ and _author_   6. I would like to be able to easily move _Title_ , _Masterthesis_ and _date_ (to change their relative vertical distance) Of course I could hack something, so that the output would met these requirements, but I am looking for a sound, a nice and dynamic solution - lacking of that much experience, I hope someone else has it. Many thanks in advance!


title: XeLaTex Undefined control sequence []] with \twocolumn

text: I'm using the IEEEconf documentclass. I want the abstract to span two columns directly after the title so I added the following:               \twocolumn[         \begin{@twocolumnfalse}             \maketitle         \end{@twocolumnfalse}         \vspace{2mm}         \hrule         \begin{abstract}             abstract text.         \end{abstract}         \hrule         \bigskip     ]      When I build this with XeLaTex, I get the following error:               Undefined control sequence. []]      However, when I first comment out the lines with `\twocolumn[` and `]`, keep the pdf open and build again, I keep getting the error, but the pdf is build normally. How can I prevent the error or tell XeLaTex to ignore this error?


title: Spacing issues with letterhead background

text: I have a letterhead background that I use on cover letters. I am having spacing issues with some text being obscured by the letterhead image. I have tried using `\\\`, `\\\\*`, `vspace{5in}` etc to no avail. **How should I ensure that my text is not obscured by the letterhead image?** The example pdf output is available here ![enter image description here](http://i.stack.imgur.com/CU9qv.png) and the letterhead image is available here. ![enter image description here](http://i.stack.imgur.com/ViI2B.jpg) Here is my example:               \documentclass[a4paper,12pt]{article}     \usepackage{setspace}     % \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{graphicx}     \setlength{\parskip}{10pt plus 1pt minus 1pt}     %\usepackage{hyperref}          \addtolength{\oddsidemargin}{-0.75in}     %\addtolength{\voffset}{-1.25in}     \addtolength{\textwidth}{1.75in}      %\addtolength{\textheight}{1.50in}     \usepackage{lipsum}     \thispagestyle{empty}               \usepackage{eso-pic}     \newcommand\BackgroundPic{     \put(0,0){     \parbox[b][\paperheight]{\paperwidth}{%     \vfill     \centering     \includegraphics[width=0.9\paperwidth,height=1.2\paperheight,     keepaspectratio]{Letterhead_example1.jpg}%     \vfill     }}}               \begin{document}     \AddToShipoutPicture{\BackgroundPic}          \parskip          \begin{flushright}     My Place, State \\      \today \\     \end{flushright}               \begin{flushleft}     To,\\     \textbf{Hiring committee}\\     People\\     And\\     others     \end{flushleft}     % \vspace{2pt}     \begin{center}      \textbf{Cover letter for that job that would lead me to a world of happiness}     \end{center}               \lipsum[1-7]                    \begin{flushleft}      Thank you,\\      \parskip 7.2pt      Me\\     Always me!!!!     \end{flushleft}          \end{document}


title: Label a complete enumeration

text: I am trying to create a simple enumeration and give it a label so I can access it. But the only thing I get in return is the number of the subsubsection. This is my code, which doesn't seem to work.               \begin{enumerate}     \label{eq_prm_1}              \item bla         \item moreBla          \end{enumerate}      Is it possible to encapsulate this piece in something that _is_ referenceable?


title: \blacksquare in .sty file

text: I am planning to have a `.sty` file for scibing notes. When modifying one that already exists online, I found that I could not use                \renewcommand{\qedsymbol}{\blacksquare}      or                \renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}      either to change the usual white square to the black one. So, how would I do this? On a similar note, if I wanted to add a blacktriangle, how would I do this? In case, the answer depends on how the rest of the `.sty` file looks, I am most willing to point to the file I am modifying. ## My `.sty` file:                \newtheoremstyle{myplain}      {10pt}{10pt}{\itshape}{}{\scshape}{.}{.5em}{}      \newtheoremstyle{mydefinition} {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}      \newtheoremstyle{myremark}     {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}           \renewcommand{\qedsymbol}{\blacksquare}   %replacing this line with                                                 %\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}                                                 % does not work either.           \newcounter{lecture}      \theoremstyle{myplain}      \newtheorem{thm}{Theorem}[lecture]      \newtheorem{lem}         [thm]{Lemma}      \newtheorem{pro}         [thm]{Proposition}      \newtheorem{cor}         [thm]{Corollary}      \newtheorem{claim}       [thm]{Claim}      \newtheorem{fact}        [thm]{Fact}           \theoremstyle{mydefinition}      \newtheorem{defn}       [thm]{Definition}      \newtheorem{eg}         [thm]{Example}      \newtheorem{assumption} [thm]{Assumption}      \newtheorem{openproblem}[thm]{Open Problem}      \newtheorem{problem}    [thm]{Problem}           \theoremstyle{myremark}      \newtheorem{remark}        [thm]{Remark}      \newtheorem{conjecture}    [thm]{Conjecture}           \numberwithin{equation} {lecture}      \numberwithin{figure}   {lecture}      \numberwithin{table}    {lecture}           \renewcommand{\fnum@figure}{\textsc{Figure~\thefigure}}      \renewcommand{\fnum@table}{\textsc{Table~\thetable}}           \renewcommand{\thesection}{\thelecture.\arabic{section}}      \renewcommand{\thepage}{\thelecture-\arabic{page}}


title: Why does the LaTeX kernel define \usepackage *and* \RequirePackage?

text: The ubiquitous `\usepackage` command is used to load packages in the preamble of a document; the command syntax is               \usepackage[<package-option-list>]{<package-list>}[<version>]      Actually, `\usepackage` is derived from the `\RequirePackage` command which, according to source2e, section 69.3, may be used in package or class files to load other packages. Contrary to `\usepackage`, `\RequirePackage` can also be used in documents _before_ `\documentclass` or in (LaTeX 2.09) compatibility mode:               \def\documentclass{%       \let\documentclass\@twoclasseserror       \if@compatibility\else\let\usepackage\RequirePackage\fi       \@fileswithoptions\@clsextension}     \@onlypreamble\documentclass      But if `\RequirePackage` can do everything `\usepackage` does and more, why the need for two different commands at all? Why doesn't the LaTeX kernel simply define one command (however named) for loading packages?


title: Problems with sectioning / toc

text: I've got a problem with my ToC / sectioning.   First of it all: my code:               \documentclass[a4paper, oneside, 12pt, listof=totoc, bibliography=totoc, titlepage]{scrreprt}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern} %Type1-Schriftart für nicht-englische Texte     \usepackage{graphicx} %%Zum Laden von Grafiken     \usepackage{setspace}     \onehalfspacing       %% 1,5-zeilig     \usepackage[a4paper, left=3 cm, right=4 cm, top=3 cm, bottom=1.5 cm]{geometry}       \usepackage{fancyhdr} %%Fancy Kopf- und Fußzeilen     \usepackage{longtable} %%Für Tabellen, die eine Seite überschreiten     \usepackage{bibgerm}     \usepackage{color}  %% für Farben     \usepackage{tabularx} %% Für komplexe Tabellen     \usepackage{cite}     %\usepackage{glossaries}     \usepackage{hyperref}     \usepackage{listings}     \usepackage{pdfpages}     \usepackage{helvet}     \usepackage[printonlyused]{acronym}      \fancypagestyle{plain}{}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[C]{\thepage}     \addtolength{\headwidth}{\marginparsep}% Die Kopfzeile soll     \addtolength{\headwidth}{0.5\marginparwidth}% verbreitert werden     \renewcommand{\headrulewidth}{1pt}% Keine Linie     \author{Matthias Fischer}     \title{Umsetzung der MSKBS in BA}     \begin{document}     \maketitle     \pagenumbering{Roman}     \setcounter{page}{2}     \newpage     \tableofcontents     \newpage     \chapter*{Abkürzungsverzeichnis}     \addcontentsline{toc}{chapter}{Abkürzungsverzeichnis}     \newpage     \listoffigures     \newpage     \listoftables     \newpage     \pagenumbering{arabic}     \setcounter{page}{1}     \renewcommand{\thesection}{\arabic{section}}     \section{Einleitung}     \newpage     \section{Grundlagen Rechnungslegung}     \subsection{IAS/IFRS}     \newpage     \section{Rechnungslegung in der Bank}     \subsection{IAS/IFRS}     \newpage     \section{Bank Analyzer}     \subsection{IAS/IFRS}     \newpage     \section{Umsetzung}     \subsection{IAS/IFRS}     \end{document}      Okay, now my specific problem:   If I do it this way, all my sections are "listed below" the "chapter" listoftables. And I don't want it this way. I want it "listed" as normal/individual section and not as "subsection".   If I change my sections to chapters the subsections start numbering at 1 and not at 1.1 or 2.1. ....   So I'd like to transform my table of content list of figures as section or manipulate my numbering. But I think it would "look" better not to use chapters. Is it possible to manipulate the "category" of toc and listof*? Do you have other suggestions?


title: compiling with tex4ht, how much time is needed?

text: I'm tryng to compile my academic thesis in html. I've compiled it with success in pdf, it is about 130 pages full of images and formulas. I want compile it in html to put on my website, i get `xhlatex thesis.tex` and after 70 mins is still compiling. It is normal???


title: Change the behavior of carriage return

text: Define an enhance `verse` environment, where stroke Carriage return key once make a `\\\`, twice make a `\par`, three times make a `\medskip`, four times and more make a `\bigskip`. An example would be:               \begin{enhanceverse}     The furthest distance in the world     Is not between life and death     But when I stand in front of you     Yet you don't know that I love you               The furthest distance in the world     Is not when I stand in front of you     Yet you can't see my love     But when undoubtedly knowing the love from both          Yet cannot be together                         ---Anonymous     \end{enhanceverse}      which should output a similar appearance.


title: figure numbering with endfloat and appendix

text: I have a document which has figures and tables. The document also has an appendix. The tables seem to be labeled normally (1...N), however the figures seem to be labeled A.1, A.2, etc. I would like my figures labeled 1...N as well. How does one do this? I am using LyX as my editor.


title: Creating a mask for printing glossy varnish over images

text: I'm interested in finding a better method for the following:   * creating a black mask over the images on all pages   * while removing (or covering with white) all the text and other elements   * but still allowing `memoir` to produce its trim marks with `showtrim`. This is used for printing a glossy varnish layer over the images (where the black mask is). Some printers call this a "UV mask". Before and after: ![before and after](http://i.stack.imgur.com/I2Q0t.jpg) For this, I did:   1. replace the image files with .pdf files that are black squares of the same size as the corresponding images   2. make a copy of the .tex files and delete all text   3. insert `\hspace` and other commands to get the `\includegraphics` stay at the same position This worked once, but it would be much better to find a less hack-ish method. Perhaps somehow saving the position and size of the images, covering the page with a white square and placing rectangles at the position of the images? Who knows. Can you think of a good method? Ideally something that could be then abstracted into a document class option `[varnishmask=true]` or similar.


title: Problem with conversion from OpenType to Type 1 fonts using otfinst

text: I would like to use a family of OpenType fonts with pdfLaTeX (more precisely, Utopia Std from Adobe). I have tried using the Python script `otfinst` following the clear guideline provided by Harrold Cavendish in How to install OTF fonts with otfinst.py?. I have followed all the steps, but when I run the script, I get the error message `Index Error: list index out of range`, and no file generation. I am using MikTeX 2.9 on Windows XP, and the script is in the same folder as the .otf files to be processed. Anyone could possibly help on this issue? I have checked online that this has been happening to some people, but nobody seemed to provide an answer.


title: How to typeset micro fonts?

text: Here is the scenario: I'm having a exam and I'm allowed to take 1 printed/written page (cheat sheet) to exam. I want to prepare a cheat sheet with small fonts utilizing the entire page.   1. I tried using the document without headers (`\maketitle`) and still there are margin spaces left blank that I would like to fill up as well. I would like to use the entire page and divide the page into several parts and fill each parts - just like a table with multiple row and columns. The font wont go below 10pt.    2. I would like to have may be 6pt (I'm not sure)? Any help on achieving this wil be much appreciated. Thanks!


title: How to fill a dynamically generated table with dynamic content?

text: how do I generate a tabular dynamically while filling it with dynamic data? Example: Let's say I have               \def\N{10}      and I want to generate a table with `\N` columns, where the top cell of each column contains the number of the column, like               \begin{tabular}{|c|c|c|...|c|}     1 & 2 & 3 & ... & N     \end{tabular}      This was the closest I got:               \newtoks\cols     \cols={}     \newcounter{i}     \setcounter{i}{1}     \loop     \cols=\expandafter{\the\cols \arabic{i}}     \ifnum\value{i}<\N     \cols=\expandafter{\the\cols &}     \stepcounter{i}     \repeat          \begin{tabular}{|*{\N}{c|}}     \the\cols     \end{tabular}      but due to the `\expandafter`, this gives me ten columns, each containing a 10. Is there a way to perform something like a partial expand? I'd like to expand only the `\arabic{i}` but of course not the `&`.


title: Live-Preview of LaTeX on OSX

text: I use the following to live-preview my LaTeX files:               latexmk -pvc -pdf my_file.tex      However, in OS X, Preview only updates when you bring it into focus (e.g. you click on the the window). In many ways, this detracts from the experience of having a live-preview. Are there any PDF viewers in OS X that are particularly well suited for live- preview?