title: Niceframe problem - what to do?

text: Building on the code from Gonzalo Medina, I managed to make a nice chapterstyle with niceframe. The problem is that it sometimes renders poorly, at least in Acrobat Reader: ![enter image description here](http://i.stack.imgur.com/1Ansz.png) Needles to say, I don't feel like sending this to a printer. Am I doing something wrong or is it a bug in niceframe? Here's the MWE:               \documentclass[a4paper,book,openeven,twoside]{memoir}     \usepackage{niceframe}          %% This is the frame!     \makeatletter     \makechapterstyle{Nordestgaard2}{%     \thispagestyle{empty}     \thispagestyle{cleared}     \renewcommand*{\printchaptername}{}     \renewcommand*{\printchapternum}{}     \renewcommand*{\chaptitlefont}{\rmfamily\HUGE\scshape}     \renewcommand*{\printchaptertitle}[1]{%     \vspace{-3em}     \begin{center}     \niceframe{%             \vspace{11em}         \begin{center}         {\chaptitlefont\strut##1}%     \end{center}         \vspace{10em}     }     \end{center}     }}     \setlength\afterchapskip{15pt}     \setlength\beforechapskip{-15pt}     \makeatother     %% Thus ends the frame!          \begin{document}     \chapterstyle{Nordestgaard2}     \chapter{Foo}     \chapter{Bar}     \end{document}


title: How does Latexian's live preview feature work?

text: In particular, does it use any trick to generate the preview more quickly?


title: Rendering only the Table of Contents

text: Strange question, but I wanted to know if its possible to render only the table of contents and not the associated body of text below. Is there a suppression command that means that a section is processed but not drawn?


title: Restore noindentafter functionality with polyglossia

text: When `polyglossia` is loaded `noindentafter` stops working:               \documentclass{article}         \usepackage{fontspec}             \setmainfont{Latin Modern Roman}         \usepackage{lipsum}         \usepackage{polyglossia}             \setmainlanguage{french}             %   \PolyglossiaSetup{french}{indentfirst=false}         \usepackage{noindentafter}             \NoIndentAfterEnv{myitemize}              \newenvironment{myitemize}{\begin{itemize}}{\end{itemize}}          \begin{document}        \begin{myitemize}            \item test        \end{myitemize}             \lipsum     \end{document}      ![enter image description here](http://i.stack.imgur.com/859JJ.png) This happens with all the languages I tested. In No indent in the first paragraph in a section? egreg suggested to add `indentfirst=false` (commented in the code) but unfortunately it does not work for custom environments. Is there a (possibly easy) way to restore the `noindentafter` functionality when using`polyglossia`?


title: How can I set the space between elements of a set?

text: I want to list all elements of a set. I tried               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \[\left \{0, 1, 2, 3, 4, 5, 6\right \}\]          \[\left \{0,\, 1, \,2, \, 3, \,4, \,5, \,6\right \}\]     \end{document}      ![enter image description here](http://i.stack.imgur.com/FejHC.gif) Is there anyway that I do better?


title: Extra space on the first line after wrapfigure and pspicture caption not centered

text: Two questions about below MWE from a pstricks newbie:   1. Why is there an extra space between the picture and the first `\sin\alpha` formula?   2. Why is the caption of the `pspicture` stuck to the right? (Adding `\par` as commented out did not work.) Appreciate your help!               \documentclass[10pt,letterpaper]{beamer}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{pstricks, pst-node}     \usepackage{pst-eucl}     \usepackage{wrapfig}     \usepackage{caption}     \begin{document}          % Compile sequence: F2, F4, F8, F7     \setlength\intextsep{0pt}     \begin{wrapfigure}{l}{0pt}     \pspicture(0,0)(5.5,4.5)     \pstTriangle(0,0){B}(4,3){A}(4,0){C}     \pstMarkAngle{C}{B}{A}{$\alpha$}     \pstMarkAngle{B}{A}{C}{$\beta$}     \pstMarkAngle{A}{C}{B}{$\gamma$}     \pcline[linestyle=none](0,0)(4,3)     \naput[nrot=:U]{c}     \pcline[linestyle=none](0,0)(4,0)     \tbput{a}     \pcline[linestyle=none](4,0)(4,3)     \trput{b}     \endpspicture     \captionof{figure}{Straight triangle}     \end{wrapfigure}     %\par     \[\sin\alpha=\frac{b}{c}\]     \[\cos\alpha=\frac{a}{c}\]     \[\tan\alpha=\frac{b}{a}\]     \[\sin\beta=\frac{a}{c}\]     \[\cos\beta=\frac{b}{c}\]     \[\tan\beta=\frac{a}{b}\]     \end{document}      And if I replaced the last lines after `%\par` with the following, then the first line of 3 formulas would still be pushed far to the right, the second line would overlap the picture, and lorem ipsum would simply ignore the picture on the first page, but wrap a non-existing picture on the following pages. (`\usepackage{lipsum}` required.)               \[\sin\alpha=\frac{b}{c}\quad\cos\alpha=\frac{a}{c}\quad\tan\alpha=\frac{b}{a}\]     \[\sin\beta=\frac{a}{c}\quad\cos\beta=\frac{b}{c}\quad\tan\beta=\frac{a}{b}\]     \lipsum     \end{document}      This would render lorem ipsum correctly, but the formulas would have a new line after `sin a =`:               $\sin\alpha=\frac{b}{c}\quad\cos\alpha=\frac{a}{c}\quad\tan\alpha=\frac{b}{a}$\\     $\sin\beta=\frac{a}{c}\quad\cos\beta=\frac{b}{c}\quad\tan\beta=\frac{a}{b}$\\     \lipsum     \end{document}


title: Large empty bordered cells in tabular environment

text: I am trying to build a worksheet for students and I am having difficulty getting my table to behave the way I want it to. I am trying to build a large empty cell, which I mostly have using `\multicolumn`, but my borders along the sides are broken when I try to add `\vspace`:               \documentclass[12pt]{article}          \usepackage[margin=1in]{geometry}          \begin{document}          \begin{tabular}{| l | p{0.4\textwidth} |}         \hline         Point 1: \hspace{0.3\textwidth} & Point 2: \vspace{2cm}\\ \hline         \multicolumn{2}{|c|}{\vspace{5cm}} \\ \hline     \end{tabular}          \end{document}      Any ideas?


title: Endfloat and appendix: two sets of floats

text: I am using the endfloat package and I'd like to print two sets of floats. The first set right after the bibliography where each figure and table is labeled Figure 1, Figure 2, Table 1, Table 2, etc and the second one right after the appendix where each figure and table is labeled Figure A1, Figure B2, Table A1, Table A2, etc. How do I do this? Using the following lines I get there, except that the appendix figures and tables are printed in the text, not as floats. Removing those lines makes the figures and tables to be labeled through from the first set of floats.               \processdelayedfloats          \makeatletter     \efloat@restorefloats     \makeatother          \appendix     \renewcommand{\thesubsection}{\Alph{subsection}}     \setcounter{table}{0}     \setcounter{figure}{0}     \renewcommand{\thetable}{A\arabic{table}}     \renewcommand{\thefigure}{A\arabic{figure}}          \section*{Appendices}          \subsection{Reporting ratios}


title: Why are some tables missing in the list of tables?

text: In the thesis I am writing, I have a few tables that I would like to see listed at the beginning. To do so, I use the command               \listoftables      However, only one table is listed and all the others are not. This is still the case even after multiple compilation. I cannot tell the difference between my tables, since I used a correct caption everywhere. What could be a possible reason for this? How can I make all the tables be listed? I did not use the following commands:               \captionsetup[table]{list=no}     \nofiles     \includeonly


title: biblatex and new line for Title, and all entries in general

text: I want to create a Bibliography that is a little more readable, meaning, for a single bibliography entry everything should start on a new line. Since the document will not be printed, nor submitted to any journal, this should be allowed :-) Well I found this, which basically solves the problem for some, However, the biblatex.def is a little too complicated for my tastes, and I'm at a loss how to translate this into a solution that I like. Basically what I want is this:               First Author, Second Author, And So Forth,     The title of the work,     DOI for example,     And all the other stuff continues on like this,     ....      Instead of the usual random linebreaks and in general hard to read stuff that looks somewhat like this               First Author, Second Author, And So Forth, The title of     the work, DOI for example, And all the other stuff      continues on like this, ....      I guess it should be possible to insert a linebreak before any type of element whatsoever, instead of manually doing it for each element. (Although that would be preferable for some people, if they only need it for some elements) In any case, I don't know which elements those are, because there are a lot of elements named "title" and "author" in biblatex.def.


title: Missing line break in section title

text: I'm using MikTex with pdfLaTeX on Win7. I have a section title like this:               \section{Naming conventions - CamelCase and SNAKE\_CASE}      The title renders fine in general, but it isn't wrapping around. Instead, it's going all the way into the right margin, almost outside of the page. All the other titles, some much longer than this one, are wrapping properly. When I remove the `\_`, it starts wrapping properly, **and it wraps right there where the underline was**. What is going on here? My guess is that it doesn't know how to break on underline, where it happens to be the best place to break, so it goes stupid for some reason. How do I fix this?


title: \ref for data file sources

text: I am writing my bachelor's in statistics and use a lot of freely downloadable data for my analysis, eg from http://www.fueleconomy.gov/. The question is, how do I list and `\ref` the files TeX way? I am using BibTeX for literature, but I can't find something for data sources. I'd like something like:               Analyzing \ref{data:car_fuel}, we can clearly see...      Resulting into               Analyzing Car Consumption for 2012, we can clearly see...      and somewhere at the end a list like:               Car Consumption for 2012     some comment     source: http://www.fueleconomy.gov/     link: http://www.fueleconomy.gov/feg/epadata/12data.zip      or similar.


title: beamer frame title with a triangle indicator

text: Is it possible to add a triangle indication on each beamer frame? e.g.               \documentclass[14pt]{beamer}     \usepackage{tikz}          \begin{document}          \begin{frame}{title here}     \begin{center}     \begin{tikzpicture}     \draw[step=.5cm,gray,very thin] (-2.5,-2.5) grid (2.5,2.5);     \draw[thick] (0,0) circle (2cm) node {$O$};     \end{tikzpicture}     \end{center}     \end{frame}          \end{document}      The output is below: ![enter image description here](http://i.stack.imgur.com/USZJZ.png) I wish to:   1. add a triangle before "title here" (every frame).   2. add a line below the title.


title: Translating the "keywords" label (icst class)

text: I'm writing an article for my faculty and I have to use this template. I would like to translate the `keywords` label, at the beginning of the template, to my native language. I tried:               \renewcommand{\keywords}%     {MyTransaltion}      which translates it, but also moves it at the top of the template, so this isn't working. I also set my language with: `\selectlanguage{myLanguage}`, which did change a few labels, but not this one. Can someone help me with this?


title: Problem compiling Bibliography on Gummi

text: I am trying to create cites and bibliography,in ApJ style, using the tex commands below using Gummi.               \documentclass[12pt]{article}          \usepackage{ natbib}     \citestyle{aa}     \begin{document}          \section{Introduction}          \cite{texbook}          \section{Conclusion}           \cite{Narendra_1990}          \bibliography{Bib2}{}     \bibliographystyle{apj}          \end{document}      However, I keep getting the following error:               /tmp/.LatexEssay.tex.bbl:8: Undefined control sequence.     l.8 {Worthey}, G. 1994, \apjs                              , 95, 107     /tmp/.LatexEssay.tex.bbl:8:  ==> Fatal error occurred, no output   PDF          file    produced!     Transcript written on /tmp/.LatexEssay.tex.log.      My Bibtex file is:                   @Article{Narendra_1990,         author =       {K.S.Narendra and K.Parthsarathy},         title =        {Identification and Control of Dynamical System                       using Neural Networks},         journal =      "IEENN",         year =         {1990},         volume =    {1},         number =    {1},         month =     {},         pages =     {4-27},         note =      {},         annote =    {}         @BOOK{texbook,         author = "Donald E. Knuth",         title= "The {{\TeX}book}",         publisher = "Addison-Wesley",         year = 1984         }         @ARTICLE{1994ApJS...95..107W,         author = {{Worthey}, G.},         title = "{Comprehensive stellar population models and the disentanglement  of age and metallicity effects}",        journal = {\apjs},        year =  1994,        month = nov,        volume = 95,        pages = {107-149},        doi = {10.1086/192096},        adsurl = {http://adsabs.harvard.edu/abs/1994ApJS...95..107W},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }      If I cite the `texbook` and `Narendra_1990` references I have no problem. It is only when I include the `1994ApJS...95..107W` reference that the error occurs. Any help appreciated!


title: Underfull \hbox (badness 10000) detected at line XX []$[] $

text: I know there were a lot of questions regarding underfull hbox, but in my case error               Underfull \hbox (badness 10000) detected at line 5      []$[]    $      point to line               5: \begin{document}      How can hbox be underfull if compilation of the document has not even started? EDIT: after inspection I have found out that `autonum` package is creating this error.               \documentclass{article}          \usepackage{autonum}          \begin{document}     \end{document}


title: On using the slash to denote division in math mode

text: In in-line math mode, I tend to use the literal slash (i.e. `/`) to denote division. Unlike the common binary operators [`+ - \times \div`], `/` is treated as an ordinary math object, though. This may easily result in inconsistent (asymmetric) horizontal spacing, for instance when `/` is preceded by a variable and succeeded by a function, as in the following example:               \documentclass{article}          \usepackage{amsmath}          \begin{document}          \noindent     \(\tan x = \sin x / \cos x\)          \end{document}      Output: ![](http://i.stack.imgur.com/YjkdK.png) Of course, I can correct the horizontal spacing by turning `\cos x` into an ordinary math object:               \(\tan x = \sin x / {\cos x}\)      Output: ![](http://i.stack.imgur.com/mUmhq.png) Alternatively, I can make `/` function as a binary operator similar to [`+ - \times \div`]:               \(\tan x = \sin x \mathbin{/} \cos x\)      Output: ![](http://i.stack.imgur.com/YzEcE.png) Now, I am curious: Which of the above two workarounds should be preferred? Or is there even a better one?


title: Parameterized anchors in pgf/tikz

text: In order to draw a printed circuit board layout, we've defined a DIP shape ( **`shapes.tex`** ):               \pgfkeys{/pgf/.cd,       pcbpins/.initial=14,       pcbdipdx/.initial=0.3 in,       pcbdipwidth/.initial=0.4 in,       pcbdipheight/.initial=0.1 in,       pcbdipnudge/.initial=0.05 in,       pcbcircleout/.initial=0.03 in,       pcbcirclein/.initial=0.015 in,       pcbcirclediff/.initial=0.1 in     }          \pgfdeclareshape{pcbbase} {       \savedanchor\centerpoint{         \pgf@x=.5\wd\pgfnodeparttextbox         \pgf@y=.5\ht\pgfnodeparttextbox         \advance\pgf@y by-.5\dp\pgfnodeparttextbox       }       \saveddimen\halfwidth{%         \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}%           \pgf@x=0.5\pgf@xb       }       \saveddimen\halfheight{         \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}%           \pgf@x=0.5\pgf@yb       }       \saveddimen\radius{%         \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}%           \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}%           \pgf@x=.5\pgf@xb%         \pgf@x=.5\pgf@yb%       }       \anchor{center}{\centerpoint}       \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}       \anchor{base}{\centerpoint\pgf@y=0pt}       \anchor{north}{\centerpoint\advance\pgf@y by\halfheight}       \anchor{south}{\centerpoint\advance\pgf@y by-\halfheight}       \anchor{west}{\centerpoint\advance\pgf@x by-\halfwidth}       \anchor{east}{\centerpoint\advance\pgf@x by\halfwidth}       \anchor{midwest}{\centerpoint\pgfutil@tempdima=\halfwidth\advance\pgf@x by-0.85\pgfutil@tempdima}     }          \pgfdeclareshape{pcbdip} {       \inheritsavedanchors[from=pcbbase]       \inheritanchor[from=pcbbase]{center}       \inheritanchor[from=pcbbase]{mid}       \inheritanchor[from=pcbbase]{base}       \inheritanchor[from=pcbbase]{north}       \inheritanchor[from=pcbbase]{south}       \inheritanchor[from=pcbbase]{west}       \inheritanchor[from=pcbbase]{east}       \inheritanchor[from=pcbbase]{midwest}       \savedmacro\halfpins{%         \pgfmathdivide{\pgfkeysvalueof{/pgf/pcbpins}}{2}         \let\halfpins\pgfmathresult       }       \saveddimen\circlein{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbcirclein}}}       \saveddimen\circleout{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbcircleout}}}       \saveddimen\circlediff{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbcirclediff}}}       \saveddimen\dipdx{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbdipdx}}}       \saveddimen\dipwidth{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbdipwidth}}}       \saveddimen\dipheight{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbdipheight}}}       \saveddimen\dipnudge{\pgfmathsetlength{\pgf@x}{\pgfkeysvalueof{/pgf/pcbdipnudge}}}       \backgroundpath{         \pgfseteorule         \pgfutil@tempdima=\circlein         \pgfutil@tempdimb=\circleout         \pgfutil@tempdimc=\circlediff         \pgfutil@tempdimd=\dipdx         \pgfutil@tempdime=0.5\pgfutil@tempdimc         \pgfmathloop         \ifnum\pgfmathcounter>\halfpins         \else           \advance\pgfutil@tempdime by -0.5\pgfutil@tempdimc           \repeatpgfmathloop         \fi         \pgfutil@tempdimf=\dipheight         \pgfutil@tempdimg=\dipwidth         \pgfutil@tempdimh=\dipnudge         \pgfmathloop         \ifnum\pgfmathcounter>\halfpins %pins         \else           \centerpoint\advance\pgf@x by-0.5\pgfutil@tempdimd\advance\pgf@y by\pgfutil@tempdime\pgfpathcircle{\pgfpoint{\pgf@x}{\pgf@y}}{\pgfutil@tempdima}           \centerpoint\advance\pgf@x by-0.5\pgfutil@tempdimd\advance\pgf@y by\pgfutil@tempdime\pgfpathcircle{\pgfpoint{\pgf@x}{\pgf@y}}{\pgfutil@tempdimb}           \centerpoint\advance\pgf@x by0.5\pgfutil@tempdimd\advance\pgf@y by\pgfutil@tempdime\pgfpathcircle{\pgfpoint{\pgf@x}{\pgf@y}}{\pgfutil@tempdima}           \centerpoint\advance\pgf@x by0.5\pgfutil@tempdimd\advance\pgf@y by\pgfutil@tempdime\pgfpathcircle{\pgfpoint{\pgf@x}{\pgf@y}}{\pgfutil@tempdimb}           \advance\pgfutil@tempdime by\pgfutil@tempdimc           \repeatpgfmathloop         \fi         \color{gray}         \pgfusepath{fill}         \pgfsetlinewidth{2\pgflinewidth}         \advance\pgfutil@tempdime by-\pgfutil@tempdimc         \advance\pgfutil@tempdime by0.5\pgfutil@tempdimf         \centerpoint\advance\pgf@x by-0.5\pgfutil@tempdimg\advance\pgf@y by\pgfutil@tempdime\pgfpathmoveto{\pgfpoint{\pgf@x}{\pgf@y}}         \centerpoint\advance\pgf@x by-\pgfutil@tempdimh\advance\pgf@y by\pgfutil@tempdime\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}\pgfpatharc{-180}{0}{\pgfutil@tempdimh and \pgfutil@tempdimh}         \centerpoint\advance\pgf@x by0.5\pgfutil@tempdimg\advance\pgf@y by\pgfutil@tempdime\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}         \centerpoint\advance\pgf@x by0.5\pgfutil@tempdimg\advance\pgf@y by-\pgfutil@tempdime\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}         \centerpoint\advance\pgf@x by-0.5\pgfutil@tempdimg\advance\pgf@y by-\pgfutil@tempdime\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}\pgfpathclose         \color{black}         \pgfusepath{stroke}         % Draw port labels         \begingroup         \tikzset{pcb/part labels} % Use font from this style         \tikz@textfont         \centerpoint         \pgftext[at={\pgfpoint{\pgf@x}{\pgf@y}},rotate=-90]{\raisebox{-0.75ex}{\pgfkeysvalueof{/pgf/pcblabel}}}     \endgroup       }     }      and with **`main.tex`** file:               \documentclass{article}     \usepackage{tikz}     \makeatletter     \input{shapes}     \makeatother     \begin{document}     \begin{tikzpicture}     \node[shape=pcbdip,pcbpins=20] (DIP) at (0,0) {};     \draw (DIP.pin0) -- (DIP.pin18);     \end{tikzpicture}     \end{document}      As you can see, one can set the `pcbpins` value in order to generate DIP packing shapes for an arbitrary number of pins. We wish to define anchors based on this parameter as well such that if one specifies `20` pins, one can access the anchors of the node `DIP.pin0` to `DIP.pin20`. How can one define this? We know this is possible since this works for an AND gate.


title: Introduction to LaTeX and Markup

text: I've got interest from someone in LaTeX, but she's not a computer person. She is smart, very smart, but not a computer person. i.e. She didn't know that typing something on the command line ran a program, she thought they were all part of the command line. Is there a really basic introduction to LaTeX and markup in general for her? Something that will start from basic concepts, and build from there, without going into 'here are a zillion editor options and different versions of LaTeX' like the wikibook does? I think the wikibook is a great resource once you understand what is going on, but I'd like an introduction to explain the basic concept, perhaps with some very minimal examples?


title: Light Gray color in beamer

text: I want to know how to define a light gray color with beamer. I am using this color to shade a small block of my text. Here is the code I am using for defining my colors. `\definecolor{shadecolor}{rgb}{0.01,0.199,0.1}` The current color is giving me a very dark green. I am not sure how to change this to light gray. Can some one help with this ? Beamer only seems to be accepting values between 0 and 1. This link does give values for gray but I think it is for some other units. http://www.tayloredmktg.com/rgb/


title: Creating straight line in matrix

text: I need to add some straight lines inside a matrix to indicate labeling of rows, like this: ![screenshot](http://i.stack.imgur.com/DJUZN.png) How do I do that?


title: How to design shapes in beamer presentation?

text: I would like to prepare a presentation in `beamer`. I would like to include some shapes in some of the slides. I would like to ask what is the best way to do so. Is it better to draw the shapes using another software and then add them in the tex file, or is there any package that allows me to do so in the tex file? Thanks in advance.


title: Alternative to IEEEeqnarray

text: By recommendation from _The Not So Short Introduction to LaTeX_ , I have been using the `IEEEeqnarray` environment a lot, since it solved many of the rather annoying problems related to the `align`environment. But because of its limited documentation and the changes it causes to other environments like `enumerate`, I have started to look for alternatives. The advantages for the `IEEEeqnarray` are:   * The command `\IEEEyesnumber`, which allows you to insert equation numbers in an `IEEEeqnarray*` environment. That made it a lot easier to just insert equation numbers in one row without having to write `\nonumber` at the end of every single line like in the `align` environment.   * It included the option to edit the width of the columns, like in the `array` environment. The syntax was: `\begin{IEEEeqnarray*}{rCl}`, and it was a really nice option. Does anybody know a way to achieve the same advantages with other environments?


title: Custom floats are not labeled correctly in the listof or text references

text: I'm new to StackExchange and LaTeX. I am using a custom float for "schemes" using the caption package. The problem I'm having is that the label "Scheme" does not show up when using the \ref command in text, nor does it show up in the list. I have posted a MWE below:               \documentclass[letterpaper,12pt]{article}          \usepackage{graphicx}     \usepackage[listformat=simple]{caption}          \DeclareCaptionType[name=Scheme,within=section]{scheme}          \begin{document}          \tableofcontents          \listofscheme          \newpage          \section{new section}     This is a new section with \ref{sch:1}.     \begin{scheme}         \begin{center}             \caption{\label{sch:1}This is a scheme.}             \rule[-1mm]{8mm}{1cm}         \end{center}     \end{scheme}          \section{Another section}     Testing \ref{sch:2}.     \begin{scheme}         \begin{center}             \caption{\label{sch:2}This is a another scheme.}             \rule[-1mm]{20mm}{1cm}         \end{center}     \end{scheme}          \end{document}      The List of Schemes only has the scheme numbers, but I want "Scheme" prefixed to the number to say "Scheme 1.1" If I use the `\ref` command in text, I get a similar problem; it only shows the number, not the "Scheme" label. If I can change my code or message to be more meaningful, let me know since I'm a n00b. Additionally, I cannot use the `tocloft` package; it does not mesh with the thesis template from my school. The template does not affect the results, I get the same thing from the MWE as I do from my full document using the template. Any help would be much appreciated


title: Swallowed space after \tnote

text: I'm using `threeparttable` to add table notes to a `tabu` tabular*. A common use case is to have a note at the end of a cell. If the note is however not added to a cell's last word, the following space is swallowed. ![enter image description here](http://i.stack.imgur.com/U6HvD.png) It's possible to add an `\hspace` after the note, as can be seen in the third row. Also, as a global workaround, one could add a space to the `\tnote` command's definition:               \renewcommand{\tnote}[1]{\protect\TPToverlap{\textsuperscript{\TPTtagStyle{#1}}}~}%       The former solution is somewhat acceptable, the latter rather hackish. Is there a better way of achieving the standard `\footnote` behaviour of _not_ swallowing spaces?               \documentclass{article}     \usepackage{booktabs}     \usepackage{tabu}     \usepackage{threeparttable}          \usepackage{xpatch}     \makeatletter     \chardef\TPT@@@asteriskcatcode=\catcode`*     \catcode`*=11     \xpatchcmd{\threeparttable}       {\TPT@hookin{tabular}}       {\TPT@hookin{tabular}\TPT@hookin{tabu}}       {}{}     \catcode`*=\TPT@@@asteriskcatcode     \makeatother          \begin{document}     \centering     \begin{threeparttable}         \begin{tabu} to .4\textwidth {XX}             a & b\tnote{*} and c                \\\toprule             1 & {2\tnote{*}}{~and 3}            \\             4 & 5\tnote{*}\hspace{1.5ex}and 6   \\\bottomrule         \end{tabu}         \begin{tablenotes}             \footnotesize             \item[*] The table note.         \end{tablenotes}     \end{threeparttable}     \end{document}      (*) That's possible thanks to a patch by @egreg.


title: vim type Display for C Code in Latex

text: **Target Display:** ![enter image description here](http://i.stack.imgur.com/TBTdO.jpg) **My Latex Code:**               % xxxxxxxxxxxxxxxxxxxxxxxxx Code Snippet STARTS xxxxxxxxxxxxxxxxxxxxxx     \lstset{       language=C,                     % choose the language of the code       stepnumber=1,                   % the step between two line-numbers. If it's 1, each line will be numbered      % numbersep=5pt,                 % how far the line-numbers are from the code     %  backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}       showspaces=false,               % show spaces adding particular underscores       showstringspaces=false,         % underline spaces within strings       showtabs=false,                 % show tabs within strings adding particular underscores       tabsize=4,                      % sets default tabsize to 2 spaces       captionpos=t,                   % sets the caption-position to top       breaklines=true,                % sets automatic line breaking       breakatwhitespace=true,         % sets if automatic breaks should only happen at whitespace      % title=\lstname,                % show the filename of files included with \lstinputlisting;      identifierstyle=\color{black},      caption={Array of Pointers to Strings},      frame=lrtb,      %keywordstyle=\bfseries\color{OliveGreen},         % keyword style      keywordstyle=[1]\bfseries\color{OliveGreen},      % Define TYPE-1 Keywords      keywords=[1]{         int, char,float, double, unsigned, signed,         goto},      % Define TYPE-2 Keywords      keywordstyle=[2]\bfseries\color{Violet},       keywords=[2]{       %s, %d,        include, define},      % Define TYPE-3 Keywords      keywordstyle=[3]\bfseries\color{Sepia},       keywords=[3]{         return},      commentstyle=\bfseries\color{blue},   % comment style      stringstyle= \color{Magenta!80},          % string literal style      belowcaptionskip = 0.2in,                % Space below caption      abovecaptionskip = 0.2in                 % Space above caption     }     \begin{lstlisting}          #include <stdio.h>          #define SIZE 4          int main()     {         char *strings[SIZE] =                            {                             "String1",                              "String2",                             "String3",                             "String4"                           };              char *ptr_swap;   /* A temporary pointer to swap strings */              /* Swap "String2" with "String3" */         ptr_swap  = strings [1];         strings [1] = strings [2];                             strings [2] = ptr_swap;                   printf ("%s %s %s %s", strings[0], strings[1], strings[2], strings[3]);              return 0;     }           \end{lstlisting}     % xxxxxxxxxxxxxxxxxxxxxxxxx Code Snippet ENDS xxxxxxxxxxxxxxxxxxxxxxxx      My Output is as follows: The fields marked under Red Line have Different Formatting from the Target. ![enter image description here](http://i.stack.imgur.com/66gRL.jpg)   * Please help me correct these settings so that I can get the desired 'gvim' like output.   * How can I specify keywordstyle for **Format Specifiers** since, putting: %s, %d -> make the statement commented? Thanks.


title: Check if at begin of a line

text: For a list of bullet-separated items, I want the separator to be swallowed if it is the first or last element of the line. That is, I want something like               \renewcommand{\and}{%       \ifnolinebreak%    <=== HERE'S THE PROBLEM         {\hfill\textbullet\hfill\xspace}%       \else{}\fi     }     Aa Bb \and Cc Dd \and veryveryverylongE \and Ff Gg \and H      to end up like               Aa Bb   *   Cc Dd     veryveryverylongE     Ff Gg     *     H      I know that `\discretionary` can be exploited in the following way:               \renewcommand{\and}{\discretionary{}{}{\mbox{~~{\textbullet}~~}}}      This does the job, but unfortunately I can't find a way to insert a stretchable skip in the discretionary definition. Thus, it looks awkward in justified mode:               Aa   Bb * Cc   Dd     veryveryverylongE     Ff         Gg * H      Any ideas how to implement the `\ifnolinebreak`? If it matters, for this project I use LuaLaTeX...


title: redefine \includegraphics for beamer

text: I'm using Pandoc to convert from markdown to LaTeX or Beamer. The LaTeX template of Pandoc has nice command so that images are resized to fit the text width but the Beamer output is not.               \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}      So I tried to copy the commands to the Beamer template, but then it gives an error while compiling with pdflatex. I checked the preamble but couldn't figure out which one is incompatible. Maybe beamer class itself is the problem? Here is my sample beamer code.               \documentclass[ignorenonframetext,]{beamer}     \usepackage{amssymb,amsmath}     \usepackage{ifxetex,ifluatex}     \usepackage{fixltx2e} % provides \textsubscript     \ifxetex       \usepackage{fontspec,xltxtra,xunicode}       \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}     \else       \ifluatex         \usepackage{fontspec}         \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}       \else         \usepackage[utf8]{inputenc}       \fi     \fi          \usepackage{graphicx}     \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}     % Comment these out if you don't want a slide with just the     % part/section/subsection/subsubsection title:     \AtBeginPart{\frame{\partpage}}     \AtBeginSection{\frame{\sectionpage}}     \AtBeginSubsection{\frame{\subsectionpage}}     \AtBeginSubsubsection{\frame{\subsubsectionpage}}     \setlength{\parindent}{0pt}     \setlength{\parskip}{6pt plus 2pt minus 1pt}     \setlength{\emergencystretch}{3em}  % prevent overfull lines     \setcounter{secnumdepth}{0}               \begin{document}          \begin{frame}\frametitle{Introduction}          Testing image size from R saved by various methods.          \end{frame}          \begin{frame}\frametitle{Results}          All images were set width = 7. For ggsave, the dpi =300.          \begin{block}{Saved by ggsave}          \begin{figure}[htbp]     \centering     \includegraphics{./plot_by_ggsave.pdf}     \caption{Saved by ggsave}     \end{figure}          \end{block}     \end{frame}          \end{document}


title: Changing Size of Arrows, Labels, Loops in Diagrams and Directed Graphs

text: Consider this MWE:               \documentclass[12pt]{article}     \usepackage{tkz-graph, tikz-cd}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.markings}     \begin{document}          Blah ... blah.          \begin{tikzpicture}[scale=2,auto]     \tikzset{EdgeStyle/.style={postaction=decorate},     MyLabel/.style={     auto=right,     fill=none,     outer sep=0.2ex}}     \node [anchor=east] at (-.1,3) {$XYZ$};     \node (n1) at (0,1) {$Ay$};     \node (n2) at (1,3) {$Bx$};     \node (n3) at (2,2) {$Cy$};     \node (n4) at (4,4) {$Dx$};     \draw [line width = 1 pt, |->,bend left = 20] (n1) edge node {$V$}  (n2);     \draw [line width = 1 pt, ->] (n2) edge node[swap] {$W$} (n3);     \begin{scope}[commutative diagrams/.cd, every arrow, every label]     \draw [line width = 1 pt, |->,bend left = 60] (n2) edge node[swap] (aux) {$Z$} (n4);     \draw [line width = 1 pt, |->,bend right = 60] (n3) edge node[swap] (aux) {$Y$} (aux);     \end{scope}     \draw [line width = 1 pt, double equal sign distance] (n1) -- (n3);     \draw [line width = 1 pt, white,-,line width=8pt,->, bend right=10] (n2) edge (n4);     \draw [line width = 1 pt, ->, bend right=10] (n2) edge (n4);     \Edge[style={bend right = 60},label={$f$},labelstyle={MyLabel}](n1)(n4)     \Edge[style={bend left = 60},label={$g$},labelstyle={MyLabel,swap}](n1)(n2)     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/RdXrS.png) The different arrows and edges are easily mixed in this nonsense minimal example. But some labels are larger in size than others. Those labels which are in a scope bracket are smaller than those arrows not in such a bracket. Can this be fixed? Can the labels by made in size corresponding to the size 12 font used everywhere else in the document? For instance, can an arrow going from a node to a label, like in the above example, be created here without relying on the scope command? Can a label be designated as a node so that several nodes can be linked with arrows to it, if nonlinear diagrams cannot be reduced into several scope blocks which do not include such node-to-label arrows in between them? This would naturally remove the scope command if possible and solve the size problem too. How does on draw right or left loops (I know it can be done easily in tikz-cd, say               f(x)     \arrow[mapsto,loop left]{r}{g}      is a mapsto loop labeled g,but what is the parameter here in tikzpicture) that is compatible with these arrows in sense that the have labels identical in size to labels or tikzpicture arrows? How do I specify size or arrowheads and thickness of lines manually. Maybe that is the answer to the problem? I have used line width = x pt, but can I make arrow heads and ends of arrows larger without making lines themselves thicker? If I delete the line width = x pt I get very tiny arrowheads... Maybe edge commands can be made into arrows? into arrows (with decoration)? Can someone refer me a complete list of arrows such as ->, ->>, |->, double equal sign distance, which correspond to the arrows available in tikz-cd? UPDATE: This is how I made arrows to be larger while preserving tail lines in mapsto (|->) arrows:               \documentclass[112pt]{article}     \usepackage{tikz, tkz-graph, tikz-cd}     \usetikzlibrary{arrows,calc}      \pgfarrowsdeclare{btip}{usertip}{\setlength{\arrowsize}{0.3pt}       \addtolength{\arrowsize}{.5\pgflinewidth}       \pgfarrowsrightextend{0}       \pgfarrowsleftextend{-5\arrowsize}}       {\setlength{\arrowsize}{0.4pt}       \addtolength{\arrowsize}{.5\pgflinewidth}       \pgfpathmoveto{\pgfpoint{-5\arrowsize}{4\arrowsize}}       \pgfpathlineto{\pgfpointorigin}       \pgfpathlineto{\pgfpoint{-5\arrowsize}{-4\arrowsize}}       \pgfusepathqstroke}       \begin{document}     \begin{tikzpicture}[scale=2,auto]     \tikzset{EdgeStyle/.style={postaction=decorate},     MyLabel/.style={     auto=right,     fill=none,     outer sep=0.2ex}}     \node [anchor=east] at (-.1,3) {$XYZ$};     \node (n1) at (0,1) {$Ay$};     \node (n2) at (1,3) {$Bx$};     \node (n3) at (2,2) {$Cy$};     \node (n4) at (4,4) {$Dx$};     \draw [-btip, line width = 1 pt, bend left = 20] (n1) edge node {$V$}  (n2);     \draw [-btip, line width = 1 pt] (n2) edge node[swap] {$W$} (n3);     \begin{scope}[commutative diagrams/.cd, every arrow, every label]     \draw [-btip, line width = 1 pt, bend left = 60] (n2) edge node[swap] (aux) {$Z$} (n4);     \draw [-btip, line width = 1 pt, bend right = 60] (n3) edge node[swap] (aux) {$Y$} (aux);     \end{scope}     \draw [line width = 1 pt, double equal sign distance] (n1) -- (n3);     \draw [white,-,line width=8pt,->, bend right=10] (n2) edge (n4);     \draw [-btip, line width = 1 pt, bend right=10] (n2) edge (n4);     \draw [|->, line width = 1 pt, bend right=10] (n2) edge (n4);     \draw [-btip, line width = 1 pt, bend right=60] (n1) edge (n4);     \draw [-btip, line width = 1 pt, bend left=60] (n1) edge (n2);     \end{tikzpicture}     \end{document}      But I can't get this to work with forms like |->. It seems that inserting the |-> parameter together with -btip results in the |-> arrow overwriting -btip, or -btip overwriting |->. So far, I can only create two arrows, one -btip and one |-> following same path so that both the tail and the arrowhead show up, but this is bad style and with complex diagrams overly complicates code. Is this the only trick to customizing these sorts of arrows? Thanks!


title: Manually copy older TeXLive2011 from one Mac to a new Mac

text: From an earlier question of mine, it was determined that one can **not** obtain the latest version of older releases (ex. TeXLive2010, TeXLive2011). I am upgrading my Mac and would like to know the process of copying over _manually_ the files from a Mac that has TeXLive2010 and TeXLive2011 installed. I'd prefer to **not** use the Migration assistant, so that I can control exactly what is being updated. So, what I naively tried was:   * Copy `/usr/local/texlive/2010` and `/usr/local/texlive/2011` form old Mac to new Mac.   * Install TeXLive2012 which created `/usr/local/texlive/2012` on new Mac. On my older Mac I have the following in my Preferences panel: ![enter image description here](http://i.stack.imgur.com/uSgSo.png) But on my new Mac I only have `TeXLive-2012` shown, and want to know how to get that to show the other two versions. So, what other files do I need to manually copy over so that I can have access to all three versions? Deleting and reinstalling TeXLive2012 is not a problem. ## Notes:   * This is a followup up to How to download MacTeX 2011 now that MacTex 2012 is available


title: First half of plots is missing

text: I want to draw some functions with gnuplot. It works well, but the first half is missing and I don't know why.               \begin{figure}[htpb]     \begin{center}     \begin{tikzpicture}     \begin{axis}[width=0.8\textwidth, xlabel={Anzahl der Prozessoren}, ylabel={Speedup}, xmin=1, xmax=4096, ymin=0, ymax=30, xmode = log, log basis x={2},xticklabel=\pgfmathparse{2^\tick}\pgfmathprintnumber{\pgfmathresult}]     \addplot gnuplot[black, solid, raw gnuplot,id=bal,mark=none,very thick]{     set xrange [0:4096];     set yrange [0:30];     p = 0.5;     f(x)=1/((1-p) + p/x);     plot f(x)};     \addplot gnuplot[black, dashed, raw gnuplot,id=bal,mark=none,very thick]{     set xrange [0:4096];     set yrange [0:30];     p = 0.8;     f(x)=1/((1-p) + p/x);     plot f(x)};     \addplot gnuplot[black, dotted, raw gnuplot,id=bal,mark=none,very thick]{     set xrange [0:4096];     set yrange [0:30];     p = 0.9;     f(x)=1/((1-p) + p/x);     plot f(x)};      \addplot gnuplot[black, loosely dotted, raw gnuplot,id=bal,mark=none,very thick]{     set xrange [0:4096];     set yrange [0:30];     p = 0.95;     f(x)=1/((1-p) + p/x);     plot f(x)};          \legend{%     P = 50\%,     P = 80\%,     P = 90\%,     P = 95\%,     }                \end{axis}     \end{tikzpicture}     \end{center}     \caption{Speedup nach Amdahla'sches Gesetz}     \label[figure]{fig:amdahls_law_speedup}     \end{figure}      My result is this: ![enter image description here](http://i.stack.imgur.com/4AB6F.png) But it should be like this: ![enter image description here](http://i.stack.imgur.com/xdAGL.png) I am new with pgfplots. So maybe the code contains redundant data too. But why is the first part of the plots missing?


title: How to print without the image

text: I want to print a document without print the images too: just the position of them so the printer make the process faster (I have some big image and i don't want to spend ink and time to print them). Is it possible ? Thanks


title: Regular expressions with pdfTeX

text: How can one use `\pdfmatch` with regular expressions and where can one find a listing and description of all the available pdfTeX primitives and help on their use? **Edit** The latest issue of the pdfTeX documentation, now contains a small description with examples for the command.


title: Header with scrpage2 disappears on "last page" when using subfiles package

text: When I put two or more TeX files together with the `subfiles` package, the header disappears on the last pages of the included files. Why is that? The `Root.tex` file:                \documentclass[a4paper]{scrartcl}      \usepackage{subfiles}      \usepackage{scrpage2}      \usepackage[ngerman]{babel}      \usepackage{blindtext}           \clearscrheadfoot      \pagestyle{scrheadings}           \begin{document}        \subfile{test1.tex}\newpage        \subfile{test2.tex}      \end{document}      The used subfiles have the same content and are named `test1.tex` and `test2.tex`:                \documentclass[Root.tex]{subfiles}      \clearscrheadfoot      \chead[Test]{Test}           \begin{document}        \Blindtext        \Blindtext      \end{document}


title: Hang caption in lstlisting

text: If I use the following command `\usepackage[skip=20pt,hang]{caption}` when a caption is very long it hangs in figures and tables, however, if the caption is of a lstlisting environment it doesn't. Besides, I haven't seen any "hang" option in the listings package. How could it be solved? Figure hanging: ![enter image description here](http://i.stack.imgur.com/3sp3L.png) Lstlisting not hanging: ![enter image description here](http://i.stack.imgur.com/tkyTc.png) Minimun working example that looks very similar to the images:               \documentclass[12pt,a4paper,twoside]{article}     \usepackage[utf8]{inputenc}     \usepackage{times}     \renewcommand{\rmdefault}{phv} % Arial     \renewcommand{\sfdefault}{phv} % Arial     \usepackage[T1]{fontenc}          \usepackage[spanish,es-noshorthands]{babel}          \usepackage[top=2.5cm, bottom=2.5cm, inner=2.5cm, outer=3.5cm]{geometry}     \usepackage[pdftex,demo]{graphicx}     \usepackage[skip=20pt,hang]{caption}     \usepackage{subcaption}     \usepackage[usenames,dvipsnames]{xcolor}           \definecolor{ColorPrincipal}{cmyk}{0,0.89,0.94,0.28} %este es el color BrickRed     \definecolor{ColorSecundario}{cmyk}{0,0.51,1,0} %este es el color BurntOrange     \definecolor{ColorTerciario}{cmyk}{0.40,0.80,0.20,0} %este es el color DarkOrchid     \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          \usepackage{listings}     \definecolor{ColorPrincipal}{RGB}{0,0,0}     \lstset{ %         language=bash,                      % the language of the code         %basicstyle=\footnotesize,      % the size of the fonts that are used for the code         basicstyle=\normalsize\ttfamily,         numbers=left,               % where to put the line-numbers         numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers         stepnumber=1,               % the step between two line-numbers. If it's 1, each line will be numbered         numbersep=1em,              % how far the line-numbers are from the code         aboveskip=1em,              % espacio por encima del listing (1 línea)         belowskip=0.2em,            % espacio por debajo del listing (1 línea según mis mediciones con la regla tengo que poner -1.8) ACTUALIZACIÓN con el marco del listing: sin espacio= -0.8em con una línea de espacio -0.8+1=0.2em         %belowcaptionskip=0.5em,        % Esto hay que ponerlo individualmente a los captions que ocupen dos líneas         backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}         showspaces=false,                   % show spaces adding particular underscores         showstringspaces=false,         % underline spaces within strings         showtabs=false,                     % show tabs within strings adding particular underscores         frame=single,                       % adds a frame around the code         frameround=fttf,            % t hace la esquina redondeada y f que sea en punta         tabsize=2,                          % sets default tabsize to 2 spaces         captionpos=t,                       % sets the caption-position to top         breaklines=true,                    % sets automatic line breaking         breakatwhitespace=true,             % sets if automatic breaks should only happen at whitespace         title=\lstname,                   % show the filename of files included with \lstinputlisting; also try caption instead of title         numberstyle=\scriptsize\color{gray},    % line number style         keywordstyle=\color{blue},      % keyword style         commentstyle=\color{dkgreen},       % comment style         stringstyle=\color{mauve},      % string literal style         escapeinside={\%*}{*)},         % if you want to add a comment within your code         %morekeywords={*,...},              % if you want to add more keywords to the set         %keywordstyle=\color{blue},         columns=flexible,               %utilizar la opción flexible ya que el resto meten espacios entre letras para que ocupen todo el espacio de la caja (pero al copiar y pegar código nos lo ha estropeado)         alsoletter={-,/,.},                 % gracias a esto podremos enfatizar o hacer keyword palabras como "apt-get"         %emph={sudo, apt-get},          %palabras especiales que se marcarán         classoffset=0,         emph={sudo,},         emphstyle=\color{red},         classoffset=1,         %emph={adb, add-apt-repository, am, android, apt-get, brctl, cat, chmod, dpkg, echo, egrep, /etc/init.d/networking, export, grep, ifconfig, ifdown, ifup, ip, iwconfig, iwlist, java, killall, ln, less, ls, mkdir, modprobe, mv, netcfg, ping, route, sensors, sensors-detect, service, sort, tail, tee, touch, uname, vim, virsh, virt-clone, virt-install, virt-viewer, vncviewer, wget, wpa\_passphrase, wpa\_supplicant, xm}, %algunos de estos comandos están definidos en keywords pero así me los pone a todos del mismo color         emphstyle=\color{BurntOrange},         classoffset=0,         escapechar=!,         xleftmargin=1.41mm,         xrightmargin=-0.71mm,         rulecolor=\color{black}, %corrige el error de bordes que cambian de color cuando se tiene que hacer un salto de una línea con un color distinto del negro http://tex.stackexchange.com/questions/80556/lstlisting-border-bug-when-breaking-lines         literate={ö}{{\"o}}1              {ä}{{\"a}}1              {ü}{{\"u}}1              {á}{{\'{a}}}1              {é}{{\'{e}}}1              {í}{{\'{i}}}1              {ó}{{\'{o}}}1              {ú}{{\'{u}}}1              {ñ}{{\~{n}}}1              {Á}{{\'{A}}}1              {É}{{\'{E}}}1              {Í}{{\'{I}}}1              {Ó}{{\'{O}}}1              {Ú}{{\'{U}}}1              {Ñ}{{\~{N}}}1              {¿}{{?`}}1     }     \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}\begin{minipage}{0.95\linewidth}#1#2#3\end{minipage}}}} %el minipage me asegura que si el texto de un caption ocupa más de una línea las siguientes líneas quedarán alineadas con respecto a la primera el hspace de 15pt     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}     \addto\captionsspanish{\renewcommand*\lstlistingname{C\'odigo}}     \addto\captionsspanish{\renewcommand*\lstlistlistingname{\'Indice de c\'odigo}}          \usepackage{chngcntr} % Sirve para numerar figuras, tablas, etc según numSección.númElemento http://www.physicsforums.com/showthread.php?t=290236     \counterwithin{figure}{section}     \AtBeginDocument{\counterwithin{lstlisting}{section}}           \renewcommand{\captionfont}{\color{ColorSecundario}}     \renewcommand{\captionlabelfont}{\bf}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}          \begin{document}          \section{Sección 1}     \section{Sección 2}     \section{Sección 3}     \section{Sección 4}          Here it hangs :-)          \begin{figure}[h!]         \centering         \includegraphics[width=0.25\textwidth]{clipart/hombreNegociosMovil.jpeg}         \includegraphics[width=0.5\textwidth]{clipart/paradaAutobusAlReves.jpg}         \caption{Bytewalla en el poblado: tranferencia de información del móvil a estafeta}     \end{figure}          But not here :-(          \begin{lstlisting}[belowcaptionskip=0.5em,language=java,caption=Fragmento concerniente a los métodos constructores de la clase Fichero.java]     /* Constructor de un objeto Fichero a partir de un fichero en disco     * Es por ello que se han de generar todos los datos pertenecientes a este fichero     */     private Fichero(File fichero) throws IOException {     //Se ha omitido el código     }          /*     * Por el contrario podemos querer generar un fichero "virtual", representación de un fichero que posee otro nodo     * Para ello se nos deberá proporcionar la información de este fichero     * La variable nuevo indica si este es un fichero del que no se tenía constancia o si este es un fichero que se va a recrear a partir de trozos, que no está completo     * En el caso de ser un fichero nuevo la información de si se posee este fichero o no se rellenará a NO_EN_MEMORIA ya que sólo se nos enviará el nombre, hashes y tamaños     * */     public Fichero(String nombre, Object bloques[][], Map<String, Long> poseedoresDelFichero, boolean nuevo)     {     //Se ha omitido el código     }     \end{lstlisting}          \end{document}


title: Redefining \include

text: A puzzling choice made by Leslie Lamport was to define `\include` in such a way as to issue a `\clearpage` before reading the file. This has been puzzling me for sometime as it is not a very good choice in terms of the author interface. This question has two parts:   1. Are there any valid reasons for this decision?   2. What can possibly break if the command is redefined? The MWE below shows such a redefinition (I named the command `\includex` but works just fine even, if it is named `\include`). My own suspicion that this was introduced early on to resolve problems with `twocolumns`, but there is nothing in the `source2e` explaining this decision.               \documentclass{book}     \usepackage{filecontents}     \makeatletter     \def\includex#1{\relax       \ifnum\@auxout=\@partaux         \@latex@error{\string\include\space cannot be nested}\@eha       \else \@includex#1 \fi}          \def\@includex#1 {%       %\clearpage       \if@filesw         \immediate\write\@mainaux{\string\@input{#1.aux}}%       \fi       \@tempswatrue       \if@partsw         \@tempswafalse         \edef\reserved@b{#1}%         \@for\reserved@a:=\@partlist\do           {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%       \fi       \if@tempswa         \let\@auxout\@partaux         \if@filesw           \immediate\openout\@partaux #1.aux           \immediate\write\@partaux{\relax}%         \fi         \@input@{#1.tex}%         %\clearpage         \@writeckpt{#1}%         \if@filesw           \immediate\closeout\@partaux         \fi       \else         \deadcycles\z@         \@nameuse{cp@#1}%       \fi       \let\@auxout\@mainaux     }     \begin{filecontents}{A.tex}     This is file A     This is the A file     \end{filecontents}     \begin{filecontents}{B.tex}     This is the B file     \end{filecontents}     \begin{filecontents}{C.tex}     This is the C file     \end{filecontents}     \includeonly{A,C}     \begin{document}     \includex{A}     \includex{B}     \includex{C}     \end{document}


title: PSTricks for Mac

text: I got MacTex installed and am using Texworks. I wanted to recreate an old PDF from my `.tex` files and I'm having some problems. I got 1 file which tells tex to include all the others and within some `.tex` files I'm using `PSTricks`. In that master file i got the               \include{pstricks}      statement and the `pstrick.sty` is within the same folder as the `.tex` files. Still Texworks struggles to compile my files to pdf. What could be the problem? I think it's most likely just because I've got my files within the wrong directory but I'm not quite sure. thanks in advance!


title: TeXlipse install path and file path with spaces

text: I had the problem not to be able to place the TeXlipse plugin in my preferred repo because the path to it contains spaces. Also contain paths to files spaces. It seems the plugin contains a bug in interpreting the supplied parameters!


title: .pdf font rendering

text: My friend and I are working on the same subject and I asked her to see her work. I noticed that her pdf rendering (if it's really that) is a lot different than mine even though we use the same "template". We both use TexMaker with MikTeX, hers is on Mac, mine is on Windows. Left is mine, right is hers. ![enter image description here](http://i.stack.imgur.com/fayMb.png) If anyone knows what cause the difference here and could help me getting the same thing that would be great. Thank you.


title: Biblatex-apa style shouldn't show issue number in references for journal publications with doi

text: A journal article with doi number shouldn't show the issue number according to the APA6 publication manual. However, my biblatex-apa style (with biber) shows it. Does anyone know a good way to remove the issue number automatically if the journal article has a doi number? Now it looks like this: > Weber, M. & Ruch, W. (2012). The role of character strengths in adolescent > romantic relationships: An initial study on partner selection and mates’ > life satisfaction. Journal of adolescence, 35(6), 1537– 1546. > doi:10.1016/j.adolescence.2012.06.002 But should look like this: > Weber, M. & Ruch, W. (2012). The role of character strengths in adolescent > romantic relationships: An initial study on partner selection and mates’ > life satisfaction. Journal of adolescence, 35, 1537– 1546. > doi:10.1016/j.adolescence.2012.06.002 This is how my test-document looks like:               \documentclass[12pt, onecolumn]{apa6}               \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style= apa, backend=biber]{biblatex}     \bibliography{testbib}     \DeclareLanguageMapping{american}{american-apa}               \begin{document}          Some text \parencite{Weber2012} and \parencite{belbin1993}.          \printbibliography     \end{document}      And the test-bib-file:               @article{Weber2012,     abstract = {},     author = {Weber, M. and Ruch, W.},     doi = {10.1016/j.adolescence.2012.06.002},     file = {},     issn = {1095-9254},     journal = {Journal of adolescence},     number = {6},     pages = {1537--1546},     pmid = {22749517},     publisher = {Elsevier Ltd},     title = {{The role of character strengths in adolescent romantic relationships: An initial        study on partner selection and mates' life satisfaction.}},     url = {http://www.ncbi.nlm.nih.gov/pubmed/22749517},     volume = {35},     year = {2012}     }           @article{belbin1993,     author = {Belbin, R Meredith},     journal = {Journal of Occupational and Organizational Psychology},     number = {3},     pages = {259--260},     publisher = {Wiley Online Library},     title = {{A reply to the Belbin Team-Role Self-Perception Inventory by Furnham, Steele and Pendleton}},     volume = {66},     year = {1993}     }      In this example Weber & Ruch (2012) should not have an issue number (because it has a doi) and Belbin (1993) should have an issue number (because it doesn't have a doi). I'd be very thankful for a solution :)


title: \hbox in "p"-column (tabular) destroys row layout

text: The following example code shows a problem with my `\vertgap` command, which is just intended to add some space above and below the mandatory argument after encapsulating it in an `\hbox` (for tall contents). It works fine in `l`-type columns, but obviously not in `p`-type columns. On my first tries I didn't recognize that, because it works in `longtable` (note: the example code lacks head- and footlines), not ignoring the auto-inserted `\centering`, too. My goal can be seen in the `longtable`: all three table rows have equal height. Is it possible to achieve this behavior in `tabular`, too? Addendum: simple use of `\hbox` in a `p`-type column is enough to show up the problem.               \documentclass{article}     \usepackage{longtable}     \usepackage{array}          \newcommand{\vertgap}[1]{\hbox{\vbox{\kern0.25ex\vtop{\hbox{#1}\kern0.25ex}}}}%     %\newcommand{\vertgap}[1]{\hbox{\vbox{\hrule height0.25ex\vtop{\hbox{#1}\hrule height0.25ex}}}}%     % The commented-out command above shows the inserted gaps - these seem to be ok.          \begin{document}          \begin{tabular}{|l|>{\centering}p{2in}|l|}     \hline%     aaaa: & 4711-0815 & any\\     \hline%     aaa: & \vertgap{0815} & any\\     \hline%     aa: & 4711 & any\\     \hline%     \end{tabular}          \begin{longtable}{|l|>{\centering}p{2in}|l|}     \hline%     aaaa: & 4711-0815 & any\\     \hline%     aaa: & \vertgap{0815} & any\\     \hline%     aa: & 4711 & any\\     \hline%     \end{longtable}          \end{document}


title: How to change the \see command when indexing with multind?

text: I'm trying to change the output of `\see` in the index. The default outcome is: > John Doe _see_ Doe, John. I'd like to add a new command or change this one to my native language. I tried to declare a `\newcommand` or to `\renewcommand` but I'm failing syntax as I keep on getting errors when _latexing_ the document. (Not even dare to replicate them here.) P.S: I guess that changing _see_ to classical ways, such as _vd._ or _vide_ would do the trick for most languages.


title: Need help in drawing the following Stacked Bar Graph

text: I want your help in drawing the following figure. I think it is called as stacked bar graph. ![enter image description here](http://i.stack.imgur.com/IVEo3.png)


title: Big figure has 4*3 subfigures

text: I have big figure that contains 4*3 subfigures but its not appearing correct. It's taking alot of space. So if anyone could advise. This pics shows the output ![result](http://i.stack.imgur.com/nn59t.png) and this is the script used               \begin{figure*}[t]     \centering     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/k640_Sensor_Lights_On_1000mm-pgms/k640_Sensor_Lights_On_1000mm-pgms_no_of_levels}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/k640_Sensor_Lights_On_1000mm-pgms/k640_Sensor_Lights_On_1000mm-pgms_entropy}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/k640_Sensor_Lights_On_1000mm-pgms/k640_Sensor_Lights_On_1000mm-pgms_mean}}\\     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x640_Sensor_Lights_On_1000mm-pgms/x640_Sensor_Lights_On_1000mm-pgms_no_of_levels}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x640_Sensor_Lights_On_1000mm-pgms/x640_Sensor_Lights_On_1000mm-pgms_entropy}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x640_Sensor_Lights_On_1000mm-pgms/x640_Sensor_Lights_On_1000mm-pgms_mean}}\\     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x320_Sensor_Lights_On_1000mm-pgms/x320_Sensor_Lights_On_1000mm-pgms_no_of_levels}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x320_Sensor_Lights_On_1000mm-pgms/x320_Sensor_Lights_On_1000mm-pgms_entropy}}     \subfloat[]{\includegraphics[width=.33\linewidth]{../Hussein/MatFiles/Lights/x320_Sensor_Lights_On_1000mm-pgms/x320_Sensor_Lights_On_1000mm-pgms_mean}}     \caption{aaa}     \label{fig:rulascore}     \end{figure*}      Edit: I've solved this by cropping each photo using clip function. This thing now is that there is a big white space from the top i don't know how to remove it? ![issue](http://i.stack.imgur.com/3iyYo.png)


title: Complex latex document: how to locate offending package dependency [solved: was using dirty build]

text: For final distribution, certain appendix includes the `pdfpages` package. However, appendices should be skipped for normal "draft" versions, or while working on individual chapters. I am having problems figuring out which file is referring a particular `pdfpages` counter in these draft versions. Not including the pdfpages package in the preamble results in the following error: (once per chapter), even though there are no uncommented references to any `\includepdf`* commands` (in desperation, I have commented out the ones in the not-to-be-compiled appendixes)               ! LaTeX Error: No counter 'AM@survey' defined.      How would you find out the source of this error? After grepping the files repeatedly, I can find no reference to the package. **Solved** The Makefile included with the style package did not recurse into subdirectories to remove outdated files when invoking target 'clean'. After fixing this, everything works as expected. Notifying maintainer, and flogging myself for not noticing earlier.


title: Strange behaviour of \textsection in footnote with fixltx2e

text: This is a follow-up question to How do I enable protrusion for footnotes with \fnsymbol using microtype?, and my answer there. The MWE that I provided there               \documentclass[10pt]{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{etoolbox}     \usepackage{fixltx2e}  %% <- this gives problems          \usepackage{geometry}     \geometry{a5paper,showframe}          \usepackage[colorlinks]{hyperref}               \usepackage[protrusion=alltext,factor=2000]{microtype}          \DeclareMicrotypeSet{alltextAndFootnotes}{%       encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, %% alltext       font     = {OMS/lmsy/m/n/scriptsize},     }          \microtypesetup{protrusion=alltextAndFootnotes}     \SetProtrusion[context=footnote]{encoding=OMS, family=lmsy,series=m, shape=n, size=scriptsize}{%       "03={,650},%% *       "78={,650},%% \mathsection       "79={,650},%% \dagger       "7A={,650},%% \ddagger       "7B={,650},%% \mathparagraph       "6B={,650},%% \|       }     \SetProtrusion[context=footnote,load=lmr-T1,factor = 700]       {encoding=T1, family=lmr, series=m, shape=n, size=scriptsize}       {  }     \SetProtrusion[context=footnote,load=cmr-OT1,factor = 700]       {encoding=OT1, family=lmr, series=m, shape=n}       {  }          \makeatletter     \newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont         \microtypecontext{protrusion=footnote}\@thefnmark}}}     \patchcmd{\@footnotemark}       {\@makefnmark}       {\new@makefnmark}{}{}     \makeatother          \renewcommand{\thefootnote}{\fnsymbol{footnote}}          %% --------------------------------------------------------------     %% --------------------------------------------------------------     \begin{document}     Here's some text to show the behaviour of footnote marker at%     \footnote{A footnote}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{B}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{C}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{D}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{E}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{F}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{G}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{H}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.          Here's some text to show the behaviour of footnote marker at%     \footnote{I}     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.     \end{document}      works fine for me, **until I add the`fixltx2e` package**. I am aware of the fact that this package changes the default defintion of `\@fnsymbol` from               \def\@fnsymbol#1{\ensuremath {\ifcase #1\or *\or \dagger \or \ddagger \or \mathsection \or \mathparagraph \or \|\or **\or \dagger \dagger \or \ddagger \ddagger \else \@ctrerr \fi }}      to               \def\@fnsymbol#1{\ifcase #1\or \TextOrMath \textasteriskcentered *\or \TextOrMath \textdagger \dagger \or \TextOrMath \textdaggerdbl \ddagger \or \TextOrMath \textsection \mathsection \or \TextOrMath \textparagraph \mathparagraph \or \TextOrMath \textbardbl \|\or \TextOrMath {\textasteriskcentered \textasteriskcentered }{**}\or \TextOrMath {\textdagger \textdagger }{\dagger \dagger }\or \TextOrMath {\textdaggerdbl \textdaggerdbl }{\ddagger \ddagger }\else \@ctrerr \fi }      This means that now `\textsection` is used as a footnote symbol, and it is the only one that does not protrude: ![sample output](http://i.stack.imgur.com/sAMmo.png) I don't see what is so special about `\textsection`, when, e.g., `\textparagraph` works fine. What is the reason for that bevaviour, and how can I fix that?


title: Biblatex bibliography section changes chapter name in header

text: I'm putting together my thesis, using the Koma script book class and biblatex to create separate reference lists for each chapter. I'm putting the name of the chapter in the header of each left page, using the `chapterprefix=on` option to `scrbook`. I'm also using the `[header=subbibintoc]` option to the `\printbibliography` command to get the bibliography as an unnumbered section in the table of contents. However, from the reference section and through to the end of each chapter, the chapter name in the heading is changed to "Bibliography". How do I get the header to print the chapter name throughout the bibliography section in each chapter? Using `[header=subbibliography]` almost gives me what I want, except the bibliography does not appear in the table of contents. Using `[header=subbibnumbered]` also almost gets me what I want, except the bibliography is numbered. I've included a minimal working example below that illustrates my problem. Note that on page two of the compiled document, the header correctly prints the chapter name, while on page 4, it erroneously prints "Bibliography".               \documentclass[chapterprefix=on]{scrbook}          \usepackage[         backend=biber,         style=authoryear-comp,         refsection=chapter,     ]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}         @misc{A01,             author = {Author, A.},             year = {2001},             title = {Alpha},         }     \end{filecontents}     \addbibresource{\jobname.bib}          \usepackage{appendix}          \usepackage{lipsum}          \begin{document}              \tableofcontents          \mainmatter          \chapter{Test}          \lipsum \lipsum \lipsum \autocite{A01}.          \printbibliography[heading=subbibintoc]          \begin{subappendices}          \section{An appendix}          \lipsum          \end{subappendices}          \end{document}


title: Wrong positioning of subscripts on bold math letters

text: I just noticed that for `kpfonts` and `times` (and probably other fonts since it does not seem to be font-related), the subscripts on boldface letters like V are (I would say) wrong. Is there an explanation?               \documentclass{book}     \usepackage{times}     %\usepackage{kpfonts}     \begin{document}     $\mathbf{A}_a$ $A_a$ $\mathbf{V}_a$ $V_a$     \end{document}      ![enter image description here](http://i.stack.imgur.com/cm3Sf.png)


title: Tabular* Alignment of Columns

text: I've read about the `tabular*` environment, and the same example pops up over and over again. What I'd like to know is when the example is converted, why do columns 2 and 3 lose their centering? I've seen solutions using `tabularx` and `array`, but the solution in the example seems close to being correct, so I'd like to know the extra step to get it as expected. The link to the example and its output is: WikiBooks LaTeX Tables. It's the second half of this section. If anyone also has tips for how to search for `tabular*` in a search engine without the `*` being taken as a wildcard, I'd appreciate that, too.


title: Incompatibility between currfile and enumitem?

text: The MWE below yields: > >          Missing number, treated as zero. >          <to be read again> >                            enit@cv@currfiledepth >               \item >              testing.   >   for the `itemize` list. The `enumerate` list is fine. If I remove the `\usepackage[realmainfile]{currfile}`, or `\setlist{leftmargin=*}`, things work fine, but I have those there for reasons as per the linked questions. ## References:   * The reason for the `\setlist{leftmargin=*}` is given in enumitem itemize environment shifts text into margin, or overlaps other text   * See Corrupted TeXLive2012 installation? (Option clash for currfile) for `the currfile package` issue -- even though I am not using the `standalone` package, I like to have a consistent preamble. ## Code:               \documentclass{article}          %% http://tex.stackexchange.com/questions/68684/corrupted-texlive2012-installation-option-clash-for-currfile     \usepackage[realmainfile]{currfile}          \usepackage{enumitem}          %% http://tex.stackexchange.com/questions/21669/enumitem-itemize-environment-shifts-text-into-margin-or-overlaps-other-text     \setlist{leftmargin=*}          \begin{document}         \begin{itemize}%    This does not work!!             \item testing.         \end{itemize}         \begin{enumerate}% This works fine.             \item testing.         \end{enumerate}     \end{document}


title: how to fit a tiling of figures on to one page

text: I hate working with figures in Latex. I can't seem to get a handle on them. Anyways, please consider the following screenshot. ![enter image description here](http://i.stack.imgur.com/Q8h5n.png) ** ## Code               \begin {table}[H]         \caption {Effect of $\beta, r$ on the Basic Reproduction Number $R_0$}          \label{tab:table1}          \begin{center}             \begin{tabular}{SSSSSSSS} \toprule                      \end{tabular}         \end{center}     \end {table}          \begin{figure}[H]             \begin{minipage}[ht]{0.45\textwidth}         \includegraphics[width=\linewidth]{plots/Rplot03}         \end{minipage}              \hspace{\fill}              \begin{minipage}[ht]{0.45\textwidth}         \includegraphics[width=\linewidth]{plots/Rplot05}         \end{minipage}              \vspace*{0.2cm} % (or whatever vertical separation you prefer)              \begin{minipage}[ht]{0.45\textwidth}         \includegraphics[width=\linewidth]{plots/Rplot06}         \end{minipage}              \hspace{\fill}              \begin{minipage}[ht]{0.45\textwidth}         \includegraphics[width=\linewidth]{plots/Rplot12}         \end{minipage}     \end{figure}      ## Problem I want the gap between the two columns to be smaller and the graphs a little bigger. There are 4 graphs but there is too much whitespace. If I made the minipage bigger `{0.5\textwidth}` all four move to the next page which I don't want. If I make the width of the image bigger, then it dosn't scale properly (the graph will occupy some of the other graphs area).


title: Installing EB Garamond for pdfLaTeX (encore)

text: At the moment I try to get the EB Garamond font to work on my windows machine (under MikTeX 2.9), but I failed. By searching TeX.SX I found this two questions:   * EB Garamond on LaTeX   * Installing EBGaramond for pdfLaTeX The first solution is too generic because it only points out the existence of the `ebgaramond` package on CTAN, while the second one consists in reinstalling the package by hand - which I tried without success. As the README of `ebgaramond` demands I enabled the font-map of EB Garamond (by adding               Map EBGaramond.map      to the `updmap.cfg`, and then Refreshing FNDB and bashing               initexmf -u     updmap      to the Windows command line.) Is this alredy wrong? Maybe I am missing something completely basal in my test file:                \documentclass[11pt]{article}      \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}      \usepackage{ebgaramond}      %\usepackage[DIV10]{typearea}      %\usepackage{microtype}      \usepackage{lipsum}           \title{A \LaTeX\ Article}      \author{Ruben Giannotti}      \date{\today}           \begin{document}      \maketitle      {{\large 1}\hspace{.5em}\scshape \uppercase{Introduction}\par\vspace{1em}}%faking a section title      \lipsum      \end{document}      When compiling with LaTeX a really bad looking `.dvi` emerges. (So I guess the maping should be alright.) But, when doing so with pdfLaTeX not even an output file is generated. The log file says: > !pdfTeX error: pdflatex (file EBGaramond12-Regular-osf-t1--base): Font > EBGaramo nd12-Regular-osf-t1--base at 548 not found ==> Fatal error > occurred, no output PDF file produced! By enabling `microtype` it changes a little: > ! pdfTeX error (font expansion): auto expansion is only possible with > scalable fonts. \endgroup \set@typeset@protect l.17 \end {document} ... ! > ==> Fatal error occurred, no output PDF file produced! ## Edit In the meantime I tried several things with the font mapping configuration. What I did in the first place was to modify `updmap.cfg` in the root directory of MikTeX, which is not ideal. So, I restored it to its original state. Afterwords I started the configuration with `initexmf --edit-config-file updmap` (which opens the corresponding config file in the roaming directory of MikTeX - at least on my machine). I finally made EB Garamond to work _but_ \- and this is a non acceptable drawback - I had to cancel out another mapping that I added before (MinionPro). In short: With my actual knowledge and setup I can use only one of them, and what I deduce from what I did til now is that I simply use the wrong syntax to map the _fonts_ (note the plural form) correctly. This is how my `updmap.cfg` looks like:               Map EBGaramond.map Map MinionPro.map Map MyriadPro.map      By the way, I did this because the MikTeX manual says > "Insert the following line at the end of the file: Map xyz.map" Do I have to respect some syntax rules? Is this even wrong? Or could this be a sign that my whole distro is broken (see @DG's comments on his/her answer)?


title: Automating processing of trailing punctuation (if any) for hyperlinks

text: This is a follow-up to Should Hyperlinks include trailing puctuation as part of the link text?, and this question is about automating the processing of the trailing character. I would like to be able to have the punctuation be specified _after_ the macro as in:               \CreateLink{<linke style>}{<link target>}{<link text>},      where I have used a comma as an example. I prefer the above instead of:               \CreateLink{<linke style>}{<link target>}{<link text>,}      for two reasons:   1. It is more readable (punctuation is more obvious in the code).   2. Allows me to defer the decision of the weather to include the punctuation as part of the link text or not. So, I would like to modify the `\CreateLink` macro to be able to check if the subsequent character is a space or not. If not, then consider the next character as punctuation and include that character in the output of `\CreateLink`. I realize that the solution will probably involve `\@ifnextchar` but I was not able able to get that to work. In the attempt below I output a `-` if a non- space character is found. Since the `-` is in the output for all cases, my attempt is clearly missing something. ![enter image description here](http://i.stack.imgur.com/UNEZU.png) ## References:   * Check if next char is { ## Code:               % The following \def allows to have one version of this code for this questions,     % and the previous question at:     %      %    http://tex.stackexchange.com/questions/125357/should-hyperlinks-include-trailing-puctuation-as-part-of-the-link-text     %     \def\SmartVersion{}%  Should be uncommented for this question.          \documentclass{article}     \usepackage{xparse}     \usepackage{xcolor}     \usepackage{soul}     \usepackage{xstring}     \usepackage{xspace}     \usepackage[colorlinks=true]{hyperref}          %% ----------------------------------------------------------------     %%                http://tex.stackexchange.com/questions/36894/     %%                    underline-omitting-the-descenders     %%     %%     \makeatletter     \ExplSyntaxOn         \cs_new:Npn \white_text:n #1           {             \fp_set:Nn \l_tmpa_fp {.01}             \fp_mul:Nn \l_tmpa_fp {#1}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{\fp_to_decimal:N \l_tmpa_fp em}}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{-\fp_to_decimal:N \l_tmpa_fp em}}           }         \NewDocumentCommand{\whiten}{ m }             {               \int_step_function:nnnN {1}{1}{#1} \white_text:n             }     \ExplSyntaxOff          \NewDocumentCommand{ \varul }{ D<>{5} O{0.2ex} O{0.1ex} +m } {%     \begingroup     \setul{#2}{#3}%     \def\SOUL@uleverysyllable{%        \setbox0=\hbox{\the\SOUL@syllable}%        \ifdim\dp0>\z@           \SOUL@ulunderline{\phantom{\the\SOUL@syllable}}%           \whiten{#1}%           \llap{%             \the\SOUL@syllable             \SOUL@setkern\SOUL@charkern           }%        \else            \SOUL@ulunderline{%              \the\SOUL@syllable              \SOUL@setkern\SOUL@charkern            }%        \fi}%         \ul{#4}%     \endgroup     }%     \makeatother     %% ----------------------------------------------------------------          \newcommand{\CreateLinkA}[2]{%         \hypersetup{pdfborder={0 0 1}, urlcolor=.}%         \href{#1}{#2}%     }%     \newcommand{\CreateLinkB}[2]{%         \hypersetup{pdfborder={0 0 0}, urlcolor=red}%         \href{#1}{#2}%     }%     \newcommand{\CreateLinkC}[2]{%         \hypersetup{colorlinks=false,urlcolor=.}%         \setulcolor{blue}%         \href{#1}{\varul[0.5pt][1.0pt]{#2}}%     }%          \makeatletter     \newcommand{\CreateLink}[3]{%         \IfStrEqCase{#1}{%             {1}{\CreateLinkA{#2}{#3}}%             {2}{\CreateLinkB{#2}{#3}}%             {3}{\CreateLinkC{#2}{#3}}%         }%         \ifdefined\SmartVersion%              % If the next character is anything other than a space,              % include that char as part of the text.              % The "-" is supposed to whatever the next character is,             % but don't know how to get that character.               % Note that the "-" is shown in all cases, so this is NOT working.             \@ifnextchar{\space}{\space}{-}%         \else% "ELSE" clause is unused in this question             \xspace%         \fi     }%     \makeatother               \begin{document}     \textbf{Punctuation NOT part of link:}\medskip     \par Go and check out \CreateLink{1}{www.yahoo.com}{the yahoo}, and also\ldots     \par Go and check out \CreateLink{2}{www.yahoo.com}{the yahoo}, and also\ldots     \par Go and check out \CreateLink{3}{www.yahoo.com}{the yahoo}, and also\ldots          \bigskip     \textbf{Punctuation part of link:}\medskip     \par Go and check out \CreateLink{1}{www.yahoo.com}{the yahoo,} and also\ldots     \par Go and check out \CreateLink{2}{www.yahoo.com}{the yahoo,} and also\ldots     \par Go and check out \CreateLink{3}{www.yahoo.com}{the yahoo,} and also\ldots     \end{document}


title: verbatim with Arabic script

text: I try to put together guidelines for linguists. One part concernes typesetting right to left text with the `bidi` package. I want to use `verbatim` for the code, but the Persian characters are not printed correctly in the `verbatim` environment. But the following code does not work. I also had a look at a solution for a similar question, but this did not work either.               \documentclass{article}          \usepackage{fontspec}     \newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}     \usepackage{bidi}     \newcommand{\PRL}[1]{\RL{\Parsifont #1}}          \begin{document}          \PRL{او مرد را دوست نخواهد داشت.}          \begin{verbatim}     \usepackage{fontspec}\newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}     \usepackage{bidi}     \newcommand{\PRL}[1]{\RL{\Parsifont #1}}          \PRL{او مرد را دوست نخواهد داشت.}     \end{verbatim}               \end{document}      This was the second attempt according to the other suggested solution:               \documentclass{article}          \usepackage{fontspec}     \newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}          \usepackage{fancyvrb}     \usepackage{xepersian}          \usepackage{bidi}     \newcommand{\PRL}[1]{\RL{\Parsifont #1}}               \DefineVerbatimEnvironment{rtlverbatim}{Verbatim}{commandchars=+\[\]}          \begin{document}          \PRL{او مرد را دوست نخواهد داشت.}          \begin{latin}     \begin{verbatim}     \usepackage{fontspec}\newfontfamily\Parsifont[Script=Arabic]{XB Niloofar}     \usepackage{bidi}     \newcommand{\PRL}[1]{\RL{\Parsifont #1}}          \PRL{او مرد را دوست نخواهد داشت.}     \end{verbatim}     \end{latin}               \end{document}


title: Does SIunits package correctly manage the typography according to the language of document?

text: when I use `SIunits` with `\documentclass[a4paper,12pt,oneside,french]{book}` and `\usepackage[frenchb,french,francais]{babel}` as preamble, could I be sure the commands like `\kilo\meter` will be print as the french typography recommend it? For example, french can require thin non-breaking space before the abbreviation of a unit. But could `SIunits` do that?


title: TikZ datavisualization or pgfplots?

text: I want to create a few plots that should have the same style as my main document and it seems `tikz` is more than capable of achieving that. Now while browsing the current `tikz` documentation (2.10 CVS) I found a long new section about data visualization. On the other hand there is the extra package `pgfplots` which seems at a first glance very similar but contains more plot types. So what is recommend? What are the differences between the two approaches?


title: Proper use of Backticks and Butterick's Practical Typography

text: In his book, Practical Typography, Butterick makes the following remark. > Computer scientists and documentation writers, take note: straight > quotes and backticks in software code should never be converted to > curly quotes. Those marks are, of course, part of the functional syntax > of the code and must be reproduced literally. While fans of LaTeX have > often written me to trumpet its typesetting superiority, I’ve > never seen any LaTeX-created documentation that’s gotten this > right. I am confused by these comments. It is my understanding that the correct way to obtain open quotes in LaTeX is to use the backtick character. Is Butterick (a man who seems to know his stuff) objecting to the standard LaTeX syntax or is there a better way to do opening quotes in LaTeX that I don't know about?


title: Bibligraphy ordering - ignore entry

text: I am using BibTeX with `natbib`. My style file orders my bibliography in the order in which articles were cited. Occasionally, however, I want an `\cite` to be ignored for the purposes of the bibliography order, but fully working otherwise. Minimal working example:               \documentclass{article}     \usepackage[square,numbers,sort]{natbib}     \begin{document}     \cite{c} % Want to cite, but ignore for purpose of bibliography order.     \cite{a}     \cite{b}     \cite{c}     \bibliographystyle{unsrt}     \bibliography{ex}     \end{document}      with ex.bib:               @article{a, author="a"}     @article{b, author="b"}     @article{c, author="c"}      results in: ![enter image description here](http://i.stack.imgur.com/lXNFH.png) as expected. I want to replace that first citation with a new command, say `\ignorecite` so that the order is `a,b,c`, and so that the order in the main document is `3,1,2,3`


title: port this template to lualatex

text: I am new to lualatex and I am trying to port the template at this link http://www.lorenzopantieri.net/LaTeX_files/TesiClassica.zip from pdflatex to lualatex. This template uses komascript, classicthesis and arsclassica, (package written by the template's author) I got all a bunch of "undefined font shape" warning, and obviously the result is quite different. What should I do to ensure that the output will be the same? I have done some research: I guess I need to set up with `\usepackage{fontspec}\setmainfont`, and maybe defines some `\newfontfamily` for all different cases in which different font are used (section title, chapter, caption, etc..) Ps. I am on Ubuntu 14.04 with no new fonts installed. PPS I do recognize that I am not providing directly a MWE, because I think it would be redundant to copy-paste the entire template, as the goal of this question is to exactly reproduce the pdftex out with lualatex. EDIT. I got this bunch of warnings that I think are the problem.               LaTeX Font Warning: Font shape `EU2/pplj/m/n' undefined     LaTeX Font Warning: Font shape `EU2/pplj/m/sc' undefined     LaTeX Font Warning: Font shape `EU2/pplj/m/sl' undefined     LaTeX Font Warning: Font shape `EU2/pplj/m/it' undefined     LaTeX Font Warning: Font shape `EU2/fvm/m/n' undefined     LaTeX Font Warning: Font shape `EU2/pplj/bx/n' undefined


title: Enumeration in margins and hang indentation

text: A solution was given to Enumeration across many sections. However, (A) it seems enumeration prevents hang indent from activating. (B) _Can I get the numbers to go into the left margin and leave hang indented references flush with the left margin?_ (C) How can I shift the numbers themselves a bit more to the left while leaving text flush to margin? NOTE: IF we use the enumeration environment from an answer below (B) is solved, but (A) is still not working:               \documentclass[12pt]{article}     \usepackage[top = 1in, bottom = 1in, left = 1in, right = 1in]{geometry}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{enumitem}     \setlist[enumerate]{leftmargin=-\itemindent}       %% here we change          \begin{document}     \begin{center}     \textbf{class X}     \end{center}          \begin{enumerate}     \item \hangindent=7mm \noindent \textcolor{blue}{     \textbf{sadsdasd sdsdadsd}. \textbf{1902}. sasds sasdasd adsdsasds sadsdsadsa asdasd. \textit{adsdsdadsd asda sdsadsadsda sdasdsdadsds asdasddsdasdsa}. asdasd: asdsads sasdas.}     \item  BBBBB     \end{enumerate}          \begin{center}     \textbf{class Y}     \end{center}          \begin{enumerate}[resume]     \item \footnotesize \textcolor{blue}{CCCCC} \normalsize     \end{enumerate}          \end{document}      EDIT: I found a solution that avoid the enumeration environment altogether and is totally customizable.


title: tikz node position

text: I have a diamond split in four triangles and I would like to write inside each triangle at it center and having difficulties with position. Please help me fix that problem.Thanks               \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{wasysym}     \usetikzlibrary{shapes.geometric, calc}     \newcommand{\mydiamond}[7][]{%       \begin{scope}[transform shape]          \node [alias=los, diamond, draw, fill=#3, #1] (#2) {} ;              \draw ([yshift=-0.3] los.north) -- ([yshift=0.3] los.south) ;         \draw ([xshift=-0.3] los.east) -- ([xshift=0.3] los.west) ;                   \path [auto=false] (los.west) -- ([xshift=0.3] los.west)               node (G) [pos=0.8] {} ;         \path [auto=false] (los.east) -- ([xshift=-0.3] los.east)               node (D) [pos=0.5] {} ;        \path [auto=false] (los.north) -- ([yshift=0.3] los.north)               node (V) [pos=0.6] {} ;        \path [auto=false] (los.south) -- ([yshift=-0.3] los.south)               node (U) [pos=0.3] {} ;                   \node [font=\tiny, scale=0.5] at (G) {#4} ;           \node [font=\tiny, scale=0.5] at (D) {#5} ;       \node [font=\tiny, scale=0.5] at (V) {#6} ;     \node [font=\tiny, scale=0.5] at (U) {#7} ;     \end{scope}          }%     \begin{document}          \begin{tikzpicture}[scale=5, auto]     \mydiamond{init}{green!10}{$\CIRCLE$}{\tiny{$\CIRCLE$$\CIRCLE$}}{3}{4}     \end{tikzpicture}          \end{document}


title: \hat and \bar compatibility issue EDIT: It's a bug, workaround provided

text: I have two `\newcommand` defined as follows:               \newcommand{\hvar}[1]{\hat{\delta #1}}     \newcommand{\gbp}{{{\bar{\gamma}}_p}}      And they look like this: `\hvar{X}` ![\\hvar{X}](http://i.stack.imgur.com/l99C5.gif) `\gbp` ![\\gbp](http://i.stack.imgur.com/uPlv8.gif) The problem is that, if I use them together I get this: `\hvar{\gbp}` ![\\hvar{\\gbp}](http://i.stack.imgur.com/x4xZe.gif) It seems like the `\gamma` was shifted to the right. Is this a bug? Is there a way to fix it? Here is a MWE:               \documentclass{article}     \usepackage{amsmath}     \newcommand{\hvar}[1]{\hat{\delta #1}}     \newcommand{\gbp}{{{\bar{\gamma}}_p}}     \begin{document}     \begin{equation}     \hvar{X} \qquad \gbp \qquad \hvar{\gbp}     \end{equation}     \end{document}      * * * # EDIT: As egreg mentioned, this is a bug on the accent implementation of `amsmath`. A work around is provided here: Why do arguments to nested \tilde or \breve commands reappear when amsmath is used? and a MWE presented below:               \documentclass{article}     \usepackage{amsmath}          \newsavebox{\accentbox}     \newcommand{\compacc}[2]{\sbox\accentbox{$#2$}#1{\usebox\accentbox}}     \newcommand{\compaccX}[2]{\let\accenttemp#1\mathpalette\docompacc{#2}}     \def\docompacc#1#2{\compacc\accenttemp{#1#2}}          \newcommand{\hvar}[1]{\compaccX{\hat}{\delta #1}}     \newcommand{\gbp}{{{\bar{\gamma}}_p}}     \begin{document}     \begin{equation}     \hvar{X} \qquad \gbp \qquad \hvar{\gbp} \qquad A_{\hvar{\gbp}}     \end{equation}          \end{document}      Looks like: ![enter image description here](http://i.stack.imgur.com/DwBBQ.png)


title: What does Misplaced \cr in latex error mean

text: What does it mean               ! Misplaced \cr.     \math@cr@@@ ->\cr      In latex error.      in this document                   \documentclass[12pt]{article}         \usepackage{amsmath,amsfonts,amsthm,amssymb,color}         \usepackage[T1]{fontenc}         \usepackage{mathtools}         \begin{document}          \begin{align*}          \begin{pmatrix }         \int_0^1 f(s) ds  \\         int_0^\om g(s) ds           \end{pmatrix}          \end{align*}          \end{document}


title: Index with a combination of one and two columns

text: I am using the following to create my index file.               heading_prefix "{\n\\bfseries\\color{black} "      % insert in front of letter     heading_suffix "\\hfil}\\nopagebreak\n"  % append after letter     headings_flag  1                 % turn on headings(uppercase)          delim_0 "\\dotfill"      The index entries appear in one column, which is fine. I wonder if there is a way to make the sub index entries appear in more than one column, as they are short in length? An MWE to illustrate is as follows:               \documentclass{article}     \usepackage{fontspec,lipsum}     \defaultfontfeatures{Ligatures=TeX}          \setromanfont{Georgia}          \usepackage{index}\makeindex          \makeatletter     \renewenvironment{theindex}        {%\section*{\indexname}%         \setlength\parindent{0pt}%         \setlength\parskip{0pt plus .3pt}%         \let\item\@idxitem     %    \vspace*{-25mm}         }     \makeatother                \begin{document}          \section{Introduction}          Lorem \index{ipsum dolor sit amet, consectetuer} \index{adipiscing elit. Ut purus} elit, vestibu-     lum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.     Nam arcu libero, nonummy eget, \index{consectetuer id}, vulputate a, magna. Donec     vehicula augue eu neque. Pellentesque habitant morbi \index{tristique senectus} et ne-     tus et \index{form!malesuada} \index{form!fames} \index{form!ac} turpis egestas. Mauris ut leo. Cras viverra metus     rhoncus sem. Nulla et lectus vestibulum urna \index{form!fringilla} \index{form!ultrices}. Phasellus eu     tellus sit amet tortor gravida placerat. \index{form!Integer} sapien est, iaculis in, pretium     quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean     faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, \index{form!mollis} \index{form!ac}, nulla. Cur-     abitur \index{form!auctor} semper \index{form!nulla}. \index{form!Donec} varius \index{form!orci} eget risus. \index{form!Duis} \index{form!nibh} mi, congue     eu, \index{form!accumsan} \index{form!eleifend}, \index{form!sagittis} \index{form!quis}, \index{form!diam}. \index{form!Duis} \index{form!eget} \index{form!orci} \index{form!sit} \index{form!amet} \index{form!orci} \index{form!dignissim}.     rutrum.          \bigskip          \printindex          \end{document}      I have used the following instructions to create the index file. xelatex tst.tex makeindex -s MyIST.ist tst.idx xelatex tst.tex evince tst.pdf The content of MyIST.ist is follows.               heading_prefix "{\n\\bfseries\\ "      % insert in front of letter     heading_suffix "\\hfil}\\nopagebreak\n"  % append after letter     headings_flag  1                 % turn on headings(uppercase)          delim_0 "\\dotfill"      As seen from the output, all the entries under 'form' are short in length. I would like to arrange these entries in, say, 2 or even 3 columns, rather than 1 column as it stands.


title: How to typeset polynomial ring notation nicely

text: When I typeset a polynomial ring (for instance on integers) with `\mathbb{Z}[x]`, ![\\mathbb{Z}\[x\]](http://i.stack.imgur.com/8w2rc.png) the result is not very satisfactory (actually the result shown above looks even worse when it is small). It feels a little different from those found on beautifully typeset textbooks: the brackets are too tall (taller than `Z` and much taller than `x`), and they also seem a little too close to `x` (I don't know whether or not that's an illusion due to the tall brackets). Is there any way to get a more satisfactory result? Thanks. * * * Update: Sorry for not making clear what I want. I actually want something like this: ![desired effect](http://i.stack.imgur.com/p0D1E.png) Please neglect the different font for `x`.