title: Linux Libertine O and Linux Biolinum O not found

text: I have TeX Live 2011. I set               \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \setsansfont{Linux Biolinum O}      but I get a warning that these fonts are not found! If I try `\usepackage{libertineotf}`, I get the same warning. I compile with `xelatex`. Please tell me what is wrong.


title: Typesetting formulas in section titles: Title bold, ToC entry isn't

text: I have a largeish document written with memoir, and I need mathematics formulas in section titles. The problem is that I can't get the formulas set in bold for the title, and non-bold for the table of contents. This MWE shows the problem:               \documentclass{memoir}          \title{Minimal (Non) Working Example}     \author{The A. Uthor}          \begin{document}     \maketitle          \tableofcontents          \chapter{Just some random title}          \section{The equation $a + \sqrt{x}$ looks ugly here\ldots}            (Non-bold formula in bold title.)       It looks fine in ToC.          \section{\protect\boldmath                This $a^2 + b^3$ equation looks fine           \protect\unboldmath}            It looks \emph{terrible} in ToC.          \end{document}      Running `pdflatex` (TeXlive 2013, Fedora 18) gives a ToC with the first equation OK, but a bad section title; while the second goes the other way around.


title: Patterns in TikZ

text: I am trying to make a simple TikZ picture consisting of some rectangles with pattern fills. This is roughly what I have added.               \documentclass{amsart}          \usepackage{amsmath,amsthm,mathrsfs,amssymb,graphicx}     \usepackage[all]{xy}     \usepackage{tikz}     \usetikzlibrary{patterns,arrows}          \begin{document}          \begin{tikzpicture}         \draw[-,thick] (0,0) rectangle (0.5,1);              \draw[-,thick] (1.5,0) rectangle (2,2);         \draw[-,thick,pattern=crosshatch] (1.5,0) rectangle (2,0.5);              \draw[-,thick] (3,0) rectangle (3.5,3);         \draw[-,thick,pattern=crosshatch] (3,0) rectangle (3.5,1);              \draw[-,thick] (4.5,0) rectangle (5,4);         \draw[-,thick,pattern=crosshatch] (4.5,0) rectangle (5,1.5);              \filldraw[-,thick,pattern=crosshatch] (6,0) rectangle (6.5,7);     \end{tikzpicture}      \end{document} For whatever reason, though, the rightmost column, the one that's to have the crosshatch fill, always comes out black, with no pattern. I tried a few standard examples from the pgf manual, with the same results. I have               \usetikzlibrary{patterns}      but I wonder if there is something else I have forgotten to include. Any help will be much appreciated. Thanks!


title: Clash between ocgcolorlinks option of hyperref and patterns library of TikZ

text: I have stripped down to the following MWE after some experimentation. As it is, it works without any problems.               \documentclass{memoir}     \usepackage[ocgcolorlinks]{hyperref}          \usepackage{tikz}     \usetikzlibrary{patterns}               \author{The author}     \title{Some title}          \begin{document}     \frontmatter     \maketitle     \listoffigures     \mainmatter     \chapter{first}     \section{first}     Some figure     \begin{figure}%     \centering     \begin{tikzpicture}     \draw[fill,pattern=north east lines,thick] (0,0) rectangle (5cm,2cm);     \end{tikzpicture}     \caption{Some caption}%     \label{fig:a1}%     \end{figure}     \end{document}      Notice the coloring and the weight of the font on LoF entries: ![enter image description here](http://i.stack.imgur.com/M3Sm7.png) But when I change the location of the `hyperref` declaration to somewhere after TikZ and its library declaration, the whole figure environment just vanishes (but LoF still knows that it's there) also LoF entry loses its color(I guess!). ![enter image description here](http://i.stack.imgur.com/AXUg6.png) If I remove the patterns library dependence (`fill=yellow` or anything else) the second picture above is obtained and the TikZ picture is rendered correctly regardless of the declaring order. This suggests that the second image is the correct one and something fishy is going on either in the pattern library or `ocgcolorlinks` option. Does anyone know why? Or is it a bug? I work with MikTeX 2.9, TikZ/PGF 2.10, `hyperref`6.83c


title: Is ConTeXt using TeX or rewriting it?

text: Just out of curiosity, is ConTeXt using the TeX algorithm in it's entirety, or are some components rewritten? If it's the latter:   1. Could all of TeX be rewritten in Lua, or are there good reasons against it?   2. How was the pascal translated to Lua - automatically, or did someone understand it in it's entirety and rewrite it? _Feel free to close this as off-topic_


title: How to make tex4ht output a title

text: Compiling with htlatex the following small2e.tex               \documentclass{article}        % Your input file must contain these two lines      \begin{document}               % plus the \end{document} command at the end.          \section{Simple Text}          % This command makes a section title.          Words are separated by one or more spaces.  Paragraphs are separated by     one or more blank lines.     \end{document}      Creates a nice html file but with an empty title (it contains `<title></title>`). Is there a way to force tex4ht to output a title? Using the following line in a private configuration file:               \HCode{<title>} My title \HCode{</title>}      simply adds "My title" as a title, but does not substitute the empty one, thus creating validation problems.


title: Table of contents and Cross-referencing in multiple chapters

text: This is a follow-up to the question Cross-referencing in multiple chapters. Following the answer to this question, I am using the following macros:               \newcommand*\maybechapter[1]{%         % Tests if current chapter is equal to the chapter number of label)      \ifnum\value{chapter}=0#1\relax          % Print nothing if so      \else          % Set 'chapter' locally (=> no \setcounter) to the label chapter and          % print it in the usual format followed by a dot          {\value{chapter}=#1\relax\thechapter.}%      \fi     }     \renewcommand*\thesection{%         \protect\maybechapter{\arabic{chapter}}\arabic{section}%     }      This works as expected for references but in the Table of contents, section numbers are now all preceded by their chapter numbers:               I The first chapter         I.1 The first section of the first chapter      but I would like to get something like               I The first chapter         1 The first section of the first chapter      How should I modify \maybechapter to get this result?


title: \def taking rest of the line as argument

text: I know how to define a macro that will take the rest of the paragraph as parameter. Simply write `\def\a#1\par{\textbf{#1}}`. But, how do I write a macro whose argument will extend to the end of the line?


title: How to draw text-anchored tikz line below text instead of above?

text: I wish to mark several pairs of from/to anchor locations in text, and use `tikz` to draw lines between these. The anchors are not in absolute page locations; the text determines where the endpoints of the line should be. However, the drawn line must not obscure the text. Rather, the line must appear as though it were drawn _under_ the text instead of above. ### Failed Attempt #1: Line Obscures Text The following small example document defines `\StrokeFrom` and `\StrokeTo` macros, with the latter completing the line to the former. But the stroked line is above the text, obscuring the text below. That is what I want to change. (Run `pdflatex` _twice_ for the arrows to move to their final locations.)               \documentclass{article}     \usepackage{tikz}          \tikzset{stroke/.style = {->, yellow, line width = 1ex}}          \newcommand{\StrokeAnchor}[1]{\ensuremath{\vcenter{\hbox{\tikz[overlay, remember picture]{\coordinate (stroke #1) ;}}}}}     \newcommand{\StrokeFrom}[0]{\StrokeAnchor{from}}     \newcommand{\StrokeTo}[0]{\StrokeAnchor{to}\tikz[overlay, remember picture]{\draw [stroke] (stroke from) -- (stroke to) ;}}          \begin{document}          This text is \StrokeFrom before the figure both in the \LaTeX{} source     and in the \StrokeTo rendered document.          \begin{figure}[p]       \StrokeFrom Once upon a time. \StrokeTo     \end{figure}          This text is after the figure in the \LaTeX{} source but before     \StrokeFrom it in the rendered document.  \StrokeTo          \end{document}      ### Failed Attempt #2: Transparent Line Pollutes Text Color I have also considered simply making the stroked line partially transparent. Unfortunately, a partially-transparent colored line atop black text changes the color of that black text. It also makes fully-saturated colors (such as yellow, above) unusable. ### Failed Attempt #3: Line Does Not Stay With Float This problem was originally inspired by my answer to a question about highlighting text in a code listing while also keeping syntax highlighting. In that case I give the from/to anchors unique-per-page names, then paint all of the required lines from within `\AtBeginShipout{\AtBeginShipoutUpperLeft{...}}` so that the lines go onto the page before the text does. (Run `pdflatex` _twice_ for the arrows to move to their final locations.)               \documentclass{article}          \usepackage{atbegshi,ifthen,listings,tikz}     \usetikzlibrary{calc}          \tikzset{stroke/.style = {->, yellow, line width = 1ex}}          \newcounter{stroke}[page]     \newcommand{\StrokeAnchor}[1]{\ensuremath{\vcenter{\hbox{\tikz[remember picture, overlay]{\coordinate (#1 stroke \arabic{stroke});}}}}}     \newcommand{\StrokeFrom}[0]{\stepcounter{stroke}\StrokeAnchor{begin}}     \newcommand{\StrokeTo}[0]{\StrokeAnchor{end}}     \AtBeginShipout{\AtBeginShipoutUpperLeft{\ifthenelse{\value{stroke} > 0}{\tikz[remember picture, overlay]{\foreach \stroke in {1,...,\arabic{stroke}} \draw[stroke] (begin stroke \stroke) -- (end stroke \stroke);}}{}}}          \begin{document}          This text is \StrokeFrom before the figure both in the \LaTeX{} source     and in the \StrokeTo rendered document.          \begin{figure}[p]       \StrokeFrom Once upon a time. \StrokeTo     \end{figure}          This text is after the figure in the \LaTeX{} source but before     \StrokeFrom it in the rendered document.  \StrokeTo          \end{document}      Unfortunately, this strategy misbehaves if the stroke anchors are in a float which is _processed_ on one page but actually _placed_ on a subsequent page. The line is drawn on the page which was active when the float was being processed, not on the later page where the float actually appears. A fully- satisfactory solution must be able to handle floats that move to different pages, such as the `\begin{figure}[p]...\end{figure}` float in the example document above.


title: Placement of page numbers is too low

text: I'm trying to set page numbering but somehow it ends up lower than it should and the numbers touch the edge of the page, which looks strange and is exactly what I don't want it to look like. How can I adjust the position of the numbers? I didn't use any settings for page numbering. I use several packages, maybe it has something to do with it               \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{float}     \usepackage{multicol}     \usepackage{a4wide}     \usepackage[margin={1cm, 1cm}]{geometry}


title: How to install OTF fonts with otfinst.py?

text: I want to install some fonts that I have in OTF format for use in LaTeX. I learned that I should use `otfinst.py`, but I have absolutely no idea how. The manual is by far the worst ever I've seen. I have three files, that I'd like to convert: Crimson-Roman.otf, Crimson- Bold.otf, Crimson-Italic.otf, and Crimson-BoldItalic.otf. The script asks for a "berryname" which I have no Idea where to set it, or what it should be. I want to use the old-style numerics in that font, how do I generate them, and how do I select them in LaTeX? And what about all the other textual replacements in the OTF file, do those glyphs get converted, too? And what's the deal with the font encoding? It uses Ly1, what is that? I need UTF-8 if that has anything to do with it.


title: Resolution (dpi) checks for included bitmaps

text: When I include bitmap images in my PDF files (created with `pdflatex` and the `graphicx` package), I always check manually that the resolution will be suitable (I shoot for something between 200 and 300 dpi). I just realized it’s a pity to do it by hand, while LaTeX actually knows both the pixel size of the image and its final size on paper. Is it possible to have LaTeX issue a warning when the resolution of an included bitmap image will be outside certain bounds?


title: How to create an index for custom environments?

text: I have defined a custom script environment, and would like to include an index in the output listing all scripts with their titles. How can I create such an index? The custom environment looks like:               \newcounter{script}     \def\thescript{\thechapter-\arabic{script}}     \newenvironment{script}[2][]{     \colorbox{orange}       {\refstepcounter{script}\textbf{Script~\thescript #1: #2}}\nobreak}       {}


title: LaTeX install path on OS X

text: I run the MacTeX 2012 installer and it installed a bunch of apps and tools under `/Applications/TeX`. However, I can't find the latex executables. There is no `/usr/texbin`, no `/usr/local/texlive`. If I try to generate a PDF in TeXShop it returns an error, because it doesn't find the executables. Shouldn't the MacTeX installer install them too? Where are they located?


title: Invoking a macro with arguments in the body of \DeclareUnicodeCharacter.

text: I would like to define the Unicode section character, U+00A7 to be equivalent to the \section macro. What I have now is:               \DeclareUnicodeCharacter{167}{\csname section\endcsname}      but this does not seem to work. Here is an example document:               \documentclass{article}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \DeclareUnicodeCharacter{167}{\csname section\endcsname}     \begin{document}     §{Introduction}     \end{document}      that generates this error message:               ! Extra \else.     \@sect ... {\csname the#1\endcsname }\fi #7}\else                                                        \def \@svsechd {#6{\hskip ...     l.6 §           {Introduction}      I would not even know where to start to see what's going on.


title: how to use latex draw graphs, just like this?

text: Recently, I am using LaTex to draw graphs. However, I don't know how to do it. My graphs just like: ![enter image description here](http://i.stack.imgur.com/0Z40A.png) How can I do it?


title: Please critique this "intermediate size" fraction macro.

text: I often write a lot of mathematics where I multiply various quantities/operators/etc. by fractions. The fractions are important for bookkeeping, but usually not the most important thing in the equation by far, so I like to de-emphasize them. My usual solution to this is to use `\tfrac` even in displayed environments, but this does not look as aesthetically pleasing as possible -- it's a bit cramped. But I find the massive fractions produced by `\dfrac` to swing too far in the opposite direction in a context such as `\\[ \dfrac{1}{2} A + (other stuff) \\]`. To solve this problem in my thesis (where I was allowed to get away with things like the following), I created a custom fraction macro, roughly as follows (using the `scalefnt` package):               \newcommand\sfrac[2]{%       \dfrac{\text{\raisebox{-0.5ex}{\scalefont{0.85}{$#1$}}}}%             {\text{\raisebox{0.35ex}{\scalefont{0.85}{$#2$}}}}%     }      All numerical parameters were chosen arbitrarily, to make constructs such as `\sfrac{1}{\sqrt 2}` and `\sfrac{\pi}{2}` look appealing in comparison to the `\tfrac` and `\dfrac` alternatives in displayed math ( _e.g._ when placed next to something else such as a uppercase or lowercase letter, a bracket, or a summation symbol). **If you have any, please provide arguments for the following:**   1. Fundamental aesthetic or technical problems with this macro: are there reasons why I should never _want_ to use such a macro, if I were "right-thinking"?   2. Technical or aesthetic improvements which are possible for this macro: how could I make it better?   3. Are there practical problems that would be caused by this macro (aside from potentially making co-authors and journal editors hate me)?


title: efrench vs frenchb

text: What are the differences between `efrench` and `frenchb`? Are they compatible with one another (for example the use of `\og` and `fg` in `frenchb`)? Why is `efrench` not in TeXLive even though its documentation claims that it is prioritary over `frenchb` when calling `\usepackage[french]{babel}`?


title: Use stylistic set variations only for certain glyphs

text: Some fonts include stylistic variations of certain glyphs. But it seems like there is only a global switch for these alternates, as in this example from the `fontspec` manual:               \fontspec{Linux Libertine}     \textsc{a} \& h \\     \addfontfeature{Alternate=0}     \textsc{a} \& h      Is it possible to use stylistic alternates only for individual glyphs, e.g. only for the '&'-glyph?


title: BibTeX equivalent with CiteULike support?

text: There was recently a question about finding BibTeX formatted citations, which listed CiteULike. I would love to take the shortcut, and replace the BibTeX executable with _cultex_ , which takes CiteULike is replacement for the foo.bib file. Is there such a utility yet, and/or is there critical mass to develop such a BibTeX replacement?


title: Changing number within \numberwithin causes malfunction but no compile error

text: An interesting one here. It could be a bug or I might be missing a trick. In my thesis I use `\numberwithin{}{}` to have numbering done within sections. Top level is chapter, so it goes `<chapter>.<section>.<table counter>`. In my appendix, this is too much, so I only want numbering within the chapter i.e. `<chapter>.<table counter>`. Therefore numbering will run across different sections and the left most digit will go up when the chapter changes. However, if I use `\numberwithin` after the appendix, then it subtly messes up the numbering. It gets the number of indices correct, however, the right most index doesn't change. My guess is, that it is confused and is still thinking it should be changing the third index (which isn't printed). I have included a working example. Any one have a clue?               \documentclass{book}     \usepackage{amsmath}          \numberwithin{table}{section}          \begin{document}        \chapter{Thing}           \section{the first section}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \section{second section}                  \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}          \appendix     \numberwithin{table}{chapter}             \chapter{first appendix chapter}           \section{first appendix section}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \section{second appendix section}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}                \begin{table}[h!]           \caption{wib}              \begin{tabular}{c}              hello              \end{tabular}           \end{table}          \end{document}


title: Correcting TikZ code

text: foreach how to fix the code below so that the center of the figure is at the origin (0,0)?               \begin{tikzpicture}     \fill[blue] circle (2pt) node[right] {$(0,0)$};     \draw (-3,1) -- (3,1);     \draw[blue] (-3,-2) -- (3,4);     \foreach \x in {1,2,3}{         \foreach \y in {1,...,\x}{             \draw[|-|] (\x,\y) -- ++(0,1);         };     };     \foreach \x in {1,2,3}{         \foreach \y in {1,...,\x}{             \draw[|-|] (-\x,-\y+1) -- ++(0,1);         };     };     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/CR4eY.png) how to minimize the code? I minimize the code? See:               \begin{tikzpicture}     \fill[blue] circle (2pt) node[below right] {$(0,0)$};     \begin{scope}[yshift=-1cm]     \draw (-3,1) -- (3,1);     \draw[blue] (-3,-2) -- (3,4);          \foreach \x in {1,2,3}{         \foreach \y in {1,...,\x}{             \draw[|-|] (\x,\y) -- ++(0,1);             \draw[|-|] (-\x,-\y+1) -- ++(0,1);         };     };     \end{scope}     \end{tikzpicture}


title: Adding a chapter title for indices (multind) on the same page as the first index is printed

text: I am trying to add a chapter title 'Indices' before the first multind index is printed. However, printindex flushes the page so if I do it, I will get the title, rest of the page empty, and the first index. I would like to have the 'Indices' title and then the first index printed immediately below it, then the second index beginning normally with a flushed page. So, instead of:               -------------    -------------    -------------    -------------     |           |    |           |    |           |    |           |     |  Indices  |    |  Names    |    | ---- ---- |    |  Places   |     |           |    | ---- ---- |    | ---- ---- |    | ---- ---- |     |           |    | ---- ---- |    | ---- ---- |    | ---- ---- |     |           |    | ---- ---- |    | ---- ---- |    | ---- ---- |     |           |    | ---- ---- |    |           |    | ---- ---- |     |    124    |    |    125    |    |    126    |    |    127    |     |-----------|    |-----------|    |-----------|    |-----------|      I want to achieve:               -------------    -------------    -------------    -------------     |           |    |           |    |           |    |           |     |  Indices  |    | ---- ---- |    | ---- ---- |    |  Places   |     |           |    | ---- ---- |    |           |    | ---- ---- |     |  Names    |    | ---- ---- |    |           |    | ---- ---- |     | ---- ---- |    | ---- ---- |    |           |    | ---- ---- |     | ---- ---- |    | ---- ---- |    |           |    | ---- ---- |     |    124    |    |    125    |    |    126    |    |    127    |     |-----------|    |-----------|    |-----------|    |-----------|      I am using book. Any help will be much appreciated. MWE:               \documentclass{book}          \usepackage{multind}     \makeindex{names}     \makeindex{places}          \usepackage{lipsum}               \begin{document}               \chapter{Chapter one}     \index{names}{John}\index{places}{London}     \lipsum     \index{names}{Tim}\index{places}{York}               \chapter{Chapter two}     \index{names}{John}\index{places}{York}     \lipsum     \index{names}{Tim}\index{places}{London}          \chapter*{Indices}     \printindex{names}{Index of names}     \printindex{places}{Index of places}          \end{document}


title: Verse package typesets in the left margin

text: When using the `verse` environment with the `verse` package, the `\flagverse` are typeset in the margin:               \begin{verse}     \begin{altverse}     \flagverse{1.} Quel est l'enfant qui est né ce soir\\     Inconnu des grands de la terre ?\\     Quel est l'enfant qui est né ce soir\\     Que les pauvres ont voulu recevoir.     \end{altverse}          \begin{altverse}     \flagverse{\textsc{Refrain≡}} Il suffit d'un enfant ce soir\\     Pour unir le ciel et la terre.\\     Il suffit d'un enfant ce soir\\     Pour changer notre vie en espoir.     \end{altverse}          \begin{altverse}     \flagverse{2.} Quel est l'enfant qui est né ce soir\\     Pour changer la nuit en lumière.\\     Quel est l'enfant qui est né ce soir\\     Tout joyeux comme un feu dans le noir.     \end{altverse}          \begin{altverse}     \flagverse{3.} Quel est l'enfant qui est né ce soir\\     Au delà de toutes frontières.\\     Quel est l'enfant qui est né ce soir\\     Sinon Dieu que je peux recevoir     \end{altverse}     \end{verse}      ![flagverse in margin](http://i.stack.imgur.com/pmr20.png) How can this be avoided?


title: Fix overfull hbox floatrow

text: When using the `floatrow` package to layout figures with the caption to the side, I get a overfull `\hbox` errors.               Overfull \hbox (3.33331pt too wide) in paragraph at lines 23--23      If I set `\FBwidth-1` on each `\ffigbox` the error goes away. Hackish? I have many figures that will be done this way, what is the proper way to do the `\subfloatrow` so this doesn't happen? ![output](http://i.stack.imgur.com/HDQfK.png)               \documentclass[draft]{article}     \usepackage{graphicx}     \usepackage{floatrow}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{lipsum}     \usepackage{calc}     \begin{document}          \lipsum[1]          \begin{figure}       \thisfloatsetup{valign=t,heightadjust=all}       \fcapside[0.7\textwidth]{\fboxsep-1pt%         \begin{subfloatrow}[3]           \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15a}}{\includegraphics[width=\hsize]{sample1}}%           \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15b}}{\includegraphics[width=\hsize]{sample2}}%           \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15b}}{\includegraphics[width=\hsize]{sample3}}%         \end{subfloatrow}       }{         \caption{Horizontal sub-figures, top aligned}%         \label{fig:test15}%       }     \end{figure}          \end{document}


title: Consistent formatting of short index page ranges

text: MakeIndex allows for special formatting of ranges of two, three, or more than three consecutive pages within index entries. One may (with the help of `.ist` style files) change the range delimiter (by default `\--`) or replace delimiter and end page with a suffix like "sqq.". It is also possible to specify a "ranged" index reference for longer text blocks, using, e.g., `\index{bla-par|(}` at the start and `\index{bla-par|)}` at the end of the block. However, formatting of index ranges of exactly two pages is inconsistent: Those created by two "standard" index references on two consecutive pages will use `,` as delimiter (unlike for longer ranges), while those created by a"ranged" reference will use `\--`. What must be done that either `,` or `\--` will be consistently used for all ranges of exactly two pages?               \documentclass{article}          \usepackage{makeidx}     \makeindex          \begin{document}          Some text.\index{bla}\index{foo}\index{gnu}%         \index{bla-par|(}\index{bla-par|)}\index{foo-par|(}\index{gnu-par|(}          \clearpage          Some text.\index{foo}\index{gnu}\index{foo-par|)}          \clearpage          Some text.\index{gnu}\index{gnu-par|)}          \printindex          \end{document}      ![enter image description here](http://i.stack.imgur.com/V2On3.jpg)


title: Automatic completion of common functions in TeXShop?

text: Is there a way to allow TeXShop complete common functions to avoid typing the same word multiple times ? For example, when you type `\sub` , TeXShop would automatically provide options to complete the word for you. So that you type `\sub` - [ Press TAB ] - `\subsection` .. I find it tedious to type down common functions repeatedly.


title: Having a LaTeX PDF display the date the document was printed, not compiled...

text: I have been looking around for quite some time trying to find a way for a PDF (created using XeTeX) to adjust the date accordingly by the date it was printed - not compiled. I am familiar with `\date`, `\datedate`, `datenumber` & `datetime` packages, etc. but these are not what I want. I also found a page in tex.stackexchange.com, which I mostly do not understand ( Date of file creation ) that was getting closer to what I want but not exactly. Oh, by the way, it would be great if it was platform independent as not all employees have the same computer. The idea here is to create time-sheets for employees that they can print off before work and have the date automatically created for them. Here is the rough (really) draft of the time sheet (most of the comments are me playing around with some new-to-me techniques involving the `pgf`/`tikz` packages - irrelevant): Thanks very much and hope it is clear!               \documentclass[10pt,onecolumn,usenames,dvipsnames]{amsart}     \usepackage{tikz}     \usepackage{pgf}     \usepackage{pgfkeys}     \usetikzlibrary{       chains,       arrows,       shapes.misc,       shapes.arrows,       matrix,       positioning,       scopes,       decorations.pathmorphing,       shadows%     }     \usetikzlibrary{snakes}     \usepackage[hmargin=1.5cm, vmargin=1.50cm]{geometry}     \geometry{top=0.5cm}     \geometry{left=0.5cm}     \geometry{right=0.5cm}     \usepackage{bbding}     \usepackage{amssymb}     \usepackage{amsmath,fp}     \usepackage{algorithm2e}     \usepackage{eurosym}     \usepackage{color,graphicx}     \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Hoefler Text}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}     \usepackage{hyperref}     \definecolor{linkcolour}{HTML}{FF0080}     \definecolor{shade}{HTML}{D4D7FE}     \definecolor{text1}{HTML}{2b2b2b}            \definecolor{headings}{HTML}{701112}      \hypersetup{    colorlinks,breaklinks,                 urlcolor=linkcolour,                  linkcolor=linkcolour}     \usepackage{fancyhdr}                \pagestyle{fancy}     \fancyhf{}     \rfoot{\color{headings} {\sffamily Last update: \today}. Typeset with X\LaTeX}     \renewcommand{\headrulewidth}{0pt}     \usepackage{titlesec}                    \titleformat{\section}         {\color{headings}             \scshape \Large\raggedright}{}{0em}{}[\color{blue}\titlerule]     \titlespacing{\section}{0pt}{0pt}{5pt}     \usepackage[yyyymmdd,hhmmss]{datetime}     \usepackage{datenumber}     \usepackage{fancyhdr}     \pagestyle{fancy}     \rfoot{Compiled on \today\ at \currenttime}     \cfoot{}     \lfoot{Page \thepage}     \usepackage{ifthen}     \begin{document}          \color{text1}           \centering     \par{\centering{     { \addfontfeature{LetterSpace=20.0}\fontsize{20}{20}\selectfont \scshape {\underline{To Do $\backslash$ Did}} }}     }\\[6mm]         {\color{white} \hrule}           \begin{minipage}[t]{0.25\textwidth}         \section{Timeline}             \begin{tikzpicture}                 \draw[snake](0,40pt) -- (0,0);                 \draw (0,20pt) node[left=10pt]{\datedate};                 \draw (0,10pt) node[left=10pt]{Worked On:};                      \draw(0 pt, 0 pt) -- (0 pt, -600 pt);                               \foreach \y [count=\yi] in {-30,-54,...,-570}{                          \draw (3 pt, \y pt) -- ( -3pt, \y pt);                               \draw (0 pt, .1\y pt) -- (-60 pt,  .1\y + 1 pt ) node[midway,above]{[\hspace{1.5cm}]};                       \draw (0 pt, 0.1\y pt) -- (100 pt, 0.1\y + 20 pt) node[midway,sloped,below]{};                     }                  \end{tikzpicture}          \end{minipage}     \hfill     \begin{minipage}[t]{0.25\textwidth}         \vspace{21mm}             \foreach \a/\b/\z [count=\ai,count=\bi,count=\zi] in {1,...,23}                 {                 \ifthenelse{\ai<13}                     {                     \ifthenelse{\isodd{\ai}}                         {                                                                                \FPdiv\c{\ai}{2} \FPadd\c{\c}{6} \FPupn\c{\c{} 0 round} $\FPprint\c$:                              \ifthenelse{\bi=2}                                 {$30$}                                 {$00$}                         }                         {                                                                                \FPdiv\c{\ai}{2}    \FPadd\c{\c}{6}    \FPupn\c{\c{} 0 round}    $\FPprint\c$:$30$                         } to                              \ifthenelse{\isodd{\zi}}                                 {                                 \FPdiv\c{\zi}{2}    \FPadd\c{\c}{6}    \FPupn\c{\c{} 0 round}    $\FPprint\c$:$30$                                 }                                 {                                 \FPdiv\c{\zi}{2}    \ifthenelse{\zi<12}{\FPadd\c{\c}{7}}{\FPadd\c{\c}{-5}}    \FPupn\c{\c{} 0 round}    $\FPprint\c$: %interior \ifthenelse takes care of 12:30 - 1:00                                     \ifthenelse{\zi=1}                                     {$30$}                                     {$00$}                                 }                                 \\\\                     }                     {                     \ifthenelse{\isodd{\ai}}                         {                                                                                \FPdiv\c{\ai}{2}    \FPadd\c{\c}{-6}    \FPupn\c{\c{} 0 round}    $\FPprint\c$:$00$                         }                         {                                                                                \FPdiv\c{\ai}{2}    \FPadd\c{\c}{-6}    \FPupn\c{\c{} 0 round} $\FPprint\c$:                              \ifthenelse{\bi=2}                             {$00$}                             {$30$}                         }  --                             \ifthenelse{\isodd{\zi}}                                 {                                 \FPdiv\c{\zi}{2} \FPadd\c{\c}{-6} \FPupn\c{\c{} 0 round} $\FPprint\c$:$30$                                 }                                 {                                 \FPdiv\c{\zi}{2}    \ifthenelse{\zi<12}{\FPadd\c{\c}{7}}{\FPadd\c{\c}{-5}}    \FPupn\c{\c{} 0 round}    $\FPprint\c$: %interior \ifthenelse takes care of 12:30 - 1:00                                     \ifthenelse{\zi=1}                                     {$30$}                                     {$00$}                                 }                                 \\\\                                             }                 }        \end{minipage}     \hfill     \begin{minipage}[t]{0.38\textwidth}         \section{Description}             \begin{enumerate}             \item Move old tires and wheels into grey round bin north of shop.             \item Move small LP tanks into quonset             \item Drill and tap threads into quonset door frame             \item Wire brush wheel and mount two tires for water trailer             \item Clean up paint gun (air)             \item Clean up yard of garbage and lumber             \item Stack wood by container on west side of quonset             \end{enumerate}               \end{minipage}               \newpage     \begin{minipage}[t]{0.45\textwidth}               \section{Timeline}                  \begin{tikzpicture}                 \draw[snake] (0,40pt) -- (0,0);                 \draw (0,20pt) node[left=10pt] {Prior to sale. $\Bigg\{$};                      \draw (0 pt,0 pt) -- (0 pt,-400 pt);                 \foreach \y in {40,0,-40,-80, -120, -160, -200, -240}                 \draw (3pt, \y pt) -- ( -3pt, \y pt);                      \draw (0,0) node[left=10pt] {XX/XX/2011};                      \draw (0 pt,-40 pt) node[left=10pt] {XX/XX/2011};                 \draw (0 pt, -40 pt) -- (40:4) node[midway,sloped,below]{start of .};                  \draw (0 pt, -40 pt) node[below=0pt]{\hspace{4cm} Pur};                 \draw (0 pt, -40 pt) node[below=10pt]{\hspace{4cm} arm, };                      \draw (0 pt, -80 pt) node[left=10pt] {XX/XX/2011};                       \draw (0 pt, -120 pt) node[left=10pt] {XX/XX/2011};                      \draw (0 pt, -160 pt) node[left=10pt] {XX/XX/2011};                      \draw (0 pt, -200 pt) node[left=10pt] {XX/XX/2011};                  \end{tikzpicture}               \end{minipage} %END of left-hand side minipage     \hfill     \begin{minipage}[t]{0.51\textwidth}         \section{Timeline Specifics}             \vspace{60pt}                  \begin{tikzpicture}[every on chain/.style=join,every join/.style=->,node distance=2mm and 1cm]             { [start chain=trunk]             \node[on chain]{A};             \node [on chain] {B};             { [start branch=numbers going below]             \node [on chain] {1};             \node [on chain] {2};             \node [on chain] {3};             }             { [start branch=greek going above]             \node [on chain] {$\alpha$};             \node [on chain] {$\beta$};             \node [on chain] {$\gamma$};             }             \node [on chain,join=with trunk/numbers-end,join=with trunk/greek-end] {C};             { [start branch=symbols going below]             \node [on chain] {$\star$};             \node [on chain] {$\circ$};             \node [on chain] {$\int$};             }             }             \end{tikzpicture}                  \makeatletter             \tikzset{join/.code=\tikzset{after node path={%             \ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%             edge[every join]#1(\tikzchaincurrent)\fi}}}             \makeatother                  \tikzset{>=stealth',every on chain/.append style={join},                      every join/.style={->}}             \centering                  \begin{tikzpicture}[start chain] {                 \node[on chain] {$0$};                     \node[on chain] {$A$} ;                     \node[on chain, join={node[above] {$\scriptstyle\varphi$}}] {$B$};                     \node[on chain, join={node[above] {$\scriptstyle\psi$}}] {$C$};                     \node[on chain] {$0$}; }             \end{tikzpicture}             \bigskip                  \begin{tikzpicture}                 \matrix (m) [matrix of math nodes, row sep=3em, column sep=3em]                     { 0 & A  & B  & C  & 0 \\                     0 & A' & B' & C' & 0 \\ };                 { [start chain] \chainin (m-1-1);                     \chainin (m-1-2);                     { [start branch=A] \chainin (m-2-2)                     [join={node[right] {$\scriptstyle\eta_1$}}];}                     \chainin (m-1-3) [join={node[above] {$\scriptstyle\varphi$}}];                     { [start branch=B] \chainin (m-2-3)                     [join={node[right] {$\scriptstyle\eta_2$}}];}                     \chainin (m-1-4) [join={node[above] {$\scriptstyle\psi$}}];                     { [start branch=C] \chainin (m-2-4)                     [join={node[right] {$\scriptstyle\eta_3$}}];}                     \chainin (m-1-5); }                 { [start chain] \chainin (m-2-1);                     \chainin (m-2-2);                     \chainin (m-2-3) [join={node[above] {$\scriptstyle\varphi'$}}];                     \chainin (m-2-4) [join={node[above] {$\scriptstyle\psi'$}}];                     \chainin (m-2-5); }             \end{tikzpicture}          \end{minipage}     \vspace{10pt}          \end{document}


title: Drawing lines between arbitrary words on a page

text: I try to get rid of tree-dvips and look for a way to do the following: Circle an arbitrary word on the page and draw an arrow from some other position at the page towards this circled word. In tree-dvips one can just simply declare a word a node and then use connection directives. I guess this can be done with pgf somehow, but the nodes seem to require a position in a coordinate system. This is the tree-dvips code:               \documentclass{scrbook}          \usepackage{tree-dvips}               \begin{document}          \begin{tabular}{lllllll}     \node{bazas}{bāz-a\v{s}} & agar & mi-xāh-i                       & fardâ    & \node{blk1}{} & bo-kon-i\\     open-\textsc{3sg}        & if   & \textsc{ipf}-want-\textsc{2sg} & tomorrow & {}                & \textsc{sbj}-do-\textsc{2sg}\\     \end{tabular}\\[2ex]     `If you want to open it tomorrow \ldots'     {\makedash{1pt} \nodeoval{bazas} \abarnodeconnect[-18pt]{blk1}{bazas}}                    \end{document}


title: siunitx | Alignments in Table

text: Consider the following (refined) MWE:               \documentclass{article}     \usepackage[locale=DE]{siunitx}     \usepackage{booktabs}          \begin{document}          \begin{table}     \centering      \caption{S{\o}vnm{\ae}ngde blandt elever i niende klasse.}      \label{tbl:2}      \begin{tabular}{        S[table-format = 1.1]        S[table-format = 2.0]        S[table-format = 2.0]<{{\,\si{\percent}}}        S[table-format = 2.0]        S[table-format = 2.0]<{{\,\si{\percent}}}       }       \toprule        {Antal timer} &        \multicolumn{2}{c}{Andel af eleverne fra 9.~A} &        \multicolumn{2}{c}{Andel af eleverne fra 9.~B}   \\       \midrule            & {Abs.} & \multicolumn{1}{c}{Rel.} & {Abs.} & \multicolumn{1}{c}{Rel.} \\       \midrule        6.5 &  1     &   4    &   0    &   0 \cr        7   &  4     &  16    &   2    &  10 \cr        7.5 & 99     &  12    &   3    &  15 \cr       \bottomrule      \end{tabular}     \end{table}          \end{document}      I try to put three columns (instead of two), i.e. also one with integers, under each of ''Something random B'' and ''Something random C''. (I need both absolute and relative values under ''Something random B'' and ''Something random C''.) How do I do this? @Joseph Wright: An trivial extension of your code is not obvious to me. P.S. Sorry for not asking the right question the first time. **Update:** I have modified the code. Now it compiles fine, but the columns with ''Abs.'' numbers and ''Rel.'' numbers+units are not centered properly under ''Andel af eleverne fra 9. A'' and ''Andel af eleverne fra 9. B'', resp. Also, the numbers and numbers+units seem not to be directly under ''Abs.'' and ''Rel.'', resp. How do I fix this? **Update 2:** Clemens Niederberger helped me with a solution at the LaTeX Community, here.


title: How to use \csname ... \endcsname with \ref?

text: I have to get value of a dynamical macro where the index is given by `\ref{mymarker}`. Is it possible to do? I define a set of macros with a predefined counter 'mycounter' as               \expandafter\newcommand\csname mymacro\the\value{mycounter} \endcsname{mytext}       where 'mytext' depends on the value of counter. After that I define a new command               \newcommand{\anotherref}[1]{\csname mymacro\ref{#1} \endcsname}      the code like               \anotherref{mymarker}      does not work. The idea is that this command should give not the counter value related to 'mymarker', like `\ref{mymarker}` gives, but rather the text 'mytext', which is also related to 'mymarker'.


title: How to accept three different languages on lstlisting

text: How to accept three language different?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[brazil]{babel}     \usepackage{xcolor,tikz}     \usepackage{showexpl} % exibe codigos de figuras          % Definindo novas cores     \definecolor{amarelo}{rgb}{1,1,0.8}     \definecolor{verde}{rgb}{0,0.5,0}     \definecolor{cinza}{rgb}{.9,.9,.9}          % Configurando layout para mostrar codigos LaTeX     \usepackage{listings}     % explpreset eh usado no showexpl     % configurando para codigos das figuras     \lstset{explpreset={          language=[LaTeX]TeX,          basicstyle=\ttfamily\small,           identifierstyle=\color{black},           keywordstyle=\color{blue},           stringstyle=\color{verde},           commentstyle=\color{red},           extendedchars=true,           showspaces=false,           showstringspaces=false,           numbers=none,          %numberstyle=\tiny,          breaklines=true,           backgroundcolor=\color{amarelo},           breakautoindent=true,           captionpos=b,          xleftmargin=0pt,          frame=none,   %%frame=single          rframe={}       }, % configurando para codigos LaTeX          language=[LaTeX]TeX,          basicstyle=\ttfamily\small,           identifierstyle=\color{black},           keywordstyle=\color{blue},           stringstyle=\color{verde},           commentstyle=\color{red},           extendedchars=true,           showspaces=false,           showstringspaces=false,           numbers=left,          numberstyle=\tiny,           breaklines=true,           backgroundcolor=\color{cinza},           breakautoindent=true,           captionpos=b,          xleftmargin=0pt,     }          \definecolor{javared}{rgb}{0.6,0,0} % for strings     \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments     \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords     \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc          \lstset{language=Java,     basicstyle=\ttfamily,     keywordstyle=\color{javapurple}\bfseries,     stringstyle=\color{javared},     commentstyle=\color{javagreen},     morecomment=[s][\color{javadocblue}]{/**}{*/},     numbers=left,     numberstyle=\tiny\color{black},     numbersep=10pt,     tabsize=4,     showspaces=false,     showstringspaces=false}          \begin{document}          \begin{lstlisting}     \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[brazil]{babel}     \usepackage{lipsum}     % Definindo novas cores     \definecolor{amarelo}{rgb}{1,1,0.8}     \definecolor{verde}{rgb}{0,0.5,0}     \definecolor{cinza}{rgb}{.9,.9,.9}     \begin{document}      \lipsum     \end{document}     \end{lstlisting}          \begin{lstlisting}     public class HelloWorldApp {          public static void main (String argv[])          {               // Display string               System.out.println("Hello World!");          }     }     \end{lstlisting}          % requer o pacote showexpl     \begin{LTXexample}[width=4cm]     \begin{tikzpicture}       \draw circle (1);     \end{tikzpicture}     \end{LTXexample}          \end{document}      I need LaTeX, Java and LTXexample. But LaTeX is gray, and Java is blue, and LTXexample is yellow.


title: Prevent Beamer from printing frame for empty Biblatex bibliography

text: ## Problem description In standard document classes such as `article`, Biblatex's `\printbibliography` conveniently does not create any output if there are no cited items, i.e., if the bibliography would be empty. In a `beamer` document, however, I need to build a frame around any bibliography, i.e.:               \begin{frame}       \printbibliography     \end{frame}      This means that if the bibliography itself is empty, an empty frame will still be produced at that stage. ## Question I would like to prevent Beamer from printing such an empty frame in case of an empty bibliography. How can I achieve this? ## Use case This is for a multi-lecture Beamer/Biblatex setup, where a `\newrefsection` is issued at the beginning of each lecture, and a bibliography is to be generated automatically at the end of each lecture. The problem arises because not every lecture might feature citations. Using BibTeX instead of Biblatex is _not_ an option. ## Possible strategy? Elsewhere it has been suggested to exploit Biblatex' `\blx@warn@bibempty` warning message to generate output whenever the bibliography is empty. But I am facing the opposite problem: I need to produce output only if the bibliography is _not_ empty. My attempts to check the warning message itself for emptiness have been unsuccessful so far. ## Minimal non-working example               \documentclass{beamer}          \begin{filecontents}{\jobname.bib}     @book{foo,       author = {Someone},       title = {Something},       date = {1970},       pages = {99},       publisher = {Some Press},       edition = {1},     }     \end{filecontents}          \usepackage[backend=biber]{biblatex}     \addbibresource{\jobname}          \begin{document}          \begin{frame}{This frame should not be printed at all}       \newrefsection      % Starting a new refsection, but not citing anything...       \printbibliography  % ... should result in an empty frame, not just an empty bibliography       \newrefsection      % Start another refsection for next bibliography     \end{frame}          \begin{frame}{Frame with a citation}       This frame is just here to cite something: \cite{foo}     \end{frame}          \begin{frame}{This frame should be printed}       \printbibliography  % This bibliography is not empty, so it's ok to print the frame     \end{frame}          \end{document}


title: What does \secdef do?

text: The definition of the `chapter` command in KOMA-class `scrbook` is:               \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi       \thispagestyle{\chapterpagestyle}%       \global\@topnum\z@       \@afterindentfalse       \secdef\@chapter\@schapter     }      I am wondering what `\secdef` does.


title: Using psplot, graphs won't appear on page 2

text: The following code seems to work (I'm using Texmaker and MiKTeX):               \documentclass[12pt,letterpaper]{article}     \usepackage{pstricks}     \usepackage{pst-plot}          \begin{document}          \begin{center}     \psset{unit=.4cm}     \begin{pspicture}(-11,-11)(11,11)     \psaxes[Dx=5,Dy=5](0,0)(-11,-11)(11,11)     \psplot[plotstyle=curve,linecolor=red]{-2}{2}{2 x 2 exp mul}      \end{pspicture}     \end{center}          \begin{center}     \psset{unit=.4cm}     \begin{pspicture}(-11,-11)(11,11)     \psaxes[Dx=5,Dy=5](0,0)(-11,-11)(11,11)     \psplot[plotstyle=curve,linecolor=red]{-2}{2}{x 3 exp}      \end{pspicture}     \end{center}          \end{document}      I get two graphs on one page. BUT if I change the psset commands to .5cm, so that the second graph is forced to appear on page 2, I get a MiKTeX problem report, as follows:               MiKTeX Problem Report     Message: Some PostScript specials could not be rendered.     Data: Error: /undefined in tx@Dict     Operand stack:        --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--        2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false        1   %stopped_push   1914   1   3   %oparray_pop   1913   1   3   %oparray_pop        1897   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--        %errorexec_pop   .runexec2   --nostringval--   --nostringval--  --nostringval--        2   %stopped_push   --nostringval--     Dictionary stack:        --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--        --dict:95/300(L)--   --dict:37/200(L)--     Current allocation mode is local     MiKTeX GPL Ghostscript  9.00: Unrecoverable error, exit code 1          Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp     Line: 372     MiKTeX: 2.9     OS: Microsoft Windows 7 Business Edition, 64-bit Service Pack 1 (build 7601)     Invokers: explorer/texmaker     SystemAdmin: yes     PowerUser: no     Root0: C:\Users\Ken\AppData\Roaming\MiKTeX\2.9     Root1: C:\Users\Ken\AppData\Local\MiKTeX\2.9     Root2: C:\ProgramData\MiKTeX\2.9     Root3: C:\Program Files (x86)\MiKTeX 2.9     UserInstall: C:\Users\Ken\AppData\Roaming\MiKTeX\2.9     UserConfig: C:\Users\Ken\AppData\Roaming\MiKTeX\2.9     UserData: C:\Users\Ken\AppData\Local\MiKTeX\2.9     CommonInstall: C:\Program Files (x86)\MiKTeX 2.9     CommonConfig: C:\ProgramData\MiKTeX\2.9     CommonData: C:\ProgramData\MiKTeX\2.9      I'm new to this. Can anybody help me understand what is going on?


title: How can I get capital Angstrom symbol to appear in bibliography (using .bib file and natbib)?

text: I have search all around but cannot seem to find the solution for getting a capital angstrom symbol (an "A" with a small circle above it) to appear in the bibliography of my dissertation. Instead, it appears as lower case "a" with circle above it. The \AA command works just fine to generate the capital Angstrom symbol in the actual flow of my dissertation, but for some reason it doesn't work when used in the .bib file. Can someone point me to the corresponding command to get the capital Angstrom symbol to display properly in the .bib file?


title: xkeyval error: 'defernums' undefined in families

text: Relative noob in LaTeX, and I'm trying to adapt an existing (public) template (with attribution) to my own needs, and the first step is gutting all the project specific code and setting up the environment so it builds. But, I'm getting this error on build (with texclipse, but same with from console) with no specific line number               Description Resource    Path    Location    Type     Package xkeyval Error: `defernums' undefined in families `blx@opt@pre'. \blx@processoptions (followed by: ) (Occurance: /usr/local/texlive/2011/texmf-dist/tex/latex/biblatex/biblatex.sty) thesis.tex  /mythesis   Unknown Texlipse Build Error      But I don't understand what's going wrong; this appears to be complaining about one of the texlive provided style files for biblatex... And I don't really want to be fiddling with those unless I know what I'm doing. Anyone got any pointers? The only section of my own custom sty file that deals with biblatex is               %% biblatex     \usepackage[       hyperref,backref,sortcites,       defernums=true,       date=short,       bibencoding=inputenc,       maxnames=3,       minnames=2,       firstinits=true,       sorting=nyt,       bibstyle=numeric,       citestyle=numeric-comp,     ]{biblatex}     \def\bibfont{\small}     \bibliography{journals,phd,library}     \renewcommand\bibname{References}      For the full sty see `here`, with the sample case consisting of               \documentclass[11pt,a4paper]{memoir}     \usepackage{thesis-preamble}     %\includeonly{magnet-design}     \EndPreamble     \begin{document}     \title{helloworld}     \end{document}


title: Undefined control sequence with pgfgantt package when creating Gantt chart

text: I'm attempting to make a Gantt chart in my LaTeX document with the `pgfgantt` package. However, when I try to compile, it gives me undefined control sequence at the first `\gantttitle` between the `{7}` and `\\\`:               \begin{ganttchart}{7}       \gantttitle{2012}{7} \\        \gantttitlelist{1,...,7}{1} \\       \ganttgroup{Planning}{1}{1} \\       \ganttbar{Write Wiki page}{1}{1} \\       \ganttmilestone{Wiki page complete}{1} \\       \ganttgroup{Coding}{2}{6} \\       \ganttbar{Code new monitoring into the proxy}{2}{3} \\       \ganttbar{Code new database changes}{4}{5} \\       \ganttbar{Code new notifications{5}{6} \\       \ganttmilestone{All new functionality complete}{6} \\       \ganttgroup{Testing and Deployment}{6}{7} \\       \ganttbar{Write tests}{6}{7} \\       \ganttbar{Deploy system}{7}{7} \\       \ganttmilestone{Complete system up and running}{7}     \end{ganttchart}      If I comment out the `\gantttitle`, it just gives me an error on `\ganttitlelist`. I included the `\usepackage{pgfgantt}` at the beginning. Any ideas?


title: Escape code \"{u} for umlaut gives Runaway argument? error

text: I'm using the escape code `\"{u}` in my .bib file to indicate umlauted 'ü'. When I compile my document, however, I get the following error:               Runaway argument?     {Phonetische studien. Zeitschrift f\}. \par \end {thebibliography}      ! File ended while scanning use of \emph .      Where the umlaut 'ü' is supposed to be in 'Zeitschrift für ...'. Other espace codes work fine, however, such as `\'{u}` for ù. I assume it has something to do with the preamble of my main document, but I have no idea how to figure out how to fix it (googling didn't help). Here's my preamble:               \documentclass[letterpaper, 12pt, onecolumn, notitlepage]{article}     \usepackage[margin = 1in]{geometry} % set margins     \pagestyle{myheadings} % page numbers in top right corner     \linespread{1.6} % double spacing throughout the document     \usepackage[hang, flushmargin]{footmisc} % no indent in footnotes     \usepackage{lmodern} % font     \usepackage{linguex} % for \ex. (numbered examples)     \usepackage{tipa} % for \textipa (IPA symbols)     \usepackage[normalem]{ulem} % for \uline     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \renewcommand{\textipa}[1]{{\fontencoding{T3}\fontfamily{cmr}\selectfont#1}} % this prevents the \textipa command from trying to employ lmodern (which it cannot do). The effect is only that a warning message about it won't appear.     \usepackage{natbib} % package for bibliography     \bibpunct{}{}{,}{a}{}{,} % punctuation for citations     \date{} % date is not printed with title


title: Spanning columns with `\documentclass[twocolumn]{article}`

text: I started writing an article with the `multicol` package, and I like the results. However, I'd like to know how to reproduce some of the effects using `\documentclass[twocolumn]{article}`. For instance, I'd like to know how to make the title and abstract span the entire width of the paper (i.e. multiple columns). I'd also like to make footnotes span multiple columns, instead of being relegated to one side. In short, I'd like to see an example that demonstrates these effects.


title: How can I typeset a brace on the right-hand side of two equations?

text: How to obtein this on latex? ![enter image description here](http://i.stack.imgur.com/rJGLq.png) Thank you.


title: Linking Maple outputs to Latex

text: I'm doing a report in latex on matrices and matrix exponentials and have used maple to work out some results and do some checks. I need to show these results in my report on Latex,is there anyway I can export/link my maple outputs into latex?


title: Use amsplain, but sort by appearance in document, not bibtex file

text: I need to use the amsplain bibliography style (or an identical appearing style), but the sources need to be sorted by order of first appearance in the document, not how they are arranged in the bibtext file. How can I do this?


title: Beamer Mini-TOC

text: How can I make a TOC and section mini TOCs such that TOC at the beginning of the whole document shows sections and subsections, mini TOCs at the beginning of each subsection show only the very section that I'm showing now and subsections and subsubsections that belong to the subsection? I started from the template included in TexWorks for Mac. What I tried is `minitoc` package and `\secttoc` command. I got correct the whole TOC. But miniTOCs which should contain only that section and sub- and sub subsections is just the same as the entire TOC. I tried various combinations of the two numbers in the below `\setcounter` command, but the result only depends on 'tocdepth'. The part of the code I used and exemplary result I want to get is as follows.               \documentclass{beamer}     \mode<presentation>          \setcounter{secttocdepth}{2}     \AtBeginSubsection[]     {     \begin{frame}<beamer>{Outline}     \secttoc     \tableofcontents     \end{frame}     }          \setcounter{tocdepth}{2}     \dosecttoc     \tableofcontents      TOC I want to get is               Section 1      Subsection 1.1      Subsection 1.2     Section 2      Subsection 2.1      Subsection 2.2      sectTOCs I want to have at the beginning of Section 2.1 and Section 2.2.               Section 2      Subsection 2.1        Subsubsection 2.1.1        Subsubsection 2.1.2      Subsection 2.2        Subsubsection 2.2.1        Subsubsection 2.2.2


title: Different textwidths on first and following pages with scrlttr2

text: Is it possible to have diverging values for `\textwidth` on the first page and all other pages. On the first page I would like to set the width of the text to 12cm, on the following pages to 16cm.               \documentclass[ngerman,12pt]{scrlttr2}     \usepackage{babel,blindtext}          \setlength{\textwidth}{12cm}          \setkomavar{fromname}{Just me}     \setkomavar{fromaddress}{Just some place}          \begin{document}     \begin{letter}{Some one \\ Some Place}     \opening{fsdfsdafs}          \blindtext[5]          \closing{Best wishes}     \end{letter}     \end{document}


title: Referring to tikz picture again in the same document

text: _I couldn't really think of a reasonable title for this question; but anyhow, here goes:_ I saw a very interesting question and solution today here:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \thispagestyle{empty}     \usetikzlibrary{decorations.pathmorphing,shapes}     \tikzset{       treetop/.style = {         decoration={random steps, segment length=0.4mm},         decorate       },       trunk/.style = {         decoration={random steps, segment length=2mm, amplitude=0.2mm},         decorate       }     }          \begin{tikzpicture}     \foreach \w/\f in {0.3/30,0.2/50,0.1/70} {       \fill [brown!\f!black, trunk] (0,0) ++(-\w/2,0) rectangle +(\w,-3);     }     \foreach \n/\f in {1.4/40,1.2/50,1/60,0.8/70,0.6/80,0.4/90} {        \fill [green!\f!black, treetop] ellipse (\n/1.5 and \n);     }     \end{tikzpicture}     \end{document}      ![](http://i.stack.imgur.com/fhyCy.png) From this solution I would like to know if it was possible to copy this diagram `n` times by simply referring to the code shown. For example, if I was drawing a field, drawn as a simple horizontal line:               \begin{tikzpicture}     \draw(0,0) -- (10,0);     \end{tikzpicture}      Could I then repeat the tree drawn, say `4` times along this line to represent a portion of a forest, scaled accordingly? For example: ![](http://i.stack.imgur.com/h8TKO.png) Obviously these can be created by a simple for loop, however, I guess I'm just trying to find a way of re-applying the code for the tree numerous times.


title: tikz apply fill between two lines

text: Simple question: Is it possible to fill the following shape:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}     \begin{documet}     \begin{tikzpicture}     \draw [decorate,decoration = {snake,amplitude =.4mm, segment length = 5mm}] (0,0)--(10,0);     \draw (0,0)..controls(0,-1)and(10,-1)..(10,0);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uUV3g.png) Apologies if this question is rather simplistic.


title: pdf doesn't regenerate after upgrading mac to mavericks

text: I just upgraded my mac to mavericks and latex is not working anymore. Since I'm really no computer pro I have no idea how to make it work again. though everything is still there it's not regenerating the `.pdf` document saying: > /Users/clararohl/Library/TeXShop/Engines/alles.engine: line 3: pdflatex: > command not found /Users/clararohl/Library/TeXShop/Engines/alles.engine: > line 4: bibtex: command not found > /Users/clararohl/Library/TeXShop/Engines/alles.engine: line 5: makeindex: > command not found /Users/clararohl/Library/TeXShop/Engines/alles.engine: > line 6: pdflatex: command not found > /Users/clararohl/Library/TeXShop/Engines/alles.engine: line 7: pdflatex: > command not found How can I fix this? i have no idea!!!!!!


title: \Underbar changing the style of font but \bar not, why?

text: The **x** alphabets should be of the same size and style. You can see below an ugly change in the style of **x**. How can I keep the font profile such as the size and style the same? ![enter image description here](http://i.stack.imgur.com/Mw0Yp.png) **Ugly example** where the size changes with `\frac{\bar x_i+\underbar x_i}{2}`. ![enter image description here](http://i.stack.imgur.com/f19rL.png) **Code**               \documentclass[a4paper,english,titlepage,12pt]{article}      \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsthm}     %For theorems     \usepackage{amssymb}    %For things, \mathbb R.     \usepackage{bm}         %For bolding with greek letters               \begin{document}          \begin{align}     l_i &= \bar x_i-\underbar x_i \\     \hat x_i &= 0.5 (\bar x_i+\underbar x_i)     \end{align}          \end{document}


title: Can't get this caption right (wrapfig + floatrow)

text: I'm trying to get a caption to span the figure width on a wrapfig environment. But for some reasons it just won't go. Here is my code and a graphical representation: ![problem](http://i.stack.imgur.com/1R6U9.png)               \begin{wrapfigure}{R}{0.3\textwidth}           \vspace{-30pt}       \label{fig:UbiContentClass}       \ffigbox[\textwidth]       {         \caption{A classe que define Conteúdo Ubíquo}       }       {         \includegraphics[width=\textwidth]{figs/UbiContentClass.png}       }       \vspace{-20pt}     \end{wrapfigure}


title: Adjusting Vertical Spacing between a listing and its Caption

text: I am very new to LaTeX. I am inserting a listing as follows:               \lstinputlisting[float=hk,                      caption=My Caption comes here,                       captionpos=b,                      label=MyLabel]{media/MyFile.xml}      _media_ is my project directory where all my files and images are stored. One of those files is _MyFile.xml_ which is a code snippet. The problem is the caption of this listing is very close to it. I would like to add some spacing between the two of them. Any pointers?


title: How to properly code a TeX file, or at least avoid `badness 10000`

text: I'm coding a TeX file and although the .pdf is correctly rendered, I'm using "stone age" tools to code it. As some examples, I use `\\\` to leave a line space between two paragraphs, or `\noindent` in every paragraph I start. Basically, I'm just using the basic TeX data I have to code a paper, but I'm sure there are things that can be replaced with much better and appropriate codes, since I get `badness 10000`. This is the console:               *geometry* detected driver: pdftex     ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")     ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")     Underfull \hbox (badness 10000) in paragraph at lines 10--11     [1{C:/Documents and Settings/All Users/Datos de programa/MiKTeX/2.9/pdftex/conf     ig/pdftex.map}]     Overfull \hbox (10.8009pt too wide) detected at line 49     \OML/cmm/m/it/14.4  [] \OT1/cmr/m/n/14.4 + 1 = [] [] \OML/cmm/m/it/14.4 x \OT1     /cmr/m/n/14.4 + [] [] \OML/cmm/m/it/14.4 x     [2]     Overfull \hbox (26.66542pt too wide) in alignment at lines 80--82      [][][] []     [3]     Overfull \hbox (23.60692pt too wide) detected at line 90     \OML/cmm/m/it/14.4  [] \OMS/cmsy/m/n/14.4 ><C:/Archivos de programa/MiKTeX 2     .9/fonts/type1/public/amsfonts/symbols/msbm10.pfb>      How could I clean up these errors, which I'm guessing are basic?


title: unable to add page number on newlmf document

text: I tried to follow all advice I could find, esp. How can I add "page # of ##" on my document?, but somehow have been unsuccessful in inserting page numbers into my cover letter. Is the method different for `newlfm` documents, please?               \documentclass[10pt,stdletter,dateno,sigleft]{newlfm} % Extra options: 'sigleft' for a left-aligned signature, 'stdletternofrom' to remove the from address, 'letterpaper' for US letter paper - consult the newlfm class manual for more options          \usepackage{charter} % Use the Charter font for the document text     \sloppy     \newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in}     \includegraphics[width=1.2\linewidth]{logo.png}}} % Company/institution logo at the top left of the page     \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}          \newlfmP{sigsize=50pt} % Slightly decrease the height of the signature field     \newlfmP{addrfromphone} % Print a phone number under the sender's address     \newlfmP{addrfromemail} % Print an email address under the sender's address     \PhrPhone{Phone} % Customize the "Telephone" text     \PhrEmail{Email} % Customize the "E-mail" text          \lthUiuc % Print the company/institution logo          %----------------------------------------------------------------------------------------     %   YOUR NAME AND CONTACT INFORMATION     %----------------------------------------------------------------------------------------          \namefrom{John Smith} % Name          \addrfrom{     \today\\[12pt] % Date     123 Broadway \\ % Address     City, State 12345     }          \phonefrom{(000) 111-1111} % Phone number          \emailfrom{john@smith.com} % Email address          %----------------------------------------------------------------------------------------     %   ADDRESSEE AND GREETING/CLOSING     %----------------------------------------------------------------------------------------          \greetto{Dear Mrs. Smith,} % Greeting text     \closeline{Sincerely yours,} % Closing text          \nameto{Mrs. Jane Smith} % Addressee of the letter above the to address          \addrto{     Recruitment Officer \\ % To address     The Corporation \\     123 Pleasant Lane \\     City, State 12345     }          %----------------------------------------------------------------------------------------          \begin{document}     \begin{newlfm}          %----------------------------------------------------------------------------------------     %   LETTER CONTENT     %----------------------------------------------------------------------------------------          PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening (i.e. career development center, newspaper, employment service, personal contact).          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications.           PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter and offer assistance to help in a speedy response. For example, state that you will be in the city where the company is located on a certain date and would like to set up an interview. Alternatively, state that you will call on a certain date to set up an interview. End the letter by thanking the employer for taking time to consider your credentials.           %----------------------------------------------------------------------------------------          \end{newlfm}     \end{document}


title: Full page table template

text: I am making a manual with LaTeX and at the end of the manual I want to insert a full-page blank table where I can have people sign to acknowledge that they have read the manual. Currently I am doing this:               \section{Sign on sheet}     % NOTE: This is a very messy way of making a one page table.     \begin{tabularx}{\textwidth}{|+l|^X|^l|^X|}          \hline     \rowstyle{\bfseries}     Date & Name & Signature \\\hline\hline     1 January 2012 & John Citizen & XXXXXXXXX \\\hline     & & \\[0.4cm]\hline     & & \\[0.4cm]\hline     ...     & & \\[0.4cm]\hline     \end{tabularx}      And I have to play around with the number of lines to make it fill the page. I use `\\\\[0.4cm]` to make the rows a little larger to leave space for handwriting when the document is printed. Is there a better way to do this?


title: Automatic \rule width

text: Suppose I have some title text that I format as follows:               \begin{center}      {\small Brief Notes on}\\[-0.2em]      Some Topic of Questionable Interest\\[-0.6em]      \rule{12em}{0.75pt}     \end{center}      This produces two lines of text with a 12em-wide rule beneath them. Is there a way to get LaTeX to automatically adjust the length of the rule to be equal to that of the bottom line of text (plus some user-specified offset)?


title: How do I cross-reference custom labels in my enumitem lists without having the punctuation show up?

text: I am using `enumitem` to handle my enumerate and itemize lists. I have a list like               \begin{enumerate}[label=Step \arabic{enumi}.]     \item step the first \label{en:step-1}     \item el secundo \label{en:step-2}     \item item the third \label{en:step-3}     \end{enumerate}      When I cross-reference one of these items, the punctuation shows up in the document. For example,               Let us reference \ref{en:step-1}.      gives me               Let us reference Step1..      The regular enumerate or itemize environments don't have this problem; punctuation does not show up when cross-referencing. In the `enumitem` documentation there is an option `afterlabel` but that is only for inline lists. Is there an option in `enumitem`, or a way of using `enumitem` that adds the correct punctuation to the list, but lets me cross-reference the label without the punctuation?


title: Tree with six or more children

text: I'm using `qtree` and a tree with five children works perfectly:               \documentclass{standalone}     \usepackage{qtree}          \begin{document}          \Tree[.n 1 2 3 4 5 ]          \end{document}      ![Tree with 5 children](http://i.stack.imgur.com/vMF3d.png) But when I add another node:               \documentclass{standalone}     \usepackage{qtree}          \begin{document}          \Tree[.n 1 2 3 4 5 6 ]          \end{document}      It prints a single `6`. Checking the package documentation (warning: pdf) there seems to be a constraint of 5 children per node, and the reason eludes me. What is the correct way to build such a tree?


title: Is there a package (like showlabels) for amsrefs?

text: I'd like `amsrefs` to print (in the bibliography, not with the actual citations, e.g. in the margin) the label used in the `\bib` and `\cite` commands (i.e., the first argument to `\bib`). I tried this:               \documentclass{article}          \usepackage{amsrefs}     \usepackage{lipsum}          \let\origbib=\bib     \def\bib#1#2#3{\llap{#1\qquad}\origbib{#1}{#2}{#3}}          \begin{document}          This: \cite{a} and that: \cite{b} are important papers.          \vspace{6\baselineskip}\lipsum[1-4] % to get a page break between papers in the bibliography          \begin{biblist}       \bib{a}{article}{         author={Someone},         title={A title},       }       \bib{b}{article}{         author={Another one},         title={Another title},       }     \end{biblist}          \end{document}      but it doesn't work very well (`\llap` is issued in vertical mode, and adding `\leavevmode` before causes some errors I don't have enough motivation to investigate due to the deadline... :-/). Adding `\vspace{-\baselineskip}` after the `\llap` helps a bit, but still the label for the _first_ entry on a page gets printed on the previous page. I can live with this, but I'm also wondering whether there's a better (also, more elegant) solution.


title: Disable miniframes but keep the background title rectangle on the title page

text: For aesthetic reasons, I would like to disable the text of the header bar on my title page. This is what I have : ![What I have](http://i.stack.imgur.com/QHjBc.png) And this is what I would like : ![What I want](http://i.stack.imgur.com/HopCj.png) Is there an easy way to do this ? I couldn't find anything other than `\begin{frame}[plain]` but this also removes the colored rectangles. Here is my current code :               \documentclass[xcolor=x11names,compress]{beamer}          \useoutertheme[subsection=false,shadow]{miniframes}     \useinnertheme{default}          \setbeamerfont{title like}{shape=\scshape}     \setbeamerfont{frametitle}{shape=\scshape}          \setbeamercolor*{lower separation line head}{bg=AntiqueWhite4}     \setbeamercolor*{normal text}{fg=black,bg=white}     \setbeamercolor*{alerted text}{fg=red}     \setbeamercolor*{example text}{fg=black}     \setbeamercolor*{structure}{fg=black}     \setbeamercolor*{palette tertiary}{fg=black,bg=black!10}     \setbeamercolor*{palette quaternary}{fg=black,bg=black!10}          \title{Presentation}          \begin{document}     \begin{frame}     \titlepage     \end{frame}          \section{Section 1}     \begin{frame}     \end{frame}          \section{Section 2}     \subsection{Sub 1}     \begin{frame}     \end{frame}          \subsection{Sub 2}     \begin{frame}     \end{frame}     \end{document}


title: Is there any way to disable automatic ('discretionary break') hyphenation, while allowing/forcing TeX to break some chosen words?

text: I have a large document with narrower paragraph width than regular (approx 5 average words long), and I want to disable hyphenation short of having the opportunity to allow hyphenation of chosen words (usually where TeX produces horribly overflowing boxes as a result of not being allowed hyphenation and not having enough tolerance). I know I can disable hyphenation with `\hyphenpenalty=10000` but then I cannot even get TeX to hyphenate anything, even explicitly (or do I?) **Essentially, I want a white-list hyphenation strategy**. No hyphenation of anything, except words of my choosing, in places of my choosing, in hyphenation pattern of my choosing. I have tried `\hyphenpenalty=9999` but that still allows TeX to occasionally hyphenate some words. I am on MikTex, and use Xetex and polyglossia, but I am not sure if it matters all that much. Thank you.


title: Want \section* to change the page header

text: In a `book`, I have several numbered sections followed by an unnumbered section. I have placed an `\addcontentsline` following the `\section*` that introduces the unnumbered section, so that it will appear (unnumbered) in the ToC; that works fine. However, the page headers for the unnumbered section are continued from the last numbered section. I am using `fancyhdr` with the following setup:               \pagestyle{fancy}     \fancyheadoffset{0in}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}          \fancyhf{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[C]{\bfseries \draftinfo}     \fancyhead[LO]{\sf\rightmark}     \fancyhead[RE]{\sf\leftmark}     \fancyfoot[C]{\bfseries \draftinfo}     \fancypagestyle{plain}{%       \fancyhead{} % get rid of headers       \renewcommand{\headrulewidth}{0pt} % and the line     }


title: Shading over a single page

text: ![enter image description here](http://i.stack.imgur.com/5chm6.png) I want to generate shading color in background for a single page. How can I implement this?


title: Is it possible to suppress all frame titles in beamer?

text: I would like to know if there is a `beamer` option to suppress all frame titles. I suspect not, since this may seem like an odd thing to do. The reason I want to do it is because I have to make two versions of a presentation -- one standard version, and one version with no frame titles, no margins, and possibly larger font. (I will import the second version into Prezi.) I am using an ifthen boolean to compile one or the other version, so I suppose I could start each frame as follows:               \ifthenelse{\boolean{prezi}}{     \begin{frame}{} % no frame title     }{     \begin{frame}{Here is my frame title}     }      but that seems a bit tedious.


title: How to enable LyX forward search with okular

text: The title says it. The instructions in http://wiki.lyx.org/LyX/SyncTeX no longer works for forward search. I think the PDF command: `okular --unique "file:$$o#src:$$n $$t"` is no longer working for new TeX software. Inverse search is workable though.


title: Multiple left margin bars using mdframed package

text: How can I get multiple left-margin bars using the `mdframed` package? I can get a single left bar using, e.g.               \documentclass{article}     \usepackage{mdframed}     \begin{document}     \begin{mdframed}[linewidth=1,topline=false,rightline=false,bottomline=false]     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed orci quis urna volutpat tincidunt. Praesent ultrices commodo auctor. Nunc vel nulla sed arcu aliquet faucibus quis nec ante. Nam elementum neque vitae sem fringilla a euismod eros malesuada. Duis orci eros, tincidunt et venenatis at, tristique in tortor     \end{mdframed}     \end{document}      with output ![enter image description here](http://i.stack.imgur.com/nSacU.png) The motivation for this question is to format email correspondence in LaTeX. So if an email cites a previous email that cites a previous email, two left bars will be needed.. To achieve this one could try to nest the `mdframed` environments to get something like ![enter image description here](http://i.stack.imgur.com/hSxTx.png) The problem with the latter is that `mdframed` environment does not allow page breaks for nested environments. It means that it will break down if the cited text takes up more than a page. If the enivronment is not nested, it allows page breaks though.. More specifically, for the general case, I would like to have an environment say `myframe` taking an integer argument that specifies the number of left bars to use. Such that I could write, for instance               \documentclass{article}     \usepackage{mdframed,lipsum}     \begin{document}     \def\numbars{3}     \begin{myframe}{\numbars}       \lipsum[1-10]     \end{myframe}     \end{document}


title: On-Screen resolution deteriorates in pdflatex if figures are included

text: When I put a figure into my document (doesn't have to be bitmap, PS does the trick as well, I think the distinction is color vs no color), the on-screen resolution of the text changes at the default level I'm viewing it. Basically the effect is that as soon a figure is included, the quality of the PDF seems to get worse. If I zoom in a bit, it gets better, but I'd of course like my PDFs to look properly in full-page mode as well... I don't know what setting this might be - maybe someone knows the phenomenon. Edit: The two screenshots below show the phenomenon with differents levels of zoom. The left is the "broken" one. The right one is how things look like when no figure is "near". ![Screenshot](http://i.stack.imgur.com/X9wsA.png) ![Screenshot](http://i.stack.imgur.com/kxY5E.png) Edit 2: Interestingly, I get back the right preview from the broken one if I print the left document into a new pdf via CutePDF. This is not a real solution (file size gets blown up for other reasons) but shows that information isn't really lost, just somehow weirdly displayed as it seems.


title: csquotes: punctuation and quotation marks

text: `csquotes` automatically includes or excludes the punctuation marks in or from the quotation depending on the language specified in the preamble. This can be adjusted individually by commands like `\DeclareAutoPunct{.,;!?}` etc. > british example: "This is a quote". > > american example: "This is a quote." I now designed a `newcommand` that wrapps a quotation into different quotation symbols. Let just for the sake of the question this example be the case: > custom example: °This is a quote°. I did this simply be by the following `newcommand`: `\newcommand{\strangequote}[1]{°#1°}` This of course does not move punctuation inside or outside the quotation marks. Could I change the command so that it does? How can I design a command that   1. also pays attention to the definitions of `\DeclareAutoPunct{.,;!?}` (so that I globally chooses for **all** my quotations whether to include or exclude the punctuation) or   2. allows me to choose for `strangequote` individually whether or not to include the punctuation. Can `csquotes`' command `\MakeForeignQuote` be of any help? **Clarification:** I do want to use this command **in addition** to the normal command (`enquote` or `textquote`) that sets british or american quotation marks. (Small question aside: I never got the difference between quote commands and the quote commands with a "c", e.g., between `\textquote` and `\textcquote`)


title: Leading zero for azimuths using siunitx

text: Azimuths are often written with a leading zero, e.g. NE as 045°. I am using the `siunitx` package to format all the other quantities in my document with the `\SI` macro, e.g.               \SI{100}{\metre}      but               \SI{45}{\degree}      comes out as 45°. What is the best way to produce 045°, but keeping the useful aspects that `siunitx` provides, like keeping the value and unit together with a nice spacing? Edit: I might have figured this one out:               \SI[parse-numbers = false]{045}{\degree}      produces 045°.


title: Vertically align cell table in figure

text: I have the following figure:               \begin{figure}[ht!]         \centering         \begin{tabular}{|c|c|}             \includegraphics{combo} & \includegraphics{combomenu}         \end{tabular}     \caption{A combo box with and without showing the menu.}     \label{fig:combos}     \end{figure}      which produces: ![enter image description here](http://i.stack.imgur.com/7wADX.png) The left image is significantly shorther than the right image. How do I vertically align the left image to the top of the cell? I would already overheat Google with my searches on how to do it, if it would be possible. Nothing I do just seems to have any effect on it:   * `\includegraphics{combo}\hfill` does nothing    * `\begin{tabular}{|p{3cm}|c|}` does nothing, apart from setting the columnt width    * `\raisebox{4.5\height}{\includegraphics{combo}}` indeed moves the image up and down, but I just cannot seem to get the parameter right. Something between 5.5 and 6 it seems. But that's really not what I want, if I decide to change the second image, I would have to go through the painstaking alignment process again.   * Using minipages aligns the image to the top, but also adds more space to the right from both images and maybe pushes the images too far up, so that the vertical lines begin slightly off: ![enter image description here](http://i.stack.imgur.com/hcOv9.png) I specified the images' width in pixels, they are both 82 pixels wide.


title: Curve Integral typeset problem

text: I would like typeset equation on the figure below: ![curve integral](http://i.stack.imgur.com/Mkjjn.jpg) I've tried code:               \begin{equation}\label{fyz:eq_fey_curveint1}       \Psi(2)-\Psi(1) =          \begin{array}{l}           \displaystyle\int_{(1)}^{(2)}(\nabla\Psi)\cdot\,d{\vec{s}} \\           \text{po}\,\Gamma         \end{array}     \end{equation}       with result: ![curve integral result](http://i.stack.imgur.com/Z2OAV.png) As you can see on the left hand side of the equation is not correctly centered on the character of the integral. I try use solution from similar problem, discussed at the stackexchange web, but I did not get a satisfactory result. I hope that this group of very experienced users advise me again.


title: Two problems with my homework template: overlapping text in footer, and large fbox minipages

text: I begrudgingly used this template for homework through undergrad, ignoring or working around its minor issues. I would like to finally figure out how to fix some of the problems I have with it, and in the process hopefully improve/refresh my LaTeX skills. Other than these problems I'm very satisfied with it. The first problem is that in the footer, the "continued on the next page" line tends to overlap with the center line in the footer: "Homework Class (Homework Class Instructor)", which typically can be relatively long. I think it would be good to have them as separate lines in the event that the continued text is inserted. The second problem is that the fboxes that the answers go in (as seen in `\newcommand{\problemAnswer}`) only work if the answer is less than a page long. I think that it would be PROBABLY be easiest to just do away with the fbox, which I don't love anyway, and come up with some other kind of differentiation between question and answer. Do you have any recommendations for an elegant way to do that?               \documentclass{article}     % Change "article" to "report" to get rid of page number on title page     \usepackage{amsmath,amsfonts,amsthm,amssymb}     \usepackage{setspace}     \usepackage{Tabbing}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{extramarks}     \usepackage{chngpage}     \usepackage{soul,color}     \usepackage{graphicx,float,wrapfig}     %units package: Pick one     %\usepackage{gensymb}     \usepackage{siunitx}          % In case you need to adjust margins:     \topmargin=-0.45in      %     \evensidemargin=0in     %     \oddsidemargin=0in      %     \textwidth=6.5in        %     \textheight=9.0in       %     \headsep=0.25in         %          % Homework Specific Information     \newcommand{\hmwkTitle}{Homework Title}     \newcommand{\hmwkDueDate}{Homework Due Date}     \newcommand{\hmwkClass}{Homework Class}     \newcommand{\hmwkClassInstructor}{Homework Class Instructor}     \newcommand{\hmwkAuthorName}{Author Name}          % Setup the header and footer     \pagestyle{fancy}                                                       %     \lhead{\hmwkAuthorName}                                                 %     \rhead{\hmwkTitle}                                                      %     \lfoot{\lastxmark}                                                      %     \cfoot{\hmwkClass\ (\hmwkClassInstructor)}                             %     \rfoot{Page\ \thepage\ of\ \pageref{LastPage}}                          %     \renewcommand\headrulewidth{0.4pt}                                      %     \renewcommand\footrulewidth{0.4pt}                                      %          % This is used to trace down (pin point) problems     % in latexing a document:     %\tracingall          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Some tools     \newcommand{\enterProblemHeader}[1]{\nobreak\extramarks{#1}{#1 continued on next page\ldots}\nobreak%                                         \nobreak\extramarks{#1 (Continued)}{#1 continued on next page\ldots}\nobreak}%     \newcommand{\exitProblemHeader}[1]{\nobreak\extramarks{#1 (Continued)}{#1 continued on next page\ldots}\nobreak%                                        \nobreak\extramarks{#1}{}\nobreak}%          \newlength{\labelLength}     \newcommand{\labelAnswer}[2]       {\settowidth{\labelLength}{#1}%        \addtolength{\labelLength}{0.25in}%        \changetext{}{-\labelLength}{}{}{}%        \noindent\fbox{\begin{minipage}[c]{\columnwidth}#2\end{minipage}}%        \marginpar{\fbox{#1}}%             % We put the blank space above in order to make sure this        % \marginpar gets correctly placed.        \changetext{}{+\labelLength}{}{}{}}%          \setcounter{secnumdepth}{0}     \newcommand{\homeworkProblemName}{}%     \newcounter{homeworkProblemCounter}%     \newenvironment{homeworkProblem}[1][Problem \arabic{homeworkProblemCounter}]%       {\stepcounter{homeworkProblemCounter}%        \renewcommand{\homeworkProblemName}{#1}%        \section{\homeworkProblemName}%        \enterProblemHeader{\homeworkProblemName}}%       {\exitProblemHeader{\homeworkProblemName}}%          \newcommand{\problemAnswer}[1]       {\noindent\fbox{\begin{minipage}[c]{\columnwidth}#1\end{minipage}}}%          \newcommand{\problemLAnswer}[1]       {\labelAnswer{\homeworkProblemName}{#1}}          \newcommand{\homeworkSectionName}{}%     \newlength{\homeworkSectionLabelLength}{}%     \newenvironment{homeworkSection}[1]%       {% We put this space here to make sure we're not connected to the above.        % Otherwise the changetext can do funny things to the other margin             \renewcommand{\homeworkSectionName}{#1}%        \settowidth{\homeworkSectionLabelLength}{\homeworkSectionName}%        \addtolength{\homeworkSectionLabelLength}{0.25in}%        \changetext{}{-\homeworkSectionLabelLength}{}{}{}%        \subsection{\homeworkSectionName}%        \enterProblemHeader{\homeworkProblemName\ [\homeworkSectionName]}}%       {\enterProblemHeader{\homeworkProblemName}%             % We put the blank space above in order to make sure this margin        % change doesn't happen too soon (otherwise \sectionAnswer's can        % get ugly about their \marginpar placement.        \changetext{}{+\homeworkSectionLabelLength}{}{}{}}%     \newcommand{\e}[1]{\ensuremath{\times 10^{#1}}}     \newcommand{\sectionAnswer}[1]       {% We put this space here to make sure we're disconnected from the previous        % passage             \noindent\fbox{\begin{minipage}[c]{\columnwidth}#1\end{minipage}}%        \enterProblemHeader{\homeworkProblemName}\exitProblemHeader{\homeworkProblemName}%        \marginpar{\fbox{\homeworkSectionName}}%             % We put the blank space above in order to make sure this        % \marginpar gets correctly placed.        }%          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Make title     \title{\vspace{2in}\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\\normalsize\vspace{0.1in}\small{Due\ on\ \hmwkDueDate}\\\vspace{0.1in}\large{\textit{\hmwkClassInstructor}}\vspace{3in}}     \date{}     \author{\textbf{\hmwkAuthorName}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     \begin{spacing}{1.1}     \maketitle     \newpage     % Uncomment the \tableofcontents and \newpage lines to get a Contents page     % Uncomment the \setcounter line as well if you do NOT want subsections     %       listed in Contents     %\setcounter{tocdepth}{1}     %\tableofcontents     %\newpage          % When problems are long, it may be desirable to put a \newpage or a     % \clearpage before each homeworkProblem environment          \clearpage     \begin{homeworkProblem}       Question.            \problemAnswer           {             Answer.           }     \end{homeworkProblem}          \begin{homeworkProblem}       Question.       \begin{homeworkSection}{Section 1 Title}         Section 1.         \sectionAnswer             {               Answer.             }       \end{homeworkSection}       \begin{homeworkSection}{Section 2 Title}         Section 2.         \sectionAnswer             {               Answer.             }       \end{homeworkSection}     \end{homeworkProblem}          \end{spacing}     \end{document}


title: tex using the wrong macro

text: Out of curiosity I tried to `weave` the `bibtex.web` source code and compile the resulting `bibtex.tex` with `tex`. I got some errors which led me to investigate; I'm sure my confusion stems from incorrect assumptions on my part. The errors were of the missing $ kind, but point to the use of a wrong macro. Weaved tex-files use the `webmac.sty` style file. In it are macros such as `\A`, `\As`, `\E` , `\ET` and `\ETs`. The `\E` macro should be used in a math environment. An example of an error is:               ! Missing $ inserted.     <inserted text>                      $     <to be read again>                         \cdot      \E->\cdot                10^     <argument> 39, 58, 60\E                            Ts61     \note ...ndent 2em\baselineskip 10pt\eightrm #1~#2                                                       .\par }     l.1135 \As39, 58, 60\ETs61.      What this shows is that the `\ETs` macro is only being read as far as the `\E` part. Why does this happen, and why doesn't it happen with similarly named and used `\As` macros? Edit: I should add that the behaviour remains the same when adding spaces after the offending macro.


title: Beamer (with Bergen theme) how to move ToC from sidebar to "main part" of slide?

text: How would I move the table of contents produced by `\tableofcontents` from the left sidebar to the main part of the slide? It produces a lot of unused white space, as in the following: ![image](http://i.imgur.com/X0adLNV.png) This code shows a MWE:               \documentclass{beamer}          \usetheme{Bergen}     \usecolortheme{beaver}     \beamertemplatenavigationsymbolsempty          \begin{document}       \begin{frame}{Summary}         \tableofcontents       \end{frame}            \section{A brief introduction to AAA AAA}            \begin{frame}{Introduction to AAA AAA}         Whatever       \end{frame}            \begin{frame}{Introduction to AAA AAA}         Whatever       \end{frame}            \begin{frame}{Introduction to AAA AAA}         Whatever       \end{frame}            \section{An even shorter introduction to BBB BBB}            \begin{frame}{Introduction to BBB BBB}         Whatever       \end{frame}            \begin{frame}{Introduction to BBB BBB}         Whatever       \end{frame}     \end{document}


title: How can I create a Question/Answer format for reports?

text: I would like to create a question/answer format to use on lab reports. What I would like to achieve is something like this: **a. This is the first question (in bold)?** This is the answer (it is indented and regular text). **b. This is the second question (bold)?** This is the answer (indented and regular text). I have no idea where to start. Thank you very much for your help!


title: German dashes: VR-Technik und --Methoden

text: I want to write `VR-Technik und -Methoden`. How many dashes should i use in the different places? I'm pretty sure `VR-Technik` is correct, as would be `VR-Methoden`.   * Should i write `VR-Technik und --Methoden`, because i want to connect the words?   * Should i write `VR-Technik und -Methoden`, because it's `VR-Methoden`? Explanation for the different dashes Informationen über Verbindungsstriche (weitere Informationen klick)


title: Double \prec as a single symbol?

text: We have `<` and `\ll`. What about double `\prec`, i.e. something like `\prec\prec` but with spacing as in `\ll`? Remark. I could not find an answer in http://detexify.kirelabs.org/classify.html or http://www.ctan.org/tex- archive/info/symbols/comprehensive/. I am not interested, how to construct this symbol from two `\prec`'s (I know how to reduce the distance), but I am searching for a symbol from some package, even so strange as `MnSymbol`.


title: displaying tex file from external file

text: I have som .tex with are input for a program, how do I display this files? Is there any way to input it, or do i have to write it alle in or make a screen shot?! I'm gonna be chaining these files a lot. The following image is an example of en .tex file. ![enter image description here](http://i.stack.imgur.com/VzNyQ.png)