title: Is it possible to run a command stored as text in a variable?

text: I have some complicated expressions with loads of nested commands which are difficult to work with. To solve this I wrote a parser using pgfparser which creates the expressions for me. I can then copy the output back in to LaTeX and it outputs what I need. I was wondering if I could automate this. I can store the text (a sequence of commands) in a variable but then I can't find a way to run the commands in the variable The parser itself is not of much interest but as a mwe this is a simplified version of what I have:               \documentclass{standalone}     \usepackage[T1]{fontenc}     \usepackage{pgf}     \usepgfmodule{parser}          \pgfparserdef{mweparser}{initial}{\meaning [}{\textbackslash overline\{}     \pgfparserdef{mweparser}{initial}{\meaning ]}{\}}     \pgfparserdef{mweparser}{initial}{\meaning A}{A}     \pgfparserdef{mweparser}{initial}{subscript character _}{\_\{\pgfparserswitch{subscript}}     \pgfparserdef{mweparser}{subscript}{\meaning +}{\textbackslash hat\{\pgfparserswitch{edgename}}     \pgfparserdef{mweparser}{subscript}{\meaning -}{\textbackslash check\{\pgfparserswitch{edgename}}     \pgfparserdef{mweparser}{edgename}{\meaning a}{a\}\pgfparserswitch{subscript}}     \pgfparserdef{mweparser}{edgename}{\meaning b}{b\}\pgfparserswitch{subscript}}     \pgfparserdef{mweparser}{subscript}{subscript character _}{\}\pgfparserswitch{initial}}     \pgfparserdef{mweparser}{all}{the character ;}{\pgfparserswitch{final}}          \begin{document}         \pgfparserparse{mweparser}[A_+a-b-a_[A_+a+b-a_]];%     \end{document}      This will output:               \overline{A_{\hat{a}\check{b}\check{a}}\overline{A_{\hat{a}\hat{b}\check{a}}}}      Which is what I would like to run (in math mode). I can store this text in a variable but can't see how I can run it. I am new to this stuff so I apologise if I have done anything wrong.


title: Fancyheader footer for float pages

text: I'm trying to keep the page number on float pages using `fancyhdr`. Here is my current set-up:               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{lastpage}     \usepackage{fancyhdr}     \pagestyle{fancy}     % with this we ensure that the chapter and section     % headings are in lowercase.     %\renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{\iffloatpage{}{\thesection.\ #1}}}     \fancyhf{} % delete current setting for header and footer     \fancyhead[LE,RO]{\iffloatpage{}{\textbf{Page \thepage\ of \pageref{LastPage}}}}     \fancyhead[LO]{\iffloatpage{}{\textbf\rightmark}}     \fancyhead[RE]{\iffloatpage{}{\textbf\leftmark}}     \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.5pt}}     \renewcommand{\footrulewidth}{0pt}     \renewcommand{\headsep}{10pt}     \iffloatpage{\cfoot{\textbf{Page \thepage\ of \pageref{LastPage}}}}{}     \addtolength{\headheight}{\baselineskip} % make space for the rule     \fancypagestyle{plain}{%     \fancyhead{} % get rid of headers on plain pages     \renewcommand{\headrulewidth}{0pt} % and the line     }          \begin{document}          \begin{figure}     \includegraphics{demo}     \end{figure}          \end{document}      Unfortunately the line that I thought would do what I wanted (`\iffloatpage{\cfoot{\textbf{Page \thepage\ of \pageref{LastPage}}}}{}`) is doing nothing. What am I doing wrong?


title: tex4ht gives 'illegal storage address' error when trying to convert to odt

text: I am trying to convert a LaTeX document to opendocument with TeX4ht (on Windows/MiKTeX 2.9 32-bit). I am using the following command (as suggested on the TeX4ht website):               D:\latex>htlatex mwe.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"      My `mwe.tex` reads:               \documentclass{minimal}     \begin{document}     Hello World     \end{document}      The LaTeX calls of `htlatex.bat` are running fine, but the `tex4ht` call is giving an error `Illegal storage address`:               D:\latex>tex4ht mwe.tex  -i/tex4ht/ht-fonts/"ooffice/! -cmozhtf" -ewin32/tex4ht.env     ----------------------------     tex4ht.c (2010-12-16-08:39 Windows MiKTeX)     tex4ht mwe.tex       -i/tex4ht/ht-fonts/ooffice/!       -cmozhtf       -ewin32/tex4ht.env     (C:/Program Files (x86)/MiKTeX 2.9/tex4ht/base/win32/tex4ht.env)     (C:/Program Files (x86)/MiKTeX 2.9/fonts/tfm/public/amsfonts/cmextra/cmbsy5.tfm)          (C:/Program Files (x86)/MiKTeX 2.9/tex4ht/ht-fonts/alias/cm/cmbsy.htf)     Searching `cmsy.htf' for `cmbsy5.htf'     (C:/Program Files (x86)/MiKTeX 2.9/tex4ht/ht-fonts/unicode/cm/cmsy.htf)     --- error --- Illegal storage address              D:\latex>t4ht mwe.tex "-coo -cvalidate" -ewin32/tex4ht.env     ----------------------------     t4ht.c (2010-12-16-08:47 MiKTeX)     t4ht mwe.tex       -coo       -cvalidate       -ewin32/tex4ht.env     (C:/Program Files (x86)/MiKTeX 2.9/tex4ht/base/win32/tex4ht.env)     Entering mwe.lg     Entering mwe.css     Entering mwe.tmp      `cmbsy.htf` and `cmsy.htf` are at the designated locations. So what is wrong here? I have found this workaround by Ulrike Fischer (in German), but my `tex4ht.env` already contains relative paths (`tex4ht.env` is dated 12 Jul 2011 and the workaround is from 17 Jun 2011, so I guess that problem is fixed already) and I do not have a `oolatex.bat` in `C:\Program Files (x86)\MiKTeX 2.9\scripts\tex4ht`. The `htlatex.bat` in the scripts folder reads:               latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1     latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1     latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1     tex4ht %1  -i/tex4ht/ht-fonts/%3 -ewin32/tex4ht.env     t4ht %1 %4 -ewin32/tex4ht.env


title: How do I make a square table in LaTeX?

text: How can I make a perfectly square table in LaTeX? Each cell will just have a single character in it. I'm trying to print a pretty tabula recta as shown below. ![enter image description here](http://i.stack.imgur.com/rgaZc.png)


title: Customize mini frame navigation

text: I'm trying to create my own beamer theme; I want to use a mini frame navigation in headline (included by using `\insertnavigation`) but the colors not working as I want them yet. Here´s the output of my headline: ![enter image description here](http://i.stack.imgur.com/PVP8z.png) When going forward in the presentation, the current active section is shown in black. How can I change its color to the gold I've already used? Also I´d like to change the shading of inactive sections to get them a little brighter than they are at the moment. Here´s the important part of my `colortheme.sty` and the `outertheme.sty`:               % Setzt Deep Harlequin (dunkler)       \definecolor{jvagreen}{RGB}{22, 89, 0}          % Setzt Vivid Gold (dunkler)     \definecolor{jvagold}{RGB}{231, 202, 0}          % Farbe der Elemente der headline     \setbeamercolor{section in head/foot}{fg = jvagold, bg = jvagreen}          =====================================================================          % Komprimiert die miniframe Kreise auf eine Linie     \beamer@compresstrue               % Definiert die headline     \setbeamertemplate{headline}     {      \usebeamercolor{seperation line}     % Bindet die Grafik ein     \includegraphics[width=0.15\paperwidth]{Wappen_JvA}     \begin{beamercolorbox}[wd=.85\paperwidth,right]{section in head/foot}         \rule{0.85\paperwidth}{1pt}         %Vertikaler Abstand         \vskip10pt         %Fügt die Standard-Navi ein (miniframes)         \insertnavigation{0.85\paperwidth}         \vskip8pt         \rule{0.85\paperwidth}{0.5pt}         \vskip7.5pt         % Horizontaler Abstand         \leftskip=10pt         % Fügt den frametitle an dieser Stelle ein         \insertframetitle         \vskip20pt         \leftskip=0pt         \rule{0.85\paperwidth}{1pt}     \end{beamercolorbox}      }      If you have any ideas on how to change it in the way I want it to be or suggestions / improvements to my code, please let me know ;)


title: non-invasive kerning/spacing modification: what options are there?

text: Once in a while, you may want to (1) adjust or create a kerning pair (or, better yet, kerning class) in a font, or (2) adjust a particular glyph's sidebearings. examples of scenario (1) would include a font that's lacking a certain kerning pair/class, such as when more ›exotic‹ variants of a glyph were overlooked by the designer: `W + a` is kerned, but `W + á` isn't. Or: adjusting punctuation spacing for a certain linguistic context, such as the famously loose puncutation spacing common in French. Scenario (2) would apply, for example, when a particular glyph is too close to (or two far away from) all its possible neighbors, whatever these may be. Such as the slash in an otherwise well-made font I recently licensed. Obviously, you may edit the font file itself, but this may not be desirable for several reasons, and it may not be permitted by the font's EULA either. I'd like to arrive at a little survey that addresses questions like:   * what »non-invasive« methods are available for these purposes?   * what engines are they compatible with?   * what are pros and cons?  The two options that I can think of I've already posted as answers. Feel free to edit, as there might be more to be said about them.


title: TeXbook headers

text: \documentclass[10pt,%                      % corpo del font principale                    a4paper,%                   % carta A4                    twoside,%         % fronte-retro                    %openright, % capitoli sempre pag destra                    openany % elimina pagine bianche                     %dvipsnames                    ]{book}          \usepackage{fancyhdr}          \pagestyle{fancy}          \makeatletter      \renewcommand\frontmatter{%          \cleardoublepage        \@mainmatterfalse        \pagenumbering{Roman}}      \makeatother     \addtolength{\headwidth}{1.5em}     \renewcommand{\chaptermark}[1]%     {\markboth{#1}{}}     \renewcommand{\sectionmark}[1]%     {\markright{#1}}     \renewcommand{\headrulewidth}{0pt}     %\renewcommand{\footrulewidth}{0pt}     \fancyhf{}     \fancyhead[LE]{\textbf{\thepage}\quad\textsl{\leftmark}}     \fancyhead[RO]{\textsl{\rightmark}\quad\textbf{\thepage}}          \begin{document}     \chapter{Kafka}     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \section{Storia}     Gregorio Samsa, svegliandosi una mattina da sogni agitati, si trovò trasformato, nel suo letto, in un enorme insetto immondo. Riposava sulla schiena, dura come una corazza, e sollevando un poco il capo vedeva il suo ventre arcuato, bruno e diviso in tanti segmenti ricurvi, in cima a cui la coperta da letto, vicina a scivolar giù tutta, si manteneva a fatica. Le gambe, numerose e sottili da far pietà, rispetto alla sua corporatura normale, tremolavano senza tregua in un confuso luccichio dinanzi ai suoi occhi. Cosa m’è avvenuto? pensò. Non era un sogno. La sua camera, una stanzetta di giuste proporzioni, soltanto un po’ piccola, se ne stava tranquilla fra le quattro ben note pareti. Sulla tavola, un campionario disfatto di tessuti - Samsa era commesso viaggiatore e sopra, appeso alla parete, un ritratto, ritagliato da lui - non era molto - da una rivista illustrata e messo dentro una bella cornice dorata: raffigurava una donna seduta, ma ben dritta sul busto, con un berretto e un boa di pelliccia; essa levava incontro a chi guardava un pesante manicotto, in cui scompariva tutto l’avambraccio. Lo sguardo di Gregorio si rivolse allora verso la finestra, e il cielo fosco (si sentivano placeat facere     \section{Pangramma}     Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja! Aquel vituperable xenófobo apasionado prueba su güisqui y exclama: ¡Aleluya! Ma la volpe col suo balzo ha raggiunto il quieto Fido. Quel vituperabile xenofobo.     \end{document}      I would like to have the headers like in the TeXbook. How can i do this?


title: Weird bug (header) when using the glossaries package and KOMA's automark

text: I'm using               \usepackage[automark]{scrpage2}      in my preable together with the glossaries package. Whenever I use an acronym within a `\section{...}` command, I get a header like the one pictured below. Any ideas how to prevent this? I'm using LuaLaTeX btw. ![enter image description here](http://i.stack.imgur.com/jhaVr.png)


title: noalign and \include

text: I have reduced my code to the following lines:               \documentclass[9pt,letterpaper,oneside]{amsart}     \usepackage{graphicx}     \usepackage[table, dvipsnames]{xcolor}     \usepackage{longtable}     \usepackage[top=0.2in, bottom=0in, left=1in, right=1in]{geometry}     \usepackage[labelformat=empty]{caption}     \begin{document}          \renewcommand*\rmdefault{ppl}     \textrm{%       \begin{table}[ht]         \centering         \caption{Blabla}         {\tiny           \begin{tabular}{llrrr}             \hline             \rowcolor[gray]{0.65} A & B & C & D & E \\              \hline             \emph{ }           \end{tabular}         }       \end{table}}     \end{document}      This code does exactly what I want, but when I replace the line               \rowcolor[gray]{0.65} A & B & C & D & E \\       (which resembles a bigger table) with               \include{TableTest}      where TableTest.tex only contains               \rowcolor[gray]{0.65} A & B & C & D & E \\      I get an error message:               ! Misplaced \noalign.     \rowcolor ->\noalign         {\ifnum 0=`}\fi \global \let \CT@do@color \CT@@do@color...     l.3 \rowcolor        [gray]{0.65} A & B & C & D &      I use R/Sweave and xtable to make this table, and a similar problem (+ solution) is found here. Only this solution (i.e. replace \input with \expandableinput) does not work for me! That is               \documentclass[9pt,letterpaper,oneside]{amsart}     \usepackage{graphicx}     \usepackage[table, dvipsnames]{xcolor}     \usepackage{longtable}     \usepackage[top=0.2in, bottom=0in, left=1in, right=1in]{geometry}     \usepackage[labelformat=empty]{caption}     \usepackage{booktabs}     \begin{document}          \renewcommand*\rmdefault{ppl}         \textrm{%           \begin{table}[ht]             \centering             \caption{Blabla}             {\tiny               \begin{tabular}{llrrr}                 \hline                 \expandableinput TableTest.tex                  \hline                 \emph{ }               \end{tabular}             }           \end{table}}         \end{document}      gives error message               ! Undefined control sequence.     <recently read> \expandableinput           l.25       \end{table}}      Question: how can I overcome the problem of importing the table from TableTest.tex into the LaTeX code?


title: Why using a backslash in command definitions?

text: I want to know the reasoning behind the (La)TeX inferface for defining commands with leading backslashes. I see why a backslash has to be used to call (expand) a command (macro), but I do not understand why it is used in definitions. There are many ways to define a command in (La)Tex (ignoring the `\let` commands and the LaTeX 3 core and possible others) giving the command name with a leading backslash:   * TeX: `\def`, `\gdef`, `\edef` and `xdef`, all having possibly the prefix `\long`   * LaTeX: `\newcommand`, `\renewcommand`, `providecommand`, `DeclareRobustCommand`, all having possibly the suffix `*`   * etoolbox: `\newrobustcommand`, `\renewrobustcommand`, `providerobustcommand`, all having possibly the suffix `*`   * xparse: `\DeclareDocumentCommand`, `\NewDocumentCommand`, `\RenewDocumentCommand`, `\ProvideDocumentCommand`, all having possibly an `+` in the argument specification There is also the possibility to define a command without a backlash   * TeX: `\expandafter\def\csname name \endcsname` (similar for the commands mentioned for TeX above)   * etoolbox: `\csdef` (similar for the commands mentioned for TeX above) I think the definitions without a backslash have clear advantages:   * more general: allowing to create dynamically named commands (e.g. \csdef{double#1}{#1,#1})   * better semantic: The backslash means _using_ a variable, i.e. expanding it   * shorter: Save one character, do not disturb the eye The question is: Why do the default command definitions need a backlash when it seems more useful to do without? Specifiying the question a bit more: Obviously, the definitions from etoolbox have advantages compared to the TeX ones being much shorter and clearer. The xparse definitions have clear advantages regarding their arguments' flexibility, too. So it seems natural to combine them. If one would define (with `\expandnext` from etextools) a command like               \NewDocumentCommand{\declare}{mmm}{%         \expandnext{\DeclareDocumentCommand}{\csname #1\endcsname}{#2}{#3}%     }      what would one loose? Let us assume, that `new`, `renew` and `provide` would be defined similarly and let us keep the local/global discussion and the possible expansion of the third argument aside, leading to `\gdeclare`, `\edeclare` and `xdeclare` in the long run.


title: How to typeset properly products of glyphs with diacritics in mathmode?

text: I have the product of two quantities with diacritics (`\tilde`, `\hat` and `\bar` \- to be more precise), which give this ugly result. Based on your `PDF` viewer and zoom selection the sight might be more or less of an eyesore. The other problem is the height at which the diacritics appear above the lowercase _v_ , which is horrble when the _d_ is next to it. How can I fix these things? Is there any kind of panacea for all these problems? Here's the code for a few samples:               \documentclass[10pt,a4paper,oneside,reqno]{amsbook}          \usepackage{pxfonts}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}          \begin{document}          \begin{equation}         \begin{split}             \tilde{d}\kern1pt\tilde{i}_c\\             \tilde{d}\tilde{v}_{ap}         \end{split}     \end{equation}          \begin{equation}         \begin{split}             \hat{d}\hat{i}_c\\             \hat{d}\hat{v}_{ap}         \end{split}     \end{equation}          \begin{equation}         \begin{split}             \bar{d}\bar{i}_c\\             \bar{d}\bar{v}_{ap}         \end{split}     \end{equation}          \end{document}      ... and the result: ![enter image description here](http://i.stack.imgur.com/bfUd1.png) **PS** : Using an increased kerning between the factors of the products makes things bearable (i.e. avoids the tildes sticking together), but I think that's a really clumsy hack and I'd like to have a more elegant solution. **PS2** : As per request, a sample of what I'd like to achieve (using `Photoshop` after `LaTeX` `:P`). Granted, the hat floats high above the _v_ , but I prefer it that way. `:)` ![enter image description here](http://i.stack.imgur.com/ch9QI.png)


title: setting section number, etc with counter

text: Originally, I have these types of numbering:               \newtheorem{theorem}{Theorem}[section]     \newtheorem{definition}[theorem]{Definition}     \newtheorem{lemma}[theorem]{Lemma}      \newtheorem{proposition}[theorem]{Proposition}      \newtheorem{corollary}[theorem]{Corollary}      \newtheorem{example}[theorem]{Example}          \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}      Now because of the box theorem function, I modified them to below:               \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{theorem}{Theorem}{mycounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{definition}{theorem}{mycounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{lemma}{theorem}{mycounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{proposition}{theorem}{mycounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{corollary}{theorem}{mycounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{example}{theorem}{mycounter}          \renewcommand{\themycounter}{\arabic{section}.\arabic{mycounter}}          \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}      My numbering system is now messed up. For example: Hope I am right in explaining like this: Originally, before I add in the function that will "box theorem" I have the following numbering system: Chapter I, Section 1, Theorem 1 will be identified as Theorem 1.1. If you use eqnarray then it will be listed as I.1.1. For subsection, there is no effect, the theorem number will just move on like Theorem 1.2, Theorem 1.3 and so forth but once I have new section, the cycle will restart, in other words Theorem 2.1, Theorem 2.2, etc and when using eqnarray, I will have I.2.1, I.2.2   Now in the second chapter, the theorem will be II.1.1 for Chapter 2, Section 1, Theorem 1, and so forth. But now after I add in the "box theorem" function, my numbering messed up in other words the theorem just move on like. 1.1, 1.2, 1.3 then 2.4, 2.5, 2.6 rather than 2.1, 2.2, 2.3. ## ORIGINAL HEADER               \documentclass[11pt,a4paper,twoside]{report}     \usepackage{t1enc,mathrsfs,latexsym,amsmath,amsxtra,amsthm,amssymb,makeidx,graphics}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     %\usepackage{arabtex}     %\pagestyle{plain}     \usepackage{graphicx}     \usepackage{color, fontenc, titlesec,amsfonts}      ## MODIFIED HEADER               \documentclass[11pt,a4paper,twoside]{report}     \usepackage{t1enc,mathrsfs,latexsym,amsmath,amsxtra,amsthm,amssymb,makeidx,graphics}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     %\usepackage{arabtex}     %\pagestyle{plain}     \usepackage{graphicx}     \usepackage{color, fontenc, titlesec,amsfonts,boiboites}


title: Beamer: increase radius of circle in TOC and include subsection bullet

text: I am trying to increase the radius of the circle in the TOC of a beamer presentation and include a subsection bullet. The beamer manual states gives an example of `\setbeamertemplate{some beamer element}[circle]{3pt}`, but that breaks the MWE below. Essentially, the "ball" innertheme does exactly what I want (a nice large circle and a bullet for the subsection), but I do not like the graphic at all. I would just like to use "normal" bullets.               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Warsaw}       \setbeamercovered{transparent}     }          \setbeamertemplate{section in toc}[circle]%{3pt}     \setbeamertemplate{subsection in toc}[circle]          \begin{document}          \begin{frame}{Outline}       \tableofcontents     \end{frame}          \section{Introduction}          \subsection{First Subsection Name}          \section{Test}          \subsection{Second Subsection}          \begin{frame}{Make Titles Informative.}     \end{frame}          \begin{frame}{Make Titles Informative.}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/gEeNK.png)


title: Problems in creating graphs using dataplot

text: I have four simple databases: **db1**               dy,volume     2009,120000     2010,160000     2011,400000     2012,650000     2013,1000000     2014,1500000      **db2**               dy,volume     2009,400000     2010,500000     2011,1600000     2012,2200000     2013,2500000     2014,4000000      **db3**               dy,volume     2009,100000     2010,120000     2011,150000     2012,160000     2013,400000     2014,1000000      **db4**               dy,volume     2009,250000     2010,400000     2011,750000     2012,900000     2013,1400000     2014,3000000      And with these four files I like to create a simple graphical representation like **this**. I am using `dataplot` package for this purpose. And here is my source file: **test.tex**               \documentclass{book}     \usepackage{dataplot}     \begin{document}     \DTLloaddb{db1}{db1.csv}     \DTLloaddb{db2}{db2.csv}     \DTLloaddb{db3}{db3.csv}     \DTLloaddb{db4}{db4.csv}          \begin{figure}[htbp]     \centering     \DTLplot{db1,db2,db3,db4}{x=dy,y=volume,     width=3in,height=3in,style=lines,legend,legendlabels={Legend1,Legend2,Legend3,Legend4},     xlabel={Year},ylabel={Volume},box,     xticpoints={2009,2010,2011,2012,2013,2014}     }          \caption{A simple graph}          \end{document}      But, I am getting this error over and over saying:               Package datatool Error: Can't assign \DTLthisX : there is no key `dy' in database `db1'.      If there is someone who could help me out in this regard, either pointing my error or any useful information to handle this. One more question: As my database contains huge numbers (i.e., `> 100000`), how can I manage to show this on `y-axis` as `100k` and so on. Where `k` denotes a `kilo`. Any ideas.


title: Vertical spacing within float

text: I have a `table` in which I want to include two `tabular` elements one below the other (and justified right). Right now I have this code, that displays exactly what I want.. I would like to add some spacing between the two tabulars.               \documentclass{article}          \begin{document}     \begin{table}       \begin{tabular}{cc}          1 & 2 \\       \end{tabular}       \\ \hfill       \begin{tabular}{cc}          3 & 4 \\        \end{tabular}     \caption{two tables}     \end{table}     \end{document}      I tried to put `vspace` between the two tabulars, but it adds me the vertical space between the second one and the caption


title: Import external eps into pgfplot

text: I have some flow image files in `.eps` format which I would like to import in pgfplots. What is the practical way to do so?


title: Emulating amsmath's \varGamma...\varOmega with unicode-math

text: While recompiling old documents with XeLaTeX and `unicode-math` I have run into the two problems:   1. The amsmath `\varGamma...\varOmega` macros for slanted uppercase Greek math characters are not defined. A simple `\let` substitution can at least provide characters, but it does not give the required italic characters with the `math-style=TeX` option. Some font packages have options to change the default uppercase Greek chars to italics (`math-style=ISO` equivalent), then the `\varGamma...` are defined to give upright chars. I would like to define these macros to behave consistently with the `amsmath`/LaTeX definitions.   2. The `\bm` macro form the `bm` package is the "best" way to obtain bold math in LaTeX. Without replacing all the `\bm` macros in the document, a `\let\bm=\mathbf` seem to work with `unicode-math`, but I do not know about potential pitfalls. The problem is that all these macros are written in Latex3 programming style, which is way above my knowledge level.               \documentclass{article}     \usepackage{ifxetex}     \usepackage{amsmath}% for uppercase greek slanted variants     \ifxetex         \usepackage{xltxtra}         \def\mathstyle{TeX}   % or ISO         \usepackage[math-style=\mathstyle,                     bold-style=\mathstyle,                     vargreek-shape=TeX                    ]{unicode-math}         \defaultfontfeatures{Ligatures=TeX}         \setmainfont{TeX Gyre Pagella}         \setmathfont{Asana Math}         \let\bm\mathbf         \AtBeginDocument{             \let\varGamma  \mitGamma             \let\varDelta  \Delta             \let\varTheta  \Theta             \let\varLambda \Lambda             \let\varXi     \Xi             \let\varPi     \Pi             \let\varSigma  \Sigma             \let\varUpsilon\Upsilon             \let\varPhi    \Phi             \let\varPsi    \Psi             \let\varOmega  \Omega}     \else         \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}         \usepackage{textcomp}         \usepackage{mathpazo}         \usepackage{bm}     \fi     \begin{document}     \ifxetex         \XeLaTeX{} (\texttt{math-style=\mathstyle})     \else         \LaTeX     \fi     \medskip          \verb+\Gamma...\Omega+\par     $\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$\quad     $\bm{\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega}$     \medskip          \verb+\varGamma...\varOmega+\par     $\varGamma\varDelta\varTheta\varLambda\varXi\varPi\varSigma\varUpsilon\varPhi\varPsi\varOmega$\quad     $\bm{\varGamma\varDelta\varTheta\varLambda\varXi\varPi\varSigma\varUpsilon\varPhi\varPsi\varOmega}$          \end{document}      ![enter image description here](http://i.stack.imgur.com/6lswC.png) ![enter image description here](http://i.stack.imgur.com/nmnCR.png) ![enter image description here](http://i.stack.imgur.com/gtT3e.png)


title: Problem to print a pdf

text: The problem appears with two Lexmark printers. A friend compiled this example of my package tkz-euclide:               \documentclass[a4paper]{article}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tkz-euclide,fullpage}     \definecolor{fondpaille}{cmyk}{0,0,0.1,0}     \pagecolor{fondpaille}     \color{Maroon}          \begin{document}        \begin{tikzpicture}         \tkzInit[xmin=-6,ymin=-6,xmax=6,ymax=6]         \tkzClip          \tkzDefPoint(0,0){O}          \tkzDefPoint(132:5){A}         \tkzDefPoint(4,0){B}         \foreach \ang in {5,10,...,360}{%           \tkzDefPoint(\ang:4){M}           \tkzDefLine[mediator](A,M)  \tkzGetPoints{i}{j}           \tkzDrawLine[color=magenta,add= 4 and 4](i,j)           }     \end{tikzpicture}     \end{document}       ![compilation result](http://i.stack.imgur.com/3yvnX.png) With the first printer, the print is ugly, we get a small rectangle of ink, and the other printer stops to print and displays a red light. :( I have never encountered such a problem and I do not know what to say. What kind of problem arrives? My code perhaps gives an ugly pdf document and some printers don't accept it. Perhaps some drivers are not very good. How to analyse this kind of problem? Is it a problem with TeX or with the printer? How to establish the diagnosis?


title: \setbool not respected in footnote?

text: Can someone explain why `\setbool` (from `etoolbox`) is not respected when used in a command _only_ used in a footnote?               \documentclass[12pt]{article}          \usepackage{etoolbox}     \newcommand{\longshort}[1][]{%       \providebool{ls}%       \ifbool{ls}%       % bool = true = not first time       {This is the #1 time\ldots}%       % bool = false = first time       {This is the first time the command is used!}%       \setbool{ls}{true}%     }          \begin{document}          1:% \longshort%     \footnote{\longshort[2nd]}          2:% \longshort[3rd]     \footnote{%     % \providebool{ls}%   uncomment these two lines to get     % \setbool{ls}{true}% expected behaviour     \longshort[4th]}          \end{document}


title: Change caption font size

text: I want to change the font size of a single rotated table caption (definitely **not** all the captions in all my tables/figures) Right now I can wrap the text inside the `\caption` around a `\scriptsize{}` command, but that will change the font also in the _Tables Index_ which is **really bad**. I'm compiling with `pdflatex`. Here's what the table looks like:               \begin{landscape}      \begin{table}       \centering       \footnotesize{        \begin{tabular}{l|c|c|}        \hline        blah & blah & blah        \hline        \end{tabular}       }       \caption{Lots of words...}       \label{table-label}      \end{table}     \end{landscape}


title: Is it possible to use a TikZ matrix along a chain?

text: Is it possible to use a TikZ `matrix` along a `chain`? The following code attempts to create a chain consisting of a `node`, a `matrix`, and another `node`.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{positioning,chains}          \begin{document}          \begin{tikzpicture}[start chain]       \node [on chain] {XYZ};            \matrix [on chain]       {         \node {A}; \\         \node {B}; \\         \node {C}; \\       };            \node [on chain] {123};     \end{tikzpicture}          \end{document}      However, if I try to compile, I get the error "Package pgf Error: No shape named chain-2 is known." (Interestingly, if I remove the final node so that nothing follows the matrix, then it compiles without error.) Why does this error occur? Of course, it is straightforward enough to use the `positioning` library directly. So, mostly, I am interested in this question for its own sake; I don't have an important, specific use in mind where chains of matrices would be critical.


title: Root within square root symbol

text: how can I avoid that the following expression               \documentclass[a4paper,fontsize=14pt]{scrbook}       \usepackage{mathtools}     \usepackage{lmodern}     \begin{document}     \begin{align}         a = \sqrt[m]{\sum_{i=1}^{n}b_{i}^m}.     \end{align}     \end{document}      is displayed in this form ($m$ is cut by the root symbol): ![enter image description here](http://i.stack.imgur.com/ZyLVz.png) Thanks for you help.


title: Description list for equation's terms

text: I'm trying to create a custom description environment (using `enumitem`) so I can describe the terms of an equation. What I want is to define item labels that are defaulted to inline math mode, and also to horizontally align the list to the right hand side of the items described, as in this example (without the colons): ![enter image description here](http://i.stack.imgur.com/4pRxR.png) I'm aware of the solutions given here (in fact, I pulled the image from that post), but I'm required to use `enumitem` (not using `tabular`, `array`, etc.) and the `enumitem` solution doesn't quite do what I want. So, how can I define a custom description list like that? I've tried using the package's documentation, but haven't been able to do it.


title: How to squeeze a formula inside a text in latex?

text: I type some formula in latex inside my text, but When I make it pdf I see it is not squeezed. How I can make it squeeze? See the attached, which shows the problem! ![image](http://i.stack.imgur.com/fRAXa.png)


title: Problem with elsarticle and lineno

text: I am using the `elsarticle` class in order to typeset a preprint of an article I am writing. I wanted to add line numbering in order to make the revision easier, so I included the `lineno` package. This is a MWE:               \documentclass[preprint,review]{elsarticle}          \usepackage{lipsum}          % ADDING LINENUMBERS FOR REVIEWING:     \usepackage{lineno}         \linenumbers          \journal{The Name Of The Journal}          \begin{document}          \begin{frontmatter}          \title{The Tile Of The Article}          \author[]{Name1 Surname1\corref{cor1}}     \ead{surname1@email.ok}     \cortext[cor1]{Corresponding author. Tel.: WHATEVER; Fax: WHATEVER.}     \author[]{Name2 Surname2}     \ead{surname2@email.ok}     \author[]{Name2 Surname3}     \ead{surname3@email.ok}     \address{Research Structure Name, University Name, Full Postal Address.}          \begin{abstract}     \lipsum[31]     \end{abstract}          \begin{keyword}     Keyword1; Keyword2; Keyword3; Keyword4; Keyword5     \end{keyword}          \end{frontmatter}               \section{Introduction and background}          \subsection{Introduction}          \lipsum[1-5]          \subsection{Background}          \lipsum[6-15]          \subsection{Aims and scope}          \lipsum[16-20]          \section{Conclusions}          \lipsum[21-30]          \section*{Acknowledgements}          Thanks to all!          \end{document}      And this is what I get (1st page, see bottom): ![Elsarticle With Lineno](http://i.stack.imgur.com/pccpK.png) The normal result when removing these two lines in the tex document:               \usepackage{lineno}         \linenumbers      is the following (see the bottom): ![Elsarticle Without Lineno](http://i.stack.imgur.com/aFyim.png) So, author information is overlaped with the bottom line _"Preprint sumbitted to [...]"_. How can I fix this issue??


title: Moderncv package not working

text: I'm trying to make my CV with the moderncv package for the first time... But I don't know what I'm missing and it says "`!Unidentified control sequence \modercvcolor{blue}`" it also says that I'm missing the `\begin{document}` Here is an example of what I'm running.               \documentclass[11pt,a4paper,sans]{moderncv}          %% ModernCV themes     \moderncvstyle{casual}     \moderncvcolor{blue}     \renewcommand{\familydefault}{\sfdefault}     \nopagenumbers{}          %% Character encoding     \usepackage[utf8]{inputenc}          %% Adjust the page margins     \usepackage[scale=0.75]{geometry}          %% Personal data     \firstname{John}     \familyname{Doe}     \title{Resumé title (optional)}     \address{street and number}{postcode city}     \mobile{+1~(234)~567~890}     \phone{+2~(345)~678~901}     \fax{+3~(456)~789~012}     \email{john@doe.org}     \homepage{www.johndoe.com}     \extrainfo{additional information}     \photo[64pt][0.4pt]{picture}     \quote{Some quote (optional)}          \begin{document}     \makecvtitle          \section{Education}     \cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description}  % arguments 3 to 6 can be left empty     \cvitem{title}{ \emph{Title} }     \cvitemwithcomment{Language 1}{Skill level}{Comment}     \cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}     \cvlistitem{Item 1}     \cvlistdoubleitem{Item 2}{Item 3}     %% ...          \bibliography{publications}     \end{document}


title: Error when using the python package

text: I am very new to LaTeX. I need to run `python` package in LaTeX but I can't. I use MiKTeX 2.9 under Windows 7 but the programs gives me this error:               Latex error: ! I can't find file `bin/**filename**.py.out'.          Latex Error: Emergency stop.<read 2> \ end{python}


title: Draw a vertical line on the margin across several pages

text: I want to draw a vertical line on the margin. The line may be able to continue to the next page(s) and must not cut with the end of the current page. I'd prefer to use an environment or something like               \startline     % Text, math, figures etc     \stopline      With the line I'd mark a new or a fixed text for my co-authors. I tried receipt of Matthew Leingang but it didn't work for me.


title: Adding page to the repeated quotation in Historische Zeitschrift Style

text: Does anyone know how to customise Historische-Zeitschrift Style to make it quote the page where the first occurrence appears instead just the footnote number? This is how the default quote looks like now: > See Ath., Ar. 1 (wie Anm. 1), S. 11. and this is what I need to have: > See Ath., Ar. 1 (wie Anm. 1, S. 1), S. 11. Here is my MWE:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1998,         Address = {Berlin/New York},         Author = {{Athanasius Alexandrinus}},         Booktitle = {Athanasius Werke - Die dogmatischen Schriften},         Call-Number = {TH: Vb 17.02-1.1.2},         Date-Added = {2010-10-16 13:24:30 +0200},         Date-Modified = {2014-03-13 17:12:32 +0000},         Editor = {Marin Tetz and others},         Keywords = {source},         Pages = {109-175},         Publisher = {Walter de Gruyter},         Read = {No},         Series = {Urkunden zur Geschichte des Arianischen Streites 318-328},         Shortauthor = {Ath.},         Shorttitle = {Ar. 1},         Title = {Oratio I contra Arianos},         Volume = {1, Tl. 1, Lfg. 2},         Year = {1998}}     @incollection{evagrius2011,         Address = {Paris},         Author = {{Evagrius Scholasticus}},         Booktitle = {{\'E}vagre Le Scholastique: Histoire Eccl{\'e}siastique - Livres I-III},         Call-Number = {TH: Va1.05/542},         Date-Added = {2013-08-24 12:11:20 +0000},         Date-Modified = {2014-03-30 11:54:31 +0000},         Editor = {Joseph Bidez and Leon Parmentier},         Keywords = {source},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {Evagr.},         Shorttitle = {h.e.},         Title = {Historia ecclesiastica},         Volume = {542},         Year = {2011}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \makeatletter     \renewbibmacro*{footcite}{%       \global\boolfalse{cbx@loccit}%       \global\boolfalse{cbx@seenote}% NEW!       \ifciteseen         {\iffieldundef{shorthand}            {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}               {\usebibmacro{footcite:ibid}}               {\usebibmacro{footcite:note}}}            {\usebibmacro{footcite:shorthand}}}            {\iffieldundef{usera}              {\usebibmacro{footcite:full}}{\printnames{author}%            \setunit{\addcomma\space}%            \printfield{title}\isdot%              {\setunit{\addcomma\space}%               \usebibmacro{in:}%               \printfield{usera}%               \setunit*{\addspace}%               \printfield[default]{volume}}}}          \usebibmacro{footcite:save}}     \makeatother     %     \begin{document}     \blindtext\footcite[See][S. 56]{athanasius1998}     \blindtext\footcite[See][S. 22]{evagrius2011}     \pagebreak     \blindtext\footcite[See][S. 11]{athanasius1998}     \blindtext\footcite[See][S. 12]{evagrius2011}     \end{document}      Thanks for help in advance!


title: Count words separated with comma in macro

text: I need to count number of words in a macro defined as follow:               \def\columnNames{MATRIX, METHODA, METHODB}      I manually set number of words as follow:               \pgfmathsetmacro\numberOfColumns{3}      I need an automatic way to find number of words in a macro. The list is separated with commas ",". I have found several solutions (1,2,...). However, I was not able to adapt to my situation.


title: Bibtex author name - unusual use case

text: I need to cite a paper whose author apparently wishes to be known as `"A.James Hancock"` (I changed the actual name). How do I get the `abbrv` style to produce that? I keep getting `A.Hancock`.


title: Why is \Cline increasing the font size in my equations?

text: **The Problem** When I use `\Cline` to underline a symbol in my equation, it increases the font size of that symbol. Edit: I don't want this to happen, rather, I would like all of my subscripts to be the same size, regardless of whether they are underlined or not. **Minimum Working Example**               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{xcolor}     \newsavebox\MBox     \newcommand\Cline[2][red]{{\sbox\MBox{$#2$}%     \rlap{\usebox\MBox}\color{#1}\rule[-1.2\dp\MBox]{\wd\MBox}{0.85pt}}}          \begin{document}     \begin{equation}         \bar{\nabla}_{\!\mu}h_{\Cline{\rho\sigma}}     \end{equation}         \end{document}      **Edit - Follow-up Question: The Cherry on the Cake** Would it be possible to achieve the right-hand-side of the following image? ![enter image description here](http://i.stack.imgur.com/8s0C4.png) At the moment, egreg's code (see below) will give the left-hand-side output for the code               \begin{equation}     \bar{R}_{\tau\Cline{\sigma}\nu\Cline{\rho}}     \end{equation}      This is a marked improvement on the look to the output of the MWE above. However, I think it looks nicer if all the `Cline` lines are 'at the same level to the eye'.


title: How can I ensure all teletype/monospaced text is in a certain color?

text: I'm trying to include some monospaced text, and I'd like it to be in a different color than the normal text. There will be several (read: hundreds) of instances of monospaced text, and I want it all to be in a certain color. I'm relatively new to LaTeX (only started using it in the last 8 months or so), so I can't offer much in the way of research. I've imported the `color` package, so far. I'm looking for all instances of `\texttt` and `\verb` to be in a certain color, without having to type `\color` in front of all of them.


title: Four Language Parallel Column Book

text: I am trying to format a four column parallel text in four different languages to display on two pages with two columns per page. I have tried using `ledpar` and parallels but I cannot get it to work. I tried using opposing pages and then using a two-column `tabular` on each page to display the four languages, but `tabular` isn't supported by either `ledpar` or `parallels`. Using the `tabular` environment inside of `ledmac` won't work because it does not support line breaks inside a cell. Is there a way to display my text so each corresponding paragraph appears at the same horizontal location across the columns and pages? Any help or ideas as to which direction to go would be appreciated.


title: Memory limit reached - Precompile .tikz plots - How to output pdf with papersize near to image

text: Okay, well I have a problem my `.tex` file has reached the memory limit. Now I tried to change the memory limit `/usr/share/texmf/web2c/texmf.cnf` however that does not work. It keeps saying `pdflatex> ! TeX capacity exceeded, sorry [main memory size=3000000]`. From which I conclude the setting is not readed by the compiler. A little background info... I have installed texlive twice... yes twice (at least I think I have). I first installed it using the texlive packages in the UbuntuSoftwareCenter. And recently I tried to install it, because of the I want to make use of the `tlmgr` command, by the following description, How to install "vanilla" TeXLive on Debian or Ubuntu?. However I think the installation failed, because I still can not use the `tlmgr` command. Back to topic. Now with matlab and matlab2tikz I generated a `.tikz` plot which is 44.3mb o_O yes I know 44.3mb lol now I still want to have this `.tikz` plot compiled so all my plots look the same. Now I was thinking of precompiling all the plots single handed and then use the `.pdf` in my `.tex` file instead of the `.tikz` file. Now when I compile this however the `.pdf` will just be a4paper size and a plot in the middle. I want to know how latex can compile a `.pdf` with just a 1cm boundary to the plot, like you see in those `.tikz` examples on texample.net, http://www.texample.net/tikz/examples/dandelin-spheres/. Note: I already tried to only compile the 44.3mb `.tikz` image single handed and it failed :-(, this does not mean I don't want a answer to the question asked, because it is still usefull for me to know how to generate a `.pdf` in latex with a paper-size close image, but if anyone has a suggestion on how to compile the 44.3 mb `.tikz` plot feel free to comment.


title: Random output at the end of gloss entries

text: I'm getting a weird output at the end of gloss entries. When I remove that entry, all of a sudden that output seems to just be floating randomly and I cannot find the source. The input will be:               @gd{abbreviationsandacronyms,     word = {abbreviations and acronyms},     definition = {A few universally recognized abbreviations are required (and preferred) in some circumstances, such as TA or RA. Some others are acceptable depending on the context. But in general, do not use abbreviations or acronyms which the reader would not quickly recognize.\par     Acronyms should be capitalized with no periods in front of the letters. There should be a period at the end of abbreviations, such as Dem. for Democrat.\par     Do not follow an organization's full name with an abbreviation or acronym in parentheses or set off by dashes. If an abbreviation or acronym would not be clear on second reference without this arrangement, do not use the abbreviation or acronym.\par     For time references, use am and pm without periods. For more help, see \g{timeanddatereferences}.\par     In numbered addresses, use the abbreviations Ave., Blvd., and St. for numerical addresses: \emph{1600 Pennsylvania Ave.} In all other cases, fully spell out the street name.}     }      And the output will be: ![enter image description here](http://i.stack.imgur.com/qD1q2.jpg) with the number being apparently random in each case. e.g. ", p. 1." I'm using the package gloss. Thanks for any help!


title: Undefined control sequence with Color Package in Custom LaTeX document class

text: I have the following class file shown here:               %     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{puseniorthesis}              [2008/05/02 v1.4.1 Princeton University Thesis class]          \RequirePackage{setspace}     \RequirePackage{zref-totpages}          %report type option     \newif\if@progress     \@progressfalse     \DeclareOption{progress}{\@progresstrue}                    %copy type option     \newif\if@filecopy     \@filecopyfalse     \DeclareOption{filecopy}{\@filecopytrue}     \newif\if@advisercopy     \@advisercopyfalse     \DeclareOption{advisercopy}{\@advisercopytrue}     \newif\if@readercopy     \@readercopyfalse     \DeclareOption{readercopy}{\@readercopytrue}          %abstract     \long\def\@abstract{\@latex@error{No \noexpand\abstract given}\@ehc}          %frontmatter numbered with roman numerals, mainmatter with arabic     \newcommand*{\frontmatter}{       \pagenumbering{roman}      }     \newcommand*{\mainmatter}{\pagenumbering{arabic}}     \newcommand*{\backmatter}{\pagenumbering{Roman}}     \newcommand*{\makelot}{}     \newcommand*{\makelof}{}     \newcommand*{\makelos}{}     \newcommand*{\begincmd}{     \onehalfspacing     \frontmatter\maketitlepage\makecopyrightpage\makeabstract     \makeacknowledgements\makededication\tableofcontents\clearpage     \makelot\clearpage\makelof\clearpage\makelos     \clearpage\mainmatter     \renewcommand{\baselinestretch}{1.5}     }          %define required vars     \def\@deptpref{Department of}     \def\departmentprefix#1{\gdef\@deptpref{#1}}     \def\classyear#1{\gdef\@classyear{#1}}     \def\adviser#1{\gdef\@adviser{#1}}     \def\reader#1{\gdef\@reader{#1}}     \def\dept#1{\gdef\@dept{#1}}     \def\submitdate#1{\gdef\@submitdate{#1}}     \long\def\acknowledgements#1{\gdef\@acknowledgements{#1}}     \def\course#1{\gdef\@course{#1}}          %define optional vars     \def\dedication#1{\gdef\@dedication{#1}}     \def\extranotes#1{\gdef\@extranotes{#1}}     \extranotes{}               %title page     \newcommand{\maketitlepage}{{       \thispagestyle{empty}       \sc       \vspace*{0in}       \begin{center}         \LARGE \@title       \end{center}       \vspace{.1in}       \begin{center}        \large \@author,~\@classyear       \end{center}       \vspace{.3in}       \begin{center}        Submitted to the\\         \@deptpref~\@dept\\          Princeton University \\        in partial fulfillment of the requirements of\\        Undergraduate Independent Work.\\         \vspace{.3in}        \if@progress        Progress Report\\        \else        Final Report\\        \fi       \vspace{.3in}         \@submitdate       \end{center}            \vfill           % \begin{flushright}      \hangindent=11.5cm\hangafter=0       \noindent\@adviser\\       \@reader\\       \@course\\       \ztotpages \,  pages\\       \if@filecopy        File Copy       \fi       \if@advisercopy        Adviser Copy       \fi        \if@readercopy        reader Copy       \fi       \ifx\@extranotes\@empty         \relax       \else          \\ \@extranotes\\       \fi      % \end{flushright}            \clearpage       }}           %copyright page     \newcommand*{\makecopyrightpage}{       \thispagestyle{empty}       \vspace*{0in}       \begin{center}         \copyright\ Copyright by \@author, \number\year. \\         All Rights Reserved       \end{center}            This  \if@progress progress report       \else       thesis        \fi        represents my own work in accordance with University regulations.             %\vspace{1in}        %\@author \hspace{0.5cm} \makebox[2in]{\hrulefill}            \clearpage}     \newcommand*{\makeabstract}{       \newpage       \addcontentsline{toc}{section}{Abstract}       \begin{center}       \Large \textbf{Abstract}       \end{center}       \@abstract       \clearpage       }            %acknowledgements     \def\makeacknowledgements{       \ifx\@acknowledgements\undefined       \else         \addcontentsline{toc}{section}{Acknowledgements}         \begin{center}           \Large \textbf{Acknowledgements}         \end{center}         \@acknowledgements         \clearpage       \fi       }            %dedication page     \def\makededication{       \ifx\@dedication\undefined       \else         \vspace*{1.5in}         \begin{flushright}           \@dedication         \end{flushright}         \clearpage       \fi       }           %various optional lists      \DeclareOption{myorder}{       \renewcommand*{\begincmd}{       \onehalfspacing       }}     \DeclareOption{lot}{\renewcommand*{\makelot}{       \addcontentsline{toc}{section}{List of Tables}\listoftables}}     \DeclareOption{lof}{\renewcommand*{\makelof}{       \addcontentsline{toc}{section}{List of Figures}\listoffigures}}     \DeclareOption{los}{       \renewcommand*{\makelos}{         \newcommand*\l@symbol{\@dottedtocline{1}{1.5em}{3.5em}}         \addtocontents{los}{\protect\addvspace{10\p@}}%         \chapter*{List of Symbols\@mkboth {LIST OF SYMBOLS}{LIST OF SYMBOLS}}         \@starttoc{los}         \addcontentsline{toc}{section}{List of Symbols}       }     }     \def\addsymbol#1#2{%         \addtocontents{los}{\protect \contentsline {symbol}{\protect \numberline {#1}{\ignorespaces #2}}{\thepage}}     }          %inherits report class and associated options     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}     \ProcessOptions     %% Not necessary to specify the point size - we inherit it from above     %% \LoadClass[12pt]{report}     \LoadClass{report}     \setlength{\oddsidemargin}{.5in}   %{.4375in}     \setlength{\evensidemargin}{.5in} %{.4375in}     \setlength{\topmargin}{-.5in}  %{-.5625in}     \setlength{\textheight}{9in}     \setlength{\textwidth}{6in}     \long\def\abstract#1{\gdef\@abstract{#1}}     \AtBeginDocument{\begincmd}     \endinput     %%      %% End of file `puthesis.cls'.      The problem is that when I try and us a simple thing like `\usepackage{color}` I run into the issue that:               ! Undefined control sequence.     \set@color ...\@pdfcolorstack push{\current@color     }\aftergroup \reset@color     l.55 \begin{document}      However when I do the following with just the `article.cls` file I have no issue:               \documentclass{article}          \usepackage{listings}     \usepackage{color}     \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}     \lstset{         language=c,         basicstyle=\scriptsize,         upquote=true,         aboveskip={1.5\baselineskip},         columns=fullflexible,         showstringspaces=false,         extendedchars=true,         breaklines=true,         showtabs=false,         showspaces=false,         showstringspaces=false,         identifierstyle=\ttfamily,         keywordstyle=\color[rgb]{0,0,1},         commentstyle=\color[rgb]{0.133,0.545,0.133},         stringstyle=\color[rgb]{0.627,0.126,0.941},     }          \begin{document}          \begin{lstlisting}          #include <stdio.h>          int main()      {         // A line comment         printf("A really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, REALLY long line. && & \n");         return 0;     }          \end{lstlisting}          \end{document}      So is there something in the `puseniorthesis.cls` I need to add so that `color` package works properly? **EDIT** : The exact code that I am using that causes the error is here;               \documentclass[lof,lot,los,12pt,advisercopy]{puseniorthesis}     %options to class:     % lof - generate list of figures     % lot - generate list of tables     % Xpt - font size     % filecopy - note that this is 'File Copy' on title page     % advisercopy - note that this is 'Adviser Copy' on title page     % readercopy - note that this is 'Reader Copy' on title page     % progress - change title page to say 'Progress Report' instead of 'Final Report'          \usepackage{graphicx} %need for \includegraphics     \usepackage{amsmath}          \usepackage{listings}     \usepackage{color}     \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}     \lstset{         language=c,         basicstyle=\scriptsize,         upquote=true,         aboveskip={1.5\baselineskip},         columns=fullflexible,         showstringspaces=false,         extendedchars=true,         breaklines=true,         showtabs=false,         showspaces=false,         showstringspaces=false,         identifierstyle=\ttfamily,         keywordstyle=\color[rgb]{0,0,1},         commentstyle=\color[rgb]{0.133,0.545,0.133},         stringstyle=\color[rgb]{0.627,0.126,0.941},     }          %required inputs:     \author{My Name}     \classyear{`13}     \adviser{My Adviser}     \reader{My Reader}     \title{Thesis Title}     \dept{Mechanical and Aerospace Engineering}     \submitdate{May 2, 2013}     \course{MAE something}     \abstract{\input abstract} %read from file abstract.tex          %optional inputs (any of these can be omitted)     \extranotes{These are a few lines of optional notes}      \dedication{To myself.}     \acknowledgements{Thank you very much.}          \numberwithin{equation}{section}          \begin{document}          %\include{ch1} %read from file ch1.tex     %\include{ch2} %read from file ch2.tex          %\appendix          %\include{app1}  %read from file app1.tex               \end{document}


title: How to compare two TeX codes and mark differences with color

text: I would like to find easy tool, which compares two TeX codes and generates a PDF file of the first code, in which the differences from the second code are marked by a given color. I use winedt 7.0 under windows 7. I just noticed that latexdiff provides what I need. As far as I understand it is included in Miktex. Is there an interface (menu commands) in winedt 7.0, which allow to work with latexdiff ?


title: Identifying a single math symbol

text: I would like to reproduce the following symbol: ![A curvy L](http://i.stack.imgur.com/7ITLy.jpg)   * The proof wiki does not seem to refer to that symbol,   * I did not find any font corresponding in the Math alphabets and the mathalfa package by Michael Sharpe   * My pdf reader tells me that the embedded fonts are  ![The fonts embedded according to my pdf readerWrite Math](http://i.stack.imgur.com/N7YIA.png) _But that is related to the OCR technique and does probably not reflect the font actually used._   * What the font was not really conclusive: ![What the font suggestion 1](http://i.stack.imgur.com/CTY40.png) ![What the font suggestions 2](http://i.stack.imgur.com/zrQhu.png)   * Detextify and Write Math were of no help.   * I did not manage to find it in the LaTeX font catalogue nor in the The Comprehensive LATEX Symbol List Does someone have an idea? Do I miss something? _EDIT_ : in context, ![The symbol in context](http://i.stack.imgur.com/4UsH9.png) _EDIT 2_ : when I copy / paste that symbol from my pdf viewer, it yields a `2`, could that be a `2`? It really looks like an `L`! _That also is probably related to some error of the OCR._


title: How do I add an acknowledgement to author as numbered footnote and a footnote to title as symbol footnote?

text: I need to add a footnote with a * to the title and begin numbered footnotes with the aknowledgements. I have seen individual solutions to all these but never the combination. So far I have attempted this combination:               \patchcmd{\maketitle}{\@fnsymbol}{\@arabic}{}{}     \patchcmd{\maketitle}{\setcounter{footnote}{0}}{}{}{}          \newcommand{\footstar}[1]{$^*$\footnotetext{$^*$#1}}     \title{TITLE \footstar{Manuscript received February 2012; revised May 2013.}}          \author{AUTHOR \thanks{THANKS} \\ INSTITUTION}      However, when I do this I get a '0' before the '*' footnote.


title: How to draw an optical lattice

text: I want to make in TikZ or MetaPost an image of a two dimensional lattice with oscillations like these: ![optical lattice](http://i.stack.imgur.com/R6tb9.jpg) ![another optical lattice](http://i.stack.imgur.com/o71mC.jpg) (Source: http://www.uibk.ac.at/th-physik/qo/research/opticallattices.html) or this one: ![yet another optical lattice](http://i.stack.imgur.com/nUnyg.jpg) (Source: http://news.sciencemag.org/sciencenow/2008/09/12-01.html) I don't know even know how to begin.


title: directories usr/texmf

text: Sorry about the newbie question!! As a background: I am running Texshop and sometimes Texmaker on OSX 10.9.2 I have used a package called leipzig over the last 2 years. As instructed I have saved it into > /Users/MYNAME/Library/texmf/tex/latex Everything worked well until I did an update of all the packages in TexUtility a week ago. Apparently the package comes now with the official distribution. although I cannot actually say whether or not it was installed on my system with this update for the first time or whether it was there before. anyway, I blamed update for the problems I got. So, I deleted the above mentioned folder believing the package would now be simply loaded from the place where all the other packages are stored. I believe this is here: > /usr/local/texlive/texmf-local/tex/latex and indeed the `leipzig` package is there. but now I get an error telling me that `leipzig.tex` is not found. although it is there. so, I copied the folder back to its original place (from the trash bin). but now it tells me that all the `\newcommand` have been assigned already. This seems like it is loaded twice or from different places? Can anybody help me with this? and maybe explain to me why the package won't load from the place where TexUtility updates/saves the files to? My understanding is that the directory > /Users/MYNAME/Library/texmf/tex/latex is used for non-official packages (or the ones which I am tweaking on some way). is this the case? the other directory > /usr/local/texlive/texmf-local/tex/latex is used for official packages. shouldn't Texmaker or Texshop find both? How are these kept apart? Any suggested readings on this topic?


title: TikZ picture overlaps with text

text: I have a TikZ picture that overlaps with the text. I'm sure this one is easy, but I didn't find a solution. Here is a snapshot: ![enter image description here](http://i.stack.imgur.com/X0HtQ.png) And this is the code:               \section{Algorithm Outline}          blabla          \begin{figure}[H]     \selectlanguage{american}%     \begin{centering}     \ttfamily            \begin{tikzpicture}[node distance = 2cm,      auto, x=1cm, y=1cm,  transform canvas={scale=0.62},     >=stealth]           [picture code]          \end{tikzpicture}     \par\end{centering}          \selectlanguage{english}%     \caption{Algorithm Outline}     \end{figure}               The focus of this paper is on finding a feasible and good ....      I hope someone has a solution. This post is slightly different than TikZ picture overlaps with text (not wanted)


title: Is there a way to make a certain character in a Verbatim have a certain formatting?

text: I am writing this report on a computing simulation of the Ising model. I am pressenting lattice configuration samples, which are just an array of "+" and "-". This is done in order to visualize the different "magnetic domains" which means I really want the "+" and "-" to stand out from each other. So I was wondering if there was an automated way for LaTeX to colour or, even better, highlight a certain character only within a verbatim. I am actually currently importing it from an external text file using _VerbatimInput_ from the package _fancyvrb_ So my code is:               \documentclass[a4paper,11pt]{article}     \usepackage{fancyvrb}     \usepackage{graphicx}     \usepackage{caption,subcaption}     \usepackage{relsize}          % redefine \VerbatimInput     \RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}%     {fontsize=\relsize{-3}     }          \begin{document}              \begin{figure}[!ht]         \centering         \begin{subfigure}{0.5\textwidth}           \centering           \VerbatimInput{\detokenize{j0.2000_B0.0000_sweeps500_avaft100}}              \caption{$\frac{J}{kT}=0.2$}         \end{subfigure}         \end{figure}          \end{document}      I am compiling with XeLaTeX. The grid file is:               - - + - + - - - + - + - - - - - + + + + + - + + + - + + + -     + - - + + - - - + + - + - + + + - - + + + + + + - + + - - +     - + - - - + - - + - + + + + + - + - + - - + - + - + + - + -     + - + - - - + + + + - + - + + - + + + - + + - - + + - + + +     + - + + + + + + + + - - + + - + + + + - + + + + + + + + + -     - - - + + + + - - + - - + - - - + + - - - - + - - - + + + -     - - - + - - - - - - + - + - - + + - - + + - + + + + + - - +     + + - - - - - - + + + - - - + - - + - - - + + + - + - - + -     + - - + + + - + + + - - + - - + - + - + + + - - - - - - - +     - + - - + - + + - + + - + - - - - - - + - - + - - + + + + +     - - - - - - - + + - - - + + - - + + - - - + - + - + - - - +     + + + + + + - - + + + - + - - + - + - + + + + - - + + - + +     - + - + - + - + + + - + + - - - + + + + + - + - + - + - + -     - - + + + - - + + + + + - - - + + + - - - - - + - + + + - -     + + + + - + + - - - + - - + + - - - + + - + + - + - + - - -     - + - + + + + + + - + - + + + + - - - + + + - + - + + - - +     + + + + + - + + - - + + - - - + + + - + + - - + + + - - - -     + + + + + - - + + + - - - - - + + + - + + + + + + - + - - +     - + - + + + + + - - - + + - + - + - - - + - - + + - - - - -     - - + - - + - + + + + + - - - - - - + + - + + + + - - + + +     + - + + - - + + + - - + + - + + - - - + + - - + + + - + + +     + - - + + - - - + - + - + + + + + - - - + + - - - - + + - -     - + + + - + + + + + - - + - + + + - + + - - + + + + + + + +     - + + + + + - + - + - - - - - + + + + + - - - - + - + + - +     - + + - - + + + - + - - + + - + + + - + - - + - + - + + + +     - - - - - - + - + + + + + + - - + + - + + + + + - - - + + -     - - + - - - + - - + - - - + - + - - + - - + + + - - + + + -     - - + - - - - - - + - - + + - + - + + - - + + - - + - - + +     - - - - + - - - - + - - - + - - - + - - - + + + - + + - - +     + + - - - - - + + + - + - + - + - + - + - + + + + - + - - +


title: Strike out a table cell

text: I'm trying to strike out cells in a table, **without** specifying the cell width. To do so, I looked at the code of `colortbl` as this seems to a very decent job with filling cells. Now I played around with all those `\@tempdim` but without any success. Honestly I have no idea what I'm doing. > ![enter image description here](http://i.stack.imgur.com/RALkw.jpg) If possible, I'd like to get rid of `tikz`. # What I have tried so far               \documentclass{article}     \pagestyle{empty}% for cropping     \usepackage{tikz,colortbl}     \makeatletter     \newcommand*\notableentry{%         \@tempdima\wd\z@         \advance\@tempdima\@tempdimb         \advance\@tempdima\@tempdimc         \tikz[remember picture]{\coordinate (X) at (-.5\tabcolsep-\@tempdima-\@tempdimb-\@tempdimc,-1.1\tabcolsep);}         \hskip\@tempdima\@plus 1fill         \kern-\tabcolsep         \hskip-\wd\z@ \@plus -1fill         \tikz[remember picture]{\coordinate (Y) at (.5\tabcolsep+\@tempdima+\@tempdimb,\@tempdima-.25\tabcolsep);}     }     \makeatother     \begin{document}     \LARGE     \begin{tabular}{|c|c|}         \hline         alghreaiog & bghsah \\         \hline         cagja & \notableentry \\         \hline         \cellcolor{blue} & edkhaklgjaj \\         \hline     \end{tabular}     \tikz[remember picture,overlay]{%         \draw[red] (X) -- (Y);         \draw[red] (X |- Y) -- (Y |- X);     }          \begin{tabular}{|p{4cm}|p{3cm}|}         \hline         alghreaiog & bghsah \\         \hline         cagja\par bla & \notableentry \\         \hline         \cellcolor{blue} & edkhaklgjaj \par xyz \\         \hline     \end{tabular}     \tikz[remember picture,overlay]{%         \draw[red] (X) -- (Y);         \draw[red] (X |- Y) -- (Y |- X);     }     \end{document}      # Output It seems to work for `c` columns, but fails for all other purposes, while `\cellcolor` always works. > ![enter image description here](http://i.stack.imgur.com/yx0FM.png)


title: How to mimic the behavior of \ncput* but without the unwanted opaque effect?

text: My objective is to have a label with transparent background but any connecting curve passing through the hypothetical box of the label must be hidden. ## Opaque Label `\ncput*` produces an opaque label as follows. So it does not fit into my objective. > ![](http://i.stack.imgur.com/PGW8w.png)               \documentclass[pstricks,multi]{standalone}     \usepackage{pst-eucl}          \begin{document}     \begin{pspicture}[showgrid=false](4,4)         \pstGeonode[PosAngle={90}]             (1,1){A}             (3,3){B}         \ncarc[arcangle=-30,linestyle=dashed,linecolor=gray]{A}{B}       \ncput*[nrot=:0]{$2\sqrt2$}        \end{pspicture}          \end{document}      ## Transparent Label The following is my attempt to mimic the code above but with transparent background for the label. However, I failed to mimic the connecting curve. > ![](http://i.stack.imgur.com/Gondb.png)               \documentclass[pstricks,multi]{standalone}     \usepackage{pst-eucl}          \begin{document}          \begin{pspicture}[showgrid=false](4,4)         \pstGeonode[PosAngle={90}]             (1,1){A}             (3,3){B}         \ncarc[arcangle=-30,linestyle=none]{A}{B}       \ncput[nrot=:0]{\psDefBoxNodes{obj}{$2\sqrt2$}}         \pcarc[arcangle=-30,linestyle=dashed,linecolor=gray](A)([nodesep=3pt]{A}obj:Cl)       \pcarc[arcangle=-30,linestyle=dashed,linecolor=gray]([nodesep=3pt]{B}obj:Cr)(B)     \end{pspicture}          \end{document}      How to solve this issue?


title: Single item list based off enumerate

text: I have a successful `questions` environment that is based off of the `enumerate` environment using the `enumitem` package. It correctly continues numbering from the previous `questions` environments. What I want is a `question` environment that mimics exactly the behavior of a `questions` environment with a single item. The following is my attempt, which I hoped would produce labels 1,2,3,4,5. Instead it produces labels 1,1,2,3,3.               \documentclass{article}     \usepackage{enumitem}     \newlist{questions}{enumerate}{2}     \setlist[questions,1]{label=\arabic*.,resume}     \newenvironment{question}{\begin{questions} \item }{\end{questions}}     \begin{document}     \begin{question}         One     \end{question}     \begin{questions}         \item Two     \end{questions}     \begin{questions}         \item Three     \end{questions}     \begin{question}         Four     \end{question}     \begin{question}         Five     \end{question}     \end{document}      How would I create a `question` environment (a single item list) that has compatible label numbering with the `questions` environment?


title: How to type specific things on the hat of expression?

text: I have problem typing this on the hat of `max` in the following example: ![enter image description here](http://i.stack.imgur.com/xTxVI.png)


title: Resume ending margin unchangeable

text: I'm using res.cls to make a resume and it looks awesome, except that it puts the last two lines on the next page leaving almost an inch and a half of lower margin, and I can't adjust the lower margin using geometry without losing my sections in the margin. How do you adjust the lower margin               % LaTeX resume using res.cls     \documentclass[margin,11pt]{res}          \usepackage[none]{hyphenat}%%%%     \usepackage{anysize}     \setlength{\textwidth}{5.8in} % set width of text portion     \usepackage{color}     \usepackage[normalem]{ulem}     \usepackage{url}          \begin{document}     \marginsize{.75in}{.75in}{.5in}{.5in}     \begingroup         \fontsize{14pt}{12pt}\selectfont         \centerline{\bf John Doe}     \endgroup          \moveleft\hoffset\vbox{\hrule width 7.1in height 1pt}\smallskip         123 Main ST \hfill (321) 654-0987 \\         jdoe@mail.com \hfill \ULurl{https://github.com/jdoe}          \begin{resume}          \end{resume}     \end{document}


title: How to only have similar font in latex to that of a Mathematica codes

text: After I used the answer posted to this question of mine: How to show similar display of codes of different programming languages in LaTeX, it seems that the package and styles I use have problems with packages `\usepackage{xcolor}` and `\usepackage{listings}`. As far as my thesis report is in black and white colors, I only need that the codes I want to bring to my report be the same as the Mathematica codes in the font aspect. How can I copy some codes in a document very similar to the fonts in the Mathematica software? If it is possible, please post some answers which do not require defining styles and be easy to use in the main document. I mean, defining styles seems to be much more problematic for the document class I am using than using in- situ codes such as `{\bf ... }`.


title: How to avoid logo on beamer been covered by graphics

text: While using Beamer I found that when I add figures, if they are big enough they will cover the logo on the bottom-right. How can I define the logo to be on top of every image? The solution I am using so far is to decrease the size of the image so it will not reach the logo. Any suggestions?


title: Different output from TeX Live 2013 vs. TeX Live 2014

text: The output of pdflatex has changed between TeX Live versions 2013 and 2014. A minimal example:               \documentclass[11pt,a4paper]{article}     \usepackage[papersize={104mm,16mm},vmargin=2mm,hmargin=2mm]{geometry}     \usepackage[T1]{fontenc}     \usepackage[charter]{mathdesign}     \usepackage{microtype}     \thispagestyle{empty}          \begin{document}     x xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx     \end{document}      Compiled with pdflatex from MacTeX 2013 (TeX Live 2013): ![2013](http://i.stack.imgur.com/NwMlK.png) Compiled with pdflatex from MacTeX 2014 (TeX Live 2014): ![2014](http://i.stack.imgur.com/Z8T8I.png) In the first case, pdflatex is happy. In the second case, there is an overfull hbox. The relevant versions are:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)     LaTeX2e <2011/06/27>     geometry 2010/09/12 v5.6     microtype 2013/05/23 v2.5a     mathdesign 2006/01/29 v1.55          This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014)     LaTeX2e <2014/05/01>     geometry 2010/09/12 v5.6     microtype 2013/05/23 v2.5a     mathdesign 2013/08/29 v2.31      What has changed and why? Can I somehow use TeX Live 2014 in a backwards- compatible mode so that it does not change the layout of my documents?


title: How to iterate/continue a pattern in TikZ?

text: I need to do a diagram in TikZ and, although the result I have look like I expected, I was wondering if there is a better/more general solution to my problem. Basically I want to draw a node with n-connection (3 in my implementation), and repeat/continue the pattern (rotated and translated depending on which connection I want to continue the pattern). I was wondering if it is possible to get a solution like:                \drawGraph{(position0)}{rotation0}{[2,3,1,3,1,3,3,3,3,2]}      to get something similar to what I implemented. Here's my current solution:                   \documentclass{article}         \usepackage{ifthen}         \usepackage{tikz}         \usetikzlibrary{calc}         \begin{document}              \begin{tikzpicture}             \newcommand\robotMovement[3]{                 \begin{scope}[shift={#1},rotate=#2,black!30]                     \ifthenelse{\equal{#3}{2}}{\draw[black,thick]}{\draw} (0,0) arc (0:45:1cm);                     \ifthenelse{\equal{#3}{1}}{\draw[black,thick]}{\draw} (0,0) -- (0,1cm);                     \ifthenelse{\equal{#3}{3}}{\draw[black,thick]}{\draw} (0,0) arc (0:-45:-1cm);                 \filldraw (0,0) circle (0.1cm);                 \end{scope}             }             % The whole map             \draw (0,0) rectangle (5cm,5cm);             \clip (0,0) rectangle (5cm,5cm);                  % Obstacles             \draw[fill=black] (3cm,2cm) rectangle (5cm,2.5cm);             \draw[fill=black] (3cm,2.5cm) rectangle (3.5cm,4cm);                  % Robot C-space coordinates             \coordinate (path00) at (4.6cm,0.6cm);                  \coordinate (path0f) at ($(path00)+(0,1cm)$);             \coordinate (path01) at ($(path00)!   1!   45:(path0f)$);             \coordinate (path02) at ($(path00)!0.79! 22.5:(path01)$);             \coordinate (path03) at ($(path00)!0.79!-22.5:(path01)$);                  \coordinate (path1f) at ($(path02)+(0,1cm)$);             \coordinate (path11) at ($(path02)!   1!   90:(path1f)$);             \coordinate (path12) at ($(path02)!0.79! 22.5:(path11)$);             \coordinate (path13) at ($(path02)!0.79!-22.5:(path11)$);                  \coordinate (path2f) at ($(path13)+(0,1cm)$);             \coordinate (path21) at ($(path13)!   1!   45:(path2f)$);             \coordinate (path22) at ($(path13)!0.79! 22.5:(path21)$);             \coordinate (path23) at ($(path13)!0.79!-22.5:(path21)$);                  \coordinate (path3f) at ($(path23)+(0,1cm)$);             \coordinate (path31) at ($(path23)!   1!   45:(path3f)$);             \coordinate (path32) at ($(path23)!0.79! 22.5:(path31)$);             \coordinate (path33) at ($(path23)!0.79!-22.5:(path31)$);                  \coordinate (path4f) at ($(path31)+(0,1cm)$);             \coordinate (path41) at ($(path31)!   1!    0:(path4f)$);             \coordinate (path42) at ($(path31)!0.79! 22.5:(path41)$);             \coordinate (path43) at ($(path31)!0.79!-22.5:(path41)$);                  \coordinate (path5f) at ($(path41)+(0,1cm)$);             \coordinate (path51) at ($(path41)!   1!    0:(path5f)$);             \coordinate (path52) at ($(path41)!0.79! 22.5:(path51)$);             \coordinate (path53) at ($(path41)!0.79!-22.5:(path51)$);                  \coordinate (path6f) at ($(path53)+(0,1cm)$);             \coordinate (path61) at ($(path53)!   1!  -45:(path6f)$);             \coordinate (path62) at ($(path53)!0.79! 22.5:(path61)$);             \coordinate (path63) at ($(path53)!0.79!-22.5:(path61)$);                  \coordinate (path7f) at ($(path63)+(0,1cm)$);             \coordinate (path71) at ($(path63)!   1!  -90:(path7f)$);             \coordinate (path72) at ($(path63)!0.79! 22.5:(path71)$);             \coordinate (path73) at ($(path63)!0.79!-22.5:(path71)$);                  \coordinate (path8f) at ($(path73)+(0,1cm)$);             \coordinate (path81) at ($(path73)!   1! -135:(path8f)$);             \coordinate (path82) at ($(path73)!0.79! 22.5:(path81)$);             \coordinate (path83) at ($(path73)!0.79!-22.5:(path81)$);                  \coordinate (path9f) at ($(path83)+(0,1cm)$);             \coordinate (path91) at ($(path83)!   1! -135:(path9f)$);             \coordinate (path92) at ($(path83)!0.79! 22.5:(path91)$);             \coordinate (path93) at ($(path83)!0.79!-22.5:(path91)$);                  \robotMovement{(path00)}{45}{2}             \robotMovement{(path02)}{90}{3}             \robotMovement{(path13)}{45}{1}             \robotMovement{(path21)}{45}{3}             \robotMovement{(path31)}{0}{1}             \robotMovement{(path41)}{0}{3}             \robotMovement{(path53)}{-45}{3}             \robotMovement{(path63)}{-90}{3}             \robotMovement{(path73)}{-135}{3}             \robotMovement{(path83)}{-180}{2}             \filldraw[black!70] (path93) circle (0.1cm);                  % Robot             \begin{scope}[shift={(4.6cm,0.6cm)},rotate=45,scale=0.5]             % Body             \draw[fill=white] (-3mm,-3mm) rectangle (3mm,3mm);             % Wheels             \draw[fill=black] (-4mm,0.75mm) rectangle (-3mm,2.25mm);             \draw[fill=black] (3mm,0.75mm) rectangle (4mm,2.25mm);             \draw[fill=black] (-4mm,-0.75mm) rectangle (-3mm,-2.25mm);             \draw[fill=black] (3mm,-0.75mm) rectangle (4mm,-2.25mm);             \end{scope}         \end{tikzpicture}         \end{document}      which generates this: ![cart](http://i.stack.imgur.com/nB6Wg.png)