title: Using multicol in the index

text: Can I use `multicol` to make the index split into two? I tried to use `multicol` but LaTeX keeps spitting some numbers in square brackets. I had to stop after the numbers count reached 15k.               \documentclass[12pt,a4paper]{book}     \usepackage{xkeyval}     \usepackage{polyglossia}     \usepackage{xcolor}     \usepackage{index}     \usepackage{multicol}          \setmainfont[Script=Devanagari]{Sanskrit 2003}      \makeindex     \newcommand\alsoindex[1]{\index{#1}#1}     \begin{document}          \begin{multicols}{2}       \printindex     \end{multicols}          \chapter*{प्रथमाध्यायः}               \index*{धर्मक्षेत्रे कुरुक्षेत्रे} समवेता \index*{युयुत्सव:} । \\     \index*{मामका:} पाण्डावश्चैव \index*{किमकुर्वत सञ्जय }॥ १ ॥     \end{document}


title: \mathbf ignored in table column specification

text: I have a long table whose columns are to be typeset in math-mode and bold. To avoid repeating `\\(\mathbf{cell value}\\)` for each row, I defined in a column specification how each cell under it was to be formatted. The `array` package came in handy on this one. Putting everything into use I wound up with this MWE.               \documentclass[letterpaper]{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{array}          \begin{document}            \begin{tabular}{>{\(\mathbf\bgroup}l<{\egroup\)}}         a       \end{tabular}          \end{document}      Yet, the `a` character isn't rendered in math boldface. LaTeX instead picked the math default font. I.e. italicized for letters. Very strangely, whenever I swap in `\mathrm` for `\mathbf` I get the right font: upright roman. Is this normal? Is LaTeX using math default font because it failed to resolve something? Finally was I to tediously enclose each and every cell value within `\mathbf{}` it would work. There's something amiss around. Can anybody come up with an answer? Or clear things up?


title: LaTeX stopped building a BibTeX bibliography, how to troubleshoot it?

text: I am writing for the first time in LaTeX. The bibliography was a bit flaky at first, but it worked - I got the citation numbers in the text, and the references listed at the end of the document. At some point however, LaTeX stopped recognizing citations, and I have no idea what caused it. The compiled document has a question mark instead of a citation number: ![enter image description here](http://i.stack.imgur.com/Y201w.png) And the log file warns me that it doesn't find the citations.               LaTeX Warning: Citation `Alexander2009' on page 1 undefined on input line 22.     LaTeX Warning: Citation `Sutcliffe2011' on page 1 undefined on input line 22.      However, I have defined the citations, and they look exactly like all the examples I could find for correct citations. Preamble:               \documentclass{llncs}     \usepackage{array}     \usepackage{colortbl}     \usepackage{rotating}      The paragraphs which include a citation look like that:               Requirements engineering (RE) methods are usually based on information      about the stakeholders' business goals, business processes and organization      structure~\cite{Alexander2009}. Only a few approaches take ``soft issues''      such as values, emotions, and motivation of the users in consideration.      However, there is a trend emerging in RE, which encourages scientists and      practitioners to pay attention to such issues, as evidenced for example      by the tutorial on emotions in RE at the RE'11 conference~\cite{Sutcliffe2011}.      The document ends with               \section{References}      \label{sec:references}     \bibliographystyle{llncs}     \bibliography{RefsQ12_sources-only}      And I tried all possible formats for citations in RefsQ12_sources-only.bib. The first item is manually entered in the fashion of some manual I found in the internet, the second one was entered in the TexmakerX GUI for creating new BibTex items, and the third is exported from Mendeley. None works.               @book{Alexander2009,     address = "Chichester",     author = "Alexander, Ian and Beus-Dukic, Ljerka",     edition = "1",     isbn = "978-0470712405",     pages = "457",     publisher = "Wiley",     title = "Discovering Requirements",     year = "2009"     }               @InProceedings{Sutcliffe2011,     author = {Alistair Sutcliffe},     title = {Emotional Requirements Engineering},     booktitle = {19th IEEE conference on requirements engineering},     pages = {321--322},     year = {2011},     }          @article{Schwartz1990,     author = {Schwartz, S H and Bilsky, W},     journal = {Journal of personality and social psychology},     number = {5},     pages = {878--891},     publisher = {American Psychology Association},     title = {{Toward a theory of the universal content and structure of values: Extensions and cross-cultural replications}},     volume = {58},     year = {1990}     }      I use MikTex with TexmakerX, but I also compiled from the command line and got the same result. When I removed the BibTex reference and used a `thebibliography` environment instead, the citations worked. However, I prefer to use a BibTex file, because then I can export all the data from Mendeley, instead of building the whole bibliography pre hand. Any ideas what went wrong?


title: \tableofcontents and multiple files from \include

text: I am trying to compile a table of contents with `\tableofcontents{}` from multiple files I have included (with `\include`, i.e. chapters). What do I need to do to get the chapters included in the table of contents? It would appear that the sections from the files do not register themselves into the `*.toc` file. However, I have no idea why. This is the root document I have:               \documentclass[english,aps]{revtex4}     \usepackage[T1]{fontenc}          \begin{document}          \title{This is the title}     \maketitle          \tableofcontents{} %oops :-)          \input{includes/chapters/0_preliminaries}     \include{includes/chapters/x_appendix}          \end{document}      And this is one of the leaf(?) documents (i.e. 0_preliminaries):               \section{Preliminaries}     Text goes here      So, The problem is that with the `\input{*}` the file is included in the `*.toc`, while with the `\include{*}` it is not.


title: Arguments of R Functions in Beamer with knitr

text: I'm using `helpExtract.R` function (can be obtained from here) to get arguments of `R` functions in `Beamer` with `knitr`. My (`.Rnw`) MWE is               \documentclass{beamer}          \usepackage{ragged2e}   %new code     \usetheme{default}          \addtobeamertemplate{block begin}{}{\justifying}  %new code     \addtobeamertemplate{knitrout begin}{}{\justifying}  %new code     \addtobeamertemplate{alltt begin}{}{\justifying}  %new code                         << label = setup, include = FALSE>>=     opts_chunk$set(size = 'footnotesize')     options(replace.assign = TRUE, width = 60)     @               \begin{document}               \begin{frame}[fragile]{Linear Model}          \begin{block}{lm}          << label=lm-args, echo=FALSE, comment=NA>>=     str(args(lm))     @      \end{block}          \end{frame}                    \begin{frame}[fragile]{Linear Model}          \begin{block}{lm function with testHelpExtract}          << label = helpExtract-fn, echo = FALSE >>=     library(devtools)     source("helpExtract.R")     @               \Sexpr{knit_child(textConnection(helpExtract(lm, section="Usage", type = "s_code")), options = list(tidy = TRUE, echo=TRUE, eval = FALSE))}               \end{block}          \end{frame}                    \begin{frame}[fragile]{Linear Model}          \begin{block}{lm function with testHelpExtract}          \Sexpr{knit_child(textConnection(helpExtract(lm, section="Arguments", type = "s_code")[1:15]), options = list(tidy = FALSE, echo=TRUE, eval = FALSE))}               \end{block}          \end{frame}               \begin{frame}[fragile]{Linear Model}          \begin{block}{lm function with testHelpExtract}          \Sexpr{knit_child(textConnection(helpExtract(lm, section="Arguments", type = "s_code")[16:25]), options = list(tidy = FALSE, echo=TRUE, eval = FALSE))}               \end{block}          \end{frame}          \end{document}      I've few issues with this MWE. **Issues**   1. Could not justify the text in block.   2. Getting this error message, even though got output: Error message Error in parse(text = code) : :1:14: unexpected symbol 1: formula: an object ^ Any help to resolve these issues will be highly appreciated. Thanks


title: How to choose bibliography location or path to be different from the default one

text: I want to change the path of my .bib file to be in a separate location, so instead of writing this:               \bibliography{refh}      I want it to be on any other location like this:               \bibliography{~//Deakin/My~Papers/refh}      Note: I'm a mac user so if anyone could please assist me.


title: Are we inside an edef?

text: How would you test whether we are in an expansion only context (i.e., `\edef`, `\xdef`, `\write`,...) or not? The only ways I could think of leave things behind (but the full expansion of that extra stuff is empty). Is there a clean way of testing this?               \documentclass{article}     \def\expiffalse{\expandafter\iffalse}     \protected\def\mygobble#1{\ifx\iftrue#1\expiffalse\fi}     \def\ifexpanding{\mygobble\iftrue\relax}          \begin{document}     We test that it sort of works: first, we are     \ifexpanding expanding\else not expanding\fi.           Then, we are%     \edef\foo{\ifexpanding expanding\else not expanding\fi}     \show\foo     \foo.     \end{document}


title: "Service offered note" with vertical info to be removed by potential customer

text: I'm making a note in which I offer some services. I intend to put that note in libraries, shops, at schools, and so on. I'm sure you're all familiar with such a note. My question is, how do I do the bottom part of such a note, where the text flows vertically, and is divided into (like) ten columns? (In each column, you typically write phone number, email, and homepage - and then, with a pair of scissors, you make cuts to separate the columns.) Like I said, you probably already know what I'm talking about. Is there a standard way to do this, or, if not, do you have any suggestions?


title: Automatically change the text width for all table environments using memoir

text: I'd like to redefine the `table` environment in a document I'm writing so that the tables and captions are wider than the text block. I'm using the `memoir` class, and an example given in the manual is               \documentclass{memoir}          \begin{document}          Lorem ipsum dolor sit amet, ...          \begin{table}     \begin{adjustwidth*}{-1in}{-1in}          \begin{tabular}{ll}     1 & 2\\     3 & 4     \end{tabular}          \caption{Lorem ipsum dolor sit amet, ...}     \end{adjustwidth*}     \end{table}          Lorem ipsum dolor sit amet, ...          \end{document}      This behaves just as I'd like. The next step for me is to make this change automatically for all tables in my document. It seems that the `\renewenvironment` command is the right way to approach this, and I tried making this change:               \documentclass{memoir}          \let\originaltable\table     \let\originalendtable\endtable     \renewenvironment{table}[1][ht]{%         \originaltable[%         \begin{adjustwidth*}{-1in}{-1in}%         #1%         \end{adjustwidth*}]%         }%         {\originalendtable}          \begin{document}          Lorem ipsum dolor sit amet, ...          \begin{table}     \begin{tabular}{ll}     1 & 2\\     3 & 4     \end{tabular}          \caption{Lorem ipsum dolor sit amet, ...}     \end{table}          Lorem ipsum dolor sit amet, ...          \end{document}      This compiles without error, but the `adjustwidth*` environment doesn't seem to have any effect. I must be misunderstanding how to use `\renewenvironment`; does anyone have a suggestion for getting this to work?


title: Horizontal Line in footer which ignores the margin

text: How can I add a horizontal line in the footer which spans the entire width of the page?               \renewcommand{\footrulewidth}{0.4pt}      is giving a line which is inside the margin only.


title: Writing Notes, want my equations organized at the end of document

text: I'm writing up my textbook notes in LateX. As I am writing paragraphs, I am inserting equations while I'm writing. I want to somehow display all of my numbered equations at the end of my document in the same order that they were numbered. Is there a way to easily do this in LaTex with an unknown command that I might not know???


title: Add option to class with command

text: Is it possible add at the loaded class some options? look at the example below:               \documentclass{scrbook}          \AddOptionsToClass{headinclude,footinclude}% something like this command          \begin{document}          test          \end{document}


title: The acronym in formula mode looks not good (too wide)

text: I'm wondering is there any way to make the letters "V" and "P" in my TVPI abbreviation be closer to each other? Now they look to far from each other to me. Here is the code               \begin{equation}     TVPI=\frac{Distributed\:capital}{Paid\mbox{-}in\:capital}     \end{equation}      and the result ![enter image description here](http://i.stack.imgur.com/CEDcU.png) Thanks.


title: Table of numbers adaptable to various widths

text: It's been a while since I asked an embarrassing question, so here is one for your amusement: I want to print a table of numbers that is able to adapt to various column sizes so can't use a `tabular` like environment. Well, I thought that this would be straight forward and a simple solution such as to use a `\makebox[3em][r]{}` should work. And of course, I need a space on one side so that it could break at line boundaries. And it fact it works _pretty_ good, but not exactly right. So what I have below only seems to only have a problem with the last row as I get the following result with the MWE below: ![enter image description here](http://i.stack.imgur.com/WHN2I.png) ## Code:               \documentclass{article}     \usepackage{showframe}     \usepackage{pgffor}          \newcommand*{\ListOrPrimes}{%           2,      3,      5,      7,     11,     13,     17,     19,     23,     29,           31,     37,     41,     43,     47,     53,     59,     61,     67,     71,           73,     79,     83,     89,     97,    101,    103,    107,    109,    113,          127,    131,    137,    139,    149,    151,    157,    163,    167,    173,         179,    181,    191,    193,    197,    199,    211,    223,    227,    229     }%          \begin{document}          \noindent     The sequence of primes is:     \medskip     {\raggedright%     \par\noindent\foreach \x in \ListOrPrimes{%             \makebox[4em][r]{\x}\space%     }%          \end{document}


title: Epstopdf BoundingBox not found

text: Please, i need to convert some eps figures to pdf for use with pdflatex. But, i have this warning:                epstopdf curve.eps       ==> Warning: BoundingBox not found      Have you an idea please ? Thank you so much.


title: How to refer back to a point in the document with custom counters?

text: The easiest way to explain what I would like to have is to show the desired output ![desired output](http://i.stack.imgur.com/1HOOL.png) and I would like to get this by writing something like:               \begin{document}           Draw point B \STEP{drawb}. Connect A and B \STEP{connectab}. Draw point A \STEP{drawa}.          The correct order is \REF{drawa} then \REF{drawb} and finally      \REF{connectab}.          \end{document}      The references should be links, so I can jump there by clicking it. How should `\STEP` and `\REF` be defined? The example is oversimplified. The referenced parts of the text cannot be put into an enumerate environment or whatnot, they are inside some paragraphs and must remain there. I am using latex and the hyperref package. Feel free to edit the title, I have no idea how to phrase it in consice way.


title: Using package listings with sciposter

text: Could you please provide a working example in which a source code delimited by `listings` environment word wraps its lines, without breaking the column layout of `sciposter`? Whenever I put a long line in the middle column, for instance, it is rendered until it ends (`\textwidth` is the limit), therefore breaking the column layout. Hope that makes sense. EDIT: Setting the `breaklines` flag solved the word-wrapping problem. http://stackoverflow.com/questions/981020/how-to-force-line-wrapping-in- listings-package


title: Is there software similar to the arXiv.org AutoTeX?

text: I was wondering, does software similar to the arXiv AutoTeX exist, or is AutoTeX is available somewhere?


title: Embedding printer settings in pdf

text: I want to produce a pdf that includes settings for a predefined profile, like the the printing on both side of a piece of paper, is that possible? If a pdf does not provide this kind of feature, you some other file format that is able to?


title: Is there a way in TikZ to reflect regular polygons of an arbitrary number of edges?

text: Is there a way in TikZ to reflect regular polygons of an arbitrary number of edges, along each edge-considered-as-mirror? I'm using MacTeX, and I'm new to LaTeX, pgf and TikZ. I'd like to do this to demonstrate a geometric construction that can be done using reflections, with polygons of an arbitrary number of edges. For some polygons (e.g. triangles and hexagons), this can be iterated to generate a tessellation of the plane. (Others have asked about hexagonal tilings, etc.) Ideally, I'd like to be able simply to reference an edge, generate a line coincident with it, and provide the line as an argument to a subroutine that can perform the reflection of the polygon along the line through that edge. This reflection can be simulated by rotations and translations, but I'd like to avoid the translations altogether (and the translation distance computations in `(x,y)` coordinates, or even in polar coordinates). This is to have the code also serve as a demonstration of the principles of construction, not just the graphics. For polygons of an odd number of edges `n`, a rotation of `180/n` is needed before translation; for polygons of an even number of edges, such rotation is not needed. I've tried referencing nodes of superposed constructions to re-center the effectively-reflected polygons, but my references didn't seem to work. I've also tried what I'd thought were planar coordinates (ordered pairs) based on a radial coordinate system, which I'd taken from an example, but they didn't work as expected in my code.


title: Change paper size in journal document class

text: I'm using this journal's style files and I can see that the `.cls` file defines paper size as `a4paper` in the following line:               \ExecuteOptions{a4paper,twoside,final}      However, compiling any document with this class uses a US letter paper, which crops the bottom. I can't even use `a4paper` as an option. What should I change to get A4 sizing? If you want an MWE, just try recompiling the `gjilguid2e.tex` that is present in the zip file. The included PDF file is A4, but upon recompiling, it switches to US letter for me.


title: How to get LuaLaTeX to work with babel's \textgreek?

text: I'm completely at a loss with how to get LuaLaTeX to output Greek text. I have tested the following MWE with PDFLaTeX and LuaLaTeX on both TeXlive 2009 (Linux) and TeXlive 2011 (Win32) and in both cases PDFLaTeX produces the expected output while LuaLaTeX seems to gobble up the Greek text and then do nothing with it.               \documentclass{minimal}     % Use LGRx if installed else LGR.      % Forcing one or the other makes no difference either.     \IfFileExists{lgrxenc.def}{%         \usepackage[LGRx,T1]{fontenc}}{%         \usepackage[LGR,T1]{fontenc}}     %\fi     \usepackage{lmodern,trace,ifluatex}     \usepackage[greek,british]{babel}     \unless\ifluatex       \usepackage[utf8]{inputenc}     \fi     \begin{document}     % pdflatex: OK.      %lualatex:  "τρίγωνον" is missing from the output,      %           and the sum total of output from \traceon is this:      %             {into \tracingonline=1}     %             {the character τ}     %             {end-group character }}     Triangle: \textgreek{\traceon τρίγωνον}.     \end{document}


title: How to create form letters from spreadsheet data in ConTeXt?

text: In LaTeX, one can use `datatool` to build simple form letters. As an example, the data is stored in a spreadsheet or CSV file, like this:               Name,Amount,Date     "Mr. White","$300","Dec. 2, 1911"     "Mr. Brown","$300","Dec. 3, 1911"      Then, one provides a simple template:               Dear \insertName,          You owe \insertAmount. Please send it before \insertDate.      When compiled, it produces one letter for each row in the spreadsheet. Are there similar tools for creating form letters in ConTeXt? The M-database module appears to share much of the functionality of `datatool`, but I cannot see any way to use this to create form letters.


title: How can I restore LaTeX standard font for math equations in a sty file?

text: I am using the style file for classic thesis, which can be downloaded in this link and can be viewed in this link. I like everything about this style file except the font used for math equations. How can I modify the `classicthesis.sty` such that math equations are printed the same as the standard LaTeX math?


title: Reconfiguring Tex Live Utility for 2014

text: I'm having some problems getting TexLive Utility to work with the repository to update packages. I received an error that said subfigure was an undefined environment in the RCS Journal template I was using, and some further googling told me that the package was deprecated. I copied in some elements of my preamble from my thesis where I know this environment had worked previously but no joy. I tried to update packages through TexLive utility from MacTEX and then received the error that the CTAN repository was running the 2014 version and I was still running the 2013. I elected to manually upgrade and followed the instructions found here: http://tug.org/texlive/quickinstall.html I have now got a 2014 folder in the correct directory alongside the 2013 folder that already existed from my current installation. As far as I can tell, everything worked fine (other than I had to `sudo` the installer on OSX). I then added the binaries to my `$PATH`, as instructed, but I've never done this before and don't know if it is correct. It is meant to look like the below: `PATH=/usr/local/texlive/2014/bin/x86_64-darwin:$PATH` and so I exported that. Using `echo $PATH` mine looks like: `/opt/subversion/bin/:/usr/local/texlive/2014/bin/x86_64-darwin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin` My guess is that this is where at least part of my problem is coming from. But to continue, I thought I had solved this, so proceeded to test TexLive Utility, but alas the same error. I thought that perhaps the utility needed reinstalling so I redownloaded and installed MacTeX. Same problems (it was a long shot I knew :P ) **_TL;DR_** It seems to my naive brain, that the TexLive util is still trying to use the 2013 binary, rather than the new 2014 ones, but I don't know how to change what the application addresses. Any help (ASAP) would be greatly appreciated.


title: Theorem style with surrounding lines

text: I'm using `\documentclass{book}`. I would like to create theorem styles as shown in the picture below but WITHOUT `\tcolorbox`. For some reason `\tcolorbox` doesn't work for me. Any ideas? Thanks in advance!! Here is an MWE which I use currently but doesn't look like I want I want perfectly.               \documentclass{book}     \usepackage[table]{xcolor}     \usepackage{tabularx,booktabs}     \usepackage{blindtext}         \definecolor{myblue}{RGB}{32,92,195}     \newenvironment{mybox}[1]       {\par\medskip\noindent\arrayrulewidth=2pt\arrayrulecolor{myblue}%        \hfill\tabularx{0.8\linewidth}{!{\color{myblue}\vrule width 2pt} X @{}}        \multicolumn{1}{@{}l}{\tabular{@{}l}\kern\tabcolsep\textbf{#1}\\\hline\endtabular}\\}       {\endtabularx\par\medskip}          \begin{document}          \begin{mybox}{The title with some more text in the title}     Onyl some text here     \end{mybox}          \blindtext          \begin{mybox}{The title}     \blindtext     \end{mybox}          \blindtext          \end{document}      ![enter image description here](http://i.stack.imgur.com/uEF6t.png)


title: How do I move an graphic to the top of a frame?

text: \documentclass[t]{beamer}          \definecolor{links}{HTML}{2A1B81}     \hypersetup{colorlinks,linkcolor=,urlcolor=red}          \usetheme{Frankfurt}     \usecolortheme{dolphin}     \usefonttheme{structuresmallcapsserif}     \usefonttheme{serif}     \usepackage{multicol}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{caption}     \usepackage{hyperref}          \title{CAES/EPI Presentation Template}     \setbeamercolor{author}{fg=yellow}     \author{David Solan - Energy Policy Institute, Director\\David Koehler - Energy Policy Institute, Assistant Director}     \setbeamercolor{date}{fg=yellow}     \date\today                    \begin{document}          {\usebackgroundtemplate     {\includegraphics[width=\paperwidth,height=\paperheight]{caestitlepage}}     \begin{frame}         \titlepage     \end{frame}          \section*{Outline}          {\usebackgroundtemplate     {\includegraphics[width=\paperwidth,height=\paperheight]{caessubslide}}     \begin{frame}     \begin{multicols}{2}         \frametitle{Contents}         \tableofcontents     \end{multicols}      \end{frame}          \section{WEPRC 2012}     \subsection{WEPRC 2012 Overview}         \begin{frame}         \begin{itemize}         \frametitle{WEPRC 2012 Overview}         \item \hyperlink{PARTICIPANTS}{\beamergotobutton{Participants}}          \item \hyperlink{PRESENTERS}{\beamergotobutton{Presenters}}         \item \hyperlink{KEYNOTESPEAKERSPONSOR}{\beamergotobutton{Keynote Speaker/Sponsors}}         \end{itemize}         \begin{center}         \includegraphics[width=\textwidth,height=0.4\textheight,keepaspectratio]{2012weprclayedonmap}         \end{center}         \end{frame}          \subsection{Participants}         \begin{frame}[label=PARTICIPANTS]         \frametitle{Participants}             \begin{center}         \includegraphics[width=\textwidth,height=0.4\textheight,keepaspectratio]{epiwelcome}         \end{center}         \end{frame}          \subsection{Presenters}     \begin{frame}[label=PRESENTERS]     \frametitle{Presenters}     \begin{center}         \includegraphics[width=.9\textwidth,height=.7\textheight,keepaspectratio]{2012weprcpresenters}     \end{center}     \end{frame}     \begin{frame}     WEPRC PRESENTER LIST     \end{frame}          \subsection{Keynote Speakers/Sponsors}     \begin{frame}[t,label=KEYNOTESPEAKERSPONSOR]     \frametitle{Keynote Speakers/Sponsors}     \includegraphics[scale=.4]{2012weprcsponsors}%     \includegraphics[scale=.4]{2012weprckeynotespeaker}     \end{frame}          \end{document}


title: Use pagestyle within bibheading definition in biblatex

text: The following MWE prints a cumulative bibliography, subdivided by chapter, using `biblatex`. I would like to use the pagestyle called `special` within the bibheading definition rather than invoking it explicitly at the end of my document. I would also like that once the bibliography is printed the 'main' pagestyle is reestablished. So, is it possible to use a pagestyle (defined with `titlesec`) within a bibheading definition in `biblatex`? And can that pagestyle scope be limited to just the bibliography?               \documentclass{book}     \usepackage[english]{babel}          \usepackage[pagestyles,outermarks]{titlesec}          \newpagestyle{main}[\scshape]{%       \headrule       \sethead       [\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]       {\ifthesection{\thesection\space\,\sectiontitle}            {\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}     }     \newpagestyle{special}[\scshape]{%       \headrule       \sethead       [\thepage][][\chaptertitle]       {\sectiontitle}{}{\thepage}     }     \pagestyle{main}          \usepackage[style=american]{csquotes}     \usepackage[style=authoryear-comp,refsegment=chapter,backend=bibtex]{biblatex}          % Bibliography at the end:     \defbibheading{bibbook}[\bibname]{%       \chapter*{#1}%       \chaptermark{#1}%     }     \defbibheading{subbib}{%       \section*{\refname\addspace\chaptername\addspace%       \ref{refsegment:\therefsection\therefsegment}}       \sectionmark{\refname\addspace\chaptername\addspace\therefsegment}       % \thispagestyle{plain}       % \pagestyle{special} % I WANT TO PLACE IT HERE     }          \addbibresource{bar.bib}          \usepackage{lipsum}          \begin{document}          \chapter{First}     \lipsum     \section{First Section}     \lipsum[1-5]     \nocite{*}          \chapter{Second}     \nocite{*}          \printbibheading[heading=bibbook]     \pagestyle{special}  % I DON"T WANT TO PLACE IT HERE     \bibbysegment[heading=subbib]           \end{document}      Where `bar.bib` is               @Book{Jac08,      author={M. O. Jackson},      title={Social and Economic Networks},      publisher={Princeton University Press},      edition={2},      address={Princeton, NJ},       year={2008}}          @InBook{NeuNas54,      author={Von Neumann, John and John Nash},      title={Game Theory},      booktitle={Microeconomic Theory},      bookauthor={Andreu Mas Collel},      publisher={Mit Press},      address={Cambridge},      year={1954}}          @InCollection{Sha53,      author={Lloyd Shapley},      title={A value for n-person games},      booktitle={Contributions to the Theory of Games},      editor={Harold Kuhn and Albert Tucker},      volume={2},      translator={Jurgen Pollock},      origlanguage={german},      publisher={Princeton Press},      address={Princeton, NJ},      year={1953}}          @Book{Dur05,      author={Rick Durret},      title={Probability Theory},      edition={3},      publisher={Duxburry Press},      address={Belmont, Ca},      year={2005}}          @InCollection{Tho95,      author={Walter Thomson},      title={Cooperative models of bargaining},      booktitle={Handbook of Game Theory},      volume={2},      editor={Robert Aumman and I. Hart},      publisher={North Holland},      address={Amsterdam},      year={1995}}          @Report{Car10,      author={Xavier Carvalho},      title={The Great Diversification},      type={Working Paper 1624},      institution={National Bureau of Economic Research},      year={2010}}          @InCollection{LopInd83,      author    = {Juan Lopez and Ignacio Indigo},      title     = {Checking whether smartand work},      booktitle = {Stack Exchange answers},      editor    = {Domingo Peron},      publisher = {Latex},      address   = {Knuth Place},      year      = {1983}     }


title: Use \macro within xcolor expression

text: So this seems to be impossible:               OrangeRed!\c!white      with `\c` being any kind of `\def` formula, or precisely in my case, with a `\pgfmathsetmacro`. Here is MWE               \documentclass{article}          \usepackage{mathtools}          % TIKZ & PGF     \usepackage[usenames,dvipsnames,svgnames]{xcolor}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepackage{tikz}          \usetikzlibrary{backgrounds, decorations.shapes, decorations.markings, shapes, patterns}          % % % % % % % % CIRCLES % % % % % % % %     % #1 angle     % #2 ray     % #3 shift     \pgfmathdeclarefunction{circleX}{3}     {%         \pgfmathparse{#3 + #2*cos(deg(#1))}%     }     \pgfmathdeclarefunction{circleY}{3}     {%         \pgfmathparse{#3 + #2*sin(deg(#1))}%     }          \begin{document}         \begin{tikzpicture}                       \tikzset{                 small dot/.style={fill=black, circle, scale=2}             }                  \pgfmathsetmacro{\halfPi}{.5*pi}             \pgfmathsetmacro{\twoPi}{2*pi}                  \pgfmathsetmacro{\r}{1}             \pgfmathsetmacro{\yshift}{0.25}                  \begin{axis}[axis x line=center, axis y line=none, width=.5\textwidth, axis equal,                          xtick={0,\halfPi,...,\twoPi}, xticklabels={$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$}]                           \foreach \i in {0.25,0.5,...,1} { %                     \pgfmathsetmacro{\c}{(1.2-\i)*100}                     \pgfmathsetmacro{\xshift}{\i*2*pi}                          %\addplot[OrangeRed!\c!white -> nope                     %\addplot[color=OrangeRed!\c!white -> nope                     %\addplot[color={OrangeRed!\c!white} -> nope                     %\addplot[color/.expanded=OrangeRed!\c!white -> nope                          \addplot[color=OrangeRed!50!white, samples=80, domain=0:2*pi]                         ({circleX(x,\r,\xshift)},{circleY(x,\r,\r+\yshift)});                 }                  \end{axis}         \end{tikzpicture}     \end{document}      Is there any way to use a macro within an `xcolor` expression without the need of a `\definecolor{colorname}{rgb|cmyk|...}{color stuff definition}`?


title: How to control spacing in ToC?

text: This refers to my previous question How to put image in table of contents?                \documentclass{article}      \usepackage{etoolbox,graphicx}% http://ctan.org/pkg/{etoolbox,graphicx}      \usepackage{xcolor}      \usepackage{mdframed}          \definecolor{myblue}{RGB}{146,243,224}          \newcommand{\addstufftotoc}[2][toc]{% \addimagetotoc[<toc>]{<stuff>}      \addtocontents{#1}{#2}}          \makeatletter     \patchcmd{\l@section}% <cmd>     {\begingroup}% <search>     {\begingroup\normalfont\Large\bfseries}% <replace>      {}{}% <success><failure>          \newcommand\mdframedintoc{\par\bigskip%     \begin{mdframed}[hidealllines=true,backgroundcolor=myblue]     \includegraphics[width=0.5\textwidth]{mypicture.png}       \end{mdframed}%     }     \patchcmd{\tableofcontents}{\@starttoc{toc}}{\@starttoc{toc}\mdframedintoc}{}{}     \makeatother                \begin{document}           \tableofcontents      \section{First section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2    \baselineskip]{example-image-a}\par}      \section{Second section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2     \baselineskip]{example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \addcontentsline{toc}{section}{\protect\numberline{}Fourth section}      \addtocontents{toc}{\protect\contentsline{section}{Section Name}{}}      \section{Last section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2  \baselineskip]{example-image-c}\par}           \end{document}      ![enter image description here](http://i.stack.imgur.com/LT3TB.png) How can I control the spacing between Contents and First Section (Increase) and between fourth section and Section Name (Reduce)?


title: Remove punctuation (comma) after year

text: For American Society of Genetics journal (Genetics), the bibliography format is somewhat strange. It requires no parenthesis or comma after year field. Beadle, G. B. et al. 2009 Title of the paper. Non-Italic-Name-of-Journal 88: 203-209 I am getting: Beadle, G. B. et al. 2009. Title.... And the journal name is printing in _italics_. Can someone help me with getting rid of the period after the 'year' field and removing the italicized Journal font? Edit1: I am using biblatex with authoryear style and natbib=true.


title: Tikz for loop for nodes

text: How do I construct a for loop so that I get               \draw [step=0.5cm, gray!80] (0,0) grid (4,4);     \draw [orange] plot [only marks, mark size=2.5, mark=*] coordinates {(0,0) (4,4)};      at every intersection?


title: Inputenc error with spanish

text: I'm currently writing my final thesis in TeXstudio and for a better organization I'm writing each chapter in a different text file. I'm also writing in Spanish and as far as I know, the `inputenc` package with `utf8` configuration (`\usepackage[utf8]{inputenc}`) along the `babel` package (`\usepackage[spanish,activeacute]{babel}`) must be ok for that. I started to write the first chapter with Spanish accents without any problem, nevertheless as soon as I started writing chapter 2 there was an `inputenc` error whenever I typed an accented word or the letter `ñ`. The error is like this:               Package inputenc Error: Unicode char \u8: étr not set up for use with LaTeX     Package inputenc Error: Unicode char \u8: ño not set up for use with LaTeX     Package inputenc Error: Unicode char \u8: ón not set up for use with LaTeX     Package inputenc Error: Unicode char \u8: És not set up for use with LaTeX     etc.     etc.     .     .     .      I don't really get it since I wrote chapter 1 without problems. I'm using those lines to add the chapters to the main file.               \input{Capitulo1}     \input{Capitulo2}     \input{Capitulo3}     \input{Capitulo4}     \input{Capitulo5}      It's as if TeXtstudio wouldn't keep recognizing the `inputenc` function after the first `\input{file.tex}` or something. And the wiered thing is that the inputenc error is for the accented words interacting inside a word, for example `étr` or `ño` inside the words `paramétrico` and `diseño`. I can only make it work if I place the whole chapter's 2 content into the chapter's 1 TeX file. Any ideas?


title: Is it possible to `split a hbox`?

text: When creating two columns or balancing it, we may use `\vsplit` to achieve this, but can we split a `\hbox` in TeX? Compared with `\vsplit`, an example may be like this:               \setbox0=\hbox to 6in{ ... }     \setbox1=\hsplit0 to 3in      Maybe a method will be that we can put the contents of `\box0` into a `\vbox`, then the horizontal lists in `\box0` can be broken into lines. Any ideas?


title: Axis Environment Tick Labels as Text (Including a $)

text: I am attempting to use the `axis` environment to build a simple plot line. Is it possible for tick labels to be renamed as text? Instead of numbers I would like the month on the x-axis, and in addition, include a dollar sign on the y-axis tick label. MWE:               \documentclass{article}          \usepackage{tikz,pgfplots}               \begin{document}     \begin{tikzpicture}                         \begin{axis}[                                 small,                                 xlabel=Month,                                 ylabel=Dollars,                                 axis y line=left,                                 axis x line=bottom,                                 xmin=0,                                 xmax=5,                                 ymin=0,                                 ymax=6,                                 xtick={1,2,3,4},                                 ytick={2,4,6},                                 axis y discontinuity=crunch                                     ]                          \addplot[sharp plot]                              coordinates {                                 (1,2)                                 (2,2)                                 (3,4)                                 (4,4)                                         };                         \end{axis}              \end{tikzpicture}          \end{document}


title: Problem with digits in URLs when using mathspec and hyperref

text: When I use `mathspec`'s `\setmathsfont` and `hyperref`, and try to typeset a URL, most of the URL uses monospace, as it should. Good. However, digits use the maths font. Anyone know how to fix this? ## MWE               \documentclass{article}     \usepackage{mathspec,fontspec,hyperref}          \setmathsfont(Digits){Minion Pro}     \setmonofont{Source Code Pro}          \begin{document}     \nolinkurl{abc123def} % same problem with \url{..}     \end{document}      ## Output ![enter image description here](http://i.stack.imgur.com/2VYAr.png)


title: Molecular Biology and Evolution template - help fix bit rotted font definitions (and other things)

text: I am trying to get the Molecular Biology and Evolution journal article template to build. I have limited experience with LaTeX except as a consumer of existing packages. The linked zip file contains two sub zips, the one I have been attempting to get to compile is "MBE_LaTeX.zip" (the other lacks necessary class files etc.). Freshly extracted, `latex MBE-Sample.tex` results in a failure so:               <snip>          kpathsea: Running mktextfm CRONOS     /usr/share/texmf/web2c/mktexnam: Could not map source abbreviation C for CRONOS.     /usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-texlive/fonts/map/dvips/skak/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input CRONOS     This is METAFONT, Version 2.718281 (TeX Live 2009/Debian)               kpathsea: Running mktexmf CRONOS     ! I can't find file `CRONOS'.     <*> ...:=ljfour; mag:=1; nonstopmode; input CRONOS          Please type another input file name     ! Emergency stop.     <*> ...:=ljfour; mag:=1; nonstopmode; input CRONOS          Transcript written on mfput.log.     grep: CRONOS.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input CRONOS' failed to make CRONOS.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font LY1/ptm/m/n/10=CRONOS at 10.0pt not loadable: Metric (TFM) file not foun     d.     <to be read again>                         relax      l.100 \fontencoding\encodingdefault\selectfont          ?          ! Emergency stop.     <to be read again>                         relax      l.100 \fontencoding\encodingdefault\selectfont          No pages of output.     Transcript written on MBE-Sample.log.      This appears to be related to this question, but I am unable to figure out the correct name/installation for the CRONOS font (it is provided in the Fonts directory in the zip file).


title: Latex subequations with "align" does not align?

text: Why does the second element on each line not align vertically? (z and x{im} in this case)                \begin{subequations}      \label{eq:optim2}      \begin{align}      & \text{minimize}   & z       &= \sum_{i} c_m &                   &     &                      \label{eq:cost}\\      & \text{subject to} & x_{im}  &\leq 0 \,,     & \forall &  m, i \;&| \; & p_{ij}   = 1          \label{eq:const1}      \end{align}      \end{subequations}


title: How to generate E-mail not Email in elsarticle.cls

text: I am using `elsarticle.cls` to typeset the paper. The journal requires "E-mail" not "Email". But `elsarticle` automatically gives "Email". I wonder how to correct it? I am using the following commands:               \title{This is a specimen title\tnoteref{t1,t2}}      \tnotetext[t1]{This document is a collaborative effort.}      \tnotetext[t2]{The second title footnote which is         longer than the first one and with an intention to fill         in up more than one line while formatting.}           \author[rvt]{C.V.~Radhakrishnan\corref{cor1}\fnref{fn1}}      \ead{cvr@river-valley.com}           \author[rvt,focal]{K.~Bazargan\fnref{fn2}}      \ead{kaveh@river-valley.com}


title: Reduce the line number font size of pseudocode?

text: I have learned from here on how to reduce the font size in the pseudocode. The last thing left for me is to reduce the line number font size as well. The following is my MWE, and it seems that `\algsetup{linenosize=\tiny}` is not working.               \documentclass[a4paper]{article}          \usepackage{algorithmicx}     \usepackage{algorithm} % http://ctan.org/pkg/algorithms     \usepackage[noend]{algpseudocode} % http://ctan.org/pkg/algorithmicx          \begin{document}          \begin{algorithm}     \algsetup{linenosize=\tiny}     \small %\small, \footnotesize, \scriptsize, or \tiny     \caption{a}          \begin{algorithmic}[1]     \Procedure{a}{}         \While{aa}             \State aa         \EndWhile     \EndProcedure     \end{algorithmic}          \label{alg:drs}     \end{algorithm}          \end{document}


title: How to draw a horizontal tree with branches on the right and left?

text: I need to draw trees but they should extend (from the root) on both sides. TikZ seems a good solution but do not how to manage it.


title: for classicthesis: mirroring format of chapter numbers and graffito

text: With my current classicthesis doc used in Lyx, the default format is for odd numbered pages to have a wide margin on the right. I would like odd pages to have a large margin on the left (for binding) I have changed this using the following in the preamble:               % REVERSE MARGINS       \let\tmp\oddsidemargin     \let\oddsidemargin\evensidemargin     \let\evensidemargin\tmp     \reversemarginpar      I have also set chapters to start on odd pages using the option:               openright      This seems to work alright but I would like the fancy chapter numbers and graffito comments to be on the outside margin rather than the inside margin of the pages. How do I move these?


title: Ordering Glossary in ToC before another entry

text: I'm having difficulties getting my glossary to show up in the right place in my table of contents. It needs to come before the Acknowledgements and be in the same font type as the List of Figures etc.               \documentclass[12pt]{report}     \pagestyle{plain}          \usepackage[acronym,toc]{glossaries}  %Allows creation of a glossary page     \makeglossaries     \newglossaryentry{Ppump}      {       name=$P_{Pump}$,       description={Pump wavelength (W)}      }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %         Begin document              %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \thispagestyle{empty}     \pagenumbering{roman}          \doublespacing     \include{abstract}     \include{table_of_contents}     \singlespacing     \include{acknowledgements}          \end{document}      And for additional info, this is the code for my ToC (table_of_contents.tex).               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %           Sets up Table of Contents            %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \addcontentsline{toc}{section}{Table of Contents}     \tableofcontents          \newpage     \addcontentsline{toc}{section}{List of Figures}     \listoffigures          \newpage     \addcontentsline{toc}{section}{List of Tables}     \listoftables          \addcontentsline{toc}{section}{Glossary of Terms}     \printglossaries          \newpage     \addcontentsline{toc}{section}{Acknowledgements}      I am working on my thesis, so I do have quite a few .tex files for the different sections to make debugging easier (at least for me) as most of them are just different chapters then I can include them into the main document later. Anyways, if this question has already been asked, can someone please refer me to the link?


title: How to insert Greek letters (having trouble with \greekletter)

text: This is my code:               \begin{equations}     \begin{align}     \lamba = \frac{x}{2}     \end{align}     \end{equations}      But `\lamba` appears just as a blank space.


title: Linux LaTeX template installation issue

text: I have Ubuntu 12.04 and I'm trying to install the `IEEE template` to create a `.tex` document. I have tried both methods of the following tutorial, but none worked: https://softwareexperiments.wordpress.com/2011/01/05/installing- ieeetrans-and-the-ieee-bibtex-style-for-latex-in-ubuntu/ When I try to compile it, it outputs errors like these:               ! I can't find file `nullfont'. <*> ...ljfour; mag:=1; nonstopmode; input nullfont Please type another input file name ! Emergency stop. <*> ...ljfour; mag:=1; nonstopmode; input nullfont Transcript written on mfput.log.          `! I can't find file `pplr7t'. <*> ...:=ljfour; mag:=1; nonstopmode; input pplr7t Please type another input file name ! Emergency stop. <*> ...:=ljfour; mag:=1; nonstopmode; input pplr7t Transcrip`t written on mfput.log. grep: pplr7t.log: No such file or directory      I don't understand what's wrong, I was able to make it work on a 10.04 seamlessly.


title: How can I automatically mark local extrema with pgfplots and scatter?

text: I am trying to have TikZ automatically mark a local maximum in a fourth-degree polynomial I built using a curve-fitting tool. I am new to LaTeX and TikZ, and am a bit overwhelmed - there seem to be a dozen ways of accomplishing this. The code Jake provided in his answer to this question does not seem to work for me; it works for the functions in the example, but not for mine. Here is my minimal working example:               \documentclass[preview=false,tikz=true]{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotsset{         /tikz/max node/.style={             anchor=south         },         /tikz/min node/.style={             anchor=north         },         mark min/.style={             point meta rel=per plot,             visualization depends on={x \as \xvalue},             scatter/@pre marker code/.code={%                 \ifdim\pgfplotspointmetatransformed pt=0pt                     \def\markopts{}%                     \node [min node] {                         \pgfmathprintnumber[fixed]{\xvalue},%                         \pgfmathprintnumber[fixed]{\pgfplotspointmeta}                     };                 \else                     \def\markopts{mark=none}                 \fi                 \expandafter\scope\expandafter[\markopts,every node near coord/.style=green]             },%             scatter/@post marker code/.code={%                 \endscope             },             scatter,         },         mark max/.style={             point meta rel=per plot,             visualization depends on={x \as \xvalue},             scatter/@pre marker code/.code={%                 \ifdim\pgfplotspointmetatransformed pt>1000pt                     \def\markopts{}%                     \node [max node] {                         \pgfmathprintnumber[fixed]{\xvalue},%                         \pgfmathprintnumber[fixed]{\pgfplotspointmeta}                     };                 \else                     \def\markopts{mark=none}                 \fi                 \expandafter\scope\expandafter[\markopts]             },%             scatter/@post marker code/.code={%                 \endscope             },             scatter         }     }               \begin{document}          \begin{tikzpicture}         \begin{axis}[         xtick={0,...,7},         domain=0:7,         axis lines*=middle         ]                \addplot +[mark max] plot {0.001826*x^4-0.02873*x^3+0.1066*x^2+0.03454*x+0.003613};         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}[         xtick={0,...,7},         domain=0:7,         axis lines*=middle         ]                \addplot +[mark min] plot {0.001826*x^4-0.02873*x^3+0.1066*x^2+0.03454*x+0.003613};         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}         \addplot +[mark max] plot {0.001826*x^4-0.02873*x^3+0.1066*x^2+0.03454*x+0.003613};         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}         \addplot +[mark min] plot {0.001826*x^4-0.02873*x^3+0.1066*x^2+0.03454*x+0.003613};         \end{axis}     \end{tikzpicture}          \end{document}      This results in the following plots: ![enter image description here](http://i.stack.imgur.com/mlplZ.png) The first plot is the one I want to highlight a maximum for. The second plot shows that it works for the minimum; the third plot is without a domain set -- you can see that it doesn't find a maximum there, either, although again it works for the minimum. Now, while I was setting up the example, I tweaked some values. If I change the threshold to 500 pt:               \documentclass[preview=false,tikz=true]{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotsset{         /tikz/max node/.style={             anchor=south         },         /tikz/min node/.style={             anchor=north         },         mark min/.style={             point meta rel=per plot,             visualization depends on={x \as \xvalue},             scatter/@pre marker code/.code={%                 \ifdim\pgfplotspointmetatransformed pt=0pt                     \def\markopts{}%                     \node [min node] {                         \pgfmathprintnumber[fixed]{\xvalue},%                         \pgfmathprintnumber[fixed]{\pgfplotspointmeta}                     };                 \else                     \def\markopts{mark=none}                 \fi                 \expandafter\scope\expandafter[\markopts,every node near coord/.style=green]             },%             scatter/@post marker code/.code={%                 \endscope             },             scatter,         },         mark max/.style={             point meta rel=per plot,             visualization depends on={x \as \xvalue},             scatter/@pre marker code/.code={%     %            \ifdim\pgfplotspointmetatransformed pt>1000pt                 \ifdim\pgfplotspointmetatransformed pt>500pt                     \def\markopts{}%                     \node [max node] {                         \pgfmathprintnumber[fixed]{\xvalue},%                         \pgfmathprintnumber[fixed]{\pgfplotspointmeta}                     };                 \else                     \def\markopts{mark=none}                 \fi                 \expandafter\scope\expandafter[\markopts]             },%             scatter/@post marker code/.code={%                 \endscope             },             scatter         }     }               \begin{document}          \begin{tikzpicture}         \begin{axis}[         xtick={0,...,7},         domain=0:7,         axis lines*=middle         ]                \addplot +[mark max] plot {0.001826*x^4-0.02873*x^3+0.1066*x^2+0.03454*x+0.003613};         \end{axis}     \end{tikzpicture}          \end{document}      then I get: ![threshold 500pt](http://i.stack.imgur.com/OLy85.png) (I would be interested in knowing why this happens.) A bit of further playing around reveals that setting it to 999pt gives the desired result: ![threshold 999pt](http://i.stack.imgur.com/8XcPd.png) I have to admit at this point that I don't understand the code, and have no idea if this solution is the right one or whether it will give consistent results. Perhaps someone could explain what is happening? I don't understand what the "meta value" is supposed to mean here, or even what scatter does. How would one draw a highlighted vertical line from the horizontal axis to the maximum using this method?


title: How to modify the Table of Contents to add the words Chapter, Appendix, Figure, Table

text: I am trying to get the words Chapter, Appendix, Figure and Table into the table of contents. The thesis requirements can be found here http://www.usc.edu/schools/GraduateSchool/documents/Thesis/Format_Presentation_Guidelines.pdf. The relavent part of the guidelines is the fact that the words Chapter, Appendix, Figure and Table must appear on the same line as the item. For example (please note that the major chapters/Tables/Figures/Appendicies have double spacing while the subsections have single spacing). Thanks in advance for the help! # Dedication ii # Acknowledgments iii # Abstract xxiv # Chapter 1: Some title....4 ## 1.1 MySection First Name....3 ## 1.2 MySection Second Name....5 # Chapter 2: MyChapter Two Title # Appendices # Appendix A: Why I love Research ....10 ## A.1 Preliminaries..........10 ## A.2 More Preliminaries......11 # Appendix B: Why I Need Friends that Know Latex ....13 ## B.1 Preliminaries.......14 ## B.2 More Priliminaries....15 # List of Figures # Figure 1.1: My first figure......15 # Figure 1.2: My first figure......15 # Figure 2.1: My first figure......25 # Figure 2.2: My first figure......25 # List of Tables # Table 1.1: My Table......15 # Table 1.2: My Table......17 # Table 2.1: My Table......25 # Table 2.2: My Table......27 Note: The outline above does not show the spacing required. The major chapters need to be double spaced while the subsection should be single spaced. The packages used and the document format follows.                   \documentclass[11pt]{report}     \usepackage[dissertation,final]{USCthesis}     %NOTE: THE def \degree WAS REDEFINED from \degree to \degreeName IN ORDER TO AVOID %CONFLICTS WITH THE siunitx PACKAGE.  NOTE: THE STYLE FILE USCthesis WAS CHANGED. ALL 2 OCCURANCES OF \degree WAS CHANGED TO \degreeName SO AS NOT TO CONFLICT WITH siunitx package.            \usepackage{cite}     \usepackage[subfigure]{tocloft}          \usepackage{subfigure} % Written by Steven Douglas Cochran       % This package makes it easy to put subfigures       % in your figures. i.e., "figure 1a and 1b"       % Docs are in "Using Imported Graphics in LaTeX2e"       % by Keith Reckdahl which also documents the graphicx       % package (see above). subfigure.sty is already       % installed on most LaTeX systems. The latest version       % and documentation can be obtained at:     \usepackage{graphicx}     \usepackage{psfrag}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{booktabs}%used for professional tables     \usepackage[table]{xcolor}%used to add color to tables     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{mathrsfs}%Used for script math fonts     \usepackage{bm}%\bm{\omega} produces bold omega     \usepackage{amsbsy}%\boldsymbol{\omega} also produces bold omega     \usepackage{url}     \usepackage[load-configurations = version-1]{siunitx}     \usepackage{animate}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage{color}     \usepackage{subfigure}     \usepackage{index}     \makeindex     \usepackage{appendix}     \usepackage{epstopdf}     \usepackage{standalone}%Use to generate tikz pictures from separate LaTeX code for each graphic          %\nofiles     \begin{document}     \setlength{\parskip}{0pt}          \title{SOME TITLE}         % ALL CAPS in title. The title needs to be double spaced to be compliant with USC guidelines     \author{WILEY COYOTE} % For example, Tommy Trojans. Only the first letter of each word requires CAPS.          \submitdate{May 2012}              % Officially, submitdate can only be May, August and December.     \begin{preface}     \prefacesection{Dedication}             % (Optional) Dedication     Blah blah blah     \prefacesection{Acknowledgments}     I would like to thank....     \tableofcontents                        % List of contents     \listoftables                           % List of tables     %\renewcommand\cfttabpresnum{Table }     %\renewcommand{\cftchappresnum}{}     \listoffigures                          % List of figures          \include{thesis_abs}                    % Abstract: thesis_abs.tex starts with \prefacesection{Abstract}          \end{preface}          \include{Chapter1}%Include the file named "Chapter1     \include{Chapter2}% Include the file named "Chapter2     \include{Chapter3}%Include the file named "Chapter3     \begin{singlespace}                     % single-space for bibliography     \references[Bibliography]{IEEEtranS}{../Dissertation_bib} %Include a bibliography file named "Dissertation_bib" located in the relative directory.... Use IEEEtranS to sort bibliography by last name of first author.           \begin{appendices}      \include{Appendix}%Includes the appendix file named "Appendix"     \end{appendices}     \end{singlespace}     \printindex% There is an index file in my thesis that is generated by xindy     \end{document}


title: Hopeless table formatting

text: I have a document where I enter a command `\tab` and that creates a table for me. The right part of the table always stays the same and the left part of the table is entered with arguments of the `\tab` function. I also need to enter between 1 and 6 images into this table in 2 separate rows and I created a separate function `\tabgraph` for this. This works fine altaugh I have to use a `\begin{figure}` and a `\begin{minipage}`, otherwise the pictures won't show and errors occur. **_Problem #1:_** Depending on how much images I put in, the position of those images changes and they cover each other sometimes. See picture below:![One pic is fine](http://i.stack.imgur.com/jLk8h.png) ![Two pics are not so fine, depending on their width](http://i.stack.imgur.com/klnmX.png) ![Three pics are madness](http://i.stack.imgur.com/4Kqba.png) **_Problem #2:_** I want the text in the last row to be on the left side of the picture, but I think since this Text is in a figure environment this creates problems. **_Problem #3:_** `\fbox` should create a frame around the images, but the frame is only visible on one or two sides. I also don't like to use the `arraystretch{2}` but I can't find a better solution. **So, my question: Is there a way to do this better?** Here is a MWE:               \documentclass[final]{article}     \usepackage[demo]{graphicx}     \usepackage[a4paper,left=25mm,right=25mm,top=2cm,bottom=2cm]{geometry}     \usepackage{caption}          \begin{document}          \newcommand{\tab}[5]     {% % % % % % % % % % % % % % % TABLE START% % % % % % % % % % % % % % % % %         \begin{figure}[h!]             \setlength\fboxsep{0pt}             \setlength\fboxrule{.1mm}             \renewcommand{\arraystretch}{2}              \tabcolsep5pt             \begin{tabular}{|c|p{13cm}|}\hline                 \textbf{Row 1 Text text...} & #1 \\ \hline                 \textbf{Row 2 Text text...} & \hspace{\newline} #2 \\ \hline                 \textbf{Row 3 Text text...} & #3 \\ \hline                 \textbf{Row 4 Text text...} &  #4 \\ \hline                 \textbf{Row 5 Text text...} & #5 \\ \hline             \end{tabular}         \end{figure}         % % % % % % % % % % % % % % % Table END% % % % % % % % % % % % % % % % %     }          \newcommand{\tabgraph}[1]     {             \begin{minipage}{5cm}             \centering             \fbox{\includegraphics[height=5cm]{#1}}             \caption{#1}             \label{#1}             \end{minipage}     }          \part{Part}     \section{Section}     \subsection{Title here}     \tab{Text Text Text Text Text Text Text}         {\tabgraph{Fragezeichen}\tabgraph{Fragezeichen}\tabgraph{Fragezeichen}}         {Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text}         {Text Text Text Text Text Text Text}         {\hspace{\newline} \tabgraph{Fragezeichen} \hspace{\newline\newline} Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text}     \end{document}      I solved my table. I use a `\minipage` for each image and put that into the table. Here is the code:               \documentclass[final]{article}     \usepackage[demo]{graphicx}     \usepackage[a4paper,left=25mm,right=25mm,top=2cm,bottom=2cm]{geometry}     \usepackage{caption}          \begin{document}              \newcommand{\tab}[5]{             \centering             \begin{tabular}{|c|p{11cm}|}                 \hline                 \textbf{Materials and Tools} & #1 \\                 \hline                 \textbf{Photo} & \vspace{0pt} #2 \\                 \hline                 \textbf{Steps} & #3 \\                 \hline                 \textbf{Process-parameters} &  #4 \\                 \hline                 \textbf{Check} & #5 \\                 \hline             \end{tabular}         }              \newcommand{\tabgraph}[2]         {             \begin{minipage}{5cm}                 \centering                 \setlength\fboxsep{0pt}                 \setlength\fboxrule{.2mm}                 \fbox{\includegraphics[height=4.4cm]{#1}}                 \captionof{figure}{#2}             \end{minipage}         }              \tab{Received the likewise law graceful his. Nor might set along charm now equal green. Pleased yet equally correct colonel not one.}         {\tabgraph{sasda}{capt} \tabgraph{asdfasdf}{capt}}         {Received the likewise law graceful his. Nor might set along charm now equal green. Pleased yet equally correct colonel not one. Say anxious carried compact conduct sex general nay certain.}         {Received the likewise law graceful his. Nor might set along charm now equal green. Pleased yet equally correct colonel not one.}         {\vspace{0pt} \tabgraph{sdaf}{capt} \newline Received the likewise law graceful his. Nor might set along charm now equal green. Pleased yet equally correct colonel not one.}          \end{document}      No more warnings or errors. I just can't align the text in the left column into the middle (horizontally). Any ideas? Also the spacing between the rows is too little.


title: ! Argument of \@Aboxed has an extra }

text: I have a problem using `\Aboxed` in the following `align*`-environment:               \begin{align*}     \omega(\sigma_{ij}) &\equiv 1 - \left(\frac{27J_3}{2\sigma_e^3}\right)^2 \\     & = \omega(L) = 1 - \frac{\left( 9L - L^3\right)^2}{\left(L^2+3\right)^3}.      \end{align*}      I want to use `\Aboxed` to put the last part of the final equation in a box, i.e.               \begin{align*}     \omega(\sigma_{ij}) &\equiv 1 - \left(\frac{27J_3}{2\sigma_e^3}\right)^2 \\     & = \Aboxed{ \omega(L) = 1 - \frac{\left( 9L - L^3\right)^2}{\left(L^2+3\right)^3}. }     \end{align*}      This gives me the error message in the title. However, using `\Aboxed` in the upper equation of the `align*` doesn't cause any problems at all. I've also used `\Aboxed` in the last equation of other `align*`'s and `align`'s in my document. What causes the error in this case?


title: Is there a way to change papersize in beamer?

text: From what I have gathered on the interwebs, I found that beamer gives no basic options to change the papersize. I am however in desperate need of exactly that. Mind that I don't want to re-scale one or more frames to an A4, I want to actually change the size of every frame. Is there any way to work around this? **edit:** _@JosephWright_ To keep it as short as possible: I need to end up with the different slides in PNG format. These png's have to be a certain size. I was planning on simply converting the pdf to png's like you could normally do with LaTeX, untill I found out the problem with resizing in beamer. _@ prettygully_ I have, but it seems like beamerposter puts all the frames on one page, what would make the conversion to PNG's impossible **edit2:** _@ Andrew Stacey_ Your answers solved my personal problem as I was unaware of aspect ratio and my own ratio happens to be incredibly close to 16/9. I will correct the dimensions during PNG conversion. I am still interested if anyone can come up with a general answer to the question thought.


title: Making the z-buffer attend to axis lines

text: If I use centered axis lines, they don't seem to be considered worthy by the z-buffer. Surfaces get drawn on top of them, even when they should be behind them - like this: ![hidden axis](http://i.stack.imgur.com/QNvql.png) Code used:               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}             \begin{axis}[%                 axis equal,                 axis lines=center,                 scale uniformly strategy=units only,                 view/h=40,             ]             \addplot3[%                 patch,                 opacity=0.8,                 z buffer=auto             ]             coordinates { (0,1,0) (1,1,1) (-1,1,1) };             \end{axis}         \end{tikzpicture}     \end{document}      Do I have to draw transparent axes first, then the objects behind them, then add a new axis environment and eventually draw all the objects in front of the axis lines or is there a more elegant way to achieve this? _**EDIT:_** I ended up playing z-buffer myself and manually drawing over the axis lines, like this:               \draw[line width=.275] (axis cs: 0,0,0) -- (axis cs: 0,0,2.55);      But this gets quite annoying when having to enlarge axes so you don't have occluded arrow tips, splitting plots in a back and a front part to be able to redraw the axis line inbetween, ... There has to be a better solution.


title: Why doesn't \uccode have an effect on \scshape

text: I thought I had a simple answer to Automatically getting “V” as the capital letter for “u” when typesetting latin by writing something like               \documentclass{article}          \newcommand{\mytextsc}[1]{%%"       \begingroup       \uccode`\u=`\V       \textsc{#1}%%'       \endgroup}          \newcommand{\mytextuc}[1]{%%"       \begingroup       \uccode`\u=`\V       \uppercase{#1}%%'       \endgroup}          \begin{document}          \mytextsc{Lurem} non-upper case text          \mytextuc{Lurem} non-upper case text          \end{document}      But my use of `\uccode` has no effect in the definition of `\mytextsc`. Could someone explain why?


title: Formatting inside a table

text: \documentclass{article}     \usepackage{float}     \usepackage{mathtools}     \newcommand{\unit}[1]{\hat{\mathbf{#1}}}     \begin{document}     \begin{table}[H]       \centering       \begin{alignat*}{4}                                                                         \unit{i}\times\unit{j} &= \unit{k} & \qquad\qquad                                         \unit{j}\times\unit{k} &= \unit{i}\\                                                      \unit{k}\times\unit{i} &= \unit{j} & \qquad\qquad                                         \unit{j}\times\unit{i} &= -\unit{k}\\                                                     \unit{i}\times\unit{k} &= -\unit{j} & \qquad\qquad                                        \unit{k}\times\unit{j} &= -\unit{i}                                                     \end{alignat*}       \caption[Unit Vectors]{Calculation of unit vectors in 3 dimensions.}       \label{unitvecs}     \end{table}     \end{document}      I really don't like the spacing between the alignment and the table caption but when I use `tabular`, the identities look weird not aligned. How best can I format this? ![enter image description here](http://i.stack.imgur.com/CRxmE.png)


title: Cleveref: Parentheses around references to subequations using \labelcref

text: Using the `Cleveref` package (v0.19) i have a problem with missing parentheses when referencing to subequations, using the `\labelcref` command. Here is a MWE:               \documentclass{article}     \usepackage{parskip}     \usepackage{amsmath}     \usepackage{cleveref}          % Change so that the parentheses for equations are part of the hyperlink     \creflabelformat{equation}{#2(#1)#3}     \crefrangelabelformat{equation}{#3(#1)#4 to #5(#2)#6}          % This does not work:     \creflabelformat{subequations}{#2(#1)#3}     \crefrangelabelformat{subequations}{#3(#1)#4 to #5(#2)#6}          \begin{document}     \textbf{Writing three subequations:}     \begin{subequations}\label{eqn:abc}         \begin{align}             A&=B\label{eqn:abc1}\\             B&=C\label{eqn:abc2}\\             C&=A\label{eqn:abc3}         \end{align}     \end{subequations}     Referencing using \texttt{$\backslash$cref}: \cref{eqn:abc}, \cref{eqn:abc1}, \cref{eqn:abc2}, \cref{eqn:abc3}.          Referencing using \texttt{$\backslash$labelcref}: \labelcref{eqn:abc}, \labelcref{eqn:abc1}, \labelcref{eqn:abc2}, \labelcref{eqn:abc3}. $\leftarrow$ Parenthesis are missing for subequations!\\[2ex]          \textbf{Writing two separate single equations:}     \begin{equation}\label{eqn:singlexy}         x=y     \end{equation}     and     \begin{equation}\label{eqn:singleyx}         y=x     \end{equation}     Referencing using \texttt{$\backslash$cref}: \cref{eqn:singlexy}, \cref{eqn:singleyx}.          Referencing using \texttt{$\backslash$labelcref}: \labelcref{eqn:singlexy}, \labelcref{eqn:singleyx}. $\leftarrow$ Parenthesis are \emph{not} missing for normal equations!     \end{document}      The output is as follows: ![Output of MWE above](http://i.stack.imgur.com/X6Xpk.png) As can be seen, the `\labelcref` command omits the parentheses when referencing to the subequations (1a, 1b and 1c), as well as to their parent equation (1). As mentioned in the code above, the following lines of code do not solve the problem:               \creflabelformat{subequations}{#2(#1)#3}     \crefrangelabelformat{subequations}{#3(#1)#4 to #5(#2)#6}      I'm quite certain it worked in an earlier version of Cleveref ( **without** adding the above two lines). Any ideas would be greatly appreciated!


title: Changing all "[" to \llbracket

text: Is there a way to change all `[` and `]`s in a document to `\llbracket` and `\rrbracket`? Without modifying the text?


title: problem with figure on a0poster

text: Iam trying to put a figure on my `a0poster`. But I get the error message: `LaTeX error: Float(s) lost`; and my figure is suppressed. I have subdivided my `a0poster` into regions using `minipages`. My figures are in `eps`-format. The figures get converted into `pdf` without problems. Could somebody give me a hint how to overcome my problem?


title: plot points depending on x value?

text: Is there any options to replace `each nth point={100}` for something dependent on column value? My table is something like:               x   y     0   5     1   4     2   5     3   3     3   -3     2   -4     1   -1     0   0      I just want to plot for x values lower than 2. (Of course it is a minimial situation, in the complete situation it is not so easy to modify the table and I use the other values inside the same axis).


title: package keyval error: compat2 undefined

text: I am using MiKTeX 2.9, `geometry` v5.6. I am getting the following error package `keyval` error: `compat2 undefined.` The LaTeX code is attached here:               \documentclass[phD,synopsis,a4paper]{iitmdiss}     %\documentclass{article}     \usepackage[dvips]{graphicx}     \usepackage{amsmath,cite,epsfig,xcolor} % easier math formulae, align, subequation     %\usepackage{subfig}          \usepackage{times}     \usepackage{epstopdf}     \usepackage{enumerate}     \usepackage[small,it]{caption}     %\usepackage[countmax]{subfloat}     \usepackage{fancyhdr}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{subfigure}     %\usepackage[left=3cm,right=2.1cm,top=2.1cm,bottom=2.1cm]{geometry}     \usepackage[compat2, margin=2cm]{geometry}               \title{TITLE OF THESIS}          \author{NAME}          \date{MONTH YEAR}     \department{PHYSICS}               \begin{document}          %\nocite{*}     \maketitle                    % The main text will follow from this point so set the page numbering     % to arabic from here on.     \pagenumbering{arabic}     \setcounter{page}{0}     %\newpage     \section{Introduction}     kdjflsadfj kjlksjdlkf     \section{Motivation, Objective and Scope}          \section{Summary of the Research Work}          \section{Conclusions}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Bibliography.          \begin{singlespace}     \begin{thebibliography}{10}     \addcontentsline{toc}{section}{Bibliography}          \bibitem{paper1}     Author 1 and Author 2     \newblock {\em Paper title}.     \newblock Journal\ \ {\bf Volume}, Page\ \ (Year).     \end{thebibliography}          \end{singlespace}                    %%%%%%          \section{Proposed Contents of the Thesis}     The outline of the thesis is as follows:     \begin{enumerate}     \item Chapter 1 title     \item Chapter 2 title     \item ...     \end{enumerate}               %\vskip 4cm     %%%%%%     \section{Publications}     \subsection{Papers in Refereed Journals}     \begin{enumerate}     \item Title \\         {\bf Author 1}, Author 2...\\         {\it Journal title.}, {\bf Volume}, Page (Year)     \end{enumerate}          \subsection{Presentations in Conferences}     \begin{enumerate}     \item  Presented titled  {\em Title} at the {\bf Conference on...}  place, date..     \end{enumerate}               \end{document}


title: A simple solution to using widebar on subscripted symbol with small space with the subscript

text: Looking for a simple method to use a widebar over a letter with subscript, but have the space remain the same as when using `\bar` as `\overline` produces large space which does not look good even though the bar length is fine, while `widebar` from `\usepackage{mathabx}` reduces the gap, but the bar length is not as wide (in addition, I do not want to use mathabx package as I got compile error relating to fonts in some builds).               \documentclass[]{article}%     \usepackage{amsmath}      \usepackage{mathabx}  %causes problems sometimes     \begin{document}           $\bar{V}_H$            $\overline{V}_H$            $\widebar{V}_H$           \end{document}      I saw this question Can I get a \widebar without using the mathabx package? which I tried (even though I prefer a much simpler solution) but still I see large space gap as above. **question is** : Is there a `simple` Latex way to reduce the space to that similar to using \bar, but still have wide bar over the letter? Like the last image shown below (produced using my advanced skill using paint.exe on windows 7 by manually shifting the letter `H` over to the left to where I want it positioned) ![Mathematica graphics](http://i.stack.imgur.com/yfLET.png) Using texlive 2013 in Linux mint 16 (please give a simple solution if possible, nothing too advanced, as I am a newbie in Latex)


title: Hanging section - Memoir

text: I would like to obtain something like this: ![enter image description here](http://i.stack.imgur.com/uAWPc.jpg) So far I have this: ![enter image description here](http://i.stack.imgur.com/qoCs6.jpg) My MWE:               \documentclass[article]{memoir}     \usepackage{lipsum}          % Layout     \settrims{0pt}{0pt}       \settypeblocksize{562pt}{330pt}{*}     \setlrmargins{200pt}{*}{*}     \setulmargins{114pt}{*}{*}     \setheadfoot{12pt}{24pt}     \setheaderspaces{*}{24pt}{*}     \checkandfixthelayout          % Remove chapter number     \renewcommand*\printchapternum{}           % From p.96 - Memoir Manual      \newcommand{\marginbox}[1]{%     \parbox[t][0pt]{10em}{\upshape\sffamily\raggedright\mbox{} #1}}     \newcommand{\marginhead}[1]{%     {\llap{\marginbox{#1}\kern3em}}}     \setsecindent{0em}     \setaftersecskip{0em}     \setsecheadstyle{\marginhead}     \setaftersecskip{0em}     \setsechook{\setsecnumformat{\csname the##1\endcsname\ }}          \begin{document}     \chapter{Introduccion}          \section{Objeto}     \lipsum[4]          \section{Comitente}     \lipsum[4]          \end{document}      **UPDATE:** The options on memoir manual p.96 are for paragraphs. I changed them to sections. The line after the section number is not necessary, but I would like to get the section number, a line break and the section title like in the first image.


title: Cannot use Math template in TeXnicCenter

text: First of all, I just want to thanks the people of TeXnicCenter... great application... I am trying to use the math template in TeXnicCenter, When I compile it, it says missing `\begin{document}`. After googling, I realised that the enconding is the problem. The recommendation is to change the BOM. I cannot find this option in the editor, the question is how to make this work again. The extange thing is that it fails only using the template. If I type my own code, there is not problem.


title: Use WrapFig and FigBib at the same time?

text: Can I somehow combine the two of them? Or do I have to use `fbFloat`? If so, how to do it in a nice way? I want to have text around my image just like here, but at the same time I want to use `FigBib`. Any ideas? Thanks in advance :-)


title: Compile a pspicture under Emacs

text: I copied the solution from this link to a file `try.tex` under `Emacs`:               \documentclass{article}          \usepackage{pst-tree}          \begin{document}     Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem     ipsum.           \begin{figure}        \centering        \begin{pspicture}(5,-5)        \psgrid        \pstree{\Tcircle{ }}              {                \pstree{\Tr{ }}{\Tfan}                \pstree{\Tr{ }}{\Tfan}              }        \end{pspicture}        \caption{}     \end{figure}          Lorem ipsum. Lorem ipsum. Lorem ipsum.           \end{document}      Then I try to compile it with `C-c C-c` which is `LaTeX`, but it returns to me `ERROR: Undefined control sequence.` at the place of `\pstree`. Could anyone tell me how to compile and preview this picture from Emacs?


title: Issue compile command under Sublime

text: I'm trying to compile a `.tex` file under `Sublime3` (Build 3059) to no avail. I've installed the LaTeXTools package but if I use the `Ctrl+B` command `Sublime` attempts to compile the file as a `python` script:               [shell_cmd: python -u "/path_to_file/file.tex"]      Is there a way to link the `Ctrl+B` command in `Sublime` to the standard command?               pdflatex "%f" && bibtex "%e" && pdflatex "%f" && pdflatex "%f"


title: Package showexpl throws "Label ... multiply defined"

text: With the following MWE you will get a warning > >     Label lst:HalloWelt multiply defined. >   In the MWE I have added the calls for packages `showlabels` and `refcheck` to show the used labels and to check unused labels. Please just uncomment. As I see package `showexpl` (version 2012/09/22 v0.3j) causes this warning. How can I get rid of this warning? MWE:               \listfiles     \RequirePackage{filecontents}     \begin{filecontents*}{HalloWelt.ltx}     \documentclass{scrartcl}     \begin{document}     Hallo Welt!     \end{document}     \end{filecontents*}          \documentclass{scrartcl}     %\usepackage{showlabels}   % To check the used label      %\usepackage{refcheck}     % to check unused labels      \usepackage{varioref}     % difference with ref automaismn?      \usepackage{listings}      \lstloadlanguages{[LaTeX]TeX}           \usepackage[rframe=single]{showexpl}           \begin{document}          %\section{Test1}\section{Test2}              % no change of warning     %\subsection{subtest1}\subsection{subtest2}  % with or with not sections          The following macro throws the warning:      LaTeX Warning: Label lst:HalloWelt multiply defined.          \LTXinputExample[%       caption={Datei \texttt{HalloWelt.ltx}}      ,label={lst:HalloWelt}     ]{HalloWelt.ltx}          How to get rid of that warning?      This is a reference to listing~\ref{lst:HalloWelt}      and with varioref~\vref{lst:HalloWelt}.          \end{document}


title: Fancy cloud quote-Arithmetic overflow

text: I ws trying to make a fancy quote...(Any ideas?) I couldn't find annything, so I thought of using a cloud... My code is               \documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer}     \graphicspath{{images/}}     \definecolor{LHCblue}{RGB}{4, 114, 255}     \usecolortheme[named=LHCblue]{structure}     \usepackage[bars]{beamerthemetree} % Beamer theme v 2.2     \usepackage{kerkis}     \usepackage{multimedia}     \usepackage{subfigure}     \mode<presentation>     %frame     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%          \oldmacro\hfill%       \insertframenumber\,}%/\,\inserttotalframenumber     \setbeamertemplate{footline}[frame number]     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \setbeamercovered{higly dynamic}     \usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0     \useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top          \useinnertheme{circles} %rectangle bullet points instead of circle ones     \usepackage{beamerthemebars}     \setbeamercolor{navigation symbols dimmed}{fg=red!80!black}     \setbeamercolor{navigation symbols}{fg=red!80!black}     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}     \author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]        {Stamatopoulos N. Athanasios}     \institute{NTUA/CERN}     \logo{%       \makebox[0.99\paperwidth]{%         \includegraphics[width=1cm,keepaspectratio]{cern_logo_white.jpg}%         \hfill%         \includegraphics[width=1cm,keepaspectratio]{ntua-logo.jpg}%       }%     }          \usepackage{textpos}     \usepackage{tikz}     \usetikzlibrary{%     calc,%     fadings,%     shadings%     }          \usetikzlibrary{arrows,snakes,shapes}     %\usepackage{enumitem}     %\usepackage{paralist}             \begin{document}          \begin{frame}     %\begin{exampleblock}{}     %  {\large ``There is something rotten in the state of our detector.''}     % \end{exampleblock}          \begin{tikzpicture}             \node[align=center,color=gray!20, draw,fill=gray!20, text=red, cloud callout, cloud     puffs=20, cloud puff arc=145, callout pointer segments=0, anchor=pointer, callout relative     pointer={(0:5 cm )}, aspect=4,scale=0.5] at (0,0) {\textbf{\large ``There is something     rotten in the state of our detector.''}};     \end{tikzpicture}          \end{frame}%<------------error at that line          \end{document}      The thing is that I get an error stating that there is an arithmetic overflow. The cloud is produsecf, though. So my question has to do with `What is this arithmetic overflow` and `Any fancy quotes`?


title: Can epdf change pdf?

text: I want to edit PDF using the epdf library included in LuaTeX (add, bleed/crop/trim box). I can get current trim size of the PDF (if it's set) via epdf **PDFRectangle**. But I didn't find defined methods to set/change thees boxes. I know that epdf is still in a development stage, but maybe there are implemented (but not documented) methods? luatex version 0.74.


title: How can I flush text left in the cases environment?

text: I have the following code:               \documentclass{article}     \usepackage{amsmath, amssymb, amsthm, graphicx, textcomp}     \begin{document}     d^2(A,B)=\begin{cases}     (a_1-b_1)^2(1+m^2) &&\text{if $AB$ has slope $m$} \\     (a_2-b_2)^2 &&\text{if $AB$ is a vertical line}     \end{cases}     \end{document}      but I get this output: ![enter image description here](http://i.stack.imgur.com/Lgz5o.png) Is there a way to get the text on the right after the formulas, so that there are only two lines? Thanks.


title: How to make a lowercase month name with \today

text: All I wish to do is to use `\today` to output in the format "18 november 2013". With the datetime package I can get to "18 November 2013" with:                \documentclass[11pt,twoside,onecolumn,openany,final]{memoir}           \usepackage[nodayofweek]{datetime}           \newdateformat{mydate}{{\THEDAY}{ }\monthname[\THEMONTH] \THEYEAR}           \begin{document}           \mydate\today           \end{document}      but after that point I have been unable to have any success in making a lowercase month name. The closest I have been came by adding in the `\MakeLowercase` command here:               {{\THEDAY}{ }\monthname\MakeLowercase[\THEMONTH] \THEYEAR}      but that for some reason brings in numerals and ends up like this: > 18 November [11] 2013 Again, that still falls short of what I would like it to be. Is there a way to to bring in a lowercase command properly here so that for any given date output by `\today` the format is > 18 november 2013


title: Horizontal space in lists

text: What is the best way to change the amount of horizontal space in list environments? Examples:               1.############################ % Near the enumerated item - compacted horizontal space       ############################          2.############################       ############################          3.############################       ############################      and               1.     ############################ % Far from the enumerated item - stretched horizontal space            ############################          2.     ############################            ############################          3.     ############################            ############################


title: Insert pdf to the begining

text: Using pdfpages when I add a pdf like               \documentclass[10pt,twoside,draft]{book}     \usepackage{log}     \newfontfamily\dejavu{DejaVu Sans}          \begin{document}     %-----------------------------Cover Page----------------------------------------          \includepdf{Cover/cover}      it just prints 'Cover/cover' to the page (see the picture) picture: ![enter image description here](http://i.stack.imgur.com/1heMd.png) Thus, my question: How to solve this right?


title: latex figure (or table) in a new page

text: I'm curious what's the best way to get the table of figure to appear on the _next_ page in your document. I've tried the `\newpage` command, which works but is a hassle as I basically need to declare it before each figure and after each figure. I've also tried passing the environment the "`p`" command but then it puts in the end of the chapter, I just want it on the next page. Any help would be much appreciated!


title: Can't compile LaTeX document when glossaries package is used (fatal error)

text: I just followed the instructions for setting up TeXnicCenter to work with the glossaries package as described at latex-community.org. I am trying to create a list of acronyms, however, I will not be using them in text. My document looks like this:               \documentclass[bibtotoc,liststotoc,BCOR5mm,DIV12]{scrbook}     \usepackage[latin1]{inputenc}     \usepackage{graphicx}     \usepackage{url}     \usepackage{hyperref}     \usepackage{listings}     \usepackage{bold-extra}          \usepackage{array}     \usepackage{algorithmic}     \usepackage[acronym]{glossaries}          \graphicspath{{./Bilder/}}          \makeglossaries          \newacronym{lvm}{LVM}{Logical Volume Manager}          \input{hyphenation}          \begin{document}          % ---------------------------------------------------------------          \frontmatter     \include{./Titel/titel-lmu}     \thispagestyle{empty}     \cleardoublepage     \tableofcontents          % ---------------------------------------------------------------     \mainmatter     \input{chapter1}          % ---------------------------------------------------------------     \backmatter     \printglossaries     \listoftables     \listoffigures     \bibliographystyle{alpha}     \bibliography{./Bib/stud77}     \end{document}      When I try to compile, I get the following error.               )     ! Incomplete \iffalse; all text was ignored after line 126.     <inserted text>                     \fi     l.55   \input{chapter2}               The file ended while I was skipping conditional text.     This kind of error happens when you say `\if...' and forget     the matching `\fi'. I've inserted a `\fi'; this might work.          )     ! Incomplete \iffalse; all text was ignored after line 126.     <inserted text>                     \fi     <*> ...itung/stud77/Dokumentation/Latex/stud77.tex          The file ended while I was skipping conditional text.     This kind of error happens when you say `\if...' and forget     the matching `\fi'. I've inserted a `\fi'; this might work.          ! Emergency stop.     <*> ...itung/stud77/Dokumentation/Latex/stud77.tex          *** (job aborted, no legal \end found)      I actually get this error as soon as I add `\usepackage[acronym]{glossaries}` line to my document before anything else has been set up, too. I'm using MiKTeX 2.9. Does anyone know what's going on here?


title: Control start point of nested list

text: After stretching the list horizontally according to Horizontal space in lists, I've encountered a problem where the nested list items start too deep inside. How can I pull it back to the left where the parent item description starts?               1.    ############################           ############################               A. Nested item A          % <-- [Bad] Too deep               B. Nested item B               C. Nested item C          2.    ############################           ############################               A. Nested item A               B. Nested item B               C. Nested item C          3.    ############################           ############################           A. Nested item A             % <-- [Good] Pull it back to the left to start at the same starting point of the parent item description           B. Nested item B           C. Nested item C


title: Global change of notation

text: Consider the MWE below. In the first notation the superindex is higher than necessary since the lower end of the brackets is taken as reference point for the box in which the superindex is set. This is UGLY! Solution: use `\smash`. Is there any method how I can tell LaTeX (by some code in the preamble) that `$^{(N)}$` should be globally changed to `$^{\smash{(N)}}$`? Unfortunatelly, I discovered `smash` too late and the doc is too long now to do this manually.               \documentclass{article}     \begin{document}       $X^{(N)}_t$ vs $X^N_t$ vs $X^{\smash{(N)}}_t$     \end{document}      PS: Or is it bad LaTeX style to use `smash` too often? i suppose one had better interfere with LaTeX as little as possible: so is my aesthetic criticism of the notation without `smash` exaggerated?


title: minitoc - secttoc in reports

text: I have used the `minitoc` package for some times now. The `\minitoc` command works fine (with the `\dominitoc` before it). I tried to use secttoc, which does the same thing as `minitoc` but for sections, and I receive this error: > Package minitoc Error: E0037(minitoc) The \dosecttoc command is > incompatible(minitoc) with the document class. See the minitoc package > documentation for explanation and when looking at the `minitoc` documentation: > ...The document class should of course define chapters (styles like book or > report) or sections (styles like article)... Which conforms to the idea that I use the right type of document (`report`) for this application. What could the problem be?


title: hyperlink button in an exact position

text: I want to include a hyperlink button on a slide that is completely covered by a figure. If I do the following:               \begin{frame}[plain]     \begin{center}         \includegraphics[width=3in]{map}     \end{center}     \begin{flushright}         \hyperlink{inthispaper}{\beamerreturnbutton{Back}}             \end{flushright}     \end{frame}      the button will not appear on the slide. Is there an environment that allows the button to float on the slide? Or is there a way to set the position of the button exactly?


title: Adjust size and position of a PGFplots plot

text: I created a 2x2 array where each box contains a subfigure. For three subplots I use `\addplot3` from PGFplots with `colorbar` and in the other, a `\addplot`. Due to the use of `colorbar`, the symmetry of the four subfigures is broken. I would like to know if there is a way to rescale the unique plot such that it will align to the other 3 subfigures with `colorbar`. Here is an example of my code:               \documentclass[a4paper,12pt]{article}          \usepackage{pgfplots}     \usepgfplotslibrary{patchplots,colormaps}          \usepackage{subfigure}     \usepackage[a4paper]{geometry}     \usepackage{array}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}          \begin{document}     \subsection{First subsection}     \begin{figure}[htbp]     \hspace{-0.5cm}     \begin{tabular}{C{.48\textwidth}C{.48\textwidth}}      %%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \subfigure [Subfigure 1] {      \resizebox{0.5\textwidth}{!}{%       \begin{tikzpicture} %       \begin{axis}[view={0}{90}, %                    xlabel={$p$}, %                ylabel={Mean}, %                    title={Mean vs $p$}, %                    y filter/.code=\pgfmathparse{\pgfmathresult/400}, %                    colormap/autumn, %                    colorbar, %                    xmin=0, %                    xmax=0.1, %            ymin=0, %            ymax=1, %                   xticklabel style={/pgf/number format/.cd,fixed,precision=2}, %                   ] %       \end{axis} %      \end{tikzpicture}     }} &      %%%%%%%%%%%%%%%%%%%%%% 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 2] {      \resizebox{0.5\textwidth}{!}{%      \begin{tikzpicture} %       \begin{axis}[view={0}{90}, %                    xlabel={$p$}, %                ylabel={Mean}, %                    title={Mean vs $p$}, %                    colormap/cool,            colorbar,                    xmin=0,%                    xmax=0.1, %            ymin=0, %            ymax=1, %                    xticklabel style={/pgf/number format/.cd,fixed,precision=2}, %                   ] %       \end{axis} %      \end{tikzpicture}     }} \\     %%%%%%%%%%%%%%%%%%%%%% 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \subfigure [Subfigure 3] {      \resizebox{0.5\textwidth}{!}{%     \begin{tikzpicture} %       \begin{axis}[tiny,            xlabel={$p$}, %                ylabel={Mean}, %                    title={Mean vs $p$}, %            height=5.2cm, width=6cm,% improve scaling manually                    xmin=0,%                    xmax=0.1, %            ymin=0, %            ymax=1, %            only marks, %            mark size=0.1pt, %                    xticklabel style={/pgf/number format/.cd,fixed,precision=2},            ]        \end{axis}       \end{tikzpicture}      }} &      %%%%%%%%%%%%%%%%%%%%%% 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 4] {      \resizebox{0.5\textwidth}{!}{%      \begin{tikzpicture} %       \begin{axis}[view={0}{90}, %                    xlabel={$p$}, %                ylabel={Mean}, %                    title={Mean vs $p$}, %                    colormap/cool, %            colorbar, %                               xmin=0, %                    xmax=0.1, %            ymin=0, %                   ] %       \end{axis} %      \end{tikzpicture}     }} \\     \end{tabular}     \caption{Several options}     \end{figure}     \end{document}      Here is the result: ![](http://i.stack.imgur.com/YEjCg.png) Maybe it would be simpler to place the 3rd pgfplot a bit higher: ![](http://i.stack.imgur.com/GlONt.png)