title: Why can't I apply this decoration to a curve produced using the "to" path operation?

text: I have found that I cannot make decorations apply to (most) curves drawn using the "to" path operation. Here is a working example:               \documentclass[a4paper, reqno]{amsart}          \usepackage{tikz}     \usetikzlibrary{decorations.markings, topaths}          \makeatletter     \tikzset{nomorepostaction/.code = \let\tikz@postactions\pgfutil@empty}     \makeatother     \tikzset{bigdiagramarrow/.style = {         decoration = {markings, mark = at position 1 with {\arrow[thick]{latex}}},         postaction = {nomorepostaction, decorate}     }}          \begin{document}         \begin{tikzpicture}             \node [draw] (A) at (0, 0) {$A$};             \node [draw] (B) at (0, 1) {$B$};             \node [draw] (C) at (2, 1) {$C$};             \draw [bigdiagramarrow] (A) -- (B);             \draw [out = 0, in = 180, bigdiagramarrow] (A) to (C);         \end{tikzpicture}     \end{document}      Here is what I get when I compile it: ![](http://junk.orderofthehammer.com/undecorated-to-path.png) As you can see, an arrowhead is drawn on the end of the path drawn using the `\--` path operation, but no arrowhead is drawn on the end of the path drawn using the `to` path operation. Strangely, in the document in which I encountered this issue, I found that some curves created using the "to" path operation will display the decoration. To be more precise, 3 of the 12 curves in the document I am actually trying to typeset display the decoration. It is the same 3 every time I compile the document. I do not know what sets these 3 apart from the rest. At first it appeared that this question might be relevant, but I do not appear to be encountering the same "gotcha" so far as I can see, since I am not passing options to the `to` path operation but rather to the `\draw` macro. NB. The `nomorepostaction` key comes from Ulrich Schwarz's answer to this question.


title: Laying out subfigures with minipages

text: I want to place 3 subfigures in a figure with two columns. There is one big subfigured placed to the right. The two subfigures on the left should be aligned so that the first is aligned with the top of the big subfigure, and the second is aligned with the caption of the big subfigure.               \begin{figure}[h!]     \begin{minipage}[t]{0.49\linewidth}     \begin{subfigure}{\linewidth}     \begin{lstlisting}[language=c,escapechar=+]     +{public void}+ Method () {       .. Before       .. Original code     }     \end{lstlisting}     \caption{Before-Advice}     \label{fig:before}     \end{subfigure}     \begin{subfigure}{\linewidth}     \begin{lstlisting}[language=c,escapechar=+]     +{public void}+ Method () {       .. Around ( *(Original code) )     }     \end{lstlisting}     \caption{Around-Advice}     \label{fig:around}     \end{subfigure}     \end{minipage}     \begin{minipage}{0.49\linewidth}     \begin{subfigure}{\linewidth}     \begin{lstlisting}[language=c,escapechar=+]     +{public void}+ Method () {       try {         .. Original code         .. After returning       }       catch (...) {         .. After throwing       }       finally {         .. After       }     }     \end{lstlisting}     \caption{After-Advices}     \label{fig:after}     \end{subfigure}     \end{minipage}     \caption{Advice-Arten}     \label{fig:advices}     \end{figure}


title: Align text on top of a framebox

text: I am trying to create a series of boxes so that my students can input there id number for there final exam.               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}          \newsavebox{\idbox}     \sbox{\idbox}{\framebox[4.5mm]{\vrule depth 1.25mm width 0pt height 2.5mm}}     \newcommand{\nidbox}[1]{%     \foreach \i in {1,...,#1}     {     \usebox{\idbox}\kern-1.5pt     }}     \begin{document}     \nidbox{5}     \end{document}      What I want is to be able to put ID Number directly aligned on top of the first framebox and to be left justified. I have been trying to use `\raisebox` like:               \def\idnum#1{\raisebox{0.8\baselineskip}[1ex][2ex]{%     ID NUMBER}\kern-4cm #1}      where its implementation would be like `\idnum{\nidbox{5}}`. Sincerely I do not know if it is the best approach but I believe that I am forcing it. I know that I can probably do it using a table or with an array but am trying to find out a different approach. Any insights into the matter will be highly appreciated.


title: Matlab to pdflatex with text properties

text: I know that this might be more a detail rather than a serious problem but I've already Googled it like crazy and I can't find the solution. Is it possible to achieve a MATLAB plot in `pdflatex` with the correct text properties of the document (namely size and fonts)? I'm able to achieve a polished figure through the `matlabfrag` and `ml2pdf` scripts but when I scale the figure width the text gets scaled as well. I'd like something sort of `Inkscape PDF+LaTeX` option that outputs a `.pdf_t` file and a `.tex` file with the text.


title: How does one make two characters active?

text: In russian babel, it's possible to write `<<` to get a russian opening quote character. However, some fonts that have such character (like the one provided by anttor package) don't use that and end up with ugly output like << this is my quote>>. I tried making `<` active and saying something like               %\def << {\guillemotleft}%      but making `<` active messes the occasions where it is used not as a part of `<<`. I tried to search where `<<` is defined in babel, but couldn't find it. So, is there an elegant way to make a _sequence_ if characters active, s that one can `\def` them? Or, perhaps, there is a much more elegant solution to my problem of which I don't know...


title: Dealing with a wide table that exceeds the document margins

text: I am looking for "global" and "local" solutions to the case where I have a table that goes "much" beyond the right and left margins of the page (meaning: cases where having no margins to the page would not solve the problem). Such solution can include:   * Reducing the font size of the text inside the table.   * Making the table cells to implement some sort of "wordwrap" solution. (I found such a solution here.) I would appreciate any help with mentioning other solutions that I might have overlooked, and on how to implement the two options I mentioned above.


title: How to draw up a hierarchical tree diagram for taxonomic classification

text: Please show me the most simple, elegant code for this: ![enter image description here](http://i.stack.imgur.com/DscQH.jpg) How to do it in other words.


title: How to include an array in cell of a tabular environment

text: For an equation that has an array we use `\\\` for new row as well, and `\newline` didn't work, and this is understood by the tabular environment as a new row! Would appreciate all the help!


title: Kerning between 'V' and '.'

text: The canonical font used in LaTeX does not seem to implement any special kerning between letters and dots, possibly resulting in too much space (say, for the combinations "V." or "T.") in my opinion. Is there a font that implements kerning for that combination? Is there some other way to uniformly implement it (instead of in a case by case basis)?


title: How to open an external file from a link

text: Please can you tell me the command to be used for the following: aa.pdf is an external pdf in my computer. I want then when I click on aa.pdf from the pdf generated using this latex file it should open. But it is not opening. Please suggest               \documentclass[a4paper,14pt]{memoir}     \usepackage{graphicx}     \usepackage{color}     \usepackage{float}      \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{subcaption}     \begin{document}     \pagestyle{plain}               \section{\textcolor{red}{Acknowledgement}}     Practice School 1 at Guru Nanak Dev Thermal Power plant was a very interesting and innovating experience. This report is a product of valuable advice and s     \newpage          \section{\textcolor{red}{Abstract}}          Thermal power plants are a  major source of generation of electricity for any developing country. Around 60\% of electricity generation in our country is met by           \newpage          \section{\textcolor{red}{GNDTP - A coal based Plant}}     \section{\textcolor{red}{Introduction}}          Electricity is not just a convenience; its a necessity. It helps us live comfortably in our homes year-round, regardless of the weather. A safe, reliable and a          \section{ Report}     hyperref[labelname]{aa.pdf}          \end{document}


title: Ensuring that vertical space is consistent in list of polynomials

text: \documentclass{article}     \usepackage[fleqn]{amsmath}     \usepackage{mathrsfs}     \usepackage{amsfonts}     \pagestyle{empty}     \setlength\mathindent{0pt}     \begin{document}     \[3x^3\]     \[3x^2\]     \[3x\]     \[3\]     \end{document}      When I render this document, there is a lot more space between the first two options than between the second and third options. Is there a way to make sure it's consistent? Thanks!


title: Suppress space between Chinese and Roman typeface in XeLaTeX

text: When the Roman characters [a-z0-9] and Chinese characters alternate in XeLaTeX, a space is automatically entered between the two types of character. For example, both `Abcde我fg` and `Abcde 我 fg` produce: ![spaces entered](http://i.stack.imgur.com/QSqW0.png) Ordinarily, it is stylistically correct to include these spaces, but my question is whether there is a straightforward way to suppress them if I choose to for certain reasons. (I am using the packages `xeCJK` and `fontspec`.)


title: How do I indent the 2nd line a long chapter name created using the tocloft package so that it lines up correctly?

text: I am using the tocloft package already. I have a couple of long chapter names that wrap onto a second line, but it lines it up with the section numbers below. I must have this new line line up with the original chapter name. I have seen one other similar question, but it was not answered. Example:               CHAPTER 1:  THIS IS AN EXTREMELY LONG,         LONG CHAPTER NAME.......................2         1.1 blah blah...........................3         1.2 blah blah...........................4          I need it to be:          CHAPTER 1:  THIS IS AN EXTREMELY LONG,                 LONG CHAPTER NAME...............2         1.1 blah blah...........................3         1.2 blah blah...........................4      Hope someone can help! Thanks in advance! Note: Someone else wrote the class file that I am using for my dissertation, so I am trying to edit it to fit the formatting needs of my University. Here is the original code that's being used to generate the TOC:                 % TABLE OF CONTENTS ----------------------------------------------------------     \renewcommand{\cftbeforechapskip}{\baselineskip}        % allow spacing after each chapter/section entry     \renewcommand{\contentsname}{TABLE OF CONTENTS}     \renewcommand{\cftbeforetoctitleskip}{-0.25in}        % Title is 1in from top     \renewcommand{\cftaftertoctitleskip}{2.0\baselineskip}% 1 double space after title     \renewcommand{\cfttoctitlefont}{\hfill}               % Blank space before title     \renewcommand{\cftaftertoctitle}{\hfill}              % Blank space after title     \renewcommand{\cftchapfont}{ }                        % Can make it bold faced here     \renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}     \renewcommand{\cftchapdotsep}{\cftdotsep}             % Puts dots after chapter entries     \renewcommand{\cftchappresnum}{CHAPTER }                %     \renewcommand{\cftchapaftersnum}{ }                     %     \renewcommand{\cftchapaftersnumb}{\phantom{CHAPTER}\rm} %     \renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}}%     \renewcommand{\cftchappagefont}{ }                      %      This compiles fine, no errors... When I replace the line               \renewcommand{\cftchappresnum}{CHAPTER }                %     with     \renewcommand{\cftchappresnum}{CHAPTER\ }               %      as advised, and add the line               \renewcommand{\cftchapnumwidth}{1in}      I get 9 errors in the .toc file. Update: Repaired the 9 errors in .toc file by using               \setlength{\cftchapnumwidth}{1.2in}      instead of               \renewcommand{\cftchapnumwidth}{1in}.      The last thing I'm working on is how these fixes will jive with the appendix patch:               \newcommand*\tocappendixpatch{%       \addtocontents{toc}{\setcounter{tocdepth}{0}}       \addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{\@chapapp\ }}       \addtocontents{toc}{\settowidth{\cftchapnumwidth}{\hspace*{9mm}}}       \renewcommand{\thesection}%         {\Alph{chapter}.\arabic{section}\hspace{-.5em}\setcounter{equation}{0}}     }      The rest of the TOC looks excellent, but I think the code in the appendixpatch is conflicting, so I'm working on figuring that out, now. Update: I got it! I replaced the line               \addtocontents{toc}{\settowidth{\cftchapnumwidth}{\hspace*{9mm}}}      with               \setlength{\cftchapnumwidth}{1.2in}      within the appendix patch, and the spacing came out perfectly, matching the lines above it.   This has been quite stressful. It took my whole weekend! It would've been much simpler to just shorten the chapter names!! Thanks to all of you who helped!! I hope I can help people with their questions later when I have time!


title: How to make the font a little thicker/bolder?

text: I typeset a book with some ttf/otf fonts, when printed it seems ok, but it is a little fuzzy when view on screen or on mobile devices. Another problem is one font does not match very well with another one but will be much better if it is a little thicker/bolder. So my question is how to make one font face looks a little thicker? With TeXnical or non-TeXnical methods both fine.


title: Bad mathchar (79119) using htlatex+mathml with \uparrow with align from amsmath package

text: texlive 2012 debian package:               \documentclass[]{article}%     \usepackage{amsmath}        \begin{document}       \begin{align}           &    \uparrow\sum F     \end{align}     \end{document}      compile with               htlatex report.tex "htm,mathml" " -cunihtf"       gives               /usr/share/texmf/tex/generic/tex4ht/html-mml.4ht)      (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht))      (./report.aux)      ! Bad mathchar (79119). <argument>  & \uparrow \sum F                                     l.8 \end{align}                     ?      But when compile as                htlatex report.tex "htm,xhtml" " -cunihtf"       or                htlatex report.tex "htm" " -cunihtf"       No error. What should I do? Is this a bug in htlatex? any workaround? The problem happens when using `\uparrow` with mathml and when using `align`. Without `align` there is no error.               \documentclass[]{article}%     \usepackage{amsmath}        \begin{document}           $\uparrow\sum F$     \end{document}      Now                 htlatex report.tex "htm,mathml" " -cunihtf"      No error. **update** fyi, if you are using htlatex with `mathml` watch out for `align`. Workaround I found for now is to use `eqnarray`. Now the errors went away. I am trying to compile to HTML code generated by Scientific word, which generated the `align` Latex code. So I had to edit the code and change all the `align` to `eqnarray` as temporary fix for now to get HTML generated.


title: Eulermath font in beamerposter

text: I'd like to use eulermath as a mathematical font for a beamerposter. The reason is that I wrote my thesis using the ClassicThesis style with the option [eulermath]. I can't find a way to use it without using ClassicThesis.


title: Change font size only in a part of a document

text: I have created my thesis using `mathptmx` size `12pt`. I would use in only a part Latin Modern but not `12pt` instead `11pt`. How can I achieve that? I tought to `\small` but I don't know if correspond to the correct size


title: How to use fontspec with opentype fonts when ligatures are a separate font

text: I am just learning LATEX. Have been wanting to for years, doing quite well (at 60) and many years of programming are making it a joy! I am using fontspec to load some fonts directly from a subdirectory of the tex documents directory. This works as follows:               \documentclass[]{article}     \usepackage{fontspec}     \usepackage{lipsum}     %opening     \title{A Test of Zapinfo}     \author{Ramonskovitch}          \begin{document}          \fontspec[Path = fonts/zapfino/,     ]{ZapfinoExtraLT-One.otf}     \maketitle          \begin{abstract}     Ramonskovitch wanted to be a duffle     \end{abstract}          \section{The First Section}     \lipsum[1-3]     \end{document}      This works as expected. However, I can't work out though, how to get Ligatures when the ligatures are in a separate font file (in the font directory) The same question will apply to ornaments when I get to those All help appreciated Dan Raymond


title: The finer points of typographical priorities

text: Inspired by the question Vertical spacing, pagination and ideal results I started to wonder what are the priorities for typographical rules (/norms). For example, which is worse: an orphan, or a widow?   How about ragged bottom, or orphan? Does such a priority list exist?


title: Get the Length of the Rest of a Line

text: > **Possible Duplicate:**   >  Is there a way to measure the remaining space of a line of text? I have some text and want to put a \hrulefill at the end following by a period. However, if the text of the line comes too close to the end of the line, the rule is omitted and just a period results -- or -- a new line is created, the rule is omitted, and the line begins with a period. How can I determine if there is enough space at the end of the line for a sizeable enough hrulefill of some specified length?


title: Why does biblatex-chicago print accessed twice in bibliography?

text: I am using `biblatex-chicago` to manage my bibliography but whenever I try to set a bibliography entry with the `urldate` field, it prints the word 'accessed' twice. I have created a minimal example to demonstrate the problem. My source document looks like this:               \documentclass[a4paper]{article}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage[australian]{babel}     \usepackage[babel]{csquotes}     \addbibresource{temp.bib}          \begin{document}          \cite{key}          \vfill\printbibliography          \end{document}      And `temp.bib` looks like this:               @online{ key,       author = "Surname, Forename M.",       title = "Title of an article",       year = "2012",       url = "http://www.test.com/",       urldate = "2012-04-18",     }      When I compile this, I end up with a reference list that looks like this:               Surname, Forename M. 2012. Title of an article. http://www.test.com/         (accessed [accessed 18 Apr. 2012]).      Can anyone see what is going on? Am I doing something wrong?


title: Times New Roman fonts and maths WITHOUT mathptmx

text: I do not want to use `mathptmx` package since using this LaTeX=>PDF is not not compiling. Please suggest me to achieve Times New Roman Fonts and math environment, anything other than `mathptmx`.


title: How do I make one minipage the same size as another?

text: I'm writing a LaTeX document into which I want to put two boxes, in a row next to each other, which will contain varying length content. I want each box to be the same height, and that height needs to be the height necessary to contain the content in the box with the most content, i.e. both boxes should be the height of the taller of the two. Lastly, I want to put a border partway around one of the boxes. The "each box is the same height" comes into play, because I want the border around the box with the border to appear to contain the text in the other, unbordered box. In a word processor like Word / Pages / etc; I would do this by making a 1 row, 2 column table; where I apply the box border by arbitrarily styling the borders of one of the cells. If you put a lot of content in one cell, the other cell in the row grows to match it. I've tried to do it in LaTeX and got halfway there. I can get the two boxes, with two minipages. And I can get the box outlined with `\newmdenv`. What I can't seem to do is, get the two boxes to be the same size with varying length content. If I put "big" content in the box with the border. But if I put "small" content in that box, then it isn't big enough for the top & bottom to appear to "contain" the other box.               \documentclass[11pt]{article}     \usepackage{geometry}                     \usepackage{mdframed}     \geometry{letterpaper}                       \usepackage{lipsum} %used to generate dummy text          \newmdenv[leftline=false]{leftcap}          \title{latextest2.tex}     \author{test}               \begin{document}     \begin{figure}[!h]       \begin{minipage}[t]{0.5\linewidth}         \vspace{12pt}         \lipsum[1]       \end{minipage}       \hspace{0.5cm}       \begin{minipage}[t]{0.5\linewidth}         \vspace{0pt}         \begin{leftcap}           \lipsum[2]         \end{leftcap}       \end{minipage}     \end{figure}     \end{document}      In the code above, the `lipsum[1]` paragraph is longer than the `lipsum[2]` paragraph, so that box gets bigger. How can I make both of those minipage boxes the same size? Or alternately, what other approach can I use to get the behaviour of Word's 2 column 1 row table? * * * **UPDATE** Thanks for your answers, Werner and Martin. I was able to get Werner's to work with a little homework. I couldn't quite get Martin'sto work all the way.   Below, I added in Martin's `cfbox` command that he linked to, and using that I can get he box to go around the `minipage` in the way that I want, _for this particular content_. The only problem is, by setting the `minipage` height explicitly it is not flexible anymore. By this I mean, the box on the right is always the same height as the box on the left. But what I want is for both boxes to be as high as the tallest of the two boxes. So, for example, if I add content to the right box, I want that box to grow. I think what is necessary here is the equivalent of an `if/then/else` statement for the box heights. Below is an example showing it working as far as putting the boxes around, but breaking as far as not expanding to fit the new sized content.               \documentclass[11pt]{article}     \usepackage{geometry}                     \geometry{letterpaper}                       \usepackage{lipsum} %used to generate dummy text     \usepackage{xcolor}          \makeatletter % Copied this from: http://tex.stackexchange.com/a/55534          \newcommand\cfbox[3][lbrt]{% Copied this from: http://tex.stackexchange.com/a/55534       \begingroup       \leavevmode       \setbox\@tempboxa\hbox{%         \color@begingroup           \kern\fboxsep{#3}\kern\fboxsep         \color@endgroup       }%       \@tempdima\fboxrule       \advance\@tempdima\fboxsep       \advance\@tempdima\dp\@tempboxa       \hbox{%         \hskip-.5\fboxrule         \lower\@tempdima\hbox{%           \vbox{%             \in@{t}{#1}%             \ifin@                 {\color{#2}%                 \hrule\@height\fboxrule                 }%             \fi             \hbox{%               \in@{l}{#1}%               \ifin@                 {\color{#2}%                 \vrule\@width\fboxrule                 }%               \fi               \vbox{%                 \vskip\fboxsep                 \box\@tempboxa                 \vskip\fboxsep}%               \in@{r}{#1}%               \ifin@                 {\color{#2}%                 \vrule\@width\fboxrule                 }%               \fi             }%             \in@{b}{#1}%             \ifin@               {\color{#2}%               \hrule\@height\fboxrule               }%             \fi           }%         }%         \hskip-.5\fboxrule       }%       \endgroup     }          \title{latextest2.tex}     \author{test}          \usepackage{calc}     \newsavebox\mybox     \begin{document}       \begin{lrbox}{\mybox}         \begin{minipage}[t]{0.5\linewidth}           \lipsum[1]         \end{minipage}%       \end{lrbox}%       \usebox\mybox       \hspace{0.5cm}       \cfbox[tbr]{black}{% As suggested by Martin Scharrer at http://tex.stackexchange.com/a/56883         \begin{minipage}[t][\ht\mybox+\dp\mybox]{0.5\linewidth}           \lipsum[2]\par\lipsum[3]         \end{minipage}       }     \end{document}


title: XeTeX and graphicx: characters missing in .eps

text: I'm trying to include an .eps in a XeTeX file I am working on. The eps file contains an image and some painstakingly-spaced text labels. For some reason, however, some of the characters in the text do not show up. I've scoured the internet, and tried recreating an example using pdfTeX instead, and it's clearly a XeTeX issue. Not using XeTeX is not an option. Basically, the image shows up fine, but the text is missing -- with the exception of the square brackets around the text, and certain special characters in the IPA. So if I have the text `[dum]` it shows up as `[ ]`; if I have `[dɨm]` it shows up as `[ ɨ ]`, `[dʉm]` shows up as `[ ʉ ]`, and so forth. The font of this text is not the main font I'm using in the document - it looks to me like it might be Computer Modern, but it's hard to tell from just one character. Here is a MWE, compiled with xelatex:               \documentclass{article}     \usepackage[xetex]{graphicx}     \begin{document}     \includegraphics{image.eps}     \end{document}      If I run the exact same code, minus the `[xetex]` option in graphicx, using pdfLatex, the eps shows up just fine! What might be causing this? Any suggestions are welcome.


title: How to format for loop

text: I want to write a 'for' statement, but unsure how to do this with LaTeX. What I am trying to do is: > for k = 1, k++, while k < i What is the proper (or at least a decent way) to write this in LaTeX? Let me re-phrase: I do not want to actually create a loop, I just want to print a line that will be the text of the beginning of a for-loop. I'm unsure how to do this.


I want to write Maths on my computer just as I write maths on my copy or register. What should I do? I want to write Maths, should I buy a Graphic tablet (digitizer) Or something else?


title: Retain longtabu settings throughout document

text: This question is a continuation of this previous one Identical instance of longtabu I would like to create an environment this is a `longtabu` where the column widths determined for the second instance of the environment are used throughout the document. David Carlisle gave a great solution in the previous post -               \documentclass{article}          \usepackage{longtable,tabu}          \newenvironment{listazo}{     \begin{longtabu} to \textwidth{X[-1l]X}}     {\end{longtabu}}          \makeatletter     \AtBeginDocument{%     {\let\ifhmode\iftrue     \xdef\tmp{\csname LT@ii\endcsname}%     \xdef\tmp{\expandafter\@gobble\tmp}}%     }     \makeatother          \begin{document}               \section*{First}     \begin{listazo}            side note1 & here is the text and details\\\tmp\kill          \end{listazo}          \section*{Second}     \begin{listazo}            side note 2 & more text and details over here - bbbbbbbb bbbbb bbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\       longer side note & bbbb bbb bbb bbb bb bb bb  bb b b b b b b bbbb bbb bbb bbb bb bb bb  bb b b b b b b           \end{listazo}          \end{document}      Which comes out just like I want. However, if I change the alignment setting of the `longtabu` to be right-aligned, like this -               \newenvironment{listazo}{     \begin{longtabu} to \textwidth{X[-1r]X}}  % changed 'l' for 'r' here     {\end{longtabu}}      The first column of the first table is still left-aligned like this (note: adding \hfill did not fix it) ![enter image description here](http://i.stack.imgur.com/i3q3c.png) Any help greatly appreciated - I'm out of my depth here. Cheers


title: How to write an algorithm in french? [Errors]

text: I am trying to write my algorithm in french language. I found this solution which works for me but with errors. The errors are:               \algorithmicendelsif undefined     \algorithmicendif undefined     \algorithmicendfor undefined      I use the code provided by David Carlisle and I changed `\newcommand` to `\renewcommand` as he suggested. Everything is fine except with those errors. I mean the `for` changed to `pour`, `do` to `faire`, etc. But I still have errors and `fin for` instead of `fin pour`


title: Border matrix with multiple indices on top and bottom

text: How can I write a matrix where there is an index at the top and also at the bottom? `\bordermatrix` doesn't seem to have an option for multiple indices.


title: How to use tkz-graph and tikz-qtree without conflict?

text: It seems that the `tikz-qtree` and `tkz-graph` packages both define (or redefine) the `\edge` macro... I'd like to use both, but it doesn't seem possible:               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-qtree}     \usepackage{tkz-graph}               \begin{document}     \begin{tikzpicture}[level distance=40pt]     \Tree [.A [.B [.C a ] ]               [.D [.E quote ]                    [.F \edge[roof]; {Eye of newt, and toe of frog} ] ] ]     \end{tikzpicture}          \begin{tikzpicture}     \GraphInit[vstyle=Classic]     \Vertex{z}     \end{tikzpicture}          \end{document}      I get the following error when compiling the document above:               ! Use of \@edge doesn't match its definition.     <recently read> \edge           l.12               [.F \edge                                 [roof]; {Eye of newt, and toe of frog} ] ] ]     ?       Is there a workaround?


title: hyperref warning caused by Beamer appendix

text: The code below results in the following warning: "Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): removing '\translate' on input line 16." (Note: line 16 is the blank line immediately following `\appendix`.) This warning occurs even if I remove the supplemental slide and leave `\appendix` as the last line before `\end{document}`. The warning does not occur if I remove the appendix entirely. The .pdf file produced is apparently correct, but I'd like to be able to include an appendix without encountering the warning. I looked through the previously answered questions and found references to the `\texorpdfstring` command, but I couldn't seem make it work in this case. Has anyone found a solution, or can anyone point me to a previously answered question that I may have missed? Thanks!               \documentclass{beamer}     \title{The Title}     \author{The Author}     \begin{document}          \begin{frame}     \titlepage     \end{frame}          \section{First Section}      \begin{frame}\frametitle{First Section}      This is a slide.     \end{frame}          \appendix          \section{Appendix}     \begin{frame}\frametitle{Supplemental Material}      This is a supplemental slide.     \end{frame}          \end{document}


title: best practice international template

text: I would like to have a template which can be internationalised (i.e. is suited for latin script languages) and uses the microtype package. I suppose that we therefore need the following packages:   * babel (we can always set it to english)   * inputenc (for using international characters)   * fontenc (for printing international characters correctly)   * lmodern (since fontenc changes the font, we want to change is back)   * microtype (better looking text)   * possibly csquotes Below is the document now, please provide suggestions for improving the template e.g. the sequence in which the packages are called.               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[english]{babel}     \usepackage[babel=true]{microtype}     \usepackage{csquotes}          \begin{document}          Hello World!          \end{document}


title: Bibtex style for Proceedings of Royal Society A

text: Is there any bibtex style file available which is suitable for Proceedings of Royal Society A journals?


title: Centering / horizontal alignment of text inside tikz boxes

text: I am facing a problem with centering the text inside the boxes:               \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{blindtext}     \setkomafont{disposition}{\normalfont\bfseries}          \usepackage{tikz}     \usetikzlibrary{calc,matrix,positioning}     \begin{document}          \begin{figure}[h]     \centering     \caption{test}     \label{test}     \begin{tikzpicture}[element/.style={text width=1.8cm,minimum height=0.85cm}]     \matrix (m) [matrix of nodes,nodes={element},column sep=-\pgflinewidth, row sep=-\pgflinewidth,]{              & Cooperate & Defect  \\     Cooperate & |[draw]|3+x,3+x & |[draw]|1+y,4 \\     Defect & |[draw]|4,1+y & |[draw]|2,2 \\     };     \node[above=0.25cm] at ($(m-1-2)!0.5!(m-1-3)$){\textbf{Actor A}};     \node[rotate=90] at ($(m-2-1)!0.5!(m-3-1)+(-1.25,0)$){\textbf{Actor B}};     \end{tikzpicture}     \end{figure}     \end{document}


title: Different syntax for nodes with pos=x on a path with (A) -- (B) and (A) to (B)

text: I wonder why we need a different syntax for specifying `nodes` (and `coordinates`) on a path when using the simple `\--` and the `.. controls …` system or the `to` operation. Here’s an example to illustrate the problem:               \documentclass{scrartcl}           \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}      \usepackage{tikz}      \tikzset{every node/.style={fill=white,inner sep=2pt}}          \begin{document}     \begin{tikzpicture}          \draw [thick] (0,0) -- (5,2)             node [pos=0.2] {A}             node [midway] {B};     \end{tikzpicture}          \begin{tikzpicture}          \draw [thick] (0,0) .. controls +(1,2) and +(-2,-1) .. (5,2)             node [pos=0.2] {A}             node [midway] {B};     \end{tikzpicture}          \begin{tikzpicture}% with wrong result         \draw[line width=1pt](0,0) to[out=40, in=160] (5,2)             node [pos=0.2] {A}             node [midway] {B};     \end{tikzpicture}          \begin{tikzpicture}          \draw[line width=1pt](0,0) to[out=40, in=160]              node [pos=0.2] {A}             node [midway] {B} (5,2);      \end{tikzpicture}      \end{document}      When using `\--` or `controls` it is possible to position the node _after_ the second coordinate. ![simple --](http://i.stack.imgur.com/XXwym.png) ![controls operation](http://i.stack.imgur.com/dsR3A.png) But with `to[in=x, out=y]` this won’t work ![to problem](http://i.stack.imgur.com/tBJAg.png) all nodes go to `(0,0)` (not the first coordinate it’s always `(0,0)`) an we must gove the nodes before the second coordinate right after the `to` operation ![right to result](http://i.stack.imgur.com/Cgb6Y.png) I guess this has to do with the way `to` works but I wonder why …?


title: Error in TikZ pgfplots with timestamps on axis

text: I get the following error message when I try to compile the attached code. I tried everything, but can't find the error.               Runaway argument?     \pgfplots@calender@ZEROSHIFT \relax \ifx \pgfplotstemptime \pgfutil@empty \ETC.     ! File ended while scanning use of \pgfcalendar@datetojulian.      <inserted text>                      \par      Here's an example document.               \documentclass{article}     \usepackage{tikz,pgfplots}     \usepgfplotslibrary{dateplot}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     xticklabel={\hour:\minute:\second},     date coordinates in=x,     xticklabel style= {rotate=45,anchor=north east},     xtick={         {07/01/2013 04:00:00}         {07/01/2013 05:00:00}     },     xmin={07/01/2013 04:00:00},     xmax ={07/01/2013 05:00:00},     clip = false,     xlabel=Date and time,     ylabel=physical storage]     \addplot plot coordinates {         (07/01/2013 04:42:45, 4096.0)         (07/01/2013 04:45:45, 6144.0)         (07/01/2013 04:49:45, 8192.0)         (07/01/2013 04:52:45, 8192.0)     };     \end{axis}     \end{tikzpicture}     \end{document}


title: Author year citation

text: I have looking for how to cite the author and year in a sentence with reference to my bibliography list. I already used some Natbib styles, but no result of what I want. This is my main file: thesis.tex               \documentclass[11pt,a4paper]{article}          %Enabled packages     \usepackage{fancyhdr} %something with the header and footer     \usepackage{graphicx} %enables easy graphics embedding     \usepackage{datetime}     \usepackage[nottoc]{tocbibind}     \usepackage{enumitem}     \usepackage{abstract}     \usepackage{caption}     \usepackage[hang,flushmargin,bottom]{footmisc}     \usepackage{hyperref}     \usepackage[title,titletoc]{appendix}     \usepackage{cite}     \usepackage[numbers]{natbib}          \begin{document}     \include{Sections/Title}     \include{Sections/Abstract}     \tableofcontents     \include{Sections/chapterA}     \include{Sections/chapterB}     \include{Sections/bibliography}     \end{document}      My .bib file is called references.bib containing one example:               @book{hermanss2012,     author = "Astrid Hermanns",     title = "Psychology Management in Organizations",     publisher = "Cengage Learning EMEA",     year = "2012"     }      The place where I put the citation in the sentence is (as example) abstract.tex:               %Disable fancy page style     \thispagestyle{empty}     \begin{abstract}     \noindent This is the place for the abstract\citeauthor{hermanns2012}     \end{abstract}      This is an image of the output of the pdf file ![enter image description here](http://i.stack.imgur.com/oifsH.jpg) Instead of the "author?" I want the lastname of the author and the year as a citation there, like "This is the place for the abstract `(Hermanns, 2012)`" Furtermore, I want that the books/reports/etc in the bibliography is sorted on alphabetical order, by starting with the lastname of the auther instead of a number. Anyone suggestions of how to solve this issues?


title: Trees in latex : 2 nodes on the same line with tikzpicture

text: I'm following the tutorial/MWE provided at this link : http://www.texample.net/tikz/examples/filesystem-tree/ I would like to have to nodes at the same line, for example :               [MAIN]     |__________[UNDERMAIN1]____[PROPERTY1.1]_____[PROPERTY1.2]     |__________[UNDERMAIN2]____[PROPERTY2]                |____________[UNDERUNDERMAIN2]_______[PROPERTY3]      So far I only found the way having the [properties] on below [undermain], but not at the same line. Thank you in advance for your help.


title: Free reference manager and PDF organizer for Windows

text: I'm looking for a reliable reference manager and PDF organizer in order to make my research work more efficient and productive. In particular, I would like the software to help me to export references into the Bibtex format, suggest me new papers on a specific topic (or according to the papers) and automatically extract metadata from PDF files. Until now, I have found the following softwares:   * Colwiz http://www.colwiz.com/   * Docear http://www.docear.org/   * Mendeley http://www.mendeley.com/   * Qiqqa http://www.qiqqa.com/   * Zotero http://www.zotero.org/   * kBibTeX http://home.gna.org/kbibtex/ In your opinion, which one should be the best combination of simplicity and power?


title: Making a table-like structured information block in LaTeX

text: I want to layout some information in a structured, table-like, or form-like manner. Basically, each 'block' has multiple fields like Title, Description, and other things, and I want to display them like this: ![enter image description here](http://i.imgur.com/y7JwK8Q.png) I made this example in Word, where I used a complicated table structure. As you can see, each 'row' has a variable number of 'columns' and with different widths, so I don't think a table would work in LaTeX. The different cells also have different formatting. I have a few different ideas of how to do this, but I sort of feel they're all hacks rather than the "right answer". I would also prefer to separate presentation from content, and to be able to tweak the presentation later with additional fields/different spacing. How should I go about doing this?


title: Compile using latexmk in emacs

text: In the accepted answer in for the question it is suggested how to add `latexmk` support to emacs. If I get it right, compiling the `.tex` file should be assigned to `C-c C-c`. However this doesn't work for me and I have to go to the menu and click the `latexmk` option. My question is basically, how do I make the `latexmk` the default engine for the emacs+auctex? EDIT 1: When hitting `C-c C-c`, and then typing `latexmk` I get the desired result, i.e. it compiles using latexmk. Thus, maybe a more specific question is how to set latexmk to be the default script/compiler.


title: custom TOC text overflow

text: After customizing my Table of contents as shown below, my toc overflows onto the footer and doesn't go to the next page. Here is the toc customization I have done :               \titlecontents{chapter}[0em]{\addvspace{15pt}\bfseries}{\fontsize{13}{13}\bfseries\chtocfont\contentslabel{2.5em}}{\hspace{2.5em}}{\hfill\contentspage}     \titlecontents{section}[2.5em]{\addvspace{5pt}\bfseries}{\fontsize{13}{13}\fontseries{bc}\sectocfont\contentslabel{1.25em}}{\hspace{2.5em}}{\hfill\contentspage}     \titlecontents{subsection}[5em]{\addvspace{5pt}\bfseries}{\fontseries{bc}\sectocfont\contentslabel{1.25em}}{\hspace{2.5em}}{\hfill\contentspage}     \titlecontents{subsubsection}[7.5em]{\addvspace{5pt}\bfseries}{\fontseries{bc}\sectocfont\contentslabel{1.25em}}{\hspace{2.5em}}{\hfill\contentspage}     \titlecontents{paragraph}[9.5em]{\addvspace{5pt}\bfseries}{\fontseries{bc}\sectocfont\contentslabel{1.25em}}{\hspace{2.5em}}{\hfill\contentspage}      `\chtocfont` is for using Helvetica as a font for the chapter content line, `\sectocfont` for using the Lucidia Grande as font for the content line. Here is a screen shot of the issue I am having. Note that some entries from the toc are not shown at all. the follow link contains a paste of a tex example show the problem i have : http://pastebin.tlhiv.org/KZus0jGD ![enter image description here](http://i.stack.imgur.com/DO382.png)


title: tocdepth for the table of contents in revtex4

text: I am trying to change the depth displayed in the table of contents in my revtex4 document. The usual \setcounter{tocdepth}{1} command has no effect, regardless of what number I put in there, it always displays all the sub and subsubsections in the table of contents. Here is my code.               \documentclass{revtex4}     %\documentclass{article}     \begin{document}     \setcounter{tocdepth}{1}     \tableofcontents     \section{Sec}     blah     \subsection{Subsec}     blah blah     \subsubsection{Subsubsec}     blah blah blah     \end{document}      This output a table of contents with Sec, Subsec, and Subsubsec. When I change the document class to article the problem goes away, and tocdepth works like its supposed to. Anyone know any quick fixes?


title: Centering is not working

text: The below piece of code is not getting center aligned. Kindly help in finding out the solution for the same               \begin{table}[!ht]     \begin{tabular}{|c||c|c|c|c|c|} \hline     \centering     AE mode & 512 Byte & 1KB  & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\ \hline \hline     %IACBC & BC & & & m + 2 & n & n & n & 2 independent random keys are required  \\ \hline     \end{tabular}     }     \end{table}


title: Balancing and making the references into 3 columns

text: I'm using the below coding in a Tex file and getting the output in 2 columns.               \documentclass[twocolumn]{article} \usepackage{lipsum}          \begin{document}          \lipsum[1-4]          \begin{thebibliography}{9}          \bibitem{1} Lobo RF, Zones SI, Davis ME. 1995 Structure-direction in     zeolite synthesis. \textit{J. Inclus. Phen. Mol. Rec.} \textbf{21},     47--78.          \bibitem{2} Moliner M, Rey F, Corma A. 2013 Towards the rational     design of efficient organic structure-directing agents for zeolite     synthesis. \textit{Angew. Chem. Int. Ed.} \textbf{52}, 13880--13889.          \bibitem{3} Freyhardt CC, Tsapatsis M, Lobo RF, Balkus KJ, Davis ME.     1996 A high-silica zeolite with a 14-tetrahedral-atom pore opening.     \textit{Nature} \textbf{381}, 295--298.          \bibitem{4} Wagner P, Yoshikawa M, Lovallo M, Tsuji K, Tsapatsis M,     Davis ME. 1997 CIT-5: a high-silica zeolite with 14-ring pores.     \textit{Chem. Commun.}, 2179--2180.          \end{thebibliography}          \end{document}      Whereas, I want to balance the text before references and the reference text should be in 3 column format. Please look into the screen shot sample for your reference. ![enter image description here](http://i.stack.imgur.com/zScck.gif) Could anyone suggest me how to get this format?


title: Center table or tikzpicture horizontally ignoring margins

text: How can I center a table or in my case a tikzpicture horizontally ignoring the margins? My tikzpicture is slightly too big causing it not to be centered properly(sticks into the right margin slightly too much but if properly centered it will be less) I've tried                \makebox[\textwidth][c]{}      but I just get a bunch of errors.


title: exsheet print several exams same document

text: How to print several exams in the same document using `exsheets`? I need to print several exams using               \includequestions[random=1]{easy}     \includequestions[random=1]{medium}     \includequestions[random=1]{hard}


title: Paper size incorrect when using latex instead of pdflatex

text: Somewhat opposite to other problems I found, my document size is correct when compiling with `pdflatex` but is not right when compiling with `latex`. I'm using a custom `documentclass` for a conference but I don't think that is the problem. The document template provided is defining the paper size precisely with the `{geometry}` package. This is my preamble:               \documentclass[runningheads]{llncs}     \usepackage{graphicx}     \usepackage{amsmath,amssymb} % define this before the line numbering.     \usepackage{ruler}     \usepackage{color}     \usepackage[width=122mm,left=12mm,paperwidth=146mm,height=193mm,top=12mm,paperheight=217mm]     {geometry}      When I compile it with `pdflatex`, I get the correct document (much smaller than A4). However, I would like to compile it with `latex` (and then do dvi->ps, ps->pdf conversion) in order to be albe to use `.eps` images. But, when compiling with `latex` I get a smaller page embedded in an A4 with big lower and right margins. Could anybody please suggest a solution?


title: Ensure figures are placed on an odd page

text: Is there a way to ensure that figures (or other floats) are always displayed on an odd page? I'm using `memoir` for writing my thesis, which can be set to automatically place e.g. chapter beginnings on odd pages, such that they always appear to the right if a document is printed two-sided. I currently have some rather large floats of figures, which I would like to, in the same way, always display on odd pages. `memoir` has the built-in command `\movetooddpage`, but this just inserts white space till the next odd page. So back to my question is there a way to do this, but without inserting the white space and just ensure, that the figures are shown on odd pages? It's less important whether the figures are pushed forward a page or two. EDIT: I should mention, that I don't want it to apply for my whole thesis, but only for certain sections.


title: Different width for caption and floatfoot with floatrow

text: I am using the `floatrow` package. I would like to define a separate width for both the caption above and the `\floatfoot` below the floats. I want the caption to span the entire width of the page, but I want the `\floatfoot` to only be as wide as the float object. I can get both the caption and the `\floatfoot` to be the same width as the figure, but I am just not sure how to decouple the two from eachother. I had considered using the `\RawCaption` command, but I don't quite understand how to use it. Here is my MWE. In this, the width of the caption and the `\floatfoot` are coupled together. I want the caption to maintain the original width (which I believe is `\textwidth`), and I only want the floatfoot to be altered to `\FBwidth`.               \documentclass{article}          \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{floatrow}     \usepackage{siunitx}          \begin{document}          \begin{figure}     \floatbox[{\captop}]{figure}[\FBwidth]       {\caption{Selected Interatomic Distances of Protons in $\beta$-Pinene Normal Lactone}%        \label{fig:noeDistances}}       {\includegraphics{nOeDistances}        \floatfoot{\textsuperscript{1}All distances reported are in \si{\angstrom}.\\        \textsuperscript{2}Selected carbon numbering is given in cyan.}}     \end{figure}          \end{document}


title: How to sort table for plotting with pgfplots?

text: Is it possible to sort a table at the point that is included in a pgfplot. In the example below, the point x=3 and x=4 are ordered for plotting. I am looking prefereably for an 'in-place' solution, rather than a convoluted solution using pgfplotstable.               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}         \begin{axis}             \addplot table[x=x, y=y] { %something like table[sort index=#1]?)                 x   y                 1   11                 2   14                 4   26                 3   39             };         \end{axis}         \end{tikzpicture}     \end{document}


title: Latex dynamic macro definition

text: I am trying to dynamically define variables. What I want to do is be able to define a person in the following way `\definePerson{MrTestKey}{Mr Test}{0400 000 000}{mr@test.com}` and then subsequently call `\nameMrTestKey` to return "Mr Test", `\phoneMrTestKey` to return "0400 000 000" and `\emailMrTestKey` to return "mr@test.com". This is what I have tried so far... I use the `\defineVariable` macro so that I can call `\nameMrTestKey` to return a formatted (`\emph`) name and `\nameMrTestKey*` to return an unformatted name.               % To allow (un)formatted variables     % See http://tex.stackexchange.com/questions/51652/remove-formatting/     \usepackage{xparse}     \NewDocumentCommand\defineVariable{mmm}{%         \NewDocumentCommand#1{s}{\IfBooleanTF{##1}{#3}{#2{#3}}}%     }          % \definePerson{key}{name}{phone}{email}     \newcommand\definePerson[4]{%         \defineVariable\name#1{\emph}{#2}         \defineVariable\phone#1{\emph}{#3}%         \defineVariable\email#1{\emph}{#4}%     }


title: Alignment within enumerate

text: I'm looking for a way to sort of combine the features of `enumerate` (and other list-like environments) with features of tabular environments. Specifically, what I like about `enumerate` is that it provides automatic numbering, and that it produces a straight "stream" of output that can be wrapped in a `multicols` environment so I can easily change how many columns I want. What I need that's similar to `tabular`, though, is that I need to have multiple alignment points within each enumerate item. What I ideally want to be able to do is this:               \begin{coolEnv}{lrc}{2} % specifying two columns        \item This should & align & and stuff        \item This should & also align & and everything        \item This should & additionally align & and all        \item This here should & be aligned & with the rest     \end{coolEnv}      The output I want is going to _look_ like it's six columns, but it should really be two columns, each of which has three "sub-columns". That is, my `{2}` in the environment is saying "I want two columns", but since each item of the environment has two align points, the separate parts should also be aligned as columns. I'd like to be able to specify the alignment of the sub- columns as I have with `{lrc}` there, but this is the least important part. The reason I want to do this is that I frequently find myself creating `tabular`s with some number of columns, but then later deciding I want them to be wider instead of tall and skinny, with the entire `tabular` wrapping into multiple columns (the way enumerate does in a `multicols` environment). With `tabular`, this requires me to completely eviscerate the `tabular` and move all the `&`s and `\\\`s around, because the `tabular` requires me to specify what is _shown_ on the same line, not what data belong together. I want a way to specify the _data_ of the table in semantic "rows" (i.e., groups of info which must remain together) without having to specify how I want it to flow (i.e., how many such groups are printed on a line). I want to retain the freedom to later say "I want X groups on a line" and not have to redo the whole thing. I've looked at various combinations of packages like `multicol`, `enumerate`, `listliketab`, `multienum`, etc., but none of those seem to do what I want. Is there a clean solution?


title: Rubber and \include: Missing aux file

text: I'm trying to build a multi-file document with Rubber. In `thesis.tex`, I have:               \include{intro}      and I have a file `intro.tex`. It builds fine with `pdflatex`, but with `rubber -d`, I am getting the error:               IOError: [Errno 2] No such file or directory: 'intro.aux'      Curiously, this is _only_ a problem if `thesis.aux` exists AND `intro.aux` does not exist. If I delete `thesis.aux`, the problem goes away. The problem also goes away if I `touch intro.aux` (even if it's an empty file). So perhaps I will just put `rm thesis.aux` into my Makefile. But I am still curious if there is a way around this, or if it is a genuine bug in Rubber.


title: How to make temperatures with decimal comma?

text: I was asked to write a document where I have to put temperatures like -51,4 degrees celcius. How can I do that in LaTeX? I tried               \usepackage{siunitx}     ...     \SI{-51{,}4}{\celsius}      but it turns the comma to the dot.


title: How to vertically align makeup page in ConTeXt?

text: I have a minimal example               \usemodule  [simplefonts][size=12pt]     \setmainfont[dejavusans]          \definemakeup[titlepage]          \starttext          \startmakeup[titlepage]          {\tfd Title at top}          \stopmakeup[titlepage]          \stoptext      `Title at top` must be at top of page, but it is vertically centered. How to control vertical alignment of makeup page ? I need `startmekaup` because I dont want page numbering on this page.


title: How to vertically align underbraces

text: I am trying to balance underbraces in the equation below, how can I ensure that both underbraces at the same depth?               \begin{equation}     y = \underbrace{ \left [ x^2 + r^2 (a^2+\frac{a^{0.3}}{b}) \right]}_\text{growth rate} \times  \underbrace{ C_0}_\text{initial}     \end{equation}


title: How to make the subtitle without bold font?

text: How do I make the subtitle without the bold font?               \documentclass[10pt]{scrartcl}     \usepackage{url}     \usepackage{graphicx}     \usepackage{graphics}     \begin{document}          \title{\bf{Progress Report }}     \subtitle{\Large{asdasdas}}     \maketitle          \end{document}


title: Bibliographic entries contained in second file not found

text: For the following:               \usepackage[notes,isbn=false,url=false,backend=biber]{biblatex-chicago}          \addbibresource{main.bib}     \addbibresource{secondary.bib}      There are four entries in the first file and two in the second. Biber doesn't seem to be able to find any of the entries in the second bib file, although it reports a total of 6 keys. Note the absence of any reference to secondary.bib               INFO - This is Biber 0.9.9     ...     INFO - Found 6 citekeys in bib section 0     INFO - Processing bib sectiong 0     INFO - Looking for bibtex format file 'main.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     INFO - Finished Decoding LaTeX character macros into UTF-8     INFO - Found BibTeX data source 'main.bib'     INFO - Looking for bibtex format file 'main.bib' for section 0     WARN - I didn't find a database entry for 'source1' (section 0)     WARN - I didn't find a database entry for 'source2' (section 0)     INFO - Overriding locale 'en_US.UTF-8' default tailoring 'level = 4' with 'level = 2'     INFO - Sorting list 'MAIN' keys     INFO - No sort tailoring available for locale 'en_US.UTF-8'     INFO - Overriding locale 'en_US.UTF-8' default tailoring 'level = 4' with 'level = 2'     INFO - Sorting list 'SHORTHANDS' keys     INFO - No sort tailoring available for locale 'en_US.UTF-8'     ...     INFO - WARNINGS: 2      If it matters, I am using TexPad _EDIT_ bcf:                 <bcf:bibdata section="0">         <bcf:datasource type="file" datatype="bibtex">main.bib</bcf:datasource>         <bcf:datasource type="file" datatype="bibtex">secondary.bib</bcf:datasource>       </bcf:bibdata>       <bcf:section number="0">         <bcf:citekey>main1</bcf:citekey>         <bcf:citekey>main2</bcf:citekey>         <bcf:citekey>main3</bcf:citekey>         <bcf:citekey>main4</bcf:citekey>         <bcf:citekey>source1</bcf:citekey>         <bcf:citekey>source2</bcf:citekey>       </bcf:section>


title: Alignment in aligned and aligned[t] environments

text: The following code instructs LaTeX to typeset two different expressions for the square of the absolute value of a certain sum. I have three alignments - one of them is "almost" correct and two of them are correct. The "=" are aligned properly. Though, the spaces to the right of the two equal signs are different. (This should shift the other alignments, but it doesn't.) I think the space to the right of the second equal sign is too little. How do I correct that? I would like the first "+" in lines 2, 4, and 6 to be aligned. It seems that if LaTeX did not put an unreasonable amount of space after the "3" in line 2, these plus signs would have been aligned. In the aligned[t] environment, I have two alignments. It seems that since I have "3 &&+" to begin coding for line 2, the second "&" artificially put in the extra space. The third alignment is to align cos(2a + b + c) in line 2, the first "+" in line 3, cos(a - b) in line 4, and the first "+" in line 5. This is correct. (I wanted to say that to help those looking at the code.)               \begin{align*}     \MoveEqLeft[3] \vert xy + xz + yz \vert^{2} \\     &= \begin{aligned}[t] 3 &&+ \bigl[&\cos(2a + b + c) + \cos(a + 2b + c) + \cos(a + b + 2c) \\     &&& + \cos(a - b) + \cos(a - c) + \cos(b - c)\bigr] \\     &&+ \bigl[&\cos(a - b) + \cos(a - c) + \cos(b - c) \\     &&&- \bigl(\cos(2a + b + c) + \cos(a + 2b + c) + \cos(a + b + 2c)\bigr) \bigr] \\     \end{aligned} \\     &= 3 + 2\bigl(\cos(a - b) + \cos(a - c) + \cos(b - c)\bigr) .     \end{align*}


title: Strange connection of nodes in TikZ

text: This question is in connection with Making a family of graphs in TikZ by a few definitions. In the following MBWE lines in the first diamond, that were expected to be vertical, have unexpected angles. What should I know to correct this behaviour?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{shapes}          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}     [inner sep=0.7mm,     koc/.style={circle,draw=black,fill=black,thick,minimum size=3mm},     kob/.style={circle,draw=black,fill=white,thick,minimum size=3mm},     kwc/.style={rectangle,draw=black,fill=black,thick,minimum size=3mm},     kwb/.style={rectangle,draw=black,fill=white,thick,minimum size=3mm},     trc/.style={regular polygon, regular polygon sides=3,draw=black,fill=black,thick, minimum size=1mm},     empty/.style={},     trb/.style={regular polygon, regular polygon sides=3,draw=black,fill=white,thick,minimum size=1mm}]          \node[trc] (A)[label=above:$a$] {};     \node[kob] (D) [above right=of A] {};     \node[empty](empty)[right=of A]{};     \node[kwb] (F) [below right=of  A] {};     \begin{scope}[on grid,node distance=9mm]     \node[kwc] (B) [below=of D,label=above left:$b$] {};     \node[kob] (E) [above=of F] {};     %\node[trc] (F) [below right=of  A] {f};     \end{scope}     \node[trc](C)[right=of empty,label= above:$c$]{};          \foreach \k in {D,B,E,F} \draw(A)--(\k);      \foreach \k in {D,B,E,F}\draw (\k)--(C);     \draw (D)--(B);     \draw (B)--(E);     \draw (E)--(F);     \end{tikzpicture}     \hspace{1cm}     \begin{tikzpicture}     [inner sep=0.7mm,     koc/.style={circle,draw=black,fill=black,thick,minimum size=3mm},     kob/.style={circle,draw=black,fill=white,thick,minimum size=3mm},     kwc/.style={rectangle,draw=black,fill=black,thick,minimum size=3mm},     kwb/.style={rectangle,draw=black,fill=white,thick,minimum size=3mm},     trc/.style={regular polygon, regular polygon sides=3,draw=black,fill=black,thick, minimum size=1mm},     empty/.style={},     trb/.style={regular polygon, regular polygon sides=3,draw=black,fill=white,thick,minimum size=1mm}]          \node[kwb] (A) {};     \node[kob] (D) [above right=of A] {};     \node[empty](empty)[right=of A]{};     \node[kob] (F) [below right=of  A] {};     \begin{scope}[on grid,node distance=8mm]     \node[trc] (B) [right=of A,label=above right:$a$] {};     \node[kwc] (E) [left=of C,label=above right:$b$] {};     \end{scope}     \node[trc](C)[right=of empty,label=above right:$c$]{};          \foreach \k in {A,B,E,C} \draw(D)--(\k);      \foreach \k in {A,B,E,C}\draw (\k)--(F);     \draw (A)--(B);     \draw (B)--(E);     \draw (E)--(C);          \end{tikzpicture}     \caption{Case $(\beta,2)$ of Lemma 2.2}     \end{figure}                    \end{document}      ![enter image description here](http://i.stack.imgur.com/1Qvi7.png)


title: Drawing multiple iterations of cellular automatons inline, possibly with TikZ

text: I want to illustrate the iterations of a cellular automaton picture-by-picture in some slides. For those not familiar with the topic, imagine a two- dimensional grid of square cells where each square in the grid can have a "state" (which will be represented by its color). Every iteration or timestep, the state of a cell/square changes depending on its surroundings and current state - its color should change in the next picture. It seems obvious to use TikZ since it directly supports drawing of grids, but the part where I struggle is when thinking of a solution to minimize the effort when coloring every single square, every single iteration - the cells (or "squares") change state with every picture, so I would essentially have to color every square manually for each iteration. That seems like a lot of nasty, unmantainable code will be unavoidable; I essentially know how to solve my problem but wanted to ask if there is (hopefully) a smarter way of drawing/doing this (I'm hoping for some `\foreach` magic and such.) Phrasing concrete questions:   1. Is there, maybe, a package for drawing cellular automatons already?   2. If not, is there a smarter way to use TikZ to draw many iterations of a cellular automaton than to manually draw the grid and color it by hand?   3. If those last two questions are too localized/hard: Are there other "control structure" commands similar to `\foreach` that I could use to draw using some "rules", so that I don't have to color each square by hand? # Update 1 After considering the situation to the best of my knowledge, I want to try an implementation with the `matrix` command in TikZ. I will define a matrix of empty, minimum-sized and square cells, and change the style of the nodes according to the slide number. This might very well be a suboptimal approach, but since the pgf-magic happening in the answer by Mark Wibrow is still almost undecipherable to me, I think this the best way forward. ### Desired Automaton Behavior In simple terms: a cell is a square in the grid, and connected to its four orthogonal neighbors (up, down, right left). At each point in time, it is either excited, resting, or in refractory phase. For each iteration, the following happens:   * A cell that is resting goes into the excited state if any of its neighbors are excited themselves.   * An excited cell goes into the refractory phase.   * A cell in refractory phase goes into the resting state, **regardless of the states of its neighbors.** Here is an image of what the model looks like ( _n_ is the time, a dark cell is excited, a striped one is refractory): ![Cellular automaton model of excitable medium](http://i.imgur.com/L8neYxt.jpg) I realize my problem is highly localized, and don't mind if I need to adapt potential answers to fit my purposes if they describe a general way the problem could be tackled; what I am trying to learn is elegant ways of bending TikZ to one's will, so those answers are very much welcome. As of now, I am "painting" the cells by applying the respective `style` to the `node` in the matrix. My real matrix is of course bigger than 3 Below is my MWE:               \documentclass[ngerman,compress]{beamer}     \setbeamercovered{invisible}          % Packages     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{tikz}          \begin{document}     \begin{frame}{The cellular automaton}       \center       \begin{tikzpicture}       [help lines/.style={draw=black},       every node/.style={help lines,rectangle,minimum size=3mm},       cellular automaton/.style={draw=none,row sep=0mm,column sep=0mm, ampersand replacement=\&},       rst/.style={fill=white,help lines},       exc/.style={fill=blue!70,help lines}       ref/.style={fill=blue!30!white,help lines]              \matrix[cellular automaton] {           \node[rst] {};\& \node[rst] {};\& \node[rst] {}; \\           \node[rst] {};\& \node[exc] {};\& \node[rst] {}; \\           \node[rst] {};\& \node[rst] {};\& \node[rst] {}; \\         };       \end{tikzpicture}     \end{frame}     \end{document}


title: Empty List Environment

text: I created commands for resume fields. This is a simplified example of the desired outcome: ![enter image description here](http://i.imgur.com/qI5oGV4.png) Currently, I have to create two separate commands to do this, one with `\begin{itemize}` and the other without, otherwise I get the error:               ! LaTeX Error: Something's wrong--perhaps a missing \item.      This is because the `\begin{itemize}` environment is empty in the second section. **Question: Is there a package or a way of using`\begin{itemize}` that allows the environment to be empty? For example:**               \begin{itemize}         % This environment is empty.     \end{itemize}      MWE:               \documentclass[pdftex, 10pt, letterpaper, oneside]{memoir}          \usepackage{color}     \usepackage[table]{xcolor}     \usepackage{enumitem}          \newcommand{\narrowColumn}[0]{0.25\textwidth}     \newcommand{\wideColumn}[0]{0.75\textwidth}     \newcommand{\tabularEndSpacing}[0]{0.375 cm}          % I would like something like this for everything.     \newcommand{\withItemize}[5]{         \begin{tabular}{r | l}             \begin{minipage}[c]{\narrowColumn}                 #1             \end{minipage}             &             \begin{minipage}[c]{\wideColumn}                 {\bfseries\scshape#2}, {\itshape#3}\\                 #4                 \begin{itemize}[nosep]                     #5                 \end{itemize}             \end{minipage}         \end{tabular}\\[\tabularEndSpacing]     }          % However, I am forced to create a second command that does not use itemize.     \newcommand{\withoutItemize}[5]{         \begin{tabular}{r | l}             \begin{minipage}[c]{\narrowColumn}                 #1             \end{minipage}             &             \begin{minipage}[c]{\wideColumn}                 {\bfseries\scshape#2}, {\itshape#3}\\                 #4                 #5             \end{minipage}         \end{tabular}\\[\tabularEndSpacing]     }          \begin{document}     \thispagestyle{empty}          % This works fine.     \withItemize{Jun 2013---Present}{Company Name}{Company Location}{Position at Company}{         \item Comment 1         \item Comment 2         \item Comment 3     }          % This does not work.     %\withItemize{Jun 2013---Present}{School Name}{School Location}{Degree}{}          % Using the second command: This works fine.     \withoutItemize{Jun 2013---Present}{School Name}{School Location}{Degree}{}               \end{document}


title: Bad math environment delimiter when using \begin{equation} and \end{equation}

text: I wrote a matrix equation               \[       \left[ \begin{array}{c}         v^{0}_{n} \\         v^{K-1}_{n}       \end{array} \right] =          -\frac{1}{C_{ref}}            \left[ \begin{array}{ccc} V^{0}_{0,n} & \cdots & V^{0}_{M-1,m} \\             \vdots & \ddots & \vdots \\             V^{K-1}_{0,n} & \cdots &  V^{K-1}_{M-1,n}           \end{array}  \right]           \left[ \begin{array}{c}             C_{0,n} \\             C_{M-1,n}           \end{array}       \right]     \]      I want to put an equation number at the end of this equation. But only way I know how to do that is to put this whole equation in `\begin{equation}` and `\end{equation}` which gives an error. The error is > Bad math environment delimiter When I delete `\\[` and `\\]` from the start and end of my equation, I no longer get an error. My question is that why am I getting this error just by moving an equation in `\begin` and `\end`.


title: Adding a picture before abstract in extended abstract format

text: I am writing a conference paper in the Extended Abstract Format (with the `chi-ext` class, distributed by SIGCHI). The problem I am getting is to inserting a picture under the section of authors description as shown in the following image (and also how do I insert a image in the side bar on the left). ![enter image description here](http://i.stack.imgur.com/xo3Bg.png) The code I have so far is:               \documentclass{chi-ext}     \title{CHI \LaTeX\ Ext. Abstracts Template}     \numberofauthors{6}          \author{       \alignauthor{         \textbf{First Author}\\         \affaddr{AuthorCo, Inc.}\\         \affaddr{123 Author Ave.}\\         \affaddr{Authortown, PA 54321 USA}\\         \email{author1@anotherco.com}       }}          \usepackage{graphicx}   % for EPS use the graphics package instead     \usepackage{balance}    % useful for balancing the last columns     \usepackage{bibspacing} % save vertical space in references               \begin{document}          \maketitle          \begin{abstract}     In this sample we describe the formatting requirements for various SIGCHI related submissions XXXXX     \end{abstract}           \section{XXXX}     \section{XXXX}     \end{document}      _Note that this example has to be compiled with XeTeX or LuaTeX because the class requires it._


title: Drawing SPACE-TIME in LaTeX!

text: I am creating an article in LaTeX and would like to include an topological image of space-time. I have attached an image of what I am imagining. Any clue how to go about making this? I have been told that tikz is the package to use, but I have no clue how to use it. ![enter image description here](http://i.stack.imgur.com/7wG5g.png)


title: widetext equation in revtex4 messed up

text: I have stumbled upon a problem. I have a seminar I'm working on, and I'm writing it in revtex4 two column mode. I already used one widetext environment and the equation came out nicely. So I repeated the process, and it overlaps other, non widetext equation :\ The code is:               Vidimo kako povećavamo p, odnosno kako prelazimo u limes beskonačne jame, varijaciona metoda nam daje lošije procjene za eneriju osnovnog stanja. Energetska stanja rastu, no drastičnije od numeričkih rezultata. To je vjerojatno posljedica postojanja gama funkcije u izrazu koja kako uzimamo veće vrijednosti drastično raste. Usporedbom slika dobivenih diskretizacijom vidimo da ovakva valna funkcija najbolje odgovara 'mekšim' potencijalima, dok za beskonačnu potencijalnu jamu imamo kosinusno rješenje koje najbolje opisuje osnovno stanje. Također moramo uzeti u obzir da kod beskonačne jame nema tuneliranja u klasično zabranjeno područje. Najbolje poklapanje imamo za potencijal harmoničkog oscilatora, no to nas ne bi trebalo iznenaditi jer je izraz za osnovno stanje harmoničkog oscilatora (uz $\hbar=\omega=m=1$): $\psi_0(x)=\pi^{-1/4}\exp[-x^2/2]$.\\          Druga probna valna funkcija je oblika:          \begin{equation}     \varphi_2(x)=b\sqrt{\frac{2b}{\pi}}\frac{1}{x^2+b^2}     \end{equation}          \begin{figure}[htp]     \centering     \includegraphics[clip,scale=0.3]{valfun2.eps}     \caption{Probna valna funkcija $\varphi_2(x)$.}     \label{fig:probvalf2}     \end{figure}          Valna funkcija (slika \ref{fig:probvalf2}) je također normirana te ovisi o proizvoljnom, pozitivnom parametru b.          \begin{equation}     \begin{split}     E(b)&=\int\limits_{-\infty}^{\infty}\varphi_2^*(x)\left(-\frac{1}{2}\frac{d^2}{dx^2}+x^{2p}\right)\varphi_2(x)\ dx=\\     &=\frac{2b^3}{\pi}\int\limits_{-\infty}^{\infty}\left\{\frac{1}{x^2+b^2}\left[-\frac{1}{2}\left(-\frac{2 \left(b^2-3x^2\right)}{\left(b^2+x^2\right)^3}\right)\right.\right.+\\     &+\left.\left.\frac{x^{2p}}{x^2+b^2}\right]\right\}=\\     &=\frac{1}{4b^2}+(-1)^p\frac{b^{2p}}{2}(1-2p)     \end{split}     \label{eq:Eb2}     \end{equation}          Iz uvjeta minimuma \ref{eq:uvjmin} imamo:          \begin{equation}     b_0=2^{\frac{1}{-2-2p}}\left((-1)^p p(1-2p)\right)^{\frac{1}{-2-2p}}     \end{equation}          Što, ako vratimo u izraz za očekivanu vrijednost energije \ref{eq:Eb2}, daje:          \begin{widetext}     \begin{equation}     \begin{split}     E(b_0)=\frac{1}{4} \left(2 (-1)^p (1-2 p) \left(2^{\frac{1}{-2 p-2}} \left((-1)^p (1-2 p)        p\right)^{\frac{1}{-2 p-2}}\right)^{2 p}+2^{\frac{1}{p+1}} \left((-1)^p (1-2 p)        p\right)^{\frac{1}{p+1}}\right)     \end{split}     \end{equation}     \end{widetext}      And I get this: ![enter image description here](http://i.stack.imgur.com/VHy6v.png) ![enter image description here](http://i.stack.imgur.com/1MDbh.png) I don't know why it leaves such big empty space between some equations :\ Oh the preambule is:               \documentclass[twocolumn,pre,floats,aps,amsmath,amssymb]{revtex4}          \usepackage{graphicx}     \usepackage{bm}     \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage[dvipdfm,colorlinks=true,bookmarks=false,urlcolor=blue,citecolor=blue,linkcolor=red,pdfstartview={XYZ null null 1.00}]{hyperref}     \usepackage{extarrows}     \usepackage{subfigure}     \usepackage{caption}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{wrapfig}     \usepackage{graphicx}     \usepackage{float}     \usepackage{url}     \usepackage[all]{hypcap}     \usepackage{subfigure}     \usepackage{color}     \usepackage{xcolor}     \usepackage{listings}     \usepackage{array}          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}     \newcolumntype{y}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}     \renewcommand*{\arraystretch}{1.2}      The part that looks fine, looks like this: ![enter image description here](http://i.stack.imgur.com/BLqqQ.png) Ignore the text, it's irrelevant... Why does this happen? :\


title: Eadui font and luatex

text: Eadui, based on the hand of an eleventh-century scribe, is freely available at the Open Font Library. I can use Eadui easily with `xelatex`, but `lualatex` produces a puzzling error. For example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Eadui}     \begin{document}     The cat sat on the mat.     \end{document}      gives this with `xelatex`: ![enter image description here](http://i.stack.imgur.com/Eb0w1.png) But the same file compiled with `lualatex` yields this:               ./example.tex:3: LuaTeX error ...xmf-dist/tex/luatex/luaotfload/luaotfload-fontloade     r.lua:8299: attempt to index local 'si' (a nil value).     <to be read again>     \scan_stop:     l.3 \setmainfont{Eadui}               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ./example.tex:3: fontspec error: "font-not-found"     !     ! The font "Eadui" cannot be found.     !     ! See the fontspec documentation for further information.     !     ! For immediate help type H <return>.     !...............................................          l.3 \setmainfont{Eadui}      I’m using TeX Live 2014, but I’ve had this problem since I first tried the font several years ago. Eadui is installed in `~/.fonts`, and it’s listed in `luaotfload-names.lua.gz`. Google had no matches for “attempt to index local 'si' (a nil value)”. Any idea what that message could mean, how to begin debugging the font, or how to work around the problem?


title: How do I find a LaTeX font with an upper-case cursive letter Z?

text: I cannot seem to figure out how to make an upper-case, cursive letter Z, like the one on the left in this picture. By using a french cursive environment, I can get the lower-case z, but the upper-case Z is not what I am looking for. Anyone know how to get LaTeX to make this font/symbol?


title: MATH Table from MS

text: I'm developing a small equation editor, using the Win32 API and the MATH table, which has been recently incorporated by MS into its OpenType file for the Cambria Math font. I received the MATH table specs from MS and in general I think I understand how to extract any information from it. My problem is to understand the concept behind several constants defined in this table. I contacted MS about this and they told that these terms are very common in LaTex. Since I'm not familiar with this language, I would appreciate if someone could help me understand the meaning of the following constants : **MathLeading** White space to be left between math formulas to ensure proper line spacing. **AxisHeight** Axis height of the font. **SuperscriptShiftUpCramp** Standard shift of superscripts relative to the base, in cramped style. **StackTopShiftUp** Standard shift up applied to the top element of a stack. **StackGapMin** Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element.


title: Show url only for one reference

text: I am using `biblatex`. Like I use zotero to retrieve metadata of references, I have plenty of urls into my .bib file. In most cases, I don't want the url to be printed (because it is only the url of the publisher webpage presenting the book). So I use the following line with `url=false` :               \usepackage[style=authoryear-comp,          hyperref,          backend=biber,          isbn=false,          doi=false,          url=false,          date=year]{biblatex}      However, in some case, the url is important: for example if I cite an online article which has no physical publisher. How can I tell to biblatex to print the url for some references (explicitly indicated) without removing all (useless) urls in my references to keep only the useful ones?


title: Why do I get an extra white page before my TikZ picture?

text: I've created a little diagram in TikZ. Only problem is, it's quite big, so I figured I should use landscape mode for it. Only problem is, when I put it between               \begin{landscape}     \input{erd.tikz.tex} % my diagram     \end{landscape} I get an extra white page before the diagram itself. I can't seem to understand why, any idea? Thanks. Here is the tikz picture: http://pastebin.com/L7p48vrW Here is the document:               \documentclass[border=0.4in]{article}          \usepackage{tikz}     \usetikzlibrary{shapes.multipart}     \usetikzlibrary{matrix}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}     \usepackage{scalefnt}     \usepackage{geometry}     \usepackage{pdflscape}          \makeatletter               \begin{document}          \section{Foo}     Foo bar bar bar foo, foo bar.     \newgeometry{left=2cm,bottom=3cm}     \begin{landscape}     \input{erd.tikz.tex}     \end{landscape}     \restoregeometry     \section{Zip}     Boom boom, zip.          \end{document}


title: How to reset the question number for different sections in exam class without getting multiply defined labels

text: This is the minimal working example:               \documentclass[a4paper,11pt]{exam}     \begin{document}          \section{ONE}     \begin{questions}       \question First question     \question Second questoion     \end{questions}          \section{TWO}     \begin{questions}       \question First question     \question Second questoion     \end{questions}               \end{document}      The problem I have with this is that there is a warning for multiply defined labels. Which in a very big document sometimes makes the compilation hang. Is there a fix for that?


title: Text in long multirow is not vertically centered

text: I have a large table, and the first two cells are multirow cells which span the height of the table. Instead of centering properly, they are centered in the top portion of the table, and I am completely confused by this behaviour.               \documentclass{book}          \usepackage{multirow}                               % Layout options - tables     \usepackage{tabularx,ragged2e,booktabs,caption}             % Layout options - tables     \usepackage{rotating}                               % Rotate objects     \usepackage{array}                              % formatting tables fix     \newcolumntype{C}[1]{>{\raggedright\arraybackslash}p{#1}}       % formatting tables fix          \begin{document}          \setlength{\extrarowheight}{5pt}     \begin{tabular}{m{5mm} m{5mm}| p{25mm}  p{5mm} p{55mm}}\toprule[1.5pt]     \multirow{8}{5mm}{\rotatebox[origin=c]{90}{Uncentered text and arrow}} & \multirow{8}{5mm}{$\downarrow$} & A B C & \multicolumn{2}{C{60mm}}{It may be that the primal source of all}\\     &&\hspace*{10mm}\underbar{D} \newline \newline $ \hspace*{20mm}\nwarrow$ & \multicolumn{2}{C{60mm}}{those pictorial delusions will be found }\\      &&& \multicolumn{2}{C{60mm}}{among the oldest Hindoo, Egyptian, and }\\     && E& \multicolumn{2}{C{60mm}}{Grecian sculptures. For ever since those }\\     && F,G,\newline H  \newline I,J    & $\downarrow$ & inventive but unscrupulous times when on the\\      && K & $\leftarrow$ &   marble panellings of temples, the pedestals\\      &&L& &\\     && \multicolumn{3}{C{90mm}}{ of statues, and on shields, medallions, cups, and coins, the dolphin was drawn in  scales of chain-armor like Saladin's, and  a helmeted head like St. George's; ever since then has something of the same sort of license prevailed, not only in most popular pictures of the whale, but in many scientific presentations of him. }\\     \bottomrule[1.5pt]     \end {tabular}          \end{document}      And here's what it looks like: ![miktex output](http://imgur.com/3DmDgpS.png) So, my question is, why is it centering high, and how can I fix it? Thank-you


title: biblatex-apa: undefined references

text: I cannot, for the life of me, get `biblatex`'s `apa` style to work. Other `biblatex` styles work fine, `apa`, however, does neither print a reference list, nor produce a citation at all (single output is key in boldprint). Warning "undefined references" is produced.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[german, ngerman]{babel}     \usepackage[babel]{csquotes}     \usepackage[style=apa, backend=biber]{biblatex}     \DeclareLanguageMapping{german}{german-apa}          \begin{filecontents}{apa-test-bib.bib}          @book{Labov1972,         Address = {Philadelphia},         Author = {William Labov},         Publisher = {University of Pennsylvania Press},         Title = {Sociolinguistic Patterns},         Year = {1972}}          \end{filecontents}     \addbibresource{apa-test-bib.bib}          \begin{document}          Bla \cite{Labov1972}          \printbibliography          \end{document}      I run the newest version available of all packages. Can someone help, please? Am I just overlooking the obvious?


title: How to copy/paste multiple spaces from lstlistings?

text: This is a continuation of a question that I asked already: How to copy/paste from lstlistings?. The solution presented there does not work if the text within the lstlistings environment contains consecutive spaces. Consecutive spaces get copied as a single space. See the following example:               \documentclass[letterpaper]{article}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[lmargin=2.5cm,rmargin=2.5cm,tmargin=1.5cm,bmargin=3.5cm]{geometry}     \usepackage{listings}  % Environment meant for source code (useful for word-wrapping verbatim text)     \lstset{language=[LaTeX]TeX,breaklines=true} % Word wrap within listings environment          \begin{document}     \lstset{basicstyle = \verbatim@font}          \begin{lstlisting}     There are no spaces in here []     There is one spaces in here [ ]     There are two spaces in here [  ]     \end{lstlisting}          \end{document}      The the contents get copied/pasted such that the third line only contains one space, when it should contain two. Does anyone know how to fix this?               There are no spaces in here []     There is one spaces in here [ ]     There are two spaces in here [ ]      Thank you


When I compile my document using `latexmk.pl` I get warning for every citation:               Latexmk: Citation 'XXX' on page YY undefined      The citation appears in the References at the end of the document, but at the place of \cite only the (?) is shown. The document is divided into many files in different directories, but same happens in master tex file, the bib file is in root folder along with master tex file.


title: Improve ugly PSTricks code

text: Consider the following code:               \documentclass{article}          \usepackage{pstricks-add}          \psset{unit = 0.47\psunit, fillstyle = solid}          \begin{document}          \begin{pspicture}(0.5,1)(25,12.7)     \psframe(3,1)(10,10)     \psframe[fillcolor = blue!70](3,1)(10,4)     \rput(6.5,2){Saltvand}     \psframe[fillcolor = red!60](3.5,2)(4,12)     \psframe[fillcolor = gray!60](9,2)(9.5,12)     \psframe[fillcolor = black](1,11.7)(3,12.3)     \psline[linewidth = 3\pslinewidth](2.9,12.23)(3.75,12)     \psline[linewidth = 3\pslinewidth](2.9,11.77)(3.75,12)     \psframe[fillcolor = black](12,11.7)(10,12.3)     \psline[linewidth = 3\pslinewidth](10.1,12.23)(9.25,12)     \psline[linewidth = 3\pslinewidth](10.1,11.77)(9.25,12)     \psframe[fillcolor = gray!80](14,1)(24,9)     \psframe(15,4)(21,8)     \psarc[linewidth = 0.75\pslinewidth](18,5){2}{30}{150}     \multido{\i = 30+40}{4}{%       \psRelLine[angle = \i, linewidth = 1.5\pslinewidth](18,5)(20.3,5){1}{A}       \psRelLine[angle = \i, linecolor = white, linewidth = 2.5\pslinewidth](18,5)(19.7,5){1}{A}%     }     \multido{\i = 50+40}{3}{       \psRelLine[angle = \i, linewidth = 0.75\pslinewidth](18,5)(20.3,5){1}{A}       \psRelLine[angle = \i, linecolor = white, linewidth = 2\pslinewidth](18,5)(19.7,5){1}{A}%     }     \psline[origin = {18, 5},linewidth = 2\pslinewidth](2.5;120)     \psframe(17,2.4)(19,2.6)     \psframe[fillcolor = black](17.2,2.2)(17.8,2.8)     \rput(16,2.5){\large $=$}     \rput(20,2.5){\large $\sim$}     \pscircle(23,2.7){0.5}     \pscircle(23,2.7){0.2}     \rput(21.8,2.7){\large $-$}     \pscircle(23,4.2){0.5}     \pscircle(23,4.2){0.2}     \rput(21.8,4.2){\large $+$}     \rput(23,1.7){\scriptsize $0$/Jord}     \rput[t](22.5,8){\shortstack[c]{%       \footnotesize Volt-\strut\\[-0.75ex]       \footnotesize meter\strut}     }     \psset{fillstyle = none}     \psline(1,12)(0.5,12)(0.5,12.7)(25,12.7)(25,2.7)(23,2.7)     \psline(12,12)(24.5,12)(24.5,4.2)(23,4.2)     \end{pspicture}          \end{document}      ![output](http://i.stack.imgur.com/slkgz.jpg) The output is as I would like it, but the code is not very pretty. Especially the `\multido` stuff is badly written; can anyone help me improve this?


title: TeX capacity exceeded when using mdframed inside figure

text: Sorry if this question has already been answered before. The following code always produce the silly error:               TeX capacity exceeded, sorry [input stack size=5000].<write>Package \mdframedpackagename Info: Not enough space on this page\on... \end{mdframed}      I have reduced it to the following example:               \documentclass[11pt,a4paper]{scrreprt}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{mdframed}     \usepackage{float}     \usepackage{blindtext}          \begin{document}     \blindtext[6]          %\newpage          \begin{figure}[H]     \begin{mdframed}[rightmargin=+0.5cm, leftmargin=+0.5cm]     hello world     \end{mdframed}     \caption{Some FOOBAR}     \end{figure}          \end{document}      Once I include the newpage command, the example compiles just fine! I'm using this version of MiKTeX:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2011.6.14) 7 JAN 2014 17:13     entering extended mode     **test.tex      Any help would be appreciated!


title: Caption numbering missing in beamer class when adding subfig package

text: I am having a problem with the beamer class and subfig package. Once I add the subfig package (for subfloats) the numbering of all my captions disappear. Please see the following minimial working example, where I included \usepackage{subfig} in line 13. Commenting the line out results in correct numbering. Thank you for any help!               \documentclass[xcolor=dvipsnames]{beamer}          \mode<presentation>     {       \usetheme{CambridgeUS}      % or try Darmstadt, Madrid, Warsaw, .....       \setbeamertemplate{caption}[numbered]     }           \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}          % subfloats     \usepackage{subfig}               \begin{document}          \begin{frame}       \begin{figure}        \includegraphics[width=.2\linewidth]{figures/fig.pdf}        \caption{Test caption}       \end{figure}          \end{frame}          \end{document}


title: To prevent overflow of text from the corner in tikz environment

text: I get sometimes overflow from the right-hand-side corner like this ![enter image description here](http://i.stack.imgur.com/I9Q9l.png) for this minimal code               \documentclass{article}     \usepackage{tikz}          \usepackage[framemethod=tikz]{mdframed}     \newtheorem{question}{Question}     \mdfdefinestyle{que}{       linecolor=cyan,       backgroundcolor=cyan!20,     }     \surroundwithmdframed[style=que]{question}               \begin{document}     \begin{question}     ...     \end{question}     \end{document}      **How can you prevent the overflow without making the width of the box any wider in the tikz environment?**


title: Why do I get (author?) when I use \citet with natbib?

text: I would like to show the author names using `\citet` but I get just the reference number. Here is a minimal code:               \documentclass{report}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{natbib}          \begin{document}           The author \citet{toschi09} has shown that ..          \bibliographystyle{plain}     \bibliography{foo}          \end{document}      And here is foo.bib               @article{toschi09,     author = {Toschi, F. and Bodenschatz, E.},     title = {Lagrangian Properties of Particles in Turbulence},     journal = {Annual Review of Fluid Mechanics},     volume = {41},     number = {1},     pages = {375-404},     year = {2009},      }      What I get is: > The author (author?) [1] has shown that .. Any help will be more than welcome, thank you!


title: \hbox_overlap_right:n{} vs. \makebox[0pt][l]{}

text: I stumbled about some, to my understanding, unexpected behaviour of the `expl3` command `\hbox_overlap_right:n`. I was expecting all examples below to produce the same result, that is, the frame box sitting at the same position as the yellow box. But only the `\makebox` example produces the expected result. The `expl3` examples even insert a line break between the yellow and the frame boxes. What is going wrong?               \documentclass{article}     \usepackage{color}     \usepackage{expl3}          \begin{document}     \ExplSyntaxOn     %doesn't work     \hbox_overlap_right:n{\color{yellow}\rule{1in}{0.5in}}\frame{\phantom{\rule{1in}{0.5in}}}     \par     %doesn't work either     \hbox_to_zero:n{\color{yellow}\rule{1in}{0.5in}\hss}\frame{\phantom{\rule{1in}{0.5in}}}     \par     %LaTeX2e working as expected     \makebox[0pt][l]{\color{yellow}\rule{1in}{0.5in}}\frame{\phantom{\rule{1in}{0.5in}}}     \ExplSyntaxOff     \end{document}      ![enter image description here](http://i.stack.imgur.com/e6kcX.png)


title: Problem between hyperlink and bibtex

text: I am using `hyperref` and BibTeX for my thesis. Everything works perfectly, when the citation is in the normal text i.e. the hyperlink is created to the bibliography and in the bibliography is done the hyper link to the section. The problem begin when the reference is inside a table, than in the figure the references number is properly generated, but in the bibliography appears the hyperlink as question mark instead the section where they are. Does anybody know what to do? I am using `\citep{}` for references. My preamble:               \documentclass[arial,paper=a4]{book}               %************************************                         \usepackage{pstricks,pst-node}          \usepackage[numbers]{natbib}          \usepackage{nomencl}          \usepackage[nottoc]{tocbibind}          \usepackage{comment}          \usepackage{booktabs}          \usepackage{subfigure}          \usepackage{graphicx}          \usepackage{caption}          \usepackage{multirow}               %*************************Hyperlink***************************     \usepackage{graphicx}          \usepackage[bookmarksnumbered,colorlinks,backref,linktocpage=true]{hyperref}          \hypersetup{linkcolor=blue,citecolor=blue,}                    ************************************************************************          \makeindex                      %**************************main body*************************          \begin{document}     \mainmatter           \include{Introduction}          \bibliographystyle{plain}     \bibliography{Bibliografia}          \end{document}      So looks my citation in the bibTex-file               @article{     Delbeke,        Author = {Delbeke, D. and Coleman, R. E. and Guiberteau, M. J. and Brown, M. L. and Royal, H. D. and Siegel, B. A. and Townsend, D. W. and Berland, L. L. and Parker, J. A. and Hubner, K. and Stabin, M. G. and Zubal, G. and Kachelriess, M. and Cronin, V. and Holbrook, S.},        Title = {Procedure guideline for tumor imaging with 18F-FDG PET/CT 1.0},        Journal = {J Nucl Med},        Volume = {47},        Number = {5},        Pages = {885-95},         Year = {2006} }      ### The table               \begin{table*}[!ht]     \begin{center}          \begin{tabular*}{\textwidth}{@{}p{3.5cm}ccccp{0.5cm}cccp{5.0cm}cccp{4cm}ccccc@{}}          \multicolumn{4}{c}{}\\           \textbf{Category} &&& \textbf{Factor} &&& \textbf{Explanation} &&&\textbf{ Reference} \\      \hline           Patient Preparation &&& Fasting &&& \begin{minipage}[t]{0.3\columnwidth} patient should be inform not to consume any food or drink, except water, between 4 to 6 hours before the FDG application \end{minipage}&&& \begin{minipage}[t]{0.1\columnwidth} \citep{Delbeke}     \citep{Boellaard, Boellaard-Netherland, Niederkohr, Krause, Waxman} \end{minipage}          \end{tabular*}     \end{center}     \end{table*}      * * * ![this is how the bibliography looks like and the table where I made the citation. All the citations in the table show the same problem. But the hyper link with the question mark works correct, I mean it goes to the correct page.](http://i.stack.imgur.com/nJRtV.jpg) This is how the bibliography looks like and the table where I made the citation. All the citations in the table show the same problem. But the hyper link with the question mark works correct, I mean it goes to the correct page.


title: Controlling the indentation of the second line in a list

text: I'm using enumitem to label text, and I'd like the text to all be aligned to the same indent as the first line in the list. The second line begins underneath the label. I'm sure there's a simple fix, but after reading the enumitem documentation I couldn't find anything.               \documentclass[multi={minipage}, border=5]{standalone}          \usepackage{enumitem}          \begin{document}     \begin{minipage}{500bp}     \fontsize{20}{24}     \selectfont     \begin{enumerate}[label=(\Alph*),align=left,topsep=1ex,parsep=0ex,itemsep=1ex,leftmargin=3ex]     \item{This is some long text that will overset to the second line of the list.  I would like the second line to be in line with the first.}     \item{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}     \end{enumerate}     \end{minipage}     \end{document}      Please let me know if there's anything I should add to my mwe.