title: Suggestions for an automatic taxonomy environment

text: ![MNWE](http://i.stack.imgur.com/uAQhY.png) **Background** In this site there are excellent examples of How to draw up a hierarchical tree diagram for taxonomic classification of several groups but often you must show only the position of a concrete group or single species across a long classification. Then a tree is not useful. A solution is simply show the ordered taxons in plain text:               Class Mammalia C. Linnaeus, 1758     Order Primates C. Linnaeus, 1758     Superfamily Hominoidea (Gray, 1825)      Family Hominidae  Gray, 1825     Genus Homo C. Linnaeus, 1758     Homo sapiens  C. Linnaeus, 1758      This is correct, but usually is showed with a hierarchical indentation that make a slopping margin (that looks much better and it is easier to follow IMHO):               Class Mammalia Linnaeus, 1758      Order Primates Linnaeus, 1758       Superfamily Hominoidea (Gray, 1825)         Family Hominidae  Gray, 1825         Genus Homo Linnaeus, 1758          Species Homo sapiens Linnaeus, 1758      Obtain the above manually in LaTeX is easy, but it could look much better if the scientific names are also indented in parallel to the left margin. Make this manually is possible with a tabular environments, so you can obtain:               Class           Mammalia Linnaeus, 1758      Order           Primates Linnaeus, 1758       Superfamily     Hominoidea (Gray, 1825)        Family          Hominidae  Gray, 1825         Genus           Homo Linnaeus, 1758          Especies        Homo sapiens Linnaeus, 1758      But need a lot of typing and any taxon as `Mammalia` must be at the right of all the groups levels (`Family`,`Genus`, etc.). This could be fine in one column with this example but in a long classifications (20-25 lines) or a two column document, the horizontal space is limited, and then it is better start `Mamalia` at the left of the end of `Species`:               Class        Mammalia Linnaeus, 1758       Order        Primates Linnaeus, 1758         Superfamily  Hominoidea (Gray, 1825)            Family       Hominidae Gray, 1825             Genus        Homo Linnaeus, 1758               Species      Homo sapiens Linnaeus, 1758      And reduce the indentation length as needed:               Class        Mammalia Linnaeus, 1758      Order        Primates Linnaeus, 1758       Superfamily  Hominoidea (Gray, 1825)         Family       Hominidae Gray, 1825         Genus        Homo Linnaeus, 1758          Species      Homo sapiens Linnaeus, 1758      As this cannot be done (easily) within a table, I think in a environment to make this (more or less) "automagically". **Desired goals** Ideally, the environment (or any other approach) should work without typing any (= as less as possible) LaTeX command in the plain text:               \begin{taxonomy}     Class Mammalia Linnaeus, 1758     Order Primates Linnaeus, 1758     Superfamily Hominoidea (Gray, 1825)      Family Hominidae Gray, 1825     Genus Homo Linnaeus, 1758     Homo sapiens  Linnaeus, 1758     \end{taxonomy}      And:   * Do not break any line as far it is possible without reducing the font size. That is, if text of some line take more than `1\linewidth` with the default spacing, this spacing must be reduced to a reasonable value.   * If the whole environment take less than `\linewidth`, it must be centered (without losing the format, obviously). But this is my naive attempt so far:               \documentclass[12pt]{article}     \usepackage{lipsum,xcolor}          \newcounter{line}     \def\doline#1{\addtocounter{line}{1}\hspace{\value{line}\parindent}#1}          \def\marker{\end{taxonomicon}}     {\obeylines     \gdef\getlines#1       {\def\text{#1}%       \ifx\text\marker \let\next\text         \else \doline{#1}\let\next\getlines \fi       \next}}     \newenvironment{taxonomicon}{\sffamily\hfill\begingroup\obeylines\getlines}%       {\setcounter{line}{0}\endgroup}          \newcommand\taxon[2]{     \makebox[7em][l]{\color{gray}#1\dotfill}     #2     }          \begin{document}          \lipsum[1]          % poor man's version          \parindent=1.7em % adjust as needed          \begin{taxonomicon}      Class Mammalia C. Linnaeus, 1758     Order Primates C. Linnaeus, 1758     Superfamily Hominoidea (Gray, 1825)      Family Hominidae  Gray, 1825     Genus Homo C. Linnaeus, 1758     Homo sapiens  C. Linnaeus, 1758          \end{taxonomicon}          \lipsum[2]          \parindent=1.2em % adjust as needed          \begin{taxonomicon}      \taxon{Class}{Mammalia Linnaeus, 1758}     \taxon{Order}{Primates Linnaeus, 1758}     \taxon{Superfamily}{Hominoidea (Gray, 1825)}     \taxon{Family}{Hominidae  Gray, 1825}     \taxon{Genus}{Homo Linnaeus, 1758}     \taxon{Species}{Homo sapiens} Linnaeus, 1758          \end{taxonomicon}          \lipsum[3]     \end{document}      Note: I asking only a solution for a classification that always descend 1 level in each line (no matter of the real meaning of the text), but suggestion for more complex classifications (with two families, and several genera, for example) would be wonderful.


title: Weird vertical lines with table

text: Using the code:               \documentclass[a4paper]{article}        \usepackage{ngerman}      \begin{document}     \begin{table}[htb]     \begin{center}     \begin{tabular}{|c|c|c|}     \hline     \textbf{Value A}&\textbf{Value B}&\textbf{Value C} \\     \hline      \hline     \\ \( 1) & \( 17) & \( 98) \\ \\     \hline     \\ \( x = \frac{42}{5} \cdot x + n\) & \( y = \frac{17}{2} \cdot y + n\) & \( 0\) \\ \\     \hline     \hline     \end{tabular}     \end{center}     \caption{Stuff}     \end{table}     \end{document}      I get ![enter image description here](http://i.stack.imgur.com/Hkit2.png)


title: tkz-fct produces no plots, why?

text: tkz-fct produces no plots, for instance I copied the following code from the manual:                   \documentclass{article}              \usepackage{color}         \usepackage{tikz}%         \usepackage{tkz-euclide}         \usepackage{tkz-fct} \usetkzobj{all}              \begin{document}         \begin{tikzpicture}[scale=.5]         \tkzInit[xmax=100,xstep=10,         ymax=1000000, ystep=100000]         \tkzAxeX[right] \tkzAxeY[above]         \tkzGrid \tkzFct[color=red,         domain=0:100]{\x**3}         \end{tikzpicture}          \end{document}      This results in the following picture: ![enter image description here](http://i.stack.imgur.com/qhkK3.jpg) gnuplot --version gives: gnuplot 4.4 patchlevel 2 Any ideas how to solve the problem?


title: Stringified commands to macros sequence

text: First, what is the proper terminology for a "string" in TeX/LaTeX that is an argument for a macro? e.g., `\macro{somestring}` Obviously `somestring` is a token, set of tokens, string, argument, etc. I will call it a string since I do not know what else to call it. I'm not thinking it is another macro but sort of "inert" text. What I want to be able to do is parse a string that represents macros in LaTeX but codified in a very simple way: The best way to describe it is to give an example The follow string               x4y3[cgreen, t4[-3,4,a90]]      represents setting properties > x-position = 4   >  y-position = 3   >  color = green > > test = 4 with x offset -3, y offset 4 and angle 90   >  `[ ]` = optional (optional list of optional specifiers in no particular > order) _It should be **VERY** self explanatory how I went from the condensed string to the properties it represents. If not stare at the string for a few hours. You should be able to read the string and tell exactly what it means after knowing what the indicator symbols are. (this is no different than what xparse does with it's specification string except mine is a little more complex)_ Now the hard part, I want to be able to parse that string into a series of macros that set data. As you can probably guess it, the string represents something to do with placing a graphic at a location. If you want to have some interpretation for               x4y3[cgreen, t4[-3,4,a90]]      to make you feel better: Place a green circle at coordinates(4,3) with a piece of text "4" offset (-3,4) from it and rotated 90 degrees. To do this cleanly and efficiently I would like to create macros that are called for each corresponding macro in the string               \def\x#1{}     \def\y#1{}     \def\c#1{}     \def\t#1#2{}      So we could see the string as simply calling `\x{-3}\y{4}\c{green}\t{4}{-3,4,a90}` So as you can see the string is just a "condensed" version of a macro. The string simply is a command value pair with possible optional arguments. One could almost simply go in and add `\'`s and brackets to get the command. For example, pseudo-code:               parse_string{         foreach token in command-list             write '\'token'{'next_token'}'         }      But I would like to add commands/macros that have more than one character (the smallest token size would take precedence) AND do other things like default values. Anyways, as usual this is relatively straightforward in most procedural programming languages but I'm sure I'll spend the next few weeks trying to figure out how to do it in TeX/LaTeX and then 10k lines of code later I'll probably end up with a buggy as hell version.


title: Color text without color package?

text: I'm about to submit an article for publication, and I need to color some label text that I'm overlaying on my figures with the overpic package/environment (some labels need to be white to be readable on some figures). Problem is, I just noticed the submission guidelines say _no color packages_ , so the               \usepackage[pdftex]{color}      I had been using is right out. Is there a way to get a specific string (really just single characters) colored white _without_ a color package?


title: What width value corresponds to the Tufte fullwidth environment?

text: In Tufte-LaTeX, I'd like to manually create a full-width environment using `minipage` rather than the package's `fullwidth` environment. What width value should I supply to `minipage` to match that of the Tufte `fullwidth` environment's width?               \documentclass{tufte-handout}          \usepackage{lipsum}          \begin{document}     \lipsum[1]          \begin{minipage}{<width>}         \lipsum[2]     \end{minipage}           % The value for <width> above should make that paragraph identical this one     %\begin{fullwidth}     %     \lipsum[2]     %\end{fullwidth}          \lipsum*[3]          \end{document}      * * * FWIW, I plan to use this primarily to create a full-width title block, if that matters for details of indentation and positoning.


title: Vertical Alignment of Minipage

text: I have a question, I'm using the following setup for a title page:               \begin{titlepage}     \begin{center}     \textsc{\LARGE University Name}\\[1.5cm]     \textsc{\Large Bachelor thesis}\\[2cm]     { \huge \bfseries Title of the thesis}\\[3cm]     \begin{minipage}{0.4\textwidth}     \begin{flushleft} \large     \emph{Author:}\\      Me\\[0.5cm]     \emph{Student ID:}\\     mine\\[0.5cm]     \emph{Adress:}\\     mine\\[0.5cm]     \emph{Email:}\\     mine     \end{flushleft}     \end{minipage}     \begin{minipage}{0.4\textwidth}     \begin{flushright} \large     \emph{Supervisor:} \\     mine     \end{flushright}     \end{minipage}     \vfill     {\large \date{15. Juni 2011}}     \end{center}     \end{titlepage}      If I run it, the "supervisor" line of the right column does not align with "Author", but rather with the middle of the left column. However, I would like it to be up, with the first item of the left column. How do I do this? Thanks a lot


title: About texhash and proper installation of TeXlive

text: So, I'm running linux Mint (but I guess the same applies to Ubuntu) and as is common knowledge, their `TeX` distribution tends to be slightly outdated. Now I can't have none of that and decide to install it with the install-tl from the TeXlive homepage. Somehow, I cannot install it as a normal user (this I find normal as it is installing in the root directory), so I proceed to install `TeXlive`               sudo perl ./install-tl      and add the paths to `.bashrc`. All is well and my `TeXlive` installation works. Except for the `texhash` option. Running it as a normal user is no problem, except that I installed `TeXlive` as root, and so running `texhash` as normal user doesn't do anything (`directory not writable. Skipping...`). No problem I think, I'll just do it as root. But somehow `texhash` isn't installed for root. Now, `texhash` is somehow connected to updating the directory tree, but I don't really know what it does. I use it on my `~/texmf/` folder to add my packages to a global path (I think), but when looking at info for this question I see in a comment for this question that this is apparently not needed, though I don't understand what I'm to do now. So if I'm not adding new packages from CTAN or updating, I really don't need `texhash` and all is good? To summarize: I'd like to know:   * Why should I need `texhash`?   * Can I avoid installing as root on linux Mint/ubuntu (here they say you don't have to be root, that it's even discouraged)?   * Should I somehow install `texhash` for root? I realize this might be a vague question at best, but I didn't find an answer I readily understood, so I'd appreciate any thought on this.


title: Templates for the Journal of Finance

text: and other known journals in finance and economics (jfe, rfs, aer, econometrica, jpe,...): links would be highly appreciated, by me and I guess by many users. If you know the links please post them! :)


title: Drawing directed hyperedges with TikZ

text: I'm currently working with modelchecking of symbolic dependecy graphs for my semester project in Computer Science, and am dire need of an easy way to draw dependency graphs preferably using TikZ. My problem is somewhat related to this, but i need the arcs to be directed. A hyperedge `e` is a tuple `e = (v, T)` where `v` is a source node and `T` is the target set. Each element in `T` is a tuple `t = (w, t)` where `w` is either a non-negative integer or a parameter and `t` is a target node. The follwing example (found here) does exactly what i need, except i need the arcs to be directed.               \documentclass{standalone}     \usepackage{tikz}          \newcommand{\hyperedge}[4][180]{          \draw (#2.#1) ++(#1:.5)  edge (#2) edge (#3) edge (#4);         }          \begin{document}     \begin{tikzpicture}[         y=.7cm, x=1cm,         every edge/.append style={thick}     ]          \node (c) at (0,0) {c};     \node (a) at (1,1) {d};     \node (b) at (1,-1) {e};               \hyperedge[0]{c}{b}{a}     \end{tikzpicture}     \end{document}      I tried adding `->` as an option to the _tikzpicture_ , but this resulted in arrows not just to the target set but also to the source node.


title: Error in compiling with Tikz Externalize

text: I've edited this post as I've broken the problem down to something smaller than a thesis. I can run the following command in the cmd window:               lualatex file.tex      with the following script no problem:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}      \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{float}     \usepackage[hang,small,bf]{caption}     \usepackage{color}          %\usetikzlibrary{external}     %\tikzexternalize          \begin{document}     The golden-crowned sifaka is a medium-sized lemur characterized by mostly white fur, prominent furry ears and a golden-orange crown.           \begin{figure}         \input{sdof.tex}         \caption{This is the caption}     \end{figure}          \begin{figure}         \input{strain.tikz}         \caption{This is the caption}     \end{figure}          \end{document}      But when I uncomment the               \usetikzlibrary{external}     \tikzexternalize      lines and use the following:               lualatex --shell-escape -interaction=nonstopmode file.tex      it compiles the first figure into file-figure0.pdf no problem but when it gets to teh second, there are problems and it gives a fatal error sdof.tex is a simple diagram i drew myself in inkscape and the second strain.tikz is matlab2tikz output of lots of data points from a test.


title: Too much space in the section

text: My problem is the next, I have too much space to finish a `\section` and start the other section ![enter image description here](http://i.stack.imgur.com/M3ybz.jpg) the code is:               ...ropagaci\'on, as\'i solamente la luz que sea paralela al eje de polarizaci\'on atravesara el polarizador.           \section{\'Angulo de Brewster}     \subsection{Teor\'ia}          Entendemos como \'angulo de Brewster como el \'angulo que hay entre la direcci\'on de propagaci\'on y la...      how can I solve it?


title: Creating a custom rule

text: Upon trying to answer, How I can customize fbox and hrule? , I tried to do it using basic LaTeX commands as shown in the MWE below. But for some reason or the other the command `\egline` does not generate the same output as `\sampleline`. Why is that? ![enter image description here](http://i.stack.imgur.com/JCMre.png)               \documentclass[letterpaper]{article}     \usepackage{xcolor}     \usepackage{lipsum}     \newcommand{\egline}{%         \par\vskip 1ex%         {\color{ejemplo}%         \leavevmode\hrule height 1pt width \dimexpr\hsize-2em\relax \hrule height 0.5ex width 2em%         }%         \par\vskip1ex%         }     \definecolor{ejemplo}{RGB}{37,153,116}     \newcommand{\sampleline}{%         \par\noindent%         {\color{ejemplo}%         \parbox{\linewidth}{%             \hrulefill\rule{2em}{0.5ex}}%             }%         \par%     }     \begin{document}     \lipsum[1-2]     \egline     \sampleline     \lipsum[1-2]     \end{document}      * * * I redefined the command `\egline` as follows:               \newcommand{\egline}{%         \par\vskip 1ex%         {%         \color{ejemplo}%         \leavevmode%         \vbox{%         \hrule height 1pt width \dimexpr\hsize-2em\relax}%         \vbox{%          \hrule height 0.5ex width 2em}%         }%         \par\vskip1ex%         }      But it gives an extra white space (15pt horizontally)? Weird? See image below: ![enter image description here](http://i.stack.imgur.com/ccpnJ.png) * * * Doing a third definition following David Carlisle's suggestions, I have a poor man's fix to the above, but I still don't get what is causing the indentation.               \newcommand{\egline}{%         \par\vskip 1ex%         {%         \color{ejemplo}%         \hskip-15pt\leavevmode\vrule height 1pt width \dimexpr\hsize-2em\relax\vrule height 0.5ex width 2em%         }%         \par\vskip1ex%         }      * * * To conclude, the fix is a `\noindent` where `\leavevmode` is:               \noindent\vrule height 1pt width \dimexpr\hsize-2em\relax\vrule height 0.5ex width 2em%


title: Createspace package with XeLaTeX

text: I'm getting this compilation error from the `createspace`package `\PackageError{createspace}{no PDF supported engine detected}{recompile this document using PDFLaTeX}` I'm using TeXShop typesetting with XeLaTeX with pdfTeX option. Is there a conflict between createspace and XeLaTeX?


title: How is the LaTeX 2e made?

text: I wanted to know how is the `\LaTeXe` symbol (![LaTeXe](http://i.stack.imgur.com/OiJd8.png)) made, I mean, the command **definition** of superscripts and subscripts on the "L", "A"... letters.


title: Printing a single bibtex entry as enumeration item

text: I have a bibliography in BibTeX. However I need to report the most important literature I have written thus far. These three entries must be presented in the enumeration environment. Of course one can simply format these entries properly. However I am looking for a more elegant solution where I only specify the key and the LaTeX compiler formats the entry properly. Are there any solutions to this problem?


title: Mdframed: negative top margin with page break skips a page

text: I am using the development version (1.9d) of the mdframed package to customize the proof environment in the following way. I wish that a line runs down from the word "Proof." and that the text of the proof is indented accordingly. To do that, I used a mdframed environment with only the left edge visible and a negative top margin (see MWE below). However, when a page break is needed, the environment starts on a new page every time. The situation is very similar to Split mdframed environment occasionally skips page and mdframed does not split correctly between pages. However, the first question provides only a solution when the "overhead text" is obtained with Tikz, and the solution provided in the second (using skipabove) does not seem to work in my case. I have toyed with the options skipabove, splitbottomskip, splittopskip, and adding more spaces with beforebreak, without success. Here is a minimal working example:               \documentclass{memoir}     \usepackage[english]{babel}     \usepackage{amsfonts,lipsum, mdframed}          \newmdenv[hidealllines=true,leftline=true,linewidth=1.5pt,innerleftmargin = 10pt,     innertopmargin=-1.1\baselineskip]{np}     \newenvironment{niceproof}{       \hangindent5pt\hangafter0       \begin{np}\hspace{-15pt}\textit{Proof.}~}       {\hfill$\square$\end{np}}          \begin{document}     If it fits in one page, everything works as intended.     \begin{niceproof}      \lipsum[1-4]      \end{niceproof}     \clearpage{}     But if we add a little more text, it starts on the next page      (even though the box is cut in two properly):     \begin{niceproof}     \lipsum[1-5]      \end{niceproof}     \end{document}      If this way of customizing the proof environment is not recommended, I am open to any alternative suggestions. In particular, I would be glad if such a result is possible by using only a newmdenv. Edit: result after compilation of the MWE. As you can see, the first Proof environment displays properly, but the second skips a page before displaying, although the break is good (I did not show page 4, which contains the rest of the Lorem Ipsum). ![result after compilation of the MWE](http://www.latp.univ- mrs.fr/~hellouin/Capture.png)


title: How to indent part of line to certain amount?

text: I apologize if this is a basic question, but I'm new to LaTeX and typography in general, and I'm not sure how to articulate my question properly. I have a document which looks like this:               \documentclass[12pt,letterpaper]{article}         \usepackage[margin=0.7in]{geometry}         \usepackage[parfill]{parskip}              \newenvironment{question}[1]         {\par\bfseries#1.\ignorespaces}         {\par\ignorespacesafterend}              \newenvironment{answer}         {\par\leftskip=2.0em\ignorespaces}         {\par\ignorespacesafterend}     \begin{document}          \begin{question}{1}     Testing testing testing testing testing testing testing testing testing      Testing testing testing testing testing testing testing testing testing      Testing testing testing testing testing testing testing testing testing           Testing testing testing testing testing testing testing testing testing      Testing testing testing testing testing testing testing testing testing      \end{question}     \begin{answer}     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum          lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     \end{answer}          \begin{question}{3}     Test test     \end{question}     \begin{answer}     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum     \end{answer}          \end{document}      ![broken](http://i.stack.imgur.com/gC9ZI.png) How do I modify my `question` environment so that the very first line after the number is indented to the same level the text inside the `answer` environment is? I don't want the number to be indented, but I do want the line following it (but not subsequent lines) to be indented to the same level as the lorem ipsum text. As an addendum, I was only able to describe my problem with the help of a picture. What's the proper way to explain it by using words?


title: Referring to Second Last Page in pageref in lastpage package

text: I can use `\pageref{LastPage}` to give the reference of last page with `lastpage` package. The last page of document is the back cover so I don't want to count it. I wonder how to specify the second last page with `lastpage` package. Thanks in advance for your help.


title: wrapfigures and quote environment not working together

text: I want to have a figure floating next to a block quote. So I used the `wrapfig` package and the `quote` environment. If you typeset the following example, you will see that the figure is printed on the next page instead of being next to the block quote. It works perfectly with normal text. Is there any solution to that?               \documentclass{article}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{wrapfig}     \begin{document}         \blindtext[3]         \begin{wrapfigure}{R}{0.5\textwidth}             \centering             \rule{5cm}{5cm}             \caption{Foo bar foobar baz baq}         \end{wrapfigure}         \begin{quote}             \blindtext         \end{quote}         \blindtext     \end{document}      ![enter image description here](http://i.stack.imgur.com/WKjA5.png)


title: Drawing angle addition in latex

text: I'm trying to draw the picture below but have been unsuccessful (I drew part a, can't do part b) This is what I used to draw part a               \begin{center}     \begin{tikzpicture}[font=\boldmath]\large     \coordinate (A) at (0,0) {};     \coordinate (B) at (2,0) {};     \coordinate (C) at (1,1) {};     \coordinate (D) at (3,1) {};          \begin{scope}[shift={(0,1.5)}]     \draw[thick, black, dotted]  (4,0) -- (5,1) node[sloped,midway,above] {};     \draw[thick, black, dotted]   (1,1) -- (5,1) node[sloped,midway,above] {};     \draw[->,  thick, black,   arrows={-latex}]  (0,0) -- (4,0) node[sloped,right=-0.7cm,above] {$\mathsf{A}$};     \draw[->,  thick, black,  arrows={-latex}]  (0,0) -- (1,1) node[sloped,midway,above=-0.1cm] {$\mathsf{B}$};     \draw[->,  thick, black, arrows={-latex}]  (0,0) -- (5,1) node[sloped,midway,above=-0.1cm] {$\mathsf{A+B}$};     \end{scope}     \end{tikzpicture}     \end{center}      ![Image I'm trying to reproduce](http://i.stack.imgur.com/w3kXf.png)


title: Ordering references sequentially, instead of alphabetically, using bibliography style "spbasic"

text: I am writing a paper to submit to Experimental Mechanics, a Springer journal. The guidelines for authors on the journal website state that the reference list should be ordered sequentially by order of appearance in the text. However, the bibliography style included with Springer's LaTeX package, "spbasic.bst", orders the reference list alphabetically. Does anyone know how to modify the "spbasic.bst" file in order to have the references appear sequentially instead of alphabetically? Thank you, Elizabeth


title: Centering a matrix in a figure?

text: I have a matrix that I would like to be centered in the middle of the page, however it is showing up left-aligned.               \begin{figure}[ht]$     \centering         \begin{bmatrix}             0       & C_l       & 0         & 0         & \dots     & \dots     & \dots     & 0         \\             0       & 0         & C_l       & 0         & \dots     & \dots     & \dots     & \vdots    \\             0       & C_r       & 0         & C_l       & \dots     & \dots     & \dots     & \vdots    \\             0       & 0         & C_r       & 0         & \ddots    & \dots     & \dots     & \vdots    \\             \vdots  & \hdots    & \hdots    & \ddots    & \ddots    & \ddots    & \hdots    & \vdots    \\             \vdots  & \hdots    & \hdots    & \hdots    & \ddots    & \ddots    & C_l       & 0         \\             \vdots  & \hdots    & \hdots    & \hdots    & \hdots    & \ddots    & \ddots    & 0         \\             0       & \hdots    & \hdots    & \hdots    & \hdots    & \hdots    & C_r       & 0         \\         \end{bmatrix}$     \caption{$n \times n$ transition matrix for a classical random walk.}     \end{figure}      How can I center this matrix?


title: Setting zmin/zmax in groupplot confuses colorbar creation (colorbar is 3d)

text: When using `groupplot`s and setting `zmin` and/or `zmax` in the `groupplot` environment manually, `pgfplots` generates a (broken) 3d legend: ![Issue](http://i.stack.imgur.com/xe91v.png) I assume the issue is that `groupplot` passes the `zmin`/`zmax` settings to the `colorbar` axis environment as well, resulting in the existential crisis making the colorbar 3d. Omitting the settings from the global `groupplot` environment and passing them manually to each `\nextgroupplot` works. But I thought this was still worth posting in case there's a better solution or in case this is a bug that needs to be resolved. # MWE:               \documentclass[border=5pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepgfplotslibrary{groupplots}          \begin{document}     \begin{tikzpicture}            \begin{groupplot}[%         group style={           group size=2 by 1,           horizontal sep=2cm,         },         zmin=-10,         zmax=10,         colorbar horizontal,       ]              \nextgroupplot         % \nextgroupplot[zmin=-10,zmax=10] % Works if global zmin/zmax are commented out.           \addplot3[surf] {x+y};              \nextgroupplot         % \nextgroupplot[zmin=-10,zmax=10] % Works if global zmin/zmax are commented out.           \addplot3[surf] {x+y};            \end{groupplot}     \end{tikzpicture}     \end{document}


title: Text always on the right

text: I am trying to create a macro which always places the text in its argument on the right side of the line and then the line should end. For example:               Left-Text \mymacro{Right-Text}       should have text on the left and then when the text is done `$\box$` should be placed on the right, but on the same line (as long as it fits). I have tried               \newcommand{\mymacro}[1]{\hfill \mbox{#1}}      which works fine provided that Right-Text fits on the last line of Left-Text. However, if Right-Text gets moved to a new line then it appears on the left side. For example:               \documentclass{amsart}     \begin{document}     Doesn't work           Left Text 0123456789 Left Text 0123456789 Left Text 0123456789     \mymacro{Right Text}           Works          Left Text 0123456789 Left Text 0123456789 Left Text 0123456789 Left Text 0123456789     \mymacro{Right Text}           Works          Left Text 0123456789 Left Text 0123456789     \mymacro{Right Text}           \end{document}


title: including .eps figures

text: I'm trying to include .eps figures in my .tex file (I'm using MiKTeX 2.9). I need to include graphics in this particular way:               \usepackage{graphics} % or graphicx      ...          \begin{figure}      \caption{\label{tha_label} ....}      \includegraphics{the_graphics.eps}      \end{figure}      But that way doesn't work, because it produces the error `Unknown graphics extension: .eps`. Of course, I can use `\uspackage{eps-to-pdf}` and include my graphics without errors, but I do not need to use that usepackage (the method above is only allowed). How can I do it?


title: Displaying author's name in a bibliographic entry in the form: Surname, First Initial of Firstname

text: \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{Arter95,         Author = {David Arter},         Date-Added = {2013-08-11 17:38:06 +0000},         Date-Modified = {2013-09-01 15:13:22 +0000},         Journal = {Journal of Common Market Studies},         Number = {3},         Pages = {361-287},         Title = {The {EU} {Referendum} in {Finland} on 16 October 1994:                  {A} Vote for the {West}, not for {Maastricht}},         Volume = {33},         Year = {1995}}          @article{Detlef95,         Author = {Jahn, Detlef; Storsved,Ann-sofie},         Date-Added = {2013-08-11 17:14:34 +0000},         Date-Modified = {2013-08-11 17:16:45 +0000},         Journal = {West European Politics},         Number = {4},         Pages = {18-37},         Title = {Legitimacy through referendum? The nearly successful domino‚Äêstrategy of the Eu‚Äêreferendums in Austria, Finland, Sweden and Norway},         Volume = {18},         Year = {1995}}     \end{filecontents}     \documentclass{article}     \usepackage[ngerman]{babel}     \usepackage{natbib}     \bibpunct{(}{)}{;}{a}{}{,}     \makeatletter     \renewcommand\@biblabel[1]{}     \makeatother          \begin{document}          \cite{Arter95}          \bibliography{\jobname}     \bibliographystyle{plainnat}          \end{document}      Please help. I want the author's name displayed like this "Arter, D." instead of David Arter


title: Autocompletion in texstudio : \frac

text: I recently moved from Texmaker to TeXstudio, and there is one thing in autocompletion that I loved with Texmaker and which doesn't seem to work by default on TeXstudio : when I would begin to type `\frac` in Texmaker, it would autocomplete with `{}{}` and once I filled the first `{}`, pressing tab automatically moved to the second `{}`. This does not work by default on TeXstudio. Is there a a way to make it do that?


title: command/enviroment that writes argument in predefined extra section

text: I am working on a script and I would like to put some proofs in an extra section. But, for editing, I would like to place the proof right after the proposition. So, I would like some kind of command that sends the input in a predefined section (For example: appends the input to the end of the section) I have in mind something like this: This code               \section{section}     Hello     \sendtoOtherSection{World}          \section{other section}     Nothing here      produces: > **1 section** > > Hello > > **2 other section** > > Nothing here > > World Like the title of this question says, I don't care if `\sendtoOtherSection` is a command or environment. It is not very important in which order the shifted text appears.


title: Custom alignment of text in itemized environment

text: I want to describe the variables involved in an equation in an itemized environment such that every item begins with the variable name and subsequently comes the description for it. I'd like to have all the descriptions left aligned. Here is a MWE that of course does not produce what I am looking for.               \documentclass{standalone}     \begin{document}     $E[g(x)] = \int_{-\infty}^{+\infty} f_X(x) \, g(x) \, \mathrm{d}x$.     %     where,     %     \begin{itemize}         \item $x$      \quad is a continuous random variable.         \item $f_X(x)$ \quad is the PDF of $x$.         \item $g(x)$   \quad is a function of $x$.     \end{itemize}     \end{document}


title: longtable: alternating column names/splitting wide table across pages

text: Need to split some wide tables across multiple pages using longtable. The code below provides an example of what I’m trying to do. Some of the column names need to vary by page. Specifically, columns 4-7 should be labelled “IB”, “IIA”, “II”, and “ ” on odd numbered pages of the table and “IIB”, “IIIA”, “Other”, and “Overall” on even numbered pages. (Note though that the table itself could start on an odd or an even numbered page in a document.) The code below produces correct output on pages 1, 2, and 4, but not on page 3. There, columns 4-7 read “IIB”, “IIIA”, “Other”, and “Overall” when they should say “IB”, “IIA”, “II”, and “ ”. Imagine there’s some way to fix this, but it seems well beyond my current abilities. Any help with this will be greatly appreciated.               \documentclass[11pt]{article}          %% Margins %%          \setlength{\textwidth}{6.25in}      \setlength{\oddsidemargin}{0in}          %%%% Packages %%%%          \usepackage[font={bf}]{caption}     \usepackage{longtable}     \usepackage{threeparttablex}     \usepackage[newcommands]{ragged2e}     \usepackage{array}     \usepackage{pdflscape}     \usepackage{booktabs}     \usepackage[pdfview=Fit]{hyperref}          %%%% Table Captions %%%%          \DeclareCaptionLabelSeparator{period-newline}{. }      \captionsetup{singlelinecheck=false,labelsep=period-newline,aboveskip=3pt}          \begin{document}          {     \scriptsize     \begin{landscape}          \begin{ThreePartTable}     \begin{TableNotes}       \item[]          A footnote I might want to add to the bottom of each page         at a later date.     \end{TableNotes}          \begin{longtable}[l]{ c c p{3.5in} *{4}{>{\centering}m{0.75in}} }        \caption[Treatment Regimens by Line]{Treatment Regimens by Line and Regimen} \\ \hline \addlinespace[3pt]        &    &         & \multicolumn{3}{c}{Disease Substage} &         \\ \cmidrule(l){4-6}        Line & Regimen & Agents & IB  & IIA  & II             &         \\ \hline     \endfirsthead       \caption[]{Treatment Regimens by Line and Regimen (Continued)}   \\ \hline \addlinespace[3pt]        &    &         & \multicolumn{3}{c}{Disease Substage} &         \\ \cmidrule(lr){4-6}        Line & Regimen & Agents & IIB & IIIA & Other          & Overall \\ \hline     \endhead        \hline \multicolumn{7}{r}{\emph{Continued on next page}} \\ \hline        \insertTableNotes     \endfoot        \hline        \insertTableNotes     \endlastfoot          %%%% Pages 1 and 2 %%%%          \addlinespace     1 & 1 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace            & 2 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace             & 3 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace             & 4 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace           2 & 1 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace[3pt]          \newpage          \addlinespace     1 & 1 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace            & 2 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace             & 3 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace             & 4 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace           2 & 1 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace[3pt]          \newpage          %%%% Pages 3 and 4 %%%%          \addlinespace        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace              & 2 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) &              \\ \addlinespace[3pt]          \newpage          \addlinespace        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\       &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace              & 2 & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\        &   & Lengthy text description of regimen $\ldots$ & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) & xxx (xx.x\%) \\ \addlinespace[3pt]           \end{longtable}     \end{ThreePartTable}     \end{landscape}     }          \end{document}


title: \includegraphics{*.pdf } substitutes in-figure symbols

text: I am using TeXstudio with its default settings. My figure is saved as PDF because I was unable to include `*.eps` because of the `Unknown graphics extension: .eps`-error. The figure opens without faults in Adobe Illustrator, however when I use `\includegraphics{*.pdf }`, the `pi` symbol on one of the axes of the figure is converted to the `unequal` symbol. That looks pathetic! How do I proceed to be able to include my figure correctly?               \documentclass[final]{report}     \usepackage[norsk]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \renewcommand{\thesection}{\arabic{section}.}     \renewcommand{\thesubsection}{\alph{subsection}.}          % Title Page     \title{Første obligatoriske øvelse MEK1100 vår 2013}     \author{Marius Jonsson}               \begin{document}     \maketitle          \begin{abstract}     Text     \end{abstract}          \tableofcontents          \section{Skalering}     \subsection{}               \begin{figure}[p]     \centering     \includegraphics[width=0.8\textwidth]{skudd.pdf}     \caption{Prosjektilbaner for utgangsvinkler $\frac{\pi}{6}$, $\frac{\pi}{4}$ og $\frac{\pi}{3}$}     \label{fig:awesome_image}     \end{figure}          \end{document}      I cannot find anythign wrong with the file. Perhaps you can? It views fine in my other software. As requested: here is the file "skudd.pdf": http://www.kingoslo.com/temp/skudd.pdf


How to get the closing single quote in math mode. The apostrophe in math mode is displayed as prime.               \documentclass{article}                                                                   \begin{document}                                                                          Why can't I get $`a'$ in math mode.                                                       \end{document}


title: How to add correctly numbered footnotes in RevTex4-1

text: So, I'm using RevTex4-1 and at some point I need to add a footnote, which in Revtex goes to the bibliography. However, the footnote is not being numbered according to the natural numeration of the bibliography: all footnotes are appearing in the last numbers. For instance, in this example:               \documentclass[aps,pre,twocolumn,showpacs,superscriptaddress,groupedaddress]{revtex4}          \begin{document}          This is a test~\cite{a} where I want correct footnotes~\footnote{footnote 1},      i.e. footnotes that are correctly numbered in the bibliography~\cite{b}.          \bibliography{references.bib}          \end{document}      (where references is just a simple bib file with two entries, a and b), the produced document appears as > This is a test [1] where I want correct footnotes [3], i.e. footnotes that > are correctly numbered in the bibliography [2]. which is clearly not the desired behavior of numbered bibliography. Any solutions? **Edited:** with "Any solutions?" I meant: How can I make the footnotes to have the bibliographic numbering according to their first appearance in the text? In the example above, this should be > This is a test [1] where I want correct footnotes [2], i.e. footnotes that > are correctly numbered in the bibliography [3].


title: Cannot temporarily increase line spacing

text: > **Possible Duplicate:**   >  Temporarily increase line spacing I tried to follow these examples here Temporarily increase line spacing but in my case it didn't change anything. I have to use a latex template, which is provided by my university. My title looks currently like this: ![enter image description here](http://i.stack.imgur.com/32Tpk.jpg) as you can see, the third line has not enough spacing. Can anyone help me to fix this issue? You find the entire template (already with my title in it) for downloading on my webspace: http://www.easteregg.ch/DDIS-diploma-thesis-template-en-long- title.zip just run the "ddis-thesis-EN.tex" in the root folder and you will get probably the exact same issue.


title: Saving and re-using value of a footnote counter twice - how?

text: I am trying to put the same footnote on to two different places - saving and re-using the footnote counter. Here is what I want to do (part of a larger doc - a paper out of my dissertation):               %Start LateX snippet%          $\Delta$ Age\footnote{\FNTabAge}             \newcounter{savetmp01} \setcounter{savetmp01}{\value{mpfootnote}} %Save "a"%          Grade\footnote{\FNTabGrade}     \newcounter{savetmp02} \setcounter{savetmp02}{\arabic{mpfootnote}} %Save "b"%          Grade\footnotemark[\arabic{savetmp02}] x Non-English %Reuse "b" - works%          $\Delta$ Age\footnotemark[\arabic{savetmp01}] x Non-English %Reuse "a" - does not work. Instead it shows "b"%      I want to save the footnote counter first when defining `$Delta$ Age`, and then again when explaining Grade. The first re-use works perfectly well (both show the same footnotemark "b"), but the second re-use does not work - I am getting "b" again, instead of "a" as I want it. Any ideas? Already tried using `\thesavetmp01` or `\value{savetmp01}`, but no luck.


title: aligned environment of amsmath vs array environment

text: Today I found out the existence of the `aligned` environment of the `amsmath` package. However, I can't see the advantage of using it instead of the `array` environment from the example provided in amsldoc.pdf, Sec.3.7. In particular, as I can just get almost the same result by using the `array` environment:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation*}         \left.\begin{aligned}             B'&=-\partial\times E,\\             E'&=\partial\times B - 4\pi j,          \end{aligned}         \right\}         \qquad \text{Maxwell’s equations}     \end{equation*}          \begin{equation*}         \left.\begin{array}{l}             B'=-\partial\times E,\\             E'=\partial\times B - 4\pi j,          \end{array}         \right\}         \qquad \text{Maxwell’s equations}     \end{equation*}          \end{document}      giving the output ![enter image description here](http://i.stack.imgur.com/YfeTf.png) What are the differences, and why should one be preferred over the other in this context?


title: Proper centering with cmidrule and multi- row and column

text: The code below produces the following figure: ![enter image description here](http://i.imgur.com/9VwSYRS.png) The issue I am having is that `Sample` is not vertically aligned, I get proper alignment if `\cmidrule(l){2-3} \cmidrule(l){4-5}` is removed. How do I get proper alignment while maintaining the two horizontal lines?               \documentclass{article}     \usepackage{booktabs}     \usepackage{multirow}     \begin{document}          \begin{table}[h]\centering     \begin{tabular}{lcccc}     \toprule      \multirow{2}{*}{Sample} & \multicolumn{2}{c}{I} & \multicolumn{2}{c}{II} \\     \cmidrule(l){2-3} \cmidrule(l){4-5}      & A & B & C & D \\     \midrule     S1 & 5 & 8 & 12 & 2 \\     S2 & 6 & 9 & 2 & 6 \\     S3 & 7 & 9 & 5 & 8 \\     S4 & 8 & 9 & 8 & 2 \\     \bottomrule     \end{tabular}     \end{table}          \end{document}


title: How do I pass options to a package?

text: I apologize if this is a neophyte or duplicate question because I was unable to find it. A comment on the question Problem with \leq displaying as \leqslant, mentions that "you can include mathabx with the mathx option". How exactly does one pass the mathx option to the mathabx package, or more generally pass options to LaTeX packages? In addition to Google, I have also experimented with each of the following, all of which resulted in error messages.               \usepackage{mathabx}{mathx}     \usepackage{mathabx}[mathx]     \usepackage[mathx]{mathabx}


title: How to jam the axis of a pgfplots plot?

text: I need to have some kind of jump on the axis of the plot in `pgfplots` package. Something similar to the following figure where some part of the scales are jammed. ![enter image description here](http://i.stack.imgur.com/ZjGqP.png) It would be interesting to have even different scales for the top and botoom traces (exactly like the figure). Any idea is appreciated.


title: Inserted pdfpages header consumes extra table numbers in TOC/LOT

text: I’d like a tabular header to appear on each page of the pdf I’m including. So I am using these commands in `pdfpages`.               \def\plotheader{     \setlength\LTleft{0.85in}     \begin{longtable}{p{2.7in}p{2.7in}p{2.7in}}     A & B & C     \end{longtable}}          \includepdf[pages={-},angle=90, offset=15mm 0mm, width=5in,height=8.3in, pagecommand={TEST \\ \plotheader}, addtolist={ 1, figure, title, tab:mytable}]{plot.pdf}`      What ends up happening is that the tabular plot header consumes more than one table number, even though it is a figure. As a result, there is a discontinuity in the list of tables in the TOC. How can I avoid this?


title: How can I make a stroke order diagram for Chinese characters?

text: I would like to make a simple document explaining how to write certain Chinese characters. The standard method, which is used in many textbooks, is to first show the complete character and then a series of simpler ones adding one stroke at a time. In order to accomplish this, I need to be able to typeset only certain strokes from a given character. There is an article on typesetting rare characters, whose technique could be adapted but it would take a lot of work. I wonder if there is a simpler way which avoids entering each stroke manually.


title: How to top (horizontally) align rows of tikz nodes in an org chart graphic

text: Apologies for the long MWE and what seems like a slightly duplicated question. I've looked at the question/awnser how to top align rectangles and align tikz node with text about using `baseline` to top align nodes but it doesn't really seem to work in my case. Is there an easy way to top align each set of nodes here? Would it be easier in a `tikz matrix` ? (I've avoided those because they don't really follow the hierarchy I'm trying to show here).               \documentclass[10pt,landscape]{article}     \usepackage[left=0.5in,right=0.5in,top=1in,bottom=1in]{geometry}     \usepackage{tikz}     \usepackage{xcolor}     \usepackage{varwidth}     \usetikzlibrary{positioning,shapes.geometric,shapes,arrows,chains,mindmap,trees,backgrounds}     \def\ns{\nodepart{second}}               \begin{document}     \tikzstyle{struc}=[rectangle split, rectangle split parts=2,minimum height = 2.5cm, minimum width=1.9cm,inner sep=1pt, text width= 1.8cm, text centered,inner sep=0.15cm, font=\scriptsize\bfseries]     \tikzstyle{agg}=[rectangle,draw=black,fill=white,struc]     \tikzstyle{disc}=[rectangle,draw=black,fill=blue!10,struc]     \tikzstyle{cred}=[rectangle,draw=black,fill=gray!20,struc]     \tikzstyle{comb}=[rectangle,draw=red,fill=yellow!50,dashed,struc]          \begin{tikzpicture}     \node [agg] (ltd) at (0,0) {abcde fghij \nodepart{second} 100\%};     \node [below=2cm of ltd] (aux1) {};     \node [agg,left=3cm of aux1] (par) {Lorem ipsum dolor sit amet \ns 90\%};         \node [disc,below=1.5cm of par.200] (ap) {PLorem ipsum dolor sit amet. \ns 10\%};         \node [disc,right=0.25cm of ap] (oth) {Lorem ipsum dolor sit amet. \ns a};         \node [cred,right=0.25cm of oth] (osp) {Cras eros lectus, euismod et tristique a, vehicula. \ns a};     \node [agg,right=2cm of aux1] (npon) {Neque porro quisquam est qui\ns 5\%};         \node [below=1.5cm of npon] (aux2) {};         \node [disc,left=0.1cm of aux2] (ond) {Neque porro quisquam est qui\ns a};         \node [cred,right=0.1cm of aux2] (osp) {Neque porro quisquam est qui\ns a};     \node [agg,right=1.5cm of npon](npof){Lorem ipsum dolor\ns 2\%};         \node [disc,below=1.5cm of npof] (ofxe) {Lorem ipsum dolor\ns a};         \node [disc,below=0.25cm of ofxe] (ofe) {Lorem ipsum dolor\ns a};     \node [agg,right=0.5cm of npof] (shf){Lorem ipsum dolor \ns 1\%};         \node [disc,below=1.5cm of shf] (shfp) {tristique a, vehicula\ns a};     \node [agg,right=0.5cm of shf](gif){Gtristique a, vehicula\ns 1\%};         \node [disc,below=1.5cm of gif] (gifp) {tristique a, vehiculao \ns a};     \node [agg,right=0.5cm of gif](ulon){Neque porro quisquam est qui \ns 0.5\%};         \node [disc,below=1.5cm of ulon] (ulonp) {Cras eros lectus, euismod et tristique a, vehicula \ns a};     \node [agg,right=0.5cm of ulon](ulof){Neque porro quisquam est qui \ns 0.5\%};         \node [disc,below=1.5cm of ulof] (ulofp) {Cras eros lectus, euismod et tristique a, vehicula \ns a};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/5dzIb.png)


title: using PDF bookmarks to refer to pages in \includegraphics

text: If I have a multi-page PDF file with one figure on each page, I can use the `\includegraphics[page=123]{foo}` command to refer to individual figures (see this question). However, if I have lots of figures, it gets difficult to try to keep track of the page numbers. (For example, I use OmniGraffle to prepare my illustrations and export everything as one multi-page PDF file; if I re-organise the figures in OmniGraffle, I have to manually fix all page numbers in the Latex code.) Could I somehow use **PDF bookmarks** instead of page numbers in `\includegraphics`?


title: How to make enumerate items align at left margin?

text: I would like to have my lists to have no indent for the top level, i.e. having the same left margin as the surrounding paragraph, with just enough space for the widest label to fit:               Paragraph text      1. Item      2. Item      3. Item      ...     10. Item     Paragraph text      I already do something similar for `itemize` and `description`, using the `enumitem` package:               \usepackage{enumitem}     \setlist[itemize]{leftmargin=*}     \setlist[description]{leftmargin=*}      But apparently `enumerate` has some issues determining the width of its labels. It starts with a shaky assumption, which pushes small labels too far to the right, and extends beyond the left margin if the enumeration gets big enough (I know the 10000 value is ridiculous, it's just to make my point obvious):               \documentclass[twocolumn]{scrbook}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \newcommand{\justsometext}{Just enough text to make the line break so we get to see a second line.}          \begin{document}          \justsometext          \begin{enumerate}     \item \justsometext     \begin{enumerate}     \item Nested. \justsometext     \end{enumerate}     \item \justsometext     \addtocounter{enumi}{9997}     \item \justsometext     \end{enumerate}          \justsometext          \end{document}      The `enumitem` package gives me half of a way around it, but it requires me to state the widest label               \usepackage{enumitem}     \setlist[enumerate]{leftmargin=*}          % ...          \begin{enumerate}[widest=10000]     % ...      However, isn't there some way to make `enumerate` detect the width of its widest label automatically, instead of having to set it for each individual list? I feel like there must be some way, I just couldn't figure out how from the `enumitem` doc... (I tried the `paralist` package with option `alwaysadjust`, as well as `compactenum` from the same package; both are worse than what I got from `enumitem`: assuming some label width first - pushing the "1." and "2." from the left margin - then ruining the alignment completely when the 10000 label pushes its item to the right...)


title: Why is a warning thrown when writing a minus symbol?

text: I created the following minimal LaTeX document:               \documentclass{article}     \usepackage[ansinew]{inputenc}          \begin{document}     $–A + B$     \end{document}      It throws a warning `'LaTeX Warning: Command \textendash invalid in math mode on input line 6'`. Without the minus symbol before the `A` everything works fine. **Question:** Why does the minus symbol throw such a warning? I am confused. **System:** Windows 8 64 Bit Pro, latext Miktex release with Texniccenter.


title: Create heatmap with PSTricks or TikZ

text: I have a huge amount of 2D-coordinates, associated with a value, e.g.:                 x   |   y   | value     27.50   52.15   12.51     61.83   13.32   57.56     36.23   21.83   41.73     40.46   85.67   25.20     ...      The data is not tabular and I Want the points between two data-points to be interpolated in some way (which way is not really clear, yet) I want to preset the data as heatmap like this: ![heatmap- example](http://i.stack.imgur.com/qRjQA.jpg) Is there any ready-to-use package for PSTricks or TikZ to do it?


title: How to make section like this

text: How to make section and subsection like this one ![enter image description here](http://i.stack.imgur.com/Z09EB.jpg)


title: LaTeX - Image not showing up

text: I am writing up some coursework using LaTeX, and I wanted to import a diagram, however when I did the image did not appear in the compiled pdf. The image has been exported as a eps file, and also as a pdf, both of which had the same result. (Although the PDF also required me to provide bounding box figures, as latex couldn't fetch them from the file). I am including the graphic like this:               \documentclass[10pt]{article}     \usepackage[dvips]{geometry,color,graphicx}     \geometry{a4paper}     \begin{document}     \begin{figure}[ht!]         \centering         \includegraphics[width=300pt]{figure.eps}         \caption{caption}         \label{label}     \end{figure}     \end{document}


title: How to customize the solution of multichoice question in exam documentclass?

text: ![I want to my document was displayed like this image](http://i.stack.imgur.com/xnjWS.png)               \documentclass[cancelspace,10pt]{exam}     \usepackage{multicol}     %**********************************************************  End of Listing Setting     \usepackage[explicit]{titlesec}     \usepackage[dotinlabels]{titletoc}     \usepackage{pifont}     \usepackage{times,color}     \usepackage{tikz}     \usepackage{circuitikz}     \usepackage{enumerate}          \usepackage{xepersian}     % *********************************************************** Document Font     \settextfont[Scale=1.2]{B Nazanin}     %*******************************************     \renewcommand*\questionlabel{\color{blue}\thequestion-}     \renewcommand*\thechoice{\arabic{choice}}      \renewcommand*\choicelabel{\thechoice)}     %*******************************answer     \renewcommand{\solutiontitle}{\noindent\textbf{solution:}\par\noindent}     \shadedsolutions     \definecolor{SolutionColor}{rgb}{0.8,0.9,1}     \printanswers     % *********************************************************** begin Doc     %\DefaultMathsDigits     \begin{document}     % ----------------------------------------------------------------     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%end-title     \begin{persian}     \begin{questions}     % *********************************************************** Start Doc          \begin{latin}     %#############################################################################     % *********************************************************** Start     QUESTION #1     \question     She's not very .............. in the way she treats her children;they may be punished today for somthing they were rewarded for yesterday!     % *********************************************************** Choices     \begin{multicols}{4}     \begin{choices}             %****************************************************************************     Choice 1         \choice         a         %****************************************************************************     Choice 2         \choice                b         %****************************************************************************     Choice 3         \choice         c         %****************************************************************************     Choice 4         \choice         d     \end{choices}     \end{multicols}       \begin{solutionorbox}[2in]          a          \end{solutionorbox}     % *********************************************************** End QUESTION #1               \end{latin}     \end{questions}     \end{persian}     \end{document}


I am creating a "memoir" or "book" class document. Yet, I always get the error message "\newcommand{\noopsort}[1]{} \ifx\undefined\allcaps\def\allcaps#1{#1}\fi..". I have no idea of what this is about. Anyone has an idea? Many thanks, Esther.


title: Plot sine curve inside tikz file

text: I am trying to recreate the following image ![The correct image](http://i.stack.imgur.com/Sk75h.png) and so far I have this ![My attempt so far](http://i.stack.imgur.com/p6h7s.png) My problem however is how to plot a sine curve, and get the distances right (related to the sine curve). I am sure my code could be improved, like using pure tikz instead of tkz-euclide, but I have only learned how to use the latter. Any help would be greatly appreciated.               \documentclass[10pt,a4paper]{article}     \usepackage{pgfplots,tikz,tkz-euclide}     \usetkzobj{all}     \begin{document}     \begin{tikzpicture}     \def\a{4} \def\b{2}     \tkzDefPoint(0,0){O}          \tkzDefPoint(0,-\b){B1} \tkzDefPoint(0,\a){B2}     \tkzDefMidPoint(O,B2) \tkzGetPoint{B3}          \tkzDefPoint(1,0){A1}  \tkzDefPoint(1,\a){A2}      \tkzDefMidPoint(A1,A2) \tkzGetPoint{A3}          \tkzDefPoint(0.33,0){C1}  \tkzDefPoint(7,0){C2}      \tkzDefPoint(0.33,-\b){D1}  \tkzDefPoint(7,-\b){D2}                \tkzDrawSegments[triangle 45-triangle 45](B1,B2 A1,A2)     \tkzDrawSegments(C1,C2 D1,D2)          \tkzLabelPoint[above left](B3){$b$}     \tkzLabelPoint[above left](A3){$a$}     \tkzLabelPoint[below right](D2){Billedplan}     \tkzLabelPoint[      right](C2){Vannoverflate (linse)}     \end{tikzpicture}     \end{document}      And here is my MWE


title: Algorithm2e - Unwanted semi-colon

text: With the following code, I have an unwanted semi-colon at the end of the loop condition. ![enter image description here](http://i.stack.imgur.com/XwRlj.png) Here is MWE.               \documentclass{article}         \usepackage[lined]{algorithm2e}          \begin{document}          \begin{algorithm}         \Begin{             \uIf{Condition}{                     \Repeat{Stop}{Action}             }         }     \end{algorithm}          \end{document}       How can I change this ?


title: Text/character alignment in table tabular environment

text: I'm having some difficulty with the text alignment in some table columns and was wondering if someone could help me work out what's going on? I've provided a MWE and image of the table output. Before using the `\multicolumn` command for the last 2 columns of the top row, all the text was centered as a result of the `\begin{tabular}{*{7}{c}}` command. However, when using `\multicolumn`, this appears to override the centering for everything in the last two columns. How can I change this so that the text is centered again? Also, I'd like to make the text in columns 1, 3 and 5 vertically aligned to the left, so that the first letter/number starts in the same position for each entry, but have it so the text is centered to the width of the column i.e. so the text is centered for the longest character entry for a column and everything else is left aligned to it. Is this possible? I know that I could specify `\begin{tabular}{l c l c l c c }`, to left align the columns, but this doesn't quite achieve what I want.               \documentclass[12pt,a4paper]{report}     \usepackage{amsmath}     \usepackage{caption}     \usepackage{array,booktabs,threeparttable}     \usepackage{chemformula}     \usepackage[utf8]{inputenc}          \begin{document}          \begin{table}     \centering     \caption[Alpha emitting radioactive decay series.]{Alpha emitting radioactive decay series.}     \label{tab:alpha decay series}     \begin{threeparttable}     \resizebox{\columnwidth}{!}{%     \begin{tabular}{*{7}{c}}     \toprule                 &             &                &                            &                & \multicolumn{2}{c}{Number of decays} \\     Series type & Series name & Parent nucleus & Half-life ($10^{9}$ years) & Stable nucleus & $\alpha$ & $\beta^{-}$ \\     \midrule     $A = 4n$    & Thorium           & \ch{^{232}Th} & 14.05     & \ch{^{208}Pb}     & 6 & 4 \\     $A = 4n+1$  & Neptunium         & \ch{^{237}Np} & 0.0021    & \ch{^{205}Tl}     & 8 & 5 \\     $A = 4n+2$  & Radium (Uranium)  & \ch{^{238}U}  & 4.4683    & \ch{^{206}Pb}     & 8 & 6 \\     $A = 4n+3$  & Actinium          & \ch{^{235}U}  & 0.7038    & \ch{^{207}Pb}     & 7 & 4 \\     \bottomrule     \end{tabular}%     }     \end{threeparttable}     \end{table}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tv6XS.png)


title: Grouping together booktile and series in biblatex-chicago

text: I'm using biblatex-chicago for my references. My bib file includes many references to conference papers that I have imported from the ACM digital library. The abbreviations to these conferences are often better know than the full titles of the conferences themselves. So for `inproceedings` entries, I have included the abbreviation using the `series` field. I would like to group the `booktitle` and `series` fields together.               \documentclass{article}     \usepackage[         authordate,         backend=biber,         ]{biblatex-chicago} % biblatex setup          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @inproceedings{paper2012,         author = {Smith, John},     date = {2012},         title = {Paper Title},         booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},         series = {CHI '12},         pages = {937-946},         location = {New York, NY, USA},             publisher = {{ACM}},         }     \end{filecontents}          \addbibresource{\jobname.bib}          \nocite{*}          \begin{document}          \printbibliography          \end{document}      This example currently outputs the following: Smith, John. 2012. “Paper Title” In _Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems_ , 937–946. CHI ’12. New York, NY, USA: ACM. instead I would like to change the output of `inproceedings` entries, so that `booktitle` and `series` fields are grouped together like this: Smith, John. 2012. “Paper Title” In _Proceedings of the 2012 ACM Annual Conference on Human Factors in Computing Systems — CHI ’12_ , 937–46. New York, NY, USA: ACM. an important caveat being, that not all `inproceedings` entries have a `series` field. is this possible with biblatex-chicago?


title: Changes in pfgplot barchart

text: I found many, many helpful things on tex.stackexchange for pgfplots - thanks for that! But i can't figure out how to:   * insert a new line after "without" or "with"   * hide value 0 or the whole bar   * change the x tick's so there's no decimal power ([10^..])   * prevent nodes near coords of beein plottet outside the chart the two charts: ![changes in stacked barchart](http://i.stack.imgur.com/NFMnP.png) and the sourcecode:               \documentclass[a4paper]{report}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}          \title{Tests}          \pgfplotsset{counter_barchart/.style={       width=0.85\textwidth,       height=5cm,       xbar,       xmin=0,       xmajorgrids = true,       tick align = outside, xtick pos = left,       x tick label style={ /pgf/number format/1000 sep=},       enlarge y limits=0.4,       symbolic y coords={Ass. Optimization,with Optimization,without Optimization},       ytick=data,       yticklabel style={text width=0.2\textwidth},       every node near coord/.append style={/pgf/number format/1000 sep=},       nodes near coords,       nodes near coords align={horizontal},       legend style={at={(0.5,-0.35)},anchor=north,legend columns=-1},       reverse legend     }}          \begin{document}          \begin{tikzpicture}      \begin{axis}[counter_barchart]       \addplot coordinates {(0,Ass. Optimization)(19243,with Optimization) (8898,without Optimization)};       \addplot coordinates {(7854,Ass. Optimization) (6652,with Optimization) (6548,without Optimization)};       \legend{Second,First}      \end{axis}     \end{tikzpicture}     \\          \begin{tikzpicture}      \begin{axis}[counter_barchart]       \addplot coordinates {(3985,without Optimization) (5456,with Optimization)};       \addplot coordinates {(5223,without Optimization) (11054,with Optimization)};       \legend{Second,First}      \end{axis}     \end{tikzpicture}          \end{document}


title: Typeset book for children

text: I am working (writing and typesetting) on a book for children. I have used the memoir class. The book looks good for an adult audience. But I had ideas of making it more interesting for the children. More specifically, how about adding little thumbnails to the table of contents page? These will be tiny images placed randomly and rotated randomly. Or a different pattern border around each page? Like bright colored zigzag pattern for one page and may be, colored crayon strips on another? With my limited experience and expertise in latex, I could not crack this one. Any ideas/ suggestions/ solutions?


title: problem with math font and LuaLaTeX

text: The following code works fine if compiled in pdflatex:               \documentclass{beamer}     \usepackage{quattrocento}     \begin{document}     \begin{frame}     Quattrocento $30\cdot40$     \end{frame}     \end{document}      As is explained by egreg in my previous question (Getting Quattrocento as math font in article class) beamer automatically uses the text font for letters and numbers in mathmode. Now I need to compile my presentation with LuaLaTeX, so I changed the code to:               \documentclass{beamer}     \usepackage{fontspec}     \usepackage{unicode-math}     \setsansfont{Quattrocento}     \setmathfont{Quattrocento}     \begin{document}     \begin{frame}     Quattrocento ${30\cdot40}$     \end{frame}     \end{document}      However in this way the `\cdot` is not printed (I'm assuming because the symbol is not in the Quattrocento font, and now the font is used for all math symbols, not only letters-numbers). How can I restore beamer behavior with pdflatex when using lualatex?


title: Add "Appendix" before "A" for Appendix A in thesis TOC

text: I am required to insert the word Appendix before the letter A in my dissertation Table of Contents as follows: > Appendix A (title for appendix A) but the latex thesis cls file: FAU Thesis Class I use generates only the letter A followed by the appendix title: > A (title for appendix A) The thesis cls file defines a "backmatter" command and the appendix is treated as a chapter.               \newcommand\backmatter{\appendix     \def\chaptermark##1{\markboth{%     \ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}{%     \ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}}%     \def\sectionmark##1{\relax}}      Is there a simple fix to the above code that will add the word Appendix before the letter A in the TOC for Appendix A? Some related questions have been posted but the answers did not appear to work in this case.


title: XeTeX \left and \right problem

text: I have a problem with the `〈` and `〉` symbols (Unicode encoding: 27E8 and 27E9) which replace the `\langle` and `\rangle`, when I try to combine them with `\left` and `\right` commands. The following examples gives error although, if I change `\left〈` some formula `\right〉` with `\left\langle` some formula `\right\rangle` or `\left(` some formula `\right)`, it works. What is more interesting is that if I change `〈〉` with `‖` (Unicode encoding: 2016 ) the following example also works.               \documentclass{book}     \usepackage{amsmath}     \usepackage{xltxtra}     \usepackage{unicode-math}          \unimathsetup{math-style=ISO}     \setmathfont{lmmath-regular.otf}          \begin{document}      bla bla bla bla      blabla blaaa         \[            \left‹ \dfrac{\frac{x+2}{y}+\frac{3}{4}}{x^2+y^2-5} \right›         \]     bla bla bla bla     \end{document}      I already defined the commands `\〈` and `\〉` like this               \newcommand\〈{\langle}     \newcommand\〉{\rangle}      but I think this symbols should work with `\left` and `\right` in the same manner like `|`, `{`, `[` and of course `‖`. I use Kile for the front-end and TeXLive 2011 manually installed on a x64 machine (Kubuntu operating system). Because I can not answer my questions (for now) I'll put something here, so sorry for the long post. It seems that XeTeX (or XeLaTeX, I'm new so sorry for may ignorance) produces the same output for `\left< some formula \right>` (where `< >` are the common less and greater) and `\left\langle some formula \right\rangle` but a totally different output for `< some formula >` and `\langle some formula \rangle`. Here is an example.               \documentclass{book}     \usepackage{amsmath}     \usepackage{xltxtra}     \usepackage{unicode-math}      \XeTeXdelcodenum`‹=\XeTeXdelcodenum`<      \XeTeXdelcodenum`›=\XeTeXdelcodenum`>     \unimathsetup{math-style=ISO}     \setmathfont{lmmath-regular.otf}          \begin{document}     bla bla bla bla      blabla blaaa      \begin{gather}     \left< \dfrac{\frac{x+2}{y}+\frac{3}{4}}{x^2+y^2-5} \right>\\     \left\langle \dfrac{\frac{x+2}{y}+\frac{3}{4}}{x^2+y^2-5} \right\rangle\\     \langle ϕ(x-k),Ψ(x)\rangle\\     <ϕ(x-k),Ψ(x)>\\     ‹ϕ(x-k),Ψ(x)›\\     \left\langle ϕ(x-k),Ψ(x) \right \rangle\\     \left< ϕ(x-k),Ψ(x) \right>     \end{gather}     bla bla bla bla $<  ‹$     \end{document}      And about the 〈〉, I will drop using them, in the first place they do not make the desirable output (although in the unimath-symbols documentations they are represented with the `\langle`, `\rangle` Macros ), and they are cumbersome. My question is now, whey 〈〉 do not behave like the macro command in the documentation.


title: Avoiding inelegant splits on URLs

text: I am using `biber` and `biblatex` to process my bibliography. URLs are handled with `breaklinks=true` under `hyperref`. I have found an inelegant breakup of a hyperlink resulting in a reference like this ![this citation](http://i.stack.imgur.com/qOmlI.png) Is there a way to enforce a more elegant breakup of a URL link where the `h` is not split from the `ttp`?


title: How Can I get bold math symbols into a glossary?

text: I'd like to add a mathematical Expression to my glossary:               \newglossaryentry{Fst}{       name        = {$F_{st}$-value},       description = {Inbreeding coefficient,...},       sort        = {fst}     }      Unfortunately, the Expression is not written in bold letters. According to How can I get bold math symbols? I tried:               \newglossaryentry{Fst}{       name        = {$\bm{F_{st}}$-value},       description = {Inbreeding coefficient,...},       sort        = {fst}     }      But this writes Fst in bold letters not only in the glossary, but also in the main text (while `-value` is in bold letters in the glossary, and in normal letters in the text). Is there a way to add mathematical formulas to the glossary in bold letters, and to the main text in normal letters?


title: How to install MacTeX on a network drive/file server

text: How do you install MacTeX on a network drive? The MacTeX installer does not give me the option to install to any other drive than the ones physically attached to my computer. I want to install the distribution or at least the underlying TeX Live to a Apple Time Capsule so I can access it with all of my devices. Do I have to download the original TeX Live and install it to the NAS, move the Mac TeX editing software to it as well and subsequently configure the software to use the distribution on the NAS? Or is it better to just install MacTeX locally and then just copy it to the Time Capsule? I found a similar question here which is approximately what I intend to achieve but the discussion is dealing with MiKTeX and Windows clients.


title: New command using inline verbatim

text: I would like to define a command using verbatim like in the commented line in the following code.               \documentclass{article}         \usepackage{amsmath,amsfonts,amssymb}          %   \newcommand{\example}[1]{\verb!#1! : #1}          \begin{document}          \noindent \verb!$\textbf{A}^\intercal$! : $\textbf{A}^\intercal$     \\     \example{$\textbf{A}^\intercal$}$          \end{document}      How can I acheive this? Is it possible to give the argument without the dollars?


title: Side to side sum+product of matrices

text: I have been trying to write these matrices which are the results of a cointegration problem. However, I'm struggling to write down the second member of my matrices. As you can this is my code:               \begin{pmatrix}     \Delta A \\ \Delta BC \\ \Delta NB \\  \Delta NS \\  \Delta ON \\ \Delta Q  \\     \end{pmatrix}     \]     =     \[     \begin{pmatrix}     0.36 & 0.09 & 0.04 & -0.40 & 0.26 & -0.36\\      0.28 & -0.08& 0.04& -0.14& 0.28& -0.13\\     0.16 & -0.01 & -0.08 & -0.009 & 0.57 & -0.64\\     0.36 &  0.19 &  -0.34 & -0.20 &  0.35 &  0.03\\     0.18 &   0.15 & 0.08 &  -0.07 & -0.03 & -0.32\\     0.08 & 0.41 & -0.10 & -0.20 & 0.34 & -0.48\\     \end{pmatrix}     \begin{pmatrix}     \Delta A(-1) \\ \Delta BC(-1) \\ \Delta NB(-1) \\  \Delta NS(-1) \\  \Delta ON(-1) \\  \Delta Q(-1) \\     \end{pmatrix}          +          \begin{pmatrix}          -0.84 & 0.21 & -0.11 & 0.110 & 0.13 & 0.34\\      0.21 & -0.43 & 0.14 & 0.06 & 0.30 & -0.22\\     0.27 & 0.13 & -0.54 & 0.25 & -0.27 & 0.16\\     -0.27 &  -0.23 &  0.43 & -0.46 &  0.53 & -0.05\\     0.05 &   0.13 & -0.02 &  -0.10 & -0.03 & -0.02\\     0.23 & -0.32 & 0.21 & -0.11 & 0.41 & -0.34\\          \end{pmatrix}     \begin{pmatrix}      A(-1) \\ BC(-1) \\ \ NB(-1) \\  \ NS(-1) \\  \ON(-1) \\  \Q(-1) \\     \end{pmatrix}          +     \begin{pmatrix}      12.10 \\ -4.97 \\ -1.12 \\  4.56 \\  0.10 \\  -5.85 \\     \end{pmatrix}      Can someone tells me how i improves my codes in order to get the results on the picture? ![enter image description here](http://i.stack.imgur.com/ODfzO.jpg)


title: listings package: formating all numbers in language definition?

text: How to format all numbers in a code has been shown here. I have adapted it to include it in a language definition:               \documentclass[fleqn, a4paper]{article}     \usepackage{listings}      \usepackage{color}          \lstdefinelanguage{mylang}{%         basicstyle=\ttfamily,%         literate={0}\textcolor{blue}{0}}{1}%              {1}\textcolor{blue}{1}{1}%              {2}\textcolor{blue}{2}{1}%              {3}\textcolor{blue}{3}{1}%              {4}\textcolor{blue}{4}{1}%              {5}\textcolor{blue}{5}{1}%              {6}\textcolor{blue}{6}{1}%              {7}\textcolor{blue}{7}{1}%              {8}\textcolor{blue}{8}{1}%              {9}\textcolor{blue}{9}{1}%              {.0}\textcolor{blue}{.0}{1}% Following is to ensure that only periods              {.1}\textcolor{blue}{.1}{1}% followed by a digit are changed.              {.2}\textcolor{blue}{.2}{1}%              {.3}\textcolor{blue}{.3}{1}%              {.4}\textcolor{blue}{.4}{1}%              {.5}\textcolor{blue}{.5}{1}%              {.6}\textcolor{blue}{.6}{1}%              {.7}\textcolor{blue}{.7}{1}%              {.8}\textcolor{blue}{.8}{1}%              {.9}\textcolor{blue}{.9}{1}%              {\ }{ }{1}% handle the space              ,         }     \begin{document}     \begin{lstlisting}[language=mylang]         {           _SetCalibTableName("lorem",100);         }     \end{lstlisting}     \end{document}      The following error is produced: `! Argument of \lst@FillFixed@ has an extra }.` It looks as if it would not like my single `{` and `}`? How to include it properly?


title: Multi-column problem

text: Consider the following table. First I have troubles to get the `multicolumn`-elements in the first row of the table limited to a maximum width (I tried it here with the command `C{0.75}` but obviously it does not work). The second issue: I would like to have the column-pair "orig." and "norm." centered to each of its `multicolumn`-elements.               \documentclass{article}     \usepackage{multirow}     \usepackage[ngerman]{babel}     \usepackage{booktabs}     \usepackage{colortbl}          \definecolor{LightGray}{gray}{.8}               \begin{document}     \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}               \begin{table}[htbp]        \centering        \begin{tabular}{C{1.7cm}C{0.75cm}C{0.75cm}C{0.75cm}C{0.75cm}C{0.75cm}C{0.75cm}C{0.75cm}}                \toprule         &         \multicolumn{2}{c}{This is a long text for two rows} &         \multicolumn{2}{c}{This is a long text for three rows} &         \multicolumn{2}{c}{This is a long Text} \\              \multirow{-2}{*}{Row 1} &         org. & norm. &         org. & norm. &         org. & norm. &         \multirow{-2}{*}{Result}\\               \midrule              1   &   0   &   0   &   1   &   0.14    &   7360    &   1   &   0.58    \\         2   &   0.42    &   0.97    &   7   &   1   &   3420    &   0.46    &   0.85    \\         3   &   0.42    &   0.97    &   7   &   1   &   3420    &   0.46    &   0.85    \\         4   &   0.42    &   0.98    &   6   &   0.86    &   3610    &   0.49    &   0.80    \\         5   &   0.43    &   0.99    &   6   &   0.86    &   4100    &   0.56    &   0.82    \\         6   &   0.36    &   0.83    &   5   &   0.71    &   4280    &   0.58    &   0.71    \\         7   &   0.36    &   0.83    &   5   &   0.71    &   4520    &   0.61    &   0.73    \\         8   &   0.43    &   1   &   6   &   0.86    &   4000    &   0.54    &   0.82    \\         9   &   0.27    &   0.63    &   3   &   0.43    &   3920    &   0.53    &   0.54    \\         10  &   0.32    &   0.74    &   5   &   0.71    &   100 &   0.01    &   0.59    \\                \bottomrule             \end{tabular}        \caption{caption}        \label{tab:Example}     \end{table}          \end{document}


title: Foldable DIN A0 page within normal document

text: This question is somewhat similar to this question: Insert foldable A3 pages in an A4 document with active references However it's not completely the same. I want to have a foldable DIN A1/DIN A0 page, which contains a really big image, within my normal DIN A4 document. Can this be achieved with `\changepage` command as well? If so, what should I expect, if I print the whole document?


How to draw squares on the sides of a quadrilateral and triangle in tikz? I want to replicate the 2 images below: ![image to replicate](http://i.stack.imgur.com/8JMcC.png)