title: ClassicThesis TOC headlines

text: Why the headlines in the TOC are in `\normalfont` and not in `\spacedlowsmallcaps` as the rest of the document? How can I make it `\spacedlowsmallcaps`?               \documentclass[%                     headinclude,%                     footinclude,%                     10pt,%     %               openany%                     ]{scrbook}          \usepackage[%                 pdfspacing%                 ]{classicthesis}          \begin{document}     \pagestyle{scrheadings}     \tableofcontents     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \chapter{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \section{graphic test}     \end{document}      * * * Finally I have used the following:               \renewcommand*{\tocbasic@listhead}[1]{%       \@ifundefined{tocbasic@listhead@\@currext}{%         \begingroup\expandafter\expandafter\expandafter\endgroup         \expandafter\ifx\csname chapter\endcsname\relax           \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%             \iftocfeature{\@currext}{leveldown}{%               \iftocfeature{\@currext}{numbered}{%                 \subsection[##1]{##1}%               }{%                 \subsection*{##1}%                 \ifx\@mkboth\@gobbletwo\else\markright{\spacedlowsmallcaps{##1}}\fi                 \iftocfeature{\@currext}{totoc}{%                   \addcontentsline{toc}{subsection}{##1}%                 }{}%               }%             }{%               \iftocfeature{\@currext}{numbered}{%                 \section[##1]{##1}%               }{%                 \section*{##1}%                 \@mkboth{\spacedlowsmallcaps{##1}}{\spacedlowsmallcaps{##1}}%                 \iftocfeature{\@currext}{totoc}{%                   \addcontentsline{toc}{section}{##1}%                 }{}%               }%             }%           }%         \else           \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%             \iftocfeature{\@currext}{leveldown}{%               \iftocfeature{\@currext}{numbered}{%                 \section{##1}%               }{%                 \section*{##1}%                 \iftocfeature{\@currext}{totoc}{%                   \addcontentsline{toc}{section}{##1}%                 }{}%                 \ifx\@mkboth\@gobbletwo\else\markright{\spacedlowsmallcaps{##1}}\fi               }%             }{%               \iftocfeature{\@currext}{numbered}{%                 \chapter[##1]{##1}%               }{%                 \chapter*{##1}%                 \@mkboth{\spacedlowsmallcaps{##1}}{\spacedlowsmallcaps{##1}}%                 \iftocfeature{\@currext}{totoc}{%                   \addcontentsline{toc}{chapter}{##1}%                 }{}%               }%             }%           }%         \fi       }{}%       \csname tb@@beforehead@hook\endcsname       \csname tb@\@currext @beforehead@hook\endcsname       \csname tocbasic@listhead@\@currext\endcsname{#1}%       \csname tb@\@currext @afterhead@hook\endcsname       \csname tb@@afterhead@hook\endcsname     }


title: How to get mdframed package working correctly?

text: On a fresh Ubuntu 12.04 64 bits system, I wanted to add the mdframed package to my `texlive` distribution. After searching in Ubuntu standard repositories without success, I went to the CTAN website to download and manually compile and install the package. I did it and put this in the `texmf` directory tree in my home and after running `texhash` on this directory I got a new error when compiling about missing `xparse` package. I repeated the same, and found this package in the texlive-latex3 standard Ubuntu package. So I installed it through `apt-get` and now I am getting the following other error that I can't solve:               /usr/share/texmf-texlive/tex/latex/oberdiek/zref-abspage.sty:94: Missing \begin{document}.      How can I solve it ?


title: Latex beamer template

text: I would like to know, if there is any latex beamer template that looks as or similar to this slide presentation.


title: Table caption problem. Text goes new line every word

text: I've a strange problem with caption of table. The text is shrinked to the center (see picture). This is the code of the table in the example (the result is the same for all the table I made).               \begin{table}       \begin{center}       \begin{tabular}{ |l|l| p{8cm}| }     \hline      \textbf{Test}  & \textbf{test} & \textbf{test} \\     \hline     & test & test. \\      \hline     \end{tabular}     \end{center}     \caption{This is the description}     \label{tab:xyz}     \end{table}      this is my import list               \usepackage[ruled]{algorithm2e}     \usepackage{graphicx}     \usepackage{paralist}     \usepackage{acronym}     \usepackage{xspace}     \usepackage{color}     \usepackage{url}     \usepackage{hyperref}     \usepackage{multirow}     \usepackage{import}      Any idea how to solve it? ![caption error](http://i.stack.imgur.com/QjYF4.png) edit: this is the MWE:               \documentclass[prodmode,acmtoit]{acmsmall}      \usepackage{multirow}          \begin{document}     \begin{table}           \begin{center}           \begin{tabular}{ |l|l| p{8cm}| }         \hline          \textbf{Test}  & \textbf{test} & \textbf{test} \\         \hline         & test & test. \\          \hline         \end{tabular}         \end{center}         \caption{This is the description}         \label{tab:xyz}         \end{table}     \end{document}      the problem seems to be with the style of the document, which can be downloaded here


title: Numbering theorems in the left margin

text: My question is similar to this and this. I would like to have the theorem number in the left margin (0.6em spacing to the main text) and the Name 'Theorem' should be justified to the main text. The solution should made with the `amsthm`package, because I've made my very specific `proof` environment with `\renewenvironment` from `amsthm`.               \documentclass[12pt,a4paper]{article}     \usepackage[ngerman]{babel}     \usepackage{lipsum,lmodern,libertine}     \usepackage{amsmath,amsfonts,amssymb}     \usepackage{amsthm}     \newtheoremstyle{mystyle}     {\topsep}               %space above     {\topsep}               %space below     {}                      %bodyfont     {}                      %indent     {\bfseries}             %headfont     {}                      %punctuation     {0.6em}                 %space after head     {#2 #1 #3}              %theoremheadspec     \theoremstyle{mystyle}     \newtheorem{theorem}{Theorem}          \begin{document}     \lipsum[1]           \begin{theorem}     Let $f\colon [a,b]\to\mathbb{R}$ be continious and let $F$ be an antiderivative of $f$, then     \begin{align*}     \int_a^b f(x)\,\mathrm{d}x=F(b)-F(a).     \end{align*}     \end{theorem}          \end{document}      This looks like ![enter image description here](http://i.stack.imgur.com/DuG7O.png) But it should look like this (this was made with the `ntheorem` package): ![this was made with ntheorem](http://i.stack.imgur.com/8pd2Z.png)


title: Table and caption formatting

text: I'm having some problems getting my table and caption formatting to look right. Below is a sample of the code from my thesis. I've included all the packages that I'm using in my thesis, so that you can get an idea of what else might be affecting the look of the table. I've also attached a picture of my output. The main issues that I have with the table are:   1. The caption text sits too close to the top of the table. Is there a way to get this to sit a little higher (0.5-1 line spaces) above the table?   2. The rows are too closely spaced, making it a little hard to read the nuclide and atomic mass numbers for the elements. Does line spacing not affect tables? How can I can increase the spacing between rows?   3. The text underneath the table needs to sit directly beneath the table and be no wider than the width of the table. How do I go about this? Thanks for the help! ![enter image description here](http://i.stack.imgur.com/i85i6.png).               \documentclass[12pt,a4paper]{report}     \usepackage{setspace}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{layout}     \usepackage{lscape}     \usepackage[round]{natbib}     \usepackage{array}     \usepackage{booktabs}     \usepackage{siunitx}     \usepackage{tensor}          \begin{document}     \doublespacing     \begin{table}     \centering     \caption{Naturally occurring long-lived radionuclides and their stable radiogenic daughters frequently used in geochronology.}\label{tab:001}     \addtolength{\tabcolsep}{-2pt} % slight reduction of intercolumn space     \begin{tabular}{*{4}{c} >{\raggedright\arraybackslash}p{3.5cm}}     \toprule     Parent & Decay Modes$^a$ & Half-life (years) & Daughters \\     \midrule     $^{40}_{19}$K & $\varepsilon$: $10.72\%$, $\beta^{+}$: $1.0\times 10^{-3}\%$ & $1.248 \times 10^{9}$ & $^{40}_{18}$Ar \\     $^{40}_{19}$K & $\beta^{-}$: $89.28\%$ & $1.248 \times 10^{9}$ & $^{40}_{20}$Ca \\     $^{87}_{37}$Rb & $\beta^{-}$: $100\%$ & $4.81\times 10^{10}$ & $^{87}_{38}$Sr \\     $^{147}_{62}$Sm & $\alpha$: $100\%$ & $1.06\times 10^{11}$ & $^{143}_{60}$Nd \\     $^{176}_{71}$Lu & $\beta^{-}$: $100\%$ & $3.76\times 10^{10}$ & $^{176}_{72}$Hf \\     $^{187}_{75}$Re & $\alpha$: $1.0\times 10^{-4}\%$, $\beta^{-}: 100\%$ & $4.33\times 10^{10}$ & $^{187}_{76}$Os \\     $^{232}_{90}$Th & $\alpha$: $100\%$, SF: $1.1\times 10^{-9}\%$ & $1.40\times 10^{10}$ & $^{208}_{82}$Pb \\     $^{235}_{92}$U & $\alpha$: $100\%$, SF: $7.0\times 10^{-9}\%$ & $7.04\times 10^{8}$ & $^{207}_{82}$Pb \\     $^{238}_{92}$U & $\alpha$: $100\%$, SF: $5.5\times 10^{-5}\%$ & $4.468\times 10^{9}$ & $^{206}_{82}$Pb \\     \bottomrule     \end{tabular}     \end{table}     $^{a}$ $\varepsilon$ = electron capture decay; $\beta^{+}$ = positron decay; $\beta^{-}$ = negatron decay; $\alpha$ = alpha decay.     \end{document}


title: Typesetting a calendar with pgfgantt

text: How can I use `pgfgantt` to typeset a calendar for 2013? I would like to have calendar that displays the day-dates of the corresponding months; instead of the number 1 to 365 it should give 1,...,31,1,...,28,1,...31 and so on. Also it would be great if Saturdays and Sundays among these dates could be highlighted with a different background. So far I have the following:               \documentclass{article}          \usepackage[paperwidth=300cm, paperheight=50cm,left=1cm,right=1cm,top=5cm,bottom=5cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{pgfgantt}     \usepackage{pgfcalendar}          \begin{document}          \begin{ganttchart}[hgrid, vgrid, x unit=0.8cm]{365}     \gantttitle{Projektplan}{365} \\     \gantttitlelist{1,...,365}{1} \\     \ganttbar{Task 1}{2}{5} \\     \end{ganttchart}          \end{document}


title: How to draw a simple cone with height and radius with TikZ?

text: I need to make a very simple cone with h and r (like the picture I've uploaded as example) and I can't find it in previous questions. ![Simple cone](http://i.stack.imgur.com/QQWjr.jpg)


title: Blank page causing duplicate page one.

text: Newbie here. I get a blank,numbered page after running the following \maketitle command in my document. Is this part of the report class that I am using? How can i remove the blank page?               \def\maketitle{%\begin{titlepage}     \thispagestyle{empty}     \let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}     \null     \vfil     \begin{center}     \title{Final Year Project Interim Report\\[0.5cm]\rule{4cm}{1pt}\\[0.7cm]     \textbf{\projecttitle}}\\[1cm]     \author{\LARGE \studentname}\\[0.5cm]\rule{4cm}{1pt}\\[0.5cm]     \textsf{\Large  Blah[0.5cm]     \textsf{\Large  \textbf{Supervisor:}  \supervisorname}\\[0.5cm]     \textsf{\Large  \textbf{Mentor:}  \moderatorname}\\[1.8cm]     \includegraphics[height=6cm]{logo}\\[1cm]     \textsf{\Large Blah\vfill     \normalsize \today}     \end{center}     \vfil     \null     %\end{titlepage}     }      It occurs to me that I might not have provided enough information. If so let me know. edit: the (as minimal as i could) working example: tex file:               \documentclass[]{final_report}     \usepackage{graphicx}     \usepackage{hyperref}               \def\studentname{asdn}     \def\projecttitle{asd}     \def\supervisorname{asd}     \def\moderatorname{asd}          \begin{document}          \maketitle     \tableofcontents\pdfbookmark[0]{Table of Contents}{toc}\newpage                    \label{endpage}          \end{document}          \end{article}      cls file:               \ProvidesClass{final_report}     \LoadClass[11pt, titlepage]{report}     \usepackage[paperwidth=21cm,paperheight=29.7cm,includehead,headheight=1.5cm,pdftex,hmargin={3cm,2.5cm},vmargin={0cm,2cm},]{geometry}      \setlength{\parindent}{0cm}      \renewcommand{\baselinestretch}{1.2}     \parskip=1em          \renewcommand{\contentsname}{Table of Contents}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[LO]{\small\textsf{\projecttitle}}     \fancyhead[RO]{\small\textsf{\studentname}}     \renewcommand{\headrulewidth}{0.1pt}     \fancyfoot[CO]{\small\textsf{Page \thepage~of~\pageref{endpage}}}                    \def\ps@plain{%           \let\@oddhead\@empty           \def\@oddfoot{\normalfont\hfil\small\textsf{Page \thepage~of~\pageref{endpage}}\hfil}%           \def\@evenfoot{\normalfont\hfil\small\textsf{Page \thepage~of~\pageref{endpage}}\hfil}}               \renewcommand{\normalsize}{\fontsize{11pt}{11pt}\selectfont}     \renewcommand{\title}[1]{\textsf{\Huge{#1}}}     \renewcommand{\author}[1]{\textsf{\Huge{#1}}}     \newcommand{\subtitle}[1]{\textsf{\textbf{\Large{#1}}}}     \newcommand{\abstractheading}[1]{\textsf{\textbf{\LARGE{#1}}}}     \newcommand{\code}[1]{\texttt{\footnotesize{#1}}}          \renewcommand{\section}{\@startsection     {section}%                    % the name     {1}%                          % the level     {0mm}%                        % the indent     {10.6mm}%             % the beforeskip     {4.2mm}%           % the afterskip     {\LARGE\bfseries\sffamily}}  % the style          \renewcommand{\subsection}{\@startsection     {subsection}%                    % the name     {2}%                          % the level     {0mm}%                        % the indent     {6.4mm}%             % the beforeskip     {1.1mm}%           % the afterskip     {\Large\bfseries\sffamily}}  % the style          \renewcommand{\subsubsection}{\@startsection     {subsubsection}%                    % the name     {3}%                          % the level     {0mm}%                        % the indent     {4.2mm}%             % the beforeskip     {1.1mm}%           % the afterskip     {\normalsize\bfseries\sffamily}}  % the style          %\renewcommand\chapter{     %  %\thispagestyle{empty}     %  \pagestyle{fancy}     %  \doublespacing     %  \global\@topnum\z@     %  \@afterindentfalse     %  \secdef\@chapter\@schapter     %}          \renewcommand\chapter{     \if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@chapter\@schapter}          %% Chapter headings should be centered, uppercase, and at the top of the page.     \def\@makechapterhead#1{%       { \parindent \z@ \raggedright \normalfont         %\centering         \ifnum \c@secnumdepth >\m@ne             \huge\textsf{\@chapapp\space \thechapter:}             % \par\nobreak             %\vskip 20\p@         \fi         \interlinepenalty\@M         \huge \bfseries \textsf{#1}\par\nobreak         \rule{5cm}{0.5pt}         \vskip 20\p@       } }          \def\@makeschapterhead#1{%       %\vspace*{50\p@}%       { \parindent \z@ \raggedright         %\centering         \normalfont         \interlinepenalty\@M         \huge \bfseries  \textsf{#1}\par\nobreak         \rule{5cm}{0.5pt}         \vskip 20\p@            }}           \renewenvironment{abstract}{%           \chapter*{\abstractname}%           \addcontentsline{toc}{chapter}{\abstractname}      }               \makeatletter     \renewcommand{\l@chapter}{\bfseries\@dottedtocline{1}{0em}{2.3em}}     \renewcommand{\l@section}{\normalfont\@dottedtocline{2}{2em}{2.3em}}     \renewcommand{\l@subsection}{\normalfont\@dottedtocline{3}{2em}{2.3em}}     \renewcommand{\l@subsubsection}{\normalfont\@dottedtocline{4}{2em}{2.3em}}     \makeatother              \def\maketitle{%\begin{titlepage}         \thispagestyle{empty}         \let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}         \null         \vfil         \begin{center}         \title{bla\\[0.5cm]\rule{4cm}{1pt}\\[0.7cm]         \textbf{\projecttitle}}\\[1cm]         \author{\LARGE \studentname}\\[0.5cm]\rule{4cm}{1pt}\\[0.5cm]         \textsf{\Large blah[0.5cm]}         \textsf{\Large  \textbf{Supervisor:}  \supervisorname}\\[0.5cm]         \textsf{\Large  \textbf{Mentor:}  \moderatorname}\\[1.8cm]         \includegraphics[height=6cm]{logo}\\[1cm]         \textsf{\Large blah\\\vfill         \normalsize \today}         \end{center}         \vfil         \null         %\end{titlepage}         }          \pagestyle{plain}


title: How to use PostScript for to plot the sum of cos(n*x) for n=0 to n=100?

text: I want to plot the function `f(x)` which is the sum of `cos(n*x)` for `n=0` to `n=100`. The domain is from `0` to `2π`.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot}          \begin{document}     \begin{pspicture}(-5,-5)(5,5)     \psplot[plotpoints=100]{0}{TwoPi}{%         /k 0 def         /out 0 def               0 1 10         {             x k mul RadtoDeg cos out add /out ED             k 1 add /k ED         } for         out       }       \end{pspicture}     \end{document}      The output seems wrong as follows. ![enter image description here](http://i.stack.imgur.com/JyjzC.png) How to use the PostScript `for` here?


title: Customised format floating itemized list

text: I'd like to add floating itemized lists in a format illustrated below: ![bulleted list](http://i.stack.imgur.com/Y7onE.jpg) More specifically, I would like   1. The title above rather than below the float, with bold font for title and horizontal line beneath   2. No bullets   3. First level items italicised, no indent; Second level items Roman, no indent; Third level items Roman; indented one tab stop; with a blank line of space between groups of first level items   4. Also, if in a two column formatted document, the list is to only occupy one column of the document Ideally, I'd like to set up all the formatting in the preamble, then whenever I have a floating list of this type to insert, I could just create it by listing the `\item`s in a similar way to making a regular itemized list. I suspect it is possible to do this using `\table`, but will be rather long- winded. Is it possible to customise the `\itemize` command to easily produce floating lists of this type? Is there an add-in package which is like `\itemize` but has greater options for customisation, that might be able to produce a list of this type?


title: Why hyperref doesn't break links when using \href but it does when using \url ? Bibtex entries in the middle of a document?

text: I encountered the following problem while preparing my CV. There are a few links prepared by hyperref that are not broken in several lines. I am wondering if there is a way to fix this problem. This is a minimal working example:               \documentclass{article}          \usepackage[utf8]{inputenc}          \usepackage[left=1.8in,right=1.8in,top=0.6in,bottom=0.6in]{geometry}          \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}          \usepackage{hyperref}          \definecolor{linkcolour}{rgb}{0,0.2,0.6}      \hypersetup{colorlinks=true,     breaklinks=true,     urlcolor=linkcolour,linkcolor=linkcolour,     citecolor=NavyBlue}          \begin{document}          \begin{itemize}          \item A.~M.~Aragón, S.~Soghrati, and P.~H.~Geubelle. In-plane deformation effect on the cohesive failure of heterogeneous adhesives: a multi-scale analysis based on a 3D generalized finite element scheme, \emph{Journal of the Mechanics and Physics of Solids}, Published online; doi: \href{http://dx.doi.org/10.1016/j.jmps.2013.03.003}{http://dx.doi.org/10.1016/j.jmps.2013.03.003}          \item A.~M.~Aragón, S.~Soghrati, and P.~H.~Geubelle. In-plane deformation effect on the cohesive failure of heterogeneous adhesives: a multi-scale analysis based on a 3D generalized finite element scheme, \emph{Journal of the Mechanics and Physics of Solids}, Published online; doi: \url{http://dx.doi.org/10.1016/j.jmps.2013.03.003}          \end{itemize}          \end{document}      The result of this code is as follows: ![enter image description here](http://i.stack.imgur.com/DqZId.png) Also, is there a way to use bibtex entries in the middle of a document as they show up in the end of an article? I need to put a list of publications and the only way I managed to do this is just writing regular text to mimic the bibtex entries.


title: Adding a new reference to database

text: I am using TexMaker editor for my LaTeX documents. I want to add a new reference to my database file called `last_bib2.bib`. I added it to the end of `.bib` file saved it and tried to run BibTex but I got this error message "I couldn't open file name `last_bib2.aux`". I am able to solve the problem if I rename the `.bib` file and use it in my LaTeX document (`\bibliography{new_name}`). Can you suggest me another solution for the problem mentioned above?


title: How can I change the default \\ spacing?

text: So, I have a definition which takes in data like this:               ...{apple\\orange\\cat\\imperial green tea\\left-handed president}...      In the document I get the following after compilation: apple orange cat imperial green tea left-handed president * * * However, the line spacing is too large for my taste. I'd like to adjust it to be a bit smaller. How can I do this?


title: Text in subscript

text: For my text-in-mathmode needs in LaTeX, I use `\mbox`. However, it does not seem to behave well in subscripts. How can I write text that adjusts its height?               $ 3 \mbox{dB} = f_{ 3 \mbox{dB} } $      compiles to ![example](http://i.stack.imgur.com/uTTeA.png)


title: Deactivate ibidtracker in footnotes only (authoryear-icomp style)

text: Is there any possiblity in biblatex to deactivate the `ibidtracker`in footnotes only? I'm quite new to biblatex and have found no solution for this problem yet. I'm using biblatex with the `authoryear-icomp` citestyle so my quotes usually are in the main text [example: TEXTTEXT (Elden 1998: 73) TEXTTEXT (Ibid.: 28)]. But I also have footnotes (I'm using the command \footnote) to add additional information and quotes. This currently looks like this: "FOOTNOTETEXTFOOTNOTETEXT (Ibid.: 39)" but I would like to have "FOOTNOTETEXTFOOTNOTETEXT (Elden 1998: 39)". So would like the ibidtracker to work only for the quotes in the main text but not in the footnotes. Many thanks for your time and any help! My current settings:               \documentclass [paper=a4, DIV10, fontsize=11pt, headsepline, headings=small, bibliography=totoc, numbers=endperiod] {scrreprt}          \usepackage[applemac]{inputenc}     \usepackage[english, ngerman]{babel}     \usepackage[autostyle,german=quotes]{csquotes}     \usepackage{lmodern}      \usepackage[T1]{fontenc}     \usepackage{rotating}     \usepackage[obeyspaces]{url}     \usepackage{xcolor}          \usepackage{tabularx}     \usepackage{array}     \usepackage{booktabs}     \usepackage{caption}     \usepackage{chngcntr}     \counterwithout{table}{chapter}          \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2cm,includeheadfoot]{geometry}     \usepackage{setspace}     \setlength{\parindent}{1em}     \onehalfspacing          \addtokomafont{partentry}{\centering}     \setkomafont{partentrypagenumber}{\color{white}}          \deffootnote{1em}{1em}{\textsuperscript{\thefootnotemark\ }}     \usepackage{chngcntr}     \counterwithout{footnote}{chapter}          \usepackage{epigraph}     \setlength{\epigraphwidth}{.5\textwidth}     \setlength{\epigraphrule}{0pt}     \renewcommand{\textflush}{flushepinormal}          \usepackage[automark]{scrpage2}     \setlength{\headsep}{12mm}          \usepackage[style=authoryear, citestyle=authoryear-icomp, maxnames=2, sorting=nyt, backend=biber, dashed=false, isbn=false, uniquename=false]{biblatex}


title: Using listing with minted gets wrong listoflistings

text: I wanted to make a `\begin{minted}` block to show on the ToC in Listings section with a link to its label. So I did (with links to my Github working repo)               \begin{listing}[!h]         \begin{minted}[             linenos,             frame=single,             numbersep=6pt,             baselinestretch=1,             fontfamily=courier,             gobble=4,             fontsize=\tiny,         ]{text}         code code code         \end{minted}         \caption{some caption}         \label{code:mytextfile}     \end{listing}      using minted listing to label my code to get the right link, and               \renewcommand\listingscaption{Code}     \renewcommand\listoflistingscaption{List of Source codes}          % http://tex.stackexchange.com/a/99656/5125     \renewcommand{\listoflistings}{%         \cleardoublepage         \addcontentsline{toc}{chapter}{\listoflistingscaption}%         \listof{listing}{\listoflistingscaption}%     }      template and preamble to show a List of Listings on the ToC (were not showing with a simple `\listoflistings`, so I put `addcontentsline`), with custom texts on it. This produces a problem that, at the "Source code List", clicking on the entry for the listing takes the document to the cover. I cannot go better than this: if I change something, or the "List of Source codes" entry takes to "List of Figures", or it disappears. * * * Edit: duplicate, althought I could not fix my problem yet.


title: add caption to Subfigures

text: how to add caption to the multiple subfigures whose code is given as               \begin{figure}[h]     \centerline{%     \includegraphics[width=0.5\textwidth]{CircleTemplate.eps}%     \includegraphics[width=0.5\textwidth]{CircleOlimpicStarting.eps}%     }%     \centerline{%     \includegraphics[width=0.5\textwidth] {CircleOlimpicFinishing.eps}%     \includegraphics[width=0.5\textwidth] {CircleOlimpicFinishingWithNoise.eps}%     }%     \caption{Some long long caption}     \label{fig:OlimpicCircleTT1}     \end{figure}


title: How can I get rid of bold just for one word in the lstlisting environment?

text: I have the following Matlab code in my Latex file:               \documentclass[a4paper,12pt]{article}          \begin{document}      \begin{lstlisting}[frame=single,escapeinside={@}{@}]           gamma=[1/4,3/4];          alpha=[1/4,3/4];       \end{lstlisting}     \end{document}      But in my Latex file the variable name gamma is in bold and alpha isn't. How can I get rid of the bold for one specific variablename?


title: Selectively modify some citations appearance

text: I am using biblatex with the following setup:               \usepackage[style=nejm,hyperref,natbib,backend=biber,maxnames=2,minnames=1]{biblatex}      Let us consider, as an example, this citation. (               @article{RefWorks:41,         author={K. J. Koval and J. J. Harrast and J. O. Anglen and J. N. Weinstein},         year={2008},         month={Sep},         title={Fractures of the distal part of the radius. The evolution of practice over time. Where's the evidence?},         journal={The Journal of bone and joint surgery.American volume},         volume={90},         number={9},         pages={1855-1861},     }      When I am citing with \textcite{RefWorks:41}, I would like to make the name part `Koval et al.` appearing such as `\textbf{\textsf{\textsc{Koval et al.}}}`. In the meantime, the bibstyle should remain unchanged. In addition, it should be applied to selected citations (not to all, but to some specific ones depending the context.) Any ideas?Suggestions? Edit: Further explanation: given the author key in the bib file author={K. J. Koval and J. J. Harrast and J. O. Anglen and J. N. Weinstein}, I would like to make the the "author" part of the output of \textcite bold whatever it is. I mean, with maxnames=2,minnames=1, the output should be **Koval et al.** [25], with maxnames=6,minnames=3 it should be **Koval, Harrast, Anglen e Weinstein** [25] with the latter part (25) left unchanged. Also, if a reference is cited more than one time, i would like to choose which citation should be bolded (not all of them).


title: Custom footnotes in the authblk package

text: I would like to create a special footnote such that more than one location is mapped to the same footnote. This is covered elsewhere (Reference different places to the same footnote), but I am running in to trouble as I'm trying to use it in the authors list with the authblk package (the custom footnote is `\CoAuthorMark`). Other things may be wrong with this, but I haven't gotten to the point of experimentation yet. Alternatively, is there a way to do this with \thanks?               \documentclass[letterpaper]{article}     \usepackage[affil-it]{authblk}          \usepackage[english]{babel}     \usepackage{blindtext}               \title{An efficient method for exploiting midichlorians in weak life-forms}          \author[1,2]{Darth Vader\footnote{Contributed equally.}}%          \newcounter{CoAuthor}          % The order may be wrong on these next two:     \setcounter{CoAuthor}{\value{footnote}}     \edef\CoAuthorMark{\footnotemark[\value{CoAuthor}]}          \author[2,3]{Darth Sidious\CoAuthorMark%       \thanks{Electronic address: \texttt{palpatine@empire.gove}; Corresponding author}}          \affil[1]{Office of the Supreme Commander of the Imperial Forces, The Galactic Empire, The Bridge, Executor}     \affil[2]{Order of the Sith Lords, LiMerge Power Building, The Works, Coruscant}     \affil[3]{Office of the Emperor of the Galaxy, The Galactic Empire, 1000 Imperial Palace, 2 Main St. Coruscant}               \date{\today}          \begin{document}          \maketitle     \blindtext     \end{document}      The error message I get with the above is:               ! Missing \endcsname inserted.     <to be read again>                        \c@CoAuthor     l.16 ...AuthorMark{\footnotemark[\value{CoAuthor}]                                                       }      But I usually get something like this:               ! Use of \\author doesn't match its definition.


title: texmacs does not interpret commands

text: I started to use Texmacs. But the output contains non interpreted commands like the following. For               \thispagestyle{empty}      the output is ![broken output](http://i.stack.imgur.com/ZNcRg.png) I tried both: export to pdf and ps. Should be an easy question, but I didn't get to read the user manual so far. edit: Minimum working example. This is the original code. It compiles fine, if I do not use texmacs.               \documentclass[11pt,a4paper,reqno]{article} %11 pt     \begin{document}     blabla     \thispagestyle{empty}     blabla     \end{document}


title: tikz-cd [equal] and arxiv

text: I seem to be running into an issue while uploading a TeX file on the arxiv while trying to use `tikz-cd`. I think arxiv is using an older version of TikZ/pgf which does not support the `[equal]` arrow. I've seen other instances of this question popping up, but the solution always seemed to be "upgrade your TikZ". On my computer it is in fact up to date and no errors appear. But when I try uploading to arxiv the `autotex` will refuse to compile. Is there a workaround to the `[equal]` arrow in `tikz-cd`? EDIT: I just noticed that using the option `[-,double]` produces almost the desired effect. Maybe there is a way to tweak that?


title: How do I make my document look like it was written by a Cthulhu-worshipping madman?

text: I want to type up some spells from the RPG Call of Cthulhu and give them to my players. I could just type them up in Word or LaTeX, but that seems too...neat. I'd like to make these things look like they were scrawled by a gibbering madman, unhinged by the horrors he has witnessed. Bonus points if you can add any traces of H. P. Lovecraft's Cthulhu Mythos. Less poetically: Typefaces to make it look scrawled or handwritten, preferably with a quill or calligraphy pen. Ways to make the word spacing less regular (Abuse `microtype` in some way?) and ways to put in drop caps are the kind of things I'm looking for. Bonus points if you can tell me how to typeset an elder sign. Alright, editing this to be more specific:   * A font to make it look handwritten or calligraphic. I was under the (mistaken) impression that fonts in LaTeX were restricted to a few packages on CTAN, so I was hoping for a suggestion for a good one. I can find one in a free typeface repository somewhere, though if anyone has suggestions I'd love to hear them.    * Dropcaps.   * Possibly adding a texture or such to make it look like it is written on parchment?   * Changing the size of the writing at various points, preferably randomly   * Changing interword spacing randomly.


title: biblatex bibliograhy to highlight the first letter of an author beginning a new letter of the alphabet

text: I want to change the style of the biblography with `biblatex` but I haven't yet found a way to achieve what I am looking for. Usually most styles list the authors alaphabetically in the biblography. `Authortitle` and `biblatex-dw` do it the same way as `biblatex-juradiss`, which I am using. What I want the biblography to do is to highlight the first letter of an author and create a gap when a new letter in the alphabet is reached. I created the following minimal example to show the result I want to achive and the result biblatex produces.               \begin{filecontents*}{lit.bib}     @BOOK{aname,       author = {Aname, Firstname},       title = {Title of the Book}     }          @BOOK{aname2,       author = {AnameSecond, Firstname},       title = {Title of the Book number two}     }               @BOOK{bname,       author = {Bname, Firstname},       title = {Title of the Book}     }          @BOOK{bname2,       author = {BnameSecond, Firstname},       title = {Title of the Book number two}     }          @BOOK{cname,       author = {Cname, Firstname},       title = {Title of the Book}     }          @BOOK{cname2,       author = {CnameSecond, Firstname},       title = {Title of the Book number two}     }     \end{filecontents*}                    \documentclass{article}          \usepackage[     backend=biber,     style=biblatex-juradiss     ]{biblatex}          \bibliography{lit}          \setlength{\parskip}{6pt}     \setlength{\parindent}{0pt}          \begin{document}          \cites{aname}{aname2}{bname}{bname2}{cname}{cname2}                \section*{Preferred Result}          \textbf{A}name, Fristname, Title of the Book          AnameSecond, Firstname, Title of the Book number two          \vskip 20pt          \textbf{B}name, Fristname, Title of the Book          BnameSecond, Firstname, Title of the Book number two          \vskip 20pt          \textbf{C}name, Fristname, Title of the Book          CnameSecond, Firstname, Title of the Book number two                \printbibliography          \end{document}      ![enter image description here](http://i.stack.imgur.com/52rvR.png)


title: How to create a short caption (as \listoffigures entry) with \twopagepicture?

text: Using the `\twopagepicture` command like in this example (How to include a picture over two pages, left part on left side, right on right (for books)?), is there any chance to create an entry to the List of Figures which only takes part of a very long figure caption (instead of the "...very very...long caption" itself; similar to the `\caption[]{}` command), such as               ....     \twopagepicture{t}{p}{image}*[short caption]*{Other test with      very very very very very very very very very very very     very very very very very very very very very very very     very very very very very very very very very very very     long caption     }     ...,      starting form the above-posted example? I am facing this problem in my thesis for a two-page figure where a long caption is inevitable. A general option, of course, would be to give the details on the figure in the text but (a) this does not meet with my supervisor´s approval, and (b) a statement like "See text for further details" in the figure caption would also enter the List of Figures which, I think, is not adequate for a LoF entry. So this option is actually not an option for me. Maybe the answer is very simple but I have not come across it yet... Any suggestions are highly appreciated. Thank you very much for your time!


title: MinionPro, newtxmath and further misadventures with oldstyle and lining figures

text: In continuing my journey with the `newtxmath` package, this time I've tried the next code:               \documentclass{memoir}          \usepackage{textcomp}     \usepackage[lf,onlytext]{MinionPro}% no osf, no math     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage[minion,vvarbb,cmbraces,cmintegrals]{newtxmath}     \renewcommand{\rmdefault}{pmnj} % use osf in text          \begin{document}     \noindent     Text figures: 0123456789     \par\noindent     Math figures: $0123456789$     \end{document}      This appears in the documentation for `minion2newtx`. My problem is that when I pdfLaTeX the code above, what I get is the Latin Modern fonts (or Computer Modern) for text mode, and MinionPro for math mode. The line to blame for this is that one setting the roman typeface to `pmnj`. If I comment the corresponding line, I get everything Minion, but text figures are lining, while what I want is lining figures for math mode and oldstyle for text mode. I believe my system (MikTeX 2.9 updated just today) has the right settings and all the necessary fonts files, but maybe I'm skipping something. A second issue is that if I use MinionPro in math mode, not loading `newtxmath` and deleting the option `onlytext` when loading `MinionPro` I get the wrong glyphs for at least some of the operators. Maybe this has something to do with the first problem, but I really don't know. Could someone provide some hints as to what's happening? Maybe it's just something about my own MikTeX setup, but so far I haven't been able to find anything wrong.


title: Drawing fluid pathlines, streaklines, streamlines using TikZ

text: I am trying to do a sketch of fluid pathlines, streaklines, and streamlines using TikZ. The code               \documentclass{minimal}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}       \fill [fill=blue!25] (0.0, 0.0) -- (0.0, 2.0) -- (6.0, 2.0) -- (6.0, 1.0) to[out=180, in=0] (0.0, 0.0);       \filldraw [semithick, fill=gray!50] (0.0, 2.0) rectangle (6.0, 2.1);       \filldraw [semithick, fill=gray!50] (0.0, -0.1) -- (0.0, 0.0) to[out=0, in=180] (6.0, 1.0) -- (6.0, 0.9) to[out=180, in=0] (0.0, -0.1);       %       \draw [thick] (0.25, 0.25) to[out=0, in=180] node [pos=0.1, above] {$t_{1}$} node [pos=0.5, above] {$t_{2}$} node [pos=0.9, above] {$t_{3}$} (5.75, 1.125);     \end{tikzpicture}     \end{document}      generates the following image: ![enter image description here](http://i.stack.imgur.com/RAdBr.jpg) I would like there to be closed circles on the black line at the locations under the labels $t_{1}$, $t_{2}$, and $t_{3}$. Can someone suggest how to do this? Thanks.


title: Lyx - Problem with Acknowledgements in the Environment Box

text: I use the document class "book(more font sizes)", with language setup as "French". When I want to select the french equivalent of Acknowledgements in the Environment box, it is written "Remerciements(inconnu)" (inconnu means unknown) and when I select it to add the acknowledgments in my text, nothing happens. Thanks,


title: How can I make a custom list that looks like the following?

text: I want a list that looks like the following:               1. Introduction          Blaha blah albhalbhalbhalb          1.1. Purpose          Blaha bl ah blah blhab albhalbhalb          1.2. Another Subsection          More text for this section blah blahblalh          ...          2. A Whole New Section          2.1. A Subsection in 2          Bunch more text... blah blah..          2.2. Blah          and so forth...      I don't need any special indentation for the subsections, I just want to be able to have the main section title (possibly with some text below) and then some subsections for that main section (also with text below each of them). Does it make sense what I am trying to achieve? I realize that one approach would be to do something like the following:               \begin{description}     \item[1. Introduction]     ...     \item[1.1. Purpose]     ...     \item[1.2. Another subsection]     ...     \item[2. Main Section]     ...      and so forth     \end{description}      However, I would like to avoid this approach because it would mean that anytime I inserted a list item in the middle, I would have to manually go through and update the subsequent list items.


title: Problem with compiling BibTex: "no \citation commands" error

text: I'm really new to BibTex, I just wonder what is going wrong when I have this kind of error when I try to compile my bibliography file. `I found no \citation commands---while reading file masterthesis.aux` I have put this `\bibliographystyle{plain}` and `bibliography{masterthesis}` somewhere in my document, but I don't know what to do here...


title: Calling \psfrag{} inside a forloop

text: Allright, hi guys. Inside my EPS i got quite some texts that are quite similar. Only their index shall change from each one. So i'm trying to get those done in an own command. They are used inside an `\begin{figure}...\end{figure}` \- block, right after `\centering`. after them the eps gets included. My code looks like this:               \newcommand{\qfrag}[1]{\psfrag{q#1}[c][c]{$q_#1$}} %this works as \qfrag{0}\qfrag{1}...     \newcounter{ctr}     \newcommand{\qrfrag}[1]{\forloop{ctr}{0}{\value{ctr} < #1}{\qfrag{\arabic{ctr}}}} %but not like this.      My `\qfrag` replaces all `q#1` to `q_#1`. works fine on its own. Also behind each other like this works fine:               \qfrag{0}\qfrag{1}\qfrag{2}\qfrag{3}      But once i try to get them together inside a forloop they kinda mess up and make all indices of my `q`'s to the number inserted to `\qrfrag{}`               \qrfrag{3} causes to be all q0,q1,q2 to become formatted q_3 but not q3.       Any clues on your sides there? I'm kinda new to latex.


title: Global setting of hyphenation for words containing dashes

text: I'm using the word "Zwei-Drittel-Abstimmungsmehrheit" a bunch of times in my document. Often it won't fit into the current line, extending into the right margin. I figured out that the following package helps :               \usepackage[shortcuts]{extdash}       Then I can write               Zwei\-/-Drittel\-/Abstimmungs\-mehrheit      and the hyphenation is done correctly. Is there a way that I can set this hyphenation globally for this word? Like i can do it with the command               \hyphenation{...}      Sadly this command doesn't work for words containing dashes.


title: BibTeX warning on extra title field

text: I am using TeXnicCenter and MiKTeX for compiling. I have the following BibTeX entry:               @INPROCEEDINGS{cwang10,     author={Cong Wang and Cuirong Wang and Ying Yuan},     booktitle={Cyber-Enabled Distributed Computing and Knowledge Discovery (CyberC), 2010 International Conference on},      title={A High Performance, Low-Cost Network Architecture for Data Centers},     year={2010},     month={Oct.},     pages={284--287},     }      However I get a strange warning message that the above entry contains an "extra title field" and that BibTeX is ignoring said field. I have about 120 references. Can you please help to fix this?


title: How to put a label to a /draw plot command in TikZ correctly?

text: I want to draw some interpolation curves and came across the following command               \draw plot[smooth] coordinates {(1,1) (4,8) (6,3) (8,9)};      That seems quite nice. Now I wanted to add some labels and found some information here (Labeling a function's plot generated by “plot function”) and here (How to label a path drawn using tikz with \draw plot?) Now my solution looks like:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \begin{document}       \begin{tikzpicture}[label/.style={postaction={decorate,          transform shape,          decoration={markings,mark=at position 0.5 with \node #1;}}}]       \draw[help lines] (0,0) grid (10,10);       \draw[->,label={[above]{1}}] plot[smooth] coordinates {(1,1) (4,8) (6,3) (8,9)};     \end{tikzpicture}     \end{document}      Everything seems to work, but at one point I get an error I can't understand or solve. If I change `mark=at position` to a value less than `0.4` it still produces the desired output, but gives me the following error messange.               ! Dimension too large.     <to be read again>                         \relax      l.10 ...th] coordinates {(1,1) (4,8) (6,3) (8,9)};          ! Dimension too large.     <recently read> \pgfmath@x           l.10 ...th] coordinates {(1,1) (4,8) (6,3) (8,9)};          ! Dimension too large.     <to be read again>                         \relax      l.10 ...th] coordinates {(1,1) (4,8) (6,3) (8,9)};      Any ideas what's going on there or how to solve it? Thanks a lot.


title: Point on surface using PSTricks

text: I would like to draw a Point on a surface using `PSTricks` and `pst- solides3d`. What I mean by that is, that the point should look like it is attached onto the surface. That means that the point should not look like a point from different views. My attempt is the following, using `\psProjection`, but it does not work:               \documentclass{minimal}     \usepackage{pst-solides3d}          \begin{document}          \begin{pspicture}[solidmemory](-10,-10)(10,10)     \psset{         Decran=50,         viewpoint=25 25 15 rtp2xyz     }     \psSolid[         object=octahedron,         a=2,         trunc=all,         trunccoeff=.3333,         fillcolor=grey!20!,         name=my_octahedron,         action=draw*     ]     % The following draws a point.     \psSolid[         object=point,         definition=solidcentreface,         args=my_octahedron 10,         linecolor=red,         text=X,         pos=uc     ]     % The following is my attempt to plot the same point but looking as it would be attached to the plane of the octahedron.     \psProjection[         object=point,         args=0 0,         linecolor=red,         pos=uc,         text=H,         plan=my_octahedron 10     ]     \axesIIID*(1.5,1.45,1.4)(2.7,2,2)     \end{pspicture}          \end{document}


title: eqnarray with subnumber

text: When I use eqnarray               \begin{eqnarray}          eq\\     eq\\     eq\\          \end{eqnarray}      this show me               eq (1)     eq (2)     eq (3)      In some papers I see this output               eq (1a)     eq (1b)      eq (1c)       how I can make this way ?


title: Hooks into mathmode

text: ## Short version Is there a way to pipe every symbol in a math environment unevaluated to an external program w/o manipulating the (La)TeX file directly (except for adding header files) or patching TeX itself? ## Longer version I wrote a program which performs certain transformations on (La)TeX code in mathmode. Until now I used to implement a _very_ simplified TeX interpreter (doesn't follow `\include`s/`\usepackage`s etc.), which filtered out code between the usual suspects (`$`…`$` pairs, `\begin`…`\end{equation}` etc.). This approach fails when facing newly defined math environments or constructs which only partly work in mathmode. So now I want to use the already existing TeX compiler to my advantage and want _it_ to filter the crucial mathmode parts out for me (I'd then use `\write18` or something to communicate with my external application). But I figured that redefining all the math environments or even the `$`…`$` or `$$`…`$$` pairs fails since this approach isn't safe against manipulation with symbol category codes (a user could just define `|` to be the new `$`). So far the only thing I found which was related to automatically finding mathmode environments are the commands `\everymath` and `\everydisplay`. Unfortunately, I can't seem to figure out how to use them to accomplish my goals.


title: Is there a command that expands to the current section name?

text: **Is there a command that expands to the current section name (which I can then use with`\index{}`)?** This is similar to Name of current section/figure, but I like to get the name of the section instead of the current type, also `\nameref{}` doesn't work when using index. I tried               \label{sec:foo} \index{\nameref{sec:foo}}      which will show the current section name in Index, but it's out of order with the other non-`\nameref{}` Index entries. I believe that's because they are hyperlinked.


title: change "Algorithm 1:" to "Algorithmus:" in algorithm package

text: I am using the algorithm package and I need my algorithm to be labeled as "Algorithmus: XYZ" instead of "Algorithm 1: XYZ" where XYZ is my caption for the algorithm.


title: Fonts: Is there any scientific proof about the choice?

text: It is common knowledge that the more you work with TeX, the more likely you are to make changes in the basic format so as to fit it in your needs. Of course, one of the most important things that people change are fonts. Fonts are crucial in good typesetting, and like the individuals who make choices based on their preferences and rational, you expect to have the same in that aspect as well. However, this is because of the preferences that people have per se . The point is if there are studies which can prove that a font is better than another in terms of readability and easiness for the eyes, and if so, why? What are the criteria and what is the correlation between font choice and a specific font family used?


title: A package to help with layout generation? Graph paper in the background?

text: Once in a while I have to create a layout given by several parameters, such as "left margin 3cm, logo 4 cm from the right margin, 2cm high" etc. Now I use geometry package an other helpers to create a layout, but I need to print out the result in order to check if everything is correct (well, I use Acrobat for that, but not everyone has access to it). What I am thinking: is there a package to put graph paper with a 1cm grid (and millimeter ticks) in the background, so I could easily check if my layout is correct?


title: can't \includegraphics eps files anymore with xelatex (used to work fine)

text: I've just noticed that (most likely caused by upgrading to opensuse 11.3 with TexLive 2009) whenever I try to \includegraphics{filename.eps} an eps file, I get the error:               Unable to load picture or PDF file      So documents that built fine now do not build anymore. I use XeLaTeX, and using eps used to work just fine without any special setup (that I can recall). I quickly tried including the epstopdf package and dropping the eps extensions, but I think this is for (pdf)latex only, not xelatex. My xelatex version is:               This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/openSUSE)      I'd like to be able to build my old documents again whilst having to do as little change as possible... I tried using `epstopdf` to convert my eps into pdf and then include the pdf. That works, but I'd prefer not having to convert all my eps and references to them if possible at all. Thanks for any suggestions **Edit:** not working on my Fedora13 system anymore either that uses version               2.2-0.996 (Web2C 7.5.6)      Example:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}     \usepackage{graphicx}     \begin{document}     \includegraphics[width=225pt,height=81pt]{magic2.eps}     \end{document}      or bundled with an eps file here


title: Change "et al" for "y col." in natbib

text: I'm using `natbib` to make the citations in my document. When I cite an article that has more than one author with `\citep{Ak-Suleimani1999}`, I have, in the output: > Ak-Suleimani et al., 1999 The problem is that I would like to have: > Ak-Suleimani y col., 1999 I had read that, with `biblatex`, it is a really easy thing to do: Replace `et al.` with `\& al.` But I didn't find a way to do this with `natbib`. I really would like to keep working with this package, so I don't have to change a lot of code trough my almost ready document.


title: How to indent every second stanza in verse environment?

text: I'm trying to typeset a poem to look like this:               The first line of first stanza     The second line of first stanza     The third line of first stanza         The first line of second stanza         The second line of second stanza         The third line of second stanza         The fourth line of second stanza     The first line of third stanza     The second line of third stanza         The first line of fourth stanza         The second line of fourth stanza      For this I'm using `verse` package which allows such indentation by using `\indentpattern` and specifying the number of lines in each stanza to be indented. The problem in my case however is that many stanzas have different number of lines so I would end up with ridiculous patterns like `\indentpattern{00011110011...}`. What I'm looking for is something like `altverse` environment, only for stanzas. If someone could suggest how to make one I would be very grateful. Minimal working example:               \documentclass{scrartcl}     \usepackage{fontspec}     \setmainfont{CMU Serif}     \usepackage{verse}          \begin{document}     \settowidth{\versewidth}{The first line of first stanza}     \poemtitle{Some Glorious Poem}     \begin{verse}[\versewidth]     The first line of first stanza\\     The second line of first stanza\\     The third line of first stanza              The first line of second stanza\\         The second line of second stanza\\         The third line of second stanza\\         The fourth line of second stanza          The first line of third stanza\\     The second line of third stanza              The first line of fourth stanza\\         The second line of fourth stanza     \end{verse}     \end{document}      The output it produces: ![Compiled document](http://i.stack.imgur.com/2Ez9Y.png)


title: Which arguments of `\includegraphics` cannot be set beforehand?

text: From the documentation of the `graphicx` package: > Most of the `keyval` keys used in the `graphicx` package may also be set > using the command `\setkeys` provided by the `keyval` package. > > For instance, suppose you wanted all the files to be included in the current > document to be scaled to 75% of the width of the lines of text, then one > could issue the following command: >   >   >     \setkeys{Gin}{width=0.75\textwidth} >   > > Here `‘Gin’` is the name used for the `keyval` keys associated with > ‘Graphics inclusion’. All following `\includegraphics` commands (within the > same group or environment) will act as if `[width=0.75\textwidth]` had been > specified, in addition to any other key settings actually given in the > optional argument. I am trying to use this to create an argument that accepts keys using the `pgfkeys` package and passes the ones it does not recognize on to an `\includegraphics` command. Here's a toy working example:               \documentclass[convert]{standalone}     \usepackage{graphicx,pgfkeys}          \newcommand{\mykeyset}[1]{\pgfqkeys{/me}{#1}}          \mykeyset{graphic options/.code={}}     \mykeyset{set graphic option/.style={graphic options/.append code=#1}}          %Set up a handler for unknown keys     \mykeyset{.unknown/.code = %         {%             \edef\unknownkey{\pgfkeyscurrentname}%             \mykeyset{set graphic option/.expand once = {\expandafter\setkeys\expandafter{\expandafter G\expandafter i\expandafter n\expandafter}\expandafter{\unknownkey=#1}}}%         }%     }          \newcommand{\myincludegraphics}[2][]{\begingroup%         \mykeyset{#1}%         \mykeyset{graphic options}%         \includegraphics{#2}%         \endgroup%     }          \begin{document}     \myincludegraphics[width = 5cm, height = 8cm]{example-image}     \myincludegraphics[scale=0.5]{example-image}     \myincludegraphics{example-image}     \end{document}      with output ![enter image description here](http://i.stack.imgur.com/GJYob.png) Note that this works for the `width` and `height` keys, but that not for the `scale` key. This is not a problem in itself--I have a method for handling the `scale` key separately--but I would like to know which other keys require special treatment. Hence, my question: **Which keys to the`\includegraphics` command cannot be set globally?**


title: LuaLaTex: Where do we stand as of 2014?

text: I've been impatiently waiting to switch from `pdfLaTeX` to `LuaLaTeX`, specially because it has been stated that the latter is the successor of `pdfLaTeX` (as described by Xavier in http://tex.stackexchange.com/a/126216/27833). My question is... what is the current situation, given that they _key_ questions are more than 6+ months old. **key questions** Which "TeX" should one use? Why choose LuaLaTeX over XeLaTeX? Using LuaTeX as a replacement for pdfTeX Drawbacks of XeTeX/LuaTeX Would you consider Luatex to be ready for a production environment Is it safe to turn `lua` now? Is still `XeTeX` better supported and better documented? Should we keep `pdflatex` for the moment? I know the immediate answer is "depends on what you want to do", so please think of the regular user who writes reports, a couple of articles and dissertations. Nothing too fancy, just a normal guy who uses _LaTeX instead of Word_ Do you see any immediate problems by switching to `LuaLaTeX` as of today? Most important: Any limitations? Any major advantages? What are the most biggest inconvenient of switching? What am I missing if I keep using `pdfLaTeX`? What would happen if I insist using it? Is a person who keeps using `pdfLateX` getting left behind?


title: Problem using bibtex with natbib - "couldn't open style file natbib.bst"

text: I am migrating across laptops. In my old laptop I have a .tex file which works just fine. However, when I use the same .tex and compile it in a new laptop in which I just installed the proTeXt system, it does not create the bibliography, and I get the message:               Process started: bibtex.exe "DTAGissues"          This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)     The top-level auxiliary file: DTAGissues.aux     I couldn't open style file natbib.bst     ---line 37 of file DTAGissues.aux     : \bibstyle{natbib      :                 }     I'm skipping whatever remains of this command     I found no style file---while reading file DTAGissues.aux     (There were 2 error messages)          Process exited normally      So, there seems to be a problem with natbib, but I don't understand it, as everything was working fine in my previous system. I use the lines below to include the bibliography:               %include the bibliography     \bibliographystyle{natbib}     \addcontentsline{toc}{section}{References}     \bibliography{C:/ctr/MainBibFile}      What might I be doing wrong here? I actually manege to make it work if I copy file natbib.bst into the folder where my .tex is, but that seems a patch rather than a solution? I tried adding natbib.bst to texmf folder but that does not work.


title: The exercise package in list form

text: I would like --- using the `exercise` package --- to make lists of exercises using the `ExerciseList` environment. The output is supposed to look like in the below example. ![Example from book](http://i.stack.imgur.com/sjVqS.png) The exercises are to be indented as shown, with the number to the left, like in an ordinary list environment. Can this be done within the `exercise` package? **EDIT:** In order to please @cfr, I hereby publish my own attempts at solving this problem. The code crashes painfully:               \documentclass[openright,book]{memoir}          %Dansk sprog:     \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}     \usepackage[T1]{fontenc}     \renewcommand{\danishhyphenmins}{22}     %\OnehalfSpacing %hvis der oenskes halvanden linjeafstand          %Pakker     \usepackage[noDcommand]{kpfonts} % the kpfonts font     \usepackage{%         amsmath,graphicx,enumerate,amstext,geometry,array,xfrac,bm,mathtools,siunitx,         %tikz, pgfplots         etoolbox, xparse, %til subexc         fixltx2e, %fikser et par bugs i LaTeX-kernen         microtype, %smaa fiks, der goer tekst lettere at laese         varioref,         }          \usepackage{exercise}     \renewcommand\ExerciseListName{} % I don't want any word like "exercise" anywhere     \renewcommand\ExerciseHeaderTitle{\Exercisetitle}          \renewcommand{\ExerciseListHeader}{\ExerciseHeaderDifficulty%         \item[\ExerciseHeaderNB]\ExerciseHeaderTitle\ %         \ExerciseHeaderOrigin\ignorespaces}          \renewenvironment{ExerciseList}{\enumerate[1]\beginExerciseListEnv}{\endExerciseListEnv\endenumerate}               \begin{document}          \begin{ExerciseList}         \Exercise What is this?         \Exercise What is that         \Question What in the world?         \subQuestion What is this?         \ExeText We define $x = y$.     \end{ExerciseList}          \end{document}


title: How to draw Kiviat Diagrams

text: > **This question led to a new package:**   >  `tkz-kiviat` Is there a way to draw Kiviat diagrams easily? ![Sample Kiviat diagram](http://i.stack.imgur.com/SohpY.jpg)


title: LaTeX: utf8 and \phantom

text: I'm sorry if this is already answered, but I'm way out of my league. I'm using a custom style package and it uses \phantom to keep stuff(like the toc) of the title page, but for other reasons I need to use               \usepackage[utf8]{inputenc}       and the template used               \usepackage[newansi]{inputenc}       and now the \phantom doesn't work. What can I do? In theory I just need to keep the front page clear (besides the style stuff), besides that it works fine. From the .sty....               \AddToShipoutPicture*{\put(79,670){\footnotesize{\AFLEVERINGSDATO}}}%     \phantom{Usynlig, men nødvendig}     \vspace*{5cm}      Error:               ./Bachelorprojekt.tex:110: Package inputenc Error: Keyboard character used is undefined []      That disappears if the \phantom is removed, so I guess that's the problem. The whole .sty has not been included - I can't get it to show like code and it's 133 lines,


title: How do I achieve this sort of numbering which mixes alphabets and numbers

text: I need to prepare a list of items   * item name ----- A.1   * item name ----- A.2   * item name ----- B.1   * item name is pretty long, so aligning is gone ----- B.2   * item name is so long it goes to next line ------ B.3 and so on. In fact, if you feel there is a better way of listing this items (this are actually the list of enclosing documents along with a letter) Please suggest so.


title: Loading a package conditionally

text: Is it possible to load some package from a .sty file only if some option is selected? (Naive approach `\DeclareOption{something}{\RequirePackage{something}}` doesn't work.)


title: Special case for last element with \foreach

text: I want to create a function that generates a list of equation references from a comma delimited input list. e.g.               \erefs{eq:first, eq:second, eq:third}     \erefs{eq:first}      yields, the following:               (\ref{eq:first}), (\ref{eq:second}), and (\ref{eq:third})     (\ref{eq:first})      I am able to take care of the 1 item list correctly , but am having trouble generating the 'and' for the last element. Any ideas on how to add the 'and' to this code?               \documentclass{article}     \usepackage{tikz, amsmath, hyperref}          \def\erefs#1{%      \gdef\firstelement{1}      \foreach \e [count=\ni] in {#1}{%        \ifnum\firstelement=0 , \fi %        (\ref{\e})%        \gdef\firstelement{0}%      }     }          \begin{document}     \begin{equation}\label{eq:first}\end{equation}     \begin{equation}\label{eq:second}\end{equation}     \begin{equation}\label{eq:third}\end{equation}     \erefs{eq:first, eq:second, eq:third}     \erefs{eq:first}     \end{document}      I need to use hyperref and amsmath packages concurrently **ADDITION:** I frequently use `\package{xr}` and `\externaldocument{...}` to refer to a technical appendix, and like to put `TA.` in front of those references. It would be nice if an optional parameter could be passed for a prefix I want to create a function that generates a list of equation references from a comma delimited input list. e.g.               \erefs{eq:first, eq:second, eq:third}     \erefs{eq:first}     \erefs[TA]{eq:first, eq:second, eq:third}     \erefs[TA]{eq:first}      yields, the following:               (\ref{eq:first}), (\ref{eq:second}), and (\ref{eq:third})     (\ref{eq:first})     (TA.\ref{eq:first}), (TA.\ref{eq:second}), and (TA.\ref{eq:third})     (TA.\ref{eq:first})


title: How to make sub figure referencing work in memoir + cleveref?

text: In the following example:               \documentclass{memoir}     \usepackage{cleveref}     \newsubfloat{figure}     \begin{document}          \chapter{Example}     \begin{figure}       \centering       \subtop[apple]{fig 100a\label{fig:100a}}\\       \subtop[orange]{fig 100b\label{fig:100b}}       \caption{Can you handle subfigures?}       \label{fig:100}     \end{figure}          \cref{fig:100a} and \namecref{fig:100b}.     \Cref{fig:100}     \end{document}      Both `\cref{fig:100a}` and `\namecref{fig:100b}` produce ?? The versions of packages used are: cleveref.sty 0.17.2 and memoir.cls v3.6.


title: How to center verbatim

text: \begin{figure}     \centerline     \begin{verbatim}     for (int a = 0; a < 10; a++)       for (int b = 0; b < 10; b++)          ...     \end{verbatim}     \caption{C++ code}     \end{figure}      I would like the figure to be centered, so I include `\centerline`. But this induces an error. How can I fix it?


title: What does error bars/.cd do?

text: In `pgfplots`, if you want error bars, you have to write `error bars/.cd` into each `addplot` that should have error bars. What does it mean and what does it do and why do I need it?


title: Get a specific item from table using datatool and print it

text: I'm using datatool to load a csv table. Students names are in that table (first column first name, second column last name) and I like to print them on the exam. In a related question, I asked how to print a student id number on each exam. In a similar way I like to print the names taken from the table on each exam. My first approach (I just like to print an arbitrary value) looks like this and unfortunately doesn't work:               \documentclass[       paper=A4,       fontsize=10pt     ]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{multido}     \usepackage{datatool}          \pagestyle{empty}          \newcounter{studentidcounter}     \setcounter{studentidcounter}{1}     \newcommand{\studentid}{%       \ifnum\thestudentidcounter<10\relax%       0\thestudentidcounter\else%       \thestudentidcounter\fi%     }          \DTLsetdelimiter{,}     \DTLloaddb[noheader=true]{members}{members.csv}          \DTLgetvalue{\studentsurname}{members}{1}{2}     \DTLgetvalue{\studentlastname}{members}{1}{1}          \newcommand{\studentname}[2]{#1 #2}          \begin{document}          \show\studentsurname          \multido{\nx = 1+1}{3}{         \input{examMain.tex}       \clearpage       %----------------------------------------------------------------------       % Uncomment next lines if exam has an odd number of pages.     %   \newpage     %   \mbox{}     %   \newpage       %----------------------------------------------------------------------       \stepcounter{studentidcounter}%       \setcounter{equation}{0}     }          \end{document}      So how can I achieve that the table is iterated within multido? And I need some kind of macro that I can use in examMain.tex to access the students full name? A possible example of members.cvs could look like this               Name1, FirstName1     Name2, FirstName2     Name3, FirstName3


title: Updating length variable inside longtabu working strangely

text: I have a table, and I want one column to show a running total on each line, i.e., it has to show the total of the values of another column up to that row. I thought about accumulating the total into a length variable (the numbers are floating point) and use a command to add values to it. So, when I used to use a longtable (not longtabu) for the table, it looked fine. Here's the example that worked correctly:               \documentclass[11pt,a4paper]{article}     \usepackage{tabu}     \usepackage{longtable}          \newlength\yyy     \setlength{\yyy}{0pt}     \newcommand{\yy}[1]{#1\global\addtolength{\yyy}{#1pt}\relax}          \begin{document}     \the\yyy     \begin{longtable}{l|r|r}     ID & Amount & Total\endhead     a & \yy{100} & \the\yyy\\     b & \yy{100} & \the\yyy\\     c & \yy{100} & \the\yyy     \end{longtable}          \end{document}      and its output (ignore the "pt", I haven't stripped it yet in this MWE): ![Correct result](http://i.stack.imgur.com/uDGqX.png) However, if I use longtabu (which I _need_ to use for other reasons), the values in the third column start from 700. Here's the example that bugs:               \documentclass[11pt,a4paper]{article}     \usepackage{tabu}     \usepackage{longtable}          \newlength\yyy     \setlength{\yyy}{0pt}     \newcommand{\yy}[1]{#1\global\addtolength{\yyy}{#1pt}\relax}          \begin{document}     \the\yyy     \begin{longtabu} to \textwidth {X[l]X[r]X[r]}     ID & Amount & Total\endhead     a & \yy{100} & \the\yyy\\     b & \yy{100} & \the\yyy\\     c & \yy{100} & \the\yyy     \end{longtabu}          \end{document}      and the output I get: ![Result not working](http://i.stack.imgur.com/0y1p6.png) Any idea of why this behaviour comes up? Thanks in advance.


title: BibLaTeX (chicago) - Single-spacing bibliography items

text: I'm using biblatex-chicago to format my dissertation, and everything works very well, except for one particular issue. My bibliography items are each double-spaced, rather than single-spaced, which is the format I need. I am using XeLaTeX, if that helps, and the biblatex-chicago authordate format. Here is a sample of the output I receive now: ![Imgur](http://i.imgur.com/SBrUPHL.png) I'd really like to get rid of that extra space between lines and have the spacing look exactly like this example: ![Imgur](http://i.imgur.com/RkjjDq5.png) Is there something I need to add in my preamble to achieve this? I looked through the BibLaTeX and BibLaTeX-chicago manuals and couldn't really find anything helpful, aside from perhaps `\bibitemsep.` Thank you very much in advance, and do let me know if you require any more information. EDIT: Here's the .cls file I'm using, per the requirements of my school: ufthesis.cls \-- and also a custom .sty they require us to use, ufenumerate.sty Here's a MWE:               \documentclass[12pt,dvipdfmx,final,CPage]{ufthesis}     \usepackage[dvipdfmx]{graphicx}     \usepackage{url}     \usepackage[letterpaper,hmargin=1in,vmargin=1in]{geometry}     \usepackage{lscape}     \usepackage{hanging}     \usepackage{setspace}     \usepackage{ufenumerate}      \usepackage[format=hang,justification=raggedright,singlelinecheck=0,labelsep=period]{caption}     \usepackage{fontspec}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage[autostyle=true,english=american]{csquotes}     \addbibresource{biblatex-examples.bib}     \usepackage{hypernat}     \usepackage[dvipdfmx,hyperfootnotes=false]{hyperref}     \hypersetup{colorlinks=true,linkcolor=blue,anchorcolor=blue,citecolor=blue,filecolor=blue,urlcolor=blue,bookmarksnumbered=true,pdfview=FitB}           \renewcommand{\topfraction}{0.85}     \renewcommand{\textfraction}{0.1}     \renewcommand{\floatpagefraction}{0.75}     \begin{document}     As\footcite[See][]{knuth:ct:a,knuth:ct:b} was discovered \textcite[210]{cicero} and \textcite[210]{wilde} \parencite[210]{cicero} and \cite[210]{wilde}.          \textcite{wilde,cicero} vs \parencite{wilde,cicero}.\footcite{wilde}          \textcite{baez/article,wilde,cicero} vs \parencite{baez/article,wilde,cicero}.     \printbibliography[title=REFERENCES]     \end{document}      I did try the {\singlespacing\printbibliography} command, but it did not change anything. Hopefully this extra information should help. EDIT: even slimming down the MWE per your suggestions, the issue still occurs. I'm required to use many of these options for my .cls, so it's not really feasible to remove any of them. I've tried to cut out the worst of the cruft, because there certainly is some there.


title: Redefine default color of todonotes

text: I'm using the `todonotes` package with the article class to take class notes, and using the todos as markers (date, comments and so on) so I don't want to use the bright orange, which steals focus. I wanted to redefine the default color value as demonstrated in the todonotes readme (and change the color value to my liking):               \newcommand{\todoredefined}[2][]     {\todo[color=red, #1]{#2}}      But nothing changes. Here's a MWE with all the packages I have loaded, should they have some known problems with todonotes:               \documentclass{article}     \usepackage{gensymb}     \usepackage[icelandic]{babel}      \usepackage[T1]{fontenc}       \usepackage{amsmath}     \usepackage{siunitx}     \usepackage{todonotes}     \usepackage{enumerate}     \usepackage{mhchem}     \usepackage{hyperref}          \newcommand{\todoredefined}[2][]     {\todo[color=red, #1]{#2}}          \begin{document}         Something\todo{This should be red by now...}     \end{document}      When I compile this code I still get orange todos. Am I overlooking something or is this code sample obsolete?


title: how to disable Babel for some text

text: I want to write this :               (username:password)      this :               \documentclass{article}     \usepackage[frenchb]{babel}          \begin{document}        (username:password)     \end{document}      give me :               (username :password) % there a space added by babel before ':'


title: how to set margins in A3 page when using the KOMAoptions command inside an A4 document

text: I am inserting an A3 page in an A4 document using the **KOMAoptions** command:               \afterpage{ % Insert after the current page     \clearpage          \KOMAoptions{paper=a3}     \recalctypearea     \begin{figure}[htbp]         \centering         \includegraphics[width=1.0\textwidth]{business-schema.png}         \caption{\texttt{vo business} schema tables}     \end{figure}     \clearpage     \KOMAoptions{paper=A4,pagesize}     \recalctypearea     }      However I'm totally at a loss when trying to change (reduce) the margins on that A3 page. I tried using \newgeometry commands but they changed the size back to A4. Currently the margins I get are too wide, both horizontally and vertically: ![enter image description here](http://i.stack.imgur.com/Pfg5k.png)


title: Images in table going over cell lines,

text: I'm trying to create a table with a few images in and it's mostly done apart from the images seemingly overlap with the cell lines deleting them. A shorter MWE is below (the full table will contain around 20 images) along with a picture of what's happening, if anyone could help me with justifying the images within the cells as well that would be great.               \documentclass{report}     \usepackage{longtable}     \usepackage{graphicx}          \begin{document}     \\begin{center}     \begin{longtable}{|l|l|l|}      \caption{Molecular structures of the molecules chosen in the blind test}\label{big_tab} \\     \hline Molecular Structure & Category & Blind test \\ \hline      \endfirsthead          \multicolumn{3}{c}%     {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\     \hline Molecular Structure & Category & Blind test \\ \hline      \endhead          \hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline     \endfoot          \hline \hline      \endlastfoot          \includegraphics[width=1in]{I.png} & i & \multicolumn{ 1}{c|}{1st} \\ \cline{ 1- 2}     \includegraphics[width=1in]{II.png} & ii & \multicolumn{ 1}{l|}{} \\ \cline{    1- 2}     \includegraphics[width=2in]{III.png} & iii & \multicolumn{ 1}{l|}{} \\   \hline     \includegraphics[width=1in]{IV.png} & i & \multicolumn{ 1}{c|}{2nd} \\  \cline{ 1- 2}     \includegraphics[width=1in]{V.png} & ii & \multicolumn{ 1}{l|}{} \\ \cline{ 1- 2}     \includegraphics[width=2in]{VI.png} & iii & \multicolumn{ 1}{l|}{} \\ \hline     \end{longtable}     \end{center}          \end{document}      ![enter image description here](http://i.stack.imgur.com/BoDW7.png)


title: pgfmathprintnumber in bold and/or sans serif

text: I've set some pgfkeys such as `precision=2` and `use comma`. Now I wonder how do I get the results of               \pgfmathprintnumber{123.567}      to be bold and/or sans serif? I thought this is easy, but everything I find online is just concerning plots, and does not work for me.


title: How to show a hint when lstlisting is breaking page?

text: I use inline lstlisting-blocks with caption. I have several listings that are running over more than one page or starting at the end of a page. Now I want to place a hint for the readers, that the listing hasn't ended and goes further on the next page. This hint should be something like "further listing on next/the next but one page". I have searched in the section 4 of the listings package manual and haven't found such parameter yet. Is there a possibility to show such a hint?


title: Using minitoc in included chapters?

text: I'm writing a thesis. It is structured as a main `thesis.tex` document, that uses `\include` to include individual chapters written in separate documents. I would like to include a mini-toc at the beginning of each chapter. Minitoc works when I write `\minitoc` in the main `thesis.tex` document, but not when I write `\minitoc` in the individual included chapter documents. For example, my main document contains:               \documentclass[oneside,11pt]{LatexFiles/ThesisClass/MMCCDPhil}     \begin{document}          \frontmatter          \dominitoc     \tableofcontents       \newpage     \listoffigures     \listoftables          \mainmatter          \include{Chapters/introduction}     \include{Chapters/materials}     \include{Chapters/one}     \include{Chapters/two}     \include{Chapters/three}          \end{document}      and my individual chapters would contain:               \chapter{introduction}     \minitoc     \section{section one}     \section{section two}      In this case, no minitoc is printed in the document. when I put it all in a single document:               \documentclass[oneside,11pt]{LatexFiles/ThesisClass/MMCCDPhil}          \begin{document}          \frontmatter          \dominitoc     \tableofcontents       \newpage     \listoffigures     \listoftables          \mainmatter          \chapter{introduction}     \minitoc     \section{section one}     \section{section two}          \include{Chapters/materials}     \include{Chapters/one}     \include{Chapters/two}     \include{Chapters/three}          \end{document}      the minitoc prints out just fine for the introduction. Any ideas what I'm doing wrong?


title: Selecting grammatical form depending on programatically defined cardinal number (a la ngettext)

text: There are many languages where grammatical form depends on number of elements described. In English it is singular and plural form (plural usually but not always is generated by adding suffix 's', but see e.g. mouse / mice), in other languages it can be more complicated, as described in gettext manual. What I'd like to have is a macro which choses grammatical form depending on number, e.g. `\nn{\nmice}{mouse}{mice}` for English, which would output _1 mouse_ but _2 mice_. For Polish I would also have to employ some package for integer calculations involving conditionals and modulo               Plural-Forms: nplurals=3; \               plural=n==1 ? 0 : \                      n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;      and e.g. `\nn{\nmice}{mysz}{mysze}{myszy}`. The above formula (taken from mentioned above gettext documentation) means that in Polish you have _1 mysz_ (singular, 0th form), _2, 3, 4, 22, 23, 24 mysze_ (remains of old dual form, 1st plural form), but _5, 6, 7, 11, 12, 13, 14, 25 myszy_ (plural form, 2nd plural form). Nb. Slovenian has 4 plural forms.


title: Serious problems with table layout

text: I have some issues when creating my OLS regression in LaTeX and really hope, that some of you could help me. (I do not know how to make more columns and to add text like: dependent/independent/reference) I would like to create a table, which look like this: ![enter image description here](http://i.stack.imgur.com/O3JjY.png) My preamble look like this:               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[english]{babel}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes,arrows,positioning,calc,threeparttable}      \usepackage{tabu}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{array}     \usepackage{multirow,tabularx,booktabs}     \begin{document}          \begin{table}[H]     \centering     \begin{threeparttable}     \caption{OLS}\label{OLS}     \medskip     \begin{tabular*}{1.0\textwidth}{       @{\extracolsep{\fill}}       l       S[table-format=4.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=2.0]     }     \toprule     & \multicolumn{2}{c}{Name1 Option1/Option2} & \multicolumn{2}{c}{Name2 Option1/Option2} & \multicolumn{2}{c}{Name3 Option1/Option2} & \multicolumn{2}{c}{Name4 Option1/Option2} \\     \cmidrule(lr){2-3} \cmidrule(lr){4-5}     & {Model 1} & {Model 2} & {Model 3} & {Model 4} & {Model 5} & {Model 6} & {Model 7} & {Model 8}      & & {Factor} & {Factor} & {Factor} & {Factor} & {Factor} & {Factor} & {Factor} & {Factor} & {Factor} & {Factor}       \\     \midrule     Name 1 & 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) \\     Name 2 & 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) && 0.39 (0.49) \\      Name 1 x Name 2 & & 0.39 (0.49) & &  0.39 (0.49) & &  0.39 (0.49) & &  0.39 (0.49) \\      R2 \\      Name 1 \\      Name 2 \\      \bottomrule     \end{tabular*}     \begin{tablenotes}     \item[Note:] Long note     \end{tablenotes}     \end{threeparttable}     \end{table}      If the lines below "Option1/Option2" could be like this, it would be perfect. ![enter image description here](http://i.stack.imgur.com/e3bS9.png) All comments and other OLS setups are OK. Here Mico:               Name 1$\times$ \ \ \ Name 2 & & 0.39 & & 0.39 & &  0.39 & & 0.39 \\      & & (0.49) & & (0.49) & & (0.49) & & (0.49) \\      ![enter image description here](http://i.stack.imgur.com/sxl0n.png) A.F. -- It should be:               Name 1$\times$ & & 0.39 & & 0.39 & & 0.39 & & 0.39 \\      \ \ \ Name 2   & & (0.49) & & (0.49) & & (0.49) & & (0.49) \\      ![enter image description here](http://i.stack.imgur.com/Jy4uL.png) I daresay there's no danger, especially if "Name 2" is indented a bit, of your readers starting to think that " Name 2" is a different variable...


title: How to not print the day/month of a BibLaTeX reference?

text: `BibLaTeX` seems to recommend1 the yyyy-mm-dd format for dates such as :                date = {1989-03-12}      I have no objection to this format _but_ I would like to be able to cite without printing the month and the day. With old BibTeX date fields, it was easy : the fields were :               month = mar,     year = {1989},      So, I used to add `\AtEveryBibitem{\clearfield{labelmonth}}` to my .tex files. How can I get rid of the month and the day with this new (BibLaTeX) format? P-S : I precise I cannot modify my .bib file. * * * 1: BibLaTeX manual says : "If there is no date field in an entry, biblatex will also consider the fields year and month for backwards compatibility with traditional BibTeX." (p.34) which indicates that fields `year` and `month` are obsoletes with BibLaTeX.


title: multiline bitbox

text: I have the following figure               \begin{bytefield}{31}     \bitheader{0-31}       \bitbox{120}{Head}       \bitbox{8}{Tail}     \end{bytefield}      Is it possible to make the `Head` bitbox line-break at 32 bytes so it fits the `bytefield`?


title: Strange error generated after another error and related to aux files (Xe(La)TeX)

text: With short files, if I get an error, I correct it, retypeset, and that's it. If the document becomes long enough (I don't know how many lines are required at least to get it, but I think 1000 should do it), when I retypeset, no matter what, I always get an error like:               ./app_An_2.tex:441: File ended while scanning use of \@writefile.       <inserted text>       \par       l. 441 \begin{document}        where `app_An_2.tex` is the name of my file. If I trash the `aux` files, the error vanishes. Why does that happen? Part of the answer lies in the fact that below a certain number of lines the .aux file is left empty throughout the typesetting till the `Undefined control sequence` is found, whereas above that number (which seems to be around 4 hundred and sixty-something) after typesetting you find the .aux file has something in it. Usually the last line is an incomplete `\@writefile{toc}`, even removing the `\tableofcontents` command from the file and not letting there BE ANY .toc file. So why does all that happen above 460-something lines and not below that, and why ON EARTH does it `\@writefile{toc}` when there is neither any `\tableofcontents` in the .tex file nor any .toc file in the folder of the .tex file?


title: problem with powerdot

text: After updating some packages of MiKTeX 2.9 (automatic update), it's impossible to obtain a ps file following the root : tex-> dvi->ps. ghostview fails to display the file. Here below a minimal example:               \documentclass{powerdot}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     %\usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[french]{babel}     \usepackage{amsmath,amssymb}     %\usepackage{psfrag}     %     \begin{document}     \begin{slide}{D1}     bla bla bla     \end{slide}     \end{document}


title: Column Vector Sweave \Sexpr

text: I'm having big problems trying to compile a file using Sweave displaying a vector defined in an R chunk, as a column vector in Latex using pmatrix, I have something like this:               <<echo=FALSE>>=     B=c(1,2,3,4,5,6)     @          We have the vector $B$ defined as     $$B=\begin{pmatrix}     \Sexpr{print(paste(b,collapse='\\'),quote=FALSE}     \end{pmatrix}$$      If I change the text collapse argument to anything don't having a backslash I got no problems, but I need to use the backslash so I can have every number in a different row. Running Sweave returns this error:               \Sexpr{print(paste(b,collapse='\\'),quote=FALSE}     The control sequence at the end of the top line     of your error message was never \def'ed.


title: \makeatletter explained

text: I am using the following code in my beamer document to make the frame title's appear in the table of contents:               \documentclass{beamer}     \usetheme{default}     \usepackage{bookmark}     \usepackage{etoolbox}     \usepackage{graphicx}          \makeatletter     \apptocmd{\beamer@@frametitle}{       \addtocontents{toc}     {\protect\beamer@subsectionintoc{\the\c@section}{0}{#1}         {\the\c@page}{\the\c@part}         {\the\beamer@tocsectionnumber}}         \bookmark[page=\the\c@page,level=3]{#1}}       {\message{** patching of \string\beamer@@frametitle succeeded **}}%       {\message{** patching of \string\beamer@@frametitle failed **}}%     \makeatother          \begin{document}     \begin{frame}[label=toc]{Table of Contents}         \tableofcontents         \end{frame}     \section{First Section}       \begin{frame}{One}          content     \end{frame}      \section{Second Section}     \begin{frame}{Two}          Content      \end{frame}          \section{Third Section}         \begin{frame}{Three}          Content          \end{frame}     \end{document}      What I am trying to do is understand what the solution does because I now want to add block titles to the table of contents as well as frame titles and I imagine that would be an easy function to add if I understood the code. Please help by re-writing the code (if possible) without the `\makeatletter` substitution command, using other latex commands. Here are some related posts: Make each frame (not slide) appear in the PDF bookmarks with beamer What do \makeatletter and \makeatother do?


title: How to have pgfplotstable ignore rows with no entries in certain columns?

text: I have data from a large .csv file. Simplified, it looks like this:               TypeI,  TypeII,  Data     A,      ,        3     B,      ,        1     ,       C,       4     ,       D,       1      I've made symbolic x-coordinates for TypeII with `symbolic x coords={C,D}`. I'd like to _only_ plot they TypeII data using `\addplot table[x=TypeII,y=Data]{\mydata};`. When I try this, the problem is that it doesn't know what to do with the blank entries in the TypeII column. The error message is "Sorry, the input coordinate `' has not been defined with symbolic x coords={C,D}..." Is there a simple parameter to tell `\addplot` to ignore row/column combinations that are incomplete?


title: How does xelatex change an image

text: I have a particular logo image saved as a `pdf` file that I can include fine with `pdflatex`, but when I compile with `xelatex` the compilation fails. I think the issue is essentially the same as in this question, although my error message is different, and the answer to that question solves my `LaTeX` problem. Specifically, if I process `logo.pdf` with `pdftops/epstopdf`               pdftops logo.pdf     epstopdf logo.ps      and then run `xelatex` everything compiles fine. Consider the following MWE `tex` file (`logo.tex`)               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \includegraphics{logo.pdf}     \end{document}      and processing chain               pdftops logo.pdf     epstopdf logo.ps     xelatex logo.tex      How does the resulting `logo.pdf` differ from the original `logo.pdf`? I am curious about the effects of both `pdftops/epstopdf` and `xelatex` as well as if `pdflatex` was used instead. The question is loosely motivated by my desire to decide if using the above processing chain would violate the spirit of licenses like CC BY-ND. I hope by understanding the differences, I can make a less uninformed decision.


title: Creating a PDF bookmark that goes straight to a section heading, not above or below it.

text: **Is it possible to create a new bookmark to a section heading that is not listed in the Table of Contents (i.e., using the starred form —`\section*{A title}`)?** `\pdfbookmark` (part of hyperref.sty) or `\bookmark` (part of bookmark.sty) only appear to create a bookmark to the location to where the command is issued. However, placing this either before, within, or after the `\section*{}` command does not create the correct effect: clicking on the bookmark in a PDF viewer links to the the wrong place. Specifically, it doesn't link to the TEXT portion of the section heading, like a normal `hyperref`-ed section heading/bookmark but instead to the space above the heading (which can be the previous page if the section is on a new page), or immediately BELOW the section heading (thus hiding the heading!). Using `\phantomsection` and then `\protect\label{}` issued within the `\section*{}` command works with the `\hyperref{}{}` command in linking to the section heading, bringing the user straight to the heading title. Great! It's just this same basic principle in PDF bookmarks that I couldn't figure out. If only I could issue a `\pdfbookmark`-like command that goes directly to this same `\label`, that would be just perfect! Edit: I also need to be able to specify the bookmark name (i.e., the text that's displayed in the bookmarks section in a PDF viewer), rather than use the name of the section itself (which can be very long in my work). Any help would be appreciated. I've literally spent days experimenting and nothing seems to be possible at the moment, but I'm sure there is a way! Thank you for your time.


title: How do you center equations?

text: I can't seem to center equations without causing some weird formatting problem. The following results in the R being dropped:               \begin{center}      E(R_{i,t})=E(\alpha_i)+E(\beta_{i,F_1 } F_{1,t})+E(\beta_{i,F_2 } F_{2,t})+\ldots+E(\beta_{i,F_m } F_{m,t})\linebreak     \bar{R}_{i,t}=a+\hat{\beta}_{i,F_1 } E(F_{1,t})+\hat{\beta}_{i,F_2 } E(F_{2,t})+\ldots+\hat{\beta}_{i,F_m } E(F_{m,t})\linebreak     \bar{R}_{i,t}=a+\gamma_1\hat{\beta}_{i,F_1 } +\gamma_2\hat{\beta}_{i,F_2 } F_{2,t}+\ldots+\gamma_m\hat{\beta}_{i,F_m }     \end{center}      Any ideas? Is {center} the wrong thing to use?


title: How to insert a personalised centred horizontal line separation in a thesis title page

text: I am trying to insert a horizontal line to separate the title of my thesis and the subtitle that simply describes that it is a PhD Tesis. However I have played around with `\hrule` and `\hfill` commands with little pleasantly aesthetical results. How I would like the line to be is as follows:   * For the line to not be immediately attached to the title (as in the MWE) but rather be a customisable short distance away.   * To be a customisable distance above from the `\subtitle`.   * For the line to not span the text space width and to be centred, and its distance to be customisable, but lets say 1/3 of the text space width. Potentially I would like the possibility for it to be a fancy line such as a double line with the top one bold and the lower one less so, but that is currently of lesser importance. Please find below my MWE, thank you.               \documentclass[     DIV=11,     %fontsize=12,     twoside,     headinclude=false,     titlepage=firstiscover,     abstract=true,     headsepline=true,     footsepline=true,     chapterprefix=true, %this allows for editing of the chapter titles     headings=big,     bibliography=totoc,%adds unnumbered Bibliography chapter to toc     captions=tableheading     ]{scrreprt}          %%%%%%%%%%%%%%%%%%%%% PREAMBLE     %%%%%%%%%%% Packages     \usepackage[left=2cm,right=2cm,top=2.5cm,bottom=3cm]{geometry}     \usepackage{setspace} %using this package allows one to not need to know the stretch value associated with the DIV factor chosen to achieve the chosen linespread. It has to be noted that for a title page the line spacing should be reset and that this spacing is NOT applied to footnotes and floats of table and figure captions.     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{minitoc}      \usepackage{notoccite}     \usepackage{kpfonts}     \usepackage[T1]{fontenc}     \usepackage{acro}     \usepackage[hidelinks     ,bookmarksopen=true,bookmarksopenlevel=4 %This is for the appendix command formulated     ]{hyperref}     \usepackage{tensor}     \usepackage{siunitx}     \usepackage{wasysym}               \linespread{1.5} %imperial uses 1.5      \flushbottom          %%%%%%%%%%% STYLING     \makeatletter          \def\phdtitle#1{\gdef\@phdtitle{#1}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TITLE PAGE     \def\titlepagehere{         \titlehead{             \Large \centering  \phantom a             An Awesome College of Science \& Technology         }         \subject{Department of Happiness \\            %\includegraphics[width=4cm]{}         }         \title{\@phdtitle \\         \hrule %%%%%%%%%%%%%%%%%%%%%%%%%%% Line here...         }              \subtitle{\hrule %%%%%%%%%%%%%%%%%%%%%%%%%%% ...or line here?         \\ PhD Thesis}              \author{Best Author}         \date{             \vskip 1cm             \normalsize Submitted \\             \Large October 2014 \\             \vskip 1cm             \normalsize Supervisors: \\             \Large Super. Man \\             Cool. Dude \\             \vskip 1cm             \large Submitted in part fulfilment of the requirements for the degree of             Doctor of Philosophy in Life Long Happiness College         %\publishers{}             }         \makeatother}          \begin{document}     %%%%%%%%%%%%%%%%%%%%% TITLE PAGE     %%%%%%% WRITE TITLE HERE     \phdtitle{Super Long and Complicated Title for an Awesome Thesis that is at least 2 lines long}          \titlepagehere     \maketitle          %%%%%%%%%%%%%%%%%%%%%%% CHAPTERS     %\body          \chapter{Test}          Test          \end{document}