title: LaTeX glossary reference problem

text: In my master thesis, I use the glossaries package to keep track of all my abbreviations and symbols. To differ between the two, I made two different glossaries. One using the standard abbreviation package and one I defined myself, the symbol list (I used my own style because I needed four columns, one for the symbol, one for the units, one for the description and one for the pages). I also use both a Roman and an Arabic numbering. When I click a reference in the (symbol) glossary, it redirects correctly to the location in the text. But when I click the (symbol) reference in the text, it redirects to the first page (instead of the correct location in the symbol list). However, for the abbreviation list it does work correctly. The error must be in the definition of my new style. Even when you remove the change in numbering, it still redirects to the first page. `hyperrefname` doesn't seem to solve the problem. How can I fix it? I included a minimal working example (MWE) that you can run using all the packages and a Perl compiler.               \documentclass[a4paper]{book}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{hyperref}     \hypersetup{colorlinks=true, linkcolor=Maroon, citecolor=ForestGreen, filecolor=magenta, urlcolor=magenta, hypertexnames=false}          %% Glossary properties     \usepackage[nomain,acronym,toc,section]{glossaries}     \newglossary{symbol}{sbl}{smb}{Symbols}     \usepackage{array}     \makeglossaries     \usepackage[xindy]{imakeidx}     \makeindex          %% My own glossary to display the units     \newglossarystyle{tabx4col}{%     % Put the glossary in a longtable environment:     \renewenvironment{theglossary}%     {\begin{longtable}{@{}p{0.12\textwidth}@{}p{0.12\textwidth}@{}p{0.56\textwidth}rp{0.15\textwidth}}}%     {\end{longtable}}%     \renewcommand*{\glossaryentryfield}[5]{%     \glstarget{\textbf{##1}}{\textbf{##2}}% Name      & $[$\glsentryuseri{##1}$]$% Units      & ##3% Description      & ##5% Page list             \\% end of row     }%     %% Nothing between groups:     \renewcommand*{\glsgroupskip}{}%     }          %% Abbreviations     \newacronym{abr1}{ABR1}{Abbreviation 1}     \newacronym{abr2}{ABR2}{Abbreviation 2}          %% Symbols     \newglossaryentry{sym1}     {%       type=symbol,       name={\ensuremath{\alpha}},       description={The first symbol, with a very long description that spans multiple lines},       user1={kg},       sort=alpha     }     \newglossaryentry{sym2}     {%       type=symbol,       name={\ensuremath{\beta}},       description={the second symbol},       user1={m},       sort=beta     }          \begin{document}     \pagenumbering{roman}     \tableofcontents     {\let\cleardoublepage\clearpage         \chapter*{List of abbreviations and symbols}         \addcontentsline{toc}{chapter}{List of abbreviations and Symbols}         \printglossary[type=\acronymtype,title=Abbreviations,toctitle=Abbreviations]         \printglossary[type=symbol,style=tabx4col]     }     \chapter{Introduction}     \pagenumbering{arabic}     \gls{abr1} \gls{abr2} \gls{sym1} \gls{sym2}     \chapter{First chapter}     \gls{abr1} \gls{abr2} \gls{sym1} \gls{sym2}     \end{document}


I have a problem with alignment one picture in a table. I can not understand, How to alignment picture in cell in a table. Please help me. Thank you in advance. **LATEX**               \begin{figure}     \centering                 \begin{tabular}{cccccccc}                     \toprule                     Objekt & Treffer & \multicolumn{2}{c}{Ausreißer}\\                     %\cmidrule{3-4}                     & & Objekt & Platzierung \\                     \midrule                     \raisebox{-.5\height}{\includegraphics[width=0.2\textwidth]{Bueste_1.jpg}} & 6                          & \raisebox{-.5\height}{\includegraphics[width=0.1\textwidth]{Bueste_8.jpg}} & 25 \\                     \midrule                         \multirow{2}{*}{                \includegraphics[scale=0.4]{Bueste_2.jpg}}                          & \multirow{2}{*}{5}    &   \includegraphics[width=0.08\textwidth]{Bueste_7.jpg} & 13\\                         \multicolumn{2}{c}{}    & \includegraphics[width=0.08\textwidth]{Bueste_8.jpg} & 24 \\                 \bottomrule             \end{tabular}     \caption{Mit Normalisierung}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/JSWld.jpg) latex source to table https://www.dropbox.com/s/lvfm9po4xlid0pp/tabelle.tex picture source https://www.dropbox.com/s/ds3kih9nuq601n5/img.rar


title: Acknowledgement page + report

text: I'm writing a report and I want to place the Acknowledgement page without `\section` because it will number it 0.1 I tried to place it in another TeX document and use `\input` in the main document, but it did not work.


title: Optional argument within another optional argument in biblatex \cite

text: What is the right way to define a macro with an **optional** argument that can be called within the `<postnote>` optional argument to biblatex `\cite`? The last two `\cite` below don't work. (Unless they are enclosed in braces as the third and fourth `\cite`) ![enter image description here](http://i.stack.imgur.com/6q8na.jpg)               \documentclass{article}     \usepackage{xparse}     \usepackage[backend=biber, style=authortitle]{biblatex}     \usepackage{ifthen}     \usepackage{filecontents}          \DeclareFieldFormat{postnote}{#1}     \bibliography{mybib.bib}          \begin{filecontents}{mybib.bib}     @Book{mykey, author={Author}, title={Title}, journal={Journal}, year={1950}}     \end{filecontents}          \newcommand         \x [2][] {\ifthenelse{\equal{#1}{}}{}{(#1)}#2}     \NewDocumentCommand \y {mo}  {#1\IfValueT{#2}{(#2)}}          \begin{document}          \cite [\x{100}]      {mykey}          \cite [\y{100}]      {mykey}          \cite [{\x[a]{100}}] {mykey}          \cite [{\y{100}[a]}] {mykey}          \cite [\x[a]{100}]   {mykey}          \cite [\y{100}[a]]   {mykey}          \end{document}


title: Can't find a SIAM Label Error

text: I'm using winedt 6.0 and a SIAM template in my document. When I compile, I get an error message stating:               ! SIAM Label Error: There were multipy-defined labels          Correct multiply-defined labels.     Type H <return> for immediate help.     ...     l.14 \newlabel{L2norm}{{2.2}{3}}      Based upon the last line, I presume the duplicate label is L2norm. Am I correct to assume this? I followed the advice on this post to find this multiply defined label. As it turns out, I used to have a label 'L2norm', but have since changed it to 'L2normerr'. No other labels are have this string and I haven't found any other duplicate labels (just using a `<ctrl-f>` search). I'm sure I'm misunderstanding something, but I'm not sure what... Please help! :)


title: Passing a variable from TeX to R in Sweave

text: I know it is possible to use `\Sexpr` to pass information from an R chunk to LaTeX. For example,               <<echo=F,results=hide>>=     a = 7     @         42 is the answer to 6 x \Sexpr{a}      Is there an equivalent way to pass information from LaTeX to R? For example,               \foreach \n in {1,...,7}{     <<echo=F,fig=T,include=T>>     x=1:10     plot(x,x^(\n)-x)     @


title: ClassicThesis to B5paper

text: I'm using ClassicThesis v.4.1. for my Thesis. The thesis should be published in B5 size. How do I adapt `classicthesis` (A4) to B5? I have tried               \usepackage[a4paper,layout=b5paper,twoside,layouthoffset=17mm,layoutvoffset=23.5mm, showcrop]{geometry}      It gives me A4 paper with cropmargins for B5 paper. When cropped, margins are marginal and the footer and header are cropped out. What I really would like it to be is to have B5paper with reasonable font size and reasonable margins.


title: Customize auto-completion in Texmaker to give multiple arguments to a function

text: So i saw this question, and it does what i want. Almost. yes it works for `\cref{#label#}`, but `\cref{}` can also take a list of labels, is there a way to make this work? I can't see any other options in there with a signature like `\cref{#label#, #label#, #label#}`. Is this possible?


title: What does 'texmf' stand for?

text: Just a (simple) short question: Why is the LaTeX root directory called `texmf`? Is there a meaning of the mf ending?


title: Justify a text inside a figure environment

text: I insert several figures in my document, but I am unable so far to fully justify the text just below the caption: "BLA BLA BLA"               \begin{figure}        \centering      \caption{NICE TITLE}\label{graph:p}     \begin{flushleft}BLA BLA BLA     \end{flushleft}     \includegraphics[width=0.8\textwidth]{FIG.png}\\     \end{figure}     \clearpage      I use `flushleft` because otherwise my text is centered (which is logic since I use the command `\centering`). Without `\centering` and without `flushleft` the text BLABLA is still centered.. Do you have an idea? I use the `\documentclass[11pt]{scrartcl}`.


title: How can I define a macro with literal square brackets in the body?

text: The following macro works correctly for enclosing an expression in parenthesis.               \def\group#1{\left ( #1 \right )}      I want to write the equivalent macro for enclosing an expression in square brackets. I have tried the following macro with and without backslash-escaping the the square brackets, but both give errors.               \def\bgroup#1{\left [ #1 \right ] }       How can I define a macro with the desired expansion?


title: How can I rotate \in by 90 degrees?

text: I am currently trying to show the domain of variables in a simple equation:               \[\begin{matrix}         x & \cdot & W_{1,2} & = & o\\         \in & & \in & & \in\\         \mdr^{1\times n} & & \mdr^{n \times m} & & \mdr^{1 \times m}     \end{matrix}\]      ![enter image description here](http://i.stack.imgur.com/Jy9vt.png) There are some more issues with this way to show the domain of variables, but this question is mainly about the rotated `\in`. ## Failed tries I've tried `\usepackage{rotating}`:               \[\begin{matrix}         x & \cdot & W_{1,2} & = & o\\         \text{\begin{rotate}{-90}$\in$\end{rotate}} & & \in & & \in\\         \mdr^{1\times n} & & \mdr^{n \times m} & & \mdr^{1 \times m}     \end{matrix}     \]      The result looks like this: ![enter image description here](http://i.stack.imgur.com/Ca5V9.png)


title: How to use caption and label in grammar environment?

text: I can't manage to add a caption and a label to my grammar environment:               \documentclass{article}          \usepackage{syntax}     \grammarindent 80pt          \begin{document}          \begin{grammar}     <condition> ::= "$" <element> "$ = " <value>          <element> ::= <field> \alt <property>     \end{grammar}          \end{document}


title: Breaking inline equation at several punctuation characters

text: I am trying to define a command which automatically allows linebreaks inside inline equations at several punctuation characters — I am aware of `\allowbreak` but don’t want to manually insert it; here, I am dealing with the comma and the semicolon. Following this thread, I wrote the following:               \documentclass{article}          \makeatletter     \mathchardef\m@thcomma\mathcode`\,     \mathchardef\m@thsemicolon\mathcode`\;     {       \catcode`,=\active       \catcode`;=\active       \gdef,{\m@thcomma\discretionary{}{}{}}       \gdef;{\m@thsemicolon\discretionary{}{}{}}     }     \makeatother          \newcommand*{\breakpunc}[1]{%       \begingroup%       \mathcode`\,=\string"8000%       \mathcode`\;=\string"8000%       #1%       \endgroup%     }          \begin{document}     %     \framebox{%       \parbox{1cm}{%         \( \breakpunc{a, b, c; d, e, f} \)%       }%     }\quad%     %     \framebox{%       \parbox{1.5cm}{%         \( \breakpunc{a, b, c; d, e, f} \)%       }%     }%     %     \end{document}      which gives the desired result: ![breakpunc result](http://i.stack.imgur.com/yrqeA.png) However, when I load the `babel` package with French language, the TeX engine enters an infinite loop during compilation. I am not familiar with category codes but, in all likelihood, there is a conflict between `frenchb` and the way I make the characters `,` and `;` active and redefine them. I noticed that everything seems to be fine if I only deal with the comma in the command `\breakpunc`. I am willing to make a local redefinition of the characters `,` and `;` so there might be a “better” and cleaner solution to achieve what I want, a solution which would not conflict with what other packages make with those characters. My question is: do you know one?


title: Referring to a whole line of code instead of a line number

text: This code fits quite nicely my needs:               \documentclass{article}     \usepackage{xcolor}     \usepackage{listings}     \usepackage{lipsum}     \usepackage{hyperref}          \usepackage{lstlinebgrd}     \definecolor{myComment}{rgb}{0.0,0.5,0.0}     \definecolor{myKeyword}{rgb}{0.0,0.0,0.5}               \lstset     {       aboveskip=\bigskipamount,       belowskip=\bigskipamount,       frame=tb,       framesep=2pt,       basicstyle=\scriptsize\ttfamily,       keywordstyle=\color{myKeyword},       commentstyle=\color{myComment}\itshape,       captionpos=b,       showstringspaces=false,       fontadjust=true,       language=Delphi,       breaklines=true,       numbers=left,       numberstyle=\tiny,       linebackgroundcolor={\ifodd\value{lstnumber}\color{gray!25}\fi},       numbersep=5pt,       escapeinside={(*@}{@*)},     }          \newcommand\coderef[1]{%       $\Rightarrow$~\ref{#1}:~~%%     }%          \usepackage{hyperref}          \begin{document}          \begin{lstlisting}     program FileTest;          var       myFile: file of Integer;          begin       Assign(myFile, 'c:/test.ext'); (*@\label{FileTest-1}@*)       Rewrite (myFile); (*@\label{FileTest-2}@*)       Write(myFile, 1); (*@\label{FileTest-3}@*)       Write(myFile, 2);       Close(myFile); (*@\label{FileTest-4}@*)     end.     \end{lstlisting}               \coderef{FileTest-1} \lipsum[1]     \coderef{FileTest-2} \lipsum[2]     \coderef{FileTest-3} \lipsum[3]     \coderef{FileTest-4} \lipsum[4]          \end{document}      But in some cases it could be nice to repeat the whole line of code instead of the line number. I think that it's somewhat feasible with external source files, by using               \lstinputlisting[firstline=x,lastline=x]       though I haven't investigated further. But is it feasible with sources in a `lstlisting` environment? And how?


title: How can I create a lstlisting environment that spans more than one page?

text: I am using `listings` package to show some algorithms in a LaTeX document. One of the algorithms I want to include is longer than one page. So, my question is: How can I create a `lstlisting` environment that spans more than one page??


title: Roman numerals become “too wide” in table of contents

text: Following minimal document:               \documentclass{report}          \begin{document}     \renewcommand*\thechapter{\Roman{chapter}}     \tableofcontents     \setcounter{chapter}{6} % Problem starts at chapter 7     \chapter{Seven}     \chapter{Eight}     \section{Eight-one}     \section{Eight-two}     \end{document}      yields this output (cut to size for your convenience): ![screenshot](http://i.stack.imgur.com/tQf4b.png) Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow. (The same happens regardless of document type, I’m actually using `scrreprt` with the same result.) How can I prevent this?


title: Table of Contents overlapping type

text: I'm creating a report that uses roman numeral section numbers (requirement for the conference that I'm submitting to). When I create the table of contents, I'm having the following problem: ![enter image description here](http://i.stack.imgur.com/SCNay.png) With the section numbers overlapping the section names. Is there a simple fix for this, perhaps by adding more spacing between the number and name for every section? I'm no expert with style files, but with some instruction I could find what I need and change it.


title: newcommand for use \oldstylenums of another font

text: How I can define a new command to use the old-style numbers of the package `gfsartemisia` within the default font in pdflatex ? I tried something like:               \newcommand{\oldnum}[1]{{\fontfamily{artemisia}\oldstylenums{#1} \selectfont}}       in the preamble to use               Some text with default font \oldnum{123} more text with default font       but doesn't work.


title: tikz draw plot not correct

text: I am trying to plot a naca0012 airfoil profile by its analytic function ( cf wikipedia ) using tikz and I can't understand why I get the following results. I precise that I get the same results if I use gnuplot in tikz `\draw plot function`. It seems to badly compute the 4 first percent of the plot. If I change to `domain=0.:0.05`, I also get the 4 first percent of `domain=0.:0.05` wrong. what am I wrong ? Should I specified a tikz option somehow ?               \documentclass{article}          \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[scale=10]       \draw[step=.02,gray,very thin] (-0.1,-0.1) grid (1.1,0.15);            \draw[color=red,domain=0.:1.,scale=5] plot[id=naca] (\x,{0.12/0.2*(0.2969*sqrt(\x )-0.126*\x -0.3516*\x^2 +0.2843*\x^3 -0.1015*\x^4 )}) ;       \draw[color=blue,domain=0.:.05,yshift=1] plot[id=naca] (\x,{0.12/0.2*(0.2969*sqrt(\x )-0.126*\x -0.3516*\x^2 +0.2843*\x^3 -0.1015*\x^4 )}) ;          \end{tikzpicture}          \end{document}      produces ![enter image description here](http://i.stack.imgur.com/cyeqO.png)


title: How to define macros for paths to be used by biber?

text: I want to use a shortcut to define the paths of my bibtex files and I'm using biblatex and biber. I would like something like:                \addbibresource{\myPath{biblio.bib}}      I tried in several ways i.e.                \def\myDirPath{/home/user/directory/}                \newcommand{\myPathA}[1] {\myDirPath#1}            % A      \DeclareRobustCommand{\myPathB}[1] {\myDirPath#1}  % B      \def\absPathC#1{\myDirPath#1}                      % C      then I run                pdflatex mytex      biber mytex      and it gives in any of the above cases:                ERROR - Cannot find '/home/user/directory/{biblio.bib}'!      It seems latex inserts an additional pair of braces, what's wrong with my code? Should I define my macros in a different way?


title: Is there a library for drawing object inheritance trees in TikZ?

text: This seems like a very common thing, but searching for the words 'tree', 'language', 'object', 'inheritance' and/or 'parent' returns Questions that have nothing to do with mine. **In a nutshell** , I want this: ![Inheritance Tree](http://i.stack.imgur.com/qw4Nm.jpg) But if instead of class B-D I have B-V, I would rather not go in and manually move everything around. Currently, I am using nodes and my classes are flying off the page. What is one/any way to tackle this problem. **MWE:**               \usepackage{tikz}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri,calc,shadows}     \begin{document}         \begin{tikzpicture}[             neuronModel/.style={%                 general shadow={%                     shadow scale=1,                     shadow xshift=0.75ex,                     shadow yshift=0.75ex,                     opacity=0.75,                     fill=black!50,                     every shadow                 },                 rounded corners,                 thick,                 draw=blue!90,                 fill=blue!35,                 thick,                 inner ysep=2pt,                 inner xsep=2pt             }]                  % \foreach \neuronIndex/\neuronLabel in {1/Bidirectional Neuron Model , 10/Unidirectional Neuron Model}                 % \node at (\neuronIndex,10)[draw=black,fill=blue]{\neuronLabel};                  \node[neuronModel,align=center] (neuronModel1) {Bidirectional\\                                                                                Neuron Model};             \node[neuronModel,right=0.5cm of neuronModel1,align=center] (neuronModel2) {Unidirectional\\                                                                                Neuron Model};             \node[neuronModel,right=0.5cm of neuronModel2,align=center] (neuronModel3) {Postprocessing\\                                                                                Neuron Model};             \node[neuronModel,right=0.5cm of neuronModel3,align=center] (neuronModel4) {Preprocessing\\                                                                                Neuron Model};             \node[neuronModel,right=0.5cm of neuronModel4,align=center] (neuronModel5) {Stats\\                                                                                Neuron Model};             \node[neuronModel,right=0.5cm of neuronModel5,align=center] (neuronModel6) {Visual\\                                                                                Neuron Model};         \end{tikzpicture}     \end{document}      Here is the resulting picture. I need to add about 5 more classes, so this approach will not suffice. ![Long inheritance diagram](http://i.stack.imgur.com/2ZzfN.jpg)


title: How does one create a title page in LyX?

text: What's the easiest way to create a good-looking title page in LyX? What I've currently found is a little bit of a hack. It doesn't place the title in the center, and uses raw LaTeX boxes for the `titlepage` environment. In the title page, I used the title envornment (`Alt`+`P`+`T`). In the editor, it looks like this: ![enter image description here](http://i.stack.imgur.com/ZaLWX.png)


title: Number a linear program on the left-hand side

text: I want to write a linear program which is numbered on the right-hand side, like it normally is, but which also has a number on the left-hand side. It will be more of a label instead of a number because I want it to have the letter (P) or any other kind of label. I already have written some code, only I don't know how to add the (P) label to the left. How can I do this? This is the code:               \begin{equation}     \label{lp:primal}     \begin{array}{ll@{}ll}     \text{minimize}  & \displaystyle\sum\limits_{j=1}^{n} &c_{j}x_{j} &\\     \text{subject to}& \displaystyle\sum\limits_{j=1}^{n} &a_{ij}x_{j} \geq b_{i}, &i=1 ,..., m,\\                      &                                    &x_{j} \geq 0, &j=1 ,..., n.     \end{array}     \end{equation}      And this is how it should look like: ![enter image description here](http://i.stack.imgur.com/g1Tnc.png)


title: Remove everything that is in math mode

text: The package comment.sty allows one to typeset               \begin{comment}     stuff that will be suppressed from output file     \end{comment}      or               \begin{myCustomEnv}     stuff that will be suppressed from output file     \end{myCustomEnv}      One can even suppress the contents of already defined environments, for instance `{proof}`. In this spirit, I would like to suppress everything that is in math mode, whatever the way it starts: `$`, `\(`, `$$`, `\begin{displaymath}`, etc. The output should be as if the contents of everything that is in math mode was not in the source file. Can this be done?


title: BibLaTeX isn't writing out bibliography

text: I'm using the following in my main.tex file:               \documentclass[12pt,oneside]{article}     \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{graphicx}     \graphicspath{ {images/} }     \usepackage{caption}     \usepackage{subcaption}     \usepackage[a4paper,width=140mm,top=25mm,bottom=25mm]{geometry}     \usepackage{url}               \usepackage[style=authoryear,sorting=none,backend=biber,maxbibnames=10]{biblatex}     \DefineBibliographyStrings{danish}{andothers = {et\addabbrvspace al\adddot}}     \addbibresource{references.bib}     \setlength\bibitemsep{1.5\itemsep}     \renewcommand*{\nameyeardelim}{\addcomma\space}      In my references.bib file I have:               @article{edwards,         author        = {N. Edwards, P.},         title         = {History of climate modeling},         journaltitle  = {WIREs Clim Change},         year          = {2011},         volume        = {2},         pages         = {128--139},         doi           = {10.1002/wcc.95}     }          @article{flato,         author        = {M. Flato, G.},         title         = {Earth system models: an overview},         journaltitle  = {WIREs Clim Change},         year          = {2011},         volume        = {2},         pages         = {783--800},         doi           = {10.1002/wcc.148}     }          @incollection{heymann,         author    = {Heymann, M. and Sandøe, P. and Andersen, H.},         title     = {What is climate science all about? Philosophical perspectives},         booktitle = {Jorden Brænder},         editor    = {Gjerris, M. and Gamborg, C. and Olesen, J.E. and Wolf, J.},         publisher = {Forlaget Alfa},         address   = {Frederiksberg},         year      = {2009},         pages     = {65--67}     }          @incollection{heymann2,         author    = {Heymann, M.},         title     = {Climate science – how did it come about?},         booktitle = {Jorden Brænder},         editor    = {Gjerris, M. and Gamborg, C. and Olesen, J.E. and Wolf, J.},         publisher = {Forlaget Alfa},         address   = {Frederiksberg},         year      = {2009},         pages     = {69--87}     }          @incollection{IPCC,         author    = {Le Treut, H. and Somerville, R. and Cubasch, U. and Ding, Y. and Mauritzen, C. and Mokssit, A. and Peterson, T. and Prather, M.},         title     = {Historical Overview of Climate Change},         booktitle = {Climate Change 2007: The Physical Science Basis. Contribution of Working Group I to the Fourth Assessment Report         of the Intergovernmental Panel on Climate Change},         editor    = {Solomon, S. and Qin, D. and Manning, M. and Chen, Z. and Marquis, M. and Averyt, K.B. and Tignor, M. and Miller, H.L.},         publisher = {Cambridge University Press},         address   = {Cambridge, United Kingdom and New York, NY, USA},         year      = {2007},         pages     = {95--122}     }      And at the bottom of my main.tex file I have:               \nocite{*}          \renewcommand{\mkbibnamefirst}[1]{\textsc{#1}}     \renewcommand{\mkbibnamelast}[1]{\textsc{#1}}     \renewcommand{\mkbibnameprefix}[1]{\textsc{#1}}     \renewcommand{\mkbibnameaffix}[1]{\textsc{#1}}          \printbibliography          \end{document}      When I Build & View my main.tex I get no errors, but still, the bibliography isn't being printed. I do get some warning at the line where \printbibliography is, that says:               Empty bibliography          There were undefined references.          Please (re)run Biber on the file:(biblatex) main(biblatex) and rerun LaTeX afterwards.      I'm am using the latest version of TeXstudio, and up until recently, I have actually been able to get the bibliography printed. I'm not entirely sure how to "(re)run Biber..." as it says in the warning, but I have cleaned all aux files, tried to restart TeXstudio and so forth. So what am I doing wrong here ? Thanks in advance.


title: Non-breaking space in cite style

text: I am using the .bst file "authordate-3" to create my references, with a citation in the text in the format (author, year). I would like to make the space between author and year a non-breaking space but I don't know what I am looking for in the .bst file to change that. I have tried the `\bibpunct{(}{)}{;}{a}{,~}{,}` command in the preamble and added in a `~` in the right place, but I am now ending up with a double space instead. MWE below, and appropriate .bst and bib file can be downloaded from here               \documentclass[11pt]{scrbook}     \usepackage{natbib}     \usepackage[space]{cite}          \renewcommand\citepunct{,~}           \let \cite \citep          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas quis feugiat ipsum. Aenean rutrum malesuada ultricies. In eu ullamcorper ipsum, vitae facilisis diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean fringilla, elit vitae lacinia vulputate, lectus erat imperdiet sem, sed posuere metus ligula in diam. Nullam vehicula tempor massa fermentum pharetra. Vestibulum at urna in nulla porttitor congue in ut erat. Morbi eget ante ac mi mattis fermentum et a massa. Nullam diam ante, faucibus a elementum vitae, pharetra et purus. Nunc lacinia magna at tellus pretium, ac iaculis urna facilisis. Mauris in scelerisque tortor~\cite{sheldon14}, id tincidunt ante. Morbi interdum sed nisi ac tempor. Nunc dictum, lectus sit amet egestas condimentum, leo est ultricies sapien, quis cursus lorem massa vel tellus. Sed sodales dapibus nisi pellentesque elementum.          \bibliographystyle{authordate3-edit}     \footnotesize     \bibliography{test}          \end{document}


title: Removing extra page before and after \tableofcontents

text: My main file generate extra page before `\tableofcontents` with header title "Table of contents". How can I remove this page? I am copying the `main.tex` file code for your reference.               \documentclass[twoside,12pt]{Classes/aesm_edspia}          \begin{document}     \addtocounter{page}{-1}     \makethese      \onehalfspacing     \newpage\thispagestyle{empty}\addtocounter{page}{-5}               %depth in the table of contents and section numbering     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \frontmatter          \pagestyle{fancy}     \fancyhf{}     \fancyhead[LE,RO]{Acknowledgements}     \fancyfoot[RO]{\thepage}     \fancyfoot[LE]{\thepage}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}          \pagestyle{fancy}     \fancyhf{}     \fancyhead[LE,RO]{Table of Contents}     \fancyfoot[RO]{\thepage}     \fancyfoot[LE]{\thepage}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}          \input{Abstract/Abstract}          \tableofcontents     \listoffigures     \listoftables           \mainmatter     \pagestyle{fancy}     \fancyhf{}     \fancyhead[LE,RO]{Introduction}     \fancyfoot[RO]{\thepage}     \fancyfoot[LE]{\thepage}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}           \end{document}


title: Can I use a written out logical connective, rather than a symbol?

text: My professor uses these really nice, written out, `AND` and `IMPLIES`, etc., symbols and I can't seem to figure out or find how he does it. I would love to use them, rather than `\wedge` or `\land`. Is it even possible, or did he probably create them himself (or have someone do it for him)? ![enter image description here](http://i.stack.imgur.com/98pHK.png)


title: Draw a filled circle at every point of a TikZ plot

text: Consider the following simple example:               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}            \coordinate (a) at (0,0);       \coordinate (b) at (1,1);       \coordinate (c) at (2,0);            \draw (a) -- (b) -- (c);            \fill (a) circle (2pt);       \fill (b) circle (2pt);       \fill (c) circle (2pt);          \end{tikzpicture}     \end{document}      I am interested in improving this code. In particular I would like to avoid the manual drawing of the circles. Have in mind a case where many vertices are involved with many different names. I know I could replace the fill's with some loop like                 \foreach \i in {a,b,c}       \fill (\i) circle (2pt);      But I'm interested in more global magic, that is a way to fill a circle (or any other shape) of some fixed radius radius (or dimension) whenever TikZ meets a coordinate. A bonus would be a solution which can be switched off for certain vertices. I believe the solution is to use `style`'s but I don't know how to do it.


title: Custom shadow - border effect with TikZ

text: I would like to draw a box like this: ![enter image description here](http://i.stack.imgur.com/bsZEN.jpg) I'm especially interested in both   1. how to draw a shadow that comes out from the sides only (not also top or bottom) and   2. how to draw two shadows, the bigger left-right shadow and the smaller outline border one.  I've tried many approaches but it seems I'm completely off track here since I can't even draw the left-right bigger shadow, so I would appreciate if someone could explain me where to start here. Clarifications. I think the picture is compose by 4 parts: 1) the background (uninteresting here) 2) the white rectangle 3) the rectangle borders-edges (what I previously referred as the smaller shadow) with a ridge like effect 4) the left and right shadows I'm trying to draw parts 3 and 4.


title: settototalheight issue with empty lines

text: I am using `\settototalheight` to calculate the height of the text in order to use `needspace` correctly. This is the code i am using :               \documentclass[12pt]{article}          \usepackage{graphicx}     \usepackage[parfill]{parskip}     \usepackage[none]{hyphenat}     \sloppy     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{framed}     \usepackage{tikz}     \usepackage{array,ragged2e, calc}     \usepackage{enumitem}     \usepackage{lipsum}     \usepackage{mdframed}     \usepackage{needspace}     \usepackage{nolbreaks}          % ------------------------------------------------------------------------------------     % Fonts     % ------------------------------------------------------------------------------------     \usepackage{xunicode}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{txfonts}     % ------------------------------------------------------------------------------------          \definecolor{shadecolor}{RGB}{217,217,217}  % Color used for highlighting     \definecolor{light-blue}{RGB}{0,175,236}    % Color for the footer          % ------------------------------------------------------------------------------------     % Header and footer management.     % ------------------------------------------------------------------------------------     \usepackage{fancyhdr}     \pagestyle{fancy}          % clear any old style settings     \fancyhf{}          \fancyheadoffset{0in}     \headheight = 53pt          \renewcommand{\headrulewidth}{0pt}          \setmainfont{Calibri}          % ------------------------------------------------------------------------------------     % Defining the section style     \newcommand{\mysectionstyle}[1]{\colorbox{shadecolor}{\begin{tabular}{>{}p{\rectanglelength}}{\fontsize{13}{6}\selectfont\textbf{#1}}\end{tabular}}\vspace{6pt}}     % ------------------------------------------------------------------------------------          \addtolength{\footskip}{0.6cm}     \renewcommand{\footrulewidth}{1pt}     \renewcommand{\footrule}{{\color{light-blue}%         \vskip-\footruleskip\vskip-\footrulewidth         \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}          % ------------------------------------------------------------------------------------          \usepackage[left=0.75in,top=1.5in,right=0.75in,bottom=1in]{geometry} % Document margins     \usepackage{titlesec}          \newlength{\rectanglelength}     \setlength{\rectanglelength}{\textwidth}     \addtolength{\rectanglelength}{-6pt}          \newlength{\foo}               \begin{document}     \lipsum[1]               \settototalheight{\foo}{\parbox[t]{\linewidth}{\begin{minipage}[t]{\linewidth} \begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\fontsize{13}{6}\selectfont{LaTeX}&\textbf{2011 to 2012}\end{tabular}\\\begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\textbf{Lead Programmer}&\textbf{}\end{tabular}%     \vspace{3pt}\begin{itemize}[parsep=0pt, topsep=0pt, itemsep=0pt, leftmargin=2ex]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\end{itemize}%     \vspace{7pt}\textbf{End Title}\\\lipsum[1]          \vspace{10pt}\end{minipage}}     }     \needspace{\foo}{\setlength{\parskip}{4pt}          \mysectionstyle{Experiences}          \begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\fontsize{13}{6}\selectfont{LaTeX}&\textbf{2011 to 2012}\end{tabular}\\\begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\textbf{Lead Programmer}&\textbf{}\end{tabular}%     \vspace{3pt}\begin{itemize}[parsep=0pt, topsep=0pt, itemsep=0pt, leftmargin=2ex]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\end{itemize}%     \vspace{7pt}\textbf{End Title}\\\lipsum[1]          \vspace{10pt}}     \end{document}      The problem is that settototalheight doesn't accept empty lines which is something i cannot control in my dynamic content. (This is a live text editor). Is there a command or a package that accept empty lines to calculate the height of a text? The real purpose of this is that each live text editor must not break into several pages or if it does, it starts at a new page then spread to the next ones (that's the reason of using needspace).


title: Can Microtype Change the Kerning Between a Dot or Comma and a Footnotemark?

text: Relatet to this question: Is it possible to change the kerning between a punctuation mark and a footnotemark with microtype (or any other kerning- method)? (I know of package `fnpct`, but I would rather like my footnotemarks _behind_ punctuation marks)


title: What is the 2014 status on converting Word and MathType to LaTeX

text: **Why have I started a new question?** I have studied as many pages here as I can on answers to this question and none have really satisfactory answers. I want to start a new discussion on this problem. **Why is it _that_ important?** If we really believe that TeX/LaTeX is the prince of typesetting and want to convince others of this, then there has to be some kind of pathway to conversion if you already have a large body of work in another system. **Summary of my particular problem** I have a partly written physics text book comprising a collection of very large Word documents with hundreds of graphics and hundreds of MathType equations. Having been converted to TeX/LaTeX I just can't go back to working in Word, in fact my study/work laptop is a microsoft free experiment which is also in the process of becoming Adobe free, which is a trickier prospect. I really need to find a conversion solution for those documents. **The Question** I suppose I should point out that Mac solutions would be preferable but I do have ready access to a Windows machine. Keeping in mind that I have researched this fairly extensively on this site so far, does anyone know of any up to date solutions? I believe in theory it must be possible to at least convert a word document with styles, graphics and MathType equations into a reasonable .tex file that then might still need significant refinement but not massive, fundamental rewriting. Word's styles must have some kind of specification that could be translated at least partially to LaTeX styles. Various graphics converters exist. MathType has a converter for its equations to LaTeX. These three components combined could surely produce at least a decent starting point for rewriting a large document. **Why this matters to me personally** My text is already 260 A4 pages. With what I've learned as a LaTex user about rules of typesetting associated with research into readability and so on, even with a perfect translation they would have to be reorganised into about 400 pages. This is because there is far too much on each page; far too many words per line, too many complications in the layout of equations and diagrams. A solution that at least converts headings, paragraph styles, equations and graphics, leaving me to restructure the pages and fine tune would be brilliant. I'm well aware of the irony of my situation. Why should I expect that someone in a similar situation to me has created a solution to save me the trouble. **Conclusion** Not a final conclusion. I will keep adding to this as the story progresses. So far a solution combining docx2tex and GraphicConverter gets me the diagrams, writer2latex gets me the headings and body text. If I get MathParser working then I need to find a utility that converts MathType equations from Word to MathML. That would get me a significant way towards a worthwhile conversion. So the problem remains how to batch extract MathType equations from a word document. I can do them one at a time with MathType. The bizarre thing is why Design Science appears to have done such a bad job on the LaTeX export. Their MathML export seems pretty good so if I find a working converter for MathML to LaTeX, the one at a time thing wouldn't be too bad. However, the commercial solution of Word2TeX, proves that it can be done.


title: Missing space when replacing with \regex_replace_all:nnN

text: How can I make `\regex_replace_all:nnN` not remove the space between `x y`? ![enter image description here](http://i.stack.imgur.com/ymKJj.jpg)               \documentclass{article}     \usepackage{l3regex}          \ExplSyntaxOn     \cs_new:Npn \replace #1#2#3      {       \tl_set:Nn \l_tmpa_tl  {#3}       \regex_replace_all:nnN {#1} {#2} \l_tmpa_tl       \tl_use:N \l_tmpa_tl      }     \ExplSyntaxOff          \begin{document}     \replace{a}{x y}{abc}     \end{document}


title: \cupdot gives "Undefined control sequence" with MikTek on Windows 7

text: I am using MikTek 2.9 on Windows 7. When I try to use \cupdot, in math mode, I get an "Undefined control sequence" error message. Is there a package that I need to include to use \cupdot?


title: Table spreaded over multiple pages . Tabularx

text: To spread the table over multiple pages I know the utility is`longtable` But it seems that it doesn't work for tabularx . what is the solution. there may be duplication of question but couldn't find satisfactory answer.


title: Using full stops in figure name to replace spaces: error (confusion of file extension)

text: I am not sure this has been asked before, but I couldn't find it and I am hoping to get a solution or at least a good explanation of why this is a bad idea. (there are questions about using underscore or spaces, but as far as I can tell nothing about full stops). I started using full stops to replace spaces in file names but LaTeX does not seem to accept this. For example, when I name the figure `figSE.pdf` the code compiles fine, but if I name it instead `fig.SE.pdf` I get the error message > ERROR: LaTeX Error: Unknown graphics extension: .SE.pdf. I know I can just rename the file, but I quite like my new system and if there is a way to make LaTeX accept it I would prefer (and I don't want to use hyphens nor underscores). Here is a MWE               \documentclass{article}     \usepackage{graphicx}          \begin{document}          \begin{figure}[h]         \centering         \includegraphics{fig.SE.pdf}     \end{figure}          \end{document}      And an example of a figure can be found here: http://dl.getdropbox.com/u/1885087/fig.SE.pdf


title: Landscape table in multicol-environment

text: I am facing a very weird problem; see the output: ![Output](http://i.stack.imgur.com/OkSMj.png) I am trying to get my table in the landscape mode within a two-column layout. Therefor the package "multicol" is used. The table does not appear on the whole page but ratheronly the top (or left, depending on the perspective). Whenever I remove the multicol package, the table does fill the whole page; but unfortunately the layout of the rest of the paper is destroyed. Is there any workaround? Thanks in advance. :)               \documentclass[twoside]{article}          \linespread{1.08}      \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry}     \usepackage{multicol}     \usepackage{lscape,multirow,rotating,caption,tabularx,booktabs}     [...]     \begin{document}     [...]     \begin{landscape}     \begin{table*}[b]     \small     \label{tab:2}     \caption{bla}     \bgroup     \def\arraystretch{1.5}     \begin{tabularx}{\linewidth}{lXXXX}     \hline & Grow Bed & DWC & NFT & Soil \\ \hline     [...]     Nutrient uptake       &- High &- High& - Lower because smaller root-water contact area& - Lower     \\ \hline     \end{tabularx}     }     \end{table*}      \end{landscape}          \end{document}


title: How do you make numbered equations in latex?

text: I would like to put in a code that automatically assigns a number to the equations in my documents preferably aligned on the right hand side. How can I go about this?               \documentclass[a4paper,11pt]{article}     %\documentclass[a4paper,11pt]{scrartcl}     \usepackage{amsmath}      \usepackage[utf8]{inputenc}          \begin{document}          $$\ddot{\underline{\mathbf{r}}} = \frac{d{^2}\underline{\mathbf{r}}}{dt^2}= 0$$.      \end{document}


title: Table with fixed width centering won't compile

text: All, I don't think I've ever been this stuck. The following compiles. But if I uncomment the commented line, it does not compile. What am I doing wrong?               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{booktabs}     \usepackage{array}          \begin{document}          \begin{center}     \begin{tabular}{*{4}{>{\centering}p{2cm} |}}\toprule     %$x$ & $p$ & $xp$ & $x^2p$ \\\midrule     2 & 0.1 & &\\     3 & 0.2 & &\\     4 & 0.2 & &\\     5 & & &\\\midrule     $\sum x=$ & $\sum p=$ & $\sum xp=$ & $\sum x^2p=$      \end{tabular}     \end{center}          \end{document}


title: boxing the entire page

text: Sorry if you don't understand me, but English is not my native language. Is it possible to put a frame at `x cm` from the right and left edges of the page and at `y cm` from the up and bottom edges of the page? like in this image. ![enter image description here](http://i.stack.imgur.com/cJROA.jpg) I have tried with the `showframe` package and the `showframe` option of the `geometry` package, but none of those works for me.


title: Uncover line segments of a TikZ graph in Beamer

text: In `beamer`, is it possible to uncover a sequence of connected line segments drawn in `tikz`? For example, in the following figure, I want to show the line segments in the third `\draw` one by one after each `--` (except the first one). Is there a way to achieve this, or is it just impossible?               \begin{tikzpicture}[scale=.5]       \draw[<->,>=latex](0,10)--(0,0)--(10,0)node[below]{$Q$};       \draw<2-> node[left]at(0,10){$P$} node[below]at(10,0);       \draw<3->[very thick, red](0,6)--(4,6)--(4,3)--(6.67,3)--(6.67,2)--(9.33,2)--(9.33,0);     \end{tikzpicture}


title: fontawesome icons are getting too big using XeLaTeX

text: The following example must be compiled with XeLaTeX to reproduce the issue.               % arara: xelatex     \documentclass{article}     \usepackage{fontawesome}     \begin{document}     Text Text \faMobilePhone\ Text Text     \end{document}      Normally I am using TeXworks to compile and view the output. With the internal viewer I am getting the desired result. The following image demonstrates it: ![enter image description here](http://i.stack.imgur.com/931Wd.png) However if I open the pdf with Preview (viewer of Mac) the scaling of the icon fails. ![enter image description here](http://i.stack.imgur.com/Tly8X.png) If I open the pdf file with Adobe Acrobat Reader the icon is still scaled correctly. If I print the page my printer is also not able to scale the icons correctly. If I use LuaLaTeX everything seems to work correctly. _Can you reproduce the issue and do you know a solution?_


title: XeTeX font spacing awfulness

text: When using the Lato font (e.g., Google fonts or Lato fonts), I get completely overlapping text: ![enter image description here](http://i.stack.imgur.com/El2MX.png) When I view the PDF in Google Chrome's PDF viewer, it looks fine on the screen: ![enter image description here](http://i.stack.imgur.com/9oWpY.png) but it still prints like the bad version, and I am really only concerned with the printed output for this document. This is what I'm using to produce the above:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Baskerville}     \newfontfamily\kgtitlefont[Scale=2]{Lato}     \begin{document}     {\kgtitlefont{This would make a good title}}\\     This would make good text.     \end{document}      I know that this is XeTeX-specific because if I use LuaTeX (through TeXworks or TeXShop in both cases), the Lato looks fine, **but** LuaTeX can't find Baskerville:               luaotfload | Updating the font names database:     luaotfload | Scanning TEXMF fonts...     luaotfload | Scanning OS fonts...     luaotfload | Font names database saved: %s      : /Users/kayhan/Library/texlive/2012/texmf-var/luatex-cache/generic/names/otfl-     names.lua          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ./testroboto.tex:3: fontspec error: "font-not-found"     !      ! The font "Baskerville" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.3 \setmainfont{Baskerville}      I would rather fix Lato in XeTeX, but would be okay with fixing Baskerville in LuaTeX. I am fairly experienced with LaTeX on Linux, but am relatively new to XeTeX, fontspec, and Mac OS X. Update: I have TeX Live 2012 `Version beta-0.70.2-2012062819 (TeX Live 2012)` and the baskerville font I have is a `ttc`, so that this may be the problem. The XeLaTeX problem appears in adobe acroreader and preview. It does not appear in chrome, though. I will try to update TeX Live on my 10.8.5 system and see what happens. It will take a little time to download this. I'll report back when done. **Update 2:** After installing TeX Live 2013 (thank you BitTorrent!), I can get the document to work with Lua(La)TeX (i.e., get LuaTeX to find and use the Baskerville `.ttc` font I have), but with XeTeX, the font spacing is still messed up. Note that the `Scale=2` option does not change anything. The following also produces illegible font spacing with XeTeX:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Baskerville}     \newfontfamily\kgtitlefont{Lato}     \begin{document}     {\kgtitlefont{This would make a good title}}\\     This would make good text.     \end{document}      So I have a good work-around (Use LuaTeX instead of XeTeX), I am still interested in getting it to work with XeTeX, if only to understand better how it works. **Update 3:** After reading @Nils L.'s comment, here is an even more minimal working example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Lato}     \begin{document}     This is even more minimal.     \end{document}      which produces the following: ![enter image description here](http://i.stack.imgur.com/VNDmW.png) Note that in some PDF viewers (TeXWorks, Google Chrome) it looks fine _on the screen_ , but with most PDF viewers (acroread, preview, safari) it looks awful on the screen. _For all PDF viewers it prints incorrectly._ **Update 4:** When changing `\setmainfont{Lato}` to `\setmainfont{Lato- Reg.ttf}`, it works correctly. I don't understand why this makes a difference, but I guess I have a lot to learn about `fontspec`.


title: Problems with font display under Adobe Reader

text: I am using the commercial fonts "Flexo" and "Brix Slab" with XeLaTeX:               \documentclass{book}     \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont{HVD Fonts - BrixSlab-Light.otf}     \setsansfont{Durotype - Flexo-Medium.otf}     \usepackage{blindtext}          \begin{document}     \blindtext          \sffamily \blindtext     \end{document}      The generated PDFs look good with every PDF viewer except for Adobe Reader X and XI where the "Flexo" font is a mess. ![Display of MWE under Adobe Reader](http://i.stack.imgur.com/nvPyF.png) The output of "pdffonts" yields:               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     YCEXOQ+BrixSlab-Light-Identity-H     CID Type 0C       yes yes yes      5  0     JAZBMS+Flexo-Medium-Identity-H       CID Type 0C       yes yes yes      7  0      The problem occurs under Linux (TeXLive) as well as under Windows (MiKTeX). What is the problem?


title: Error message: There's no line here to end

text: In a letter-class document that had no previous errors I am suddenly getting the error message:               "There's no line here to end" \opening{text}      I've used this file many times and today it starts giving this error. How do I troubleshoot this?


title: sticky labels with image and text

text: > **Possible Duplicate:**   >  Is there a good document template for making business cards? I need to create a A4 page with sticky labels on it. The page should look like this:               -------------------     |     |     |     |     |  1  |  2  |  3  |     -------------------     |     |     |     |     |  4  |  5  |  6  |     -------------------     |     |     |     |     |  7  |  8  |  9  |     -------------------     |     |     |     |     | 10  | 11  | 12  |     -------------------     |     |     |     |     | 13  | 14  | 15  |     -------------------      The label size is 70mm x 50mm. One label looks like this: (x the image) (y the text)               -----------------------     | xxxxxx              |     | xxxxxx MsShort Name |     | xxxxxx              |     -----------------------          -----------------------     | xxxxxx              |     | xxxxxx MsVeryLong   |     | xxxxxx Name         |     -----------------------      If the text is too long it should continue on the second line. Has someone an idea? This is my code so far:               \documentclass[a4paper]{article}          \usepackage[table]{xcolor}     \usepackage{graphicx}     \usepackage{varwidth}          \paperheight297mm     \paperwidth210mm          \textheight297mm     \textwidth180mm          \topmargin-25.4mm     \voffset0in     \oddsidemargin-17.5mm     \evensidemargin-17.5mm     \hoffset0in          \marginparsep0in     \marginparwidth0in          \headheight0in     \headsep0in          \begin{document}          \begin{table}     \begin{tabular}{p{60mm} p{60mm} p{60mm}}     \vspace{18pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} \\[50.8mm]     \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} \\[50.8mm]     \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} \\[50.8mm]     \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} \\[50.8mm]     \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} & \vspace{15pt} \raisebox{-\height}{\includegraphics[height=35mm]{test.png}} \raisebox{-\height}{\raisebox{-\height}[15mm]{Some Name}} \\[50.8mm]     \end{tabular}     \end{table}          \end{document}      But if the text is too long it just jumps at the end of the cell. How can I fix that?


title: Harvard style bibliography with biblatex... almost, but not quite!

text: My University requires that all submissions use the Harvard format for referencing. I understand this is not directly supported by BibLaTeX without some tweaking. I spent much of my evening yesterday researching how to do this and I have _almost_ managed to get BibLaTeX to output my bibliography in the required format. Below is an example of the current output: ![Example of Harvard bibliography](http://i.stack.imgur.com/q2uPJ.png) However, a few issues still remain unresolved.   1. There should be no spacing between the first and middle initials of authors, i.e. `Doe, J.D.` not `Doe, J. D.`. I have tried using `\renewcommand*{\bibinitdelim}{}` as suggested here, but it did not work. The nearest I have to a solution is to insert a thin space as suggested in this response.   2. The first author should be listed as `de Silva, U.C.`, not `Silva, U.C. de`.   3. The year of publication should not have a full stop after the parentheses, i.e. `(2011)`, not `(2011),`.   4. Some bibliography entries will need to be appended with additional information (such as the date of access, if the source was online, etc.) using the `note` field at the end of the entry. However, the current settings cause the `note` field for articles to be sandwiched between the volume number and page numbers, rather than after the page numbers, as shown below: ![biblatex note field](http://i.stack.imgur.com/jwKOr.png) Does anyone have any ideas as to how I can resolve these formatting issues? Here are the settings I've applied so far:               \documentclass[12pt,a4paper,oneside]{report}          \usepackage{filecontents}     \usepackage[     firstinits=true, % render first and middle names as initials     maxcitenames=3,     maxbibnames=99,     style=authoryear,     dashed=false, % re-print recurring author names in bibliography     natbib=true,     url=false     ]{biblatex}          % Use single quotes around titles:     \usepackage[british]{babel}     \usepackage{csquotes}          \DeclareNameAlias{author}{last-first}     \renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} % insert thin spaces between author initials     \renewcommand*{\nameyeardelim}{\addcomma\addspace} % insert a comma between author and year in-text citations     \renewcommand*{\newunitpunct}{\addcomma\addspace} % comma as separator in bibliography, not full stop     \setlength\bibitemsep{1.5\itemsep} % increase spacing between entries in bibliography     \renewbibmacro{in:}{} % remove 'in:' preceding article title          % Place volume number within parentheses:     \renewbibmacro*{volume+number+eid}{         \printfield{volume}         \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace         \printfield{number}         \setunit{\addcomma\space}         \printfield{eid}}     \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}          \begin{filecontents}{\jobname.bib}     @Article{Belshe_2010a,       Title = {{{E}fficacy of live attenuated influenza vaccine in children against influenza {B} viruses by lineage and antigenic similarity}},       Author = {Belshe, R. B. and Coelingh, K. and Ambrose, C. S. and Woo, J. C. and Wu, X.},       Journal = {Vaccine},       Year = {2010},       Month = {Feb},       Note = {[Online]. Available at: \url{example.com} (Accessed: 10 January 2013)},       Number = {9},       Pages = {2149--2156},       Volume = {28},     }          @Article{de-Silva_2012,       Title = {{{A} comprehensive analysis of reassortment in influenza {A} virus}},       Author = {de Silva, U. C. and Tanaka, H. and Nakamura, S. and Goto, N. and Yasunaga, T.},       Journal = {Biol Open},       Year = {2012},       Month = {Apr},       Number = {4},       Pages = {385--390},       Volume = {1},     }     \end{filecontents}          \addbibresource{\jobname.bib}     \nocite{*} % print all citations          \begin{document}         \printbibliography[title=References]     \end{document}      My setup consists of TeXstudio 2.3, TeXlive 2012, and BibLaTeX 1.7-1 on Debian Wheezy, if that affects anything. Thanking you all in advance, Baldwin **EDIT:** Thanks for your helpful replies everyone. This is the first document in which I've used the BibLaTeX package, so I really appreciate your responses.


title: How can I adjust margins using the geometry package so that I can put section titles in margin and not mess up fancyhdr?

text: I'm currently updating my CV and I am trying to mimic the CV found at http://www.tedpavlic.com/post_resume_cv_latex_example.php This particular example modifies the margins so that the section titles will go in the left margins. Here is a minimal example that illustrates the problem that I am having:               \documentclass[11pt]{article}     \usepackage{calc}     \usepackage[breaklinks]{hyperref}          \usepackage{fancyhdr}          \reversemarginpar          \usepackage[paper=letterpaper,                 marginparwidth=1.2in,                  marginparsep=.05in,                  margin=1in,                 includemp]{geometry}          \setlength{\parindent}{0in}          \pagestyle{fancy}          \lhead{{\Large \textbf{Batman}}}          \renewcommand{\section}[2]%             {\pagebreak[2]\vspace{1.3\baselineskip}%              \phantomsection\addcontentsline{toc}{section}{#1}%              \hspace{0in}%              \marginpar{              \raggedright \scshape #1}#2}          \begin{document}          \section{Contact Information}     Bat Cave, Gotham City          \newpage          \section{Favorite Buddies}     Robin and Batgirl          \end{document}      What I would like to have is for the fancy header to be as wide as the total width of both columns (which is something like \textwidth+\marginparwidth+\marginparsep). The example that I started to mimic uses the following code to accomplish what I am looking for:               \newcommand{\makeheading}[1]%             {\hspace*{-\marginparsep minus \marginparwidth}%              \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%                     {\large \bfseries #1}\\[-0.15\baselineskip]%                      \rule{\columnwidth}{1pt}%              \end{minipage}}      The problem with this is that it only puts the header on the first page and I'd like to put it on every page. I'm hoping that I can modify the options for fancyhr to accomplish this. I'm also open to other solutions that do not involve my approach. However, I'd rather not use specialized packages, like the res package. Thanks in advance for any help!


title: LaTeX macro expander

text: Is it possible to have LaTeX (or another program) to expand a the macros in a .tex file, and output the expanded LaTeX source? If no such program exists: are LaTeX macros processed simply as string substitutions, before the document is interpreted? If so, it might be easy enough to write my own such converter. **Edit:** The reason I ask is journals which don't accept LaTeX submissions with macros. It would be useful to be able to develop with my usual macros, and convert automatically to the 'macro-expanded' format for submission.


title: Is there a LaTeX/TeX preprocessor/inliner that replaces only selected macros with their definitions?

text: I have the following situation: Like most LaTeX users that write much, I have my own header files where the packages I use normally are required and the macros I use often are defined. So if I write some article, I will normally use my own macros and save a lot of time and redundancies. Now I send in my article to some journal and they want to publish it! Of course they want me to send in my source code. Naturally, the following problem arises: The publishers won't want to include my own headers. They want code that compiles on every regular TeX- distribution. How can I convert my source into a file that doesn't contain my own macros anymore? I need something like a preprocessor, that "inlines"/expands all macros and definitions found in the headers I explicitly specify (my headers), but not those in the other, unmentioned packages (regular headers). Does anything like this exist? Could it be implemented using TeX/LaTeX or would one have to reimplement the macro expansion mechanism?


title: replacing macros parameters by its definition

text: Usually, I use many macros in my documents to save time. I am searching for clever "ideas, methods, tools" which can replace macros by its definition. For example, if we have a the following document               \documentclass[a4paper,10pt,english]{article}     \usepackage{amsfonts}     \newcommand{\bN}{\mathbb{N}}     \newcommand{\bZ}{\mathbb{Z}}     \begin{document}     $\bN$ and $\bZ$ are closed under the operation of addition       \end{document}      I want the content to be converted to                  $\mathbb{N}$ and $\mathbb{Z}$ are closed under the operation of addition        **Remark:** I know that I can do this using find/replace in the editor. Here, I am asking about other possibilities. Best regards


title: Problem with title languages from thesis template

text: I'm using LaTeX in order to write my thesis and to make a good impression to the reader. As long as I'm not a very experienced user I use a template from Master/Doctoral Thesis from LaTeX Templates. So, here is the problem I'm dealing with.. It may sound very stupid for most of you but I can't change the title languages at all. Let me explain, I'm Catalan and I would like to write the thesis in Catalan but the template is in English so I'm using `\usepackage[catalan]{babel}` at the beginning. Some of them have already changed but not all and I don't know how to do it. For example: when I write `\tableofcontents` the title is Índex which is correct in Catalan and the same happens with `\listoffigures`, etc.. But when you look at the table of contents it doesn't appear in Catalan. Instead > Llista de figures appears as > List of Figures and so on. I would like to put all in Catalan the acknowledgements, declaration of authorship, etc.. Do you have any advice for me? I would be very grateful.


title: How to make \note{...} to show current frame in beamer?

text: I am preparing slides for a large presentation using the beamer class. In the beginning I write               \usepackage{pgfpages}          \setbeameroption{show notes}     \setbeameroption{show notes on second screen=left}          \begin{document}     % a LOT of frames     \end{document}      Only for very few slides I need to see notes on the secondary screen. For the rest of them, however, I would like to see the current frame in full size on the secondary screen, instead of an empty screen with a small version of the frame at the upper-right corner of the screen. This should be done preferably by default, without the need to write a `\note{...}` command on each frame (but if I have to, I will do it...). How can I make this behavior the default? Note: I am aware that I can paste the content of the frame inside the `\note`, but this is of course a terrible solution


title: Best class for math journal in Latex

text: I want to design a math journal in latex format. Which class must be used? It must be like as book class but without chapter feature. Please help me!


title: Two columns in twocolumn mode

text: I am trying to have two columns in the columns of a twocolumn mode (See the MWE. Please excuse that it is so long, it was the only way to illustrate what I mean). If the list extends the column it is continued on the next page, not on the right page side. How can I fix this? Many thanks!               \documentclass[fleqn,10pt,twocolumn]{article}     \usepackage{lipsum}     \usepackage{multicol}     \begin{document}     \section{Test}     \lipsum[1-2]     \begin{multicols}{2}     Abkhaz\\     Adyghe\\     Afrikaans\\     Agul\\     Albanian\\     Altaic\\     ArmenianEastern\\     ArmenianGrabar\\     ArmenianWestern\\     Awar\\     Aymara\\     AzeriCyrillic\\     AzeriLatin\\     Bashkir\\     Basque\\     Belarusian\\     Bemba\\     Blackfoot\\     Breton\\     Bugotu\\     Bulgarian\\     Buryat\\     Catalan\\     Chamorro\\     Chechen\\     ChineseSimplified\\     ChineseTraditional\\     Chukcha\\     Chuvash\\     Corsican\\     CrimeanTatar\\     Croatian\\     Crow\\     Czech\\     Danish\\     Dargwa\\     Dungan\\     Dutch\\     DutchBelgian\\     Khanty\\     Kikuyu\\     Kirgiz\\     Kongo\\     Korean\\     Koryak\\     Kpelle\\     Kumyk\\     Kurdish\\     Lak\\     Lappish\\     Latin\\     Latvian\\     Lezgin\\     Lithuanian\\     Luba\\     Macedonian\\     Malagasy\\     \end{multicols}          \end{document}


title: Manual citation formatting

text: First off: I don't want to use bibtex for this; I want to typeset my bibliography myself. Looking at the `source2e.pdf` document I found out about redefining `\@cite` and `\@biblabel`, and got my citation style pretty much set up with this. The problem which remains now is this: I'd like to allow for two different ways of citing a person. (This seems to be called “harvard style”.) One would be in the body of the text: > … as John Doe (1900) demonstrated … while the other one would be parenthesized: > … has already been demonstrated (John Doe 1900). Now my problem is the different handling of the year, which has to be parenthesized in one form but not in the other. Of course, I'd need two different commands for the different citations. But so far, every attempt at splitting up the citation label has failed, at least if I want to also use `hyperref`. Without that package, the following seems to satisfy my requirements:               \documentclass{article}     % \usepackage{hyperref}     \makeatletter     \def\@cite#1#2{ ({#1\if@tempswa , #2\fi})}     \def\@biblabel#1{}     \def\@cite@ofmt#1{\edef\my@tmp{#1}\expandafter\my@split\my@tmp}     \def\my@split#1(#2){\hbox{#1#2}}     \def\my@tcite#1#2{{#1\if@tempswa , #2\fi}}     \def\my@tsplit#1(#2){\hbox{#1(#2)}}     \newcommand\tcite[1]{{\let\@cite\my@tcite\let\my@split\my@tsplit\cite{#1}}}     \makeatother     \begin{document}     \ldots has already been demonstrated \cite{JohnDoe}.\par     \ldots as \tcite{JohnDoe} demonstrated \ldots\par     \ldots has already been demonstrated \cite{JohnDoe}.\par     \begin{thebibliography}{1}     \bibitem[John Doe (1900)]{JohnDoe}     John Doe, The famous book, 1900.     \end{thebibliography}     \end{document}      But with `hyperref` enabled, I get this error message:               ! Undefined control sequence.     \hyper@@link ->\let \Hy@reserved@a                                         \relax \@ifnextchar [{\hyper@link@ }{\hyp...      Looking at the source code of `hyperref.sty`, I see that it does attempt to support compatibility with the `harvard` package. So I adjusted my example to this:               \documentclass{article}     \usepackage{harvard}     \usepackage{hyperref}     \begin{document}     \ldots has already been demonstrated \cite{JohnDoe}.\par     \ldots as \citeasnoun{JohnDoe} demonstrated \ldots\par     \ldots has already been demonstrated \cite{JohnDoe}.\par     \begin{thebibliography}{1}     \harvarditem{John Doe}{1900}{JohnDoe}     John Doe, The famous book, 1900.\par     \end{thebibliography}     \end{document}      But I keep getting               LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.      no matter how many times I process the document. And I don't get any hyperlinks. **How can I get harvard style citations with a manually set bibliography and with working hyperlinks for my citations?** I'm using texlive 2013, which includes `hyperref.sty` v6.83m from 2012/11/06 and `harvard.sty` version 2.0.5 apparently from 1994.


title: PhD thesis format can be used for producing handout and slides?

text: I am experimenting with the 'thesis' package by Nicola Talbot. My first impressions are very pleasant, but I do have some questions, because I want to use it for producing lecture slides, handout for printing and browsable handout for mobile devices, from the same source. Presently I do have some macros which allow to produce outputs for `beamer`, `memoir` and `AcroTeX` slides   1. I wanted to magnify the size of text in screen mode. Is there an easy way to do so? (I attempted to change both points size and geometry, but in both cases the format collapses)   2. As I wanted to produce some beamer-like output, too, I added package beamerarticle. Is there any way to use it with the package? (if I add the package, then my pdflatex hangs)   3. I have a number of figures with small size, so I prefer 2-column format. It is possible? (I receive no formal error, but do not see any effect for \twocolumn)


title: How to add an extra searchable dir with personal style files to TeXLive, NOT under ~/Library/texmf?

text: Migrated from Win-MiKTeX (WMTX) to MacOSX-Aquamacs with TeXLive (MXATL), I have my personal .sty/.cls files somewhere under my homedir. So I go with ShreevatsaR's comments from Aug. 5 on this site under 'where-do-i-place-my- own-sty-files-to-make-them-available' link text. And in my case, the question remains, how to make the system MXATL aware of these files. Previously, WMTX, I could add a directory and then run something like texhash. Now I added the directory to all the relevant TeX File entries in Aquamacs-Wp-Tex-AUCTex-Tex File groups, restarted Aquamacs, even ran texhash in sudo mode, and placed an alias under ~/Library/texmf to no avail. What did I do wrong? Or can I add this dir somehow to the dirs that texhash updates, as I cannot see it mentioned in the terminal output of texhash? Or do I just have to go with ~/Library/texmf :-(? Thanks, Henk van Dorp


title: Error with using \pdfpxdimen: "Undefined control sequence"

text: I am trying to change the DPI of the output PDF using `\pdfpxdimen` in the preamble, but it returns an error:               "! Undefined control sequence \pdfpxdimen".      I guess that is because I am using XeLaTeX instead of pdfLaTeX. If it is so, is there any way to change the DPI using XeLaTeX? Here is the MWE:               \documentclass[a4paper,11pt]{article}          \pdfpxdimen=1in % 1 DPI     \divide\pdfpxdimen by 96 % 96 DPI          \begin{document}     some text     \end{document}


title: Underbrace below tabular and columns of equal width

text: I would like to get a table 3×8 with columns of equal width, below it two `undebrace` ( column 3 and columns 4-5) over text "signs rules" and "we must study the sign of g"               \documentclass{article}     \usepackage{xcolor}     \usepackage{amsmath}     \usepackage{float}     \begin{document}     \begin{table}[H]     \newcommand{\mytab}{\begin{tabular}[c]{@{}c@{}}$+\infty$\\or\\ $-\infty$\end{tabular}}     \centering     \begin{tabular}{|c|c|c|c|c|c|c|c|}     \hline     $0$ &\mytab & \mytab &\mytab & $l\neq 0$& $l$& $l$& $\displaystyle\lim_{x\rightarrow a}f(x)$\\     \hline     $0$ &\mytab & $l^{'}\neq 0$& $0$& $0$& \mytab & $l^{'}\neq 0$&                                            $\displaystyle\lim_{x\rightarrow a} g(x)$\\     \hline     \textcolor{red}{I F}& \textcolor{red}{I F} & \textcolor{red}{\mytab}&\textcolor{red}{\mytab}&\textcolor{red}{\mytab}&\textcolor{red}{$0$}&\textcolor{red}{$\dfrac{l}{l^{'}}$}&$\displaystyle\lim_{x\rightarrow a}\dfrac{f(x)}{g(x)}$\\      \hline     \multicolumn{2}{c}{}&\multicolumn{1}{|c|}{signs rules}&\multicolumn{2}{c|}{we must study the      sign  of $g$} & \multicolumn{3}{c}{}\\     \cline{3-5}     \end{tabular}     \caption{limit of quotion \label{tab2} }     \end{table}     \end{document}              the result ![enter image description here](http://i.stack.imgur.com/uAUWY.png) are there any suggestions to do it ?


title: Sorting by author last name

text: I am using document class `article`, and using the following to refer to references:                \bibliographystyle{plain}      \bibliography{MyRef}      An example of the article entry is like this:                @ARTICLE{KG:2001,      author = "{Ratnesh Kumar and Vijay K. Garg}",      title = "{some Title}",      journal = "{IEEE Transactions on Automatic Control}",      year = {2001},      volume = {46},      number = {4},      month = "",      pages = {593--606},      publisher = "",      address = ""       }      An example of the techreport entry is like this:                @TECHREPORT{E:N:T:Z:2003,         author  = "{Sameh Elnikety and Erich Nahum and John Tracey and Willy Zwaenepoel}",         title   = "{Some Title}",         type ="",         institution = "",         year  = "2003",         month = "",          number = ""      } An example of the in proceedings entry is like this:                @INPROCEEDINGS{H:G:2001,         author = "Kau Hun and Diana Glanen",         title = "{Some title}",         booktitle = "{Proceedings of the First International Workshop}",         series = "Lecture Notes in Computer Science",         volume = "1",         pages = "304--305",         year = "2001",         month="",         location="",         editor = "",         publisher = "Springer-Verlag",         address = "London, UK"       } The file name that contains the entries is `MyRef.bib` For some reason, the references are ordered by first name and not last. As I have many bib entries, could you tell me what is the fastest way I could fix this?


title: How can I get multiple subject names in the header/footer of a ConTeXt document?

text: I am setting up a ConTeXt document that requires a very particular style for the footers. I need the first and last `\subject`s followed by the page number in the right corner of the page, like so: > Subject A - Subject C - 9 The purpose is similar to how a dictionary's pages are marked, with the first and last words on that page listed in the top corner, so it's easy to skip to the correct page. I'm currently trying to make `\setupfootertexts` work for me. There are two problems I'm running into. First, the `subject` key only appears to work if it is the sole argument to one of the parameters of `\setupfootertexts`, which is preventing me from putting even one subject name in the same corner as the page number. The documentation for how to use this is nearly non-existent, even in the newest revision of the manual, only mentioning that they can be used but not addressing this problem. Second, I haven't a clue how to collect the necessary `subject` headings from the page and process them into a form that can be injected into the footer. I looked at registers, but the output of `\placeregister` appears to be too special-purpose for this use.


title: Spread bullet points across block in slide using beamer

text: I'm using `beamer` to create some slides for a presentation. I've got a block containing a bulleted list. The list only has three items, and all three items are bunched up in a small block at the top of the slide. Is there a way to spread the bullets vertically, so that the block expands to take up the whole slide, and the bullet points are equally spaced down the slide? Minimal example:               \documentclass[t]{beamer}          \usecolortheme{rose}          \title[Review of EpiSimS for Pandemic Flu]{Review of\\ \emph{EpiSimS Simulation of a Multi-Component Strategy for Pandemic Influenza}}     \author{Robin Wilson}     \institute{ICSS}     \date{\today}          \begin{document}      \begin{frame}{Why this paper?}         \begin{block}{Reasons}         \begin{itemize}             \vfill\item Agent-based modelling is a \textbf{growing field}             \vfill\item Pandemic Flu is a \textbf{major threat}             \vfill\item EpiSimS is one of the most \textbf{recent}, most \textbf{sophisticated} ABMs         \end{itemize}         \end{block}     \end{frame}     \end{document}


title: Adding 2x2 PNG Subfigures, natwidth, natheight

text: How do I add 2x2 PNG figures using subfigures? I am unsure as to how the natural height/width (natwidth, natheight) mean and there is a huge gap in between the figures. This is my code:               \documentclass[a4paper,10pt]{report}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \usepackage{tocbibind}     \usepackage{amssymb}     \usepackage{epsfig}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{fleqn}     \usepackage{amsmath} %%I am adding this!     \usepackage{bm}     \usepackage[normalem]{ulem}     \usepackage{mathtools}% http://ctan.org/pkg/mathtools     \usepackage{empheq}     \usepackage{stackengine}     \usepackage{multirow}     \usepackage{tabulary}     \usepackage{caption}     \usepackage{subcaption}     \begin{document}          \begin{figure}             \centering             \begin{subfigure}{0.5\textwidth}\hfill                         \includegraphics[width=2\textwidth,natwidth=610,natheight=642]    {![http://i.stack.imgur.com/5LWRc.png][1]}                     \caption{x}       \label{fig:First_figure}          %           \label{fig:gull}            \end{subfigure}%                ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \hfill         \begin{subfigure}{0.5\textwidth}                 \includegraphics[width=2\textwidth,natwidth=610,natheight=642]{![http://i.stack.imgur.com/9ICcj.png][2]}                 \caption{x}      \label{sf:Second_Figure}         \end{subfigure}\\                 \begin{subfigure}{0.5\textwidth}%                 \includegraphics[width=2\textwidth,natwidth=610,natheight=642]{![ http://i.stack.imgur.com/EBLCq.png][3]}                 \caption{x}                 \label{fig:Third_Figure}                        \end{subfigure}%         \begin{subfigure}{0.5\textwidth}                 \includegraphics[width=2\textwidth,natwidth=610,natheight=642]{![http://i.stack.imgur.com/o8lB6.png][4]}                 \caption{x}                 \label{fig:Forth_Figure}                        \end{subfigure}                       \caption{bla}                 \end{figure}               \end{document}


title: TextMate 2 + LaTeX bundle. Label snippets for sections

text: I'm trying to modify the code of the section's label. This is the actual code               \section{${1:section name}} % (fold)     \label{sec:${2:${1/\\\\\w+\{(.*?)\}|\\\\(.)|(\w+)|([^\w\\\\]+)/(?4:_:\L$1$2$3)/g}}}     ${0:$TM_SELECTED_TEXT}     % section $2 (end)      What this does, is to put the title of the section into the label as you type and change spaces into underscores and every character in lowercase. I want it to also change some latin characters that labels do not support, like: `a` into `a` `é` into `e` `í` into `i` `ó` into `o` `ú` into `u` `ñ` into `n` This is what it does:               \section{Configuración de diseño} % (fold)     \label{sec:configuración_de_diseño}          % section configuración_de_diseño (end)      This is what I want it to do:               \section{Configuración de diseño} % (fold)     \label{sec:configuracion_de_diseno}          % section configuracion_de_diseno (end)


In Textures, is there a way to permanently increase the size of the font used for displaying the TeX file? Or is there another way of increasing the font size?


title: Subscripts and capital letters surpressed in bibliography

text: My article title contains subscripts and capital letters for the molecular formulas. This reference I downloaded from Google Scholar. However, the subscripts and the capital letters are not displayed correctly in the bibliography. Does any one know a solution to this problem? Any help is appreciated. ![bibliography display](http://i.stack.imgur.com/4pebH.png)                   @article{tonndorf2013photoluminescence,       title={Photoluminescence emission and Raman response of monolayer MoS 2, MoSe 2, and WSe 2},     author={Tonndorf, Philipp and Schmidt, Robert and B{\"o}ttger, Philipp and Zhang, Xiao and B{\"o}rner, Janna and Liebig, Andreas and Albrecht, Manfred and Kloc, Christian and Gordan, Ovidiu and Zahn, Dietrich RT and others},     journal={Optics express},     volume={21},     number={4},     pages={4908--4916},     year={2013},     publisher={Optical Society of America}     }      This is my code:               \documentclass[a4paper,11pt]{report}       \usepackage{amsmath}         \usepackage[english]{babel}         \usepackage{textcomp}         \usepackage{ifpdf}         \usepackage{graphicx}         \usepackage{caption}         \usepackage{refstyle}     \usepackage{cite}                    \begin{document}           Trying to get the title displayed correctly in the bibliography for this article \cite{tonndorf2013}           \bibliography{bibfile}{}      \bibliographystyle{unsrt}                 \end{document}


title: Problem with *fancyhdr* package: no headings diplayed

text: I have a problem with _fancyhdr_ package. I defined the commands for the headers but the document does not display them, and there is no error message. I don't understand what I am doing wrong. My preamble is the following:               \documentclass[12pt,twoside,a4paper,titlepage]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{booktabs}     \usepackage{caption}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{amsthm}     \usepackage[babel]{csquotes}      \usepackage{epstopdf}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}     \fancyhf{}     \fancyhead[RE,RO]{\bfseries\thepage}     \fancyhead[LO,LO]{\bfseries\leftmark}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt}          \usepackage{geometry}          \usepackage{caption}     \captionsetup[figure]{font=small,labelfont=bf}      \captionsetup[table]{font=small,labelfont=bf}       Can anybody help me? Thanks a lot!


title: cannot compile when using acronym package \Iac command multiple times

text: When using the `acronym` package (current version 2012/10/29 v1.38) with hyperref, the upper case indefinite article command `\Iac` does not compile in some cases. This code               \documentclass{article}          \usepackage{acronym}     \usepackage{hyperref}          \begin{document}     \begin{acronym}       \acro {HMM} {Hidden Markov Model}       \acroindefinite {HMM} {an} {a}     \end{acronym}          \Iac{HMM}     \Iac{HMM}               \end{document}      results in               ! Undefined control sequence.     \hyper@@link ->\let \Hy@reserved@a                                         \relax \@ifnextchar [{\hyper@link@ }{\hyp...     l.13 \Iac{HMM}      I contacted the package maintainer and he does not have time to fix this issue but would incorporate patches into the .sty file if submitted to him. Thus my question is if anyone can provide me with either a workaround that I can use in my .tex file or a patch for the bug in the .sty file. I so far checked these combinations of indefinite article commands:               \Iac used once works fine     \Iac used twice for the same acronym DOES NOT WORK          \Iac* works multiple times     \Iac* then \Iac on the same acronym works     \Iac then \Iac* on the same acronym DOES NOT WORK          \iac works multiple times     \iac then \Iac on the same acronym DOES NOT WORK     \Iac then \iac on the same acronym works     Note: \iac's behaviour is inverse to that of \Iac*          \iac* and \Iac on the same acronym works in both orders      As I hardly know latex myself, any help would be greatly appreciated.


title: How do I get rid of that extra line at the end of my custom algorithmicx block?

text: I'm using the `algorithmicx` package and have created a custom block called `\On`, but even with the `noend` option for `algpseudocode` I get an extra blank line at the end of the block. Here is a complete example:               \documentclass[a4paper]{report}          \usepackage{algorithmicx}     \usepackage{algorithm}     \usepackage[noend]{algpseudocode}          % Defines custom \On ... \EndOn block     \algblockdefx[ON]{On}{EndOn}       [2]{\textbf{on}~#1~\textbf{from}~#2~\textbf{do}}          \begin{document}       \begin{algorithm}         \begin{algorithmic}           \On{$foo$}{$bar$}             \State baz           \EndOn         \end{algorithmic}       \end{algorithm}     \end{document}      This is the result: ![Custom ON-block in algorithmicx package](http://i.stack.imgur.com/v9eaS.png) As you can see, I get an extra blank line. The predefined blocks like `\If` and `\For`, however, work as expected with the `noend` option. I've read the documentation several times, but am still clueless in how I would fix this. I'm using pdflatex from MacTeX (TeX Live) 2013.


title: Problem with ExplSyntax

text: I'm trying to define a flexible "delimiter styling" command. I tried it in a package, and `\str_case:nnF` returned `Undefined Control Sequence`, whereas using `\str_case:nnn` went further and caused a different problem, which seemed to be related to the command itself. So I moved it into the document, getting the following code:               \documentclass[a4paper]{report}     \usepackage{amsthm,xparse}     \ExplSyntaxOn     \newcommand{\delim}[3][lr]{      \str_case:nnF { #1 }         {         { b }{\def\lsize{\big}\def\rsize{\big}}         { B }{\def\lsize{\Big}\def\rsize{\Big}}         { x }{\def\lsize{\bigg}\def\rsize{\bigg}}         { X }{\def\lsize{\Bigg}\def\rsize{\Bigg}}         { lr }{\def\lsize{\left}\def\rsize{\right}}         { bB }{\def\lsize{\big}\def\rsize{\Big}}         { Bb }{\def\lsize{\Big}\def\rsize{\big}}         { xb }{\def\lsize{\bigg}\def\rsize{\big}}         { xB }{\def\lsize{\bigg}\def\rsize{\Big}}         { bx }{\def\lsize{\big}\def\rsize{\bigg}}         { Bx }{\def\lsize{\Big}\def\rsize{\bigg}}         { bX }{\def\lsize{\big}\def\rsize{\Bigg}}         { BX }{\def\lsize{\Big}\def\rsize{\Bigg}}         { xX }{\def\lsize{\bigg}\def\rsize{\Bigg}}         { Xb }{\def\lsize{\Bigg}\def\rsize{\big}}         { XB }{\def\lsize{\Bigg}\def\rsize{\Big}}         { Xx }{\def\lsize{\Bigg}\def\rsize{\bigg}}     }      \str_case:nnF { #2 }         {         { s }{\def\ldel{[}\def\rdel{]}}         { r }{\def\ldel{(}\def\rdel{)}}         { b }{\def\ldel{\lbrace}\def\rdel{\rbrace}}         { v }{\def\ldel{|}\def\rdel{|}}         { a }{\def\ldel{\langle}\def\rdel{\rangle}}         { dv }{\def\ldel{\|}\def\rdel{\|}}         { rs }{\def\ldel{(}\def\rdel{]}}         { sr }{\def\ldel{[}\def\rdel{)}}         { rb }{\def\ldel{(}\def\rdel{\rbrace}}         { sb }{\def\ldel{[}\def\rdel{\rbrace}}         { br }{\def\ldel{\lbrace}\def\rdel{)}}         { bs }{\def\ldel{\lbrace}\def\rdel{]}}         { ra }{\def\ldel{(}\def\rdel{\rangle}}         { sa }{\def\ldel{[}\def\rdel{\rangle}}         { ba }{\def\ldel{\lbrace}\def\rdel{\rangle}}         { ar }{\def\ldel{\langle}\def\rdel{)}}         { as }{\def\ldel{\langle}\def\rdel{]}}         { ab }{\def\ldel{\langle}\def\rdel{\rbrace}}         { rv }{\def\ldel{(}\def\rdel{|}}         { sv }{\def\ldel{[}\def\rdel{|}}         { bv }{\def\ldel{\lbrace}\def\rdel{|}}         { av }{\def\ldel{\langle}\def\rdel{|}}         { vr }{\def\ldel{|}\def\rdel{)}}         { vs }{\def\ldel{|}\def\rdel{]}}         { vb }{\def\ldel{|}\def\rdel{\rbrace}}         { va }{\def\ldel{|}\def\rdel{\rangle}}         { rdv }{\def\ldel{(}\def\rdel{\|}}         { sdv }{\def\ldel{[}\def\rdel{\|}}         { bdv }{\def\ldel{\lbrace}\def\rdel{\|}}         { adv }{\def\ldel{\langle}\def\rdel{\|}}         { vdv }{\def\ldel{|}\def\rdel{\|}}         { dvr }{\def\ldel{\|}\def\rdel{)}}         { dvs }{\def\ldel{\|}\def\rdel{]}}         { dvb }{\def\ldel{\|}\def\rdel{\rbrace}}         { dva }{\def\ldel{\|}\def\rdel{\rangle}}         { dvv }{\def\ldel{\|}\def\rdel{|}}         { lr }{\def\ldel{(}\def\rdel{\@empty}}         { rr }{\def\ldel{)}\def\rdel{\@empty}}         { ls }{\def\ldel{[}\def\rdel{\@empty}}         { rs }{\def\ldel{]}\def\rdel{\@empty}}         { lb }{\def\ldel{\lbrace}\def\rdel{\@empty}}         { rb }{\def\ldel{\rbrace}\def\rdel{\@empty}}         { la }{\def\ldel{\langle}\def\rdel{\@empty}}         { ra }{\def\ldel{\rangle}\def\rdel{\@empty}}         { ov }{\def\ldel{|}\def\rdel{\@empty}}         { odv }{\def\ldel{\|}\def\rdel{\@empy}}         { ssi }{\def\ldel{[}\def\rdel{\mathclose{[}}}         { sis }{\def\ldel{\mathopen{]}}\def\rdel{]}}         { sisi }{\def\ldel{\mathopen{]}}\def\rdel{\mathclose{[}}}     }     \ifx\rdel\@empty         \lsize\ldel     \else         \lsize\ldel #3 \rsize\rdel     \fi     }     \ExplSyntaxOff     %\ignopt{greek}          \begin{document}     $$\delim[lr]{r}{\fr{a}{b}}$$     \end{document}      And then the strangest thing happened:               ./delim_attempt.tex:3: Undefined control sequence.     <recently read> \ExplSyntaxOn           l.3 \ExplSyntaxOn      And I'm like, "WHAT????" How is that possible? **Update:** Having taken the comments below into account, I corrected `[r]` to `{r}`, loaded `xparse`, and updated `Expl`, meaning `\str_case:nnF` now works. So the code has been changed accordingly. Btw suspecting the spaces might be troublesome I tried removing them (e.g. `{ lr }`->`{lr}`), and the wrong typesetting of the code above is still there. That is, as it is, the code gives:               ./delim_attempt.tex:87: Undefined control sequence.     \\delim ...\@empty\lsize \ldel \else \lsize \ldel                                                        #3\rsize \rdel \fi      l.87 $$\delim[lr]{r}{\frac{a}{b}}                                      $$      and by commenting the `\lsize\ldel #3 \rsize\rdel` in the `\else` branch, I get to typeset: rsrbvadvrssrrbsbbrbsrasabaarasabrvsvbvavvrvsvbvardvsdvbdvadvvdvdvrdvsdvbdvadvvlrrrlsrslbrblaraovod which of course simpy _isn't_ what I want.


title: How to indent entire section heading and indent second line, if it comes, further

text: I am formatting my CV in latex, and I currently have all my section headings indented by 2em. The first item is the date of the `\NewEntry` and after that I have `\hspace{1.5em}` inserted to separate the date from the position field. However, some of my position titles are longer than one line. As such, the second line conforms to the 2em indent that applies to the entire heading (meaning it is aligned with the date). But what I want the second line to do, should it come, is to conform to the beginning of the position title (i.e. `\hspace{1.5em}` after the date entry. So, essentially, I want an indent within an indent, or something of that nature. Note: If I manually enter an `\hspace` into my position title where I want the second line text to indent, which is an annoying solution anyway, no change results. Here is the code I am using:               \documentclass{scrartcl}          \reversemarginpar           \newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}}           \usepackage[nochapters]{classicthesis}      \usepackage[LabelsAligned]{currvita}      \usepackage{color}          \usepackage{hyperref}           \newlength{\datebox}\settowidth{\datebox}{Spring 2011}           \newcommand{\NewEntry}[3]{\noindent \hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3      \vspace{0.5em}}           \begin{document}     \thispagestyle{empty}          \begin{cv}          \NewEntry{2013}{Research Fellow, Ronald McDonald International Fellowship, Institute of Multidisciplinary Education}           \end{cv}     \end{document}      Here is how this looks:               2013     Research Fellow, Ronald McDonald International     Fellowship, Institute of Multidisciplinary Education      Here is how I want it to look:               2013     Research Fellow, Ronald McDonald International              Fellowship, Institute of Multidisciplinary Education      *Keep in mind that this entire section is already indented 2em. In addition, I want to indent Fellowship 1.5em (as shown in the immediately above example).