title: Can't put header in text!

text: I'm trying to put a header but can't seem to figure out how. I've already following instructions for typesetting a header, to no avail. All the resources I've found on Google point to put something like this               usepackage{fancyhdr}               \pagestyle{fancy}          \fancyhf{}          \rhead{Share\LaTeX}          \lhead{Guides and tutorials}          \rfoot{Page \thepage}      Even though I don't get any error, the header won't show. I'm using a template, and the problem is probably there. Here is the structure:               \documentclass[a4paper,10pt]{article} % Default font size and paper size          \usepackage{fontspec} % For loading fonts     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font          \usepackage{xunicode,xltxtra,url,parskip} % Formatting packages          \usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors          \usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}     % To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}          \usepackage{hyperref} % Required for adding links   and customizing them     \definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document          \usepackage{titlesec} % Used to customize the \section command     \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections     \titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections          \usepackage{fancyhdr}          \pagestyle{fancy}     \fancyhf{}     \rhead{Share\LaTeX}     \lhead{Guides and tutorials}     \rfoot{Page \thepage}          \begin{document}          \pagestyle{empty} % Removes page numbering          \font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section          text          \end{document}      Any ideas?


title: Writing text above \cdots

text: My question is: How can I write an index above a set of dots? I mean               \mathbb{R} \cdots^{HERE} \mathbb{R}      just to say that I have "n" times cartesian product of R.


title: biblatex: Two .bib files with separate behavior in same document

text: I am having some trouble using `biblatex` with two bibliographies. I am using the following option:               \usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt, bibstyle=ieee, maxnames=5]{biblatex}     \nocite{*}     \addbibresource{bib1.bib}     \addbibresource{bib2.bib}      One bibliography I would like to insert in the middle of a document, with special sub-bibliography headings and special numberings. I have actually figured out how to do this, and it works fine. For example,               \printbibliography[heading=subbibliography,title={{\small Book Chapters}},type=incollection, keyword=DZ, prefixnumbers={B}]          \printbibliography[heading=subbibliography,title={{\small Journals}},type=article, keyword=DZ, prefixnumbers={J}]      gives me two sub-headings (Book Chapters and Journals), and under each headings the references are listed with special numberings (i.e. B1, B2, and J1, J2, etc...). It uses all the references in bib1.bib (the bib with keyword = DZ). This is exactly what I want. I would also like to include a "standard" bibliography at the end of the document using a different .bib file. I added keywords (keywords=noDZ) to try and make life easier, and then the `\printbibliography[keyword=noDZ]` line where I want the bibliography to appear. When I cite the article, it now displays the entire bib2 bibliography, and the numbering does not start at 1. I suspect I am not using `\nocite` correctly. I want the 2nd bibliography to start with [1], and only print references that were cited in the text. Any help would be great! [edit] Per request, here is a sample file closely reproducing what I described above (although now the inline reference reads **[2]** rather than name).               \documentclass{article}          \usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt, bibstyle=ieee, maxnames=5]{biblatex}     \nocite{*}          \begin{filecontents}{\jobname-bib1.bib}     @BOOK{hectic2000,       AUTHOR    = {Henry Hectic},       TITLE     = {How Horticulturalists Howl},       PUBLISHER = {Honorary Books: Henage},       YEAR      = {2000},       keywords={DZ}     }     @BOOK{hectic2001,       AUTHOR    = {Henry Hectic},       TITLE     = {How Horticulturalists Howl},       PUBLISHER = {Honorary Books 2: Henage},       YEAR      = {2001},       keywords={DZ}     }     @ARTICLE{Doe2009,     author = {Jon Doe},     journal = {Transactions on Stuff},     month = 03,     number = {3},     pages = {1--11},     title = {{Example 1}},     volume = {5},     year = {2009},     keywords={DZ}     }     \end{filecontents}          \begin{filecontents}{\jobname-bib2.bib}          @ARTICLE{Kim2012,     author = {Y Kim},     journal = {Transactions on Other Stuff},     month = 01,     number = {1},     pages = {1--11},     title = {{Example 3}},     volume = {5},     year = {2012},     keywords={noDZ}     }          @ARTICLE{Jane2010,     author = {Jane Doe},     journal = {Transactions on Stuff},     month = 01,     number = {1},     pages = {1--11},     title = {{Example 2}},     volume = {5},     year = {2010},     keywords={noDZ}     }     \end{filecontents}          \addbibresource{\jobname-bib1.bib}     \addbibresource{\jobname-bib2.bib}          \begin{document}     \section{My Bib}          \printbibliography[heading=subbibliography,title={{\small Book Chapters}},type=book, keyword=DZ, prefixnumbers={B}]     \printbibliography[heading=subbibliography,title={{\small Journals}},type=article, keyword=DZ, prefixnumbers={J}]               \section{Main Text}          Now I am citing \cite{Jane2010}.  I want new references.          \printbibheading               \printbibliography[keyword=noDZ]          \end{document}


title: How do I have all section titles, etc bold-faced, in ConTeXt?

text: I'm just experimenting with ConTeXt. At the moment, all my `\section` and `\subject` headings are appearing in large type. But I'd like them (and the `\section` numbers) all in bold-face. I've tried               \setuphead[textstyle=bold,numberstyle=bold] and               \setupheads[textstyle=bold,numberstyle=bold] but neither of these have any effect. Can anybody advise me on the simplest way of doing this?


title: Cases with square brackets

text: How can I subdivide in cases with square brackets? I mean I want to write:                             ⌈ 2_i        if ...     rank (q, l) = | 2_i + 1    if ...                   ⌊ ....      with square brackets, not braces.


title: Protrusion of fractions in tabulars

text: I have a number of tables in a book that I am busy with that have quite a few tables of the general form shown below: ![enter image description here](http://i.stack.imgur.com/XTaZl.png) If you notice the fractional part of the numbers 5 1/2 and 16 1/2 protrude to the right (the numbers are right justified). For this particular example, I achieved the result by adding a phantom character on all the figures except the fractional numbers, for example:                 &5280\z ...       &660\z ...       &$16\frac{1}{2}$ ...       ...      where, `\z` is defined as `\def\z{\phantom{0}}` **Any suggestions as to how to automate this?** The figures are all auto-generated by TeX. The input is only the first two rows. Based on this the rest of the numbers are calculated. Fractions are only displayed for numbers ending with 0.25, 0.5 etc..These are detected automatically, so I can add a kern if necessary. Tried this but did not look so good. Sorry for not posting a minimal as the code is too lengthy.


title: How to define a figure size so that it consumes the rest of a page?

text: Sometimes I don't need to have a specific picture size, but for layout reasons I would like to scale the image so that the rest of the page is filled. How can I achieve that?


title: Using [H] but with adjustable figure size

text: > **Possible Duplicate:**   >  How to define a figure size so that it consumes the rest of a page? I personally have a problem with letting LaTeX do _all_ the layout. Sometimes, where an image appears ends up being just fine. But other times, the image is far enough from the referencing text (ie on the next page) that the flow of the document is injured. I want to use the `[H]` specification from the float package, but I actually _don't_ care about the size of these images so much as I care about the placement. Anything from `0.3\textwidth` to `0.7\textwidth` would be fine with me. Is there a way to let LaTeX play with the _size_ of the image as a variable, while letting me dictate the placement?


title: Scale figure to remaining page height in ConTeXt

text: I have a page with some content on it and some remaining space at the bottom of this page.               |=========|     | header  |     |---------|     |         |     |  page   |     | content |     |         |     |---------|     |remaining|     |  space  |     |---------|     | footer  |     |=========|      I want to place figure which fit exactly in this remaining page space. Picture must be placed at the end of page without page breaking. `\externalfigure[fig][factor=fit]` does not work when height of picture is too high to fit in remaining space, and picture placed on next page.


title: Get remaining height on page (and scale image to it)

text: > **Possible Duplicate:**   >  How to define a figure size so that is consume the rest of a page? Hi all, I've seen How to compute the remaining space on the current page \- but that doesn't really address what I want to do. Say, I type, I type, and then I insert an image - and in a lot of cases I usually want to enter images "here"; and there seems to be some blank space on the bottom of the page. So I do :               ... blah blah blah....           \begin{figure}[h]     \centering     \includegraphics[width=0.8\textwidth]{../path/to/image.png}     \caption{Some caption here}     \label{fig:somelabel}     \end{figure}      ... and more often than note, image will take up more vertical space than what is remaining on page, and LaTeX will push it onto the next page, which I hate :) Because then, I have to manually change values, to `width=0.7\textwidth`, then `width=0.6\textwidth`, then `width=0.5\textwidth`, then `width=0.55\textwidth` \- each of these requiring a new recompile - to finally discover that it is for `0.55\textwidth`, that the height of the image is such, that it fits (along with caption) in the remaining bottom space of the page, and finally get the image where I want. Basically - what I'd like is some macro, so that instead of scaling the width as in `[width=0.8\textwidth]` \- I would scale the height according to remaining space, as in this (pseudo) example:               \includegraphics[height=0.9\RemainingVerticalSpaceOnPage]{../path/to/image.png}      ... which utilizes the (imaginary) `\RemainingVerticalSpaceOnPage` macro. So my question is: Does anything resembling this `\RemainingVerticalSpaceOnPage` exist? Thanks in advance for any answers,   Cheers!


title: Mathtools package won't work with my document class

text: I'd like to put in `mathtools`, specifically so that I can use the `multilined` environment. But it doesn't seem to want to work with the document class I'm using. (The amspset document class can be found here.)               \documentclass[reqno, 11pt, letterpaper, cm, unboxed]{amspset}     \usepackage{amsthm, amssymb, amsfonts}     \usepackage{mathtools}     \usepackage[in]{fullpage}          \name{Eric Auld}     \class{MATH 2200}     \assignment{Homework 1}     \duedate{April, 10}          \begin{document}          \begin{solution}{\textbf{1.} }           \end{solution}          \end{document}      This keeps resulting in an error (saying "ifpdf is already defineed"), and the culprit is mathtools. Any ideas? This relatively uncommon document class seems to have some problems, so if anyone has a better suggestion (maybe just `amsart`) for homework assignments, I am open to it. **Edit:** I tried `\let\ifpdf\relax` and ran into some problems               \documentclass[reqno, 11pt, letterpaper, cm, unboxed]{amspset}     \usepackage{amsthm, amssymb, amsfonts}     \usepackage[in]{fullpage}     \let\ifpdf\relax     \usepackage{mathtools}          % info for header block in upper right hand corner     \name{Eric Auld}     \class{MATH 2200}     \assignment{Homework 1}     \duedate{April, 10}          \begin{document}          \begin{solution}{\textbf{1.} }      \begin{align*}     \!\begin{multilined}[t]     e=mc^2     \end{multilined}     \end{align*}          \end{solution}          \end{document}      It doesn't seem to know the `multilined` environment.


title: How to circumvent ‘Option clash for package …’ error?

text: I use a package `foo` that requires a package `bar` with some options. Now, assume that I need `bar` to be loaded with a different set of options. Unfortunately, when I try to load `bar` myself I usually end up with an `Option clash for package bar` LaTeX error. Minimal example:               \documentclass{article}          \usepackage{filecontents}          \begin{filecontents}{foo.sty}     \ProvidesPackage{foo}     \RequirePackage[noisy]{bar}     \end{filecontents}          \begin{filecontents}{bar.sty}     \ProvidesPackage{bar}     \DeclareOption{noisy}{\PackageWarning{bar}{I'm noisy}}     \DeclareOption{silent}{\PackageWarning{bar}{I'm silent}}     \ProcessOptions*     \end{filecontents}          %% \usepackage[silent]{bar}          \usepackage{foo}          \usepackage[silent]{bar}          \begin{document}          \end{document}      What can I do?


title: How do I get mathematical fonts to Illustrator?

text: I am doing a thesis on graph theory, and I am currently drawing graphs with Illustrator. Vertexes and edges are easy to draw, but how about naming them? How do I get the symbols in image look like symbols in the text?


title: Used almost all alphabet symbols, what to use for summation indices now?

text: I have already used all the `a,b,c,d,g,i,j,k,l,m,n,p,q,r,t,v,w,\alpha,\beta` symbols, I wonder how to denote summation indices in my paper now? What would you use?


title: Issue with soul and nested macros

text: I'm using package `soul` to highlight text, for example with `\hl{some text}`. It works nicely in general, but when the text contains other macros, `soul` simply skips it. For example:               \usepackage{soul}     \newcommand{\removed}[1]{\st{#1}}     ...     \removed{Some articles by \cite{someauthor2013} support this view.}      turns out in the pdf as `Some articles by`, cutting the macro and all the subsequent text. The same happens with `\st` and all the other highlighting macros. Any fix to make the `removed` macro more robust, possibly without changing the input text? Thanks! **SOLUTION** : The following code solves the problem nicely.               \usepackage[normalem]{ulem}     \newcommand\reduline{\bgroup\markoverwith{\textcolor{red}{\rule[0.5ex]{2pt}{0.4pt}}}\ULon}     \newcommand{\removed}[1]{\reduline{#1}}     ...     \removed{This text by \cite{someauthor2013} will be rendered with a red line on it.}


title: Two pages per sheet brochure

text: I am looking for a package that helps to print two pages per sheet for a brochure. I have used leaflet class for printing three pages per sheet. Booklet package looks promising. But it doesnt work well. The first page when centralized goes out of page. The code is given below               \documentclass[letterpaper,12pt]{article}     \usepackage[print,twouparticle]{booklet}     \begin{document}     hello World     \newpage     From me     \newpage     Hi again     \newpage     \section*{{\small TECHNICAL SESSIONS}}     \subsection*{{\footnotesize DAY 1}}     \end{document}


title: Use the catchfile package to preprocess an input file character by character?

text: Is it possible to read a file using the `\CatchFileDef` or `\CatchFileEdef` commands from the `catchfile` package and then output its exact copy to another file? What about input and output encoding? Do `catchfile` and `filehook` play well with each other? If **yes** : The intention behind that is to convert spaces to newlines and add auxiliary information (moving towards Forward-inverse search using SyncTeX with the precison of a single word). How would a (La)TeX implementation of such a char-by-char analysis look like, and would it scale well for large files? I am looking for a solution that can be used with current `pdflatex`, perhaps `--shell-escape` with a small Perl script would perform just as well? I'm open to suggestions.


title: How to prevent getting a space after an abbreviation using the abbrevs package?

text: If I use the `abbrevs` package and define a \newabbrev using the following code               \newabbrev\gb{Great Britain}      and use it in the following example (taken from the xspace package documentation):               \gb, a small island off the coast of France      I get "Great Britain , a small island off the coast of France", which has a superfluous space inserted before the comma In the xspace package documentation, they also defines an abbreviation for "Great Britain", but using `\newcommand` instead of `\newabbrev`, and they are also having the problem with the superfluous space before the comma. They solve it by putting the macro `\xspace` after the full name, i.e. `Great Britain\xspace`. When I follow their example and redefine the abbreviation as               \newabbrev\gb{Great Britain\xspace}      it has the opposite effect, i.e., an _extra_ superfluous space is added before the comma (which I can't illustrate here). I have also tried to insert `\@` before `xspace` (which I found out you could do in this quite similar question), but that has no effect. Any idéa of how to prevent an abbreviation defined with `\newabbrev` to insert a space after the abbreviation has been used? The reason I'm using the `abbrevs` package is because it provides a way of using one expansion of the abbreviation the first time it is used, and another expansion the resting times. I could just as well change to some other package that allowed me to do the same thing.


title: \ddot{a} character for strings

text: I'm looking for the `\ddot{a}` character which doesn't require me to put it into a formula or between `$` characters. Can anyone help me, please? Thanks


title: siunitx in scrreprt - problems with beamer class

text: I want to use the usepackage `siunitx` for my thesis (`scrreprt`). MikTeX asks for installing the documentclass `beamer` each time when I compile my document (and then freezes while installing). When I cancel the installation of the beamer package, the document is compiled correctly and displays the correct number with SI unit. Here is a small example:               \documentclass[twoside]{scrreprt}     \usepackage{siunitx}     \begin{document}     \SI{5}{\micro\metre}     \end{document}      How can I avoid the installation message? It does not affect anything, it is just annoying. Thank you! `*File List*   scrreprt.cls 2012/07/29 v3.11b KOMA-Script document class (report)   scrkbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent basics and keyval usage)   scrbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent basics and keyval usage)   keyval.sty 1999/03/16 v1.13 key=value parser (DPC)   scrlfile.sty 2012/06/15 v3.12 KOMA-Script package (loading files)   tocbasic.sty 2012/04/04 v3.10b KOMA-Script package (handling toc-files)   scrsize11pt.clo 2012/07/29 v3.11b KOMA-Script font size class option (11pt)   typearea.sty 2012/07/29 v3.11b KOMA-Script package (type area)   siunitx.sty 2013/03/11 v2.5q A comprehensive (SI) units package   expl3.sty 2013/03/14 v4469 L3 Experimental code bundle wrapper   l3names.sty 2012/12/07 v4346 L3 Namespace for primitives   l3bootstrap.sty 2013/01/08 v4420 L3 Experimental bootstrap code   luatex.sty 2010/03/09 v0.4 LuaTeX basic definition package (HO)   infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)   ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)   etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)   luatex-loader.sty 2010/03/09 v0.4 Lua module loader (HO)   pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)   ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)   ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)   l3basics.sty 2013/01/10 v4428 L3 Basic definitions   l3expan.sty 2013/02/03 v4458 L3 Argument expansion   l3tl.sty 2013/01/08 v4415 L3 Token lists   l3seq.sty 2013/01/12 v4434 L3 Sequences and stacks   l3int.sty 2013/01/13 v4444 L3 Integers   l3quark.sty 2012/11/04 v4268 L3 Quarks   l3prg.sty 2013/02/13 v4459 L3 Control structures   l3clist.sty 2013/01/08 v4414 L3 Comma separated lists   l3token.sty 2013/01/10 v4428 L3 Experimental token manipulation   l3prop.sty 2013/01/09 v4423 L3 Property lists   l3msg.sty 2013/01/08 v4412 L3 Messages   l3file.sty 2013/01/14 v4446 L3 File and I/O operations   l3skip.sty 2013/01/13 v4444 L3 Dimensions and skips   l3keys.sty 2013/02/24 v4461 L3 Experimental key-value interfaces   l3fp.sty 2013/01/19 v4449 L3 Floating points   l3box.sty 2013/01/08 v4411 L3 Experimental boxes   l3coffins.sty 2012/09/09 v4212 L3 Coffin code layer   l3color.sty 2012/08/29 v4156 L3 Experimental color support   l3luatex.sty 2012/08/03 v4049 L3 Experimental LuaTeX-specific functions   l3candidates.sty 2013/03/14 v4468 L3 Experimental additions to l3kernel   xparse.sty 2013/03/12 v4467 L3 Experimental document command parser   amstext.sty 2000/06/29 v2.01   amsgen.sty 1999/11/30 v2.0   array.sty 2008/09/09 v2.4c Tabular extension package (FMi)   l3keys2e.sty 2013/03/12 v4467 LaTeX2e option processing using LaTeX3 keys   graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)   trig.sty 1999/03/16 v1.09 sin cos tan (DPC)   graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive   pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX   supp-pdf.mkii   siunitx-abbreviations.cfg 2013/03/11 v2.5q siunitx: Abbreviated units   ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions   ***********`


title: Skip \setsansfont if the font is not available

text: Is there a way to make `\setsansfont` conditional on the font being available, or to skip over that line if it gives an error? I'm using `fontspec` with XeLaTeX to use the TeX Gyre Heros font for a document, but I'd like to revert to the default font if that font isn't available, so that if someone else compiles the document but doesn't have that font installed, they get something that's readable, rather than just an error. A minimal example:               \documentclass{article}          \usepackage{fontspec}     \setsansfont{TeX Gyre Heros}          \begin{document}          {\sffamily blah}          \end{document}      **Update** : it was reported that this is a duplicate of "Check for missing fonts/characters in XeLaTeX?", but really that question concerns whether individual characters are available in a font or not. What I want to know is: can I test whether the whole _font_ is available or not, and go with the default if it's not available.


title: Too much vertical space after long section title using titlesec

text: I'm using `titlesec` to change the style of my section titles. Sometimes, when the title is long, but just short enough to fit on one line, some extra vertical spaces is add. The following MWE illustrates the problem:               \documentclass{book}     \usepackage[a4paper]{geometry}     \usepackage[explicit]{titlesec}          \titleformat{\section}[block]{\Large\normalfont\bfseries}{#1}{.5em}{}          \begin{document}       \section{This is a short title}       This is a paragraph.            \section{This is a purposely long title that shows some odd behavior}       This is a paragraph.     \end{document}      This is rendered as follows: ![enter image description here](http://i.stack.imgur.com/1sZ7m.png) Clearly, there is too much space below the second section title. I've played around with `\ignorespaces` and `\ignorespacesafterend`, but can't seem to get rid of the extra space. What to do?


title: Why this " (one symbol) works as one double quote as well

text: According all the tutorials I could found, I need to use               `` + ''    (two single quote symbol)      to produce the double quote. However, it seems that               `` + "     (one symbol)      works as well. Is this supposed to be? If so, why none of tutorials mention this?


title: Error using \usepackage{listings}

text: If I include the package `listings` I can't compile my document anymore. There is an error saying:               !No room for new \dimen.\ck ... \else \ermesage{No room...}     File: \latex\sueprtabluar\supertabular.sty      Is this enough information for anyone to help get it running, or maybe there is an other solution printing source code style?


title: Geometry Package - Layoutoffset: Distinction Between Odd and Even Pages Possible?

text: Currently I'm preparing a book for publishing. My printer wants a non- circumferential bleed around the pages, 0.125" at the top, bottom and outer side, but no bleed at the inner side. As far as I have seen until now, this is quite unusual, since a circumferential bleed is required normally. Starting from this standard case, let us assume a book with a width of 7" and a height of 10". A circumferential bleed of 0.125" may easily be added using the `geometry` package and its `papersize`, `layoutsize` and `layoutoffset` option:               \geometry{papersize={7.25in,10.25in}, layoutsize={7in,10in}, layoutoffset={0.125in,0.125in}, ...}      For the case of a circumferential bleed this will work fine; in addition, no changes to the layout will happen, because the `layoutsize` is fixed to 7" × 10" (which is the later trim size). My intention is to preserve the later layout of the book, regardless of on what kind of paper size it is printed (paper size > layout size, of course). This is important to me because I need to generate a digital version of the book with _exactly identical_ layout. But this won't work for a non-circumferential bleed, since -- as far as I know -- `layoutoffset` is not able to distinguish between odd and even pages. For each odd (left) page, I would need               \geometry{papersize={7.125in,10.25in}, layoutsize={7in,10in}, layoutoffset={0.125in,0.125in}, ...}      and for every even page:               \geometry{papersize={7.125in,10.25in}, layoutsize={7in,10in}, layoutoffset={0in,0.125in}, ...}      Thus, I would appreciate any help regarding a possibility of modifying the original `layoutoffset` option of the `geometry` package to distinguish between odd and even pages -- possibly by introducing two new package options `layoutoffsetodd` and `layoutoffseteven` to the `geometry` package (that would be the solution I'm most comfortable with; unfortunetely I'm not able by myself to do that). Thank you for your help in advance!


title: Comment package does not work in beamer

text: I want to use the `comment` package in my presentation. I read that it does not always work in some very complicated contexts, but here it fails even in a very simple example:               \documentclass{beamer}     \usepackage{comment}     \begin{document}     \begin{frame}     random text          \begin{comment}     hidden text     \end{comment}          \end{frame}      \end{document}      I can't find a solution for this problem in this site. Is there an incompatibility or am I missing something?


title: \ddot over greek letters

text: I have following usage requirement for `\ddot`. However, the output is not pleasing.               \ddot{\delta_0}   \ddot{w_0}      The double dots are getting centered about `\delta_0` and `w_0`. However, I feel it should have been good if the double dots centered about `\delta` and `w`. Your inputs are appreciated. Thanks!


title: How can I add square brackets for the authoryear biblatex bibliography style?

text: Due to some university requirements, I redefined the `biblatex` `citesytle` authoryear to use square brackets instead of round parentheses. Now I am trying to achieve the same for the `bibstyle`. My approach to this is to redefine the original style file, `authoryear.bbx`. This worked fine for the `citestyle`, which I am not repeating here because the styles work very differently. Reading the manual [ 1 ], I found out that (round) parentheses are put around fields using the command `\printtext[parens]{....}`. Here, the field `parens` is defined as `\DeclareFieldFormat{parens}{\mkbibparens{#1}}` [1, p. 268]. In analogy to this, I tried to define a new field `bracks` like so: `\DeclareFieldFormat{bracks}{\mkbibbrackets{#1}}` (see [1, p. 250]). My approach is now to replace the field `parens` by `bracks` everywhere in the associated style file, see the MWE below:               \documentclass{scrartcl}          \usepackage{filecontents}          \begin{filecontents*}{authoryearbrak.bbx}     \ProvidesFile{authoryearbrak.bbx}     [\abx@bbxid]          % authoryear styles are special in the following way:          % The citation labels are "labelname (labelyear)" and since citation     % labels are the keys into the references section, the fact that the     % citation uses labelyear means that the references must also. This     % means we use a special \printdate[extra]label macro to generate the     % references section main date for an entry. Otherwise, if labeldate selects     % anything other than DATE (or equivalently, YEAR/MONTH), then the     % citation won't match the reference.          % Addition!     % Add new field for square brackets     \DeclareFieldFormat{bracks}{\mkbibbrackets{#1}}          \RequireBibliographyStyle{standard}          \DeclareBibliographyOption{dashed}[true]{%       \ifstrequal{#1}{true}         {\ExecuteBibliographyOptions{pagetracker}%          \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}}         {\renewbibmacro*{bbx:savehash}{}}}          \DeclareBibliographyOption{mergedate}[true]{%       \ifcsdef{bbx@opt@mergedate@#1}         {\csuse{bbx@opt@mergedate@#1}}         {\PackageError{biblatex}            {Invalid option 'mergedate=#1'}            {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak             'true' (=compact), and 'false'.}}}          \providebibmacro*{date+extrayear}{}          \def\bbx@opt@mergedate@true{\bbx@opt@mergedate@compact}          \def\bbx@opt@mergedate@maximum{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{labelyear}           {}           {\printtext[bracks]{%              \printfield{issue}%          \setunit*{\addspace}%          \printdateextralabel}}}%       \renewbibmacro*{date}{}%       \renewbibmacro*{issue+date}{}%     }          \def\bbx@opt@mergedate@compact{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{labelyear}           {}           {\printtext[s]{\printdateextralabel}}}%       \renewbibmacro*{date}{}%       \renewbibmacro*{issue+date}{%         \iffieldundef{issue}           {}           {\printtext[bracks]{\printfield{issue}}}%         \newunit}%     }          \def\bbx@opt@mergedate@basic{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{labelyear}           {}           {\printtext[bracks]{%          \printfield{labelyear}%          \printfield{extrayear}}}}%       \renewbibmacro*{date}{%         \iffieldundef{month}           {}           {\printdate}}%       \renewbibmacro*{issue+date}{%         \ifboolexpr{           test {\iffieldundef{issue}}           and           test {\iffieldundef{month}}         }           {}           {\printtext[bracks]{%          \printfield{issue}%          \setunit*{\addspace}%          \printdate}}%         \newunit}%     }          \def\bbx@opt@mergedate@minimum{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{labelyear}           {}           {\printtext[bracks]{%          \printfield{labelyear}%          \printfield{extrayear}}}}%       \renewbibmacro*{date}{%         \ifboolexpr{           test {\iffieldundef{month}}           and           test {\iffieldundef{extrayear}}         }           {}           {\printdate}}%       \renewbibmacro*{issue+date}{%         \ifboolexpr{           test {\iffieldundef{issue}}           and           test {\iffieldundef{month}}           and           test {\iffieldundef{extrayear}}         }           {}           {\printtext[bracks]{%          \printfield{issue}%          \setunit*{\addspace}%          \printdate}}%         \newunit}%     }          \def\bbx@opt@mergedate@false{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{labelyear}           {}           {\printtext[bracks]{%          \printfield{labelyear}%          \printfield{extrayear}}}}%       \renewbibmacro*{date}{\printdate}%       \renewbibmacro*{issue+date}{%         \printtext[bracks]{%           \printfield{issue}%           \setunit*{\addspace}%           \printdate}%         \newunit}%     }          \ExecuteBibliographyOptions{labeldate,sorting=nyt,pagetracker,mergedate}          \DeclareFieldFormat{shorthandwidth}{#1}     \setlength{\bibitemsep}{0pt}          \DeclareNameAlias{author}{sortname}     \DeclareNameAlias{editor}{sortname}     \DeclareNameAlias{translator}{sortname}          \defbibenvironment{bibliography}       {\list          {}          {\setlength{\leftmargin}{\bibhang}%           \setlength{\itemindent}{-\leftmargin}%           \setlength{\itemsep}{\bibitemsep}%           \setlength{\parsep}{\bibparsep}}}       {\endlist}       {\item}          \defbibenvironment{shorthands}       {\list          {\printfield[shorthandwidth]{shorthand}}          {\setlength{\labelwidth}{\shorthandwidth}%           \setlength{\leftmargin}{\labelwidth}%           \setlength{\labelsep}{\biblabelsep}%           \addtolength{\leftmargin}{\labelsep}%           \setlength{\itemsep}{\bibitemsep}%           \setlength{\parsep}{\bibparsep}%           \renewcommand*{\makelabel}[1]{##1\hss}}}       {\endlist}       {\item}          \InitializeBibliographyStyle{%       \global\undef\bbx@lasthash}          \newbibmacro*{bbx:savehash}{%       \savefield{fullhash}{\bbx@lasthash}}          \newbool{bbx@inset}     \DeclareBibliographyDriver{set}{%       \booltrue{bbx@inset}%       \entryset{}{}%       \newunit\newblock       \usebibmacro{setpageref}%       \finentry}          \renewbibmacro*{author}{%       \ifboolexpr{         test \ifuseauthor         and         not test {\ifnameundef{author}}       }         {\usebibmacro{bbx:dashcheck}            {\bibnamedash}            {\usebibmacro{bbx:savehash}%             \printnames{author}%         \iffieldundef{authortype}           {\setunit{\addspace}}           {\setunit{\addcomma\space}}}%          \iffieldundef{authortype}            {}            {\usebibmacro{authorstrg}%         \setunit{\addspace}}}%         {\global\undef\bbx@lasthash          \usebibmacro{labeltitle}%          \setunit*{\addspace}}%       \usebibmacro{date+extrayear}}          \renewbibmacro*{editor}{%       \usebibmacro{bbx:editor}{editorstrg}}     \renewbibmacro*{editor+others}{%       \usebibmacro{bbx:editor}{editor+othersstrg}}     \newbibmacro*{bbx:editor}[1]{%       \ifboolexpr{         test \ifuseeditor         and         not test {\ifnameundef{editor}}       }         {\usebibmacro{bbx:dashcheck}            {\bibnamedash}            {\printnames{editor}%         \setunit{\addcomma\space}%         \usebibmacro{bbx:savehash}}%          \usebibmacro{#1}%          \clearname{editor}%          \setunit{\addspace}}%         {\global\undef\bbx@lasthash          \usebibmacro{labeltitle}%          \setunit*{\addspace}}%       \usebibmacro{date+extrayear}}          \renewbibmacro*{translator}{%       \usebibmacro{bbx:translator}{translatorstrg}}     \renewbibmacro*{translator+others}{%       \usebibmacro{bbx:translator}{translator+othersstrg}}     \newbibmacro*{bbx:translator}[1]{%       \ifboolexpr{         test \ifusetranslator         and         not test {\ifnameundef{translator}}       }         {\usebibmacro{bbx:dashcheck}            {\bibnamedash}            {\printnames{translator}%         \setunit{\addcomma\space}%         \usebibmacro{bbx:savehash}}%          \usebibmacro{translator+othersstrg}%          \clearname{translator}%          \setunit{\addspace}}%         {\global\undef\bbx@lasthash          \usebibmacro{labeltitle}%          \setunit*{\addspace}}%       \usebibmacro{date+extrayear}}          \newbibmacro*{bbx:dashcheck}[2]{%       \ifboolexpr{         test {\iffieldequals{fullhash}{\bbx@lasthash}}         and         not test \iffirstonpage         and         (            not bool {bbx@inset}            or            test {\iffieldequalstr{entrysetcount}{1}}         )       }         {#1}         {#2}}          \newbibmacro*{labeltitle}{%       \iffieldundef{label}         {\iffieldundef{shorttitle}            {\printfield{title}%             \clearfield{title}}            {\printfield[title]{shorttitle}}}         {\printfield{label}}}          \endinput     \end{filecontents*}          \begin{filecontents*}{bibliography.bib}     @BOOK{Cornelisse1979,       author = {Cornelisse, J. W. and Schöyer, H. Ferry R. and Wakker, Karel F.},       title = {Rocket Propulsion and Spaceflight Dynamics},       year = {1979},       publisher = {Pitman},     }     \end{filecontents*}          \usepackage[bibstyle=authoryearbrak, citestyle=authoryear,%         backend=biber,]{biblatex}           \addbibresource{bibliography.bib}          \begin{document}          \autocite{Cornelisse1979}          \printbibliography          \end{document}      Sadly, this does not work, as the following screenshot demonstrates: ![The brackets are missing around the year \[1979\].](http://i.stack.imgur.com/Pykjd.png) The brackets are missing altogether. It should say [1979]. For the default `authoryear` style it would say (1979). Where is this going wrong? How can I fix this, in order to get square brackets instead of round parentheses around the year? [ 1 ] — http://archive.cs.uu.nl/mirror/CTAN/macros/latex/contrib/biblatex/doc/biblatex.pdf * * * _Rationale for square brackets:_ Parenthesis typically indicate small additions or afterthoughts. Citations, however, are something entirely different, and thus deserve a special notation. This is also consistent with the pure numbering style that is sometimes used, e.g. [23] to indicate reference 23.


title: can't get multiple lines with tikz-qtree package

text: I am using the following code to draw a fairly simple tree. The problem is that the line break commands are being ignored although I have found a number of examples on the net that show that they should work. What I am getting is the figure below. I am not sure where my problem is and would appreciate any help.               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}     \begin{tikzpicture}     \tikzset{level distance=40pt, sibling distance=10pt}          \Tree [. {MapReduce Join \\ Implementations}          [.{Equi-join}              [.{Repartition Join} ]             [.{Semijoin} ]              [.{Map-only Join}                  [.{Broadcast join} ]                 [.{Partition join} ]              ]          ]          [.{Similarity join} ]         [.{Multi-way join}              [.{Multiple \\ MapReduce \\ jobs} ]             [.{Replicated join}  ]          ]      ]     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Jhk8S.jpg)


title: Define spec symbol glyph's Unicode

text: Suppose I have:               \documentclass{article}     \begin{document}     $1 \cdot{1}$     \end{document}      I want to know the glyphs' Unicode for cdot special symbol. I followed such way. I've run `latex` command on my *nix system and perform such command               \show\cdot      after that I see               \cdot=\mathchar"2201.      But that is wrong Unicode for CENTERED DOT character. How can I determine the mapping rules from 2201 to Unicode?


title: Difference between latex-dvips and pdflatex - resolutions

text: The answer to a previous question — hyperref url breaking — has got me puzzled. If you take the example code of the accepted answer and use `pdfborder={0 0 10}` (instead of 100), two things will happen:   * with `latex test.tex && dvips test.dvi && ps2pdf test.ps`, the resulting document will have a border that's "right"   * with `pdflatex test.tex` however, one gets a big blob of the link color, generally cyan (texlive). Can one say what is causing this? The linked thread mentions a `-Ppdf` option though I am not sure what that entails. Is it perhaps that the link border is a bitmap rather than a vector?


title: Specifying a domain and pgfplots

text: I'm making a graph with `pgfplots` with a specific domain, but the graph's domain (both x and y) are not changing. I'm reading through the pgfplots manual and I think I'm doing the right thing except that it's not working. Here's my code:               \documentclass{article}     \usepackage{tikz,pgfplots}          \begin{document}          \begin{tikzpicture}       \begin{axis}[xlabel=$\mathrm{\frac{1}{[S]}}$,ylabel=$\mathrm{\frac{1}{\textit{V}_0}}$]       \addplot+[scatter,domain=-100:10000,y domain=-0.05:0.05] coordinates {         (10000, 0.030)         (5000, 0.02)         (2000, 0.014)         (1000, 0.012)         (500,  0.0110)         (200,  0.0104)         (100,  0.0102)         (50,   0.010)         (20,   0.01)         (10,   0.01)         (5,    0.01)        };            \end{axis}     \end{tikzpicture}          \end{document}


title: Selecting fontsize in B5 book

text: I used               \documentclass[twocolumn]{book}     \usepackage[top=1.5cm, bottom=1.5cm, left=2cm, right=2cm]{geometry}      to make A4 paper size book and then join two A4 pages to one A4 page landscape (that created two A5 papers). The fontsize after joining two pages into one was quiet suitable. I would like to use B5 paper size               \documentclass[b5paper,twocolumn]{book}      but now I would like to specify directly the fontsize, that would be suitable and comparable to the fontsize that would be created by joining two B4 pages into one B4 page.


title: Opposing alignment of multiple lines of long text without exceeding \linewidth

text: I'm trying to create some documents using the flashcards macros, and I'd like to have the text aligned like follows                   ____________________________________        |                                    |        | A string      An Xtra long string  |        | B string                 C string  |        | An Xtra long string 2    D string  |        |                                    |         ------------------------------------      I tried using the `tabular*` environment, which seems quite suitable, used as follows:               \begin{tabular*}     A string               & An Xtra long string \\     B string               & C string \\     An Xtra long string 2  & D string     \end{tabular*}      Unfortunately the result overflows horizontally, something like this:                   ____________________________________        |                                    |        | A string               An Xtra long string        | B string                          C string        | An Xtra long string 2             D string        |                                    |         ------------------------------------      So I've tried using `makebox`, like this:               \makebox[.48\linewidth][l]{A string}      \makebox[.48\linewidth][r]{An Xtra long string} \\     \makebox[.48\linewidth][l]{B string}      \makebox[.48\linewidth][r]{C string} \\         \makebox[.48\linewidth][l]{An Xtra long string 2}      \makebox[.48\linewidth][r]{D string}      But this results in too much vertical padding, something like this:                    ____________________________________         |                                    |         | A string      An Xtra long string  |         |                                    |         | B string                 C string  |         |                                    |         | An Xtra long string 2    D string  |          ------------------------------------      Which is also not the desired result. I think (hope) I've clearly demonstrated the outcome I desire. So far I've been mucking about, but I suspect there's a relatively easy way to accomplish this. I would be grateful for any feedback or suggestions that you think may be of assistance.


title: subsection vs Theorem

text: This a typographical/style question. Inside a subsection (after just one paragraph) I have some theorems (`amsmath` environment). The word Theorem looks stronger (bold, starting with a capital letter) than the heading of the subsection, which is also bold and capitalized but it comes after the number of the subsection, which is not in bold. In a review the referee didn't understand that the subsection continues beyond the Theorem and I am guessing this typographical issue is the reason. Do you have some neat idea of how to solve this with some stylistic modification? **Edit:** For example, a section probably won't suffer the same problem because the heading for a section appears centered, displayed in its own line. With subsections the heading of the subsection appears at the beginning of the sentence in the first paragraph of text from the subsection. **Edit 2:** It is pretty clear that a section or subsection doesn't end until you find the next heading of a part of the paper of equal or higher hierarchy and the reader should just follow this rule. My question is about making stylistic choices to make this foolproof, so that it is the shapes in the text what tells you the subsection hasn't ended and not the brain reading the actual content of the text.               \documentclass{amsart}     \newtheorem{theorem}{Theorem}     \begin{document}     \section{Section one} Here goes a lot of text from the beginning of this section. And it goes on and on and on...     \subsection{Subsection}     A little paragraph beginning the subsection. This paragraph has around three lines of text. It gives a few ideas about what the subsection is going to be about etc.     \begin{theorem}     Statement of the theorem. The statement is not too long but it is not short either.     \end{theorem}     And then the subsection continues as it is expected since no other section or subsection or part of the document has appeared yet. It just happens that the heading of the Theorem is disruptive.     \end{document}


title: Replacing ampersands in argument

text: I am trying to define a command which takes as an argument a string containing ampersands, and replaces every ampersand by a space. Following the ideas in Replacing characters in argument strings, I defined my command as follows:               \DeclareRobustCommand\colvec[1]{%         \saveexpandmode\expandarg         \StrSubstitute{\noexpand#1}&\ [\vectorentries]%         \restoreexpandmode[\vectorentries]^T}      This works great, except in `align` environments, where the ampersands get recognized as column markers and latex gets confused. How should I fix my code to work in `align` environments as well? Here is a minimum-non-working-example:               \documentclass{article}          \usepackage{xstring}     \usepackage{amsmath}          \DeclareRobustCommand\colvec[1]{%         \saveexpandmode\expandarg         \StrSubstitute{\noexpand#1}&\ [\vectorentries]%         \restoreexpandmode[\vectorentries]^T}          \begin{document}          \begin{align}     x = \colvec{3 & 3}     \end{align}          \end{document}


title: Is it possible to split the bibliography into two different parts using BibTeX type definitions?

text: I have quite a lot of bibliography entries and I have to separate normal entries (e.g. `@book`, `@article`, etc.) from internet entries (`@misc`) due to formal requirements of my university. I know it's somehow possible to do this using `biblatex`:               \chapter*{Bibliography}     \defbibheading{b}{\section{Books}}     \defbibheading{i}{\section{Internet}}     \printbibliography[heading=b,keyword=book]     \printbibliography[heading=i,keyword=internet]      I currently have a document of around 80 pages and I dont want to switch if possible. Are there any known approaches for BibTeX to do this?


title: Globally redefining 1 pt to 1/72 in (PostScript point) and other similar changes

text: ## Introduction **TeX point** (`1 pt` in TeX) equals **1/72.27 in** (= 2540/7227 mm ≈ 0.35145980351 mm). Quoting part of Traditional American point system section from Wikipedia's Point (typography) entry: > In 1886, the Fifteenth Meeting of the Type Founders Association of the > United States approved the so-called Johnson pica be adopted as the official > standard. This makes the traditional American printer’s foot measure 11.952 > inches (303.6 mm), or 303.5808 mm exactly, giving a point size of > approximately 1⁄72.27 of an inch, or 0.3515 mm. > > This is the size of the point in the TeX computer typesetting system by > Donald Knuth, which predates PostScript slightly. Thus the latter unit is > sometimes called the TeX point. **PostScript point** (`1 bp` in TeX) equals **1/72 in** (= 127/360 mm = 0.352(7) mm). It is commonly used unit in DTP nowadays. **Didot point** (`1 dd` in TeX, where it equals `1238/1157pt` = 3144520/8361639 mm ≈ 0.37606502744 mm) is other unit that AFAIK doesn't have one (used everywhere) definition. Historically it is 1/864 of _pied de roi_ (the king's foot; _French Royal foot_ , defined in 1799 as 9000/27706 m), i.e. 125/332472 m = 15625/41559 mm (= 3^(-1)×5^6×7^(-1)×1979^(-1) mm), but in practice becoming 0.3759715104 mm (i.e. slightly more). Other definitions:   * 1/72 of a French Royal inch (27.07 mm) = **2707/7200 mm** = 0.37597(2) mm,   * definition used by Hermann Berthold and others: **0.376 mm** ,   * defined in 1879: **1/2660 m** = 0.(375939849624060150) mm,   * _German Didot point_ defined in 1954: **0.376065 mm** ,   * defined in 1973 by EU: **3/8 mm** = 0.375 mm. Beyond points there are:   * _pica_ (`1 pc` in TeX, where it equals `12pt`) = 1/72 ft = 1/6 in = 12 points,   * _cicero_ (`1 cc` in TeX, where it equals `12dd`), also called French pica = 1/72 FRft = 1/6 FRin = 12 Didot points,   * and other point-related units, thankfully not available in TeX. As you can see, subject of measurement in typography is not that easy. I only tried to give some basic information. ## Question Is it possible to redefine globally in TeX basic units of measure like `pt` (e.g. as `1/72in`) and `dd` (e.g. as `0.376mm`)? If yes, can you show how and explain why such fixes are (usually?) not performed in Europe? Maybe they deserve their own package? ### Supplementary question Where is `pt` (and other units available in TeX) hardcoded within TeX or other parts of TeX toolchain? (I tried to quickly grep `\<pt\>` in svn://tug.org/texlive/trunk/Build/source/texk/web2c, but somehow did not recognized sought part in results.)


title: Beamer Bug: subsubsections are missing in ToC

text: For a large lecture (600+ slides) I need ToC slides that show the ToC only for the current section, including all subsections **and subsubsections**. However, apparently this does not work. When I pass the `sections={<number>}` option to `\tableofcontents`, the result is a ToC that shows all subsections, but only the subsubsections of _one_ subsection. In the MWE this is always the content of the first subsubsection, but in my larger lecture slides document, it is (for whatever reason) always the second subsubsection. When I remove the `sections` option, everything works as expected. Is this a bug? (I have tried beamer version 3.10. as well as the recent version 3.17)               % def\beamer@version{3.10}     \documentclass{beamer}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}          \newcommand\InsertToC[1][]{       \begin{frame}{Outline}         \tableofcontents[subsectionstyle=show/show/show, subsubsectionstyle=show/show/show, #1]       \end{frame}     }          \begin{document}          \section{Lecture 1}          \InsertToC[sections={\thesection}]  % shows only subsubsections of one subsection     \subsection{Topic 1}     \subsubsection{Motivation}     \subsubsection{Conclusion}     \frame{Stuff}          \subsection{Topic 2}     \InsertToC                         % shows subsubsections of all subsections      \subsubsection{Motivation}     \subsubsection{Conclusion}     \frame{Stuff}          \end{document}      Output of `\tableofcontents` with `sections` option (unexpected): ![enter image description here](http://i.stack.imgur.com/ucpDx.gif) Output of `\tableofcontents` without `sections` option (expected): ![enter image description here](http://i.stack.imgur.com/Hf3Iv.gif)


title: Using Biber with latexmk

text: With version 4.22, latexmk claims to > [s]upport the use of biber (with the biblatex package) as an alternative to > bibtex for generating bibliographies, with automatic determination of > whether to use bibtex or biber. I decided to give it a go. I'm using Windows 7, Strawberry Perl, MiKTeX 2.8 (including latexmk 4.22b), Biber 0.7.3 (registered in the PATH environment variable) and TeXworks r.670 (which includes settings for latexmk). Result: While latexmk generally seemed to work fine, it always called BibTeX as bibliography backend even when the preamble of my LaTeX file embodied `\usepackage[backend=biber]{biblatex}`. (In contrast, Biber works fine under texify, the MikTeX equivalent to latexmk.) At first, I thought that I had missed something obvious (I'm still open for the possibility), but then I looked at `latexmk.pl`. Here are code lines 4204--4207:                   my $bib_program = 'bibtex';         if ( exists $generated_log{"$bbl_base.bcf"} ) {             $bib_program = 'biber';     }      So Biber should be called if some condition involving a bcf-file (biblatex/Biber control file) is satisfied. In a copy of `latexmk.pl` in my local texmf tree, I replaced the above code with a test for the existence (or so I think) of said bcf-file:                   my $bib_program = 'bibtex';         if ( -e "$bbl_base.bcf" ) {             $bib_program = 'biber';     }      Result: The modified latexmk correctly determines when to use Biber instead of BibTeX. (When switching from Biber to BibTeX, remnant bcf-files must be deleted manually.) So: Have I discovered a bug in latexmk 4.22b or have I missed something obvious involving my system/TeX distribution/editor? EDIT: To make my question more focussed: I'm interested to hear if other users of latexmk observe the same behaviour (latexmk never calling Biber). If so, I'd be happy if someone suggested a solution that -- unlike my "quick fix" -- doesn't involve redundant Biber runs. EDIT 2: Herbert pointed out that Perl may behave differently in Windows vs. Linux. I will report my observations to the author of latexmk after the end of the bounty period; I'm still interested in reports from other users.


title: How to break long url in an item

text: I have an enumerate. In an item I have a long url. I use the package breakurl and it works fine outside the enumerate but not in the item.               \usepackage[margin=3cm]{geometry}     \usepackage{hyperref}     \usepackage{breakurl}     \begin{enumerate}     \item svn co \burl{https://svn.xxx.ch/reps/yyyyyyyyyy/Publications/ABC-paper-2012/trunk ABC-paper-2012}     \end{enumerate}      How should I do to break the url ? EDIT: If I remove the margin at 3cm it actually works. It seems to be an interaction between geometry and breakurl


title: How to expand summation notation on both sides of equal sign

text: I think you get what I am trying to do, but I dont know how to align the equal signs the entire way down and still have the vertical ellipses.               Assume $\displaystyle \sum_{i=1}^{n}\alpha _{i}^{i}=\sum_{i=1}^{n}\beta _{i}^{i}$ for $j=1,\ldots,k-1$.  By definition,     \begin{align}      \alpha_{1}+\alpha_{2}+\ldots+\alpha_{n} &= \beta_{1}+\beta_{2}+\ldots+\beta_{n}\\      \alpha_{1}^2+\alpha_{2}^2+\ldots+\alpha_{n}^2 &= \beta_{1}^2+\beta_{2}^2+\ldots+\beta_{n}^2\\     \vdots+\vdots+\ldots+\vdots &= \vdots+\vdots+\ldots+\vdots\\     \alpha_{1}^{k-1}+\alpha_{2}^{k-1}+\ldots+\alpha_{n}^{k-1}&= \beta_{1}^{k-1}+\beta_{2}^{k-1}+\ldots+\beta_{n}^{k-1}     \end{align}


title: Filling intersections of polynomials and other shapes

text: I'm trying to re-create a diagram from a textbook, which has various regions defined by polynomials. Ideally I'd like to fill them with the correct colours, to match the text that goes with it. While I can create and fill the five 'shapes', I'm so far unable to fill the remainder of the background, without also re-filling the other regions (with the exception of the central circle). Is there an (easy) way to do this? Or do I need to re-think the diagram entirely?               \documentclass[tikz,border=12pt,svgnames]{standalone}          \begin{document}     \begin{tikzpicture}[line cap=round,line join=round,x=0.5cm,y=0.5cm,thin,samples=100,fill opacity=0.5]     \draw[help lines,step=0.5cm] (0,0) grid (14,8);     \draw[fill=red,domain=0:5] plot(\x,{-(1/3)*(\x+1)*(\x-5)}) |- (5,0) -- (0,0) -- cycle;     \draw[fill=Green,domain=10:14] plot(\x,{((\x-12)^3)/4+2}) |- (14,0) -- (10,0) -- cycle;     \draw[fill=Blue,domain=0:4] plot(\x,{((\x-2)^3)/4+6}) |- (4,8) -- (0,8) -- cycle;     \draw[fill=black,domain=9:14] plot(\x,{(\x-9)*(\x-15)/3+8}) |- (14,8) -- (9,8) -- cycle;     \draw[fill=Green,domain=9:14] (7,4) circle (3);     \draw[fill=pink,even odd rule,domain=9:14] (0,0) rectangle (14,8) (7,4) circle (3);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Nhcly.png)


title: How to enable line breaking in the standard proof environment with amsmath?

text: I want to redefine the `proof` so it accepts linebreaks in the name               \renewenvironment{proof}[1][\proofname]{\par       \pushQED{\qed}%       \normalfont \topsep6\p@\@plus6\p@\relax       \trivlist       \item[\hskip\labelsep             \itshape         #1\@addpunct{.}]\ignorespaces     }{%       \popQED\endtrivlist\@endpefalse     }      However, I can't find a solution. I want the exact same behavior with that environment, but, so I can write long lines in the name (the optional argument). Is it possible? How? MWE               \documentclass{scrartcl}     \usepackage{amsthm}     \begin{document}     \begin{proof}[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]         Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \end{proof}     \end{document}


title: Drawing the projection of a vector on the other

text: I want to draw this simple figure and I need some help.![enter image description here](http://i.stack.imgur.com/CXXub.png)


title: Multipage tables (column-wise)

text: > **Possible Duplicate:**   >  Table and multi-page I have a table with a lot of sideways content. Like the following table:                          A  B  ...  X    Y   Z     Entry 1         Entry 2     Entry 3      The table however is too long to fit on one page. How can I format the table as following                           A  B  C  D  E  F     Entry 1         Entry 2     Entry 3     ---- Page Break ----                ...       X  Y  Z     Entry 1         Entry 2     Entry 3      I know that there is a package `longtable` that does the same thing but over the rows. (Repeating the headers). However in this case it is preferable that the output is in the way as described. There is also a package `sidewaystables`, but there are too many columns to fit the page even sideways.


title: Is there a "widetable" counterpart to "longtable"?

text: > **Possible Duplicate:**   >  Table and multi-page I have some tables with 25 columns that don't fit on the page, even after rotating with `sidewaystable`. I know about `longtable` but what I would need is `widetable`. Does it exist? I have also seen solutions with `\mbox`, but that's a bit hackish for me. I generate these tables with some general R code I have (general in that in most cases it's not taking 25 columns), so I can always go back and make it more robust if some `widetable` package doesn't exist. Thanks!


title: Why six \noexpand in a row?

text: Trying to understand TeX's rules for parsing dimensions, I came up with the following weird behaviour:               \dimen0=1\noexpand\noexpand\noexpand\noexpand\noexpand\empty pt      is valid, but               \dimen0=1\noexpand\noexpand\noexpand\noexpand\noexpand\noexpand\empty pt      yields               ! Illegal unit of measure (pt inserted).     <to be read again>                         p     <to be read again>                         t     <*> ...oexpand\noexpand\noexpand\noexpand\empty pt          ?       What causes the difference?


title: Bold claim environment through local layout in LyX

text: I would like to create a new bold "Afirmação" ("Claim" in portuguese) environment through "Local Layout" in LyX (I don't want to create a new layout file). So I went to Document -> Settings -> Local Layout and copied the following code:               Style AfirmaçãoBold     CopyStyle             Theorem     LatexName             afirmacao     LabelString           "Afirmação \theafirmacao."     Preamble       \theoremstyle{plain}       \newtheorem{afirmacao}[thm]{\protect\afirmacaoname}     EndPreamble     LangPreamble       \providecommand{\afirmacaoname}{_(Afirmação)}     EndLangPreamble     BabelPreamble       \addto\captions$$lang{\renewcommand{\afirmacaoname}{_(Afirmação)}}     EndBabelPreamble     End      I got the environment formatted the way I wanted, but the enumeration is not right. I am using "Theorems (AMS, numbered by type)" and "Theorems (AMS- extended, numbered by type)" modules. This is what I got: ![Output](http://i.stack.imgur.com/ltW3w.png) This is the first "AfirmaçãoBold" environment in the document, but I got it numbered 3. Maybe this has something to do with the fact that the numbered environment before it is a "Lemma 3". How can I make an independent numbering for it, so it can start from 1? Also, how can I get the option to use "AfirmaçãoBold*", that is, how can I have the option not to number it at all? (I would like to have both options to choose). Thanks very much!


title: Mix value and key/value with xparse

text: Following an earlier question I switched to `xparse`. Now I am sitting in a compatibility trap and try to allow old and new stuff at the same time. The point of origin is the infamous macro with two optional arguments. My minimal example is:               \documentclass{minimal}          \usepackage{xparse}          \NewDocumentCommand \sidenotetext { o o m } {%     (#1), (#2), #3     }%          \begin{document}     \sidenotetext{arg} % case (1)          \sidenotetext[1]{arg} % \sidenotetext[mark=1]{arg}; case 2          \sidenotetext[][]{arg} % case 3          \sidenotetext[][2]{arg} %\sidenotetext[offset=2]{arg}; case 4          \sidenotetext[3][]{arg} %\sidenotetext[mark=3]{arg}; case 5          \sidenotetext[4][5]{arg} %\sidenotetext[mark=4,offset=5]{arg}; case 6      \end{document}      Is it possible to make the left and the right macros (commented out) work at the same time? If not, Is it possible at all to make case 2 work, i.e. no key always means mark and the rest is key value? I assume, l3keys is the right choice to play nice with xparse?


title: Providing optional key without value

text: I would like to prepare a macro with an optional argument like `[wide]`, using `xkeyval`. (something whether to use `\figure` or `\figure*` inside) My test program below presents the output > test0=false test1=false test2=false test3=false test4=false What do I wrong? It seems to me that the default case stays valid in all use cases. Also, I an not sure it is the right tool to do what I want. The `xkeyval` documentation states that if no equals sign is present, an error will normally be raised. My test program does not make so. Also, I do not want to use something like `[wide=]`.               \documentclass{report}     \usepackage{xkeyval}     \makeatletter     \define@key{METest}{wide}{\def\pb@wide{#1}}     \setkeys{METest}{wide=false}%     \newcommand\METest[2][]{        \begingroup%             #2=\pb@wide \        \endgroup%     }     \makeatother          \begin{document}     \METest[]{test0}     \METest[wide]{test1}     \METest[wide=]{test2}     \METest[wide=true]{test3}     \METest[wide=false]{test4}     \end{document}


title: Incollection with apacite: year and publisher are not shown

text: I'm using TeXstudio and MiKTeX 2.9, and cite using natbibapa and apacite. My incollection entries from bibtex are not built correctly: year, booktitle and publisher are missing. input bibtex:               @incollection{aikhenvald2003,       title={{Evidentiality in Tariana}},       author={Aikhenvald, Alexandra Y},       editor={Aikhenvald, Alexandra Y and Dixon, R.M.W.}       booktitle={Studies in Evidentiality},       pages={131-164},       year={2003},       publisher={John Benjamins Publishing Company}     }          @incollection{plungian2010b,       author      = {Plungian, Vladimir},       title       = {Types of verbal evidentiality marking: an overview},       editor      = {Diewald, G and Smirnova, E},       booktitle   = {{Linguistic realization of evidentiality in European languages}}       publisher   = {Walter de Gruyter},       year        = {2010},       pages={15-58},     }      input .tex:               \documentclass{article}     \usepackage[top=2cm, bottom=2cm]{geometry}     \usepackage[natbibapa]{apacite}     \usepackage{tipa}      \usepackage{gb4e}     \usepackage[font=small]{caption}     \usepackage[T1]{fontenc}     \usepackage{multicol}     \usepackage{nomencl}               \begin{document}          Test sentence with \cite{aikhenvald2003} and \cite{plungian2010b}.          \bibliography{Proposal}     \bibliographystyle{apacite}          \end{document}      In running text, it gives me this output: Test sentence with Aikhenvald (n.d.) and Plungian (n.d.). In the references, I get this: Aikhenvald, A. Y. (n.d.). Evidentiality in Tariana. In A. Y. Aikhenvald & R. Dixon (Eds.), . Plungian, V. (n.d.). Types of verbal evidentiality marking: an overview. In G. Diewald & E. Smirnova (Eds.), Linguistic realization of evidentiality in European languages.


title: new clause in algorithmic package

text: I want to define a new clause in algorithmic package (`sync` in my case), so that the code inside that clause would be indented as it was inside a `while` clause for example. So far I made things work by adding those lines in different places of `algorithmic.sty`               \newcommand{\algorithmicsync}{\textbf{sync}}     \newcommand{\algorithmicendsync}{\algorithmicend\ \algorithmicsync}     \newenvironment{ALC@syn}{\begin{ALC@g}}{\end{ALC@g}}     \newcommand{\SYNC}[2][default]{\ALC@it\algorithmicsync\ ##2\ %         \ALC@com{##1}\begin{ALC@syn}}     \ifthenelse{\boolean{ALC@noend}}{         \newcommand{\ENDSYNC}{\end{ALC@syn}}     }{         \newcommand{\ENDSYNC}{\end{ALC@syn}\ALC@it\algorithmicendsync}     }      Is there a simpler way to do the job without editing `algorithmic.sty` file?


title: Fix indent for section title

text: I like to recreate the layout of an official template, in order to get rid of Word. Because the template is from the government, I must recreate it 1:1. In the end, the document should look like this:               Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor     invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et      accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata.          1.      First Section Title             Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod             tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At             vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.          1.1     First Subsection Title             Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod             tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At             vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.          1.1.1   First Subsubsection Title             Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod             tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At             vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.      My main problem is the spacing between the section numbers and the titles. All section titles must begin on a fixed indent defined by the template, so the spacing between the numbers and the titles must be dynamic. With plain latex and `titlesec` I was only able to specify a fixed space. I also tried the `memoir` package with `hangsecnum`, but with this option the numbers will be aligned left, also with a fixed space between the section numbers and the title. Would it be possible to give me a hint how to create such a layout?


title: Question about centering an image having a badbox

text: If you have a large image and you get a warning about an overful box then when you try to center that image will you have a result the image centered around it's center or nothing will happen? And why will that be? When that happened to me the image didn't move. Shouldn't be centered around it's center instead?


title: Variable column spacing in a table

text: I have a relatively complex table with quite a few sub headings. I am trying to adjust the column spacing so that the separate "groups" are more visible. Here is a bit of my current table:               \documentclass[8pt,a4paper]{extreport}          \usepackage{etoolbox,siunitx,booktabs,threeparttable,multirow,array,graphicx}     \usepackage[margin=2.5cm]{geometry}     \robustify\bfseries     \setlength{\tabcolsep}{2pt}     \setlength\extrarowheight{3pt}     \sisetup{         detect-weight           = true,         detect-inline-weight    = math,         table-align-text-post   = false,         input-open-uncertainty  = ,         input-close-uncertainty = ,         tight-spacing           = true,         table-figures-integer   = 2,         }          \begin{document}     \begin{table}         \caption{}         \centering         \begin{threeparttable}[b]             \begin{tabular}{cc S[table-format=+2.1]S S[table-format=+2.1]S S[table-format=+2.1]S S[table-format=+2.1]S}             \toprule                 && \multicolumn{8}{c}{La Ni\~{n}a}\\ \cmidrule(l){3-10}                 ENSO & Time & \multicolumn{4}{c}{First} & \multicolumn{4}{c}{Second}\\ \cmidrule(lr){3-6}\cmidrule(l){7-10}                 Index & Period & \multicolumn{2}{c}{Terciles} & \multicolumn{2}{c}{Quartiles} & \multicolumn{2}{c}{Terciles} & \multicolumn{2}{c}{Quartiles}\\             \midrule                  \multicolumn{10}{l}{\textit{Annual (Jan-Dec) data}}\\                 SOI & 1901--2011 & 1.6 & (24) & 3.0 & (17) & \bfseries 7.3 & (13) & \bfseries 8.5 & (11)\\                 SOI & 1901--1950 & 3.2 & (12) & \bfseries 4.0 & (9) & \bfseries 8.0 & (5) & \bfseries 9.7 & (4)\\             \bottomrule                 \end{tabular}             \begin{tablenotes}[flushleft]                 \item Insert notes here             \end{tablenotes}         \end{threeparttable}     \end{table}     \end{document}      Ideally, I want 3 different sized column gaps (in ascending order):   1. Gap between number and following bracketed number    2. Gap separating the "Terciles" and "Quartiles" groups (and the gap separating cols 1 & 2)    3. Gap separating the "First" and "Second" groups (and the gap separating the "Time Period" column from column 3) I did find another example on here of how to do something similar (Improve intercolumn spacing of this table), but it looked awful when I tried to apply it to my table!! I would really grateful if anyone could help :)


title: Spell checking LaTeX documents

text: What's the best strategy for spell checking LaTeX documents?


title: Spelling mistake detector for LaTeX/PDF

text: > **Possible Duplicate:**   >  Spell checking LaTeX documents I have a LaTeX file which I use to generate a PDF. Is there any tool which I can use to detect spelling mistakes, either directly in the .tex file or in the pdf file ?


title: How to make citations?

text: I have noted that sites like _Wikipedia_ allow you to make "indexed" citations using the html tag `<ref>` and `</ref>`. As the following example: ``<ref>` Robert B. Tomer, ''Getting the most out of vacuum tubes'', Howard W. Sams, Indianapolis, USA 1960, Library of Congress card no. 60-13843, available on the Intenet Archive. Chapter 3. `</ref>` ` Next to the text (not begining a bibliography environment or anything). And even something similar happens when you put external links in the questions here in stackexchange. What Im looking for is something like that, in such a way that whenever I type information I can cite something with all the information required as shown before with the _Wikipedia_ example, and then add additional \bibitems if required. I want the citations to appear in order as well (like [1], [2], [3], ...), but I also want to decide if I want the additional citations before the ones that are trough the text, or after:               [1] Additional.     [2] Additional.     [3] InTextCitation.     [4] InTextCitation.     [5] Additional.     [6] Additional.


title: How can I put three pictures with sub-captions in two rows using subfig package?

text: I would like to put three pictures with sub-captions in two rows using the `subfig` package. I want to center the single picture in the second row. I use the following code :               \documentclass[12pt,leqno]{book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}      \usepackage{lmodern}      \usepackage{graphicx}                      \usepackage{float}     \usepackage{keyval,caption,subfig}     \captionsetup[subfigure]{%format=hang, singlelinecheck=false, font={tt,bf,sc}}     \newsubfloat[position=top,listofformat=subsimple]{figure}          \parindent 1cm     \parskip 0.2cm     \topmargin 0.2cm     \oddsidemargin 1cm     \evensidemargin 0.5cm     \textwidth 15cm     \textheight 21cm          \DeclareGraphicsExtensions{.png}          \begin{document}          \begin{figure}[H]%     \centering     \subfloat[First subtitle]{     \begin{picture}(226,139)     {\includegraphics{abra_1_a}}     \end{picture}     }     \qquad     \subfloat[Second subtitle]{     \begin{picture}(226,139)     {\includegraphics{abra_1_b}}     \end{picture}     }\\     \subfloat[Third subtitle]{     \begin{picture}(226,139)     {\includegraphics{abra_1_c}}     \end{picture}     }%     \caption{Assignment}     \end{figure}          \end{document}          **Result :** The pictures appear in three rows. **Question :** What is wrong in my code ?


title: Place vertically centered legend to the right of groupplots

text: I want to place the legend to the right of `groupplots` using the `pgfplots` package, and for the legend to be vertically aligned at the center. In other words, I want the legend to be placed at the point where it says "Put the legend here". **Question:** How do I do this?               \documentclass[margin=2mm]{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}          \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}[shorten >=4pt,shorten <=4pt]       \begin{groupplot}[         group style={           group size=2 by 2,           x descriptions at=edge bottom,           y descriptions at=edge left,         },         height=3.5cm,width=3.5cm,/tikz/font=\small,         xlabel=time $t$ / h,         ylabel=$c$ / mol/L,         ]         \nextgroupplot% 1         \addplot coordinates {(0,1) (1,0)};         \addplot coordinates {(0,0) (1,1)};         \nextgroupplot% 2         \addplot coordinates {(0,1) (1,0)};         \addplot coordinates {(0,0) (1,1)};         \nextgroupplot% 3         \addplot coordinates {(0,1) (1,0)};         \addplot coordinates {(0,0) (1,1)};         \nextgroupplot% 4         \addplot coordinates {(0,1) (1,0)};         \addplot coordinates {(0,0) (1,1)};       \end{groupplot}       \node [right=5mm,anchor=west] at         ($(group c2r1.south east)!0.5!(group c2r2.north east)$) {Put the legend here};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/3PUI7.png)


title: How do signatures work in printing, and how can I use them in LaTeX?

text: With respect to printing, what are signatures? How do I use them when setting up my LaTeX document for printing (for example a book)?


title: Problem with using TikZ pictures as subfigures

text: I tried to create a figure which consists of two subfigures, each of which is a TikZ picture.               \documentclass[a4paper,10pt]{article}     \usepackage{amsmath,amssymb,amsfonts,amsthm,tikz,caption,subcaption}          \begin{document}          \begin{figure}     \begin{center}          \begin{subfigure}     \begin{tikzpicture}[scale=1]            \path (0,0) coordinate (P0) node[right=0.1cm] {P0};       \fill (P0) circle (2pt);          \end{tikzpicture}     \caption{Hello P1} \label{fig:M1}     \end{subfigure}          \begin{subfigure}     \begin{tikzpicture}[scale=1]            \path (0,0) coordinate (P0) node[right=0.1cm] {P0};       \fill (P0) circle (2pt);          \end{tikzpicture}     \caption{Hello P2} \label{fig:M2}     \end{subfigure}               \end{center}     \end{figure}          \end{document}      But compiling this file gives the error               ! Missing \endcsname inserted.     <to be read again>                         \relax      l.10 \begin                {tikzpicture}[scale=1]      Why is that?


title: ebgaramond interface for newtxmath

text: # Remarks The `newtxmath`-package comes with support for various fonts, including `libertine`, `minion` or `garamondx`. Personally I like the Garamond very much, but `garamondx` is not part of the default installation. Thus I use `ebgaramond` instead. To do so, I just copied the part, where the fonts are set up from `newtxmath`. # Problem statement Here is a minimal **NOT** working example of what I have tried so far to load `ebgaramond` as a math alphabet. (`unicode-math` or `mathspec` is not an option, it needs to be `pdflatex` compatible)               \documentclass{article}     \usepackage{ebgaramond}     \usepackage[cmintegrals,cmbraces]{newtxmath}     \DeclareSymbolFont{letters}{OML}{EBGaramond12-Italic-lf-t1--base}{m}{it}     \SetSymbolFont{letters}{bold}{OML}{EBGaramond12-Italic-lf-t1--base}{b}{it}     \DeclareFontSubstitution{OML}{EBGaramond12-Italic-lf-t1--base}{m}{it}     \begin{document}     ABCDEFGHIJKLMNOPQRSTUVWXYZ          abcdefghijklmnopqrstuvwxyz          1234567890          $ABCDEFGHIJKLMNOPQRSTUVWXYZ$          $abcdefghijklmnopqrstuvwxyz$          $1234567890$     \end{document}      * * * # Bonus question How can I use swash glyphs as `mathcal` alphabet? * * * # EDIT 2014-01-03 Pointed out by cfr's comment, the question reduces to **How can I create OML files for`ebgaramond`?** (The bonus question remains valid)


title: \toks register expansion issue - or is it?

text: I am trying to assemble a table that occurs multiple times throughout a document. It always consists of some fixed columns, followed by a set of columns that appear in one table but are not needed in another table. I was told it would be a good idea to use toks registers for this. Never having heard of these, I tried to figure out how I could put them to use in my case. (BTW, is there a good online documentation of this stuff available?) From various examples, I've pieced together this code:               \documentclass{article}          \newtoks\toksA     \newtoks\toksB     \newtoks\toksC     \newtoks\toksD          \newcommand*{\leadingcolumns}{     \toksA={ foo & bar }     \toksB={ Foo & Bar }     \toksC={ fOo & bAr }     \toksD={ foO & baR }     }          \newcommand*{\numbercolumn}{     \toksA=\expandafter{\the\toksA & 1 }     \toksB=\expandafter{\the\toksB & 2 }     \toksC=\expandafter{\the\toksC & 3 }     \toksD=\expandafter{\the\toksD & 4 }     }          \newcommand*{\charactercolumn}{     \toksA=\expandafter{\the\toksA & W }     \toksB=\expandafter{\the\toksB & X }     \toksC=\expandafter{\the\toksC & Y }     \toksD=\expandafter{\the\toksD & Z }     }          \newcommand{\printtable}{     \the\toksA \tabularnewline     \the\toksB \tabularnewline     \the\toksC \tabularnewline     \the\toksD \tabularnewline     }          \begin{document}          all columns:          \begin{tabular}{llll}       \leadingcolumns       \charactercolumn       \numbercolumn       \printtable     \end{tabular}          characters only:          \begin{tabular}{lll}       \leadingcolumns       \charactercolumn       \printtable     \end{tabular}          numbers only:          \begin{tabular}{lll}       \leadingcolumns       \numbercolumn       \printtable     \end{tabular}          \end{document}      While this basically does what I want it to do, it only prints out the first line of each table. What am I doing wrong?


title: Creating Multiple-State Models (rectangular nodes)

text: I would like to replicate the following image for my work: ![enter image description here](http://i.stack.imgur.com/ASO6w.png) I now have the following MWE:               \documentclass[12pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage [english]{babel}     \usepackage{amsmath, amssymb}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.multipart}     \begin{document}     \begin{center}     \begin{tikzpicture}[sharp corners=2pt,inner sep=7pt,node distance=.8cm,every text node part/.style={align=center}]          % Draw rectangular nodes (switch sharp to smooth for different corners)     \node[draw, minimum height = 1cm, minimum width = 3cm] (healthy){healthy $(h)$};     \node[draw,below = 1.5cm of healthy, minimum height = 1cm, minimum width = 3cm](dead){dead $(d)$};     \node[draw,right=3cm of healthy, minimum height = 1cm, minimum width = 3cm](sick){sick $(s)$};          \end{tikzpicture}\end{center}     \end{document}      ![enter image description here](http://i.stack.imgur.com/7IMaZ.png) Is there any way I can horizontally center the "dead (d)" node (as in the image)?


title: How do I write an arara rule to conditionally execute a command

text: I wanted to write an `arara` rule that will conditionally execute a command based on the existence of external files. Here's an example rule that I was able to get working:               !config     # open rule for arara     # author: AEllett     # requires arara 3.0+     identifier: echo     name: echo     command: /bin/echo "-->@{getBasename(file)}<--"     arguments: []      I can also conditionally test for a file               !config     # open rule for arara     # author: AEllett     # requires arara 3.0+     identifier: test     name: testing     commands:        - <arara> /bin/echo @{ isTrue ( isFile ("./dir/file") , "TRUE" , "FALSE") }     arguments: []      I would like to change what I'm executing: namely, the "/bin/echo" part. But when I try something like:               !config     # open rule for arara     # author: AEllett     # requires arara 3.0+     identifier: test     name: testing     commands:        - <arara> @{mycommand} @{ isTrue ( isFile ("./dir/file") , "TRUE" , ".") }     arguments:        - identifier: mycommand         flag: <arara> @{ isTrue ( isFile ("./dir/file") , "/bin/echo " , "/bin/ls ") }      This runs without error, but doesn't do what I want it to. I've also tried something like:               !config     # open rule for arara     # author: AEllett     # requires arara 3.0+     identifier: test     name: testing     commands:        - <arara> @{mycommand} @{ isTrue ( isFile ("./dir/file") , "TRUE" , ".") }     arguments:        - identifier: mycommand         flag: <arara> @{ isFile ("./dir/file") == true  ?  "/bin/echo " : "/bin/ls " }      This generates an error               It appears that the 'test' task has a YAML syntax error or an     invalid field. Could you take a look at the 'test.yaml' file     located at '/Users/acellett/projects/ini/arara/rules'. I tried my     best to dump the error message, so here it is:          Problem: mapping values are not allowed here     Error found in line 12, column 60.          ... ("./dir/file")  ?  "/bin/echo " : "/bin/ls " }                                              ^      My test file (named "example_01.tex") looks like:               %  arara: test: { files: [example_01.tex] }      from the command line I'm issuing               $ arara -v example_01.tex      The result of logging is:               01 Jan 2014 10:58:59.870 INFO  Arara - Welcome to arara!     01 Jan 2014 10:58:59.874 INFO  Arara - Processing file 'example_01.tex', please wait.     01 Jan 2014 10:58:59.875 INFO  DirectiveExtractor - Reading directives from example_01.tex.     01 Jan 2014 10:58:59.876 TRACE DirectiveExtractor - Directive found in line 1 with test: { files: [example_01.tex] }.     01 Jan 2014 10:58:59.884 INFO  DirectiveParser - Parsing directives.     01 Jan 2014 10:58:59.889 INFO  TaskDeployer - Deploying tasks into commands.     01 Jan 2014 10:58:59.889 TRACE TaskDeployer - Task 'test' found in '/Users/acellett/projects/ini/arara/rules'.     01 Jan 2014 10:58:59.933 INFO  CommandTrigger - Ready to run commands.     01 Jan 2014 10:58:59.934 INFO  CommandTrigger - Running 'testing'.     01 Jan 2014 10:58:59.934 TRACE CommandTrigger - Command:  TRUE     01 Jan 2014 10:59:00.063 TRACE CommandTrigger - Output logging:     01 Jan 2014 10:59:00.064 TRACE CommandTrigger -      01 Jan 2014 10:59:00.064 INFO  CommandTrigger - 'testing' was successfully executed.     01 Jan 2014 10:59:00.064 INFO  CommandTrigger - All commands were successfully executed.     01 Jan 2014 10:59:00.065 INFO  Arara - Done.      though I'm not really sure how to interpret this. So basically what I'd like to know is how to write a rule which executes differently contingent upon the existence of some other file. Incidentally, I am able to write:               !config     # open rule for arara     # author: AEllett     # requires arara 3.0+     identifier: test     name: testing     commands:        - <arara> @{ isTrue ( isFile ("./dir/file") , "/bin/echo " , "/bin/ls ") } @{ isTrue ( isFile ("./dir/file") , "TRUE" , ".") }     arguments: []      But I really wanted to have the commands chosen via the arguments.


title: cleveref, ntheorem and lj-igpl

text: The `cleveref` package doesn't work properly with the `lj-igpl` package. There are many discussions about `cleveref`, however, none of them solves my problem. I am using the `ntheorem` package as well, but switching to `amsthm` doesn't help. Code:               \documentclass[twoside]{report}     \usepackage{ntheorem}         \usepackage{hyperref}     \usepackage{cleveref}         \usepackage{lj-igpl}       \Title{Example}        \ShortAuthor{}      \LongAuthor{}          \begin{document}     \begin{paper}     \begin{lemma}     \label{lem1}     This is a lemma.     \end{lemma}          By \Cref{lem1}, bla bla.     \end{paper}          \end{document}      The result is "By Chapter 1" instead of "By Lemma 1". If I turn off `ntheorem`, then "Chapter" is replaced by "??". Also, it doesn't help to load `lj-igpl` before `cleveref`. Any ideas? ![](http://i.stack.imgur.com/CtpF9.jpg)


title: Put text to the right of figures

text: How can I display text to the _right_ of figure, vertically centered? "Caption" is only displaying text below it, as it seems to me.


title: Problem with \renewcommand in LaTeX

text: Please consider the following code:               \documentclass[11pt,twoside,openany]{book}          \usepackage[svgnames,x11names]{xcolor}     \usepackage{wallpaper}     \usepackage{changepage}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usetikzlibrary{shapes,positioning}     \usepackage{geometry}     \geometry{        paperwidth=216mm, paperheight=303mm,        left=23mm,  %% or inner=23mm        right=18mm, %% or outer=18mm        top=23mm, bottom=23mm,        headheight=\baselineskip,        headsep=7mm,        footskip=7mm     }               %% Command to hold chapter illustration image     \newcommand\chapterillustration{}          %% Define how the chapter title is printed     \titleformat{\chapter}{}{}{0pt}{     %% Background image at top of page     \ThisULCornerWallPaper{1}{\chapterillustration}     %% Draw a semi-transparent rectangle across the top     \tikz[overlay,remember picture]       \fill[LightSalmon1,opacity=.7]       (current page.north west) rectangle        ([yshift=-3cm] current page.north east);       %% Check if on an odd or even page       \checkoddpage\strictpagecheck       %% On odd pages, "logo" image at lower right       %% corner; Chapter number printed near spine       %% edge (near the left); chapter title printed       %% near outer edge (near the right).       \ifoddpage{         \ThisLRCornerWallPaper{.35}{image3}         \begin{tikzpicture}[overlay,remember picture]         \node[anchor=south west,           xshift=20mm,yshift=-30mm,           font=\sffamily\bfseries\huge]            at (current page.north west)            {\chaptername\ \thechapter};         \node[fill=Sienna!80!black,text=white,           font=\Huge\bfseries,            inner ysep=12pt, inner xsep=20pt,           rounded rectangle,anchor=east,            xshift=-20mm,yshift=-30mm]            at (current page.north east) {#1};         \end{tikzpicture}       }       %% On even pages, "logo" image at lower left       %% corner; Chapter number printed near outer       %% edge (near the right); chapter title printed       %% near spine edge (near the left).       \else {         \ThisLLCornerWallPaper{.35}{image3}         \begin{tikzpicture}[overlay,remember picture]         \node[anchor=south east,           xshift=-20mm,yshift=-30mm,           font=\sffamily\bfseries\huge]            at (current page.north east)           {\chaptername\ \thechapter};         \node[fill=Sienna!80!black,text=white,           font=\Huge\bfseries,           inner sep=12pt, inner xsep=20pt,           rounded rectangle,anchor=west,           xshift=20mm,yshift=-30mm]            at ( current page.north west) {#1};         \end{tikzpicture}       }       \fi     }     \titlespacing*{\chapter}{0pt}{0pt}{135mm}               \begin{document}     \renewcommand\chapterillustration{image1}     \chapter{First Chapter}          \renewcommand\chapterillustration{image2}     \chapter{Second Chapter}          \end{document}      Problem: On compiling with pdflatex, the output PDF contains "image2" only - for both chapter headings. i.e. The code section:               \renewcommand\chapterillustration{image1}     \chapter{First Chapter}          \renewcommand\chapterillustration{image2}     \chapter{Second Chapter}      is producing "image2" for both the Chapters. Please help me with this issue.


title: \emph or \textit

text: In the comments section of Does it matter if I use \textit or \it, I asked for a clarification of these points. The clarification has mostly been made, but it was requested that I turn this into a question to provide for more room for this question to be fielded. So here it is: **Please explain the difference between`\emph` and `\textit`. When should they be used, respectively?**


title: fixfoot.sty with symbols?

text: I'm currently using `fixfoot.sty`(along with `footmisc.sty`), and I'd like to use footnote symbols (rather than numbers). `fixfoot`doesn't seem equipped to deal with this out of the box; it uses the original footnote command for the first occurrence on each page, so that's delegated to `footmisc`, and works fine. However, each repeated occurrence uses a footnote mark that `fixfoot` has stored in a macro—and it simply stores a hard-coded numerical footnote mark. Now, I'm _guessing_ that changing this shouldn't be too hard. I've been trying to redefine the `\@fixed@footnote`command (line 109 in v0.3a) in my own `.sty`file, which works fine in terms of overriding. But… I'm not \TeX-savvy enough to make it work. I'm guessing the place to make the “repair” is in lines 147–148, where the mark is saved (the `#1` argument is a “footnote tag”):               \expandafter\xdef\csname @#1@fftn@footnote\endcsname                       {\the\c@footnote}%      I'm guessing I need to use of `\fnsymbol` along with the `footnote` counter here. That is, something like `\@fnsymbol\c@footnote` (which is what `\thefootnote` is redefined to in `footmisc.sty`, under the `symbol` option), rather than `\the\c@footnote`. However, I don't seem to grok `\expandafter` (or probably a bunch of other relevant stuff) enough, and keep getting weird errors no matter what I try. Any pointers would be appreciated. (Even to alternate solutions to the problem of using “fixed footnotes” such as those in `fixfoot`, but with symbols, preferably together with `footmisc` or the like, for customization.)


title: Text and symbols get capped in math mode

text: I use these the following setup in my preamble:               \documentclass[oribibl]{llncs}       \usepackage[utf8]{inputenc}       \usepackage{todonotes}       \usepackage{amsmath}       \usepackage{amsfonts}       \usepackage{amssymb}       \usepackage{algorithm2e}        The following code does not display correctly:               \[           a^x = \left\{           \begin{array}{l l}               a^{x/2} * a^{x/2} & \quad \text{if $x$ is even}\\               a * a^{x-1}       & \quad \text{if $x$ is odd}           \end{array} \right.     \]      It becomes: ![enter image description here](http://i.stack.imgur.com/S15mA.png) I had a similar problem with `\mathbb{Z}`, where wrapping the 'Z', like so `\mathbb{\text{Z}}`, makes it look right. This, however, does not seem to work for the first problem with the curly brace. ![Z displayed correctly and Z being capped off](http://i.stack.imgur.com/ZjdhG.png) What am I missing? And how to fix the first problem?


title: How can you highlight a C compiler directive spanning multiple lines?

text: In my `\lstset{...}` I have `morecomment=[l][{\color[rgb]{0.1, 0.2, 0.8}}]{\#},` which I've seen used to give preprocessor commands colour. This works just fine but I'd like to get multi-line macros to be highlighted too, for example:               \begin{lstlisting}     #define MAX(a, b) \         ((a)>(b)?(a):(b))     \end{lstlisting}      **What's a good way to get`listings` to match multi-line macros?** [ _EDIT_ ]   very well, here's a complete example with `\documentclass` etc... :P               \documentclass{article}     \usepackage{color}     \usepackage{listings}     \lstset{language=C,         morecomment=[l][{\color[rgb]{0.1, 0.2, 0.8}}]{\#}         }     \begin{document}     \begin{lstlisting}     #define MAX(a, b) \         ((a)>(b)?(a):(b))     \end{lstlisting}     \end{document}      I'd like the second line of the macro to be blue too, based on a rule relating to the `\`. ![enter image description here](http://i.stack.imgur.com/bggnp.png)


title: LaTeX Error: Can not include graphics of type: pdf

text: Platform: TeXShop, version pi(?): 3.14159...1.40.9. on a Mac OSX, v.10.5.8. The error I'm getting in `pdftex` is `Can not include graphics of type: pdf` Oddly, my PDF graphic was originally included in a document that had no trouble formatting it (under same platform as above). I'm now trying to include this document as a chapter in a larger manuscript (different class) and am running into all sorts of errors. I have been searching the web and have overcome some of the errors but can't seem to find an answer to my current problem. Here is the basic framework of my document:               \usepackage{graphicx}     \graphicspath{{./graphics/}}     \DeclareGraphicsExtensions{.pdf,.png,.jpg}               \begin{document}     ...     \chapter{thebestchapterever}     \input{thebestchapterever.tex}     ...     \end{document}      within `thebestchapterever.tex`, I have used the following code to include the graphic.               \begin{figure}     \noindent     \includegraphics[type=pdf, ext=.pdf, read=.pdf, bb=1.0in 1.0in 3.0in 5.0in, trim=2cm 7cm 2cm 10cm]{figurename}     \caption{...}     \label{fig1}     \end{figure}      I have also tried many combinations in `includegraphics`. When I exclude the `type`, `ext` and `read` then it just can't find the graphic. When I omit the `bb=` then I get a boundary boxy error. If I add `.pdf` to `figurename` it doesn't help either. All of these are new errors that didn't present in my prior work (for reasons that I'm guessing had to do with using a different class). In addition `graphicspath` is no longer working either, so the figure needs to be in the same directory. Any ideas on why my PDF is being rejected? I would love some suggestions on a fix.


title: Defining absolute value in scrbook

text: Why does this not work in `scrbook`:               \[     \left | x \right |=\left\{\begin{matrix} x, if x\geq 0     \\ -x, if x<0 \end{matrix}\right.     \]      (I wrote it in writeLaTeX.) **if I use the amsmath then bring up a message:** > "(no line number in this file): > > LaTeX Error: Command \ iiint already defined. > > Or name \ end ... illegal, see p.192 of the manual. > > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. ... > > l.507 ... {\ iiint} {\ DOTSI \ protect \ MultiIntegral {3}} > > Your command was ignored. Type I to replace it with another command, or to > continue without it." **The codes I've used:**               \documentclass[oneside]{scrbook}      \usepackage{etoolbox}      \usepackage{helvet}      \usepackage[bahasa]{babel}      \usepackage{calc}      \usepackage[usenames,dvipsnames]{xcolor}      \usepackage[utf8]{inputenc}      \usepackage{chngcntr}      \usepackage{graphicx}      \usepackage{enumerate}      \usepackage[inline,shortlabels]{enumitem}      \usepackage{pifont}      \usepackage{wasysym}      \usepackage{sectsty}      \usepackage{amssymb}      \usepackage{array}      \usepackage{venndiagram}      \usepackage{tcolorbox}      \usepackage{comment}      \specialcomment{solusi}{\begin{tcolorbox}}{\end{tcolorbox}}