title: Put something manually into the header of the current page

text: Is it possible to write something custom into the header of the current page for example like this pseudocode               \documentclass{article}          \begin{document}     \thispageheader[R]{My Text}  %Displays only this in the header     \newpage     \thispageheader[R]{Another Text} %Displays only this in the header     \newpage      \thispageheader[L]{Just another Text on the left} %Displays only this in the header     \end{document}      It's important for me that everything is done locally. I don't want to define different fancy header styles globally for each manual header text.


title: How to automate minitoc call?

text: I'm using `minitoc` package and I would like to automate the command `\minitoc` after every chapter. I'm looking a command to put in my preamble in the spirit of the following (which doesn't work):               \AtBeginChapter[]{\minitoc}      ## MWE The game is to remove every `\minitoc` with only one command in the preamble.               \documentclass{book}     \usepackage{minitoc}     \begin{document}     \dominitoc     \faketableofcontents          \chapter{chapter 1}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \chapter{chapter 2}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \chapter{chapter 3}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \chapter{chapter 4}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \chapter{chapter 5}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \chapter{chapter 6}     \minitoc          \section{section}     \subsection{subsection}     \subsubsection{subsubsection}          \end{document}


title: Renew command on mbox makes it freeze - Fix subscript size

text: I'm trying to change the font style of `\mbox`, but all my tries have failed. All commands I try either have no effect or make pdflatex recursively keep working and never finish and freeze. This makes it freeze: `\renewcommand{\mbox}[1]{\text{#1}}` This makes it freeze: `\renewcommand{\mbox}[1]{\mbox{\tiny #1}}` This doesn't change anything `\providecommand{\mbox}[1]{\mbox{#1}}` This doesn't change anything `\providecommand{\mbox}[1]{\text{#1}}` Why doing this? I'm using LyX, and it has a nice shortcut for \mbox (ctrl+m), and I used it for a long time for subscripts in a long document. Now I noticed that the font from \mbox is huge and must be made smaller. I discovered this earlier so some instances use already \text. So I either switch everything to \mbox, or everything to \text, or I find a new command. Though I would've prefered \mbox for the nice default keyboard shortcut. My `pdflatex --version` is: > pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) kpathsea version 6.1.0 > Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is > NO warranty. Redistribution of this software is covered by the terms of both > the pdfTeX copyright and the Lesser GNU General Public License. For more > information about these matters, see the file named COPYING and the pdfTeX > source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh > (pdfTeX). Compiled with libpng 1.2.49; using libpng 1.2.49 Compiled with > zlib 1.2.7; using zlib 1.2.7 Compiled with poppler version 0.18.4


title: How to set counter for paragraphs in sections?

text: I want to counter paragraphs, always like x.y where x is section number and y is paragraph number in that section.               \documentclass[11pt, twocolumn, a4paper]{article}     \usepackage[left=1.5cm, text={18cm, 25cm}, top=2.5cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[IL2]{fontenc}     \usepackage[czech]{babel}     \usepackage{times}          \begin{document}     \section{A}     foo     \paragraph{Definition % 1.1 %}     here is definition 1.1 and i need to reference it later as 1.1     \section{B}      bar      \paragraph{Definition % 2.1 %}     \end{document}      Can anyone help please?


title: Permanent Highlighting in AUCTeX

text: I want to highlight text regions in my Emacs/AUCTeX/LaTeX document in a "textmarker style". Furthermore, the highlighting should save permanently. These features are provided by `highlight.el` and enriched-mode, which works fine with plain text file. However, this doesn't work for LaTeX files `*.tex`, where I could not select text properties any more. How can I combine text highlighting with AUCTeX?


title: How can I get double angle brackets, i.e. - << >>

text: I can create an angle bracket with the commands `$\langle` and `\rangle$`. So if I want to say something like > IList<T> I can achieve this with               IList $\langle T \rangle$      But I am unable to create double angled brackets. I am trying to say: > (Expression<Func<T, bool>>) And I cannot get the two sets of angle brackets in place. Can anyone advise how I can get double angle brackets to work? **EDIT:** Actually, I just found that I can do the following to get double angle brackets:               $\llangle and \rrangle$      However, its still not possible to have two single left angle brackets followed by a double angle, which is what I need for the expression above.


title: Apostrophe breaks comments in lstlisting

text: I defined a command to simplify the writing of code listings of (pseudo-) C code:               \lstdefinestyle{c}{     language=C,     basicstyle=\small\sffamily,     numbers=left,     numberstyle=\tiny,     frame=L,     columns=fullflexible,     showstringspaces=false     }          \lstnewenvironment{ccode}{     \mathligsoff\lstset{style=c}}{}      If I use the environment `ccode` everything works fine unless apostrophes are used:               \begin{ccode}       int x';       // use x       x = 3;     \end{coode}      In this listing the comment is not printed in italics but in 'straight' characters. If I remove `'` or add another `'` the italics are restored. This is the complete .tex code:               \documentclass[]{report}     \usepackage{listings}     \usepackage{semantic}     \lstdefinestyle{c}{       language=C,       basicstyle=\small\sffamily,       numbers=left,       numberstyle=\tiny,       frame=L,       columns=fullflexible,       showstringspaces=false}     \lstnewenvironment{ccode}{     \mathligsoff\lstset{style=c}}{}          \begin{document}     \begin{ccode}       int x';       // hi there       x = 3;     \end{ccode}     \end{document}      **EDIT:** The accepted answer works flawlessly for me. Just a hint for other readers: If no strings or characters need to be displayed -- and thus no code like 'a' or 'string' -- `\lstset{literate={'}{{'}}1}` will also do the trick.


title: Hand written fonts in LaTeX/XeTeX/LuaTeX

text: Recently my struggle to find out some handwritten fonts for some document led me to this question. **What are the various packages that give nice looking handwritten and / or calligraphic fonts?** I know that the experts here will come out with all possible list. The idea here is to make this a **reference** for people like me who search for fonts like this (I have struggled, let others not). I will add an entry here:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{frcursive}     \usepackage{calligra}     \newcommand{\setfont}[2]{{\fontfamily{#1}\selectfont #2}}     \begin{document}     \setfont{frc}{This is frcursive font.}\\     \setfont{calligra}{This is Calligra font.}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ACaCN.png) I request experts to kindly add all possible details on various such **free** fonts to be served as a reference for people like me please.


title: Bibtex not showing using TexLipse

text: I have created a project within TexLipse and right before the end of the document I use the command `\bibliography{bibtexfile} \bibliographystyle{plain}` to create the bibtex reference section. However, when I build my project in TexLipse, the reference section does not show. Also selecting "Run BibTex on next build" does not have any effect. If I move `\bibliography{bibtexfile} \bibliographystyle{plain}` to the line after `\maketitle`, the section **is** created. But I want the section at the end of my document, not the beginning. If I use a different editor, like TexMaker, and do: `pdflatex`, `bibtex`, `pdflatex`, `pdflatex`, everything works fine. It seems like TexLipse does not run `bibtex` at all. Even with a .bat file everything works fine:               pdflatex main.tex       bibtex main.aux       pdflatex main.tex       pdflatex main.tex      What could be the problem? * * * **OK! Seems like I fixed it myself**   I use \input{} to include external files, but apparently TexLipse does not like it when the commands `\bibliography{bibtexfile} \bibliographystyle{plain}` are externally called. TexLipse wants them in the main tex file.


title: Table spanning multiple pages with another embedeed table that can span two pages

text: I have found out that longtabu inside longtabu is not possible but maybe another solution exists. I am autogenerating lots of latex code for documenting a certain binary communication protocol and I need tables to span across pages that have embedded another table which can in itself span across at most two pages. Code below is not pretty but it compiles with TexLive and TexLive extra fonts (for LY1). Any advice how to achieve that would be welcome. My               \documentclass[oneside,a4paper,12pt,notitlepage]{report}     \usepackage[top=3cm, bottom=4.5cm, left=3cm, right=3cm]{geometry}     \usepackage[LY1]{fontenc}     \usepackage{mathptmx} % Add bold and italic     \usepackage[utf8]{inputenc}     \usepackage{tabularx}     \usepackage{longtable} % also needed by longtabu     \usepackage{tabu}     \usepackage{multirow}          \begin{document}          \hspace{-0.6cm}\begin{longtabu}{| l | l | l | X | l | l |}     \firsthline     \textbf{Id} & 20 & \textbf{Name}: &Settings & \textbf{Data Size}: & 26 bytes\\     \hline     \multicolumn{6}{|l|}{          \begin{minipage}[t]{0.97\textwidth}         \textbf{Description}: This packet is being sent ..ehehe         \vspace{1mm}     \end{minipage}     } \\     \hline     \multicolumn{6}{|c|}{ \textbf{Fields:} } \\     \multicolumn{6}{ | l |}{          % I would like to have another longtable here .. the nested table does not break across pages         \begin{tabularx}{0.95\textwidth}{ | l | l | X |}     \firsthline     \textbf{Bits} & \textbf{Field Name} & \textbf{Description}\\     \hline     0 : 2 & SETTING\_A &          \begin{minipage}[t]{0.47\textwidth}          \textbf{Values}:\\0 - MODE\_A \\ \textit{Comment A.}\\1 - MODE\_B\\\textit{Comment B . dsdsjkhdsakjahsasd}\\2 - MODE\_C\\\textit{Comment C. asdsadasfsddssd}\\3 - MODE\_D\\\textit{Comment D. fdassdaskjdhasd}\\4 - MODE\_E\\\textit{Comment E. fdjksfdsjhgffhjjjhsfd}\\5 - MODE\_F\\\textit{Comment F}\\6 - MODE\_G\\\textit{Comment E}\\\vspace{-0.27cm}              \end{minipage}         \tabularnewline \hline     3 : 7 & SETTING\_B &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     8 : 10 & SETTING\_C &      \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     11 : 13 & SETTING\_D &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     14 : 16 & SETTING\_E &          \begin{minipage}[t]{0.47\textwidth}          \textbf{Values}:\\0 - PH\_A\\\textit{Aomment A}\\1 - PH\_B\\\textit{Comment B}\\2 - PH\_C\\\textit{Comment C dsasdjka hsdkjah dsakjsadh kjdash ksaj}\\3 - PH\_D\\\textit{Comment D fdsfdsfdsf sdsdfds}\\4 - PH\_E\\\textit{Comment E asdkhdaskjdshjsakhasdkjds}\\5 - PH\_F\\\textit{Comment F. dsajashsaddsasfdfsddsf}\\\vspace{-0.27cm}              \end{minipage}         \tabularnewline \hline     17 : 29 & SETTING\_F &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     30 : 42 & SETTING\_G &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     43 : 48 & SETTING\_H &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     49 : 54 & SETTING\_I &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     55 : 61 & SETTING\_J &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     62 : 77 & SETTING\_K &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     78 : 93 & SETTING\_L &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     94 : 109 & SETTING\_M &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \\\hline     110 : 125 & SETTING\_N &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     126 : 141 & SETTING\_L &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     142 : 150 & PULSE\_WIDTH &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     151 : 159 & PULSE\_WIDTH\_HIGH &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     160 : 175 & DELAY &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     176 : 188 & TOTAL\_PROGRAM\_TIME &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \hline     189 : 201 & TOTAL\_PHASE\_TIME &          \begin{minipage}[t]{0.47\textwidth}               \end{minipage}         \tabularnewline \lasthline     \end{tabularx}     } \\     \lasthline     \end{longtabu}          \end{document}


title: Division negative integers with xlop

text: I have a problem with `xlop`. Indeed, when I do               \opdiv[style=text,parenthesisnegative=all]{-6}{2}      I get -0.99999999999999 instead of -3.


title: putting a box over an image in beamer presentation

text: In a Beamer presentation, I want to put a box over a graphic file. For example, in one slide, I want to put a graphic file: ![first slide](http://i.stack.imgur.com/fv6aw.png) And, in the next slide, I want to put a box on the image: ![second slide](http://i.stack.imgur.com/GiDBM.png) This style of work was what I usually do with MS Powerpoint. I was wondering how I can do this with Beamer. If there is any other elegant way to do this with the similar purpose (i.e. pointing and emphasizing a part of images), I am open to any suggestion as well.


title: Intercalate pictures and items in beamer presentations

text: I'm preparing a presentation in which I'd like to have pictures in a new slide between `\item`s. The final result should look like: Slide 1:   * I want to discuss: 1) Cars Slide 2: [Picture of a car] Slide 3:   * I want to discuss: 1) Cars 2) Airplane Slide 4: [Picture of an airplane] And so on... Any help?


title: What are good learning resources for a LaTeX beginner?

text: Which book (free or otherwise) was the most useful to you when you started learning LaTeX? I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, The Not So Short Introduction to LaTeX2ε, but I feel that there might be better options around. Also see LaTeX Introductions in languages other than English.


title: Which manuals are on your "TeX Reference" shelf?

text: This is a community wiki since there is no "one true answer"- if you find an answer that contains a lot of your choices, but is missing something you feel is incredibly useful. Feel free to add it. A short description of what topics the reference covers would be nice as well. Organize by subject please. For example: I always keep the following PDFs at my fingertips. ### Document Layout   * The Memoir manual: Covers, in exquisite detail, how to produce just about any document using the `memoir` LaTeX class. (PDF 4.5 MB) ### Mathematical Typesetting   * Math Mode: A document by Herbert Voß that explains how to typeset just about any mathematical expression in LaTeX. (PDF 2MB) ### Graphics   * The PGF Manual: Explains, with examples, how to draw just about any figure using PGF/TikZ. Also a good example of what awesome documentation should look like. (PDF 3.8MB)


title: Books for Library

text: Suggestion Required: I want to purchase a set of Latex books (Regarding Typesetting, Beamer, Tables, Graphics) for my library. your expert opinion regarding this matter is required. Note: I already have LaTeX Beginner's Guide by Stefan Kottwitz.


title: Guide to latex for a mathematician

text: I'm a PhD math student and I would like to learn latex quickly and effectively. Can you suggest a good book for learning latex (with an emphasis on mathematical typesetting)?


title: Getting started with TeX LaTeX?

text: What are some good resources for getting started with LaTeX? Also, what's the difference between LaTeX and TeX? Thanks!


title: Lecture notes for teaching LaTeX to a beginner

text: One of my friends has asked me to teach him to work with LaTeX. He does not know anything about LaTeX and wants to be able to write his academic papers in LaTeX. I have searched the web for some lecture notes on LaTeX and I found some books but I am looking for some lecture notes which briefly prepares the reader. Even, by means of those notes, I will be able to teach him to work with LaTeX in ten sessions. Could you please help me find such notes? Also, suggestions to how should I prepare a set of classes for him is appreciated.


title: LaTeX beginner's tutorial

text: I was recently introduced to LaTeX but I cannot find any resources online for beginners like me. I need a how-to kind of a resource for basic functionality. Pardon my vagueness. I currently have no knowledge of it but I am willing to learn.


title: Beginner learn Latex?

text: I'm a freshman and I'd like to start learning LaTeX. I have already installed Miktex and Texmaker. Where/how can I learn how to use LaTeX, Miktex and Texmaker?


title: Any LaTex-based software for beginners?

text: I want to learn LaTex language so I can format and use that to compile a nice pdf with descriptive statistics using Knitr in RStudio. Any recommendation?


title: Good LaTeX book for Math beginner

text: > **Possible Duplicates:**   >  Which manuals are on your "TeX Reference" shelf?   >  What is the best book to start learning LaTeX? Any suggestion for a good LaTeX book for a math beginner, I have experience programming Perl and shell scripts, but that's about it. Amazon gives me tons of results, I don't know which one to go with. Thanks!


title: Array with Strings that are displayed on new line with indentation

text: I would like to have something like this in LaTex: ![indented text](http://i.stack.imgur.com/ACDY9.png) Is there a function that does that? Otherwise I would like to have a command that I can pass an array of strings, separated by a comma/semicolon, which then generates the above output; e.g. `\createindentedtext(string1, string2, string3)`. Output:               string1         string2             string3      Is that even possible? Using egreg's solution almost works. The code I used is               \documentclass{article}     \usepackage{xparse}          \setlength{\parindent}{0cm}     \setlength{\parskip}{8pt}          \ExplSyntaxOn     \NewDocumentCommand{\createindentedlist}{m}     {         \group_begin:         \skip_zero:N \parskip         \skip_set:Nn \parindent { 1.5em }         \par\medskip         \cil_iterate:n { #1 }         \medskip         \group_end:     }     \cs_new_protected:Npn \cil_iterate:n #1      {       \int_set:Nn \cil_iteration_int { 0 } % 0 = first line gets indented; -1 = skip first line       \clist_map_inline:nn { #1 }        {         \hspace*{\cil_iteration_int \parindent} \textsf{##1}         \int_incr:N \cil_iteration_int         \par\nobreak        }      }     \int_new:N \cil_iteration_int     \ExplSyntaxOff          \begin{document}     \section*{Section}     \createindentedlist{string1,string2,string3}     \end{document}      The indentation is a little off, no matter if I ignore the first string or not (0 or -1). ![wrong indentation](http://i.stack.imgur.com/uu9Kx.png) Is it further possible to insert a symbol for all strings, except the first one? So it looks like this: ![enter image description here](http://i.stack.imgur.com/dEnTg.png)


title: Cannot copy letters with diacritics from pdflatex PDF

text: I have problem with copying text from PDF file. I am using these packages in my document:               \usepackage[slovak]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}      However when I generate PDF file, it doesn't allow me to copy slovak characters. For example copying this               nemožné k nim pristupovať      results in               nemoºné k nim pristupova´      Do you have any idea how to solve it?


title: equality sign and fraction bar alignments in complex fractions around braces

text: When some math expressions such as complex fractions are around the braces which should be on the same baseline, besides, equality sign should be aligned with vinculum, how can we handle? For example, in the following formula, is it possible to make the equality signs aligned with the fraction bars?               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}     S_d=\left[\begin{array}{@{}c@{}}     \cfrac{\displaystyle\sum_{j=1}^{n}{(d_j-\bar{d})^2}}{n-1}     \end{array}\right]^{1/2}     =\left[\begin{array}{@{}c@{}}     \cfrac{\displaystyle\sum_{j=1}^{n}{d_j^2}-\cfrac{1}{n}\left(\sum_{j=1}^{n}{d_j}\right)^2}{n-1}     \end{array}\right]^{1/2}     \end{equation}     \end{document}      ![](http://i.stack.imgur.com/7Vu3W.png)


title: Figures and tables do not fit on page

text: I am using the `elsarticle` class and the standard template provided by them (see below). My problem is that all the figures are being put on the last page of my paper all tables are not being shrinked. Is there a way I could make LaTeX put the figures anywhere else except the last page and also reduce the size of the tables (something like `scale=0.3*linewidth`)?               \documentclass[preprint,5p,times]{elsarticle}          \usepackage{amssymb}     \usepackage{times}     \usepackage{graphicx}     \usepackage{verbatim}     \usepackage{epsfig}     \usepackage{multirow}     \usepackage{array}          \journal{x}          \begin{document}     \begin{frontmatter}     \title{x}     \author{x}     \ead{X}     \author{x}     \ead{x}     \address{x}          \begin{abstract}     The best abstract ever!!!\end{abstract}          \begin{keyword}     a;     b;     c;     \end{keyword}     \end{frontmatter}          \section{Introduction}     \label{Sec-Introduction}


title: How to draw \leadsto line?

text: I wish to replace straight line with the `\leadsto` line. I tried `\draw[leadsto] (s2)--(s3);` however it can not work. Below is my code               \documentclass[tikz]{standalone}     \usepackage{tikz}     \begin{document}     \tikzset{bag/.style={text width=5em,text centered,yshift=-0.2cm}}     \begin{tikzpicture}[node distance=4mm]     \node[bag](s0){$s_0$};     \node[bag,  below = of s0, xshift=-5em] (s1){$s_1$};     \node[bag, below  = of s0, xshift= 7em](s2){$s_2{:}(P_2, Q_1$};     \node[bag, below = of s1,xshift=6em](s3){$s_3$};     \draw[->] (s0)--(s1);     \draw[->] (s0)--(s2);     \draw[->] (s1)--(s3);     \draw[->]  (s2)--(s3);     \end{tikzpicture}     \end{document}


title: UTF-8 characters not displayed with xelatex (pandoc)

text: I'm using XeLaTeX with `pandoc` to generate PDFs from markdown files: but the "⇒" character (UTF8) does not get correctly generated (it's not show in the output file). Is it possible to get the "⇒" character converted from markdown to PDF without using `$\Rightarrow$`? (I'm already using the `xunicode` and `xlxstra` packages)


title: Bibliography not in ToC when using biblatex/biber

text: I just managed to switch from using BibTeX to `biblatex` with the biber backend. My references now appear how I want. However I have two new issues. 1) How do I change "Bibliography" to references? The old `\renewcommand{\bibname}{References}` does nothing. 2) How do I make the Bibliography appear in my Table of Contents because it now doesn't when using `\printbibliography` as per `biblatex`. Is it just a case of doing the `\addcontentsline{toc}{chapter}{References}`? Or is there a more subtle method?


title: Make line extend beyond endpoint and intersect with line

text: Is it possible to have a line go through two coordinates and then extend until it intersects with another line? The line in question is not horizontal nor vertical (otherwise I could use the `perpendicular` coordinate system). My current code is               \begin{tikzpicture}          \coordinate[label={left:$(x, y, z)$}] (w) at (-6,2);     \coordinate (c) at (0,0);     \coordinate[label={right:$(x,y)$}] (b) at (3,-1);     % I want to avoid hard-coding this coordinate          \draw[ultra thick,-stealth] (w |- c) -- (w);     \draw[ultra thick,-stealth] (c -| b) -- (b);          \draw   (c) +(0,1.5) -- ++(0,-1.5);          \draw[dashed] (w |- c) -- (c -| b);     \draw[dashed] (w) -- (c); % Currently two paths to emulate the result     \draw[dashed] (c) -- (b);          \end{tikzpicture}      So, what I'd like is to specify a path that goes through point `w` and `c` and extends until it intersects with the (imaginary) vertical line at `(3,y)`. I don't want to hardcode the position of point `b`, but have tikz calculate it for me.


title: nomencl with Texworks on mac

text: I am trying for long time to create a nomenclature list with nomencl package but in vain. i spent many hours trying to find out on internet and it seems that using this package is not that simple. I tried all the published suggestions but nothing worked. Is there any clue?


title: How to increase the size around text in \psframebox

text: when using `\psframebox` the size between text and corners of the box is really small. Is there a way to increase that? My minimal example:               \documentclass[dvips]{article}     \usepackage{pst-all}     \begin{document}     \psset{xunit=1cm,yunit=1cm,runit=1cm}     \psset{linewidth=1pt}         \begin{pspicture}(10,10)             \psset{cornersize=absolute,linearc=0.15}         \rput(6.5,4){\psframebox[fillstyle=solid, fillcolor=white]{\Large{TEST}}}         \end{pspicture}     \end{document}


title: what is the correct way to typeset equations with a leading indicator/marker on each

text: I am using `\begin{align*}` to typeset set of equations. I want to say that the first one applies to case of dimension [T] (time), and the second for [L] (length) and the third for [M] (mass). I want to put these markers at the start of each equation (left side) but not too far away. But these are not part of the equation, and not an equation number or a label. An example will explain better.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     [T]  \quad 0 &= -a      \\     [L]  \quad 1 &= a-3b    \\     [M]  \quad 0 &= b+c     \end{align*}     \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/XlLYt.png) This seems to work ok, except when I have a minus sign or value in the LHS that is different size than the others, now things shift around and the equations look ugly               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     [T]  \quad -1 &  = -a      \\     [L]  \quad 1  &  = a-3b    \\     [M]  \quad 0  &  = b+c     \end{align*}     \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/7PE6z.png) Clearly I need to better alignment env. Do I need to use table for this? I want the `[]` tags to be in the left most side of the equations. What would be the correct way to do this? Using texlive 2013 thank you


title: Plus or minus in footnote that doesn't add extra line

text: I'm attempting to use the +/- sign within a footnote, however when I use the following command it creates a line break and takes up a lot of extra space. I believe its because I'm putting it in as an equation within a footnote, however I'm not sure how to go about getting the symbol any other way...               ~\footnote[1]{The threshold was set at \[\pm\]20\%}.


title: fancyhdr: include footnote only on page 1, but header on all pages

text: I want to put a footer on page 1 but not on other pages. I also want to put a header on all pages. Could some one tell me how I can do that? The code I am using so far (only relevant lines shown):               \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[CO,CE]{This is my header text}     \renewcommand{\headrulewidth}{0pt}     \pagenumbering{gobble}          \begin{document}          \maketitle     \thispagestyle{fancy}     \lfoot{This is my footer text}      This generates a header on all pages (which is good), but also a footer on all pages. I don't want footer on pages other than the first.


title: Template which can change

text: This question might be too general, but is something I thought about because I needed this in several different situations. What I would like is to have a document of "problems" which I can solve. In general, this would be one page with a description of the problem, next the progress on the problem, some random thoughts and references. Of course, I can just make a document with these sections and so on and so forth, but what if I decide say in a year that I actually want a _different_ structure for my document? How I would do it is a save this as a file, say `Super Cool Problem Bro.tex` and then use in my main document `\include{Super Cool Problem Bro.tex}` in the page where I would like this. So, maybe I have written all these files with my particular choices and I would like to do something simple like replace all the titles **Literature** with **List of Relevant and Irrelevant Literature**? This should be possible with some nice regex, but it does not feel like a good solution. What if I would like to add a section or switch the order? So, I, naively, would make some kind of (flat file) database which has this data about my problems and then I would use a python script to generate my `.tex`files from this according to my specifications. Right, but then I would be using python to generate the files and not LaTeX. Maybe there is some package or easy option which I am missing. It is also quite annoying to figure out after you are done there is a much easier option to go with. If you are doing research in mathematics this is quite common, but then the types of goals are different :-). For the references at the bottom of each problem document I would be using `chapterbib`, which seems to be the right way to go (but of course, the stuff I describe above is what I am really wondering about). **Edit:** Would "hacking" `amsref` be a good idea? They have bibliographies in the file itself which I could use as the "database". That could be remapped to an environment.


title: Underfull \hbox severe issues

text: I relaize this has been posted before but I just can't understand the nature of the problem, I hope some of you can help me with this. This is my code from line 99-174. Compiler errors are below the code.               \[     A_C = \begin{bmatrix}1 && 0 && -1 \\ -1 && 1 && 0 \\ 0 && 0 && 1\end{bmatrix}     \] \newline     \section{Aufgabe}     Nutzen wie in der Aufgabenstellung vorrausgesetzt die Definition der Differenzierbarkeit:     \[     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{f(x+\delta x,y+\delta y) - f(x,y) - f'(x,y)(\delta x,\delta y)}{\sqrt{(\delta x)^2 + (\delta y)^2)}}     \] \newline     Betrachten wir zun\"achst den Z\"ahler:     \[     f(x+\delta x,y+\delta y) - f(x,y) - f'(x,y)(\delta x,\delta y)      \] \newline     \\     \begin{multline*}     = \begin{pmatrix} y + \delta y - (x+\delta x)^2\\y+\delta y\\x+\delta x\end{pmatrix} \\     - \begin{pmatrix} y-x^2\\y\\x\end{pmatrix} \\     - \begin{pmatrix} -2x && 1\\0 && 1\\1 && 0\end{pmatrix} \begin{pmatrix} \delta x\\\delta y\end{pmatrix}      \end{multline*}     \begin{multline*}     = \begin{pmatrix} -x^2 - 2x \delta x - (\delta x)^2 + y + \delta y \\y+\delta y\\x+\delta x\end{pmatrix} \\     - \begin{pmatrix} y-x^2\\y\\x\end{pmatrix} \\     - \begin{pmatrix} -2x \delta x + \delta y\\\delta y\\\delta x\end{pmatrix}       \end{multline*}     \[     = \begin{pmatrix} -2\delta x - (\delta x)^2 + \delta y \\ \delta y \\ \delta x \end{pmatrix} - \begin{pmatrix} -2x\delta x + \delta y \\ \delta y \\ \delta x\end{pmatrix}      \] \newline     \[     = \begin{pmatrix} -(\delta x)^2 \\ 0 \\ 0 \end{pmatrix}     \]     Betrachtung von beiden f\"uhrt uns nun auf:     \[     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\begin{pmatrix}-(\frac{(\delta x)^2}{\sqrt{\delta x ^2 + \delta y ^2}} \\0\\0\end{pmatrix}     \]     Da $\lim\limits_{(\delta x,\delta y) \rightarrow (0,0)} 0 = 0$, betrachten wir nur den Grenzwert der 1. Komponente, bzw. zunächst nur den Zähler $(\delta x)^2$     Stellen wir zuerst fest:     \[     -(\delta x)^2 \le 0 \ge -(\delta y)^2 \Rightarrow -(\delta x)^2 \le ((\delta x)^2 + (\delta y)^2)      \] \newline     Sowie     \[     -((\delta x)^2 + (\delta y)^2) \le -(\delta x)^2     \] \newline     Also     \[     -((\delta x)^2 + (\delta y)^2) \le -(\delta x)^2 \le ((\delta x)^2 + (\delta y)^2)      \] \newline      Daraus folgt für den gesuchten Grenzwert: \newline      \[     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{-((\delta x)^2 + (\delta y)^2)}{\sqrt{\delta x ^2 + \delta y ^2}}     \] \newline      \[     \le     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{-(\delta x)^2}{\sqrt{\delta x ^2 + \delta y ^2}}     \] \newline      \[     \le     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{((\delta x)^2 + (\delta y)^2)}{\sqrt{\delta x ^2 + \delta y ^2}}     \] \newline      Durch Anwendung der Potenzregeln folgt:     \[     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}-\sqrt{\delta x ^2 + \delta y ^2}     \le     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{-(\delta x)^2}{\sqrt{\delta x ^2 + \delta y ^2}}     \le     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\sqrt{\delta x ^2 + \delta y ^2}     \]      Da $(\delta x) ^2 und (\delta y) ^2 beide alleine gegen 0 gehen muss die Summe der beiden, und die Wurzel der Summe natürlich auch gegen 0 gehen. Daraus folgt:     \[     0     \le     \lim\limits_{(\delta x,\delta y) \rightarrow (0,0)}\frac{-(\delta x)^2}{\sqrt{\delta x ^2 + \delta y ^2}}     \le     0     \] \newline     Der Grenzwert muss somit auch gegen 0 streben (Sandwich theorem).     Somit strebt der $\vec{Fehler}$ schneller als linear gegen 0, also ist unsere Funktion diff'bar mit der gegebenen Ableitung.      # Compiler errors:               (...)          Underfull \hbox (badness 10000) in paragraph at lines 101--102          [3]     Underfull \hbox (badness 10000) in paragraph at lines 112--114               Underfull \hbox (badness 10000) in paragraph at lines 112--114               Underfull \hbox (badness 10000) in paragraph at lines 117--118               Underfull \hbox (badness 10000) in paragraph at lines 120--121               Underfull \hbox (badness 10000) in paragraph at lines 123--124               Underfull \hbox (badness 10000) in paragraph at lines 126--127               Underfull \hbox (badness 10000) in paragraph at lines 129--130               Underfull \hbox (badness 10000) in paragraph at lines 132--133               Underfull \hbox (badness 10000) in paragraph at lines 153--155          [4]     Underfull \hbox (badness 10000) in paragraph at lines 157--158               Underfull \hbox (badness 10000) in paragraph at lines 161--162               ! LaTeX Error: Bad math environment delimiter.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.174 \[          ?


title: Greek words with kpfonts

text: I want to typeset some sporadic Greek words in an otherwise Latin text. I can get it with something like:               \documentclass{minimal}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{kpfonts}     \usepackage[greek,english]{babel}          \begin{document}          Test, \textgreek{χημεία}, test.          \end{document}      But the problem is that the Greek letters don't come from the Kp fonts (they're not even Type1 in my system). This is probably because the Kp fonts don't provide an LGR encoding... So, is there any way I could get the Greek letters to fit nicely with the Latin font? Some additional package? Some substitute for `kpfonts` (no xelatex, please)? I could use `$\chiup\etaup\muup\epsilonup\acute{\iotaup}\alphaup$`, but that's not pretty (or right).


title: How to pimp my tube?

text: How can I pimp my tube? ![enter image description here](http://i.stack.imgur.com/EZHXO.png)               \documentclass{scrartcl}     % needs logicpuzzle bundle v1.8     % http://mirrors.ctan.org/graphics/pgf/contrib/logicpuzzle/logicpuzzle.sty     % or replace logicpuzzle -> battleship     \usepackage{logicpuzzle}     \makeatletter     \definecolor{LPlgrey}{rgb}{.8,.8,.8}     \definecolor{LPtgrey}{rgb}{.7,.7,.7}     \definecolor{LPgrey}{rgb}{.5,.5,.5}     \def\myscale{.7}     \newcommand*\LPtunnel%     {%       \begin{tikzpicture}[scale=\myscale]         \fill[color=black] (0,0) -- (0,1) -- (.4,.5) -- (.4,0) -- cycle;         \fill[color=LPgrey] (0,1) -- (1,1) -- (1,.5) -- (.4,.5) -- cycle;         \fill[color=LPlgrey] (.40,0) rectangle (1,.5);       \end{tikzpicture}     }%     \newcommand*\tunnel[2]{\LP@setcellcontent{#1}{#2}{\LPtunnel}}     \newcommand*\tube[3]%     {%       \def\tubepath{%       (#1.5,#2.5)       \foreach \dir in {#3}%       {%         \ifnum\dir=2%         --++(0,-1)%         \fi%         \ifnum\dir=4%         --++(-1,0)%         \fi%         \ifnum\dir=6%         --++(1,0)%         \fi%         \ifnum\dir=8%         --++(0,1)%         \fi%       };}%       \begin{puzzlebackground}         \pgfsetcornersarced{\pgfpoint{3mm}{3mm}}         \draw[color=LPtgrey, line width=.4cm*\myscale] \tubepath;%       \end{puzzlebackground}     }%     \makeatother     \begin{document}       \begin{logicpuzzle}[scale=\myscale]         \tunnel{1}{1}         \tunnel{5}{5}         \tube{1}{1}{6,6,6,6,8,8,8,4,2,4,4,4,8,8,6,6,6,6}       \end{logicpuzzle}     \end{document}      Can I add a decoration like in this picture? I know I can add a shading (kind of 3D effect) to a rectangle. But it is also possible for such a complex path with a shading based on the angle? Another important point: It must survive scaling.


title: Biblatex: How to insert dots into abbreviated journal names in bibliography

text: For example: "Philos Trans R Soc" should become "Philos. Trans. R. Soc."


title: Make biblatex treat different author names as same author in text citations

text: Some guy has written a few books, but he is inconsistent from book to book when it comes to including and/or abbreviating his middle name. When I cite this author in the text, I would like `biblatex` to treat all different versions of his name as the same author. I can enforce this for the sorting in the bibliography with `sortname`, but what do I do to enforce this for text citations? The following example illustrates how the text citation treats "Paul J[ohn] Smith" as a different author from "Paul John Smith" and "Paul Smith". The first citation should appear as (Smith 2002), and the second citation should appear as (2001a, 2001b, 2002).               \documentclass{article}     \usepackage{csquotes}     \usepackage[             bibstyle = authoryear,             citestyle = authoryear-comp,             dashed = false,             sorting = nyt,             sortcites = false,             language = american,             abbreviate = false,             backend = biber]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{smith2001a,         AUTHOR = "Paul John Smith",         TITLE = "My first book",           YEAR = "2001"}          @BOOK{smith2001b,         AUTHOR = "Paul Smith",         TITLE = "My second book",           YEAR = "2001",         SORTNAME = "Paul John Smith"}          @BOOK{smith2002,         AUTHOR = "Paul J[ohn] Smith",         TITLE = "My third book",           YEAR = "2002",         SORTNAME = "Paul John Smith"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \noindent     Some clever guy said that \parencite{smith2002}.     In fact, Paul Smith has talked about this several times \parencite*{smith2001a,smith2001b,smith2002}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/no00f.png)


title: footnote inside itemize

text: I know that I should use `\footnotemark` and `\footnotetext{}` (or not?) for putting a footnote inside an `itemize` environment, but when the items are split on more pages, I want the footnote to be placed at the bottom of the page where `\footenotemark` is and not at the end of entire itemize block.               \documentclass[a4paper, 12pt,titlepage]{report}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage[czech]{babel}     \usepackage{fullpage}     \usepackage{listings}     \usepackage{palatino, url, multicol}     \usepackage{graphicx}     \setlength{\parindent}{1cm}     \usepackage{indentfirst}     \setcounter{secnumdepth}{3}     \usepackage{mdframed}     \usepackage[usenames,dvipsnames]{xcolor}     \definecolor{light-gray}{gray}{0.85}     \setcounter{tocdepth}{3}     \usepackage{titlesec}     \titleformat{\chapter}[display]        {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}       \titlespacing*{\chapter}{0pt}{-20pt}{40pt}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{enumerate}     \usepackage{here}     \usepackage{longtable}     \usepackage[bottom]{footmisc}     \usepackage[font={small,it}]{caption}     \usepackage{ctable}     \usepackage{tabu}     \usepackage{lipsum}          \usepackage[left=3.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}          \begin{document}          \begin{mdframed}[topline=false,bottomline=false,rightline=false,linewidth=2pt]     \begin{itemize}          \item     \lipsum[1]     \lipsum[1]     \lipsum[1]          \item Minimální hodnoty $rPOD$ v odvětví lze nalézt ve Finančních analýzách podnikové sféry\footnotemark. Zde jsou vypsány jen hodnoty pro odvětví, která jsou zastoupena v praktické části\footnotetext{Data uvedená ve Finančních analýzách se neshodují s daty v dostupných excelovských souborech MPO. Pravděpodobně jsou dodatečně upravována. Minimální hodnoty rPOD tak budou brány z excelovských souborů, které jsou dostupné od roku 2009. Pro rok 2007 bude dosazena hodnota z Finanční analýzy.}          \item     \lipsum[1]     \lipsum[1]     \lipsum[1]          \end{itemize}     \end{mdframed}     \end{document}


title: Author footnote with number

text: I would like to schedule the authors with numbers and not symbols. Using the code below the authors are marked with symbols. Is important that the description appears as a footnote.               \documentclass[a4paper, 11pt]{article}          \title{Bla}     \author{Rafael \footnotemark[1]}          \begin{document}     \footnotetext[1]{Note...}     \maketitle          Blablabla     \end{document}


title: Can not make non-freefonts installed

text: `Texlive 2013` is installed in `/usr/local/texlive` with a script `install-tl` at `http://www.tug.org/texlive/quickinstall.html`. Now I want to use `garamondx` font and installed it as `http://www.tug.org/fonts/getnonfreefonts`suggests. However, after doing this the `garamondx.sty` still can not be found, even though I did `updmap`, `sudo updmap-sys`, etc.               $ sudo texlua install-getnonfreefonts     Detected System: unknown linux     Detected Installation: /usr (installing in /usr/local)     Installing /usr/local/bin/getnonfreefonts ...                            [done]     Installing /usr/local/share/man/man1/getnonfreefonts.1 ...               [done]     Installing /usr/local/share/man/man1/getnonfreefonts-sys.1 ...           [done]     Installing /usr/local/share/texmf/doc/man/man1/getnonfreefonts.man1.pdf ...   [done]     Installing /usr/local/share/texmf/doc/man/man1/getnonfreefonts-sys.man1.pdf ...   [done]     md5sum: eb97b3fe32b28ead5183275ad32699b8 getnonfreefonts ...               [ok]     md5sum: f850d910dd96ee27cecdb3772047d247 getnonfreefonts.1 ...             [ok]     md5sum: fb2b0f7699db8e627d4e26b730e94928 getnonfreefonts-sys.1 ...         [ok]     md5sum: 415b51f7c80a4abe8d0a667a04c9d525 getnonfreefonts.man1.pdf ...      [ok]     Fixing File Permissions ...                                              [done]     texhash: Updating /usr/local/share/texmf/ls-R...      texhash: Done.      1) $ sudo getnonfreefonts-sys -a The fonts are installed in `/usr/local/share/texmf` 2) $ getnonfreefonts-sys -a ! ERROR: The install directory '/usr/local/texlive/2013/../texmf-local' is not writable. So I thought the extra fonts should be installed in the above folder. 3) $ getnonfreefonts -a ! ERROR: The install directory '/home/dao/texmf' is not writable. Why the HOME folder is not writable?


title: How to align chapter, section, subsection with parindent?

text: Is there a way to solve that? ![?](http://i.stack.imgur.com/JXcEs.png) Thanks a lot!


title: Selecting math font with unicode-math in beamer with XeLaTeX

text: I'm trying to use `unicode-math` in XeLaTeX to use Asana Math in a beamer presentation, but I am unable to use select the font for letters in math mode. See the following MWE:               \documentclass{beamer}      \usefonttheme{serif}          \usepackage{unicode-math}     \setmainfont{Linux Libertine O}     \setmathfont{Asana Math}     %\setmathfont[range=\mathit]{Asana Math} % has no effect          \begin{document}     \begin{frame}         Maths font test:         \begin{itemize}         \item math letters display in Libertine: $abcdefghijklmnopqrtuvwxyz$         \item math operators and blackboard letters display in Asana Math: $\int_{-\infty}^{+\infty} \sum \mathbb{E}$         \end{itemize}     \end{frame}     \end{document}      Which results in the following: ![enter image description here](http://i.stack.imgur.com/k4ZC2.png) The letters are displayed in Linux Libertine, instead of Asana Math. I tried to tinker with the `range` option in `unicode-math` (as documented in the manual), to no avail. Strangely, when I compile the document as an article, I get the results I expect. Am I missing something?


title: tikz-cd Extra arrow tip with start anchor on edge v0.9b

text: I'm drawing a BIG tikzpicture using the tikz-cd package. I won't reproduce the entire diagram here as there's no need. But the following MWE highlights the problem I'm having which is this: One region of the diagram is a little crowded and I would like to nudge the starting position of one edge to, say, the east of the source node. However, when I specify the coordinate for the source node an unwanted tip appears on the source end of the arrow. Here's the code:               \documentclass[11pt]{article}          \usepackage{amsmath}      \usepackage{tikz-cd}     \usetikzlibrary{arrows}          \title{}     \date{}                                               \tikzset{        commutative diagrams/.cd,        arrow style = tikz,        diagrams={>=latex}}          \begin{document}     \begin{tikzpicture}[commutative diagrams/every diagram,column sep = 3em]            \matrix (m) [matrix of math nodes, nodes in empty cells]{            |(A)|A\\            |(B)|B\\            };            \path [commutative diagrams/.cd, every arrow, every label]                (B.north east) edge [bend right, dashed] (A.east)               (B) edge [bend left] (A.west)            ;         \end{tikzpicture}     \end{document}      Here's the output this example produces. You can see the extra tip on the dashed line. ![Rogue arrow tip at source](http://i.stack.imgur.com/yJb3G.png) Recall, I am deliberately NOT using the `{tikzcd}` environment because I have a LOT of nodes and edges and may need to change the locations of some of the nodes as I add to the diagram. Any suggestions for how I can move the starting position of the arrow within the tikzpicture environment using edge paths?


title: In bibliography, how to print the page in my text where I cited certain paper?

text: How to get, for instance, [19] S. Roth and M. J. Black. Fields of experts: A framework for learning image priors. In IEEE Conf. on Computer Vision and Pattern Recognition, 2005. 1, 2, 7, 8 where the last numbers (1, 2, 7, 8) are the pages where I cited the paper in MY TEXT? This would be like a reversed reference, or a index for bibliography.


title: Pi, Kappa, Latin Small Letter Long S: problems with UTF8

text: I'm using Springers _svmono_ for a book with many mathematical symbols and special characters. There are quite a few problems with characters that are simply not printed (using pdfLatex), so I tried to add utf8 support:               \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}      However, there are errors. This is a MWE ( _svmono.cls_ needed to make it run):                    %%%%%%%%%%%%%%%%%%%% book.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     % sample root file for the chapters of your "monograph"     %     % Use this file as a template for your own input.     %     %%%%%%%%%%%%%%%% Springer-Verlag %%%%%%%%%%%%%%%%%%%%%%%%%%               % RE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[graybox,envcountchap,sectrefs]{svmono}          % choose options for [] as required from the list     % in the Reference Guide          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \begin{document}          \begin{verbatim}        # sin(π * t)     \end{verbatim}          Kudos (κῦδος)          \end{document}                Using **utf8x** I get:                    ERROR: Undefined control sequence.          --- TeX said ---     \u-default-954 #1->\textkappa                 Using **utf8** I get:                    ERROR: Package inputenc Error: Unicode char \u8:π not set up for use with LaTeX.           And I need characters more exotic than _pi_ or _kappa_ - like _latin small letter long s_ e.g.


title: Grouping nodes in tikz

text: For the MWE below:               \documentclass[a4paper,11pt,twoside]{report}     \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage{amsmath, graphicx, tikz, enumerate, amssymb, pgf}          \usepackage{setspace}     \usepackage{pgfplots}     %\usepackage{slashbox} Used in original larger file     \usepackage{bchart}          \raggedbottom     \usepackage[bottom]{footmisc}          \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%         decorations.pathreplacing,decorations.pathmorphing,shapes,%         matrix,shapes.symbols,automata}          \begin{document}                    \setcounter{page}{1}     \renewcommand{\thepage}{\arabic{page}}     \singlespace          \begin{center}     \begin{tikzpicture}[->,>=stealth', auto,node distance=6cm,       thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]            \node[main node] (1) {Design};       \node[main node] (2) [below left of=1] {Implement};       \node[main node] (3) [right of=2] {Test};       \node[main node,dashed, left of =1,fill=white] (4) {\parbox{4cm}{\centering Initial Design\&\\ Implementation}};            \path[every node/.style={font=\sffamily\small}]         (4) edge [bend left] node[left] {} (1)         (1) edge [bend right] node[left] {} (2)         (2) edge [bend right] node[right] {} (3)         (3) edge [bend right] node[right] {} (1);     \end{tikzpicture}     \end{center}          \end{document}      I want to group the blue circles possibly with a brace ("}") saying `for each method` how can I do that ? and I guess what's a good looking way to do achieve this ? ![enter image description here](http://i.stack.imgur.com/vM285.png)


title: \listoffigures chokes on inline math delimiters in captions. What is going on?

text: I'm working on my thesis, and I've realized that, any time I try to use \( \)-type inline delimiters in captions, that pdflatex breaks. While I can weasel out of actually \needing\ math in my captions, it's very inconvenient. I'm pretty perplexed. Here's a (relatively) minimal example that breaks for me:               \documentclass{uafthesis}          \usepackage{amsmath}     \usepackage{graphicx} % Graphics stuff          \begin{document}          \listoffigures          \begin{figure}[h]     \centering     \includegraphics[width=0.3\textwidth]{angle.png}     \caption{\(\theta \)}     \end{figure}               \end{document}      Here's a sample of the output: > ! LaTeX Error: Bad math environment delimiter. > > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. ... > > l.1 ...k or to continue without it.}}}{2} > > ? ! Extra }, or forgotten $. ...r to continue without it.}} > > l.1 ...k or to continue without it.}}}{2} > > ? Some things:   * `uafthesis` is the unofficial official document class for my university. It has been written mostly by physics grad students by hacking at other document classes. My fork is here.   * This only happens if I include `amsmath`.   * The minimal example and the resulting log file are gisted here. I'm defending tomorrow, and I have to turn in my thesis pretty soon, so hopefully we can figure this out within a day or so! If not, I understand, and thanks anyway.


title: How to check if it is the first time or last time a macro has been used in ConTeXt?

text: I have some text in my document which appears repeatedly many times throughout the document, so I have defined a custom macro, e.g.:               \define\mymacro{         \section{A}             There is some text.         \section{B}             This is some more text.         \section{C}             This is yet some more text.     }      This appears like this:                _______________________     |                       |     | 1.1 A                 |     |    This is some text. |     | 1.2 B                 |     |    This is some more  |     |    text.              |     | 1.3 C                 |     |    This is yet some   |     |    more text.         |     |_______________________|      I need the macro to render differently in two situations.   * The first time the macro appears in the document, the title and contents of section A should not appear. Instead, alternative text apears.   * The last time the macro appears in the document, the title and contents of section C should not appaer. Instead, nothing appears there. How can I create a conditional which checks if it is the first or last time the macro has been used, and modifies the text displayed accordingly?


title: tabu starting with "X-multicolumn" yields strange formatting

text: I noticed a strange behaviour when using `\multicolumn` inside a `tabu` environment with X columns. Here is an example:               \documentclass[12pt]{report}          \usepackage{tabu}     \usepackage{booktabs}          \begin{document}          correct:     \begin{tabu} {rr}      \toprule     \rowfont[c]{\itshape} \multicolumn{2}{c}{1--2}\\     \cmidrule{1-2}      \rowfont[c]{\itshape} A & B \\     \midrule     100 & 200  \\     \bottomrule     \end{tabu}     wrong:      \begin{tabu} to 4cm {X[r]X[r]}      \toprule     \rowfont[c]{\itshape} \multicolumn{2}{c}{1--2} \\     \cmidrule{1-2}      \rowfont[c]{\itshape} A & B \\     \midrule     100 & 200  \\     \bottomrule     \tabuphantomline     \end{tabu}          \end{document}      ![output](http://i.stack.imgur.com/DvDlw.jpg) In the second table, the multicolumn is not centered correctly. Moreover, the `rowfont` formatting affects not just one, but all following lines. Adding a `\tabuphantomline`, as suggested in the `tabu` manual when dealing with multicolumns, did not help. This behaviour seems to occur only when the table "starts" with a multicolumn. When I put a regular (single) column first, everything works fine. I wonder if this is a bug or incompatibility or if I'm just missing out on something...


title: 1 TikZ graphic in 3 beamer frames, odd margins occur, global positioning desired

text: I want to create a beamer presentation, where I intend to use one single TikZ graphics for 3 consecutive frames but with different node labels. I have a separate TikZ file where I use self defined commands for the label text that are redefined in the main TeX file for each frame respectively. **Problem 1:** Since the labels differ in their size the placement of the graphic within the frame changes. Is there an easy way to apply TikZ coordinates relative to the frame or some other way to position the graphic equally for each frame? **Problem 2:** When I redefine some label texts, partially additional margins occur. Can someone explain to me why this happens and how I can prevent this?( --> see minimal example, label at root node). I started to introduce for each label text individual label distance values for fine tuning but I really don't like this deficient work around. Has someone a more elegant solution? Please note, that \lblAA, \lblBA, etc. are used to define the label texts and \sepAA, \sepBA, etc. were originally intend to fine tune spacing (which is set to 0cm in this example). I appreciate any help or suggestions. Thx in advance!               % MAIN TEX FILE     \documentclass[compress,nonav,10pt]{beamer}          \usetheme{Warsaw}          \makeatletter     \DeclareMathSizes{\@xpt}{\@xpt}{3}{2}     \makeatother          \usepackage[utf8]{inputenc}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{calc,shapes}          \begin{document}          \newcommand{\lblAA}{$\vec{\phi}_{1,1}$}     \newcommand{\sepAA}{0cm}     \newcommand{\lblBA}{$\vec{\phi}_{2,1}$}     \newcommand{\sepBA}{0cm}     \newcommand{\lblBB}{$\vec{\phi}_{2,2}$}     \newcommand{\sepBB}{0cm}     \newcommand{\lblCA}{$\vec{\phi}_{\log_2\mkern-5mu N,1}$}     \newcommand{\sepCA}{0cm}     \newcommand{\lblCD}{$\vec{\phi}_{\log_2\mkern-5mu N,N\! /\! 2}$}     \newcommand{\sepCD}{0cm}     \newcommand{\lblDA}{$\vec{\psi}_1$}     \newcommand{\sepDA}{0cm}     \newcommand{\lblDB}{$\vec{\psi}_2$}     \newcommand{\sepDB}{0cm}     \newcommand{\lblDG}{$\vec{\psi}_{N-1}$}     \newcommand{\sepDG}{0cm}     \newcommand{\lblDH}{$\vec{\psi}_{N}$}     \newcommand{\sepDH}{0cm}          \begin{frame}{Tree}     \begin{figure}     \centering     \input{tree.tikz}     \end{figure}     \end{frame}          \renewcommand{\lblAA}{$\left \vert \left \langle \vec{\phi}_{1,1}, \vec{x} \right \rangle \right \vert > \tau_1$ ?}     \renewcommand{\sepAA}{0cm}     \renewcommand{\lblBA}{$\left \vert \left \langle \vec{\phi}_{2,1}, \vec{x} \right \rangle \right \vert > \tau_2$ ?}     \renewcommand{\sepBA}{0cm}     \renewcommand{\lblBB}{$\tau_2 < \left \vert \left \langle \vec{\phi}_{2,2}, \vec{x} \right \rangle \right \vert$ ?}     \renewcommand{\sepBB}{0cm}     \renewcommand{\lblCA}{$\left \vert \left \langle \vec{\phi}_{\log_2\mkern-5mu N,1}, \vec{x}\right \rangle \right \vert > \tau_{\log_2\mkern-5mu N}$ ?}     \renewcommand{\sepCA}{0cm}     \renewcommand{\lblCD}{$\tau_{\log_2\mkern-5mu N} < \left \vert \left \langle \vec{\phi}_{\log_2\mkern-5mu N,N\! /\! 2}, \vec{x} \right \rangle \right \vert$ ?}     \renewcommand{\sepCD}{0cm}     \renewcommand{\lblDA}{$\left \langle \vec{\psi}_1, \vec{x} \right \rangle$}     \renewcommand{\sepDA}{0cm}     \renewcommand{\lblDB}{$\left \langle \vec{\psi}_2, \vec{x} \right \rangle$}     \renewcommand{\sepDB}{0cm}     \renewcommand{\lblDG}{$\left \langle \vec{\psi}_{N-1}, \vec{x} \right \rangle$}     \renewcommand{\sepDG}{0cm}     \renewcommand{\lblDH}{$\left \langle \vec{\psi}_{N}, \vec{x} \right \rangle$}     \renewcommand{\sepDH}{0cm}          \begin{frame}{Tree}     \begin{figure}     \centering     \input{tree.tikz}     \end{figure}     \end{frame}          \end{document}               % THE TIKZ FILE ("tree.tikz")     \newcommand{\dx}{1.8}     \newcommand{\dy}{3}          \begin{tikzpicture}[scale=.5, every node/.style={fill=black,circle,inner sep=0pt,circle,minimum size=.2cm}]     \normalsize          \coordinate (N11) at (0,0);     \node[label={[label distance=\sepAA]above:{\lblAA}}] at (N11) {};          \coordinate (N21) at ($ (N11) + (-\dx, -\dy) $);     \node[label={[label distance=\sepBA]west:{\lblBA}}] at (N21) {};     \draw[-, thick] (N21) -- (N11);          \coordinate (N22) at ($ (N11) + (\dx, -\dy) $);     \node[ label={[label distance=\sepBB]east:{\lblBB}}] at (N22) {};     \draw[-, thick] (N22) -- (N11);          \coordinate (N31) at ($ (N21) + (-\dx, -\dy) $);     \node[label={[label distance=\sepCA]west:{\lblCA}}] at (N31) {};     \draw[dash pattern=on 1pt off 2pt, thick] (N21) -- ($ (N21) + .33*(-\dx, -\dy) $);     \draw[dash pattern=on 1pt off 2pt, thick] ($ (N21) + .66*(-\dx, -\dy) $) -- (N31);     \draw[dash pattern=on 1pt off 2pt, thick] (N21) -- ($ (N21) + .33*(\dx, -\dy) $);          \coordinate (N34) at ($ (N22) + (\dx, -\dy) $);     \node[ label={[label distance=\sepCD]east:{\lblCD}}] at (N34) {};     \draw[dash pattern=on 1pt off 2pt, thick] (N22) -- ($ (N22) + .33*(-\dx, -\dy) $);     \draw[dash pattern=on 1pt off 2pt, thick] ($ (N22) + .66*(\dx, -\dy) $) -- (N34);     \draw[dash pattern=on 1pt off 2pt, thick] (N22) -- ($ (N22) + .33*(\dx, -\dy) $);       %\draw[-, thick] (N22) -- (N34);          \coordinate (N41) at ($ (N31) + (-\dx, -\dy) $);     \node[ label={[label distance=\sepDA]below:{\lblDA}}] at (N41) {};     \draw[-, thick] (N31) -- (N41);          \coordinate (N42) at ($ (N31) + (\dx, -\dy) $);     \node[ label={[label distance=\sepDB]below:{\lblDB}}] at (N42) {};     \draw[-, thick] (N31) -- (N42);          \coordinate (N47) at ($ (N34) + (-\dx, -\dy) $);     \node[ label={[label distance=\sepDG]below:{\lblDG}}] at (N47) {};     \draw[-, thick] (N34) -- (N47);          \coordinate (N48) at ($ (N34) + (\dx, -\dy) $);     \node[ label={[label distance=\sepDH]below:{\lblDH}}] at (N48) {};     \draw[-, thick] (N34) -- (N48);          \draw[dash pattern=on 1pt off 2pt, thick] ($ (N42) + .6*(\dx, 0)$) -- ($ (N47) + .6*(-\dx, 0) $);     \draw[dash pattern=on 1pt off 2pt, thick] ($ (N31) + .9*(\dx, 0)$) -- ($ (N34) + .9*(-\dx, 0) $);          \end{tikzpicture}


title: How to add text around/below a node using tikz-qtree?

text: I read many examples in tikz-qtree, but I didn't find one which illustrates how to add text around/below a node using qtree. Anyone knows how to draw the following tree using tikz-qtree? ![how to draw this](http://i.stack.imgur.com/vz4vO.jpg)


title: PGFPlots: synchronize the filling of the bars with the colorbar

text: How i can synchronize the filling of the bars with the color of the color bar to the right? they are a little shifted... ![enter image description here](http://i.stack.imgur.com/8YqUV.png)               \documentclass[border=0.5mm,12pt]{standalone}          \usepackage{pgfplots,pgfplotstable}        % Grafici          \pgfplotsset{%                 mesh line legend/.style={legend image code/.code=\meshlinelegend#1},%                 /pgf/number format/use comma,%                 compat=newest,%     %            height=9cm,%                 width=12cm%     }     \begin{document}     %\begin{figure}     \centering     \begin{tikzpicture}     \makeatletter \newcommand{\pgfplotsdrawaxis}{\pgfplots@draw@axis} \makeatother     \pgfplotsset{axis line on top/.style={      axis on top=false,      after end axis/.append code={         \pgfplotsset{axis line style=opaque,           ticklabel style=opaque,           tick style=opaque,           grid=none}         \pgfplotsdrawaxis}       }     }     \pgfdeclareverticalshading{stefan}{50bp}{     color(0.00000000000000bp)=(violet);     color(8.33333333333333bp)=(blue);     color(16.66666666666670bp)=(cyan);     color(25.00000000000000bp)=(green);     color(33.33333333333330bp)=(yellow);     color(41.66666666666670bp)=(orange);     color(50.00000000000000bp)=(red)     }     \begin{axis}[%     xtick=data,     /pgf/number format/fixed,     legend pos=outer north east,     ymajorgrids=true,     %ybar,     %x tick label as interval,     enlarge x limits=false,     x filter/.code=\pgfmathparse{#1-0.5},     %xmin=0, xmax=7,     ymin=0, ymax=14,     point meta min={0},     point meta max={14},     yticklabel shift=2pt,     xticklabel shift=2pt,     minor ytick={0,0.4,...,14},     xticklabel style={text height=1.5ex},     xtick={0,1,...,7},     extra x ticks={0,1,...,7},     extra x tick style={         xticklabel pos=right,         xticklabel style={text depth=0pt}     },     %extra y ticks={0,2,...,12},     %extra y tick style={     %    yticklabel pos=right     %},     tick style={thin,black},     xlabel=\large Classe,     ylabel=\large Frequenza,     colorbar,     colorbar style={         /pgf/number format/fixed,         xticklabel shift=2pt,         xticklabel style={text height=1.5ex}     },     axis line style={draw=none}, after end axis/.append code={\draw (rel axis cs:0,0) rectangle (rel axis cs:1,1);},     colormap={new}{color(0cm)=(violet);color(1cm)=(blue);color(2cm)=(cyan);color(3cm)=(green);color(4cm)=(yellow);color(5cm)=(orange);color(6cm)=(red)}     ]     \addplot[%             ybar interval,             area style,             shading=stefan,     %        draw=none,             shader=interp,             samples=10,             draw=black             ] coordinates{%                  (1, 6)                  (2, 9)                  (3, 11)                  (4, 12)                  (5, 7)                  (6, 5)                  (7, 0)                  };     \end{axis}     %\end{figure}     \end{tikzpicture}     \end{document}


title: png terminal in gnuplot finds fonts but not symbols (like greek letters)

text: I would like to make some png figures with gnuplot because I can tex them quickly into a draft and they are much smaller than the similar eps or pdf figures (and so don't freeze my tex environment). However I am having trouble getting greek letters to come out in the png terminal. Otherwise the png figures look fine and they are so much faster to work with! I am running gnuplot Version 4.4 patchlevel 3 on snow leopard on a mac. I have this in my .profile               export GDFONTPATH=/Library/Fonts/       so that the gnuplot png terminal can find my fonts. The error I get is this: > gdImageStringFT: No character set found while printing string a with font > Symbol I am using                set term png enhanced      Undercores and exponents work fine like               set xlabel "x_2".      I tried a bunch of different fonts -- they all look fine, just the symbols don't show up.   For example               set xlabel "{/Symbol a}"      gives the error above for gd I did manage to get some unicode to display on a png terminal but can't figure out how to choose the characters in a text file (apparently I can only cut and past them in and there is no other way to choose them?). I could go back to pdf or eps and convert to something smaller so my tex manuscript is not swamped by slow large figures. Suggestions for a fix would be much appreciated!


title: Packages hyperref together with subfig break when \renewcommand{\thefigure}{...} is used

text: The following code compiles and acts as you would expect:               \documentclass[12pt]{report}          %\usepackage{hyperref}     \usepackage{subfig}          \begin{document}          \begin{figure}     \centering     \renewcommand{\thefigure}{$\dag$}     \subfloat[Sub-dagger]     {     \label{subfloat:first}     Hello there my good sport     }%     \qquad     \subfloat[Sub-dagger the other]     {     Hello again nice to see you     }     \caption{Daggered figure}     \label{fig:dag}     \end{figure}          Figure \ref{fig:dag} shows two things... one of them is sub-figure \ref{subfloat:first}.          \listoffigures          \end{document}      However, when `%\usepackage{hyperref}` is uncommented, the following error is given:               ! TeX capacity exceeded, sorry [input stack size=5000].     \curr@fontshape ->\f@encoding                                    /\f@family /\f@series /\f@shape      l.11 \subfloat                   [Sub-dagger]     !  ==> Fatal error occurred, no output PDF file produced!      No error occurs if no subfloats are in the figure, either. The error occurs even if `\listoffigures` is commented out. A remark: if `$\dag$` is replaced by `$a$`, or by `ABC`, the code compiles fine. It seems like there is some issue with the amount of memory `$\dag$` takes, which is strange to me.


title: Label rows of a matrix by characters

text: How to add label to index the rows and columns of the matrix ? because I want to number the line outside the matrix                    \[         \begin{array}{lc}           \ Mat_{\varPhi to M} & \left(\begin{array}{@{}ccccc@{}}                 1 & 1 & 1 & 1 & 1 \\                 0 & 1 & 0 & 0 & 1 \\                 0 & 0 & 1 & 0 & 1 \\                 0 & 0 & 0 & 1 & 1 \\                 0 & 0 & 0 & 0 & 1                   \end{array}\right) \\[15pt]         \end{array}         \]


title: Why do I get black areas instead of pattern fills when compiling with xelatex?

text: I want to draw this picture with TikZ. I've used the following code. But the outcome was not good (fig1). While the Fig 2 is the correct form. I do not know where is the problem? **My texlive version is 2012.** Please guide me in this regard.               \begin{tikzpicture}     \begin{axis}[area legend,     axis x line=bottom,     axis y line=left,     domain=0:1,     legend style={at={(0.03,0.97)},     anchor=north west},     axis on top,xmin=0]     \addplot[pattern=crosshatch dots,     pattern color=blue,draw=blue,     samples=500]     {sqrt(x)} \closedcycle;     \addplot[pattern=crosshatch,     pattern color=blue!30!white,     draw=blue!30!white]     {x^2} \closedcycle;     \addplot[red,line legend] coordinates {(0,0) (1,1)};     \legend{$\sqrt x$,$x^2$,$x$}     \end{axis}     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/BR5CK.jpg)


title: Size error with *.png-files when compiling with LaTex

text: I use MikTeX 2.9 and TeXmaker as an editor. When I compile my code with "Quickbuild": "pdflatex + bib(la)tex + pdflatex (x2) + view pdf" there is no problem and everything looks fine. But running manually "Latex" with "Tools" I get an error: "Latex cannot determine the size of my graphic". I still get my output, so there is actually no problem, but still I would like my file to compile ordinary.


title: Include SVG does not detect file

text: I am trying to render an .svg image using the svg.sty package in latex. When I run the following code I get three errors. Posted below the code               \documentclass[a4paper,10pt,twoside,openright]{report}     \usepackage{svg}     \begin{document}     TEST     \begin{figure}[htbp]         \centering         \includesvg{bloch_entangling_gate}         \caption{caption}         \label{fig:label}     \end{figure}     \end{document}      Errors below :               E: /Users/Adriaan/Documents/Test/test.tex:6 File `./bloch_entangling_gate' not found. \includesvg{bloch_entangling_gate}     E: /Users/Adriaan/Documents/Test/test.tex:6 File `./bloch_entangling_gate' not found. \includesvg{bloch_entangling_gate}     E: /Users/Adriaan/Documents/Test/test.tex:6 File `bloch_entangling_gate.pdf_tex' not found. \includesvg{bloch_entangling_gate}      I am running latex trough the "latexing" package in sublime on Mac OSX 10.9.4. The svg image is placed in the same directory as the .tex file. Rendering works fine if I do not try to import the image. When I build from there it executes the build command which is set to do the following.               [         {             "cmds":             [                 "pdflatex",                 "bibtex",                 "pdflatex",                 "pdflatex"             ],             "name": "Default Build: latexmk",             "primary": true      Whit added argument to the preferences               "build_arguments": [" --shell-escape"],       This should ensure that `pdflatex` is working with shell escape enabled as required for the `svg` package. I do not know how to check if these are the actual commands that are being executed or how to run latex from the terminal. I have also seen a similar question with the same error on a windows system. I assume I am not using `luatex` but I am not sure. Hope someone can help me.


title: Show a frame step by step

text: I have seen people showing one slide progressively by pressing `Enter`. Could anyone tell me how to realize that in Beamer?


title: How to create custom itemize-unfolding-animations in beamer

text: I'm still a newbie in beamer so sorry if it's a simple question: I want to animate an "unfolding of itemize" in a custom way. So instead of the standard:               \begin{itemize}          \item<1-> item-1         \item<2-> item-2         \item<3-> item-3     \end{itemize}      I want the `item-i` that are not "in focus" to be grayed out. The following code does exactly what I want:               \def\colorize<#1>{%      \temporal<#1>{\color{black!50}}{\color{black}}{\color{black!50}}}          \begin{itemize}          \colorize<1>\item item-1         \colorize<2>\item item-2         \colorize<3>\item item-3     \end{itemize}      However, it's a lot of code to write `colorize<i>` every time. My question: is there a way to define a macro (lets call it `grayoutunhighlighted`) so that I could do something like: `\begin{itemize}[<-+| grayoutunhighlighted@+>]`? Thanks!


title: How to wrap floated minted listing in my own environment?

text: Here's what I'd like to do:               \begin{code}{c}{Hello World in C}% I would prefer the caption to be optional     #include <stdio.h>          int main(void) {         printf("Hello, world!\n");         return 0;     }     \end{code}      The result should look like the picture below. (The caption is actually centered on the page but appears so because the image is cropped. Since this is a primitive example, I'm not concerned with prettifying the results.) ![code environment example](http://i.stack.imgur.com/ZRbaf.png) I am trying to achieve that in my custom class by using `minted` and the `listing` environment that it packages:               \newenvironment{code}[2]{%         \begin{listing}\caption{#2}%         \begin{minted}{#1}%     }{%         \end{minted}%         \end{listing}%     }      I get this error:               Runaway argument?     ! File ended while scanning use of \FancyVerbGetLine.     <inserted text>                      \par      <*> env.tex          ? H     I suspect you have forgotten a `}', causing me     to read past where you wanted me to stop.     I'll try to recover; but if the error is serious,     you'd better type `E' or `X' now and fix your file.      I suppose it has to do with the explanation in this answer, but I'd like to know if it can be done according to the interface shown above.


title: In-text references are not alphabetically ordered

text: I am using BibLaTex with APA style and Biber backend. The example document of biblatex-apa states that multiple in-text references should be automatically ordered complying the APA 6 style independent from the order of input in the `\cite` command. However, this is not working for me. The references in the document are ordered as put in in the cite command. E.g. `\textcite{AuthorC2001, AuthorA2001, AuthorB2001}` will be printed in the PDF as > AuthorC (2001), AuthorA (2001), AuthorB (2001) instead of > AuthorA (2001), AuthorB (2001), AuthorC (2001)


title: Package quoting and \chapter

text: I use the `quoting` package to set quoting in my master thesis. In the following MWE a found a strange bug.               \documentclass[12pt,a4paper]{scrreprt}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}          \usepackage{quoting}     \usepackage{blindtext}     \begin{document}     \blindtext     \begin{quoting}[font={small}]     \blindtext     \end{quoting}     \blindtext          \chapter{Test}     \blindtext     \begin{quoting}[font={small}]     \blindtext     \end{quoting}     \blindtext     \end{document}      The code produces the error > \do undefined. \begin{quoting}[font={small}] When the `font={small}` is set as a package option, the error doesn't occur. How can i fix it? The MWE in writelatex.com


title: New map file with LaTeX

text: I'm trying to use the `textgreek` package to typeset a sigma (σ) in a Roman/upright face. Unfortunately, I need to include trees drawn with the `xyling` package, which requires me to typeset with the `latex` rendering enging (as opposed to `pdflatex`) and, in the past, I have always included `\pdfmapfile{=cbgreek-full.map}` in my preamble, for, without this, the document will not render, with `pdflatex` I get:               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 grmn1200     mktexpk: don't know how to create bitmap font for grmn1200.     kpathsea: Appending font creation commands to missfont.log.      )     !pdfTeX error: pdflatex (file grmn1200): Font grmn1200 at 600 not found      ==> Fatal error occurred, no output PDF file produced!      And, when I use `dvipdf` on the `.dvi` file produced by `latex` I get:               dvips: Font grmn1200 not found,  using cmr10 instead.     dvips: Design size mismatch in font grmn1200     dvips: Checksum mismatch in font grmn1200      So, is there an equivalent of `\pdfmapfile{=cbgreek-full.map}` which I can use with `latex`, for attempting to use this with `latex` gives:               ! pdfTeX error (\pdfmapfile): not allowed in DVI mode (\pdfoutput <= 0).     <recently read> \pdfmapfile           l.27 \pdfmapfile                     {=cbgreek-full.map}     No pages of output.      MWE:               \documentclass[12pt]{article}     \usepackage[margin=1.8cm]{geometry}     \geometry{a4paper}     \usepackage[parfill]{parskip}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tipa}     \usepackage{xyling}     \usepackage{textgreek}     %\pdfmapfile{=cbgreek-full.map}          \begin{document}            In producing these syllabifications, I was working within the formalism       of \textit{government phonology} and with government phonology comes a        number of axioms within which we must work. This framework includes a        number of significant revisions on the ``traditional'' syllabification.       The most obvious is the loss of the \textsigma          \end{document}


title: How to define enumerate to use letters without indenting?

text: Thus far I used the enumerate-environment with arabic numbers and wrote in my preamble `\setlist[enumerate,1]{leftmargin=*}` to avoid indenting. And it works well. Now I'm trying to tell enumerate with `\setenumerate[0]{label=(\alph*)}` in my preamble to use small letters instead of arabic numbers. It works but now is a small indent in my list. When i use `\Alph*` instead of `\alph*`, it works without indenting, but I don't want to use big letters. Is there any way of avoiding the indenting with `\alph`? PS: I use the `enumitem` package.


title: Flowchart using Tikz

text: I'm trying to create a fine flowchart that is a bit complicated. Therefore I need a block for a predefined process and a connector block as well as a data block.   Can someone help me? In comment is what I'd like to see in my code to keep my code nicely arranged. The rest of the code is a simple example for the Tikz site.               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}     \pagestyle{empty}               % Define block styles     \tikzstyle{decision} = [diamond, draw, fill=blue!20,          text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]     \tikzstyle{block} = [rectangle, draw, fill=blue!20,          text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{line} = [draw, -latex']     \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,         minimum height=2em]          %\tikzstyle{subroutine} = [draw,rectangle split, rectangle split         horizontal,rectangle split parts=3,minimum height=1cm]      %\tikzstyle{connector} = [draw,circle,...]     %\tikzstyle{data} = [draw, trapezium, ...]          \begin{tikzpicture}[node distance = 2cm, auto]         % Place nodes         \node [block] (init) {initialize model};         \node [cloud, left of=init] (expert) {expert};         \node [cloud, right of=init] (system) {system};         \node [block, below of=init] (identify) {identify candidate models};         \node [block, below of=identify] (evaluate) {evaluate candidate models};         \node [block, left of=evaluate, node distance=3cm] (update) {update     model};         \node [decision, below of=evaluate] (decide) {is best candidate     better?};         \node [block, below of=decide, node distance=3cm] (stop) {stop};         % Draw edges         \path [line] (init) -- (identify);         \path [line] (identify) -- (evaluate);         \path [line] (evaluate) -- (decide);         \path [line] (decide) -| node [near start] {yes} (update);         \path [line] (update) |- (identify);         \path [line] (decide) -- node {no}(stop);         \path [line,dashed] (expert) -- (init);         \path [line,dashed] (system) -- (init);         \path [line,dashed] (system) |- (evaluate);     \end{tikzpicture}               \end{document}      ![enter image description here](http://i.stack.imgur.com/fG10B.png)


title: Using an environ environment with \newenvironment

text: I want to use an environment defined with `NewEnviron` from `environ` in another environment definition:               \documentclass{article}          \usepackage{environ}          \NewEnviron{inner}[1]{%       \textbf{#1:} \BODY     }          \newenvironment{out}{%       \begin{inner}{Using outer}%     }{%       \end{inner}%     }          \begin{document}       \begin{inner}{Using inner}         Lorem ipsum\ldots       \end{inner}            \begin{out}         Lorem ipsum\ldots       \end{out}     \end{document}      The resulting PDF looks as desired: ![enter image description here](http://i.stack.imgur.com/pjhMe.png) But the log shows some erros:               ./test.tex:22: LaTeX Error: \begin{inner} on input line 20 ended by \end{out}.      ...                                                   l.22 \end{out}          ./test.tex:23: LaTeX Error: \begin{out} on input line 20 ended by \end{document     }.      ...                                                       l.23 \end{document}          ...     (\end occurred inside a group at level 1)          ### semi simple group (level 1) entered at line 20 (\begingroup)     ### bottom level      If I define `out` using `NewEnviron`, that is               \NewEnviron{out}{%       \begin{inner}{Using outer}%         \BODY       \end{inner}%     }      then `pdflatex` does not terminate. Apparently, something is mixed up (presented to the parser in the wrong order). What is going wrong?


title: Plotting function on limited scale with tikz

text: I want to plot few functions with tikz. Values of some of them grows too huge. In tikz manual there is an example with "nice" functions that do not grow too much:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[domain=0:4]     \draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);     \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};     \draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};     \draw[color=red] plot (\x,\x) node[right] {$f(x) =x$};     \draw[color=blue] plot (\x,{sin(\x r)}) node[right] {$f(x) = \sin x$};     \draw[color=orange] plot (\x,{0.05*exp(\x)}) node[right] {$f(x) =q\frac{1}{20} \mathrm e^x$};     \end{tikzpicture}     \end{document}      How to modify this so that only y-values from -1 to 4 are (still) shown, but instead of 0.05*e^x there is e^x shown? I know that this is quite impossible if function oscillates. But let's suppose that we are plotting function with one local minimun or no minimun at all.


title: Reduce author names to author el al. using jabref, lyx, springer LNCS class on windows

text: I had a problem in citing `bibtex` enteries in my paper created using `jabref`. I want to show the citation in a format like > niazi et al. ({2011}) When I insert citation using `lyx`, it looks same but in the `pdf` generated as an output, it show me complete list of authors. Can anybody help me what went wrong?


title: No spaces in a font created with Metafont

text: Finally I got my font created with Metafont, to appear on a PDF using LaTeX. Using the example in this answer. ![Hello World](http://i.stack.imgur.com/Yfwsu.png) The problem is that I have no space between words. How can I get spacing between words? I understand that this should be some parameter in either the `.mf` or the `.tfm` file. My metafont source is located in GitHub (too long to past it here).


title: How do I arrange diagrams in pgfplots vertically with labels?

text: I have two ternary diagrams I put side by side on the same page using pgfplots.How can I arrange them vertically and as well label them? An example of what I have is given below:               \documentclass{standalone}     \usepackage{pgfplots}     \usepgfplotslibrary{ternary}          \pgfplotsset{compat=1.8}          \begin{document}       \begin{tikzpicture}         \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                no markers,     %           clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=Sn,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=Sb,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=Bi,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },         ]              \addplot3 [black,dashed] coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)         };              \addplot3 [black,dashed] coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)         };              \addplot3 [black,dashed] coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)         };              %\node[fill=white,draw] at (0.5,{sqrt(3)/2}) {$Sn$};              %\node[fill=white,draw]  at (0,0) {$Sb$};               %\node[fill=white,draw]  at (1,0) {$Bi$};               %\legend{0.9, 0.8,0.7}       \end{ternaryaxis}     \end{tikzpicture}          \begin{tikzpicture}       \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                no markers,     %           clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=Sb,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=Sn,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=Bi,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },       ]              \addplot3 [black,dashed] coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)         };              \addplot3 [black,dashed] coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)         };              \addplot3 [black,dashed] coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)         };                %\node[fill=white,draw] at (0.5,{sqrt(3)/2}) {$Sn$};                %\node[fill=white,draw]  at (0,0) {$Sb$};                 %\node[fill=white,draw]  at (1,0) {$Bi$};                 %\legend{0.9, 0.8,0.7}         \end{ternaryaxis}       \end{tikzpicture}     \end{document}


title: How can add a logo in plain frame?

text: I generate a presentation file with beamer class. And in a specify frame, i must use plain option, but it remove my logo. How can I add again my logo on this plain frame. I used this code:               {          \logo{\includegraphics[height=0.7cm]{mylogo}}          \begin{frame}[plain]          \centering     \Huge     \textbf{{\only<1>{\color{orange}}\\[1.5cm] Thank you for listening\\     }}     \end{frame}     }      But the logo not show in my frame. Please help me. Thanks.


title: Difference between \section{} and \section*{} in Beamer

text: I get a little confused about the difference between `\section{}` and `\section*{}` in Beamer. Could you please explain in detail with examples.


title: Displaying a probability tree on beamer

text: I would like to modify the code here : http://www.texample.net/tikz/examples/scenario-tree/ in order to make it fit on beamer page. The code works on a regular article page, but the tree is way too large for a beamer slide.. what shoud I change in the code in order to have the tree on a single slide ? Many thanks for your help!


title: Slight discrepancy in left/right margins

text: This is what I'm using:               \usepackage[paper=a4paper,twoside=true,lmargin=4cm,rmargin=4cm,bindingoffset=0cm]{geometry}      For some reasons, when I print out my document, there seems to be a slight 1-2mm discrepancy between odd and even pages, when I look through a single sheet (with a light in the background). What I see is that the page on the other side is shifted by 1-2mm to the right, compared to the page I'm looking at. What could possibly explain this?


title: line numbering including blank (empty lines)

text: I have a latex document and I would like to include line numbers in it, the tricky part is that I need to count the blank (empty) lines too (emulating what MSWord does :(. I know I could use the package lineno but it doesn't seem to have an option for counting blank lines. any ideas? thanks


title: letter class font size

text: How can I increase the base font size to 14pt in standard letter class using xelatex for ease of reading for presbyopic people? which font has better visibility?


title: Drawing randomly ragged lines in technical drawings

text: I am having issues getting started on drawing a randomly ragged line, with finite variation, between two endpoints. The `random` function which uses variable `rnd` I think can be used, for instance, Drawing random paths in TikZ, but I have no idea how to use it for this purpose. I use this environment:               \documentclass[12pt]{article} % SIZE OF FONT AND ITS LAYOUT ON EACH PAGE.     \usepackage[top = 1in, bottom = 1in, left = 1in, right = 1in]{geometry} % MARGINS.     \usepackage{amsmath, booktabs, graphicx, setspace}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz,tkz-graph,tikz-cd} % DIAGRAMS.         \usetikzlibrary{arrows, calc, decorations.markings}     \begin{document}          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}[scale=1.8,auto]          % replace with randomly ragged line \draw [-,line width=1pt] (0,2) edge (2,2);     \draw [-,line width=1pt,dashed] (0,0) edge (0,2);% solid left boundary     \draw [-,line width=1pt,white] (0,0) edge (8,0);% solid lower boundary     \draw [-,line width=1pt,dashed] (8,0) edge (8,2);% solid right boundary     % make a vertical rule fill; how? How would I make a tiled rule fill, in case that looks better?          \end{tikzpicture}     \end{center}         \caption{CAPTION GOES HERE}             \label{fig:FIGURE NAME GOES HERE}     \end{figure}     \end{document}      I would like to re-create this: ![enter image description here](http://i.stack.imgur.com/m4fN6.jpg) EDIT: I think Jesse's example most produces the required result, but it cannot remove fill line segments that cross it, unlike the other two solutions. **How do I copy a generated random line after it is generated and change its color so that I have two parallel random lines?** (Then the user can place one slightly above the other, but white and thick, but below it in code. This will crop all fill lines going beyond it manually.) I am trying TikZ copy command but this shifts the entire picture right and creates the copy of the random line beside it.


title: electronics TeX

text: is there a good TeX flavor for expressing electronics symbols in documents?


title: Fontspec -- ordinal numbers not formatting properly

text: According to its manual, Fontspec contains an option               [VerticalPosition=Ordinal]      for setting the letters after a numeral (1st, 2nd, 3rd) as superscripts. When I try to use that option, though, it doesn't work. The document compiles with the letters unchanged, and the console says > Package Fontspec warning: > > OpenType feature 'VerticalPosition=Ordinal' not available for font "Times > New Roman", &c. Does anyone know how to fix this?               %preamble     \documentclass[symmetric]{tufte-handout}     \usepackage[LY1]{fontenc}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{lettrine}     \defaultfontfeatures{Mapping=tex-text}          \setromanfont{Times New Roman}     \setsansfont{Gill Sans}     \setmonofont{Monaco}          \fontspec[VerticalPosition=Ordinal]{Times New Roman}          \begin{document}          1st 2nd 3rd          \end{document}


title: Editing page numbers

text: How can I make the page numbers begin from 2, and hide them in the first two pages in LaTeX document which is using the report class.


title: Keystrokes have miraculously switched to French using Beamer

text: Hi I'm using `Beamer` to prepare a presentation and for some weird reason the `keystroke` has decided to switch to French (it worked fine in the coursebook that I have already prepared). As far as I can see the language is set everywhere to English UK (I'm using LyX). I've exported the LyX file to plain LaTeX and I can find the following               \usepackage{babel}     \makeatletter     \addto\extrasfrench{%        \providecommand{\og}{\leavevmode\flqq~}%        \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%     }      I have no idea where the `\extrasfrench` comes from. Has this been introduced by Babel? My colleagues tell me to keep the French keystrokes just for the entertainment value, but I would really rather like to switch them back to English!