title: Extra \else error

text: I am wary of posting this as these extra \else posts seem to be getting closed, but here goes... I getting the following errors when compiling my .tex file: ![enter image description here](http://i.stack.imgur.com/4WqED.jpg) Line 243 is not being included in the output PDF and a whole blank page is being inserted above line 243. I have commented out many chunks from the .tex and compiling, in the hope of finding the error, but this has not found the error. So short of posting the entire .tex file, I cannot think of a way of posting a mwe. One thing I have observed is that if I change the file name of my .tex file and compile, the errors do not occur. If I then run bibtex to add my bibliography to the file, then error does occur. Does this provide any clues? This is my .aux file:               \relax      \citation{LopesEtAl2006,Livezey2010}     \citation{Miller1983,BrazilIkenaga1987,ConnorsEtAl1993,Miller1996}     \citation{FunkEtAl2007,WennerbergEtAl2008,KupperEtAl2009,LopesEtAl2013}     \citation{EngelmoerRoselaar1998}     \citation{PraterEtAl1977}     \citation{HirschfieldEtAl2000,SchroederEtAl2008,Cramp1983,StClairEtAl2010}     \citation{BertrandEtAl2006,JohnsonEtAl2013,PriceWhalen2009}     \citation{Hart2001,Cuthill2006,StoddardStevens2011}     \select@language{english}     \@writefile{toc}{\select@language{english}}     \@writefile{lof}{\select@language{english}}     \@writefile{lot}{\select@language{english}}     \citation{Kilner1997}     \citation{BotJansen2013}     \citation{Surmacki2008}     \citation{BirdLifeInternational2013}     \citation{EngelmoerRoselaar1998,Cramp1983,GlutzvonBlotzheimEtAl1975,Vaurie1965,HaymanEtAl1991,Chandler2009}     \citation{Neumann1929,Johansen1961,EngelmoerRoselaar1998,Chandler2009}     \citation{PraterEtAl1977}     \citation{Garner2004}     \citation{BeamanMadge1998}     \citation{DoucetHill2009}     \citation{ArmentaEtAl2008}     \citation{FerreiraRasband2011}     \citation{PraterEtAl1977}     \citation{Cramp1983,EngelmoerRoselaar1998,HaymanEtAl1991}     \citation{WernhamEtAl2002}     \citation{EngelmoerRoselaar1998}     \citation{Amadon1949,PattenUnitt2002}     \citation{Donegan2012}     \@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Eigenvalues, proportion of variation explained and factor loadings of first two principal components outputted by one principal components analysis each of 1) hue, 2) saturation and 3) brightness\relax }}{4}}     \providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}     \newlabel{loadings_df}{{1}{4}{Eigenvalues, proportion of variation explained and factor loadings of first two principal components outputted by one principal components analysis each of 1) hue, 2) saturation and 3) brightness\relax \relax }{}{}}     \newlabel{sub:summary}{{}{4}{\relax }{}{}}     \newlabel{sub:specimen_collection_location_two_categories}{{}{4}{\relax }{}{}}     \citation{PraterEtAl1977}     \citation{PiersmaJukema1993}     \citation{ArmentaEtAl2008}     \citation{Winker2000}     \citation{DoucetHill2009}     \citation{EevaEtAl2009}     \citation{GuillaumetEtAl2008,SurmackiEtAl2011}     \citation{Andersson1999,BrinkvanderBergNG2004,ShawkeyEtAl2006,ShawkeyEtAl2005}     \citation{}     \citation{PiersmaJukema1993}     \citation{HassallEtAl2011}     \citation{Greenwood1986}     \citation{TobiasEtAl2010}     \newlabel{sub:specimen_collection_location_four_categories}{{}{6}{\relax }{}{}}     \bibstyle{agsm}     \bibdata{refs}     \bibcite{Amadon1949}{{1}{1949}{{Amadon}}{{}}}     \bibcite{Andersson1999}{{2}{1999}{{Andersson}}{{}}}     \bibcite{ArmentaEtAl2008}{{3}{2008}{{Armenta et~al.}}{{Armenta, Dunn and\ Whittingham}}}     \bibcite{BeamanMadge1998}{{4}{1998}{{Beaman and\ Madge}}{{}}}     \bibcite{BertrandEtAl2006}{{5}{2006}{{Bertrand et~al.}}{{Bertrand, Faivre and\ Sorci}}}     \bibcite{BotJansen2013}{{6}{2013}{{Bot and\ Jansen}}{{}}}     \bibcite{BrazilIkenaga1987}{{7}{1987}{{Brazil and\ Ikenaga}}{{}}}     \bibcite{BrinkvanderBergNG2004}{{8}{2004}{{Brink and\ Van Der~Berg}}{{}}}     \bibcite{Chandler2009}{{9}{2009}{{Chandler}}{{}}}     \bibcite{ConnorsEtAl1993}{{10}{1993}{{Connors et~al.}}{{Connors, McCaffery and\ Maron}}}     \bibcite{Cramp1983}{{11}{1983}{{Cramp}}{{}}}     \bibcite{Cuthill2006}{{12}{2006}{{Cuthill}}{{}}}     \bibcite{Donegan2012}{{13}{2012}{{Donegan}}{{}}}     \bibcite{DoucetHill2009}{{14}{2009}{{Doucet and\ Hill}}{{}}}     \bibcite{EevaEtAl2009}{{15}{2009}{{Eeva et~al.}}{{Eeva, Sillanp{\"a}{\"a} and\ Salminen}}}     \bibcite{EngelmoerRoselaar1998}{{16}{1998}{{Engelmoer and\ Roselaar}}{{}}}     \bibcite{FerreiraRasband2011}{{17}{2011}{{Ferreira and\ Rasband}}{{}}}     \bibcite{FunkEtAl2007}{{18}{2007}{{Funk et~al.}}{{Funk, Mullins and\ Haig}}}     \bibcite{Garner2004}{{19}{2004}{{Garner}}{{}}}     \bibcite{GlutzvonBlotzheimEtAl1975}{{20}{1975}{{Glutz~von Blotzheim et~al.}}{{Glutz~von Blotzheim, Bauer and\ Bezzel}}}     \bibcite{Greenwood1986}{{21}{1986}{{Greenwood}}{{}}}     \bibcite{GuillaumetEtAl2008}{{22}{2008}{{Guillaumet et~al.}}{{Guillaumet, Crochet and\ Pons}}}     \bibcite{Hart2001}{{23}{2001}{{Hart}}{{}}}     \bibcite{HaymanEtAl1991}{{24}{1991}{{Hayman et~al.}}{{Hayman, Marchant and\ Prater}}}     \bibcite{HirschfieldEtAl2000}{{25}{2000}{{Hirschfeld et~al.}}{{Hirschfeld, Roselaar and\ Shirihai}}}     \bibcite{BirdLifeInternational2013}{{26}{2013}{{International}}{{}}}     \bibcite{Johansen1961}{{27}{1961}{{Johansen}}{{}}}     \bibcite{JohnsonEtAl2013}{{28}{2013}{{Johnson et~al.}}{{Johnson, Jordan~Price and\ Pruett-Jones}}}     \bibcite{Kilner1997}{{29}{1997}{{Kilner}}{{}}}     \bibcite{KupperEtAl2009}{{30}{2009}{{K{\"u}pper et~al.}}{{K{\"u}pper, Augustin, Kosztol{\'a}nyi, Burke, Flguerola and\ Sz{\'e}kely}}}     \bibcite{Livezey2010}{{31}{2010}{{Livezey}}{{}}}     \bibcite{LopesEtAl2013}{{32}{2013}{{Lopes et~al.}}{{Lopes, Alves, Gill, Gunnarsson, Hooijmeijer, Louren{\c {c}}o, Masero, Piersma, Potts, Raba{\c {c}}al et~al.}}}     \bibcite{LopesEtAl2006}{{33}{2006}{{Lopes et~al.}}{{Lopes, Marques and\ Wennerberg}}}     \bibcite{Miller1996}{{34}{1996}{{Miller}}{{}}}     \bibcite{Miller1983}{{35}{1983}{{Miller et~al.}}{{Miller, Gunn and\ Harris}}}     \bibcite{Neumann1929}{{36}{1929}{{Neumann}}{{}}}     \bibcite{PattenUnitt2002}{{37}{2002}{{Patten et~al.}}{{Patten, Unitt and\ Sheldon}}}     \bibcite{PraterEtAl1977}{{38}{1977}{{Prater et~al.}}{{Prater, Marchant and\ Vuorinen}}}     \bibcite{PriceWhalen2009}{{39}{2009}{{Price and\ Whalen}}{{}}}     \bibcite{SchroederEtAl2008}{{40}{2008}{{Schroeder et~al.}}{{Schroeder, Louren{\c {c}}o, Velde, Hooijmeijer, Both and\ Piersma}}}     \bibcite{ShawkeyEtAl2006}{{41}{2006}{{Shawkey et~al.}}{{Shawkey, Hill, McGraw, Hood and\ Huggins}}}     \bibcite{ShawkeyEtAl2005}{{42}{2005}{{Shawkey et~al.}}{{Shawkey, Mills, Dale and\ Hill}}}     \bibcite{StClairEtAl2010}{{43}{2010}{{St~Clair et~al.}}{{St~Clair, Kuepper, Herrmann, Woods and\ Szekely}}}     \bibcite{StoddardStevens2011}{{44}{2011}{{Stoddard and\ Stevens}}{{}}}     \bibcite{Surmacki2008}{{45}{2008}{{Surmacki}}{{}}}     \bibcite{SurmackiEtAl2011}{{46}{2011}{{Surmacki et~al.}}{{Surmacki, Siefferman and\ Yuan}}}     \bibcite{TobiasEtAl2010}{{47}{2010}{{Tobias et~al.}}{{Tobias, Seddon, Spottiswoode, Pilgrim, Fishpool and\ Collar}}}     \bibcite{Vaurie1965}{{48}{1965}{{Vaurie}}{{}}}     \bibcite{WennerbergEtAl2008}{{49}{2008}{{Wennerberg et~al.}}{{Wennerberg, Marthinsen and\ Lifjeld}}}     \bibcite{WernhamEtAl2002}{{50}{2002}{{Wernham et~al.}}{{Wernham, Siriwardena, Toms, Marchant, Clark and\ Baillie}}}     \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Location of collection of Curlew specimens}}{11}}     \newlabel{fig:plots_specimen_locations}{{1}{11}{Location of collection of Curlew specimens\relax }{}{}}     \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Density of four principal components of coloration in \textit  {orientalis} and \textit  {arquata}}}{12}}     \newlabel{fig:plot_coloration_density}{{2}{12}{Density of four principal components of coloration in \textit {orientalis} and \textit {arquata}\relax }{}{}}     \@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Results of linear regression to determine which variables predicted hue, saturation an brightness of Curlew specimens. Origin of collection is split into two groups: specimens collected within range of orientalis or arquata.\relax }}{13}}     \newlabel{oricoll_lm}{{2}{13}{Results of linear regression to determine which variables predicted hue, saturation an brightness of Curlew specimens. Origin of collection is split into two groups: specimens collected within range of orientalis or arquata.\relax \relax }{}{}}     \@writefile{lot}{\contentsline {table}{\numberline {3}{\ignorespaces Results of linear regression to determine which variables predicted hue, saturation an brightness of Curlew specimens. Origin of collection is split into two groups: specimens collected within Europe, Africa/Middle East, Asia or India.\relax }}{13}}     \newlabel{oricoll_subgroup_lm}{{3}{13}{Results of linear regression to determine which variables predicted hue, saturation an brightness of Curlew specimens. Origin of collection is split into two groups: specimens collected within Europe, Africa/Middle East, Asia or India.\relax \relax }{}{}}     \newlabel{fig:sub1}{{\caption@xref {fig:sub1}{ on input line 432}}{15}{\relax }{}{}}     \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Examples of specimen used in studies. Red circles show the locations on the breast, scapulars and crown of hue, saturation and brightness measurement\relax }}{15}}     \newlabel{LastPage}{{}{15}}     \xdef\lastpage@lastpage{15}     \gdef\lastpage@lastpageHy{}     \ttl@finishall      And this is .cls file:               % ---------------------------------------------------------------------     % Conference proceedings and article templates for     % personal open-archiving activities     % September 2012     % ---------------------------------------------------------------------          \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{SelfArx}[25/01/2012, v1.0]     \RequirePackage{ifthen}     \RequirePackage{calc}     \AtEndOfClass{\RequirePackage{microtype}}     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions*     \LoadClass{article}     .cls     \RequirePackage{times}      % Loads the Times-Roman Fonts     \RequirePackage{mathptmx}   % Loads the Times-Roman Math Fonts     \RequirePackage{ifpdf}      % Needed to pick between latex and pdflatex          % ---------------------------------------------------------------------     \RequirePackage[utf8]{inputenc}     \RequirePackage{amsmath,amsfonts,amssymb}     \RequirePackage{graphicx,xcolor}     \RequirePackage[english]{babel}     \RequirePackage{booktabs}     % ---------------------------------------------------------------------          %%%%% for abstract+authors frames                % ---------------------------------------------------------------------            % margins              \RequirePackage[left=2cm,%                     right=2cm,%                     top=2.25cm,%                     bottom=2.25cm,%                     headheight=11pt,%                     letterpaper]{geometry}%     \RequirePackage[labelfont={bf,sf},%                     labelsep=period,%                     justification=raggedright]{caption}     % ---------------------------------------------------------------------     \RequirePackage{fancyhdr}  % Needed to define custom headers/footers     \RequirePackage{lastpage}  % Number of pages in the document     \pagestyle{fancy}          % Enables the custom headers/footers     % Headers     \lhead{}%     \chead{}%     \rhead{\small\sffamily\bfseries\@PaperTitle\  --- \thepage/\pageref{LastPage}}     % Footers     \lfoot{}%     \cfoot{}%     \rfoot{}%     \renewcommand{\headrulewidth}{0pt}% % No header rule     \renewcommand{\footrulewidth}{0pt}% % No footer rule     % ---------------------------------------------------------------------     % section/subsection/paragraph set-up     \RequirePackage[explicit]{titlesec}     \titleformat{\section}       {\color{color1}\large\sffamily\bfseries}       {}       {0em}       {\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering\arabic{section}. #1}}}       []     \titleformat{name=\section,numberless}       {\color{color1}\large\sffamily\bfseries}       {}       {0em}       {\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering#1}}}       []       \titleformat{\subsection}       {\color{color1}\sffamily\bfseries}       {\thesubsection}       {0.5em}       {#1}       []     \titleformat{\subsubsection}       {\sffamily\small\bfseries}       {\thesubsubsection}       {0.5em}       {#1}       []         \titleformat{\paragraph}[runin]       {\sffamily\small\bfseries}       {}       {0em}       {#1}      \titlespacing*{\section}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}     \titlespacing*{\subsection}{0pc}{2.5ex \@plus3pt \@minus2pt}{0pt}     \titlespacing*{\subsubsection}{0pc}{2ex \@plus2.5pt \@minus1.5pt}{0pt}     \titlespacing*{\paragraph}{0pc}{1.5ex \@plus2pt \@minus1pt}{10pt}     % ---------------------------------------------------------------------     % tableofcontents set-up     \usepackage{titletoc}     \contentsmargin{0cm}     \titlecontents{section}[\tocsep]       {\addvspace{4pt}\small\bfseries\sffamily}       {\contentslabel[\thecontentslabel]{\tocsep}}       {}       {\hfill\thecontentspage}       []     \titlecontents{subsection}[\tocsep]       {\addvspace{2pt}\small\sffamily}       {\contentslabel[\thecontentslabel]{\tocsep}}       {}       {\ \titlerule*[.5pc]{.}\ \thecontentspage}       []     \titlecontents*{subsubsection}[\tocsep]       {\footnotesize\sffamily}       {}       {}       {}       [\ \textbullet\ ]       % ---------------------------------------------------------------------       % Get the multiple author set     \newcount\@authcnt     \newcount\@tmpcnt\@tmpcnt\z@          \def\@affiliation{%       \ifnum\@tmpcnt<\@authcnt        \global\advance\@tmpcnt1         \raggedright \csname @auth\romannumeral\the\@tmpcnt\endcsname\hfill\\%        \let\next\@affiliation \vskip1pt       \else        \let\next\relax       \fi     \next}          \newcommand{\affiliation}[1]{%         \global\advance\@authcnt1         \expandafter\gdef\csname @auth\romannumeral\the\@authcnt\endcsname         {#1}}     % ---------------------------------------------------------------------     \RequirePackage{enumitem}     %\setlist{nolistsep} % Uncomment to remove spacing between items in lists (enumerate, itemize)     % ---------------------------------------------------------------------     % Remove brackets from numbering in List of References     \renewcommand{\@biblabel}[1]{\bfseries\color{color1}\textsuperscript{[#1]}}     %\setlength{\bibitemsep}{0cm}     % ---------------------------------------------------------------------     \newcommand{\PaperTitle}[1]{\def\@PaperTitle{#1}}     \newcommand{\Archive}[1]{\def\@Archive{#1}}     \newcommand{\Authors}[1]{\def\@Authors{#1}}     \newcommand{\JournalInfo}[1]{\def\@JournalInfo{#1}}     \newcommand{\Abstract}[1]{\def\@Abstract{#1}}     \newcommand{\Keywords}[1]{\def\@Keywords{#1}}     % ---------------------------------------------------------------------     \renewcommand{\@maketitle}{%     \twocolumn[{%     \thispagestyle{empty}%     \vskip-36pt%     {\raggedleft\small\sffamily\bfseries\@JournalInfo\\\@Archive\par}%     \vskip20pt%     {\raggedright\color{color1}\sffamily\bfseries\fontsize{20}{25}\selectfont \@PaperTitle\par}%     \vskip10pt     {\raggedright\color{color1}\sffamily\fontsize{12}{16}\selectfont  \@Authors\par}     \vskip18pt%     \fcolorbox{color1}{white}{%     \parbox{\textwidth-2\fboxsep-2\fboxrule}{\centering%     \colorbox{color2!10}{%     \parbox{\textwidth-3.5\fboxsep-3.5\fboxrule}{%     \ifx\@Keywords\@empty     \sffamily\small\textbf{\abstractname}\\\@Abstract     \else     \sffamily\small\textbf{\abstractname}\\\@Abstract\\[5pt]%     \textbf{\keywordname}\\\@Keywords%     \fi     }%     }%     \vskip5pt%     \begingroup%     \raggedright\sffamily\small%     \footnotesize\@affiliation\par%     \endgroup%%     }%     }%     \vskip25pt%     }]%     }%     % ---------------------------------------------------------------------     \let\oldbibliography\thebibliography     \renewcommand{\thebibliography}[1]{%     \addcontentsline{toc}{section}{\hspace*{-\tocsep}\refname}%     \oldbibliography{#1}%     \setlength\itemsep{0pt}%     }      Any advice appreciated


title: How to change the style of the braces around equation numbers in the align-environment

text: I would like to change the braces in the align-environment from the normal braces ( ) to rectangular braces [ ], ![align-environment with the standard \( \)-braces.](http://i.stack.imgur.com/XMoyW.png)


title: Can I add a \for field in a report style?

text: I'm using a report class, which works just fine. On the title page I have listed the author, but I'm doing it for someone else. Like writing a memo, it would be nice to put in a field, something like `\for` that then prints who the report is for. Is it possible to create/add such?


title: Errors in LyX after outreg2 command (Stata)

text: Unfortunately, I know very little about TeX-coding and so don't know what's wrong with the code below. It is produced by the `outreg2` command in Stata (which so far has always worked fine) and imported (through `\input{...}` ) into LyX. Any help would be much appreciated.               \begin{tabular}{lcc} \hline      &  & (1) \\     EQUATION & VARIABLES &  \\ \hline      &  &  \\     votes & highest_prom & 0.615** \\      &  & (0.28) \\      & middle_prom & 0.410* \\      &  & (0.22) \\      & Constant & 0.121 \\      &  & (0.20) \\      &  &  \\      & Observations & 135 \\ \hline     \multicolumn{3}{c}{Robust standard errors in parentheses} \\     \multicolumn{3}{c}{*** p<0.01, ** p<0.05, * p<0.1} \\     \end{tabular}


title: How to use arrowheads from a unicode math font in TikZ diagrams under XeLaTeX or LuaLaTeX?

text: I like arrowheads in my TikZ diagrams to match the math font arrowheads. For Computer Modern, this is no problem: the TikZ arrows library provides matching arrowheads. But I often use other fonts that have very different arrowheads. Now, I can (and have) defined new PGF arrow tips that approximate the font arrowheads. But I thought a more elegant and general solution when using a unicode math font would be to use the arrowheads that should be available at U+2303 ("UP ARROWHEAD") and U+2304 ("DOWN ARROWHEAD"). Here is my first attempt at defining such an arrowhead:               \documentclass{article}          \usepackage{unicode-math}     \setmathfont{Asana Math}          \usepackage{tikz}          \pgfarrowsdeclare{mathfont to}{mathfont to}     {       \pgfarrowsleftextend{0\pgflinewidth}       \pgfarrowsrightextend{0\pgflinewidth}     }     {       \pgfpathmoveto{\pgfpointorigin}       \pgftext[rotate=90,bottom]{$\char"2304$}     }          \tikzset{       >=mathfont to,     }          \begin{document}     Test:     \begin{tikzpicture}     %     \draw[->] (1,0)--(2,0);     \draw[->] (1,0.5)--(1,1.5);     %     \end{tikzpicture}     \end{document}      My _expectation_ was that this arrowhead definition would place the bottom of the down arrowhead symbol (more or less where the tip of the arrowhead is) at the end of the arrow, rotated to match the direction of the arrow, as per the discussion of `\pgftext` in the manual -- essentially what I wanted to achieve, except for some tweaking and setting `\pgfarrowsleftextend` and `\pgfarrowsrightextend`. The result has three problems: the bottom of the down arrowhead symbol is not in the correct place; the arrowhead symbol is unrotated; and (very strangely) it only appears next to the first of the two test arrows. These problems occur under both XeLaTeX and LuaLaTeX. (Not that I expected any difference in the output.) Are these fixable problems, and if so, how? Or do they reflect some deep feature in the design of PGF/TikZ that makes this idea unworkable? (I can easily imagine that calling `\pgftext` in arrowhead code is supposed to be forbidden, like `\pgfusepath`.) UPDATE: After updating the pgf package, I now get a slightly different result: the arrowhead symbol is now rotated to point to the right, but is positioned at (0,0) rather than at the ends of the arrow. I can't tell if both arrowheads are now being drawn in that position or just one.


title: Avoid chapter pagebreak in twocolumn document

text: It took me a while to locate the error, but here's a MWE. I am using my own class, provided below:                \documentclass[fleqn,10pt,twocolumn]{MWEclass}      \usepackage{lipsum} % Required to insert dummy text      \definecolor{pt_Blau_04}{RGB}{20,20,20}             \begin{document}         \makeatletter               \renewcommand\chapter{\global\@topnum\z@                      \@afterindentfalse                      \secdef\@chapter\@schapter}         \def\@topnewpage[#1]{#1}      \makeatother           \input{MWEchapter}      \chapter{Something}      \lipsum[7-10]      %\input{MWEchapter2}      %\input{MWEchapter3}       \end{document}      and the class:                \NeedsTeXFormat{LaTeX2e}      \ProvidesClass{MWEclass}[17/06/2013, v1.0]           \AtEndOfClass{\RequirePackage{microtype}}      \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}      \ProcessOptions*      \LoadClass{report}      \RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}                \RequirePackage[explicit]{titlesec}      \newlength\mylena      \newlength\mylenb      \setlength\mylena{1.3cm}      \setlength\mylenb{\dimexpr\columnwidth-\mylena\relax}           \newcommand\PlaceNumber[1]{%        \makebox[\mylena][l]{#1}}           \titleformat{\chapter}       {\color{pt_Blau_04}\Large\sffamily\bfseries}       {}       {0em}       {\PlaceNumber{\thechapter}\parbox[t]{\mylenb}{\raggedright#1}}           \titlespacing*{\chapter}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}      If i want to avoid the pagebreak for every new chapter (The chapters MWEchapter are just lipsum text) it works up to including TWO chapters, if I want to include more, theres an error message about horizontal mode and the titlesec package..


title: Add label/link to a line of an algorithm

text: I am using the `algorithmic` package to write algorithms. I want to have a link to the line of the algorithm like I can do to formulas using `\label` and `\ref`.


title: How to set headsepline length?

text: I'm writing a document using `scrbook` document class and while I was able to set up all header and footer apparence, I can't find a way to set `headsepline` length (seems to follow `\textwidth` settings, while I need it to be slightly longer). Is there a way to make it without using external packages, maybe changing something in class file?


title: Is it possible to produce a context free grammar for Tikz path? node?

text: Even further, I would be happy to see a definition of the tikz language in the usual manner programming languages such as Java and Pascal are defined. The reason I ask is that I keep getting mysterious error messages for the tiniest typos. Essentially, incorrect use of the underlying languages leads to a "crash" of the compiler. This crash sometimes gives useful error messages, but sometimes they are hard to decipher.


title: How to break long URLs using common hyphenation but adding a line feed indicator?

text: I saw several questions like this one that request a solution for **breaking apart URLs**.   1. I wonder if it is possible to hyphenate the words in a URL as it happens in normal text (i.e., breaking apart words with the help of the hyphenation engine **without adding hyphens** but a special character instead), see example 1.     * **Indicating line feed:** To avoid a misleading interpretation of the hyphenated URL, I would like to see a special character such as the _carriage return_ symbol at the hyphenation position.     * **Hyphens vs. dashes:** I do not want that the hyphenation engine inserts new hyphens which could be misinterpretated as being part of the URL.   2. If the hyphenation engine breaks the URL at the position of a **dash** (the dash is part of the URL), the special character must be inserted whatsoever, see example 2.   3. If the hyphenation engine breaks the URL at the position of a **slash** (the slash is part of the URL), the special character must be inserted whatsoever, see example 3. The desired hyphenation should work in paragraphs, footnotes and in the bibliography. **Examples:**               (1) http://www.w3.org/hypertext-transport-protocol/secure/test/appli↩     cationformular.html          (2) http://www.w3.org/hypertext-transport-↩     protocol/secure/test/applicationformular.html          (3) http://www.w3.org/hypertext-transport-protocol/secure/↩     test/applicationformular.html      **Related work:**   * The solution posted by Peter Grill introduced a new command. I want to use the existing `\url` command. Also, his solution breaks words at every character, while I want to rely on the decision of the hyphenation engine using correct hyphenation.


title: No indent in res.cls

text: I am writing a resume using `res.cls`. I would like to write a non-indented paragraph under a section heading but can't figure out how to override the heavily indented margins used for columns under sections. I have tried `\flushleft` and a few other things but that nothing has worked. Anyone have any suggestions? A minimal working example illustrating the undesired indentation:               \documentclass{res}     \usepackage{lipsum}% just to generate text for the example          \begin{document}          \section{Test Section}     \lipsum[4]          \end{document}      ![enter image description here](http://i.stack.imgur.com/ctG1Q.png)


title: longtable in LaTeX too wide?

text: I am having problems with a `longtable`, it goes off the side of the page and any attempt to limit the width only seems to work on the first page. Here is a cut down version of my table               % Appendix B     \chapter{Elelments for the MetDB Retrieval}     \label{AppendixB}     \lhead{Appendix B. \emph{Elelments for the MetDB Retrieval}}     \chapter{Elelments for the MetDB Retrieval}     \label{AppendixB}     \lhead{Appendix B. \emph{Elelments for the MetDB Retrieval}}          \begin{center}     \begin{longtable}{|c|c|c|} %try definind the width here     \hline     \textbf{Element Name} & \textbf{Element Description} & \textbf{Units} \\     \hline     \endfirsthead     \hline     \textbf{Element Name} & \textbf{Element Description} & \textbf{Units} \\     \hline     \endhead     \hline          table entries...          \hline     %\end{tabular}     \caption{Elelments for the metDB retrieval}     \end{longtable}     \end{center}      Here is an image: ![enter image description here](http://i.stack.imgur.com/40pxB.png) Any help on this subject would be nice!


title: Question about mathematical notation

text: Should one really write `$\text{det}A$`, instead of `$detA$`, similarly `$\text{Aut}G$` instead of `$AutG$`, or is `$det$`, `$Aut$` acceptable?


title: Why is aucTeX compiling my file like pdflatex "input" foo.tex rather than just pdflatex foo.tex?

text: When I compile a file using Emacs AucTeX with `C-c C-c` (which runs `TeX- command-master` which runs `TeX-run-TeX`) the top line of the log output looks like this:               Running `LaTeX' on `mwe' with ``pdflatex  -interaction=nonstopmode "\input" mwe.tex''      (This is the top line of the buffer when I do `C-c C-l`. _Why on earth_ is aucTeX doing `"\input" mwe.tex` rather than just `mwe.tex`? What can this possibly achieve apart from causing my `%&custom` fmt definition to get ignored? And secondly, where do I stop it doing this? I've looked at how the various commands mentioned above are defined. None of them seem to specify this behaviour. So what is actually causing this invocation of pdflatex?


title: I want to create graph with nodes as in the image:

text: ![image](http://i.stack.imgur.com/0pKdW.jpg) I wrote an example graph with `\xymatrix` \- that's OK. I added circles with &*+[Fo], that's OK too. I added table inside first circle with `\begin{tabular}` \- it is OK. But table needs to be rotated by -45 degrees. When i use isorot package to rotate it, first - it rotates not against center, but against corner, and, more sadly, xymatrix then can't determine circle size, and it shrinks. How can I rotate table in next example?               $$\xymatrix{&*+[Fo]{     \begin{tabular}{c|c}     2&3\\     \hline     4&5     \end{tabular}     }\ar@{-}[r]\ar@{-}[dd]\ar@{-}[rrd]&*+[Fo]{3}\ar@{-}[lld]\ar@{-}[ldd]\ar@{-}[dd]\ar@{-}[rdd]\ar@{-}[rd]& \\ *+[Fo]{1}\ar@{-}[rrr] &&&*+[Fo]{4}\ar@{-}[ld] \\ &*+[Fo]{7}&*+[Fo]{6}\ar@{-}[l]&*+[Fo]{5}& }$$


title: How can I get multiple lines in beamer navigation bar?

text: My navigation bar at the top of each slide (that links to each section) has too many sections. I would like to keep the bar and keep each section but I would like to wrap it i.e. have it on two lines. Is that possible? I am using Frankfurt as a theme.


title: How to connect Beamer blocks by arrows?

text: I'd like to put 3 beamer blocks on one frame and connect them in a circular order. I tried something with TikZ but it doesn't work. The main problem is that the points `n1.south` and `n2.south` in the following code are really under the end of the blocks.               \documentclass[aspectratio=169]{beamer}     \usepackage{tikz}     \usetheme{Frankfurt}          \tikzset{       every overlay node/.style={         %draw=black,fill=white,rounded corners,         anchor=north west,       },     }     % Usage:     % \tikzoverlay at (-1cm,-5cm) {content};     % or     % \tikzoverlay[text width=5cm] at (-1cm,-5cm) {content};     \def\tikzoverlay{%        \tikz[baseline,overlay]\node[every overlay node]     }%          \begin{document}          \begin{frame}     \tikzoverlay (n1) at (8cm,2cm) {       \begin{minipage}{0.4\textwidth}         \begin{block}{title1}           {Text1}         \end{block}       \end{minipage}     };          \tikzoverlay (n2) at (0cm,2cm) {       \begin{minipage}{0.4\textwidth}         \begin{block}{title2}           Text2         \end{block}       \end{minipage}     };          \tikzoverlay (n3) at (5cm,0cm) {       \begin{minipage}{0.4\textwidth}         \begin{block}{Title3}           Text3         \end{block}       \end{minipage}     };          \begin{tikzpicture}[overlay]       \path [line width=0.3cm,->] (n1.south) edge (n3.south);       \path [line width=0.3cm,->] (n3.north) edge (n2.south);       \path [line width=0.3cm,->] (n2.east) edge (n1.west);          \end{tikzpicture}               \end{frame}     \end{document}


title: midsigma not varsigma

text: \documentclass[12pt,a4paper,twoside,openright]{book}     \usepackage[utf8x]{inputenx}      \usepackage[LGR,T1]{fontenc}     \usepackage[english,german,greek,italian]{babel}     \usepackage{textcomp}     \usepackage{palatino}     \usepackage{slantsc}     \usepackage{setspace}     \renewcommand{\baselinestretch}{1.2}      \usepackage{teubner}     \usepackage{parallel}          \begin{document}     \textgreek{Νέαρχος} \d{ }\d{} \textgreek{παρεπ\lbrkοιησ\rbrkά-}     \textgreek{τὸ προ\d{σ}\d{κ}ύ\d{ν}\d{η}\d{μ}α}}     \end{document}      Dear all, I have the above code which gives me some problems (using latex). basically it prints the sigma as a final sigma (ς) and not as a midsigma (σ) when there is a command after it. This does not happen when I remove \usepackage{palatino}, but I would really like to keep using it. how can I keep palatino as a font and have it print σ for example in προσκύνημα and not προςκύνημα as it does keeping that? thank you very much


title: TikZ: Controlling new circuit symbols questions

text: I have created a new circuit symbol for battery source (var battery). There are two problems and one question:   1. I would like for minus to be always horizontal.   2. I would like to control how plus and minus are oriented (e.g. plus up or plus down).   3. Is it possible to change graphical representation of + and - with text symbols? Regards, Marko               \documentclass[12pt,a4paper]{article}     \input{glava}     \usepackage{tikz}          \begin{document}          \usetikzlibrary{circuits.ee}     \usetikzlibrary{circuits.ee.IEC}          \tikzset{circuit declare symbol = var battery}     \tikzset{set var battery graphic = var battery IEC graphic}     \tikzset{var battery IEC graphic/.style=       {transform shape, circuit symbol lines, circuit symbol size = width     2.5 height 2.5,        shape=generic circle IEC, /pgf/generic circle IEC/before     background=         {\pgfpathcircle{\pgfpoint{0.45pt}{0pt}}{0.1pt}          \pgfpathcircle{\pgfpoint{-0.45pt}{0pt}}{0.1pt}          \pgfpathmoveto{\pgfpoint{-1.0pt}{0pt}}          \pgfpathlineto{\pgfpoint{-0.6pt}{0pt}}          \pgfpathmoveto{\pgfpoint{1.0pt}{0pt}}          \pgfpathlineto{\pgfpoint{0.6pt}{0pt}}          % PLUS SYMBOL          \pgfpathmoveto{\pgfpoint{-0.45pt}{0.25pt}}          \pgfpathlineto{\pgfpoint{-0.45pt}{0.65pt}}          \pgfpathmoveto{\pgfpoint{-0.25pt}{0.45pt}}          \pgfpathlineto{\pgfpoint{-0.65pt}{0.45pt}}          % MINUS SYMBOL          \pgfpathmoveto{\pgfpoint{0.25pt}{0.45pt}}          \pgfpathlineto{\pgfpoint{0.65pt}{0.45pt}}          \pgfusepathqstroke}}}          \begin{tikzpicture}[circuit ee IEC,semithick,x=1cm,y=1cm]     \draw (0,0) to [capacitor] (3,0)     to [resistor] (3,2)     to [var battery] (0,2)     to [var battery={info'={$U_3$}}] (0,0);     \end{tikzpicture}          \end{document}


title: XeTeX source code

text: There has already been a question on where to find the source code for `pdfTeX`. The answer is that it can be found on CTAN, in the systems directory. Unfortunately, the source code for XeTeX is not there. Where can I find the source code for XeTeX? It would be interesting to provide links to the source codes of all major engines in the answer, to make it easier to access them.


title: multline problem

text: I have used multiline to break a equation but in the 2nd line it goes to the end. Can't we move the 2nd line more ahead?               \documentclass[12pt,a4paper]{thesis}     \usepackage{amsmath}\usepackage{amssymb}     \usepackage{graphicx}          \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}          \newcommand{\piRsquare}{\pi r^2}                  \title{{Study x}}            \date{August 24, 2013}                   %     \begin{document} \baselineskip=22pt             \begin{multline}         \mathcal{A}(\phi + h) - \mathcal{A}(\phi) = c_d \int_0^T \left\{\int_0^\infty \left(-\ddot{\phi} + \frac{1}{r^{d-1}}\frac{\partial}{\partial r}\left(r^{d-1} \frac{\partial \phi}{\partial r}\right) - 2m^2\phi\right)hr^{d-1}dr\right\}dt \\         + \mbox{ Boundary Terms } + O\left(\|h^2\|\right),         \end{multline}     \end{document}


title: What is the easiest way to see default "spaces" with respect to "ex" and "em" in the book class?

text: What is the easiest way to see default "spaces" with respect to "`ex`" and "`em`" in the `book` class? I mean by spaces all horizontal and vertical spaces such as:   1. the space before and after the section headings in the text    2. the space between the captions and the text after it    3. the space between the header and the main text    4. the space between the figures and their caption    5. the space between the footnotes at the bottom of the pages  and so on. I'm using `xelatex` and TeX Live 2012 on Win7.


title: Automatic referencing of item number in enumerate environment

text: Here is what I want: ![enter image description here](http://i.stack.imgur.com/qEseq.jpg) And here is how I want to achieve this: Just like you have the `\label` and `\ref` commands for automatic section number referencing, I wish to have **something similar which will auto- reference the specific item number (1.2.1 in my case) without me having me explicitly write it out every time**. This will be part of a big report I'm writing, hence I wish to make my work less cumbersome Here is the code:               \documentclass[]{article}     \usepackage{enumerate}     %opening     \title{}     \author{}          \begin{document}          \begin{enumerate}     \item 1st item      \begin{enumerate}[{1.}1]     \item 1st nested item     \item 2nd nested item     \begin{enumerate}[{1.2.}1]     \item Useful/Important Information     \end{enumerate}     \end{enumerate}     \item 2nd item     \end{enumerate}          \noindent In this paragraph, I talk a bit about the Useful/Important Information and then reference the item number          \end{document}


title: \includegraphics[scale] makes plot figure (PDF) from smooth to serrated

text: I plot a function in Scilab and export to pdf image file. The pdf file looks very smooth as following. ![enter image description here](http://i.stack.imgur.com/VBDBE.png) However, when I tried to include this smooth pdf file in LaTeX. It becomes serrated like. ![enter image description here](http://i.stack.imgur.com/qNy9g.png) The code snippet I used.               \begin{figure}     \centering     \includegraphics[scale=.35]{hello.pdf}     \end{figure}      Is there a way to make it look more smooth? Should I sample smaller points of the function?


title: Using permute with glossaries

text: There is a problem with using the package `permute` with `glossaries`. **A minimal working example:** (by the way a minimal _working_ example to show how an "index of notation" can be created)               \documentclass{article}     \usepackage{permute}     \usepackage[style=long3colheader]{glossaries}          \newglossaryentry{root}{name=\ensuremath{\sqrt{(12)}},description={a square root}}          %% uncomment the following line and the problem appears     %\newglossaryentry{permutation}{name=\ensuremath{\pmt{(12)}},description={a permutation}}          \makeglossaries     \begin{document}     Permutations in the text work well $\pmt{(123)(45)}$.     \glsaddall     \printglossary     \end{document}      If the Perl script "makeglossaries" is available, run this with:               pdflatex filename     makeglossaries filename     pdflatex filename      Uncommenting the line in the source code leads to:               ! Undefined control sequence.     \pmt@GetPrintArgs #1->\let \pmt@order [...]      Is there a possibility to use `\pmt` in the glossary? Using the package option `sanitize=none` does not help. ~~Enclosing`\pmt{...}` with `\protect` did not help.~~ The **solution** is simply, as egreg pointed out, to write               \protect\pmt{...}      _without_ braces. Note that `\protect{\pmt{...}}` _with_ braces does _not_ help.


title: biblatex-apa and Unicode characters

text: When I use one of the default styles in `biblatex`, Unicode characters are correctly printed in the bibliography. When I use the `biblatex-apa` package, on the other hand, (adding the option `style = apa` when loading the `biblatex` package), many fields display these characters as jibberish sequences, but other fields display them correctly. Here's an example:               \documentclass{article}     \usepackage{fontspec,xunicode,xltxtra} % XeLaTeX     \defaultfontfeatures{Mapping=tex-text} % support TeX conventions like ``--''     \setmainfont{Linux Libertine O}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style = apa, backend = biber    ]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \addbibresource{test2.bib}          \begin{document}     Clearly Bj{\char"00F8}rn V{\char"00E5}ge likes the letters {\char"00E6}{\char"00F8}{\char"00E5} a lot \parencite{author1}.     \printbibliography     \end{document}      My .bib-file:               @ARTICLE{author1,         AUTHOR = "Bj{\char"00F8}rn V{\char"00E5}ge",         TITLE = "A title with {\char"00E6}{\char"00F8}{\char"00E5}",         JOURNALTITLE = "The {J}ournal of {\char"00E6}{\char"00F8}{\char"00E5}",         YEAR = "2011",         ADDENDUM = "An addendum with {\char"00E6}{\char"00F8}{\char"00E5}",         ANNOTATOR = "The annotator is {\char"00E6}{\char"00F8}{\char"00E5}",         COMMENTATOR = "The commentator is {\char"00E6}{\char"00F8}{\char"00E5}",         EDITOR = "P{\char"00F8}lsa S{\char"00E6}b{\char"00F8}",         ISSUE = "The issue of {\char"00E6}{\char"00F8}{\char"00E5}",         ISSUETITLE = "The issuetitle is {\char"00E6}{\char"00F8}{\char"00E5}",         ISSUESUBTITLE = "The issuesubtitle is {\char"00E6}{\char"00F8}{\char"00E5}",         JOURNALSUBTITLE = "The journalsubtitle is {\char"00E6}{\char"00F8}{\char"00E5}",         NOTE = "The note says {\char"00E6}{\char"00F8}{\char"00E5}",         NUMBER = "5",         PAGES = "100--200",         SERIES = "The series of {\char"00E6}{\char"00F8}{\char"00E5}",         SUBTITLE = "The subtitle is {\char"00E6}{\char"00F8}{\char"00E5}",         TITLEADDON = "The titleaddon is {\char"00E6}{\char"00F8}{\char"00E5}",         TRANSLATOR = "The translator's name was {\char"00E6}{\char"00F8}{\char"00E5}"}      ![enter image description here](http://i.stack.imgur.com/YruW5.png)


title: Typesetting permutations with latex

text: I split the question into two parts and included some answers. # 1\. Alternatives to the `permute`-package The `permute`-package is very old (version 0.2, 1999) ~~and can lead toproblems in connection with other packages.~~ Is there an up-to-date package (or possibility) that generates similarly appealing results with the same ease? Consider the following small working example, which demonstrates just a few possibilies of `permute`:               \documentclass{article}     \usepackage{permute}     \begin{document}          That's what I want to have:          % $\pmt{(123)(45)}$ without star: no spacing between numbers          % $\pmt*{(123)(45)}$ with star: no difference (see note)          \renewcommand*\pmtseparator{\;} % thickspace, but see note below          % $\pmt{(123)(45)}$ without star: no spacing between numbers          $\pmt*{(123)(45)}$ with star: spaces between numbers          I do \emph{not} want to write something horrific like     $\begin{array}{llllll}(1&2&3)(4&5)\end{array}$.          Of course I could write $(123)(45)$ or $(1,2,3)(4,5)$,      but I would like to have an apperance different from that of tuples,     and numbers greater than 10 rule out the first possibility anyway.     \end{document}      **Notes:**   * Concerning `\pmtseparator`. The separator is included if the *-variant of `\pmt` is used. It is predefined as a space ` `. Hence, it only appears in text mode. Redefining it to `\ `, as the manual suggests, makes the space visible both in text and math mode. If you use `\pmt` only in math mode, it is better, as Philippe Goutet pointed out, to use `\,` for a thinspace or `\;` for a thickspace. (More about lengths.)   * Verbose permutations can be created with `\pmtv`. **Solutions** so far:   * There seems to be no alternative, but the package `permute` works.   * Alternatively, if you do not insist on a special appearance, you use one of the two possibilities from the last paragraph. (However, the `permute`-package has some limitations concerning the order of multiplication and the use of numbers greater than 9, but this could be discussed later and in another question.) # 2\. Typesetting permutations with LaTeX Or what do typographers or other authors say about (1 2 3)(4 5) vs. (1,2,3)(4,5) vs. (123)(45)?


title: Why the edges of my rectangle is not parallel to axis?

text: \documentclass{minimal}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \tdplotsetmaincoords{70}{110}     \begin{document}     \begin{tikzpicture}[scale=3, axis/.style={->,thick},thick, l/.style={dashed},tdplot_main_coords]     \draw[axis] (0, 0, 0) -- (3, 0, 0) node [right] {$X$};     \draw[axis] (0, 0, 0) -- (0, 3, 0) node [above] {$Y$};     \draw[axis] (0, 0, 0) -- (0, 0, 3) node [above] {$Z$};          \draw[tdplot_main_coords] (0,0,0) rectangle (3,3, 0);     \draw[->, thick] (1, 0,1) -- (1, 1.5, 1) node[above] {$\bar{n}_2$};     \end{tikzpicture}     \end{document}      I want to have the rectangle with edges that are parallel to axis. This is how I try to implement it. However, the rectangle's edges is not parallel to axis... looks like the original coordinate system is remained for the rectangle. (I want to draw a plane that is laid in the xy-plane).


title: Legend referencing in caption *and* externalization

text: I am trying to make a reference to a plot inside a figure's caption while using the externalize library. The issue of plot reference using externalization has already been raised in this question. I decided notto externalize the references images and defined the following command: > \newcommand{\plotref}1{\tikzexternaldisable\ref{#1}\tikzexternalenable} Then, the following code with the reference _outside_ the caption works :               \documentclass{article}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize[prefix=tikz/,shell escape=-enable-write18]          \newcommand{\plotref}[1]{\tikzexternaldisable\ref{#1}\tikzexternalenable}          \begin{document}          \begin{figure}       \centering       \tikzset{external/remake next}       \tikzsetnextfilename{figname}     \begin{tikzpicture}[baseline]            \pgfplotstableread{         1 4            2 4.2          3 3.1          4 2.5        }\table          \begin{axis}[width=5cm,height=5cm]          \addplot table[x index=0,y index=1]{\table};\label{LAB}          \end{axis}     \end{tikzpicture}       \caption{You must defeat Sheng Long to stand a chance.}       \label{dummy}     \end{figure}          Xyzzy ! \plotref{LAB} happens.          \end{document}      I have seen in this question that legend in caption are normally possible. However, the following code with the reference _inside_ the caption does not work :               \documentclass{article}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize[prefix=tikz/,shell escape=-enable-write18]          \newcommand{\plotref}[1]{\tikzexternaldisable\ref{#1}\tikzexternalenable}          \begin{document}          \begin{figure}       \centering       \tikzset{external/remake next}       \tikzsetnextfilename{figname}     \begin{tikzpicture}[baseline]            \pgfplotstableread{         1 4            2 4.2          3 3.1          4 2.5        }\table          \begin{axis}[width=5cm,height=5cm]          \addplot table[x index=0,y index=1]{\table};\label{LAB}          \end{axis}     \end{tikzpicture}       \caption{Xyzzy ! \plotref{LAB} happens.}       \label{dummy}     \end{figure}          You must defeat Sheng Long to stand a chance.          \end{document}      It raises the following error message > ! Incomplete \iffalse; all text was ignored after line 35. \fi that I fail to interpret. An alternative to not externalizing the small reference images has been proposed in this question but I did not understand how to implement it and don't know if this would solve my problem. Do you know how to make plot references in caption and use externalization ? * * * _Side note: it sometimes simpler and more effective to do things manually. Seethis question for similar results, not automatic but somehow more straightforward._


title: Matrix is not getting displayed completely in Latex

text: I am trying to display the matrix in latex document using below code.But the right side of the matrix is not getting displayed completely.Please check this.               \[      M=     \left[ {\begin{array}{cccccccccccccccccccccccc}      0.3 & 0 & 0.6 & 0 & 0.3 & 0 & 0.9 & 0 & 0.3 & 0 & 0.6 & 0 & 0.3 & 0 & 1.2 & 0 & 0.3 & 0 & 0.6 & 0 & 0.3 & 0 & 0.9 & 0\\      0 & 0.47 & 0 & 0 & 0.47 & 0 & 0 & 0.95 & 0 & 0 & 0.47 & 0 & 0 & 0.47 & 0 & 0 & 0.95 & 0 & 0 & 0.47 & 0 & 0 & 0.47 & 0\\      0 & 0 & 0 & 0.7 & 0 & 0 & 0 & 0 & 0.7 & 0 & 0 & 0 & 0 & 0.7 & 0 & 0 & 0 & 0.7 & 0 & 0 & 0 & 0 & 0 & 1.4\\      0 & 0 & 0 & 0 & 0 & 0.9 & 0 & 0 & 0 & 0 & 0 & 0 & 0.9 & 0 & 0 & 0 & 0 & 0 & 0 & 0.9 & 0 & 0 & 0 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.07 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.07 & 0 & 0 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.38 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.38 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.38 & 0 & 0 & 0 & 0 & 0 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1.38 & 0 & 0\\     \end{array} } \right]     \]


title: Is there a tool that makes paragraphs into rectangles?

text: I was just wondering if there was a LaTeX tool for making paragraphs of text into perfect rectangles. The effect is shown below in a schematic ![enter image description here](http://i.stack.imgur.com/xEXhI.png)


title: How do I place an image at the center of the page alone?

text: I was trying to insert an image at a specific position after a text, but because it was followed by table on the next page, the image was forced to be alone on the top of a page which I didn't want but I think there is no solution. So my question is, how can I place this image in the center of the page (vertical and horizontal centering)? My code:               \documentclass{book}      \usepackage[german]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage[top=4cm,bottom=4cm,left=4cm,right=4cm,asymmetric]{geometry}     \usepackage{booktabs,dcolumn}     \usepackage[figureposition=bottom]{caption}     \usepackage{fancyhdr}     \numberwithin{equation}{chapter}     \fancyhf{}     \fancyhead[C]{\leftmark}     \fancyhead[LE,RO]{\thepage}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\chaptermark}[1]{      \markboth{#1}{}}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand*{\mc}[1]{\multicolumn{1}{c}{#1}}     \newcommand*{\mcTwo}[1]{\multicolumn{2}{c}{#1}}     \linespread{1.8}     \setlength\parindent{0pt}     \begin{document}      \chapter {Einleitung}      \section{Motivation}       [TEXT]     I NEED TO INSERT AN IMAGE EXACTLY HERE!     [TEXT]     AND THEN THE TABLE BELOW!          \makeatletter     \setlength{\@fptop}{0pt}     \setlength{\@fpbot}{0pt plus 1fil}     \makeatother     \clearpage     \begin{table}[htbp]      \centering      \caption{Zusammensetzungen einiger SX-Nickelbasislegierungen in wt\%.}      \label{tbl:1}       \begin{tabular}{c d{2.1} d{2.1} d{2.1} d{1.1} d{1.1} d{1.2} d{1.1} d{1.1} d{1.1} d{1.1} d{1.0} d{1.2}}        \toprule         Alloy & \mc{Ni} & \mc{Cr} & \mc{Co} & \mc{Mo} & \mc{W} & \mc{Al} & \mc{Ti} & \mc{Ta} & \mc{Re} & \mc{Nb} & \mc{V} & \mc{Hf} \\        \midrule         \mcTwo{First generation} & & & & & & & & & & & \\        \midrule         PWA~1480    & 62.5 & 10   &  5   & \mc{---} & 4        & 5    & 1.5      & 12   & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]         Ren{\'e}~N4 & 62.6 &  9   &  8   & 2        & 6        & 3.7  & 4.2      &  4   & \mc{---} & 0.5 & \mc{---} & \mc{---}      \\[1ex]         CMSX-2      & 66.6 &  8   &  4.6 & 0.6      & 7.9      & 5.6  & 0.9      &  5.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]         SRR~99      & 66.5 &  8.5 &  5   & \mc{---} & 9.5      & 5.5  & 2.2      &  2.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\        \midrule         \mcTwo{Second generation} & & & & & & & & & & & \\        \midrule         PWA~1484    & 59.4 &  5   & 10   & 2        & 6        & 5.6  & \mc{---} &  9   & 3        & \mc{---} & \mc{---} & \mc{---} \\[1ex]         Ren{\'e}~N5 & 61.8 &  7   &  8   & 2        & 5        & 6.2  & \mc{---} &  7   & 3        & \mc{---}      & \mc{---} & 0.2      \\[1ex]         CMSX~4      & 61.8 &  6.5 &  9   & 0.6      & 6        & 5.6  & 1        &  6.5 & 3        & \mc{---} & \mc{---} & 0.1      \\[1ex]         CMSX~6      & 70.4 & 10   &  5   & 3        & \mc{---} & 4.8  & 4.7      &  2   & \mc{---} & \mc{---} & \mc{---} & 0.1      \\[1ex]        \midrule         \mcTwo{Third generation} & & & & & & & & & & & \\        \midrule         CMSX-10     & 69.6 &  2   &  3   & 0.4      & 5        & 5.7  & 0.2      &  8   & 6        & 0.1      & \mc{---} & 0.03     \\[1ex]         Ren{\'e}~N6 & 57.4 &  4.2 & 12.5 & 1.4      & 6        & 5.75 & 0        &  7.2 & 5.4      & 0        & 0        & 0.15     \\        \bottomrule       \end{tabular}     \end{table}     ...     \end{document}


title: y axis mark disconnected from axis after shifting upwards

text: as you can see I have shifted up the second axis. However I would like to fix the zero as it has been disconnected from the y axis. ![enter image description here](http://i.stack.imgur.com/xwv72.jpg)               \begin{tikzpicture}[scale=1.5]          \begin{axis}[     date coordinates in=x,     width=12cm,height=5.5cm, scale only axis,     xticklabel style={align=center, rotate=90, anchor=near xticklabel},     major x tick style = transparent,     ymin=0,     ymax=6,     ytick={0,1,2,3,4,5}     ]     \end{axis}          \begin{axis}[     yshift=7cm,      anchor=north west,     width=12cm,height=1.5cm, scale only axis,major x tick style = transparent,     minor x tick num = 0,     xticklabels={,,}]          \end{axis}     \end{tikzpicture}


title: show zoomed content into a frame (as in wooden frame)?

text: I saw an HTML presentation where zoomed elements were "framed", meaning that you could still see a part of the original slide in the background (shaded) while the zoomed content was in the foreground enclosed in a smaller frame. To have an idea of what I mean see framed frame in beamer? The difference is of course that in my case I don't want to design a layout for a frame but I want an effect that applies to zoomed content and frame them into frames. Sorry for the mess with frames! edit: a better example of what I mean can be found in the short video here:http://www.presentation-process.com/zoom-effect-in-powerpoint.html The zoomed content does not need to be circular but I'd like it to have some frame around it. edit2: as noted by Tom Bombadil the spy library may be useful here. See How to change the line width of the lines connecting spies and the spied region and Is there a way to tune ball shading in TikZ ?


title: How to make a title page with beamer without navigation bar, using theme warsaw

text: Using `beamer`, how to make a title page without a navigation bar, using the theme "warsaw" or how to get a title page from another theme, but maintaining the navigation bar on the other frames?


title: Counter problem with tabulary

text: **EDIT:** As the example below was quite long, I made a minimal example below to make it easier to see the problem: In the example below, the expected values of the counters should be 0, 1 and 2, but its not. The first table is made with tabular and the second, where the error occurs, with tabulary. ![Minimal example](http://i.stack.imgur.com/ABj0G.jpg) \documentclass[]{article} \usepackage{tabulary} \newcounter{mycounter}               \begin{document}          \arabic{mycounter} % should be 0          \begin{tabular}{cc}     a\stepcounter{mycounter} & b      \end{tabular}          \arabic{mycounter} % should be 1          \begin{tabulary}{\textwidth}{JJ}     a\stepcounter{mycounter} & b      \end{tabulary}          \arabic{mycounter} % should be 2, as we have only increased the counter once since the value was 1          \end{document}      * * * When trying to come up eith an answer to this thread, I wrote the following piece of code. The purpose of it is to typeset something called sidenotes which whose numbering should work more or less as the numbering of footnotes. However, for some reason, the command \sidenote seems to be called twice for each note, resulting in the number for each note being increased by the number of notes in each paragraph (see image below). Is there any simple way to fix this (i.e. am I missing something simple)?               \documentclass[a4paper]{article}          \usepackage[margin=3cm]{geometry}          \usepackage{tabulary}     \usepackage[newcommands]{ragged2e}     \usepackage{array}          \tymin=0.1\textwidth     \tymax=10\textwidth     \renewcommand{\tabcolsep}{0cm}     \newcommand{\colspace}{1em}     \AtBeginDocument{\edef\normalparindent{\the\parindent}}          \newcounter{localsidenotecounter}          \newwrite\tempfile          \newcommand{\sidenote}[1]     {%     \stepcounter{localsidenotecounter}%     ${}^\textrm{\footnotesize\arabic{localsidenotecounter}}$%     \immediate\write\tempfile%     {(\arabic{localsidenotecounter}) #1          }%     }          \newcommand{\sidenotepc}[1]     {     \noindent \begin{tabulary}{\textwidth}{>{\setlength\parindent{\normalparindent} \immediate\openout\tempfile=sidenotes.tex }J<{\immediate\closeout\tempfile}@{\hspace{\colspace}}>{     \footnotesize \input{sidenotes.tex}     }J}     #2 & \end{tabulary}     }               \begin{document}          \sidenotepc{     But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue\sidenote{Test} pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure\sidenote{Test} him some great pleasure\sidenote{Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure}.     }               \sidenotepc{     But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue\sidenote{Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure} pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure\sidenote{Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure}     }          \end{document}      ![Example of erranous note numbers](http://i.stack.imgur.com/GnWjt.jpg)


title: Why does LaTeX gzip the synctex file?

text: Why does latex gzip the synctex file, and no other aux files? Ungzipping the file reveals it is around 40kb, which isn't much. Is this "legacy" behaviour (when computers did not have much storage) or is there a benefit to gzipping that file?


title: Compiling with "latex" instead of "pdflatex" command leads to upward movement of text body

text: I am writing a thesis with specific margin requirements. I am using a template recently created (read: untested?) by someone else. The problem is that when I use my computer's `latex` command the text is offset vertically by about an inch for every page in the document; however, `pdflatex` creates a document with the proper margins and the text body not being offset vertically. My .log file says that the version of `latex`/`pdflatex` I am using is: Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2013.5.21). Why does `pdflatex` compile with the correct margins while `latex` doesn't? I am using the Redhat 6 distribution of Linux. This is enough for me to reproduce the problem:               \documentclass[12pt]{article}     \usepackage[top=1in, bottom=1in, left=1.5in, right=1in]{geometry}        \begin{document}     text     \end{document}


title: Printing something, leaving larger space

text: Is it possible to use something like `\myphantom[xyz]{abcdef}` to print "xyz" with some alignment, but leaving space as if it were "abcdef"? A code like:               \[mn xyz \myphantom[printed]{abcdefghi abcdefghi abcdefghi} 123 456\]     \[mn xyz abcdefghi abcdefghi abcdefghi 123 456\]      To print something like this:               mn printed                       123 456     mn abcdefghi abcdefghi abcdefghi 123 456      Or:               mn                       printed 123 456     mn abcdefghi abcdefghi abcdefghi 123 456      Or:               mn              printed          123 456     mn abcdefghi abcdefghi abcdefghi 123 456      thank you


title: Package for writing definitions in LaTeX

text: I want to write a definition in LaTeX.Is there a package or class that takes the definition , the author as arguments and prints in a standard definition format.In Google , they give package only for theorems which I don't require now.![enter image description here](http://i.stack.imgur.com/q2ioB.png)


title: Citing specific slides of a presentation

text: I encouter the following problem to which I simply can't find a solution. I'm working on a homework, and I want to cite the slides the professor gave us. So, if I type `\cite[20]{presentationOne}` I want `[1, F. 20]` as result and not `[1, S. 20]`. (F. for Folie, and S. for Seite, I'm from Germany). I'm citing books as well, therefore simply changing it for all citations isn't a solution. I use `biblatex` with biber backend. Hope anyone got a clean solution for this. Otherwise I would have to mention in the foreword what I mean with those citations.


title: Font embedding problem with EPS figures in LaTeX

text: I have an EPS figure generated by Microsoft Visio with PDFCreator. I want to add this EPS figure to my document using `pdflatex` by declaring `\usepackage{epstopdf}` but the fonts in the EPS figure are not properly managed. What's the best solution for adding EPS figures with properly embedded fonts?


title: How to unset the pagenumbering to the toc?

text: How to set the right footer of the ToC to empty? I've tried this way, but it hasn't resolve the issue :               \documentclass[12pt,english]{report}     \usepackage{fancyhdr}     \pagestyle{fancy}     \makeatletter     \def\@makeschapterhead#1{%       \vspace*{10\p@}%       {\parindent \z@         {\raggedleft \reset@font         \scshape \vphantom{\@chapapp{} \thechapter}         \par\nobreak}%       \par\nobreak       \vspace*{30\p@}       \interlinepenalty\@M       \usefont{OT1}{ptm}{b}{n}       {\raggedright \Huge #1}%       \par\nobreak       \par\nobreak       \vskip 45\p@     }}     \makeatother          \rfoot{\thepage}     \begin{document}     \thispagestyle{empty}\tableofcontents{}     \thispagestyle{empty}\listoffigures     \thispagestyle{empty}\listoftables     \end{document}      Any brilliant idea, please?


title: subfiles in TeXworks pdflatex

text: I have a problem with subfiles. I have created a main file and then a subfile. Unfortunately when the subfile is called with `\input{...}` the main file does not find it; however there is no error message. Can anyone help me with this problem?


title: Bibliography in TeXnicCenter

text: How can I compile a project in TeXnicCenter, so that I'll get the bib references correctly. In a default installation of TeXnicCenter I don't see usage of BibTeX in any of the output profiles (`Alt`+`F7`).


title: small cap i for 1

text: In the documentation of `biblatex` and `csquotes` packages, number `1` is replaced by a small cap `i` in the main text. I tried to find how in the source files but could not target any relevant piece of code. It looks like one way would be to define a `\DeclareTextCommand{\is}{T1}{\textsc{i}{}}` and then use `\is978` in the source but in the mentioned documents, `1` is directly redefined as the new character (looking like) `\textsc{i}`.


title: Recommendations for color palettes

text: To make my thesis look more consistent I would like to use a single color palette. I want to use it to prepare all drawings, charts etc. However, I could not find any resources with reasonable proposals. It would be great if you could mention some proposals, or a link to a website that gives some examples.


title: Changing the style of index levels

text: I would like to change the style of the levels in an index. For example, let's say I have an index like:               Foo         bar, 1         barbar, 2     Bar         foo, 5      and I would like the first level to be emphasized ("Foo" and "Bar"). I'm already using `imakeidx` for this document. How could I achive this?


title: Linear regression in a loglog-plot with fixed slope

text: Goal: create a plot to compare the empirical convergence rate of a numerical method with the one expected from the theory. Accordingly, given a loglog-plot, I would like to add the line which has a prescribed slope (in this case, the convergence of the method) and the best intercept to fit the data (e.g., in a least-square sense). Question: how to do a linear regression with fixed slope in pgfplots? What I have done so far is the following: (1) compute the regression line (of the logarithm of the quantities), (2) save the intercept, (3) plot the line with the slope expected from the theory and this intercept. This is a good approximation of what I am looking for, provided the data are in agreement with the theory. Thanks MdFB


title: Sample files of LTR text on left  and RTL text on right

text: I am looking for sample files with mix LTR and RTL texts where each occupy their respective side of the page on each line. In addition I want the ability to indent odd/even lines by different lengths. Examples of RTL languages are Arabic, Hebrew, and Persian. Sample files of each is likely to be useful for others with minor change. Output is to be something like:               English line 1 aaaaaaaaa                                                RTL line 1        English line 2 bbbbbbbbbb                                         RTL line 2     English line 3 cccccccccc                                               RTL line 3


title: Changing the font in the ToC ?

text: I am using the package `memoir` and I redefined the fonts related to the chapters headings:               \renewcommand\chapnamefont{\normalfont\Large\sffamily\scshape\raggedleft\so}      \renewcommand\chaptitlefont{\normalfont\huge\sffamily\bfseries\scshape\color{darkBlue}}         But altough I am using a sans-serif font for the chapters, the ToC use a serif version of LM. That's not a major problem except that I have this warning:               LaTeX Font Warning: Font shape `T1/lmss/bx/sc' undefined      So Latex is complaining that it can't find a small-caps and bold version of LM sans-serif. ![alt text](http://i.stack.imgur.com/mbZe3.png) And the table of content: ![alt text](http://i.stack.imgur.com/sRyoX.png) So I am a bit confused:   * My chapters appear as I want (sans serif font)   * The ToC looks like it is using serifed fonts   * Yet it is complaining not to find a SS font   * I have this strange problem with `viii`   * LM SS seems to have a SC bold version: Latex font catalogue It seems that I don't know enough about Latex and fonts ...


title: Write an extremely wide equation in LaTeX

text: How do you write an extremely wide equation in LaTeX without any type of breaks/align/. Do you need a special type of class? Can one use A3 or bigger format? It's not for printing rather just to show it to some other human being on a computer screen.


title: How to have nested list overlays without wobble

text: I'm trying to use overlays to reveal successive bullet points in an `itemize` environment. Each `item` contains its own second-level `itemize` environment, which will also be revealed one `item` at a time. What I would like to happen after advancing past the last `item` in any second-level `itemize` is for that second-level `itemize` to become invisible and take up no space, without causing any wobbling. Here's what I have now:               \begin{frame}[t]       \frametitle{Solutions to the Liar.}       \begin{itemize}         \item<2-> \textit{secundum quid et simpliciter}. \uncover<4->{\textbf{Solution.} Unclear.}           \only<3>{\begin{itemize}             \item Mentioned by Aristotle (\textit{Sophistici Elenchi}, 180b2-3).           \end{itemize}}         \item<5-> \textit{transcasus}. \uncover<9->{\textbf{Solution.} The Liar sentence is false.}           \only<6-8>{\begin{itemize}             \item<6-8> Derives from the Stoic \textit{metaptosis}: differing truth-values over time.             \item<7-8> When I say ``I am speaking a falsehood'' I am referring to what I said immediately preceding to that sentence.              \item<8> If I didn't say anything before that, then the sentence is just false.           \end{itemize}}       \end{itemize}     \end{frame}      If you page through the frame, you can see that once each second-level `itemize` is shown, its parent `item` shifts upwards a small amount, and then shifts back down when the second-level `itemize` is hidden. How can I get rid of this wobbling?


title: Trick LaTeX into doing double superscripts

text: I have a function in my .sty sheet that does a second partial derivative:               \newcommand{\hpartdsq}[2]{\dfrac{\partial^2 #1}{\partial #2 ^2}}       But I'd like to pass it something that already has a superscript (today it's `\rho^*`). Is there a way to do this with this function? I feel like wrapping the `\rho^*` with parentheses would really kill the aesthetics and is not typical for second partial derivatives. Thanks!


title: Dealing with figures in LaTeX

text: I have two figures I want them to be side-by-side, and I have two issues: 1) How to make both figures have the same size? I know that dimensions are not the same for both figures, but how can I make them the same? (both figures are in pdf format) 2) I want to include one caption for both figures.. say, Figure 1, but underneath the figure on the left side I want to put (a), and underneath the figure on right side I want to put (b).. so we have figure 1(a) and Figure 1(b). This is ehat I have so far:               \begin{figure}     \centering     \mbox{\subfigure{\includegraphics[scale=0.5]{Figure1_a.pdf}     \quad     \subfigure{\includegraphics[scale=0.5]{Figure1_b.pdf} }}}     \caption{caption for figure 1}     \label{fig12}     \end{figure}


title: Bullets without itemize ignoring spacing

text: Easy question for those in the know :) I can produce a itemised list like this               \documentclass{article}     \usepackage{enumitem}% http://ctan.org/pkg/enumitem     \begin{document}     \begin{itemize}     \item banana     \item mango     \item Meg Ryan     \end{itemize}     \end{document}      But when I use text bullets the space between the bullet and the text is ignored               \documentclass{article}     \begin{document}     Steven Segal \textbullet is  \textbullet a \textbullet really \textbullet bad shot!     \end{itemize}     \end{document}


title: Getting started with LaTeX - Advice needed for Mac OS X

text: I heard from a friend that LaTeX is much better than MS Word to write my University's dissertation on. I don't really understand why bother writing an essay in code if Word automatically does that for you. However I looked online and admired how organised and nicely formatted LaTeX documents are. I want to give it a try before deciding what I'll use. I noticed many different files, programs and editors scattered around the web. I am using a Mac OS X (Mountain Lion) and just downloaded and installed MacTeX. * * * **Now** , what else do I need to get started? Can someone tell me what is the best editor out there? And any other essential addons that I need to make the most out of LaTeX? Furthermore, I also heard that there is a way to immediately show changes you are doing in the editor as you are typing, how can I do that?


title: Problem with package gmp (or with xkeyval?)

text: I use the "gmp" package which allows to insert MetaPost coding (placed inside an `mpost` or `mpost*` environment) in a LaTeX source file. In few words, it does approximately the same job as other packages like "emp" or "mpgraphics", with additional features that are not relevant here. In particular, "gmp" defines as an (xkeyval-type) option key named `everymp` which is supposed to contain some code to be inserted at the beginning of each MetaPost files produced. Here is a minimal example:               \documentclass{minimal}     \usepackage[everymp= {input boxes;}]{gmp}     \begin{document}     \begin{mpost*}         % here the MetaPost code     \end{mpost*}     \end{document}      Here the `everymp` key contains the metapost instruction `input boxes ;` which is thus supposed to be inserted at the beginning of the MetaPost file produced by the compilation. But what I obtain is different:               %% Do not edit, this file has been generated     %% automatically by bug-everymp.tex via gmp.sty          inputboxes;     outputtemplate:= "%j.mps";     beginfig(1);          endfig;     end.      As you can see, the line `input boxes;` has become `inputboxes;` which means nothing to MetaPost… I have found what triggers this bug, but this makes it weirder still: it comes from the space inserted between `=` and `{input boxes;}` in the option declaration:               everymp= {input boxes;}      If I suppress this space, i.e. if I write               everymp={input boxes;}      I obtain               input boxes ;       in the MetaPost, i.e. what is expected. Of course this problem is not very important, but it puzzles me. How come that a space character inserted between `=` and its argument can produce that behaviour? Is it a problem with the gmp package, or with the (x)keyval package? In the latter case it should have been noticed elsewhere, but until now I haven't found something similar. I am using the MacTeX 2012 distribution (i.e. TeX Live 2012) on Mac OS X Snow Leopard (10.6.8), and the gmp package in its first and so far only version (1.0).


title: pgfplots - How can I print the y tick scale label only once in a groupplot?

text: I'd like to have the tick label for the y-axis only printed once in a groupplot. Is this possible? ## Picture ![enter image description here](http://i.stack.imgur.com/vLg4J.png) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     amsmath,     tikz,     pgfplots,     }          \usepgfplotslibrary{     groupplots,     }          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}               \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     \begin{groupplot}[     group style={         group size=4 by 4, %4 column(s), 4 row(s)         horizontal sep=0cm,         vertical sep=1.5cm,         ylabels at=edge left,         yticklabels at=edge left,     },     xlabel={Bla},     ylabel={Process},     %     every x tick scale label/.append style={         at={(0.95,0)},yshift=-1.5em,anchor=north,inner sep=0pt     },     every y tick scale label/.append style={         at={(-0.05,0.99)},anchor=east,inner sep=0pt     },     scale ticks above exponent={2}     ]     \nextgroupplot     \addplot[only marks] coordinates{(1,1200) (3,500)};     \nextgroupplot     \addplot[only marks] coordinates{(2,1200) (4,400)};     \end{groupplot}     \end{tikzpicture}     \end{center}     \end{document}


title: Reverse numbering in biblatex bibliography with different categories

text: I have different categories (filters) for entries in a bibliography using `biblatex` (see below). I would like to add a numbering to the entries. Since the entries are sorted by year in decreasing order, the numbering (in each category) should also be decreasing. Basically, I see two routes to go: 1) The first is to use `style=numeric` and a solution presented here. However, in my (not so minimal) example, there appeared two problems. First, the number does not start over again for each of the categories (instead, it continues). Second, I obtained weird numbers (up to 400), although I only had a couple of entries with the same keyword. 2) The second (probably easier) I found here. This is actually a nice idea (and lets you specify the numbering etc.), but I couldn't figure out two things: First, how to get decreasing numbering. Second, if you have > 9 entries, the space reserved for the label is too small and the 10th entry is not vertically aligned with the 9 before. This can probably be adjusted with `itemindent`, but when I tried, the adjustments did not have an effect.               \documentclass{scrartcl}          % packages     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[     backend=bibtex,     style=authoryear,% numeric,     sorting=ydnt% sort by year (descending), name, title     ]{biblatex}          % create dummy .bib file     \usepackage{filecontents}     \begin{filecontents*}{mybib.bib}     @article{mykey1,         author={I Me},         journal={Journal of LaTeX questions},         pages={1--10},         title={My first LaTeX problem},         volume={2},         number={2},         year={2011},             keywords={published}}          @article{mykey2,         author={I Me},         journal={Journal of LaTeX questions},         pages={1--10},         title={My second LaTeX problem},         volume={1},         number={1},         year={2012},             keywords={submitted}}          @article{mykey3,         author={I Me},         journal={Journal of LaTeX questions},         pages={1--10},         title={My third LaTeX problem},         volume={3},         number={3},         year={2013},             keywords={submitted}}     \end{filecontents*}          % bibliography settings     \setlength{\bibhang}{1em}% separate bibitems by indentation     \defbibheading{submitted}{\large\sffamily Submitted}% heading     \defbibheading{published}{\large\sffamily Published}% heading     \defbibfilter{submitted}{keyword=submitted}% filter     \defbibfilter{published}{keyword=published}% filter     \addbibresource{mybib.bib}% bibliography data          % % Idea 1)      % \AtDataInput{%     %   \csnumgdef{entrycount:\therefsection}{%     %     \csuse{entrycount:\therefsection}+1}}     % \DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}     % \newrobustcmd*{\mkbibdesc}[1]{%     %   \number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}          % Idea 2)     \defbibenvironment{bibliography}     {\enumerate{}     {\setlength{\leftmargin}{\bibhang}% => adjustments seem to have no effect     \setlength{\itemindent}{-\leftmargin}% => adjustments seem to have no effect     \setlength{\itemsep}{\bibitemsep}%     \setlength{\parsep}{\bibparsep}}}     {\endenumerate}     {\item}               \begin{document}     \section*{Publications}     \nocite{*}     \printbibliography[heading=submitted, filter=submitted]     \noindent\printbibliography[heading=published, filter=published]     \end{document}      **Some more information** 1) `bibtex` as backend is used here on purpose (so that `texi2pdf` runs `biblatex` automatically) 2) This problem comes from a CV. The idea is to use `\nocite{*}` (and not specific `\cite{...}`s so that I don't have to care about updating the references). 3) In the CV, I show categories "In preparation", "Submitted", "Published", "Book contributions", "Books". I use the following filtering to get this:               \defbibfilter{inpreparation}{type=article and keyword=inpreparation}     \defbibfilter{submitted}{type=article and keyword=submitted}     \defbibfilter{published}{type=article and keyword=published}     \defbibfilter{bookcontrib}{type=incollection and ( keyword=inpreparation or keyword=submitted or keyword=published )}     \defbibfilter{book}{type=book and ( keyword=inpreparation or keyword=submitted or keyword=published )}


title: BibDesk plain text preview

text: BibDesk usually provides preview formats in TeX, HTML, doc, and RTF. Sometimes, we want to use the complete citation in presentation slides. It would be easier to have previews in plain text. How do I get citation previews in plain text, which has the same text output as in TeX preview? This is especially useful with copying and pasting citations into presentation slides as line breaks are not included (unlike in TeX preview)


title: Creating a table around a java script code highlighted using minted

text: I would like to create a block around javascript code in latex. I use `minted` package for format highlighting. Here is my example code:               \documentclass[]{article}     \usepackage{minted}          %opening          \begin{document}          \begin{listing}[H]     \begin{minted}{js}     var http = require("http");         http.createServer(function(request, response) {             response.writeHead(200, {"Content-Type": "text/plain"});             response.end();         }).listen(8080);     \end{minted}     \caption{Example of a listing.}     \end{listing}          \end{document}      And I get the output as ![this](http://i.stack.imgur.com/a753d.png) I would like to create a block around the code. Or a table embedding the code. Any help is really appreciated. And one more thing, whenever I run the above example on `TexmakerX`, I get an error Package               minted Error: You must invoke LaTeX with the -shell-escape flag      But when I run it in the cmd, using               pdflatex -shell-escape filename      it seems to work fine. How can I make it run in `Texmakerx`?


title: Blackboard greek mu not embedded in PDF

text: I'm using the below coding and can see the Blackboard font mu symbol in Yap. When I create PDF the characters are not embedded. Could anyone guide me how to solve this problem.               \documentclass{article}          \usepackage[bbgreekl]{mathbbol}          \usepackage{amsmath,amsfonts,amssymb}          \begin{document}          Please check the character ``$\bbmu$'' mu symbol          \end{document}


title: How to add normal text to frontmatter of elsarticle

text: I'm using the elsarticle documentclass for my paper. Beneath title and author, number of figures, tables etc. is requested on the titlepage. How can I write extra text in the frontmatter area? For example: "Number of pages: ; Number of figures: ; Number of tables: Number of words in the abstract: ; introduction: ; discussion: Total number of words in the text: Conflict of interest:"               \documentclass[preprint, authoryear]{elsarticle}          \bibliographystyle{annesstyle}          \begin{document}          \begin{frontmatter}          \title{title}     \author[firstaddress]{Aaddress}     \author[secondaddress]{address}     \author[thirdaddress]{Haddress}     \author[thirdaddress]{address}     \author[thirdaddress]{address}     \author[thirdaddress,firstaddress]{address}          \address{Address for correspondance:}          \address[firstaddress]{address}     \address[secondaddress]{address}          \begin{abstract}abstract\end{abstract}          \begin{keyword}keywords\end{keyword}          \end{frontmatter}          \section{References}     \bibliography{mybib}     \end{document}


title: hyphenation not working

text: I really searched a lot and tried a lot of hints (also from this site), but I cannot get the global hyphenation command working. In my text, I can set the correct hyphernation like this:               LensKit"=Frame"-work      but if I try to set it globally it's not working:               \hyphenation{LensKit-Frame-work}      What am I doing wrong? Here is a small example of my code:               \documentclass[a4paper,twoside,11pt,ngerman]{book}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ae,aecompl}     \usepackage{bibgerm}          \hyphenation{LensKit-Frame-work}          \clubpenalty = 10000     % Keine einzelnen Zeilen am Ende eines Abschnitts (Hurenkinder)     \widowpenalty = 10000 \displaywidowpenalty = 10000     % EOF          \begin{document}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   LensKit"=Frame\-work LensKit"=Frame\-work LensKit"=Frame\-work LensKit"=Frame\-work LensKit"=Frame\-work  LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework LensKit-Framework           \end{document}


title: On using beamer's colors in a Tikz picture

text: For once, my question is short and simple: How do I use a beamer defined color in a tikz picture. For instance, as beamer's documentation states, using beamer's colors is done as follows:               This text is {\usebeamercolor[fg]{alerted text} alerted}.     The following box uses the fore- and background of frametitles:     {        \usebeamercolor[fg]{frametitle}        \colorbox{bg}{Frame Title}     }      I would like to use the background color of the titleframe to fill an arrow shape as follows:               \usebeamercolor{frametitle}     \tikz       \node[fill=\color{bg},single arrow] at (0,0) { };      Anyone has a clue? I'm being scold by xcolors: > ! Argument of \XC@col@rlet has an extra }.


Forward/Inverse search in my TeXstudio (2.6.2) does not work, although the command -synctex=1 is activated, the synctex.gz file is created, the "Go to Source" button appears, and there is no error message. I use Windows 7 Pro.


title: unknown colors using fcol (pst-solides3d)

text: I am using the pst-solides3d package to draw polytopes in the following way:               \begin{pspicture}[showgrid=false](-2,-0.5)(1.5,2.7)     \psset{viewpoint=26 10 5,Decran=60}     \psSolid[object=new, linewidth=0.7\pslinewidth,     action=draw*,     sommets=      (long chain of coordinates which I do not insert here)     faces={     (long chain of vertices which I do not insert here)     }]%     \uput[270](0,0){$n=5$}     \end{pspicture}      I want to color one of the faces in a light gray color. I can color a face (say the face number 2) by adding the option "fcol=2 Gray" to \psSolid. This works; however, the color is to dark for my purposes. If I understand this correctly, than the color names allowed in "fcol" are the dvips colors (Gray is one of these colors). However, within the 68 colors predefined in dvipsnames, there is no light gray color. In the pst-solides3d documentation, there is a list of colors defined in svgnames, containing the desired color "LightGray". Before that list, the following is written: _The following colours are known by PSTricks, when the option svgnames is given. These ones are not identified by the file solides.pro: we can use them directly with the option fcol. These colours are delivered from the package xcolor._ I want to know what I have to do so that "fcol=2 LightGray" works. Before I worried about this issue, the (beginning of the) preamble of my .tex-file looked as follows:               \documentclass[singlecolumn, nofootinbib, notitlepage]{revtex4-1}          \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{bbding}     \usepackage{enumerate}     \usepackage{datetime}     \usepackage{pstricks}     \usepackage{pst-solides3d}     \usepackage{pst-poly}     \usepackage{pst-3dplot}      I tried to modify my preamble to make "fcol=2 LightGray" work, but I was not successful. For example, I tried the following:               \documentclass[singlecolumn, nofootinbib, notitlepage]{revtex4-1}          \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{bbding}     \usepackage{enumerate}     \usepackage{datetime}     \usepackage[svgnames]{pstricks}     \usepackage{xcolor}     \usepackage{pst-solides3d}     \usepackage{pst-poly}     \usepackage{pst-3dplot}      This does not help: I get the error message "Error: /undefined in LightGray". Giving xcolor the option "svgnames" as well does not help either: same error message. Giving the option "svgnames" to pst-solides3d produces the error "! Latex Error: Unknown option 'svgnames' for package 'pst-solides3d'." I don't know what to do. Can anyone help me?


title: How to create an empty table as a template which I can populate using commands

text: I would like to create a template which I can use to create a booklet. I'd like a 5 row x 2 column table to fill the LH page, with room for a header, and the same on the RH page with room for a footer. I'd then like to be able to define a custom command which can fill up these cells with questions (and be able to define these elsewhere) What I have so far is below, but I need help with knowing which classes to look at and how to go about putting it together Ideally, I'd like to be able to populate the LHS and RHS of the tables on each side seperately (i.e. not have to use `&`, just use `\question` and have it go down the columns in order)               \documentclass[a5paper,12pt]{book}     \usepackage{pdflscape}     \usepackage{tabularx}     \usepackage{lipsum}     \usepackage{pst-3dplot}          \oddsidemargin 0.2cm     \evensidemargin 0.2cm          \begin{document}          %% Set up counters for questions     %%      \newcounter{qnumber}     \setcounter{qnumber}{0}     \stepcounter{qnumber}          %% we now define the questions     \newcommand{\question}[1]{         \hline Question X \textsf{#1}  & Question Y \textsf{#1}  \\ \hline     }                   \thispagestyle{empty}         %\noindent         \begin{tabularx}{\linewidth}{|X|X|}                  \question{Is this a good question? \newline can I do a line break in here?}             \question{Is this a better question?}             \question{Is this a good question? \newline can I do a line break in here?}             \question{Is this a better question?}             \question{Is this a good question? \newline can I do a line break in here?}              \end{tabularx}                    \end{document}


title: Manually customizing a header's colour

text: I would like to change the background colour of a page and necessarily also the text colour. While that is no problem for the main text, the header (and footer) text colour needs to be changes separately. Consider this minimal-but not working-example:               \documentclass{report}     \usepackage{xcolor}     \begin{document}     A black and white page.     \newpage     \pagecolor{green}     %%%%%%%%     {\color{white}%     \chapter*{A white and green page}     }     %%%%%%%%     \thispagestyle{myheadings}     \makeatletter     \global\let\originaloddhead\@oddhead     \global\let\originalevenhead\@evenhead     \renewcommand{\@oddhead}{{\protect\color{white}\originaloddhead}}     \renewcommand{\@evenhead}{{\protect\color{white}\originalevenhead}}     \makeatother     \markboth{header text}{header text}     %%%%%%%%     {\color{white}%     Some text.     }     %%%%%%%%     \newpage     \nopagecolor     \makeatletter     \let\@oddhead\originaloddhead     \let\@evenhead\originalevenhead     \makeatother     Another black and white page.     \end{document}      does not work but gives a black header. What does work is               \documentclass{report}     \usepackage{xcolor}     \makeatletter     \newcommand{\ps@inverted}{%       \renewcommand{\@oddhead}{%         {\protect\color{white}\small\upshape\hfil\rightmark\hskip\tw@ em\thepage}}%       \renewcommand{\@evenhead}{%         {\protect\color{white}\small\upshape\thepage\hskip\tw@ em\leftmark\hfill}}%      }     \makeatother          \begin{document}     A black and white page.     \newpage     \pagecolor{black}%     {\color{white}%     \chapter*{A white and black page}     \thispagestyle{myheadings}     \markboth{header text}{header text}     \thispagestyle{inverted}%     Some text.     }     \newpage     \thispagestyle{myheadings}     \nopagecolor     Another black and white page.     \end{document}      but I would like to know _why_ the first attempt does not work and possibly how to fix it. OK, fancyhdr, nccfancyhdr or similar packages would probably do the trick, but I don't just want a solution (I got one, see above), but to understand _how things work_.


title: How to number all lines in a draft?

text: I want to have a draft of a document I am writing, with the line numbers aside. I looked at some options like `lineno`, but this way it skips some lines. Is there a simple workaround or another package to do this?