title: Embedding citations using natbib and chicago or APSR

text: I'm trying to embed citations using natbib and chicago style but I keep coming up short. The errors I get include: 'Cite should not be used with natbib. Use Sort instead; Latex Error: Somethings wrong perhaps a missing item. I'm using a Wu thesis template that I've altered a bit, hence the name umslthesis.cls. Below is the CLS and the Tex file, along with the bib file. Thanks.                \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{umslthesis}[2006/12/15 Wash U Math thesis class]     \usepackage{ifthen}     \newcommand{\ifthen}[2]{\ifthenelse{#1}{#2}{}}     \usepackage{endnotes}     \usepackage{wulongtable}     \usepackage{rotating}     \usepackage{lscape}     \usepackage{cite}          \usepackage{fixltx2e}     \usepackage[T1]{fontenc}           \makeatletter     \def\@@number{\string##}               \newcommand{\@@type}{thesis}     \newcommand{\set@@type}[1]{\renewcommand{\@@type}{#1}}     \DeclareOption{bypass}{\set@@type{bypass}}     \DeclareOption{prelim}{\set@@type{prelim}}     \DeclareOption{thesis}{\set@@type{thesis}}     \newboolean{@@uglyheadings}     \setboolean{@@uglyheadings}{false}     \DeclareOption{uglyheadings}{\setboolean{@@uglyheadings}{true}}     \newboolean{@@unset}     \newcommand{\@@optionbibstyle}{}     \newcommand{\set@@optionbibstyle}[1]{\renewcommand{\@@optionbibstyle}{#1}\addtocounter{@@tcount}{1}}     \DeclareOption{abbrvnat}{\set@@optionbibstyle{abbrvnat}}     \DeclareOption{agsm}{\set@@optionbibstyle{agsm}}     \DeclareOption{aip}{\set@@optionbibstyle{aip}}     \DeclareOption{alpha}{\set@@optionbibstyle{alpha}}     \DeclareOption{apalike}{\set@@optionbibstyle{apalike}}     \DeclareOption{astron}{\set@@optionbibstyle{astron}}     \DeclareOption{chicago}{\set@@optionbibstyle{chicago}{sort}}     \DeclareOption{ieee}{\set@@optionbibstyle{ieee}}     \DeclareOption{ieeetr}{\set@@optionbibstyle{ieeetr}}     \DeclareOption{kluwer}{\set@@optionbibstyle{kluwer}}     \DeclareOption{plain}{\set@@optionbibstyle{plain}}     \DeclareOption{plainnat}{\set@@optionbibstyle{plainnat}}     \DeclareOption{unsrt}{\set@@optionbibstyle{unsrt}}     \DeclareOption{unsrtnat}{\set@@optionbibstyle{unsrtnat}}     \DeclareOption{apsr}{\set@@optionbibstyle{apsr}}          \newif\if@openbib     \@openbibfalse     %               %\DeclareOptions*(\PassOptionsToClass{\CurrentOption}{report}}       % Used to count number of citation/bibliography styles used.          \ProcessOptions     \newcommand{\IW}[1]{\immediate\write16{#1}}     {       \catcode`\+=13       \def+{\space}       \ifnum\value{@@tcount}>1         \IW{}         \IW{You may specify only one citation/bibliography style from the below list:}         \IW{++++abbrvnat}         \IW{++++agsm}         \IW{++++aip}         \IW{++++alpha}         \IW{++++apalike}         \IW{++++astron}         \IW{++++chicago}         \IW{++++ieee}         \IW{++++ieeetr}         \IW{++++kluwer}         \IW{++++plain}         \IW{++++plainnat}         \IW{++++unsrt}         \IW{++++unsrtnat}         \IW{++++apsr}         \IW{ABORTING...}         \IW{}         \stop       \fi     }     \LoadClass[12pt,twoside]{report}[2001/04/21]               {\obeyspaces       \gdef\@@Identification{{         \IW{}         \IW{+----------------------------------------------------------------------------+}         \IW{|                                                                            |}         \IW{|                         Thanks for using wuthesis.cls.                     |}         \IW{|                                                                            |}         \IW{+----------------------------------------------------------------------------+}         \IW{}     }}     }          \def\AppendixFigure{\relax}     \def\AppendixTable{\relax}     \def\@@bibname{REFERENCES}     \def\@@deptbibstyle{chicago}     \def\@@coversheetspace{\vfill}     \def\@@evenfoot{}     \def\@@evenhead{\hfil\textrm{\thepage}}     \newboolean{@@figurecaptions}       \setboolean{@@figurecaptions}{false}     \def\@@oddfoot{}     \def\@@oddhead{\hfil\textrm{\thepage}}     \def\@@sectionbaselinestretch{\relax}     \def\@@sectionseries{\bfseries}     \def\@@startthebibliography{\coversheet{\@@bibname}}     \def\@@startvita{\coversheet{\@@vitaname}}     \def\@@subsectionbaselinestretch{\relax}     \def\@@subsectionseries{\bfseries}     \def\@@subsubsectionbaselinestretch{\relax}     \def\@@subsubsectionseries{\bfseries}     \def\@@t{\relax}     \def\@@thebibliographyparsep{\relax}     \def\@@makechapterhead#1{\large\bf\thechapter. #1}     \def\@@makechapterheadspacea{\vspace*{0.5truein}}     \def\@@makechapterheadspaceb{\vspace{0.5\baselineskip}}     \def\@@makeschapterheadspacea{\vspace*{0.5truein}}     \def\@@makeschapterheadspaceb{\vspace*{0.5\baselineskip}}     \usepackage{csquotes}          \AtBeginDocument{       \usepackage{notoccite}     }     \AtEndDocument{       \@@Identification     %%  \write\@auxout{\string\newcounter{\string\csname@@@appendix\endcsname}}     %%  \write\@auxout{\string\setcounter{\string\csname@@@appendix\endcsname}{\arabic{@@appendix}}}     }     \newenvironment{cland}       {\begin{landscape}\hbox\bgroup\hss\vbox\bgroup}       {\egroup\hss\egroup\end{landscape}}          \newenvironment{lquotation}       {\begin{quotation}\renewcommand{\baselinestretch}{1}\reset@font}       {\end{quotation}}          \newcommand{\coversheet}[1]{       {         \ifthen{\boolean{@@coversheets}}           {             \ifthenelse{\boolean{@@chapterblankpages}}               {\clearpage} %% ! {\cleardoublepage}               {\clearpage}             \pagestyle{empty}             \mbox{}             \@@coversheetspace             \begin{center}               #1             \end{center}             \vfill             \newpage             \addtocounter{page}{-1}           }         \@@NotTableOfContents       }     }     \setlength{\paperheight}{11truein}     \setlength{\paperwidth}{8.5truein}     \renewcommand*{\baselinestretch}{2}     \setlength{\evensidemargin}{0.5truein}     \setlength{\oddsidemargin}{0.5truein}     \setlength{\textheight}{8.75truein}     \setlength{\textwidth}{6truein}     \clubpenalty=10000     \widowpenalty=10000     \displaywidowpenalty=10000     \pagenumbering{roman}     \newcommand{\@@NotTableOfContents}{%       \renewcommand*{\@evenhead}{\@@evenhead}       \renewcommand*{\@oddhead}{\@@oddhead}       \renewcommand*{\@evenfoot}{\@@evenfoot}       \renewcommand*{\@oddfoot}{\@@oddfoot}     }               \newcommand*{\@@MajorProf}{\relax}     \newcommand*{\majorprof}[1]{\renewcommand*{\@@MajorProf}{Professor #1, Chairperson}}     \newcommand*{\majorprofs}[1]{\renewcommand*{\@@MajorProf}{Major Professors: #1}}     \newcommand*{\@@Title}{\relax}     \renewcommand*{\title}[1]{\renewcommand*{\@@Title}{#1}}     \newcommand*{\@@Committee}{\relax}     \newcommand*{\committee}[1]{\renewcommand*{\@@Committee}{#1}}     \renewcommand*{\maketitle}       {         {           \renewcommand*{\baselinestretch}{2} \reset@font           \setcounter{save@@page}{\value{page}}           \begin{titlepage}             \mbox{}             \vfil             \vfil             \begin{center}             {\Large\bf University of Missouri-St. Louis\\}             {\large Political Science }             \vskip 0.4truein         \renewcommand{\baselinestretch}{1.5}\reset@font             { Dissertation Examination Committee:\\              \@@Committee             }         \renewcommand{\baselinestretch}{2}\reset@font             \vskip 0.5truein             \uppercase\expandafter{\@@Title}             \end{center}             \ifthen{\(\boolean{number@@all@@volumes} \and \value{last@@volume}>1\) \or \value{@@volume}>1}               {                 \begin{center}                   VOLUME \the@@volume                 \end{center}               }             \vfil             \begin{center}               by\\               \@@TitleAuthor             \end{center}             \vfil             \renewcommand{\baselinestretch}{1.5}\reset@font             \begin{center}               A dissertation presented to the \\ Graduate School of Arts and Sciences\\ of the University of Missouri-St. Louis in\\ partial fulfillment of the\\               requirements for the degree\\               of               \@@TitleDegree             \end{center}               {}               {\vfil}             \begin{center}               \@@DegreeMonth\ \@@DegreeYear\\               St. Louis, Missouri              \end{center}           \end{titlepage}           \setcounter{page}{\value{save@@page}}           \ifthen{\value{@@volume}=0 \or \value{@@volume}=1}             {\setcounter{page}{2}}         }       }     \newenvironment{dedication}%       {%         \newpage         \pagestyle{plain}         \mbox{}         \vfil         \begin{center}%       }%       {%         \end{center}%         \vfil         \eject         \@@NotTableOfContents       }     \newboolean{@@inother}     \setboolean{@@inother}{false}       % #1 "next" or "odd": start on next or next odd page?       % #2 what to print at top of page       % #3 "y" or "n": put in table of contents?       % #4 amount of extra space to put after heading at top of page     \newcommand{\@@nonchapter}[4]{{%       \@@NotTableOfContents       \bgroup         \pagestyle{plain}         \setboolean{@@inother}{true}         \renewcommand{\large}{}%         \renewcommand{\bf}{}%         \ifthenelse{\equal{ce}{\@@dept}}           {\chapter*{\uppercase{#2}}}           {\chapter*{#2}}         \ifthen{\equal{y}{#3}}           {             \ifthenelse{\equal{ce}{\@@dept}}               {\addcontentsline{toc}{chapter}{\uppercase{#2}}}               {\addcontentsline{toc}{chapter}{#2}}           }       \egroup       \vspace{#4}     }}     \newenvironment{acknowledgments}%       {\@@nonchapter{next}{ACKNOWLEDGMENTS}{y}{0pt}}%       {}     \newenvironment{preface}%       {\@@nonchapter{next}{PREFACE}{y}{0pt}}%       {}     \renewcommand*{\tableofcontents}{       \@@nonchapter{odd}{TABLE OF CONTENTS}{n}{0pt}       {\leftskip=0pt \noindent\hbox to\textwidth{\hfil Page}\par}       {%         \output={           \let \par \@@par           \ifnum \outputpenalty<-\@M             \@specialoutput           \else             \@makecol             \@opcol             \@startcolumn             \@whilesw \if@fcolmade \fi               {%                \@opcol\@startcolumn}%           \fi           \ifnum \outputpenalty>-\@Miv             \ifdim \@colroom<1.5\baselineskip               \ifdim \@colroom<\textheight                 \@latex@warning@no@line{Text page \thepage\space                   contains only floats}%                 \@emptycol               \else                 \global \vsize \@colroom               \fi             \else               \global \vsize \@colroom             \fi           \else             \global \vsize \maxdimen           \fi           {\leftskip=0pt \noindent\hbox to\textwidth{\hfil Page}\par}         }         \renewcommand{\baselinestretch}{2}\reset@font         \pagestyle{plain}         \@starttoc{toc}       }     }     \def\bigtocskip{0.5\baselineskip plus.2\p@}     \def\smalltocskip{0pt}     \def\@dottedtocline#1#2#3#4#5#6{%       \ifnum #1>\c@tocdepth       \else         \vskip #2         {%           \leftskip #3           \rightskip \@tocrmarg           \parfillskip -\rightskip           \parindent #3           \@afterindenttrue           \interlinepenalty\@M           \leavevmode           \@tempdima #4           \advance\@tempdima \@@padding           \advance\leftskip \@tempdima           \hbox{}\hskip -\leftskip           #5\nobreak           \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill           \nobreak           \hbox to\@pnumwidth{\hfil\reset@font\rm #6}\par         }%       \fi     }     \renewcommand*{\listoftables}{       \@@nonchapter{next}{LIST OF TABLES}{y}{0pt}       {\leftskip=0pt \noindent\hbox to\textwidth{Table\hfil Page}\par}       {%         \output={           \let \par \@@par           \ifnum \outputpenalty<-\@M             \@specialoutput           \else             \@makecol             \@opcol             \@startcolumn             \@whilesw \if@fcolmade \fi               {%                \@opcol\@startcolumn}%           \fi           \ifnum \outputpenalty>-\@Miv             \ifdim \@colroom<1.5\baselineskip               \ifdim \@colroom<\textheight                 \@latex@warning@no@line{Text page \thepage\space                   contains only floats}%                 \@emptycol               \else                 \global \vsize \@colroom               \fi             \else               \global \vsize \@colroom             \fi           \else             \global \vsize \maxdimen           \fi           {\leftskip=0pt \noindent\hbox to\textwidth{Table\hfil Page}\par}         }         \renewcommand{\baselinestretch}{1}\reset@font         \@starttoc{lot}       }     }     \renewcommand{\listoffigures}{       \@@nonchapter{next}{LIST OF FIGURES}{y}{0pt}       {\leftskip=0pt \noindent\hbox to\textwidth{Figure\hfil Page}\par}       {%         \output={           \let \par \@@par           \ifnum \outputpenalty<-\@M             \@specialoutput           \else             \@makecol             \@opcol             \@startcolumn             \@whilesw \if@fcolmade \fi               {%                \@opcol\@startcolumn}%           \fi           \ifnum \outputpenalty>-\@Miv             \ifdim \@colroom<1.5\baselineskip               \ifdim \@colroom<\textheight                 \@latex@warning@no@line{Text page \thepage\space                   contains only floats}%                 \@emptycol               \else                 \global \vsize \@colroom               \fi             \else               \global \vsize \@colroom             \fi           \else             \global \vsize \maxdimen           \fi           {\leftskip=0pt \noindent\hbox to\textwidth{Figure\hfil Page}\par}         }         \renewcommand{\baselinestretch}{1}\reset@font         \@starttoc{lof}       }     }     \newcommand{\@@startlist}[1]{       \@@nonchapter{odd}{#1}{y}{0pt}%       \setlength{\LTleft}{\parindent}%       \setlength{\LTright}{0truein}%       \setlength{\@@tlength}{\textwidth}       \addtolength{\@@tlength}{-\LTleft}       \addtolength{\@@tlength}{-\LTright}       \addtolength{\@@tlength}{-\tabcolsep}       \addtolength{\@@tlength}{-\tabcolsep}       \addtolength{\@@tlength}{-1truein}     }     \newenvironment{symbols}%       {%         \@@startlist{SYMBOLS}         \begin{longtable}{lp{\@@tlength}}%       }       {\end{longtable}}     \newenvironment{abbreviations}       {         \@@startlist{ABBREVIATIONS}         \begin{longtable}{lp{\@@tlength}}%       }       {\end{longtable}}     \newenvironment{nomenclature}       {         \@@startlist{NOMENCLATURE}         \begin{longtable}{lp{\@@tlength}}%       }       {\end{longtable}}     \renewenvironment{glossary}       {         \@@startlist{GLOSSARY}         \begin{longtable}{lp{\@@tlength}}%       }       {\end{longtable}}     \renewenvironment{abstract}%       {%         \@@nonchapter{next}{ABSTRACT}{y}{0pt}         {%           \renewcommand*{\baselinestretch}{1.5}\reset@font           \vspace*{\baselineskip}           \vbox{             \begin{center}             \noindent             {\bf \@@Title}\\              by\\             \@@AbstractAuthor~\\ \@@AbstractDegree \ in Political Science,\\            University of Missouri-St. Louis,             \@@DegreeMonth,             \@@DegreeYear.\\             {%               \renewcommand*{\\}{}%             }             \@@MajorProf            \end{center}           }                \vspace*{\baselineskip}           \par         }       }%       {\par}       \pagestyle{plain}     \renewcommand{\chapter}{%       \ifthenelse{             \(      \boolean{@@inother} \and \boolean{@@nonchapterblankpages} \)         \or \( \not \boolean{@@inother} \and \boolean{@@chapterblankpages}    \)       }         {\cleardoublepage}         {\clearpage}       \@@NotTableOfContents       \global\@topnum\z@       \@afterindentfalse       \secdef \@chapter \@schapter     }     \newboolean{@@inchapters}     \setboolean{@@inchapters}{false}     \def\@chapter[#1]#2{%       \ifnum \c@secnumdepth >\m@ne         \refstepcounter{chapter}%         \typeout{\@chapapp\space\thechapter.}%         \setboolean{@@unset}{true}       \fi       \chaptermark{#1}%       \ifthenelse{\equal{ce}{\@@dept}}         {\@makechapterhead{\uppercase{#2}}}         {\@makechapterhead{#2}}       \@afterheading       \ifthen{\not \boolean{@@inchapters}}         {           \pagenumbering{arabic}%           \@@inchapterstrue         }       \pagestyle{plain}       \addcontentsline{toc}{chapter}{{\protect\numberline{\csname thechapter\endcsname}{\bf #1}}}     }     \def\@makechapterhead#1{%       \@@makechapterheadspacea       {\centering         \@@makechapterhead{#1}         \endgraf       }       \@@makechapterheadspaceb     }     \def\@makeschapterhead#1{%       \@@makeschapterheadspacea       {\centering         \ifthenelse{\equal{ce}{\@@dept}}           {\large\bf\uppercase{#1}}           {\large\bf #1}         \endgraf       }       \@@makeschapterheadspaceb     }     \def\@startsection#1#2#3#4#5#6{%       \if@noskipsec         \leavevmode       \fi       \par       \@tempskipa #4\relax       \@afterindenttrue       \ifdim \@tempskipa <\z@         \@tempskipa -\@tempskipa       \fi       \if@nobreak         \everypar{}%       \else         \addpenalty{\@secpenalty}%         \addvspace{\@tempskipa}%       \fi       \@ifstar         {\@ssect{#3}{#4}{#5}{#6}}%         {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%     }     \newenvironment{cabstract}{\begin{quote}\textbf{Abstract}\quad}{\end{quote}}     \newtheorem{definition}{Definition}[section]     \newtheorem{observation}{Observation}[section]     \newsavebox{\proofbox}     \sbox{\proofbox}{\rule{7pt}{7pt}}     \newtheorem{Proof}{Proof}     \renewcommand{\theProof}{}     \newenvironment{proof}{\begin{Proof}\rm}{\hfill \usebox{\proofbox} \end{Proof}}     \newtheorem{proposition}{Proposition}[section]     \newtheorem{theorem}{Theorem}[section]     \renewcommand{\section}{%       \@startsection         {section}%         {1}%         {\z@}%         {24pt}%         {12pt}%         {\@@sectionbaselinestretch\reset@font\@@sectionseries}%     }     \ifthen{\boolean{@@uglyheadings}}       {         \def\undertext#1{$\underline{\smash{\hbox{#1}}}$}         \def\section{           \vspace{36truept}           \secdef{\@@section}{\@@ssection}         }         \def\@@section[#1]#2{           \refstepcounter{section}           \sectionmark{#1}           \hbox to \textwidth{\hss\undertext{\thesection\ #2}\hss}\nopagebreak           \addcontentsline{toc}{section}{\protect\numberline{\csname thesection\endcsname}#1}           \nopagebreak         }         \def\@@ssection#1{           \sectionmark{#1}           \hbox to \textwidth{\hss\undertext{#1}\hss}\nopagebreak           \nopagebreak         }       }     \renewcommand{\subsection}{%       \@startsection         {subsection}%         {2}%         {\z@}%         {24pt}% \@plus -1ex \@minus -.2ex}%         {12pt}% 1.5ex \@plus .2ex}%         {\@@subsectionbaselinestretch\reset@font\@@subsectionseries}%     }     \ifthen{\boolean{@@uglyheadings}}       {         \renewcommand{\subsection}[1]{           \refstepcounter{subsection}           \vspace{36truept}           \subsectionmark{#1}           \hbox to \textwidth{\hss\thesubsection\ #1\hss}\nopagebreak           \addcontentsline{toc}{subsection}{\protect\numberline{\csname thesubsection\endcsname}#1}           \nopagebreak         }       }     \renewcommand{\subsubsection}{       \@startsection         {subsubsection}%         {3}%         {\z@}%         {24pt}% \@plus -1ex \@minus -.2ex}%         {12pt}% 1.5ex \@plus .2ex}%         {\@@subsubsectionbaselinestretch\reset@font\@@subsubsectionseries}%     }     \ifthen{\equal{mse}{\@@dept}}       {         \def\undertext#1{$\underline{\hbox{#1}}$}         \newbox{\@@Strut}         \renewcommand{\subsubsection}[1]{           \refstepcounter{subsubsection}           \vspace{6truept}           \subsubsectionmark{#1}           \noindent \undertext{\vphantom{gjpqy}\thesubsubsection. #1}\newline\nopagebreak           \addcontentsline{toc}{subsubsection}{\protect\numberline{\csname thesubsubsection\endcsname}#1}%           \nopagebreak\indent         }       }     \ifthen{\boolean{@@uglyheadings}}       {         \renewcommand{\subsubsection}[1]{           \refstepcounter{subsubsection}           \vspace{36truept}           \subsubsectionmark{#1}           \noindent \undertext{\thesubsubsection. #1}\newline\nopagebreak           \addcontentsline{toc}{subsubsection}{\protect\numberline{\csname thesubsubsection\endcsname}#1}           \nopagebreak         }       }     \ifthen{\boolean{@@uglyheadings}}       {         \setcounter{tocdepth}{4}         \newcommand*{\l@subsubsubsection}{\@dottedtocline{4}{\smalltocskip}{11.2em}{5.0em}}         \def\subsubsubsectionmark#1{}         \newcounter{subsubsubsection}[subsubsection]         \renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}         \newcommand{\subsubsubsection}[1]{           \refstepcounter{subsubsubsection}           \vspace{36truept}           \subsubsubsectionmark{#1}           \noindent \thesubsubsubsection. #1\newline\nopagebreak           \addcontentsline{toc}{subsubsubsection}{\protect\numberline{\csname thesubsubsubsection\endcsname}#1}           \nopagebreak         }       }     \def\@sect#1#2#3#4#5#6[#7]#8{%       \ifnum #2>\c@secnumdepth         \let\@svsec\@empty       \else         \refstepcounter{#1}%         \edef\@svsec{\csname the#1\endcsname\hskip 1em}%       \fi       \ifthen{\equal{che}{\@@dept}}         {%           \ifnum #2=3             \refstepcounter{#1}%             \edef\@svsec{\csname the#1\endcsname\hskip 1em}%           \fi         }%       \@tempskipa #5\relax       \ifdim \@tempskipa>\z@         \begingroup           #6\relax           \@hangfrom{\hskip #3\relax\@svsec}%           {\interlinepenalty \@M #8\par}%         \endgroup         \csname #1mark\endcsname{#7}%         \addcontentsline{toc}{#1}{%           \ifnum #2>\c@secnumdepth           \else             \protect\numberline{\csname the#1\endcsname}%           \fi           #7%         }%       \else         \def\@svsechd{%           #6%           \hskip #3\relax           \@svsec #8\csname #1mark\endcsname           {#7}%           \addcontentsline{toc}{#1}{%             \ifnum #2>\c@secnumdepth             \else               \protect\numberline{\csname the#1\endcsname}             \fi             #7%           }%         }%       \fi       \@xsect{#5}%     }     \renewcommand*{\l@chapter}{\@dottedtocline{0}{\bigtocskip}{0em}{1.4em}}     \ifthen{\equal{ece}{\@@dept}\or \equal{hsci}{\@@dept}}       {\renewcommand{\figurename}{Fig.}}     \renewcommand{\fnum@figure}{\figurename~\thefigure.}     \renewcommand{\fnum@table}{\tablename~\thetable}     \newboolean{@@centercaption}     \renewcommand{\caption}{%       \setboolean{@@centercaption}{true}       \refstepcounter\@captype \@dblarg{\@caption\@captype}%     }     \newcommand\bcaption{%       \setboolean{@@centercaption}{true}       \refstepcounter\@captype \@dblarg{\@caption\@captype}%     }     \long\def\@makecaption#1#2{%       \vspace*{\abovecaptionskip}       \ifthenelse{\boolean{@@centercaption}}  % center caption         {           \setlength{\@@captionwidth}{\textwidth}           \addtolength{\@@captionwidth}{-4\@@parindent}           \ifthenelse{\equal{figure}{\@captype} \or \boolean{@@figurecaptions}}             {               \sbox\@tempboxa{#1 #2}%               \renewcommand{\baselinestretch}{1.0}\reset@font               \ifdim \wd\@tempboxa >\hsize                 \centerline{\parbox[t]{\@@captionwidth}{#1 #2}}               \else                 \centerline{#1 #2}%               \fi             }             {               \renewcommand{\baselinestretch}{1.0}\reset@font               \centerline{#1}               \sbox\@tempboxa{#2}%               \ifdim \wd\@tempboxa >\hsize                 \centerline{\parbox[t]{\@@captionwidth}{#2}}               \else                 \centerline{#2}%               \fi             }           \vspace*{\belowcaptionskip}         }         {           \setlength{\topsep}{0pt}           \setlength{\parskip}{0pt}           \setlength{\partopsep}{0pt}           \begin{quote}             \renewcommand{\\}{}             \renewcommand{\baselinestretch}{1.0}\reset@font             \ifthenelse{\equal{aae}{\@@dept}}               {#1. #2\par}               {                 \ifthenelse{\equal{table}{\@captype}}                   {\hfil\strut #1\hfil\break #2\par}                   {#1 #2\par}               }           \end{quote}         }       \vskip\belowcaptionskip     }     \setlength\belowcaptionskip{5\p@}     \long\def\@makefntext#1{%       \baselineskip=12pt       \noindent       \@makefnmark #1%     }     \ifthenelse{\equal{}{\@@optionbibstyle}}       {\newcommand{\@@bibstyle}{\@@deptbibstyle}}       {\newcommand{\@@bibstyle}{\@@optionbibstyle}}     \ifthen{\equal{abbrvnat}{\@@bibstyle}}       {     \usepackage[square,sort,comma,numbers]{natbib}         \renewcommand{\bibname}{{\normalsize\rm REFERENCES}}         \bibliographystyle{abbrvnat}       }     \ifthen{\equal{agsm}{\@@bibstyle}}       {         \usepackage{harvard}         \bibliographystyle{agsm}       }     \ifthen{\equal{aip}{\@@bibstyle}}       {         \usepackage{revtex}         \renewcommand{\bibname}{{\normalsize\rm REFERENCES}}         \bibliographystyle{aip}       }     \ifthen{\equal{alpha}{\@@bibstyle}}       {\bibliographystyle{alpha}}     \ifthen{\equal{apalike}{\@@bibstyle}}       {\bibliographystyle{apalike}}     \ifthen{\equal{astron}{\@@bibstyle}}       {\bibliographystyle{astron}}     \ifthen{\equal{chicago}{\@@bibstyle}}       {     \usepackage[square,sort,comma,numbers]{natbib}         \bibliographystyle{chicago}         \bibliography{transfer}       }     \ifthen{\equal{ieee}{\@@bibstyle}}       {\bibliographystyle{ieee}}     \ifthen{\equal{ieeetr}{\@@bibstyle}}       {\bibliographystyle{ieeetr}}     \ifthen{\equal{kluwer}{\@@bibstyle}}       {         \usepackage{harvard}         \bibliographystyle{kluwer}       }     \ifthen{\equal{pumeunsrt}{\@@bibstyle}}       {\bibliographystyle{pumeunsrt}}     \ifthen{\equal{plain}{\@@bibstyle}}       {\bibliographystyle{plain}}     \ifthen{\equal{plainnat}{\@@bibstyle}}       {     \usepackage[square,sort,comma,numbers]{natbib}         \renewcommand{\bibname}{{\normalsize\rm REFERENCES}}         \bibliographystyle{plainnat}       }     \ifthen{\equal{unsrt}{\@@bibstyle}}       {\bibliographystyle{unsrt}}     \ifthen{\equal{unsrtnat}{\@@bibstyle}}       {     \usepackage[square,sort,comma,numbers]{natbib}         \renewcommand{\bibname}{{\normalsize\rm REFERENCES}}         \bibliographystyle{unsrtnat}       }          \renewenvironment{thebibliography}[1]       {      TEX FILE               \documentclass{umslthesis}     \setlength{\pdfpageheight}{\paperheight}     \setlength{\pdfpagewidth}{\paperwidth}     % set the correct origin     \setlength{\pdfvorigin}{0pt}     % Put your thesis title below.     %     \title{A Nation Divided: Assessing the Regional Effects of Institutional Capacity, Social Capital, and Civic Culture on Tax Morale in Italy}          % Put your name here.     % First one is the name you want to put on the cover.     % Second is the one you want to use in abstract.     \author{John D'Attoma}{D'Attoma, John}          % Put your Degree here.     % First is long title of degree (used on cover).     % Second is abbreviation for degree (used in abstract).     % Third is the month the degree was (will be) awarded (used on cover     % and abstract).     % Last is the year the degree was (wlll be) awarded (used on cover     % and abstract).     % The degree title for all doctoral candidates is ``Doctor of Philosophy.''     \wudegree{Doctor of Philosophy}{Ph.D.}{December}{2015}          % Put your advisor's name here.     \majorprof{Dr. Joyce Mushaben}          % List the names of the members of the committee here.     \committee{Dr. Joyce Mushaben, Chair\\Dr. Kenneth Thomas, Co-chair\\Dr. David Kimball\\Dr. Fred Cocozzelli}          % You may put your own abbreviation here.     \input{mydefs}          \begin{document}          \volume          \include{front}     \include{ch01}     \include{ch02}     \include{ch03}     \include{ch04}     \include{bib}          \end{document}          @book{Putnam:2001wa,     Author = {Putnam, Robert D},     Date-Added = {2014-06-07T03:24:23GMT},     Date-Modified = {2014-06-07T03:24:24GMT},     Isbn = {0743219031},     Language = {English},     Month = aug,     Publisher = {Simon and Schuster},     Rating = {0},     Read = {Yes},     Title = {{Bowling Alone}},     Year = {2001}}


title: LaTeX table of contents header spacing

text: Here is my issue. The code below, which I found on a pdf devoted to memoir class title pages, compiles to form this: ![enter image description here](http://i.stack.imgur.com/AQMJO.png) Unfortunately, the Table of Contents is a bit too low for my liking. I'm hoping its an easy fix to figure out the, maybe, header spacing?...Although the header isn't mentioned anywhere in the code. I was hoping to fit the ToC all on one page.               %title page environment     \newcommand*{\titleSI}{\begingroup% Sagas     \drop = 0.025\textheight     \centering     \vspace*{\drop}     {\Huge EXCERPTS}\\[\baselineskip]     {\Huge \itshape{from}}\\[\baselineskip]     {\Huge THE LETTERS OF}\\[\baselineskip]     {\Huge EARNEST A. RAYMOND}\\[\baselineskip]     {\Huge \itshape{to}}\\[\baselineskip]     {\Huge HIS CHILDREN}\\[3\baselineskip]     {\Large \textit{Arranged by} \textsc{Sarah Raymond Dean}}\\     {\Large \textit{Digitized by} \textsc{John Maxwell Dunn}}\par     \vspace*{\drop}     {\Large Written 1932 - Digitized 2014}\\[\baselineskip]     \endgroup}          \begin{document}     % Title Page     \titleSI          \tableofcontents          \chapter{Success}     ...     \end{document}


title: LaTex align and split

text: I am trying to split an equation inside the align environment, but I get an error message each time I try to add the \begin{split} ... \end{split} lines in the code below:               \begin{align} % requires amsmath; align* for no eq. number     %\begin{split}         A & = B & C & = D \\         & = E & &  = F \\         & = G & & = H \\[5mm]         I & = J & K & = L \\         & = M & &  = N \\         & = O & & = P     %\end{split}     \end{align}      The code runs perfectly as I typed it above, but as soon as I uncomment the split lines LaTex give me an error: Extra alignment tab has been changed to \cr. I am Any idea of what is not correct in this piece of code? Thanks DK


title: How to setup Vim-Latex to run only 1 instance of SumatraPDF?

text: I'm trying to setup vim-latex plugin to do default compile and view using PDF, with SumatraPDF as the default reader. Here's the configuration I made in `.vimrc`:               let g:tex_flavor='latex'     let g:Tex_DefaultTargetFormat = 'pdf'     let g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 -interaction=nonstopmode $*'     let g:Tex_ViewRule_pdf = 'SumatraPDF'      I've set the PATH variable to points to SumatraPDF installation directory. At this point, `\ll` and `\lv` worked perfectly. The only thing that bugged me is that everytime I do `\lv`, vim-latex automatically open a new instance of SumatraPDF. I use other editor like TexStudio or TeXnicCenter with no problem (view PDF only open one instance). What am I doing wrong? Is there something I have to add in the `.vimrc`? I've search everywhere with no result, but if I'm wrong, please just point me to the link.


title: how do I get Left-justified text in my bibliography?

text: Using the `natbib` package, how do I get left-justified text? Here is my preamble:               \documentclass[11pt]{report}     \usepackage{amsmath,appendix}     \usepackage{fullpage,lipsum,multirow}     \usepackage[pdftex]{graphicx}     \usepackage{natbib}     \usepackage{float,soul}     \usepackage{booktabs}     \usepackage[table]{xcolor}     \usepackage{rotating}


title: How to reinstall MiKTeX

text: I want to re-install my MiKTeX distribution on my computer. What would be the most advisable way of doing it? What is the process of uninstalling the previous version safely and installing the new one?


title: adding gnuplot capability to latex

text: I have been working with LaTeX, under TeXMaker (latest version 3.2.2) for several months, and recently added PGF/TikZ capability. On that occasion I feared there would be problems as I really have very little understanding of how the various applications hang together, or even where to find them. But no, once I found where TeXMaker resided I simply added the PGF files as a subdirectory and to my complete surprise, it all worked. Similar success was had with adding `tikz-3dplot` capability. Recently, working my way through the TikZ manual I wanted to experiment with gnuplot, and all hell broke loose. I am even unable to find what type or version of LaTeX I am working with, i.e. cannot find executables. I know I have MiKTeX 2.9 loaded as I recall pulling it off the net, but if this is the variant of LaTeX my TeXMaker is working with I cannot tell. The one thing I do find is `texmaker.exe`, everything else is turning into a complete mystery. Without a doubt I am coming across as a complete air head, but my main interest lies in mathematics, but realize I need to invest effort to make the most of LaTeX and its graphic capabilities as a tool. Could someone kindly point me to a brief and succinct overview of how the following hang together: LaTeX, TeXMaker, PGF-TikZ, gnuplot. I am working under Windows 7.


title: Justify Table by Row

text: For example, is it possible to justify the first row of a table differently from the rest? Maybe there is a way to combine two tables to look like one? MWE:               \documentclass{article}     \begin{document}          \begin{table}       \begin{tabular}{| c | c | c | c |}         \hline         & \textbf{S1} & \textbf{S2} & \textbf{S3} \\         \hline         \textbf{D1} & 4217 & 5821 & 1102 \\         \textbf{D2} & 3679 & 5089 & 991 \\         \textbf{D3} & 2589 & 3301 & 604 \\         \textbf{D4} & 1418 & 1722 & 294 \\         \hline       \end{tabular}     \end{table}          \end{document}


title: Put two pictures above one another within one sub float / reference problem

text: I was going through some crazy hoops to get minipage and subfloat work nicely (?) together, only to find out in the very end that I screwed up the figure references. I have a figure with two subfloats, one on the left one on the right. The left is composed of two graphics above one another. That last fact causes big trouble because I cannot use `\\\` or `\newline` in `subfloat` alone. So I build a `minipage` around it, but then the `subfloat` cannot _contain_ the `minipage`, so I reversed their nesting:               \documentclass[a4paper]{book}     % note: the following packages are _givens_, I cannot change them at this point     \usepackage[top=35mm, bottom=38mm, inner=40mm, outer=24mm]{geometry}     \usepackage[hang,small]{caption}     \usepackage{subfig}     \usepackage{graphicx}          \begin{document}          As shown in Fig.~\ref{fig:right}...          \begin{figure}     \centering      \begin{minipage}{0.39\textwidth}%     \includegraphics[width=1\textwidth, trim=0 0 0 -70mm]{figures/zelle148_IMG_1903m.jpg}\\[2mm]%     \includegraphics[width=1\textwidth, trim=0 -60mm 0 0]{figures/zelle148_IMG_1901m.jpg}%     \\\centering \subfloat[Left]{\hspace{0.9\textwidth}}\label{fig:left}     \end{minipage}%     \begin{minipage}{0.58\textwidth}%     \includegraphics[width=1\textwidth, trim=-2mm 0 0 0]{figures/Zelle148ScoreCut.pdf}%     \\\centering \subfloat[Right]{\hspace{1\textwidth}}\label{fig:right}     \end{minipage}%     \caption{Full caption}     \label{fig:both}     \end{figure}          \end{document}      The problem is, I get errors > Package caption Warning: \label before \caption on input line 20. > > LaTeX Warning: Reference `fig:right' on page 1 undefined on input line 9. > > LaTeX Warning: There were undefined references. The figure result looks as I want: ![enter image description here](http://i.stack.imgur.com/lE8Du.png) But the reference in the text just shows up as "??" instead of "1b".


title: Mini table of contents inside TikZ node on chapter start page

text: I need to add a fancy looking chapter start page to a book. We're using the `memoir` class and make use of `tikz` for fancy section and chapter headings. Now, I need to add a list of the sections that occur in the chapter, on the chapter's start page. I've tried using something like:               \documentclass[oneside]{memoir}     \usepackage{tikz}     \usepackage{titletoc}     \usepackage{lipsum}          \begin{document}     \tableofcontents     \chapter{A chapter}     \startcontents[chapters]     \begin{tikzpicture}[overlay]         \node[fill=blue] {\printcontents[chapters]{}{1}{}};     \end{tikzpicture}     \section{Section}     \lipsum[1]     \section{Section 2}     \lipsum     \chapter{Second chapter}     \startcontents[chapters]     \printcontents[chapters]{}{1}{}     \section{Section}     \lipsum[2]     \section{Another section}     \lipsum     \end{document}      but this doesn't seem to work well. My actual code redefines the `\chapter` command and inserts the `tikzpicture` as part of the chapter page. I'm aiming for something like this: ![The goal](http://i.stack.imgur.com/uMxCW.png) I'd appreciate a pointer as to how I can get a mini toc inside a TikZ node OR how to get access to a list of the sections that allows me to loop through them OR any other way to accomplish my goal.


title: ConTeXt SciTE tries to open sumatrapdf by default

text: I just installed SciTE and ConTeXt on windows using the directions from this website http://wiki.contextgarden.net/Windows_Installation:_ConTeXt_Suite_with_SciTe And it appears everything works but for one issue. When I press Ctrl+F12 to compile the tex file into a pdf, it complains because I don't have sumatrapdf installed. But I do have adobe's pdf viewer installed. I installed sumatrapdf and it launches sumatrapdf. I would like to get it to launch Adobe's pdf reader. Any idea how to go about doing this?


title: Short syntax for including multiple times the same pages in pdfpages

text: Using the `pdfpages` package I can do something like this to merge some pages of a document.               \includepdf[page={1,1,1,2,2,10,10,10,10},nup=1x2]{mypdf.pdf}      In this case 3 times pages 1 and 2 times page 2 and 4 times page 10 are included in the specified arrangement. Is there a better syntax for this instead of repeatedly typing in the page I want. I.e. something like `{*{3}{1},*{2}{2},*{4}{10}}`? I tried to use the Repeat command from this anwer: http://tex.stackexchange.com/a/16192/4011 like this:               \documentclass[a4paper]{article}     \usepackage{pdfpages}               \usepackage{expl3}     \ExplSyntaxOn     \cs_new_eq:NN \Repeat \prg_replicate:nn     \ExplSyntaxOff     \makeatletter               \begin{document}          \includepdf[page={\Repeat{3}{1,}2},nup=1x2]{mypdf}          \end{document}      But it endet up with `ERROR: Package pdfpages Error: Cannot find file`1,1,1,2'` I guess this is an expansion problem.


title: Different line spacings for main text and footnotes in beamer

text: In my `beamer` presentation, I want   * the main text to have a line spacing of 1.5,   * footnotes to have a line spacing of 1, both _within_ them and _between_ two consecutive footnotes. Inserting `\linespread{1.5}` in the document's scope results in a line spacing of 1.5 in _both_ main text and footnotes, which is undesirable. I know that, generally, the preferred way of achieving the desired output is to load the `setspace` package and insert `\setstretch{1.5}` somewhere in the document's scope, but loading `setspace` seems to break `beamer`'s `\footnote`. For instance, the following MWE does not produce any footnote:               \documentclass{beamer}          \usepackage{setspace}          \begin{document}     \begin{frame}     foo\footnote{bar}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/YmFEh.png) A workaround is to entirely eschew the `setspace` package and use `\linespread` to locally change the line spacing in footnotes, like so:               \documentclass{beamer}          \usepackage{lipsum}          \let\oldfootnote\footnote     \renewcommand\footnote[2][]{{\linespread{1}\oldfootnote[#1]{#2}}}     \linespread{1.5}          \begin{document}     \begin{frame}     foo\footnote{\lipsum[2]}\\     bar\footnote{sdfsdf}     \end{frame}     \end{document}      which produces the desired line spacing (1) _within_ footnotes, but not _between_ them: ![enter image description here](http://i.stack.imgur.com/3bXCC.png) What should I do to produce the desired output?


title: How do I import a source file using minted

text: Currently, I have something like this:               \begin{minted}{csharp}     public static void Main (string[] args)     {       Console.WriteLine ("Hello World!");     }     \end{minted}      Where the source code is copy/pasted from a source file. Is there any way to include the full file within the `minted` section? That way, when my code changes, my PDF will automatically update.


title: Style used for Knuth's "The Art of Computer Programming"

text: > **Possible Duplicate:**   >  Typesetting algorithms in LaTeX like Knuth Does anyone know if there is a style that mimics Knuth's _The Art of Computer Programming_? Baring that, would anyone know how to customize the memoir class to get an analogous result?


title: Layout of Knuth's "The Art of Computer Programming" in LaTeX

text: Just for fun, I want to write something in the same layout as _The Art of Computer Programming_ by D.E. Knuth. Does anybody know how to get this layout with LaTeX? **[EDIT]** I am interested in the full layout, not only the style of the algorithms. Is there a way to use the layout with LaTeX ( _not TeX_ )? Going through `taocpmac.tex` looks a little bit complicated.


title: Bst file compatible with arxiv, kp.bst like

text: I want to have the following features in my bibliography :   * To display something like : `arxiv:refnumb` with a link to the actual article in a browser, working for both old and new identifiers   * Together with others things as numerical numbering and other cosmetic preferences I can create a bst file with the wonderful website http://www.podoblaz.net/cml/ and I can obtain exactly what I want to have the features of the second point of the list, but the arxiv stuff is not displayed as I would like. On another hand, there is the kp.bst style that do exactly what I want for linking to arxiv articles, except that it doesn't support all the identifiers and also it is quite ugly in my opinion. How can I proceed ? I tried to change the bst files to get what I want but it doesn't work and I don't really understand how it works.


title: Dot notation for derivative of a vector

text: If I want to use the dot notation for the time derivative of a vector is better (more common) to put the dot over the vector, or the other way around   1. `\dot{\vec{v}}` ![dot over vec](http://i.stack.imgur.com/j9ikL.png)   2. `\vec{\dot{v}}` ![vec over dot](http://i.stack.imgur.com/iSZXH.png) The first says the rate of change of the vector components, and the second says a vector made from the component rates.


title: biblatex-chicago & origdate

text: I have two entries by the same author, the second of which contains an origdate field with a range of years. If I print only the second entry, the date is fine: 1754--1755. But if I print both entries, the date has a stray period: 1754--. 1755. Here's a MWE.               \documentclass[12pt]{article}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @Book{crusius1749,       author       = {Christian August Crusius},       title        = {Anleitung {\"u}ber nat{\"u}rliche Begebenheiten ordentlich                       und vorsichtig nachzudencken},       publisher    = {Gleditsch},       year         = 1749,       address      = {Leipzig}     }          @Book{crusius1754,       author       = {Christian August Crusius},       title        = {Gr{\"u}ndliche Belehrung vom Aberglauben zur Aufkl{\"a}rung                       des Unterschiedes zwischen Religion und Aberglauben},       publisher    = {Langenheim},       year         = 1767,       address      = {Leipzig},       translator   = {Christian Friedrich Pezold},       options      = {cmsdate=on},       origdate     = {1754/1755}     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     \cite{crusius1749}     \cite{crusius1754}     \printbibliography     \end{document}      Comment out the first \cite to see the correct form of the second entry. Is this a bug, or am I doing something wrong?


title: tikz matrix : centering cells

text: I have what's below and I do not know why the term m_{n+1,k} is not horizontally centered in its cell?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{matrix,positioning}     \begin{document}     \begin{tikzpicture}[baseline=(current  bounding  box.center)]     \tikzset{square matrix/.style={outer sep=-6pt,matrix of nodes,     nodes={draw,     minimum height=0.7cm,     anchor=center,     text width=0.7cm,     align=center,     outer sep=-6pt}}}     \matrix(mymatrix)[square matrix,left delimiter={[},right delimiter={]}]{     1 & 0\\     0 & $-m_{n+1,k}$\\};     \end{tikzpicture}     \end{document}


title: APA6 Class - Single-spaced Tables for Manuscript

text: I'm trying to produce a manuscript for submission. I have tables that are fairly long and need to be single spaced. The `apa6` class is double-spacing the entire document including the tables. I need double-spaced body text and single-spaced tables. My previous version of the document, before I tried `apa6`, invoked the `endfloat` package and the spacing was what I needed. As an aside, the `apa6` manual suggests tables can be either single or double spaced. Can I request this format from the class?


title: pagenumbering{Roman} doesn't work

text: I have a document I want to number in uppercase-Roman letters only. If I add `\pagenumbering{Roman}` to the document, I get the error message                "Missing number, treated as zero",      and the page numbering is omitted. I've tried different pagestyles, but I have the same problem for all of them. I've also followed Uppercase pagenumbering (roman) using \frontmatter, but that also didn't solve my problem. My minimal example:               \documentclass[a4paper,10pt]{article}          \usepackage[utf8x]{inputenc}          \usepackage[english]{babel}          \begin{document}          \pagenumbering{Latin}          \setcounter{page}{1}            Text!          \end{document}      I'd be grateful for any help.


title: What is the font size of the references section in the amsart class?

text: Does anyone happen to know what the default fontsize of the references section in the `amsart` class is?


title: Load package after other package with \AfterPackage

text: I want to group packages together (in the real document, I load many more packages) and want to solve the sorting of the packages with commands like `\AfterPackage` from KOMA-Script. I am using this solution to load the package `cleveref` after the package `hyperref`:               \documentclass{scrbook}     \usepackage{varioref} % before cleveref     \AfterPackage{hyperref}{\usepackage{cleveref}}     \usepackage{hyperref}          \begin{document}     \tableofcontents\chapter{test}     \subsection{variable references using vref}     \label{sec:references:vref}     \newpage     Some text which contains a vref reference     to section \vref{sec:references:vref}.     \end{document}      However the reference is never found. If I load `cleveref` instead hard coded after `hyperref`               \usepackage{varioref} % before cleveref     %\AfterPackage{hyperref}{\usepackage{cleveref}}     \usepackage{hyperref}     \usepackage{cleveref}      everything works as expected. Why is `\AfterPackage` not doing what I expect it to do?


title: Bibtex files not found in Miktex texify

text: I want to run texify (the combination of pdfLaTeX+MakeIndex+BibTeX) in the command line, so I can add my own options and don't have to open texworks. To clean up my directory I tried to move the aux-files to a subfolder using `\--tex-option="--aux-directory=tmp"`. The options works as intended, but the .bbl file is not created and the bibliography stays empty. I tried to include the temp files with `-I tmp` and `\--include- directory=tmp`, but it doesn't help. My complete statement is currently this:               texify --pdf -I tmp --tex-option="--aux-directory=tmp --include-directory=tmp" document.tex      If I remove all the directory options, bibtex works as expected and the .bbl file is created.


title: Book Review in biblatex

text: I am using `biblatex` for my thesis. I have to create some entries for book reviews. But as I know, `biblatex` doesnt provide an entry type specifically for reviews as standard type. It seems that I have to put the reviews in the type `article`. However, one would expect more functionalities than the normal `article`. Like the link http://www.springerlink.com/content/j84v764gq0h1n826/ shows, the informations of a reviewed work should actually contain complete formatting: title in italic etc. But the `article` provides only one formatting for its `title` which seems to contain the informations of reviewed works. Is there a cleverer method for inputting the book reviews than just input them all manually in `article`?


title: How to make space recognized in .bib filename when setting bibliography?

text: I have a .bib file called "A B C.bib" which is assigned to "A B C.tex". When I run .tex file and then .bib file I get the following error:                White space in argument---line 18 of file A B C.aux      : \bibdata{'A      :             B C'}     I'm skipping whatever remains of this command


title: How to minimize the ink-to-data ratio for pgfplots

text: Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the Economist and on the right my attempt). ![enter image description here](http://i.stack.imgur.com/06iEP.png) ![enter image description here](http://i.stack.imgur.com/8YTr5.png) Here is the code:               \documentclass[justified]{tufte-book}     \usepackage{pgfplots,lipsum}     \pgfplotsset{compat=newest}     \begin{document}     \section{Bar Charts}          \lipsum[1-2]\vfill           \begin{figure*}[htbp]           \fbox{      \begin{tikzpicture}       \centering       \begin{axis}[             ybar,               title={Cumulative Progress of Works},             height=8cm,             width=15.5cm,             bar width=0.4cm,             ymajorgrids, tick align=inside,             enlarge  y limits={value=.2,auto}, % see the upper              ymin=0,             ymax=100,             axis x line=bottom,              axis y line=right,             %enlarge x limits =e,             legend style={at={(0.5,-0.2)},             anchor=north,legend columns=-1},             ylabel={Percentage (\%)},             symbolic x coords={                Sep-11,Oct-11,Nov-11,Dec-11,                Jan-12,Feb-12,                Mar-12,               Apr-12},            xtick=data,            nodes near coords,            every node near coord/.append style={             anchor=mid west,             rotate=70           }         ]         \addplot coordinates {           (Sep-11,75.4064)           (Oct-11, 72.7961)            (Nov-11,94.4597)           (Dec-11,66.6786)            (Jan-12,67.5600)            (Feb-12,88.2339)           (Mar-12,78.6138)            (Apr-12,58.9129) };        \addplot coordinates {           (Sep-11,75.4064)           (Oct-11, 89.7961)            (Nov-11,94.4597)           (Dec-11,76.6786)            (Jan-12,77.5600)            (Feb-12,78.2339)           (Mar-12,88.6138)            (Apr-12,78.9129) };        \addplot coordinates {           (Sep-11,75.4064)           (Oct-11, 89.7961)            (Nov-11,94.4597)           (Dec-11,76.6786)            (Jan-12,77.5600)            (Feb-12,78.2339)           (Mar-12,88.6138)            (Apr-12,78.9129) };              \legend{First Fix,Second Fix,Third Fix}       \end{axis}       \end{tikzpicture}     }          \caption{\protect\raggedright Cumulative progress for all MEP works. Notice the slower rate of production during the last three months.}     \end{figure*}          \lipsum[1-3]     \end{document}      I have moved the y-axis to the right, but cannot get rid of the axis line. The plot is also not fitting within the plot width, despite using `\enlarge`. **Edit** And thanks to Jake the ugly duckling has been transformed to the following, with minor variations to the code as suggested by Jake. I have only added a stronger color for one of the bars in order to highlight it: ![enter image description here](http://i.stack.imgur.com/sx5nX.png)


title: ! Bad space factor (0)

text: When trying to compile my `.tex` file using the `latexmk -latex=xelatex` command, I receive the following error:               ! Bad space factor (0).     <recently read> \@savsf           l.39 \end{seriate}          ?       Then, if I press return, the compilation process resumes with no apparent negative outcome. The output is just correct. I don't see why I get this, but the error doesn't let me streamline the compilation process. MWE:               \documentclass[english,man]{apa6}       \usepackage[american]{babel}       \usepackage{csquotes}       \usepackage[style=apa,sortcites=true,sorting=nyt,natbib=true,backend=biber]{biblatex}       \DeclareLanguageMapping{american}{american-apa}       \usepackage{graphics}       \usepackage{fontspec}       \setmainfont[Ligatures=TeX]{Times New Roman}       \setsansfont[Ligatures=TeX]{Times New Roman}       \setmonofont{Times New Roman}               \begin{document}          \begin{seriate}       \item a scientific experiment,        \item the presence of an       \end{seriate}          \end{document}


title: How to manually equalize columns in an IEEE paper

text: I have the same problem as described in: https://stackoverflow.com/questions/2149854/how-to-manually-equalize-columns- in-an-ieee-paper-if-using-bibtex however, the solutions given (using the flushend or balance packages) do not work for me because I have a footnote on the last page, and when using either of those packages the footnote is moved to the top of the second column


title: How to set a background color for a listing?

text: ![enter image description here](http://i.stack.imgur.com/LxAdB.png) Someone who knows how to fill with color only the box?               \begin{shaded}      \begin{lstlisting}          if (a < b)      {         printf("A is smaller than  B!\n");      }      a = b;          \end{lstlisting}     \end{shaded}


title: How can I do a simple TikZ picture of the golden ratio?

text: I want to make a short article explaining the origin of the Golden Number (1+sqrt(5))/2 and I need to draw a very simple segment like the picture I've uploaded. Any suggestions? ![Golden Ratio](http://i.stack.imgur.com/Mrois.jpg)


title: How can I make RHEL server libraries compatible with tex/Rnw documents created on my Ubuntu desktop, re: pgf, tikz, expl3

text: I want to compile tex and Sweave documents written on a server that is redhat, but I get errors linked to pgf/tikz. The documents compile fine on my I have already   1. used wget to download the expl3 package to ~/texmf on the server and   2. removed todonotes options since these caused an error   3. rsync'd (copied) all of /usr/share/texmf-texlive/tex from my desktop to ~/texmf/tex on the server.    4. texhash on the server (although I can only do this for my home ~/texmf However, now I am getting an error related to the pgf library:               (/home/a-m/dlebauer/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex     ! Undefined control sequence.     l.15 \usepgflibrary                         {plothandlers}      I tried changing usepgflibrary to usetikzlibary as suggested on help list, but I just got the same error for the different command. Furthermore, I'd like to tell my the server administrator how to solve this rather than just say "can you please configure the server so that pdflatex foo.tex works" so that I can save him some googling.


title: What are expl3 quarks? When, where, why and how should I use them?

text: I feel particularly bombarded by sub-atomic particles right now (and it's mostly Will's fault `:)`). First, in Will's answer to this question today, he referred to `expl3`'s `\prg_case_str:nnn` command. Digging into the package, I noticed the command involves an interestingly named macro called `\quark_if_recursion_tail_stop_do:nn`. All I can gather from the `expl3` documentation about things with the word (particle`;)`) `quark` in their name is that: > **l3quark** A ‘quark’ is a command that is defined to expand to itself! > Therefore they must never be expanded as this will generate infinite > recursion; they do however have many uses, e.g. as special markers and > delimiters within code. Hmmm. Coincidentally, Will and Kevin's new `hardwrap` package was released on CTAN today (many congrats guys!). Digging into the documented code, I notice: > `\hw@scanstop` > > This is a ‘quark’ from expl3 designed to delimit scanning; it will never be > executed, else an infinite loop results. > > `\protected\def\hw@scanstop{\hw@scanstop}` Reading the remainder of `hardwrap`'s code, yes, `\hw@scanstop` is used in exactly the way described in the definition of **l3quark** , above. Still, I'm perplexed. What's so special about self-referencing tokens as opposed to any other token assigned a special-purpose name, i.e., any other vanilla signifier, whether a command sequence or not? Are they self- referencing only for error-catching purposes? If LaTeX quarks do have interesting properties beyond just being specially defined and used signifiers, where, when, how and why should I best employ them? Are they _really_ `expl3` specific, or is it more a convention that has been adopted into the LaTeX3 programming patterns set? Finally, out of interest (in the spirit of Yiannis's recent question about Lisp `car` and `cdr` "relics" in TeX's lexicon), what's the story about how the word `quark` found its way into LaTeX3 vocabulary? (Please tell me that `LaTeX3` quarks aren't envisioned to possess color, flavor, etc. properties!)


title: How can you change what \frame{\sectionpage} does in beamer?

text: I am using `beamer` to make a presentation. I would like to have a page after I start a new section with only the section title on it. When I use the command               \frame{\sectionpage}      I end up getting a page saying "Section 1" and then "the section title". I would however like to only have "the section title" and remove "Section 1". How can I do this?


title: How to create a keybutton in latex?

text: > **Possible Duplicate:**   >  Keyboard Font for LaTeX So the result looks like: > Press `F5` for help. I've checked the fancybox package, but it only includes three patterns: doublebox, ovalbox, shadowbox. I need something like buttonbox.


title: Create boxes to indicate keyboard keys

text: > **Possible Duplicate:**   >  Keyboard Font for LaTeX How would I create boxes around keyboard keys, similar to `Ctrl`?   I'm using TexMaker on Windows, but have got Linux (Ubuntu) based alternatives available, and need it for program documentation. e.g. `keyboard short cuts based upon common standards (i.e. Ctrl + S to save data).`


title: Typesetting <Esc> key

text: I am trying to typeset the `ESC` key. I tried `\frame{Esc}` and `$\boxed{\mathrm{Esc}}$` and I get ![enter image description here](http://i.stack.imgur.com/ch7Hg.gif) They don't look beautiful. How else can I typeset the Esc key?


title: How can I visualize key press combinations?

text: > **Possible Duplicate:**   >  Keyboard Font for LaTeX One of my favorite Wiki-Sites (ubuntuusers.de) allows the editors to add key combinations.               [[Template(Keys, Strg+T)]]     [[Template(Keys, Strg+Shift+Tab)]]     [[Template(Keys, Strg+lmt)]] (for left mouse)      Rendered example: ![enter image description here](http://i.stack.imgur.com/gZtdr.png) Can I make something similar in LaTeX? Is there a package that also has the "Windows Key"?


title: Refreshing the LaTeX Database

text: I want to change font of my document to _Verdana_. For this I need to refresh the LaTeX database. How is this done?   * I'm using the following distribution: **Unknown**   * I'm using the engine: **Unknown**


title: How to line break a siunitx unit

text: I made a new command for this unit:               \SI{#1(#3)e#2}{\KBE\per\gram\of{FM}}      But it is so bulky and it seems that latex can t handle the "normal" linebreak. So, my new UNIT is sometimes over the normal text width on the right margin Is there an `siunitx` option to handle this, or any other solution?


title: Chapter Roman in tableofcontents

text: I try to change number of chapter to CHAPTER I,II,III in contents and it is done. ![enter image description here](http://i.stack.imgur.com/J11w9.png)               \documentclass{report}     \usepackage{tocloft}          \addtocontents{toc}{~\hfill{\small Page}\par}     \AtBeginDocument{% \renewcommand\contentsname{CONTENTS} }          % Centered title for ToC     \renewcommand{\cfttoctitlefont}{\hfill\Huge\bfseries}     \renewcommand{\cftaftertoctitle}{\hfill}          % Leaders for chapter entries     \renewcommand\cftchapdotsep{\cftdotsep}          % Add space to account for new chapter numbering schema     \renewcommand\cftchapnumwidth{8em}     \renewcommand\cftsecindent{3em}          % Redefine representation for chapter (and section) counters     \renewcommand\thechapter{CHAPTER \Roman{chapter}}     \renewcommand\thesection{\arabic{chapter}.\arabic{section}}          \begin{document}          \pagenumbering{roman}     \setcounter{page}{7}     \tableofcontents     \clearpage          \pagenumbering{arabic}          \chapter{INTRODUCTION}     \section{Background}     \section{Objectives}     \chapter{REVIEW}     \section{Test Section}     \section{AnotherTest Section}     \chapter{CODE}     \chapter{END}          \chapter*{APPENDIX}     \addcontentsline{toc}{chapter}{APPENDIX}     \end{document}      But for mainmatter, I want to create to have an output like this ![enter image description here](http://i.stack.imgur.com/dNwDp.png) Help me please.


title: automatically insert data in a complex table

text: I have a relatively complex table that looks like this: ![enter image description here](http://i.stack.imgur.com/srS4l.jpg) The same table structure is going to be repeated so many times. I already have the tables in MS Word. My question is if there is an easy method to fill the data in the table code? Here's the code:               \documentclass[12pt]{report}          \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{multirow}          %This will change the font for all the tables in the document.     \makeatletter     \g@addto@macro{\table[ht]}{\fontsize{9pt}{10.8pt}\selectfont}     \makeatother          \begin{document}     \begin{table}[ht]     \newcolumntype{Z}{>{\centering\arraybackslash}m{4.11in}}     \newcolumntype{Y}{>{\centering\arraybackslash\columncolor{Gainsboro}}c}     \renewcommand*{\arraystretch}{1.2}     \centering     \caption{Experiences in practical Physics work}       \begin{tabular}{|c|Y|c|c|c|c|c|c|}         \hline                    &            & \multicolumn{3}{c}{\emph{\textbf{\%}}} & \multicolumn{3}{|c|}{\emph{\textbf{Comparisons}}}  \\         \hline  \rowcolor{Gainsboro}  {\textbf{Group}}& {\textbf{N}} & \textbf{positive} & \textbf{neutral} & \textbf{negative} & \textbf{$\chi^2$} & \textbf{df} & \textbf{p} \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (a)}} & \multicolumn{7}{Z|}{I prefer to have written instructions for experiments}  \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 73         & 7          & 20         & \multirow{2}{*}{0.9} & \multirow{2}{*}{4} & \multirow{2}{*}{ns} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 70         & 8          & 22         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (b)}} & \multicolumn{7}{Z|}{Practical work helps my understanding of Physics topics}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 34         & 11         & 55         & \multirow{2}{*}{3.9} & \multirow{2}{*}{4} & \multirow{2}{*}{ns} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 38         & 7          & 55         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (c)}} & \multicolumn{7}{Z|}{Discussions in the laboratory enhance my understanding of the subject}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 70         & 8          & 22         & \multirow{2}{*}{2.4} & \multirow{2}{*}{4} & \multirow{2}{*}{ns} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 65         & 10         & 25         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (d)}} & \multicolumn{7}{Z|}{I felt confident in carrying out the experiments in Physics}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 52         & 12         & 36         & \multirow{2}{*}{13.7} & \multirow{2}{*}{4} & \multirow{2}{*}{< 0.05} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 44         & 15         & 41         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (e)}} & \multicolumn{7}{Z|}{The experimental procedure was clearly explained in the instructions given}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 31         & 14         & 55         & \multirow{2}{*}{14.8} & \multirow{2}{*}{4} & \multirow{2}{*}{< 0.01} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 46         & 11         & 43         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (f)}} & \multicolumn{7}{Z|}{I was so confused in the laboratory that I ended up following the instructions without understanding what I was doing}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 63         & 12         & 25         & \multirow{2}{*}{1.1} & \multirow{2}{*}{4} & \multirow{2}{*}{ns} \\         \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 65         & 9          & 26         &            &            &  \\         \hline         \rowcolor{Gainsboro}{\emph{Q1 (g)}} & \multicolumn{7}{Z|}{There was good linkage between experiments and the relevant theory}                   \\         \hline         \cellcolor{PowderBlue}\emph{University group} & {150} & 36         & 15         & 49         & \multirow{2}{*}{94.4} & \multirow{2}{*}{4} & \multirow{2}{*}{<0.001} \\        \cline{1-5}         \cellcolor{YellowGreen}\emph{School group} & {150} & 68         & 11         & 21         &            &            &  \\         \hline         \end{tabular}     \label{ch7:tab:experiencesinpracticalphysics}     \end{table}          \end{document}      I know that I shouldn't be asking two questions but this one is small: How do I make an individual cell transparent? Edit: I made it MWE and here's another table with the same structure but different data: ![enter image description here](http://i.stack.imgur.com/RQ7UU.jpg)


title: Workflow diagram

text: I would like to make a workflow diagram like this: ![enter image description here](http://i.stack.imgur.com/5V7uJ.png) I found TikZ, but the sequence diagram example seems a bit obscure…


title: How to customize the number of one frame on beamer

text: How to set a number of one frame on beamer, please? I've tried this : > \setcounter{page}{19} But it wouldn't work. Any brilliant idea, please? Thanks a lot!


title: Making integrals look prettier with negative spacing for publication

text: How should I write definite integrals for publication? Examples: ![enter image description here](http://i.stack.imgur.com/afVta.png) or ![enter image description here](http://i.stack.imgur.com/eUNOt.png) or ![enter image description here](http://i.stack.imgur.com/Fw2kw.png) I am not sure about how to write the limits correctly. **How should I write definite integrals for publication?**


title: putting 2 f beside each other makes a space on pdf file

text: In any words when 2 _f_ are beside each other (like different), on pdf file it makes a space between those _fs_ specially inside equations. Any idea please? like: _diffusion_ , i get _dif fusion_


title: Multiple \cline{x-y} in align environment for subtracting equations

text: I'm trying to make a solution sheet for a student of mine and want to write it in a similar way as I would do when writing per hand. In this case I wanted to have 4 columns of equations (I know that in reality there are 14 columns in the align environment). My code looks like this: * * *               \begin{alignat*}{14}          12a     &+ 4b       &&+ c   &&={}& -3   &\qquad&    12a     &+ 2b   &&={}& 0    &\\         -27a    &- 6b   &&- c       &&={}& 0    &\qquad&    -15a    &- 2b   &&={}& -3   &\\[-1.2em]         \cline{1-7} \\[-2.5em]         -15a    &- 2b   &&          &&={}& -3   &\qquad&    -3a     &       &&={}& -3   &\\                 &       &&          &&{}&       &\qquad&            &       &a&={}& -1  &     \end{alignat*}      ![result without second cline](http://i.stack.imgur.com/Fwn7x.jpg) * * *               \begin{alignat*}{14}          12a     &+ 4b       &&+ c   &&={}& -3   &\qquad&    12a     &+ 2b   &&={}& 0    &\\         -27a    &- 6b   &&- c       &&={}& 0    &\qquad&    -15a    &- 2b   &&={}& -3   &\\[-1.2em]         \cline{1-7} \cline{9-13}\\[-2.5em]         -15a    &- 2b   &&          &&={}& -3   &\qquad&    -3a     &       &&={}& -3   &\\                 &       &&          &&{}&       &\qquad&            &       &a&={}& -1  &     \end{alignat*}      ![result with second cline](http://i.stack.imgur.com/CbOGn.jpg) * * * I want to have `\cline{1-7} \cline{9-13}` without a line break, I want them to be in the same line. Is that possible with align or alignat? Furthermore I tried to make a tikz-arrow in a soft S-shape from the end of the last line in column #1 to the start of the second line of column #2, but failed. So if you are skilled with that kind of thing, I'd really appreciate your help! =)


title: How to stop a block of code from being parsed?

text: I would like to pass some latex code to lua directly without it being parsed:               \directlua{         PrintPrettyLatexCode("LATEX CODE GOES HERE!")     }      BUT latex tries to parse the "LATEX CODE GOES HERE!". I want it to all be treated purely as a string so that the PrintPrettyLatexCode function see's it as a string. Slashes will need to be double slashed though. I think all that is needed is to parse the code block and make all slashes double before latex parses it(that way macros like `\mymacro` end up becoming `\\\mymacro` and I think latex will then not try to expand it) Maybe something like               \directlua{         PrintPrettyLatexCode(\MakeDoubleSlashes{"LATEX CODE GOES HERE!"})     }      will work if `\MakeDoubleSlashes` exist?


title: algorithm with partial borders/frames

text: I use the `algorithm` float environment for pseudocode and want some algorithms to span two pages. That works fine with `\algstore` and `\algrestore`. However, I would like to omit these borders at the end of the first part of the algorithm and at the top of the continuing part. Is there a way to remove them while keeping the remaining border lines? What I have is something like:               \documentclass{article}     \usepackage{algorithm}     \usepackage{algcompatible}          \newcommand{\algoallowbreak}{\algstore{myalg}\end{algorithmic}\end{algorithm}         \begin{algorithm}         \begin{algorithmic}\algrestore{myalg}     }          \begin{document}          \begin{algorithm}[h]     \caption{Algorithm 1}     \begin{algorithmic}[1]         \State $a \gets b$         \State some other code          \algoallowbreak              \State some code that could possibly be wrap onto the next side     \end{algorithmic}     \end{algorithm}          \end{document}      And I want to remove the both border lines between algorithm line 2 and 3. ![enter image description here](http://i.stack.imgur.com/iZXo9.jpg)


title: Vertical space and its size

text: I don't know if somebody has already asked, but: how should I do a vertical space of a size of a half/quarter of page?


title: How to get a correct README when using a dtx file

text: I use Joseph Wright's model dtx file. Unfortunately, when using it, the generated README.txt file contains parts of the package code, which is of course unwanted. The rather long minimal example is appended at the end. The important part regarding my question is quite on the top, where only "Text" should end up in the README.txt to my understanding:               %<*readme>     Text     %</readme>      Instead, the README.txt looks like               Text     \endbatchfile     \def\shouldNotBeInReadme{really}      Why is that? What did I do wrong?               % \iffalse meta-comment     %<*internal>     \iffalse     %</internal>     %<*readme>     Text     %</readme>     %<readme>\endbatchfile     %<*internal>     \fi     \def\nameofplainTeX{plain}     \ifx\fmtname\nameofplainTeX\else     \expandafter\begingroup     \fi     %</internal>     %<*install>     \input docstrip.tex     \keepsilent     \askforoverwritefalse     \preamble     Preamble     \endpreamble     \postamble     Postamble     \endpostamble     \usedir{tex/latex/tikzscale}     \generate{     \file{\jobname.sty}{\from{\jobname.dtx}{package}}     }     %</install>     %<install>\endbatchfile     %<*internal>     \usedir{source/latex/tikzscale}     \generate{     \file{\jobname.ins}{\from{\jobname.dtx}{install}}     }     \nopreamble\nopostamble     \usedir{doc/latex/tikzscale}     \generate{     \file{README.txt}{\from{\jobname.dtx}{readme}}     }     \ifx\fmtname\nameofplainTeX     \expandafter\endbatchfile     \else     \expandafter\endgroup     \fi     %</internal>     %<*package>     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{tikzscale}[2012/09/10 v0.1 tikzscale LaTeX package]     %</package>     %<*driver>     \documentclass{ltxdoc}     \EnableCrossrefs     \CodelineIndex     \RecordChanges     \begin{document}     \DocInput{\jobname.dtx}     \end{document}     %</driver>     % \fi     %     %\GetFileInfo{\jobname.sty}     %     %\title{Title}     %\author{Author}     %\date{Released \filedate}     %     %\maketitle     %     %\changes{v0.1}{2012/09/10}{First public release}     %     % Text     \def\shouldNotBeInReadme{really}     %     %     %\StopEventually{^^A     %  \PrintChanges     %^^A  \PrintIndex     %}     %     %\Finale


title: How can I make the size of the PDF equal to the of the chessboard?

text: I have this piece of LaTeX:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}     % Source: http://tex.stackexchange.com/a/15278/5645          \usepackage{chessboard}     \storechessboardstyle{4x4}{maxfield=d4}          \begin{document}     \begin{preview}          % showmover shows which player is to move     \chessboard[style=4x4,setwhite={Qa1,Qd2},showmover=false]          \end{preview}     \end{document}      And I compile using pdflatex. But the PDF document is too wide (just mark the image to see its width) ![chess board - too wide](http://i.stack.imgur.com/0MWTK.png) **How can I make the width of the PDF equal to the of the chessboard?**


title: Strikeout in different color appears behind letters, not on top of them

text: When using package `ulem`'s strikeout facilities (macro `\sout`) and also color in my text, the strikethrough appears _behind_ the letter string:               \documentclass{article} % I also often work with the memoir package (in case this matters for the range of possible fixes)     \usepackage[normalem]{ulem} % option normalem not needed for example but often loaded by me (mentioned for the unlikely case it matters for the fix)     \usepackage{color}          \begin{document}     Hello \textcolor{red}{\sout{\textcolor{black}{Welt }}}World!     \end{document}      (If I specify a different color combination, like green or magenta for the text, the effect persists - I just didn't want the compiled example to look ugly or unrealistic.) How can I have strikethrough in a color different from the text appear _on top of_ the text?


title: How can I reproduce this beautiful table of contents?

text: I stumbled upon this TOC today: ![The sample TOC](http://i.stack.imgur.com/VNTZx.jpg) I really like its structure and simplicity. The page numbers are right behind the entries, and not unnecessarily remote as they often are. The separation between chapter numbering on the left and titles on the right clearly sets the two apart. I would like to reproduce this design for a book, but have no idea where to start. Can you show me how to reproduce this? **Bonus**   Do you have any idea how this could be extended to also list sections, and remove the authors?


title: How to make tex appear in the middle of a line in Lyx?

text: When I write, for example, in Math.SE and I want some equation to appear in the middle of the line I just use > $$ instead of just one dollar sign. How can I do something similir in Lyx ? doing something like ctrl+M twice didn't work.


title: Tikzpicture highlight on matrix in different slides

text: I am new to latex but I have to make a presentation in university with it (or more I want to do the presentation in LaTeX). But I am struggling with the package `tikz`.   1. So my first question is regarding the on statement which can not handle something like `<1-3, 5-6>`, which is possible like in only statements. Is there a work around?   2. Second question is about the highlight style is it possible to set different styles on different slides like highlight text on=`<1-3>` and something else, text on=`<5-6>`? Here is my MWE:               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{overlay-beamer-styles, matrix}     \begin{document}     \begin{frame}     \begin{tikzpicture}[       background default text=black,       highlight/.style={         background text=blue,         },       ]     \matrix [matrix of nodes, ampersand replacement=\&]{     |[highlight, text on=<1->]| . \& |[highlight, text on=<2->]| X \\     . \&  X\\     };     \end{tikzpicture}     \end{frame}     \end{document}


title: How to transpose or mirror xymatrix?

text: I know that it is possible to rotate `\xymatrix` (using e.g. `\xymatrix@d`) but how to transpose or mirror it?


title: List elements without indentation

text: I am using the `enumitem` package to tweak the `enumerate` environment. I would like to have all the items in different levels aligned in the left margin. I tried with different parameters of the package unsuccesfully. I also need to align the sentences in the items.               a.     iten1     b.     item2     b.1.   item3     c.     item 4      Any suggestion?


title: LuaLaTeX AMS-Typesetting bug with sum\limits under sqrt

text: it looks as if there is a bug in math-typeseeting with `lualatex` using `ams`. An minimum example showing this is               \documentclass[12pt]{report}     \usepackage{amsmath}          \begin{document}          This looks OK, but uses the "wrong" non-AMS-environment eqnarray          \begin{eqnarray}       \label{eq:1}       s&=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}     \end{eqnarray}          This is no not OK and using the equation-environment     \begin{equation}       \label{eq:1}       s=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}     \end{equation}          And again with align     \begin{align}       \label{eq:1}       s&=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}     \end{align}          \end{document}          %%% Local Variables:      %%% mode: latex     %%% TeX-engine: luatex     %%% coding: utf-8     %%% TeX-PDF-mode: t     %%% End:       The last (`%%%%-preceded`) lines are for emacs to call `lualatex -shell-escape filename` and generate pdf-output, which ia OK, in the `eqnarray`-case (but ugly, non-AMS-Style) and in the latter two cases weared things happen: There is one line with the square-root with a big black block underneath and the somewhot lower the rest of the formular. This is totally messed up. Can someone help on this, I still hope it's my fault and not TeX's (btw: it works OK with "old" `latex -> dvi -> ps` or `pdf` workflow. Versioning and output of Latex is Running LaTeX on `min_ex` with `lualatex -shell-escape -interaction=nonstopmode min_ex.tex`:               This is LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9)       \write18 enabled.          (c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.tex     LaTeX2e <2011/06/27>     LuaTeX adaptation of babel <v3.8m-luatex-1.5> and hyphenation patterns for english, loaded.     ("C:/Program Files/MiKTeX 2.9/tex/latex/base/report.cls"     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     ("C:/Program Files/MiKTeX 2.9/tex/latex/base/size12.clo"))     ("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsmath.sty"     For additional information on amsmath, use the `?' option.     ("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amstext.sty"     ("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsgen.sty"))     ("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsbsy.sty")     ("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsopn.sty"))     (c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.aux          LaTeX Warning: Label `eq:1' multiply defined.               LaTeX Warning: Label `eq:1' multiply defined.          ) [1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]     (c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.aux)          LaTeX Warning: There were multiply-defined labels.           )      336 words of node memory still in use:         nodes     avail lists: 2:12,3:29,4:152,5:45,6:188,7:9,9:109,10:6     <C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmex10.pfb><C:/Program          Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi12.pfb><C:/Program Files/MiKTeX      2.9/fonts/type1/public/amsfonts/cm/cmmi8.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1     /public/amsfonts/cm/cmr12.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts     /cm/cmr8.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb>     <C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy8.pfb>          Output written on min_ex.pdf (1 page, 63918 bytes).     Transcript written on min_ex.log.          LaTeX finished at Tue Sep 11 08:10:56


title: Problem in visualizing tabular with TikZ

text: I'm quite new to LaTeX (I've used it at university for some basic formulas and ready to use templates) and I'm getting again into it for graphics stuffs: I love its clearness. I'm trying to make a tabular list of figures done with TikZ. Here my template:               \begin{tabular}{ l c r }              \begin{tabular}{c}             \begin{tikzpicture}[scale=0.5]                 \draw blablabla             \end{tikzpicture}                  \\             Description 1 blabla         \end{tabular}              &              ... and so on          \end{tabular}      I have 27 figures. I have no need for particular page numbers but I think that 9 images fit in 1 page. The impagination seems broken: only 1 page and after 4 lines of figures (12 figures) it goes out of page. I hope it's clear also without a screenshot - what could it be?


title: Customized summation symbol

text: I am interested in defining some customized math symbols out of existing ones. For example I would like to distinguish between different types of sums, so beside the usual symbol ![enter image description here](http://i.stack.imgur.com/dVSGX.jpg) I would like to have something of the form ![enter image description here](http://i.stack.imgur.com/lpyCr.jpg) so there are some circles in the corners. It should work just like the usual `\sum` command and look exactly like it (except the modification). How could I create such a symbol in the most painless way? Is `Metafont` the answer? Is it possible to modify existing symbols in `Metafont` without too much work and expertise?


title: How does one extract specific attributes of a label e.g. just the section number?

text: I'm using hyperref and calling `\autoref` to refer to tables, sections, chapters, etc.. However, sometimes I just want to refer to the _section number_ of a table ( _e.g._ **7.2** as opposed to **Table 7.2** ). How do we do this? More generally, how do we extract the (5?) attributes of a label. I know `\pageref` gets the page, but what about the others? Also, some commands are issued in .aux like:               \@writefile{lot}{\contentsline     {figure}{\numberline     {5.2}{\ignorespaces Galois     Correspondence}}{20}{figure.5.2}}      How does extract, say, the 2.2nd attribute (`{\ignorespaces Galois Correspondence}`)?


title: A good graphics program?

text: Anyone can give me an advice on finding a good program that would allow me to make free-body diagrams, such as a pendulum, a block descending down an inclined plane, a spring attached to a block and other simple graphics. as the ones you see in a typical physics book. I am having difficulties finding such program. I know you may say Adobe Illustrator but that's too expensive and the learning curve is very high, at least for me. Thanks.


title: BibLaTeX/BibTeX custom field to show file link

text: I am trying to build a database for my references. I don't want to use Mendeley or so to do the job. Therefore I have a pdf file that displays all references that I have, like it is in the MWE. Now I want to add a custom field called `file` to replace the `note` field, so that I can open the file by clicking in the link. For now I am using BibLaTeX, but I would like it to work with regular BibTeX (if possible). That field can be added to any entry in the database and when displayed shall appear at very end (if possible).               \documentclass[%         a4paper,         english,         11pt,     ]{article}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @article{Padial:2010,         title={The integrative future of taxonomy},         author={José M.~Padial and Aurélien Miralles and Ignacio De la Riva and Miguel Vences},         journal={Frontiers in Zoology},         year=2010,         month=may,         volume=7,         number=16,         pages={1--14},         doi={10.1186/1742-9994-7-16},         issn={1742-9994},         note={\href{file:./article/2010_Padial.pdf}{Open file}},         keywords={biology, taxonomy},     }     \end{filecontents*}          \newif\ifBIBLATEX     \BIBLATEXtrue % or     %\BIBLATEXfalse          \usepackage{fixltx2e}     \usepackage{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{type1ec}     %\usepackage{lmodern}     \usepackage{microtype}          \usepackage[%         colorlinks,         unicode,         breaklinks,     ]{hyperref}          \usepackage[strict,autostyle]{csquotes}          \ifBIBLATEX % use BibLaTeX              \usepackage[%             backend=bibtex,             style=ieee,         ]{biblatex}         \DeclareRangeChars{~,;-+/{}} % add '{}' as page range delimiter         \addbibresource{\jobname.bib}          \else % use regular BibTeX              \usepackage[noadjust]{cite} % cite without adjusting         \bibliographystyle{IEEEtran} % IEEE style for BibTeX          \fi          \usepackage[left=5cm,right=2cm,showframe]{geometry}          \usepackage[color,notref,notcite]{showkeys}               \begin{document}          \nocite{*} % list all entries          \ifBIBLATEX % use BibLaTeX              \printbibliography         %\printbibliography[keyword=taxonomy]          \else % use regular BibTeX              \bibliography{\jobname}          \fi          \end{document}


title: Installing Lua Modules for use in LuaLaTeX

text: I've done all of the searching that I can, and I think I've read the right answer, but am too dumb to know that I read it. I can't seem to figure out the magic tricks to get Lua modules, installed by luarocks or by any other means, to show up in LuaLaTeX. So here is a minimal:               %!TEX TS-program = lualatex     \documentclass{article}     \usepackage{luatexbase}     \usepackage{luacode}     \begin{document}              \directlua{package.path = "~/.luarocks/share/lua/5.1/?.lua;~/.luarocks/share/lua/5.1/?/init.lua;" .. package.path }              \directlua{require('pl')}         \directlua{require('htk')}              \directlua{tex.sprint(package.path)}              the standard approximation $\pi = \directlua{tex.sprint(math.pi)}$          \end{document}      In installed `htk` using luarocks with the command `luarocks --local install HTK `. The Penlight module was installed the same way, except with `penlight`. Penlight uses the "pl/submodulename" scheme and htk uses just "htk.lua" in the `~/.luarocks/share/lua/5.1 ` directory. The log output is:               ./luamoduleload.tex:9: LuaTeX error <\directlua >:1: module 'pl' not found:         no field package.preload['pl']         [luatexbase.loader] Search failed         [kpse lua searcher] file not found: 'pl'         [kpse C searcher] file not found: 'pl'     stack traceback:         [C]: in function 'require'         <\directlua >:1: in main chunk.     l.9     \directlua{require('pl')}          The lua interpreter ran into a problem, so the     remainder of this lua chunk will be ignored.          ./luamoduleload.tex:10: LuaTeX error <\directlua >:1: module 'htk' not found:         no field package.preload['htk']         [luatexbase.loader] Search failed         [kpse lua searcher] file not found: 'htk'         [kpse C searcher] file not found: 'htk'     stack traceback:         [C]: in function 'require'         <\directlua >:1: in main chunk.     l.10    \directlua{require('htk')}          The lua interpreter ran into a problem, so the     remainder of this lua chunk will be ignored.      Would more of the log file be helpful? In truth, if i just knew where to instal the lua modules that I want to use, I'd be a happy camper, especially if I don't need to do any magic tricks to get stand-alone lua scripts to work outside of LuaLaTeX. Please let me know if I can be any clearer or if I'm not reading the right fine manuals. :) -Andrew


title: How to plot a third variable (z) on pgfplot as a color gradient

text: I'm trying to use `pgfplots` to create a 2D plot with 3 variables, the third one being plotted as a color gradient.               \begin{tikzpicture}[scale=0.75]     \begin{axis}[xlabel=Selta,ylabel={Hitastig $[\si{\celsius}]$},colorbar,colormap/greenyellow]     \addplot[mesh,ultra thick]         table[x=S,y=POT_T,z=DB, col sep=semicolon]{287.csv};     \legend{Stöð 287}     \end{axis}     \end{tikzpicture}      I've been looking all over in the pgfplots manual, but I have somehow overlooked how to plot the z variable as the color gradient, this code automatically assumes the y variable is to be plotted. It always seems problems like these are something incredibly easy that was overlooked, so I hope this will be solved in no time. Thanks in advance :). Edit: Although I found the answer to this specific problem, there is another very related matter I'd like an answer to, mods correct me if this should be a separate question. I'd like to reverse the colorbar, and have found the code to do so is to put `colorbar style={z dir=reverse}` into the axis options. But as per the previous answer I can't use z as the variable name (or can I?) and `pgfplots` doesn't accept `colorbar style={point meta dir=reverse}`. How would this be achieved, or how to answer the previous question in a way that lets you reverse the colorbar?


title: How to refer to sections in different files?

text: > **Possible Duplicate:**   >  Cross-referencing between different files I am new to LaTeX. I am using `\ref{sec:relat-work-import}` to refer to sections in different places in the file. I would like to know how to refer to sections in different files in LaTeX.


title: How to make cross-documents references in latex?

text: I have two huge multi-source latex documents. I want to reference an object (i.e. section or figure) from one document in another document. Merging these two projects is not the option, they should be splitted. I have one idea to include `book1.aux` in `book2.tex`, but I don't know what to do then, how to use information from `book1.aux`. Or is there another way to do it?


title: Include values of \ref, \eqref into a new document

text: I have an introduction to my thesis. It includes a lot of constructions like `in Section \ref{sec1} is shown` or `the formula is given in \eqref{eq1}` whereas the corresponding Section and equation are in the separate files. Everything works fine and I have a correct pdf with explicit numbers, say, "in Section 3.2" or "is given in (5.3)" instead of `\ref` and `\eqref`. For some reasons, I nead to have this introduction as a separate document. However, I still need to have the explicit numbers in proper places. Hence, my question is the following: is it possible to obtain from the existing thesis a new tex-document which will have instead of `\ref{Sec1}` its value "3.2" and so on?


title: How to refer to labels in other documents?

text: I have two documents `file1.tex` and `file2.tex` in two different folds `fold1` and `fold2`, which are in the fold `father`. In file1, I defined `\label{file1:hello}`, how do I use it in file2?


title: Trouble Installing MathTimes Pro 2 (MacTex)

text: I recently obtained the MathTimes Pro 2 font from PCTex, and I'm having some trouble getting it to work; I use MacTex 2010. I've blindly followed the instructions posted on PCTex here: http://www.pctex.com/kb/74.html However, when I attempt to use the package, I get the following error message:               (/usr/local/texlive/2010/texmf-dist/tex/latex/base/article.cls          Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/fontenc.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/t1enc.def))     (/usr/local/texlive/2010/../texmf-local/tex/latex/mtpro2/mtpro2.sty)     (./Fonts.aux) [1{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdft     ex.map}] (./Fonts.aux)     kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 mt2syt     mktexpk: don't know how to create bitmap font for mt2syt.     mktexpk: perhaps mt2syt is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.      )     !pdfTeX error: /usr/texbin/pdflatex (file mt2syt): Font mt2syt at 600 not found           ==> Fatal error occurred, no output PDF file produced!      I've searched relentlessly for a solution, but I can't seem to find one (or make one work). Does anyone have any ideas?


title: Remove excess space at end

text: I realize that one should not have two consecutive display math equations as mentioned in Uneven vertical spacing displaymath. However, in my case, I have a macro that typesets two given macros in a specific manner and each may contain display math. This sometimes results in excess space. If I understand it correctly, in this answer to excess vertical space in mdframed ending with display math environment, David Carlisle's mention of _"you could just detect a zero height box and remove stuff"_ makes me think that it should be possible to write a macro that can remove any excess space at the end of text as passed to it. Unfortunately, I don't understand that code so can't easily adapt it. My attempt to write such a macro below intuitively seems wrong, but _sort of_ works. But, in case #3 and #4 below the spacing is not correct. What I would like is that `\RemoveSpaceAtEnd` removes any space at the end. So if the parameter that is passed to it ends in a display math environment, that the `\belowdispalyskip` is `0pt` only for the **very last** display math, not for every the display math in that macro               \documentclass{article}     \usepackage{amsmath}          \newcommand{\RemoveSpaceAtEnd}[1]{% Need to figure out code here. Hack here almost works         \setlength{\abovedisplayskip}{0pt}%         \setlength{\belowdisplayskip}{0pt}%         #1%     }          \newcommand*{\MacroA}{%         Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.          Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.      }          \newcommand{\MacroB}{%         \begin{align*}             e &= m c^2         \end{align*}     }          \newcommand{\MacroC}{%         \begin{align*}             F &= ma         \end{align*}     }          \newcommand{\Print}[2]{%         \noindent\RemoveSpaceAtEnd{#1}%         \par\addvspace{\medskipamount}%         \noindent\RemoveSpaceAtEnd{#2}%         \hrule%     }          \begin{document}     \Print{\MacroA}{\MacroA}     \Print{\MacroA}{\MacroB}     \Print{\MacroB}{\MacroC}     \Print{\MacroB}{\MacroA}     \end{document}