title: Fine-tuning a commutative diagram

text: I am trying to type the following simple commutative diagram in LaTeX. I have the basics, but I need for the V to be centered, and for the arrow under the g to be in the opposite direction.               \begin{tikzpicture}[every node/.style={midway}]     \matrix[column sep={4em,between origins},         row sep={2em}] at (0,0)     { \node(X)   {$X$}  ; & \node(Y) {$Y$}; \\     \node(V) {$V$};                   \\};     \draw[<-] (V) -- (X) node[anchor=east]  {$h$};     \draw[->] (V) -- (Y) node[anchor=north]  {$g$};     \draw[->] (X)   -- (Y) node[anchor=south] {$f$};     \end{tikzpicture}


title: Preprocessing without compiling with etoolbox

text: I want to know if it is possible to do preprocessing without compiling with the `etoolbox` package. Basically, I want to do the following. Given a file of the following format:               \documentclass{article}     \usepackage{etoolbox}     \providebool{pre}     \setbool{pre}{true}          \begin{document}     This line is always there.          \ifbool{pre}{       This line is there if \texttt{pre}.     }{       This line is here if \texttt{\tilde pre}.     }               \end{document}      I want to know if there is a way of compiling it with so that I get as output a file containing the following text:               \documentclass{article}     \usepackage{etoolbox}     \providebool{pre}     \setbool{pre}{true}          \begin{document}     This line is always there.          This line is there if \texttt{pre}.               \end{document}      A similar feature is provided by the `cleveref` package via its `poorman` option, but it just automatically produces a `sed` script to modify the original file. If there is a way to achieve even that (i.e., producing automatically a `sed` script which can be run on the original file to get the required output) I'll be glad of learn about that too. EDIT: clarification in response to @egreg: I actually want to get the preprocessed source file at the end of the compilation, rather than just the correctly conditionally compiled pdf output. For example, compiling the first example above with `pdflatex` will produce a `pdf` output that is exactly the same as that produced by compiling the second example. However, what I want at the end of the compilation is not just the right `pdf` output, but also a source file in which the rejected branches of the `ifbool` have been completely removed. My use case is that I have a source file that is written to produce two different `pdf` outputs for two different recipients based on a flag (like the flag `pre` above). However, one of the outputs needs to be sent to a recipient who also requires the TeX source. I do not want this recipient to see the conditionals I put in to customize the output for them.


title: how to add a label to a path?

text: For example (used by another thread):               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{trees}     \begin{document}     \begin{tikzpicture}[level distance=1.5cm, grow=down,         every node/.style={draw, circle, thin},         edge from parent/.style={-latex, thick, draw}     ]     \node (P) {P}         child {node (Q) {Q}             child {node (T) {T}}             child {node (U) {U}}         }         child {node (R) {R}}         child {node (S) {S}};          \path (P) -- coordinate[midway] (PQ) (Q);     \path (P) -- coordinate[midway] (PR) (R);          \draw (PQ) to[bend right=22] (PR);     \end{tikzpicture}     \end{document}      how can I add a label, e.g., `M` to the line `PQ`?


title: prevent page break while returning to twocolumn

text: I'm writing a IEEE conference paper. The format of paper is `\documentclass[conference]{IEEEtran}` For inserting a wide image i switched to one column using `\onecolumn` The image took half of my page. After that when I again issued command `\twocolumn` it resulted in page break and the two column contents thereafter are appearing from next page. Can anyone please help me as to what I can do to prevent the page break.


title: How To Fill Leftover Space

text: I am making a fairly space intensive LaTeX "cheat sheet." Right now, I have added a single table, as so: ![enter image description here](http://i.stack.imgur.com/gsa7r.png) However, there is a large gap to the right of this table that I would like to fill with a few equations if possible. How would I go about doing this? I've seen other cheat sheet LaTeX examples, but they all had columns, which will not work for me because the various tables and equations lists will be of varying lengths and widths. This is my current code:               \documentclass{article}          \usepackage[margin=0.25in]{geometry}     \usepackage{tabu}     \usepackage{colortbl}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{hhline}     \usepackage{boxedminipage}          \usepackage{graphicx}          \setlength\parindent{0pt}               \begin{document}          {\tabulinesep=3pt     \begin{tabu}{|c | c | c| c| c|}     \hline     \multicolumn{5}{|c|}{\bf \large Temperature Conversions} \\\hline          \bf  & \bf To K & \bf To C & \bf To F & \bf To R\\     \bf From K  &   --------    &   $C = K - 273.15$    &  $F = \frac{9}{5} K - 459.67$  &  $R = \frac{9}{5} K$ \\     \bf From C & $K = C + 273.15$ & -------- & \cellcolor{Goldenrod} $F = \frac{9}{5} C + 32$ & $R = \frac{9}{5} (C + 273.15)$\\     \bf From F & $K = \frac{5}{9} (F - 459.67)$ & \cellcolor{Goldenrod} $C = \frac{5}{9}(F - 32)$ & -------- & $R = F - 459.67$\\     \bf From R & $K = \frac{5}{9} R$ & $C = \frac{5}{9}(R - 491.67)$ & $F = R + 459.67$ & --------\\\hline     \end{tabu}     }             \end{document}


title: Justify text left and right

text: My code is the following:               \documentclass[twoside, a4paper, 11pt]{article}     \title{asdfsadf}     \author{asdfasdf}     \usepackage{ragged2e}     \usepackage{booktabs,tabularx}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{verbatim}     \usepackage{amsmath, amssymb}     \usepackage{natbib}     %\def\pgfsysdriver{pgfsys-dvipdfm.def}     \usepackage{tikz}     \usepackage{enumerate}     \usetikzlibrary{matrix, arrows}     \usepackage{graphicx}     \usepackage{listings}     \usepackage{color}     %\usepackage{hyperref}     \usepackage{float}     \usepackage{multicol}     \usepackage{booktabs}     \usepackage{lscape}     \usepackage{cases}     \usepackage{multirow}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{lscape}     \usepackage{caption}     \usepackage[update,prepend]{epstopdf}     %\usepackage{mathpazo}     %\usepackage{eulervm}     %\usepackage{iwona}     \usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}          \setlength{\textwidth}{6.5in}     \setlength{\oddsidemargin}{0in}     \setlength{\evensidemargin}{0in}     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}          \linespread{1.5}          \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}          \raggedbottom          \everymath{\displaystyle}           \newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}          \renewcommand\textfraction{.1}                    \begin{document}          \begin{titlepage}     \begin{center}     \textsc{\fontsize{14pt}{0}\selectfont SOMETHING \\ SOMETHING}          \ \\[1.5cm]     \begin{spacing}{2}     {\fontsize{24.88pt}{0}\selectfont SOMETHING \\ SOMETHING}     \end{spacing}     \ \\[1.5cm]     \begin{center}     \section*{Acknowledgements}     \end{center}     A asodfih saodfihsaodfuhasoidfuhasoifduhasoifuhsaiofuhasoidfuhsa asd;fuhsa dfuh asufhd pasdfuhsapudfhsaidfuh saidfas iudfhgsaidfg saidfyg saiuyfg saoiyfg saioyfg sayigf syaiogf saiogf saiogf ysaiodgf saoigfysaiodgfyoaisdgf asoiygf saoiygf sayoidfg asoiydfg asoiydfg asoiydf g A asodfih saodfihsaodfuhasoidfuhasoifduhasoifuhsaiofuhasoidfuhsa asd;fuhsa dfuh asufhd pasdfuhsapudfhsaidfuh saidfas iudfhgsaidfg saidfyg saiuyfg saoiyfg saioyfg sayigf syaiogf saiogf saiogf ysaiodgf saoigfysaiodgfyoaisdgf asoiygf saoiygf sayoidfg asoiydfg asoiydfg asoiydf g A asodfih saodfihsaodfuhasoidfuhasoifduhasoifuhsaiofuhasoidfuhsa asd;fuhsa dfuh asufhd pasdfuhsapudfhsaidfuh saidfas iudfhgsaidfg saidfyg saiuyfg saoiyfg saioyfg sayigf syaiogf saiogf saiogf ysaiodgf saoigfysaiodgfyoaisdgf asoiygf saoiygf sayoidfg asoiydfg asoiydfg asoiydf g     \ \\[6cm]     {\fontsize{17.28pt}{0}\selectfont SOMETHING}     \\[0.5cm]     {\fontsize{14pt}{0}\selectfont SOMETHING \& SOMETHING}     \end{center}     \end{titlepage}               \end{document}      Which produces this: ![enter image description here](http://i.stack.imgur.com/qnRmf.jpg) However I want the text under "Acknowledgements" to be justified left and right, ie, make it look like this: ![enter image description here](http://i.stack.imgur.com/GuU0I.jpg) Thanks.


title: (Re)definition of commands that use delimiters other than braces (e.g. \underbrace)

text: How do you go about redefining a command such as `\underbrace`, which uses an "uncommon" delimiter, i.e. `_`, between its two arguments, so that the redefined command be usable in exactly the same way as the original one? As an example, consider the command `\redub` ("red underbrace") defined below on the basis of `\underbrace`:               \documentclass{article}     \usepackage{amsmath}     \usepackage{xcolor}          \newcommand\redub[2]{%         \colorlet{currentcolor}{.}%         \color{red}%         \underbrace{\color{currentcolor}#1}_{\color{red}#2}%         \color{currentcolor}%     }     \begin{document}     \[       \redub{e^{-x^2}}{\text{foo}} + \redub{e^{-2x^2}}{\text{bar}}     \]     \end{document}      ![enter image description here](http://i.stack.imgur.com/04jXp.png) For someone who commonly uses `\underbrace`, it would be much easier to be able to use the command just like `\underbrace`, i.e. like this: `\redub{}_{}`; not like that: `\redub{}{}`.


title: Colored box around enumerate labels

text: I want a colored box around enumerate labels. My actual code is this:               \documentclass{article}          \usepackage{tikz}     \usepackage{enumitem}          \newcommand{\fff}[1]{\tikz       \node[       inner sep=1.5pt,       draw=blue,       fill=blue,       text=black,       rounded corners=2pt]{#1};}          \begin{document}     \begin{enumerate}[label=\fff{\Alph*.}]      \item text     \end{enumerate}          \fff{A.}     \end{document}      As you can see this code does not work. However the `\fff` command works if not used inside the label specification. Does anyone knows what is wrong with this code?


title: Windows, Tex Live 2011 multind entries not added to the Index

text: This is my code:               % !TEX TS-program = xeLaTeX     % !TEX encoding = UTF-8 Unicode     % !TEX spellcheck = en_GB          \documentclass[11pt]{book}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{Brill}     \newfontfamily\lettrinefont{Brill}     \usepackage{multind}           \makeindex{nominum}     \makeindex{rerum}     \usepackage[polutonikogreek,english]{babel}     \newcommand*{\tg}[1]{\textgreek{#1}}     \usepackage{ledmac}     \usepackage{fancyhdr}     \usepackage{hanging}     \pagestyle{myheadings}     \textheight = 180.5 mm     \textwidth = 108.5 mm     \pagenumbering{arabic}          \newcommand{\rhet}[2]{\edtext{#1}{\Afootnote{#2}}}     \newcommand{\oed}[2]{\edtext{#1}{\Bfootnote{#2}}}     \footparagraph{A}     \footparagraph{B}     \raggedbottom          \newcommand*{\LeftWidth}{3.0cm}%     \newcommand*{\RightWidth}{\dimexpr\linewidth-\LeftWidth-2em\relax}%     \newcommand{\AlignedBrace}[2]{%         \medskip\par\noindent%         \makebox[\LeftWidth][r]{\text{#1}~}%         $\left\{~\parbox{\RightWidth}{\strut\textit{#2}\strut}\right.$%     }%          \begin{document}          \pagebreak               \mainmatter          Wyatt\index{nominum}{Wyatt}          \beginnumbering          \pstart           orator\index{rerum}{orator} is the artificer, the oration\index{rerum}{oration}          \pend     \endnumbering     \printindex{nominum}{Index nominum}     \printindex{rerum}{Index rerum}     \end{document}


title: Class name that is also a trademark

text: I am sorry if this question is off-topic or there is a better place--feel free to move it or close with an explanation. I have no affiliation with Vistaprint. I would like to publish a class with the name `vistaprint.cls`. The class is already written and provides environments for creating business cards and bumper stickers according to Vistaprint's dimensions. I believe this package would be a good place to put environments for the other media Vistaprint can use (rigid airships or coffee cups or whathaveyou). The problem I think I will face: 'Vistaprint' is a trademark in the United States and probably elsewhere. I am afraid of legal implications with naming this package `vistaprint.cls` because lawyers are big and scary and also the name could affect class/package distributors such as TeX Live. Are there any existing guidelines that would help me approach the company with a proper letter asking for the proper rights? I have perused the FAQ and had pleasant conversations with their customer service division (they told me I can't do this and suggested I write a letter). Alternately, if your answer is of the form "this is a bad idea and you should choose a different name", please suggest an alternate name. **Edit after adding bounty:** Thanks everyone for your suggestions. At this point I will most likely use a different name. With the bounty on this question I am hoping to encounter someone who has been in this territory before.


title: Undefined control sequence makecvtitle in moderncv package

text: I am using **moderncv** package in a tex document. I am compiling with pdflatex, and full texlive package downloaded from CTAN. The error I'm getting is: > line 7: Undefined control sequence \makecvtitle Here is a minimum working example:               \documentclass[11pt,a4paper,sans]{moderncv}     \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{banking}     \moderncvcolor{blue}     \name{Holmes}{Sherlock}          \begin{document}     \makecvtitle     \end{document}      * * *               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{banking}     \moderncvcolor{blue}     \name{Holmes}{Sherlock}     \insti{Institute Name}          \begin{document}     \makecvtitle     \end{document}


title: Setting height of \includegraphics{} from current display style

text: I'm thinking about building a new symbol library and I need to test out the command set. I slapped together a quick set of math symbols using a set of commands               \newcommand{\example}{\includegraphics[height=\height]{example.jpg}}      and a scanner. It works fine for a kludge, but the problem is that I would like the `\height` argument to be set equal to the value `1em` in the current display style (i.e., smaller for subscripts and superscripts, etc.) I can't find any information and don't know if there's a way to do this (it's not exactly what the graphicx package was designed for). Any suggestons?


title: How can I create a layout for corporate documents using LyX?

text: My employer has a layout, current stored as a Microsoft Word template that is used for all sorts of different documents. (There are a few related templates for specific types of documents.) The template has the company logo, a placeholder for the document title and author, and a "version history" table. My question is how I can reproduce this in LaTeX, with the intention of using LyX as an editor. It doesn't need to be an exact reproduction - e.g. I am happy to use standard LaTeX fonts - but it should be a good approximation. (I'm using LyX 2.06 with MikTex 2.9 on Windows 7.)


title: TexStudio Commands on mouse over quickly disappear

text: I have installed miktex 32bit and texstudio on my windows 7 32bit laptop. Whenever I mouseover a command like `tabular` in the example               \end{tabular}      the tooltip shows up for some millisecs and then dissappears... so i cant read it.. what could cause that problem? tell me if u need more information


title: Wrapping Margin Notes

text: I'm writing a small list of things and want to insert a small kind of box into the margin on right side of the list. I'd like it to behave more or less like this: If it fits into the margin fine. If not, occupy some space for normal text, while still sitting mainly in the margin If not, wrap into the (list) text (as far as i could gather this is the crux) Or look for a place where there are short list items, since theres alot of wasted space there Does there exist some kind of solution for this? `\marginpar` only uses the margin which is too little space `\wrapfigure` does exactly what I want, but won't work at all for lists (i can't even force the position, it just sits where it wants no matter what I enforce) Due to my limited knowledge, the only thing I can think of that could be possible is somehow placing a minipage at a specified position on the page and then manually making sure that nothing overlaps, but I don't know how to do that, or if that works


title: Extended ASCII characters in LaTeX document

text: I need to display a few extended ASCII characters and this is what I have coded so far.               \documentclass[a4paper , 12pt]{report}               \usepackage[mathletters]{ucs}     \usepackage[utf8x]{inputenc}          \begin{document}        $½·®½´»ò Í«°°±-» §±«$     \end{document}      The error message that I've got is               Package utf8x Error: Character189appearedalone.      This error message appears for each extended ASCII character between the two `$` marks. Could someone please help me out? It is not necessary to use math mode. Non math mode suggestions will do as well.


title: Two different text outputs depending on some parameter definition

text: I am using the astronomy and astrophysics class `aa.cls`. I use it with either of the two options: `structabstract` or `referee`. The first produces 2-column text, the second one-column text. I have some figures that change appearance when I switch options. I would like to know if it is possible to do something like this:               IF (optional argument equals structabstract) THEN           {...commands to have the figure of a certain size}          ELSE (if optional argument equals)           {...commands to have the figure of another size}          END IF      Could you help me please?


title: Pgfplots fails to generate boxplots for some data set

text: I use `pgfplots` to generate boxplots, however with some small data sets as the following, I get an error message.                speed         2         3         1         2         2         11      Here is the error message :               Sorry, an internal routine of the floating point unit got an ill-floating point number `'. The unreadable part was near ''      To avoid this problem, I need to add white noise to my data set when generating it, but it is only a dirty workaroud. Do you know how to avoid the pgfplots error message ? You can for example try the following code :               \documentclass{article}     \usepackage{pgfplots,filecontents}     \pgfplotsset{compat=1.9}     \usepgfplotslibrary{statistics}          \begin{filecontents}{test.dat}     speed     2     3     1     2     2     11     \end{filecontents}               \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot[boxplot] table[y index=0]{test.dat};     \end{axis}     \end{tikzpicture}     \end{document}


title: How to draw a frame box around an arbitrary large piece of text/figures/whatever?

text: The command `fbox{...}` can be used to draw a box around a piece of text, and apparently also a figure. However, I've not been able to use it if the "text" contains environments such as minipages and center. So, how does one draw a framed box around an arbitrary text which contains more than just text, such as figures, tables, environments, etc.?


title: How to make this using LaTeX?

text: I have the following page from the book   **Mastering your PhD** - P. Gosling and B. Noordam (Springer 2006), page 42: ![Page 42 from the book](http://i.stack.imgur.com/j1bTh.jpg) Now I wish to make this in LaTeX. I'm in particular interested in how we can make the frame as wide as the page (or maybe two of these on one A4, and the dotted line.


title: Ideas for transposing/splitting a TIKZ figure from A4 article to beamer presentation

text: # Context. I am having this kind of tikzpicture in my article which I would like to include in a beamer presentation : ![fig1](http://i.stack.imgur.com/pIbCh.png) Please note that the figure was simplified, since `groupI` represents a group of nodes in order to clarify the question. (The code of this MWE is below) * * * # The problem. My aim is to insert this figure in a way in my presentation. As you can notice, the figure fill completely an A4 page. It is therefore difficult to transpose it into a beamer format, which is in landscape, and staying "readable". For example, if I simply use the same code in beamer, here is the display : ![fig12](http://i.stack.imgur.com/BjRkz.png) * * * # Questions   1. What do you advise/propose me in order to include these kind of pictures inside a beamer presentation ?    2. Is this possible to keep all nodes from a presentation (to keep the structure of a figure) and only printing certain nodes ?    3. Is there a way to "break" a picture in several pages without splitting the code itself into several `tikzpicture` environment ?  * * * # Ideas What I am thinking is, for example, to print only 2 groups on some beamer page, but keeping the structure like arrows, relative postiion, etc. as shown on the picture below : ![fig2](http://i.stack.imgur.com/9NhXe.png) And having some dotted lines on edges of the pictures, in order to show that this is only a part of the global figure. **Utopic :** The awesomeness would be to be able _animate_ the reading of this figure like :   1. Global visualization of the figure   2. Zooming in on group1 \pause   3. Moving slightly to group2 \pause   4. etc. But this is utopic to have this kind of fluent animation, which should (and can) be done with other softwares than by using latex. Anyway, I am looking for ideas and code on how I could make it a bit interactive, easily readable, and fitting with a beamer page. I leave this question open for few hours/days in case someone has other interesting ideas to propose. * * * # Minimal working example. ## Article               \documentclass[10pt,a4paper]{article}     \usepackage[left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows,positioning,arrows}     \tikzstyle{arr} = [draw, -latex']          \begin{document}          \begin{figure}[H]     \centering     \begin{tikzpicture}     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm] (1) {group1} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 1, xshift = 9cm] (2) {group2} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 2, xshift = -9cm] (3) {group3} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 3, xshift = 9cm] (4) {group4} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 4, xshift = -9cm] (5) {group5} ;          \path   [arr] (1) -- (2);     \path   [arr] (2) -- (3);     \path   [arr] (3) -- (4);     \path   [arr] (4) -- (5);     \end{tikzpicture}     \end{figure}          \end{document}      ## Beamer               \documentclass{beamer}               \usepackage{tikz}     \usetikzlibrary{shapes,arrows,positioning,arrows}     \tikzstyle{arr} = [draw, -latex']          \begin{document}          \begin{frame}      \frametitle{Figure (1)}               \begin{figure}[H]     \centering     \begin{tikzpicture}     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm] (1) {group1} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 1, xshift = 9cm] (2) {group2} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 2, xshift = -9cm] (3) {group3} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 3, xshift = 9cm] (4) {group4} ;     \node [rectangle,draw,minimum width = 6cm, minimum height = 3cm,below=2cm of 4, xshift = -9cm] (5) {group5} ;          \path   [arr] (1) -- (2);     \path   [arr] (2) -- (3);     \path   [arr] (3) -- (4);     \path   [arr] (4) -- (5);     \end{tikzpicture}     \end{figure}               \end{frame}          \end{document}      * * * Thank you in advance for any help you may provide. Please do note hesitate to ask questions in comments if it is not clear enough.


title: Two logos in beamer after certain frame

text: I am making a presentation which is devided in two parts. The first part is about experiments held in instute A and the second part is about experiments held in instute A and institute B. Is it possible to add a second logo in a beamer presentation after a certain frame? Let's say that this is a previous slide ![](http://i.imgur.com/G0jjJ.jpg) This is a next slide ![](http://i.imgur.com/ksZJI.jpg)


title: Set Braces in XYPic, XYMatrix

text: I want to add three braces to a xymatrix in a xypic environment. Here's how I got so far.               \documentclass[11pt]{article} % use larger type; default would be 10pt     \usepackage[all]{xy}     \begin{document}          \xy     \xymatrix@C=10pt@R=20pt{     &\\      & A_1\POS*\frm{^\}},+U*++!D\txt{A to B} & B_2 & C_3 \POS*\frm{^\}},+U*++!D\txt{C to D} & D_4\\      & E_5 & F_6 \POS*\frm{_\}},+U*++!D\txt{F to G} & G_7 & H_8     }     \endxy          \end{document}      ![current output](http://i.stack.imgur.com/e6BRg.png) Now there are two issues:   1. I want the braces to span from A to B, C to D and the one at the bottom from F to G. At the moment, they only embrace a single element. How can I do this using the xymatrix [rr] syntax?   2. I want to add the label for the bottom brace from below. At the moment, it is still displayed on top. I appreciate any comments on this issue!


title: Covering map picture

text: I wish to draw a crazy covering map showing charts any help?


title: Description of algorithm in words

text: I would like to write an algorithm in a very verbose matter. I want to write a couple of `for` loops and the rest is pretty much text. I include here the code I am using with `algpseudocode` imported as follows:               \usepackage[noend]{algpseudocode}     \usepackage{algorithm}      Code for the algorithm:               \begin{algorithm}       \caption{Backpropagation learning algorithm}       \begin{algorithmic}       \For {d in data}         Forwards Pass \hfill \\           Starting from the input layer, use eq. \ref{update} to do a forward pass trough the network, computing the activities of the neurons at each layer.         Backwards Pass \hfill \\         Compute the derivatives of the error function with respect to the output layer activities           \For {layer in layers}             Compute the derivatives of the error function with respect to the inputs of the upper layer neurons             Compute the derivatives of the error function with respect to the weights between the outer layer and the layer below             Compute the derivatives of the error function with respect to the activities of the layer below           \EndFor           Updates the weights.     \EndFor     \end{algorithmic}          \end{algorithm}      Of course this works, but it is a complete hack and it is rendered horribly. From the documentation of the package, I figure that it is not made to support this. Am I right? Is there a different package I should use? Edit: I would like the final output to look something like this:               for e in epochs:       for d in data:          Forward pass:             Starting from the input layer, use eq. \ref{update} to do a forward pass trough the network, computing the activities of the neurons at each layer.          Backward pass:               Compute the derivatives of the error function with respect to the output layer activities                for layer in layers:                   Compute the derivatives of the error function with respect to the inputs of the upper layer neurons                   Compute the derivatives of the error function with respect to the weights between the outer layer and the layer below                   Compute the derivatives of the error function with respect to the activities of the layer below                    Updates the weights.      Thank you!


title: Align lists with long sentences

text: \begin{enumerate}     \item This is a really really really reall.....long sentence     \end{enumerate}          1. This is a really really really ....     ....long sentence      I want it formatted like               1. This is a really really really ....        ...long sentence      So it aligns with the words and not number. All the examples I've come across seem to show default behavior as the way I want it formatted, so I have a feeling its something defined in the `moderncv` class style I'm using. **EDIT** MWE               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}       \firstname{John}     \familyname{Doe}     \begin{document}     \cventry{2009-2014}{Graduate Research Assistant}{College Town}{MO}{USA}{%     \begin{enumerate}     \setlength{\itemindent}{.25in}     \setlength{\itemsep}{1mm}     \setlength{\parskip}{1mm}     \item Multi-state antibody design to interrogate mechanisms for antibody polyspecificity. How do antibodies use a limited sequence repertoire to bind many antigens?      \end{enumerate}}     \end{document}


title: epstopdf conversion problem

text: I'm trying to compile a LaTeX document with eps image files in TexStudio and I'm getting the error that `... eps to pdf file not found`. I tried to put the command `\epstopdfsetup{outdir=./}` into my LaTeX preamble, but it is not working.


title: How do I implement a string buffer in TeX?

text: I've recently learned how to create a macro to iterate over a token sequence using `\afterassignment` and `\let` in TeX. Currently, I'm trying to apply this to a tokenization macro (where "tokenization" means splitting a character sequence around a delimiting character/ character-sequence); that is, an algorithm `stringTokenize` which does the following:   1. Iterate over `character` in the string   2. if `character` is not the delimiter (for example, `,`): add `character` to `buffer`; if `character` is the delimiter, expand `buffer` and do something with it (that is, pass to a given macro) and clear `buffer`. This is not as simple as I thought however, because apparently you can't expand a character which is `\let` to a command into another command (in order to create a "buffer" structure), for example,               \edef\buffer{\buffer\character}      will (after `n` iterations) expand to               {\character\character(...)character}      which is `n` times the character last `\let` to `\character`. How do I do this? * * * Here's what I have so far:               \documentclass{minimal}          \makeatletter          \def\structures@stringIterate#1#2{%              \newcount\@@index%              \def\@@stop{§}         \def\@@next{\afterassignment\@@each\let\@@current= }         \def\@@each{%           \ifx\@@current\@@stop%              \let\@@next=\relax           \else%             \advance\@@index1\relax              #2{\the\@@index}{\@@current}\let\@@next=\@@next           \fi%           \@@next % macro expansion must be delayed until the condition has been evaluated         }              \@@next#1\@@stop          }          \def\structures@stringTokenize#1#2#3{%              \newcount\@@index         \@@index 0\relax              \def\@@buffer{}              \def\@@test##1##2{%             \ifx#2##2                 \advance\@@index 1\relax                 #3{\the\@@index}{\@@buffer}                 \def\@@buffer{} % reset the buffer             \else                 \edef\@@buffer{\@@buffer##2} % gather character             \fi         }              \structures@stringIterate{#1}{\@@test}          }          \makeatother          \begin{document}          \makeatletter              \def\@@print#1#2{token (#1): ``#2''\par}         \structures@stringTokenize{Humpty Dumpty sat on a wall, Humpty Dumpty had a great fall, All the King's horses and all the King's men, Couldn't put Humpty together again.}{,}{\@@print}          \makeatother          \end{document}


title: subfigures in a custom float (subcaption & float packages)

text: I need figures and subfigures with a custom caption name. In order to achieve my goal I am trying to use `float` package to define new float type, and `subfigure` to create the subfigures. However, I get compilation error messages. I reduced the code to this:               \documentclass[a4paper]{article}     \usepackage[latin1]{inputenc}          \usepackage{float}     \usepackage{subcaption}          \floatstyle{plain}     \newfloat{program}{thb}{lop}     \floatname{program}{Program}          \begin{document}     \begin{program}         \centering         \begin{subfigure}{0.3\textwidth}                 A         \end{subfigure}         \begin{subfigure}{0.3\textwidth}                 B         \end{subfigure}     \end{program}     \end{document}      where I get an error `Missing number, treated as zero` at the location where `subfigure` is used. In the produced output I get a weird `==0` at the beginning of each subfigure. However, if I fall back to use stock `figure` instead of my custom replacement `program`, I get no errors and an expected output. Where is it coming from and how can I avoid this? Should I use different packages?


title: Generating a table based on a list and a number of columns

text: Sometimes a table is used to compact a large number of items. Example:               a b c d     e f g h     j k l      Instead of listing all items separately. We want to define a command that eases the implementation of this (say you want to insert an item `i`, you don't want to do all the bookkeeping to make the items match again). We want to define a command `\compacttable{cccc}{a,b,c,d,e,f,g,h,j,k,l}` that displays such tables. We tried the following definition:               \usepackage{tikz,ifthen,xstring,etoolbox}          \newcounter{col}     \newcommand{\compacttable}[2]{         \setcounter{colc}{1}\StrLen{#1}[\imresl]         \def\temp{}         \foreach\tx in{#2}{         \ifthenelse{\equal{\imresl}{\value{colc}}}{             \setcounter{colc}{1}\expandafter\gdef\expandafter\temp\expandafter{\temp \tx \\}         }{             \stepcounter{colc}\expandafter\gdef\expandafter\temp\expandafter{\temp \tx & }         }}         \begin{tabular}{#1}         \temp{}         \end{tabular}     }      However the _MWE_ fails to show any values: `main.tex`:               \documentclass{article}     \usepackage{tikz,ifthen,xstring,etoolbox}     \newcounter{col}     \newcommand{\compacttable}[2]{         \setcounter{colc}{1}\StrLen{#1}[\imresl]         \def\temp{}         \foreach\tx in{#2}{         \ifthenelse{\equal{\imresl}{\value{colc}}}{             \setcounter{colc}{1}\expandafter\gdef\expandafter\temp\expandafter{\temp \tx \\}         }{             \stepcounter{colc}\expandafter\gdef\expandafter\temp\expandafter{\temp \tx & }         }}         \begin{tabular}{#1}         \end{tabular}     }     \begin{document}     \compacttable{cccc}{a,b,c,d,e,f,g,h,j,k,l}     \end{document}      We think this is due to the fact that `\tx` does not bind when we try to expand `\temp`.


title: How to create fixed width table columns with text raggedright/centered/raggedleft?

text: I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that               \usepackage{array}     \begin{tabular}{| c | c | m{5cm} |}      vertically centers the text in the last column, but justifies it horizontally (like text in normal paragraphs). _Update:_ With Jake's method, it seems both `\\\` and `\hline` cause an error. How to fix it?


title: How to specify the the column width but also keep the cell content center horizontally?

text: I want to specify the width of the column but also keep the content centered. How can I do that? Here is my code * * *               \begin{tabular}{p{6cm} c c p{2cm} p{3cm}}          \Xhline{3\arrayrulewidth}\hline          Location& Tailings& Years& Dominant metal or mineral& Source\\          \midrule          Freda-Redridge, Keweenaw Peninsula, Michigan, U.S.A.& 39.2 Tg& 1901-1947& Copper& Kerfoot et al. 2009\\          Gay, Keweenaw Peninsula, Michigan, U.S.A.& 22.5 Tg& 1901-1932& Copper& Kerfoot et al. 2009\\          Silver Bay, Minnesota, U.S.A.& 500 Tg& 1955-1980& Iron& Cook et al. 1974\\          Rupert Inlet, British Columbia, Canada& 353 Tg& 1971-1995& Copper& Burd 2002\\          Britannia Beach, Howe Sound, north of Vancouver, British Columbia, Canada& 44 Tg& 1904-1974& Copper, zinc& Chretien 1997\\          Ensenada Chapaco Bay, north-central Chile& 2,612,103 kg d$^{-1}$& 1978-1994& Iron tailings (pelletization)& Lancellotti and Stotz 2004\\          Chanaral Bay, Atacama Region, Chile& 150 Tg& 1938-1974& Copper, arsenic& Castilla and Nealler 1978; Andrade et al. 2006\\          Qaumaujuk and Agfardlikavsa Fjords, Greenland& 11.8 Tg& 1973-1990& Lead, zinc, silver& Asmund et al. 1994\\          Rize, Black Sea, Turkey& 2,880,103 kg d$^{-1}$& 1994-2000& Copper, arsenic, lead& Berkun 2005\\          Chameis Bay, Namibia, Africa& 366 Tg& 1970-2006& Diamonds& Smith 2006\\          Elizabeth Bay, Namibia, Africa& 7 Tg& 1991-1998& Diamonds& Smith et al. 2002\\          Calancan Bay, Marinduque Island, Luzon, Philippines& 200 Tg& 1975-1991& Copper& Marges et al. 2011\\          Buyat Bay, North Sulawesi, Indonesia& 1,841,103 kg d$^{-1}$& 1996-present& Gold& Edinger et al. 2008\\          Toga, Melanesia, Western Pacific& 2.5 Tg yr21& 1990s& Phosphate; Cd, Pb, Cu in tailings& Gnandi\\          \bottomrule     \end{tabular}          \label{T5C3}          \end{table}          \end{spacing}          \end{landscape}


title: long table alignment in fixed size columns

text: > **Possible Duplicate:**   >  Fixed width column with text centered/raggedright/raggedleft in tabular? My longtable has a column with a fixed size, `p{2cm}`. How do I make that column align to the left? It comes out justified.


title: Left Align with Column Width {p{cm}}

text: I am trying to create a table something like:               Idioms                Definition           A dime                Anything that is common, inexpensive,      a dozen               and easy to get or available any where.      Beat around           To treat a topic, but omit its main points,      the bush              often intentionally or To delay or avoid                           talking about something difficult or unpleasant.     Bite off more         To take on more responsibility than you can manage.     than one can chew          ...      What I did is                \documentclass{book}         \begin{document}         \thispagestyle{empty}         \noindent         \begin{tabular}{p{6cm} p{12cm}}         Idioms & Definitions         {The Remaining portions of work goes here.}          \end{tabular}         \end{document}      But I get Idioms Definition               A         dime        Anything that is common, inexpensive,      a dozen               and easy to get or available any where.      Beat       around     To treat a topic, but omit its main points,      the     bush          often intentionally or To delay or avoid                           talking about something difficult or unpleasant.     Bite off       more   To take on more responsibility than you can manage.     than one can chew          ...      I think this has do with allignment. The above sample is not the exact I got in Latex. But it reflects my problems. With l instead of p, I can get the desired left alignment. but no table size. But with size fized, alignment goes wrong. Some elements in preamble might be missing like I have used packages like setspace and anysize. Source: The table above is extracted from Wikipedia for representing my situation.


title: How to center a text in a table?

text: > **Possible Duplicate:**   >  Center column with specifying width in table (tabular enviroment)? I want to fix this code, the last column aren't center in the cell. How can I center the text of all table? I get an error.               \documentclass[10pt,a4paper]{article}     \title{\textbf{Title}}     \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}          \usepackage{pdflscape}     \usepackage{color, colortbl}     \definecolor{Gray}{gray}{0.9}     \usepackage{enumitem}     \usepackage{anysize}     \marginsize{3cm}{3cm}{2.5cm}{2.5cm}          \usepackage{xcolor}     \usepackage{caption}     \captionsetup[table]{skip=10pt}     \usepackage{threeparttable}          \begin{document}          \begin{table}[h]      \begin{threeparttable}     \caption{Tabla\tnote{1}}     \centering     \begin{tabular}{|p{18mm}|p{35mm}|p{20mm}|p{30mm}|p{22mm}|}     \hline \rowcolor{Gray}     \centering \textbf{Text} & \centering \textbf{Text} & \centering\textbf{Text} & \centering\textbf{Text} & {\centering\textbf{Text}}\\[0.5ex]     \hline     176682 & text & text & text & text\\     \hline     176682 & text & text & text & text\\     \hline     176682 & text & text & text & text\\     \hline     176682 & text & text & text & text\\     \hline     text & text & text & text & text\\     \hline     text & text & text & text & text\\     \hline     text & text & text & text & text\\     \hline     \end{tabular}         \begin{tablenotes}         \item[1] Source.         \end{tablenotes}      \end{threeparttable}     \end{table}          \end{document}


title: Center column with specifying width in table (tabular enviroment)?

text: I have table that has long headers and I would like to specify width of the column, but also be able to remain it's centred position. Something like `|c{0.30\textwidth}|`. It is possible? How to achieve this effect?


title: How can I change where preview latex stores its generated files?

text: I love preview-latex but it litters my directories with its temporary files. I've scanned the documentation of previewlatex, auctex, and the latex preview package but can't find a variable that lets me customize where it generates files :( If I could shove that stuff in a build/ directory that'd be great. Anyone have an idea?


title: How to change color of some particular environment for entire document

text: I want to change color of particular environment in document. For example wherever I found verbatim environment or equation environment appears in my tex file. With some global settings, I want to change it to some particular color effect should be limited to that document. For example all the verbatim should change to yellow background. All of the math mode should have text color red. Doing it for each of the text or modifying the environment is possible, how ever I am interested in setting it once in preamble.


title: place 'axis' at specific coordinates

text: Is there any way to put `axis` environment at specific coordinates? For example if I want the function plot to be a secondary part of a big tikzpicture. This is a MWE:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \coordinate (coord) at (1,2);     \begin{axis}[anchor=(coord)]     \draw [blue,fill] (Point) circle (2pt) node [right] {(1,2)}     \end{axis}     \end{tikzpicture}


title: Bibtex saying I am missing a field name in @unpublished

text: From googling, I have seen that the @unpublished is recommended for random articles found online. The required fields are note, author and title. Why then is the following bib entry giving an error?               @unpublished(de_finetti,     author = {Michael Newton},     title = {Genesis of Bayesian Analysis: Exchangeability and de Finetti's Theroem},     note = {Accessed 1-28-14}     }      Gives the error               This is BibTeX, Version 0.99c (TeX Live 2009/Debian)     The top-level auxiliary file: main.aux     The style file: plain.bst     Database file #1: biblio.bib     You're missing a field name---line 5 of file biblio.bib      :       : }     (Error may have been on previous line)     I'm skipping whatever remains of this entry


title: \leqslant causes "Undefined control sequence"

text: I have the following line: `$0 \leqslant b \leqslant 1$` I want to display `0 <= b <= 1`, but I get `Undefined control sequence` thanks


title: Cyrillic em-dash is rendered inconsistently

text: I've noticed that the same Cyrillic em-dash is rendered differently in English and Russian bibliographic entries. As you can see below, in Russian it's rendered as a single rule but in English it's rendered incorrectly using two overlapped en-dashes. How to achieve consistency between two languages? ![enter image description here](http://i.stack.imgur.com/LGYCH.png)               \documentclass{scrreprt}          \usepackage[english, russian]{babel}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @BOOK{Boehm:2000,       author = {Boehm, Barry W.},       title = {Software cost estimation with Cocomo II},       year = 2000,       language = {english}     }     @BOOK{Kelton:2004,       author = {Кельтон, В. Дэвид and Лоу, Аверилл М.},       title = {Имитационное моделирование},       year = 2004,       language = {russian}     }     \end{filecontents}          \begin{document}     \nocite{*}     \bibliographystyle{gost2008s}     \bibliography{\jobname}     \end{document}


title: Tables float into bibliography

text: I have a sequence of sections of my paper, followed by a bibliography (bibtex). It looks pretty much like               \input{asection}     \input{appendix}     \bibliography(bibfile}      The problem is, "appendix" contains several tables, and they're being intersperesed among the bibliography. I want to have all of the tables, then the bibliography. Adding a page break between sections or writing `\begin{table}[h!]` is not working. Any help would be appreciated!!


title: Don't show chapter in toc

text: I use the classic thesis style from latextemplates to make my internship memoir. So I've the classic document section: part, chapter, section, subsection, ... I use the part chapter of it to make an introduction and so I use the same title for the Chapter. In the table of contents I've two entry that just follow themselves with the same name: > Title part > > 1 Title part What I wanna do is delete the chapter entry but still continue to have a numerotation of it to be use in the document. Is it possible? EDIT: MWE:               \documentclass{scrreprt}          \input{classicthesis-config} %it's on the latextemplates folder          \begin{document}          \tableofcontents     \part{first part}     \chapter{first part} % should be not present in toc but numbered     \section{a section}     \section{another one}          \part{second part}     \chapter{second part} % should be not present in toc but numbered     \section{foo}     \seciont{foo foo}               \end{document}


title: How to cite a motion picture or TV show?

text: I want to cite motion pictures and TV series using commands such as `\citep{}` and a external bibtex file. What is the proper way? I'm using the `natlib` package and the configuration commands `\citestyle{chicago}` and `\bibliographystyle{plainnat}`. My attempt was writing this to the external `.bib` file:               @misc{himym,         title={How {I} met your mother},         year=2005,         note={Premiered on CBS}     }      But the output of `\citep{}` will be `him`, that is, the first three letters of the cite key. I was expecting something like > _How I met your mother_ , 2005. The ideal output on the references would be > _How I met your mother_ , 2005. Premiered on CBS. `natbib`'s manual say that, in cases where there isn't an author or year, it uses the `key` field to cite an entry. By doing so, `\citep{himym}` will only give me what's inside `key`, without the year.


title: Where can I find the template used in risk.net associated journals?

text: Where can I find the template used in those journals associated with risk.net, e.g. Journal of Operational Risk Journal of Credit Risk Journal of Risk etc. ? While the site says that there is no general template for the articles, it is obvious that most (all?) articles have used the same template. An example can be found here: http://www.eurekafinancial.com/blog/wp-content/uploads/2013/10/Systemic- operational-risk1.pdf thx


title: Commutative diagram with matrices as objects

text: I would like to create a diagram which has matrices as objects and arrows between these matrices. In particular, I'd like to have four matrices, two matrices in the upper row, and two in the lower row, with four arrows between them. I have drawn similar diagram with `xymatrix`, but I have no clue how to do this when the objects are themselves matrices. Help is appreciated. I tried working in the `\xymatrix` environment, and then use code like this:               \[ \left( \begin{array}{cc}     1 & b^{-1} \\     0 & 1 \\     \end{array} \right) \]      for the matrices, but this doesn't work.


title: Radial Labels on Mindmap - Part II

text: This is a continuation from Part I, where a solution was provided to create rotating labels in a radial fashion. ![enter image description here](http://i.stack.imgur.com/T0iq8.png) Closeup of the output looking like this: ![Solution](http://i.stack.imgur.com/dmFiH.png) I was able to improve the solution, preventing upside-down labels as they rotated through 360 degrees, with the following code, the difference being the 'ifthenelse' conditional clause...               \makeatletter     \newcommand*{\rotateme}[1]{%         \pgfmathparse{             (\tikz@grow@circle@from@start-(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1))         }%         \pgfmathparse{             ifthenelse(\pgfmathresult > 90 && \pgfmathresult < 270,\pgfmathresult + 180,\pgfmathresult)           }         \rotatebox[origin=c]{\pgfmathresult}{#1}%     }     \makeatother      What I would like to do now, is extend the radial nature of this topic, for the case where labels are quite long. Replacing the circular concept nodes, with ellipses or rectangles with rounded corners, which are also rotated. Note the following current output, the error is quite pronounced. ![Long Don](http://i.stack.imgur.com/YXi7P.png) My skills with tikz are quite poor, relatively speaking, is anyone able to assist here? The full working example stands as follows:               \documentclass[tikz]{standalone}     \usetikzlibrary{mindmap}     \newsavebox\rotatenodebox     \makeatletter     \newcommand*{\rotateme}[1]{%         \pgfmathparse{             (\tikz@grow@circle@from@start-(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1))         }%         \pgfmathparse{             ifthenelse(\pgfmathresult > 90 && \pgfmathresult < 270,\pgfmathresult + 180,\pgfmathresult)           }         \rotatebox[origin=c]{\pgfmathresult}{#1}%     }     \makeatother          \tikzset{         conc3/.style={concept,scale=.5},         rot/.style={             conc3,             execute at begin node={\begingroup\begin{lrbox}{\rotatenodebox}},             execute at end   node={\end{lrbox}\rotateme{\usebox\rotatenodebox}\endgroup},         }     }     \tikzset{         conc4/.style={concept,scale=0.75},         rotL/.style={             conc4         }     }     \begin{document}     \begin{tikzpicture}       \path[small mindmap,concept,text=white]         node[concept] {Bla} [clockwise from=345]         child[concept color=red,text=black]{           node[concept]at(1,0){Bla Bla}[clockwise from=90]           child[concept color=red!95!black,text=black]{             node[rotL]{A}[clockwise from = 120]                 child {node[rot] {A.A}}                 child {node[rot] {A.B}}                 child {node[rot] {A.C}}           }           child[concept color=red!75!black,text=white,grow=50]{             node[rotL]{B}[clockwise from = 80]                 child {node[rot] {B.A}}                 child {node[rot] {B.B}}                 child {node[rot] {B.C}}           }           child[concept color=red!50!black,text=white ,grow=10]{             node[rotL]{C}[clockwise from = 40]                 child {node[rot] {C.A}}                 child {node[rot] {C.B}}                 child {node[rot] {C.C}}           }           child[concept color=red!25!black,text=white,grow=-30]{             node[rotL]{D}[clockwise from = 0]                 child {node[rot] {D.A}}                 child {node[rot] {D.B}}                 child {node[rot] {D.C}}           }           child[concept color=red!10!black,text=white,grow=-70]{             node[rotL]{D}[clockwise from = -40]                 child {node[rot] {D.A}}                 child {node[rot] {D.B}}                 child {node[rot] {D.C}}           }         }         child[concept color=green,text=black, grow=195]{           node[concept]{Bla Bla}[clockwise from=80]           child[concept color=green!10!black,text=white]{             node[rotL]{Bla}[clockwise from = 110]                 child {node[rot] {A.A}}                 child {node[rot] {A.B}}                 child {node[rot] {A.C}}           }           child[concept color=green!25!black,text=white,grow=120]{             node[rotL]{Bla}[clockwise from = 150]                 child {node[rot] {A.A}}                 child {node[rot] {A.B}}                 child {node[rot] {A.C}}           }           child[concept color=green!50!black,text=white,grow=160]{             node[rotL]{Bla}[clockwise from = 190]                 child {node[rot] {B.A}}                 child {node[rot] {B.B}}                 child {node[rot] {B.C}}           }           child[concept color=green!75!black,text=white ,grow=200]{             node[rotL]{Bla}[clockwise from = 230]                 child {node[rot] {C.A}}                 child {node[rot] {C.B}}                 child {node[rot] {C.C}}           }           child[concept color=green!95!black,text=black,grow=240]{             node[rotL]{Bla}[clockwise from = 270]                 child {node[rot] {D.A}}                 child {node[rot] {D.B}}                 child {node[rot] {D.C}}           }         }         child[concept color=orange,text=black, grow = 270] {           node[concept]at(-1.5,-2.5){Bla Bla}[clockwise from=360]             child[concept color=orange!95!black]{                 node[rotL]{Bla}[clockwise from = 30]                     child {node[rot] {A.A}}                     child {node[rot] {A.B}}                     child {node[rot] {A.C}}             }             child[concept color=orange!75!black, grow = 320]{                 node[rotL]{Bla}[clockwise from =350]                     child {node[rot] {In Honour of the Great Long Don Silver}}                     child {node[rot] {In Honour of the Great Long Don Silver}}                     child {node[rot] {In Honour of the Great Long Don Silver}}             }             child[concept color=orange!50!black, text=white, grow=280]{                 node[rotL]{Bla}[clockwise from =310]                     child {node[rot] {C.A}}                     child {node[rot] {C.B}}                     child {node[rot] {C.C}}             }             child[concept color=orange!25!black, text=white, grow=240]{                 node[rotL]{Bla}[clockwise from =270]                     child {node[rot] {D.A}}                     child {node[rot] {D.B}}                     child {node[rot] {D.C}}             }             child[concept color=orange!10!black, text=white, grow=200]{                 node[rotL]{Bla}[clockwise from =230]                     child {node[rot] {E.A}}                     child {node[rot] {E.B}}                     child {node[rot] {E.C}}             }         };     \end{tikzpicture}     \end{document}


title: Unable to include figure

text: I was trying to include figures in my LaTeX file like this :               \begin{figure}      \centering      \includegraphics[scale =0.5]{graph/jm90-10/1.jpg}        \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 10:90 (CPU:Disk)  }      \end{figure}          \begin{figure}        \centering      \includegraphics[scale =0.5]{graph/jm90-10/2.jpg}         \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 30:70 (CPU:Disk)  }      \end{figure}           \begin{figure}        \centering      \includegraphics[scale=0.5]{graph/jm90-10/3.jpg}         \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 50:50 (CPU:Disk)  }      \end{figure}      The figure 1.jpg gets inserted but not other two. The error comes at line 3 of second figure at `\includegraphics`... as follows               l.253 \centering     You've lost some text. Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     ! Undefined control sequence.     \@xfloat ...@fltovf \fi \global \setbox \@currbox     \color@vbox \normalcolor \...     l.253 \centering     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     ! Missing number, treated as zero.     <to be read again>     \vbox     l.253 \centering     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     <graph/jm90-10/3.jpg, id=83, 783.92876pt x 458.71375pt>     File: graph/jm90-10/3.jpg Graphic file (type jpg)     <use graph/jm90-10/3.jpg>     Overfull \hbox (1.96342pt too wide) in paragraph at lines 254--255     [][]     []     ! Undefined control sequence.     \@largefloatcheck ->\ifdim \ht \@currbox     >\textheight \@tempdima -\textheigh...     l.256 \end{figure}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     ! Missing number, treated as zero.     <to be read again>     >      Any help ?


title: Successfully installed texlive-full but can't find it

text: Why is it that I can't find any icons or shortcuts of my LaTeX installation? I installed it using this: > `$ sudo apt-get install texlive-full.` But when I look at my application, I can't locate it. When I tried to right click a `.tex` file and select the option of `Open with other application` just to find LaTeX/TeXworks, I still can't see it. Also checked the `/usr/share/texmf/` and all files are there. I'm using 11.04 Natty.


title: Is it possible to put a long table (longtabu) into a adjust box (adjustbox)?

text: I am wondering as the title says whether it is possible to put a long table, especially for me a `longtabu` into a `adjustbox`? My code throws an error but I guess this is the same issue as is with putting a `longtabu` into a `table` environment. It's not allowed as the long table cannot flow otherwise. Is that correct?


title: Squiggly line in Asymptote

text: A somewhat similar question to this one, but in a different language for graphics: Is there a simple way to draw a squiggly line in asymptote?


title: Declaring environments with xparse

text: I'm having trouble with the xparse package's environment creating commands. What I'd like to do in the end is write my own list environment. The toy example below shows my current problem: the list shows up, but some extra text is getting appended during the closing of the environment. I "fixed" it by using the `\newenvironment` command, but I was hoping to use the argument processing options that xparse provides. In the cljlists.sty package:               \NewDocumentEnvironment{xparselist}{}{BEGIN!\begin{itemize}}{\end{itemize}END!}     \newenvironment{newlist}{BEGIN!\begin{itemize}}{\end{itemize}END!}      In the document:               \subparagraph*[short]{Second Sub-Paragraph}     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     \begin{newlist}     \item item     \end{newlist}     \begin{xparselist}{mandatory}     \item item     \end{xparselist}      This outputs: (sorry the image got chopped for being new, but about like this...) _Second Sub-Paragraph_ text...text BEGIN!   * item END!BEGIN!   * item END! shortSecond Sub-Paragraph I'm not sure why the arguments provided to `\subparagraph` are being used by the `blahblahblah` environment when it closes. I have redefined `\subparagraph` using xparse's `\DeclareDocumentCommand`. I don't have this problem when I declare another command using xparse, however. Have I missed something important in the documentation? * * * EDIT: here's complete minimal copy of the code which reproduces the problem, including requests from the comments. The problem should be more apparent now that I can attach photos. The list environment I created using `xparse`, is typesetting some text immediately after the environment closes, which appears to come from the arguments I provide to the subparagraph command. Document:               \documentclass{article}     \usepackage{toylists}          \begin{document}     \subparagraph{title}     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     text text text text text text text text text text text text text text text text     \begin{newenvlist}     \item item     \end{newenvlist}     \begin{xparselist}     \item item     \end{xparselist}     \end{document}      Package:               \ProvidesPackage{toylists}[2011/03/08 xparse list example]          \NeedsTeXFormat{LaTeX2e}     \RequirePackage{xparse}          \DeclareDocumentCommand{\subparagraph}{s o m}{\textit{#3}}          \NewDocumentEnvironment{xparselist}{}{%     \begin{itemize}}{%     \end{itemize}}          \newenvironment{newenvlist}{%     \begin{itemize}}{%     \end{itemize}}      Output: ![enter image description here](http://i.stack.imgur.com/bjNCP.png)


title: How do I run bibtex after using the -output-directory flag with pdflatex, when files are included from subdirectories?

text: When I have master pdflatex file which includes one or more child documents using something like `\include{include/childdoc}`, and I call pdflatex on it using `pdflatex -output-directory=out parent.tex`, I seem unable to find a way of calling bibtex on the resulting `parent.aux` file. I have tried both `cd out; bibtex parent`, and `bibtex out/parent`, to no avail. I know there are various build-tools out there, but I'd like first to make it work just from the shell with no special build-tool dependencies.


title: Double slashes close together with resizing

text: I basically want this symbol, but I want it to resize properly: While               X/\mkern-6mu/H      looks good, when I try to resize using `\biggl`, then the horizontal space between the two slashes becomes very large:               \biggl.X\biggl/\mkern-6mu\biggl/H\biggr.      Is there any solution to this? None of the suggestions in the original question resize properly. Thanks a lot in advance!


title: How to create a document with asymmetrical discontinuous columns?

text: I am trying to create a document that has two discontinuous and asymmetrical width columns with a dividing line vertically separating the columns, which extend above and below the text. The basic format would look something like this: ![enter image description here](http://i.stack.imgur.com/axKAN.png) I've attempted to implement several ideas, but the closest I can get is with this code:               \documentclass[12pt,a4paper]{article}          \begin{document}          \begin{minipage}[t]{0.5\textwidth}     dolor sit amet \\     nisi ut aliquip \\     non proident, sunt \\     \end{minipage}     \begin{minipage}[t]{0.7\textwidth}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \end{minipage}     \end{document}      The output looks something like this: ![enter image description here](http://i.stack.imgur.com/jifiN.png) The main problem with my current solution is spacing. I attempted to insert the vertical line by making a new minipage and using tikz to generate the line, but three minipages seems to create alignment havoc. Can anyone help with a possible solution as to how I can generate the desired formatting from my drawing? Thanks for your time.


title: clash between mathtools and unicode-math

text: Lately I started looking into LuaTeX and I must say I’m growing fond of it with every feature I discover. So I decided to transfer my pdfTeX preamble to LuaTex checking which packages still work and which ones need to be replaced. I use the `mathtools` package with pdfTeX for its `centercolon` and `\smashoperator` features. Unfortunately it seems to clash with the `unicode- math` package under LuaTeX. It boils down to:               \documentclass{minimal}     \usepackage{mathtools}     \usepackage{unicode-math}     \setmathfont{Latin Modern Math}     \mathtoolsset{centercolon}     \begin{document}     \[:=\coloneq\coloneqq\eqcolon\eqqcolon:=\]     \end{document}      results in               ! Invalid math code.     <to be read again>                         \let      l.5 \mathtoolsset{centercolon}      with LuaTex beta-0.70.1 under MiKTeX 2.9. It seems that `unicode-math` is aware of the `mathtools` package as it warns in the log file that some commands were redefined. * * * EDIT: As mentioned above as I’m not working on a true document just doing preamble conversion work. Thus the random choice of Latin Modern Math was a poor one as pointed out by egreg. The partial answer is that the new OpenMath OpenType Fonts make the `centercolon` feature of the `mathtools` package obsolete. I wasn’t aware of that. Of the handfull available OpenMath compliant fonts Neo Euler seems to be the only one where `:=` is not symmetric. I can’t check Minion Math yet. Taking egregs answer into account and avoiding `coloneq` while trying to use `mathtools` to adjust Neo Euler’s `:=` gives however the same error as above:               \documentclass{minimal}     \usepackage{mathtools}     \usepackage{unicode-math}     \setmathfont[version=Asana]{Asana-Math.otf}% Asana Math     \setmathfont[version=Cambria]{Cambria Math}     \setmathfont[version=LatinModern]{Latin Modern Math}     %\setmathfont[version=Minion]{Minion Math}     \setmathfont[version=XITS]{xits-math.otf}% XITS Math     \setmathfont[version=NeoEuler]{Neo Euler}     \begin{document}     \mathversion{Asana} Asana \(:=:=\)      \mathversion{Cambria} Cambria \(:=:=\)      \mathversion{LatinModern} LatinModern \(:=:=\)      \mathversion{XITS} XITS \(:=:=\)     \mathtoolsset{centercolon}     \mathversion{NeoEuler} Neo Euler \(:=:=\)     \end{document}


title: Exact centering of full-page background image

text: Here's the situation:   1. I have to use `memoir` (v3.6j), with `geometry` (v5.6) and `LuaTeX`, version beta-0.70.1-2011061410 (rev 4277) in an **A5 project** which, in the final output have to be 3mm larger from any side, i.e., PDF dimensions should be **154x216mm**. I use `crop` (v1.9) package for crop marks and setting the correct paper size.   2. The project has two background images, each for both left and right pages, which fit **154x216mm** size. For this purpose, I have to use `eso-pic` (v2.0c) this time (though suggestions regarding `background` and `wallpaper` packages are most welcome).   3. Though I can manually tweak the position of those background images, I'd like to know if there is an automatic way to place them **exactly** centered regarding the page, if possible independent of changing paper dimensions with `crop` package (comment l.13, and uncomment l.14). Here is a sample document code.               \documentclass[10pt,twoside]{memoir}          \DisemulatePackage{geometry}     \DisemulatePackage{crop}          \usepackage{geometry}     \geometry{%         papersize={148mm,210mm},%         hmargin={2cm,2cm},%         vmargin={2cm,2.2cm},         showframe}          \usepackage[width=15.4cm,height=21.6cm,center,cam]{crop}     %\usepackage[width=16.3cm,height=22.5cm,center,cam]{crop}          \usepackage{xcolor}          \newcommand{\bgleft}{{\color{yellow}\rule{154mm}{216mm}}}% Background for even pages          \newcommand{\bgright}{{\color{green}\rule{154mm}{216mm}}}% Background for odd pages          \usepackage{eso-pic}     \usepackage{ifthen}          \usepackage{lipsum}          \begin{document}          \AddToShipoutPicture{\ifthenelse{\isodd{\thepage}}%         {\bgright}%         {\bgleft}         }          \lipsum[1-15]          \end{document}


title: Should a \CharacterTable still be used in dtx files?

text: My understanding of the use of a `\CharacterTable` in `.dtx` files is that it provides a visual check that the file was transmitted properly and there were no issues with character encodings. Is it still necessary? I notice quite a few class and package authors include it after the `\endinput` line in order to minimize the visual clutter at the beginning of the file. Is this considered good practice?


title: Producing Generic or Portable TEX Source Codes Using - the World Wide Web- Standards

text: Is it possible to write or produce a(n) -ultimate- standard coding pattern for TEX source codes those might work well enough across the "World Wide Web" on almost every each of platforms available, maybe from "workstations", to "mobiles" without ever even compiling...? THANK YOU so much for reading this...


title: Typesetting with Inch Symbols and Sizes in Inches

text: I'd be much obliged if somebody could tell me how to do the following.   * How does one typeset the symbol for inches in LaTeX? Is it `"`?. Neither Lamport nor Knuth seem to mention it.   * Assuming `\inchcommand` is the command that produces the inch symbol, does one insert a thin space before the command: `1\,\inchcommand`?   * When you write 8.5 x 11 paper size, it is not clear the sizes are in inches. Is there a way to make the unit explicit?


title: Using "bibitem" in LyX

text: How do I use `\bibitem` style bibliography in LyX without the ERT? Right now I prepare the `@article` style bibliography in a file (say) `references.bib`. Then I go: `Insert => List/TOC => BibTeX Bibliography` and simply add that file to my LyX document. But this is too time-consuming. I simply want to borrow references from another document which uses `\bibtem`. Example of one of the references:                 \bibitem [{\citenamefont {Schnyder}\ \emph {et~al.}(2008)\citenamefont       {Schnyder}, \citenamefont {Ryu}, \citenamefont {Furusaki},\ and\       \citenamefont {Ludwig}}]{schnyder2008}%       \BibitemOpen       \bibfield  {author} {\bibinfo {author} {\bibnamefont {Schnyder} \bibfnamefont       {A.~P.}}, \bibinfo {author} {\bibfnamefont {S.}~\bibnamefont {Ryu}}, \bibinfo       {author} {\bibfnamefont {A.}~\bibnamefont {Furusaki}}, \ and\ \bibinfo       {author} {\bibfnamefont {A.~W.~W.}\ \bibnamefont {Ludwig}}} (\bibinfo {year}       {2008}),\ \href@noop {} {\bibfield  {journal} {\bibinfo  {journal} {Phys.       Rev. B},\ }\textbf {\bibinfo {volume} {78}},\ \bibinfo {pages}       {195125}}\BibitemShut {NoStop}%


title: Problem with bibliography style file

text: I want to use `apalike` bibliography style (downloaded from: http://web.reed.edu/cis/help/LaTeX/bibtexstyles.html). But I somehow don't get the style output as it is supposed to be. I have attached a minimal working example. The files: https://docs.google.com/folder/d/0B6yei5eTKtEscEgwT08xWE96cGc/edit I would like to use `neuron` bib style or any bib style that serves the purpose of applying the format to my citations in the manner [Author or book name,(year)].


title: How to define a table in documentclass?

text: Consider a simple table in the document:               \begin{tabular}{ l c r }       1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\     \end{tabular}      How we can define this table within the `documentclass` as users only put the values of each cell. I mean how to set variables in the `documentclass`, as we have, for example, for sections:               \section*{Section Header}     Section body      How to define the table as users can fill the variable in the documents as something like:               \table{header1,header2,header3}     row1: cell1, cell2, cell3     ...


title: PDF file containing 3D object is not included correctly with \includegraphics

text: I have a PDF file, containing a 3D object in PRC format. I try to include this into a LaTeX document to be compiled with `pdflatex`, with the simple source below:               \documentclass{minimal}     \usepackage{graphicx}     \begin{document}     \includegraphics{LC.pdf}     \end{document}      Running `pdflatex` (version 3.1415926-2.3-1.40.12, TeX Live 2011) over this does not yield any error or warning, but the PDF file created does not include the 3D content (in fact, it is empty). The log file for my compilation appears happy, however:               <LC.pdf, id=1, 200.74097pt x 196.72597pt>     File: LC.pdf Graphic file (type pdf)      <use LC.pdf>     Package pdftex.def Info: LC.pdf used on input line 4.     (pdftex.def)             Requested size: 200.74046pt x 196.72548pt.      [1 <./LC.pdf>] (./a.aux) )      So: what am I doing wrong? How can I include this PDF figure, keeping its 3D content, into a LaTeX document?


title: Placing long table inside \shadowbox

text: I have a multi-page table produced by long table package and I want to put each page of the `longtable` inside `\shadowbox`. Here is what I have tried:               \documentclass{article}     \usepackage{fancybox}     \usepackage{longtable}     \begin{document}     \shadowbox{\vbox{\begin{longtable}{|c|c|}\hline     Test&Test\\ \hline     Test&Test\\ \hline     Test&Test\\ \hline     Test&Test\\ \hline     .....................      \end{longtable}}}     \end{document}      But then my table does not break across pages. How should I fix this? Note that using `mdframed` is not an option for me. A solution should only use `\shadowbox` command from `fancybox` package. This is my assignment from _LaTeX writing_ course that I do at my university. **EDit:** The assignment is over. So if you can solve it, then post your solutions.


title: Defining cross-reference names for custom theorem environments in cleveref

text: I am concerned with the difference between this working example               \documentclass{article}     \usepackage{amsthm}     \usepackage[capitalise]{cleveref}          \newtheorem{thm}{Theorem}               \begin{document}          \begin{thm}\label{thm1}     My first theorem     \end{thm}          \begin{thm}\label{thm2}     My second theorem     \end{thm}          Using \cref{thm1,thm2} we obtain another theorem.     \end{document}      whose last line is displayed as > Using ?? 1?? 2 we obtain another theorem. and the code               \documentclass{article}     \usepackage{amsthm}     \usepackage[capitalise]{cleveref}          \newtheorem{theorem}{Theorem}               \begin{document}          \begin{theorem}\label{thm1}     My first theorem     \end{theorem}          \begin{theorem}\label{thm2}     My second theorem     \end{theorem}          Using \cref{thm1,thm2} we obtain another theorem.     \end{document}      whose last displayed line is the intended > Using Theorems 1 and 2 we obtain another theorem. I found inside `cleveref.sty` the right (non abbreviated) names of the basic `\newtheorem` definitions (theorem,lemma, corollary, proposition, definition) which are predefined in `cleveref`. But what is the full description that one must give to `cleveref` so that it handles a theorem environment properly (including the `capitalise` option)?


title: Nested TikZ nodes

text: This isn’t the first time this question was asked but the other solutions don’t work in my case. Consider the following image: ![screenshot](http://i.stack.imgur.com/bSezW.png) It was created using this code:               \begin{tikzpicture}[       node distance=7mm,       title/.style={font=\fontsize{6}{6}\color{black!50}\ttfamily},       typetag/.style={rectangle, draw=black!50, font=\scriptsize\ttfamily}     ]       \node (decomp) [title] { Decomposition };       \draw [draw=black!50] (decomp.north west) rectangle +(2.8cm, -2.7cm);            \node (di) [typetag, below=of decomp.west, anchor=west, xshift=2mm] { Independent };       \node (dr) [typetag, below=of di.west, anchor=west] { Reduction };       \node (dnc) [typetag, below=of dr.west, anchor=west] { DivideAndConquer };            \node (dep) at (3cm, 0) [title] { Dependency };       \draw [draw=black!50] (dep.north west) rectangle ($(dep.north east) - (0, 2cm)$);            \node (da) [typetag, below=of dep.west, anchor=west, xshift=2mm] { Atomic };       \node (dr) [typetag, below=of da.west, anchor=west] { Range };     \end{tikzpicture}      Needless to say, this code is horribly complicated and has no automation (for example, the width of the borders isn’t auto-computed to fit all elements, but rather put in by hand via painstaking trial and error). There _must_ be an easier way to achieve this. In particular, I have two questions:   1. How do I automate the drawing of the border + title (the grey text) so that the border is just large enough to accomodate all the `typetag` elements that follow after (and how to specify them?)   2. How can I arrange the `typetag` elements more smartly? (having to write, every time, `below=of Element.west, anchor=west` is _extremely_ annoying, but I don’t succeed to put this into the `typetag/.style` because TikZ “forgets” this information (I have also tried adding `ever node/.style={anchor=west}` in the `tikzpicture` options, to no avail). Question 1 is the important thing here, though. Question 2 is more of a general question that crops up again and again …


title: header-footer configuring

text: Need to start page numbering from the n-th page (in this case 6); used `ifthen` and `fancyhdr` packages. So, no dotted lines since page 6 and page 5 is already numbered.               \usepackage{ifthen}     \usepackage{fancyhdr}     \pagestyle{fancy}     \rfoot{}     \lfoot{}     \lhead{}     \rhead{}     \chead{}     \ifthenelse{\value{page}<6}     {     \cfoot{}     \renewcommand{\headrulewidth}{0.0pt}     \renewcommand{\footrulewidth}{0.0pt}     }     {     \cfoot{\thepage}     \renewcommand{\headrule}{\vbox to 0pt{\hbox     to\headwidth{\dotfill}\vss}}     \renewcommand{\footrule}{\vbox to 0pt{\hbox     to\headwidth{\dotfill}\vss}}     }      Any guesses?


title: Which Linux distributions support recent TeX Live with package manager?

text: I am currently having massive issues getting TeX Live to run on Ubuntu 12.04, so I am considering running a VM on VirtualBox with another Linux distribution that has better support for the latest TeX Live (2012). I want to have automatic package manager installation a la `apt` and `synaptic` and don't want to interfere with the system. What would you recommend to me?


title: Centered box, text inside it flushed right?

text: I have some text (like a title), that needs to be centered, and some notes to it (multiline - note 1 \\ note 2), which should be directly underneath it and on the left side of it:                      Some centered text            note1            note2      How can I do it?


title: How to use pgf-math inside an argument?

text: I response to xport's recent questions, I tried to do the following               \usepackage{pgf}     [...]     \rule{\pgfmathdivide{4}{3}\pgfmathresult mm}{5mm}      Unfortunately, this fails with the following error message:               ! Missing number, treated as zero.     <to be read again>                         \begingroup      l.11 ...pgfmathdivide{4}{3}\pgfmathresult mm}{5mm}      My first guess was that for some reason the output of `\pgfmathresult` cannot be used as the input for `\rule`. However, the slight rearrangement               \pgfmathdivide{4}{3}\rule{\pgfmathresult mm}{5mm}      works as expected. Why? What do I have to change to be able to put `\pgfmathdivide` inside the argument of `\rule` (or rather inside a macro that can be used in the argument of `\rule` and similar commands)?


title: Ligatures in figures and pdftex

text: In the following example, the 'ff' ligature in the figure labels (in 'differential') disappears when `pdflatex` is used, but the fault does not occur if `latex-dvips-ps2pdf` is used instead. Both `lualatex` and `xelatex` produce the correct results, using the pdf version of the figure. Is there a problem with the figure, or is this a bug in `pdftex`?               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \includegraphics[width=0.9\textwidth]{Cluster2}     \end{document}      Cluster2.pdf   Cluster2.eps


title: some greek letters disappear from PDFs included with includegraphics

text: > **Possible Duplicate:**   >  Ligatures in figures and pdftex I have created some graphs in PDF format with PyX that include some labels with greek letters. When these graphs are included with \includegraphics, some letters disappear from the graphs in file produced by pdflatex. This only happens when the PyX-created file uses mathptmx (or maybe some other font- specific packages). I made a very minimal example.               \documentclass[11pt]{article}     \usepackage{times}     \usepackage{mathptmx}     \usepackage{graphicx}     \begin{document}     \begin{figure}     \centering     \includegraphics{tbox}     \caption{Should see $\delta = \tau$.}     \end{figure}     \end{document}      The figure tbox.pdf is created with the following python script (and PyX v0.11.1)               #!/usr/bin/env python     from pyx import *          text.set(mode="latex")     text.preamble(r"\usepackage{mathptmx}")          cd = canvas.canvas()     tbox = text.text(0, 0, r"$\delta = \tau$",[text.halign.boxleft])     cd.insert(tbox)     cd.writePDFfile('tbox.pdf')      The version of tbox.pdf as produced by python and PyX is available: http://www.fileswap.com/dl/VjH3mAF8pW/


title: Strange blank page between abstract and ToC

text: I am puzzled by a blank page appearing between my abstract and ToC. Since I'm using the `report` document class, I am not expecting LaTeX to insert any blank pages. Here is a MWE showing the problem:               % Testing behavior of abstract+tableofcontents     \documentclass[11pt, a4paper]{report}          \title{Project title}          \author{Authors...}          \begin{document}          \begin{abstract}         This is a dummy abstract...     \end{abstract}          \textsf{\tableofcontents}          \chapter{Chapter 1}          \section{Section 1}     \subsection{Subsection 1}     \subsection{Subsection 2}          \section{Section 2}          \chapter{Chapter 2}          \end{document}      Any clues as to why the blank page is appearing and how to get rid of it will be very much appreciated.


title: A better way to achieve sans-serif typeface in figure and table environments

text: For some of my style files, I would like to have a sans-serif typeface within my figures. I have code which seems to be working,               \makeatletter     \renewenvironment{figure}[1][\fps@figure]{       \edef\@tempa{\noexpand\@float{figure}[#1]}        \@tempa       \sf     }{       \end@float     }     \renewenvironment{table}[1][\fps@table]{       \edef\@tempa{\noexpand\@float{table}[#1]}        \@tempa       \sf     }{       \end@float     }     \makeatother      but surely there's a better way?


title: latex flashcard problem

text: I use a package to make flashcards which has the formatting `\card{#1}{#2}`, where `#1` and `#2` represent the front and back side. The package works great. I like to block out text, so I have made newcommands `\frontcard`, which blocks out the text using highlighting or underlining and makes the text white, and `\backcard`, which is essentially a dummy command that replaces frontcard. For example, I would have to write `\card{The chancellor of Germany is \frontcard{Angela Merkel}}{The chancellor of Germany is \backcard{Angela Merkel}}`.               \documentclass[frontgrid]{flacards}     \usepackage{color}          \newcommand{\frontcard}[1]{\textcolor{yellow}{\colorbox{yellow}{$#1$}}}     \newcommand{\backcard}[1]{#1}           \begin{document}          \pagesetup{2}{4}                \card{The chancellor of \frontcard{Germany} is \frontcard{Angela Merkel}. }{The chancellor of \backcard{Germany} is \backcard{Angela Merkel}. }          \end{document}       What I would like to reduce 2 newcommands to one command, as writing two commands is a little redundant. I cant think of an easy way to do this though, because of the arbitrary number of blank fields (2 or more). So something like: `\newcard{The chancellor of \blank{Germany} is \blank{Angela Merkel}}` I was thinking how i could accomplish this; maybe with the ifthen package or etoolbox package? So, if im in `#1` do this command, if im in `#2` then do the other command. However I can't figure out how to implement this exactly. Any suggestions? Thanks in advance!


title: How to get rid of "multiply defined" label warning?

text: I have used `\label{rt}` command 7 times in my manuscript for seven figures. It is showing a warning message of "LaTeX warning: Label '{rt}' multiply defined". How to remove the warning?


title: How to make a box containing LaTeX output?

text: I am writing a short introductory book on LaTeX and I would like to implement nice looking code example boxes. Using this answer: Source code listing with frame around code? I made the boxes with the listings packages by setting in the preamble:               \usepackage{listings}     \usepackage{xcolor}     \usepackage{caption}     \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{%       \parbox{\textwidth}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}\vskip-4pt}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}     \lstset{frame=lrb,xleftmargin=\fboxsep,xrightmargin=-\fboxsep,language=[LaTeX]{TeX},columns=flexible}     \renewcommand{\lstlistingname}{Example}      and in the text for example:               \begin{lstlisting}[label=firstlook,caption=A First Look]     \documentclass{article}     \begin{document}     Hello World!     \end{document}     \end{lstlisting}      Which results in: ![Nice-looking box](http://i.stack.imgur.com/DgsZ3.png) And looks nice. I would like to make something similar for the output, and was wondering how I could do that (by manually writing the output I mean, not automatically taking what I enter there and evaluate it). Just the same looking box would be cool, having this box split in the middle and show an "output panel" or something would be even cooler. Does anyone know how I can do such a thing?


title: Fixing the document structure created with hyperref

text: I am new to Latex, tentatively using it to prepare a complicated industrial document (laboratory test report). This document contains numerous test groups, and I have found convenient , for both the writer and the reader, to number the section of the test results of each group (and the tables and figures) with the group number. I have managed to find a way that suits my need. However, when I use a starred version of the chapters, the resulting structure of the .pdf document is altered, in a way that on the attached sample, the chapter "test results" is shown as a branch of section 1 and not on the same level as other chapters... Is there a way to correct this behavior? Thanks.               \documentclass[a4paper, oneside,11pt, english]{report} % Mode production     \usepackage[utf8]{inputenc} % UTF-8 encoding for code editing     \usepackage[T1]{fontenc} % Usual fonts     \usepackage{tgheros,textcomp}% Fonts     \usepackage{lastpage} % Handling last page numbering      \usepackage{hyperref} %enabling hyper references          % --[SECTION NUMBERING FIRST PAGES]---------------------------------     \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thetable}{\Alph{table}}     \renewcommand{\thefigure}{\Alph{figure}}     %  --[END SECTION NUMBERING FIRST PAGES]---------------------------------     \renewcommand{\familydefault}{\sfdefault}%selecting default font (clone of helvetica)          \begin{document}          \tableofcontents %  [CREATING TABLE OF CONTENTS]---          \chapter*{Summary of test results}     \addcontentsline{toc}{chapter}{Summary of test results}     A table.          \chapter*{Test specimen}     \addcontentsline{toc}{chapter}{Test specimen}     \section{section 1}     Some text.     \section{Section 2}     Some text.           \chapter*{Test results}     \addcontentsline{toc}{chapter}{Test results}          %-[BEGIN ASSOCIATE TABLE AND FIGURE NR TO SECTION NR]----     \makeatletter      \renewcommand{\thefigure}{\ifnum \c@section>\z@ \thesection.\fi      \@arabic\c@figure}      \@addtoreset{figure}{section} \makeatother      \makeatletter      \renewcommand{\thetable}{\ifnum \c@section>\z@ \thesection.\fi      \@arabic\c@table}      \@addtoreset{table}{section} \makeatother      %-[END ASSOCIATE TABLE AND FIGURE NR TO SECTION NR]-----               \renewcommand{\thetable}{\thesection.\arabic{table}}     \renewcommand{\thefigure}{\thesection.\arabic{figure}}          \setcounter{section}{-1} % setting counter to assign  number 0 to group 0      \setcounter{figure}{-1} % setting counter to assign  number 0 to figures of group 0     \setcounter{table}{-1} % setting counter to assign  number 0 to figures group 0               \section{Group 0}     \subsection{Visual examination}      No defect observed.      \subsection{Examination of dimensions and mass}      The results meet the requirements stated on the drawings.     \subsection{Magnetic permeability}     The results meet the requirements.      \subsection{Mating and un-mating forces }     The results meet the requirements.          %----------------               \section {Group 1}      %----------------          some text     \subsection{Visual examination}       some text     \subsection{Measurement of insulation resistance}      some text     \end{document}


title: How to get rid of these excessive rules?

text: ![enter image description here](http://i.stack.imgur.com/Hj0VT.png)               \documentclass{article}%cannot be minimal     \usepackage{longtable}     \usepackage{ifthen, xspace}     \newcounter{xyz}     \setcounter{xyz}{1}     \def\and{&\xspace}     \begin{document}          \begin{longtable}{|*2{c|}}\hline     \whiledo{\value{xyz}<6}%     {\thexyz \and something\stepcounter{xyz} \\\hline}     \end{longtable}          \end{document}


title: Rubber lengths in multicol

text: I get so much grief from the `multicol` package regarding rubber lengths. If I set a length such as:               \titlespacing*{\section}{0pt}{3ex}{1ex plus 1ex minus 1ex}      `multicol` goes ahead and stretches it as much as it likes. Give it an inch it takes a mile.   1. Why am I getting this problem?   2. Are there any workarounds? The only solution I have so far is to not allow stretching `\titlespacing*{\section}{0pt}{3ex}{1ex}`, but obviously that gives the opposite problem.


title: How to shrink a table automatically so that it fits onto a page?

text: I have a table that looks like this:               \begin{table}[h]     \centering     \caption{MYCaption}     \label{tbl:table1}     \begin{tabular}{|l|l|l|l|}     \hline     \rowcolor[gray]{.8}     \multicolumn{4}{|c|}{Team 1}\\     \hline     \textbf{Caption1} & \textbf{Caption 2} & \textbf{Caption3} & \textbf{Caption 4}\\     \hline     Some values & Some values & Some values & Some values\\     \hline     \rowcolor[gray]{.8}     \multicolumn{4}{|c|}{Team 2}\\     \hline     \textbf{Caption1} & \textbf{Caption 2} & \textbf{Caption3} & \textbf{Caption 4}\\     \hline     Some values & Some values & Some values & Some values\\     \hline     \end{tabular}     \end{table}      I also have a two column layout, but the table spreads across both columns. However, at the moment the table is too wide for the page width. Now I would like that the font size is automatically adapted so that the table always fits into the page. The solutions I could find so for are not able to do this, because they use linebreaks to fit the table. I don't want linebreaks.


title: How do I prevent LaTeX from putting \sections at the very end of the page?

text: Please take a look at the screenshot below. I am having a problem where LaTeX would put the `\section` at the very end of the page. So far I fixed it by using `\newpage` but I just learned that it was totally wrong. I am using `memoir` document class together with `listings` package for code examples. The page in the screenshot was generated this way:               \section{Substitute (find and replace) "foo" with "bar" on each line}          \begin{lstlisting}     awk '{ sub(/foo/,"bar"); print }'     \end{lstlisting}          ....          \section{Substitute "foo" with "bar" only on lines that contain "baz"}          \begin{lstlisting}     awk '/baz/ { gsub(/foo/, "bar") }; { print }'     \end{lstlisting}          ...      Anyone knows how to make `\section`s always go on a new page if they are at very bottom? ![enter image description here](http://i.stack.imgur.com/57Vnj.png)


title: Shortening Reference

text: I want to reference               [Was97] L. Washington, Introduction to cyclotomic fields, Springer, New York, 1997.      in my text. However, using Bibdesk, it autogenerates Was97 for me. How may I change that to [W97] or in fact, to anything else?


title: How do I re-use the book's text for different document formats?

text: Any ideas how I could re-use the book's text that I have written (it's in `chapter1.tex`, `chapter2.tex`, etc.) in various document formats (a4, letter, mobile device format, etc). The problem I am facing is that I have placed various `\newpage`s in the chapters so they looked ok for `a4` format. But now when I tried to compile the book for `letter` those `\newpage`s are in the wrong places, so I have to have a different copy of text with `\newpage`s in the right places. What's the general strategy for re-using the text for various formats? The reason why I am using `\newpage` throughout my book is that `\section`s sometimes appear at the bottom of the page, and I want to force them into the new page, so I use `\newpage` just before that `\section` that was at the bottom of current page. Here is a screenshot example: ![enter image description here](http://i.stack.imgur.com/uVvWK.png) See how `4.12` is at very bottom and the code example is cut in half? That's why I insert these `\newpage`s to force it on a new page so it looked ok! I am using `memoir` document class and the code boxes are done via `\begin{lstlisting}...\end{lstlisting}`.


title: Modifying EB Garamond font

text: Is possible modifying this font to have only the "normal" s and u also in the doubles ? ![enter image description here](http://i.stack.imgur.com/QMgYR.jpg)               \documentclass[pagesize=auto, version=last]{scrartcl}          \usepackage{fontspec}     \usepackage{microtype}     \defaultfontfeatures{Ligatures=TeX}          \setmainfont[RawFeature={+ss02,+cv01,+ss05,+dlig},ItalicFeatures={RawFeature=+cv04,CharacterVariant=5:2}]{EB Garamond}     \newfontfamily\booktitlefont[LetterSpace=40,WordSpace=2,RawFeature={+ss02,+cv01,+dlig}]{EB Garamond}     \newfontfamily\spacedfont[LetterSpace=20,WordSpace=3,RawFeature={+ss02,+cv01,+dlig}]{EB Garamond}          \begin{document}     \begin{itemize}     \item pression     \item s     \item u     \item bassun     \end{itemize}     \end{document}


title: Show a matrix in detail

text: Below it is a very useful command to create a matrix. But it has a short point to me since it shows Parentheses not Square brackets. My question it how should I change this to show square brackets? I appreciate your answer. Thank you so much.               \[     K =       \underbracket{\begin{pmatrix}        K_1 & 0      & 0    \\        0   & \ddots &    0   \\        0   & 0      & K_n    \\        \end{pmatrix}}_{d\times M}     \]


title: How to include the part name in the header of classicthesis scrreprt?

text: How could I include the part name in front of the chapter name in the header of odd pages within a classicthesis scrreprt document? The original section in classicthesis.sty reads as follows:               % ******************************************************************                     % headlines     % ********************************************************************       \PassOptionsToPackage{automark}{scrpage2}     \RequirePackage{scrpage2} % provides headers and footers (KOMA Script)     \clearscrheadings     \setheadsepline{0pt}     \ifthenelse{\boolean{@nochapters}}%         {\relax}%         {\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}}      \lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}}     \rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}}     \renewcommand{\headfont}{\small}       %    \DeclareRobustCommand{\fixBothHeadlines}[2]{} % <--- ToDo     % hack to get the content headlines right (thanks, Lorenzo!)         \def\toc@heading{%             \ifthenelse{\boolean{@nochapters}}%             {\section*{\contentsname}}%nochapters             {\chapter*{\contentsname}}%chapters             \@mkboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}}      It results in a header with the actual chapter name on odd pages and the sections name on even pages. Do I have to include something like `\renewcommand{\partmark}`? What exactly is `\headmark` doing? Again, the aim is to include the part name (not the number) in the header.