title: Why do the definitions of \quad, etc. have \relax in them?

text: Plain Tex defines `\quad` so:               \def\quad{\hskip1em\relax} Why is the `\relax` there? It's usually used as a token that can't be expanded, serving as a "do nothing" operation after macro expansion is finished. But that use seems redundant, because it follows a command, namely `\hskip`. The macro is defined alongside `\enskip` and `\qquad` in plain.tex, and in Latex in `ltspace.dtx`. An idle question, but I guess the reason for it will be worth knowing.


title: How to set a box to a rubber length width

text: # Problem I'm trying to create fancy section heading using `titlesec`. I need to put the section name into a `\parbox` to have line breaks. I want the `parbox` to extend to the far right margin, but I don't know how to achieve this. # MWE               \documentclass[draft]{article}     \pagestyle{empty}     \usepackage[explicit]{titlesec}     \usepackage{xcolor,lipsum}     %% Section     \titleformat{\section}[block]%       {\normalfont\sffamily}%       {\colorbox{black}{\parbox[c][17pt][c]{30pt}{%           \hfil\color{white}\Large\thesection\hfil}}}%       {0.15cm}%       {%        \raisebox{-3pt}{\parbox{10.5cm}{\hspace*{0.7pt}\color{black}\Large\sffamily#1\\[-3.5pt]%        \color{black}\footnotesize\textbf\dotfill}}%       }     \titlespacing*{\section}       {0pt}{3.5ex plus 1ex minus .2ex}{1.3ex plus .2ex}          \begin{document}          \section{Ridiculously overly extermely long section title, that definitely spans several lines.}          \lipsum[2]          \end{document}      # Output > ![enter image description here](http://i.stack.imgur.com/ZCFFc.png)


title: convert latex formula to image using rtf2latex2e

text: i am having a tex file converted from rtf (OS: windows 8.1) using rtf2Latex2e . is ther e is any options to convert all formula,subscript ,superscript... to image because when i am trying to convert the following code a) (√784)2 it converts to a) ( \includegraphics[width=23pt, height=14pt, keepaspectratio=true]{Q1-fig022.png} )\textsuperscript{2} is there any options to convert the whole code ((√784)2) to image Thanks


title: Lyx 2.0.6, can I increase the size of the icons?

text: I am running Lyx 2.0.6 on a windows 8 machine, and even using the "Big-sized icon" option the icons in the various toolbars are too small for me to work comfortably. I have tried to resize the images of the icons (in the \image directory)n, but that changes nothing. However I cannot find where the size of the icons is specified (assuming it is accessible to users) - can anyone help please? (I know I can change the resolution of my display, but I'd rather keep it as it is). **EDIT:** I have found this file http://fossies.org/linux/misc/lyx-2.0.7.1.tar.gz/lyx-2.0.7.1/src/frontends/qt4/GuiView.cpp which is for a different version of Lyx, but it seems to hardcode the icon sizes. The relevant part is I think in lines 206-229 which I am reporting below               206 struct GuiView::GuiViewPrivate       207 {       208     GuiViewPrivate(GuiView * gv)       209         : gv_(gv), current_work_area_(0), current_main_work_area_(0),       210         layout_(0), autosave_timeout_(5000),       211         in_show_(false)       212     {       213         // hardcode here the platform specific icon size       214         smallIconSize = 16;  // scaling problems       215         normalIconSize = 20; // ok, default if iconsize.png is missing       216         bigIconSize = 26;   // better for some math icons       217        218         // if it exists, use width of iconsize.png as normal size       219         QString const dir = toqstr(addPath("images", lyxrc.icon_set));       220         FileName const fn = lyx::libFileSearch(dir, "iconsize.png");       221         if (!fn.empty()) {       222             QImage image(toqstr(fn.absFileName()));       223             if (image.width() < int(smallIconSize))       224                 normalIconSize = smallIconSize;       225             else if (image.width() > int(bigIconSize))       226                 normalIconSize = bigIconSize;       227             else       228                 normalIconSize = image.width();       229         }        I have tried playing around with iconsize.png, but the only effect is to force to the normal sized icon if I make iconsize.png too big. Is there a way to change those numbers (I would make 26 pixels the small size, and go up to 66 for Big)?


title: How to draw a simple table with colored cells in Beamer

text: I am trying to draw a simple "array" data structure in Beamer using tabular. I would like to color some of the cells blue. Here is my M(N)WE.               \documentclass{beamer}          \usepackage[table]{xcolor}     \begin{document}          \begin{frame}     \frametitle{test}          \begin{tabular}{|c|c|c|c|c|c|c|}     \hline     \cellcolor{blue!25}A&     \cellcolor{blue!25}B&     \cellcolor{blue!25}C&     B&     A&     B&     C\\     \hline     \end{tabular}     \end{frame}          \end{document}      This doesn't compile. How should it be done? The first problem is > ! LaTeX Error: Option clash for package xcolor.


title: Justified text and multicolumn size in tabularx

text: I'd like to create table with (a lot of) justified text and some multicolumns. My example is below. It works more or less... but   1. I get lots of underfull \hbox notices, which I think it's because the text is not flushedleft... how do I get rid of them? (I don't want my text flushed left}   2. I am not sure about how I did the multicolumn, I just want it to span over two columns. Is there a better way of doing it?  I saw this What is the correct way to calculate \multicolumn size when using tabularx? but the mulitcolumn does not look quite right to me. Thanks!               \documentclass[a4paper,11pt,fleqn]{book}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tabularx,calc}      \usepackage{adjustbox}      \usepackage{array}     \usepackage{multicol}%,tocbibind, ,fullpage,lastpage,framed}     \usepackage{multirow,booktabs}               \def\tabularxcolumn#1{m{#1}} %defines the X column to use m (\parbox[c]) instead of p (`parbox[t]`).          \begin{document}                    \begin{table}     \setlength{\extrarowheight}{5 pt}     \begin{center}       \begin{tabularx}{\linewidth}{  X  X  X }     \toprule     \multicolumn{1}{c}{A} & \multicolumn{1}{c}{B}  & \multicolumn{1}{c}{C} \\     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus     &     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus     &      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus\\           \multicolumn{2}{m{0.66\linewidth-2\tabcolsep}}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus} &     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus\\              \bottomrule     \end{tabularx}     \end{center}     \end{table}     \end{document}      ![enter image description here](http://i.stack.imgur.com/3fsXL.png)


title: Why is there no pdffrag package?

text: The `psfrag` package has been around for more than a decade* and is easy to use:               \usepackage{graphicx}% http://ctan.org/pkg/graphicx     \usepackage{psfrag}% http://ctan.org/pkg/psfrag     ...     \psfrag{<tag>}{<LaTeX text>}% <tag> -> <LaTeX text>     \includegraphics{image}      The drawback is the required `latex`->`dvips`->`ps2pdf` route of compilation for output to be produced in PDF format. Why is there no such easy/straight- forward counterpart for this under `pdflatex`? That is, by replacing all `psfrag` references to `pdffrag` in the above code extract. * `psfrag` version 3.04 on CTAN is dated 11 April 1998.


title: Log file not found

text: I've started working with latex a few weeks ago, and it's been working fine. When today I wanted to edit my file and suddenly I got the error: `Log file not found`. Of course I searched if this question was already answered but usually it was for people who just reinstalled Texstudio, not that it just stopped working suddenly. I hope somebody knows how to fix this?


title: Texmaker can't find my bibtex file

text: First of al I'm working with texmaker So I made a bibliography.bib file and I've put in in the same folder as my .tex files (I've tried making a .bib file by hand and with BibDesk, but neither works...) In my project.tex file I put               \documentclass[]{article}      \begin{document}     some text \cite{evocomp}     some more text     \bibliography{bibliography}      \bibliographystyle{plain}     \end{document}      And my bib file looks like this (I've only made one reference so far...):               @article{evocomp,     Author = {name},     Date-Added = {2014-04-06 17:32:05 +0000},     Date-Modified = {2014-04-06 17:34:26 +0000},     Journal = {Methods},     Pages = {39-55},     Title = {some title},     Volume = {62},     Year = {2013}}      then I compile once as Latex and then as Bibtex and this is where is goes wrong. I get the following message: bibtex: Need exactly one file argument. Try `bibtex --help' for more information. Does anyone have any idea what I'm doing wrong? For your information I'm working with OS X Mavericks (so also just tell me if latex just doesn't work at all with this...) Thank you !!! **UPDATE** my problem is solved now, there was something wrong with the bibtex command in my preferences so texmaker could'nt find my .bib file...


title: Adding Background color to Columns

text: I am using a two column article and I want to have a background color for only the columns instead of the entire page. How can I do that ? I am using the following template. I would also like to have a separate background color for the abstract part as well. ![enter image description here](http://i.stack.imgur.com/LhCR6.png) Code:From this link               \documentclass[twoside]{article}     \usepackage[sc]{mathpazo}     \usepackage[T1]{fontenc}     \linespread{1.05} % Palatino needs more space between lines     \usepackage{microtype}     \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry}     \usepackage[font=it]{caption}     \usepackage{paralist}     \usepackage{multicol}     \usepackage{lettrine}     \usepackage{lipsum}               \usepackage{abstract}         \renewcommand{\abstractnamefont}{\normalfont\bfseries}     \renewcommand{\abstracttextfont}{\normalfont\small\itshape}          \usepackage{titlesec}         \renewcommand\thesection{\Roman{section}}         \titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{}          \usepackage{fancyhdr}         \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \fancyhead[C]{Journal paper template $\bullet$ April 2012 $\bullet$ Vol. XXI, No. 1}     \fancyfoot[RO,LE]{\thepage}          \usepackage{hyperref}     \title{\vspace{-15mm}%         \fontsize{24pt}{10pt}\selectfont     \textbf{Long Titles Look More Impressive Than Short Ones}     }             \author{%     \large     \textsc{Jonathan S. Doe}\thanks{Template by \href{http://www.howtotex.com}{howtoTeX.com}} \\[2mm]     \normalsize University of Technology, Delft \\     \normalsize \href{mailto:frits@howtoTeX.com}{frits@howtoTeX.com}     \vspace{-5mm}     }     \date{}          \begin{document}     \maketitle     \thispagestyle{fancy}          \begin{abstract}     \noindent \lipsum[1]     \end{abstract}               \begin{multicols}{2}      \lipsum[1]          \section{Section title example}     \lipsum[1-2]          \section{One more section}     \lipsum[3-5]          \end{multicols}          \end{document}


title: Pgfplots: Problem in adding shape to legend

text: I am trying to put two boxes in blue and red beside the legend text in a histogram plot. I have tried several things including the one in this link. Unfortunately, the code in the link does not compile for me. I have pgf version 1.7. It is very unfortunate that the code in that link does not work for me. It looks very flexible and powerful. Here is the code I used:               \begin{tikzpicture}     \begin{axis}[         width=\figurewidth,         height=\figureheight,         scale only axis,         xmode=log,         ymode=log,         xlabel = {Velocity Divergency},         x tick label as interval=false,         xtick={},         xtickten={-18,-16,...,4},         yticklabels={$0.0001\%$, $0.001\%$, $0.01\%$, $0.1\%$, $1\%$, $10\%$, $100\%$},         xmin=1e-18, xmax=1e+4,         ymin=1e-5,ymax=1,         grid=none,         ymajorgrids,         log origin=infty,         bar shift=0pt,         % align right:         legend style={                       cells={anchor=west},                       legend pos=outer north east,         }     ]     \addplot [fill=blue!100,         ybar interval] table [x=Lower, y=Count] {     Lower Upper Count     9.9e-15 1e-14      0.1231     1e-14   1e-13      1e-15     1e-13   1e-12      0.0000     1e-12   1e-11      0.0000     1e-11   1e-10      0.0000     1e-10   1e-9       0.0000     1e-9    1e-8       0.0000     1e-8    1e-7       0.0001     1e-7    1e-6       0.0001     1e-6    1e-5       0.0004     1e-5    1e-4       0.0010     1e-4    1e-3       0.0048     1e-3    1e-2       0.0313     1e-2    1e-1       0.1562     1e-1    1e+0       0.3464     1e+0    1e+1       0.2684     1e+1    1e+2       0.0645     1e+2    1e+3       0.0036     1e+3    1e+4       1e-15     };     \addlegendentry[blue]{Interp}     \addplot [fill=red!100, ybar interval] table [x=Lower, y=Count] {     Lower Count     1e-17 1     1e-16 1     };     \addlegendentry[red]{Div-free}     \end{axis}     \end{tikzpicture}      The above code results in the following figure:![enter image description here](http://i.stack.imgur.com/BdFku.jpg) Could someone please help me add two solid rectangles beside the legend texts so that the reader easily finds the corresponding dataset, similar to the following? ![enter image description here](http://i.stack.imgur.com/9nHpG.jpg)


title: LyX not showing biblatex \printbibliography

text: So I am trying `biblatex` in the end. Here's the issue I've got so far with LyX: `\printbibliography` doesn't print the bibliography, it just shows the citations. When I test the exported code with `TexWorks`, however, it just works indeed. So what's wrong with my `LyX` setup ? I did everything the guide says on LyX wiki. Besides I've got an Undefined control sequence on `\endentry` when switching to `Biber` backend, so I am keeping the default `bibtex` backend for now. How come the exported code from LyX prints the bibliography whereas LyX built-in preview doesn't? Here's the exported code by LyX, working only outside LyX...               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{verbatim}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage[style=authoryear,natbib=true,backend=bibtex]{biblatex}     %\addbibresource{path / to /file.bib}     \bibliography{file}          \makeatother          \usepackage{babel}     \begin{document}     \cite{Binet2006[1887]}          \cite{Collins1992[1985]}          \begin{comment}     \bibliographystyle{plain}     \bibliography{file}     \end{comment}               \printbibliography     \end{document}      Many thanks


title: How to add a phantom character to the beginning of a verbatim block

text: I am trying to understand the `commandchars` of fancyverb's `Verbatim`:               \documentclass{article}     \usepackage{fancyvrb}          \begin{document}     \phantom{foo}     \begin{Verbatim}[commandchars=\\\!\!]     \phantom{bar}     trait Sys[S <: Sys[S]] {       type ID <: Ident[S#Tx]       type Tx     }     \end{Verbatim}     \end{document}      This print `bar}` in the first line of the verbatim. I have three questions:   1. Why is this printed at all if I use `\phantom`.   2. why is the closing curly brace included?   3. I cannot use `commandchars=\\\{\}` because it conflicts with the curly braces of the programming language printed. So I use `[commandchars=\\\!\!]`. However when I try to insert `\phantom!bar!` I just get the error `\FancyVerbGetLine has an extra }`. Actually all I want to achieve is to print a leading empty line which doesn't work—instead a half-height line appears. So my thought was the easiest would be to enforce the height of the first line by adding a phantom character.


title: bibtex file exported by Zotero contains bad character

text: I use biblatex with biber. My bibliography is automatically exported by Zotero. My editor is texmaker on debian. Unfortunately characters are included into the bib file latex is unable to decode. I get the Error: `! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.` How can I find the bad character, or what else can I do to prevent the problem? **Edit: My Preamble**               \documentclass[a4paper, 12pt]{scrreprt}               \usepackage[ngerman,english]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{newunicodechar,textgreek}          \usepackage{csquotes}     \usepackage{setspace}     \onehalfspacing     \usepackage{graphicx}          \usepackage{booktabs}     \usepackage{array}     \usepackage{tabularx}     \usepackage{rotating}     \usepackage[table]{xcolor}          \usepackage{biocon}              \usepackage[english]{varioref}     \usepackage[         style=authoryear,          backend=biber,         isbn=false,         doi=false,         url=false,         maxcitenames=2,         maxbibnames=7,         minbibnames=5,         uniquename=false,         uniquelist=false,         firstinits=true         ]         {biblatex}


title: do-while loop in pseudo code

text: The algorithmic package lets me make a while loop as               \begin{algorithmic}       \While{$u\neq v$}         \State Something       \EndWhile     \end{algorithmic}      which results in a               while(u is not v) do        something      end while       How can I make a do-while loop which result in               do       something     while(u is not v)      (Sorry for the lack of output. I don't know how to add that to my question. I hope the question and the intention is clear enough) I use document class memoir and packages algpseudocode and algorithm.


title: MiKTeX install fails

text: I'm trying to install Basic MiKTeX 2.9 on Windows 7 to the default location and I'm receiving the following error: ![enter image description here](http://i.stack.imgur.com/mFz7K.png) Has anyone seen this issue before? The message says > >     The operation could not operated for the following reasons: >     Windows API error 2: The system cannot find the file specified. >   >     Details: C:\Program Files\MiKTeX 2.9\tpm\packages\enctex.tpm >


title: Forcing the first choice of an newtcblisting environment

text: I have created a new environment based on "tcblisting" from package "tcolorbox" is code (MWE) is as follows:               \documentclass[10pt]{article}     \usepackage{tcolorbox}     \tcbuselibrary{listings,breakable,skins}     \tcbset{     above/.style={colback=lightgray,colbacklower=white,listing and text,center lower},%     below/.style={colback=white,colbacklower=lightgray,text and listing,center upper},%     left/.style={colback=lightgray,colbacklower=white,listing side text,valign=center},%     right/.style={colback=white,colbacklower=lightgray,text side listing,valign=center},%     frame/.style={colframe=#1},%     ratio/.style={lefthand ratio=#1},%     noframe/.style={frame hidden,arc=0mm},%     number/.style={listing options={}},%     nonumber/.style={listing options={}},%     myexample/.style={breakable,skin=bicolor,                       %above,%                       %number,%                       frame=gray,%                       title style={draw=none,fill=none}%                       }%     }%     \newtcblisting{example}[1]{myexample,#1}     \begin{document}          \begin{example}{above}     My example above in \LaTeX     \end{example}          \end{document}      I want an option "above,below,left or right" is always the first obligate,for example:               \begin{example}{above,noframe}     My example above in \LaTeX     \end{example}      is correct and               \begin{example}{noframe,above}     My example above in \LaTeX     \end{example}      Wrong. I tried with the "xstring" package but have not been successful,an idea like this:               \NewDocumentEnvironment{example}{...}{%       \IfStrEqCase{#1}{%         {% Case 1          % Case 2          % Case 3          % Case ...         }%          %         \begin{example}}% or \begin{tcblisting}{#1}}         {\end{example}} % or \end{tcblisting}      but not if it is correct, or if there is a more effective way to achieve this. Thanked beforehand (kvoptions,etoolbox maybe). Pablo


title: code-like strings with background color, and using tabular environment

text: I am going to create the following code-like strings with latex, with same background (gray), font, etc. How can I do this? ![enter image description here](http://i.stack.imgur.com/tE8or.jpg) I used `listings` package but inside               \begin{lstlisting}...\end{lstlisting}      I couldn't use tabular environment.


title: tikz: code just keeps compiling?

text: I was trying to draw arcs in tikz, and I was using code from this site               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}     \draw (0,0) arc (0:270:8mm);     \draw (0,0) arc (0:315:1.75cm and 1cm);     \filldraw[fill=cyan, draw=blue] (0,0) -- (12mm,0mm) arc (0:30:12mm) -- (0,0);     \end{tikzpicture}     \end{document}      But this does not work               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}     \draw (0,0)  arc[radius = 8mm, start angle= 0, end angle= 270]     \draw (0,0)  arc[x radius = 1.75cm, y radius = 1cm, start angle= 0, end angle= 315]     \end{tikzpicture}     \end{document}      He just keeps compiling, absorbing 100% CPU according to my Activity Monitor. Is this normal? Is it possible something hasn't been installed properly?


title: Can I store sequences in sequences with expl3

text: The documentation for `l3seq` states > LaTeX3 implements a “sequence” data type, which contain an ordered list of > entries which may contain any balanced text . but for many programming tasks it would be very handy to be able to nest data structures such as sequences. How can I work with sequences of sequences in LaTeX3?


title: Append two lists for TikZ foreach loop

text: How can I make a TikZ `foreach` loop iterate over two lists consecutively? I had hoped that in my code below, the expression `\firstlist,\secondlist` would evaluate to `2,3,5,7,1,4,6`, but it doesn't work. I have tried mild variants, like `{\firstlist,\secondlist}` and `\firstlist\secondlist`, without success.               \documentclass{article}     \usepackage{tikz}     \begin{document}          \def\firstlist{2,3,5,7}     \def\secondlist{1,4,6}          \begin{tikzpicture}      \foreach\x in \firstlist,\secondlist       \node[shape=circle,draw=black] at (\x,0) {\x};     \end{tikzpicture}          \end{document}


title: "yearmonthday" added to bibliography when using apa6 with biblatex and biber backend

text: I am trying to use the apa6 package with a more extensive version of this document:               \documentclass[man,a4paper, english]{apa6}     \usepackage{babel}          \usepackage{csquotes}     \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \begin{filecontents}{ref.bib}     @ARTICLE{bradley1990startle,       author = {Bradley, Margaret M and Cuthbert, Bruce N and Lang, Peter J},       title = {Startle reflex modification: Emotion or attention?},       journal = {Psychophysiology},       year = {1990},       month = {11},       day = {3},       volume = {27},       pages = {513--522},       number = {5},       publisher = {Wiley Online Library}     }     \end{filecontents}          \AtEveryBibitem{\clearfield{month}}     \AtEveryBibitem{\clearfield{day}}          \addbibresource{ref.bib}          \title{MWE}     \shorttitle{MWE}     \author{Me}     \affiliation{SO}          \leftheader{Me}          \begin{document}          \maketitle          Some more text before the bibliograpy and a citation \parencite{bradley1990startle} of course.          \printbibliography     \end{document}      However when compiling with latex I get this error:               ! Undefined control sequence.     <argument> \mkbibdateapalongextra                                        {year}{month}{day}\iffieldundef {endyear}{...      When I continue compiling with biber main Biber this error pops up:               INFO - No sort tailoring available for locale 'nl_NL.UTF-8'      After the last compile with pdflatex I do get output, however some strange text appears in the bibliography: ![The Bibliography with the \(yearmonthday\) text.](http://i.stack.imgur.com/aiUri.png) Following the topic (Xelatex, Biblatex: biber.exe not working properly (IPC::Run) error) I have tried to compile with `biber -f main`, which didn't help either. I also tried adding:               \AtEveryBibitem{\clearfield{month}}     \AtEveryBibitem{\clearfield{day}}      which didn't help either. I also tried filling out the day and month fields, but even if those are present the text (yearmonthday) still shows up in the bibliography. How do I get rid of that (yearmonthday) text in the bibliography? What does the error about the undefined control sequence `\mkbibdataapalongextra` mean? All files including the complete log can be found here.


title: Attribution to authors and projects in the final document?

text: Is it considered good practice to give attribution to authors or projects that have produced the different TeX-systems, document classes etc, in the final typeset document? Specific example: I have produced a report which is typeset in XeLaTeX based on a modified version of the `tufte-book` document class. Should I give attribution to the projects or authors in the colophon in the final report? The tufte-classes are have the Apache 2.0 licence, and LaTeX the LPPL licence – but both refers to the software, not the typeset material, as far as I understand them.


title: How to draw the right ascension and declination of a vector in a rotated coordinate frame in TikZ?

text: During my research I came across the illustration of two reference frames. In my opinion this illustration is lacking, because the coordinate systems are not drawn. This makes it hard to understand, for example, how right ascension and declination are measured, see below. ![Original](http://i.stack.imgur.com/1H8wA.png) (Seidelmann et. al.) To clarify this, I am trying to make a _complementary_ drawing that shows the coordinate systems, and measures alpha0 and delta0. This is what I came up with: ![My version](http://i.stack.imgur.com/d0c7N.png) Note that the orientation of the two frames is a bit different to make it easier to draw. **My main problem is that I am not able to draw the declination delta0.** (Which measures from the arc of alpha0 up to the body's north pole, in the ICRF frame.) I am trying to accomplish that using the great tikz3dplot package, see the code below!               \documentclass{article}          \usepackage{wasysym}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \usepackage{pgfplots}        % Workaround for making use of externalization possible        % -> remove hardcoded pdflatex and replace by lualatex        \usepgfplotslibrary{external}            \tikzset{external/system call={lualatex \tikzexternalcheckshellescape%             -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}          % Redefine rotation sequence for tikz3d-plot to z-y-x     \newcommand{\tdseteulerxyz}{     \renewcommand{\tdplotcalctransformrotmain}{%     %perform some trig for the Euler transformation     \tdplotsinandcos{\sinalpha}{\cosalpha}{\tdplotalpha}      \tdplotsinandcos{\sinbeta}{\cosbeta}{\tdplotbeta}     \tdplotsinandcos{\singamma}{\cosgamma}{\tdplotgamma}     %     \tdplotmult{\sasb}{\sinalpha}{\sinbeta}     \tdplotmult{\sasg}{\sinalpha}{\singamma}     \tdplotmult{\sasbsg}{\sasb}{\singamma}     %     \tdplotmult{\sacb}{\sinalpha}{\cosbeta}     \tdplotmult{\sacg}{\sinalpha}{\cosgamma}     \tdplotmult{\sasbcg}{\sasb}{\cosgamma}     %     \tdplotmult{\casb}{\cosalpha}{\sinbeta}     \tdplotmult{\cacb}{\cosalpha}{\cosbeta}     \tdplotmult{\cacg}{\cosalpha}{\cosgamma}     \tdplotmult{\casg}{\cosalpha}{\singamma}     %     \tdplotmult{\cbsg}{\cosbeta}{\singamma}     \tdplotmult{\cbcg}{\cosbeta}{\cosgamma}     %     \tdplotmult{\casbsg}{\casb}{\singamma}     \tdplotmult{\casbcg}{\casb}{\cosgamma}     %     %determine rotation matrix elements for Euler transformation     \pgfmathsetmacro{\raaeul}{\cacb}     \pgfmathsetmacro{\rabeul}{\casbsg - \sacg}     \pgfmathsetmacro{\raceul}{\sasg + \casbcg}     \pgfmathsetmacro{\rbaeul}{\sacb}     \pgfmathsetmacro{\rbbeul}{\sasbsg + \cacg}     \pgfmathsetmacro{\rbceul}{\sasbcg - \casg}     \pgfmathsetmacro{\rcaeul}{-\sinbeta}     \pgfmathsetmacro{\rcbeul}{\cbsg}     \pgfmathsetmacro{\rcceul}{\cbcg}     }     }          \tdseteulerxyz          \usepackage{siunitx}          \begin{document}     % Set the plot display orientation     % Syntax: \tdplotsetdisplay{\theta_d}{\phi_d}     \tdplotsetmaincoords{60}{110}          % Start tikz picture, and use the tdplot_main_coords style to implement the display      % coordinate transformation provided by 3dplot.     \begin{tikzpicture}[scale=5,tdplot_main_coords]          % Set origin of main (body) coordinate system     \coordinate (O) at (0,0,0);          % Draw main coordinate system     \draw[red, thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{};     \draw[red, thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{};     \draw[red, thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{Body's north pole ($\alpha_0$, $\delta_0$)};           % Draw body's equator     \tdplotdrawarc[red,]{(O)}{1}{0}{360}{anchor=east}{}     % Manually fine-tune position of label     \node[tdplot_main_coords,anchor=south] at (-0.1,1.3,0){\color{red} Body's equator};          % Draw the prime meridian     \tdplotsetthetaplanecoords{60}     \tdplotdrawarc[densely dashed, tdplot_rotated_coords]{(O)}{1}{0}{90}{anchor=north west}{}     % Fine-tune position of label     \node[tdplot_main_coords, rotate=-65] at (0,0.5,0.3){Prime meridian};               % Rotate coordinate system to create ICRF      % Use and angles in z-y-x rotation sequence     % Syntax: \tdplotsetrotatedcoords{\alpha}{\beta}{\gamma}     \tdplotsetrotatedcoords{-60}{-25}{-15}          % Translate the rotated coordinate system (NOT NEEDED HERE)     % Syntax: \tdplotsetrotatedcoordsorigin{point}     \tdplotsetrotatedcoordsorigin{(O)}          % Use the tdplot_rotated_coords style to work in the rotated, translated coordinate frame     % Draw the coordinate axes     \draw[thick,tdplot_rotated_coords,->, blue] (0,0,0) -- (1,0,0) node[anchor=south west]{\vernal};     \draw[thick,tdplot_rotated_coords,->, blue] (0,0,0) -- (0,1,0) node[anchor=west]{};     \draw[thick,tdplot_rotated_coords,->, blue] (0,0,0) -- (0,0,1) node[anchor=west]{ICRF north pole};          % Draw the ICRF Equator     \tdplotdrawarc[tdplot_rotated_coords,color=blue]{(O)}{1}{0}{360}{anchor=south         west,color=black}{}     % Manually fine-tune label     \node[tdplot_main_coords,anchor=south] at (0.3,1.33,0){\color{blue} ICRF equator};          % Draw alpha (right ascension), delta (declination) in ICRF     % Get coordinates of body's north-pole in ICRF frame     \tdplottransformmainrot{0}{0}{1}     % This returns     % \tdplotresx     % \tdplotresy     % \tdplotresz     % Get polar coordinates of this vector     \tdplotgetpolarcoords{\tdplotresx}{\tdplotresy}{\tdplotresz}     % This returns     % \tdplotrestheta     % \tdplotresphi               % Draw the right ascension     \tdplotdrawarc[tdplot_rotated_coords, color=magenta, line        width=2pt]{(O)}{1}{0}{\tdplotresphi}{anchor=west}{$\alpha_0$}          % Draw the declination     % THIS GOES WRONG AND DOES NOT WORK     % Should go from end of alpha0 arc to the body's north pole in the ICRF frame     % \tdplotsetrotatedthetaplanecoords{\tdplotresphi}     % \tdplotdrawarc[tdplot_rotated_coords, color=red]{(O)}{1}{0}{90-\tdplotrestheta}{anchor=south     %     west,color=black}{\textcolor{blue}{x}}          % Coordinate output for debugging     \node[tdplot_main_coords,anchor=south] at (1,1,2){Main coords: \tdplotrestheta,     \tdplotresphi, \tdplotresx, \tdplotresy, \tdplotresz};          \end{tikzpicture}          \end{document}      (Bonus)   I also have a hard time making arcs such as the 90+alpha0 shown in the figure, or letting the text "prime meridian follow the curvature. Any stylistic help would be greatly appreciated as well. * * * Seidelmann, P. Kenneth et. al. _Report of the IAU/IAG Working Group on cartographic coordinates and rotational elements: 2006_. Celestial Mech Dyn Astr (2007) 98:155–180


title: Listing package only outputs black colored source code even though the language parameter is specified

text: The problem is pretty much in the title. With this code:               \documentclass{report}         \usepackage{listings}         \begin{document}       \lstset{language=Python}     \begin{lstlisting}     def some_function(parameter):         a_random_number = parameter - 10         print "some random string" + str(a_random_number)          if __name__ == '__main__'         print 'Hello Latex Listings package'         some_function(20)     \end{lstlisting}     \end{document}      I am getting no color whatsoever, just some bolded keywords: ![enter image description here](http://i.stack.imgur.com/V17Au.png) Any idea why this might be and how to fix it? Thank you.


title: Can't get a new line in my table caption

text: (Below) is what I have, with some data shaved off. However, when I view my PDF the caption looks like:               Table1::NGC 2264...      I would like it as:                Table1     NGC 2264      (centered of course) I've been looking around and I can't really find anything that works. I'm hoping someone can show me what to do. And on the table pages 2 and beyond my captions aren't centered, they're left justified. I'm not sure what to do about that either.               %%     %% Begining of file `table.tex'          \documentclass[10pt,fullpage]{aastex}     \usepackage{longtable}     \usepackage{pdflscape}     \begin{document}     \begin{landscape}     \centering%     \renewcommand{\arraystretch}{0.7}%          \begin{center}     \begin{longtable}{c c c c c c c c c c c}          %Header for the first page of the table...     \caption{NGC2264 Protostars}\\     \hline \hline \\ [-.8ex]         Name &          RA &          DEC &                            Mean I1 &          Mean I2 &          Alpha K2 &          Class &          Alpha K8 &          Av &          Avg Av\\ [0.5ex] \hline         \\ [-.8ex]     \endfirsthead          %Header for the rest of the table's pages...     \multicolumn{1}{c}{{\tablename} \thetable{} -- Continued} \\ [0.5ex]         \hline \hline \\ [-.8ex]         Name &          RA &         DEC &          Mean I1 &          Mean I2 &          Alpha K2 &          Class &          Alpha K8 &          Av &          Avg Av\\ [-0.5ex] \hline         \\ [-.8ex]     \endhead     \\\hline     \endfoot          %Begin data...         Mon-000101 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39  & I     & 0.39  & 31.1  & 31.1 \\         Mon-000171 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45  & I     & 0.45  & 33.7  & 33.7 \\         Mon-000174 & 100.27621 & 9.563802 & 11.605 & 10.134 & 0.95  & I     & 1.29  & 30.8  & 30.8 \\         Mon-000191 & 100.28709 & 9.495832 & 9.231 & 8.105 & 1     & I     & 1.01  & 0     & 0 \\         Mon-000323 & 100.25761 & 9.576176 & 9.385 & 8.513 & 0.31  & I     & 0.04  & 16.8  & 16.8 \\         Mon-000382 & 100.27496 & 9.569871 & 12.899 & -100  & 0.93  & I     & 0.93  & 33.8  & 33.8 \\         Mon-000391 & 100.28869 & 9.50715 & 10.44 & 8.974 & 1.32  & I     & 2.45  & 0     & 0 \\         Mon-000392 & 100.186 & 9.800595 & 7.598 & -100  & 0.55  & I     & 0.81  & 7.6   & 7.6 \\         Mon-000399 & 100.25794 & 9.877631 & 12.732 & 12.579 & 0.94  & I     & -1.13 & 9.8   & 9.8 \\         Mon-000402 & 100.27347 & 9.595702 & 11.707 & 10.519 & 0.58  & I     & 0.59  & 20.9  & 20.9 \\         Mon-000411 & 100.23458 & 9.571638 & 12.752 & 11.39 & 0.43  & I     & -0.09 & 16.8  & 16.8 \\         Mon-000454 & 100.26513 & 9.601277 & 11.146 & 10.662 & 1.25  & I     & 1.25  & 24.9  & 24.9 \\         Mon-000466 & 100.31544 & 9.464637 & 11.265 & 9.906 & 0.69  & I     & 1.65  & 23.6  & 23.6 \\         Mon-000495 & 100.28751 & 9.407105 & 10.69 & 9.637 & 0.42  & I     & 1.04  & 23.9  & 23.9 \\         Mon-000569 & 100.3025 & 9.484669 & -100  & -100  & 0.7   & I     & 0.7   & 16.7  & 16.7 \\         Mon-000704 & 100.28223 & 9.487126 & 12.963 & 12.146 & 0.6   & I     & 0.6   & 29.5  & 29.5 \\         Mon-000708 & 100.26408 & 9.601333 & 11.185 & 10.86 & 1.11  & I     & 1.2   & 24.9  & 24.9 \\         Mon-000741 & 100.26563 & 9.600305 & 11.315 & 10.747 & 0.58  & I     & 0.58  & 24.9  & 24.9 \\         Mon-146053 & 100.23425 & 9.571719 & 12.765 & 11.39 & 1.11  & I     & 1.04  & 16.8  & 16.8 \\         \hline     %End data.          \end{longtable}     \end{center}     \end{landscape}          \end{document}     %%     %% End of file `table.tex'.


title: floatrow - remove whitespace beneath figure

text: I have a page layout with exactly 40 text lines and some small pictures to distribute throughout the text. When I arrange 2 pictures at the page bottom in a row via `floatrow` and specify their height as a multiple of lines, I see some extra whitespace below. By coincidence (or not) its height is 2*baseline. How can I chop it off? I need the pics to stick exactly at the bottom of the page, there will be no captions or another picture-related text. MWE:               \documentclass[fontsize=11pt,russian,open=any]{scrbook}      \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage{fancyhdr}      \usepackage[paperwidth=14.8cm, paperheight=21.0cm, top=1.1cm, bottom=1.8cm, twoside, inner=0.9cm, outer=1.8cm, bindingoffset=0.5cm, footskip=1cm, headsep=0cm, headheight=0cm, voffset=0cm, hoffset=0cm, marginparsep=0cm, marginparwidth=0cm]{geometry}     \usepackage[demo]{graphicx}     \usepackage{microtype}     \usepackage{caption}      \usepackage{floatpag}      \usepackage[leadingfraction=1.0]{savetrees}     \usepackage{showframe}     \usepackage{floatrow}          \renewcommand{\baselinestretch}{0.95}          \raggedbottom          \setlength{\intextsep}{0pt}     \setlength{\textfloatsep}{0pt}     \setlength{\belowcaptionskip}{0pt}     \setlength{\abovecaptionskip}{0pt}          \captionsetup[figure]{labelformat=empty}          \pagestyle{fancy}     \fancyhf{}      \fancyfoot[EC,OC]{\thepage}     \renewcommand{\headrulewidth}{0pt}           \begin{document}          могилку-то рыть не придётся, земелькой сверху присыплють~--- и всё тебе тут...          --- Тьфу, типун тебе на язык, боярин Порфирий!          \begin{figure}[b]     \centering     \begin{floatrow}     \ffigbox[\FBwidth]{\caption{}\label{}}{%     \includegraphics[height=17\baselineskip, width=3cm]{dummy}     }     \hspace{3cm}     \ffigbox[\FBwidth]{\caption{}\label{}}{%     \includegraphics[height=17\baselineskip, width=3cm]{dummy}     }     \end{floatrow}     \end{figure}          --- А ты чего думала, боярыня Варвара, что тебя сюда для остраст\-ки посадили, чтобы ты вдругорядь сплетни по городу не разносила?          --- Это кто сплетни разносит, глаза твои бесстыжие? Да ты на жёнушку свою разлюбезную погляди! Это не их ли с боярыней Серапеей за глаза сороками называют? А за какие бы это такие добродетели-то, а? Да я по сравнению с ними...          --- Да ты на мою жену шибко-то не наговаривай!..          --- Ты на себя погляди, боярыня Варвара, чего ты на нас-то...          --- Это я-то на себя глядеть должна...          --- Любопытной Варваре...          --- Ларишка, Ларишка, што они говорят, ашь?..          --- Боярыне Варваре, говорят, нос оторвали!          --- Это Антипкиной-то Варваре оторвали?!          --- Нет, боярина Абросима жене!          --- Ашь?.. Какого боярина жена брошила?..          --- Не бросила! А Абросима!!!          --- Што ты орёшь, глухая я, што ли? Ты шама определишь, што говоришь~--- то брошила, то не брошила, а потом ори на бабушку-то!          --- Я не глухая, Ларишка! Я прошто плохо шлышу!          --- Зато болтаешь хорошо, матушка!          --- А вы, боярин Никодим, на мою бабушку-то не кричите, на свою кричите!          --- А ты, девка, мала ещё мне указывать!..          --- Зато наш род от самого Синеуса идёт!          --- А ты чего думала, боярыня Варвара, что тебя сюда для остраст\-ки посадили, чтобы ты вдругорядь сплетни по городу не разносила?          --- Это кто сплетни разносит, глаза твои бесстыжие? Да ты на жёнушку свою разлюбезную погляди! Это не их ли с боярыней Серапеей за глаза сороками называют? А за какие бы это такие добродетели-то, а? Да я по сравнению с ними...          --- Да ты на мою жену шибко-то не наговаривай!..          --- Ты на себя погляди, боярыня Варвара, чего ты на нас-то...          --- Это я-то на себя глядеть должна...          --- Любопытной Варваре...          --- Ларишка, Ларишка, што они говорят, ашь?..          --- Боярыне Варваре, говорят, нос оторвали!          --- Это Антипкиной-то Варваре оторвали?!          --- Нет, боярина Абросима жене!          --- Ашь?.. Какого боярина жена брошила?..          --- Не бросила! А Абросима!!!          --- Што ты орёшь, глухая я, што ли? Ты шама определишь, што говоришь~--- то брошила, то не брошила, а потом ори на бабушку-то!          --- Да что ли я на \emph{вас}, бабушка, ору~--- я же ору оттого, что вы глухая, как пень, аж перед людями неудобно!          --- Я не глухая, Ларишка! Я прошто плохо шлышу!          --- Зато болтаешь хорошо, матушка!          --- А вы, боярин Никодим, на мою бабушку-то не кричите, на свою кричите!          --- А ты, девка, мала ещё мне указывать!..          --- Зато наш род от самого Синеуса идёт!          --- А ты чего думала, боярыня Варвара, что тебя сюда для остраст\-ки посадили, чтобы ты вдругорядь сплетни по городу не разносила?          --- Это кто сплетни разносит, глаза твои бесстыжие? Да ты на жёнушку свою разлюбезную погляди! Это не их ли с боярыней Серапеей за глаза сороками называют? А за какие бы это такие добродетели-то, а? Да я по сравнению с ними...          --- Да ты на мою жену шибко-то не наговаривай!..          --- Ты на себя погляди, боярыня Варвара, чего ты на нас-то...          \end{document}


title: Axiom 1 and 1' in LyX

text: I'm using LyX with "Theorems (AMS, numbered by type)" and "Theorems (AMS- extended, numbered by type)" modules. I would like to have the following output: Axiom 1. Lorem. Axiom 1'. Ipsum. Is there a way to do this using LyX modules + ERT? In this link (Custom enumeration for axioms or hypothesis), someone made this in pure TeX. Since I'm a begginer, I don't know how to use this to solve my problem. Maybe the solution is to edit LyX's theorem module file, but I have no idea how to do this. In this other link (How to make "claim" environments look like "theorem" environment?) there's an example of editing LyX module files to get what you want.


title: Best practices for referencing

text: I write a text with a lot of references (`\ref{...}`). They are predictably showing as a numbers of the same height as the text. `<phrase>\ref{label}` will looks like '< phrase > 13' with '13' as a hyperlink (I use `hyperref` and compile into PDF). But am I right in doing this? Should I enclose `\ref` into `\textsuperscript`, so number will not be fused visually with phrase? What are the best practices for references in the typographical sense?


title: "Argument of \pgfmath@@onquick has an extra }" when using pgfmathsetmacro or pgfmathtruncatemacro with &&-operator inside tabular

text: When I run the following code...               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tabular}{c}     \pgfmathsetmacro\foo{(2<3) && (3<4)}     \foo     \end{tabular}     \end{document}      I get > ERROR: Argument of \pgfmath@@onquick has an extra }. If I use `\pgfmathtruncatemacro`, I get the same error. However:   * If I delete the `tabular` environment, it works fine.   * If I replace the operation with `and((2<3),(3<4))`, it works fine.   * If I use `\pgfmathparse...\pgfmathresult`, it works fine. Is there a fix for this? Clearly the problem is that `tabular` is somehow reading `&` as a row separator. (Currently, I use `and` instead of `&&` in all my `pgfmath` code, for fear that my macros might be eventually put inside a `tabular`.)


title: Footnotes in REVTeX after `\onecolumngrid`

text: I have a two-column paper that uses `revtex4-1` class, which is followed by a single-column supplementary material. I use `\onecolumngrid` to switch to the single-column mode, but unfortunately this seems to have no effect on footnotes -- they still appear in two columns in the supplementary material. The footnote placement seems to be completely determined by the `twocolumn` / `onecolumn` class option. Is there any way to get around this and start a new page where text as well as footnotes are reset to a single column? Here is a simple example that illustrates the problem:               \documentclass[twocolumn,nofootinbib]{revtex4-1}          \begin{document}     \title{Paper}     \begin{abstract}     Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract. Abstract.      \end{abstract}     \maketitle     Some text in two columns. Some text in two columns. Some text in two columns. Some text in two columns. Some text in two columns. Some text in two columns. Some text in two columns. Some text in two columns.     \onecolumngrid     \newpage     Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column. Some text in a single column.%     \footnote{This is a footnote that is several lines long. One two three four five six seven eight nine ten.}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yg8Ly.png)


title: What is the 0 for?

text: I have to following code from examples which seems to work as I need. I have been reading about literate and can fix my long lines but would like to understand why the '0'. Can't seem to make sense of syntax.               literate={\#}}{0\discretionary{\#}{}{}},      In the following example, the code will only compile if the zero '0' is included before the `\discretionary` call. It not obvious in my very limited knowledge but curious as to why it is needed? The setup of the 'literate' key does only compile if I uncomment the line above to it. The error message is: > >     ! Missing number, treated as zero. >     <to be read again> >     \discretionary >     A number should have been here; I inserted '0'. >     (If you can't figure out why I needed to see a number, >     look up `weird error' in the index to The TeXbook.) >     ! Missing number, treated as zero. >   Here's a sample document:               \documentclass[10pt]{article}      \usepackage{listings}      \begin{document}      \lstset{      breakatwhitespace=true,     %literate={\#}{}{0\discretionary{\#}{}{}},      literate={\#}{}{\discretionary{\#}{}{}} % not working      }       \begin{lstlisting}               #####################################################################################################################################################33           \end{lstlisting}      \end{document}


title: Python code in LaTeX not running

text: I managed, thankfully with your help, to run python code in LaTeX. Unfortunately the code below is not running (simple commands like `print "hi"` are running). Could anybody tell me, what the problem might be? I am using a Mac.               % !TEX program = XeLaTeX+shell-escape     \documentclass{article}     \usepackage{grffile}     % Support for PDF inclusion     \usepackage[final]{pdfpages}     \usepackage{hyperref}     \usepackage{python}          \begin{document}          \tableofcontents     \clearpage               \begin{python}%     import os     from Tkinter import Tk     from tkFileDialog import askdirectory          Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing          # show an "Open" dialog box and return the path to the selected file     Liederpfad = askdirectory(title="Bitte Liedverzeichnis waehlen:")           # get filenames from path     v5 = os.listdir(Liederpfad)          # remove "symlink" if there     for name in v5:         if name.endswith("symlink"):             os.rename(Liederpfad + "/" + name, Liederpfad + "/" + name[:-8])          # write latex code     for x in v5:         if not x.startswith("."): #versteckte Systemdateien ausblenden             print "\phantomsection"             if x.endswith("symlink"):                 print "\\addcontentsline{toc}{section}{" + x[:-12] + "}"             else:                 print "\\addcontentsline{toc}{section}{" + x[:-4] + "}"             print "\includepdf[fitpaper=true]{" + Liederpfad + "/" + x + "}"             print ""     \end{python}%          \end{document}      I tried as well a smaller program which is not running as well (I was not sure if there where some special characters in the code which might have caused the problem...               % !TEX program = XeLaTeX+shell-escape     \documentclass{article}     \usepackage{python}          \begin{document}          \begin{python}%     import os     v2 = os.path.abspath(".")     v4 = os.listdir(v2)     for name in v4:         print name     \end{python}%          \end{document}      This was the result of the code above in Python:               .DS_Store     1.pdf     latex.py     lieder     Liederbuch.aux     Liederbuch.log     Liederbuch.out     Liederbuch.pdf     Liederbuch.py     Liederbuch.py.err     Liederbuch.py.out     Liederbuch.tex     Liederbuch.toc     pyth.py     Songbuk.py     test.py      Hope anybody can help me.


title: Enumeration problem redefining `enumerate` enivironment

text: I would like to redefine the `enumerate` environment with an optional argument. Basically I want to redefine `\theenumi` so that each time I label an item and call it with `\ref` I get the real label printed, and not just the (arabic) value of counter `enumi`. I tried with the code below, and it works except for the fact it always adds an extra point (`.`) to each label. When I call it with `\ref` it prints the correct label though. Here is a MWE of what I tried:               \documentclass{book}     \usepackage{enumerate}     %%     %%     \let\oldenumerate\enumerate     \let\endoldenumerate\endenumerate     \renewenvironment{enumerate}[1][\arabic{enumi}.]% Defaults to 1. 2. 3. ...     {%         \bgroup\renewcommand\theenumi{#1}%         \oldenumerate%     }%     {%         \endoldenumerate\egroup%     }%     \begin{document}     First list with default enumeration     \begin{enumerate}     \item First item     \item Second item     \end{enumerate}     Second list with custom enumeration     \begin{enumerate}[(\emph{\roman{enumi}})]     \item First item     \item Second item     \end{enumerate}     Labels have an extra dot in the lists, but references \ref{a} and \ref{b} are printed correctly.     \end{document}      and this is the output of the above code: ![Output of the above MWE](http://i.stack.imgur.com/FE7VC.png) How should I redefine `enumerate` in order to avoid the extra dot in the lists?


title: Minipage footnote is inside tikZ node

text: I have a minipage, and inside of it I have a footnote and a tikZ picture. Now my problem is, that the footnote text goes inside the last node of my tikZ picture. That is not what I want – and it's very weird actually. ## Code and output               \documentclass{article}          \usepackage{tikz,lipsum}          \begin{document}          \begin{minipage}{\textwidth}     \lipsum[1]\footnote{a footnote}% I cannot use \footnotemark etc         \begin{tikzpicture}[overlay, remember picture]% I need these two options             \draw[ultra thick, black] (0,0) -- node[sloped,below,text width=12cm,text centered]     {\lipsum[4]} (11,-3);% the text has to have a maximal width         \end{tikzpicture}     \end{minipage}          \end{document}      ![Screenshot](http://i.stack.imgur.com/KZvfc.png) ## First workaround When I remove the `text width = 12cm` completely, the footnote moves back under the end of the text: ![Screenshot after workaround](http://i.stack.imgur.com/rwKV3.png) But I need the text to have a maximal width. So this is not very satisfying. Any ideas?


title: Concatenate macro name \foo + bar ==> \foobar

text: If in a command `\foo` is one of my arguments, e.g. `#1` how can I do a `\def` for `\foobar`, i.e., define a command with `bar` added to `#1`? Specifically I try the following               \documentclass{scrbook}     \usepackage[refpage,noprefix]{nomencl}     \makeatletter     \newcommand*{\defsym}[3][]{\def#2{%       \ifx\protect\@unexpandable@protect         #3%       \else         \nomenclature{$#3$}{#1}\gdef#2{#3}#3%       \fi} %       %\def#2FwD{#3} % <-- this does not work     }     \makeatother     \usepackage{amsmath,amsfonts,amssymb}     \defsym{\Rn}{\mathbb{R}^n}          \makenomenclature     \begin{document}          $\Rn$ will be introduced later ...     %$\RnFwD$ will be introduced later ...          \clearpage          $\Rn$ is defined as ...          \printnomenclature     \end{document}      This uses List of symbols/abbreviations and macros to automatically put a symbol (here \Rn) in the Nomenclature (List of Symbols) on its first use. This works nicely for more, but now I got the rare ocasion that I want to make a first use of symbol that should not yet be recorded in the nomenclature. To this end I want to introduce a command `\xFwd` for every command `\x` declared by `\defsym`. I tried this above, but when I uncomment that line I get the error `Use of \Rn doesn't match its definition.` which I think is due to the question that I posed first.


title: Enumerating nested item with skips

text: I need to do some nested numbering of items, but with skips. I can skip outer numbering, but similar method is not working with inner numbering. I have the code below, where the numbering starts from 2, as desired, but the inner numbering does not start from (e). How would I go about achieving this.               \begin{enumerate}         \setcounter{enumi}{1}         \item         \begin{enumerate}             \setcounter{enumi}{4}                    \item My answer to 2e.         \end{enumerate}     \end{enumerate}      **Note** : _The need for doing this arises for a redo of some homework questions_.


title: How do I break a line without breaking a column?

text: I would like to have a forced line break without having a break in a column, similar to how the //* gives a line break while preventing the page from breaking. Specifically, I would like to be able to do this within the multicol environment. Does anyone know how to do this? Here is a MWE.               \documentclass{article}     \usepackage{multicol}     \usepackage[top=5in,bottom=5in,right=.5in,left=.5in]{geometry}          \begin{document}     \begin{multicols}{2}     \noindent     Line 1\\     Line 2\\     I would like to have this line 3 in the same col as line 2\\     Line 4     \end{multicols}     \end{document}      EDIT: This would be used for a "living" document. Basically, I would want to be able to put this "line break" command anywhere that I would want a line break, and have TeX "know" not to break a column where this command falls, but instead, to extend the length of the column further, perhaps even into the margin at the end. Does anyone know how to do this?


title: Insert newline if this line is the last one before a new page

text: I have this simple Idea: I want to have LaTeX keep count of the number of text-parts (which already works fine):               \newcommand{\newpart}{         \bigskip         \begin{center}                 \arabic{partscounter}.         \end{center}         \stepcounter{partscounter}     }      I want to do this with it:               \newpart     Long Text Number 1     \newpart     Long Text Number 2     ...      Between those 2 texts it should say the number of the 2 texts, e.g.:               1.     Long Text Number 1     2.     Long Text Number 2      As said, this works. But now I came across a problem: Sometimes, the text is so long that it will go to the next page. And sometimes, only one line was on the previous page, in these cases, I have:               2.      ------------- % New Page!     Long Text 2      where the `partcounter` is the last line of a page. I don't want this behaviour to occur. If the number printed by `\newpart` is the last line, I want to skip that line and have it like this:               1.     Long Text 2     ------------- % New Page!          2.      Long Text 2      Is that possible?


title: A leading zero in the enumerate environment

text: I need to make my Enumerate look like this: > REQ/Text/001   >  REQ/Text/002   >  ... What i can do is this: > REQ/Text/1   >  ... But how can i add leading Zeros? I tried the answer in: Enumerate list - numbers with prefix but it doesnt work. It brings me something like: > REQ/Text/1!100 01!10 001 but the exclamation mark is turned around.   Sorry for my bad English, im from Germany. Thanks. Edit: A minimal Code example is:                   \documentclass[12pt, a4paper]{article}              \usepackage{german,epsfig,longtable,graphicx,fullpage,float}%              \usepackage[ansinew]{inputenc} % Umlaute (Windows)              \usepackage{enumitem}              \def\threedigits#1{%          \ifnum#1<100 0\fi          \ifnum#1<10 0\fi          \number#1}              \begin{document}              \begin{enumerate}[label=\textbf{RQ/Gru/\threedigits{\theenumi}}, leftmargin = *]             \item \label{anfo:norm:S1}                   \item \label{anfo:norm:S2}                   \item \label{anfo:norm:S3}                   \item \label{anfo:norm:S4}         \end{enumerate}              \end{document}      This minimal example produces the Error. Error Messages are: Missing number, threated as zero Missing = inserted for \ifnum


title: Fixed position for pgfplot area

text: I use pgfplots to generate graphics for a beamer presentation. The graphics are placed on consecutive slides. This works great, but the graphic position is slightly moving from slide to slide, which looks unprofessional. This comes from the `xticklabels` which shifts the picture up and down in my case. Is there a way to force the graphic area to be at the same place on each beamer slide ? Maybe by adding a margin around the graphic area ? ![enter image description here](http://i.stack.imgur.com/SQbjt.gif) I used the workaround of creating two overlapping axes, one of them with opacity=0 to fix the position but this isn't an elegant way. Here is a minimal example :               \documentclass{beamer}     \usepackage{pgfplots}     \setbeamertemplate{navigation symbols}{}     \begin{document}          \begin{frame}{Slide 1}     \begin{tikzpicture}[trim axis left, trim axis right]     \begin{axis}     \addplot coordinates {(0,1) (1,1)};     \end{axis}     \end{tikzpicture}     \end{frame}          \begin{frame}{Slide 2}     \begin{tikzpicture}[trim axis left, trim axis right]     \begin{axis}     \addplot coordinates {(0,1) (1,2)};     \end{axis}     \end{tikzpicture}     \end{frame}          \begin{frame}{Slide 3}     \begin{tikzpicture}[trim axis left, trim axis right]     \begin{axis}     \addplot coordinates {(0,1) (1,3)};     \end{axis}     \end{tikzpicture}     \end{frame}          \end{document}


title: Math symbol question: Vertical bar for ''evaluated at ...''

text: How do I insert the line "|" after the equation in LaTeX (see image below)? I'm using LyX so if you can point me to the symbol of that line is also OK. ![enter image description here](http://i.stack.imgur.com/Tgsi2.png) I don't know if this line has a proper name so the title of this question may be very vague. If you could provide me a name, I'll edit this question's title.


title: Longtabe + multirow + page break

text: I have with longtabu and multirow. Latex does not display them properly in a page break.               \begin{longtabu}{| X[2,l] | X[2,l] | X[2,l] |}     \captionsetuptableBegin     \caption{Main Objects}     \label{tab:type_property} \\     \hline     \textbf{Object} & \textbf{Property} & \textbf{Type} \\ \hline     \endfirsthead     \captionsetuptableExtention     \caption[]{}\\     \hline     \textbf{Object} & \textbf{Property} & \textbf{Type} \\ \hline     \endhead     &&\\     \endfoot     \endlastfoot     \multirow{3}{*}{Cash} & name & text \\*     \hhline{~--}     & x & float \\*     \hhline{~--}     & y & float \\     \hhline{---}     \multirow{6}{*}{Client} & name & text \\*     \hhline{~--}     & x & float \\*     \hhline{~--}     & y & float \\*     \hhline{~--}     & priority & float \\*     \hhline{~--}     & absolute priority & float \\     \hhline{---}     \multirow{4}{*}{Manager} & name & text \\*     \hhline{~--}     & method & text \\*     \hhline{~--}     & units & text \\*     \hhline{~--}     & data array & array \\     \hhline{---}     \end{longtabu}


title: Drawing an altitude in a triangle and labeling its foot

text: I have provided the code for a triangle is to be drawn on the Cartesian plane. The point at the origin is labeled O, and the other points are labeled A and B. The altitude of the triangle is to be drawn as a dashed line segment from O to line segment AB, the foot of the altitude is to be labeled P, and the height is to be labeled x. The lengths of the sides are to be labeled a, b, and c. I have the angles drawn and labeled. One of the angles does not meet a leg of the triangle. What is wrong with the code? The placement of "alpha" and "beta" is wrong. Why are these labels not place outside of the angles. (These commands are copied from another file from which the labels are appropriately place.)               \documentclass[10pt]{amsart}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{mathtools,array}     \usepackage{tikz}     \usetikzlibrary{calc}          \tikzset{     mydot/.style={       fill,       circle,       inner sep=1.5pt       }     }          \begin{document}          \begin{tikzpicture}[>=latex]               % the coordinates of the vertices     \coordinate (O) at (0,0);     \coordinate (A) at (122:4cm);     \coordinate (B) at (20:3cm);          % the axis     \draw[help lines,->] (-3.5,0) -- (2.5,0);     \draw[help lines,->] (0,-0.5) -- (0,5.5);          % the edges of the triangle     \draw (O) -- (A) -- (B) -- cycle;          % labelling the vertices     \node[mydot,label={left:$A$}] at (A) {};     \node[mydot,label={right:$B$}] at (B) {};     \node[mydot,label={below left:$O$}] at (O) {};          \draw ($(A)!(O)!(B)$);          % the arcs for the angles     \begin{scope}[gray]     \draw[->]       (0.75,0) +(0:0.5cm) arc [radius=1cm,start angle=0,end angle=20] node[midway,right] {$\beta$};     \draw[->]       (0.5,0) +(0:0.25cm) arc [radius=0.75cm,start angle=0,end angle=122] node[midway,above] {$\alpha$};     \end{scope}          \end{tikzpicture}          \end{document}


title: Short toc : tight option not working

text: I'm using the package shorttoc to get a summary at the begining of my document (the toc is at the end). For the document is very long (a thesis) I want to reduce the vertical space between the items in the summary. Though the "tight" option is done for that kind of use, it's not working for me : the vertical space is still the same... Here his a minimal code :               \documentclass[a4paper,12pt]{book}      \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[francais]{babel}     \usepackage[tight]{shorttoc}          \begin{document}     \shorttoc{Summary}{0}          \part{a part}     \chapter{a chapter}     \section{a section}     \section{anoter section}     \chapter{another chapter}          \tableofcontents          \end{document}      The result is exactly the same as with the command \usepackage[loose]{shorttoc} ! Any idea to correct this ?


title: hyperref line break problem

text: I am using `xelatex` and I have the following warnings:               !!!** WARNING ** Annotation out of page boundary.!!!     !!!** WARNING ** Current page's MediaBox: [0 0 597.6 842.4]!!!     !!!** WARNING ** Annotation: [303.194 712.675 612.035 728.575]!!!     !!!** WARNING ** Maybe incorrect paper size specified.!!!      )      All answers that I have found in the Internet don't work for me. They does not change anything, provide errors. I have discovered that when I remove               \setmainfont{Times New Roman}      this problem dissapears.               \documentclass[a4paper, 12pt]{article}     \special{papersize=8.3in,11.7in}          \usepackage[top=0.5in, bottom=1.0in, left=0.8in, right=0.8in, includehead, includefoot]{geometry}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{enumitem}        % configure lists          \usepackage{fontspec}     \usepackage{amsfonts}          \usepackage{mathtools}     \usepackage{amsmath}     \usepackage{commath}        % \dif sign     \usepackage{array}          \usepackage[breaklinks=true]{hyperref}          \setmainfont{Times New Roman}          \begin{document}          \section{Implementation and results}     \label{sec:implementation_and_results}     % Implementation and results {{{     % -----------------------------------------------------------------------------     The implementation is one-dimensional Euler equations simulation using Roe     solver written in C++.     The code is located in a public git \cite{Git} repository, url:     \url{https://bitbucket.org/WscriChy/1d-euler-equations/}.     Compilation prerequisites and instructions could be found in the     \textit{``ReadMe.md''} file.          OpenCl \cite{OpenCl} is used for the problem computations. Changes to the     solver as well as boundary conditions and initialization data could be applied     without recompilation of the application by modifying \textit{``Kernel.cl''},     which is an OpenCl file.          The boundary conditions are \textit{solid walls} that the fluid reflects at     this boundaries in a particular way,     %     \begin{align}       p_{0} &= p_{1}, \nonumber \\       {\rho}_{0} &= {\rho}_{1}, \\       u_{0} &= -u_{1} \nonumber     \end{align}     %     for the left boundary. The same approach is applied for the right one.                    % References {{{     % -----------------------------------------------------------------------------     \begin{thebibliography}{100}       \bibitem{LeVeque} R.J. LeVeque, \emph{Finite Volume Methods for Hyperbolic         Problems}, vol. 31, Cambridge University Press, 2002.       \bibitem{Anderson} John D. Anderson, Jr., \emph{Computational Fluid Dynamics,         The basics with applications}, 1995.       \bibitem{Git} \emph{Git manual page}, URL: \url{http://gitmanual.org/}.       \bibitem{OpenCl} \emph{The open standard for parallel programming of       heterogeneous systems}, URL: \url{http://www.khronos.org/opencl/}.     \end{thebibliography}     % -----------------------------------------------------------------------------     % References }}}               \end{document}      Result


title: Including spotcolors in a DVI file

text: Consider, the PDF is generated using `dvi`-`ps`-`pdf`. Is there an easy way to add spotcolor in a `dvi` file, so that the resulting PDF contains the spotcolor. I know that using `pdflatex` this is possible. Is this possible using `dvips` driver too?


title: How do I get a blank column?

text: I'm trying to create a program (i.e. the paper kind you hand out) in LaTeX. I've got `\documentclass[landscape, letterpaper]` and I'm running into problems with the columns. I've tried multicol, minipage, and twocolumn, but I can't get it to do what I want.               +-----+-----+     |     |     |     |blank|stuff|     |     |     |     +-----+-----+      I want to have the left side blank, and stuff on the right hand side (text on top, image, and text on bottom) all centered on the right side. When I used twocolumn, I couldn't get the LHS to be blank and put anything on the right side. Minipages seem to completely fail at what I want, simply centering everything on the page. I haven't been able to find any template to do what I want, because searching for "LaTeX program template" provides me all sorts of results that do not what I need. Here's an example of what I mean:               \documentclass[twocolumn, landscape,letterpaper]{article}     \usepackage[pdftex]{graphicx}               \begin{document}     \pagestyle{empty}     \vfill     \clearpage     \newpage         \begin{center}             \textit{December 8, 2012}         \end{center}     \end{document}      Produces this: ![wrong side!](http://i.stack.imgur.com/g0tsQ.jpg) I want that to appear on the right hand side.


title: Typesetting of volume integral

text: This question has been bugging me for a long time: How do I properly typeset volume integrals? I would like to use the convention often used in Physics: `d^3x=dV` and `\int dx f(x)` instead of `\int f(x) dx` Example:                   The kinetic energy is simply given by         \begin{equation}           T = \int\,\mathrm{d}^3\mathbf{x}\frac{\rho}{2} \mathbf{\dot x}^2 = \frac{3}{10}M\dot R^2\;.         \end{equation}      But the integral looks somehow bad as the spacing between the x and the d is too big. How can I change this?


title: Getting Yellow Background color on link

text: can anybody tell me how to apply a yellow background color on pdf links (especially on hovering the mouse over the link). For example, I would like to have the same yellow background effect that appears for example on the Contents section of this pdf (pdfcomment docs). http://linorg.usp.br/CTAN/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf


title: problem with round shaped figures

text: When I am putting two round images side by side, their shapes change to oval! here is how I do it:               \begin{figure}[t!]     %     \begin{subfigure}[t]{0.45\linewidth}       \centering       \includegraphics[width=4.2cm, height=5.0cm]{Probabilistic_Vs_Random.png}     %  \vspace{1.5cm}      \caption{probabilistic-based player starts the game}\medskip      \label{fig:2a}     \end{subfigure}\hfill     \begin{subfigure}[t]{0.45\linewidth}       \centering       \includegraphics[width=4.2cm, height=5.0cm]{Random_Vs_Probabilistic.png}     %  \vspace{1.5cm}\hfill        \caption{random player starts the game}\medskip        \label{fig:2b}     \end{subfigure}\hfill     \begin{subfigure}[t]{0.45\linewidth}       \centering       \includegraphics[width=4.2cm, height=5.0cm]{Probabilistic_Vs_Probabilistic.png}     %  \vspace{1.5cm}      \caption{probabilistic vs. probabilistic}\medskip      \label{fig:2c}     \end{subfigure}     \caption{Performance of random and probabilistic-based players based on 1000 plays} \label{fig:2}     \end{figure}       I guess the problem is the size of my plots and this line               \includegraphics[width=4.2cm, height=5.0cm      but I don't know how to fix. here is the snapshot ![enter image description here](http://i.stack.imgur.com/amnev.png)


title: title not displayed when using sigplanconf class

text: I'm using `sigplanconf` document class. Title is not displayed even when `\maketitle` is specified               \documentclass{sigplanconf}     \begin{document}     \title{foo}     \authorinfo{bar}     \maketitle          hello world     \end{document}


title: Use \DTLifoddrow in preamble

text: I'm putting many tables in many files generated by csv files. I'm using `datatools` (opposed to say `pgfplotstable`) because it is much more forgiving in terms of the csv input format (e.g. it ignores quotes around text). However, I would like to make my tables "stripy" with a grey color every other row. To put it plainly, I would like to use `\DTLifoddrow{\rowcolor{grey}}{}` in the preamble of the document. That way I can save myself from manually creating every tabular environment and can apply the same style to all tables. Unfortunately `\DTLifoddrow` must be inside `\DTLforeach`. Therefore I might have to redefine `\DTLforeach` or `\DTLdisplaydb` to automatically add my `\DTLifoddrow`. I'm not sure which path to take or how to go about redefining these commands.


title: Brackets around multiple lines

text: I am trying to put big rounded brackets around some text that contains math formulas:               Jede Teilfolge hat entweder unendliche viele Elemente von $\left( g_{2n}\right)$ oder $\left( g_{2n+1}\right)$.\todo{Add big bracket}     \[\left. {\begin{array}{*{20}{c}}     {{g_ + } = \lim {a_n} = \lim {g_{2n}} = g}\\     {{g_ + } = \lim {b_n} = \lim {g_{2n}} = g}     \end{array}} \right\}{g_ + } = {g_ - } \Rightarrow \lim {g_n} = g = {g_ - } = {g_ + } = \frac{{1 + \sqrt 5 }}{2}\]      The result that I am looking for is something along these lines:               ( First Line  )     ( Second Line )     ( Third Line  )      All of the solutions that I have found force me to go into mathmode, clashing with the formulas, or they use tikz in an enumerated list, which I haven't been able to adapt to my situation. Thanks in advance for your help! EDIT: Looks like I didn't explain myself too well. Here something I sketched up, hope this explains it better: ![quickMockup](http://i.stack.imgur.com/ksa2x.jpg) Of course the brackets should be as tall as the text, and not go over like in my sketch


title: How can I move an equation without affecting the label?

text: I am having an issue with the automatic LaTeX equation and label formatting on one of my longer equations (see results below). **Minimum Working Example**               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{xfrac}     \usepackage[a4paper]{geometry}     \geometry{top=1in, bottom=1in,           left=1in, right=1in}     \usepackage[usenames,dvipsnames]{color}     \newcommand{\Cline}[2][red]{     \text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}          \begin{document}     \numberwithin{equation}{section}          \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b      \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}     \begin{equation}     a=b     \end{equation}          \noindent Expanding the covariant derivatives then yields     \begin{equation}     \begin{split}     R^{\sigma}_{\mu\rho\nu} = \bar{R}^{\sigma}_{\mu\rho\nu} &+\tfrac{1}{2} \bar{g}^{\sigma\beta}\partial_{\rho}\bigl(\partial_{\mu}h_{\nu\beta} -\! \bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\beta} -\! \Cline[Orange]{\bar{\Gamma}^{\tau}_{\mu\beta}h_{\tau\nu}}\bigr) +\tfrac{1}{2} \bar{g}^{\sigma\beta}\partial_{\rho}\bigl(\partial_{\nu}h_{\mu\beta} -\! \bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\beta} -\! \Cline[Magenta]{\bar{\Gamma}^{\tau}_{\nu\beta}h_{\tau\mu}}\bigr) \\ &-\tfrac{1}{2} \bar{g}^{\sigma\beta}\partial_{\rho}\bigl(\partial_{\beta}h_{\mu\nu} -\! \Cline[Orange]{\bar{\Gamma}^{\tau}_{\beta\mu}h_{\tau\nu}} -\! \Cline[Magenta]{\bar{\Gamma}^{\tau}_{\beta\nu}h_{\tau\mu}}\bigr) -\tfrac{1}{2} \bar{g}^{\sigma\alpha}\partial_{\nu}\bigl(\partial_{\mu}h_{\rho\alpha} -\! \bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\alpha} -\! \Cline[Green]{\bar{\Gamma}^{\tau}_{\mu\alpha}h_{\tau\rho}}\bigr) \\ &-\tfrac{1}{2} \bar{g}^{\sigma\alpha}\partial_{\nu}\bigl(\partial_{\rho}h_{\mu\alpha} -\! \bar{\Gamma}^{\tau}_{\rho\mu}h_{\tau\alpha} -\! \Cline[Blue]{\bar{\Gamma}^{\tau}_{\rho\alpha}h_{\tau\mu}}\bigr) +\tfrac{1}{2} \bar{g}^{\sigma\alpha}\partial_{\nu}\bigl(\partial_{\alpha}h_{\mu\rho} -\! \Cline[Green]{\bar{\Gamma}^{\tau}_{\alpha\mu}h_{\tau\rho}} -\! \Cline[Blue]{\bar{\Gamma}^{\tau}_{\alpha\rho}h_{\tau\mu}}\bigr).     \end{split}     \end{equation}     With the symmetries of the Christoffel symbols, the underlined terms cancel, whereas the     \end{document}      **Equation (0.10)** The MWE above gives the result ![enter image description here](http://i.stack.imgur.com/aRU5A.png) I think this looks ugly. **Equation (0.9)** Here is what the same equation looks like if you delete on of the $a=b$ equation: ![enter image description here](http://i.stack.imgur.com/e4ZUq.png) I think that this formatting looks better, with the label at the side. LaTeX is obviously following some predefined rule about spacing, the label won't fit in the above example, so it puts it at the bottom. Is there a nice way to over-rule this? Or, is there a way to move my equation slightly to the left so that the label would fit according to what LaTeX 'thinks' is best.


title: equivalent of pstricks rput in tikz

text: A very powerful feature of `pstricks` is its possibly nested `rput` command that can be used to rotate and move a portion of a drawing. Is there something similar in `tikz`?


title: A bad result with the soulutf8 package

text: When I combine `\textsl` `\textbf` and `\hl` from the `soulutf8` package, the result is ugly. Some letters are degraded. By zooming or printing you can see that with the following code:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{color}     \usepackage{soulutf8}          \begin{document}          \large          \textsl{\textbf{{application module morphisme}}}     % Correct          \textsl{\textbf{\hl{application module morphisme}}}  % Ugly!     %                    —  — —       —  —   —          \end{document}      I'm very disappointed with this. Could you help me please? ![enter image description here](http://i.stack.imgur.com/ptxa2.png) closer look: ![enter image description here](http://i.stack.imgur.com/piG5n.png) oops.


title: PGFplots skip the first row of a table on which there are NaN values. Why?

text: Suppose to have a file .dat like this:                -4.8767000e+000 -2.9142000e-001             NaN             NaN             NaN             NaN      -3.9017000e+000 -4.1404000e-001             NaN             NaN             NaN             NaN      -3.7141000e+000             NaN             NaN -2.6865000e-001             NaN             NaN      -2.8267000e+000 -8.5233000e-001             NaN             NaN             NaN             NaN      -2.7641000e+000             NaN -3.0872000e-001             NaN             NaN             NaN      -2.5488000e+000             NaN             NaN -4.1579000e-001             NaN             NaN      -1.9125000e+000             NaN             NaN             NaN             NaN -1.3021000e-001      -1.8869000e+000             NaN             NaN             NaN -2.4675000e-001             NaN      -1.7165000e+000             NaN -5.1881000e-001             NaN             NaN             NaN      -1.6755000e+000 -1.6062000e+000             NaN             NaN             NaN             NaN      -1.4064000e+000             NaN             NaN -6.1630000e-001             NaN             NaN      -8.3837000e-001             NaN             NaN             NaN -5.1510000e-001             NaN      -7.9259000e-001             NaN             NaN             NaN             NaN -4.0836000e-001      -6.4542000e-001 -2.2095000e+000             NaN             NaN             NaN             NaN      -5.4987000e-001             NaN -7.4848000e-001             NaN             NaN             NaN      -4.2297000e-001             NaN             NaN -1.2681000e+000             NaN             NaN       2.0480000e-001             NaN -1.9436000e+000             NaN             NaN             NaN       2.1333000e-001             NaN             NaN             NaN -9.8248000e-001             NaN       3.3584000e-001             NaN             NaN             NaN             NaN -1.2254000e+000       4.4876000e-001 -2.3614000e+000             NaN             NaN             NaN             NaN       7.7282000e-001             NaN             NaN -1.8424000e+000             NaN             NaN       1.3886000e+000             NaN             NaN             NaN -1.7607000e+000             NaN       1.4709000e+000             NaN -2.4598000e+000             NaN             NaN             NaN       1.5644000e+000 -2.3726000e+000             NaN             NaN             NaN             NaN       1.8937000e+000             NaN             NaN -2.1788000e+000             NaN             NaN       2.3417000e+000             NaN             NaN             NaN -1.9949000e+000             NaN       2.4386000e+000             NaN             NaN             NaN             NaN -2.1213000e+000       2.5903000e+000             NaN -2.7040000e+000             NaN             NaN             NaN       2.9174000e+000             NaN             NaN -2.3792000e+000             NaN             NaN       3.4874000e+000             NaN             NaN             NaN -2.4042000e+000             NaN       3.5796000e+000             NaN             NaN             NaN             NaN -2.2296000e+000       3.7549000e+000             NaN -2.8123000e+000             NaN             NaN             NaN       3.9405000e+000             NaN             NaN -2.5407000e+000             NaN             NaN       4.6521000e+000             NaN             NaN             NaN -2.5125000e+000             NaN      If I plot thse data with the following minimal code:               \documentclass{report}          \usepackage[showframe,                 margin=2.5cm,                 left=3cm]{geometry}          \usepackage{pgfplots}     \pgfplotsset{compat=1.4}          \begin{document}     \centering     \begin{tikzpicture}     \begin{axis}          \foreach \n in {1,2,...,5}{     \addplot table[x index = 0,                    y index = \n]{DATA.dat};     }     \end{axis}     \end{tikzpicture}     \end{document}      PGFplots skip the first row. It means that the y points in the first row are not plotted!! Is it because PGFplots see it like a row with column names? Is it possible to solve this problem?


title: \newenvironment issues with environment comment

text: I am trying to setup the formatting for a LaTeX document (it's got the class memoir), so that it would be fairly simple to add to it in the future. Two of the features I'd like are: Be able to mark certain parts of the text, so that I can produce two versions of the output, one with the complete text, and one without the marked parts of the text. My original idea was to use:               \newenvironment{\marked}{\begin{comment}}{\end{comment}}      and then just change it to               \newenvironment{\marked}{}{}      when I want the full text. However this won't work unless I add a comment block (\begin{comment}...\end{comment}) after I use the marked environment. To have boxed areas of text. I can achieve this though using:               \begin{center}         \colorbox{yellow}{             \parbox{0.8\textwidth}{                 ...text here...             }         }     \end{center}      I would like to create another environment for this, but I'm not sure how to go about it as the text to be contained within the environment will be between open parentheses. Also - how would I go about adding padding to the inside of my box? I'm sorry if these questions are overly simple. The only languages I've used before to format stuff are HTML and CSS.


title: Deleting ps automatically

text: While using the pdf latex chain, how can one delete the *.ps file automatically right after the pdf has been created? *.ps files can be big (~100 MB). Hence, this question.


title: What's so bad about xtemplate collections?

text: The `xtemplate` documentation describes (briefly and a little unhelpfully) the concept of 'collections' in `xtemplate`. It goes on to say, > However, while the idea of switchable instances is a useful one, the team > feel[s] that collections are not the correct way to achieve this, at least > the current approach. Where was this determined (LaTeX-L?) and what concerns were actually raised? Are there any new thoughts on this? Also, `xtemplate` is the second coolest thing since the PGFication of Dolan Duck.


title: Using "apa6" class with thesis/dissertation {report} class?

text: I am trying to put together a dissertation document, which is in "report" class. However, I don't know how to get it to work with the apa6 class, which does not have the option for loading a "report. I read previous posts about modifying the `apa6e.dtx` for a `report`, but then my `.bib` files compile with error. I initially wrote the the thesis document under the `\documentclass[man, 12pt]{apa6}` class. Does anyone have ideas as to how to convert it into a thesis document, while retaining the use of `apa6` class?


title: Aquamacs compiling shortcut

text: Is there a way to make a shortcut key only by which I can compile a `.tex` file? For LaTeX compilation, I'm using shortcut `^C ^C`. It shows me 'latex' as default or 'view' sometimes. If it is set to 'latex', I just press Enter but set to 'view', then I have to type 'latex' to compile. Then I use `^C ^V`to view the `pdf` if needed. This is the most frequent operation that I use but it's quite annoying to type 'latex' explicitly after `^C ^C`. I'm a novice on Emacs and Aquamacs (have used it just for a week).


title: creating two indices, one being the default index and the other a user defined index

text: the following script produces the default index on page 2 with an entry "names 1", on page 3 the single line "namestitle=Names" and on page 3 a repeat of the index on page 2. The `names.ind` file is not created. How do I get two indices?               \documentclass{book}     \usepackage{index}     \makeindex     \newindex{names}{idx}{ind}{Name Index}     \begin{document}     this is a test of using multi indices     \index{1st entry into default index=Book 1}     \index{names}{1st entry into names index=Author 1}     \index{2nd entry into default index=Book}     \index{names}{2nd entry into names index=Author 2}     \printindex{names}{title=Names}     \printindex     \end{document}      the log file is               This is pdfeTeXk, Version 3.141592-1.20a-2.2 (Web2c 7.5.3) (format=LATEX 2014.1.7)  26 JAN 2014 21:29      Source specials enabled.      %&-line parsing enabled.     **&latex Mult_IndexGNY.tex     (./Mult_IndexGNY.tex     LaTeX2e <2005/12/01>     (c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/latex/base/book.cls     Document Class: book 2005/09/16 v1.4f Standard LaTeX document class     (c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/latex/base/bk10.clo     File: bk10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)     )     \c@part=\count79     \c@chapter=\count80     \c@section=\count81     \c@subsection=\count82     \c@subsubsection=\count83     \c@paragraph=\count84     \c@subparagraph=\count85     \c@figure=\count86     \c@table=\count87     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/latex/index/index.sty     Package: index 2004/01/20 v4.2beta Improved index support (dmj)     \@indexbox=\insert233     \indexproofstyle=\toks14     )     \idxtitle@default=\toks15     \tf@default=\write3     \openout3 = `Mult_IndexGNY.idx'.          Package index Info: Writing index file Mult_IndexGNY.idx on input line 5.     \idxtitle@names=\toks16     \tf@names=\write4     \openout4 = `Mult_IndexGNY.idx'.          Package index Info: Writing index file Mult_IndexGNY.idx on input line 6.          (./Mult_IndexGNY.aux)     \openout1 = `Mult_IndexGNY.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.     LaTeX Font Info:    ... okay on input line 7.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.     LaTeX Font Info:    ... okay on input line 7.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.     LaTeX Font Info:    ... okay on input line 7.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.     LaTeX Font Info:    ... okay on input line 7.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.     LaTeX Font Info:    ... okay on input line 7.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.     LaTeX Font Info:    ... okay on input line 7.      (./Mult_IndexGNY.ind [1          ] [2               ]) (./Mult_IndexGNY.ind     [3          ] [4               ]) (./Mult_IndexGNY.aux) )      Here is how much of TeX's memory you used:      308 strings out of 95374      3662 string characters out of 1187507      1046293 words of memory out of 2500000      3357 multiletter control sequences out of 10000+50000      4599 words of font info for 17 fonts, out of 1000000 for 2000      14 hyphenation exceptions out of 8191      23i,4n,17p,152b,222s stack positions out of 5000i,500n,1000p,200000b,5000s      0 PDF objects out of 300000      0 named destinations out of 131072      1 words of extra memory for PDF output out of 65536          Output written on Mult_IndexGNY.dvi (4 pages, 1384 bytes).


title: Footnote Citation in Beamer

text: I'm putting a science related presentation together with the `beamer` class and I'd like to add citations as footnotes on the relevant slides. I've got the `biblatex` package running and am using the `\footcite` command which does a nice job. Unfortunately, it doesn't appear `biblatex` will put the journal, volume number, page number information in the foot note citation. Does anyone know how to get this stuff to show up in the footnote? With the `style=authortitle` option selected I get footnote citations like: > Magde, Elson, and Webb, Thermodynamic Fluctuations in a Reacting System - > Measurement by Fluorescence Correlation Spectroscopy". But I'd really like something like this in the footnote > Magde, Elson, and Webb, Phys. Rev. Lett. 29, 705 (1972)


title: PdfLatex to Pdf

text: I am trying to compile from PdfLatex to Pdf but i keep getting this error. What should I do?               Undefined control sequence.     l.5 \section      Below is a part of my code               % file name : switch-models.tex      %  input to HW-2-main.tex      %      % for compsci190-2013F     \section {FHN switch models}                     \begin{itemize}       \item Review of the three switch models in lecture notes      \item Suggestion : think of {\em infinitesimal changes} in time       and the corresponding potential.      \end{itemize}           \vspace{1 cm}                \subsection{Model (1)}           Consider the basic model for a single switch.


title: move page number in a standard book shell

text: I'm using a standard Latex book shell to typeset a book. Does anyone know how to format page numbering as follows:   1. for preliminary pages, e.g. title page, contents, preface, etc., put page number at the bottom-center;   2. for mainmatter, put page number at the top-right. I tried the follows               \pagestyle{fancy}     \lhead{}     \chead{}     \rhead{\thepage}     \lfoot{}     \cfoot{}     \rfoot{}     \renewcommand{\headrulewidth}{0pt}      \fancypagestyle{plain}{\pagestyle{fancy}}       However, they also move the page numbers of preliminary pages to top right which are not desired.


title: Archimedean spiral in TikZ?

text: I am fairly new to LaTeX and have not actually worked with TikZ yet. Is ist possible to draw an Archimedean spiral starting at the coordinate origin? I have read the TikZ description but did not find what I was looking for.


title: Styling references using natbib

text: This should be a really simple question, but I really wasn't able to find it in this forum. The editor of a publication that I'm writing for (Cambridge Journals) asks me to use harvard-style references. Looking at `.bst` files and other fonts I was able to find that the best approximations to the desired style are `authordate1` and `dcu`. * * * This is what I get using `authordate1` (problem: authors last names are not abbreviated): > Dennis, Carina. 2002. Biology databases: Information overload. Nature, > 417(6884), 14-14. > > Maccagnan, Alessandro, Riva, Mauro, Feltrin, Erika, Simionati, Barbara, > Vardanega, Tullio, Valle, Giorgio, & Cannata, Nicola. 2010. Combining > ontologies and workflows to design formal protocols for biological > laboratories. Automated Experimentation, 2(1), 1-14. * * * This is what I get using `dcu` (problems: year is surrounded by parentheses and does not use '&' for the last author): > Dennis, C. (2002). Biology databases: Information overload, Nature > 417(6884): 14-14. > > Maccagnan, A., Riva, M., Feltrin, E., Simionati, B., Vardanega, T., Valle, > G. and Cannata, N. (2010).Combining ontologies and workows to design formal > protocols for biological laboratories, Automated Experimentation 2(1): 1-14. * * * And this is what I want: > Dennis, C. 2002. Biology databases: Information overload, Nature 417(6884): > 14-14. > > Maccagnan, A., Riva, M., Feltrin, E., Simionati, B., Vardanega, T., Valle, > G. & Cannata, N. 2010.Combining ontologies and workows to design formal > protocols for biological laboratories, Automated Experimentation 2(1): 1-14. * * * **Edited: Is there an easy way to edit the existing styles?**


title: How to render the definition of a macro on the PDF output?

text: For example we have a macro defined in a package as follows.               \newcommand{\test}{this is a test macro}      I want to render this definition on the PDF output as follows.               \documentclass{minimal}     \usepackage{test}     \begin{document}     Hi \somecommandtorendermacrodefinition{\test}     \end{document}      Such that I get > Hi \newcommand{\test}{this is a test macro} in the PDF output. How to do this with minimal hassle? Is there a package to do so?


title: Bibtex "Author with contributions" wrong sorting

text: See this bibtex entry (gotten directly from R using `citation()`):               @Manual{demography,       title = {demography: Forecasting mortality, fertility, migration and population data},       author = {Rob J Hyndman with contributions from Heather Booth and Leonie Tickle and John Maindonald and Simon Wood and R Core Team.},       year = {2012},       note = {R package version 1.14},       url = {http://CRAN.R-project.org/package=demography},     }      Since the main author is `Rob J Hyndman`, I'd expect bibtex together with `\bibliographystyle{plain}` to put this reference as `H`, ie. between `G` and `I`. Now, it's somewhere in the middle of `W`s, which doesn't look right. It gets print as:               Rob J Hyndman with contributions from Heather Booth, Leonie Tickle, John Maindonald,     Simon Wood, and R Core Team. demography: Forecasting mortality, fertility, migration     and population data, 2012. R package version 1.14.      How do I get it to print in the "right" place?


title: Beamer-like description environment

text: Where can I find the definition of the description environment available in `beamer`? I'd like to replicate it for my own needs in an article-oriented document. I'm interested in its right-left alignment features: ![right-left alignment features](http://i.stack.imgur.com/r6nHN.png)


title: Conversion to bibtex

text: I have a substantial bibliography in APA format at the end of my dissertation proposal. I would like to reformat the proposal into latex (Currently Google Docs), and I was wondering if there is a way to automatically generate bibtex from well formatted APA references. Please advise.


title: Circuitikz: Newline in resistor labels

text: How could I go about writing the label R1, with the resistance of 560 ohms underneath it using Circuitikz? Ideally, I want a newline in the resistor label.               \begin{circuitikz}     %\draw[style=help lines] (-8,-8) grid (8,8);     \draw     (0,0) node[npn,rotate=90] (darl) {} node[above] {$Q1$}     (0,-3)      node[npn,xscale=-1] (npn) {} node[left] {$Q2$}     (darl.B)    to[short,-*,i<^=\SI{37.2}{\micro\ampere}] ++(0,-0.65) node (base) {}                 to[short,i>^=\SI{5.67}{\milli\ampere}] (npn.C)          (darl.E)    to[short,-*,i=\SI{518}{\milli\ampere}] ++(1.23,0) node (zen) {}                 to[short,-*] ++(2,0) node (div) {}                 to[short,-o] ++(1.5,0)  node (out1) {}                 to[short] ++(1,0)                 to[vR,i>^=\SI{500}{\milli\ampere},l=$R_L$] ++(0,-6)                 to[short,-o] ++(-1,0) node (out2) {}                 to[short,-*] ++(-1.5,0)                 to[short,-*] ++(-4,0)                 to[short] ++(-3.5,0)                 to[V,l=\SI{18}{\volt}] ++(0,6)          (zen)       to[R,l=\SI{1.2}{\kilo\ohm},i>^=\SI{5.41}{\milli\ampere}] ++(0,-3)                 |- (npn.E)          (0,-6)      to[zD,-*,v_>=\SI{6.2}{\volt},i^<=\SI{12.7}{\milli\ampere}] (npn.E)     (div)       to[R,-*,l=$\SI{470}{\ohm}$,i>^=\SI{12.3}{\milli\ampere}] ++(0,-3) node (fb) {}                 to[R,l=$\SI{560}{\ohm}$,v_=\SI{6.90}{\volt}] ++(0,-3)          (npn.B)     to[short] (fb)          (darl.C)    to[short,-*] ++(-1,0) node (Rbe) {}                 to[short] ++(-0.235,0)                 to[short] ++(-1.5,0)          (Rbe)       to[short,i_=\SI{5.71}{\milli\ampere}] ++(0,-1.5)                 to[R,l_=\SI{680}{\ohm}] ++(1.76,0)          (6.5,0)     to[short,*-o] ++(1,0) node[right] {$\SI{12.7}{\volt}$}     ;     \end{circuitikz}      ![ShuntRegulator](http://i.stack.imgur.com/X0BbH.png)