title: "Trackchanges": respecting the equation environment

text: I am using trackchanges for monitoring changes in a LaTeX document. I have a problem when compiling a trackchange tag with a equation environment embedded into it. Here is a .tex file which compiles               \documentclass[A4]{article}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{trackchanges}     \begin{document}          \addeditor{alexm}     \section{dog}     Hello, this is an example file. \add[alexm]{Here I add text}.     There is a tree\remove[alexm]{but I remove a cat}. My hair is      \change[alexm]{green}{red}.          \end{document}      This file compiles fine and a .pdf is produced as it should be. But now with an equation being shown:               \documentclass[A4]{article}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{trackchanges}     \begin{document}     \addeditor{alexm}     \section{dog}     Hello, this is an example file. \add[alexm]{Here I add text}.     There is a tree\remove[alexm]{but I remove a cat}. My hair is      \change[alexm]{green}{red}.          Now with an equation it fails, but why?     \add[alexm]{some text     \begin{equation}     1+1=2     \end{equation}     and some more text.}          \end{document}      This gives fatal compiling errors. Is there a way to keep it from failing, any protective tags? It doesn't matter if it doesn't display properly, as long as it compiles, since it is for draft purposes anyways, but it would be a bonus.


title: Can I tell LaTeX to break a list?

text: Quite often, I have lists with short items, e.g.:               \documentclass[a4paper,9pt]{scrartcl}     \usepackage{braket}         % for \Set{}          \begin{document}     adsfasdf     \begin{itemize}         \item $\Set{A}$         \item $\Set{A, B}$         \item $\Set{A, B, C}$         \item $\Set{A, B, C, D}$         \item $\Set{B}$         \item $\Set{C}$     \end{itemize}     test text tex     \end{document}      which looks like this: ![enter image description here](http://i.stack.imgur.com/f6G5i.png) I know that I can get this with tables and three lists. But can I also achieve the same result simpler?


title: AUCTex Installation

text: I installed Emacs with AUCTex using the following code in Ubuntu 13.10:                sudo apt-get install texlive-base emacs23 auctex preview-latex      I followed these instructions, but the Code that should be copied to the `~/.emacs` file issues an error:               Warning (initialization): An error occurred while loading `/home/dbelal/.emacs':          Symbol's value as variable is void: ’LaTeX-mode-hook          To ensure normal operation, you should investigate and remove the cause of the error in      your initialization file.  Start Emacs with the `--debug-init' option to view a     complete error backtrace.      The `~/.emacs` file contains:               ;;For Auctex < 11.82 exchange ";;" in the following 2 lines     ;;(require ’tex-site)     (load "auctex.el" nil t t)     (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq TeX-PDF-mode t) ;; .pdf instead of .dvi per default:     2;;Zeilenumbruch     (add-hook ’LaTeX-mode-hook ’turn-on-auto-fill)     ;;Syntax Higlighting     (add-hook ’LaTeX-mode-hook ’turn-on-font-lock)     ;; Math Mode     (add-hook ’LaTeX-mode-hook ’LaTeX-math-mode)     ;; loading Reftex      (setq reftex-plug-into-AUCTeX t)     (add-hook ’LaTeX-mode-hook ’turn-on-reftex)     ;; Satzende ". " statt ". ". " f¨ur M-k: l¨oschen bis Satzende usw.     (setq sentence-end "[.?!][]\"’)}]*\\($\\| \\| \\)[     ;;]*") ;; Da ist ein "Newline in der Zeile!"     (setq sentence-end-double-space nil)     ;;german spell correction     ;;(add-hook ’LaTeX-mode-hook ’flyspell-mode)     ;; Use only with Auctex > 11.81 with preview-latex:     (load "preview-latex.el" nil t t)     ;; aspell is better than ispell.     ;; Comment line if not installed     (setq-default ispell-program-name "aspell")     ;; German Spell Correction falls \usepackage{ngerman}     ;; oder german benutzt wird     (add-hook ’TeX-language-de-hook     (function (lambda () (ispell-change-dictionary "german8"))))      I am an Emacs beginner. I do not speak Lisp (but C ;-) ).how can I get Emacs and AUCTex up and running?


title: Vertical alignment of inline images

text: Images appearing inline aren't always ideally placed relative to the baseline and risers of the text itself, so I frequently find myself doing manual adjustment, by eye, using `\raisebox{}{}` with a negative first parameter. My question is whether there is a simple way to get a comparable effect without adjusting the parameter manually against the output in each case.


title: beamer cellcolor overlay

text: My question is, how to implement the following overlay for tables in beamer.   1. rows are shown one-by-one.   2. rows are shown in sync with an "itemize" in the same slide.   3. rows have different background colour. I used the answer from Cell coloring (highlighting) with in-out effects in a table in beamer to do this, but my first column always has a colour in all rows in all slides!! Here is a MWE:               \documentclass[xcolor=table]{beamer}          \rowcolors{1}{gray!30}{gray!10}          \makeatletter     \def\rowcolor{\noalign{\ifnum0=`}\fi\bmr@rowcolor}     \newcommand<>{\bmr@rowcolor}{%         \alt#1%             {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}%              {\ifnum0=`{\fi}\@gooble@rowcolor}%      }          \newcommand{\@gooble@rowcolor}[2][]{\@gooble@rowcolor@}     \newcommand{\@gooble@rowcolor@}[1][]{\@gooble@rowcolor@@}     \newcommand{\@gooble@rowcolor@@}[1][]{\ignorespaces}     \makeatother                    \makeatletter     \def\cellcolor{{\ifnum0=`}\fi\bmr@cellcolor}     \newcommand<>{\bmr@cellcolor}{%         \alt#1%             {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}%              {\ifnum0=`{\fi}\@gooble@cellcolor}%      }          \newcommand{\@gooble@cellcolor}[2][]{\@gooble@cellcolor@}     \newcommand{\@gooble@cellcolor@}[1][]{\@gooble@cellcolor@@}     \newcommand{\@gooble@cellcolor@@}[1][]{\ignorespaces}     \makeatother               \begin{document}     \begin{frame}{The MWE}%          \rowcolors{2}{blue!30}{blue!10}     \begin{itemize}     \item \visible<1->{Item1}     \item \visible<2->{Item2}     \item \visible<3->{Item3}     \end{itemize}     \begin{center}     \begin{tabular}{cc}         \visible<1->{Title1 & Title2} \\         \hline         \visible<1->{A1 & B1} \\         \visible<2->{A2 & B2} \\         \visible<3->{A3 & B3} \\     \end{tabular}     \end{center}     \end{frame}          \end{document}


title: How to number only labeled equations?

text: I'm writing all my equations with               \begin{equation} ... \end{equation}      so all of them are numbered but only some of them are labeled. I don't want all of them with numbers but only the labeled ones. Since I have a real big document I don't wanna do this manually using * for all the others. How can I do this automatically?


title: Beamer Berlin theme: Navigation does not appear

text: I tried to follow the example from Using the beamer style Berlin and have the following code:               \documentclass{beamer}     \usetheme{Berlin}          {     \usecolortheme{dolphin} % Beamer color theme     \setbeamercovered{highly dynamic}     }          \begin{document}     \section{A}     \subsection{AA}     \begin{frame}A\end{frame}          \subsection{AA}     \begin{frame}A\end{frame}          \section{B}     \subsection{BA}     \begin{frame}B\end{frame}     \subsection{BB}     \begin{frame}B\end{frame}     \subsection{BC}     \begin{frame}B\end{frame}     \begin{frame}B\end{frame}     \begin{frame}B\end{frame}               \section{C}     \subsection{CA}     \begin{frame}C\end{frame}     \subsection{CB}     \begin{frame}C\end{frame}               \end{document}      But unfortunately the navigation header does not appear in white nor are the headers marked the same way as in the above mentioned link. Is it a local problem or does it appear the same way at others? ![enter image description here](http://i.stack.imgur.com/D2Zj6.png)


title: References won't resolve even after repeated compilation

text: I have the following lines:               \begin{figure}[htbp]     \label{fig:sampleconfig}     \begin{center}     \begin{tikzpicture}[level distance=1.5cm, grow=down,         every node/.style={minimum size=1cm,circle,thin,draw},         edge from parent/.style={-latex, thin, draw}     ]     \node {$A$}         child {             node {$CO_{1}$}             child {node[rectangle,draw] {$CL_{1}$}}         }         child {             node[circle,dotted,draw] {$\cdots$}             child {node[rectangle,dotted,draw] {$\cdots$}}         }         child {             node {$CO_{n}$}             child {node[rectangle,draw] {$CL_{n}$}}         }     ;     \end{tikzpicture}     \caption{Sample configuration}     \end{center}     \end{figure}          In Figure ~\ref{fig:sampleconfig}, the node labelled $A$ is the root APPLICATION node.      No matter how many times I recompile the LaTeX file, I still get two question marks in place of "Figure 1," like so: "Figure ??." Am I doing something incorrectly? Thanks in advance for your help. EDIT In case it would help to solve the problem: I'm using MikTex 2.9 on Windows 7.


title: PSTricks not working in document but in minimal example

text: I'm trying to get pictures with pstricks working in my thesis. I tried to run some code from LatexDraw but when this didn't work I tried to get the minimal example from here to run: PSTricks picture not compiling with pdfLaTeX If I only put this code in a file an run `pdflatex --shell-escape test.tex` it works as expected. However if I copy it into my thesis it fails with this error message:                 -------------------------------------------------       auto-pst-pdf: Auxiliary LaTeX compilation       -------------------------------------------------       This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)       entering extended mode       This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)       ' TeX output 2013.10.10:1955' -> gliederung-autopp.ps       </usr/local/texlive/2012/texmf/dvips/base/tex.pro>       </usr/local/texlive/2012/texmf/dvips/config/alt-rule.pro>       </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pstricks.pro>       </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pst-algparser.pro>       </usr/local/texlive/2012/texmf-dist/dvips/pst-tools/pst-tools.pro>       </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pst-dots.pro>       </usr/local/texlive/2012/texmf/dvips/base/special.pro>. [1]       Error: /typecheck in --div--       Operand stack:          1   0   0.0   -0.0478856   a   65781.8       Execution stack:          %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   4   --nostringval--   %repeat_continue   --nostringval--       Dictionary stack:          --dict:1158/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:99/300(L)--       Current allocation mode is local       Last OS error: 2       Current file position is 84788       GPL Ghostscript 9.05: Unrecoverable error, exit code 1       PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.            !!! Warning: Empty Bounding Box is returned by Ghostscript!       !!!   Page 1: 0 0 0 0       !!! Either there is a problem with the page or with Ghostscript.       !!! Recovery is tried by embedding the page in its original size.      Anyone got some hints on what to do? I'm adding my preamble in case there should be something odd in it.               \documentclass[bigchapter,twoside,report,11pt,type=bsc,colorback,accentcolor=tud2c]{tudthesis}     \usepackage{ngerman}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{amsmath}          \usepackage{microtype}     \usepackage[ngerman,pdfview=FitH,pdfstartview=FitV]{hyperref}          %\usepackage{pgfplots}     %\pgfplotsset{compat=newest}          %\KOMAoptions{cleardoublepage=realempty}          \usepackage{bibgerm}     \usepackage{listings}     \usepackage{inconsolata}     %\usepackage[T1]{fontenc}     \lstset{framextopmargin=50pt,frame=bottomline}     \lstset{language=Matlab,        %keywords={break,case,catch,continue,else,elseif,end,for,function,           %global,if,otherwise,persistent,return,switch,try,while},        basicstyle=\ttfamily,        breaklines=true,        keywordstyle=\color{tud1c},        commentstyle=\color{tud9c},        stringstyle=\color{tud4c},        numbers=left,        numberstyle=\tiny\color{tud0c},        stepnumber=1,        numbersep=5pt,        backgroundcolor=\color{white},        tabsize=4,        showspaces=false,        showstringspaces=false}           \usepackage[pdf]{pstricks}


title: leave gap before and after \hrule

text: I'm using `\hrule` to draw a line that has the width of the text. Is there a safe way to leave a gap before and after the line? The plain code is:               blablabla     \hrule     blabla      And produces: ![enter image description here](http://i.stack.imgur.com/UlZXT.jpg) Coming closer to what I need is:               blablabla \\     \hrule     blabla      Which produces: ![enter image description here](http://i.stack.imgur.com/bFyO4.jpg) And, of course, I get error messages when I try:               blablabla \\     \hrule     \\ blabla


title: Aligning text inside tabular

text: I have a table with one column being dates, then other column something about the dates:               \documentclass[margin,line,pifont,palatino,courier]{res}     \usepackage{pifont}     \usepackage[latin1] { inputenc}     \usepackage{amsmath}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \begin{document}          ...          \begin{resume}     ...     \begin{tabular}{@{}p{1.2in}p{3.7in}}     01 / 10 - 28 / 1980 & On this day.\\     \vskip2pt\\     05 / 20 / 1982 & Text \\     \vskip2pt\\     12 / 13 - 31 / 2013&  Text \\     \end{tabular}          \end{resume}     \end{document}      How can I align the `/` in the first column? Edit: What I mean is that I have two columns. In the first column the forward slashes are not aligned under each other. I would like to have them aligned under each other.


title: Biblatex no .bib inserted and no .bbl file created - using TeXnicCenter

text: I tried to use `biblatex` for the first time, instead of BibTeX, which was fine, however LaTeX is obviously unable to insert the `.bib` file because the warning messages stay the same if I intentionally do not try to insert a `.bib`-file. Although I have been trying for several days, I could not find a solution to the problem.               \documentclass{scrartcl}      \usepackage[british]{babel}     \usepackage[babel]{csquotes}     \usepackage[backend=biber, style=apa]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{Bibliographie.bib}      @ARTICLE{Sample1998,       author = {Sample, Susan G},       title = {Military Buildups, War, and Realpolitik A Multivariate Model},       journal = {Journal of Conflict Resolution},       year = {1998},       volume = {42},       pages = {156--175},       publisher = {Sage Publications}     }     \end{filecontents}      \addbibresource{Bibliographie.bib}      %\bibliography{Bibliographie} % Did not help either     %\bibliography{C:/Users/<Musterpfad>/Bibliographie} % Did not help either          \begin{document}     Test \cite{Sample1998}          \printbibliography     \end{document}      The output looks like this "Test [ **Sample1998** ] " I got no error but several warning messages:               BibTeX> WARN - Warning: Found biblatex control file 2.5, expected version 2.3 % as well as     LaTeX Warning: Citation 'Sample1998' on page 1 undefined on input line 23.     LaTeX Warning: Empty bibliography on input line 25.        LaTeX Warning: There were undefined references.     Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                Test     (biblatex)                and rerun LaTeX afterwards.      Re-running LaTeX, even several times, did not change anything. Moreover the `.bbl` file is empty. I am using MiKTeX 2.9 32bit version (early on I have used the 64bit - there was no difference) and TeXnicCenter 2.02, 32bit. In the latter one I have changed the `"path to the BibTeX executable"` from `"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\bibtex.exe"` to `"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\biber.exe"` I have the feeling that I should change something within the TeXnicCenter settings, therefore I attached my output profile.![texniccenter output profile](http://i.stack.imgur.com/ZjZNg.png)


title: Long institute title in Madrid theme of beamer class

text: I use the `beamer` documentclass with the `Madrid` theme and the `beetle` color theme. My institute name is too long for the footer, so I'd love to use the long name on the title slide and a shortened version ("Universität Bonn") in the footer. Is there any way to do this?               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \title{Donald Knuth}     \author{...}     \institute{Rheinische Friedrich-Wilhelms-Universit\"{a}t Bonn}     \usetheme{Madrid}     \usecolortheme{beetle}          \begin{document}     \frame{\titlepage}          \frame{Blubb...}     \end{document}


title: List environment (itemize) with vertical line between label and content

text: Is it possible to have list environments (itemize, enumerate, ...) which have a vertical line between the label (i.e. the bullet/number) and the listing content? Probably this is best explained using an image, I want to achieve something like this: ![List](http://i.stack.imgur.com/B7xAs.png) **Edit:** Some more info on the intended behaviour: If a pagebreak occurs, the line should naturally continue on the new page.


title: Bibliography is not order by appearance

text: I have my document with my `.bib`. My problem is that I can't figure it out how can I do to have the numbers of the references ordered by appearance. For instance when I cite `\cite{website:Victhom}` it is the reference number 4 to be cited but instead it appears like [8] **EDIT** : One thing I have noticed is that this particular link appears in my bibliography in position nº8. Maybe that helps to find the reason **EDIT 2** : Is the same result if I include the `\bibliographystyle{unsrt}` line or not I include the bibliography like this:               \bibliographystyle{unsrt}     \bibliography{biblio}      And this is my .bib:               @article{r14,         Author = {example1},         Journal = {321},         Pages = {6421--6424},         Title = {"some title"},         %Volume = {35},         Year = {2010}}                    @book{x20,         Author = {example 2},         Publisher = {Wiley - IEEE Press},         Title = {title 2},         Year = 2004}               @book{Knuth84,         Author = {Donald E. Knuth},         Publisher = {Addison-Wesley},         Title = {The {\TeX}book},         Year = 1984}              @book{handbook,         Author = {David Linden and Thomas B. Reddy},         Publisher = {McGraw Hill},         Title = {Handbook of batteries 3d Ed.},         Year = 1986}            @inproceedings{R14,         Author = {authors},         Booktitle = {title},         Title = {"title"},         Year = {Aug. 31 2010 - Sept. 4 2010}}                @manual{doc:natbib,         Author = {Patrick W. Daly},         Month = feb,         Title = {Naural Sciences Citations and References},         Year = {2007}}          @manual{doc:QLSeries,         Author = {Quallion LLC},         Month = "",         Title = {QL-series medical grade rechargeable lithium-ion batteries datasheets},         Year = {}}          @misc{website:xfab,           author = "",           title = "",           month = "",           year = "",           url = "http://www.xfab.com"     }          @misc{website:Victhom,           author = "Victhom",           title = "some products",           month = "",           year = "",           url = "http://www.victhom.com"     }          @misc{website:Medtronic,           author = "Medtronic",           title = "title",           month = "",           year = "",           url = "http://www.medtronic.com/neuro/gastro/enterra/enterra.html"     }          @misc{website:EpilepsyFoundation,           author = "Epilepsy Foundation",           title = "Epilepsy Treatment",           month = "",           year = "",           url = "http://www.epilepsyfoundation.org/about/treatment/vns/"     }      How can I fix this?


title: Define a command (possibly recursively) to wrap text in a command n times

text: I'm trying to define a new command `\multiboxed` in LaTeX so that I can put _n_ boxes around an equation without having to manually nest `\boxed` commands. So far I have (using the `pgffor` package):               def\multiboxed#1#2{       \foreach \index in {1, ..., #1} {           Hello       }       #1       \foreach \index in {1, ..., #1} {         World       }     }      which successfully wraps the second argument with `Hello` and `World` a number of times equal to the first argument. However, changing this to               def\multiboxed#1#2{       \foreach \index in {1, ..., #1} {           \fbox{       }       #1       \foreach \index in {1, ..., #1} {         }       }     }      really doesn't work, as expected. As such, I have two questions which I only really need an answer to one of:   1. How do I successfully modify the for loops to achieve the desired behaviour?   2. Alternatively, how do I define a recursive command to achieve the same output? Obviously an answer to (2) would be better as this is a better way of solving the problem, but I have a feeling I'd better understand an answer to (1). Ideally I'd also not have to rely on the `pgffor` package. Thanks for any light you can shed on this matter.


title: booktabs with multicol: horizontal rules too short

text: I need to typeset a two-column document (conference paper) & use the `multicol` package. I wish to insert a table & usually use the `booktabs` package as it gives nice spacing. However, in this case, the horizontal rules are truncated. Would anybody know what the problem is? MWE:               \documentclass[pdftex,10pt]{article}     \usepackage[letterpaper,margin=2.5cm,pdftex,showframe]{geometry}     \usepackage{booktabs}     \usepackage{multicol}     \pagestyle{empty}     \begin{document}     \begin{multicols}{2}     \begin{table*}        \begin{tabular}{@{}ll rrrrr rrrrr@{}}        \toprule        \multicolumn{2}{@{}l}{Penalty} &\multicolumn{5}{c}{100 xx} &      \multicolumn{5}{c}{1000 xxx} \\        \cmidrule(rl){3-7}\cmidrule(rl){8-12}         & $s$ & $\nu$& G & E & P & D & G& E & P & D \\        \midrule        \multicolumn{12}{c}{\it abcd } \\        P40 &2&  10&  -62&  -23&   -6& -13.15&     22&   -5&    0&  -0.84\\        P41   &   1&   --&   55&   28&    1&  -4.94&  34&    7&    0&  -1.23\\       \bottomrule       \end{tabular}       \end{table*}       \end{multicols}       \end{document}      and here is what I get - the lines seem to be truncated before the right edge of column 1: ![screenshot of offending table](http://i.stack.imgur.com/exSro.jpg)


title: Middle line height point with TikZ

text: I want to do a command in LaTeX named `\facil` where:   1. I read the counter `ejercicio`, I add 1 to it and I display it with sans-serif font, and then write down a dot. I've previously created it in the preamble, and the code I've done:              {%     \sffamily\arabic{ejercicio}%     \addtocounter{ejercicio}{1}.%     }%        2. Then write a space with "\ " (without quotes) and draw a blue circle (or point) where is exactly in the middle of the line, with color `blue!25!black` and `minimum size=1ex`. That's what I don't know how to do it, I've tried with `baseline` option but I haven't done anything right.   3. Write a large space "\;" (the text "Representa en forma..." is not part of the command). An image of what I want to do: ![enter image description here](http://i.stack.imgur.com/L6JNH.png)


title: beautiful listing for CSharp

text: Does anyone have a nice typesetting style for the C# language using `listings`? I configure it in this way:               \lstset{language=[Sharp]C,,basicstyle=\footnotesize,       showspaces=false,showtabs=false,,breaklines=true,       showstringspaces=false,breakatwhitespace=true,       escapeinside={(*@}{@*)}}      But still it doesn't look fine, T_T. In my configuration I have characters that are too rounded and the code looks like if it was written using a typewriter. I don't want that. I want a modern, clear font, that looks more similar to the what I see in Visual Studio. **Final Election.** Thanks to all you guys, for give me ways to improve the appearance of the code. My final election is from the answer of @PauloCereda, little tuned with one of the comments and a bfseries touch for keywords. Here is the code and how it looks:               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[scaled]{beramono}          \usepackage{color}     \definecolor{bluekeywords}{rgb}{0.13,0.13,1}     \definecolor{greencomments}{rgb}{0,0.5,0}     \definecolor{redstrings}{rgb}{0.9,0,0}          \usepackage{listings}     \lstset{language=[Sharp]C,     showspaces=false,     showtabs=false,     breaklines=true,     showstringspaces=false,     breakatwhitespace=true,     escapeinside={(*@}{@*)},     commentstyle=\color{greencomments},     keywordstyle=\color{bluekeywords}\bfseries,     stringstyle=\color{redstrings},     basicstyle=\ttfamily     }          \begin{document}          \begin{lstlisting}     /**     * Prints Hello World.     **/     class Program     {       public static void Main()       {         System.Console.WriteLine("Hello World!");       }     }     \end{lstlisting}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Y70RQ.png)


title: Enumerate with multiple numbers (comma-separated) for a single item

text: I'd like to get a list that looks like this:               1. Text addressing #1.          2,3. Text addressing #2 and #3 together.          4. Text addressing #4.      The motivation is that the list items are referring to a previous list. Any idea on how to do this easily with enumerate? (Or some other way to do it that looks consistent with the enumerate environment, i.e. if I had an enumerate list right above it, the two would seem to be formatted identically except the 2,3 part..)


title: How to draw a diagonally-split grid with TikZ?

text: To draw the diagram ![enter image description here](http://i.stack.imgur.com/Ec899.png) I have written the following code:               \documentclass[11pt]{article}     \usepackage{amsmath,tikz}          \begin{document}     \begin{tikzpicture}      \draw (0,0)--(0,8)--(10,8)--(10,0)--(0,0);     \draw (0,7)--(10,7);     \draw (0,6)--(10,6);     \draw (0,5)--(10,5);     \draw (0,4)--(10,4);     \draw (0,3)--(10,3);     \draw (0,2)--(10,2);     \draw (0,1)--(10,1);     \draw (1,0)--(1,8);     \draw (2,0)--(2,8);     \draw (3,0)--(3,8);     \draw (4,0)--(4,8);     \draw (5,0)--(5,8);;     \draw (6,0)--(6,8);     \draw (7,0)--(7,8);     \draw (8,0)--(8,8);     \draw (9,0)--(9,8);     \draw (0,-1)--(10,9);     \end{tikzpicture}          \end{document}      but this produces ![enter image description here](http://i.stack.imgur.com/t0bba.png) How can I draw the actual picture using TikZ?


title: Combining mark over ligature (Devanagari)

text: I want to typeset the combination m̐llo in Devanagari with XeLaTeX. When I use the correct Unicode ल्ँलो, there is no ligature of the ls. When I place the candrabindu on the ligature the o is not connected with theligature: ल्लँो. How can I get XeLaTeX to place the candrabindu on the ligature and get still the o in the correct position?               \documentclass{article}          \usepackage{fontspec}     \usepackage{polyglossia}          \setmainlanguage{sanskrit}     \setmainfont{Siddhanta}          \begin{document}     ल्ँलो          ल्लँो     \end{document}      Here is an example from a textbook, how it should look like: ![enter image description here](http://i.stack.imgur.com/7fSOL.png)


title: tikzpicture of several springs

text: I'm trying to reproduce in like the following picture: ![](http://i.stack.imgur.com/usxoP.png) Actually I would like to slightly modifies it as I would like all the spring to be connected to a common wall at the top. I have begin it with the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{patterns,snakes}     \begin{document}     \begin{tikzpicture}{every node/.style={draw,outer sep=0pt,thick}}     \node (ground) [fill,gray, pattern=north east lines,minimum width=5cm,%     minimum height=.3cm,anchor=north,draw=none] {};     \node (M1) [draw,minimum width=0.1cm,minimum height=0.1cm] at (-2,-2) {m};     \draw [ snake=coil, segment amplitude=5pt, segment length=5pt] (ground.south) -- (M1);     \node (M2) [draw,minimum width=0.1cm,minimum height=0.1cm] at (-1.5,-2.5) {m};     \draw [ snake=coil, segment amplitude=5pt, segment length=5pt] (ground.south) -- (M2);     \end{tikzpicture}     \end{document}      The first problem I've encountered is that the ground pattern is filled and do not exhibit the pattern with oblique lines. The second problem I do not know how to position correctly the different masses. By the wave the distances and elongation of the masses follows a sinusoidal shape so I think there should be a way to place them automatically.


title: Fix math mode kerning of "C"

text: I am trying to set a sequence of atom packing symbols. I want to use math mode italics for this, as I think that their width fits this purpose. The problem is that the _C_ has a bad kerning for this. There is a too large space after it. How could I fix this? I have tried to use the `microtype` package, but it seems to have no effect. What am I doing wrong? Do I have to specify the font in a more detailed manner?               \documentclass[pdftex,a4paper]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage[kerning=allmath]{microtype}     \LoadMicrotypeFile{lmr}          \SetExtraKerning       {encoding = *, shape = *}       {C = {,-300}}          \begin{document}          $ABCBCBACAC$          \end{document}


title: Cover Letter Template

text: I am trying to use Matthew J. Miller's cover letter template - The PDF looks like this; however when I typeset the template at the first instance, I see that the date is misplaced and I am not able to figure out the solution.


title: srcbook doesn't seem to work with synctex

text: I have bigger TeX document and I'm using srcbook with the following customisations:                \documentclass[a4paper,final,11pt,twoside,openany,headsepline,numbers=noenddot,bibliography=totocnumbered,toc=listof]{scrbook}      I compile activating the generation of synctex:               main.pdf:  main.tex             pdflatex -synctex=1 -file-line-error -interaction nonstopmode main      However I'm not able to do forward and backward search neither in Linux nor in a Mac. This is quite puzzling, since it doesn't happen with other styles (article, etc. )


title: Replacement for CJK's \Unicode macro

text: I need a replacement for the `\Unicode` macro from CJK. It takes two decimal numbers as arguments and inserts `#1*256 + #2` into the token stream (or something like that; it's a way to write Unicode characters by code like `A` in XML). That should be possible with a tiny bit of lua code. Any pointers?


title: tikz/pgfplots advanced z-order axis/grid

text: Is it possible to have both the `axis on top` and the grid on the very bottom (or somewhere in between some other planes/lines/...) of a plot? Example figure with `axis on top=true` but the grid on top is ugly: ![](http://i.imgur.com/dcRGkDo.png) Example figure with `axis on top=false` and the grid looks nice behind the yellow plane, but axes and arrows look bad behind the drawing. ![](http://i.imgur.com/m8QrNtB.png) Here is a tiny code example               \documentclass{article} \usepackage{pgfplots}      \begin{document} \begin{tikzpicture}         \begin{axis}[grid=major,axis x line=bottom,axis y line=left] %axis on top         \addplot+[mark=none,fill=yellow,draw=red] {0.1*x^2} \closedcycle;         \end{axis}     \end{tikzpicture} \end{document}       Can anyone put the axis to the top without having the grid on top?


title: On inverting navigation bar and footer contents

text: I'm using the `Frankfurt` theme in `beamer`. It includes a sort of navigation bar with (sub-)section titles and a circle per slide in each (sub-)section. I'd like to move such a bar to the bottom of the page and displaying the footer at the header place. Do you know what should I do? Edit: 1) How can I avoid to display that footer in the title slide? 2) How can I display the title of the presentation and the name of the author, say as in ` Berlin` theme? I tried to use the suggested preamble using `Berlin` but it does not work.


title: Macros for formatting & breaking classnames, file paths etc?

text: I would like to format classes, file paths, directory paths, method names and so on in my document. At the very basic each of those should be formatted as \texttt. However, the rules for when LaTeX can line break them are different. For example:   * Classes: break at '.'. For example "java.util.String" could be broken 2 places   * File & directory paths: break at '/'. For example "C:\a\b\c" could be broken 3 places   * Method names: break at spaces. For example "public getText()" could be broken 1 place How would I go about doing this? The defs below is a starting point, but it doesn't provide any breaking behavior since LaTeX doesn't break \texttt by default.               \newcommand{\class}[1]{\texttt{#1}}     \newcommand{\method}[1]{\texttt{#1}}     ..


title: XeTeX font problem (font-not-found) on Mac OS X 10.8

text: I installed Gotham font by copying otf files to /Library/Fonts/Gotham. Although Font Book cannot show the installed Gotham font properly (characters are borken), but Font Validation was fine, and it was usable in MS Word. However, if I try to use it with XeTeX as below               \documentclass{article}     \usepackage{xltxtra}     \usepackage{fontspec}     \setmainfont[ExternalLocation,Ligatures=TeX]{Gotham-Book}     \begin{document}     All human beings are born free and equal in dignity and rights.     \end{document}      I got "font-not-found" saying               Latex Error: ./xetex_test.tex:4 Font EU1/Gotham-Book(0)/m/n/10=[Gotham-Book]/ICU:mapping=tex-text; at 10.0pt not loadable: Metric (TFM) file or installed font not found.      But if I check it with fc-list, I got               $ fc-list | grep "Gotham"     /Library/Fonts/Gotham/Gotham-MediumItalic.otf: Gotham,Gotham Medium:style=Medium Italic,Italic     /Library/Fonts/Gotham/Gotham-BookItalic.otf: Gotham,Gotham Book:style=Book Italic,Italic     /Library/Fonts/Gotham/Gotham-Light.otf: Gotham,Gotham Light:style=Light,Regular     /Library/Fonts/Gotham/Gotham-Bold.otf: Gotham,Gotham Bold:style=Bold,Regular     /Library/Fonts/Gotham/Gotham-Book.otf: Gotham,Gotham Book:style=Book,Regular     /Library/Fonts/Gotham/Gotham-Medium.otf: Gotham,Gotham Medium:style=Medium,Regular     /Library/Fonts/Gotham/Gotham-LightItalic.otf: Gotham,Gotham Light:style=Light Italic,Italic     /Library/Fonts/Gotham/Gotham-BoldItalic.otf: Gotham,Gotham Bold:style=Bold Italic,Italic      , so it seems Gotham fonts are usable. I'm not sure why I got the font problem since the same installation process worked fine on Mac OS X 10.6. I'd appreciate any advice to resolve the problem. * * * update1: I got the following error message when I run "xelatex"               ) (/opt/local/share/texmf-texlive-dist/tex/latex/metalogo/metalogo.sty))kpathsea: Invalid fontname `[Gotham-Book]/ICU', contains '['      I guess the problem has something to do with having the extra brackets in the fontname (no idea how the brackets are inserted to the fontname). Should I take a look at fonts.conf? * * * update2: I tried without "ExternalLocation" and it worked fine. Thank you all for the help!


title: Table referencing same footnote more than once

text: I am using packages `\usepackage{scrextend}` and `\usepackage{hyperref}` as described in this forum to reference the same footnote inside a table more than once. Multiple references to the same footnote inside a table environment when i run it on a windows 7 it works perfectly fine. BUT I am always getting this error when i run the my tex file on a MAC.               ! LaTeX Error: Command \l@addto@macro already defined.      Any suggestions why and how to overcome it?


title: problem packages diagbox and cancel

text: When using cancel package to cross out something and the package diagbox is also loaded the line does not appear in the proper location. When diagbox is not loaded everything works ok. However, I need to load that package to use it with some cells in tables. See the following MWE:               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}     \usepackage{diagbox}      \usepackage{cancel}     \begin{document}     Some text $\frac{ \cancel{2} \cdot \cancel{ \left( q_{1}+2 \right) } }{p_1}$     \end{document}


title: Does there exist a math version of `multido` command?

text: I need a command as `\hdotsfor` and use it in `align` environment.               \begin{align*}     X&=a_{11} + a_{12} + \cdots + a_{1n}\\     &\qquad{}+ a_{21} + a_{22} + \cdots + a_{2n}\\     &\text{\multido{}{33}{$\cdot$}}\\     &\qquad{}+ a_{m1} + a_{m2} + \cdots + a_{mn}     \end{align*}      The spacing between dot is not correct. While               \begin{align*}     X&=a_{11} + a_{12} + \cdots + a_{1n}\\     &\qquad{}+ a_{21} + a_{22} + \cdots + a_{2n}\\     &\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\cdot\\     &\qquad{}+ a_{m1} + a_{m2} + \cdots + a_{mn}     \end{align*}      is correct. So I think may be the math environment take a bad effect.


title: Writing Some Special Matrices in LaTeX

text: I've to write the following matrices in LaTex. ![Matrices](http://i.stack.imgur.com/6TIHc.jpg) Any help in this regard will be highly appreciated.


title: What does this argument to the \symbol command mean

text: I was looking at this page here and came across this line which I don't understand.               \symbol{"E052}      Can you explain to me what the significance of `E052` is, and how I could modify this command to give me different symbols. Thanks


title: Customize displayed time zone with svn-multi and \svnfiledate

text: When using the `svn-multi` package together with `\svnfiledate` it returns > 2011-10-05 22:18:31 +0200 (Wed, 05 Oct 2011); Is there some way of customization to get the following only: > 2011-10-05 22:18:31 _Time zone_ ;


title: Arrow-shaped text boxes (for use in ipe vector graphics editor)?

text: ## Ipe vector graphics editor I am currently evaluating the `ipe` vector graphics editor. A very attractive feature is that one can use LaTeX-commands inside its text objects as long as these are legal inside a `\makebox` (for labels) or inside a minipage (for minipages). However, one cannot use commands that involve a non-linear translation into PDF, such as commands to generate hyperlinks or to include external images. Nonetheless, LaTeX-commands that are defined in additional LaTeX packages can be included with a `\usepackage` command in the LaTeX preamble, which can be set in `Document properties` under the `Edit` menu. ## Question What I am looking for is a way to enclose text inside a left or right arrow- shaped box with LaTeX-commands in `ipe`? A simple LaTeX package that would create text boxes much like `rarrow` and `larrow` of the `BoxStyle` class in `matplotlib` (see below specimen) would do just fine. Other techniques are welcome too. LibreOffice Impress and PowerPoint also offer such arrow shapes with text, even curved ones. ## Attempts   1. Drawing an `\fbox` around a text object in `ipe` works flawlessly. Even a rotated `\ovalbox` with math constitutes no problem with `\usepackage{rotating, fancybox}` in the preamble. There are no arrows in `fancybox`, though.   2. I looked for a LaTeX package providing arrow-shaped boxes among the packages listed among "boxing" on CTAN. Perhaps I am looking over it, but no such package appears to be listed.   3. Everybody here seems to use TikZ arrows, so I tried this example and this example inside `ipe`. The result of these failed TikZ experiments is shown in the bottom image. It fails because of the `ipe` LaTeX text object limitations mentioned earlier. ## matplotlib Boxstyle specimen ![matplotlib Boxstyle specimen](http://i.stack.imgur.com/J3tEJ.png) ## Rotated ovalbox in ipe ![rotated ovalbox in ipe](http://i.stack.imgur.com/geRsP.png) ## TikZ arrows do not work in ipe ![TikZ arrows do not work in ipe](http://i.stack.imgur.com/gTFeT.png)


title: Latex-Beamer: overprint-environment wobbles

text: I am new to the beamerclass and I am currently trying to write a presentation containing lots of derivations. On one point I want to overlay a derivation by its conclusion and I use the overprint-environment. The problem is that the environment shifts the whole derivation downwards so that the last line is only partially visible. How can I avoid this? There is a workaround by making a second frame, copying the whole content and replacing the derivation with the conclusion, but I do not consider that "elegant" and it would falsify the frame counter. I would appreciate any help. A minimal example is attached:               \documentclass[xcolor=dvipsnames]{beamer}     \mode<presentation>     \usetheme{Boadilla}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsfonts,amsmath,amssymb,amsthm}          \DeclareMathOperator{\Var}{Var}     \DeclareMathOperator{\E}{\mathbb E}           \title{Dummy-Titel}     \subtitle{Dummy-Untertitel}     \author{Autor}          \date{\today}               \begin{document}          \begin{frame}{Erwartungswert}         \begin{itemize}             \item $\E(X_{t+1} | X_t = i) = \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i)$             \item $X_{t+1}$ binomialverteilt mit Parametern $n=2N$ und $p=\frac{i}{2N}$:             $\Rightarrow \E(X_{t+1} | X_t=i) = n \cdot p = i$             \item Martingal-Eigenschaft: $\E(X_{t+1} | X_t) = X_t$         \end{itemize}             \begin{overprint}                 \onslide<1>                 \begin{align*}                     \E(X_t) &= \E(\E(X_{t+1} | X_t)) = \sum_{i=0}^{2N} E(X_{t+1} | X_t = i) \cdot P(X_t = i) \\                     &= \sum_{i=0}^{2N} \left( \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i) \right) \cdot P(X_t = i) \\                     &= \sum_{j=0}^{2N} j \cdot \left( \sum_{i=0}^{2N} \cdot P(X_{t+1}=j , X_t = i) \right) \\                     &= \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j) = \E(X_{t+1})                 \end{align*}                 \onslide<2>                 \begin{equation*}                     \Rightarrow \E(X_0) = \E(X_1) = \E(X_2) = \ldots                 \end{equation*}             \end{overprint}     \end{frame}     \end{document}


title: How to mod a counter's value?

text: I think Custom calendar using TikZ is useful!


title: Increase indentation of a paragraph

text: I am using the `moderncv` package for making my resume however I am new to LaTeX, so please forgive me if this has been repeated (I did search) or is too stupid! How do I increase the indent of a paragraph such that the _entire_ paragraph is indented and not the first line only. In other words, try pasting a paragraph in `OpenOffice` and then choose `Increase indent`. Notice how the entire paragraph is indented. I want this: > Heading > >> a leo. Pellentesque sapien dui, facilisis et sollicitudin et, ullamcorper vel massa. Pellentesque vulputate placerat sapien, et volutpat odio elementum eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per Where: `Heading` is a `section` and `a leo` is `cvitem`. EDIT: As asked: `\section{Foo} \cvitem{}{Para-Foo}` Now I want `Para-Foo` to be indented as the way I have described...


title: Telugu font characters not correctly produced from xelatex

text: Anyone have this issue. This is the following code.                   \documentclass{article}         \usepackage{fontspec}         \setmainfont{Gautami}         \usepackage{polyglossia}         \setmainlanguage{telugu}         \begin{document}         చేయి అనగా మానవులు, చింపాంజీలు, కోతులు మరియు లెమూర్లకు గల శరీరభాగమునకు వేళ్లు         కలబాహ్యంగము. కోలా చేతికి ఎదురెదురుగా వున్న రెండు బొటనవ్రేళ్లు వుంటాయి కాబట్టి దాని శరీరభాగాన్ని         కూడా చేయి లేక 'పా'లు అంటారు.         \end{document}      This is the output I got. ![enter image description here](http://i.stack.imgur.com/64Saz.png) But Actual ouput should be ![enter image description here](http://i.stack.imgur.com/idrYK.png)


title: MiKTeX 2.9, latest package update broke biblatex bibliography

text: I have strange problem with bibliography after the latest MiKTeX 2.9 base packages update. In the document I use `biblatex` package with `backend` option either `bibtex8` or `biber`. Before, bibliography was printed in the end and had its own chapter with title **Bibliography** , and with an entry in TOC, etc. Now, bibliography is printed, but without chapter title - it is simply blank. TOC entry is missing as well. Citations are also broken. Before, if my bib file entry had an article with 2 authors, and when I cited it, it was printed as Albert and Chib (1993), for example. Now, **and** is missing, and it simply prints Albert (space) Chib (1993). Note, that **(space)** is not printed, I put it there because StackExchange formats the message. What is going on here?   How can I fix such things? You can reproduce the issue by installing MikTeX 2.9, update packages through maintenance, and then produce any PDF with bibliography. I tested it in 2 workstations - the result is the same. In one workstation I had outdated MikTeX without latest updates, and when I typeset a document it was fine. Then, I installed updates and typeset again, and it became "broken". MWE:               \documentclass[a4paper,12pt,oneside,titlepage]{report}     \usepackage[natbib = false,                 backend = bibtex8,                 style = authoryear,                  maxcitenames = 2,                 mincitenames = 1,                 maxbibnames = 100                 ]{biblatex}     \addbibresource{SomeBib.bib}          \begin{document}         \title{Some title}         \author{Oleksandr Dyklevych}         \date{\today} %\May 7, 2012         \maketitle              \tableofcontents              \chapter{Introduction} \label{ch:Intro}             Bla~\cite{Albert1993}.              \printbibliography          \end{document}      SomeBib.bib file content:               @Article{Albert1993,         title = "Bayesian Analysis of Binary and Polychotomous Response Data",         author = "Albert, James H. and Chib, Siddhartha",         journal = "Journal of the American Statistical Association",         volume = "88",         number = "422",         date = "1993-07",         pages = "669--679",         url = "http://www.jstor.org/stable/2290350",     }      Added: The full list of the updated packages during the last update: `xetex- def`, `tools`, `ltxbase`, `miktex-misc`, `graphics`, `bidi`. So, one of them must be causing the problem.


title: Arrow tips in TiKZ appearing where I do not specify them

text: In a simple drawing like this (I use `automata` library):               \begin{tikzpicture}[shorten >=1pt,node       distance=2cm,auto,initial text=]       \tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]       \node[state] (a) {};       \node[coordinate] (b) [right of=a] {};       \node[state] (c) [right of=b] {};       \draw[-] (a) edge node {a} (b);       \draw[->] (b) edge (c);     \end{tikzpicture}      I get a tip in node `b` even though I do not specify it there. I create an additional node (here: `b`) to have a segmented line, and I don't want any tips there. How can I get rid of that tip? Interestingly, if I put a star at the end of `-` as an option for `\draw`, I get both a filled circle and an arrow tip at `b`, but if I keep `-` option, and prepend a star to `->`, I get two filled circles at `b`. I don't know how to mark a comment as a good answer, but the right (and the simplest) answer was among comments. I replaced `\draw[-] (a) edge` with `\path (a) edge[-]` and `draw[->] (b) edge` with `\path (b) edge[->]`. I also had to remove the global option `shorten >=1pt` which gave me still small gaps in lines. What I wanted to achieve was several lines going horizontally, and then converging at various angles (with an arrow tip at the end) at a single state. Thanks for all the comments and answers.


title: Where can I get siamltex document class from in Debian Linux?

text: I just got a latex document with siamltex document class from my collaborator. Is this document class packaged in Debian Linux?


title: Exclude glossary items from being printed in the glossary

text: > **Possible Duplicate:**   >  Do not display one special acronym in list of acronyms With `glossaries`, is there a way to exclude certain glossary items (acronyms/symbols/glossary terms) from being printed in the glossary? The opposite behavior (putting items into the glossary, which have not been used in the document body) is possible by using `\glsadd`. But is there a command doing the reverse?


title: Open dyslexic font

text: Is it straight forward to use the OpenDyslexic font in a latex document? What steps would be required?


title: Why is the ifthen package obsolete?

text: In the LaTeX companion, the authors recommend to use the package `ifthen` for complex conditional. But in his answer to LaTeX conditional expression Will Robertson doesn't mention it, and in the comments, Philipp says that the package is obsolete. The question is in which way `ifthen` is obsolete and what are the risk to use it in a document.


title: How to use LaTeX on blogspot?

text: I'm trying to use LaTeX on my blog, but I could not figure out how. Has anyone done it before? Any feedback or related information would be greatly appreciated.


title: Molecular orbital diagrams in LaTeX?

text: > **This question led to a new package:**   >  `modiagram` I'm wondering if anyone has seen a package for drawing (qualitative) molecular orbital splitting diagrams in LaTeX? Or if there exist any packages that can be easily re-purposed to this task? Otherwise, I think I'll have a go at it in TikZ. ## Example (Cropped from a graphic on Wikipedia by 'orci' - I suspect it was drawn manually due to the slight misalignment of various elements) ![An example MO splitting diagram cropped from a graphic on wikipedia by 'orci'](http://i.stack.imgur.com/KN0yh.png) ## Having a go at it in TikZ I decided to try doing this in TikZ and have prepared a MO diagram for dioxygen ( _prior attempt at much simpler dihydrogen below_ ) - this is the kind of scheme I'm going for. ![elaborated MO diagram of oxygen S=1 state](http://i.stack.imgur.com/J1c75.png) There are at least three problems with this approach:   * It's not very general and I don't know any strategies to make it arbitrarily extensible (e.g. stacking energy levels etc like in the example diagram.) **Partially addressed**   * The H, H_{2} labels are not aligned at the baseline of each H, so the H_{2} is slightly higher than the other two. **Solved, thanks @Matthew Leingang**   * The coordinates, whilst text-proportionate, are all hard coded and I would like to know how to make this diagram scalable in terms of a total width, total height and separation of the split levels. **Addressed using (probably too many) variables and in-coordinate calculation** Please help me improve this probably pretty naive approach. ## Specification ![annotated MO diagram](http://i.stack.imgur.com/k97kn.png) MO diagrams can be drawn in a variety of different ways. In the simplest case, such as for either O2 or H2 here, the left column represents the orbitals of one atom as horizontal lines, arranged vertically in order of their relative energies. The right column does the same for the other atom. In this case the example picture represents orbitals as boxes for clarity as several orbitals can have the same energy, which is what occurs in the case of the 3x 2p orbitals and the pi_x, pi_y orbitals. In this situation they are shown side by side. Orbitals may have zero, one or two (antiparallel) electrons. It is fairly common to simply see orbitals represented as horizontal lines rather than boxes. Lines connect the orbitals to indicate the contribution of the atomic orbitals to a molecular orbital. The center column shows the molecular orbitals generated from the combination of the atomic orbitals, which can either be additive (in which case the relative energy drops, giving a bonding orbital) or subtractive (in which case the relative energy increases with respect to the atomic orbitals, i.e. an antibonding orbital). As this diagram is qualitative only, the splitting can be treated as symmetric. ## Source               \documentclass{article}     \usepackage{tikz}     \usepackage{textcomp}     \usepackage[version=3]{mhchem}          \newcommand{\moup}{\textuparrow}     \newcommand{\modown}{\textdownarrow}     \newcommand{\moupdown}{\textuparrow\textdownarrow}          \begin{document}          \begin{tikzpicture}[scale=1]          \def\sbaseline{0em};     \def\pbaseline{14em};     \def\ssplit{6em};     \def\psplit{12em};     \def\pextend{5em};     \def\psso{4em};     \def\pxyoffset{1em};     \def\mwidth{3em};     \def\hsep{2em};          \tikzstyle{split} = [densely dashed,draw=gray]     \tikzstyle{orbital} = [rectangle, rounded corners, fill=white, draw=black, minimum width=3.5ex, minimum height=3.5ex]     \tikzstyle{label}   = [rectangle, minimum width=3.5ex, node distance=3.5ex]          %1s splitting     \draw        (\mwidth/-2-\hsep*2,\sbaseline)            -- (\mwidth/-2-\hsep  ,\sbaseline);     \draw[split] (\mwidth/-2-\hsep  ,\sbaseline)            -- (\mwidth/-2        ,\sbaseline+\ssplit/2);     \draw        (\mwidth/-2        ,\sbaseline+\ssplit/2)  -- (\mwidth/2         ,\sbaseline+\ssplit/2);     \draw[split] (\mwidth/2         ,\sbaseline+\ssplit/2)  -- (\mwidth/2+\hsep   ,\sbaseline);     \draw        (\mwidth/2+\hsep   ,\sbaseline)            -- (\mwidth/+2+\hsep*2,\sbaseline);     \draw[split] (\mwidth/-2-\hsep  ,\sbaseline)            -- (\mwidth/-2        ,\sbaseline+\ssplit/-2);     \draw        (\mwidth/-2        ,\sbaseline+\ssplit/-2) -- (\mwidth/2         ,\sbaseline+\ssplit/-2);     \draw[split] (\mwidth/2         ,\sbaseline+\ssplit/-2) -- (\mwidth/2+\hsep   ,\sbaseline);          %left 1s     \draw[] (-\mwidth-\hsep,0em) node[orbital] (l1s) {\moupdown};     \node[label, below of=l1s] (l1sl) {$2s$};          %right 1s     \draw[] (\mwidth+\hsep,0em) node[orbital] (r1s) {\moupdown};     \node[label, below of=r1s] (r1sl) {$2s$};          %sigma bonding     \draw[] (0em,\ssplit/-2) node[orbital] (sb) {\moupdown};     \node[label, below of=sb]  (sbl) {$\sigma$};     \node[label, left of=sb, node distance = 9ex] {\tiny{\color{gray}{$\Psi_{a}+\Psi_{b}$}}};          %sigma antibonding     \draw[] (0em,\ssplit/2) node[orbital] (sa) {\moupdown};     \node[label, below of=sa] (sal) {$\sigma^{*}$};     \node[label, left of=sa, node distance = 9ex] {\tiny{\color{gray}{$\Psi_{a}-\Psi_{b}$}}};          %orbital labels     \node[label, below of=l1sl, node distance=6em]   (a)    {\smash[b]{\ce{O_{a}}}};     \node[label, right of=a   , node distance=\mwidth+\hsep]   (ab)   {\smash[b]{\ce{{O2}}}};     \node[label, right of=a   , node distance=\mwidth*2+\hsep*2]  (b)    {\smash[b]{\ce{O_{b}}}};          %Title     \node[label, below of=ab  , node distance=3em]   (desc) {Dioxygen ($|S|=1$)};          %2p splitting     \draw        (\mwidth/-2-\hsep*2-\pextend,\pbaseline)            -- (\mwidth/-2-\hsep  ,\pbaseline);     \draw[split] (\mwidth/-2-\hsep  ,\pbaseline)            -- (\mwidth/-2        ,\pbaseline+\psplit/2);     \draw        (\mwidth/-2        ,\pbaseline+\psplit/2)  -- (\mwidth/2         ,\pbaseline+\psplit/2);     \draw[split] (\mwidth/2         ,\pbaseline+\psplit/2)  -- (\mwidth/2+\hsep   ,\pbaseline);     \draw        (\mwidth/2+\hsep   ,\pbaseline)            -- (\mwidth/+2+\hsep*2+\pextend,\pbaseline);     \draw[split] (\mwidth/-2-\hsep  ,\pbaseline)            -- (\mwidth/-2        ,\pbaseline+\psplit/-2);     \draw        (\mwidth/-2        ,\pbaseline+\psplit/-2) -- (\mwidth/2         ,\pbaseline+\psplit/-2);     \draw[split] (\mwidth/2         ,\pbaseline+\psplit/-2) -- (\mwidth/2+\hsep   ,\pbaseline);          \draw[split] (\mwidth/-2-\hsep  ,\pbaseline)            -- (\mwidth/-2        ,\pbaseline-\psso+\psplit/2);     \draw        (\mwidth/-2        ,\pbaseline-\psso+\psplit/2)  -- (\mwidth/2         ,\pbaseline-\psso+\psplit/2);     \draw[split] (\mwidth/2         ,\pbaseline-\psso+\psplit/2)  -- (\mwidth/2+\hsep   ,\pbaseline);     \draw[split] (\mwidth/-2-\hsep  ,\pbaseline)            -- (\mwidth/-2        ,\pbaseline+\psso+\psplit/-2);     \draw        (\mwidth/-2        ,\pbaseline+\psso+\psplit/-2) -- (\mwidth/2         ,\pbaseline+\psso+\psplit/-2);     \draw[split] (\mwidth/2         ,\pbaseline+\psso+\psplit/-2) -- (\mwidth/2+\hsep   ,\pbaseline);          %left 2p     \draw[] (-\mwidth-\hsep,\pbaseline) node[orbital] (l2pa) {\moupdown};     \node[orbital, left of=l2pa] (l2pb) {\moup};     \node[orbital, left of=l2pb] (l2pc) {\moup};          \node[label, below of=l2pb] (l2pl) {$2p$};          %right 2p          \draw[] (\mwidth+\hsep,\pbaseline) node[orbital] (r2pa) {\moupdown};     \node[orbital, right of=r2pa] (r2pb) {\moup};     \node[orbital, right of=r2pb] (r2pc) {\moup};          \node[label, below of=r2pb] (r2pl) {$2p$};          %sigmap bonding     \draw[] (0em,\pbaseline+\psplit/-2) node[orbital] (spb) {\moupdown};     \node[label, below of=spb]  (spbl) {$\sigma$};          %sigmap antibonding     \draw[] (0em,\pbaseline+\psplit/2) node[orbital] (spab) {};     \node[label, below of=spab]  (spabl) {$\sigma^{*}$};          %pi antibonding levels     \draw[] (-\pxyoffset,\pbaseline+\psso-\psplit/2) node[orbital] (ppabx) {\moupdown};     \node[label, below of=ppabx]  (ppabxl) {$\pi_{x}$};     \draw[] (+\pxyoffset,\pbaseline+\psso-\psplit/2) node[orbital] (ppaby) {\moupdown};     \node[label, below of=ppaby]  (ppabyl) {$\pi_{y}$};          %pi antibonding levels     \draw[] (-\pxyoffset,\pbaseline-\psso+\psplit/2) node[orbital] (ppbx) {\moup};     \node[label, below of=ppbx]  (ppbxl) {$\pi^{*}_{x}$};     \draw[] (+\pxyoffset,\pbaseline-\psso+\psplit/2) node[orbital] (ppby) {\moup};     \node[label, below of=ppby]  (ppbyl) {$\pi^{*}_{y}$};          \end{tikzpicture}          \end{document}


title: Draw user defined print margin

text: How can one draw a box on each page (KOMA class srcreprt) to show a user defined print margin. E.g. the box should be 25 mm from each page margin (which might be different from the actual layout setting which can be shown with \usepackage{showframe})               \documentclass{scrreprt}     \usepackage{blindtext}     \usepackage{showframe}          \begin{document}          \Blinddocument          \end{document}


title: Export LaTeX to HTML for simple documentaiton

text: how is the best option or program to export `LaTeX` to `HTML` and upload to the web? I tried `LaTeXtoHTML` but I am not convinced. Now I am using `TeXmaker` for my documentation.


title: How can I get pdflatex to make tooltips attached to text, like HTML's abbr tag?

text: I'm writing my CV and I'd like something that works like HTML's abbr tag in my document. I know there are packages like pdfcomment and cooltooltips, but those really only work with Acrobat Reader -- it's likely that some of my intended readers won't be using Acrobat, so I need a solution that should work in any reasonable PDF viewer. I only need short bits of text, and I've noticed that hyperlinks seem to have a tooltip with the URL that hovers below the text -- this is pretty much what I want, and it seems to work in readers like Evince and xpdf, so I'm guessing this is a good route. I'd like a special link border color or decoration, so the reader can figure out that this is not a hyperlink that one can click and open in a browser. Is it possible to use `\href` to do this? Or is there a package that will do this using some other method?


title: How To Change Math Font Only?

text: I'd like to keep my text in Helvetica as usual but would like to have my equations and formulas in Roman or MT Extra. So far, I've tried using different packages but that changes both the text and the math. I'm writing my document using LaTeX.


title: Drawing of a helix

text: On this blog I found a 3D drawing of a transformer by Thomas Söll. After a few changes, I have the following code:               \documentclass{article}          \usepackage{pst-solides3d}     \usepackage{expl3}          % Parameters.     \def\radius{1.11}     \def\windingsOne{32}     \def\windingsTwo{64}          % Activating floating point calculation.     \ExplSyntaxOn       \cs_new_eq:NN         \calc       \fp_eval:n     \ExplSyntaxOff          % Constants.     \def\factor{\calc{5*\windingsTwo}}     \def\lengthA{\calc{2*pi*\windingsOne/\factor}}     \def\lengthB{\calc{2/5*pi}}     \def\vertDist{\calc{3/4*pi}}     \def\thickness{\calc{16/(25*\windingsTwo)}}     % Global setup.     \psset{%       viewpoint=20 5 15 rtp2xyz,       lightsrc=20 60 60 rtp2xyz,       Decran=30     }     \psset{%       solidmemory,       algebraic     }     % Objects with predefined options.     \newpsobject{core}{psSolid}{%       object=parallelepiped,       incolor=red,       fillcolor=cyan!50,       grid=false     }     \newpsobject{wire}{psSolid}{       object=courbe,       r=\thickness,       linewidth=0.5pt,       linecolor=red!60,       incolor=red!60,       fillcolor=red!60,       resolution=727,       ngrid=727 30,       action=none     }     \newpsobject{connect}{psSolid}{       object=fusion,       linecolor=gray,       grid=false,       action=draw**     }          \pagestyle{empty}          \begin{document}          \begin{figure}[htbp]     \centering     \begin{pspicture}(-3,-3)(8,8)     % --------------- Core ---------------     \core[a=1,b=5,c=1,action=draw**,name=H1](0,1.5,-0.5)     \core[a=1,b=1,c=3,action=none,name=H2](0,-0.5,1.5)     \core[a=1,b=1,c=3,action=none,name=H3](0,3.5,1.5)     % --------------- Wire ---------------     {\defFunction{helixA}(t){\radius*cos(\factor*t)}{\radius*sin(\factor*t)}{\vertDist*t}     \wire[function=helixA,range=0 \lengthA,name=wire1](0,-0.5,0)}%     {\defFunction{helixB}(t){\radius*cos(\factor*t)}{-\radius*sin(\factor*t)}{\vertDist*t}     \wire[function=helixB,range=0 \lengthB,name=wire2](0,3.5,0)}%     % ------------- Assembly -------------     \connect[base=H2 wire1]     \connect[base=H3 wire2]     \composeSolid     \core[a=1,b=5,c=1,action=draw**,name=H4](0,1.5,3.5)     \end{pspicture}     \end{figure}          \end{document}      My problem is that the values of the constants `\factor`, `\lengthA`, `\lengthB`, `\vertDist`, and `\thickness` are found by hand. Can someone tell me what should be precisely if they should be dependant on the number of windings around the transformer core? P.S. The code takes a long time (circa 1 minute on my computer) to compile, so if someone can teel me how to recure the compile time, please let me know! **Final Version**               \documentclass{article}          \usepackage{pst-solides3d}          %% Parameters     % Windings     \def\lWind{60}     \def\rWind{30}     % Radii     \def\rHelix{1.13}     \def\rWire{0.006}          % Constants     \def\factor{160} % \factor > \lWind,\rWind     \pstVerb{%       /left 2 \lWind\space mul \factor\space div def       /right 2 \rWind\space mul \factor\space div def     }          %% Colours     \colorlet{wireColor}{red!60}     \colorlet{coreColor}{cyan!50}     %% Wire     \newpsobject{wire}{psSolid}{%       object=courbe,        % Choose max(left,right)        % The smaller max(left,right), the larger the constant multiplied with it       ngrid=970 left mul cvi 15,       r=\rWire,       fillcolor=wireColor,       incolor=wireColor     }          \pagestyle{empty}          \begin{document}          \begin{figure}[htbp]     \centering      \begin{pspicture}(-5,-5)(5,5)       \psset{%         algebraic,         viewpoint=20 5 10 rtp2xyz,         lightsrc=20 60 60 rtp2xyz,         Decran=30,         solidmemory,         action=none,         grid=false       }       %%--------- Core ----------       \psSolid[object=anneau,h=1.0,R=4,r=2.5,ngrid=4,RotZ=90,RotY=45,RotX=90,         fillcolor=coreColor,name=core]       %%--------- Wire ----------       % Left       \defFunction{heliceA}(t){\rHelix*cos(\factor*t)}{\rHelix*sin(\factor*t)}{t/left}       \wire[function=heliceA,range=0 Pi left mul,name=wireA](0,-2.25,-1.5)       % Right       \defFunction{heliceB}(t){\rHelix*cos(\factor*t)}{-\rHelix*sin(\factor*t)}{t/right}       \wire[function=heliceB,range=0 Pi right mul,name=wireB](0,2.25,-1.5)       %%------- Assembly --------       \psSolid[object=fusion,base=core wireA wireB,action=draw**]      \end{pspicture}     \end{figure}          \end{document}


title: Table without using booktabs

text: I would like to know how to create the following table without using the package `booktabs`. Is this even possible?               \begin{table*}\centering     \begin{tabular}{@{}rrrrcrrrcrrr@{}}\toprule     & \multicolumn{3}{c}{$w = 8$} & \phantom{abc}& \multicolumn{3}{c}{$w = 16$} &     \phantom{abc} & \multicolumn{3}{c}{$w = 32$}\\     \cmidrule{2-4} \cmidrule{6-8} \cmidrule{10-12}     & $t=0$ & $t=1$ & $t=2$ && $t=0$ & $t=1$ & $t=2$ && $t=0$ & $t=1$ & $t=2$\\ \midrule     $dir=1$\\     $c$ & 0.0790 & 0.1692 & 0.2945 && 0.3670 & 0.7187 & 3.1815 && -1.0032 & -1.7104 & -21.7969\\     $c$ & -0.8651& 50.0476& 5.9384&& -9.0714& 297.0923& 46.2143&& 4.3590& 34.5809& 76.9167\\     $c$ & 124.2756& -50.9612& -14.2721&& 128.2265& -630.5455& -381.0930&& -121.0518& -137.1210&  -220.2500\\     $dir=0$\\     $c$ & 0.0357& 1.2473& 0.2119&& 0.3593& -0.2755& 2.1764&& -1.2998& -3.8202& -1.2784\\     $c$ & -17.9048& -37.1111& 8.8591&& -30.7381& -9.5952& -3.0000&& -11.1631& -5.7108& -15.6728\\     $c$ & 105.5518& 232.1160& -94.7351&& 100.2497& 141.2778& -259.7326&& 52.5745& 10.1098& -140.2130\\     \bottomrule     \end{tabular}     \caption{Caption}     \end{table*}


title: Declare acronyms and abbreviations to automatically correct spaces after periods?

text: If I understand correctly, (La)TeX assumes that a period after a lower-case letter ends a sentence while a period after an upper-case letter does not. Unfortunately, my documents usually contain plenty of acronyms and abbreviations. Unless I remember to use `\@`, the spacing after periods is wrong:               \documentclass[convert={density=150},varwidth]{standalone}     \begin{document}     \noindent     \makebox[0.7in][l]{Incorrect:}%     Your computer needs more RAM.  I can give you some.\\     \makebox[0.7in][l]{Correct:}%     Your computer needs more RAM\@.  I can give you some.\\     \makebox[0.7in][l]{Incorrect:}%     Colors (red, blue, etc.) are nice.\\     \makebox[0.7in][l]{Correct:}%     Colors (red, blue, etc.\@) are nice.     \end{document}      ![rendering of the above document](http://i.stack.imgur.com/pw1Bq.png) Is it possible to declare certain strings to be acronyms or abbreviations to invert this assumption? If so, this would reduce the number of spacing errors in my documents. For example:               \documentclass[convert={density=150},varwidth]{standalone}     \usepackage{magicalacronymhelper}     \declareacronym{RAM}     \declareabbr{etc}     \begin{document}     \noindent     \makebox[0.7in][l]{Correct:}%     Your computer needs more RAM.  I can give you some.\\     \makebox[0.7in][l]{Correct:}%     Your computer needs more RAM\@.  I can give you some.\\     \makebox[0.7in][l]{Correct:}%     Colors (red, blue, etc.) are nice.\\     \makebox[0.7in][l]{Correct:}%     Colors (red, blue, etc.\@) are nice.     \end{document}      ![enter image description here](http://i.stack.imgur.com/oJpmT.png)


title: Table numbering starts at 2 when chngcntr / \counterwithout used

text: I have used the `\counterwithout{table}{chapter}` to remove the chapter number prefixing from table numbering yet my only table in the document is coming back as '2' I have just done a little debug and it appears that the table of contents is getting included in the count of tables once `\counterwithout{table}{chapter}` is declared in the preamble. These are the packages and `chngcntr` commands in the preamble I am using.               \usepackage[square, numbers, comma, sort&compress]{natbib}     \usepackage[english]{babel}     \usepackage{array}     \usepackage{mathtools}     \usepackage{float}     \usepackage{placeins}     \usepackage{wrapfig}     \usepackage{chngcntr}     \counterwithout{figure}{chapter}      \counterwithout{table}{chapter}      \lstset{numberbychapter=false}     \renewcommand{\lstlistingname}{Code}     \renewcommand{\lstlistlistingname}{List of Code}     \hypersetup{urlcolor=blue, colorlinks=true}     \title{\ttitle}      I am also using `\frontmatter`. Could this be causing mischief with `chngcntr` when I employ the use of `\counterwithout{table}{chapter}` ?


title: Makeindex - Styling the \printindex?

text: I have two questions:   1. Is it possible to change the titel of the printindex command? It is "Index" by default.   2. How can I format the index as a multi column, alphabetic sorted list? ![printindex title](http://i.stack.imgur.com/71vJX.png) ![Alphabetically sorted printindex](http://i.stack.imgur.com/Al106.png)


title: Biber not run automatically with `-shell-escape`?

text: I vaguely recall reading somewhere that `biber` can be run automatically by the `biblatex` package when `-shell-escape` is allowed. Do I remember it wrong? As much as I try, biblatex only tells me to run `biber` by hand. **EDIT** using TexLive2010 (updated about one month ago). **EDIT2** (MWE): I run this code with `xelatex`, `biber`, `xelatex`; I expected `biber` to be run automatically by `biblatex` using `\write18`.               \documentclass{article}     \usepackage[backend=biber]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{aa.bib}         @book{FooBar2000, author={Foo Bar}, title={Some Title}, publisher={Springer}, year={2000}};     \end{filecontents}     \addbibresource{aa.bib}          \begin{document}         According to \cite{FooBar2000} \dots         \printbibliography     \end{document}


title: Why are Beamer subsubsections evil?

text: The Beamer manual claims, under "Guidelines for Creating Presentations": > Do not use subsubsections, they are evil. Why? There's no further explanation. Is it simply because subsubsections are considered too granular for a presentation?


title: Stacked barplots/groupplots with text labels in x-coordinate

text: I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: ![enter image description here](http://i.stack.imgur.com/n4wW1.png) The `ybar stacked` option works quite nice here. But when I try to adapt it to a groupplot I run into some problems. The goal is to create three groups with a `xlabel` each. In each group each bar should also have its own `xticklabel`. The MWE so far gives this ![enter image description here](http://i.stack.imgur.com/pPCMx.png) Why is there a seperation after the first three stacked parts? And how can I label the bars separately but also label the groups? Is the `groupplot` command even the right one to approach to this "problem"? MWE:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots,pgfplotstable}     \usetikzlibrary{pgfplots.groupplots}     \pgfplotsset{width=0.3\textwidth,compat=newest}          \pgfplotstableread{     cr  Fii Faa Foo     abc 10  20  30     def 5   5   5     ghi 7   7   7     jkl 1.5 1.5 2.5     mno 2   2   2     pqrs    0   0   8     tuv 0   0   1.16     wxyz    0   5   0     }\first          \pgfplotstableread{     cr  Fii Faa Foo     abc 7   7   12.9     def 7.5 7.5 7.5     ghi 8   8   8     jkl 1.5 1.5 2.25     mno 2   2   2     pqrs    0   0   8     tuv 0   0   1.544     wxyz    0   6.3 0     }\second          \pgfplotstableread{     cr  Fii Faa Foo     abc 7   7   19     def 7.5 7.5 7.5     ghi 9   9   9     jkl 1.5 1.5 2.25     mno 2   2   2     pqrs    0   0   8     tuv 0   0   23     wxyz    0   8.4 0     }\third          \pgfplotsset{         select row/.style={             x filter/.code={\ifnum\coordindex=#1\else\def\pgfmathresult{}\fi}         }     }          \begin{document}          \begin{figure}[hbt!]     \centering     \begin{tikzpicture}     \begin{groupplot}         [             group style=                 {columns=3,                  ylabels at=edge left,                  group name=plots},             ybar stacked,             scale only axis,             ylabel=y-axis,             ymin=0,             ymax=150,             height=0.5\textwidth,             xtick=\empty,         legend columns=-1,         legend image code/.code={%              \draw[#1] (0cm,-0.1cm) rectangle (0.3cm,0.1cm);             }         ]          \nextgroupplot[xlabel=Item 1, legend to name=grouplegend,]     \pgfplotsinvokeforeach  {0,...,7}{         \addplot table [x expr=\coordindex, select row=#1, y=Fii] {\first};         \addplot table [x expr=\coordindex, select row=#1, y=Faa] {\first};         \addplot table [x expr=\coordindex, select row=#1, y=Foo] {\first};         \addlegendentry {\pgfplotstablegetelem{#1}{cr}\of \first \pgfplotsretval}     }          \nextgroupplot[xlabel=Item 2]     \pgfplotsinvokeforeach  {0,...,7}{         \addplot table [x expr=\coordindex, select row=#1, y=Fii] {\second};         \addplot table [x expr=\coordindex, select row=#1, y=Faa] {\second};         \addplot table [x expr=\coordindex, select row=#1, y=Foo] {\second};     }          \nextgroupplot[xlabel=Item 3]     \pgfplotsinvokeforeach  {0,...,7}{         \addplot table [x expr=\coordindex, select row=#1, y=Fii] {\third};         \addplot table [x expr=\coordindex, select row=#1, y=Faa] {\third};         \addplot table [x expr=\coordindex, select row=#1, y=Foo] {\third};     }          \end{groupplot}     \node at (plots c2r1.north) [inner sep=0pt,anchor=south,yshift=3ex] {\ref{grouplegend}};     \end{tikzpicture}     \end{figure}          \end{document}


title: Writing simple LaTeX workspace

text: I have this project in which I need to write something like a workspace for LaTeX. Basically I need to make split window. In one you would write the TeX code and in the other you would see the live result of your doing. And I have to add some other small things like coloring the syntax, changing the compile method (LaTeX, XeLatex...) etc. I know and I've written some documents in LaTeX, so I know LaTeX fairly. But!!! Where should I start? I don't know anything about it. Is there maybe some **simple** code to begin with? is there a **small** example? anything? I'm not lazy. I went through the internet and found very few things about it. Would like to hear some advice.


title: Printing Checks with Latex

text: This is my first time working with Latex and I'm using Texmaker to create it in. I was hoping to find some GUI Editing tool that kind of let me drag and drop things where I wanted them but couldn't find one :) ha ha I am trying to make a simple layout for printing on my checks from my bank. I have the following so far:               \documentclass[12pt,letterpaper,landscape]{letter}     \thispagestyle{empty}     \pagestyle{empty}     \hoffset = 0pt     \voffset = 0pt     \oddsidemargin = 0pt     \topmargin = 0pt     \headheight = 0pt     \headsep = 0pt     \marginparsep = 0pt     \marginparwidth = 0pt     \footskip = 0pt     \usepackage[pass,paperwidth=2.5in,paperheight=6.5in]{geometry}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \begin{document}          \begin{tabular}{ p{4.15in} l }     Guatemala 05 de Septiembre del 2,012 & 125.00 \\      \multicolumn{2}{ l }{Name of Person} \\     \multicolumn{2}{ l }{Ciento Venticinco con 00/100} \\     \end{tabular}           \end{document}      Now this prints yes, but two problems. First off I am testing with regular sheets of paper till I get it down pat, and right now it goes down to the halfway point in the sheet of paper and then prints. Plus it's not landscape, it's normal printing. What do I have to change here? I want it to be exact check size and I want to be able to put my checks in the printer vertically in the middle of the printer and have them print. Any clues?


title: Sublist without bullets

text: I know that I can suppress indentation bullets using `\item[]`, but nonetheless, the vertical space taken up by the bullet still stays empty. I thought of using a custom `list` environment, but this did neither adjust the space nor the font size. Arrows mark some of the questionable spots in the following example.               \documentclass{beamer}     \begin{document}     \begin{frame}       \begin{itemize}         \item A sub-itemize           \begin{itemize}             \item an item with a bullet             \item[] items without a bullet waste space             \item[] \(\leftarrow\) here           \end{itemize}         \item A sub-list           \begin{list}{}{}             \item these items are too big             \item the sublist font should be smaller             \item[] \(\leftarrow\) still too much space           \end{list}       \end{itemize}     \end{frame}     \end{document}      ![too much space](http://i.stack.imgur.com/3T7QI.png) How can I close the gap? Or, alternatively, how can a new environment be created, that works like `itemize` but only adds an indent and decreases the font size without adding any bullets?


title: A LaTeX book template that mimics the stackedit.io

text: I am in need of a template that mimics the whole layout at the nice editor https://stackedit.io/ does the layout. Fonts, especially the narrow one for code, the line-spacing and the formatting of code with the nice background With the standard LaTeX book layout text becomes too cramped. Source listings create massive amounts of air when there is little text and more code.   * I've tried `ragged2d` and `\RaggedRight` with little effect on the horizontal formatting   * I've tried `\raggedbottom` to reduce the spacing on the vertical plane.   * I've tried `parspace` for the layout between paragraphs   * I've tried `setspace` and adding `\setstretch{1.2}` to get some air between the lines   * And `microtype` for reasons unknown.               \documentclass[openany,a4,10pt]{book}     \usepackage{microtype, ragged2e, color, colortbl}  % user defined     \usepackage[parfill]{parskip}  % user defined     \usepackage{setspace}  % user defined          \title{...}     \begin{document}     \date{...}     \maketitle     \clearpage          \tableofcontents \addtolength{\textwidth}{1.6cm}\addtolength{\oddsidemargin}{-1cm}\addtolength{\evensidemargin}{-1cm}\RaggedRight\raggedbottom\setstretch{1.1}     \clearpage      but my attempts still looks cramped. I am not sure which package to use for code listing. `fancyvbr`, `listings`? etc. ![enter image description here](http://i.stack.imgur.com/7pxbu.png)


title: Advanced hierarchical counting for theorems

text: I want to number successive theorems with hierarchical counting (top level counter `n`, sub level counter `m`) in a way that I can chose from the following options for each theorem:   * `Theorem n.` (increases n-counter, resets m-counter)   * `Theorem n.m.` (increases n-counter, resets m-counter)   * `Theorem n.m.` (increases m-counter) To allow sth. like > **Theorem 1.** > > **Theorem 2.1** > > **Theorem 2.2.** > > **Theorem 3.** > > **Theorem 3.1.** In fact, a quite liberal numbering should be possible, with multiple levels and custom counting-style (arabic, alph, ...). There are some related answers:   * Subtheorems with alphabetic number   * Alternative numbering for theorem But all define new theorem environments, so you have to use different environments for the different numbering options. The problem with this is that I already have some theorem environments and I want to use this counting scheme for all of them in the same way (at the moment, they just use the same counter). So is there any way to achieve this without creating new versions of each theorem environment for each numbering option? If not, a conclusion would be that, if you want to compose multiple independent style parameters for theorems (e.g. the numbering way, the header/body font, ...), you would have to create an own environment for each combination. This would produce much redundance and would be hard to maintain. Is it like that? ### Ideas:   * Is it possible to have a counter to be passed at `\renewtheorem{th}[counter]{Theorem}` which counts like `m.n` and can be increased manually in `m` and `n`?   * Can you create environments with options, so when opening a new theorem environment you pass the numbering option?


title: Tabbing for math mode?

text: I'm looking for something synonymous to `tabbing`, but for math mode. I read that `alignat*` should do the trick, but this behaves differently it seems. For example:               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{alignat*}{2}     S_4^{t} &= \{&\langle rdi, r12, rax' \rangle \mid \langle rdi, r12, rax \rangle \in S_4~\wedge \\     && rax' = \{ rax \mid rax > 0 \} \}\\     \end{alignat*}          \end{document}      The second line appears to be right aligned, whereas I would like the `&` markers to be aligned with each other and then all text left aligned (like in `tabbing`). Is anyone able to fix this code, or suggest an alternative.


title: Where is the documentation?

text: Where or how do I find the documentation for a given Latex command? For example, in R I get the documentation for `mean()` with `?mean` or at the manual pages http://stat.ethz.ch/R-manual/R-patched/library/base/html/mean.html. In Java there are the Javadocs to tell me what parameters a method takes an what it returns. What about LaTeX? If I want to know how to use the `\caption` command, for example, where is its documentation? Every time I face a problem, I Google it up and get some blog, StackExchange or else that solves my problems but I never get to the formal documentation of a command so I never actually know why something works the way it does!


title: pstricks: strange behaviour using \rput* with pst-solides3d

text: i got a strange behaviour using `\rput` and `\rput*` with the package `pst- solides3d`. it concern more or less the commands `\rput` and `\psdot` in the following example               \documentclass{minimal}     \usepackage{pstricks,pst-solides3d}          \begin{document}          \defFunction{cont}(u,v){u}{v}{u dup mul v dup mul add}          \begin{pspicture}(-2,-1)(2,2)          \psSolid[object=surfaceparametree,     linecolor=green,     base=-1 1 -1 1,     fillcolor=green!50,incolor=green!20,     function=cont,linewidth=0.5\pslinewidth,     ngrid=.2 .2,     action=draw**]          \psPoint(0,0,1){P}     \psdot(P)     \rput*(P){$110$}          \psframe(-2,-1)(2,2)     \end{pspicture}     \end{document}        1. using `\rput*` ( _without_ `\psdot`), there's a shift of the plot but the text is in the wrong place   2. using `\rput` ( _without_ `\psdot`), no shift but no text as well   3. using `\rput` or `\rput*` with `\psdot`, the output is correct   4. if i put the `\psframe` command _before_ the \psSolid command then i got a postscript error seems rather mysterious to me. did i make something wrong?


title: texlive-20120701-bin install

text: I am new to texlive so pardon me if i miss mentioning more details. I started out with texlive-20120701-bin.tar download and i have extracted them on to a particular file system on my RedHat instance. I have set the path as mentioned in the installation instruction and tried running a test to confirm the install is fine by doing latex sample2e.tex which seems to fail with the below error:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)     **     Please type the name of your input file.     **sample2e.tex     kpathsea: Running mktexfmt pdftex.fmt     fmtutil: missing command; try fmtutil --help if you need it.     I can't find the format file `pdftex.fmt'!      Any help is appreciated.


title: Remove bibliography title in moderncv with multibib

text: I want to have multiple bibliographies within my CV (moderncv class) so I've been using `multibib`. The trouble is, `multibib` automatically places a bibliography title above each bibliography, which I do not always want. At the beginning of my document I have:               \usepackage{multibib}     \newcites{Jn,Cp,Pt}{{Journal Articles},{Conference Proceedings},{Patents}}      Then, when I have               \section{Patents}     \nocitePt{nM09}     \bibliographystylePt{bibstyle}     \bibliographyPt{LinkedBib_2011-09-28}      I end up with patents twice, one from the section heading, and one from the bibliography title. I want to keep the section heading, so the bibliography title needs to go. I've tried leaving the bibliography title out of the `\newcites` command, like this               \newcites{Jn,Cp,Pt}{{Journal Articles},{Conference Proceedings},{}}      But this just results in a big space between the section title and the first bibliography item. I also tried               \section{Patents}     \begingroup     \renewcommand{\section}[2]{}%     \nocitePt{nM09}     \bibliographystylePt{bibstyle}     \bibliographyPt{LinkedBib_2011-09-28}     \endgroup      which was suggested here, but I still ended up with patents twice. Any suggestions?


title: Count number of lines in a caption

text: I have a problem formatting my captions for figures/tables. What should happen is the following: I need one line above the image and two lines above and below the caption. To make it look good, I have to adjust vertical spacing several times. A problem now occurs depending on whether the caption is displayed in one or several lines. For single line captions I would need to adjust by the vspacing by `{-0.8 \baselineskip}`, in case of a multiline caption only by `{-0.1 \baselineskip}` for the line below the caption to have exactly the same space to the bottom of the text. I'm not so familiar with LaTeX or typesetting, so I don't understand why this happens at all. A solution would be to somehow figure out the number of lines in the caption, but I have no idea how to do this. I tried to "abuse" the `lineno` package for my needs, but without any success. Has anyone an idea how to solve this or what causes the problem at all? Below the code for my image insertion.               \newcommand{\includewrappedfigure}[6][0pt]{     % example params: [0pt]{R}{.3}{afigurefile}{figure with long caption}{fig:afigure}         \begin{wrapfigure}{#2}{#3\textwidth}         \centering         \vskip -.8 \baselineskip         \hrule         \includegraphics[width=#3\textwidth, keepaspectratio]{#4}         \vskip -1 \baselineskip         \hrule         \vskip -0.8 \baselineskip         \caption{#5}         \label{#6}         \vskip -.1 \baselineskip % for MULTI line captions         % \vskip -.8 \baselineskip % for SINGLE line captions         \hrule     \end{wrapfigure}     }


title: Han characters replace Hiragana when using Meiryo font with CJK

text: I've been trying to get the Meiryo font to work with LaTeX CJK for quite a while now, but for some reason or other it's always refused to work. I gave it another go today, and managed to actually get some output, but it wasn't really what I expected. For some reason, processing Hiragana results in characters that I've never seen before being produced in the PDF. A few of the Kanji that I've written are unscathed, but many are replaced by unexpected characters. I've successfully used the guide at http://www- alg.ist.hokudai.ac.jp/~jan/japfonts.html to allow CJK to use the IPA fonts, but having followed the same tutorial with Meiryo doesn't result in anything usable. My suspicion is that the Unicode glyphs are in the wrong places, or something along those lines. I've got the .tfm files produced by running ttf2tfm on meiryo.ttc in /usr/share/texmf-texlive/fonts/tfm/meiryo, and the .td files in /usr/share/texmf-texlive/tex/latex/CJK fonts. The contents of the relevant .td and .map files are as follows: c70meiryo.td:               \DeclareFontFamily{C70}{meiryo}{\hyphenchar \font\m@ne}     \DeclareFontShape{C70}{meiryo}{m}{n}{<-> CJK * meiryo}{}     \DeclareFontShape{C70}{meiryo}{bx}{n}{<-> CJKb * meiryo}{\CJKbold}      ttfonts.map (only relevant bits)               ipam@UJIS@ ipam.ttf     ipam-uni@Unicode@ ipam.ttf     meiryo@Unicode@ meiryo.ttc     msjh@Unicode@ unicode msjh.ttf      Also, here's a part of the document that I'm trying to make with this font - I'm using the flashcards package, but I feel that it's unlikely that that has much of an impact on the font problem. I'm using an a4 paper size for the cards, and there's no default .cfg file for that, so if necessary you can either change the paper type to avery5371 in the documentclass, or make a file a4paper.cfg in your flashcards directory (mine is /usr/share/texmf- texlive/tex/latex/flashcards), and put in the following:               \NeedsTeXFormat{LaTeX2e}[1996/12/01]     \ProvidesFile{a4paper.cfg}     \newcommand{\cardpapermode}{portrait}     \newcommand{\cardpaper}{a4paper}     \newcommand{\cardrows}{5}     \newcommand{\cardcolumns}{2}     \setlength{\cardheight}{2.126in}     \setlength{\cardwidth}{3.346in}     \setlength{\topoffset}{0.5in}     \setlength{\oddoffset}{1.0in}     \setlength{\evenoffset}{1.0in}          \endinput      A LaTeX document to use for any testing, if required (it throws up some other errors that I haven't worked around yet). Currently uses meiryo encoding. Default for CJK is min, I think:               \documentclass[a4paper,grid]{flashcards}     \usepackage{verbatim}     \usepackage{CJK}     \usepackage{ruby}          \renewcommand{\rubysize}{0.4}     \renewcommand{\rubysep}{-0.8}          \cardfrontstyle[\fontsize{90pt}{0.2cm}\slshape]{headings}     \cardbackstyle{plain}          \newcommand{\df}[3]{#1 -- #2 -- #3}     \newcommand{\rdf}[3]{\ruby{#1}{#2} -- #3}     \newcommand{\md}{\fontsize{18pt} \selectfont}          \begin{document}          \begin{CJK}{UTF8}{meiryo}       \begin{flashcard}{映}         \begin{tabular}{cc}           \begin{minipage}[b]{0.5\linewidth}\centering             \begin{tabular}{c}               \textbf{Reflect}\\             \end{tabular}           \end{minipage}           \hspace{-1cm}           &\begin{minipage}[b]{0.5\linewidth}\centering             \md             \begin{tabular}{c}               うつ--る\\               うつ--す\\               えい             \end{tabular}           \end{minipage}           \vspace*{0.1cm}         \end{table}         \fontsize{12pt} \selectfont         \begin{tabular}{l}           \rdf{映画}{えいが}{Movie}\\           \rdf{上映}{じょうえい}{Show a movie}\\           \rdf{放映}{ほうえい}{Televising}         \end{tabular}       \end{flashcard}          \end{document}      Here are some pictures of what I'm talking about: Compiling the above using meiryo as the font: ![](http://i.stack.imgur.com/kcgms.png) with ipam as the font: ![](http://i.stack.imgur.com/JmU9b.png) Any ideas as to what the problem may be, and how I should go about fixing it?


title: Double square bracket

text: I need to have 2 square bracket matrix on the same equation line. I'm able to do just for a single square bracket matrix (for `\xi`) with below                \xi = \left[ \begin{array}{c}         \xi^1  \\         \vdots \\         \xi^L                \end{array} \right]       ![enter image description here](http://i.stack.imgur.com/eISM1.png) Anyone can give me a hint how to add the second square bracket matrix (for `x`)?


title: Am I able to intersect curves after rotating?

text: I would like to intersect arc and sloped line as it's discribed in the code after having rotated the sloped line. Why doesn't the red point belong to sloped line? I hope my question is quite clear for uptake.               \documentclass[12pt,a4paper]{article}     \usepackage{russ}     \usepackage[left=1cm,right=1cm,top=2cm,bottom=2cm]{geometry}     \usepackage{tikz}                   % Для рисования мега-картинок прямо здесь     \usepackage{rotating}     \usetikzlibrary{calc,intersections} % Читайте мануал в Bonus/Books on TeX/Pictures for         TeX/PGF, а также http://www.texample.net/tikz/examples/all/     \colorlet{examplefill}{yellow!80!black}     \begin{document}     \begin{figure}     \begin{tikzpicture}[scale=3]     /cs/horizontal line through={(1,1)}       \path [name path=arc] (0.5cm,0) arc (0:90:0.5cm);     \draw (0,0) ellipse (0.7cm and 2.2cm);     \draw[name path=simple line] (-1,0) -- (1,0) coordinate (x axis);     \draw (0,-2.5) -- (0,2.5) coordinate (y axis);      \begin{turn}{50}      \draw[name path=sloped line] (-2.5,0) -- (2.5,0) coordinate (x axis);     \draw (0,-1.5) -- (0,1.5) coordinate (y axis);     \draw (0,0) ellipse (2cm and 1cm);     \end{turn}     \fill[red,name intersections={of=sloped line and arc, by=s}]      (s) circle (2pt) node[above=3] {a};     \end{tikzpicture}       \centering     \label{elliptic polarization}     \end{figure}     \end{document}      And how to output coordinates of the intersection point instead of a?!


title: Large $\forall$

text: How to get larger `$\forall$` symbol? Adding `\Big$` doesn't work.


title: Options for converting LaTeX to plain text

text: What options exist for doing something like this? I'm particularly interested in LaTeX that describes mathematics.


title: Where can we get/download LaTeX fonts?

text: Where can we get/download LaTeX fonts automatically? I am using MiKTeX and I am looking for `bbm8.pfb` fonts.


title: Suppressing hyphenation of words that already contain a hyphen

text: According to the accepted answer of this question TeX never hyphenates words that already contain a hyphen. Nevertheless in a document here I find that the word “Modula-2” is hyphenated, as the following image shows (generated with this file using XeLaTeX, version 3.1415926-2.4-0.9998 (MiKTeX 2.9 64-bit)).               \documentclass[10pt]{article}     \begin{document}       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum Modula-2       nisi urna, congue sed congue id, iaculis et lacus.     \end{document}      ![Unwanted hyphenation](http://i.stack.imgur.com/22crs.png) Apparently I can’t use `\hyphenation` to prevent this; but the word appears several times so I don’t want to use `\mbox` either. Is there a better solution?


title: Is there a way of using changebars with XeLaTeX?

text: Is there any way of using the `changebars` package with XeLaTeX? The current release of `changebars` doesn't support a `xetex` option. Almost three years ago there was a discussion on comp.text.tex about a patch to the package to support XeTeX, but nothing seems to have come of it; there was a similar question on the xetex mailing list last year, which seems to have gone unanswered. Is there a recommended alternative to the `changebars` package which works with XeTeX, or any samizdat patches to it floating around?


title: LaTeX conditional expression

text: I would like to be able to set a flag at the beginning of the main flag (say `output`) that tells if I want to produce a paper document or an electronic document. Then I should check this flag to define or not empty pages, hypperref, oneside or twosides, etc. How could I do that ?


title: Where do I start learning conditional tests in LaTeX?

text: > **Possible Duplicate:**   >  LaTeX conditional expression I've already taken a look at books such as "TeX for the Impatient", but its examples aren't clear enough to me. What book/tutorial do you recommend for learning conditional tests in LaTeX?


title: List of Tables doesn't appear

text: I have a problem with List of Tables. It doesn't appear in my document. The `.cls` file is HERE. Document:               \documentclass[thesis=B,czech]{FITthesis}[2012/06/26]          \usepackage[utf8]{inputenc}          \usepackage{graphicx}     \usepackage{longtable}          \department{text}     \title{text}     \authorGN{text}     \authorFN{text}     \authorWithDegrees{text}     \supervisor{text}     \acknowledgements{text}     \abstractCS{text}     \abstractEN{text}     \placeForDeclarationOfAuthenticity{text}     \declarationOfAuthenticityOption{1}     \keywordsCS{text}     \keywordsEN{text}          \usepackage{chngcntr}     \AtBeginDocument{       \counterwithout{figure}{chapter}       \counterwithout{table}{chapter}       \renewcommand\thefigure{\arabic{figure}}       \renewcommand\thetable{\arabic{table}}     }     \begin{document}          \begin{introduction}         %     \end{introduction}          \chapter {First}          text          \begin{figure}[h]       \caption{Function.}       \label{fig:function}     \end{figure}          \begin{center}         \begin{longtable}{ c | c | c }             $1$ & $2$ & 3 \\ \hline             \caption{tab}     \label{tab:tab}         \end{longtable}     \end{center}          \begin{conclusion}         %     \end{conclusion}          \appendix          \end{document}