title: Aligning tikzpicture subfloats that span multiple pages

text: I have 21 pie charts (generated using pgf-pie) that I wanted to display in rows of 3. The "table" spans multiple pages (which has made it difficult to use the figure or tabular environments). I have been able to achieve a similar result to that which I desire, with the following problems:   * The pie charts do not line up across rows   * I do not wish for each row to have its own caption (and when I remove the \caption command, I get this error: `Package caption Error: Continued`figure' after `??'.`   * I do not wish for the vertical spacing to vary across pages. ![Current formatting](http://i.stack.imgur.com/B1ASd.png) Here is a minimum working example demonstrating the code that I have used to produce the above result. I apologise for the length of the example... it was necessary to include the pgf-pie style file, as well as some plots to be placed in the document.               \documentclass[a4paper]{report}          \usepackage{filecontents}     \usepackage{tikz}     \usepackage{xparse}          \begin{filecontents}{pgf-pie.sty}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Some LaTeX macros for pie chart by using PGF/Tikz package.     % Home page of project: http://pgf-pie.googlecode.com/     % Author: Xu Yuan <xuyuan.cn@gmail.com>     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \NeedsTeXFormat{LaTeX2e}[1999/12/01]     \ProvidesPackage{pgf-pie}[2011/10/02 v0.2 Some LaTeX macros for pie     chart by using PGF/Tikz package.]          \RequirePackage{tikz}     \RequirePackage{ifthen}     \RequirePackage{scalefnt}          % args:     % #1: begin angle     % #2: end angle     % #3: number     % #4: label     % #5: explode     % #6: fill color     % #7: radius     % #8: center     \newcommand{\pgfpie@slice}[8]{%         \pgfmathparse{0.5*(#1)+0.5*(#2)}%         \let\midangle\pgfmathresult         %         \path (#8) -- ++(\midangle:#5) coordinate(O);%         %         \pgfmathparse{#7+#5}%         \let\radius\pgfmathresult         %         % slice         \draw[line join=round, fill=#6, \style] (O) -- ++(#1:#7) arc (#1:#2:#7) -- cycle;%         %         \pgfmathparse{min(((#2)-(#1)-10)/110*(-0.3),0)}%         \let\temp\pgfmathresult%         \pgfmathparse{(max(\temp,-0.5) + 0.8)*#7}%         \let\innerpos\pgfmathresult         %         \ifthenelse{\equal{\pgfpie@text}{inside}}{%             % label and number together             \path (O) -- ++(\midangle:\innerpos) node%             {\scalefont{#3}\shortstack{#4\\\beforenumber#3\afternumber}};%         }{%             % label             \iflegend             \else                 \path (O) -- ++ (\midangle:\radius)%                 node[inner sep=0, \pgfpie@text=\midangle:#4]{};%             \fi             %             % number             \path (O) -- ++(\midangle:\innerpos) node%             {\scalefont{#3}\beforenumber#3\afternumber};%         }%     }          \newcommand{\pgfpie@findColor}[1]{%         \pgfmathparse{int(mod(#1,\value{pgfpie@colorLength}))}%         \let\ci\pgfmathresult         \foreach \c [count=\j from 0] in \color {%             \ifnum \j=\ci                 \xdef\thecolor{\c}%                 \thecolor                 \breakforeach             \fi         }%     }          \newcommand{\pgfpie@findExplode}[1]{%         \pgfmathparse{int(mod(#1,\value{pgfpie@explodeLength}))}%         \let\ei\pgfmathresult         \foreach \e [count=\j from 0] in \explode {%             \ifnum \j=\ei                 \xdef\theexplode{\e}%                 \breakforeach             \fi         }%     }          % #1: bottom left point     % #2: size     % #3: number     % #4: color     % #5: text     \newcommand{\pgfpie@square}[5]{%         \ifthenelse{\equal{\pgfpie@text}{inside}}{%             \draw[fill=#4, \style] (#1) rectangle node%             {\scalefont{#3}\shortstack{#5\\\beforenumber#3\afternumber}} ++(#2);%         }{%             \draw[fill=#4, \style] (#1) rectangle node%             {\scalefont{#3}\beforenumber#3\afternumber} ++(#2);%         }%     }          % #1: pos     % #2: radius     % #3: number     % #4: color     % $5: style     % $6: label     \newcommand{\pgfpie@cloud}[6]{%         \draw[fill=#4, #5] (#1) circle[radius=#2];%         \ifthenelse{\equal{\pgfpie@text}{inside}}{%             \node at (#1) {\scalefont{#3}\shortstack{#6\\\beforenumber#3\afternumber}};%         }{%             \node at (#1) {\scalefont{#3}\beforenumber#3\afternumber};%         }%     }          \newlength{\pgfpie@angleEnd}     \newcounter{pgfpie@explodeLength}     \newcounter{pgfpie@colorLength}     \newcounter{pgfpie@sliceLength}          \def\setexplode#1\pgfeov{\def\explode{#1}}     \pgfkeyslet{/explode/.@cmd}{\setexplode}          \def\setcolor#1\pgfeov{\def\color{#1}}     \pgfkeyslet{/color/.@cmd}{\setcolor}          \def\setradius#1\pgfeov{\def\radius{#1}}     \pgfkeyslet{/radius/.@cmd}{\setradius}          \def\setpos#1\pgfeov{\def\pos{#1}}     \pgfkeyslet{/pos/.@cmd}{\setpos}          \def\setstyle#1\pgfeov{\def\style{#1}}     \pgfkeyslet{/style/.@cmd}{\setstyle}          \def\setbeforenumber#1\pgfeov{\def\beforenumber{#1}}     \pgfkeyslet{/before number/.@cmd}{\setbeforenumber}          \def\setafternumber#1\pgfeov{\def\afternumber{#1}}     \pgfkeyslet{/after number/.@cmd}{\setafternumber}          \def\settext#1\pgfeov{\xdef\pgfpie@text{#1}}     \pgfkeyslet{/text/.@cmd}{\settext}          \def\setsum#1\pgfeov{\xdef\pgfpie@sum{#1}}     \pgfkeyslet{/sum/.@cmd}{\setsum}          \def\setrotate#1\pgfeov{\xdef\rotate{#1}}     \pgfkeyslet{/rotate/.@cmd}{\setrotate}          \newif\ifpolar     \pgfkeys{/polar/.is if=polar}          \newif\iflegend     \newif\ifnolegend     \newif\iflegendonly          \newif\ifsquare     \pgfkeys{/square/.is if=square}          \newif\ifcloud     \pgfkeys{/cloud/.is if=cloud}          \newif\ifscalefont     \pgfkeys{/scale font/.is if=scalefont}     \let\scalefontorg\scalefont     \renewcommand{\scalefont}[1]{%         \ifscalefont             \pgfmathparse{#1 / \pgfpie@sum * 3 + 0.9}%             \scalefontorg{\pgfmathresult}%         \fi     }          \newcommand{\pie}[2][]{%         % load default parameters         \pgfkeys{%             explode=0,%             color={blue!60, cyan!60, yellow!60, orange!60, red!60,%                    blue!60!cyan!60, cyan!60!yellow!60, red!60!cyan!60,%                    red!60!blue!60, orange!60!cyan!60},%             radius=3,%             pos={0,0},%             style={thick},%             before number=,%             after number=,%             text=label,%             sum=100,%             rotate=0,%             polar=false,%             square=false,%             cloud=false,%             scale font=false,%         }%         %         % load user's parameters         \pgfkeys{#1}%         % add percentage automatically         \ifthenelse{\equal{\pgfpie@sum}{100}}{%             \pgfkeys{after number=\%}%             \pgfkeys{#1}%         }{}%         %         % legend or not         \ifthenelse{\equal{\pgfpie@text}{legend}}%         {\legendtrue}%         {\legendfalse}%         %         % nolegend or not         \ifthenelse{\equal{\pgfpie@text}{nolegend}}%         {\nolegendtrue \legendtrue}%         {\nolegendfalse}%         %         % legendonly or not         \ifthenelse{\equal{\pgfpie@text}{legendonly}}%         {\legendonlytrue \legendtrue}%         {\legendonlyfalse}%         %         % handle sum         \ifthenelse{\equal{\pgfpie@sum}{auto}}{%             % sum all input             \xdef\pgfpie@sum{0}%             \foreach \p/\t in {#2}{%                 \pgfmathparse{\pgfpie@sum + \p}%                 \xdef\pgfpie@sum{\pgfmathresult}%             }%         }%         {}%         %         % init counters         \setcounter{pgfpie@explodeLength}{0}%         \foreach \e in \explode { \addtocounter{pgfpie@explodeLength}{1} }%         %         \setcounter{pgfpie@colorLength}{0}%         \foreach \c in \color { \addtocounter{pgfpie@colorLength}{1} }%         %         \pgfmathsetlength{\pgfpie@angleEnd}{0}%         %         \setcounter{pgfpie@sliceLength}{0}%         \foreach \p/\e in {#2} { \addtocounter{pgfpie@sliceLength}{1} }%         %         \iflegendonly         \else             \ifsquare             %%%%%%%%%% SQUARE PIE BEGIN %%%%%%%%%%%                 \pgfmathparse{\radius*2}%                 \xdef\verticalLength{\pgfmathresult}%                 \xdef\horizontalLength{\pgfmathresult}%                 \path (\pos) -- ++(-\radius, -\radius) coordinate (start);%                 \pgfmathparse{\verticalLength * \horizontalLength / \pgfpie@sum}%                 \let\squareUnit\pgfmathresult                 %                 % drawing loop                 \foreach \p/\t [count=\i from 0] in {#2}{%                     \pgfpie@findColor{\i}                     %                     \ifthenelse{\lengthtest{\verticalLength cm > \horizontalLength cm}}{%                         \pgfmathparse{\p * \squareUnit / \horizontalLength}%                         \let\height\pgfmathresult                         %                         \pgfpie@square{start}{\horizontalLength,\height}%                         {\p}%                         {\thecolor}%                         {\t}%                         %                         %label                         \iflegend                         \else                             \ifthenelse{\equal{\pgfpie@text}{inside}}{}{%                                 \path (start) -- ++(\horizontalLength,\height*0.5) node[inner sep=0, \pgfpie@text=0:\t]{};%                             }%                         \fi                         %                         \pgfmathparse{\verticalLength - \height}%                         \xdef\verticalLength{\pgfmathresult}%                         \path (start) -- ++(0, \height) coordinate (start);%                     }{%                         \pgfmathparse{\p * \squareUnit / \verticalLength }%                         \let\width\pgfmathresult                              \pgfpie@square{start}{\width,\verticalLength}%                         {\p}%                         {\thecolor}%                         {\t}%                         %                         %label                         \iflegend                         \else                             \ifthenelse{\equal{\pgfpie@text}{inside}}{}{%                                 \path (start) -- ++(\width*0.5,\verticalLength) node[inner sep=0, \pgfpie@text=90:\t]{};%                             }%                         \fi                         %                         \pgfmathparse{\horizontalLength - \width}%                         \xdef\horizontalLength{\pgfmathresult}%                         \path (start) -- ++(\width, 0) coordinate (start);%                     }%                 }%             %%%%%%%%%% SQUARE PIE END %%%%%%%%%%%             \else             \ifcloud             %%%%%%%%%% CLOUD PIE BEGIN %%%%%%%%%%%                 % drawing loop                 \foreach \p/\t [count=\i from 0] in {#2}{%                     % find explode                     \pgfpie@findExplode{\i}%                     \def\cloudGap{\theexplode + 0.1}%                     \pgfmathparse{sqrt(\p / \pgfpie@sum) * \radius}%                     \let\cloudR\pgfmathresult                     \ifnum \i = 0                         % first cloud                         \coordinate (O) at (\pos);%                         \xdef\cloudRone{\cloudR}%                         \xdef\cloudExtendDir{180+\rotate}%                     \else                     \ifnum \i = 1                         % second cloud                         \xdef\cloudRtwo{\cloudR}%                         \xdef\cloudExtendDir{45+\rotate}%                         \path (O) -- ++(\cloudExtendDir:\cloudRone+\cloudGap+\cloudRtwo) coordinate (O);%                     \else                         % next cloud                         \pgfmathparse{\cloudRone+\cloudGap+\cloudRtwo}%                         \let\la\pgfmathresult                         \pgfmathparse{\cloudRone+\cloudGap+\cloudR}%                         \let\lb\pgfmathresult                         \pgfmathparse{\cloudRtwo+\cloudGap+\cloudR}%                         \let\lc\pgfmathresult                         \pgfmathparse{\la^2+\lc^2-\lb^2}%                         \let\tmp\pgfmathresult                         \pgfmathparse{180 - acos(\tmp / 2 / \la / \lc)}%                         \let\cloudRot\pgfmathresult                         \ifodd \i                             \pgfmathparse{-\cloudRot}%                             \let\cloudRot\pgfmathresult                         \fi                         \pgfmathparse{\cloudExtendDir - \cloudRot}                         \xdef\cloudExtendDir{\pgfmathresult}                         \path (O) -- ++(\cloudExtendDir:\lc) coordinate (O);                         \xdef\cloudRone{\cloudRtwo}                         \xdef\cloudRtwo{\cloudR}                     \fi                     \fi                     %                     % find color                     \pgfpie@findColor{\i}%                          \pgfpie@cloud{O}{\cloudR}{\p}%                     {\thecolor}{\style}{\t}%                          % label                     \iflegend                     \else                         \ifthenelse{\equal{\pgfpie@text}{inside}}{}{%                             \path (O) -- ++(\cloudExtendDir:\cloudR)%                             node[inner sep=0, \pgfpie@text=\cloudExtendDir:\t] {};%                         }%                     \fi                 }             %%%%%%%%%% CLOUD PIE END %%%%%%%%%%%             \else             %%%%%%%%%% CIRCLE PIE BEGIN %%%%%%%%%%%                 \ifpolar                     \xdef\maxValue{0}%                     \foreach \p/\e in {#2} {%                         \ifnum \maxValue < \p                             \xdef\maxValue{\p}%                         \fi                     }%                     \pgfmathparse{\pgfpie@sum / \value{pgfpie@sliceLength}}%                     \xdef\polarangle{\pgfmathresult}%                     \pgfmathparse{\radius / sqrt(\maxValue)}%                     \xdef\polarRadiusUnit{\pgfmathresult}%                 \else                     \xdef\theradius{\radius}%                 \fi                      \xdef\pgfpie@angleBegin{\the\pgfpie@angleEnd}%                 % drawing loop                 \foreach \p/\t [count=\i from 0] in {#2}{%                     \pgfmathsetlength{\pgfpie@angleEnd}{\pgfpie@angleBegin}%                     \ifpolar                         % Polar area diagram                         \pgfmathaddtolength{\pgfpie@angleEnd}{\polarangle}%                         \pgfmathparse{sqrt(\p) * \polarRadiusUnit}%                         \xdef\theradius{\pgfmathresult}%                     \else                         % normal pie                         \pgfmathaddtolength{\pgfpie@angleEnd}{\p}%                     \fi                     %                     % find explode                     \pgfpie@findExplode{\i}%                          % find color                     \pgfpie@findColor{\i}%                     \pgfpie@slice{\pgfpie@angleBegin/\pgfpie@sum*360+\rotate}%                     {\the\pgfpie@angleEnd/\pgfpie@sum*360+\rotate}%                     {\p}%                     {\t}%                     {\theexplode}%                     {\thecolor}%                     {\theradius}%                     {\pos}%                     \xdef\pgfpie@angleBegin{\the\pgfpie@angleEnd}%                 }%             %%%%%%%%%% CIRCLE PIE END %%%%%%%%%%%             \fi             \fi         \fi         %         % legend         \iflegend             \ifnolegend             \else                 \coordinate[xshift=0.8cm,yshift=(\value{pgfpie@sliceLength}*0.5+1)*0.5cm] (legendpos) at (current bounding box.east);%                      \begin{scope}[node distance=0.5cm]%                     \foreach \p/\t  [count=\i from 0] in {#2}{%                         \pgfpie@findColor{\i}%                         \node[draw, fill=\thecolor, \style, below of=legendpos, label=0:\t] (legendpos) {};%                     }%                 \end{scope}%             \fi         \fi     }     \end{filecontents}          \begin{filecontents}{pieplots.sty}     \usepackage{pgf-pie}     \usepackage{caption}     \usepackage{subfig}     \makeatletter     \newcounter{@sfcol}%     \newcounter{@sffig}%     \NewDocumentEnvironment{pieplots}{mm}{%         \setcounter{@sfcol}{0}%         \setcounter{@sffig}{0}%         \setcounter{subfigure}{0}%         %         \def\@sfprefix{\hspace{\fill}}%         \def\@sfsuffix{}%         %         \newcommand\pieplot[2]{%             \@sfprefix%             \subfloat[##1]{##2}%             \@sfsuffix%             %             \def\@sfsuffix{}%             \stepcounter{@sfcol}%             \ifnum\value{@sfcol}=2%                 \def\@sfsuffix{\hspace*{\fill}}%             \fi%             \ifnum\value{@sfcol}=3%                 \setcounter{@sfcol}{0}%                 \stepcounter{@sffig}%                 \def\@sfprefix{%                     \caption{}%                     \label{#1:subfig\arabic{@sffig}}%                     \endfigure%                     \figure[H]%                         \ContinuedFloat%                         \hspace{\fill}%                 }%             \fi%         }%         %         \figure[H]%     }{%             \caption{#2}%             \label{#1}%         \endfigure%     }     \makeatother     \end{filecontents}     \usepackage{pieplots}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % The plots     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{filecontents}{ball1.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={cyan!60,yellow!60,orange!60,blue!60,red!60,blue!60!cyan!60,white!60}]{                 3.61/{pcg},                 3.23/{hggetbehavior},                 5.38/{isprop},                 56.96/{TopN\_Outlier\_Pruning\_Block},                 3.34/{localPeek},                 3.30/{drawGraph},                 24.19/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{connect4.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,cyan!60!yellow!60,white!60,orange!60!cyan!60}]{                 85.22/{TopN\_Outlier\_Pruning\_Block},                 7.77/{knn\_components\_sparse},                 3.28/{Other},                 3.73/{kdtree\_k\_nearest\_neighbors ()}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{letter-recognition.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,cyan!60!yellow!60,white!60}]{                 84.26/{TopN\_Outlier\_Pruning\_Block},                 7.00/{knn\_components\_sparse},                 8.74/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{magicgamma.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,cyan!60!yellow!60,white!60}]{                 85.12/{TopN\_Outlier\_Pruning\_Block},                 8.47/{knn\_components\_sparse},                 6.41/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{mesh_network.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60,purple!60,orange!60!cyan!60}]{                 68.01/{TopN\_Outlier\_Pruning\_Block},                 23.76/{Other},                 3.09/{princomp},                 5.15/{kdtree\_k\_nearest\_neighbors ()}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{musk.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,cyan!60!yellow!60,white!60,orange!60!cyan!60}]{                 82.39/{TopN\_Outlier\_Pruning\_Block},                 3.13/{knn\_components\_sparse},                 9.48/{Other},                 5.00/{kdtree\_k\_nearest\_neighbors ()}                     }         \end{tikzpicture}         \end{filecontents}     \begin{filecontents}{pendigits.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,cyan!60!yellow!60,white!60}]{                 84.51/{TopN\_Outlier\_Pruning\_Block},                 6.01/{knn\_components\_sparse},                 9.48/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex1k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={orange!60,blue!60,white!60}]{                 3.57/{isprop},                 71.80/{TopN\_Outlier\_Pruning\_Block},                 24.62/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex10k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 94.57/{TopN\_Outlier\_Pruning\_Block},                 5.43/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex20k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 96.44/{TopN\_Outlier\_Pruning\_Block},                 3.56/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex30k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 97.01/{TopN\_Outlier\_Pruning\_Block},                 2.99/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex40k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 96.98/{TopN\_Outlier\_Pruning\_Block},                 3.02/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{runningex50k.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 96.88/{TopN\_Outlier\_Pruning\_Block},                 3.12/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{segmentation.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,red!60!cyan!60,white!60}]{                 70.72/{TopN\_Outlier\_Pruning\_Block},                 3.30/{prepare},                 25.98/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{spam.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={cyan!60,blue!60,cyan!60!yellow!60,white!60}]{                 3.96/{pcg},                 73.03/{TopN\_Outlier\_Pruning\_Block},                 4.56/{knn\_components\_sparse},                 18.46/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{spam_train.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={cyan!60,blue!60,cyan!60!yellow!60,white!60}]{                 4.71/{pcg},                 74.51/{TopN\_Outlier\_Pruning\_Block},                 4.14/{knn\_components\_sparse},                 16.64/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{testCD.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={magenta!60,orange!60,blue!60,white!60}]{                 3.09/{newplot},                 4.32/{isprop},                 62.28/{TopN\_Outlier\_Pruning\_Block},                 30.31/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{testCDST.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 79.76/{TopN\_Outlier\_Pruning\_Block},                 20.24/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{testCDST2.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 81.67/{TopN\_Outlier\_Pruning\_Block},                 18.33/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{testCDST3.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={blue!60,white!60}]{                 81.67/{TopN\_Outlier\_Pruning\_Block},                 18.33/{Other}                     }         \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{testoutrank.tex}         \begin{tikzpicture}             \pie[text=nolegend, radius=1.5, color={cyan!60,orange!60!cyan!60,orange!60,blue!60,green!60,magenta!60,white!60}]{                 19.31/{pcg},                 3.31/{@(b)mx\_d\_preconditioner(sH,b)},                 4.38/{isprop},                 31.94/{TopN\_Outlier\_Pruning\_Block},                 10.89/{iterapp},                 4.15/{mx\_d\_preconditioner ()},                 26.02/{Other}                     }         \end{tikzpicture}     \end{filecontents}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{pieplots}{profiling:matlab}{Matlab profiling plots}         \pieplot{testCDST}{\input{testCDST}}         \pieplot{spam}{\input{spam}}         \pieplot{testCD}{\input{testCD}}         \pieplot{runningex30k}{\input{runningex30k}}         \pieplot{testCDST2}{\input{testCDST2}}         \pieplot{segmentation}{\input{segmentation}}         \pieplot{magicgamma}{\input{magicgamma}}         \pieplot{ball1}{\input{ball1}}         \pieplot{pendigits}{\input{pendigits}}         \pieplot{runningex20k}{\input{runningex20k}}         \pieplot{musk}{\input{musk}}         \pieplot{runningex10k}{\input{runningex10k}}         \pieplot{runningex40k}{\input{runningex40k}}         \pieplot{spam\_train}{\input{spam_train}}         \pieplot{testoutrank}{\input{testoutrank}}         \pieplot{testCDST3}{\input{testCDST3}}         \pieplot{runningex1k}{\input{runningex1k}}         \pieplot{mesh\_network}{\input{mesh_network}}         \pieplot{letter-recognition}{\input{letter-recognition}}         \pieplot{connect4}{\input{connect4}}         \pieplot{runningex50k}{\input{runningex50k}}     \end{pieplots}          \end{document}


title: Extra alignment tab error, on Table

text: I am trying to make a table in LaTeX. However, I get several _extra alignment tab_ errors and I do not know why. I have searched here for similar problems but I only found extra alignment tab error and that is a different problem cause by the `%`, which I do not use. So, I am quite lost, at the moment. Here is some minimal code that reproduces the error:               \documentclass[a4paper,10pt]{article}          \usepackage[table]{xcolor}     \usepackage[utf8]{inputenc}     \usepackage{tabularx}     \usepackage{array}          %define some nice colors     \definecolor{middleware_green}{RGB}{82, 119, 17}     \definecolor{middleware_white}{RGB}{255, 255, 255}     \definecolor{middleware_light_gray}{RGB}{239, 239, 239}     \definecolor{middleware_dark_gray}{RGB}{153, 153, 153}          %renewing commands for tabularx     \renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}          %new column type for test tables      \newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%     \newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%          \newcolumntype{R}{|>{\leavevmode\ignorespaces\color{magenta!70!black}\raggedright\sffamily\bfseries\footnotesize}p{2.5cm}}%     \newcolumntype{H}{|>{\leavevmode\ignorespaces\color{orange!30!black}\centering\arraybackslash\sffamily\footnotesize}X}%     \newcolumntype{J}{|>{\leavevmode\ignorespaces\color{green!30!black}\centering\sffamily\footnotesize}X}%     \newcolumntype{W}{|>{\leavevmode\ignorespaces\color{blue!30!black}\centering\arraybackslash\sffamily\footnotesize}X|}%               \begin{document}          \begin{table}[ph!]     \footnotesize\centering     \rowcolors{2}{middleware_white}{middleware_light_gray}          \begin{tabularx}{0.46\textwidth}{|L|L|L|L|L|}     \hline\rowcolor{middleware_green}     \multicolumn{ 5}{|c|}{\small\textcolor{white}{\textbf{Cloud Types}}} \\ \hline     \rowcolor{middleware_dark_gray}     \multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Pu\-blic cloud}}} &      \multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Pri\-va\-te cloud}}} &      \multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Hy\-brid cloud}}} &      \multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Vir\-tu\-al pri\-va\-te cloud}}} &     \multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Com\-mu\-ni\-ty cloud}}} & \\ \hline     Definition  &   Public cloud definition &   Private cloud definition    &   Hybrid cloud defitnion  &   Virtual Private Cloud definition    &   Community Cloud definition  \\ \hline     Advantages  &   Public cloud advantages &   Private cloud advantages    &   Hybrid cloud advantages &   Virtual Private Cloud advantages    &   Community Cloud advantages  \\ \hline     Disadvantages   &   Public cloud disadvantages  &   Private cloud disadvantages &   Hybrid cloud disadvantages  &   Virtual Private Cloud disadvantages &   Community Cloud disadvantages   \\ \hline     \end{tabularx}     \caption{Cloud Types\label{tab:cloud_types}}     \end{table}                    \end{document}      What am I missing?


title: How to abbreviate the "trim" option of an image in a \newcommand?

text: I apologize if my question is worded incorrectly, please feel free to modify it. I have a long document with many figures, most of which need to be trimmed at the same lengths. I would like to abbreviate the trim values so I don't have to type the numbers every time, and to make it easier to edit them in the future without scrolling through the entire document. Here is an example of what I'm trying to do               \documentclass[a4paper,11pt]{report}          \usepackage{float}     \usepackage{graphicx}          \newcommand{\crops}{2mm 2mm 2mm 2mm}          \begin{document}     \begin{figure}[H]     % \includegraphics[width=.48\linewidth,clip=true,trim=2mm 2mm 2mm 2mm]{example.png} % (works)     \includegraphics[width=.48\linewidth,clip=true,trim=\crops]{example.png} % (does not work)     \end{figure}     \end{document}      You can find the example image I used here This document yields an error: File ended while scanning use of \Gread@parse@vp Is there a way to do this? Thank you


title: pgfplots: options for marks do not apply

text: I try to modify the marks but the options do not seem to change anything?!               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}     \usetikzlibrary{plotmarks}          \usepackage{filecontents}     \begin{filecontents}{Values.dat}     x y     1 1     2 3     3 3     \end{filecontents}          \begin{document}          \begin{tikzpicture}     \begin{axis}[     ]     \addplot table [         x=x,          y=y,         only marks, % <-- no effect         mark=o, % <-- no effect         mark options={fill color=white,color = black} % <-- no effect     ]      {Values.dat};     \end{axis}     \end{tikzpicture}      In this example I want white circles with a black border but I only get the standard mark. ![enter image description here](http://i.stack.imgur.com/BvBOk.png)


title: alpha bibliography issue with accents

text: I'm using `classicthesis`. In my `bibliography.bib` file I have an author like this:               @Book{m,      author = {M\'endez, blah blah},      title = {Title 1},      publisher = {aaa},      year = {2006}      }          @Book{m2,      author = {M\'endez, blah blah},      title = {Title 2},      publisher = {aaa},      year = {2006}      }      I am using the `alpha` bibliography style. This style, instead of displaying [Me06a] or [Mé06a] and [Me06b] or [Mé06b], displays [Mó6a] and [Mó6b]. I've tried with               author = {M{\'e}ndez, blah blah}      or               author = {{M\'e}ndez, blah blah},      but that didn't really help. Does anybody know how to solve this?


title: Plain TeX macro to read a document in Pig Latin

text: Say I have a file `eng.tex`:               \def\encounter (#1){Hello, #1!}     \encounter (World)     \bye      I convert it to Pig Latin and save it as `pig.tex`:               \efday\encounterway (#1){Ellohay, #1!}     \encounterway (Orldway)     \yebay      Is there a way (e.g. header you could insert) to make TeX parse `pig.tex` like it was written normally in `eng.tex`, macros and all? (I'm not very experienced with how TeX parses and don't know where to start.)


title: Bibliography: Displaying the co-author in the form:surname, initials firstname

text: How can I change my bibliography to this form: > surname, initials of first name; surname, initial firstname (co-author) e.g.: > Jones, F.; Hare, A. (2010)... instead of > Jones, F and A. Hare (2010).. My Code:               \usepackage[babel,german=guillemets]{csquotes}     \usepackage[backend=bibtex,style=authoryear,sorting=nyt, firstinits=true]{biblatex}     \renewcommand{\mkbibnamelast}[1]{\textbf{#1}}     \setlength{\bibitemsep}{\medskipamount}     \bibliography{Quellen.bib}      It works perfectly for the first author, but not for the co-author. What can I do? (I am new here, please excuse the clumsy question)


title: Change screen math font in LyX

text: In LyX, under Tools -> Preferences -> Look & Feel -> Screen Fonts, I cannot find an option to change the default screen font used to display math. Is there some way to do it?


title: Varying edge thickness

text: A couple of months back, I had asked a question regarding an elegant way of drawing a somewhat sophisticated graph. Thanks to the community I received tremendous help. To avoid repeating the whole thing, here's the link of the mentioned thread: Typesetting digraph with weighted edges, varying vertex size, multiple lines in vertex As you may see, in this weighted-digraph the edges have weights as well. My question is, how may I enhance the solution proposed by Gonzalo Medina so that the edges are visually distinguishable as well wrt. their weights? For instance, as you might see in the original graph (d,c) has a weight of 0.9 whereas (e,a) has 0.1 thus I would like to draw the former much thicker than the latter.


title: Lining *and* oldstyle figures in maths

text: Here is my problem: I would like, as in some old maths books, use oldstyle figures as coefficients in math formulae – say in display- and textstyle, but lining figures for indices and exponents – say in script- and scriptscriptstyle. I'm not sure this is strictly equivalent, though. I guess that the use of the `\mathchoice` command would be useful, but I really don't know how to use it. Does anyone know how to achieve this automatically? _Added:_ I forgot to say that a solution should work with any math font. It happens that the proposed solution, which works perfectly well with default TeX math fonts doesn't work with MinionPro. Maybe a specific problem of MinionPro?


title: How can I reproduce the chemmacros logo style?

text: I'd like to reproduce the chemmacros logo style, as seen in chemmacros documentation I checked the source .tex file, but the logo is loaded from another pdf "chemmacros-logo.pdf" that is nowhere to be found into TeX Live. Since I'm assuming the logo is drawn with TikZ or something, is its code available somewhere?


title: \newtheorem in llncs creates problems

text: I get this error `Command \theorem already defined.` when I try to define `\newtheorem{theorem}{Theorem}` within a document with the `llncs` documentclass. My minimal example is here:               \documentclass[article]{llncs}           \let\proof\relax      \let\endproof\relax     \usepackage{amsthm}          \begin{document}     \newtheorem{theorem}{Theorem}               \begin{theorem}[Test]\label{thm:test}     \end{theorem}     \end{document}


title: Problem with amsthm

text: Consider the following MWE:               \documentclass[]{report}     \usepackage{amsthm}          \makeatletter       \def\th@definition{       \thm@notefont{}       \bfseries}     \makeatother          \newtheoremstyle{definition}{2.5em}{2.5em}{}{}{\bfseries}{}{1em}{}     \theoremstyle{definition}     \newtheorem*{defn}{Definition}          \begin{document}          \begin{defn}[Optional Title] Definition content.     \end{defn}          \end{document}      I want to keep the updated definition style, but have the optional title in bold. The first few lines of code (`makeatletter ... makeatother`) accomplish this for the default definition, but they stop working when I try to modify the definition style. How can I fix this? Thanks in advance.


title: Babel-Spanish issue MikTex

text: I have some problems with babel package in MikTex. I was working on a spanish document few weeks ago and all run nicely. Today, I resumed the document but had some problems when I compile using babel. Log file tells me is not installed. I googled it and it seems that babel organization files has changed. I tried to install the package in Miktex 2.9\Maintenance(Admin): babel-spanish but didnt worked: " The operation could not be completed because a required file does not exist". When I try to compile, Texmaker tries to install then next file: "tex\latex\babel-spanish\spanish.ldf" but the system didnt found it (I looked for it on google but I could not find it). Initially log file said : ! Package babel Error: Unknown option `spanish'. Either you misspelled it. Any idea about it? : (


title: qtree: missing { inserted

text: \documentclass{standalone}     \usepackage{qtree}          \begin{document}             \Tree [.A                          [.B [.D a] a [.E b]]                             [.C [.D c] b [.D c]]                          [.B [.D b]]                    ]     \end{document}      Trying to compile this yields "missing {" error.


title: Pgfplotstable one row in bold

text: Considering this MWE, I am looking to obtain bold style on a row. The `highlight`'s style works on columns but not on row.               \documentclass{standalone}     \usepackage{pgfplotstable}          \begin{document}     \pgfplotstableset{highlight/.append style={         postproc cell content/.append code={                 \pgfkeysalso{@cell content=\textbf{##1}}%         }     }}     \pgfplotstabletypeset[        every first column/.style={highlight,/pgf/number format/sci},        every last row/.style={highlight,/pgf/number format/sci}, %does not work         col sep=&,row sep=\\]{       colA & colB & colC \\       11   & 12   & 13   \\       21   & 22   & 23   \\     }     \end{document}      Do you any idea ? This seems that `postproc cell content` does not work on rows. EDIT Another problem is that the `\pgfkeysalso` remove the `sci` formatting....               \documentclass{standalone}     \usepackage{pgfplotstable}          \begin{document}     \pgfplotstableset{hhb/.append style={         postproc cell content/.append code={                 \pgfkeysalso{@cell content=\textbf{##1}}%         }     }}     \pgfplotstabletypeset[      every first column/.style={highlight,/pgf/number format/sci},      % every last row/.append style={highlight},      %every first column/.style={sci,postproc cell content/.append style=    {/pgfplots/table/@cell content/.add={\bf}{coucou}}},       col sep=&,row sep=\\]{      colA & colB & colC \\      11   & 12   & 13   \\      3E+4   & 22   & 23   \\     }     \end{document}      EDIT 2 In order to avoid the previous problem, the syntax must be:               \pgfplotstableset{hhc/.style={     postproc cell content/.append style={                 /pgfplots/table/@cell content/.add={$\bf}{$},             }             }}      But this works only for the columns and not for rows. EDIT 3: Solution to make ith row in bold:               \pgfplotstableset{         highlightrow/.style={             postproc cell content/.append code={                \count0=\pgfplotstablerow                 \advance\count0 by1                 \ifnum\count0=#1                 \pgfkeysalso{@cell content/.add={$\bf}{$}}                    %\pgfkeysalso{@cell content=\textbf{##1}}%                 \fi             },         },      Example of use:               \pgfplotstabletypeset[ highlightrow={2},         col sep=&,row sep=\\]{       colA & colB & colC \\       11   & 12   & 13   \\       3E+4   & 22   & 23   \\     }


title: Creating dedicated page for chapters while being present in TOC

text: I am currently working on the layout of my thesis and not completely certain how to implement this feature. There are two things i wish to achieve:   * A dedicated page for each chapter    * Chapter names being visible in TOC The TOC structure im looking for is:                Chapter 1: Some chapter name           1 Some title           1.1 Something elegant ........................................ 5           Chapter 2: Some differnet chapter name           2 Another title           2.1 Something super elegant .................................. 6      Now for each chapter page im looking for something like following: > Chapter 1 > > Some chapter name My starting point is simply a `Chapter x` heading for each chapter created by using following piece of code:               \usepackage{sectsty}     \chapterfont{\large\sc\centering}     \chaptertitlefont{\centering}     \subsubsectionfont{\centering}


title: mathjax \sqrt command

text: I don't if this forum is the right place where post my question, anyway, it concerns TeX. Mathjax seems to create the bar over the argument of `\sqrt` command as a box with a sequence of very densely dashes, as showed in the picture below. Is there a way to get this result into plain TeX environment?![enter image description here](http://i.stack.imgur.com/doCEo.png)


title: Underbrace in Tikz

text: I'm trying to add an underbrace to a graph in tikz but when i compile run PDFLaTeX and View PDF, the underbrace doesn't look correct. Instead of curling down and inwards at the ends, it goes outwards and then a horizontal line inwards? I've tried to use other methods suggested on here but the only other one I found used snakes and didn't work.               \documentclass[a4paper,fleqn]{article}     \usepackage{amssymb,amsthm,tikz,fancyhdr,cancel,enumerate,array,booktabs,setspace,pgf,tikz,fancyhdr,graphicx,color}     \usepackage[T1]{fontenc}     \usetikzlibrary{patterns,arrows,decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.6091370558375635cm,y=0.9589041095890412cm]     \draw[->,color=black] (-1,0) -- (18.7,0);     \foreach \x in {-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}     \draw[shift={(\x,0)},color=black] (0pt,-2pt);     \draw[color=black] (18.05,0.05) node [anchor=south west] { Time};     \draw[->,color=black] (0,-1) -- (0,6.3);     \foreach \y in {-1,1,2,3,4,5,6}     \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt);     \draw[color=black] (0.09,6.04) node [anchor=west] { Stock Level};     \clip(-1,-1) rectangle (18.7,6.3);     \draw (0,3)-- (3,0);     \draw (4.5,3)-- (3,0);     \draw (4.5,3)-- (7.5,0);     \draw (7.5,0)-- (9,3);     \draw (9,3)-- (12,0);     \draw (13.5,3)-- (12,0);     \draw (0,3)-- (5,3);     \draw (6.4,4.78) node[anchor=north west] {$gradient=r_s-r_d$};     \draw (10.22,4.76) node[anchor=north west] {$gradient=-r_d$};     \draw [->] (7.43,4.29) -- (8.66,2.32);     \draw [->] (11.01,4.26) -- (9.76,2.33);     \draw (-0.45,4.79) node[anchor=north west] {$Q$};     \draw (-0.5,3.36) node[anchor=north west] {$q$};     \draw (2.5,5)-- (7.5,0);     \draw (3,0)-- (3,5);     \draw (0,4.5)-- (3.5,4.5);     \draw (13.5,3)-- (16.5,0);     \draw (16.5,0)-- (18,3);     \draw (18,3)-- (21,0);     \draw [decorate,decoration={brace,amplitude=-10pt},xshift=0.4pt,yshift=-0.4pt](3,0) -- (7.5,0) node[black,midway,yshift=-0.6cm] {\footnotesize $t$};     \draw [decorate,decoration={brace,amplitude=-10pt},xshift=0.4pt,yshift=-0.4pt](12,0) -- (13.5,0) node[black,midway,yshift=-0.6cm] {\footnotesize $\frac{q}{r_s-r_d}$};     \draw [decorate,decoration={brace,amplitude=-10pt},xshift=0.4pt,yshift=-0.4pt](13.5,0) -- (16.5,0) node[black,midway,yshift=-0.6cm] {\footnotesize $\frac{q}{r_s}$};     \end{tikzpicture}     \end{document}


title: beamer: best way to span long enumerations on different frames

text: I have a question about `beamer` and enumerations. Which is the best way in `beamer` to split a long enumeration in such a way that each main point has its own frame? I already found this related answer but I was wondering about the possibility for a cleaner solution. There's also this other one, but I would like to keep control of frame breaks.


title: Including an asterisk in a reference item number

text: How do I add a mark (asterisk/dagger) to a particular bib entry, based on a keyword? For example consider the bib file:               @article{Doe2012a,         author  = {J. Doe},         title   = {Lorem Ipsum -- Part I},         journal = {J. Dolor Sit Am.},         volume  = {1},         pages   = {1--10},         month   = {1},         year    = {2012},         keywords = {invited},     }          @article{Doe2012b,         author  = {J. Doe},         title   = {Lorem Ipsum -- Part II},         journal = {J. Dolor Sit Am.},         volume  = {2},         pages   = {11--20},         month   = {2},         year    = {2012},     }      and the tex file:               \documentclass{article}     \usepackage[backend=biber, sorting=nty, style=authoryear]{biblatex}     \addbibresource{path/to/bib}          \begin{document}     \nocite{*}     \printbibliography[title=Articles, prefixnumbers=A., type=article]     \end{document}      which will produce an output like:               [A.1] J. Doe, "Lorem Ipsum ...     [A.2] J. Doe, "Lorem Ipsum ...      Now how can I design a filter or otherwise, that will look for the presence of `invited` in a keyword and then produce an output like               [A.1]* J. Doe, "Lorem Ipsum ...     [A.2] J. Doe, "Lorem Ipsum ...      where there is now an asterisk next to the ref item number? This way I can easily place a footnote to indicate which references were invited articles.


title: TexLive: Why compiling in linux is much faster than windows?

text: I use TexLive in both linux and windows. However, the project compiles very fast (below 1 sec.) in linux while it takes between 10 to 20 seconds on windows (in the same machine). This has happened to me on every machine. In fact, Texlive on windows sometimes is fast (compiles in 1 sec or worse) and sometimes is slow (on the same file)! Why is Texlive so slow on windows?


title: Different style on chapter than table contents

text: I tried to style a chapter page using the `titlesec` and the `tikz` package like this one : http://www.texample.net/tikz/examples/fancy-chapter-headings/ But I saw that the table of contents and the bibliography page were styled the same way as the chapter.How can I use different styles in these 3 pages?


title: Can I put a line break in \pgftext?

text: Simple question: I'm making a picture with PGF (basic layer, not TikZ) and I would like to add some text using `\pgftext`. The problem is that any `\\\` or `\newline` line breaks within the text are apparently ignored. Is there some way I can force a line break to appear?               \documentclass{minimal}     \usepackage{pgf}          \begin{document}      \begin{pgfpicture}       \pgftext{can haz line \\ break plz?}       \pgftext[y = -20pt]{i made u a line \newline break but tex eated it}      \end{pgfpicture}      \end{document}      This is not mentioned in the manual at all, and the only other discussion I can find is this post from comp.tex.pgf.user which doesn't actually include a solution, only the workaround of using a TikZ node with `[align=...]`. But, mostly for curiosity's sake, suppose using TikZ is off the table. Is it still possible to do line breaks? (I would think so, since TikZ itself must do it somehow)


title: Lyx add page number in abstract

text: Hi I'm desperately looking for a way to display the page number on my page in abstract. I'm trying to do this with the `\chead{\thepage}`, yet it won't work. The following screenshots show the view in lyx and the pdf output. As you see I tried the mentioned command at several positions without success. Awkwardly, previous pages and pages after the abstract are displaying the page numbers. I also have not rewritten the \abstract command in my preface. It would be great if you could tell me how to add the page number on this page. ![enter image description here](http://i.stack.imgur.com/vLmim.png) ![enter image description here](http://i.stack.imgur.com/QeusI.png)


title: How to plot smoothly an implicit function using gnuplot and tikz-pgf?

text: I would like to plot implicit functions in Latex with tikz and gnuplot. A minimal example of my code is given by:               \documentclass{article}       \usepackage{tikz}     \begin{document}       \begin{tikzpicture}[xscale=1,yscale=.25]         \draw plot[id=curve, raw gnuplot] function{           f(x,y) = y**2 + (x**2 - 5)*(4*x**4 - 20*x**2 + 25);           set xrange [-4:4];           set yrange [-15:15];           set view 0,0;           set isosample 1000,1000;           %set size square;           set cont base;           set cntrparam levels incre 0,0.1,0;           unset surface;           splot f(x,y)         };       \end{tikzpicture}     \end{document}      This generates the following ugly output. I expected to get a smooth plot. ![Output generated by the code](http://i.stack.imgur.com/hREKe.jpg) The problem occured with MikTex 2.9 on Windows 7. The version of pgf is 3.0.0 according to the Miktex Package Manager and 2.10 according to the command \pgfversion. I assume the "correct" version number to be 3.0.0 since the files in my pgf directory where modified for the last time on 2013-12-13, this is the same day as the modification date of the 3.0.0 version on Sourceforge (http://sourceforge.net/projects/pgf/files/pgf/) I also tried to compile the document on Ubuntu with \pgfversion 2.10. This generated the same result as on Windows. The same problem occured here: How to use the results of `raw output` to create a smooth plot The problem described in the above post should be solved since 2013-07-31, see: http://sourceforge.net/p/pgf/bugs/149/#e1ce In the SO question Pieter furthermore proposes a hackish solution, I tried this, but it did not change the plot. Thanks for your help!


title: LuaTeX/ConTeXt connect to SQL Server

text: I am looking to connect ConTeXt to a SQL Server database. I have looked through the manuals, and even read pragma-ade's SQL PDF (which, for me, seems a bit abstract). I am not extremely familiar with Lua but have read up on the language (I am more familiar with JS). For LaTex I used nlatexdb which did the trick, but LaTex isn't able to do what ConTeXt can.   * The connection needs to use Windows Authentication.   * The document is set up as a letter with an environment that it pulls from.   * It would be preferable to have the connection and queries be seperate from the letter itself, and be able to place variables into the letter that can be populated through the queries (much like nlatexdb) if possible.     * example: Dear ??first ??last, Thank you for your interest in ??product... etc. I am rather new to ConText and just starting to get the hang of it, long time latex user, the transition starts off rather confusing, but once it makes sense it opens up a whole toolbox of available tools which is great. Just need this one last tool. Any help would be much appreciated. EDIT:: Honestly I haven't gotten to any point that I felt I could attempt trying the connection. Looking at the SQL PDF from pragma-ade it should look something like:                   local presets = {         server = "XXX\XXX",         Database = "Customer",         Integrated Security = "True",         }         presets.id = "XXX"         local template = [[         SELECT         'Control_Content'         FROM         'Customer.dbo.Report_Client_Data'         WHERE         'Control_Name' LIKE 'Long_Name' AND 'Client_Id' = 154;          ]]              local data, keys = utilities.sql.execute {         presets = presets,         template = template,         variables = {},         }      I can't seem to find where or how the connection is being made, except perhaps where utilities.sql.execute is called, but I can't find any information anywhere about such a call in lua or context...


title: Authors typeset in bold in the reference list using bibtex

text: There were some questions about this topic on the site yet, for example:   * Make specific author bold using biblatex   * Make specific author bold using biblatex without consistent author formatting    * Bold author if source is an article The answer by @Audrey following first link is most elaborated. **My question:** the @Audreu solution works fine with no applied style of _ieee_ style but fails when I try with APA style:               \usepackage[style=apa]{biblatex}     \DeclareLanguageMapping{american}{american-apa}      Any suggestions or pointers how to proceed?


title: Wrapping text in enumeration environment around a table

text: I would like to wrap the text in an enumerate environment around a table, this is my actual situation (sorry for including so much code, but I wanted to give a precise idea of the number of lines in the enumerate environment):               \subsection{Given the following data set where “Target 2” represent the class attribute,      compute the naive Bayesian classification for the instance $<L,white>$ and $<XS,?>$.}     \begin{table}[h!t]     \centering     \begin{tabular}{ccc}         \toprule             Size        &   Color   &   Target2 \\         \midrule         XS      &   green   &   Yes     \\         L       &   green   &   Yes     \\         XS      &   white   &   No      \\         M       &   black   &   No      \\         XL      &   green   &   Yes     \\         XS      &   white   &   Yes     \\         L       &   black   &   No      \\         M       &   green   &   Yes     \\         \bottomrule     \end{tabular}     \end{table}     \begin{enumerate}         \item In this case the experience $E$ is made up of $e_{1} = L$ and $e_{2} = white$,              which in Naive Bayes are to be considered as independent, therefore we have:             \begin{align*}                 P(yes|E) &= P(L|yes)\cdot P(white|yes) \cdot P(yes)     \\                          &= \sfrac{1}{5}\times \sfrac{1}{5} \times \sfrac{5}{8} \\                          &= 0.025             \end{align*}             \begin{align*}                 P(no|E) &= P(L|no) \cdot P(white|no) \cdot P(no) \\                         &= \sfrac{1}{3} \times \sfrac{1}{3} times \sfrac{3}{8}  \\                         &= 0.041             \end{align*}             Then we normalize:             \begin{align*}                 P(yes) &= \frac{0.025}{0.066}                           \simeq 0.38              \end{align*}             \begin{align*}                 P(no) &= \frac{0.041}{0.066}                         \simeq 0.62             \end{align*}             As $P(no) > P(yes)$, we label $<L,white>$ as ``no''.         \item Now we have to classify a sample with a missing value. During the testing phase              we simply omit the attribute\footnote{Classification Other Methods, slide 24}:             \begin{align*}                 P(yes|XS) &= P(XS|yes) \cdot P(yes) = \sfrac{2}{5} \times \sfrac{5}{8}                           = 0.25             \end{align*}             \begin{align*}                 P(no|XS) &= P(XS|no) \cdot P(no)                           = \sfrac{1}{3} \times \sfrac{3}{8}                          = 0.125             \end{align*}             Let us normalize             \begin{align*}                 P(yes) &= \sfrac{0.25}{0.375} \simeq 0.7 \\                 P(no)  &= \sfrac{0.125}{0.375} \simeq 0.3             \end{align*}             Bottom line this sample is classified as ``yes''.     \end{enumerate}      I have tried using the `wrapfig` and the `floatftl` package unsuccessfully, the table was moved to the end of the list in both cases. I have considered using two `minipage` environments, but I would like the text to actually wrap around the table.


title: Aligning two fractions in the split environment

text: I have two equations:                   \begin{equation}         \begin{split}          d_1 & =\frac{aaaaaaaaaa}{b}\\         d_2 & =\frac{aaaaaa}{b}         \end{split}          \end{equation}      I want the fraction lines to have equal lengths in the two cases. How can I make it happen?


title: Biblatex 2.8a biblatex chem-angew style without square brackets

text: I'm new to LaTeX and decided to write my PhD thesis with it (pdflatex.exe, TexStudio2.6.6, Win7x64). Here we go. the angew. chem. style is usually without square brackets in the text. how can i modify the chem-angew.bbx, so that i get rid of those brackets in `\cite{1}` resulting in [1]? I know that I have to redefine some command but a lack of knowledge does not allow me to complete the task. Could anyone help me? here is a MWE               \documentclass{article}          \usepackage[style=chem-angew,sortcites=true]{biblatex}          \renewcommand{\cite}{\supercite}          \usepackage{filecontents}          \begin{filecontents}{test.bib}     @book{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     @book{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},     }     @article{C03,       author = {Cuthor, C.},       year = {2003},       title = {Charlie},     }     \end{filecontents}          \addbibresource{test.bib}          \begin{document}          We are citing \cite{A01,C03} and \cite{B02} and \cite{A01,B02,C03}          \printbibliography     \end{document}


title: Label and Reference Fig

text: As we `$\label{eq01}$` equations and `$ref{eq01}$`, after inserting a image where I mention the label? and how to refer the FIG? A code I inserted in `LaTeX` for inserting Fig is:               \begin{figure}      \centering      \includegraphics[scale=0.40]{d2spherical.png}      % d2spherical.png: 800x300 pixel, 72dpi, 18x8 cm, bb=0 0 1142 479      \caption{Solution of the spherical equation for $D=2$}      \label{Fig:5}     \end{figure}      Please mention, where to refer and label.


title: PSTricks, how to move and rescale a picture

text: How can I scale and change position of a PSTricks picture on a beamer slide? I draw a picture and save it in tex format using Inkscale. This is an example of the beginning of the picure               %LaTeX with PSTricks extensions     %%Creator: inkscape 0.48.2     %%Please note this file requires PSTricks extensions     \psset{xunit=.5pt,yunit=.5pt,runit=.5pt}                                             \begin{pspicture}(453.54330444,340.1574707)     {     \newrgbcolor{curcolor}{1 1 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(86.07989999,190.82162153)     \lineto(93


title: epstopdf does not find (or generate) pdf file

text: I have an error while trying to use epstopdf package. This is my code               \documentclass[11pt,oneside,a4paper,onecolumn]{article}          \usepackage[usenames,dvipsnames]{pstricks}     \usepackage{epsfig}     \usepackage{pst-grad} % For gradients     \usepackage{pst-plot} % For axes          % For using eps files     \usepackage{epstopdf}     \epstopdfsetup{outdir=./}          \begin{document}     \begin{figure}[h!]       \centering         \includegraphics[width=0.1\textwidth]{./apple2.eps}         \caption{Apple}                                                                  \end{figure}     \end{document}      This is the error message:               Package epstopdf Warning: Shell escape feature is not enabled.          (/usr/share/texmf-texlive/tex/latex/latexconfig/epstopdf-sys.cfg))) (./fig.aux)     (/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )          ! Package pdftex.def Error: File `./apple2-eps-converted-to.pdf' not found.          See the pdftex.def package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 ...raphics[width=0.1\textwidth]{./apple2.eps}          ?      Do you know how to fix it?


title: Replace everything inside eqnarray* by a given text

text: Is there any simple (method/macro,..) to replace everything inside all `eqnarray*` by a simple given text. More precisely for example I want to replace               \begin{eqnarray*}     x     & = & \frac{1}{2}at_1^2 + v_0t_1 + x_0\\     t_1^2 & = & \frac{2x}{g}     \end{eqnarray*}      or any `eqnarray*` by               \begin{eqnarray*}     \text{Math inside}     \end{eqnarray*}      best regards. **Edit** : it would be nice if this also works for `align`, `displaymath`,.... It should save the environment structure, and replace the content inside it.


title: How to cite a complete figure which contains several subfigures extending over multiple pages

text: I would like to cite a complete figure (say Fig.1) which contains several sub- figures (say a,b,c,d,e,f,g,h) and extends over next page. Here is the code which I used.               \begin{figure}[!htb]         \captionsetup{labelformat=empty}         \makebox[\textwidth][c]       {       \subfloat{\includegraphics[width=0.5\textwidth]{a.png}} \quad     \subfloat{\includegraphics[width=0.5\textwidth]{b.png}}          }\\ [2ex]       \makebox[\textwidth][c]       {       \subfloat{\includegraphics[width=0.5\textwidth]{c.png}} \quad     \subfloat{\includegraphics[width=0.5\textwidth]{d.png}}       }\\ [2ex]         \makebox[\textwidth][c]         {     \subfloat{\includegraphics[width=0.5\textwidth]{e.png}} \quad     \subfloat{\includegraphics[width=0.5\textwidth]{f.png}}        }       \caption{}       \end{figure}       % The Figure continues on the next page       \begin{figure}       \ContinuedFloat       \makebox[\textwidth][c]       {       \subfloat{\includegraphics[width=0.5\textwidth]{g.png}} \quad     \subfloat{\includegraphics[width=0.5\textwidth]{h.png}}       }            \caption{this is figure 1 a-h.}       \label{fig:fig1}       \end{figure}        When I try to cite the whole figure in my document, it is always cited as Fig.1h. I would like to cite the whole figure as only Fig.1 and its individual sub-figure as Fig.1a, Fig.1b, Fig.1c....Fig.1h manually when necessary. Many thanks in advance for your valuable suggestions !!


title: Reordering sides of comma in the journal entry of Bibtex records

text: When downloading bibtex records from the web most databases list the journal entry with commas such as the following: > journal={Information Theory, IEEE Transactions on} However in the references it needs to be listed without the comma in between, in this case "IEEE Transactions on Information Theory". Do we need to edit all of the journal entries by hand to remove the commas, or is there a particular bibtex command that can do it for us? If the latter is the case, it would be very helpful working with a reference management system that downloads the records from the web.


title: Texlipse builder script configuration with own batch file without losing forward and inverse search

text: I have followed the instructions of @Paulo Cereda to configure texlipse (LaTeX in eclipse) to use my batch file when running. But in the process, I have lost **forward** and **inverse** search even if the configuration does use my script successfully. **QUESTION 1: How do I re-enable searching and still keep my configuration?** (I am using the inbuilt viewer pdf4eclipse) The instructions I followed are here (texlipse builder script configuration.). I also tried adding `-syntex=1` under Arguments (see picture) I am using eclipse in windows 7 with MiKTeX 2.9. here is my configuration ![enter image description here](http://i.stack.imgur.com/OWqNI.jpg) Its been suggested that using arara can work. But I have many files that are `\included {}` and at some point I loop through them to make a chapter by chapter bibliography as you can see from my script (thesis.bat) the contents of which are also pasted. So I am not sure I know how to implement this. **QUESTION 2: In arara, how would I handle the loop`for %%X in (*.aux) do bibtex "%%X"` and this line (x2 is nls, x3=nlo) `makeindex.exe %x2% -s nomencl.ist -o %x3%`. See code below** I have tried arara by pasting the following at the top of my main file               % arara: pdflatex: {synctex: yes, action: nonstopmode}     % arara: pdflatex      % arara: bibtex     % arara: pdflatex     % arara: pdflatex     % arara: makeindex     % arara: nomencl     % arara: pdflatex      and adding `% arara: bibtex` to the top of each `\include{file}` but i get ![enter image description here](http://i.stack.imgur.com/2Wc1x.jpg) **QUESTION 4: What is wrong then? Also, will arara keep my forward and inverse search if i successfuly fix this?** Contents of my arara batch script: thesis.bat               @echo off          arara F00_thesis      Contents of my batch script: thesis.bat               :: Run     :: [path_to_bat_file] inp.tex inp.nlo inp.nls          @echo off     rem fake-command /u %1 rem /p %2 rem allows script to take inputs if rem is removed at start     cd c:\DATA\Thesis\ThesisReport          set tx=F00_thesis     set x1=%tx%.tex     set x2=%tx%.nlo     set x3=%tx%.nls     set pd=%tx%.pdf               :: Change Drive and  to File Directory     %~d1     cd %1          :: Run Cleanup     :: call:cleanup          taskkill /im "acrobat.exe" /f       pdflatex %x1%     pdflatex %x1%     rem bibtex %tx%     for %%X in (*.aux) do bibtex "%%X"     pdflatex %x1%     pdflatex %x1%     makeindex.exe %x2% -s nomencl.ist -o %x3%     pdflatex %x1%     :: start "sumatraPDF" "C:\Program Files (x86)\SumatraPDF\sumatraPDF.exe" %pd% -reuse-instance     :: START "" %pd%     :: START "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" %pd% -reuse-instance     :: http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/     :cleanup     REM del *.log     REM del *.dvi     REM del *.aux     REM del *.bbl     REM del *.blg     REM del *.brf     REM del *.out     goto:eof      **The simplest solution for me would be the one that lets me keep my script and still have the sync between .tex and pdf**


title: How to write dedication properly?

text: I'm trying to make some line vertical-spaces in dedication. But, I couldn't find how. Here is the code that I'm using:               \newenvironment{dedication}       {\clearpage           % we want a new page        \thispagestyle{empty}% no header and footer        \vspace*{\stretch{1}}% some space at the top         \itshape             % the text is in italics        \raggedleft          % flush to the right margin       }       {\par % end the paragraph        \vspace{\stretch{3}} % space at bottom is three times that at the top        \clearpage           % finish off the page       }      When I try this to get one empty lines. I get none.               \begin{dedication}     ABC \\ \\ DEF     \end{dedication}      And how do I please to change the font-style of `John` in this code:               \begin{dedication}     ABC \\ \\ DEF \\ \\     John     \end{dedication}      Thank you a lot!


title: How to avoid double dash seem as a continuous line?

text: I'm using `listings` to show some source code (bash scripts) in my document but there is a problem, when using mono spaced fonts, the space between dashes is very small and in the printed document two or more contiguous dashes seems as a continuous line. The courier font hasn't this problem, but I would like to use Bera Mono or DejaVu Sans Mono. Is there a way to avoid this situation? **EDIT:** This is the code that reproduces the problem, I am using `pdflatex`.               \documentclass[letterpaper,12pt,twoside]{report}     \usepackage{listings}     \lstnewenvironment{code}     {         \fontsize{10pt}{1pt}         \usefont{T1}{fvm}{m}{n}         \lstset         {             showspaces=false,             showstringspaces=false         }     } { }          \begin{document}     \begin{code}         diff --version | head -n1         find --version | head -n1         gawk --version | head -n1     \end{code}     \end{document}      ![Sample output](http://i.stack.imgur.com/RI4eg.png) I like Herbert's solution but I added the code only to clarify how this problem happen.


title: Set csquote macros in AUCTeX preference to work also with included files

text: I use to keep most of my documents in separate _branch_ files and then `/include` them in the main _tree_ document. Of course I don't need a preamble for all separate files. In my AUCTeX preferences I set               ;; " expands into csquotes macros     (setq  LaTeX-csquotes-open-quote "\\enquote{"            LaTeX-csquotes-close-quote "}")      but still I can't benefit from it in the _branch_ files since they have no preamble and no `\usepackage{csquotes}` command. Is there any workaround, so to have the AUCTeX preferences working for all .tex document and not only where the package `csquote` is explicitly indicated?


title: Scaling text in pictures

text: I create pictures with pstricks, that contain rectangles and text within the rectangles. When I need to scale the picture, I use "psset unit=...", and all rectangles in my picture are scaled appropriately. However, the text does not change, and this ruins my entire picture. Either the text remains too small, or the text remains large and gets out of the rectangle. Is there a way to scale a picture, such that the ratio between the text size and the graphics size will remain constant?


title: MiKTeX Update: Error `\textfont is undefined` with Package `url`

text: The following MWE does not compile with XeLaTeX anymore after a MiKTeX update today:               \documentclass{article}     \usepackage{fontspec}     \setromanfont[Path=./]{LinLibertine_R.otf}     \usepackage{url}     \urlstyle{rm}          \begin{document}         Test: \url{http://test-website.com}     \end{document}      You will need the Linux Libertine OTF fonts in order to reproduce the error, but they don't need to be installed. Just place `LinLibertine_R.otf` in the same folder as your MWE TeX file. The problem seems to be the hyphen (`-`) into the URL. The same MWE compiled without problems before the update. So far I could reproduce this issue only with this font. Any help is appreciated. Thanks!


title: No numbering environment conflicting with IEEE

text: So I made a `remark` environment, which is used just once, and I do not want to get it numbered. To use `\newtheorem*` command I need to activate `amsthm` package....but then this package is making changes to `IEEEtran` style by making many other things as italics..... Is there way I can manually number a environment, so that i can just use spacebar to number               %\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out                                                               % if you need a4paper     %\documentclass[a4paper, 10pt, conference]{ieeeconf}      % Use this line for a4                                                               % paper     %\documentclass[journal]{IEEEtran}     %\documentclass[journal,12pt,draftclsnofoot,onecolumn]{IEEEtran}          %\documentclass[conference]{IEEEtran}                 % This command is only                                                               % needed if you want to                                                               % use the \thanks command     %\overrideIEEEmargins          % *** GRAPHICS RELATED PACKAGES ***     %          % *** MATH PACKAGES ***     %          %\documentclass[letterpaper, 10 pt, conference]{ieeeconf}        \documentclass[conference]{IEEEtran}     %\IEEEoverridecommandlockouts           %% INFOCOM 2013 addition:          \makeatletter     \def\ps@headings{%     \def\@oddhead{\mbox{}\scriptsize\rightmark \hfil \thepage}%     \def\@evenhead{\scriptsize\thepage \hfil \leftmark\mbox{}}%     \def\@oddfoot{}%     \def\@evenfoot{}}     \makeatother     \pagestyle{headings}                                                       \usepackage{cite}     \usepackage{url}     \usepackage{bm}     \usepackage{graphicx}     \usepackage{algorithm}     \usepackage[noend]{algorithmic}     \usepackage{subfig}     \usepackage{amssymb,amsmath,graphicx,charter,latexsym}     \usepackage{enumerate}     \usepackage{comment}     \usepackage{verbatim}          \newtheorem{definition}{Definition}     \newtheorem{lemma}{Lemma}     \newtheorem{corollary}{Corollary}     \newtheorem{theorem}{Theorem}     \newtheorem{example}{Example}     %\newcommand{\abs}[1]{\lvert#1\rvert}     \newcommand{\abs}[1]{\lvert#1\rvert}     \newtheorem{remark}{Remark}     \newtheorem{observation}{Observation}     % *** SPECIALIZED LIST PACKAGES ***     %               \allowdisplaybreaks[4]     \usepackage{bbm}          % *** ALIGNMENT PACKAGES ***     %          \begin{document}     \title{\bf{xx}}     \author{xx     \thanks{xx}     xx     }     \maketitle          \begin{remark}     AA     \end{remark}     \end{document}


title: Layout of n x m figure which use the maximal available space

text: Is there any elegant way to layout multiple images like this automatically:               \begin{figure}         \centering         \includegraphics[width=0.32\textwidth]{eval1.pdf}%         \includegraphics[width=0.32\textwidth]{eval2.pdf}%         \includegraphics[width=0.32\textwidth]{eval3.pdf}         \\         \includegraphics[width=0.32\textwidth]{eval4.pdf}%         \includegraphics[width=0.32\textwidth]{eval5.pdf}%         \includegraphics[width=0.32\textwidth]{eval6.pdf}         \caption{Results for four scenarios}         \label{results}     \end{figure}      This methods becomes somewhat tedious when using different layouts like 5x2 or 6x2. I would like to say "use x% of the maximal available width for theses n images and put a white space of d between them". **Edit:** This question previously also included a problem with the missing % which screwed up a 2x2 layout when using `0.5\textwidth` instead of `0.49\textwidth`. Thanks to Torbjørn for pointing this out!


title: footnote under the table moves it right

text: I know this topic was already mentioned but I still can not use your advices in a proper way. I wanted to have footnotes under the table instead of at the bottom of the page. I changed the `table` environment for `minipage` because `\footnote` command wasn't working, meaning that the footnotes were not showed uder the table at all. Now they are visible but the table was moved to the right side :(. Could you help me, please ?               \begin{table}[ht!]     \centering     \caption {Parameters of the AD and the GFI alternative scenarios}     \begin{minipage}{7cm}     \centering     \begin{tabular}{l | l | l l}      \toprule      \multirow{2}{*}{Parameter} & \multirow{2}{*}{unit} & \multicolumn{2}{c}{Alternative >scenario} \\ \cline{3-4}     \phantom{aaa} & \phantom{aaa} & \multicolumn{1}{c}{AD} & \multicolumn{1}{c}{GFI} \\      \midrule      Electricity efficiency  & \% & 45\footnote{InSource Energy Limited, 2010} & \phantom{aaaa} >26 \\      Heat efficiency  & \% & 51 & \phantom{aaaa} 73 \\      Water content of digestate & \% ww & 75\footnote{Danish Energy Agency, 2010} & \phantom{aaaa} - \\ \midrule     \end{tabular}     \end{minipage}     \label{alternativescenario_ad_gfi}     \end{table}


title: Xdvi to Emacs inverse search not working in Emacs 24.3.1 / AucTeX-11.87 in Ubuntu 12.04

text: I'm trying to use AUCTeX to write my LaTeX documents. However I'm having issues with performing inverse search from Xdvi to Emacs. _Software Specifications_ I currently use _Emacs 24.3.1 / AUCTeX-11.87 in Ubuntu 12.04._   * The Emacs was downloaded and installed from ppa:Cassou and installed using their recommended commands.    * The AUCTeX-11.87 was downloaded from the AUCTeX website which was then configured (using just `./configure`) and installed (using `make`) inside the `~/.emacs.d` folder. The following AUCTeX environment was set in the init file (`~/.emacs`).               (add-to-list 'load-path "~/.emacs.d/auctex-11.87")     (load "auctex.el" nil t t)     (load "preview-latex.el" nil t t)     (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq-default TeX-master nil)          (add-hook 'LaTeX-mode-hook 'visual-line-mode)     (add-hook 'LaTeX-mode-hook 'flyspell-mode)     (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)          (add-hook 'LaTeX-mode-hook 'turn-on-reftex)     (setq reftex-plug-into-AUCTeX t)          ;; Inverse DVI Search     (tex-dvi-view-command "xdvi -editor 'emacsclient -a emacs --no-wait +%l %f'")     (setq TeX-source-correlate-method 'source-specials)     ;;(setq TeX-source-correlate-method 'SyncTeX)  ;; auctex 10.86            (TeX-source-correlate-mode)     (setq TeX-source-correlate-start-server t)          ;;(TeX-source-correlate-mode)       ;;(add-to-list 'TeX-command-list '("View" "%V" TeX-run-discard nil t))          ;;update the dvi file after each successful compilation     (add-to-list 'TeX-output-view-style              '("^dvi$" "."                "%(o?)xdvi -watchfile 1 %dS %d"))      _Issues_ The most important issues that I have are   * Inspite of the environment specification, the `TeX-source-correlate-mode` is not automatically enabled when I open a `.tex` file. I need to enable it every time employing `C-c C-t C-s` command.   * The source special is not attached by AUCTeX automatically when I compile the `.tex` file using `Command -> LaTeX` option. Because when I open the `.dvi` ouput using xdvi, it complains to me stating the following Warning _No source specials in this DVI file - couldn't do reverse search_. The source specials do get attached to the dvi file if I just perform the following command line option               latex --src-specials main.tex      It will be of help if someone can help me identify the mistake I'm making in trying to create an inverse search from


title: How to display numbers in the math mode in the same font as in the text?

text: I have set my default font family for the text as sans serif with `\renewcommand*{\familydefault}{\sfdefault}` and now I want for the math mode to display the numbers in the same way as they appear outside of it. I have tried a couple of solutions such as using `\DeclareMathVersion` declaration followed by `\SetSymbolFont` and `\SetMathAlphabet` as well as `\textrm` command from amsmatch package but the font still turns out different from when just writing out numerical characters outside the math mode.


title: What is the Default font for LyX when using Book(Memoir)

text: I'm using LyX with the following Document Settings: Document Class -- "Book (Memoir)" Fonts / Default family -- "Default" Fonts / LaTeX font encoding -- "Default" Fonts / Roman -- "Default" Fonts / Sans Serif -- "Default" Fonts / Typewriter -- "Default" What is the actual name of the Default fonts that LyX uses when the document class is set to Book (Memoir) class. How do I know if the default is "Times Roman" or "Bookman", for instance. I see that I can change the "Default" from the dropdown menu to an actual name such as "Times Roman", "Palatino", "Bookman", "Utopia", "New Century Schoolbook" or another from several others in the dropdown list, but I'm figuring that the "Default" option must be considered the overall best option with the most versatility and readability, or if not, then atleast it must not be a poor choice. I'd like to know what the "Default" fonts are, though, for Sans, Roman and the Typewriter settings. Also, I'd like to know what "LaTeX font encoding" means, and what the "Default family" is. I'd like to stick with the same font family if possible, since I want a consistent look, and all the versatility such as Small Caps, Italics, many font sizes to pick from for Title, Parts, Chapters, body text, and monologue insets, and the Chapter Name / Book Name headers of each page... and the footers etc. I'm not concerned with at all with rendering equations. The "Bookman" font looks pretty readable. Is it also versatile and recommended?


title: latex - place picture at top left of coverpage

text: I need to have the coverpage of my phd dissertion match a stupid word template from my university. While the whole layout is pretty set i'm unable to place to logo/picture in the top left of the coverpage (only) as I am required to (!). Right now its sitting in the middle of the coverpage. I'm using the title function in a report class-document. This is really the first document I've made i Latex so my Latex-skills aren't quite top level yet :) Any help would be much appreciated! Thanks.               \documentclass[12pt, twoside]{report}            \usepackage{graphicx}     \usepackage{enumitem}     \usepackage{titlesec}     \setcounter{secnumdepth}{4}     \titleformat{\paragraph}     {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}     \titlespacing*{\paragraph}     {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \usepackage[latin1]{inputenc}     \usepackage[a4paper, width=150mm, top=23mm, bottom=25mm, bindingoffset=6mm]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \fancyhead[RO, LE]{Fancy header}     \fancyfoot{}     \fancyfoot[LE, RO]{\thepage}     \fancyfoot[LO, CE]{Chapter \thechapter}     \fancyfoot[CO, RE]{John McClane}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     \title{     {Fancy title}\\     {\large PhD dissertation}\\         \vspace{15mm}     \includegraphics[scale=1.5]{AUlogo}\\         \vspace{15mm}     {\large Faculty of Health}\\     {\small Department of Boring PhDs}     }     \author         {John McClane\\         Master of Disaster}          \date{May 2014}          \begin{document}          \maketitle          \end{document}


title: How to put a header/foot close to the end of the paper?

text: How can I put a header/foot closer to the end of the paper? Do I have to use the fancyhdr package? I tried but I had any problem, and I have in the first page the "numer page" in a different way from the rest of the pages. Thank You. ![enter image description here](http://i.stack.imgur.com/CyzRV.png)


title: Error using \newcommand within a beamer frame

text: For some reason my `beamer` presentation does not compile when `\newcommand` is placed inside the `frame` environment. Here is a minimal working example:               \documentclass{beamer}          \begin{document}          \begin{frame}{First slide}       \newcommand{\asdf}[1]{What is the #1 problem?}     \end{frame}          \end{document}      I get the following error: > Illegal parameter number in definition of \test. Note that the `\asdf` macro is not even used after it is defined. Strangely, when I place the definition outside of the `frame` environment, everything works fine. What is the reason for this strange behavior?


title: achemso \keyword and \abbreviation command don't work

text: I'm preparing a paper using the `achemso` package. I used it before (around 2 years ago) and everything worked fine. However, if I use the `\keyword` and `\abbreviation` commands now I don't get what I got two years ago, even with the file from two years ago it doesn't work anymore. Here's what I mean:               \abbreviations{abb1, abb2}     \keywords{key1, key2, key3}      and I use the following documentclass:               \documentclass[journal=nalefd,manuscript=letter]{achemso}      When I used it two years ago the abbreviations didn't show up in the manuscript and the keywords were displayed before the abstract like this: > KEYWORDS: key1, key2, key3 Now I get the following after the abstract: > **Keywords** > > abb1, abb2 And then follows my main text. Anyone knows what I'm doing wrong? Any help is appreciated.


title: subequation numbering in itemized list

text: This is what I generated for a set of equivalent definitions of positive semi- definiteness.               \documentclass[10pt]{article}          % for fancy math     \usepackage{amsmath}          % rank operator     \DeclareMathOperator*{\rank}{rank}          % Matrix transpose     \newcommand{\trans}[1]{\ensuremath{{#1}^\top}}          % for extra space at the end of abbreviation     \usepackage{xspace}          % positive semi-definite     \newcommand{\psd}{\textsc{psd}\xspace}          % boldface uppercase letters for matrices     \newcommand{\Abf}{\ensuremath{\mathbf A}}     \newcommand{\Bbf}{\ensuremath{\mathbf B}}          % boldface lowercase letters for vectors     \newcommand{\xbf}{\ensuremath{\mathbf x}}          % for math blackboard font     \usepackage{amssymb}     % set of real numbers     \newcommand{\Rbb}{\ensuremath{\mathbb R}}          \usepackage{palatino}     \usepackage[sc]{mathpazo}          \begin{document}     \noindent     For any real symmetric matrcies $\Abf$ such that $\rank(\Abf_{n\times n})=r$,     the following statements are equivalent     and any one of them can serve as the definition of     \emph{positive semi-definite} (\psd) matrices.     \begin{itemize}       \item $\trans\xbf \Abf\xbf \geq 0$ for any non-zero vector         $\xbf\in\Rbb^{n\times 1}$.         \hfill\refstepcounter{equation}\textup{(\theequation)}%       \item All the $n$ eigenvalues of $\Abf$ are non-negative.         \hfill\refstepcounter{equation}\textup{(\theequation)}%       \item $\Abf=\trans\Bbf \Bbf$ for some $\Bbf$ with $\rank(\Bbf)=r$.         \hfill\refstepcounter{equation}\textup{(\theequation)}%     \end{itemize}          \end{document}      ![enter image description here](http://i.stack.imgur.com/LqxhF.png) As these definitions are all equivalent, I'd like to number them as (1a), (1b), and (1c) instead of (1), (2), (3). I'm not sure whether I can use `subequations` environment as I want to keep three different definitions as a text in an itemized list. Any suggestions?


title: Inverse search texshop

text: I am having problems with inverse search on old files (let's say one year or older) in TexShop: it does not work. I have to update (typeset) the files for inverse search to work. (There are two inconveniences of having to retypeset the files: it takes time, and information of when was the file last updated is lost) I am using TeXShop 3.23 on OS X Mountain Lion. Incidentally, the problem does not apply to forward search; it works well.


title: Combining Chinese, Japanese and Korean text with xeCJK

text: When combining Chinese, Japanese and Korean text in a document, is there a way to define individual fonts for the respective characters? Especially for Korean, since few fonts support Cn/Jp AND Korean. Right now I'm using a little workaround by wrapping all Korean text in \texttt{} and setting the font with \setCJKmonofont.               \usepackage{xeCJK}     \setCJKmainfont{Hiragino Mincho Pro} % for Cn & Jp     \setCJKmonofont{AppleMyungjo} % for Kr          \newcommand\cn[1]{\textnormal{#1}}     \newcommand\jp[1]{\textnormal{#1}}     \newcommand\kr[1]{\texttt{#1}}


title: newcommand multiple default values

text: I'm busy with a document that change frequently. and special the used dimensions change. This result in a large chance that i miss a value when i change the dimensions. To tackle this problem i made a command with 3 variables (L,W,H). With the help of http://en.wikibooks.org/wiki/LaTeX/Macros i make the following command.               \newcommand{\dimsEN}[3][default value]{The dimensions ($\mathrm{L} \times \mathrm{W} \times       \mathrm{H}$) of the room are $\mathrm{#1} \times \mathrm{#2} \times \mathrm{#3}$}      Now i cant figure out how to make 3 default values. so that i have 1 place to change all te values Thanks


title: Dealing with very long table - split into columns?

text: I've got a very long table in a document that I'm not sure how to deal with. I've been thinking about putting it in the appendix of my document (I'd have to create one just for the table). It's too long to place directly in the text (it takes up a page). Is there a way of maybe putting half of the table in one "column" and the other half in another without making two columns for the text? Cheers! This is the table:               \begin{table}[h!]     \begin{tabular}{ccc}     \toprule     Anfalljahr & Abwicklungsjahr & Standardfehler \\     \midrule      1 & 9 & 650,1919 \\      \midrule     2 & 8 & 875,4824 \\     2 & 9 & 671,2845 \\     \midrule      3 & 7 & 1170,6342 \\     3 & 8 & 901,8521 \\     3 & 9 & 691,6597 \\     \midrule     4 & 6 & 1559,5708 \\     4 & 7 & 1203,8834 \\     4 & 8 & 927.5346 \\     4 & 9 & 711,4804 \\     \midrule     5 & 5 & 2071,7564 \\     5 & 6 & 1606,1098 \\     5 & 7 & 1239,1049 \\     5 & 8 & 954,6539 \\     5 & 9 & 732,4417 \\     \midrule     6 & 4 & 2698,5804 \\     6 & 5 & 2151,6863 \\     6 & 6 & 1665,0242 \\     6 & 7 & 1283,5693 \\     6 & 8 & 989,0181 \\     6 & 9 & 759,1276 \\     \midrule     7 & 3 & 3423,2954 \\     7 & 4 & 2855,1991 \\     7 & 5 & 2267,2416 \\     7 & 6 & 1749,4723 \\     7 & 7 & 1347,3335 \\     7 & 8 & 1038.4542 \\     7 & 9 & 797,6345 \\     \midrule     8 & 2 & 4299,1644 \\     8 & 3 & 3767,7121 \\     8 & 4 & 3110,0573 \\     8 & 5 & 2446,4490 \\     8 & 6 & 1875,8567 \\     8 & 7 & 1440,5486 \\     8 & 8 & 1109,7732 \\     8 & 9 & 852,8231 \\     \midrule     9 & 1 & 5648,2843 \\     9 & 2 & 5186,1165 \\     9 & 3 & 4445,4462 \\     9 & 4 & 3574,7993 \\     9 & 5 & 2745,5721 \\     9 & 6 & 2068,0585 \\     9 & 7 & 1571,5864 \\     9 & 8 & 1204,7393 \\     9 & 9 & 924,0199 \\     \bottomrule     \end{tabular}     \caption{Standardfehler für die geschätzten Schadenzuwächse}     \end{table}


I presume the problem I have been encountering is quite trivial. But I could not find any help via Google, so I am asking the experts. The problem is the following: I want to create a Cirriculum using moderncv. But when I run TeXworks (I'm using Windows 7), it returns me an error saying:                   Argument of \NROrg@ifthenelse has an extra }.         <inserted text>          \par          l.30 \cventry{2008-2011}{Oberstufenschule Zulg}         {{Steffisburg}}      Since the error is referring to my apparently badly written code, I shall put it here:                   \documentclass[11pt,a4paper]{moderncv}              \moderncvtheme[blue]{classic}         \usepackage[T1]{fontenc}         \usepackage[utf8x]{inputenc}         \usepackage[scale=0.8]{geometry}         \recomputelengths         \fancyfoot{}              \firstname {Mario}         \lastname {Andricic}         \title {Curriculum Vitae}         \address{Neumattstrasse 21}{3600 Thun}         \mobile {+41 79 550 58 84}          \phone {+41 33 437 37 17}         \email {rio.andricic@bluewin.ch}         \nopagenumbers{}              \begin{document}         \maketitle              \section{Info}                   \cvline{Geburtsdatum}{\small 16.06.1995 Thun\normalsize}         \cvcomputer{Nationalität}{\small Schweiz\normalsize}{Führerausweis}         {\small vorhanden\normalsize}}              \section{Bildung}         \cventry{2006-2008}{Mittelstufenschule Schönau}{Steffisburg}         \cventry{2008-2011}{Oberstufenschule Zulg}Steffisburg}         \cventry{2011-2014}{Gymnasium und Wirtschaftsmittelschule Thun-Schadau}{Thun}              \end{document}      As I have already said, I was looking for the answer on Google but either I could not find it or I do not have the knowledge to learn from similar errors. Please help me! Greetings :)


title: Add annotations at right margin of plot

text: I'd like to add annotations outside the plotting area, at the right axis, and at positions that depend on the coordinates of the plot. I could do that with custom ticks, or adding nodes manually, but in the latter case I have to give the code in `after end axis` or disable clipping (which can have other undesirable effects, such as... not clipping). The best solution I've found so far is this:               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}          \def\angs{0.529177208354}     \def\ev{27.2113838656}          \begin{axis}[       xmin = 2,       xmax = 4,       ymin = 0,       ymax = 5,       xlabel = {$r$},       ylabel = {$E$},       after end axis/.code = {         \path (axis cs:4.0,1.6) node[right] {B3LYP};       }      ]           \def\ezero{-1.11}     \addplot+ table[x expr={\thisrowno{0}*2*\angs}, y expr={(\thisrowno{2}-\ezero)*\ev}] {data.dat};          \end{axis}          \end{tikzpicture}     \end{document}      It has to problems:   1. I'd like to give the code next to `\addplot`, and not in the `axis` options.   2. I'd like the coordinates (in particular the ordinate) to be calculated automatically. This shows the result with the following `data.dat` file:               2.0 -13840.8142382 -0.8142382     2.1 -13840.9230067 -0.9230067     2.2 -13840.9967745 -0.9967745     2.3 -13841.0454158 -1.0454158     2.4 -13841.0762998 -1.0762998     2.5 -13841.0944654 -1.0944654     2.6 -13841.1038383 -1.1038383     2.7 -13841.1070221 -1.1070221     2.8 -13841.1059849 -1.1059849     2.9 -13841.1022183 -1.1022183     3.0 -13841.0966277 -1.0966277     3.1 -13841.0899909 -1.0899909     3.2 -13841.0828688 -1.0828688     3.3 -13841.0755779 -1.0755779     3.4 -13841.0687860 -1.0687860     3.5 -13841.0626993 -1.0626993     3.6 -13841.0572297 -1.0572297     3.7 -13841.0527363 -1.0527363     3.8 -13841.0493218 -1.0493218     3.9 -13841.0467450 -1.0467450     4.0 -13841.0447949 -1.0447949     4.1 -13841.0433105 -1.0433105     4.2 -13841.0421877 -1.0421877     4.3 -13841.0413471 -1.0413471     4.4 -13841.0407159 -1.0407159     4.5 -13841.0402353 -1.0402353     4.6 -13841.0398710 -1.0398710     4.7 -13841.0395993 -1.0395993     4.8 -13841.0393960 -1.0393960     4.9 -13841.0392397 -1.0392397     5.0 -13841.0391747 -1.0391747      ![test plot](http://i.stack.imgur.com/Vjn23.png) PS. Another question as a bonus: is there a way to use the numbers in the 2nd column, rather than the 3rd (which is just the 2nd + 13840), without losing precision?


title: Change page numbering of appendices to A.1...B.1

text: I have 4 appendices (Syntax, Questionnaire, List of Abbreviations and the Bibliography). The page numbering is put to "Alph". I would like to have just four letters A,B,C,D in my table of contents for each Appendix to appear (Syntax A, Questionnaire B, List of Abbreviations C and Bibliography D), even though almost every four of them has more than one page. So, I would like to have every follow-up page as A.1, A.2, respectively B.1, B.2 et cetera. Can someone help me? What I tried:               \appendix     \pagenumbering{Alph}     \renewcommand{\thesection}{B.\arabic{section}}     \input{./Appendices/Syntax}     \input{./Appendices/Questionnaire}


title: How can I draw a diagram for matrix multiplication with LaTeX?

text: I'm trying to make a PDF manual for matrix multiplication with LaTeX. I'd like to generate a graphic similar to this one (from Wikipedia/Matrix multiplication): ![Matrix multiplication](http://i.stack.imgur.com/c8zZ2.png) I guess this will be quite a bit of work, but is there another way than using the eepic package? I have read into some examples and the manual, and it seems very complex to generate a graphic like this with that package. If there is no other way, I'll have to use eepic, but I hope someone here could point me to a package or another way.


title: newcommand for foreign language

text: I started to learn russian, and I need to write russian in LaTeX. I am aware of the `\foreignlanguage{russian}{text}` function. But how do I make a new command, so I only need to type `\rl{text}`?               \documentclass{article}     \usepackage[OT2, T1]{fontenc}     \usepackage[russian, english]{babel}          \begin{document}     \newcommand{\rl}[1] {\foreignlanguage{russian}{}}            \rl{This should be russian}          \end{document}


title: How to make \reversepath useful for drawing the following closed curve?

text: I want to draw a batman logo. As it is symmetric about the vertical line, it should be more convenient to just define the right part (or the left part) first and then reflect it to get the other part. The important note you must consider is that the logo must be constructed by a closed curve that can be used as a clipping path. According to `pst-news13` on page 4, we have `\reversepath` that can be used to construct a curve in reversed coordinates. Unfortunately, I failed to use `\reversepath` as shown in the following code.               \documentclass[pstricks,border=6pt]{standalone}     \SpecialCoor          \pstVerb     {         /theta 72 def         /Major 6.0 def         /Minor 3.3 def         % b a t p2c ---> x y         % where b (semi-minor), a (semi-major), t (theta)         /p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def     }               \def\RightPart     {         \psline(0,2.7)(0.5,2.7)(1,3.25)         \psbezier(1.2,1.3)(1.3,1.0)(2.0,1.0)         \psbezier(3.0,1.0)(3.0,2.2)(!Minor Major theta p2c)         \psellipticarcn(0,0)(!Major Minor){(!Minor Major theta p2c)}{(!Minor Major theta neg p2c)}         \psbezier(4,-2)(4,0)(2.2,-1.8)         \psbezier(1.5,-1)(1,-1)(0,-3.2)     }          \def\LeftPart     {         \scale{-1 1}         \reversepath         \psbezier(1.5,-1)(1,-1)(0,-3.2)         \psbezier(4,-2)(4,0)(2.2,-1.8)         \psellipticarcn(0,0)(!Major Minor){(!Minor Major theta p2c)}{(!Minor Major theta neg p2c)}         \psbezier(3.0,1.0)(3.0,2.2)(!Minor Major theta p2c)         \psbezier(1.2,1.3)(1.3,1.0)(2.0,1.0)         \psline(0,2.7)(0.5,2.7)(1,3.25)         \closepath     }               \begin{document}     \begin{pspicture}[showgrid=false](-7.85,-4.85)(7.85,4.85)         \pscustom[dimen=middle]{\RightPart}     \end{pspicture}     \begin{pspicture}[showgrid=false](-7.85,-4.85)(7.85,4.85)         \pscustom[dimen=middle]{\LeftPart}     \end{pspicture}     \begin{pspicture}[showgrid=false](-7.85,-4.85)(7.85,4.85)         \pscustom[dimen=middle,fillstyle=solid,fillcolor=red]{\RightPart\LeftPart}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/HSkeq.gif) So my question is how to use `\reversepath` in this case?