title: Incrementing counters with subsubsection instead of subsection

text: I have previously tried to make a document with questions and answers. In a previous question I was shown a great way to do this, using the `answer` package in combination with `hyperref`. Adding another answer hyperlinked to the question itself The problem is that the document has grown quite large, counting over 100 pages. I need to reset the counters for the answers and questions at the `subsubsection` instead of at the 'subsection'. I tried changing the counters in the answer provided, but alas either the document failed to compile, or nothing changed at all. Here is a minimal working example with the counters reset at the subsection level http://spot.pcc.edu/~chughes/buzzard/ I know this must seem like a trivial question, but for a novice like me the code was quite hard to interpret. A even more minimal example, the backhypperrefs fail here. Also I am not able to reproduce the error where it fails to distinguish between the subsubsections               \documentclass{article}          \usepackage{answers}                                 \usepackage{enumitem}                            \usepackage{hyperref}     \usepackage{multicol}          \hypersetup{colorlinks=true}          \setlength{\parindent}{0.0mm}          % very useful during de-bugging!     %\usepackage[left]{showlabels}     %\showlabels{hypertarget}     %\showlabels{hyperlink}          % solutions files     % short solutions     \Opensolutionfile{shortsolutions}     \Newassociation{shortsolution}{shortSoln}{shortsolutions}     % long solutions     \Opensolutionfile{longsolutions}     \Newassociation{longsolution}{longSoln}{longsolutions}          % new environment that sets up hypertargets both in the question     % section, and in the answer section     \newlist{myenum}{enumerate}{3}     \newcounter{question}[subsubsection]     \newenvironment{question}[1]%         {%         \refstepcounter{question}%         %  hyperlink to solution              \hypertarget{question:{\thequestion}}{}%              \Writetofile{shortsolutions}{\protect\hypertarget{shortsoln:\thequestion}{}}%              \Writetofile{longsolutions}{\protect\hypertarget{longsoln:\thequestion}{}}%              \begin{myenum}[label=\bfseries\protect\hyperlink{shortsoln:\thequestion}{\thequestion},ref=\thequestion]              \item%                 \hypersetup{linkcolor=blue}%                 \hyperlink{longsoln:\thequestion}{#1}%             }%             {%             \end{myenum}}          \begin{document}          \section{Questions}          \subsubsection{Set I}          \begin{multicols}{3}         \begin{question}{$\int\sqrt{4-x}\mathrm{d}x$}                 \begin{shortsolution}                     $-\frac{2}{3}(4-x)^{\frac{3}{2}}+C$                 \end{shortsolution}                 \begin{longsolution}                     In order to do this, we must first make a substitution\ldots                 \end{longsolution}         \end{question}         \begin{question}{$\int(2x-1)^{50}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{1}{102}(2x-1)^{51}+C$                 \end{shortsolution}                 \begin{longsolution}                     A very long solution| much longer than the shorter solution                 \end{longsolution}         \end{question}         \begin{question}{$\int\sqrt[n]{x}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{n}{n+1}x^{\frac{1+n}{n}}+C$                 \end{shortsolution}                 \begin{longsolution}                     Even longer!                 \end{longsolution}         \end{question}     \end{multicols}          \subsubsection{Set II}          \begin{multicols}{3}         \begin{question}{$\int\sqrt{x}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{n}{n+1}x^{\frac{1+n}{n}}+C$                 \end{shortsolution}                 \begin{longsolution}                     Even longer!                 \end{longsolution}         \end{question}         \begin{question}{$\int\sqrt{4-x}\mathrm{d}x$}                 \begin{shortsolution}                     $-\frac{2}{3}(4-x)^{\frac{3}{2}}+C$                 \end{shortsolution}                 \begin{longsolution}                     In order to do this, we must first make a substitution\ldots                 \end{longsolution}         \end{question}         \begin{question}{$\int(2x)^{50}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{1}{102}(2x-1)^{51}+C$                 \end{shortsolution}                 \begin{longsolution}                     A very long solution| much longer than the shorter solution                 \end{longsolution}         \end{question}     \end{multicols}          \clearpage          \section{Questions}          \subsubsection{Set I}          \begin{multicols}{3}         \begin{question}{$\int\sqrt{4-x}\mathrm{d}x$}                 \begin{shortsolution}                     $-\frac{2}{3}(4-x)^{\frac{3}{2}}+C$                 \end{shortsolution}                 \begin{longsolution}                     In order to do this, we must first make a substitution\ldots                 \end{longsolution}         \end{question}         \begin{question}{$\int(2x-1)^{50}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{1}{102}(2x-1)^{51}+C$                 \end{shortsolution}                 \begin{longsolution}                     A very long solution| much longer than the shorter solution                 \end{longsolution}         \end{question}         \begin{question}{$\int\sqrt[n]{x}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{n}{n+1}x^{\frac{1+n}{n}}+C$                 \end{shortsolution}                 \begin{longsolution}                     Even longer!                 \end{longsolution}         \end{question}     \end{multicols}          \subsubsection{Set II}          \begin{multicols}{3}         \begin{question}{$\int\sqrt{x}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{n}{n+1}x^{\frac{1+n}{n}}+C$                 \end{shortsolution}                 \begin{longsolution}                     Even longer!                 \end{longsolution}         \end{question}         \begin{question}{$\int\sqrt{4-x}\mathrm{d}x$}                 \begin{shortsolution}                     $-\frac{2}{3}(4-x)^{\frac{3}{2}}+C$                 \end{shortsolution}                 \begin{longsolution}                     In order to do this, we must first make a substitution\ldots                 \end{longsolution}         \end{question}         \begin{question}{$\int(2x)^{50}\mathrm{d}x$}                 \begin{shortsolution}                     $\frac{1}{102}(2x-1)^{51}+C$                 \end{shortsolution}                 \begin{longsolution}                     A very long solution| much longer than the shorter solution                 \end{longsolution}         \end{question}     \end{multicols}          % close solution files     \Closesolutionfile{shortsolutions}     \Closesolutionfile{longsolutions}               \clearpage     \section{SHORT answers}     % renew the SHORT solution environment so that it hyperlinks back to      % the question     \renewenvironment{shortSoln}[1]{%              % add some glue              \vskip .5cm plus 2cm minus 0.1cm%              {\bfseries \hyperlink{question:#1}{#1.}}%     }%     {%     }%     % input the file if it exists     \IfFileExists{shortsolutions.tex}{\input{shortsolutions.tex}}{}          \clearpage     \section{LONG answers}     % renew the LONG solution environment so that it hyperlinks back to      % the question     \renewenvironment{longSoln}[1]{%              % add some glue              \vskip .5cm plus 2cm minus 0.1cm%              {\bfseries \hypersetup{linkcolor=blue}\hyperlink{question:#1}{#1.}}%     }%     {%     }%     % input the file if it exists     \IfFileExists{longsolutions.tex}{\input{longsolutions.tex}}{}     \end{document}


title: Why setting 'predisplaypenalty' to 0 is wrong idea?

text: In Vertical space between section header and text is too big user egreg said that setting `\predisplaypenalty=0` is wrong idea. Why is that? Could you provide an example? If not '0', what value could be used?


# Background of this question I've got the idea of creating a math dictionary with LaTeX for quite a while now. My native language is German and I write a lot of blog articles about algorithms and a few about mathematics. The algorithm articles are in English most of the time, because I think I can describe the ideas well. This is easy for datastructures and algorithms as the English words are often used in German in this area, too. (Or at least the English ones are well-known.) But I write my math articles most of the time in English. There are simple problems like "how do I call the x values where a function is zero in English" (root). But they are hard to look up. There are good English dictionaries for "common" English and some online dictionaries are also quite good for common English (dict.leo.org). But when it comes to math, I think the situation could be better. # What I want to do I would like to start writing an open source dictionary that helps mathematicians to translate terms from German to English and vice versa. (I hope that people would contribute to this dictionary after they had a hard time finding the translation of a term.) I think such a dictionary should have   * one part sorted by English words to look up the German ones   * one part sorted by German words to look up the English ones Every entry should have a formal description of the term, possibly the area (Topology, Analytics, Numerical mathematics, ...) and how it is pronounced in the language you look up. So my entries could look like this:               \entry{Formal description}{area}{english description}{german description}{english pronounciation}{german pronounciation}     \entry{$\Set{x | f(x) = 0}$}{Analytics}{Root of a function}{Nullstelle einer Funktion}{}{}     \entry{$x^n$}{Analytics}{}{}{\SortKey{AAABasicTerms}$x$ raised to the power of $n$}{\SortKey{AAABasicTerms}$x$ hoch $n$}      # Similar projects   * TshwaneLex: A dictionary for Tshwane (seems to be african)   * Multilingual Dictionary: Looks very nice, because of good images. Images might also be interesting for my project. (related question) - but there seems to be no code online :-(   * German-English mathematics dictionary. (1960) (link to pdf is on the left side): This one is extraordinary big, as it is only a scan.    * mathdict.chitanka.info: Nice little online dictionary. I think this might help. But a mathematical description would still be nice.   * A similar online approach # Question My question is quite open. I've written this to get some ideas what I could do / try or who I could ask. I don't want to break the StackExchange rules, so the question is: _Is there an environment / document class for dictionaries?_ But please feel free to give any idea you have for this in the comments (or an answer if your ideas get longer).


title: Continuous page numbering in thesis

text: I need to have continuous page numbering from start to end for my thesis, i.e. the title page should be page number 1 and if there are 100 pages in all, the last page should be numbered 100. Thus every single page needs to be numbered. I found the following to work for this:               \makeatletter      \renewenvironment{titlepage}       {%        \if@twocolumn         \@restonecoltrue\onecolumn        \else         \@restonecolfalse\newpage        \fi        % \thispagestyle{empty}% remove the empty page style        %\setcounter{page}\z@ %remove the counter reset      }%     \makeatother      Now, above segment gives me a continuous page numbering (at the bottom of each page) without any problem. But when I try to generate the 'Table of contents' (toc) for the thesis, I see that the 'toc' displays incorrect page number against the first section of the first chapter (which is the by default the first entry in the toc). Is there something I am missing? Any help is appreciated.


title: Problem with \specialcomment-command and equation/align-environments

text: I'm using the `specialcomment`-command from the comment package around `equation` and `align` environments. This leads to an unwanted blank line after the math environment. When just using the simple `includecomment`-command, the problem does not show, neither when my special comment just encloses "normal" text. In my example, this doesn't look so bad. But in my actual document there are other settings so it just doesn't look good. Changing the spacing by `\specialcomment{mycomment2}{\color{red}}{\color{black}\vspace{-4ex}}` or something like that messes with the normal commented text. How can I fix this?               \documentclass{article}     \usepackage{blindtext}     \usepackage{xcolor}     \usepackage{comment}     \includecomment{mycomment1}     \specialcomment{mycomment2}{\color{red}}{\color{black}}     \begin{document}     \begin{mycomment1}     \begin{equation}     x=y     \end{equation}     \end{mycomment1}          \blindtext          \begin{mycomment2}     \begin{equation}     x=y     \end{equation}     \end{mycomment2}          \blindtext          \begin{mycomment2}     Just some normal text, no problem there.     \end{mycomment2}          \blindtext     \end{document}      ![enter image description here](http://i.stack.imgur.com/kYAP0.png) * * * Edit: It seems that a bit of code I left out in order to make the problem as simple as possible is relevant after all. My code regarding the equations is actually like this:               \begin{mycomment2}     \begin{equation}     x=y     \end{equation}     \end{mycomment2}     %     \begin{flushleft}     Text     \end{flushleft}     \blindtext      In this case there is an extra blank line even though there are none in the code.


title: coordinate along decorated path

text: I'm using the `brace` decoration from the TikZ `decorations.pathreplacing` library to draw a brace around some nodes. Now I would like to connect the tip of the brace to another path (use case: labelling terms in an equation). First, I used the LaTeX command `\overbrace`, but realised it would be difficult to connect a `tikz`-path to the tip. It should be easier using the TikZ decoration `brace`. However, if I place `node[midway]` along the path, the node is placed midway along the unaltered path, not midway along the decorated path. Below is code along with the undesired output.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}     \node (spam) at (1, 1) {Spam};     \node (eggs) at (4, 1) {Eggs};     \draw[decoration={brace,amplitude=5mm}, decorate] (spam.north) -- (eggs.north) coordinate[midway] (mid);     \draw (mid) -- ++(0,1);     \end{tikzpicture}     \end{document}      ![Second path not connected properly](http://i.stack.imgur.com/12UDO.png) Of course, in the present example, I could simply replace the second `\draw`-command by `\draw (mid) ++(0,5mm) -- ++(0,1);`. But I would like something more stable that I don't need to tweak by hand, and maybe even work for arbitrary decorated paths. So, my question is:   * How do I place a coordinate at some point along a decorated path? **UPDATE 2012-12-17:** To show the use case, I add a picture of the solution here. ![enter image description here](http://i.stack.imgur.com/KFCuf.png)


title: how to ``open'' the curly bracket in a macro?

text: In tikz, the macro `\draw` accept a optical argument of parameters separated with comma, e.g.               \draw[->, red] (0, 0) -- (1, 1)      I have a self defined macro, in which I want to pass a macro as this optional parameter, i.e. sth like               \def\p{->, red}     \draw[\p] (0, 0) -- (1, 1)      However, I get a `ERROR: Package pgf Error: Arrow end type ``>, red'' unknown. ` which is the same error with               \draw[{{->, red}}] (0, 0) -- (1, 1)      I think it is because the argument is passed as a single `character` and failed to be separated. Is there a way to do it correctly? (i.e. "unquote" the curly bracket before passing it to the `\draw` macro.) In my particular case, I use xkeyval package to define my macro according to this. Therefore I have to pass the argument through a macro. (Any tikz specific work around is also helpful. THX)


title: How to format a link properly?

text: I tried using:               \href{mailto:user@some.org}{user@some.org}      and               \href{mailto:user@some.org}{\nolinkurl{user@some.org}}      but it just gives a purple box around the link, and I want it to look like a normal link. Is there a way to do it?


title: Lineno \internallinenumbers - how to make a line number label within a figure?

text: This concerns the "lineno" package. The `\linelabel` directive works within the ordinary `linenumbers` environment. How to create a line number label within a `internallinenumbers` environment to be able to reference a line number? I need this to be able to refer to a line in the pseudocode in a figure. Or, alternatively - is there an environment like `figure` in which the ordinary `linenumbers` and `\linelabel` work?


title: How to avoid empty space at the end of a page when using scrlttr2?

text: I use this class definition in the preamble for typesetting letters:               \documentclass[12pt,ngerman,foldmarks=true,fromalign=right,fromrule=afteraddress,       parskip=half, pagenumber=no,DIV=15]{scrlttr2}          %\usepackage[a4paper]{geometry}     %\geometry{verbose,tmargin=2cm,bmargin=0cm,lmargin=2cm,rmargin=2cm}      I have to struggle with the general problem that latex compiles into a letter with 2 pages. On the first page the last third is just empty. On the second page there is only the closing preceded by the last line of the last paragraph. It's ugly and wastes a lot of paper. I mean, there is no point in only printing the signature on a new page. Do you have the same problem and how do I get around that?


title: How to configure KOMA classes such that the bottom margin of a page equals its top margin?

text: I know that I could simply use the geometry package but is there a way to invoke that behaviour directly in the classes? As far as I know, KOMA always tries to keep the bottom margin twice the size of the top margin.


title: How I put \sqrt in arial with unicode-math?

text: I need to write an document with Arial. And have some math. I almost do this in entire document with this:                   \documentclass{article}              \usepackage{amsmath}              \usepackage{mathspec}         \setmathsfont(Digits)[Numbers={Lining,Proportional}]{Arial}         \setmathsfont(Latin)[Numbers={Lining,Proportional}]{Arial}         \setmathsfont(Greek)[Numbers={Lining,Proportional}]{Arial}              \usepackage[math-style=upright]{unicode-math}         \setmathfont{Arial}              \begin{document}              \[         \sqrt{a+b}         \]              \[         \int_{a}^{b}         \]              \end{document}      But the square root is broken, and the integral symbol is very small. What can I do? I found another package. This package provides math symbols for Myriad Pro, a sans serif font from Adobe. The final code looks like this:               \documentclass{article}          \usepackage{amsmath}          \usepackage{mathspec}     \setmathsfont(Digits)[Numbers={Lining,Proportional}]{Arial}     \setmathsfont(Latin)[Numbers={Lining,Proportional}]{Arial}     \setmathsfont(Greek)[Numbers={Lining,Proportional}]{Arial}          \usepackage{mdsymbol}      ![enter image description here](http://i.stack.imgur.com/rMn6e.jpg)


title: How to debug and correct sizing problems connected with amsfonts?

text: Depending on whether `amsfonts` is included, rendering is different and undesirable when it is included.               \documentclass[12pt]{article}          \usepackage{amsfonts}     \usepackage{nath}          \begin{document}         \begin{equation}             (\begin{matrix}0 & 0 \\ 0 &  1\end{matrix})         \end{equation}         \begin{equation}             (\begin{matrix}a & b \\ c &  d\end{matrix})         \end{equation}     \end{document}      What one should look for is how matrix contents is aligned with respect to surrounding parenthesis.


title: "P" symbol for notation of a plane in LaTeX

text: My professor uses this semi-cursive P for the notation of a plane in LaTeX, though I cannot seem to locate it. I used Detexify, but no luck. Any ideas? ![screen shot](http://i.stack.imgur.com/coLH0.png)


title: How to avoid underfull vbox in combination with \vsplit?

text: In the following example I am using the command `\vsplit`. I can't see the reason why `\vsplit` produced an `overfull \vbox`               \documentclass{article}     \parindent0pt     \def\exampletext{Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text }     \fboxsep=0pt     \fboxrule=1pt     \hfuzz=\maxdimen     \begin{document}     \setbox1=\vbox{     \hsize=8cm     \bfseries\huge\exampletext}     \boxmaxdepth0pt     \setbox0\vsplit1to2cm     \setbox0=\vbox{\unvbox0}     \fbox{\box0}          \fbox{\box1}     \end{document}      I used `\hfuzz=\maxdimen` to avoid `overfull hbox` in this example.


title: texlive2013 texmaker bibtex does not work

text: I have just install TeXlive 2013 on my Ubuntu 12.04 using the online install, everything seems to work. I added the `PATH` after installation as written in the terminal, in `/etc/environment`               PATH="/usr/local/texlive/2013/bin/x86_64-linux"      I also installed TeXmaker 4 everything seems to work , but when I compile (F11) `bibtex` I get               "Error : could not start the command"      Thanks a lot for help.


title: Arabic characters in text

text: I saw there are numerous questions and answers for typesetting Arabic characters. Yet I can't get them work. I tried to replicate this answer, which is exactly what I want to obtain - few in line Arabic characters. I haven't changed the MWE of the mentioned answer:               \documentclass[a4paper,10pt]{article}     %In the preamble section include the arabtex and utf8 packages     \usepackage{arabtex}     \usepackage{utf8}          \begin{document}     %start encoding to unicode     %Note that your layout must support arabic text when compiling     \setcode{utf8}     %To start typing in Arabic use the command arabtext     hello     \<السَلامُ عَليكم ورَحمةُ الله وبَركاته  >     arabic     \end{document}      Yet LaTeX, without throwing any error, typeset this: ![enter image description here](http://i.stack.imgur.com/vorWi.png) I tried to open the PDF with Skim, Adobe Pro and Mac Preview with the same result. I am using TeX 3.14159265 (TeX Live 2014) kpathsea version 6.2.0 of the MacTeX-2014 Distribution and Aquamacs as text editor. My best guess is that I have some encoding problem somewhere in the pipeline. My .tex file is encoded in utf-16 and in the text editor rightly shows the characters: ![enter image description here](http://i.stack.imgur.com/DKXLJ.png)


title: Spacing after \times

text: When using `\times` after some wide symbol, the space following `\times` becomes smaller than wanted. For example               \documentclass{article}     \usepackage{mathtools}          \begin{document}     \begin{align*}     > \times T \\     ) \times T  \\     > \times \ T     \end{align*}     \end{document}      produces ![](http://i.stack.imgur.com/mktNb.png) What can be done to correct this problem (other than manually inserting additional space)?


title: Simplefonts works, but definefontfamily does not?

text: I want to use `\definefontfamily`, and according to contextgarden.net, it should be included by default: > As of December 2013, the functionality of the Simplefonts module has been > included into the ConTeXt core. You do no longer need to load any external > module to take advantage of the simplified font commands. However, the > commands have slightly changed: \setmainfont is now \definefontfamily > [myfamily] [serif] [DejaVu] (and the same syntax to set the sans, mono and > math font). To use this family: \setupbodyfont [myfamily] I am using Mac OS X, and I used TeX Live to update to the latest version of Context. However, it breaks when I try (undefined control sequence):               \definefontfamily[mainface][serif][Adobe Garamond Pro]          \starttext       test      \stoptext      This works:               \usemodule   [simplefonts] \setmainfont [Adobe Garamond Pro]          %\definefontfamily[mainface][serif][Adobe Garamond Pro]          \starttext       test     \stoptext      What do I have to do? I am VERY new to Context.


title: How to break a paragraph between double {}

text: **Document class** I use the following document class: sig-alternate.cls The document class can be found at: http://www.acm.org/sigs/publications/proceedings-templates **Problem:** I have the following code:               \conferenceinfo{Text 1 here}{Text 2 here}      and I wish the output would be:               Text 1 here     Text 2 here      Right now both text sentences align after each other. I have tried to look at double \ and also at \newline but haven't been successful so far.


title: Lots of "missing character" messages in log file

text: Changing the default tip for arrows produces a lot of "missing character" messages in the log file. Is this a bug or is something wrong with the MWE?               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{arrows.meta}          \begin{document}          \begin{tikzpicture}[>=Triangle]         \draw[->] (0,0) -- (0,1);     \end{tikzpicture}          \end{document}      Log file :               [... snip ...]     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no t in font nullfont!     [... snip ...]      **Edit:** File list:                *File List*     standalone.cls    2012/09/15 v1.1b Class to compile TeX sub-files standalone     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     standalone.cfg    2012/09/15 v1.1b Default configuration file for 'standalone'      class      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)         tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)          pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)       pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)       pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)       pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)      pgfkeys.sty          pgfkeys.code.tex      pgfmath.sty          pgfmath.code.tex       pgffor.code.tex         tikz.code.tex     supp-pdf.mkii      ***********


title: Missing number treated as zero in gantttitle

text: I'm trying to use pgfgantt 4.0 but I encounter a rather strange problem. Here's my MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{pgfgantt}          \begin{document}          \begin{ganttchart}{24}     \gantttitle{Y1}{12} \\     \gantttitle{Y2}{12} \\     \end{ganttchart}               \end{document}      The problem I encounter with this example is the `\gantttitle` macro reporting the following error: ! Missing number, treated as zero. Yet, if I remember correctly, `\gantttitle` does need only two arguments. Furthermore, I tested a pgfgantt example that worked correctly on an older machine, and it produced the same errors. I encounter this problem on several configurations, which are the following:   1. Windows Miktek 2.9 up-to-date, pgfgantt automatically downloaded by miktek if I remember well. Used to work on an older machine.   2. Linux texlive 2009 Debian, pgfgantt downloaded from CTAN as the tlmgr seems missing. I don't have the root access on either machine. If I ignore the initial gantttitle error, I get many other errors such as "illegal unit of measure", "you can't use \edef after \advance" or "dimension too large". The resulting file does not look like it is horizontally stretched. I don't understand what happens.


title: How to Typeset C# with pdfTeX?

text: > **Possible Duplicate:**   >  How to make the correct hash-symbol in C Sharp (C#) What is the best way to typeset C# using pdfTeX? At the moment I'm using `C\#` but that does not look nice.


title: Display counters only if it is used at least two times

text: In this page, I've found one way to display one counter only if it is used at least two times. The problem with this solution is that it doesn't work with two counters. Is there a way to allow this kind of feature ?               \documentclass{article}         \makeatletter             \newcommand{\defineoneshotcounter}[1]{%                 \newcounter{#1}                 \newcounter{#1@helper}                 \expandafter\newcommand\csname show#1\endcsname[1][\arabic]{%                     \stepcounter{#1}%                     \stepcounter{#1@helper}%                     \@ifundefined{#1@reset@\the\csname c@#1@helper\endcsname}{##1{#1}}{}%                 }                 \@namedef{reset#1}{%                     \ifnum\csname c@#1\endcsname=1\if@filesw                     \immediate\write\@auxout{%                         \string\global\string\@namedef{#1@reset@\the\csname c@#1@helper\endcsname}{}%                     }%                     \fi\fi                     \setcounter{#1}{0}%                 }             }         \makeatother              \defineoneshotcounter{FirstCounter}         \newcommand{\FirstCounterStyle}[1]{\{\arabic{#1}\}}              \defineoneshotcounter{SecundCounter}         \newcommand{\SecundCounter}[1]{\{\arabic{#1}\}}              \setlength{\parindent}{0cm}               \begin{document}          \section{First counter}          TEST : \showFirstCounter,     TEST : \showFirstCounter,     TEST : \showFirstCounter,     RESET : \resetFirstCounter          TEST : \showFirstCounter[\alph],     TEST : \showFirstCounter[\alph],     RESET : \resetFirstCounter          TEST : \showFirstCounter,     RESET : \resetFirstCounter          TEST : \showFirstCounter[\FirstCounterStyle],     TEST : \showFirstCounter[\FirstCounterStyle],     TEST : \showFirstCounter[\FirstCounterStyle],     TEST : \showFirstCounter[\FirstCounterStyle],     RESET : \resetFirstCounter          TEST : \showFirstCounter,     RESET : \resetFirstCounter          TEST : \showFirstCounter,     TEST : \showFirstCounter,     RESET : \resetFirstCounter               \section{Secund counter}          TEST : \showSecundCounter,     TEST : \showSecundCounter,     TEST : \showSecundCounter,     RESET : \resetSecundCounter          TEST : \showSecundCounter[\alph],     TEST : \showSecundCounter[\alph],     RESET : \resetSecundCounter          TEST : \showSecundCounter          \end{document}


title: Figure appearing in completely wrong place

text: My problem is very simple - my figure is appearing far away from the text, as seen below. ![Latexfigure](http://i61.tinypic.com/z3lgn.png) The actual image I am pasting is here - ![figure](http://i61.tinypic.com/augxg1.png) so there is some white space above, but clearly not as much as Latex would lead us to believe. There is no text below the image. I am going to struggle to provide a MWE because I am using a thesis template, and the .cls file does a lot of the stuff for me. I know that given the size, it is not going to fit on the previous page, however, surely should it go to at least the top of the next page? **Additional information from the thesis.cls file**               %% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn     %% generated with the docstrip utility.     %%     %% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk     [skip some stuff]          \usepackage{setspace}     \onehalfspacing     \setlength{\parindent}{0pt}     \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}     \usepackage{vmargin}     \setmarginsrb           { 1.0in}  % left margin                         { 0.6in}  % top margin                         { 1.0in}  % right margin                         { 0.8in}  % bottom margin                         {  20pt}  % head height                         {0.25in}  % head sep                         {   9pt}  % foot height                         { 0.3in}  % foot sep     \raggedbottom     \setlength{\topskip}{1\topskip \@plus 5\p@}     \doublehyphendemerits=10000       % No consecutive line hyphens.     \brokenpenalty=10000              % No broken words across columns/pages.     \widowpenalty=9999                % Almost no widows at bottom of page.     \clubpenalty=9999                 % Almost no orphans at top of page.     \interfootnotelinepenalty=9999    % Almost never break footnotes.     \usepackage{fancyhdr}     \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}     \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}     \chead{}\lfoot{}\rfoot{}\cfoot{}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\    \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}     \renewcommand{\sectionmark}[1]{}     \renewcommand{\subsectionmark}[1]{}     \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else     \hbox{}     \thispagestyle{empty}     \newpage     \if@twocolumn\hbox{}\newpage\fi\fi\fi}     \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}     \theoremstyle{plain}     \newtheorem{example}{Example}[chapter]     \newtheorem{theorem}{Theorem}[chapter]     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{axiom}[theorem]{Axiom}     \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}     \usepackage[centerlast,small,sc]{caption}     \setlength{\captionmargin}{20pt}     \newcommand{\fref}[1]{Figure~\ref{#1}}     \newcommand{\tref}[1]{Table~\ref{#1}}     \newcommand{\eref}[1]{Equation~\ref{#1}}     \newcommand{\cref}[1]{Chapter~\ref{#1}}     \newcommand{\sref}[1]{Section~\ref{#1}}     \newcommand{\aref}[1]{Appendix~\ref{#1}}     \renewcommand{\topfraction}{0.85}     \renewcommand{\bottomfraction}{.85}     \renewcommand{\textfraction}{0.1}     \renewcommand{\dbltopfraction}{.85}     \renewcommand{\floatpagefraction}{0.75}     \renewcommand{\dblfloatpagefraction}{.75}     \setcounter{topnumber}{9}     \setcounter{bottomnumber}{9}     \setcounter{totalnumber}{20}     \setcounter{dbltopnumber}{9}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage[scriptsize]{subfigure}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage{listings}     \usepackage{lstpatch}     \lstset{captionpos=b,         frame=tb,         basicstyle=\scriptsize\ttfamily,         showstringspaces=false,         keepspaces=true}     \lstdefinestyle{matlab} {         language=Matlab,         keywordstyle=\color{blue},         commentstyle=\color[rgb]{0.13,0.55,0.13}\em,         stringstyle=\color[rgb]{0.7,0,0} }      \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,      bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false, hyperfootnotes=false,      colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},      pdfstartview={FitV},unicode,breaklinks=true]{hyperref}      **snip**      I also have the following in my preamble               \usepackage{array}     \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}      But I am sure that is just to do with tables. My current code               \begin{figure}[ht]     \includegraphics[scale=0.75]{Tinto.png}     \caption{Tinto's Student Integration Model (1975)}     \end{figure}


title: biblatex - citing dead author

text: I'd like to put               author={{\textdagger}Last, First},      in some bibtex entries, and have `biblatex` treat it exactly as some existing               author={Last, First},      entries (i.e. sorted as if the dagger was not there, treated as identical to Last for dashing etc.). Is this possible?


title: using tag within align

text: I have the following code:               \begin{align}     [m] &= [n] \nonumber \\            &= b       \refstepcounter{equation}     \label{eq:m}     \tag{\theequation,~tag}     \end{align}      If I cross reference the equation, with `Equation~\ref{eq:m}`, I want only the equation number, without the word 'tag'. Can this be done? Thanks a lot.


title: TEX can't see figures on PDF

text: I am writing for an academic journal in LaTeX and I am using Texstudio. My problem is the journal format is using `\usepackage[dvips]{eps fig}` and to upload a figure this command being used is `\epsfxsize=08cm \epsfbox{fig_main.eps}` So I am using texstudio and in the pdf format there is a box which contains the path of figure i.e., `fig_main.eps` but I can't see my actual figure. So far I have tried using `epstopdf` with `graphic` and `\includegraphics{}` to upload figures (which I used in a conference paper and worked well) but I can't find the solution to see my figures on PDF. I am a newbie in TeX and need urgent help.


title: Setting fonts in preamble

text: I would like to know, how should I configure so that my latex configuration will set as follow:   * For sections and sub-sections, the font is san-serif.   * For contents, the font is Computer Modern and Latin Modern I'm specifically interested in configuring like one article in this link regarding the fonts used. How to set it in my preamble, so that I don't need to configure it over and over.


title: How to format semantic rules (picture attached)?

text: I am wondering how to type semantic rules shown in the following picture: ![enter image description here](http://i.stack.imgur.com/qwEym.png) Thanks!


title: Lineno splitting the document into hundreds of pages

text: I was trying to get all the lines numbered in my document, as explained in this question: Show the number of lines in margin However, when I added the lines:               \usepackage{lineno}     \linenumbers      to the top of my document, the document got split into hundreds of pages - one line per page. How can I get it to work? EDIT: The preamble of the document looks like this:               \documentclass[12pt,twoside,pra,aps,amssymb,amsfonts,amsmath,tightenlines]{revtex4}          \usepackage{dsfont}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{natbib}     %\usepackage{url}     \usepackage{lineno}     \linenumbers      EDIT 2: Minimal example:               \documentclass[12pt,twoside,pra,aps,amssymb,amsfonts,amsmath,tightenlines]{revtex4}          \usepackage{dsfont}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{natbib}     %\usepackage{url}     \usepackage{blindtext}     \usepackage{lineno}     \pagewiselinenumbers               \begin{document}     \Blindtext          \end{document}


title: Framing section headings

text: I'm attempting to put a frame around my section headings. I am using the package `mdframed` which adds functionality to the `framed` package. It basically draws a box around an object, in an environment. So I wonder how I can do this. Can I use `\renewcommand`, for example? I'd really like to use `mdframed` to create the frame.


title: Paragraph Spacing within a Tikz Environment

text: I am looking to replicate the look of paragraphs within a tikz environment (actually a minipage).               \documentclass[letterpaper,12pt]{book}     \usepackage{tikz}     \usetikzlibrary{shapes,snakes,backgrounds,arrows}        \usepackage{tabularx}     \tikzset{mybox/.style= {draw=black,fill=black!5,thick,rectangle,rounded corners,inner xsep=40pt, inner ysep=14pt}}     \begin{document}     \begin{tikzpicture}[transform shape]     \node [mybox] (box) { \begin{minipage}[t!]{0.75\textwidth}     {Then we look for \textbf{clues}.           Okay, this is a good time to find any direction words. Those are words that tell you how the two blanks are related.          Here's one: ``while.'' The word ``while'' sets up a contrast between the first and second blanks. We know from Step One that both are people who work with stars, and now we also know that they are different kinds of people.          }     \end{minipage} };     \end{tikzpicture}     \end{document}        I know I can manually add space with '\vpsace' for instance, but the result is often not pretty.


title: Numbering of Questions in Different Way

text: \documentclass{article}     \begin{document}     \begin{center}     Exercise-1     \end{center}          \begin{enumerate}       \item 1st question.       \item 2nd question.       \begin{enumerate}         \item sub numbering of 2nd question.         \item sub numbering of 2nd question.       \end{enumerate}     \end{enumerate}          \end{document}      Here the output is:               Exercise-1      1. 1st question.      2. 2nd question.        (a) sub numbering of 2nd question.        (b) sub numbering of 2nd question       But I want to get the following outputs:               Exercise-1      (a) 1st question.      (b) 2nd question.        (i) sub numbering of 2nd question.        (ii) sub numbering of 2nd question.       OR               Exercise-1      (i) 1st question.      (ii) 2nd question.       (a) sub numbering of 2nd question.       (b) sub numbering of 2nd question.


title: memoir class - Mixed portrait and landscape pages

text: Section 4.2.2. in Notes on book design makes a reference to mixed portrait and landscape pages. I am aware of `pdflscape`, that allows such a mixing, but as this manual is written by the author of `memoir` I would assume that such a scenario should be achievable also using the built-in capabilities of the package itself. I am unable to find any references in the main manual, and would appreciate any comments pointing me in the right direction, as I am sure I must have been overlooking this feature.


title: Missing } inserted, yet braces are balanced

text: Regard the following document:               \documentclass[a4paper,reqno]{amsart}          \usepackage{amssymb,amsmath,amsthm,fullpage}          \begin{document}          For each $k$ we denote by $\lambda_k$ the $k$th symmetric polynomial     in the $x_i$s; that is, we define     \[\textstyle\lambda_k := \sum_\mathrm{$I\subseteq\mathbb{N}_n$ such that $|I|=k$}x_I.\]          \end{document}      When I try to compile it, I get:               ! Missing } inserted.     <inserted text>                      }     l.9 ...\mathrm{$I\subseteq\mathbb{N}_n$ such that $|I|=k$}                                                               x_I.\]      Why? The braces are surely balanced. (Surrounding the call to `\mathrm` in a set of braces makes no difference.)


title: macro for hyperref package so that it returns a result like 1-3,5-7,9,11-12 instead of 1,2,3,5,6,7,9,11,12

text: I would like to request your help with the following: With the package hyperref I get a lot of backreferences in my bibliography like 1,1,1,2,2,3,5,8,9,10,11,11,11,12,12,13,17,19 Now I wanted to write a macro that turns this result into: 1-3,5,8-13,17,19 if Kind = 0 1,3;2,2;3;5;8;9;10;11,3;12,2;13;17;19 if Kind = 1 where Kind is a variable to have a certain layout according to your choice When I run the file PROBEERTEST.TEX the above examples are correct but the bottom one has a lot of 'I assume spaces' in front of it (I have tried adding % after each line and removing all spaces but I still get those spaces). Can anyone help me (I want that the aa is followed immediately by the result and not with this free room after it)   * FILE PROBEER.TEX *               % To turn 1,1,1,2,2,3,5,8,9,10,11,11,11,12,12,13,17,19 into      %         1-3,5,8-13,17,19 if Kind = 0      % To turn 1,1,1,2,2,3,5,8,9,10,11,11,11,12,12,13,17,19 into      %         1,3;2,2;3;5;8;9;10;11,3;12,2;13;17;19 if Kind = 1      % Based on TeX by Topic p 105          \newcount\Kind % 0: like 1--3,5,7,10--12,            % 1: like 1,2;3,2;number,# of number;      \newcount\CountP % Previous     \newcount\CountN % Next     \newcount\CountT % Temp     \newcount\CTimes % Number of times      \newcount\State % 3: using kind=1 after reading in                     %    first element (state=2)                     % 2: start, first element printed                     % 1: during {--}.                     % 0: otherwise (non-sequential)     \CountP=-10000     \CTimes=0     \Kind=0          % --- begin TO STORE THE RESULT           \def\ResultDef{} % def to hold the result          % USING DEF TO STORE THE RESULT          \def\addToResultDef#1{     \edef\ResultDef{\ResultDef #1}     }          \def\printResultDef{     \ResultDef     }          % --- end TO STORE THE RESULT          \def\Combine#1{\xCombine#1,xxx,      \printResultDef     \CountP=-10000     \CTimes=0     \def\ResultDef{}     }             \def\endpiece{xxx}          \def\xCombine#1,{\def\temp{#1}     \ifx\temp\endpiece       \advance \CountN by 3 % to process the last element       \Process{\the\CountN}     \else \Process{#1}            \expandafter \xCombine      \fi}          \def\Process#1{     \CountN=#1     \ifnum\CountP=-10000       \CountP=\CountN       \State=2       \advance \CTimes by 1       %\the\CountP       \addToResultDef{\the\CountP}     \else       \ifnum\CountP=\CountN          \advance \CTimes by 1       \else             % \CountP<\CountN          \ifnum\Kind=0                  \ProcessA{#1}           \else             \ProcessB{#1}           \fi          \CTimes=1          \CountP=\CountN       \fi     \fi     }          \def\ProcessA#1{ % \Kind=0     \CountT=\CountP     \advance\CountT by 1     \ifnum\CountN=\CountT       \ifnum\State=0         %\the\CountP         \addToResultDef{,\the\CountP}       \fi       \State=1     \else       \ifnum\State=0         %, \the\CountP         \addToResultDef{,\the\CountP}       \else         \ifnum\State=1            %{--} \the\CountP            \addToResultDef{{--}\the\CountP}            \State=0         \else            \ifnum\State=2             \State=0           \else             \typeout{Invalid State!!}           \fi         \fi       \fi     \fi     }          \def\ProcessB#1{ % \Kind=1      \ifnum\State=2         \ifnum\CTimes=1         \else           \addToResultDef{,\the\CTimes}         \fi         \State=3      \else % State=3         \ifnum\CTimes=1           \addToResultDef{;\the\CountP}         \else           \addToResultDef{;\the\CountP,\the\CTimes}         \fi      \fi     }        * FILE PROBEERTEST.TEX *              %% To test probeer.tex in TeX itself to see if it works accordonly     \magnification\magstep1     \hsize 5.5 true in     \hoffset 0.5 true in     \vsize 8.25 true in     \voffset = 2\baselineskip     \vbadness11000          \input probeer          \noindent 1,1,1,2,3,4,5,6,7,11,12,13,15,17 \hfill \break      becomes \hfill \break     \Combine{1,1,1,2,3,4,5,6,7,11,12,13,15,17} \hfill \break     \hfill          \noindent New attempt: \hfill \break     1,2,3,4,5,6,7,11,12,12,13,15,17,17,21,22,23 \hfill \break       becomes \hfill \break      \Combine{1,2,3,4,5,6,7,11,12,12,13,15,17,17,21,22,23} \hfill \break     \hfill          \vbox{     \hbox to \hsize{1,2,3,4,5,5,6,7,11,12,13,15,17,21,22,23 \hfill}     \hbox to \hsize {becomes \hfill}     \hbox to \hsize{aa\Combine{1,2,3,4,5,5,6,7,11,12,13,15,17,21,22,23}bb \hfill}     \vfill}          \bye


title: Large document edited by a dozen people

text: We, a team of 12 people, plan to write a 50 pages paper. The paper will be divided into chapters. Usually, no more than 2 or 3 people will work on a given chapter. Having one large file will create problems when everyone will be editing and committing it in our VCS. I thought to split it into several files and input them. It works fine however one is still forced to compile the whole document. I could educate people to use `\includeonly` but we really want to use _input_ and not _include_. To alleviate this problem, I came up with the idea of extra "steering" files, one for each chapter, that does the same as the "main" file but only for a given chapter. It works but seems a bit cumbersome... What is your feeling about it? How would you handle such a use case?


title: Position and scaling with graphicx package

text: In the good ol' days I drew figures with xfig and generated LaTeX source to directly include in my papers. But I now find powerpoint to be a faster drawing tool and sufficient for most of my needs. What's the best way to embed the resulting image in LaTex? I current output to pdf, then include using the **graphicx** package. But the resulting scaling and positioning trial-and-error session is often extremely frustrating, and the documentation on the package is quite sparse and unhelpful. Is there a better way?


title: Figure in the table with Tikz

text: How do I align a figure Tikz item at the top of the table? Its my result. ![my result](http://i.stack.imgur.com/8U4dS.jpg) ![enter image description here](http://i.stack.imgur.com/BgIbP.jpg) I need the second alignment.


title: Big text on left and block of text on right

text: I was beating my head up with latex for this but couldn't come up with a properly formatted output. So basically, what I want is a large font text on the left (Company name) and 2-3 lines of comparitively small text on the right in line with the large text. ( Address of the company) So basically, I want something like ABC COMPANY `<Empty Space>`Address Where ABC Company is large font and Address in a block of 3 lines in parallel to the big text. I hope it makes it clear. Can anyone help? Much appreciated!


title: What is the equivalent of fullpage in geometry package?

text: There's an occasion when I am forced to use `geometry` package instead of `fullpage`. Howevere the document margins should match another document which uses `fullpage`. Where can I find the default top, bottom, right, left values when simply using `fullpage`? The document class is `article`.


title: How to get rid of an error when I load array or siunitx?

text: When I load `array` or `siunitx` or (probably other packages that I haven't tried), I get an error saying: > ! Package array Error: Illegal pream-token (\specifier): `c' used.               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{mathtools,booktabs}          \newcommand\specifier{%             r@{}r@{}l             @{\quad}c@{\quad}             r@{}r@{}l             @{}c}          \newcommand\act[1]{\xrightarrow{\quad\mathclap{\times #1}\quad}}     \newcommand\ope[1]{~\smash{\raisebox{.8\normalbaselineskip}{$#1$}}}     \newcommand\equ[3]{{}#1 & {}#2 & {}=#3}          \begin{document}     $         \begin{array}{\specifier}          \equ{3x}{+3y}{7} & \act{1} & \equ{3x}{+3y}{7}            \\[\jot]          \equ{3x}{}{22}   & \act{3} & \equ{3x}{}{66}   & \ope{-}  \\\cmidrule{5-7}              &&           &         & \equ{}{{{-3y}}}{59}         \\[\jot]              &&           &         & \equ{}{y}{-59/3}            \\         \end{array}     $     \end{document}      How to get rid of an error when I load `array` or `siunitx`?


title: how to keep my style of page in landscape?

text: I want to create a landscape page anywhere in the document and to maintain the style of my document also change the margin on these pages I need to create another page style?               \documentclass[oneside,spanish,10pt,a4paper]{memoir}     \usepackage{tikz}     \usepackage{titletoc}     \usepackage{lipsum}     \usepackage{anysize}     \marginsize{3cm}{2cm}{2cm}{2cm}     \usepackage{amsmath}     \usepackage{float}     \usepackage[applemac]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[swedish]{babel}     \usepackage{multicol}     \usepackage{pdflscape}     \usepackage{color}      \definecolor{yourcolor}{HTML}{6C17A1}     \makechapterstyle{mystyle}{%     \chapterstyle{default}     \renewcommand*{\chapnumfont}{\normalfont\Huge\sffamily\bfseries}     \renewcommand*{\chaptitlefont}{\normalfont\huge\sffamily\itshape\color{yourcolor}}     \settowidth{\chapindent}{\chapnumfont 111}     \renewcommand*{\chapterheadstart}{}     \renewcommand*{\chapnamefont}{\hfill\color{yourcolor}\normalfont\Huge\sffamily\bfseries}     \renewcommand*{\printchapternum}{%     \begin{tikzpicture}[baseline={([yshift=-.6ex]current bounding box.center)}]     \node[fill=yourcolor,circle,text=white] {\thechapter};     \end{tikzpicture}\\[1ex]     \hrule height 1.5pt}     \renewcommand*{\printchaptertitle}[1]{%     {\chaptitlefont ##1}}     }     %------------------          \makepagestyle{myruled}     \makeheadfootruleprefix{myruled}{\color{yourcolor}}{\color{yourcolor}}     \makeheadrule{myruled}{\textwidth}{1.5pt}     \makefootrule{myruled}{\textwidth}{1.5pt}{\footruleskip}     \makeevenhead{myruled}{}{\small\itshape\leftmark}{}     \makeoddhead{myruled}{}{\small\itshape\rightmark}{}     \makeevenfoot{myruled}{\color{yourcolor}\small\thepage}{}{}      \makeoddfoot{myruled}{}{}{\color{yourcolor}\small\thepage}     \makeatletter % because of \@chapapp     \makepsmarks{myruled}{     \nouppercaseheads     \createmark{chapter}{both}{shownumber}{\color{yourcolor}\@chapapp\ }{\color{yourcolor}. \ }     \createmark{section}{right}{shownumber}{\color{yourcolor}}{\color{yourcolor}. \ }     \createmark{subsection}{right}{shownumber}{\color{yourcolor}}{. \ }     \createmark{subsubsection}{right}{shownumber}{\color{yourcolor}}{. \ }     \createplainmark{toc}{both}{\contentsname}     \createplainmark{lof}{both}{\listfigurename}     \createplainmark{lot}{both}{\listtablename}     \createplainmark{bib}{both}{\bibname}     \createplainmark{index}{both}{\indexname}     \createplainmark{glossary}{both}{\glossaryname}     }     \makeatother     \pagestyle{myruled}     \chapterstyle{mystyle}         %use new chapter style                    \begin{document}     \setcounter{secnumdepth}{3}      \setcounter{tocdepth}{3}      \chapter{some text}     \section{some text}     \lipsum[1-20]     \subsection{some text}     \lipsum     \subsubsection{some text}     \lipsum     {     \newpage     \begin{landscape}     \lipsum     \end{landscape}     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/tRYIv.png)


title: How do I make \widefbox bigger in the vertical direction?

text: I want to enclose some equations in a widebox, but I need to make the box bigger the the y-direction/vertical direction. How is this done? A sample code is given below (taken from the empheq manual).               \documentclass{minimal}     \usepackage{empheq}     \begin{document}     \newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}     \begin{empheq}[box=widefbox]{align*}     a&=b \tag{*}\\     E&=mc^2 + \int_a^a x\, dx     \end{empheq}     \end{document}      Thank you!


title: How do I use IfStrEqCase within a siunitx command?

text: I am having trouble using `\IfStrEqCase` from xstring inside `\num` from siunitx:               \documentclass{article}     \usepackage{xstring}     \usepackage{siunitx}          \newcommand{\bla}[1]{%     \IfStrEqCase{#1}{{a}{1}%         {b}{2}%         {c}{3}}%         [0]%     }     \newcommand{\blubb}[1]{1}          \begin{document}     |\num{\blubb{a}}|     |\bla{a}|     |\num{\bla{a}}|         \end{document}      Will fail at `|\num{\bla{a}}|` with:               pdflatex.exe> ! TeX capacity exceeded, sorry [input stack size=5000].     pdflatex.exe> \reserved@a ->\def \reserved@a      pdflatex.exe>                                *{\let \@xs@assign\@xs@expand@and@detokenize...     pdflatex.exe> l.16 |\num{\bla{a}}     pdflatex.exe>                    |     pdflatex.exe> !  ==> Fatal error occurred, no output PDF file produced!      How can I overcome this? Solutions that do not include `IfStrEqCase` but provide some other way to do `switch`/`case` are welcome.


title: 3d surface plot with (-1, -1, 0) coordinates

text: Here is my code for 3d surface plot with `pgfplots`.               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}          \begin{document}          \begin{tikzpicture}         \begin{axis}[             xlabel = $x$             , ylabel = $y$             , zlabel = Test             , xmin = -1             , xmax = 1             , ymin = -1             , ymax = 1]        \addplot3        [         surf        ,  faceted color=blue        , samples  = 15        , domain   = -1:1        , y domain = -1:1        ]         {776.062 -50.812* x + 153.062 * y -76.812 *x *y};         \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/EVjvb.png) I wonder how to get coordinates `(x, y) = (-1, -1)` rather than `(x, y) = (1, -1)`. Thanks


title: Switching a string in a token register to lowercase and processing via the package soul

text: I would like to store a string in a token register, transform it to all- lowercase, and process the resulting string via the macro `\caps` provided by the package `soul`. That is to say, transform the string characters to small capitals and typeset the latter with the ensuing letterspacing. My problem involves the original string transformation to all-lowercase. I have tried with the TeX primitive \lowercase, with the LaTeX command \MakeLowercase, and with the corresponding command provided by the package `textcase`. With each alternative, I end up getting a different error message. Next follows an MWE with one of my tentatives.               \documentclass[12pt]{memoir}          \usepackage{soul}%,textcase}          \newtoks{\toktitle}     \newcommand{\doctitle}[1]{\toktitle={#1}}     % Workaround to have \caps doing its thing on a macro properly,      % as described in the corresponding documentation.       \def\soultitle{\MakeLowercase{\the\toktitle}}     \newcommand{\thetitle}{\caps\soultitle}     % One of my alternatives       %\def\soultitle{\the\toktitle}     %\newcommand{\thetitle}{\caps\MakeLowercase{\soultitle}}              \doctitle{This is the title}          \begin{document}     \pagestyle{empty}     \thetitle     \end{document}      Anyone could possibly provide guidance on this issue? Thanks so much in advance, as usual. ANSWER: I just need to use the command `\soulregister` as depicted in the documentation of the package `soul`. The MWE above would then read as follows:               \documentclass[12pt]{memoir}          \usepackage{soul}          \soulregister{\MakeLowercase}{1}          \newtoks{\toktitle}     \newcommand{\doctitle}[1]{\toktitle={#1}}     % Workaround to have \caps doing its thing on a macro properly,      % as described in the corresponding documentation.       \def\soultitle{\the\toktitle}     \newcommand{\thetitle}{\caps{\MakeLowercase{\soultitle}}}          \doctitle{This is the title}          \begin{document}     \pagestyle{empty}     \thetitle     \end{document}      My apologies. Hope this is useful to somebody nonetheless.


title: WinEdt vs TeXStudio: file not found

text: The same tex file works with WinEdt while opened with TeXStudio reports the following error:               File `Fig1' not found. ...h]{Fig1}      The piece of code follows               \usepackage{graphicx}     \usepackage{epsfig}          ....          \begin{figure}[htb]     \centering     \includegraphics[width=\textwidth]{Fig1}     \end{figure}      Any idea? I don't understand why the same code works with an editor and not with the second one.


title: How to extract the \includegraphics command in tikzscale package?

text: I just started using the `tikzscale` package for loading and correctly resizing tikz pictures. The problem is that the package replaces the original `\includegraphics` command with its own procedures to make loading of different file formats consistent. However, I think this might lead to compatibility problems with other packages since I get error loading these two packages together but each one works fine separately. My question is how I can only call the `\includegraphics` command from tikzscale package when I want to load a tikz picture, but for the rest of figures I use the original `\includegraphics` ? Can I somehow define a command to load tikz pictures with tikzscale function while leaving the original command intact? I tried with pdfLaTeX and LuaLaTeX.


title: LaTeX doesn't pick up changes to style file

text: I installed the `widetext` package and was happily using it until I decided to edit the style file `widetext.sty`. Happily, LaTeX immediately picked up the changes and compiled correctly. I then decided to undo those changes to `widetext.sty`, and I did so, but now latex doesn't seem to pick up this fact (ie it still thinks the changes are present). If I rename `widetext.sty` to something else, LaTeX properly fails to compile and says it can't find `widetext.sty`. However, if I intentionally put garbage text in `widetext.sty` to cause the latex compile to fail, LaTeX doesn't seem to notice and happily compiles the last "working copy" of `widetext.sty` it seems to have stashed in some form of cache somewhere. I tried to delete all output files in the working directory. No luck. `widetext.sty` is located in `C:\Program Files\MiKTeX 2.9\tex\latex\widetext`. Thoughts?


title: help with textgreek package

text: I can't seem to get textgreek to work on my system and I am out of ideas where to try next to fix it. I'm using LyX to write my thesis, so the TeX output is autogenerated. That said, I am perfectly comfortable with the raw text. The following document fails and I really don't understand the error message, as I have been fortunate to have LaTeX 'just work' pretty much so far.               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[a4paper,oneside,english,oldfontcommands]{memoir}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \special{papersize=\the\paperwidth,\the\paperheight}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{textgreek}          \makeatother          \usepackage{babel}     \begin{document}     This is a new doc          \textDelta \textbeta     \end{document}      Not so helpful help message:                    \textDelta                    \textbeta     I wasn't able to read the size data for this font,     so I will ignore the font specification.     [Wizards can fix TFM files using TFtoPL/PLtoTF.]     You might try inserting a different font spec;     e.g., type `I\font<same font id>=<substitute font name>'.      Error message: ! Font LGR/cmr/m/n/10=grmn1000 at 10.0pt not loadable: Metric (TFM) file not found. For the record, I am using MikTex2.9 on Windows 7


title: Parallel package, border

text: I have such preamble and the code.                   \documentclass[a4paper,14pt ]{report}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian,english]{babel}     \usepackage{amssymb,amsfonts,amsmath,mathtext,cite,enumerate,float}     \usepackage{graphicx}     \usepackage[14pt]{extsizes}     \usepackage{times}     \usepackage{hyperref}     \usepackage{tikz}     \usepackage[labelsep=period]{caption}     \usepackage{parallel,enumitem}     \DeclareCaptionLabelSeparator{par}{\par}     \captionsetup{labelsep=par,justification=centering}     \graphicspath{{images/}}               \newcommand\tablecaption[1]{     \captionsetup{labelsep=par,justification=centering}     \caption{#1}     }          \renewcommand{\baselinestretch}{1.5}\normalsize     \makeatletter     \renewcommand{\@biblabel}[1]{#1.}     \makeatother               \usepackage{geometry}     \geometry{left=3cm}     \geometry{right=1cm}     \geometry{top=2cm}     \geometry{bottom=2cm}          \renewcommand{\theenumi}{\arabic{enumi}}     \renewcommand{\labelenumi}{\arabic{enumi}}     \renewcommand{\theenumii}{.\arabic{enumii}}     \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}     \renewcommand{\theenumiii}{.\arabic{enumiii}}     \renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}     \renewcommand{\rmdefault}{ftm}               \begin{document}     \begin{Parallel}{0.40\textwidth}{0.65\textwidth}     \ParallelLText{\noindent         \begin{enumerate}[itemsep=1ex]           \item{Vertices are sorted in the following order 0,5,1,2,4,3}           \item{Depth 1: \textbf{0},5,1,2,4,3} \\           Depth 2: \textbf{1},2 \\           Depth 3: \textbf{2} \\           Depth 2: 1,\textbf{2}           \item{Depth 1: 0,\textbf{5},1,2,4,3} \\           Depth 2: \textbf{4},3 \\           \item{Depth 1: 0,5,\textbf{1},2,4,3} \\           Depth 2: \textbf{2},3,4 \\           Depth 3: \textbf{3},4 \\           Depth 4: \textbf{4} \\           Depth 3: 3,\textbf{4} \\           Depth 2: 2,3,\textbf{4} \\           \item{Depth 1: 0,5,1,\textbf{2},4,3}         \end{enumerate}         }     \ParallelRText{\noindent         \\\\ (the bold face node is expanded)         \\\\         Cannot expand, so $CBC$ is \{0,1,2\} with size 3 \\         $d + (m - i)= 2 + (2 - 2) = 2 < 3,$ so we prune \\\\         $2 + (2-1)=3 \le CBC$, so we prune        \\\\\\\\\\         becomes our new $CBC$ with size 4 \\         $3 + (2 - 2) = 3 < 4$, so we prune \\         $2 + (3 - 2) = 3 < CBC$, so we prune \\\\         $1 + (6 - 4) = 3 < CBC$, as depth = 1, we stop     }     \ParallelPar     \end{Parallel}         \end{document}       I have compiled it and have a good result, but when I have added it to the document with such preambula the border has changed. ![enter image description here](http://i.stack.imgur.com/0G2HP.jpg) How can I do it as it shown at the picture: ![enter image description here](http://i.stack.imgur.com/IR3P1.jpg)


title: Choosing the bullet of a single item in Easylist

text: Since I could not find a sufficiently customizable note taking software, I have decided to make a LaTeX template for doing so. I found the EasyList package suggested for creating lists fast, but I could not change the bullet- type of a single item. So my question is, can we change the bullet type of a single item in EasyList by specifying it within the declaration of that line only? For example               \documentclass[pdftex,10pt]{article}     \usepackage[ampersand]{easylist}          \begin{document}          \begin{easylist}[itemize]         & This is a bullet         & This is also a bullet         & Can I make only this one to be a check-box? Maybe through something like &[checkbox]     \end{easylist}          \end{document}


title: beamer: block inside itemize, how to horizontally align?

text: \documentclass{beamer}     \usepackage{lipsum}     \setbeamercolor{postit}{fg=black,bg=yellow}          \begin{document}     \begin{frame}     \begin{itemize}     \item some words     % possibly an empty line here         \begin{beamercolorbox}[rounded=true]{postit}     \lipsum[1-1]     \end{beamercolorbox}     \item some words     \end{itemize}     \end{frame}     \end{document}      I'd like the box to be horizontally aligned with the items, both on the left and right, and not to occupy the full page width. I could do it with two colums (0.075 and 0.97), but that would be pretty ad hoc and not perfect, in the fact that the box would extend too much on the right. In the same fashion, if I put an extra line between \item some words and \begin, it gets correctly aligned on the right (no overfull hbox 22pt on the right), but too wide on left. Any ideas?


title: How to change the position of underset?

text: In the command:               \underset{t \rightarrow x}{\limsup} f(t) = \underset{t \rightarrow x}{\liminf} f(t)      I get the `{t \rightarrow x}` lower under the limsup then the liminf (due to the "p" in limsup). How can I change the position of the underset?


title: How do I cite laws or regulations in biblatex?

text: I am using JabRef to manage my bibliography. I have some laws that I need to cite, but I am unsure how to do this. In this particular case, I am citing a regulation, which is referenced by the law. The regulation is of a technical nature (specifically it deals with minimum requirements for grid-interconnection of wind energy systems), and I just need to know which specific `biblatex` styles would be appropriate here. Here's what I have considered:   * `@article` doesn't seem appropriate, because `author` is a required field, and regulations don't have authors.   * `@misc` seemed like the next obvious choice, but it has no field for journal title, at least in JabRef. This regulation is published in a legal gazette, so a serial title would be useful here.   * `@other` doesn't include a title field (again, in JabRef at least)   * `@standard` also seems like it might be appropriate, but here `institution` is a required field, and one generally doesn't write "the government" The regulation being cited is German, in case that bit of information is useful. I know about the `biblatex-juradiss` package, but I am not writing a legal paper, here, so it's not appropriate. I just need a little guidance. EDIT: Here is an example which may help. I got it from "Bibliographieren — ... aber wie?" by Jan Wohlgemuth.               [27] Grundgesetz für die Bundesrepublik Deutschland vom 23. Mai 1949. (BGBl. S.1) BGBl. III, 100-1. In der Fassung vom 28.6.1993, zuletzt geändert durch das 39.     Gesetz zur Änderung des Grundgesetzes (BGBl. I 1002).      The thing is, I don't want to add a whole additional biblatex package just for this one citation, and I'm thinking there has to be a standard approach using the existing citation styles.


title: What are vertical and horizontal modes?

text: Yiannis's answer to a question introduced me to the notion of "vertical mode". Doing a search on the internet turns up relatively little about the different modes of operation; all I've managed to find is that there are 6 modes, 2 each for horizontal and vertical, and the math mode and displayed math mode. Unfortunately I don't own a copy of the TeX Book, nor do I have ready access to a copy at the moment. My questions are:   1. What are the 6 different modes?    2. For a user (as opposed to a package developer) of TeX, what are some of the practical things I need to worry about with regards to then? (The question linked above being an example of when the underbelly is exposed.)


title: How to pass argument to an external script?

text: I want to pass some argument to an external script. I try :                   \immediate\write18{./script \a\ \b\ \c > output.tex}      It works, but `\a` `\b` and `\c` are not given as three different arguments, but as one concatened string to the first argument. How to pass three or more arguments ?


title: Using lower-case roman numerals in enumerate lists

text: when I use               \begin{enumerate}[I]     \item      ...      I get               I     II      how I can get               i     ii      ? I try with               \renewcommand{\theenumi}{\roman{enumi}}     \renewcommand{\labelenumi}{\theenumi}      in the begin of file, but not fix the problem.


title: How to make additional paragraph commands that use sectioning counters?

text: I would like to be able to use the following additional (new) commands: `\sparagraph`, `\ssparagraph`, `\sssparagraph`. All of these will use the `\paragraph` formatting but, will use different counters. The `\sparagraph` will use the section label and counter. The `\ssparagraph` will use the sub section label and counter. The `\sssparagraph` will use the sub sub section label and counter. If the chapter is 1 and the section is 1. The label for the section will be 1.1. If I followed this section with a `\sparagraph`, I would want the paragraph to start with 1.2. Formatting as the `\paragraph`, but using the section numbering, including incrementing that counter.


title: macros, category codes, how to pass stuff with cat codes inside?

text: The original question is below (it was a bad simplification of the problem I had and also before being edited, it also contained major syntax errors). The problem that originated the question is why `\test` and `\ttest` work but `\tttest` gives _! Package pgfbasematrix Error: Single ampersand used with wrong catcode._               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{matrix}      \def\test #1.{#1}      \def\ttest #1.{\node{#1}}      \def\tttest #1, #2.{\node{#1}; & \node{#2};}     \begin{document}     \begin{tikzpicture}     \matrix [draw,row sep=1cm,nodes=draw]     {\node  {10}; & \node {5};  \\     \node  {5}; & \node  {\test 10.}; \\};     \end{tikzpicture}     \newpage     \begin{tikzpicture}     \matrix [draw,row sep=1cm,nodes=draw]     {\node  {10}; & \ttest 5. ;  \\     \node  {5}; & \node  {\test 10.}; \\};     \end{tikzpicture}     \newpage     \begin{tikzpicture}     \matrix [draw,row sep=1cm,nodes=draw]     {\tttest 10, 5. \\     \node  {5}; & \node  {\test 10.}; \\};     \end{tikzpicture}     \end{document}      Original question: Say Bob (our fictitious character) has to type long systems of equations using AMS-TeX all day long. Poor Bob is very tired but one day he has a revelation: The TeX Book! Bob reads chapters 7 and 20 and thinks he solved his problem. Instead of typing:                \begin{align*}      & 2x + & 10y =& 20 \\      & x  - & y   =& 10 \\      \end{align*}      Bob creates a macro and thinks the problem has been solved:               \def\bobmacro #1, #2, #3{ & #1 & #2 & #3 \\}     \begin{align*}      \bobmacro{ 2x+, 10y=, 20}      \bobmacro{ x-, y, 10}      \end{align*}      But alas! The macro does not compile, Bob suspects the problem is with the cat code `&` and perhaps also `//`. He knows he can neutralize them by using `\string` and doing that the code compiles but the outcome is again not the one desired. Bob goes to TeX.SE and reads questions about `\csname` and `\scantokens`. The last one looks promising but he can't find a simple example on Google. Bob seems more confused then when he started. He wonders if: **Is there a TeX/LaTeX or e-TeX way of implementing the idea behind his macro?**


title: Applying \middle outside of a \left \right group

text: ## Background: I am using the solution from Creating a large "such that" symbol which checks that `\currentgrouptype=16` in order to be able to determine if we are in the middle of a `\left ... \right` group, in which case we use `\middle|`, otherwise use `|`:               \newcommand*{\suchthat}{\;\ifnum\currentgrouptype=16 \middle\fi|\;}      In my case, the `\left`, `\right` pair are opened **and** closed _before_ and _after_ the content (`#2`) that uses `\suchthat` :               \newcommand{\@Brac}[3]{% #1,#3 = left/right bracket type             \mathopen{\left#1\vphantom{#2}\@BracKern\right.}% left bracket             #2%  content             \mathclose{\left.\@BracKern\vphantom{#2}\right#3}% right bracket     }     \newcommand{\bracr}[1]{\@Brac{(}{#1}{)}}%   round brackets     \newcommand{\bracc}[1]{\@Brac{\{}{#1}{\}}}% curly brackets      This reason for this is that the `\@Brac` macro will work across line breaks as illustrated in the MWE. ## Question: How do modify the `\suchthat` macro to be able to apply the `\middle` when within the `\@Brac` macro? ## Failed Solutions:   1. I attempted to set `\currentgrouptype=16` but was not able to get this to compile: > You can't use `\currentgrouptype' in math mode. This probably is not a good idea anyway.   2. I attempted to define my own `\newtoggle` and use that as a switch:              \newcommand*{\suchthat}{\;%       \ifnum\currentgrouptype=16\middle|\else%          \iftoggle{WithinBracMacro}{\middle|}{|}%        \fi%       \;}%      but that results in > Error: Missing } inserted. Two versions of this are defined below in `\suchthatOld` and `\suchthatNew`, and you can see the problem if you uncomment out the the lines within the first parameter to `\iftoggle{WithinBracMacro}{}{}`. I'd highly prefer the toggle approach. ## References:   * `\suchthat` adapted from Creating a large "such that" symbol   * `\@Bracr` macro from How to compute exact width added by \left. \right   * What combinations of mode and \currentgrouptype exist? ## Current Results: Only the "problem" line should change: ![enter image description here](http://i.stack.imgur.com/dKDPf.png) ## Code:               \documentclass{article}     \usepackage{etoolbox}     \usepackage{amsmath}     \usepackage{showframe}          % http://tex.stackexchange.com/questions/54023/how-to-compute-exact-width-added-by-left-right     \makeatletter     \newcommand{\@BracKern}{\kern-\nulldelimiterspace}%     \newtoggle{WithinBracMacro}%     \togglefalse{WithinBracMacro}% initialize     \newcommand{\@Brac}[3]{% #1,#3 = left/right bracket type             \mathopen{\left#1\vphantom{#2}\@BracKern\right.}% left bracket             \toggletrue{WithinBracMacro}%             #2%  content             \togglefalse{WithinBracMacro}%             \mathclose{\left.\@BracKern\vphantom{#2}\right#3}% right bracket     }     \newcommand{\bracr}[1]{\@Brac{(}{#1}{)}}%   round brackets     \newcommand{\bracc}[1]{\@Brac{\{}{#1}{\}}}% curly brackets          %% http://tex.stackexchange.com/questions/45713/creating-a-large-such-that-symbol     \newcommand*{\suchthatDelimin}{}%     \newcommand*{\suchthatNew}{%         \;%         \ifnum\currentgrouptype=16\relax% we are in a \left...\right             \renewcommand{\suchthatDelimin}{\middle|}%         \else%             \iftoggle{WithinBracMacro}{% we are in a \@Brac macro                 \renewcommand\suchthatDelimin{|}%  This works fine!                 %     (change to some other char to see)                 %                 % If uncomment any of following: "Error: Missing } inserted."                 %\def\suchthatDelimin{\middle|}%                  %\global\def\suchthatDelimin{\middle|}%                 %\renewcommand{\suchthatDelimin}{\middle|}%             }{% can't use \middle                 \renewcommand{\suchthatDelimin}{|}%             }%          \fi%         \suchthatDelimin%         \;%     }%          \newcommand*{\suchthatOld}{%         \;%         \ifnum\currentgrouptype=16\relax% we are in a \left...\right             \middle|%         \else%             \iftoggle{WithinBracMacro}{% we are in a \@Brac macro                 |% This works (change to some other char to see)                 % If uncomment followin: "Error: Missing } inserted."                 %\middle|%             }{% can't use \middle                 |%             }%          \fi%         \;%     }%     \makeatother               \begin{document}     \noindent     Comparrison of using \verb|\suchthat| in      \verb|\left\{ ...\right\}| and \verb|\bracc{}|:     \begin{align*}         \left\{x \suchthatOld x \le \frac{1}{2} \right\}\quad&         \left\{x \suchthatNew x \le \frac{1}{2} \right\}\quad     \text{This is fine}\\         \bracc{x \suchthatOld x \le \frac{1}{2} }\quad&         \bracc{x \suchthatNew x \le \frac{1}{2} }\quad     \text{Problem on this line only}     \end{align*}     %     \noindent     Ensure that we can compile \verb|\suchthat| without      \verb|\left\{ ...\right\}|.     This should not resize the brackets:     \begin{align*}         \{x \suchthatOld x \le \frac{1}{2} \}\quad         \{x \suchthatNew x \le \frac{1}{2} \}     \end{align*}     %     As we can see in the following, the \verb|\bracr| wraps around lines:      $\bracr{x^{-1} + x^{-2} + x^{-3} +x^{-4} + x^{-5} + \cdots }$.     \end{document}


title: Beamer like ClassicThesis

text: If I write my thesis with `ClassicThesis`, how can I fix `beamer` layout to get a similar setup? Does exist a template for this problem?


Consecutive footnotes can be separated by commas by invocation of the `multiple` option of the `footmisc` package: ![enter image description here](http://i.stack.imgur.com/NeXTR.png)               \documentclass{article}     \usepackage[multiple]{footmisc}     \begin{document}     Comma delineation of consecutive footnotes fails upon conversion to endnotes%     \footnote{First note.}%     \footnote{Second note.}.%     \end{document}      This comma delineation fails, however, if footnotes are converted to endnotes using the `endnotes` package: ![enter image description here](http://i.stack.imgur.com/sqHMs.png)               \documentclass{article}     \usepackage{endnotes}     \let\footnote=\endnote     \usepackage[multiple]{footmisc}     \begin{document}     Comma delineation of consecutive footnotes fails upon conversion to endnotes%     \footnote{First note.}%     \footnote{Second note.}.%     \theendnotes     \end{document}      How can one preserve automated comma delineation of consecutive endnotes?


title: Axis background shading overriding legend

text: This code in MATLAB:               hold on      h(1) = area([0 2.5], [125 125]);     h(2) = area([2.5 5], [125 125]);     set(h(1),'FaceColor',[1.0 0.8 0.6],'EdgeColor',[1.0 0.8 0.6]);     set(h(2),'FaceColor',[1.0 0.8 0.4],'EdgeColor',[1.0 0.8 0.4]);     x = [0:1:5];     y1 = x.^2;     y2 = x.^3;     hLine1 = plot(x,y1,'r-o');     hLine2 = plot(x,y2,'g-s');     set(gca,'ylim',[0 125]); %left yaxis range     hleg1 = legend([hLine1 hLine2],{'line1','line2'});      Creates this plot: ![MATLAB generated plot](http://i.stack.imgur.com/5selo.png) And I export it to tikz using `matlab2tikz` and compile it in this .tex file ( **Note: You need to comment out stack plots=y, or pgfplots gives an error, not sure why** ):               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{plotmarks}     \usepackage{tikz}     \begin{document}          \definecolor{mycolor1}{rgb}{1.00000,0.80000,0.40000}%          \begin{figure}     \begin{tikzpicture}          \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     area style,     %stack plots=y,     scale only axis,     xmin=0,     xmax=5,     ymin=0,     ymax=125,     axis x line*=bottom,     axis y line*=left,     legend style={draw=black,fill=white,legend cell align=left}     ]     \addplot[fill=white!60!orange,draw=white!60!orange] plot table[row sep=crcr]{0  125\\     2.5 125\\     }     \closedcycle;     \addplot[fill=mycolor1,draw=mycolor1] plot table[row sep=crcr]{2.5  125\\     5   125\\     }     \closedcycle;     \addplot [color=red,solid,mark=o,mark options={solid}]       table[row sep=crcr]{0 0\\     1   1\\     2   4\\     3   9\\     4   16\\     5   25\\     };     \addlegendentry{line1};          \addplot [color=green,solid,mark=square,mark options={solid}]       table[row sep=crcr]{0 0\\     1   1\\     2   8\\     3   27\\     4   64\\     5   125\\     };     \addlegendentry{line2};          \end{axis}     \end{tikzpicture}%     \end{figure}          \end{document}      Which results in this graph: ![latex render of same plot](http://i.stack.imgur.com/AosqJ.png) Questions:   1. As you can see the two background shadings have become the legend entrys... why?   2. Is there a better or proper way to shade the background of a plot?   3. How can I make pgfplots keep the black border around the whole plot? (not just the x and y axis) Thank you all.


title: Figure spanning two columns in IEEE Trans template?

text: I am using IEEE Transactions template for a paper. The problem I am facing is that I have a figure that I want to span two columns instead of a single one. Is there a way to do it?


title: I want \includegraphics{} to crop to the bounding box of an included PDF

text: Apparently, it's possible to use `gs` to automatically find the bounding box of a PDF. See http://stackoverflow.com/questions/10962235/how-to-find-blank- page-in-pdf-file/11274720#11274720. What I would like to do is to have a way of including a bunch of images such as the bounding box is scaled to the box in which I want the image to be shown. Any thoughts on how to do that?


title: latexmk with external references

text: Is there a way to make latexmk aware of external references as they are imported via the xr package? My Problem is that I have several files for weekly exercise sheets. Sometimes I have references to earlier exercises which I include via the xr package (neat thing...). As mistakes happen, I sometimes have to correct an exercise sheet after the next one has been issued. So I want a `latexmk file2` recognize that `file1` has changed and hence `file1` has to be recompiled again before working on `file2`...? Of course, I can (and actually do) put everything in a big make file which calls the latexmk commands on the individual files according to their dependencies but is there a latexmk-intrinsic way to automate this?


title: utf8, newcommand and umlaut

text: In my document, which is encoded as `utf8` throughout (hopefully), umlaute etc. in the document body are put out correctly, but those defined in a `\newcommand` are not. I have tried some alternatives to writing the unlaute plain, and `\symbol` works, while the international accent does not, and I'd rather not use it since it is a little cumbersome. See the following example:               \newcommand{\myPlace}{Örtlichkeit}     \newcommand{\myWhat}{\"{O}rtlichkeit}     \newcommand{\myHmm}{Stra\symbol{255}e}          \documentclass{scrlttr2}           \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{document}          \myPlace          \myWhat          \myHmm          ÖÄÜäöüß     \end{document}      Thanks for any input!


title: listings wrong syntax highlighting in perl - format specification

text: Perl uses '#' as an introduction for a comment, but also as a format specification. This produces problems in the syntax highlighting in the listings-package. How can I fix it?               \documentclass{article}     \usepackage{listings}     \usepackage{xcolor}     \begin{document}     \lstset{language=perl,commentstyle=\color{red}}     \begin{lstlisting}     #this is a comment     my $n=89;     #the "@###.####" is NOT a comment     format OUT=     @###.#####                              $n     .     \end{lstlisting}     \end{document}


title: Drawing a university logo

text: I am very new to latex and need to draw a logo. Could anyone please help or show me how to draw this logo? ![enter image description here](http://i.stack.imgur.com/cS5KC.png)


title: Some comments being interpreted when using subfiles?

text: I am writing my thesis using a college provided template which uses subfiles. I have was stuck for a few hours on an issue wherein some comments are being interpreted by the compiler when the `subfiles` package is used and a `subfile` is compiled. For example, this is my main file named `Main.tex`:               \documentclass{article}     \usepackage{subfiles}          \begin{document}     %\end{document}     \subfile{Hello}     \end{document}      My `subfile` named `Hello.tex` contains:               \documentclass[Main.tex]{subfiles}     \begin{document}     Hello world!     \end{document}      When the compile the main file (`Main.tex`), there is no problem. But when I try to compile the `Hello.tex` file, the compilation fails with the error:               ! LaTeX Error: Missing \begin{document}.      When I remove the `\end{document}` comment in the main file, things are fine once again. Weirdly, there is no problem with other comments in the same place. Only an `\end{document}` comment seems to be interpreted. Anyone know why this is happening?


title: Parenthesis destroy line formatting

text: I have just started using Latex. Here is the Latex code:               \rightarrow (a, b). The virtual      and here is the outcome. What is causing this problem and how do I fix it? ![enter image description here](http://i.stack.imgur.com/o9rMb.jpg)


title: PGFPlots: Externalizing Images and pdflatex -shell-escape <filename>

text: I want to externalize images using the commands:               \usepgfplotslibrary{external}     \tikzexternalize      The PGFPlots Manual says to use `pdflatex -shell-escape <filename>`. I'm assuming I should type this into the command line, but nothing is happening when I do. I need to do something similar to use GNUPlots, which is also not working for me. My test file's name is `abcd`. **Update:** I also tried changing `\tikzexternalize` to `\tikzexternalize[shell escape=-enable-write18]` and wrote `pdflatex enable- write18 abcd.tex` into the command line. The result was identical. I'm using Windows 8 and I am not very computer savvy. At the end, you'll find a series of images of what I am doing. Hopefully, once this is figured out, I will be able to use GNUPlots as well... * * * MWE from PGFPlots Manual, which does not work at all...even minimally...:               \documentclass{article}          \usepackage{pgfplots}          \usepgfplotslibrary{external}     \tikzexternalize          \begin{document}     \begin{figure}         \begin{tikzpicture}             \begin{axis}                 \addplot {x^2};             \end{axis}         \end{tikzpicture}         \caption{Our first external graphics example}     \end{figure}     \begin{figure}         \begin{tikzpicture}             \begin{axis}                 \addplot {x^3};             \end{axis}         \end{tikzpicture}         \caption{A second graphics}     \end{figure}     \end{document}      * * *   1. Compiling without typing anything into the command line, I get the error from the first picture (pasted into notepad to increase font size).   2. Next, I go to the command line and type this and get a dialogue box...and nothing more happens with the command line. In fact, I can't type anything more into it.   3. Last, I compile the my file `abcd` again in TeXworks and get the same error from Step 1. ![enter image description here](http://i.imgur.com/NVVsneB.png) ![enter image description here](http://i.imgur.com/K6AEQj9.png)


title: Is \Copy already in use by any package?

text: I'm working on my `copypaste` package to address a confusing feature that Seamus has kindly drawn my attention to. `\yank` copies text and commands from a LaTeX document onto a "clipboard", and `\paste` pastes it into the same (or another) LaTeX document. I called it "yank" because (i) `\copy` is already defined in TeX, and (ii) "yank" is how `vim` users refer to copy. However, "yank" seems to mean the **opposite** of copy in `emacs`. (I don't use `emacs`.) That's confusing. My question is: is `\Copy` already in use by any other package? That is, would any package that you know of conflict with mine if I renamed `\yank` to `\Copy` (uppercase)? Any suggestion for a better name?


title: TeXLive 2013 update question on Windows 7

text: I have a problem updating TeXLive 2013 on a Windows 7 machine. I get the following error message: ![enter image description here](http://i.stack.imgur.com/fUgW2.png) ![enter image description here](http://i.stack.imgur.com/kJoqE.png) After a few minutes it stops. I have updated to the lastest `tlmgr` version (downloading the `.exe` file), and I also configured the CTAN server (as in my linux machine). (I'm also running `tlmgr` with administrator privileges.) I don't know what's going on. It might be associated with the fact that I am behind a university firewall. The IT manager can open for me the ports required, but I need to know which ones are used by `tlmgr`. Any ideas on this issue?