title: Putting two-column long figure in Revtex4-1

text: I have a problem with APS's revtex4-1. I want to place an twocolumn-wide figure at the bottom of the page. I know               \begin{figure*}[position]     picture     \end{figure*}      in {article} document class [position] can be htb! , and I have no problem in {article} in placing pictures on here, top, and bottom. But!! in {revtex4-1} document class [position] is not working! only for t. If I use b, the picture appears on the next page, and it takes up all paper. I want it to be bottom. I tried \usepackage{dblfloatfix} but it does not work in revtex4-1 and makes error with equation, and so on..(I see revtex4-1 is incompatible with dblfloatfix.) The following URL is for article class, I have no problem to follow its instruction. Displaying a wide figure in a two-column document Please, Help! This is my sample code, I manage to put long table at the position where I wanted, but long figure is not! Thanks,               \documentclass[     showkeys,reprint,     %superscriptaddress,     %groupedaddress,     %unsortedaddress,     %runinaddress,     %frontmatterverbose,     %preprint,     %showpacs,preprintnumbers,     %nofootinbib,     %nobibnotes,     %bibnotes,      amsmath,amssymb,      aps,     %pra,     %prb,     %rmp,     %prstab,     %prstper,     floatfix,     ]{revtex4-1}          \usepackage[demo]{graphicx}% Include figure files     \usepackage{dcolumn}% Align table columns on decimal point     \usepackage{bm}% bold math     %\usepackage{hyperref}% add hypertext capabilities     %\usepackage[mathlines]{lineno}% Enable numbering of text and display math     %\linenumbers\relax % Commence numbering lines          %\usepackage[showframe,%Uncomment any one of the following lines to test     %%scale=0.7, marginratio={1:1, 2:3}, ignoreall,% default settings     %%text={7in,10in},centering,     %%margin=1.5in,     %%total={6.5in,8.75in}, top=1.2in, left=0.9in, includefoot,     %%height=10in,a5paper,hmargin={3cm,0.8in},     %]{geometry}     \usepackage{amsmath,amssymb,amsfonts}     \usepackage{fancyhdr}     \usepackage{lipsum}% just to generate text for the example     \usepackage{subcaption}     \usepackage{multirow}     \pagestyle{fancy}     \fancyhf{}           \fancyhead{\nouppercase\leftmark}     \fancyhead[R]{\thepage}     \fancyhead[C]{}                              \begin{document}          \preprint{APS/123-QED}          \title{     %\begin{minipage}{14cm}     Microscopic Images and Micro Vickers Hardness Test of     Fullly Pearlitic High-Carbon Steel Specimens     %\end{minipage}     }     \author{ABCD}     \email{ABCD}     \collaboration{ABCD}%\noaffiliation     \date{\today}% It is always \today, today,                  %  but any date may be explicitly specified          \begin{abstract}     \begin{center}     {\bfseries Abstract}     \end{center}     \lipsum[1]     \end{abstract}     \keywords{\lipsum[1]}%Use showkeys class option if keyword                                   %display desired          \maketitle     %\tableofcontents     \section{Introduction}     \lipsum[1-4]          \begin{table*}[t]     \centering     \begin{tabular}{|r|r|r|r|r|r|r|r|r|r|r|}       \hline       % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...       \multirow{2}{10mm}{}  & \multicolumn{5}{c|}{82BC FP steels} & \multicolumn{5}{c|}{TWIP     steels} \\ \cline{2-11}                              & \parbox[t]{14mm}{AR \\ 1000MPa} & 1200MPa & 1300MPa & 1500MPa     & 1800MPa & \parbox[t]{14mm}{AR \\ 900MPa} & 1200MPa & 1300MPa & 1500MPa & 1800MPa \\ \hline       Before($mm$)           & - & 15.00 & 15.00 & 20.00 & $\times$ & - & 15.00 & $\times$ &     15.00 & 15.00 \\ \hline       After($mm$)            & - & 13.78 & 13.17 & 13.17 & $\times$ & - & 12.88 & $\times$ & 11.95 & 11.10 \\ \hline       \%CW ($\%$)            & 0 &  1.04 &  1.53 &  1.53 & $\times$ & 0 &  1.75 & $\times$ &      2.44 &  3.02 \\ \hline          \end{tabular}     \end{table*}     \begin{figure*}[b]                     \includegraphics[width=.4\linewidth]{tiger}                     %\linewidth or \textwidth                     \caption{A gull}                     \label{fig:gull}     \end{figure*}     \section{Experiment}          \lipsum[1-10]     \begin{figure}[b]        \begin{center}        \includegraphics[width=1.0\linewidth]   {mouse}        \caption{my caption}        \end{center}     \end{figure}     \end{document}     %     % ****** End of file apssamp.tex ******


title: Bold labels and more with custom bibtex bst and author-year

text: I have the requirement to print the labels for the entries in the bibliography in bold, replace the `,` between multiple authors (if any) with `;` and end them with `:`. The following picture is an example from my guidelines:   ![enter image description here](http://i.stack.imgur.com/0M1Ga.png)   I suppose that should be possible by modifying my custom .bst file and especially the `format.names` function. Based on this and this I came up with the following function:               FUNCTION {makebold}{     { duplicate$ empty$         { pop$ "" }         { "\textbf{" swap$ * "}" * }       if$      }      However, when I add it to my bst file I only get compilation errors without even calling the function, just by copying it into the file.   This is my current `format.names` function.               FUNCTION {format.names}     { 'bibinfo :=       duplicate$ empty$ 'skip$ {       's :=       "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{vv~}{ll}{, jj}{, f{.}.}"           format.name$           bibinfo bibinfo.check           't :=           nameptr #1 >             {               nameptr #2               #1 + =               numnames #2               > and                 { "others" 't :=                   #1 'namesleft := }                 'skip$               if$               namesleft #1 >                 { ", " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   "," *                   t "others" =                     {                       " " * bbl.etal *                     }                     { " " * t * }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$       } if$     }      I have no experience with bst files at all, but need this fixed, because my instructor is already complaining that I should use Word instead of LaTeX and he will force me to migrate my paper if I can't sort out his beloved bibliography style :( It would be really nice if someone could help me print my entries the way they should be!   Last remark: don't know if that's relevant, but the names should **not** be bold in the text like when I'm using `\citep` etc. **Update:** I've managed (with pure trial and error) to get the labels bold (I had to rename the function to `bolden` instead of `makebold`, don't know why) and replace the comma between authors with a semicolon. **What's still missing is the final colon between the author list and the title.**   My current `format.names` looks like that:               FUNCTION {format.names}     { 'bibinfo :=       duplicate$ empty$ 'skip$ {       's :=       "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{vv~}{ll}{, jj}{, f{.}.}"           format.name$ bolden           bibinfo bibinfo.check           't :=           nameptr #1 >             {               nameptr #2               #1 + =               numnames #2               > and                 { "others" 't :=                   #1 'namesleft := }                 'skip$               if$               namesleft #1 >                 { "; " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   "" *                   t "others" =                     {                       " " * bbl.etal bolden *                     }                     { "; " * t * }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$       } if$     }


title: a new symbol: can we make a symbol like this

text: ![a new symbol](http://i.stack.imgur.com/kIJxz.jpg) Can we build a new symbol given above. It seems letter "t" but with two medium line. Thanks in advance.


title: How do I register the prefix of my expl3 package?

text: This question needs an easy to find answer here, so: I was told that I can and should register prefixes of my macro names in my `expl3` using packages. How do I do that?


title: How to delete previous symbol?

text: I want to remove all cites from document. Document1:               ....      \renewcommand{\cite}[1]{}     \begin{document}     input{document2}     \end{document}      Document2:               \begin{document}     ... bla-bla-bla \cite{Blablaer2012}. Foo bar bar fooed...     \end{document}      And I get > bla-bla-bla . How can I delete whitespace before? Maybe there is some command like \delprevsymbol?


title: How to change the font of the lettrine?

text: I would like to change the font of the letrrine               \renewcommand{\LettrineFontHook}{\fontfamily{the_name}}          \lettrine[lines=3, lhang=0.33, loversize=0.25]{B}{ecause}      using this font: http://www.ctan.org/tex-archive/fonts/script which is installed in               /usr/local/texlive/2014/texmf-dist/fonts/type1/public/calligra-type1/callig15.pfb     /usr/local/texlive/2014/texmf-dist/fonts/afm/public/calligra-type1/callig15.afm     /usr/local/texlive/2014/texmf-dist/fonts/source/public/calligra/callig15.mf     /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/calligra/callig15.tfm      However, I do not know how to specify correctly its name. I tried               \renewcommand{\LettrineFontHook}{\fontfamily{callig15}}      But it gives               Font Shape 'T1/callig15/m/n' undefined(font)      Thanks for your help! nbi


title: Large equation goes out of margin, want to centre it?

text: I have a large equation               \begin{document}          \begin{gather}     W = \frac{1}{2\mu_0}(\frac{\Psi'^2 \pi^2}{b^2} \sum_{m,n} a_{mn}^2 n^2 (ab/4) + \frac{\Psi'^2 \pi^2}{a^2} \sum_{m,n} a_{mn}^2 m^2 (ab/4) + \Psi'^2ab(\mu^2 + \sum_{m,n} \frac{8a_{mn} \mu^2}{\pi^2 mn} + \frac{a_{mn}^2 \mu^2}{4})) \notag \\[1ex]     W = \frac{\Psi'^2 ab}{2\mu_0}(\mu^2 + \sum_{m,n} [ \frac{a_{mn}^2}{4}(\frac{m^2 \pi^2 }{a^2} + \frac{n^2 \pi^2}{b^2} + \mu^2) + \frac{8a_{mn}\mu^2}{\pi^2 mn}]). \label{eq:energycart}     \end{gather}          \end{document}      On my document settings the first equation JUST goes off the expected margin and as a result is not centred in the middle of the page (the left side stays on the margin, the right side goes off). Is there anyway to centre the equation, even if it goes out of the margins? I don't want to split the equation on to two lines.


title: Margins on a minipage

text: I have a formula which very nearly fits on one line, and I'd like it to sit on one line as it looks silly split onto two. If I reduce the left and right margins for the whole document to 1cm, the long formula fits on one line but the rest of the document looks strange. Is there any way to set the margins for just that one line to 1cm, while keeping the rest of the document at 2.5cm. Such as using a minipage?


title: How to install a dictionary (danish) in Texmaker

text: I began my physics studies last summer. All our written assignment is in LaTeX and that's ok - and I use Texmaker. I think Texmanker is a good program and I have just one problem with it. I can't install a danish spellcheck and use it in LaTeX. That is not nice, so I really need your help! Help me please. Tell me where and how to install a danish spellcheck and how to use it in Texmaker, pls. I am desperate! :/


title: Make All fonts embedded in WinEdt

text: I have received the following comment from publisher on my paper: "Please create a good pdf with all fonts used embedded. If you are unable to create a good pdf with all fonts embedded. Please see: http://www.acm.org/sigs/publications/sigfaq#a14 for help embedding Type 1 fonts." I have two questions: 1. How could I check whether I have all fonts embedded? 2. How to make all fonts embedded in WinEdt?


title: How to use \lll properly

text: I need the symbol `<<<` (left rotation). Now from TexStudio help, I found it as `\lll`. But when I use it, I get an error `Undefined control sequence ... \lll`. How to fix it?


title: How can I make the items aligned in section?

text: I have this code               \documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}          \usepackage[inline]{enumitem}        \setlist[enumerate,1]{label=\textit{\alph*)}}     \usepackage[table]{xcolor}     \definecolor{orange}{HTML}{FFC296}     \begin{document}                \section{Student 93b427156c}     \begin{description}         \item[number] 93b4s27156c                       \item[name] Note that this analysis of a formative as a pair of sets of features is necessary     to impose an interpretation on an important distinction in language use.     \end{description}     \end{document}      I want to display them like tables so that the data does not come under the header. So, basically, like two columns, so that headers are on left and content on right in separate columns. Something like this: ![enter image description here](http://i.stack.imgur.com/e10BV.png)


title: How to Create an un-ordered tree in LaTeX?

text: Is there a way to create a tree in LaTeX without using any "ordering" ? So far, all the examples I came across are structured in this way               child{ node [arn_n] {20}                             child{ node [arn_r] {18}}                             child{ node [arn_x] {}}             }                                  Where the parent knows in advance his children, In my case I would generate this LaTeX code from a Python script, going through some data, and the children are not known until actually found in the data. So What I am looking for is some sort of library that would allow me to list all my nodes, and each node would only know his parent.                child 0  parent 0      child 1  parent 0      child 2  parent 0      child 3  parent 1       and then my tree would be generated accordingly in LaTeX. Unfortunately I have not found any examples yet or if this was possible. Thank you.


title: How can I access the style defined by \DeclareCaptionLabelFormat elsewhere?

text: ### Question I have defined a certain font style for my captions and would like to use this in another part of my document. How can I access this style, so that I can reuse it? _NB: I want to reproduce the style as a best practice for code re-use. I could just as well copy paste the code to that particular section of my document, but I think it could turn out to be an unwise decision later on._ ### MWE               \documentclass{article}          \usepackage{caption}          \DeclareCaptionType{problem}[Problem]     \DeclareCaptionLabelFormat{problemlabel}{\color{red}▶~~%         \sffamily#1~~#2}     \captionsetup[problem]{ labelformat=problemlabel }          \begin{document}          \captionof{problem}{This is a caption with the style ``problemlabel.''}          This text should somehow also by styled like a ``problemlabel.'' How can this be achieved?          \end{document}      * * * ### Rationale The reason for re-using the code is the following. I have defined a box that I use to set apart mathematical problems, which also get numbered and have a caption. In particular instances, however, I want to have such a box with a caption, but without a number in the caption, as in "Problem — _caption_ " rather than "Problem 9 — _caption_ ". For this I would like to use a starred version of my environment. The caption package provides the command \captionof*{}{}, however, this removes the entire label—not just the number. Therefore, I am trying to re-use the style of the original caption label in the design of the box, but now write down "Problem" myself. The following code will make this clear:               \NewDocumentEnvironment{problembox}{smo}{%         \begin{mdframed}[%             frametitle={%                 \IfBooleanTF #1                 { \captionof*{problem}{#2} }%                 { \captionof{problem}{#2} }%                 \IfNoValueF{#3}{\label{#3}}%             },             style=boxstyle,         ]         \small         }{%         \end{mdframed}     }      _Instead of_ the line `{ \captionof*{problem}{#2} }%`, I would like to have something in the likes of `{ {\captionlabelstyle Problem} #2 }`. That is why I need to access the style defined for the caption label.


title: pdflatex output is very annoying

text: I'm trying to understand the pdflatex output and I found a big problem: I have a warning at one location, for example the line is               \end{foo} test)test      pdflatex prints the warning message and after that the line information:               l.73 \end{foo}                        test)test[1] [2] [3]) ("C:\Users\Nils\Documents\chapter2.tex"      I though the line after "l.73" is resevered for quotings from the tex file. But you can see that the name of the next file is printed, too. If there is a rounded bracket in it, like in this example, the output can't be understood by a parser because there line should be checked for filenames but the first bracket will close the last file... What can I do?


title: useless efforts in the development of LaTeX-related tools ?

text: This question/concern may sound like a troll but it it not. I'm more and more concerned on how relevant it is too dedicate energy to the development of next generation tools like LaTeX3, LuaTex, Tikz... Some people agree that the pdf format is doomed to disappearance because of its lacks of interactivity and should be replaced by (more open) formats such as html/xml and equivalent. In this context, will the rules of typography slowly become obsolete and what will be the goal of using compiling-like tools such as LaTeX? I know that as long as nice math fonts are not really available in formats other than ps/pdf, scientific fields will still use Latex but that may be over very soon. What are your thoughts on this? edit 1: it looks like my rather provoking title yielded unexpected results. I just wanted to know in which extent LaTeX-like tools developers do consider possible evolutions in their decisions? As noted by Jan and Frabjous, TeX could be ported/converted to other formats even though it is currently mainly dedicated to pdf outputs. edit 2: although I am a big fan of nice layouts and documents, the actual way of using pdf files is annoying. We have to open them in new browsers when we click on an existing hyperlink and they cannot be edited and require a full compilation for a single grammar mistake (when created with LaTeX). Maybe next generation computers will be powerful enough to compile LaTeX documents on the fly or technologies like `http://river-valley.tv/tex-and-the-ipad/` are the future. I am just wondering


title: Basic bar chart with text as x axis labels

text: I am trying to create a very basic bar chart using _pgfplots_. I need four bars representing percentages with text as labels under the _x_ axis. Text labels contain spaces and accented, non-English characters. Since I use _pgfplots_ for all other charts in my paper I thought I'd give a shot at this one, too. However, since this chart uses non-numeric _x_ values it's a little tricky. I'm trying to start with a text book example and go from there. Here's the example from the _pgfplots_ manual (4.20.1 on p. 210) I'm trying to use:               \documentclass[12pt,a4paper,oneside]{article}          \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=1.3}          \begin{document}          \begin{tikzpicture}     \begin{axis}[symbolic x coords={a,b,c,d,e,f,g,h,i}]     \addplot+[smooth] coordinates {     (a,42)     (b,50)     (c,80)     (f,60)     (g,62)     (i,90)};     \end{axis}     \end{tikzpicture}          \end{document}      I have major problems with this code. For starters, TeXmaker hangs while trying to compile, I have to kill the pdflatex process to reanimate it. When I do I get the following error messages: > ! Package pgfkeys Error: I do not know the key '/pgfplots/compat' and I am > goin g to ignore it. Perhaps you misspelled it. > > ! Package PGF Math Error: Could not parse input 'a' as a floating point > number, sorry. The unreadable part was near 'a'.. If someone could shed some light on what I'm doing wrong I'd most appreciate it. I am using a recent version of Ubuntu and TeX Live (2009-10). I have been using them for a year or so, never had a hang issue so far. Recommendations for any other solution (preferably without any external program) are also welcome and appreciated. Thanks.


title: Scientific Notation Only For Large Numbers

text: I have a table full of numbers. Most of them are floating point numbers that are less than one, some are integers from 1-100, and a few are large (×10^75). I know how to set the precision of the small numbers using siunitx so that they all line up nicely, but I'd like the whole numbers to stay as they are and the large numbers (and only the large ones!) to be put in to scientific notation. Is there a way to automatically set any number larger than 100 to be formatted in scientific notation, while leaving the smaller numbers in standard decimal notation and the intermediate numbers as integers? The intermediate numbers are less important to happen automatically, as they're always in a certain row, so I can simply treat them as text. EDIT: Here is a MWE.               \documentclass[11pt,a4paper,twoside]{book}     \usepackage[top=30mm, bottom=30mm, left=40mm, right=20mm]{geometry}           \usepackage{fancyhdr}     \pagestyle{fancy}     \setlength{\headheight}{15pt}          \usepackage{siunitx}     \sisetup{round-mode=places,round-precision=6}                    \begin{document}               \begin{table}     %\begin{center}     \centering     \caption{Example table for Ask-Ubuntu.}          \begin{tabular}{rr|rrr}                    &       & Control Case & History & No History \\              \hline & A & \num{0.143392788} & \num{9026780216140000000000} & \num{0.192293062} \\         file & B    & \num{0.002162212} & \num{-725293214339000000000} & \num{0.004052388} \\               & C  & 98    & 75    & 65 \\         \end{tabular}%          \label{t:example_table}     \end{table}          \end{document}


title: Change multiple author reference from '&' to 'and' with natbib bibliography

text: I'd like to change the separation between multiple article/book authors from '&' to 'and' in natbib. eg:               @book{lee2009global,       title={{Global Marketing Management}},       author={Lee, K. and Carter, S.},       isbn={9780199239429},       lccn={2009005337},       comment={http://books.google.com/books?id=ZBkPOQAACAAJ},       year={2009},       publisher={Oxford University Press}     }      then:               \usepackage[longnamesfirst]{natbib}          \begin{document}     \bibpunct{(}{)}{;}{a}{,}{,}          \citep{lee2009global}      produces:                (Lee & Carter, 2009)      I'd like it to produce:                (Lee and Carter, 2009)


title: Timeline in Beamer presentation

text: I'm a student of engineering and I intend to learn more about Beamer/LaTex. After a long research, I found some interesting images showing the closest style I plan to add in my work. Follow the link: http://tfischernet.files.wordpress.com/2010/08/history11.png I have already tried to contact the author, but he did not answer me. Could anyone do me the kindness to explain me how implement this timeline? ![enter image description here](http://i.stack.imgur.com/zlUCU.png)


title: Catalan language "ela geminada"

text: The language setting for my document is Catalan `babel`. The Catalan alphabet includes a letter called _ela geminada_ , spelled with two lower-case `l` separated by the interpunct `·` (i.e. "cel·la" or "pel·lícula". More information at http://en.wikipedia.org/wiki/Interpunct#Catalan). I would like to input `l·l` from the keyboard rather than writing `\lgem`, which is the command given by the `babel` package in the `catalan` mode. However, when I type `l·l`, the spacing is too big, and I would like it to look as the output of the original command. An image to clarify this: ![enter image description here](http://i.stack.imgur.com/RZDlK.png)


title: amstex: operator definition error

text: I can't understand why the following code give me an error               \input amstex.tex     $\mathop{\rm arctg}(x)$     \bye      Thus, the input does not work with my macros that include the use of \rm, \mathop, etc., instructions. Error:               ! AmS-TeX error: Use \rm only in text.     \err@ #1->\errmessage {AmS-TeX error: #1}     \rm ...\Err@ {Use \string \rm \space only in text}                                                       \else \tenrm \fi     l.3 $\mathop{\rm arctg}(x)$`


title: Configuring command line editing for MiKTeX

text: I just started using MiKTeX 2.9. I set up the Makefile to produce the pdf and it works good. However, how do I set up command line editing of my .tex file. I have the downloaded the Emacs editor and placed it in the PATH. However, when I do               $ emacs overview.tex      or       $ texworks overview.tex      it opens a new pop up with the said file. Rather I would like to edit on the command line itself (Something like the vim editor) I also want syntax highlighting etc.


title: Left-align math with fleqn inside split environment

text: Below, how would I move the first math-line left so that `a^2` left-aligns with `where`?               \documentclass{article}     \usepackage[fleqn]{amsmath}     \begin{document}     \setlength{\parindent}{0pt}          Some text     \begin{equation}         \begin{split}             a^2+\lambda_\phi=\phi\\              \begin{aligned}                 \text{where\qquad}                 a &= \pm \sqrt{1-\cos^2\theta} \\                 \lambda_\phi &= \cos\theta\cos\phi - \sin\theta\sin\phi             \end{aligned}         \end{split}     \end{equation}     Some more text          \end{document}      ![enter image description here](http://i.stack.imgur.com/bE5uv.png)


title: How to change the color of bullets in a list

text: How can I change the color of bullets in a book?               \documentclass{book}     \usepackage{pifont}     \usepackage{xcolor}     \definecolor{myblue}{RGB}{0,29,119}          \begin{document}          \begin{dinglist}{110}       \item{Sample text}            \begin{dinglist}{228}         \item{Sample text}             \begin{dinglist}{227}          \item{Sample text}             \end{dinglist}       \end{dinglist}     \end{dinglist}          \end{document}      ![enter image description here](http://i.stack.imgur.com/gMZj3.png)


title: Bad math font quality in PDF

text: I have a problem with **bad font quality that only affects "math"** environments. I am writing a document with **lyx** 2.0.2 (OS: Ubuntu). The chosen class is " **report** ". Since the normally used fonts were looking bad in the PDF output, I changed them to the following settings: **Roman: Bitstream Charter / Sans Serif: Helvetica (92%) / Typewriter: Courier** The general text looks great now, but the **math text is very thin** and bad to read. My best guess was that Bistream Charter has no math font and it is replaced by some standard lyx font that looks bad but I couldn't find any working solution that only fixes the math font quality without messing up the general text font (e.g. I tried \usepackage{mathptmx} that did exactly that). Can anybody help?


title: Custom header/footer rules (fancyhdr?)

text: I want to be able to customize my header/footer so far that I can change the rules that separate it from the document. Look for example at http://ww1.microchip.com/downloads/en/appnotes/00734b.pdf (second page and further), I want to be able to make header/footer rules like that. Currently I'm using the `fancyhdr` package, but that's not necessary.   I already tried to add `\hrule` in the footer, and that's working, but I'd think there is a neater solution? The code I used for that:               \renewcommand{\footrulewidth}{0pt}     \renewcommand{\headrulewidth}{0pt}     \fancyhead[L]{     \getfile\vskip2pt     \hrule width \hsize height 1pt\vskip1pt\hrule width \hsize height 2pt %     }     \fancyhead[C]{\getsubtitle\vskip3pt}     \fancyhead[R]{\gettitle\vskip3pt}     \fancyfoot[L]{     \hrule width \hsize height 2pt\vskip1pt\hrule width \hsize height 1pt %     \vskip2pt Some text.     }     \fancyfoot[C]{\vskip5pt Some text.}     \fancyfoot[R]{\vskip5pt Some text.}


title: \pgfmath and \foreach in TikZ

text: I am quite new to TikZ. I have the following code:               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{chains}     \begin{document}     \begin{tikzpicture}[start chain=circle placed {at=(\tikzchaincount*30:1.5)},                         regular/.style={draw,circle,inner sep=0,minimum size=4mm}]     \foreach \i in {0,...,11}       \node [on chain, regular] (\i) {\i};     \foreach \i in {0,...,11}       \draw [->] (\i) to ({\pgfmathparse{int(mod(\i+1,12))}\pgfmathresult});     \end{tikzpicture}     \end{document}      What I intended to do is to draw a series of 12 nodes evenly placed on a circle, and draw an arrow between every two neighbors. LaTeX gave an error message saying               !incomplete \iffalse; all text was ignored after ...      What is the correct way to do what I intended?


title: How to use an asterism to separate sections?

text: I'd like to use an asterism to separate groups of paragraphs from one-another. The asterism shall appear in a line on its own, like in this document. Can anybody tell me where I can find an asterism symbol (is there a macro that makes one from the asterisk symbol from the font you're using?) and how to use it as a separator as described above? I'm using LaTeX with the scrartcl document class.


title: Using pgfplots and gnuplot and compiling with output-directory

text: I would like to use the `pgfplots` package along with `gnuplot`. However, I cannot get this to work if I compile using the `-output-directory` option. For example, if I have the following MWE:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}          \begin{tikzpicture}         \begin{axis}             \addplot gnuplot{x};         \end{axis}     \end{tikzpicture}          \end{document}      If this is saved as `test.tex` and I compile with `lualatex -shell-escape test.tex`, it works fine. However, if I try to change the output directory, such a compiling with `lualatex -shell-escape -output-directory=.. test.tex`, then `pgfplots` cannot find the file `test.pgf-plot.table` which contains the `gnuplot` output. (The output directory `..` was just to make this example as simple as possible.) Is there a way to patch the command that reads `gnuplot` output to search for the file in the output directory instead of the current working directory?


title: Shortcut for export PDF on LyX?

text: Is there a shortcut in LyX for export to PDF? Is there any way to auto export on save?


title: How to export biblatex data to HTML?

text: I've been using `biblatex` for a while, and I now want to export my `biblatex` citation data to HTML, too. There are `bibtex2html` and some other tools for `bibtex`, but I couldn't find any equivalent tool to do the same for `biblatex`. Is there any tool to do like what "`bibtex2html`" do for `bibtex` files?


title: how to redefine \href to \htmladdnormallink when in \htmlonly?

text: I use Scientific word (SW), which generates Latex, then I process the Latex output using Latex2html (l2h) to generate HTML as the support for HTML is better with l2h than SW (table of contents, break the page into sub pages, etc...) SW supports the package `hyperref` but l2h does not. Hence, when when a hyperlink is added using SW, the code generated reads like this:               \documentclass{article}%     \usepackage{html}     \usepackage{hyperref}%     \begin{document}     \href{http://www.yahoo.com}{yahoo}     \end{document}      The above can't be processed as is by l2h. To process this with l2h this line               \href{http://www.yahoo.com}{yahoo}      needs to change to one that l2h will process, which is               \htmladdnormallink{yahoo}{http://www.yahoo.com}      So I think all what is needed is to make `renewcommand` or similar (I am not a Latex expert). So that I would write               \documentclass{article}%     \usepackage{html}     \usepackage{hyperref}%          \begin{htmlonly}       write something here to make \href{a}{b} below mean \htmladdnormallink{b}{a}     \end{htmlonly}          \begin{document}     \href{http://www.yahoo.com}{yahoo}     \end{document}      I do not know if the above makes sense. or possible. without this, I'd have to find a way to parse the latex file each time and change each `\href` to `\htmladdnormallink` (may be I can learn `sed` or such to do it. But if there is a way to do with Latex macro that will be better. **question is** : If the above is possible, what will the correct syntax of this command to add at the top ? **FYI** For completion, this is the final setup so that links work both in SW and l2h                \documentclass{article}%      \usepackage{html}  %    for L2H      \usepackage{hyperref}%  for latex     \begin{document}          \begin{htmlonly}       \def\href#1#2{\htmladdnormallink{#2}{#1}}  %for L2H only     \end{htmlonly}          \href{http://www.yahoo.com}{yahoo}          \end{document}


title: Create a local texmf tree in MacTeX

text: I know that TeX Users Group recommends putting your local texmf tree at `~/Library/texmf` (see link). However, I want MacTeX to see my local texmf tree in a folder in my Dropbox. This allows me to refer to the same local texmf tree on multiple computers, which makes updating my local texmf tree easier (just update the version in the Dropbox and all the computers see the update). How do I do this? Note: I found some similar tex.stackexchange questions, but they don't answer my question.   * TeXLive on Mac How to make LaTeX see local texmf tree   * MikTeX on Windows Create a local texmf tree in MiKTeX


title: How to suppress the hanging-over text part of a section title within the table of contents?

text: My question is, if there exists a method to suppress hanging-over text elements in the table of contents. Below you will find my MWE. Thanks a lot for your solutions and comments!               \documentclass{scrbook}     \usepackage{ragged2e}     \makeatletter     \renewcommand{\@pnumwidth}{3em}     \makeatother     \begin{document}     \begin{FlushLeft}     \tableofcontents     \end{FlushLeft}     \chapter{chapter -- what a very long  acronym (\emph{qwertzuiopasdfghjk})}     some text     \section{section -- what a very long and even longer heading with this acronym \emph{qwertzuiopasdfghjk}}     some text\newpage     \setcounter{page}{10}     \section{Another section}     \end{document}


title: \verbatiminput stopped working?

text: In the past, I've used the `\verbatiminput` command in `\fancyvrb` without problems, but today it's not working for me. I checked, and `/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty` is still installed. Perhaps a system upgrade to some other part of Tex changed something?               \documentclass[a4paper,10pt]{report}          \usepackage{fancyvrb}          \begin{document}          Here is the listing of |creatur-examples.cabal|.     \verbatiminput{creatur-examples.cabal}          \end{document}      Here is the output:               amy@wombat$ xelatex -shell-escape -interaction=nonstopmode AmyTest     This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian)      \write18 enabled.     entering extended mode     (./AmyTest.tex     LaTeX2e <2011/06/27>     Babel <3.9k> and hyphenation patterns for 2 languages loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty     Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix      <2008/02/07> (tvz) (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty     )) (./AmyTest.aux)     ! Undefined control sequence.     l.8 \verbatiminput                       {creatur-examples.cabal}     [1] (./AmyTest.aux) )     (see the transcript file for additional information)     Output written on AmyTest.pdf (1 page).     Transcript written on AmyTest.log.      And here's the log:               This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2014.4.15)  21 MAY 2014 17:13     entering extended mode      \write18 enabled.      %&-line parsing enabled.     **AmyTest     (./AmyTest.tex     LaTeX2e <2011/06/27>     Babel <3.9k> and hyphenation patterns for 2 languages loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count80     \c@chapter=\count81     \c@section=\count82     \c@subsection=\count83     \c@subsubsection=\count84     \c@paragraph=\count85     \c@subparagraph=\count86     \c@figure=\count87     \c@table=\count88     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty     Package: fancyvrb 2008/02/07          Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix      <2008/02/07> (tvz) (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     \FV@CodeLineNo=\count89     \FV@InFile=\read1     \FV@TabBox=\box26     \c@FancyVerbLine=\count90     \FV@StepNumber=\count91     \FV@OutFile=\write3     ) (./AmyTest.aux)     \openout1 = `AmyTest.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.          ! Undefined control sequence.     l.8 \verbatiminput                       {creatur-examples.cabal}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          [1          ] (./AmyTest.aux) )      Here is how much of TeX's memory you used:      614 strings out of 495658      8413 string characters out of 6187951      54908 words of memory out of 5000000      3887 multiletter control sequences out of 15000+600000      3640 words of font info for 14 fonts, out of 8000000 for 9000      14 hyphenation exceptions out of 8191      23i,4n,19p,134b,107s stack positions out of 5000i,500n,10000p,200000b,80000s          Output written on AmyTest.pdf (1 page).


title: “latex missing } inserted” error message in equation

text: I have a slightly complex, long section of equations in my latex document, but from what I can see I think it is programmed correctly. When I compile the document, I get the error > "./ThesisDraft1.tex:111: Display math should end with $$. ^ l.111 ...dD}{dt} > = \frac{\Gamma \times A}{x$^{2}$}" The error starts at the first line of the equation, and if I comment out that line, moves to the second line of the equation and crashes, etc. I have tried commenting out the entire equation block and the document compiles with no problem, so I know it's a problem with this equation block. I have another equation earlier in the document, but that compiles with no problem. Here is the code block:                  \begin{displaymath}        \frac{dD}{dt} = \frac{\Gamma \times A}{x$^{2}$}        dD = \frac{\Gamma \times A}{$x^{2}$}dt        \int{dD} = \int_0^21hrs  \frac{\Gamma \times A}{x$^{2}$}dt         \int{dD} = \frac{\Gamma}{$x^{2}$} \int_0^21hrs A dt = \frac{\Gamma \times A$_{0}$}                       {x$^{2}$} \int_0^21hrs exp$^{-\delta t}$ dt        \end{displaymath}      Any ideas are greatly appreciated!


title: How to quote a specification like HTML5 in BibTeX

text: I have W3C specifications in my bibliography, I dont know how to quote them correctly. Now I do it like this:               @techreport{DefHtml,       author = {Ian Hickson},       title = {HTML5 Specification},       institution = {World Wide Web Consortium},       number = {1.5610},       year = {2012}     }      Somebody told me, there must also be something like a identification number for the document. But I cant find anything about it. The number here is used for the "Revision". Is it correct with this attribute? Here is the link to the document HTML5 Specification


title: Problem with pgfmathsetmacro in foreach loop with pgfplots

text: Any idea, why the following doesn't work and how to fix ist:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{pgfplots}               \begin{document}     \begin{tikzpicture}     \begin{axis}[no markers]        \pgfmathsetmacro{\i}{0}        \foreach \f in {sin(deg(x)),x^2}        {        \addplot  {\f} node [pos=0.6,right] {\i};        \pgfmathsetmacro{\i}{\i+1};        }     \end{axis}     \end{tikzpicture}          \end{document}      I get the following output: ![output](http://i.stack.imgur.com/eAEz0.png) **Edit:** I want that the value of `\i` in my loop is the same for one pass of the loop regardless if I use `\i` for a node or something else (which may be related to expanding problems), at the end of the loop I want to set a new value of `\i`. Or to say it in other words: I just want to use the variable `\i` as one would do it in other programming languages inside a loop...


title: Relative placement of node on edge with tikz

text: How do I place a node relative to an edge? It's easy with lines using the `\--` operator, is there a way to achieve the same on an edge?               \documentclass{article}          \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[node distance=5cm]         \node(A){A};         \node[right of=A](B){B};         \node[below of=A, node distance=2cm](C){C};         \node[right of=C](D){D};              \draw (A) -- (B) node[midway, above]{this works};         \draw (C) edge[out=-90, in=-90] (D) node[midway, below]{this not};     \end{tikzpicture}          \end{document}


title: Typsetting big matrix (but keeping A4 size)

text: This question is a slight variation of Compiling a BIG matrix, but I need to write a matrix in a A4 or letter size paper; it is a block 48x48 matrix but I can put lot of `$0_2$` and `$0_4$`'s in order to keep a small number of entries, which, however, exceed the usual dimensions. How could I make the font smaller or the spaces between the entries (most of them 0) narrower in order for this matrix to fit in the page? For instance, the first rows are               \documentclass[a4paper,10pt]{article}     \usepackage{amsmath}     \begin{document}     \[     \begin{pmatrix}     0 & 0 & B & 0 & 0 & 0& 0& 0 & A & 0& 0& 0 & 0 & 0& 0& 0 \\     0 & 0 & 0 & C & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\     D & 0 & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 \\     0 & E & 0 & 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0 & 0 & 0& 0& 0       \end{pmatrix}     \]     \end{document}


title: newcommand for verbatim

text: I'm trying to write a `\newcommand` for `verbatim`:               \newcommand{\codeline}[1]{\begin{verbatim}{#1}\end{verbatim}}      and use it as               \codeline{int foo;}      but it gives an error "File ended while scanning use of \@xverbatim". How to fix it?


title: Extra space below customized theorems in beamer

text: I'm trying to customize beamer theorems, putting theorem name and theorem body in the same box. But my customization causes extra space below theorems. A MWE is as follows:               \documentclass{beamer}          \newtheorem{thm}{Theorem}          \begin{document}          \begin{frame}          \begin{thm}Text$$Math$$\end{thm}     \hrule Text          \setbeamertemplate{theorem begin}{\bfseries\inserttheoremname\quad\normalfont}     \setbeamertemplate{theorem end}{}          \begin{thm}Text$$Math$$\end{thm}     \hrule Text          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/QC3xU.png) How could I remove extra space below my customized theorems?


title: wrong positioning of figure with tabular in xelatex

text: I recently updated MikTex and it seems Xelatex is not able to place figures correctly anymore. Before updating all figures were shown correctly. I work with Texworks and Miktex 2.9 Here it is the code that I run:               \documentclass[10pt,a4paper]{report}     \usepackage{graphicx}     \graphicspath{{method1/}{method2/}{dpfig/}}          \begin{document}          \begin{figure}[!htbp]     \centering     \begin{tabular}{cc}     \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure1.eps}&     \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure2.eps}\\     \end{tabular}     \caption{Two figures}     \end{figure}     \end{document}     \end{figure}      With this code, figures are correctly trimmed and the relative position between figure 1 and figure 2 is maintained. However, the position in the document is wrong: figure are placed upper and more right than expected (as the bottom-left corner of the table was placed in the middle of the page). The unusual thing is that this does not happen in draft mode and picture are shown centered as it would be. I usually compile with Xelatex, Makeindex and Bibtex. I hope to have been clear.. bye! **EDIT** : Sorry, I forgot to add the images I prepared from the file that run that script: ![Picture wrong positioning](http://i.stack.imgur.com/e4BN0.png) ![Draft mode, correct positioning](http://i.stack.imgur.com/hkMPh.png)


title: Change background color for toolbars and menus in Lyx

text: In Lyx 2.0, I would like to change the background color for toolbars and menus, make it darker. Anyone could suggest how I could do this?


title: Get TeX to work with jsPdf

text: `jsPdf` is a `Javascript` library that creates `pdf` documents on the fly. This is very useful to me as I have a familiarity with `Javascript` and I want to be able to do this operation server-side. However, it doesn't produce my `TeX`. It just puts out `''$2+4x^2 = 0''` in the `Hello World` demo when I modify it. There must be something I can put in the metadata section/preamble/header/whatever it is to tell the part of the `Javascript` file that I want it to go through whatever package it is to render with `TeX`. Thank you for any help. -Eka


title: A numbered list with arbitrary order of items

text: Inside a theorem environment I have a numbered list of theorem statements. Afterward it goes a proof. In the proof I prove every of the above specified numbered statements. But the order in the proof may be different than the order in the theorem. Which environment best to use in the proof? I may manually write "1.", "2." or make a definition list with numeric labels, or whatever. Which way is the best?


title: comment package: Show/hide comments Inside a section title

text: I'm pretty close to being a LaTeX beginner. I'm hoping to use the comment package to indicate author's names (i.e. who's responsible for writing) on each section of a shared paper. This could then temporarily be shown in the TOC. But in the manual: "with the opening and closing commands again on a line of their own." Clearly my code won't work and I'm not clear how to solve it. Any recommendations? Much appreciated! Michael               \documentclass[10pt,letterpaper]{article}     \usepackage{comment}     \includecomment{sectionauthor}     \begin{document}     \section{First Section \sectionauthor Me \endsectionauthor }     \section{Second Section \sectionauthor You \endsectionauthor }     \end{document}


title: Why does Acrobat not see LaTeX (pdflatex) generated form fields?

text: I used the hyperref package and pdflatex to make a nice PDF form. The form works fine in that I can fill out the fields and save the contents. However, I want to make a fancy field that performs a calculation on the values of some other fields. I can do this in Acrobat without problems, by changing the properties of one of the pdflatex generated form fields to calculate a sum. So far so good! However, when I try to "distribute" my updated form (with the calculation) Acrobat claims there are no fields in the document. However, Acrobat itself lists a bunch of fields. (See the screenshots below.) What do I have to do to get Acrobat to save the document with the form calculation correctly? If I use File > Save, the calculation does not get saved. ![screenshot 1](http://i.stack.imgur.com/MibY1.png) ![screenshot 2](http://i.stack.imgur.com/E5Ali.png)


title: Macro for Typesetting Semantic Denotations (Linguistics)

text: I tried to write a macro for typesetting semantic denotations, using the `stmaryrd` package, but there are a few issues that I would like to resolve. My first attempt at the macro was the following:               \documentclass{article}     \usepackage{stmaryrd}     \newcommand{\den}[2][]{$\llbracket$#2$\rrbracket^{#1}$}     \begin{document}     \den[w,g]{example} = \ldots     \end{document}      The issue that I would like to resolve is that, in some instances, the text between the denotation brackets gets lengthy and is hard to look at since it runs across multiple lines. (It seems that I can't insert a picture yet, but it looks something like the following.) [[This is a purposefully long sentence whose denotation I wish to specify, but because it is so long it runs across multiple lines and ends up being both really hard to read and pretty gross, aesthetically speaking]] = . . . Now, the `stmaryrd` is written such that `\llbracket` and `\rrbracket` are delimiters, so then I tried this:               \documentclass{article}     \usepackage{stmaryrd}     \newcommand{\den}[2][]{     \[     \left\llbracket#2\right\rrbracket^{#1}     \]     }     \begin{document}     \den{example}     \end{document}      I'm not too familiar with delimiters, but it seems you cannot insert line breaks between the `\left` and `\right` commands, so there is no way of breaking the text inside of the brackets across multiple lines. This second attempt also centers the denotation and italicizes the text inside of the brackets, two things that I do **not** want to happen. With regard to the first issue, is there some way to limit the horizontal space of the text inside of the brackets, perhaps with a `\parbox` command? The text would then have to wrap inside of the limited horizontal space, of course, but this is something I have no idea how to do myself. And, ideally, the size of the horizontal space would then be an optional argument of the new `\den` command, so that it could either be specified or scaled when necessary.


title: Line down the side of the page

text: At the moment I'm using the {tabular} environment to distinguish examples in a document I'm writing:               \begin{tabular}{r|p{11cm}}     \emph{Example} & [Lots of text and equations]     \end{tabular}      It makes it so that there's a nice line running down the left side of my page over the course of the example. The only problem is that it doesn't behave well with page breaks. I know the package longtable works for continuing tables onto several pages but since I have everything in one table entry, it doesn't work for me. I realise I'm completely misusing {tabular} and am looking for an environment that will give me the same effect, but will continue the effect onto successive pages.


title: Alias for chapter with newcommand

text: I want some files to compile with two different templates, one that has the hierarchy like chapter > section > subsection and the other as section > subsection > subsubsection. For that, I tried to define newcommands to act like an alias to the level like:               \newcommand{\level1}[1]{\chapter{#1}}          \newcommand{\level2}[1]{\section{#1}}          \newcommand{\level3}[1]{\subsection{#1}}      and the in the body I would call \level1{title}. This way I could change from templates only by changing this 3 lines. I use lines like: `\newcommand{\secref}[1]{Section \ref{#1}}`, but the ones with `\chapter` and so on don't work. Any idea on how can I solve this?


title: How can I use shorthands in citations from the first time with biblatex?

text: I am using `biblatex` to insert references in my LaTeX document. In some bib entries, such as encyclopedia and classic works, I have inserted a `shorthand` field and decided to cite them only with the shorthand as label, and from beginning to end. This means, I only want to get: > KpV instead of > Kant 1968 (henceforth cited as KpV) However, `biblatex` always outputs them with regular label and shorthandintro in the first time. Does anyone know how can I get the shorthand as the unique label from the first time, without additional bibliographic data (author, year, title, ...) and without shorthandintro? I just want to cite it with a label like an abbreviation. Here is a mini example:                   \documentclass{memoir}         \usepackage{xltxtra,fontspec,xunicode}         \usepackage[style=philosophy-modern,backend=biber,language=auto]{biblatex}         \bibliography{bibliography}         \bibintoc         \begin{document}         ......         \printbibliography         \end{document}


title: newcolumntype, siunitx, tabu and illegal pream-tokens

text: I use `tabu` with `siunitx` for making my charts with MikTeX 2.9, `tabu` 2.8 and now `siunitx` v2.5g. Since last time using the updater `\newcolumn` commands like               \newcolumntype D{X[1,c]{%       S[group-four-digits=true,       table-format=2.0e1,       per-mode=symbol]}}     \tabucolumn D      don't work anymore but raise error messages like               Package array Error: Illegal pream-token.      I have no idea how to solve this problem. Can anyone help me? This is the not-working-anymore minimal example:               \documentclass[a4paper,DIV=12]{scrreprt}     \usepackage[utf8]{inputenc}                      \usepackage[T1]{fontenc}                 \usepackage[ngerman]{babel}          \usepackage{siunitx,booktabs}          \usepackage{tabu}     \newcolumntype D{X[1,c]{S[group-four-digits=true,table-format = 2.0e1,per-mode=symbol]}}     \tabucolumn D          \begin{document}       \begin{tabu} to \linewidth {XDDX}         \toprule         one & {two two two two two} & {three three} & four\\         1.23456 & 1.23456 & 1.23456 & 1.23456 \\         1.2 & 1.2 & 1.2 & 1.2 \\         999.9 &999.9 &999.9 &999.9\\         \bottomrule       \end{tabu}     \end{document}      Hint: using               \newcolumnD{X[1.c]S[...      (without the curly bracket) as described in other threads does not work, as it is interpreted as columns X and S as substitution for D.


title: Printing a sheet multiple times with list of names

text: How to print the same exam (can be multiple pages long) multiple times with a different student name on it? Something similar has been covered here. However, I want the name list to be separated only with line break (like copy pasted from Google Drive or Excel):               Sam Student     John Doe     Bat Man


title: Trouble setting margins with Resumé header

text: I am trying to typeset my resumé in LaTeX and have created a header that I am really happy with. However, now that I am starting to fill in the rest of my information the margins I have set up to place my header in the correct place are messing with the text. I was wondering if there is a better way to format my header so that I don't have to mess with my margins so much. When I try to add text, it either comes out so that the left side is off of the page or when I use `\flushleft` the text is placed near the center of the page. Here is my code:               \documentclass[9pt]{article}          \usepackage{hyperref,graphicx, wrapfig,anyfontsize, color, amsmath}     \usepackage[usenames,dvipsnames]{xcolor}          \topmargin = -45pt     \hoffset= -70pt     \voffset=-15pt     \textwidth = 550pt     \textheight = 685pt     \headheight = 0pt     \headsep = 0pt     \oddsidemargin = -20pt               \begin{document}     \begin{wrapfigure}{i}{0.15\textwidth}     \begin{picture}(90,70)     \hspace{20mm}     \includegraphics[clip=true, trim=0 75 76 0, scale = .7]{FHS_Ship_Wheel.jpg}     \linethickness{0.75mm}     \put(0,0){\line(0,1){65}}     \put(0,0){\line(-1,0){65}}     \put(0,0){\line(1,0){450}}     \end{picture}     \end{wrapfigure}     \noindent     \\     \\     \vspace{-11.5mm}     \hspace{115mm}     %Upper right-hand Corner     \begin{tabular} {lc}     \text{Address Line 1} & \textcolor{Gray}{ Address}\\     \text{Address Line 2 }& \textcolor{Gray}{}\\     \href{thisisnotmyemail@gmail.com}{Email Address} & \textcolor{Gray}{ Email}\\     $\left(555\right)555 -5555$ & \textcolor{Gray}{ Cell} \\     \end{tabular}     \\     \vspace{-8mm}     {\fontsize{45}{5.4}     \selectfont      \hspace{2mm} John Q. Public}          \end{document}      Because I am not able to post the image I am using, it can be found here: http://en.wikipedia.org/wiki/File:FHS_Ship_Wheel.jpg Some possible ideas I had were to either wrap all of the header into one figure or image so I could just place it at the top or use a package to format headers that would allow me to lay it out with the title next to the image as I have done. Thank you in advance for any help or suggestions.


title: How do I specify a different mapping to use for html arguments with html2latex?

text: html2latex seems to replace all `<hr>` elements with `\hline`, which isn't quite the right mapping. How do I go about changing this mapping to a more appropriate one?


title: typeset large uncertainties using siunitx

text: I have some entries in a table where the uncertainties are very large compared to the value due to outliers in the data:               \documentclass{article}          \usepackage{siunitx}     \usepackage{booktabs}          \begin{document}          \resizebox{1\textwidth}{!}     {%         \large         \sisetup{detect-weight=true,detect-inline-weight=math}         \begin{tabular}{S[table-format=1.2(2)]S[table-format=1.2(2)]}             \toprule                    8.39(12) & 13.11(25)\\                    4.64(18) &  0.76(10000000)\\             \bottomrule         \end{tabular}     }          \end{document}      Is there a standard way for typesetting this neatly? I couldn't find a way to get siunitx to typeset just the uncertainties using scientific notation, e.g. "0.76(e7)", is this possible? I have also been unsuccessful when trying to denote these outliers using a text symbol "-", e.g. "0.76({-})". Any ideas?


title: How to use fncychap's style for \section?

text: I have a complex document which requires the use of many levels of document structures. In particular, the first two levels, \part and \chapter are reserved for meta-information while \section plays the role of \chapter in ordinary documents. However, it seems that packages like fncychap can only decorate \chapter. So here comes the question: how can I use the fncychap's chapter style for \section? (I'm using koma-script's scrreprt class, if relevant.) MWE:               \documentclass[fontsize=22pt]{scrreprt}          \usepackage[Sonny]{fncychap}     \renewcommand*{\DOCH}{}     \ChTitleVar{\large\sffamily}          \newcommand*{\mypart}[1]{       \refstepcounter{part}       \addcontentsline{toc}{part}{\protect\numberline{\thepart}#1}     }     \newcommand*{\mychap}[1]{       \refstepcounter{chapter}       \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}     }          \begin{document}     \tableofcontents          \mypart{big picture level 1}     \mychap{big picture level 2}     % \mypart and \mychap are used for adding meta-information          \section{real chapter here}     % \section is used like \chapter in ordinary documents     % I want the section title etc. to show up using fncychap's style          \end{document}


title: How do I correctly insert images in LaTeX files?

text: My relevant lines of code are:               \documentclass[draft]{article}     \usepackage{amsmath,amsfonts,amssymb,graphicx,epstopdf}     ...     \begin{document}     \DeclareGraphicsExtensions{.pdf,.png,.gif,.jpg}     ...     \begin{figure}[h!]     \centering     \includegraphics[width=0.75\textwidth]{EncodingMethod}     \caption{Encoding Method}     \end{figure}      and all I get out of this block of code is: ![enter image description here](http://i.stack.imgur.com/RwgrR.png)


title: Bold font is offsetting text in separate table cell

text: I'm creating a table that emulates a 2 column proposal layout. The table has three columns:               \begin{tabular}{|left column|empty space between|right column|}      I have the text in the left column vertically aligned with the text in the right column UNTIL I make the text in the left column bold- then the text in the right column drops vertically by a centimetre or two. How can I keep the text vertically aligned without dropping? Here is what I'm working with:               \documentclass[twocolumn,12pt,mysize]{Proposal}     \usepackage[normalem]{ulem}     \usepackage{longtable}     \usepackage{multicol}     \usepackage{colortbl}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{midpage}      \setlength{\tabcolsep}{.1em}       \begin{tabular}{|m{8.2cm}|m{1cm}|m{8.2cm}|}        \hline         {\Large\textbf {Jack Smith,}}\newline         {\Large\textbf CEO}\newline           & &          Peter Parker,\newline         Spiderman\newline \\        \hline         Lorum & & Ipsum \\        \hline       \end{tabular}


title: File ended while scanning use of \Gscale@box@dd

text: I am getting this error for a while now, and I can't seem to fix it?! Here is my code - my table won't even load because of this error.               \documentclass{article}     \usepackage{hyperref}     \usepackage{graphicx}     \begin{document}     \begin{table}[ht]     \centering % used for centering table     \caption{Parameter Estimates} % title of Table     \resizebox{\textwidth}{!}{     \begin{tabular}{|l|l|l|l|} % centered columns (4 columns)     \hline\hline %inserts double horizontal lines     Description & Parameter & Estimate(per day) & Source \\ [0.5ex] % inserts table %heading     \hline % inserts single horizontal line     \hline     Population of Andhra Pradesh, Tamil Nadu, Maharashtra, and Karnataka & N & 330,308,167 & CIA World Factbook \\ \hline     Ratio of above population in India population & Scale & 0.2671651242 & Calculated \\ \hline     \multicolumn{4}{|c|}{\textbf{INITIAL CONDITIONS (POPULATIONS)}} \\ \hline     HIV-susceptible, TB-susceptible & $X_{SS}(0)$ & 192,941,151 & Calculated \\ \hline     HIV-susceptible, TB-infected & $X_{ST}(0)$ & 132,478,723 & Calculated \\ \hline     HIV+, TB-susceptible & $X_{HS}(0)$ & 2,422,951 & Calculated \\ \hline     Co-infected & $X_{HT}(0)$ & 1,817,998 & Calculated \\ \hline     HIV-susceptible, TB-treatment (1st stage) & $X_{S+T_T^{(1)}}(0)$ & 161,501 & Calculated \\ \hline     HIV-susceptible, TB-treatment (2nd stage) & $X_{S+T_T^{(2)}}(0)$ & 161,501 & Calculated \\ \hline     HIV-susceptible, TB-cured & $X_{S+T_T^{(3)}}(0)$ & 145,865 & Calculated \\ \hline     HIV+, TB-cured & $X_{H+T_T^{(3)}}(0)$ & 117 & AIDSInfo Online Database \\ \hline     HIV+, TB-treatment (1st stage) & $X_{H+T_T^{(1)}}(0)$ & 7,953 & AIDSInfo Online Database \\ \hline     HIV+, TB-treatment (2nd stage) & $X_{H+T_T^{(2)}}(0)$ & 7,953 & Calculated \\ \hline     HIV-treatment, TB-treatment (1st stage) & $X_{H_T+T_T^{(1)}}(0)$ & 3,445 & UNAIDS Global report (2013) \\ \hline     HIV-treatment, TB-treatment (2nd stage) & $X_{H_T+T_T^{(2)}}(0)$ & 3,445 & Assumption \\ \hline     HIV-treatment, TB-cured & $X_{H_{T_1}}(0)$ & 3,032 & Worldbank data \\ \hline     HIV-treatment, no history of TB & $X_{H_{T_2}}(0)$ & 152,450 & WHO 2013 Global TB Report \\ \hline     HIV-treatment, paradoxical IRIS & $X_{IRIS}(0)$ & 82 & A5221 Stride Study \\ \hline     \multicolumn{4}{|l|}{\textbf{ADDITIONAL PARAMETERS}} \\ \hline     Recruitment/maturation rate & $\Lambda$ & 531,062 & CIA World Factbook \\ \hline     Natural death rate & $\mu$ & 3.9138943e-5 & \url{http://planningcommission.nic.in/data/datatable/0306/table%20226.pdf} \\ \hline     AIDS death rate & $\mu_H$ & 1.3698630e-3 & Long et al. (2008) \\ \hline     TB death rate & $\mu_T$ & 5.4794521e-4 & Long et al. (2008) \\ \hline     Paradoxical IRIS death rate & $\mu_{IRIS}$ & 4.8947959e-5 & Laureillard et al. (2011) \\ \hline     HIV sufficient contact rate & $\beta$ & 4.6575342e-4 & Long et al. (2008) \\ \hline     TB sufficient contact rate & $\tau$ & 1.0958904e-2 & Long et al. (2008) \\ \hline     HIV regular treatment rate & $\lambda_H$ & 1 & Varied \\ \hline     HIV early treatment rate & $\lambda_{H_1}$ & 0 & Varied \\ \hline     HIV late treatment rate & $\lambda_{H_2}$ & 1 & Varied \\ \hline     TB regular treatment rate & $\lambda_T$ & 1 & Varied \\ \hline     TB treatment stage transition rate (Stage 1 to Stage 2) & $\lambda_{T_1}$ & 1.6666667e-2 & Calculated \\ \hline     TB treatment stage transition rate (Stage 2 to Stage 3) & $\lambda_{T_2}$ & 8.3333333e-3 & Calculated \\ \hline     Rate of occurrence of paradoxical IRIS & $\gamma$ & 2.7528463e-4 & Bonnet et al. (2013) \\ \hline     Modification parameter & $\psi$ & 0.15 & Varied \\ \hline     Modification parameter & $\alpha$ & 0.075 & Estimated \\ \hline     \end{tabular}     }     \end{table}     \end{document}


title: Adding a command to LaTeX file using texify

text: A program I am using spits out LaTeX tables in LaTeX files (`outreg2` command from Stata), which I run using texify to make pdfs of the tables. I crop these tables (using pdfcrop) and embed them elsewhere. However, the pdfs include page numbers, which prevent pdfcrop from cropping directly around the table. I need an automatic way to remove the page numbers before cropping. I want to insert the command `\pagenumbers{gobble}` into the LaTeX code to automatically remove the page numbers. I believe               texify --pdf --texinfo="\pagenumbering{gobble}" filename.tex      should work. It does not. No exception pops up, but the page number remains. I cannot find documentation anywhere showing examples of using the `\--texinfo` option to splice LaTeX code into the file before running the LaTeX file to create a pdf. How should I properly use the texify command? Or is there another way to splice in `\pagenumbering{gobble}` before running texify?


title: List of Tables caption entry problems with Bookmarks package

text: Since implementing the `bookmark` package and resolving the issues with Bookmarks not linking with Table of Figures and Bibliography properly, I've noticed that the `bookmark` package is causing long entries in the List of Tables to appear on one line, meaning that they run off the page, rather than continuing on to the next line as they normally would. Below are two examples of the same code, one with the `bookmark` package and mark up running and the other with them commented out. How can I stop my long table caption from running off the page? is there something in the code below that's associated with the `bookmark` package that's causing it to do this? **Bookmarks enabled - long entries in LoT appear on a single line and run off the page**               \documentclass[12pt,a4paper]{report}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{lscape}     \usepackage[round,colon]{natbib}     \usepackage{caption}     \usepackage{array,booktabs,threeparttable}     \usepackage{chemformula}     \usepackage{url}     \usepackage[intoc]{nomencl}     \usepackage{bookmark}     \usepackage{lipsum}     \bookmarksetup{bold=false}     \usepackage{siunitx}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},       }     \end{filecontents}          \begin{document}          \begin{titlepage}     \begin{center}     \vspace*{1in}     {\LARGE Quantifying rates of landscape evolution in carbonate terrains using U-Pb dating of speleothems}     \par     \vspace{1.5in}     {\large Christopher James Martin Smith}     \par     \vfill     A dissertation submitted to the University of Bristol in accordance with the requirements for award of the degree of Doctor of Philosophy in the Faculty of Science.     \par     \vspace{0.5in}     School of Geographical Sciences     \par     \vspace{0.5in}     University of Bristol     \par     \vspace{0.5in}     September 2014     \end{center}     \end{titlepage}          \pagenumbering{roman}     \phantomsection     \chapter*{Declaration}     \addcontentsline{toc}{chapter}{Declaration}     \lipsum[1]          \phantomsection     \chapter*{Acknowledgements}     \addcontentsline{toc}{chapter}{Acknowledgements}     \lipsum[1]          \phantomsection     \chapter*{Abstract}     \addcontentsline{toc}{chapter}{Abstract}     \lipsum[1]          \cleardoublepage     \pdfbookmark{\contentsname}{Contents}     \label{Table of Contents}     \tableofcontents     \newpage          \phantomsection     \label{List of Figures}     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures     \newpage          \phantomsection     \label{List of Tables}     \addcontentsline{toc}{chapter}{List of Tables}     \listoftables     \newpage          \pagenumbering{arabic}     \chapter{Introduction}     \section{Section}     \lipsum[1]\citep{Knu86}     \subsection{Subsection}     \lipsum[1]          \chapter{Literature Review}     \section{Section}     \lipsum[1]          \begin{table}     \centering     \caption[Alpha emitting radioactive decay series.]{Alpha emitting radioactive decay series.}     \label{tab:alpha decay series}     \begin{threeparttable}     \resizebox{\columnwidth}{!}{%     \begin{tabular}{l c c c c c c}     \toprule                 &             &                &                            &                & \multicolumn{2}{c}{Number of decays} \\     Series type & Series name & Parent nucleus & Half-life (\num{e9} years) & Stable nucleus &      \makebox[1.5cm]{$\alpha$} &     \makebox[1.5cm]{$\beta^{-}$} \\     \midrule     $A = 4n$    & Thorium           & \ch{^{232}Th} & 14.05     & \ch{^{208}Pb}     & 6 & 4 \\     $A = 4n+1$  & Neptunium         & \ch{^{237}Np} & 0.0021    & \ch{^{205}Tl}     & 8 & 5 \\     $A = 4n+2$  & Radium (Uranium)  & \ch{^{238}U}  & 4.4683    & \ch{^{206}Pb}     & 8 & 6 \\     $A = 4n+3$  & Actinium          & \ch{^{235}U}  & 0.7038    & \ch{^{207}Pb}     & 7 & 4 \\     \bottomrule     \end{tabular}%     }     \end{threeparttable}     \end{table}          \subsection{Subsection}     \lipsum[1]          \chapter{Methodology}     \section{Section}     \lipsum[1]          \begin{table}     \centering     \caption[Decay modes and half-lives for all nuclides in the radium (uranium) and actinium series decay chains.]{Decay modes and half-lives for all nuclides in the radium (uranium) and actinium series decay chains.  Half-lives are from (1) \citep{Knu86}.}     \label{tab:238U and 235U decay chains}     \begin{threeparttable}     \resizebox{\columnwidth}{!}{%     \begin{tabular}{*{10}{c}}     \toprule     \ch{^{238}U} decay chain &  &  &  &  & \ch{^{235}U} decay chain &  &  &  &  \\     Isotope & Decay mode & Half-life & $t$ & Ref & Isotope & Decay mode & Half-life & $t$ & Ref \\     \midrule     \ch{^{238}U}    & $\alpha$          & $4.4683\pm 0.0048$    & Ga    & 1 &\ch{^{235}U}   & $\alpha$          & $0.70381\pm 0.00096$ & Ga & 1 \\     \ch{^{234}Th}   & $\beta^-$         & $24.1$                & days  & 2 &\ch{^{231}Th}  & $\beta^-$         & $1.063$ & days & 2 \\     \ch{^{234}Pa}, \ch{^{234m}Pa} & $\beta^-$           & $6.69, 1.159$             & hours, min    & 2, 3 &\ch{^{231}Pa}   & $\alpha$          & $32.760\pm 0.22$ & ka & 6 \\     \ch{^{234}U}    & $\alpha$          & $245.62\pm 0.26$      & ka    & 4 &\ch{^{227}Ac}  & $\alpha, \beta^-$ & $21.77\pm 0.02$ & a & 5 \\     \ch{^{230}Th}   & $\alpha$          & $75.584\pm 0.11$      & ka    & 4 &\ch{^{227}Th}  & $\alpha$          & $18.72$ & days & 2 \\     \ch{^{226}Ra}   & $\alpha$          & $1.599\pm 0.004$      & ka    & 5 &\ch{^{223}Fr}  & $\alpha, \beta^-$ & $22$ & min & 2 \\     \ch{^{222}Rn}   & $\alpha$          & $3.823\pm 0.004$      & days  & 5 &\ch{^{223}Ra}  & $\alpha$          & $11.435$ & days & 2 \\     \ch{^{218}Po}   & $\alpha, \beta^-$ & $3.04$                & min   & 2 &\ch{^{219}At}  & $\alpha, \beta^-$ & $50$ & s & 2 \\     \ch{^{218}At}   & $\alpha, \beta^-$ & $1.6$                 & s     & 2 &\ch{^{219}Rn}  & $\alpha$          & $3.96$ & s & 2 \\     \ch{^{218}Rn}   & $\alpha$          & $35$                  & ms    & 2 &\ch{^{215}Bi}  & $\beta^-$         & $7.7$ & min & 2 \\     \ch{^{214}Pb}   & $\beta^-$         & $26.9$                & min   & 2 &\ch{^{215}Po}  & $\alpha, \beta^-$ & $1.78$ & ms & 2 \\     \ch{^{214}Bi}   & $\alpha, \beta^-$ & $19.7$                & min   & 2 &\ch{^{215}At}  & $\alpha$          & $0.1$ & ms & 2 \\     \ch{^{214}Po}   & $\alpha$          & $0.1637$              & ms    & 2 &\ch{^{211}Pb}  & $\beta^-$         & $36.1$ & min & 2 \\     \ch{^{214}Tl}   & $\beta^-$         & $1.3$                 & min   & 2 &\ch{^{211}Bi}  & $\alpha, \beta^-$ & $2.14$ & min & 2 \\     \ch{^{210}Pb}   & $\alpha, \beta^-$ & $22.6\pm 0.1$         & a     & 5 &\ch{^{211}Po}  & $\alpha$          & $0.516$ & s & 2 \\     \ch{^{210}Bi}   & $\alpha, \beta^-$ & $5.01$                & days  & 2 &\ch{^{207}Tl}  & $\beta^-$         & $4.77$ & min & 2 \\     \ch{^{210}Po}   & $\alpha$          & $138.4\pm 0.1$        & days  & 5 &\ch{^{207}Pb}  &                   & stable &  &  \\     \ch{^{206}Hg}   & $\beta^-$         & $8.2$                 & min   & 2 &               &                   &  &  &  \\     \ch{^{206}Tl}   & $\beta^-$         & $4.2$                 & min   & 2 &               &                   &  &  &  \\     \ch{^{206}Pb}   &                   & stable                &       &   &               &                   &  &  &  \\     \bottomrule     \end{tabular}%     }     \end{threeparttable}     \end{table}               \subsection{Subsection}     \lipsum[1]          \chapter{Results}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Discussion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Conclusion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \addcontentsline{toc}{chapter}{Bibliography}      \bibliographystyle{plainnat}     \bibliography{\jobname}          \end{document}      **Bookmarks commented out - long entries in LoT appear on multiple lines**               \documentclass[12pt,a4paper]{report}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{lscape}     \usepackage[round,colon]{natbib}     \usepackage{caption}     \usepackage{array,booktabs,threeparttable}     \usepackage{chemformula}     \usepackage{url}     \usepackage[intoc]{nomencl}     %\usepackage{bookmark}     \usepackage{lipsum}     %\bookmarksetup{bold=false}     \usepackage{siunitx}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},       }     \end{filecontents}          \begin{document}          \begin{titlepage}     \begin{center}     \vspace*{1in}     {\LARGE Quantifying rates of landscape evolution in carbonate terrains using U-Pb dating of speleothems}     \par     \vspace{1.5in}     {\large Christopher James Martin Smith}     \par     \vfill     A dissertation submitted to the University of Bristol in accordance with the requirements for award of the degree of Doctor of Philosophy in the Faculty of Science.     \par     \vspace{0.5in}     School of Geographical Sciences     \par     \vspace{0.5in}     University of Bristol     \par     \vspace{0.5in}     September 2014     \end{center}     \end{titlepage}          \pagenumbering{roman}     %\phantomsection     \chapter*{Declaration}     \addcontentsline{toc}{chapter}{Declaration}     \lipsum[1]          %\phantomsection     \chapter*{Acknowledgements}     \addcontentsline{toc}{chapter}{Acknowledgements}     \lipsum[1]          %\phantomsection     \chapter*{Abstract}     \addcontentsline{toc}{chapter}{Abstract}     \lipsum[1]          \cleardoublepage     %\pdfbookmark{\contentsname}{Contents}     \label{Table of Contents}     \tableofcontents     \newpage          %\phantomsection     \label{List of Figures}     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures     \newpage          %\phantomsection     \label{List of Tables}     \addcontentsline{toc}{chapter}{List of Tables}     \listoftables     \newpage          \pagenumbering{arabic}     \chapter{Introduction}     \section{Section}     \lipsum[1]\citep{Knu86}     \subsection{Subsection}     \lipsum[1]          \chapter{Literature Review}     \section{Section}     \lipsum[1]          \begin{table}     \centering     \caption[Alpha emitting radioactive decay series.]{Alpha emitting radioactive decay series.}     \label{tab:alpha decay series}     \begin{threeparttable}     \resizebox{\columnwidth}{!}{%     \begin{tabular}{l c c c c c c}     \toprule                 &             &                &                            &                & \multicolumn{2}{c}{Number of decays} \\     Series type & Series name & Parent nucleus & Half-life (\num{e9} years) & Stable nucleus &      \makebox[1.5cm]{$\alpha$} &     \makebox[1.5cm]{$\beta^{-}$} \\     \midrule     $A = 4n$    & Thorium           & \ch{^{232}Th} & 14.05     & \ch{^{208}Pb}     & 6 & 4 \\     $A = 4n+1$  & Neptunium         & \ch{^{237}Np} & 0.0021    & \ch{^{205}Tl}     & 8 & 5 \\     $A = 4n+2$  & Radium (Uranium)  & \ch{^{238}U}  & 4.4683    & \ch{^{206}Pb}     & 8 & 6 \\     $A = 4n+3$  & Actinium          & \ch{^{235}U}  & 0.7038    & \ch{^{207}Pb}     & 7 & 4 \\     \bottomrule     \end{tabular}%     }     \end{threeparttable}     \end{table}          \subsection{Subsection}     \lipsum[1]          \chapter{Methodology}     \section{Section}     \lipsum[1]          \begin{table}     \centering     \caption[Decay modes and half-lives for all nuclides in the radium (uranium) and actinium series decay chains.]{Decay modes and half-lives for all nuclides in the radium (uranium) and actinium series decay chains.  Half-lives are from (1) \citep{Knu86}.}     \label{tab:238U and 235U decay chains}     \begin{threeparttable}     \resizebox{\columnwidth}{!}{%     \begin{tabular}{*{10}{c}}     \toprule     \ch{^{238}U} decay chain &  &  &  &  & \ch{^{235}U} decay chain &  &  &  &  \\     Isotope & Decay mode & Half-life & $t$ & Ref & Isotope & Decay mode & Half-life & $t$ & Ref \\     \midrule     \ch{^{238}U}    & $\alpha$          & $4.4683\pm 0.0048$    & Ga    & 1 &\ch{^{235}U}   & $\alpha$          & $0.70381\pm 0.00096$ & Ga & 1 \\     \ch{^{234}Th}   & $\beta^-$         & $24.1$                & days  & 2 &\ch{^{231}Th}  & $\beta^-$         & $1.063$ & days & 2 \\     \ch{^{234}Pa}, \ch{^{234m}Pa} & $\beta^-$           & $6.69, 1.159$             & hours, min    & 2, 3 &\ch{^{231}Pa}   & $\alpha$          & $32.760\pm 0.22$ & ka & 6 \\     \ch{^{234}U}    & $\alpha$          & $245.62\pm 0.26$      & ka    & 4 &\ch{^{227}Ac}  & $\alpha, \beta^-$ & $21.77\pm 0.02$ & a & 5 \\     \ch{^{230}Th}   & $\alpha$          & $75.584\pm 0.11$      & ka    & 4 &\ch{^{227}Th}  & $\alpha$          & $18.72$ & days & 2 \\     \ch{^{226}Ra}   & $\alpha$          & $1.599\pm 0.004$      & ka    & 5 &\ch{^{223}Fr}  & $\alpha, \beta^-$ & $22$ & min & 2 \\     \ch{^{222}Rn}   & $\alpha$          & $3.823\pm 0.004$      & days  & 5 &\ch{^{223}Ra}  & $\alpha$          & $11.435$ & days & 2 \\     \ch{^{218}Po}   & $\alpha, \beta^-$ & $3.04$                & min   & 2 &\ch{^{219}At}  & $\alpha, \beta^-$ & $50$ & s & 2 \\     \ch{^{218}At}   & $\alpha, \beta^-$ & $1.6$                 & s     & 2 &\ch{^{219}Rn}  & $\alpha$          & $3.96$ & s & 2 \\     \ch{^{218}Rn}   & $\alpha$          & $35$                  & ms    & 2 &\ch{^{215}Bi}  & $\beta^-$         & $7.7$ & min & 2 \\     \ch{^{214}Pb}   & $\beta^-$         & $26.9$                & min   & 2 &\ch{^{215}Po}  & $\alpha, \beta^-$ & $1.78$ & ms & 2 \\     \ch{^{214}Bi}   & $\alpha, \beta^-$ & $19.7$                & min   & 2 &\ch{^{215}At}  & $\alpha$          & $0.1$ & ms & 2 \\     \ch{^{214}Po}   & $\alpha$          & $0.1637$              & ms    & 2 &\ch{^{211}Pb}  & $\beta^-$         & $36.1$ & min & 2 \\     \ch{^{214}Tl}   & $\beta^-$         & $1.3$                 & min   & 2 &\ch{^{211}Bi}  & $\alpha, \beta^-$ & $2.14$ & min & 2 \\     \ch{^{210}Pb}   & $\alpha, \beta^-$ & $22.6\pm 0.1$         & a     & 5 &\ch{^{211}Po}  & $\alpha$          & $0.516$ & s & 2 \\     \ch{^{210}Bi}   & $\alpha, \beta^-$ & $5.01$                & days  & 2 &\ch{^{207}Tl}  & $\beta^-$         & $4.77$ & min & 2 \\     \ch{^{210}Po}   & $\alpha$          & $138.4\pm 0.1$        & days  & 5 &\ch{^{207}Pb}  &                   & stable &  &  \\     \ch{^{206}Hg}   & $\beta^-$         & $8.2$                 & min   & 2 &               &                   &  &  &  \\     \ch{^{206}Tl}   & $\beta^-$         & $4.2$                 & min   & 2 &               &                   &  &  &  \\     \ch{^{206}Pb}   &                   & stable                &       &   &               &                   &  &  &  \\     \bottomrule     \end{tabular}%     }     \end{threeparttable}     \end{table}               \subsection{Subsection}     \lipsum[1]          \chapter{Results}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Discussion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Conclusion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \addcontentsline{toc}{chapter}{Bibliography}      \bibliographystyle{plainnat}     \bibliography{\jobname}          \end{document}


title: Beamer frame with two columns and sequential uncover

text: I am trying to build a frame with 2 column. I have overlays in both columns and I want then to be displayed sequentially. I mean, first all the contents of first column (with the overlays) and then the contents of second column (also with its overlays). Here is the MWE:               \documentclass{beamer}          \usepackage{arev}          \begin{document}          \begin{frame}{test}          \begin{columns}[t]          \column{0.5\textwidth}          \begin{center}     \rule{1cm}{1cm}     \only<2->{\vskip2pt \rule{1cm}{1cm}}     \only<3->{\vskip2pt \rule{1cm}{1cm}}     \end{center}          \column{0.5\textwidth}          \begin{itemize}     \item<4-> aaa     \item<5-> bbb     \item<6-> ccc     \end{itemize}          \end{columns}          \end{frame}          \end{document}      To be specific, I want the structure:               \begin{itemize}     \item<4-> aaa     \item<5-> bbb     \item<6-> ccc     \end{itemize}      To be replaced with something like:               \begin{itemize}[<+->]     \item aaa     \item bbb     \item ccc     \end{itemize}      I tested various approaches with `\only<>{}` `\visible<>{}` but nothing worked.


title: Solutions in exam class

text: I'm trying to write up solutions to some exercises, using the `exam` class. In order to align equations correctly, I'm also using the `aligned` environment from `amsmath`. To avoid too much repetitious typing, I've attempted to use `etoolbox` to start/end the `aligned` environment automatically within the `solution` - but on compiling, `\LaTeX` complains about a missing `$`. The code below works, the commented out lines show what I'm trying to do. Any suggestions, either how to make this work, or a better method for achieving the same result?               \documentclass[answers]{exam}          \usepackage{xcolor} % Use colour!     \usepackage{titlesec} % Allow creation of new sectioning commands     \usepackage{amsmath} % Needed for splitting equations over multiple lines     \usepackage{ulem} % Underlining effects     \usepackage{etoolbox} % Tinkering with environments          \titleclass{\exercise}{straight}[\section]  % Create new 'section' command for exercises - this replaces \subsection     \newcounter{exercise}     \titleformat{\exercise}       {\normalfont\large\bfseries}{}{1em}{Exercise \theexercise}     \titlespacing*{\exercise}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \newcommand{\exerciseautorefname}{exercise}               \begin{document}          \unframedsolutions % Print solutions as plain text     \SolutionEmphasis{\color{blue}} % Print solutions in blue     \renewcommand{\thepartno}{\roman{partno}} % Format part numbers as lower-case roman numerals     \renewcommand\theexercise{\thesection\Alph{exercise}} % Print exercise numbers as 1A, etc...     \renewcommand{\solutiontitle}{\noindent} % Format solution - just print solution as entered     \newcommand{\ans}[1]{\uuline{#1}} % Double underline final answer          %\AtBeginEnvironment{solution}{$\begin{aligned}}     %\AtEndEnvironment{solution}{\end{aligned}$}          \section{Basic Algebra}     \exercise{}     \begin{questions}         \question Simplify the following expressions by collecting like terms:              \begin{parts}             \part $8x + 3x + 4x - 6x$             \begin{solution}                 $\begin{aligned}                     3p + 3 + 5p - 7 - 7p - 9 &= 3p + 5p - 7p + 3 - 7 - 9\\                     &= \ans{p - 13}\end{aligned}$             \end{solution}              \end{parts}          \end{questions}          \end{document}      * * * Having done a bit more work on this, I find myself needing to use multiple alignment points in some places. The alignedat environment looks like what I need; I just can't get it to work in this context. # Code - main file               \documentclass[answers]{exam}          \addtolength{\textwidth}{1cm}     \addtolength{\hoffset}{-0.5cm}     \addtolength{\textheight}{1cm}     \addtolength{\voffset}{-0.5cm}          \usepackage{xcolor} % Use colour!     \usepackage{titlesec} % Allow creation of new sectioning commands     \usepackage{amsmath} % Needed for splitting equations over multiple lines     \usepackage{ulem} % Underlining effects     \usepackage{environ} % Tinkering with environments     \usepackage{gensymb} % Degree symbol     \usepackage[pdfstartview=FitH,bookmarks=true]{hyperref}      \usepackage{bookmark} % PDF Bookmarks     \bookmarksetup{numbered} % Include numbers in PDF bookmarks          \titleformat{\section}{\normalfont\large\bfseries}{Chapter }{0em}{\thesection: }          \titleclass{\exercise}{straight}[\section]  % Create new 'section' command for exercises - this replaces \subsection     \newcounter{exercise}     \titleformat{\exercise}{\normalfont\large\bfseries}{Exercise }{0em}{\theexercise}     \titlespacing*{\exercise}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \newcommand{\exerciseautorefname}{exercise}     \makeatletter     \providecommand*{\toclevel@exercise}{2} % Make sure exercises appear below sections in bookmarks     \makeatother          \pagestyle{headandfoot} % Let's have both     \header{\oddeven{Exercise \theexercise}{Chapter \thesection: \rightmark}}{Core 1}{\oddeven{Chapter \thesection: \rightmark}{Exercise \theexercise}}     \headrule     \footer{\oddeven{}{\thepage}}{}{\oddeven{\thepage}{}}     \footrule          \renewcommand\sectionmark[1]{\markright{#1}} % Set up \rightmark          \begin{document}          \unframedsolutions % Print solutions as plain text     \SolutionEmphasis{\color{blue}} % Print solutions in blue     \renewcommand{\thepartno}{\roman{partno}} % Format part numbers as lower-case roman numerals     \renewcommand\theexercise{\thesection\Alph{exercise}} % Print exercise numbers as 1A, etc...     \renewcommand{\solutiontitle}{\noindent} % Format solution - just print solution as entered     \newcommand{\ans}[1]{\uuline{#1}} % Double underline final answer          \NewEnviron{sol}{ % Align solutions sensibly         \begin{solution}             $\begin{alignedat}{2}                 \BODY             \end{alignedat}$         \end{solution}     }          \include{Chapter1}          \end{document}      # Code - Chapter1.tex               \section{Basic Algebra}          \exercise{}     \begin{questions}         \question Solve the following equations.         \begin{parts}             \part $5a - 32 = 68$             \begin{sol}                 5a - 32 = 68 &\implies 5a &= 100\\                 &\implies \ans{a &= 20}             \end{sol}         \end{parts}     \end{questions}


title: remove "pp." from references produced by chicago style, re-position page numbers

text: \documentclass[a4paper,12pt]{article}     \usepackage{amssymb,amsmath,amsthm,amsfonts}     \usepackage[T1]{fontenc}     \usepackage{natbib}     \usepackage{tabularx}     \usepackage{lscape}     \usepackage{dcolumn}     \usepackage{longtable}     \bibliographystyle{chicago}     \setcitestyle{notesep={: }}      I want to (i) remove parentheses and put full stop behind eds., (ii) change the comma after the title to a full stop, (iii) remove "pp." and put pages numbers at the back and (iv) after publisher (and before the page numbers) should be `:` rather than `.` I guess I should go change "chicago.bst" but I do not find where I should make the changes.               @incollection{Ballwieser-global-history-2010,     booktitle={A Global History of Accounting, Financial Reporting and Public Policy: Europe},     author={Wolfgang Ballwieser},     title={Germany},     pages={59-88},     editor={Previts, G.J. and Walton, P.J. and Wolnizer, P.W.},     year={2010},     address={United Kingdom},     publisher={Emerald Group Publishing Limited},     }      > Ballwieser, W. (2010). Germany. In G. Previts, P. Walton, and P. Wolnizer > (Eds.), _A Global History of Accounting, Financial Reporting and Public > Policy: Europe_. pp. 59–88. United Kingdom: Emerald Group Publishing > Limited. The following is what I am looking for > Ballwieser, W. (2010). Germany. In G. Previts, P. Walton, and P. Wolnizer, > eds. _A Global History of Accounting, Financial Reporting and Public Policy: > Europe._ United Kingdom: Emerald Group Publishing Limited: 59–88.


title: Horizontal alignment of subfigure edges

text: I am using the memoir class and I have two subfigures of different width that I would like to lay out vertically. Ideally, these two subfigures should be aligned so that   * The widest subfigure is centered (to `\textwidth`).   * Other subfigures have their right edge aligned to the right edge of the widest subfigure. How can I achieve this? The code below can work as a starting point.               \documentclass{memoir}     \usepackage{lipsum}     \newsubfloat{figure}          \begin{document}     \lipsum[1]     \begin{figure}     \centering     \subbottom[]{\framebox{Narrow subfig}}     \\     \subbottom[]{\framebox{Wide subfigure with lots of stuff}}     \end{figure}     \end{document}      I first tried using a minipage inside the figure environment, where content inside the minipage was right justified. The problem was setting the width of the minipage to exactly the width of the widest subfigure; if that problem has a solution, I think that would work. One solution would be to compile the figure as a separate file using `standalone`. I wish to avoid that.


title: How does your mind bend \expandafter to its will?

text: Expansion is often cited as one of the most arcane aspects of TeX, more akin to witchcraft than to something easily picked up by the newcomer. There are many great questions and great answers about expansion on the site but, although I like to think I'm getting better at it, I still find myself stumped by more complicated cases. ![enter image description here](http://i.stack.imgur.com/vhvu3.jpg) For instance, take the LaTeX internal called `\in@`. Martin Scharrer's excellent List of internal LaTeX2e macros explains `\in@` as follows: > >     \in@{⟨1⟩}{⟨2⟩} >   > > Checks if first argument occurs in the second and sets the switch `\ifin@` > accordantly. The arguments are not expanded. This must be done beforehand. Because I'd like to pass once-expandable macros as arguments to `\in@`, I need to expand each of those arguments once before `\in@` gets expanded. I managed to handle the case where the first argument needs to be expanded once and the second argument doesn't need expansion (see my code below). However, I can't get my head around the `\expandafter` juggling required to handle the case in which both arguments need to be expanded once. I think (correct me if I'm wrong) that I have to leave the braces untouched until `\in@` itself is processed, and that's what I find difficult. I'd appreciate your help on this particular expansion problem.               \documentclass{article}          \let\ex=\expandafter % <--- more readable \expandafter          \begin{document}     \makeatletter          \in@{foo}{foo,bar,baz} % <--- works as expected     \ifin@ true\else false\fi          \def\foo{foo}     \ex\in@\ex{\foo}{foo,bar,baz} % <--- so far, so good...     \ifin@ true\else false\fi          \def\cslist{foo,bar,baz}     \in@{\foo}{\cslist} % <--- What combination of \expandafter is needed here?     \ifin@ true\else false\fi          \makeatother     \end{document}      However, more generally, I'd like to know what general procedure expansion gurus follow in their head (and possibly on paper) to expand a sequence of tokens in the desired order. Stephan v. Bechtolsheim's A tutorial on `\expandafter` gave me some insight, but I'm still far from mastering it. I think sharing your tricks and recipes might help me and others improve our expansion skills. So, what cognitive processes allow you to bend `\expandafter` to your will? **Note** : I insist on using only `\expandafter` here, and none of that `\edef` / `\noexpand` trickery. `:)`


title: Roman numerals for sections and subsections

text: I want to have my sections numbered using Roman numerals. However, I can only get the section number to be a Roman numeral, not the subsection. Here is some code:               \renewcommand{\thesection}{\Roman{section}}      \renewcommand{\thesubsection}{\Roman{subsection}}      This will print, e.g. I. , whereas it should be I.I. Commenting out the second line gives the result I.1, which is not demanded.


title: Changes in .cbx-file won't affect footcites

text: I use biblatex and want the authors in the footcite-environment to be separated with a slash. Therefore I edited my style-file. As I understand it the bbx is used for the bibliography and the cbx for the text-citations. In my case the cbx-file would be the choice. The responsible line in my file looks like the following               \renewcommand*{\multinamedelim}{\addslash}      Problem: It won't change anything. My footcites seem to go along with the **bbx** -file. If I add the line there, it takes effect in the footcites **and** in my bibliography... How can I change the footcites style?


title: How to typeset a "flatplan" / "page plan" from external images

text: I have a multipage PDF file (which I can export as a set of images) and need to typeset it as flatplan. It should look something like this: ![Example of a flatplan](http://i.stack.imgur.com/RpW1E.jpg) I can create such plans by hand but I'm looking for nice way to create page- plans _programmatically_. I have no experience with it, but I think one could use TikZ for this, as it allows embedding of external images. My first thoughts were that one could (ab)use the matrix environment or maybe use the `groupplots` library to arrange the pictures. As I'm new to TikZ any advise would be welcome.


title: How to show carries in long addition?

text: I am doing binary addition in LaTeX, and I cannot figure out how to show carried numbers above my work. (That is, 1 + 1 = 0 with carry 1, etc.) Here is a minimal example of my addition without carries:               $\begin{array}[t]{r}         1100\ 1001 \\     + \ 1111\ 1111 \\ \hline         1100\ 1000     \end{array}$ \\      How can I show my carried numbers above the top line (in a smaller typeface)?