title: How to use the content of \title{} as a reference?

text: I want to be able to reference to my document title by name. How can I achieve that?               \documentclass{scrartcl}     \usepackage{hyperref}          \begin{document}          \title{Example}\label{title}     \author{me}     \maketitle          The title is: "\nameref{title}" (Here it should read "Example")          \end{document}


title: LaTeX3: how to access package options

text: In my package I intend to write in expl3 syntax, how can I get access to the list of options passed to it on the document level via `\usepackage[<option list>]{my-l3-pkg}`? I know more or less how to define and set keys using the functions provided by the `l3keys` package. I don't know yet, which variable holds the contents of `<option list>` I could pass to `\keys_set:..`. Is there some replacement for the LaTeX2e functions `\DeclareOption` and `\ProcessOptions`?


title: Alignment of item number in list containing a minipage

text: I would like to have the list number at the beginning of the item, and not centered as is the case for item (b) the example below. If I comment out the `\usepackage{nccmath}`, I get this, but then the spacing gets messed up. I'd rather keep the `nccmath` package if possible. I also do need to keep the `[c]` for the minipages. I have looked at Preventing itemize environment to insert initial vertical space and Including an itemized list within a tabular column using the paralist package, but can not get that to work for me.               \documentclass{standalone}          \usepackage{standalone}     \usepackage{paralist}           \usepackage{mathtools}     \usepackage{nccmath} % Removing fixes vertical align, but changes spacing          \newcommand{\MyMiniPage}{     \begin{minipage}[c]{1.0in}       \begin{align*}         a &= b\\         c &= d       \end{align*}     \end{minipage}     \begin{minipage}[c]{1.0in}       \begin{align*}         y &= z       \end{align*}     \end{minipage}     }          \begin{document}     \begin{enumerate}[(a)]       \item First item       \item \MyMiniPage       \item Third item     \end{enumerate}     \end{document}      I attempted to use `\compress` as mentioned in the other posts above, but was not able to get it to work. ---------------- Revised posting using \input ------------- This is in the file ListsProblem-Minipage.tex:               \documentclass[preview=false]{standalone}          \usepackage{standalone}     \usepackage{amsmath}          \begin{document}     \begin{minipage}[c]{1.0in}         \begin{align*}             a &= b\\             c &= d         \end{align*}     \end{minipage}     \begin{minipage}[c]{1.0in}         \begin{align*}             y &= z         \end{align*}     \end{minipage}     \end{document}      This is in the file ListsProblem-Minipage2.tex:               \documentclass[preview=false,fleqn]{standalone}          \usepackage{standalone}     \usepackage{amsmath}          \begin{document}     %\begin{minipage}{3.0in}     \begin{align*}                     (-3)^4 &= 81\\     \frac{5^{23}} {5^{21}} &= 25     \end{align*}     %\end{minipage}     \end{document}      And here is the main file:               \documentclass[fleqn]{standalone}          \usepackage{standalone}     \usepackage{paralist}           \usepackage{mathtools}     \usepackage{nccmath} % Removing fixes align, but changes spacing     \begin{document}     \input{ListsProblem-Minipage.tex}  % These two correctly yields     \input{ListsProblem-Minipage.tex}  % the desired 4 columns          \begin{enumerate}[(a)]         \item First item         \item \input{ListsProblem-Minipage.tex}         \item \input{ListsProblem-Minipage2.tex}  % not in a mini-page         \item Third item     \end{enumerate}     \end{document}      Note that the item label (b) is not aligned with the top of the two center aligned mini pages. The alignment of the (b) with the mini-pages that I want can be seen by commenting out the `\usepackage{nccmath}`. But I want a solution that does not require me to abandon the `nccmath` package. Commeting this out also screws up the spacing.


title: Line of dots in Table of Contents?

text: In my ToC, the "Bibliography" entry is treated as a chapter heading, so has no line of dots to the page number. However, as it has no sections, my publishers would like the line of dots. Same for the index. What's the easiest way to do this?


title: Class available for law Reports?

text: Has anyone used LaTeX for writing Expert Witness reports or similar for UK Courts? These have to follow a particular format which would be ideal in Latex but I am a relative newcomer to Latex and unsure about writing my own class. A little explanation of the needed format: The report has to have   * a title page with the name of the court at top left (takes about 4 lines and is underlined);    * the number of the claim, top right;    * a centred list of claimants and defendants;    * then a title centred between 2 lines followed by details of the author.    * Each page has to numbered with a header containing the claim no.    * It will need a table of contents, figures and, perhaps a bibliography and will need appendices.    * Also,sections need to be numbered, sometimes paragraphs also.


title: Placement of figures at the end of document

text: I want to place all the figures at the end of the document in nature.cls can some one help me in this renewenvironmentfigureletcaptionnatfigcaption newcommandnatfigcaption2 atenddocument refstepcounterfigure ifthenelsevaluefigure1 newpagenoindent ruletextwidth1pt sectionfigure legends parvfill sffamily noindenttextbffigure arabicfigurehspace1em#2 renewenvironmenttablefloattablepsffamilyendfloat ignore all includegraphics commands in the document atbegindocumentletincludegraphicsnatignore newcommandnatignore2


title: Progress dial for Beamer

text: Today I saw this question, and one thing that comes in to my mind is the _Progress Dial_ ; i.e., a round progress bar. Those who use Okular for presentation have seen such thing. This is a screen-shot from Okular: ![](http://i.stack.imgur.com/HItHc.png) Has anyone tried so far?


title: How can text wrap around a figure in tikzposter?

text: While designing a poster with `tikzposter` I stumbled over a small issue. Usually one can use the `wrapfig` package to let text wrap around figures but in a box in tikzposter this seems to fail completely as shown in the MWE below. Is there any way to wrap around a figure without using wrapfig so that this works as expected?               \documentclass[25pt, a4paper, portrait, margin=0mm, innermargin=15mm]{tikzposter}          \title{Title}     \author{Name}     \institute{University}          \usetheme{Default}     \usecolorstyle[colorPalette=BrownBlueOrange]{Germany}          \usepackage{graphicx}     \usepackage{wrapfig}          \begin{document}          \maketitle          \begin{columns}     \column{.5}     \block[roundedcorners=40]{First block}{     Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure.           \begin{wrapfigure}[5]{r}{0.5\textwidth}                          \begin{tikzfigure}[Caption]                 \includegraphics{example-image}             \end{tikzfigure}     \end{wrapfigure}          Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure. Here some text that wraps around the figure.      }     \end{columns}     \end{document}      ![enter image description here](http://i.stack.imgur.com/9NhNN.png)


title: Beamer Presentation: Show TOC at beginning of Unnumbered Subsection (Subsection*)

text: I am making slides for an upcoming presentation using the default beamer ornate template.   Part of the template lets me show the Table of Contents when transitioning into a new subsection (included below). This is perfect for my needs… almost!               \AtBeginSubsection[]{            \frame<beamer>{               \frametitle{Outline}                 \tableofcontents[currentsection,currentsubsection]             }          }      Here's the problem: my TOC is fairly long, which means that not all of it fits on the outline slide. So, I removed singleton subsections; i.e. subsections that were the only subsections in that section.   This saved me some space in the "Outline" slide which lists the full TOC for the talk. When I did this however, the sections that no longer had subsections didn't have a slide just before, showing which point in the outline I was talking about. In order to combat this, I added an unnumbered subsection in the required sections. I figured this would keep the entry out of the TOC in the outline, while highlighting the appropriate section in the TOC just before entering it. To my dismay, this was not the case. Thus the question: how may I show the TOC at the beginning of an unnumbered subsection, or at the beginning of a section that doesn't have any subsections? **Technical specifications** :   * Mac OS X 10.7.5 (Lion)   * LyX v2.0.5.1   * MacTex v2.0 (build 150) **LaTeX Preamble** :               \usetheme{Warsaw}     % or ...          \setbeamercovered{transparent}     % or whatever (possibly just delete it)          %slide numbering     \useoutertheme{infolines}     %\setbeamertemplate{footline}[frame number]


title: Where is texless?

text: Yesterday I installed TeXlive 2014. I was using 2011 version. Well, `texless` does not work. Terminal shows `texless: command not found`. How to install `texless`? Or is there a new way to quickly view `cls` files, for example?


title: How to customize a tikz picture

text: How to remove the rectange who surrounds the `A character` and to draw that char vertically, please ?               \documentclass[]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}          \begin{document}             \begin{tikzpicture}[decoration={brace}][scale=2]      \node [draw] (A) {A};      \node [fit=(A)] (fit) {};                   \draw [decorate,line width=1pt]        ([yshift=-5pt]fit.south west) -- ([yshift=5pt]fit.north west);     \end{tikzpicture}          \end{document}       Thanks a lot!


title: PDF TextField - Draw baseline

text: right now i'm investigating the options of latex and creating fillable pdf's. Before, I used OpenOffice but it doesn't provide that much formatting options for indiviual usage. So right now I found a way to move the FormField vertically, so the written text in the field is on the same height as the "Name" of the field. The next step for me would be to draw the baseline dotted inside the form field on which the in-written text should be (should look like the text is dotted underlined).               \documentclass{scrreprt}     \usepackage{hyperref}     \usepackage{ulem}     \usepackage{tikz}     \def\LayoutTextField#1#2{% label, field     #1 \tikz[baseline={([yshift=2.25pt]baseline.base)}]{\node[] (baseline)       {\dotuline{#2}};}%     }          \setlength{\ULdepth}{1.75pt}     %\def\DefaultHeightofText{10pt}          \begin{document}     \begin{Form}     \TextField[width=3cm,height=10pt,borderwidth=1]{Test}     \end{Form}          \vspace{1cm}          % The in-written text will appear above the dotted line     \begin{Form}     \TextField[width=3cm,height=10pt,borderwidth=0]{Test}     \end{Form}          \vspace{1cm}          How it should look like \hspace{0.2em} \dotuline{In-Written Text}          \end{document}      So, does somebody knows how to format the inside of the FormField? Right now i don't know whether my issue is understandable or not, if not i will comment immidiatly. Thanks so far


title: What's the deal with the biber icon?

text: I don't even know if this question should be posted on Meta, but I'm not sure it should go to the regular site as well, so I apollogize in advance. I don't know if you have also had the same question, but on Windows the `biber` icon seems... weird. Does any of you happend to know what the biber icon is supposed to be? ![enter image description here](http://i.stack.imgur.com/GaUUK.png)


title: Problem in MacTeX: package pdftex.def Error: File `./image1-eps-converted-to.pdf' not found

text: I have a problem using MacTeX (distribution TeXLive-2013 Intel 64) in Mac OS X 10.9.2, with the IDE TeXstudio 2.7.0. I am trying to include an EPS figure in my document (as I used to do in Windows), but I get the following error: > Package pdftex.def Error: File `./image1-eps-converted-to.pdf' not found > \includegraphics{image1.eps} My minimal .tex file is:               \documentclass[11pt]{article}          \usepackage{graphicx}         \usepackage{epstopdf}          \epstopdfsetup{outdir=./}          \begin{document}          \includegraphics{image1.eps}          \end{document}        I have tried some tips I found in previous posts in various forums: -> I included the following line in `PdfLaTeX/usr/texbin/pdflatex`: `\--shell-escape -synctex=1 -interaction=nonstopmode %.tex` -> I added the `\epstopdfsetup{outdir=./}` line, just in case the file `image1.eps` can not be found in the right path. But it doesn't work... Please, does anyone know how to solve my problem?


title: Can I set Texmaker to auto-expand sections when I use search?

text: In Texmaker, I can collapse sections of the document to make it easier to navigate. However, when I search for a term, and it appears in one of these sections, the window does not jump to it and it remains hidden (because it is collapsed). Is there a way to make Texmaker expand sections and jump to the location automatically?


title: float left figure in titlepage

text: I try add a figure in the titlepage               \begin{titlepage}         \begin{center}             \begin{figure}[h]                     \includegraphics[scale=0.15]{images/logo.jpg}             \end{figure}                                                                                Univ...\\             fac ...          \end{center}         \begin{center}             {\large Title}\\         \end{center}     \end{titlepage}      but text [univ...] is down of figure the idea is get some similar to this               [figure][univ ...]          [title]


title: Changing font size of selected slides in beamer

text: I am preparing a presentation and I have some slides with up to 15 equations. How can I make the font size of these slides smaller? I need to change the font size to 6.


title: verbatim-like environment with optional arguments poorly behaved

text: [EDITED to show where I actually want to use the optional argument] This question may be answered at How to pass an optional argument to an environment with verbatim content?, but I'm having a hard time trying to apply that answer to my problem. I will delete this query if it is deemed duplicative. When I utilize a verbatim-like environment that takes an optional argument (vb in the MWE below), then for cases where no optional argument is specified the first token in the environment is sometimes excuted outside of the environment.               \documentclass{article}     \usepackage{verbatim}     \parskip 1ex\parindent 0em          \makeatletter     \newenvironment{va}{%       \def\verbatim@processline{%         {\setbox0=\hbox{\the\verbatim@line}%         \hsize=\wd0 \the\verbatim@line\par}}%       \setbox0=\vbox\bgroup \verbatim     }     {%       \endverbatim       \unskip\setbox0=\lastbox %       \egroup       \usebox0     }          \newenvironment{vb}[1][]{%       \def\verbatim@processline{%         {\setbox0=\hbox{\the\verbatim@line}%         \hsize=\wd0 \the\verbatim@line\par}}%       \setbox0=\vbox\bgroup #1 \verbatim     }     {%       \endverbatim       \unskip\setbox0=\lastbox %       \egroup       \usebox0     }          \makeatother     \begin{document}          I created two environments based on \verb|boxedverbatim| environment.     Environment \verb|va| takes no arguments.  Environment \verb|vb| is     identical but takes an optional argument (which is not actually used for     anything in this MWE). In all the following cases, no optional argument     is actually passed to the \verb|vb| environment          Starting either environment with a letter works:          \begin{va}I will set \def\x{1}\end{va}          \begin{vb}I will set \def\x{1}\end{vb}          But if I start the environments with a command like \verb|\Huge|, the     \verb|vb| environment executes that command outside the environment, even     though it was not in brackets:          \begin{va}\Huge I will set \def\x{1}\end{va}          \begin{vb}\Huge I will set \def\x{1}\end{vb}          If I start the verbatim with a \verb|\def|, the \verb|vb|     environment breaks          \begin{va}\def\x{1}\end{va}          %\begin{vb}\def\x{1}\end{vb}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Uy9Fr.jpg)


title: Two column trouble - positioning of figures and text

text: I have following trouble in LaTeX and I need some help. I am preparing a document which has this TeX code:               \documentclass [12pt]{article}     \usepackage{graphicx}     \usepackage[usenames,dvipsnames]{color}     \usepackage{needspace} % got it from http://www.tex.ac.uk/CTAN/macros/latex/contrib/needspace/     \usepackage{wrapfig}     \usepackage[a4paper, margin = 1cm, left = 2cm, right = 2cm, top = 1cm, bottom = 1.5cm, landscape, ignorehead] {geometry}      \newcommand{\warrningheading}[1] { %       \needspace{5\baselineskip}\colorbox{Black}{\parbox{\columnwidth}{\color{White}\textbf{#1}}}\nopagebreak[0]\vspace{2px} %     }     \newcommand{\warrningtext}[1] { %       {\vspace{2px}{\textbf{#1}}\vspace{2px}} %     }     \newcommand{\wrapright}[1]{ %       \begin{wrapfigure}{r}{0.31\linewidth} %         \raggedleft\includegraphics{#1} %       \end{wrapfigure}     }     \begin{document}     \setlength{\parindent}{0pt}     \setlength{\parskip}{\baselineskip}     \wrapright{pic1}     \warrningheading{WARRNING}     \warrningtext{Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet.}     \warrningheading{ATTENTION}     \warrningtext{Lorem ipsum dolor sit amet.}     \wrapright{pic3}     \warrningheading{POSSIBLY}     \warrningtext{LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM     IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET.     LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT     AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR     SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM     DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM     IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET.     LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT     AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR     SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM     DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM     IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET.     LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT AMET. LOREM IPSUM DOLOR SIT     AMET. }     \warrningheading{WARRNING}     \warrningtext{Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit     amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet.}     \warrningheading{ATTENTION}     \end{document}      And this gives mi the following PDF: ![enter image description here](http://i.stack.imgur.com/V2RlF.png) but I want to make it like this: ![enter image description here](http://i.stack.imgur.com/zm57n.png) I have tried to use manny solutions, which works, but when I include pictures in document you can't get satisfactory result. The pictures are moving the text on the left "down" so you can't get text and picture in the same area. A picture reacts like it was a char, so on the left part there is one line of text and the text below is pushed down. How to make a picture to be like the frame in word editors, and the text flows around it and not to move down? I have tried the columns packages wich give me some success, and I have tried packages where you get vertical alignment (like parralel package) whic gives me more success, but with figures I have no luck. The heading (black background) should be to the right margin except where there is a picture. Then it should be shorter, and not cover the picture Can someone give me any solutions/hints/advices?


title: siunitx: µ doesn't work

text: I'm using TeXnicCenter for Windows (7) and I'm a bloody beginner in everything that concerns LaTeX. I'm using the `siunitx` package for mathematical formulas and it works just fine... with one exception. The `\micro` (e.g. `\si{\micro}`) command doesn't work! It simply doesn't show the `µ` in the PDF file. I've tried to use `\u` as well without success. Does anybody know what the error could be?


title: Default bibliography database path in reftex

text: I just discovered reftex and am very happy with it, including the manual. However, I am not too happy with how the path to the bibliography file is set and would like to change it, but haven't found out how. Because I frequently work on a latex manuscript with coauthors and we generally use a version management system such as SVN or Mercurial, I cannot keep my references in a central database. Instead, I keep a separate `.bib` file for each manuscript I'm working on which is kept in the same directory as the `.tex` files. I have been unable to make reftex recognize the presence of this local `.bib` file when I type `C-c [` in emacs. Looking into the manual, I had to resort to inserting the following snippet in my default `.emacs` file to make `C-c [` work: > `(setq reftex-default-bibliography '("/some/path/foo.bib"))` This is unsatisfactory, since everytime I start a new manuscript with a slightly different bibliography, I need to modify my `.emacs` file as well. Is there an alternative procedure that would make reftex recognize a local `.bib` file without having to modify `.emacs` each time I start a new manuscript?


title: Highlighting Extremal Values in Table

text: In a table generated by `pgfplotstable`, how can I highlight for each column or row the cell with the minimum value (e. g. displaying the corresponding entry in bold face)? Example: ![Example](http://i.stack.imgur.com/zPYto.png)


title: How to remove vertical space between header and body of text?

text: I'm writing a Statement of Purpose, in which I've opted to leave out the title altogether, and instead put the details of myself (name, program etc) in the header. While this works fine, I have trouble in reducing the gap between the header and the first line of text on the page. I tried using `\vspace`, but that doesn't seem to help as I see no difference at all. Also, using `vspace` is OK for the first page, but since I should have no idea when the next page begin, I wouldn't know where to put the `\vspace` for Page 2. Here's a minimal document :               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}      \usepackage[margin=1in]{geometry}     \usepackage{fancyheadings}     \pagestyle{fancy}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}          \fancyhead{}     \fancyfoot{}          \fancyhead[CO, CE]{Name}     \fancyhead[LO, LE]{Statement of Purpose}     \fancyhead[RO, RE]{Computer Science, PhD}               \begin{document}          It is my greatest desire ...          \end{document}


title: \raggedyleft in memoir?

text: In memoir instead of `\raggedright`, you can use `\raggedyright[<space>]` which is much more beautiful in narrow columns. However what I also need is `\raggedyleft` which does not exist and I don't know why. This is the implementation of `\raggedyright` in `memoir`:               \newdimen\ragrparindent       \setlength{\ragrparindent}{\parindent}     \newcommand{\raggedyright}[1][2em]{%       \let\\\@centercr\@rightskip \z@ \@plus #1\relax     %%%  \rightskip\@rightskip       \memRTLrightskip\@rightskip     %%%  \leftskip\z@skip       \memRTLleftskip\z@skip       \parindent\ragrparindent}      As someone who does not know `TeX` macro very much, I could not figure out how it works exactly. I appreciate if someone here can explain me this code and tell me what to do to have `\raggedyleft`.


title: How to wrap text in a cell (without any explicit lengths)

text: I'm hoping to wrap text in a single "mega-cell" at the end of a table.                ----------------------      | header1 | header 2 |      ----------------------      | entry1  | entry 2  |      ----------------------      | entry3  | entry 4  |      ----------------------      | big cell at the end|      | with multicolumn / |      | wrapping text      |      ----------------------      There's plenty of good solutions here but they require fixed lengths to be specified, either for the column width or cell width or an embedded minipage. Problem is, I want the "mega-cell" to inherit the table width given naturally by the rest of the table. (I have a very very very large auto-generated table and would prefer not to have to tweak widths manually if possible.) Is it possible to "hook" the current width of the table for the last cell, or is there another solution for this?


title: LaTeX/Math jokes

text: Lighten up a bit guys. How about the following               \documentclass{article}     \usepackage{graphicx}     \begin{document}     If~~$\displaystyle\lim_{x\rightarrow8}\frac{1}{x{-}8}=\infty$     ~~then~~$\displaystyle\lim_{x\rightarrow5}\frac{1}{x{-}5}=\rotatebox{90}{5}$     \end{document}      Which gives — ![enter image description here](http://i.stack.imgur.com/6jAqg.png) Can anyone give me some nice Tikz of PStricks code for the following ![enter image description here](http://i.stack.imgur.com/qOeAd.png) I am sure there there must be more Latex humor out there, even among the Germans ;-)


title: Problems with middle name

text: In my literature directory it only shows the first and last name, but I want to see the middle name as well. My codes is:               \documentclass[a4paper,12pt]{article}     \bibliographystyle{chicago}       \begin{document}       \bibliography{BIB}     \end{document}      And in my bibfile:               @phdthesis {RK,     title={{R}unge-{K}utta Methods for Stochastic Differential Equations},     author={Burrage, {P.M.}},     year={1999},     school={The University of Queensland, Brisbane}     }      I want that it lookks like: > Burrage, P. M. (1999). Runge-Kutta... but it looks like: > Burrage, P. (1999). Runge-Kutta... How can I change that?


title: Embedding an index or glossary inside a longtable, with automation of hyperlinks and delimiters in arguments

text: I'm looking to produce a table like this one: ![http://i.imgur.com/oaCTJHf.png?1](http://i.stack.imgur.com/YmWwD.png) ... by the use of makeindex, and I'd like to explore the feasibility of achieving this. The idea is as follows: In the main document when using `\index[table]{#1}{#2}{#3}{#4}`, I'd like to produce a longtable elsewhere in the document, by the regular usage of `\printindex[table]` (or whatever other index name one can come up with). The comprehensive request is outlined below:   1. The \index command itself creates a `\hyperlink` (embedded in a `\marginpar`) and a `\hypertarget` at that location, see point 5.   2. `#1` is to produce the (ttstyle) code for the column "syntax". Two things are done with the code in `#1`: (i) step (i.a) is to determine if there is a delimiter `(`. (i.b) if there is a delimiter, use all text characters before the delimiter `(` to be reused in the column "R code". (i.c) If there is no such delimiter, the compiler is then guided to probe a _secondary_ delimiter, namely `,`. The second delimiter will differentiate between before and after the comma which will place anything _before_ the comma in the first column ("R code") and anything after in "syntax". Preferrably anything inside #1 could be embedded inside other environments, specifically `listings`, `minted` and `tcolorbox`. (ii) It would allow a tertiary delimiter, something similar to `\\\` to split up the arguments into seperate rows in the longtable. The code for this (in this example `dbinom`) in the longtable itself looks something like:              & \texttt{\textcolor{blue}{dbinom(}\textcolor{cyan}{<getal>},} & \target{appendix.rcommand.dbinom}Kans op deze waarde \\     \texttt{dbinom()} & \texttt{\textcolor{dgreen}{size=<waarde>},} & Bij zovaak proberen & $\surd$ & \hyperlink{document.rcommand.dbinom}{$\leftarrow$} \\     & \texttt{\textcolor{red}{prob=<waarschijnlijkheid>}\textcolor{blue}{)}} & Kans op succes \\        3. `#2` would produce the third column, which would have the same delimiters `\\\` to seperate rows (same amount of rows as `#1`) and produce text in the same font and style as the document (body) text.   4. `#3` would be either value `T` or value `F`. Setting the boolean to true would produce the `$\surd$` symbol in the fourth column.    5. `#4` would, besides point 1, do two seperate things: (i) It would produce the link to where the \index command was issued. (ii) it would produce a hypertarget (with the label of `#4`, which will also determine the labels of the initial `hypertarget` and `hyperlink` issued by the initial `\index` command) at the start of the third column (at the top) to correctly link to this part of the `longtable`. Now, the amount of arguments that is determined from `#2` will be reused to issue the appropriate layout for that index element. Trying to completely automate this (unlimited arguments) is truly too much asked for. I suggest just checking numbers and coding for a case by case scenario (e.g. `\ifnumequal{1}{<layout for everything on one line>}`, `\ifnumequal{2}{<\multirow{2}{*}{...} applied to column 1,4 and 5>}`, etc.). May not be the best solution but I don't see a way to automate this without some serious calculations. There's a catch here: it's undesirable to have one "element" (so each produced element by **one** \index command) printed on two pages. Say, you use two rows (because the `\the\arguments` of `#2` is 2, so `\multirow{2}{*}{<stuff>}`), but there's only one row left on the page. So printing this properly would require looking ahead to see if the amount of arguments determined from `#2` is in fact sufficient to print on that page, and pagebreak otherwise. The `theindex` environment for this index would have to be changed to include the header of this `longtable`, and start with the `longtable`. The end of the `theindex` environment would have to include the `\end{longtable}` issue. This can potentially be done using `etoolbox` hooks (?) A comprehensive, explanatory piece of code is below. Please note this it entirely explanatory and therefore not completely minimal (it's to show to goal with the desired effect, but instead this version is obviously not automated):               \documentclass[10pt]{article}     \usepackage{xcolor}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{ragged2e}     \usepackage{array}     \usepackage{hyperref}     \begin{document}     {\renewcommand\arraystretch{2.45}% arraystretch as argument of \printindex[table] or \makeindex[table]     \begin{longtable}[h]{>{\RaggedRight\arraybackslash}m{.175\linewidth} >{\RaggedRight\arraybackslash}m{.3\linewidth} >{\RaggedRight\arraybackslash}m{.25\linewidth} c l} %properly stretching to textwidth can be done internally     R code & Syntax & Gebruik & Vector? & Link     \\*\noalign{\vspace*{2.5ex}}\pagebreak[1] %same as head     \hline     \endhead     \texttt{[~]} & \texttt{\textcolor{cyan}{<matrix>}\textcolor{blue}{[}~,~,\textcolor{violet}{n}\textcolor{blue}{]}} & \hypertarget{appendix.rcommand.brace}{}Bij matrix van 3 dimensies, de/het \texttt{\textcolor{violet}{n}}'de rij/element in de \textbf{derde} dimensie weergeven (\textit{want: $3^e$ argument in de haakjes}), zie ook \hyperlink{appendix.rcommand.matrix}{$\rightarrow$}. & & \hyperlink{document.rcommand.matrix}{$\leftarrow$} \\     \texttt{?} & \texttt{?\textcolor{blue}{<commando>}} & \hypertarget{appendix.rcommand.question}{}Het opzoeken van R commando's && \hyperlink{document.rcommand.question}{$\leftarrow$} \\     \texttt{apropos()} & \texttt{\textcolor{blue}{apropos(}"\textcolor{cyan}{<commando>}"\textcolor{blue}{)}} & \hypertarget{appendix.rcommand.apropos}{}(Deel van een) commando opzoeken &  & \hyperlink{document.rcommand.apropos}{$\leftarrow$} \\     \texttt{as.table()} & \texttt{\textcolor{blue}{as.table(}\textcolor{cyan}{<array>}\textcolor{red}{)}} & \hypertarget{appendix.rcommand.as.table}{}R vertellen dat je de gegevens als een tabel wil lezen: read \texttt{as.table()}! & $\surd$ & \hyperlink{document.rcommand.as.table}{$\leftarrow$} \\     \multirow{3}{*}{\texttt{barplot()}}              & \texttt{\textcolor{blue}{barplot(}\textcolor{cyan}{<functie>},}             & \label{anchor.appendix.barplot}\hypertarget{appendix.rcommand.barplot}{}Barplot maken (histogram, maar dan kolommen apart) \\              & \texttt{\textcolor{green}{col=c(}\textcolor{red}{"<kleur>",...}\textcolor{green}{)}\textcolor{blue}{)}}         & \hypertarget{index.kleurspec}{}Verschillende kleuren\label{anchor.kleurspec} instellen met de \textbf{engelse} namen, bijv.: \texttt{"brown"} &  &  \\     \multirow{3}{*}{\texttt{binom.test()}}              & \texttt{\textcolor{blue}{binom.test(}\textcolor{cyan}{<tabel>},}              & \hypertarget{appendix.rcommand.binom.test}{}Gesorteerde data tabel onderwerpen aan binomiaal test & \multirow{3}{*}{$\surd$} & \multirow{3}{*}{\hyperlink{document.rcommand.binom.test}{$\leftarrow$}} \\             & \texttt{\textcolor{green}{p=<waarde>}\textcolor{blue}{)}}              & Hypothetische kans op succes (nulhypothese) \\      \texttt{c()} & \texttt{\textcolor{blue}{c(}\textcolor{cyan}{<getal>},\textcolor{cyan}{ <getal>},\textcolor{red}{...}\textcolor{blue}{)}} & \hypertarget{appendix.rcommand.c}{}Handmatig een array maken. Voor langere getallen, gebruik \texttt{array()} & $\surd$ & \hyperlink{document.rcommand.c}{$\leftarrow$} \\     \texttt{colSums()} & {\texttt{\textcolor{blue}{colSums(}\textcolor{cyan}{<functie>}\textcolor{blue}{)}}} & Optellen van kolommen van een matrix. Voor rijen, gebruik: \hyperlink{appendix.rcommand.rowsums}{\texttt{rowSums()}$\rightarrow$} & $\surd$ &  \\              & \texttt{\textcolor{blue}{dbinom(}\textcolor{cyan}{<getal>},} & \hypertarget{appendix.rcommand.dbinom}{}Kans op deze waarde \\     \texttt{dbinom()} & \texttt{\textcolor{green}{size=<waarde>},} & Bij zovaak proberen & $\surd$ & \hyperlink{document.rcommand.dbinom}{$\leftarrow$} \\             & \texttt{\textcolor{red}{prob=<waarschijnlijkheid>}\textcolor{blue}{)}} & Kans op succes \\     \multirow{3}{*}{\texttt{expand.grid()}} & \texttt{\textcolor{blue}{expand.grid(}} & \hypertarget{appendix.rcommand.expand.grid}{}Aftellen meerdere dobbelstenen & & \multirow{3}{*}{\hyperlink{document.rcommand.expand.grid}{$\leftarrow$}} \\             & \texttt{\textcolor{cyan}{<getal>}:\textcolor{green}{<getal>},\textcolor{red}{...}\textcolor{blue}{)}} & Minimale en maximale getal voor je `dobbelsteen' \\     \texttt{file.choose()} & \texttt{\textcolor{blue}{file.choose(}"\textcolor{cyan}{<bestand>}"\textcolor{blue}{)}} & \hypertarget{appendix.rcommand.file.choose}{}Bestanden laden in R && \hyperlink{document.rcommand.file.choose}{$\leftarrow$} \\     \texttt{help()} & \texttt{\textcolor{blue}{help(}\textcolor{cyan}{<commando>}\textcolor{blue}{)}} & \hypertarget{appendix.rcommand.help}{}Het opzoeken van R commando's && \hyperlink{page.4}{$\leftarrow$} \\             & \texttt{\textcolor{blue}{hist(}\textcolor{cyan}{<functie>},} & \hypertarget{appendix.rcommand.hist}{}Histogram tekenen &  \\     \texttt{hist()} & \texttt{\textcolor{green}{breaks=}\textcolor{red}{<getal>},} & \hypertarget{appendix.rcommand.breaks}{}Breedte van de kolommen aangeven, zie \hyperlink{document.rcommand.breaks}{$\leftarrow$} && \hyperlink{document.rcommand.hist}{$\leftarrow$} \\             & \texttt{\textcolor{violet}{freq=}\textcolor{purple}{<logische waarde>}\textcolor{blue}{)}} & \texttt{\textcolor{purple}{TRUE}}: plot de frequenties en \texttt{\textcolor{purple}{FALSE}}: plot verhouding tot geheel \\     \end{longtable}     }% end of index     \end{document}


title: PSTricks transparency does not work with MikTeX's XeLaTeX

text: I use MikTeX and have updated all packages several minutes ago. The problem is that XeLaTeX produces a weird result where the transparency parts become opaque. It is not caused by `preview` as discussed in Transparency in tikz, preview package and xelatex.               \documentclass{article}     \usepackage{pstricks}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \setlength{\PreviewBorder}{0bp}          \begin{document}          \begin{pspicture}(-2,-2)(2,2)         \psset{fillstyle=solid}         \psline[linecolor=blue,linewidth=12pt](-2,-2)(2,2)         \psframe[fillcolor=red,opacity=0.5](-1,-1)(1,1)     \end{pspicture}          \end{document}      Compiling the above code with `latex-dvips-ps2pdf` produces ![enter image description here](http://i.stack.imgur.com/mgfWM.png) However, compiling the same code with `xelatex` produces ![enter image description here](http://i.stack.imgur.com/rQqIP.png) The screenshots were taken from Adobe Acrobat Reader. I have `xetex.def` as follows.               .................. trimmed for simplicity .....................          %%  Version History     %%     %%  2009/11/21  [KB] Version v0.94  merge the two 0.93's.     %%     %%  2009/10/28  [RRM] Version v0.93  fix big-point incompatibility;     %%          ........................ trimmed for simplicity ......................          \ProvidesFile{xetex.def}             [2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)]          ........................ trimmed for simplicity ......................          \endinput     %%     %% End of file `xetex.def'.      The loaded files when compiling with `xelatex`:               This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9)     entering extended mode     (F:\opacity.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pstricks\pstricks.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pstricks\base\pstricks.tex"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\pst-xkey.tex"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex"))))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pstricks\base\pst-fp.tex"     `pst-fp' v0.05, 2010/01/17 (hv))     `PSTricks' v2.23  <2011/09/04> (tvz)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\xelatex\xetex-pstricks\pstricks.con"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pstricks\config\xdvipdfmx.cfg")     ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\xelatex\xetex-pstricks\pstricks.con"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pstricks\config\xdvipdfmx.cfg"     Using PSTricks configuration for XeTeX+xdvipdfmx     ))) ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pstricks\base\pst-fp.tex")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\xelatex\xetex-def\xetex.def")))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\preview.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\prtightpage.def"))     No file opacity.aux.     Preview: Fontsize 10pt     Preview: PDFoutput 1     Preview: Tightpage 0 0 0 0     [1] (F:\opacity.aux)           *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     pstricks.sty    2011/10/31 v0.52 LaTeX wrapper for `PSTricks' (RN,HV)     pstricks.tex    2011/09/04 v2.23 `PSTricks' (tvz,hv)     pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)       pst-fp.tex    2011/09/04 v2.23 `PST-fp' (hv)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive        xetex.def    2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)           preview.sty    2010/02/14 11.86 (AUCTeX/preview-latex)     prtightpage.def      ***********           )     Output written on opacity.pdf (1 page).     Transcript written on opacity.log.


title: Adding appendix in TOC as Appendix A, Appendix B using appendix package

text: I am writing my thesis, I want to add appendix after the references in TOC. I want the appendix in following format > Appendix A 107 > > Appendix B 115 > > Appendix C 120 How I can do this using `appendix` package?


title: Collect contents of lists at beginning of document

text: I would like to create a custom list environment that collects the contents of these lists and places it at the beginning of the document.               \begin{objectives}     \item See no evil.     \end{objectives}          lots of stuff 1          \begin{objectives}     \item Hear no evil.     \end{objectives}          lots of stuff 2          \begin{objectives}     \item Speak no evil.     \end{objectives}          lots of stuff 3      I would like the objectives environment to be defined so that the commands above have the same effect as               \begin{enumerate}     \item See no evil.     \item Hear no evil.     \item Speak no evil.     \end{enumerate}          lots of stuff 1          lots of stuff 2          lots of stuff 3      (The reason I can't just move the objectives to the start of the document manually is that my content is spread across multiple files that will be combined a la carte.) I know I can use the `collect` package to obtain the list at the end of the document by defining               \usepackage{collect}     \definecollection{ob}     \newenvironment{objective}{%     \collect{ob}{}{}}{\endcollect}          ..earlier content..          \begin{enumerate}     \includecollection{ob}     \end{enumerate}      It seems that a solution would need to depend on `\immediate\write\tempfile{}` to create a temporary file to store the contents. However, each of my attempts to create a temporary file will only succeed if I place the list at the end. I know it is possible to collect content to be placed at the beginning of a document because a table of contents or a list of figures does just that. I haven't been able to make heads or tails of the code in the `todonotes` package or `tocloft` package. Could you please point me in the right direction?


title: tikzscale and histograms in pgfplots

text: `Tikzscale` is giving wrong results for histograms drawn in `pgfplots`. **Histogram without scaling by`tikzscale`:** ![enter image description here](http://i.stack.imgur.com/hDDpA.png) **Histogram after scaling:** ![enter image description here](http://i.stack.imgur.com/Ezcci.png) I have included a histogram from page 67 from `pgfplots` manual for version 1.7 in the MWE. The `pgfplots.randn.dat` file comes with the standard texlive-2012 distribution or can be downloaded from the given link. **MWE**               \documentclass{report}     \usepackage{filecontents,tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}          % Comment to get figure without scaling     \usepackage{tikzscale}          \begin{filecontents}{figrandn.tikz}       \begin{tikzpicture}         \begin{axis}[           ybar interval,           xtick=,% reset from ybar interval           xticklabel={$[\pgfmathprintnumber\tick, \pgfmathprintnumber\nexttick)$}         ]]         % a data file containing 8000 normally distributed         % random numbers of mean 0 and variance 1         \addplot+[hist={data=x}] file {pgfplots.randn.dat};         \end{axis}       \end{tikzpicture}     \end{filecontents}          \begin{document}       \begin{figure}         \centering         % Comment the line below for figure without scaling.         \includegraphics[width=\textwidth,height=0.5\textwidth]{figrandn.tikz}         %Uncomment to include figure without scaling          %\input{figrandn.tikz}         \caption{Test figure}       \end{figure}     \end{document}


title: Pgfplots gives spurious lines in external mode with geometry

text: This is not a major problem but all the same I would like to confirm that I am not doing anything wrong. `Geometry` package with `showframe=true` option is used to see if all the figures are within the margins. Also, `tikz external` library is used and the plot shows some spurious horizontal and vertical lines. ![wrong plot](http://i.stack.imgur.com/bbKHf.png) This happens only if `showframe=true` is set in `geometry` and the `tikz` `external` library is used. If `external` is switched off, the plot is drawn correctly. As I said earlier, since I am not going to display frame in the final draft, this is not a major issue. **MWE**               \documentclass{report}     \usepackage[showframe=true,hmargin=3cm,vmargin=2cm]{geometry}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}          %Comment out to not use external library and get correct figure.     \usetikzlibrary{external}     \tikzexternalize          \begin{document}       \begin{figure}         \centering         \begin{tikzpicture}           \begin{axis}           \end{axis}         \end{tikzpicture}       \end{figure}     \end{document}


title: How to ensure consecutive diagonal arrows form a straight line?

text: How can I ensure that consecutive diagonal arrows in a `tikz-cd` commutative diagram spanning many rows and columns lie on a straight line (as is automatically the case for consecutive horizontal arrows)? I suspect it would be enough to force all the center nodes to lie on a regular grid, but I don't know how to achieve that. Most minimal example I can think of where this occurs:               \begin{tikzcd}       A  \arrow{dr}{\alpha} & B \arrow{dr}{\beta} & C & D \\       A & B \times B \times B \arrow{dr}{\gamma} & C \arrow{dr}{\delta} & D \\       A & B & C & D     \end{tikzcd}


title: LyX -- how to insert a dummy newline?

text: I have some Algorithmic sections, which are written externally in LaTeX and included as file includes in my LyX document. The algorithmic section renders with line breaks before and after, but appears inline in the LyX document. **Question** : Is there a way to insert dummy / editor-only line breaks in LyX? Analagous to the way one can write               hello     world      instead of               hello world      in LaTeX source, and the result will be the same. I can't press "enter" or "ctrl+enter" (ragged line break, `\\\`) before or after the figure, since that will create a new paragraph, which will be indented (I don't want this). Below is a screenshot; the black section "procedure reduce_hla..." is the thing that I want editor-only newlines before and after. ![enter image description here](http://i.stack.imgur.com/Ct99H.png)


title: What is a good LaTeX compiler for Windows?

text: I've googled around, and I haven't found a definitive compiler for latex (.tex files) on Windows. Any suggestions? Thanks!


title: Placing brackets only when citing multiple sources

text: For my thesis I am required to cite the authors as :                Some text form Author (2013) says that etc      However when citing more than one source the format should be               Some statement dictates such and such [Author I (2012), Author 2 et al. (2005)]       I am using biblatex to generate my Bibliography. The biblatex configuration is               \usepackage[             natbib=true,             citestyle=authoryear-comp,             bibstyle=authoryear,             hyperref=false,             backend=biber,             maxbibnames=99,             uniquename=false,             maxcitenames=1,             dashed=false,             url=false,             doi=false,             isbn=false,             eprint=false,                 ]{biblatex}          \renewcommand{\cite}{\textcite}           \DeclareFieldFormat[article]{volume}{\textbf{#1}\addcolon\space}          % remove "in:" from articles.      \renewbibmacro{in:}{%       \ifentrytype{article}{}{%       \printtext{\bibstring{in}\intitlepunct}}}      So my obvious question is how to achieve the brackets when citing multiple sources?


title: Macro for \left( and \right)

text: I know there has been discussion about this topic, but I haven't seen a working solution. Is it possible to define a macro within LaTeX, such that inside math mode, `(` would produce `\left(` and `)` would produce `\right)`? I know it is possible to define a different macro, say `\lparen`, but it has the disadvantage of not being as visually clear, and also not as simple, as `(`. I would like to override the `(` command only in math mode. This issue is pretty annoying when writing a lot of math.


title: How can I figure out which parameters are passed to xelatex by Rstudio?

text: I'm using Rstudio to create a nice pdf report using sweave and xelatex. I can process the sweave file in Rstudio, but I'm trying to wrap this into a script, so I need to figure out what parameters are being passed to xelatex - any ideas how to figure that out?


title: Table column justification when using the p attribute

text: I am using the `p` attribute so I can enable text wrapping. How can I get the second column, `Numeric Rating` to be center justified?               \documentclass{article}     \usepackage{multirow}     \usepackage[english]{babel}     \usepackage{booktabs}     \begin{document}     \begin{table}[H]     \centering     \begin{tabular}{ p{2.75cm} p{2.75cm} p{2.75cm} p{7cm} }     \toprule     Acceptability &Numeric Rating & General Rating & Improvement Implication\\ \hline     \multirow{3}{2.75cm}{Acceptable and Satisfactory} & 10 & Excellent & No obvious room for improvement \\      & 9 & Very Good & Minor improvement possible, but not required \\      & 8 & Good & Some improvement possible, but not required \\ \hline     \multirow{3}{2.75cm}{Acceptable but Unsatisfactory} & 7 & Fair & Limited Improvement requested \\      & 6 & Somewhat Poor & Significant improvement requested \\      & 5 & Poor & Major improvement requested \\ \hline     \multirow{4}{2.75cm}{Unacceptable} & 4 & Very Poor & Some improvement mandatory \\      & 3 & Bad & Significant improvement mandatory \\      & 2 & Very Bad & Major improvement mandatory \\      & 1 & Extremely Bad & Extensive improvement or major design changes are mandatory\\ \hline      & 0 & \multicolumn{2}{l}{Can't answer question, e.g., don't remember} \\     \bottomrule     \end{tabular}     \caption[General Rating Scale]{General Rating Scale}     \label{tab:genRating}     \end{table}     \end{document}


title: 2 column: how to squeeze line numbering closer, shift code over in Lyx

text: I'm using 2-column in otherwise-default Lyx, with several program listings. Some of them have line numbers. Due to the 2-column layout, the line numbers take a good chunk of the gutter between columns. Is there a way to do any or all of the following?   * squeeze the line numbers a bit closer to the code listing   * move the code over a bit to the right (some left-margin setting for program-listing)   * allow the code to go a bit past the normal column width on the page side Thanks!


title: Making a family of graphs in TikZ by a few definitions

text: I am trying to make in TikZ a family of graphs, as in included pictures. I can make them one by one, using nodes (circle/square/triangle, black/white) and joining them. However it seems to me, that all the graphs are so similar, then, lest us say, three definitions could define all of them. I am still a beginner in TikZ, so I have not a good idea, how such definitions may look like. **Edit** (transferred from comments): I think, for example, that first three graphs from Fig. 1 could be obtained by concatenating graphs from Fig. 2, with their parameters changed. Is it a valuable idea of simplifying my work, or not? ![enter image description here](http://i.stack.imgur.com/AcWRC.jpg) ![enter image description here](http://i.stack.imgur.com/6u7R9.jpg) ![enter image description here](http://i.stack.imgur.com/u36Zz.jpg) ![enter image description here](http://i.stack.imgur.com/NIKOA.jpg)


title: Animating TikZ without beamer

text: I have the following code:               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{frame}       \begin{tikzpicture}         \fill[white] (1,1) circle (2pt);         \foreach \n in {1,2,...,10}{           \pgfmathsetmacro{\ang}{(10-\n)*90/10}           \draw<\n>[thick,dashed,->] (1,0) node[below]{%             Rotating by $90^\circ$%           } arc (0:\ang:1);         }         \end{tikzpicture}     \end{frame}          \end{document}      Which yields a nice(?) animation of a growing arrow. Now, I want to generate one PDF file where each page contains one cropped slide - as if I was using `standalone`. Cropped means for me that it will contain only the result of the `tikz` environment, and nothing else (not even border or something like that). I tried to use `standalone` with the `multi=true` but then it doesn't crop the page, and I don't know how to generate a loop there... What is the best way to do it?


title: Induce silent failure

text: I've included a package in my tex file which requires a download from CTAN, so it's freely available just not in the default tex install. I'm distributing my tex file, and would either like pdftex to fail silently on the missing package (or log a message explaining that the pdf "looks best with inclusion of blah"), or find a way to ship the tex file with the special sty's. What's the appropriate and conventional way to go about this?


title: Harvard agsm bibliography style no comma and bold volume

text: I've been grappling with the harvard style bibliography (agsm) all day and have managed to fix most of the issues I've had, however I am still left with bold volume numbers and no comma between the journal and volume. What I have at the moment is this: > Whipple, K. & Tucker, G. (2002), Implications of sediment-flux-dependent > river incision models for landscape evolution, Journal of Geophysical > Research **107** (B2), 2039. The 107 after the journal name is bold and there is no comma separating them. What I need is > Whipple, K. & Tucker, G. (2002), Implications of sediment-flux-dependent > river incision models for landscape evolution, Journal of Geophysical > Research, 107(B2), 2039. Comma inserted between the journal and volume and the bold changed to normal font for the volume number of 107. Which line of the bst file in the agsm bib style would control this? And what should I change it with?


title: Redefine the printnames command so as to change the font?

text: the `\printnames` command produces one of the following output:               John Smith     John Smith and Paul Winston     John Smith et al.      However I don't want to print the first names of the authors. That is, the desired output is:               Smith     Smith and Winston     Smith et al.      Also, I get the authors' names in _small caps_ font, which is not what I want. [EDIT] Concerning the _small caps_ font problem, I think it comes from the style file I use. I tried `\renewcommand*{\mkbibnamelast}[1]{#1}` as suggested by @moewe, but it didn't help. As for the context of this problem, I am trying to make my own citation command. I edited a local `biblatex.cfg' file with the following content:               \DeclareCiteCommand{\mycite}{}{%         \printnames[default]{author}%     }{}{}      My `.tex` file looks like this:               \documentclass{article}          \usepackage[         backend=biber,         citestyle=authoryear-comp,         natbib=true,     ]{biblatex}          \begin{filecontents}{\jobname.bib}     @misc{S10,       author = {Smith, John and Winston, Paul},       date = {2010},       title = {Some title 1},     }     @misc{S11,       author = {Smith, John and Winston, Paul},       date = {2011},       title = {Some title 2},     }     @misc{S12,       author = {Smith, John and Winston, Paul and Porter, Mark},       date = {2012},       title = {Some title 3},     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     \begin{itemize}         \item One author: \mycite{S10}          \item Two authors: \mycite{S11}          \item Three authors: \mycite{S12}     \end{itemize}          \printbibliography      \end{document}


title: Ignore compile errors

text: How can I set up a permanent compile loop that keeps trying even when there are errors? I'm using latexmk with a remote compile setup as discussed here and here. However, if I save a document with a bug (either a legitimate bug, or I save it before closing a tag), then latexmk halts. Any suggests how I can have it pause, try again, and keep trying again, for ever and ever?


title: Including figures relative to the path of the current document?

text: I am writing a paper simultaneously with my thesis; the paper will be included verbatim in the thesis (or at least, parts of it will). I am looking for a solution that allows me to update my paper without maintaining a separate version for inclusion in the thesis. I currently use the `standalone` package with the `import` package to allow inclusion of independently-compilable documents. This works for almost everything, but not for figures: I include figures with `\includegraphics`, and it cannot find figures included in a subdirectory of the _paper_ unless they're also in the same subdirectory of the _thesis_. Is there a way around this, besides the obvious but, imo, ugly use of symbolic links? * * * Following the suggested links, I noted that this question: How to make the main file recognize relative paths used in the imported files? recommends using subimport, in which case my question may become "when should I use `subimport` vs `import` vs `input`." But I'm not sure, so I'm still asking the original question, this is just "showing my work".


title: How to make a circular arrow have the same size and position as other circular symbols?

text: I'm using the `mathabx` package's circular arrows; however, since I otherwise prefer the usual `amsmath` symbols, I'm following the setup described in Importing a Single Symbol From a Different Font to import only the circular arrows. Here is my code:               \documentclass[11pt]{article}     \usepackage{amsmath,amssymb,graphicx}          \DeclareFontFamily{U}{mathb}{\hyphenchar\font45}     \DeclareFontShape{U}{mathb}{m}{n}{<5> <6> <7> <8> <9> <10> gen * mathb     <10.95> mathb10 <12> <14.4> <17.28> <20.74> <24.88> mathb12}{}     \DeclareSymbolFont{mathb}{U}{mathb}{m}{n}     \DeclareMathSymbol{\rcirclearrow}{0}{mathb}{'367}          \begin{document}     $A\mathbin{\raisebox{0.05ex}{\scalebox{0.9}{\rotatebox[origin=c]{270}{$\rcirclearrow$}}}} B$          $A\otimes B$     \end{document}      This is what is produced: ![image description](http://i.stack.imgur.com/nxPlL.png) As you can see, they are not lined up, even though I put the circular arrow inside `\mathbin{}`. Since I know that fiddling with `\hspace` and `\raisebox` is not fully "proper", and won't scale with changes to font or font size, my question is: > How can I make this circular arrow agree with other circular symbols like > `\oplus` and `\otimes`, in a way that will scale properly? Is there a way to > figure out the exact value needed to give to `\scalebox` to get the circular > arrow to be the same size as an `\otimes`? Incidentally, I suppose this raises the mathematical question of whether the circular arrow is to be considered a relation or an operator. In my context, I am using                A (right-facing circular arrow) B      to mean "`A` acts on `B`". For example, we might have a group `G` acting on a space `X`. Can any mathematically-inclined people give their opinions/reasoning for whether "acts on" is a relation or operation, and hence whether I should instead be giving the circular arrow a `\mathrel` or a `\mathbin` spacing?


title: Page numbering at bottom of page

text: I am writing my thesis and I am using document class `thesis`. I want the page numbering appearing at bottom of the pages and centered.               \documentclass[12pt,a4paper, oneside, bold]{thesis}     \usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}     \begin{document}     My text....     \end{document}      I tried writing something like that:               \documentclass[12pt,a4paper, oneside, bold]{thesis}     \usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}     \usepackage{fancyhdr}      \fancyhf{}     \cfoot{\thepage}          \begin{document}         My text     \end{document}      But nothing is working. Any suggestions please.


title: How to use footnotes in a bytefield?

text: At the moment I am trying to use `\footnote` inside the `rightwordgroup` and `leftwordgroup` environments of a `bytefield`, as well as inside the labels given to the fields themselves. The numbering at the text indicates that `\footnote` had some effect, but the footnote - if there is any added at all - does not appear in the footer. Is the solution similar to the one here?


title: Coloured box with tikz

text: I'd like to break a coloured box when the page which contains it breaks... here is an example which shows this issue:               \documentclass[11pt]{report}     \usepackage[explicit]{titlesec}     \usepackage[usenames,dvipsnames]{pstricks}     \usepackage{amsfonts,amssymb,amsmath,enumerate,makeidx,mathrsfs,graphicx,epsfig,fancyhdr,pst-grad,pst-plot,tikz-cd,tikz}     \usepackage{ccfonts,MnSymbol,colortbl}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}     \usepackage[mathcal]{euscript}          \tikzstyle{mybox} = [draw=blue, fill=blue!15, thick, rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]     \tikzstyle{fancytitle} =[fill=blue, rounded corners, text=white, inner sep=6pt]     \tikzstyle{fancyend} =[draw=blue, fill=white, thick, rounded corners, text=blue]          \begin{document}          \begin{tikzpicture}     \node [mybox] (box){\begin{minipage}{0.9\textwidth}     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     El primer teorema fundamental del c\'alculo dice que si $f$ es continua en el intervalo cerrado $[a,b]$ y $F$ es la integral indefinida de $f$ sobre $[a,b]$, entonces     \[\int_a^bf(x)dx=F(b)-F(a). \]     \end{minipage}};     \node[fancytitle,right=10pt] at (box.north west) {Teorema Fundamental del C\'alculo};     \node[fancyend] at (box.south east) {$\diamondsuit$};     \end{tikzpicture}          \end{document}      and it looks like this:![Box which doesn't fit page height](http://i.stack.imgur.com/HwiDy.jpg)


title: vspace equivalent of newline

text: I am writing one report using LaTeX and R. I just found `\vspace` can be used for `\newline`. May I know how much `\vspace` == `\newline`?                \vspace{x cm} = \newline       x = ?


title: LaTeX Hierarchy Chart

text: I'm trying to create a chart in LaTeX. I found a couple of packages that do similar things but none that really provides what I want. Since my chart is really not that complex I hope someone out here can help me achieve what I want to create. I basically want to code a 1:1 copy of this: ![](http://www.hit.ac.il/staff/leonidm/information-systems/images/48-02.jpg) Hope you can help me.


title: Best way to display percentages in Sweave?

text: What is the best way to display percentages in Sweave? A simple example:               The number 4 is \Sexpr{4 / 7} of 7.      What is the best way to get the document to display: > The number 4 is 57.1% of 7.


title: \let\foo\bar vs \let\foo=\bar

text: Both uses of the `\let` primitive often lead to the same result. Is this even true for every case? What was the thought process behind it. And if they are actually not equivalent, are there particular situations in which you can only use one or the other? ## Summary As your plenty and nice answers show, there are cases in which you clearly have to respect one of the variations (for instance regarding assignments to '=' and macros that check for spaces). These were totally understandable points and they explain a lot. Now, @Werner's answer confirmed one ingenuous thought of mine: > "The use of = is purely to emphasize the fact that an assignment is being > made [...]" Moreover Knuth himself seem to have intended the synopsis including the '=', though he also used the other way. Why did he include it then? It will probabilly have to do with the exact meaning of the TeX source snippet cited by @Werner. To be honest, I don't know WEB either, but if there is someone who does, can he explain it (in very easy terms) by adding an edit to his answer? New answers are clearly welcome too. ## Addendum As an element of a gray area I found an example where using the syntax including the equal sign causes "difficulties": If you have control sequences which need the 'csname-expandafter' mechanism, and you want to stick to the minimal exploitation of `\expandafter` by saing               \expandafter\let\csname foo1\expandafter\endcsname\csname bar1\endcsname      you can't add an equal sign because it would distract TeX from reading the `\expandafter`s correctly. To get the equal sign work you would need to use the slightly unhandier version               \expandafter\let\csname foo1\expandafter\endcsname\expandafter=\csname bar1\endcsname


title: LaTeX, BibTeX and keyword Reference

text: Is there a way of preventing LaTeX class article from printing keyword References. Namely, I would like to get LaTeX to print references from my database processed by BibTeX in the regular fashion but I do not word References to appear on the document.


title: Centering cells of a tabular column using m{}

text: I want to use a tabular to list some headlines, that might be quite long or contain linebreaks. The first column is kind of an Index or Key for the second columns content, so i would like to (vertically) center it (and i'll add `\midrule`s for readability). To achieve the centering i included the `array`-package with its column definition `m{2.5em}`. The remaining two columns have fixed widths, too. But - as in the following MWE - the first column is somehow vertically placed top or bottom but not centered.               \documentclass[a4paper,div=calc]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{array,booktabs,calc}     \begin{document}     \begin{tabular}{>{\raggedleft}m{2.5em}b{.5\textwidth-6\tabcolsep-8em}p{5.5em}}%         \toprule\textbf{\#}&\textbf{Name}&\textbf{Notes}\\\midrule%         A &          Lorem ipsum dolor sit amet, consectetur adipisici elit&\\         B & \begin{minipage}[t]{.5\textwidth-6\tabcolsep-8em}             An\\even\\higher\\row\\with\\linebreaks         \end{minipage}&\\         2 & Short Entry &          \\\bottomrule     \end{tabular}     \end{document}      And here's how it looks, as you can see, the first column is not vertically centered (i know in this quick MWE the minipage does not have enough space below). ![MWE of the non vertically centered first column](http://i.stack.imgur.com/UUIjz.png) Any ideas?


title: How to change style and color of Table of Content?

text: I want to change style and color of my Table of Contents to match this: ![enter image description here](http://i.stack.imgur.com/DPCxD.png) Note that I use the `minitoc` package for creating my Table of Contents on a per-chapter basis.


title: Remove frame from presentation

text: Question: how do I remove a frame from my presentation? I am using the beamer package and I just want to remove 1 frame quickly from my presentation because it is not relevant. Is there a quick way to do this? Like               \begin{frame}[exclude]     \end{frame}


title: Spaces in pfgopts options

text: Is there a simple way to allow spaces in the options of a package using `pgfopts` to process them, which is local to that package i.e. I don't have to include some package in the main document before `\documentclass`. What I'm trying to do is pass font names to `fontspec` inside the package using `pgfopts`.


title: How to reverse margin of tufte-book?

text: I want to change position of `tufte-book(twoside)` class in my thesis. In normal mode, margins for odd pages is on the right side and for evens, is on the left side of page. I want to change the position of margins. Normal: ![enter image description here](http://i.stack.imgur.com/XV23M.png) Reverse: ![enter image description here](http://i.stack.imgur.com/Rkvu9.png)


title: Use of \trivlist and \list in defining environments

text: I did ask a similar question a bit back here but never really had a satisfactory technical answer. Reading through the documentation of `xdoc` Lars Hellstrom pretty much asked the same question and noted in a footnote (page 47), > Seriously, can someone explain to me why it seems just about every non-math > LaTeX environment that doesn’t start a `\list` starts a `\trivlist`? What > good does all these `\trivlists` do? > > Is it (a) that people just like the basic design, (b) that there’s some deep > technical reason, or (c) that people in general doesn’t have a clue but all > other environments do that so it’s best to include it just in case? Can someone explain the technical reasons for adopting such a design and the alternatives?


title: Problems using \addlegendentry in a loop with pgfplots

text: I have some spectra to plot, which I exported from the Siemens Xray toolbox, which works nicely with `pgfplots`. Since these are multiple files that look the same I think I can do it with a for loop, which also works. But now I have problems with adding a legend entry, since that does not work. When I use a `\addlegendentry` with `siunitx` I cannot compile the copde below, I get informed that the > Argument of \add@accent has an extra }. This becomes more clear when I don't use `siunitx` but just want to get the values (commented line in the example below), then there's no number in the legend, only a nice k with a hat (no idea how it's called `:)`). When I don't do use a `for`-loop, but add the plots manually for each one it works. But since in the final figure I have to plot more than 20 spectra (all much bigger than the one in the example) I'd like to do it in a loop, ideally.               \documentclass{article}     \usepackage{siunitx}     \usepackage{pgfplots}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}          \usepackage{filecontents}     \begin{filecontents*}{Xray-Spectrum_040.txt}     9 2.23512e-015     10 2.18948e-009     \end{filecontents*}     \begin{filecontents*}{Xray-Spectrum_046.txt}     9 1.98718e-015     10 1.56485e-009     \end{filecontents*}          \begin{document}     \begin{tikzpicture}         \begin{axis}         \foreach \v in {40,46} {             \addplot table {Xray-Spectrum_0\v.txt};             \addlegendentry{\v kv}         }         \end{axis}     \end{tikzpicture}     \end{document}      * * * ## Related I had to rename the files from `Xray-Spectrum_046kV.txt` to `Xray- Spectrum_046.txt` to make it work. Is there a way I can get the variable to be evaluated in the middle of the filename?


title: catcode as used in defining Hypergeometric Function

text: This is perhaps not a very intelligent question, as I am not (of great intelligence nor) well versed in raw tex, even more so `\catcode` but in the code given in a previous answer there is a use of `\catcode`:               \newcommand*\pFqskip{8mu}     \catcode`,\active     \newcommand*\pFq{\begingroup             \catcode`\,\active             \def ,{\mskip\pFqskip\relax}%             \dopFq     }     \catcode`\,12     \def\dopFq#1#2#3#4#5{%             {}_{#1}F_{#2}\biggl[\genfrac..{0pt}{}{#3}{#4};#5\biggr]%             \endgroup     }      Is there a reason why the first               \catcode`,\active      has no backslash and the later ones do? This former answer explains that the backslash is for "special catcode" characters, whate'er that may be, but why is it omitted in the first instance and not the second? Then of course, my real question is what is the `\catcode`'s purpose there? I roughly understand what an active character is, but not its role in the code. Would it perhaps explain why when I use the command as follows:               \pFq{3}{2}{a,b,c}{d,e}{z}      I get no commas between the a, b, and c, or the d and e, as I would prefer? [update, I think I just figured it out that the first part redefines comma to be small skips, given by `\pFqskip{8mu}`, but I am not sure why, but I can see why this would cause the commas to disappear.] Again, probably elementary questions, but I am a bear of little TeX.


title: Teaching LaTeX to visually disabled

text: I will teach a blind person how to use LaTeX this week. Has anyone any hints for me or package recommendations?


title: Omitting white lines from line numbering using lineno

text: I am using the `lineno` package to number lines modulo 5 in a document that consists of several sections with lots of small paragraphs (typically 2-5 lines) and with white lines between every paragraph. I would like to only count the lines of plain text, or as my document is simple enough style-wise, I would like to omit section headers and white lines. Using the response of the maintainer Uwe Lück of the `lineno` package to an earlier question (Headline-ignoring, pagewise line numbers), I managed to exclude section headers. It involves introducing a new command to replace `\section`. Is there maybe a similar solution, which would save me from inserting a linenumber command after every paragraph?


title: Biblatex: formatting @article-entry

text: I'm currently writing a thesis and have 2 questions concerning biblatex:   * I would like to skip the "Issue" that is up to now always displayed together with "Year"   * I would like to have "Year" at the end Here is an example:               \documentclass[]{scrreprt}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{url}     \usepackage[automark,headsepline,ilines]{scrpage2}     \usepackage{hyperref}     \usepackage[backend=biber, sorting=none, style=numeric]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{Bibliographie.bib}     @article{PRL.62.59,     title = {Atomic-Resolution Imaging of Close-Packed Metal Surfaces by Scanning Tunneling Microscopy},     author = {Wintterlin, J. and Wiechers, J. and Brune, H. and Gritsch, T. and H\"ofer, H. and Behm, R. J.},     journal = {Phys. Rev. Lett.},     volume = {62},     issue = {1},     pages = {59--62},     year = {1989},     doi = {10.1103/PhysRevLett.62.59},     url = {http://link.aps.org/doi/10.1103/PhysRevLett.62.59},     publisher = {American Physical Society}     }     \end{filecontents}           \addbibresource{Bibliographie.bib}          \begin{document}          This is a test \cite{PRL.62.59}          \printbibliography          \end{document}      Right now it's like this: > J. Wintterlin u. a. “Atomic-Resolution Imaging of Close-Packed Metal > Surfaces by Scanning Tunneling Microscopy”. In: Phys. Rev. Lett. 62 (1 > 1989), S. 59–62. doi: 10 . 1103 / PhysRevLett . 62 . 59. url: http : / / > link . aps . org / doi / 10 . 1103 / PhysRevLett.62.59. And it should be like this: > J. Wintterlin u. a. “Atomic-Resolution Imaging of Close-Packed Metal > Surfaces by Scanning Tunneling Microscopy”. In: Phys. Rev. Lett. 62, S. > 59–62. doi: 10 . 1103 / PhysRevLett . 62 . 59. url: http : / / link . aps . > org / doi / 10 . 1103 / PhysRevLett.62.59 (1989). Would be great if someone could help. Thanks in advance


title: Table of Contents, List of Figures, and List of Tables Positions

text: How do you move the beginning of the table of contents, list of figures, and list of tables further up the page? The default is to start those sections above a third of the way down the page.


title: How does changing colour affect spacing?

text: In the following example, the space after the red equation is much larger than the space after the black one.               \documentclass[12pt]{article}     \usepackage{xcolor}     \begin{document}     \[ a = b \]          The quick brown fox jumps over the lazy dog.     \color{red}     \[ a = b \]     \color{black}          The quick brown fox jumps over the lazy dog.     \end{document}      It appears to me that the presence of `\color{black}` fools `TeX` into thinking there is something on the line after the equation, so the paragraph break causes a spurious blank line before the text. Section 3.7 of grfguide mentions spacing problems, but doesn't really explain the situation. What is on the line after the red equation? Note that there is already a question asking how to deal with this problem; I want to understand what is going on.


title: How to keep useless zeros in SIUNITX

text: I want to keep all useless zeros using `siunitx`. How could I ?               \documentclass{article}     \usepackage{siunitx}          \begin{document}          \verb+\num{5}+: \num{5}\\     \verb+\num{05.0}+: \num{05.0}\\     \verb+\num{0.5}+: \num{0.5}\\     \verb+\num{00.50}+: \num{00.50}\\          \end{document}      With the package `xstring` one can use :               \newcommand{\Num}[1]{%         \StrPosition{#1}{.}[\p]%         \num[minimum-integer-digits=\p-1]{#1}     }


title: Is it possible to apply a style to all (tikz) rectangles?

text: I know that it's possible to apply styling to all tikz nodes or paths, as in the following example:               \tikzset{         every node/.style={             text=red         },         every path/.style={             color=green,             thin         }     }      (Which makes all nodes have red text and all paths have thin green lines.) Is there a similar way to apply styling to all tikz rectangles, so those produced by draw commands such as `\draw (1,1) rectangle (3,3);`? I tried the following, on the off-chance it might work (it didn't, hence my question!):               \tikzset{         every rectangle/.style={%             blue,             rounded corners,             ultra thick         }     }      My current work-around is to use a style which I apply to every rectangle manually, although this is a little tedious. This is demonstrated in the below minimal working example.               \documentclass{report}          \usepackage{tikz}          \tikzset{         every rectangle/.style={             blue,             rounded corners,             ultra thick         },         my rectangle/.style={             blue,             rounded corners,             ultra thick         }     }          \begin{document}          \begin{tikzpicture}              % A rectangle which would be styled by the "every rectangle" bit if          % it worked in the way that I would like it to:         \draw (1,5) rectangle (4,7);              % A rectangle with my custom styling applying to it:         \draw [my rectangle] (1,1) rectangle (4,3);          \end{tikzpicture}          \end{document}      The rectangles in the above would be identical (besides position) if `every rectangle` worked in the way I would like it to or if there's some other way to style all rectangles. So essentially I would like to know if an actual equivalent to my pseudo `every rectangle` exists.


title: Why does \widehat behave differently if I insert \hspace{0pt}?

text: I am getting some inexplicable behaviour from `\widehat`:               \documentclass[12pt,a4paper]{article}     \usepackage{amsfonts}     \begin{document}     \[     \fbox{$\widehat{\mathcal{C}}$},      \fbox{$\widehat{\hspace{0pt}\mathcal{C}}$},      \fbox{$\widehat{\mathcal{C}\hspace{0pt}}$},     \fbox{$\widehat{\hspace{0pt}\mathcal{C}\hspace{0pt}}$}     \]     \end{document} > ![output](http://i.stack.imgur.com/SLbHA.png) Notice that the hat is misaligned in the first instance, but correctly aligned in all the other instances. Why does `\hspace{0pt}` make such a difference? Also, how can I replicate this effect for other alignment problems? At the moment I am having trouble with the bounding boxes for the script font I am using...


title: Cross-refencing a custom counter in \Alph style?

text: I made a 'hypothesis' custom counter in order to let LaTeX handle my hypothesis reference. My code is               \newcounter{hypothese}          \refstepcounter{hypothese}\label{hypo:lenght_of_words}     \refstepcounter{hypothese}\label{hypo:blue_word}          I think thant the words will be longer in this condition (hypothesis      \ref{hypo:lenght_of_words}) and that the word \emph{blue} will be user more      frenquently than in the next situation (hypothesis \ref{hypo:blue_word}).           % ... statistical computing          As predicted in hypothesis \ref{hypo:blue_word}, the word \enquote{blue} is much more      used than in the natural condition.      The output is what I wanted :               I think thant the words will be longer in this condition (hypothesis 1) and that the      word blue will be user more frenquently than in the next situation (hypothesis 2).          As predicted in hypothesis 2, the word « blue » is much more used than in the natural     condition.      Now I want the hypothesis to use the `\Alph{}` style for numbering (`A`,`B`,`C`,...) but I don't know how to set the `\ref{}` command to return a letter. Can someone help me?


title: How to change a .tex file's input encoding system (preferably to UTF-8)?

text: I've been trying to use the hyphenation patterns embedded in the file `dehyphtex.tex`, which is part of the `hyphen-german` package. Unfortunately, the file seems to be encoded in a system that's neither UTF-8 nor ASCII. Hundreds of words listed in the file contain characters (mostly vowels with Umlaute, but also e-with-sharp-accent and others) rendered as `�`. With MacTeX2012, I use TeXworks as my editor; this editor uses UTF8 as the default input encoding scheme. So far, the trial-and-error method of reloading the file using any of the several dozen alternative input encoding schemes that this editor is familiar with has produced no success. I guess I could hand-edit the file to replace all `�` instances with the correct UTF8-encoded characters, but I'm hoping there's a more automated way of doing this. Does anyone know off-hand which input encoding scheme is used for this file, and/or does anyone know of a handy method to convert a file of unknown input encoding into a UTF8-encoded file?


title: Iterating through comma-separated arguments

text: I've looked all over and can't seem to find a succinct answer to this question. Is it possible (and if so, how) to create a command that will iterate through its `arguments' of comma-separated values and act upon them? Example mostly stolen from "For loop" in newcommand:               \newcommand{\pdfappendix}[1]{         for \image in #1         {            \includegraphics[scale=0.6]{\image.pdf}         }     }      The goal here is to create a command that can print a file menu structure (or some arbitrary path) like so:               \ppath{Command,TeXing Options,Generate PDF (C-c C-t C-p)}      potentially with an optional argument for a delimiter (defaulting to `\to` or something) which would produce               Command -> TeXing Options -> Generate PDF (C-c C-t C-p)      In the words of holy `ed`, `?`


title: array and line how to draw?

text: I want to know how can I draw the line that appears in the right of the image below, and also how can I write this array that appears in the left of the picture. ![tree](http://s13.postimage.org/njmbbbp2v/Untitlead.png)


title: Combination of LuaLaTeX and TikZ lead to lots of undefined control sequence errors

text: I have a document that compiles fine under LuaLaTeX, until I add to the preamble the line: `\usepackage{tikz}`. Compiling after adding that line yields a lot of errors like this:               ! Undefined control sequence.     \pdf@escapestring ...capestring("\luaescapestring                                                       {#1}", "byte")}     l.1 ...K [1][-]{section.1}{Probabilities et al.}{}                                                      % 1      Now, as far as I can tell, the document (which at this point has no TikZ code proper, just the use package line) compiles as fine as before. If I add TikZ images, it still seems to compile properly... but then why are those errors being generated? I doesn't seem like a wise strategy to just ignore them... I tried using `\usepackage{tikz,pgf}`, and in reverse, but to no avail. Can anyone help? I just pasted the first error, because they all look fairly similar (to me at least...). Just for the kicks, here's the _last_ one:               ! Undefined control sequence.     \pdf@filesize ...xcmds.filesize("\luaescapestring                                                       {#1}")}     l.346 \end{document}          )


title: Using mdframed: can't install xparse.sty

text: I have a latex document which uses the mdframed package (OBS: I can successfully compile it on another system). I installed the mdframed package (through `tlmgr install mdframed`) but when I try to compile, it is still missing the xparse.sty file. I've searched it and it seems xparse.sty belongs to this `xpackage` package. But `tlmgr install xpackage` fails with "xpackages not present in package repository"


title: Sans font to go with Bitstream Charter

text: I've been using Bitstream Charter (`\usepackage[charter]{mathdesign}`) for a while now. For my German documents, I looked into KOMA today and found that the `scrartcl` document class would be a good replacement for `article`. It uses sans fonts for the headings and serif font for the text. I got the following warning:               LaTeX Font Warning: Some font shapes were not available, defaults substituted.      As it seems, I got the Computer Modern Roman sans font for headings, but Charter for the text. I tried Bitstream Vera Sans (Bera Sans, `\usepackage[scaled]{berasans}`). It looks better than before, but I am not sure whether this is a good font to go with Charter: * * * ![](http://wstaw.org/m/2012/12/17/bera.png) * * * Is that the matching font or is there a nicer one? It seems pretty thick, especially in the page title. For comparison, here is plain Computer Modern Roman with `article`: * * * ![](http://wstaw.org/m/2012/12/17/cmr.png) * * * And just Charter with `scrartcl`: * * * ![](http://wstaw.org/m/2012/12/17/mixed.png)


title: Getting snakes to work (latex+tikz)

text: A Latex+tikz question for you: I can't seem to get snakes to work (scientific linux 6.3). I've been looking at the tikz manual; sure would like to know how to get those snakes!               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations,backgrounds}          \begin{document}       % p43 : can't get snakes to work       %       \usetikzlibrary{arrows,snakes,backgrounds}      \draw [->,snakes=snake] (0,0) -- (2,0)      : Package pgfkeys Error: I do not know the key '/tikz/snakes' and I am going to...       %       \usetikzlibrary{arrows,snakes,backgrounds}      \draw [->,snake=snake] (0,0) -- (2,0)       : Package tikz Warning: Snakes have been superseded by decorations. Please use th...       %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,snake=snake] (0,0) -- (2,0)       : I can't find file `tikzlibrarydecoration.code.tex'...       %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,decoration=snake] (0,0) -- (2,0)  : Package pgfkeys Error: I do not know the key '/pgf/decoration/snake' and I am...       %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,decoration=snakes] (0,0) -- (2,0) : Package pgfkeys Error: I do not know the key '/pgf/decoration/snakes' and I a       \begin{tikzpicture}         \draw [->,decoration=snake] (0,0) -- (2,0);       \end{tikzpicture}     \end{document}


title: What is the best way to make the transition from Microsoft Word to LaTeX?

text: My experience at the present moment is restricted to Microsoft Word and is likely to remain for most of my collaborative work. However, for my individual authored documents I would like to use LaTeX. I am familiar with some tex notation but have not used LaTeX extensively. In light of the above I was wondering what is the best way to make the transition from Word to LaTeX?


title: How was TeX output visualised on screen, back in the day?

text: I've been using LaTeX for about two years; I'm only learning TeX now, to get a better understanding of the foundations. In _Chapter 6 : Running TeX_ of his TeXbook (more specifically, on page 23), Knuth writes about how to get started with TeX: > Go to the lab where the graphic output device is, since you will be wanting > to see the output of what you get---it won't really be satisfactory to run > TeX from a remote location, where you can't hold the generated documents in > your own hands. This passage left me a bit confused: back in the day, when TeX was released, did one have to print out the output document (i.e. produce a hard copy) in order to visualise it? If not, what was on-screen visualisation like? Was the quality sufficient to get a good idea of what a hard copy would look like? I'm just being curious, here... If on-screen visualisation was indeed possible, would anybody have screenshots they'd be willing to share or link to in an answer? **EDIT** : Since all of the answers I've got so far are equally valid, I cannot reasonably accept a particular one. ![enter image description here](http://i.stack.imgur.com/Acdhf.png)


title: How to align dotfill to the right

text: I use the following command below to make my list of nomenclature to look like the list of contents, but I am a bit disturbed by the fact that the dots between the text belonging to a symbol in the list and the page on which to find the definition is aligned to the left, and not to the right as they seem to be in the table of contents. The question is thus if it is possible to modify the script below, or a dotfill command in general, to align the dots to the right instead of to the left, which seems to be default.               \makeatletter     \newcommand \Dotfill {\leavevmode \cleaders \hb@xt@ .75em{\hss .\hss }\hfill \kern \z@}     \makeatother          \usepackage[refpage, noprefix]{nomencl}     \renewcommand*{\pagedeclaration}[1]{\unskip\Dotfill \makebox[6mm][r]{\hyperpage{#1}}}      My list of nomenclature now looks like this (I added the green line to make it easier too se that the points are aligned to the left): ![enter image description here](http://i.stack.imgur.com/RByBo.png)


title: How to remove extra space after volume number in References section

text: When I compile my manuscript, in the references section extra space is added after the volume number. My corrector told me to remove it, but the problem I don't know how to remove it. **MANUSCRIPT.TEX**               \documentclass[man]{apa}     \usepackage{graphicx}     \usepackage{rotating}     \usepackage[dutch,english]{babel}          \makeatletter       \newcommand{\rmnum}[1]{\romannumeral #1}       \newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}       \makeatother           \title{...}     \author{...}     \affiliation{...}          \abstract{...}     \acknowledgements{...}            \shorttitle{...}     \rightheader{...}     \leftheader{...}          \begin{document}       \maketitle              \section{...}              \bibliography{References}          \end{document}      **References.bib**               @ARTICLE{BergCollier1953,        author  = {Berg, I. A. and Collier, J. S.},        year    = {1953},        title   = {Personality and Group Differences in Extreme Response Sets},        journal = {Educational Psychological Measurement},        volume  = {13},        pages   = {164--169}     }          @ARTICLE{BergCollier1953,        author  = {Berg, I. A. and Collier, J. S.},        year    = {1953},        title   = {Personality and Group Differences in Extreme Response Sets},        journal = {Educational Psychological Measurement},        volume  = {13},        number  = {X},        pages   = {164--169}     }      OUTPUT > Berg, I. A., & Collier, J. S. (1953). Personality and group diﬀerences in > extreme response sets. _Educational Psychological Measurement_ , _13_ , > 164–169. > > Berg, I. A., & Collier, J. S. (1953). Personality and group diﬀerences in > extreme response sets. _Educational Psychological Measurement_ , _13_ (X), > 164–169. The extra space is added on every reference (see the X after the volume number). Normally where the **X** stands a volume number is entered, like this 10(3). When I enter this volume number the comma is place directly after the 10(3). I really hope that someone can help me! I figured out that I must change apacite.bst. However, I need to find the exact solution. **PART OF APACITE.BST**               % format journal, volume, number and pages       % call with       %   formatted.pages format.journal.vol.num.pages.check       %       FUNCTION { format.journal.vol.num.pages.check }       { "journal" journal warning.if.empty        duplicate$ empty$       journal    empty$ and       volume     empty$ and         { pop$ "" }       { "\APACjournalVolNumPages{" journal "" connect.check         "}{" *                     volume  "" connect.check         "}{" *                     number  "" connect.check         "}{" *                     swap$   "" connect.check         "}"  *       }       if$       }