title: difficulty compiling TikZ code - unknown key "breakable"

text: In attempting to compile some TikZ related code by Gonzalo Medina, I am running into difficulties. The code is accessible here: Creation of a new poster template Specifically, I am encountering the following error:               ! Package pgfkeys Error: I do not know the key '/tcb/library/breakable' and I a     m going to ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.13 \tcbuselibrary{skins,theorems,breakable}          ?      Could you suggest how I might approach this problem? EDIT: I have added the code I'm using below:               \documentclass{article}     \usepackage[paperwidth=30cm,paperheight=45cm,bmargin=2cm,lmargin=2cm,rmargin=2cm]{geometry}     \usepackage{array}     \usepackage{url}     \usepackage{tikz}     \usepackage{xcolor}     \usepackage{lmodern}     \usepackage{multicol}     \usepackage{lipsum}     \usepackage{tcolorbox}          \usetikzlibrary{shadows,calc}     \tcbuselibrary{skins,theorems,breakable}          \definecolor{myblue}{RGB}{40,96,139}          \tcbset{     mybox/.style={       breakable,       freelance,       boxrule=0.4pt,       width=\linewidth,       frame code={%       \path[draw=black,rounded corners,fill=white,drop shadow]         (frame.south west) rectangle (frame.north east);       },       title code={       \path[top color=myblue!30,bottom color=myblue!0.5,rounded corners,draw=none]         ([xshift=\pgflinewidth,yshift=-\pgflinewidth]frame.north west) rectangle ([xshift=-\pgflinewidth]frame.south east|-title.south east);       \path[fill=myblue]       ([xshift=5pt,yshift=-\pgflinewidth]frame.north west) to[out=0,in=180] ([xshift=50pt,yshift=-5pt]title.south west) -- ([xshift=-50pt,yshift=-5pt]title.south east) to[out=0,in=180] ([xshift=-5pt,yshift=-\pgflinewidth]frame.north east) -- cycle;       },       fonttitle=\Large\bfseries\sffamily,       fontupper=\sffamily,       fontlower=\sffamily,       before=\par\medskip\noindent,       after=\par\medskip,       center title,       toptitle=3pt,       top=11pt,       colback=white     }}          \newtcolorbox{block}[2][\linewidth]{mybox,width=#1,title=#2}          \makeatletter     \newlength\TitleHt          \newcommand\InsertTitle[1]{\gdef\@InsertTitle{#1}}     \newcommand\InsertAuthor[1]{\gdef\@InsertAuthor{#1}}     \newcommand\InsertInstitute[1]{\gdef\@InsertInstitute{#1}}     \newcommand\InsertEmail[1]{\gdef\@InsertEmail{\url{#1}}}          \newcommand\Titlefont{\color{white}\fontsize{40}{48}\sffamily}     \newcommand\Authorfont{\color{white}\LARGE\sffamily}     \newcommand\Institutefont{\color{white}\Large\sffamily}     \newcommand\Emailfont{\color{white}\normalsize}          \newcommand\MakeTitle{%     \setbox0=\vbox{%     \begin{tabular}{@{}>{\centering\arraybackslash}p{\textwidth}@{}}      \Titlefont\@InsertTitle \\      \Authorfont\@InsertAuthor \\      \Institutefont\@InsertInstitute \\      \Emailfont\@InsertEmail \\     \end{tabular}}%     \setlength\TitleHt{\ht0}%     \addtolength\TitleHt{\dp0}%     \addtolength\TitleHt{1.5cm}%     \begin{tikzpicture}[remember picture,overlay]     \path[clip]        (current page.north west) -- (current page.north east) --       ([yshift=-0.5\TitleHt]current page.north east) to[out=270,in=0]        ([yshift=-\TitleHt,xshift=-60pt]current page.north east) --        ([yshift=-\TitleHt,xshift=60pt]current page.north west) to[out=180,in=270]       ([yshift=-0.5\TitleHt]current page.north west) -- cycle;     \fill[fill=myblue]        (current page.north west) -- (current page.north east) --       ([yshift=-0.5\TitleHt]current page.north east) to[out=270,in=0]        ([yshift=-\TitleHt,xshift=-60pt]current page.north east) --        ([yshift=-\TitleHt,xshift=60pt]current page.north west) to[out=180,in=270]       ([yshift=-0.5\TitleHt]current page.north west) -- cycle;     \path[top color=myblue!15,bottom color=myblue!65]        (current page.north east) .. controls         ([yshift=-0.2\TitleHt,xshift=-50pt]current page.north east)          and ([yshift=-0.7\TitleHt,xshift=0pt]current page.north east) ..       ([yshift=-1.1\TitleHt,xshift=-90pt]current page.north east)  .. controls         ([yshift=-0.8\TitleHt,xshift=5pt]current page.north east)          and ([yshift=-0.2\TitleHt,xshift=-22pt]current page.north east) ..       (current page.north east);     \path[top color=myblue!15,bottom color=myblue!65]        (current page.north east) .. controls         ([yshift=-0.2\TitleHt,xshift=-90pt]current page.north east)          and ([yshift=-0.7\TitleHt,xshift=-20pt]current page.north east) ..       ([yshift=-1.1\TitleHt,xshift=-110pt]current page.north east)  .. controls         ([yshift=-0.8\TitleHt,xshift=-15pt]current page.north east)          and ([yshift=-0.2\TitleHt,xshift=-62pt]current page.north east) ..       (current page.north east);     \node[anchor=south,text width=\paperwidth,align=center] at ([yshift=\the\dimexpr-\TitleHt+0.25cm\relax]current page.north) {\box0};     \end{tikzpicture}%     }     \makeatother          \InsertTitle{The Title of the Presentation}     \InsertAuthor{The Author}     \InsertInstitute{The Name of the Institution}     \InsertEmail{www.stackexchange.com}          \pagestyle{empty}          \begin{document}     \pagecolor{myblue!30}     \MakeTitle     \vspace*{2cm}          \begin{multicols}{3}     \begin{block}{Title of a block}     \lipsum[2]     \end{block}          \begin{block}{Title of a block}     \lipsum[3]     \end{block}     \begin{block}{Title of a block}     \lipsum[2]     \end{block}          \begin{block}{Title of a block}     \lipsum[4]     \end{block}     \begin{block}{Title of a block}     \lipsum[2]     \end{block}          \begin{block}{Title of a block}     \lipsum[3]     \end{block}     \begin{block}{Title of a block}     \lipsum[4]     \end{block}     \begin{block}{Title of a block}     \lipsum[1]     \end{block}          \begin{block}{Title of a block}     \lipsum[5]     \end{block}          \end{multicols}          \end{document}


title: What's the difference between quote and verse, and when should this be used in scientific writing?

text: LaTeX has both the `verse` and `quote` environments. I am not sure when to use which and when should be used in scientific writing other than in the humanities. Conversely, there are occasions, particularly in presentations, where you want to display text. Should one use `verse`, `quote` or perhaps               \[        \text{Generalizing, we reach the principle of \emph{Inclusion-Exclusion}}      \]


I'm trying to make a time-line using the `chronology` package, but get the error: > >     ! LaTeX Error: File `chronology.sty' not found. >   Here's what I have, using an example I found on StackOverflow:               \documentclass{article}     \usepackage{chronology}     \begin{document}     \begin{chronology}[5]{1983}{2010}{3ex}{\textwidth}     \event{1984}{one}     \event[1985]{1986}{two}     \event{\decimaldate{25}{12}{2001}}{three}     \end{chronology}     \end{document}`      I can find the `chronology` file in the MiKTeX Package Manager, but I don't have the option to install it (neither do I have the option to uninstall it for that matter).


title: TikZ calendar and conditional tests

text: I would like to specially mark national holidays in my calendar. Some of the rules are "First Monday in June" and "Last Monday in October". I have been looking at the example on p. 280 of the PGF 2.10 manual but I'm not able ot modify it for my purposes. The useful parts of this example are:               if (between=\year-\month-\day+8 and \year-\month-\day+10)       [red]     if (Sunday)       [gray,nodes={draw=none}]      Here's an MWE, I believe.               % Based on Hakon Malmedal's 'Birthday calendar' from TeXamples     \documentclass[fontsize=20pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{calendar,fit}          \begin{document}          \begin{tikzpicture}[thick]       \calendar[dates=2014-01-01 to 2014-01-last,                 week list,                 month label above centered,                 month text=\textsc{\%mt \%y0}]       if (equals=01-01,           equals=03-17,           equals=12-25,           equals=12-26) [orange]           % p. 280 of PGF 2.10 manual is useful       if (between=2014-01-08 and 2014-01-14) [orange]     % following doesn't work:     %  if (Monday \AND between=2014-01-08 and 2014-01-14) [orange]     ;     \end{tikzpicture}          \end{document}      The 7 days from 8th to 14th of Jan. get displayed in orange but I would like simply the Monday (2nd Monday of month) to be in orange, as intended by the commented line. How can I build a conjunction of two conditions so that the holiday is printed in orange?


title: LaTeX table is cut off, with extra page of output that is blank. How to fix?

text: I am trying to make a table, but when I make the PDF, the top and bottom of the table are cut off. I am also getting a blank page of output in the beginning, but I can deal with that. I have tried running just portions of the table, and I get all the output up until a certain point, after which only the middle of the table is displayed in the PDF I generate. I have tried doing the `longtable` option and I can't even get it to make a PDF when I do that. I am new to LaTeX, and not really sure what I am doing wrong. I am trying to create something similar to below. Any advice is greatly appreciated.               \documentclass{article}     \usepackage{rotating}     \usepackage[margin=.25in]{geometry} % 1 inch margins all around          %\usepackage{longtable}          \begin{document}     \pagenumbering{gobble}          \begin{center}          \begin{sidewaysfigure}                    \begin{tabular}{lllccccccc}     \hline     & & & \multicolumn{7}{c}{C2} \\       & C1 &  & r & s & t & u & v & w & \multicolumn{1}{c}{y} \\      \hline     a1 & \nopagebreak a & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak b & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $0$ & $\phantom{0}0$ & $0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak c & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \rule{0pt}{1.7\normalbaselineskip}d & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak e & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak f & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \rule{0pt}{1.7\normalbaselineskip}g & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X3  & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X4  & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X5  & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X6  & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      & \nopagebreak h & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X3  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X4  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X5  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X6  & $0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      & \nopagebreak j & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \rule{0pt}{1.7\normalbaselineskip}k & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak l & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak m & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \rule{0pt}{1.7\normalbaselineskip}n & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak o & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X3  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X4  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X5  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      &  & X6  & $\phantom{00}0$ & $\phantom{00}0$ & $0$ & $0$ & $0$ & $\phantom{00}0$ & $\phantom{00}0$ \\      & \nopagebreak p & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X3  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X4  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X5  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X6  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      & \rule{0pt}{1.7\normalbaselineskip}q & X1  & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ & $\phantom{0}0$ \\      &  & X2  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X3  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X4  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X5  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\      &  & X6  & $\phantom{00}0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \\     \hline      \end{tabular}          \end{sidewaysfigure}          \end{center}          \end{document}


title: Command with variable number of arguments to format menu sequences

text: I would like to define a command that accepts a variable number of arguments:               \menu{foo}     % would result in \emph{foo}          \menu{foo}{bar}     % would result in \emph{foo} $\to$ \emph{bar}          \menu{foo}{bar}{baz}     % would result in \emph{foo} $\to$ \emph{bar} $\to$ \emph{baz}      and so on. Is this possible, and if it is, how can I do this?


title: Adding newlines while writing text to a file

text: Within a custom command, I'm doing the following to write to a file:               \newcommand\mycommand[1]{       \newwrite\file       \immediate\openout\file=foobar.tex       \immediate\write\file{         foo         bar         #1         blarg       }       \immediate\closeout\file     }      Of course when I invoke it as `\mycommand{baz}`, I get the following contents in `foobar.tex`:               foo bar baz blarg      with all new lines turned into spaces by `LaTeX`. My question is, is there a way to output these lines into the file "as expected", i.e. with real new lines at the end of each line instead of a space? I'm thinking some `\catcode` wizardry should do the trick, but I'm not sure which character I need to redefine and to what category code. **Update** The solution in cmhughes' answer works perfectly. The only problem is when `#1` contains embedded newlines. I can of course send it to `mycommand` with its own slew of `^^J`, I was wondering if there is a way to avoid this.


title: Text Alignment in paragraph box

text: I'm writing graphic application to generate latex tex. I'm making to generate text box with all it's features. Rotation alignment so on. I generated following cording but It was not Right aligned properly in paragrah box I have shown bounding box. What is wrong there...               \documentclass[a4paper]{article}     \usepackage{pstricks}     \usepackage{xcolor}     \usepackage[arabic,english]{babel}          \begin{document}          \textLR{     \begin{pspicture}(10, 10)     \psgrid     \definecolor{Black}{RGB}{0,0,0}     \rput{0}(3.9,7){%     \psframe[,linestyle=solid,linewidth=0.265mm,linecolor=Black](-2.1,1.9)(2.1,-1.9)     \uput{0.01cm}[320]{0}(-2.1,1.9){%     \parbox[t][3.8cm][t]{4cm}{     \color[rgb]{0,0,0}     \scriptsize     \begin{flushright}     Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline Right Aligned     \newline\end{flushright}     }     }     }     \end{pspicture}}          \end{document}


title: Wrong position of caption in odd page with sidenotes in figure*

text: I am preparing layout similar to How to create twoside book with oneside margin? I get error in the position of caption in odd page. The location of caption in the even page is correct.               \documentclass{scrbook}          \usepackage{sidenotes}     \usepackage[demo]{graphicx}          \usepackage[paperwidth=170mm, paperheight=240mm, left=142pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt     %,bindingoffset=30pt     ,asymmetric     ,reversemarginpar     ,showframe]{geometry}          \usepackage{blindtext}          \makeatletter     \renewcommand{\@sidenotes@adjust}{%     \checkoddpage%     \ifoddpage%     \hspace{-\@sidenotes@extrawidth}%      \else%     \hspace{-\@sidenotes@extrawidth}%         \fi}     \makeatother          \begin{document}          \blindtext          \begin{marginfigure}     \includegraphics[width=100pt]{rectangle}     \caption{I am a figure}     \end{marginfigure}          %\blindtext     \begin{figure}[htb!]     \centering     \includegraphics[width=100pt]{rectangle}     \caption{I am a figure}     \end{figure}               \begin{figure*}     %\centering     \includegraphics[width=400pt]{rectangle}     \caption{I am a figure}     \end{figure*}          \clearpage          \begin{margintable}%         \small         \begin{tabular}{lll}          Hg&Sn&Pb \\         0.50&0.47&0.48\\       \end{tabular}         \caption{I am a table.}%     \end{margintable}%          \blindtext               \begin{marginfigure}     \includegraphics[width=100pt]{rectangle}     \caption{I am a figure}     \end{marginfigure}          %\blindtext     \begin{figure}[htb!]     \centering     \includegraphics[width=100pt]{rectangle}     \caption{I am a figure}     \end{figure}               \begin{figure*}     %\centering     \includegraphics[width=400pt]{rectangle}     \caption{I am a figure}     \end{figure*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/sPpSJ.jpg)


title: How to change bibliographic style file (.bst) in case of entry with same authors

text: I'm using BibTeX for editing my references in a dissertation with the `mcbride.bst` style. According to the rules I have to write `---` when I have a reference entry with the same authors, e.g. > Author 1. 2011. Title.... > > Author 2. 2011. Title 1.... > > `---`. 2012. Title 2.... Now instead of `---`, I get a solid line. I'd really appreciate any help in knowing what to change in the `mcbride.bst` file to get the described result.


title: Redefining the \printindex command and changing it to a desired form

text: In book class, I want to **redefine** the `\printindex` command and change it to something like the following:               \addcontentsline{toc}{chapter}{Index}     \fancypagestyle{plain}{%     \fancyhf{}                             \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }     \printindex      How can I do this?   My tex file is as follow:               \documentclass{book}     \usepackage{fancyhdr}      \usepackage{makeidx}     \makeindex     \begin{document}     \tableofcontents     \chapter{One}     Hi!     \index{abc}     \index{def}     \addcontentsline{toc}{chapter}{Index}     \fancypagestyle{plain}{%     \fancyhf{}                             \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }     \printindex     \end{document}


title: hyphen in function name using algorithm2e package

text: I'm trying to put a hyphen into a function name using the algorithm2e package, though it doesn't seem to like it. Minimal example:               \begin{algorithm}     \SetKwFunction{NOHYPHEN}{NOHYPHEN}     \NOHYPHEN{foo,bar}\;     \end{algorithm}      works fine.               \begin{algorithm}     \SetKwFunction{WITH-HYPHEN}{WITH-HYPHEN}     \WITH-HYPHEN{foo,bar}\;     \end{algorithm}      breaks. Any suggestions?


title: Putting a rectangle around matrix nodes?

text: I built up a simple UML diagram, where one of the class boxes has an union containing a number of elements. I want to show that those elements are part of an union. But how can I do so with tikz? I tried to use a matrix, but it complains that I cannot nest matrices.               \documentclass[a4paper,12pt]{scrreprt}     \usepackage[utf8x]{inputenc}          \usepackage{tikz}     \usetikzlibrary{matrix,positioning,calc,arrows,shapes}          \tikzstyle{class}=[matrix of nodes, draw=black, font=\ttfamily\small]          \begin{document}          \begin{tikzpicture}[node distance=2cm]         \matrix (value) [class] {             \textbf{Value} \\             \hline             TypeA m\_type \\             \textit{Union:} \\ % TODO: want to have a rectangle around the next 6 entries!             TypeB int64Val\\             TypeC float64Val\\             TypeD stringVal\\             TypeE *funcVal\\             TypeF varsVal\\         };     \end{tikzpicture}          \end{document}


title: Loading Packages Together versus Separately

text: There are a few questions regarding the _speed_ of loading packages together, but this question isn't necessarily about that. I'm more interested in any tangible, persistent differences, such as package clashes and the like. * * * Is there any difference between loading packages one by one,               \usepackage{x}     \usepackage{y}     \usepackage{z}      as opposed to loading them 'all at the same time'?               \usepackage{x,y,z}      I know that some packages behave differently depending on the order in which they are loaded (`xcolor` is a prime example), but I suspect that as long as the order remains the same (`x,y,z`, not `z,x,y`, say), everything should work exactly the same.


title: Customizing headings

text: I am writing a document in the `book` class. I am looking for a way to produce the following. In one of my chapters, the sections carry a name, each of which can be summed up by only a few letters, for instance 'AA' or 'BC2'. Instead of the usual headings, I want each page to carry (in big size) the title of the section in the upper part of the page, on the left or on the right depending whether the page number is even or odd. I have looked in the `fancyhdr` documentation, but I haven't found a way to produce such a result so far.


title: How to get Beamer Math to look like Article Math

text: In a LaTeX `article`, the math characters are more "curvy" than the text characters:               \documentclass[12pt]{article}     \begin{document}      $x^2 + y^2 = z^2$     \end{document}      ![article math](http://i.stack.imgur.com/jHRlk.png) In a `beamer` presentation, the math characters do not have the same curves:               \documentclass{beamer}     \begin{document}     \begin{frame}      $x^2 + y^2 = z^2$     \end{frame}     \end{document}      ![beamer math](http://i.stack.imgur.com/ozKRH.png) ## Question How can I get the `beamer` math to look just like the `article` math? I would prefer if the solution was a single line (that I could place at the top of my LaTeX file) as opposed to something that needs to appear next to every piece of math.


title: Why, in Beamer, letters written in math mode look as written in normal mode

text: I'm making a presentation with `beamer` and have noticed that letters written in math mode look exactly the same as letters written in normal mode; in other words `$K$` looks in the PDF exactly like `K`, while when you write a paper using, for example, `article` letters in math mode look italicized. Why is this happening? In case you wonder, my preamble is this:               \documentclass{beamer}          \usetheme{AnnArbor}               \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{placeins}     \usepackage{amsmath}     \usepackage{amscd}     \usepackage{graphicx}          \newtheorem{defi}{Definici\'on}     \newtheorem{ejem}{Ejemplo}     \newtheorem{teo}{Teorema}       Thanks for the help.


title: How to write a letter "a" in Tex

text: This seems to be a fairly simple question. But I want to know how can I write the alphabet "a" in Latex as shown below: I cannot use the regular "a" in this case. ![enter image description here](http://i.stack.imgur.com/NcIEk.png) Thanks for any suggestion. The working example is as follows:               \documentclass[11pt]{beamer}           % Setup appearance:                    %\setbeamertemplate{navigation symbols}{}     \setbeamersize{text margin left=4mm, text margin right=3mm}                %Pacakges     \usepackage{graphics}     \usepackage{tikz}     \usepackage{amsmath}     \usepackage{verbatim}     \usetikzlibrary{arrows,shapes}     \usepackage{amsmath}     \RequirePackage{atbegshi}     \usepackage{mathtools}% http://ctan.org/pkg/mathtools     \usetikzlibrary{arrows,shapes}     \usetikzlibrary{arrows,shapes}     \RequirePackage{atbegshi}     \graphicspath{./figures/}      \usepackage{ragged2e}     \justifying     \usepackage{empheq}          \mode<presentation>{}          \begin{document}     \begin{frame}[shrink=10]          \begin{equation*}     a_i(t,x) =             \frac{             \tikz[baseline]{                 \node[fill=blue!20,anchor=base] (t1)                 {$ \int \limits_{0}^{\infty}{ \tau c_i(t,x,\tau )\partial \tau}$};             }}{             \tikz[baseline]{                 \node[fill=red!20, ellipse,anchor=base] (t2)                 {$ \int \limits_{0}^{\infty} c_i(t,x,\tau) \partial \tau$};             }}      \end{equation*}          % Now it's time to draw some edges between the global nodes. Note that we     % have to apply the 'overlay' style.               \end{frame}     \end{document}


title: Setting article math font in beamer

text: I know there have been similar questions to this before, but my question differs in that I want a very specific font for my math equations in `beamer`. I want to use the default font that comes with the `article` document class for my math equations in `beamer`. Does anyone know how I can achieve this?


title: how can I modify the font of just the formulas in TeXLive?

text: For sure it's a really silly question, but I can't find a solution: how can I change the font of just the formulas in a TeXLive document? I want a style where the "f" (for "function") is elegant, slim, tall, a bit oblicuous and with serifs, similar to a little integral sign, and the "a" is nearly a circle, like this one: ![enter image description here](http://i.stack.imgur.com/zvs95.png) Instead, I get a really awful style, with an "f" too litle and fat. ![enter image description here](http://i.stack.imgur.com/jmO0t.png) Does somebody know the name of the font and how can I change it? All the best and thanks a lot!!


title: Fitting unbreakable large equation on one line in a twocolumn layout

text: I have an equation in my document which is unbreakable and does not fit on one line using the `twocolumn` global option. Am I forced to shrink the text size here? And how do I go about doing it? `\resizebox` does not function in math mode. ![http://i.imgur.com/Bbn2CZj.png?1](http://i.stack.imgur.com/5ljQB.png)               \documentclass[twocolumn]{ltxdoc}     \usepackage{amsmath}     \begin{document}     \begin{equation}     \sum_{q_\mathrm{total}=0}^{q_A+N_A+q_B+N_B-2}\left(\sum_{q_A=0}^{q_\mathrm{total}}\left(\binom{q_A+N_A-1}{q_A}\binom{q_B+N_B-1}{q_B}\right)\right)x^{q_\mathrm{total}}     \end{equation}     \end{document}


title: Column format datatool

text: all. Suppose I have a csv file (let's call it data.csv):               Solution,mol/L,Volume(mL),delta_v(mL),moles     HNO3,16,5,0.2,3.125E-4     NaOH,6,20.2,0.2,3.367E-3     H2O,1;200,5,2.000E-1     H2SO4,6,5.2;0.2,8.667E-4     HCl,12,10;0.2,8.333E-4      Now, suppose I wanted to use the mhchem package and the siunitx package to help format different columns in data.csv. Specifically I'd like to wrap everything in the first column inside \ce{} (except the first row). So HNO3, would be \ce{HNO3} and thus would display with a subscripted 3. And I'd like to wrap everything in the moles column in \num{}. Does anyone know of a good way to do this?


title: Can't get Natbib package to work

text: I'm trying to create a bibliography. I'd like it so that I can write with the Harvard style: "..bla bla bla bla bla (Bloggs, 2012). Bla bla bla..." in the main body of the text, with something like this: "Bloggs, J., The Journal of Stuff, 2012." as the actual bibliography. I'd like to have the list of 'references' (i.e. of which the above line is one) in alphabetical order. I'd also prefer (but at this stage of frustration, willing to go without) that the "(Bloggs, 2012)" would take the reader to the bibitem when it is clicked on with the cursor. Any help would be greatly appreciated! I'm in a real hole at the moment; I've read the (natbib) documentation and various wikis but to no avail. **Addendum** (moved from the comment section): Here's an MWE --               \documentclass[11pt]{article}      \usepackage[authoryear]{natbib}      \usepackage[colorlinks=true]{hyperref}      \begin{document}      \section{First Section}      \noindent Something is true (Bloggs, 2012)\citep{bloggs:2012}.      \bibliographystyle{plain}      \begin{thebibliography}{99}      \bibitem{bloggs:2012} Bloggs, J., The Journal of Stuff, 2012      \end{thebibliography}      \end{document}       The problem is that the hyperlink is in a box (numbered as "1") but I actually want the "(Bloggs, 2012)" to be the hyperlink. At the moment, it's kind of double.


title: What makes a loop inside \IfFileExists fail?

text: The following MWE is the simplified version of my project. But it is complete enough to produce the problem. If you disable (comment) the looping parts, compilation succeed. Otherwise you will get compilation error. What makes a loop inside `\IfFileExists` fail?               \documentclass{book}     \input{repeat}          \def\Foo{%         \IfFileExists{\jobname.tex}{%         \repeat\for{x}\by{0}%         \until{\ifnum\x>10}%         \do{\advance\x by 1}%       }%       {%         File not found.       }%     }          \begin{document}     \Foo     \end{document}                    This is pdfTeX, Version 3.1415926-2.3-1.40.12 (Web2C 2011)      restricted \write18 enabled.     entering extended mode     (./dj.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,      kurmanji, lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nyn     orsk, polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbia     nc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorb     ian, welsh, loaded.     (c:/texlive/2011/texmf-dist/tex/latex/base/book.cls     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     (c:/texlive/2011/texmf-dist/tex/latex/base/bk10.clo))     (c:/texlive/2011/texmf-dist/tex/generic/eijkhout/repeat.tex     Loading loop macro, version 0.93a) (./dj.aux))     ! Incomplete \ifeof; all text was ignored after line 16.     <inserted text>                      \fi      <*> dj.tex          ?      ! Emergency stop.     <inserted text>                      \fi      <*> dj.tex          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on dj.log.


title: table of contents title removed

text: I wanted to change my paragraph style in my report so that there was no indentation. I used in my preamble:               \usepackage[parfill]{parskip}      Whilst this has dealt with the indentation, it appears to have created a new problem. I have included a table of contents and list of figures by using:               \tableofcontents     \listoffigures      Previously they looked ok but after I added the `parskip` package the titles of my contents page have been removed. In fact they now appear below the contents page in normal 12 pt font. Has anyone got any suggestions about how I can change my paragraph style but keep the titles in my contents page. This is gist of my project:               \documentclass[a4paper,12pt, reqno]{amsart}          \usepackage{tikz}        % only needed if you include TpX drawings     \usepackage{graphicx} % only needed if you include graphics files other than TpX     \usepackage{hyperref} % produces nice hyperlinks in your document     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{verbatim}     \usepackage{color}     \usepackage{lscape}     \usepackage[parfill]{parskip}               \theoremstyle{definition}     \newtheorem{example}{Example}[section]     \numberwithin{figure}{section}     \numberwithin{equation}{section}          \begin{document}          \begin{titlepage}     ...     \end{titlepage}          \tableofcontents     \listoffigures          \section{}     ...     \appendix     ...     \begin{thebibliography}      hope some of this helps. **Edit** Just to include a screen shot of what the difference is. Here's the version without `parskip` ![enter image description here](http://i.stack.imgur.com/6Qx04.png) and here's the bad version with `parskip` ![enter image description here](http://i.stack.imgur.com/0bmLy.png) One sees that the formatting and placement of the `Contents` and `List of figures` labels are shot.


title: Todo note steals space

text: I'm writing a larger document and I use the `todonotes` package to add reminders. For some reason, when I add a note, the space after the note's insertion point is removed. Here's minimal example:               \documentclass[12pt,a4paper,oneside]{book}     \usepackage[textsize=scriptsize,textwidth=2cm,shadow]{todonotes}     \begin{document}     Lorem ipsum dolor sit amet,\todo{stolen space} consectetuer adipiscing elit.     \end{document}      And here's the result I'm getting: ![Image of a line with a todo note](http://i.stack.imgur.com/AOsNz.png) And a blown up section of the missing space: ![Blown up section, where the space is missing](http://i.stack.imgur.com/N5Waf.png) I thought this might just be an artifact experienced while the notes are active, which would be acceptable since the final document will not have any notes, so I tried to disable them by `\usepackage[disable,textsize=scriptsize,textwidth=2cm,shadow]{todonotes}`. Now the notes are gone, but the space is still missing. It's bad. Am I doing something wrong, or is this a shortcoming of the `todonotes` package? Also, I have noticed when I add `{}` to the end of the note (`\todo{correct? spacing}{}`), the missing space magically re-appears. However, I'm not sure it's a good solution.


title: How can I access the numbers of pages on which input material begins and ends?

text: Is there a way to access the numbers of pages on which material included using `\input` begins and ends? Crude approaches along the lines of               \def\myinput#1{%     \typeout{ Input starts on page \thepage}     \input{#1}     \typeout{ End ends on page \thepage}}      fail in exceptional cases (e.g. if a page break occurs just before, or just after, a `\myinput`).


title: Sweave Multiple Chapters

text: I am writing a large Sweave document that will be broken up into many chapters with the final output being a large pdf of everything and an individual pdf for each chapter (with the same page and caption numbering as in the large pdf). I found some great answers about working with multiple files but haven't seen how to also create the individual chapter pdfs with proper pagination. Is there a way to do that?


title: TikZ - Circle Split, distinct stlye for nodeparts

text: I need to draw the lower part of a split circle node differently: I want it to have a double-style border, whereas the upper nodepart stays the same. I've read this but cannot tell how to modify it to draw an extra border. Also it doesn't appear to be the most generic solution for styling the lower semicircle of a circle node separately.


title: where to find font including an extensible version of a straight integral?

text: Where can I find the integral shown in page 17 of _Russian Typographical Traditions in Mathematical Literature_ ?


title: biblatex-chicago, alphabetical bibliography

text: I'm using biblatex-chicago, and the bibliography is being sorted by order of citation instead of alphabetically. How can I fix this?


title: Build cropped PDF image from LaTeX

text: I have created an image with `pgfplots` in a separate file and want to add the PDF that is built from that as an image in my report. The problem is that the image PDF created is a complete A4 format. How can I just build a LaTeX file with minimal paper size? What `documentclass` do I need?               \documentclass{article}          \usepackage{pgfplots}          \begin{document}         \begin{tikzpicture}             \begin{axis}[             ybar stacked,             title={title here},             ylabel={workshift occupation (in \%)},             symbolic x coords={Day shift, Weekend shift},             xtick=data,             x=0.2\textwidth,             bar width=0.1\textwidth,             enlarge x limits=0.5,             legend style={                 anchor=north,                 at={(0.5,-0.1)},                 legend columns=-1}]             \addplot coordinates             {(Day shift,60) (Weekend shift,30)};             \addplot coordinates             {(Day shift,30) (Weekend shift,65)};             \addplot coordinates             {(Day shift,10) (Weekend shift,5)};             \legend{task1, task2, task3}             \end{axis}         \end{tikzpicture}     \end{document}


title: Can the Lua part of LuaTeX know about tokens?

text: Using `\directlua` and `tex.print`, it is possible to send strings of characters back and forth between TeX and Lua. Let's take an example: starting with a macro `\A`, I pass its replacement text to Lua and back, defining `\B`               \edef\A{ab\string c}     \directlua{tex.print("\noexpand\\def\noexpand\\B{\unexpanded\expandafter{\A}}")}     \show\A     \show\B     \ifx\A\B       \message{Identical :)!}     \else       \message{Different :(.}     \fi     \bye      The two macros appear identical, but they aren't: the weird/special combination of category codes (letter and other) is lost before reaching Lua, and tokenization on the return trip is done using the category code régime in effect when `\directlua` is performed. Can the `\directlua` line be replaced by some other Lua code which would be able to define `\B` to be identical to `\A`, including category codes? Of course,               \directlua{\unexpanded{tex.print("\\edef\\B{\\unexpanded\\expandafter{\\A}}")}}      would work (by delaying the expansion of `\A` until after the passage through LuaTeX), but my goal would be to perform some complicated operations on the token lists on the Lua side.


title: How can I redefine the chapter command to display additional text below the title?

text: I'm relatively inexperienced with Latex. I'm using the Memoir class and I've been trying to develop a custom chapter style based on Danie Els' BlueBox style (the source for this is given on page 46 of Memoir Chapter Styles). I'd like to redefine the chapter command to take two arguments, such as below:               \chapter{ExampleChapter}{A short description of the contents of this chapter}      I'd then like to have both arguments passed to a redefined version of \printchaptertitle so that I can print the description beneath the title:               \renewcommand{\printchaptertitle}[2]{%     \usebox{\ChpNumBox}\hfill     \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%     \vspace{\midchapskip}%     \thickhrulefill\par     \chaptitlefont ##1\par}}%2     % ##2 is used somewhere here     }      **EDIT** I hacked something ugly together that's pretty close to what I want: I redefine the afterchapskip length within the chapter style to be negative:               \setlength{\afterchapskip}{-45pt}      I then define the following macro:               \newcommand{\addChapter}[2] {     \chapter{#1}     \begin{flushright}     \parbox[t]{\hsize-\wd\ChpNumBox-5em}{\flushright\small{\textcolor{dark-gray}{#2}}}     \end{flushright}     \vspace{30pt}     }      Then within the document itself I use:               \addChapter{Example Chapter}{A short description of the contents of this chapter. I can ramble on a bit just to point out that this is flushed right.}      That produces the following: ![](http://i.stack.imgur.com/UVrjE.png) **EDIT 2** Using daleif's recommended approach below, I've got something that works quite nicely. I define the following:               \def\chapterDesc{}     %...     \newcommand{\setChapterDescription}[1]{%     \def\chapterDesc{#1}%     }     %...     \newcommand{\addChapter}[2]{     \setChapterDescription{#2}     \chapter{#1}     \setChapterDescription{}     }     %...     \renewcommand{\printchaptertitle}[1]{%     \usebox{\ChpNumBox}\hfill     \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%     \vspace{\midchapskip}%     \thickhrulefill\par     \chaptitlefont ##1\par     \vspace{20pt}     \normalfont\small\textcolor{dark-gray}{\chapterDesc}}     }%2     }      I can then do something like the following:               \addChapter{Example Chapter}{A short description of the contents of this chapter. I can ramble on a bit just to point out that this is flushed right.}      ![](http://i.stack.imgur.com/tKz7x.png) Or just:               \chapter{Descriptionless Chapter}      ![](http://i.stack.imgur.com/KW86k.png)


title: put all 4 tables on the same row line

text: I am trying to use 'minipage' to put all 4 tables on the same row line. But, it does not work. I only can put small tables on the same row line. How can I solve it.


title: Line spacing in TikZ multiline nodes inside tables

text: I'm trying to typeset some multiline `TikZ` nodes inside a `tabular` environment. Somehow, the space between lines gets considerably shortened. Here's my code:               \documentclass{article}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}         \node [align=center] {         \underline{$(\alpha \land \beta)$}\\         $\alpha$\\         $\beta$         };     \end{tikzpicture}          \begin{tabular}{c}         \begin{tikzpicture}             \node [align=center] {         \underline{$(\alpha \land \beta)$}\\             $\alpha$\\             $\beta$             };      \end{tikzpicture}     \end{tabular}          \end{document}      Can someone explain what is happening and how can I prevent it?


title: squeeze the text in table

text: I had gone thro this question and still in my case, i have the overlapping text in the table Here is my MWE               \documentclass[a4paper,10pt]{book}     \usepackage{pdflscape}    % to change certain pages to landscape mode     \usepackage{longtable}  % for tables spanning multiple pages     \begin{document}          This is my example               \begin{landscape}      \begin{tabular}{|p{5cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}     \hline      ABCD EFGH  ABCD EFGH  ABCD EFGH ABCD EFGH  ABCD EFGH  & H & H & H & H & OCH2-CH=C(CH3)CH2CH2CH=C(CH3)2 & H  \tabularnewline     \hline      \end{tabular}     \newline     \end{landscape}     \end{document}      I can not expand / compress the column size. The question is how to fix the overflowing text in 6th column. Whereas column 1 fits properly. Should i manually hyphenate the text to fit into the desired cell width?


title: Writing the chapter and the heading in two different ways

text: How can I write in capitals the first letter of each word in a title? In other words, I want to write the title normally               \chapter{Title of my chapter}      and to have the heading in this way               Title Of My Chapter      I have read this discussion but I cannot modify that solution for my case.


title: Text in moderncv’s left column overlaps with right column

text: I was trying to compile a Resume and I am not able to figure out why only the second line has superimposed text. The below is the code.               \documentclass{moderncv}     \moderncvtheme[blue]{casual}     \usepackage[utf8]{inputenc}     \usepackage[scale=0.8]{geometry}     \firstname{Abhilash}     \familyname{Sukumari}     \email{asn@matan.name}     \homepage{www.asn.web.nsce}          \newcommand\Colorhref[3][cyan]{\href{#2}{\small\color{#1}#3}}          \begin{document}     \maketitle     \section{Professional network}          \cvline{Linkedin.com}        {\Colorhref{http://www.linkedin.com/pub/abhilash-sukumari/10/8a6/1a4}             {abhilash sukumari}   - Professional profile and links.    }     \cvline{Stackoverflow.com}       {\small\href{http://stackoverflow.com/users/51197/adam-matan}             {Adam Matan}   - My software questions and answers. }      \cvline{twitter.com}         {\Colorhref[red]{http://twitter.com/justnoticed}{@justnoticed} - My tech tweets.}          \end{document}      This is a snapshot of the output I have been getting. ![output](http://i.stack.imgur.com/ZsNsl.jpg)


title: Tool for cleaning LaTeX code

text: Is there something like `indent` for LaTeX? I have a collaborator that is using Scientific Workplace and the code it produces is totally messed up; I know I shouldn't expect miracles, but any machine support would be useful. EDIT: This question is quite undefined without my comment to KeithB's answer; the idea is to save VC-friendly one sentence/one paragraph per text file line structure which SWT "fixes" by wrapping everything into fixed column width format.


title: Automatic source document formatting

text: > **Possible Duplicate:**   >  Tool for cleaning LaTeX code This might not be a TeX question, strictly speaking but I'm sure this is the right forum to ask this: Is there a tool that can format the (La)TeX source documents? To clarify, I'm not trying to typeset TeX sourcecode in output documents -- I have `listings`, `algorithms` and `minted` for that. I'm trying to find a tool that can format my source `.tex` documents so that they have better indentation etc.


title: Autoformat latex source

text: > **Possible Duplicate:**   >  Tool for cleaning LaTeX code I got a simple question. I just got hold of a, very "ugly" latex document. By ugly I mean, that the source code is almost unreadable. Is there a application (or a plugin ...) to autoformat latex markup?


title: Is there a tool that converts "normally written" TeX source to one with a newline at the end of every sentence?

text: In many of the questions asked here, people recommend the use of control versioning for the write-up LaTeX documents, especially for documents that are large, such as theses. The issue with doing that is that in order for the traditional control versioning `diff` to be of any use, sentences must be broken into lines. Otherwise, `diff` doesn't really provide any insight as to what changed in the document and things get messy really fast. The plan is for all my new documents to follow the "each-sentence-in-a-new- line" format. But I would like to start using control versioning for some of my existing (and large) documents. I was wondering whether there's a tool that takes a `.tex` file as input and spits out a new `.tex` file in which the sentences are separated by a newline character. I am mainly interested in a UNIX tool, but the more portable, the better. **Note:** The problem is not as simple as inserting a newline after every period unfortunately. For example, when the tool finds "e.g." in the text, it needs to be smart enough to avoid inserting a newline there. Or, more of an annoyance instead of a big issue, since the last character in a paragraph is very likely to be a period, it needs to avoid inserting an extra newline there. Maybe a tool that utilises the LaTeX internals to identify when a sentence has actually ended?


title: Usage of longtable (or equivalent) and pgfplotstabletypeset

text: I'm a new user of TikZ `pgfplots` and `pgfplotstable` and have been stoked to discover how easy it is to go between Matlab (via `matlab2tikz` and writing to CSV) and LaTeX. I'm getting a little more ambitious now, and my question is, how do I properly implement a multi-page `longtable` together with `pgfplotstableset` inside a float (for placement, captioning, etc..)? So far I've been able to avoid this complication by splitting up these long lists into shorter subtables. I've also tried a couple of work-arounds to try to achieve the desired functionality, including adding captions to the `end table` alias as suggested in the `pgfplots` Manual or using the `capt-of` package to add a caption outside of a float. This works reasonably well but doesn't have the nice "Table ? continued" behavior of 'longtable'. Is there a better way to do this? Here is a typical macro, the input arguments `#1` are a CSV filename, and `#2` a caption for the ToC/LoF:               \newrobustcmd{\strtable}[2]{     \pgfplotstableset{     begin table=\begin{longtable},     end table=\caption{#2}\end{longtable}     } % similar to manual for package pgfplotstable          \pgfplotstableset{columns/Channel/.style={string type}}     \pgfplotstableset{columns/Units/.style={string type}}     \pgfplotstableset{columns/Description/.style={string type,column type={p{6cm}}}}     \pgfplotstableread[col sep=comma]{#1}\strtable     %\tracingmacros=2\tracingcommands=2     \begin{center}     %\begin{longtable} % this bombs     %\captionof{table}{#2} % alternative way to try to get a caption in there using capt-of package     \pgfplotstabletypeset[     every first column/.style={string type,column type={@{}l|}},         every even row/.style={before row={\rowcolor[gray]{0.9}}},         every head row/.style={before row=\toprule,after row=\midrule\endhead}, % repeats header         every last row/.style={after row=\bottomrule},         ]\strtable         % \end{longtable} % bombs         \end{center}         }


title: Hyphenate \ttfamily without hyphen dash

text: Is it possible to hyphenate text without inserting a hyphen.               \documentclass{article}          %\usepackage{courier}     %\usepackage{bera}     %\usepackage{arev}          \begin{document}     \ttfamily\hyphenchar\font=\defaulthyphenchar\relax     LoremipsumdolorsitametconsectetueradipiscingelitAeneancommodo     ligulaegetdolorAeneanmassaCumsociisnatoquepenatibusetmagnisdis     parturientmontesnasceturridiculusmusDonecquamfelisultriciesnec     \end{document}      If I replace `\defaulthyphenchar` by `255` it works for CM, but not with Bera Mono. So is there a `\char` number of the word joiner (Unicode `U+2060`) that works with all fonts?


title: Length, surface, and coordinates of a tikz-pgf path

text: I need to perform computations on the points that belong to a tikz-pgf path. More specifically, I want to know how many points have a y coordinate exceeding a given value, and I want to calculate numerically the surface (integral) of the area below the path. Alternatively (or additionally): is there a way to evaluate the length of a path and the enclosed surface?


title: (TikZ or xcolor) lighten color

text: I am plotting some simple stuff using TikZ like circles and lines. They are colored. I know the color I want to plot with but would like create a new color that is a lighter version of the old. pseudo-code `lightgray = lighten(gray, 0.5)` where the 2nd parameter is "how much"


title: Accessing MySQL or SQLite from Lua(La)TeX

text: I thought it would be possible to access MySQL or SQLite from Lua(La)TeX, but couldn't google up anything on the topic. Please give me pointers to:   * Snippets / Examples / Documentation on that, if available   * Whether I should rather look this up in the Lua community I explicitly list SQLite here, as I want to make this work for the low-tech users collaborating through DropBox or the like.


title: some obstacles to incorporating xfig into LaTeX and TeX into xfig

text: On a Linux machine, I wanted to incorporate a drawing created in xfig into a LaTeX document. But xfig wasn't allowing me to use any fonts except one microscopic one. Then I found this page (from which I quote below) saying TeX could be incorporated into and xfig document. I thought that might suffice, since I didn't want to use any text except mathematical notation, which isn't done well in xfig's usual fonts anyway. But then I found I could not adjust the size: it's still in that one beensy font. Other than that it looked very good. I can also run TeXworks on a Windows machine. I found a web page saying it's possible to get xfig for Windows. Is that easy enough that I should consider that alternative? (I heard the manner of incorporating graphics into a LaTeX document is different in that situation, e.g. one must use pdf instead of eps or something like that.) **Appendix: quote from the cited web pave:** This document is shamelessly copy-pasted from http://web.math.auc.dk/~dethlef/Links/latex_figures.html...... Inside xfig, add the LaTeX expressions to the figure, using $...$ to switch to math-mode where necessary. Use the normal method in xfig for adding text, but set the "special text" mode using the "Text flags" menu at the bottom of the screen. Export the figure from xfig twice: firstly using the format "Combined PS/LaTeX (PS part)" to a file such as fig1.pstex, secondly using "Combined PS/LaTeX (LaTeX part)" to a file such as fig1.pstex_t. Create a driver file (e.g., fig1.tex) containing something like:               \documentclass{article}     \usepackage{epsfig}     \usepackage{color} (note: you might not might not need to do this)     \setlength{\textwidth}{100cm}     \setlength{\textheight}{100cm}     \begin{document}     \pagestyle{empty}     \input{fig1.pstex_t}     \end{document}      Run the commands:               latex fig1.tex     dvips -E fig1.dvi -o fig1.eps      You should now have a file named "fig1.eps" which can be included (with scaling and rotation if desired) in other LaTeX documents.


title: pgfplots: problem in the legend using custom marks

text: With the help of `\pgfdeclareplotmark` I defined a custom mark for a plot and it worked as expected; however, in the legend, the mark appears with a vertical shift. What is causing this problem and how can it be prevented?               \documentclass{article}     \usepackage{pgfplotstable}     \usetikzlibrary{shadows}     \pgfplotsset{compat=1.8}           \pgfdeclareplotmark{*)}       {\shade[draw=green!60!black,ball color=green!70] (0,0) circle [radius=5pt];}          \begin{document}          \begin{tikzpicture}     \begin{axis}[]     \addplot+[mark=*)]       coordinates {      (-2,3)      (1,-5)     };     \addlegendentry{test}     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/vIumJ.png)


title: .sty of installed package not found

text: I've newly installed TeXLive 2013 (following steps on http://www.tug.org/texlive/quickinstall.html) on Fedora 19. Using `pdflatex` on a test `.tex`, I encounter lots of error messages saying various `.sty` were not found, beginning with `stmaryrd.sty`. I checked with `tlmgr` and found the package is installed. I checked the ctan for a manual install of `stmaryrd` and found the installing steps too briefly described for me, saying >   * move stmary*.tfm into a TeX font metrics directory > >   * move stmary*.*pk into a TeX bitmaps directory > > and I don't know which these directories are. Being said, the file compiles fine on a different linux computer I used to work on, but I don't know about its setup.


title: Changing chapter page footer with epigraph

text: I'm trying to modify the font size of my page numbers in footers, but running into problems with the chapter page when using an epigraph. Here is my MWE:               \documentclass[12pt,oneside]{book}     \usepackage{epigraph, fancyhdr}          \newcommand{\changefont}{\fontsize{10}{11}\selectfont}          % clear plain page style     \fancypagestyle{plain}{     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[C]{\changefont \thepage}     }          \pagestyle{fancy}          \fancyhf{}     \fancyhead[LE]{\changefont \slshape \rightmark}     \fancyhead[RO]{\changefont \slshape \leftmark}     \fancyfoot[C]{\changefont \thepage}          \renewcommand{\chaptermark}[1]{%     \markboth{\chaptername     \ \thechapter.\ #1}{}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     \frontmatter{}          \fancyhead[LE,RO]{\changefont \slshape Acknowledgements}     \fancyfoot[C]{\changefont \thepage}     \chapter*{Acknowledgements}          \epigraphhead[70]{\epigraph{The isolated man does not develop any intellectual power. It is necessary for him to be immersed in an environment\ldots}{Alan Turing}}          Acknowledgements go here.          \end{document}      I've tried changing the epigraph pagestyle with the modified footer, using               \fancypagestyle{epigraph}{\fancyfoot[C]{\changefont \thepage}}      but this removes my epigraph. Any ideas?


title: Store results of a calculation automatically under a new macro name

text: As I am now accessing values from tables via a macro to make dynamic references in the text (see here) and make calculations with it, I need a way to make the resulting variables under which the values are stored more user friendly. Because of LaTeX' limitation of not allowing numbers or any separator in a macro name (and I have many macros), I use the "`\csname\dots\endcsname`" approach from the TeX FAQ to create more meaningful names. This results in the following complication, illustrated in the MWE below: I use `siunitx` to print numbers via `\num` or `\SI`. As these commands accept only numbers, I can't make calculations within those. I use `l3fp` to make the calculations and store the the result under a (temporary) name. This results in two lines of code for every single variable:               \calc{\Numtest}{500/2}% store result     \DefineRemark{num:test}{\Numtest}% label result      And within the text the result would be called as `\num{\Remark{num:test}}`. I want to combine the two commands into one that would be something like `\newcalc{<varname>}{<calculation>}`. The following does not work because `\temp` does not get overwritten. I would require a new random name for every single instance of `\newcalc`.               \newcommand{\newcalc}[2]{%     \calc{\temp}{#2}     \DefineRemark{#1}{\temp}     }      What is a way to solve this issue? On another note in the MWE I created two new commands based on `\num` and `\SI` that incorporates the `\Remark` macro. Is it a good idea to create these commands by copying the original definition completely?               \documentclass{scrartcl}          \usepackage{siunitx,xparse,expl3}          % simple calculation command that stores the result     \ExplSyntaxOn     \NewDocumentCommand {\calc} { m m } {       \tl_set:Nx #1 { \fp_to_tl:n {#2} }     }     \ExplSyntaxOff          % Workaround for non-letters in macro names     \newcommand{\DefineRemark}[2]{%       \expandafter\newcommand\csname rmk-#1\endcsname{#2}%     }     \newcommand{\Remark}[1]{\csname rmk-#1\endcsname}          % Create \Num and \NUM based on siunitx' \num and \SI to incorporate the above directly     % (so \Num is \num{\remark{.}}). Not sure if it as a good idea to do it that way     \ExplSyntaxOn     \NewDocumentCommand \Num { o m } {       \leavevmode       \group_begin:         \IfNoValueF {#1}           { \keys_set:nn { siunitx } {#1} }         \__siunitx_number_output:n {\Remark{#2}}       \group_end:     }     \NewDocumentCommand \NUM { o m o m } {       \leavevmode       \group_begin:         \IfNoValueTF {#1}           { \__siunitx_combined:nnnn { } {\Remark{#2}} {#3} {#4} }           {             \keys_set:nn { siunitx } {#1}             \__siunitx_combined:nnnn {#1} {\Remark{#2}} {#3} {#4}           }       \group_end:     }     \ExplSyntaxOff          % Test if \Num and \NUM Works     \calc{\Numtest}{500/2}     \DefineRemark{num:test}{\Numtest}          % Trying to combine \calc and \DefineRemark     % This does not work :( Would need to create a new "\temp" each time     \newcommand{\newcalc}[2]{%     \calc{\temp}{#2}     \DefineRemark{#1}{\temp}     }          \newcalc{new:calc1}{250/2}     \newcalc{new:calc2}{125/2}               \begin{document}          Test Num and NUM Macros: \Num{num:test} and \NUM{num:test}{\percent}          \vspace{2ex}          Test the combination of calc and DefineRemark. The two values should be     different: \Num{new:calc1} and \Num{new:calc2}          \end{document}


title: How to change emphasis commands in pandoc's LaTeX template?

text: I want to change the default **strong** emphasis command in the conversion from pandoc's markdown to LaTeX, say, from `\textbf` to `\textsc`. Since running pandoc in the source file prints into the `.tex` file `\textbf`, I think it has nothing to do with the chosen template (unless the latter redefines `\textbf`, but that doesn't seem like a good option). I wish to tell pandoc to convert its strong emphasis into a `\strong` LaTeX command that I can define in the LaTeX template.


title: Creating reference for command

text: I have a command that creates a formatted minipage that is defined roughly like               \newcounter{X}     \setcounter{X}{1}     \newcommand{\assumption}[2]{        \begin{minipage}%          Assumption \Roman{X}: #1 \\#2%        \end{minipage}%        \addtocounter{X}{1}%     }      I'd like to be able to reference the minipage command. Preferably using `\ref`, but this isn't nescessary. Basically I would like to be able to do something like               \assumption{flatearth}{The earth is flat!}{It is obvious that this        assumption is reasonable.}          From assumption \ref{assum:flatearth} it follows that it's \emph{real}      circumference is $\infty$ and that the Victoria was capable of     superluminal velocities.      or just have a command like `\assref{flatearth}`. They should produce roman numerals corresponding to the counter `X`. Apologies for the ambiguous title, I've been trying to work out what to search for, it's not so clear.


title: Drawing "bus width"-like markers with number on arrows

text: I'm trying to draw arrows with / marks and numbers like in the following picture: ![screenshot of the arrows with / marks](http://i.stack.imgur.com/plwbO.png) My current solution looks like this:               \begin{tikzpicture}         [             inverter/.style={rectangle,draw,inner sep=2pt,minimum size=6mm},             dot/.style={circle,inner sep=0pt,minimum size=0.5mm,draw,fill=black}         ]         \node (x) at (0,0) {$x$};         \node (delta) at (1,0) [shape=rectangle,draw,minimum height=18mm,minimum width=6mm] {$\delta$};              \node(ah)     at ( 2,  0.5) [inverter] {$a_h$};         \node(al)     at ( 2, -0.5) [inverter] {$a_l$};              \draw [->] (x) -- (delta);              \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.58.75) -- (ah);         \node at ($ (ah) - (0.55, 0) $) {\scriptsize /};         \node at ($ (ah) - (0.5, 0.2) $) {\tiny 4};         \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.-58.75) -- (al);         \node at ($ (al) - (0.55, 0) $) {\scriptsize /};         \node at ($ (al) - (0.5, 0.2) $) {\tiny 4};     \end{tikzpicture}      which is pretty hacky and doesn't look nice. I tried strike out shapes but found the line to be much too long. However, positioning a / and a number manually seems like a pretty bad solution to me. I've seen a similar question that revolved around striking out lines or arrows, but without any numbering. Any input would be most welcome.


title: Choosing color mix for lines in pgfplots

text: I'm somewhat baffled by my apparent inability to choose a mix of colors in `pgfplots`. Here's a MWE:               \documentclass[10pt]{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.4}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \begin{document}     \begin{tikzpicture}[scale=1.0]          \begin{axis}[enlargelimits=false,         xtick={-3.141,0,3.141},         xticklabels={$-\pi$,$0$,$\pi$}]       \addplot[color=red!0.4!black,domain=-pi:pi] {sin(deg(x))};     \end{axis}          \end{tikzpicture}     \end{document}       I would have expected a color in between red and black, but I get just black. If I choose the color as `color=black!0.4!red` it turns out to be red. What am I doing wrong?


title: Change the font of figure captions

text: I would like to italicize my figure captions and make them smaller. How can I do that?


title: Change typeface in caption figure

text: It is possible to make the caption of a figure in CAPS (versalitas) typeface format? Like as image below. But I want to change only the 'FIGURE 1.1'. Descriptive text label that is invariant. That has not been answered in another post I also want to ask if it is possible to write in bold the test in CAPS format? ![enter image description here](http://i.stack.imgur.com/OJuIR.jpg) Code (false) right here for either case:                 \documentclass{article}       \usepackage{mathtools,amsmath}       \usepackage{amsthm}            \begin{document}            \begin{center}       \fbox{\parbox[b]{.3\linewidth}{         \begin{center}          .......\\This is a figure\\*******         \end{center} }       }       \end{center}            \begin{center}       \textsc{Figure 1.1:} Solution of $x^2\leq 4$       \end{center}       \end{document}


title: Latex Beamer multiple columns

text: So Im doing this presentation with Latex Beamer powerpoint. I have one slide that looks like a mess, but I need the equations in columns and in one slide. Heres how it looks: ![Screenshot of the slide](http://i.stack.imgur.com/A9qMP.png) And this is the code used:               \begin{frame}{Introducing bootstrap}     - Historical data Z to a risk estimate $\hat{\Psi}$ \\     \begin{columns}[c]     \column{0in}     $\theta \rightarrow Z$,\\     the real world          \column{0in}     $\hat{\theta}=g(Z)$\\     $\hat{\Psi}=\Psi(\hat{\theta})$\\     estimation          \column{0in}     and          \column{0in}     $\hat{\theta} \rightarrow \hat{Z}^{*}$\\     in the computer          \column{0in}     $\hat{\theta}^{*}=g(\hat{Z}^{*})$\\     $\hat{\Psi}^{*}=\Psi(\hat{\theta}^{*})$\\     estimation     \end{columns}          - The idea is to identify the distribution of $\hat{\Psi}^{*}$ given $\hat{\theta}$ with that of $\hat{\Psi}$ given $\theta$.     \end{frame}      Does anyone have an idea of how to make this look ordered and nice? Thanks


title: Indicating that the adjustwidth environment should be placed around text

text: I've been trying to work out a solution to this question about changing margins for body text without changing header/footer placement. Using the `changepage` package, I was able to work out the following pseudo- solution:               \documentclass{scrbook}      \usepackage{lipsum}      \usepackage{changepage}      \begin{document}      \chapter{One}      \begin{adjustwidth}{}{1in}                      Dummy text to test. \lipsum[1]     \end{adjustwidth}      \pagebreak      \section{One-one}     \begin{adjustwidth}{1in}{}                       Dummy text to test. \lipsum[1]     \end{adjustwidth}      \end{document}      Unfortunately, however, this is a bit of a pain to implement since as far as I can tell it will only work if the environment stays on a single page (so any editing after this solution is implemented may break it) and it is also not as automated as I would like. I noticed that `changepage` has a conditional for even and odd pages: `\ifevenpage` and `\ifoddpage`. This gave me the idea to do something like this:               \ifevenpage{\begin{adjustwidth}{1in}{} ***placeholder for text on page*** \end{adjustwidth}          \ifoddpage{\begin{adjustwidth}{}{1in} ***placeholder for text on page*** \end{adjustwidth}      But what I don't know how to do (if it is even possible) is how to wrap the environment around whatever text should happen to appear on the page, so that the environment starts at the beginning of the page and ends at the end of the page. How can I wrap the environment around whatever text may appear on the page?


title: multibib: setting margins

text: Using `multibib`, if I define a bibliography entitled "Primary literature" by using the following line:               \newcites{prim}{Primary Literature}      and then I write into the `document` block:               \nociteprim{ref1,ref2}     \bibliographystyleprim{apacite}     \bibliographyprim{publications}   % 'publications' is the name of a BibTeX file      I obtain the list of bib entries, e.g.:               Primary literature     entry1     entry2     ....      How can I set a left margin to the sole entries, e.g.               Primary literature           entry1           entry2           ....


title: How can I DeclareMathOperator* with spacing after it, preserving the alignment?

text: In the context of optimization problems, I'm using               \usepackage{amsmath}     \DeclareMathOperator*{\minimize}{\text{minimize}}     \DeclareMathOperator*{\subjto}{\text{subject to}}      to declare some operators to be used as `\minimize_{x, \beta}`, etc. These work: ![Example of minimize and subjto](http://i.stack.imgur.com/Zjuq3.png) However, to get the correct spacing, I have to use               \minimize_{x, \beta} \quad& x^T x - 2\beta \\     \subjto \quad& \beta > 0 \\     \subjto \quad& \sum_{i=1}^{n} x_i^2 < 1      I don't want to have to use manual `\quad` spacing, for obvious reasons: convenience, elegance, flexibility (what if I want `\ ` or `\qquad` later?), etc. I tried   * using `\DeclareMathOperator*{\minimize}{\text{minimize}\quad}`, but this causes the subscript spacing of `x, \beta` to be wrong—it's shifted to the right because the box is wider.   * using `\DeclareMathOperator*{\temp@minimize}{\text{minimize}}` with `\newcommand{\minimize}[0]{\temp@minimize\quad}` (with appropriate catcodes), but this didn't work because the operator doesn't take a command, it expects a subscript.   * using a similar version with `[1]` argument, failing for the same reason.   * using a similar version with `\def`, failing for the same reason. Ideas? What's the most elegant way to do this?


title: TeX capacity exceeded with glossary package

text: My document contains many thousands of glossary items. When compiling with XeLaTeX, about 1/8 of the way through the document, it reports:               ! TeX capacity exceeded, sorry [main memory size=3000000].     \@glolist@ ...},{13586},{9406},{4539},{12811},{179                                                       51},{5831},{1047},{14948},        * The numbers you see above are ones placed in `#1` of `\newglossaryentry{#1}{#2}`. These unique numbers are assigned to each entry for convenience.   * I have successfully compiled short tests of the document, which only used 1% of the full content.   * The resulting `.glo` file is about 1 MB in size. Could this be the result of some error on my part or am I giving TeX too much work to do? Update: I have followed the instructions below (edited `texmf.cnf` and running `fmtutil-sys --all`. This has allowed me to compile an additional portion of the book, but no matter the settings I add, I can't go beyond 5/8 of the way through. A compile with `extra_mem_top.xelatex = 30000000` and `extra_mem_top.xelatex = 50000000` both result in:               TeX capacity exceeded, sorry [pool size=3186676].      Update: I have done the following:               $ kpsewhich texmf.cnf     /usr/local/texlive/2011/texmf.cnf     $ nano /usr/local/texlive/2011/texmf.cnf      To the `texmf.cnf` file, following instructions at Increase TeX capacity, as non-root, I added:               main_memory = 230000000     extra_mem_top = 10000000     extra_mem_bot = 10000000     save_size = 150000     stack_size = 150000          main_memory.xelatex = 30000000     extra_mem_top.xelatex = 30000000      After this, I tried: \- `fmtutil-sys --all`, then compiling `xelatex file.tex`. \- `fmtutil --all`, then compiling `xelatex file.tex`. \- `fmtutil- sys --byfmt xelatex`, then compiling with `xelatex file.tex`. \- `texhash`, then compiling with `xelatex file.tex`. All of these resulted in no changes in results. I still get:               TeX capacity exceeded, sorry [pool size=3186676].


title: Biblatex: escaped underscore in bib file prints as %5c in bibliography?

text: My reference manager escapes all underscores in URLs. I thought that was OK until I noticed it prints `%5c` in front of all URL underscores. How can I avoid this while still having the escaped underscores in the bib file? -- I can't change what my reference manager output, unfortunately. MWE: test.bib               @online{testref,     author = {Some Author},     title = {{Some Title}},     url = {http://www.example.com/some\_file.zip}     }      test.tex               \documentclass{article}     \usepackage[uniquelist=false,maxcitenames=2,backend=biber,style=authoryear,natbib=true]{biblatex}     \addbibresource{test.bib}          \begin{document}     Hello you \citep{testref}.          \printbibliography     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/2vLuh.png)


title: LaTeX code sniffer and/or beautifier?

text: I'm looking for a LaTeX code sniffer and/or code beautifier, because I'm creating a CI server for my LaTeX books and I wanted a few things. :D


title: Is there a LaTeX formatter/beautifier (indenter, wrapper, context aware) similar to HTMLTidy?

text: Alternating work on a laptop, netbook and tablet the word wrap of a document is sometimes too long (for small screens) and too short (for large screens). This also got me thinking. **Is there a tool like HTMLTidy for LaTeX that can properly reformat/beautify a document?** Ideally it should include   * Fixing of **indentation** and **tag alignment** (some editors do little to aid here)   * **Word wrapping** (hard and soft) - but definitely context aware   * Configuration options like for tabs vs spaces, wrapping width, tag alignment cli tools like fold are not context aware enough (it would mangle commented sections and just focus on the wrapping aspect) and makes compilation fail at time. This link mentions texpretty and this discussion mentions a LaTeX tidy perl script by Eric Hsu. What experiences have you had, or what tools can be suggested (preferably cli and platform independent)?


title: Auto-indentation of LaTeX Source code in TeXShop

text: Sometimes, I find it a bit hard to manually indent my code so that all the \begin{...}'s and \end{...}'s align vertically in my .tex source code. In some code development environments, I know that there are options to auto-indent the beginnings and ends of loops, functions, and other code blocks. I'm wondering if there is a way to do this in TeXShop or any other freeware for latex code?


title: Automatic utility for tex source indentation

text: Is there any indentation tool for (la)tex? I currently use TexShop under Mac OSX, so I can either use a TexShop plugin or a command line tool.


title: Remove half part of Page

text: How can I remove second half part of the page. For example my conclusion is half of page and I want reference list starts at the same page. My reference list starts one page after conclusion, but what I want is to let References list starts at the same page as conclusion. How can I do this please.


title: Converting node coordinates in tikz 3d?

text: Consider this MWE:               \documentclass[%     12pt,     journal,     onecolumn,     twoside,     draftcls,     letterpaper,     ]{IEEEtran}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{positioning}     \usetikzlibrary{3d}     \usepackage{adjustbox}     \usepackage{setspace} %\singlespacing     \usepackage{caption}     \usepackage[nopar]{lipsum}     \usepackage{xstring}     % http://tex.stackexchange.com/a/26808/2595     \makeatletter     \def\unpacklipsum#1#2#3{%       \count@=#1\relax       \advance\count@\m@ne       \def#3{}%       \loop\ifnum\count@<#2\relax         \advance\count@\@ne         \edef#3{#3\csname lipsum@\romannumeral\count@\endcsname}%       \repeat}     \makeatother     % http://tex.stackexchange.com/a/168754/2595     \def\loremnchars[#1]#2{%       \unpacklipsum{#1}{#1}{\myunpacked}%       \StrMid{\myunpacked}{1}{#2}% same as \StrLeft{\myunpacked}{#2}     }          \begin{document}          \loremnchars[1]{255} ...          \begin{center}     \singlespacing     \begin{adjustbox}{width=0.9\textwidth}     \def\angl{70}     \begin{tikzpicture}[       x={({cos(\angl)*1cm},{sin(\angl)*1cm})},y={(1.0cm,0cm)},z={(0,1cm)},       every node/.append style={         %xslant=0.0,yslant=0.0,         transform shape,       },     ]            \tikzstyle{rr} = [draw,fill=gray,opacity=0.5];            \begin{scope}[canvas is yx plane at z=0.0]         \draw[rr] (0,0) rectangle (15,27);         \node[draw,align=left,anchor=south west] (aa) at (3,3.5) {\loremnchars[6]{60} \\ \loremnchars[7]{60}};       \end{scope}            \begin{scope}[canvas is yx plane at z=2.0]         \draw[rr] (0,0) rectangle (15,27);         \node[] (tdrag) at (7,24) {};         \begin{scope}[shift={(tdrag)},         rotate=180,         anchor=center,         transform shape,         ]           \node[draw,align=left] {\loremnchars[2]{60} \\ \loremnchars[3]{60}};         \end{scope}       \end{scope}            \begin{scope}[canvas is yx plane at z=4.0]         \draw[rr] (0,0) rectangle (15,27);         \node[draw,align=left,anchor=south west] (bb) at (3,5.5) {\loremnchars[8]{60} \\ \loremnchars[9]{60}};       \end{scope}          % \draw[dashed,line width=2pt] (aa) -- (bb);     \draw[dashed,line width=2pt] let \p1=(aa), \p2=(bb) in (\x1,\y1) -- (\x2,\y2);      %L2     % \draw[dashed,line width=10pt] let \p1=(aa), \p2=(bb) in (\x1,\y1,0) -- (\x2,\y2,4); %L3          \end{tikzpicture}     \end{adjustbox}     \captionof{figure}[short]{     A short message; \loremnchars[5]{255} ...     }     \label{fig:test}     \end{center}          \end{document}      When I compile with the line `%L2` enabled, as in the MWE, I get an expected result (click for full size): ![test21](http://i.stack.imgur.com/zpKR3m.png) However, I would like a connector line that goes from `(aa.west)`, then 5 pt to the left on same plane (z=0), then up to z=4, then left on same plane to `(bb.west)`. So I thought I'd simply use the `let` syntax, and extract the x, y coordinates from the node anchors, and simply add the z coordinate (and in-between points); but simply adding the z coordinate - if you uncomment line `%L3` and comment `%L2` \- something weird is plotted: ![test22](http://i.stack.imgur.com/9AA4Km.png) The line seems way off - I think the problem is: the `\x1` coordinates are expressed in `pt`, and they are the _transformed_ coordinates (as ultimately on the 2D paper); but for some reason, in the 3D node usage, they are probably still interpreted in `cm` (if I remember correctly, the default TikZ unit). Regardless of the reason - is there any way I could use, so I can "convert" the `\x1` and `\y1` coordinates of, say `(aa.east)` in the "3D coordinate system", so I can use them directly with a manually specified Z coordinate? * * * EDIT: apparently this has something to do with cm conversion; with the code below (more or less found by bruteforcing), I get something close to what I want: ![test23](http://i.stack.imgur.com/dXPsHm.png) Note that I have to both convert to cm, and invert the y and x coordinates to get this image, which puzzles me quite a bit. But it is not quite correct, it seems - the `(bb)` node should be directly above `(aa)`; and yet if I follow the connector line, it looks like `(bb)` is displaced on y axis as well?? So still, a proper answer would be appreciated...               \documentclass[%     12pt,     journal,     onecolumn,     twoside,     draftcls,     letterpaper,     ]{IEEEtran}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{positioning}     \usetikzlibrary{3d}     \usepackage{adjustbox}     \usepackage{setspace} %\singlespacing     \usepackage{caption}     \usepackage[nopar]{lipsum}     \usepackage{xstring}     % http://tex.stackexchange.com/a/26808/2595     \makeatletter     \def\unpacklipsum#1#2#3{%       \count@=#1\relax       \advance\count@\m@ne       \def#3{}%       \loop\ifnum\count@<#2\relax         \advance\count@\@ne         \edef#3{#3\csname lipsum@\romannumeral\count@\endcsname}%       \repeat}     \makeatother     % http://tex.stackexchange.com/a/168754/2595     \def\loremnchars[#1]#2{%       \unpacklipsum{#1}{#1}{\myunpacked}%       \StrMid{\myunpacked}{1}{#2}% same as \StrLeft{\myunpacked}{#2}     }          \makeatletter     % http://tex.stackexchange.com/questions/33703/extract-x-y-     \newcommand{\gettikzxy}[3]{%       \tikz@scan@one@point\pgfutil@firstofone#1\relax       \global\edef#2{\the\pgf@x}%       \global\edef#3{\the\pgf@y}%       \typeout{ gettikzxy: x #2, y #3}     }     % http://tex.stackexchange.com/a/8337/2595     \def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1}     \makeatother          \begin{document}          \loremnchars[1]{255} ...          \begin{center}     \singlespacing     \begin{adjustbox}{width=0.9\textwidth}     \def\angl{70}     \begin{tikzpicture}[       x={({cos(\angl)*1cm},{sin(\angl)*1cm})},y={(1.0cm,0cm)},z={(0,1cm)},       every node/.append style={         %xslant=0.0,yslant=0.0,         transform shape,       },     ]            \tikzstyle{rr} = [draw,fill=gray,opacity=0.5];            \begin{scope}[canvas is yx plane at z=0.0]         \draw[rr] (0,0) rectangle (15,27);         \node[draw,align=left,anchor=south west] (aa) at (3,3.5) {\loremnchars[6]{60} \\ \loremnchars[7]{60}};         \gettikzxy{(aa.south west)}{\ax}{\ay}       \end{scope}            \begin{scope}[canvas is yx plane at z=2.0]         \draw[rr] (0,0) rectangle (15,27);         \node[] (tdrag) at (7,24) {};         \begin{scope}[shift={(tdrag)},         rotate=180,         anchor=center,         transform shape,         ]           \node[draw,align=left] {\loremnchars[2]{60} \\ \loremnchars[3]{60}};         \end{scope}       \end{scope}            \begin{scope}[canvas is yx plane at z=4.0]         \draw[rr] (0,0) rectangle (15,27);         \node[draw,align=left,anchor=south west] (bb) at (3,5.5) {\loremnchars[8]{60} \\ \loremnchars[9]{60}};         \gettikzxy{(bb.south west)}{\bx}{\by}       \end{scope}          % \draw[dashed,line width=2pt] (aa) -- (bb);     % \draw[dashed,line width=2pt] let \p1=(aa), \p2=(bb) in (\x1,\y1) -- (\x2,\y2);      %L2     % \draw[dashed,line width=10pt] let \p1=(aa), \p2=(bb) in (\x1,\y1,0) -- (\x2,\y2,4); %L3          % \gettikzxy{(aa.south west)}{\ax}{\ay} % not here     \edef\cax{\convertto{cm}{\ax}}     \edef\cay{\convertto{cm}{\ay}}     \typeout{ : cax \cax, cay \cay }     \edef\cbx{\convertto{cm}{\bx}}     \edef\cby{\convertto{cm}{\by}}     \typeout{ : cbx \cbx, cby \cby }     \draw[dashed,line width=5pt] let       \p1=(\cay,\cax,0),       \p2=($(\p1)-(0pt,1pt,0)$),       \p3=($(\p2)+(0,0,2)$),       \p4=($(\p2)+(0,0,4)$),       \p6=(\cby,\cbx,4),       \p5=($(\p6)-(0,1pt,0)$)       in       (\p1) -- (\p2) node[fill]{} -- (\p3) node[fill]{} -- (\p4) node[fill]{} -- (\p5) -- (\p6) ;          \end{tikzpicture}     \end{adjustbox}     \captionof{figure}[short]{     A short message; \loremnchars[5]{255} ...     }     \label{fig:test}     \end{center}          \end{document}


title: change position of headline / \insertnavigation beamer

text: I wanted to widen the beamer page, which I did in my stlye file using `\setbeamersize{text margin left=0.2cm}` etc. I was able to ensure that (i) frametitle is inserted with the same margin (`\leftskip=-\beamer@leftmargin \advance\leftskip by0.2cm`) and (ii) the footline also has the same margin (`\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.2cm plus1fill,rightskip=.3cm]{title in head/foot`} etc.), basically by hacking standard style files. What I failed to do through experimenting was to have the headline (navigation, i.e., section heads or titles) use the same left and right margins. I would have though that passing the width argument {`wd=\paperwidth`} or {`wd=\textwidth`} to `\insertnavigation` would set it to the same margins as the `\setbeamersize{text margin ...` commands, but it does not, as these sizes appear independent of the defined text margins. The one thing that had an effect is the introduction of an `\hskip` command, paired with changing wd to a higher proportion of `\pagewidth` (e.g., 1.03), but the effect of these parameters on the output is not continuous, and could not get the desired outcome. I am hopeful that there is a **correct** , elegant solution. Can anyone point it out to me? Thanks a lot. Nicolae


title: Get \font equivalent of NFSS font

text: How do I generate a command of the form `\font\namefont =` _`something`_ so that it matches an NFSS-style font selection? I was doing something wrong and misdiagnosed the problem I was having as a mismatch between two packages. The first required NFSS-style commands, lines of the form               \def \crdfont {\footnotesize\sffamily\bfseries}      In the other a plain TeX-style font command is required, _e.g._ ,               \font \namefont = cmssbx8      In the actual case I had, `\def\namefont{\crdfont}` actually worked fine (the error came from leaving off the brackets), but it got me thinking: What is the general form of translating NFSS-style selection to plain TeX style? Is it generally the case that `\font \namefont =` _`identifier`_ is interchangeable with `\def\namefont{` _`NFSS commands`_`}`?


title: Equation + explanation below

text: I have to write an explanation to my equation, and I would like to do it, below the equation. But, I do not know how to do that. It should look like this: ![enter image description here](http://i.stack.imgur.com/KFCiC.png) My preamble look like this:               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[english]{babel}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes,arrows,positioning,calc}      \usepackage{tabu}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{array}     \usepackage{siunitx,multirow,tabularx,booktabs}     \usepackage{amsmath,amssymb,bm,mathtools}          \begin{document}          \begin{equation}     E = \alpha X + \beta F + u     \end{equation}          \end{document}


title: Setting Font attributes in Beamer

text: I have to make slides under some given restrictions for a presentation. I am thinking of using beamer, even though I have not used it before. One of the given restrictions is that a title has to be in Arial, 44 pt size, and bold. After reading the manual I came up with the following experimental code.               \documentclass{beamer}     \setbeamerfont*{titlefont}{size*={44pt}{24pt}, family={\fontfamily{phv}}, series=\bfseries}     \begin{document}     \begin{frame}     \usebeamerfont*{titlefont}     Titles 44 pt and bold     \end{frame}     \end{document}      The output is in Arial and bold, however, the size seems much larger than 44pt. What seems to be the problem? Is there anther way to do this?


title: header and footer in letter class newlfm

text: I am trying to write letters using newlfm. The first page is fine but on subsequent pages it puts bars for the header and footer but doesn't include the address, logos etc. that appear on the first page. I'd prefer subsequent pages to be blank except for my text. Here's the code:               \documentclass[stdletter,11pt]{newlfm}           \addrfromskipbefore{10pt}     \unprbottom{1cm}          \newsavebox{\CortlandLogo}      \sbox{     \CortlandLogo}{\parbox[t]{1.75in}{\includegraphics[height=1.5cm,ext=.pdf]{CortlandLogo}}     }          \newsavebox{\PhysDept}     \sbox{     \PhysDept}{\parbox[t]{5cm}{\sf \Large Physics Department}     }               \Rheader{\usebox{\CortlandLogo}}     \Lheader{\usebox{\PhysDept}}          \newsavebox{\Footertext}      \sbox{\Footertext}{     \begin{minipage}[c]{15cm}     \begin{center}     \sf Bowers Hall, Room 342,  P.O. Box 2000, Cortland, NY 13045-0900, United States\\     Phone: (607) 753-2821  Fax: (607) 753-2927     \end{center}     \end{minipage}     }       \Cfooter{\usebox{\Footertext}}          \namefrom{Dr. Andrew Carmichael}      \addrfrom{\parbox{2.5in}{Dr. Andrew Carmichael\\ Office: Bowers 133\\ Phone: 607 753-5697 }}           \begin{document}      \closeline{Yours faithfully,}           \begin{newlfm}      {\bf Re: BLAH BLAH}          \vspace{1cm}          TEXT TEXT BLAH BLAH TEXT WHEN THERE'S ENOUGH TEXT HERE IT GOES OVER TO TWO PAGES AND THERE THE TROUBLE STARTS          \end{newlfm}      \end{document}


title: How to recover lost .tex files

text: ## Initial position I recently bought a new computer, and I thought I have backed up all of my LaTeX files and documents from my old computer onto an external hard drive. Upon searching for old LaTeX documents in the external drive, I noticed that all of them were only available in PDF form (there were no `.tex` files anymore). ## Question How can I recover or reconstruct these lost `.tex` files?


title: TeXmaker opening multiple instances of the same file

text: I'm working with a document I have split into several pieces and gathered them in one "master file". While writing, I switch between the different files using the structure tree or the arrows beside the name of the current file, much like with tabs in a browser. When one file is already opened and I click again on this file in the structure tree, the file opens again; I then have two instances of the same file open. I run the risk of editing two different files and I can save only one; it happened to me a couple of times. Is it possible to change something in TeXmaker so that, whenever I click on a file already open, the corresponding tab becomes active instead of opening a new instance of the file?


title: Create sort of custom trapezoid text box

text: I want to create a sort of text box, path you maybe want to call it, using TikZ, which has the shape of a triangle. I then want the text follows the hypotenuse of the triangle.                   /        / The text follows the       / the Path of the      / hypotenuse      /          How do I make this possible, using TikZ? At the moment I'm just defining three nodes and using `xshift` I align every line with the the hypotenuse. **UPDATE** I had to be a bit more clear about defining the text, but the text should be defined in one instance so `\text{The text follows the \\ the path of the \\ hypotenuse}` This just came up with me but the text in the 'textbox' should also have justification. So the image would maybe look more like...                   /                  |        / This is some text |       / this    is    also | <-- line is justified      / hypotenuse          |     /                      |


title: Customize \verb!...! output in beamer

text: I would like to change my verbatim throughout a `beamer` presentation in the preamble. Actually I would like to have it more or less like on slide no. 9 here. ![enter image description here](http://i.stack.imgur.com/SNYit.png) I am using verbatim usually with `\verb!...!` rather than the environment because for longer codes I use `listings`. As far as I can tell the `fancyvrb` only allows customization in packages.