title: Is this a bug with Inkscape and/or LaTeX or am I missing something?

text: I want to include figures generated by `inkscape` which include transparency. When I change the width of the figures, things get weird. Have you ever noticed this and is there a better way to do?               % This code works fine     \documentclass{article}     \usepackage{graphicx, xcolor}          \begin{document}          %\centering     %\def\svgwidth{6cm}     \input{test.pdf_tex}          \end{document}      ![enter image description here](http://i.stack.imgur.com/zqDUQ.png)               % This code doesn't     \documentclass{article}     \usepackage{graphicx, xcolor}          \begin{document}          %\centering     \def\svgwidth{6cm}     \input{test.pdf_tex}          \end{document}      ![enter image description here](http://i.stack.imgur.com/J4IFa.png) Here is a link to the files generated by `inkscape`. Here is the `TeX` file created by `inkscape`.               %% Creator: Inkscape inkscape 0.48.2, www.inkscape.org     %% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010     %% Accompanies image file 'test.pdf' (pdf, eps, ps)     %%     %% To include the image in your LaTeX document, write     %%   \input{<filename>.pdf_tex}     %%  instead of     %%   \includegraphics{<filename>.pdf}     %% To scale the image, write     %%   \def\svgwidth{<desired width>}     %%   \input{<filename>.pdf_tex}     %%  instead of     %%   \includegraphics[width=<desired width>]{<filename>.pdf}     %%     %% Images with a different path to the parent latex file can     %% be accessed with the `import' package (which may need to be     %% installed) using     %%   \usepackage{import}     %% in the preamble, and then including the image with     %%   \import{<path to file>}{<filename>.pdf_tex}     %% Alternatively, one can specify     %%   \graphicspath{{<path to file>/}}     %%      %% For more information, please see info/svg-inkscape on CTAN:     %%   http://tug.ctan.org/tex-archive/info/svg-inkscape     %%     \begingroup%       \makeatletter%       \providecommand\color[2][]{%         \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%         \renewcommand\color[2][]{}%       }%       \providecommand\transparent[1]{%         \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%         \renewcommand\transparent[1]{}%       }%       \providecommand\rotatebox[2]{#2}%       \ifx\svgwidth\undefined%         \setlength{\unitlength}{476.22402344bp}%         \ifx\svgscale\undefined%           \relax%         \else%           \setlength{\unitlength}{\unitlength * \real{\svgscale}}%         \fi%       \else%         \setlength{\unitlength}{\svgwidth}%       \fi%       \global\let\svgwidth\undefined%       \global\let\svgscale\undefined%       \makeatother%       \begin{picture}(1,1.41427559)%         \put(0,0){\includegraphics[width=\unitlength]{test.pdf}}%         \put(0.47641909,0.6172474){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$p\in M$}}}%       \end{picture}%     \endgroup%


title: Beamer theme with fading (=gradient to transparent) to background image

text: I am using Singapore theme and want to use a background texture image for my slides. Is there a way to set the gradient in the title background to go 'from title background color to transparent' instead of 'from title background color to slide background'? ![enter image description here](http://i.stack.imgur.com/xEPoT.png)


title: Monospaced font with U+1D400..U+1D7FF range (for editing)?

text: The goal of this question is to find an appropriate font for the editor in which I input TeX, rather than a font for use in the output. I hope this is sufficiently on-topic for TeX.se. I recently switched to unicode input for all mathematical operators. Now I'm considering taking it one step further and using the Mathematical Alphanumeric Symbols range to match the font-style of the input to the font-style of the output (upright for functions, italic for variables, script/double- struck/fraktur for the appropriate mathematical concepts). It's become a bit of a personal project to get my TeX code to resemble the output as much as possible. The problem so far is that I have no font in which those characters all occupy the same horizontal space, making the code in the editor misaligned and harder to read and edit: ![enter image description here](http://i.stack.imgur.com/Hykv4.png) The above screenshot fragment is from Eclipse / TeXlipse, but every Linux editor I tried does the same. The only font on my system that supports that particular unicode range is XITS, so whichever font I choose in the editor, it falls back to XITS for those variables. Is there a font around which covers as much unicode as possible (but at least the standard mathematical operators and U+1D400..U+1D7FF) and has all of them in the same width? (What's the technical term; monospaced, fixed width?) Or perhaps there is a way to display the characters with a fixed width, regardless of font? It feels like it would be a fairly mechanical process to take a font such as XITS, center each character in a fixed-width space and output a makeshift font with the characteristic I need. But I have no idea how to do that.


title: Problem Installing TeX Live under Windows 8 Resistant to Past Fixes

text: I am trying to install TeX Live on my Windows 8 machine, which already has MikTeX 2.9 installed on it. I downloaded the zipped file from CTAN, unzipped it to a new folder, and I have run install-tl.bat both by simply double- clicking on it as as an administrator. I have also tried changing my environmental variables. I have changed PATHEXT from ".COM;.EXE;.BAT;..." to ".EXE;.BAT;.COM;..." as well. I've run all four combinations of the two PATHEXT versions and both running the batch file normally and as an administrator. The output of the prompt is invariant over attempts and is as follows: > PATH=C:\Program Files (x86)\TexLive\install- > tl-20131021\tlpkg\tlperl\bin;c:\Rtoo ls\bin;c:\Rtools\gcc-4.6.3\bin; > "C:\Program Files (x86)\TexLive\install-tl-20131021\install-tl" Can't spawn > "cmd.exe": No such file or directory at C:/Program Files (x86)/TexLi > ve/install-tl-20131021/tlpkg/TeXLive/TLUtils.pm line 2375. > TeXLive::TLUtils::setup_programs (w32) failed at C:/Program Files > (x86)/TexLive/ install-tl-20131021/tlpkg/TeXLive/TLUtils.pm line 2377. > "C:\Program Files (x86)\TexLive\install- > tl-20131021\tlpkg\installer\xz\xzdec.exe " --help failed (status 65280): No > such file or directory Output is: Usage: xzdec [OPTION]... [FILE]... > Uncompress files in the .xz format to the standard output. > > -c, --stdout (ignored) -d, --decompress (ignored) -k, --keep (ignored) -q, > --quiet specify _twice_ to suppress errors -Q, --no-warn (ignored) -h, > --help display this help and exit -V, --version display the version number > and exit > > With no FILE, or when FILE is -, read standard input. > > Report bugs to (in English or Finnish). XZ Utils home page: > http://tukaani.org/xz/ > > Can't spawn "cmd.exe": No such file or directory at C:/Program Files > (x86)/TexLi ve/install-tl-20131021/tlpkg/TeXLive/TLUtils.pm line 2375. > TeXLive::TLUtils::setup_programs (w32) failed at C:/Program Files > (x86)/TexLive/ install-tl-20131021/tlpkg/TeXLive/TLUtils.pm line 2377. > "C:\Program Files (x86)\TexLive\install- > tl-20131021\tlpkg\installer\wget\wget.ex e" --version failed (status 65280): > No such file or directory Output is: GNU Wget 1.11.4 > > Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL > version 3 or later http://www.gnu.org/licenses/gpl.html. This is free > software: you are free to change and redistribute it. There is NO WARRANTY, > to the extent permitted by law. > > Originally written by Hrvoje Niksic . Currently maintained by Micah Cowan . > > C:\Program Files (x86)\TexLive\install-tl-20131021\install-tl: Goodbye. > Press any key to continue . . . As far as I know I've tried all the fixes that have worked for other users and I just don't know what to do. Thanks for your help.


title: Index printing issue

text: I am writing an article with an index, and I'm using the makeidx package to do so. I have made sure to include the `\makeindex` command in my preamble, and I have included a `\printindex` command near the end of my document. On my desktop, where I am running TexMaker + TexLive, compilation of pdf-Latex results in no index being generated in the output PDF. On my laptop, where I am running WinEdt + MikTex, everything seems to run fine. In particular, the index is generated in the appropriate location. I'm at a loss as to how to troubleshoot this inconsistency. I've tried deleting all auxiliary files besides the source and recompiling on my desktop, but no dice. Is there something simple I could be missing here?


title: Why does adding hypertarget to TOC change pagination?

text: I'm trying to have links to lines in the table of contents, as suggested in, e.g., this question. It seems like the standard answer is to include lines like               \addtocontents{toc}{\protect\hypertarget{label}{}}      in the appropriate part of the document. This works great except that the table of contents doesn't seem willing to have page breaks between subsections that have this line between them, which leads to awkward spacing. I've posted an example below.               \documentclass[12pt,letterpaper]{article}     \usepackage[colorlinks,linkcolor=black]{hyperref}          \begin{document}          x\vspace{5.5in}     \tableofcontents          \section{A}     \section{B}     \addtocontents{toc}{\protect\hypertarget{moo}{}}     \subsection{BA}     \addtocontents{toc}{\protect\hypertarget{moo}{}}          \subsection{Pagebreak should go below here}     % but it doesn't if this is uncommented     %\addtocontents{toc}{\protect\hypertarget{moo}{}}          \subsection{BC}     \addtocontents{toc}{\protect\hypertarget{moo}{}}     \subsection{BD}     \addtocontents{toc}{\protect\hypertarget{moo}{}}     \section{C}               \end{document}      Why is this, and how can I specify that page breaks are OK?


title: Make ToC in the center and left aligned in beamer

text: Using the following code I could put the ToC lines in the center in `beamer`:               \begin{frame}       \begin{center}       \tableofcontents       \end{center}     \end{frame}      But how to make these ToC lines left aligned and still in the center?


title: How to typeset a math function from and to a domain

text: > **Possible Duplicate:**   >  Using \colon or : in formulas? Currently I use               f\colon A \to B      to define a function map. I do not know whether this is better than               f:A \to B      What's the best way? Sometimes the spacing looks ugly.


title: Label numbering gone crazy

text: I have redefined the enumerate counters to include the section number, and this works as expected. However, when I try to cross-reference text in my document, the number on the reference doesn't show correctly. **Update:**   Upon request, I have edited in a full MWE here instead of the original sample code.               \documentclass{article}          \renewcommand*{\theenumi}{\thesection.\arabic{enumi}}     \renewcommand*{\theenumii}{\theenumi.\arabic{enumii}}     \renewcommand*{\theenumiii}{\theenumii.\arabic{enumiii}}          \begin{document}          \section{The main stuff}     \begin{enumerate}         \item Some text         \item \textbf{A header}         \begin{enumerate}             \item The first item in a sublist             \item \label{important} This stuff is really cool             \begin{enumerate}                 \item Some text here...                 \item ...and here             \end{enumerate}         \end{enumerate}         \item The outer list continues     \end{enumerate}          When I reference \lq\lq{}important\rq\rq{}, I get \ref{important}          \end{document}      The last row outputs > When I reference "important", I get 1.21.2.2 where I would have expected the number to be just simply `1.2.2`. **Solution:**   The solution to this problem was presented by Geoffrey Jones - simply switching from one suggested way of changing the numbering to the other made it work. Instead of the above `\newcommands`, the following works:               \usepackage{enumitem}     \setenumerate[1]{label=\thesection.\arabic*.}     \setenumerate[2]{label*=\arabic*.}     \setenumerate[3]{label*=\arabic*.}


title: symbol "-" not shown in any of "listings" after compiling together with "breqn" package

text: After compiling my "-" symbol in every single listing environment dissapears. I found out that "listings" package must somehow conflict with "breqn" package. Below is a minimal working example. Try to coment/uncomment `\usepackage{breqn}` and then compile.               \documentclass[12pt,a4paper,openany]{report}     \usepackage{listings}     \usepackage{color}     \usepackage{breqn}          \begin{document}          \begin{lstlisting}     arm-none-eabi-as -mcpu=arm926ej-s -c -Wall -ostartup.o startup.s     \end{lstlisting}          \end{document}      I would really love to use both, but only if anyone can tell me, why i get this bug and how can it be fixed.


title: Passing parameters to a document

text: I compile most of my documents via Makefiles which take care of the bibliography, indexes, etc. Often I'd like to compile different versions from the same TeX file changing only small things (e.g. a beamer presentation plus a version with the `handout` option). Is there any standard mechanism for passing parameters to the TeX file so that I can just type `make handout` to get the `handout` version in the above example?


title: How can I automate the workflow for producing multiple versions of a document?

text: Say you have two versions of the same LaTeX document. ![enter image description here](http://i.stack.imgur.com/hjoVW.png) For instance, you have one version of your lecture slides for actually delivering a lecture: as you're really not a big fan of the "wall of text", this version would be parsimonious in terms of text content, allowing the audience to listen to what you're talking about instead of reading the slides, and giving graphical content centre stage. Another version of those slides, made available to the audience after the lecture, for self-study, would be more self-contained and include a summary of what you said during that lecture along with the graphical content mentioned above. Consider that you can toggle between the two versions by either changing a class option or by changing the value of some dedicated counter in your input file; something relatively simple to do "by hand". To produce two different versions of the same document, my current workflow is   1. "manually" compile the first version,   2. change the filename of the output produced (in order to prevent overwriting in step 4)   3. make appropriate changes in my input file to switch to the second version,   4. "manually" compile the second version. However, this workflow is tedious and error-prone, especially when the number of different versions increases. I would like to automate it as much as possible. Is there a way to batch compile all the versions of my document, each getting a different output filename? I guess that would involve modifying the input file at the command line (I'm on Mac OS X), but I don't know how to do that. Do you have an automated workflow for compiling multiple versions of the same document? How do you do it? **Edit** : I figured it out using Martin Scharrer's post and Neil Olver's post on Passing parameters to a document, of which my question is a duplicate.


title: what Makefile to produce slides and handouts a common file

text: a handy feature of `beamer` is to be able to produce slides or a handout. you "just" have to change a line in the source. a known solution is to use 2 different files forthe different options with a common input to the slides, but find this solution non economic. however, I wished to produce the slides and the handout more naturally using a Makefile. Is it possible to pass at the command line (for instance to `lualatex`) an option that can be used by beamer and include that in a Makefile?


title: How do I make make different versions of my document with command line compile flags?

text: I've found a number of answers online, and plainly none of them have seemed to be able to execute any conditional code. This answer looked particularly promising. One thing I noticed is that in the command line help, xetex (and similarly pdflatex) claim that the COMMANDS part of > xetex [OPTION]... [TEXNAME[.tex]] [COMMANDS] is latex code that will be processed after the file TEXNAME.tex. Now it occurs to me that this would cause any conditionals which rely on the value of the flags set in COMMANDS to fail, due to the processor not finding the flag value until the end of the file, at which point it is too late. How do I get a command line argument to be interpretted as xetex/latex code which is to be inserted into the document at some point before the \begin{document} element? The specific problem that I have, is that I want a document that may contain hyperlinks to different parts of the document, but only if I flag it as an electronic copy upon compilation.


title: Is it possible to pass definitions to LaTeX from the command line?

text: > **Possible Duplicate:**   >  Passing parameters to a document   >  How do I make make different versions of my document with command line > compile flags? I find myself wanting to be able to compile my document with different settings (e.g. draft mode, Beamer slides/handouts, without coloured references for printing, etc.). It would be really great to be able to pass these settings on the command line when invoking `pdflatex`. Currently my solution is to have a wrapper shell script that parses the command line and echoes the right values (i.e. extra definitions) into an extra .tex file which is then read by my main document using e.g. `\input{settings.tex}`. Is there a standard way of doing this? Is there a _better_ way of doing this?


title: Compiling latex files from terminal with and without a command

text: I have used \faketableofcontents in my file. I need to compile the file twice -- once with \faketableofcontents present and once with \faketableofcontents commented out. I wonder if there is a way to compile the file from terminal and use a true or false argument which specify whether \faketableofcontents must be included or ignored during compilation.


title: What is the recommended approach to compile sequentially some variants of code?

text: Continuing experimenting with conditional text, I am getting a code with a number of options: some dialogs in english are translated, some other options (not shown in the MWE) enable the document be compiled with or without the graphics. In order to enable an final conversion into a docbook format, I have also made a macro to eliminate explicit reference to chapters, and page numbers. There are other variants. The number of options begins to be a problem for each revision. I would like to be able to generate (compile) most variants sequentially without a manual change of parameters in the code. I have just discovered makefiles, and I am wondering if a makefile could be used to generate all the different variants of the document and how. I have considered locating the lines of code containing the options that need to be changed in subfiles and would be optionnally used for compilation. What would be the best approach ?               \documentclass[a5paper, 11pt,oneside]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}%      \usepackage{ifthen}     \usepackage[english, frenchb]{babel}% Pour franciser LaTeX          \def\pagenum{n} %page numbering  {n} to eliminate          \makeatletter     \ifthenelse{\equal{\pagenum}{n}}{\let\ps@plain\ps@empty}{}%first page of chapters     \makeatother     %====================     \def\lang {ef} %variable used for conditional text e=english, f=french, ef=english with footnotes     \newcommand{\CondText}[2]{%     \ifthenelse{\equal{\lang}{e}}{{\selectlanguage{english}\emph{#1}}}{}%     \ifthenelse{\equal{\lang}{ef}}{{\selectlanguage{english}\emph{#1}}%     \footnote{\selectlanguage{french} #2}}{}%     \ifthenelse{\equal{\lang}{f}}{{\selectlanguage{french} #2}}{}%     }%          \begin{document}     \ifthenelse{\equal{\pagenum}{n}}{\pagestyle{empty}}{}%     \ifthenelse{\equal{\pagenum}{n}}{\chapter*}{\chapter}{L'auberge}          \CondText {--- Sir, the manager needs to see you before you go !}{--- Monsieur, le patron veut vous voir avant votre départ !}\medskip          Some text in french\dots{}         \end{document}


title: \mathbb{Z} is not displayed correctly

text: The character `\mathbb{Z}` is not displayed correctly in my pdf-output: it is not a vector graphic, but a pixelated raster image. I have loaded the amssymb package and I am using Windows and MiKTeX. I suppose I lack some fonds. But which and how do I install them? Hope you can help. Edit to clarify my post: Here is a minimal example               \documentclass{article}     \usepackage{bbold}     \begin{document}     $\mathbb{Z} $     \end{document}      The actual problem comes from using bbold. Adding `\usepackage[T1]{fontenc}\usepackage{lmodern}` doesn't help.


title: Typeset a dialogue?

text: I need to typeset a dialogue in LaTeX, it's for a translation assignment. The original dialogue does something like this:               - I found it, I told him.     My finger was in the book, where George Best's autograph was. My da was     sitting in his chair.     - Did you? he said. - Good man. What?     - What?     - What did you find?     - The autograph, I told him.     He was messing.      I would like to keep that formatting without resorting to `\\` and such. I found the `dialogue` package on CTAN, but it doesn't seem to be what I'm looking for. Any ideas?


title: Multiple citations

text: It's possible to compress multiple citations with the environment "thebibliography" without using specific packages like "BibLaTex"? For example, I would get blah blah blah [1-4] rather than blah blah blah [1,2,3,4].


title: How to use CMYK-Colors in the whole document

text: I found out, that my color laser printer prints graphics with gray color in RGB-Representation instead of using black (they are more red then gray). So it seems, that PDFLaTeX is creating RGB-PDF-Files. I only use pstricks-graphics like this one:               \documentclass[letterpaper,dvips]{article}          \usepackage[utf8]{inputenc}     \usepackage{textcomp}          \usepackage{pst-all}          \usepackage{color}          \begin{document}              \pagestyle{empty}         \begin{TeXtoEPS}             \psset{xunit=1cm,yunit=1cm,runit=1cm}             \begin{pspicture}(2,2)                 \psset{linewidth=1pt}                      \psframe[fillstyle=solid, linewidth=1pt, fillcolor=lightgray](2,2)                  \end{pspicture}              \end{TeXtoEPS}          \end{document}      I'm creating eps-files with this steps:   * `latex Grafik1.tex`   * `dvips Grafik1.dvi -o Grafik1.ps`   * `ps2eps --ignoreBB Grafik1.ps` and include the eps-file with `\includegraphics` So is there a way to tell the whole document only create CMYK-Colors or an other way to create a document with the wright colors? EDIT: The basic Problem is solved, but when creating a gradient, colors are used instead of black               \documentclass[letterpaper,dvips]{article}          \usepackage[utf8]{inputenc}     \usepackage{textcomp}          \PassOptionsToPackage{cmyk}{xcolor}% NB: put this *before* \usepackage{pst-all}     \usepackage{pst-all}               \begin{document}              \pagestyle{empty}         \begin{TeXtoEPS}             \psset{xunit=1cm,yunit=1cm,runit=1cm}             \begin{pspicture}(2,2)                 \psset{linewidth=1pt}                      \psframe[fillstyle=gradient, gradbegin=white, gradend=black](2,2)                  \end{pspicture}              \end{TeXtoEPS}          \end{document}


title: pgfplots ticklabel format logarithmic scale

text: How do I disable exponent notation on logarithmic scale? I want ...,$10^0$,$10^1$,$10^2$,... replaced by ...,1,10,100,... I have tried to play with this default(pgfplots manual p. 209):               \pgfplotsset{ log base 10 number format code/.code={$10^{\pgfmathprintnumber{#1}}$}     }      But I can't make it work, and it seems to be a complicated way to do a simple thing. * * *               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}       \pgfplotsset{log base 10 number format code/.code={$fun^{\pgfmathprintnumber{#1}}$}}         \begin{semilogxaxis}         [xmin=1, xmax=1000, domain=1:1000]         \addplot {ln(x)};       \end{semilogxaxis}     \end{tikzpicture}     \end{document}      ![Just for fun](http://i.stack.imgur.com/5Ipeu.png)


title: Vertical Chinese text in Italic and bold with uplatex

text: I want to typeset some ancient writings in Chinese, but there is no derictly class of document to use. Then I try uplatex. I create a `sim.map` file whose content is:               urml        UniGB-UTF16-H   simsun.ttc     urmlv       UniGB-UTF16-V   simsun.ttc     ugbm        UniGB-UTF16-H   simhei.ttf     ugbmv       UniGB-UTF16-V   simhei.ttf          uprml-h     UniGB-UTF16-H   simsun.ttc     uprml-v     UniGB-UTF16-V   simsun.ttc     upgbm-h     UniGB-UTF16-H   simhei.ttf     upgbm-v     UniGB-UTF16-V   simhei.ttf     uprml-hq    UniGB-UCS2-H    simsun.ttc     upgbm-hq    UniGB-UCS2-V    simhei.ttf      and a try.tex file whose content is:               \documentclass[a4paper]{utbook}     \begin{document}     \textbf{天地人和}，天地人和，\textit{天地人和}。     \end{document}      Then use the following code to get pdf:               uplatex try && dvipdfmx -f sim.map try      As you can see, `\textbf` works but textit does not. What should I do to get `\textit` works? ![enter image description here](http://i.stack.imgur.com/cEa5s.png) **Update** If I use the pxchfon package, then the try.tex file is:               \documentclass[a4paper]{utbook}     \usepackage[noalphabet]{pxchfon}     \setminchofont[0]{simsun.ttc}      \setgothicfont[0]{simkai.ttf}      \begin{document}     \textbf{天地人和}，天地人和，\textit{天地人和}。     \end{document}      And the output is: ![enter image description here](http://i.stack.imgur.com/zrgXz.png) It seems that `\textit` does not work as well.


title: Graphics: Clip or cutout a circle from a circle

text: I have a very specific problem that needs solving: I would like to produce a shape which can be most easily thought of as a circle or an ellipsis cut out of another bigger circle: Think e.g. the apple of the Apple logo (basically a big circle with something cut out on the right). I have tried the following fragment with the `pstricks` package:               \begin{psclip}{\psellipse(1.8,0)(0.8,0.6)}       \pscircle(2.6,0){.45}     \end{psclip}      This draws an ellipsis, and inside part of a circle clipped to the shape of the ellipsis. Is it possible to subtract or cut out some shape out of another shape with `pstricks` (or other)? Thanks!


title: Compilation problems BootCamp Miktex. Missing \item perhaps

text: I have a document which currently compiles on my pure windows machine but I have problems compiling on a mac which uses bootcamp and runs windows 8.1. I get the same error at strange places in the main document,missing \item perhaps. These errors appear at empty spaces and spaces were there are text and is very random. I cant figure out what the problem is at all because it runs on my other computer with the same miktex and texworks. I use dropbox so I share the files. Any one with maybe some of the same problems on BootCamp and windows 8.1?


title: How is it possible to put hidden data in LaTeX?

text: In my LaTeX document, I would like to put hidden data, like a marker or tag. The idea behind it is to be able to return an explicit error message. For example in this latex file, I would like to put a tag or marker where the comment line is with stars:               \documentclass[12pt]{article}          \usepackage[parfill]{parskip}     \usepackage[none]{hyphenat}     \sloppy     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{array,ragged2e, calc}     \usepackage{enumitem}     \usepackage{lipsum}     \usepackage{needspace}          \definecolor{shadecolor}{RGB}{217,217,217}  % Color used for highlighting     \definecolor{light-blue}{RGB}{0,175,236}    % Color for the footer          % ------------------------------------------------------------------------------------     % Header and footer management.     % ------------------------------------------------------------------------------------     \usepackage{fancyhdr}     \pagestyle{fancy}          % clear any old style settings     \fancyhf{}     \fancyheadoffset{0in}     \headheight = 53pt     \renewcommand{\headrulewidth}{0pt}          % ------------------------------------------------------------------------------------     % Defining the section style     \newcommand{\mysectionstyle}[1]{\colorbox{shadecolor}{\begin{tabular}{>{}p{\rectanglelength}}{\fontsize{13}{6}\selectfont\textbf{#1}}\end{tabular}}\vspace{6pt}}     % ------------------------------------------------------------------------------------     \addtolength{\footskip}{0.6cm}     \renewcommand{\footrulewidth}{1pt}     \renewcommand{\footrule}{{\color{light-blue}%     \vskip-\footruleskip\vskip-\footrulewidth     \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}     % ------------------------------------------------------------------------------------          \usepackage[left=0.75in,top=1.5in,right=0.75in,bottom=1in]{geometry} % Document margins     \usepackage{titlesec}          \newlength{\rectanglelength}     \setlength{\rectanglelength}{\textwidth}     \addtolength{\rectanglelength}{-6pt}          \newlength{\foo}          \begin{document}     \lipsum[1]          \settototalheight{\foo}{\parbox[t]{\linewidth}{\begin{minipage}[t]{\linewidth} \begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\fontsize{13}{6}\selectfont{LaTeX}&\textbf{2011 to 2012}\end{tabular}\\\begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\textbf{Lead Programmer}&\textbf{}\end{tabular}%     \vspace{3pt}\begin{itemize}[parsep=0pt, topsep=0pt, itemsep=0pt, leftmargin=2ex]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\end{itemize}%     \vspace{7pt}\textbf{End Title}\\\lipsum[1]          \vspace{10pt}\end{minipage}}     }     \needspace{\foo}{\setlength{\parskip}{4pt}          % ******* I WANT TO INSERT A TAG OR MARKER HERE.*******     \mysectionstyle{Experiences}          \begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\fontsize{13}{6}\selectfont{LaTeX}&\textbf{2011 to 2012}\end{tabular}\\\begin{tabular}{@{}>{\RaggedRight}p{11cm}>{\RaggedLeft}p{6.35cm}@{}}\textbf{Lead Programmer}&\textbf{}\end{tabular}%     \vspace{3pt}\begin{itemize}[parsep=0pt, topsep=0pt, itemsep=0pt, leftmargin=2ex]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\item \lipsum[1]\end{itemize}%     \vspace{7pt}\textbf{End Title}\\\lipsum[1]          \vspace{10pt}}     \end{document}      I want to insert a tag or a marker into the LaTeX file so when an error occurred, I can retrieve the marker and then return a user-friendly message. Something like, there's an error in section X. Is it possible in LaTeX? If yes, how can I do that?


title: Use TeX Gyre fonts with latex+dvips+ps2pdf

text: I want to use the TeX Gyre fonts (especially the Pagella and Pagella Math) with LaTeX+dvips+ps2pdf. In the future I want to use this for PSTricks but first I've to solve my font problems. I use this code for LaTeX+dvips+ps2pdf               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tgpagella}     \begin{document}     Test in Pagella          \[\sum_{k=1}^n k=\frac{n(n+1)}{2}\]     \end{document}      It produces a PDF file with the text in TeX Gyre Pagella _but_ the mathematics in Computer Modern (see screenshot) ![Screenshot produced by sourcefile](http://i.stack.imgur.com/kqkRQ.png) When changing the code to the following               \documentclass{article}     \usepackage{fontenc,unicode-math}     \setmainfont[Ligatures=TeX]{TeX Gyre Pagella}     \setmathfont[Ligatures=TeX]{TeX Gyre Pagella Math}     \begin{document}     Test in Pagella          \[\sum_{k=1}^n k=\frac{n(n+1)}{2}\]     \end{document}      and processing it with LuaLaTeX in DVI-mode works well. But running `dvips` afterwards produces the following errors               This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)     ' LuaTeX output 2013.04.01:1811' -> template-pstricks.ps     kpathsea: Invalid fontname `name:TeXGyrePagella:mode=node;script=latn;language=DFLT;+tlig;+trep;', contains ':'     dvips: Font name:TeXGyrePagella:mode=node;script=latn;language=DFLT;+tlig;+trep; not found; using cmr10          </usr/local/texlive/2012/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>kpathsea: Invalid fontname `name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1;', contains ':'          dvips: Font name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1; not found; using cmr10          </usr/local/texlive/2012/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>     dvips: ! invalid char 119899 from font name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1;      I understand that dvips can't handle OpenType fonts, but how can I use the TeX Gyre Pagella and especially TeX Gyre Pagella Math together with PSTricks? Either LaTeX or LuaLaTeX solutions would be a great help.


title: LaTeX error when using Lyx: Bad mathchar (32768)

text: I have been getting this error message when ouputing my LyX document: Bad mathchar (32768), with the following explanation: "A mathchar number must be between 0 and 32767. I changed this one to zero.", followed by two more errors: Missing number, treated as zero., with the explanation "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.)" The source of the error seems to be the following TeX file that creates a table:                                &\multicolumn{3}{c}{Matem\'aticas}                                \\\cmidrule(lr){2-4}                     &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         \\     \midrule     Tratamiento         &        0.07         &        0.08\sym{**} &        0.09\sym{***}\\                     &      (0.08)         &      (0.05)         &      (0.03)         \\     \addlinespace     Controles           &          No         &        S\'i         &        S\'i         \\     \midrule     Observaciones       &        2000         &        2000         &        2000         \\      The TeX file is then saved in the same folder as the LyX file under the name regressions.tex and inserted in the LyX document by Insert-TeX Code:               \begin{threeparttable}              \estwide{regressions.tex}{3}{c}     \Figtext{\footnotesize{Errores est\'andares entre par\'entesis.\\ \textit{* p < 0.1, ** p < 0.05, *** p < 0.01.}}}        \end{threeparttable}      I can see the output in pdf of the LyX file this code is inserted in (although I get the afore-mentioned error message), but it doesn't work when I insert the LyX file as a Child file in another LyX file. I have other similar tables in other Child LyX files across the master document, and they work fine. I haven't been able to find where the problem comes from. Any help would be appreciated, thanks! The preamble should include:               \usepackage{booktabs}     \usepackage{threeparttablex}     % *****************************************************************     % Estout related things     % *****************************************************************     \let\estinput=\input % define a new input command so that we can still flatten the document          \newcommand{\estwide}[3]{     \vspace{.75ex}{     \textsymbols% Note the added command here     \begin{tabular*}     {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}     \toprule     \estinput{#1}     \bottomrule     \addlinespace[.75ex]     \end{tabular*}     }     }          \newcommand{\estauto}[3]{     \vspace{.75ex}{     \textsymbols% Note the added command here     \begin{tabular}{l*{#2}{#3}}     \toprule     \estinput{#1}     \bottomrule     \addlinespace[.75ex]     \end{tabular}     }     }          % Allow line breaks with \\ in specialcells     \newcommand{\specialcell}[2][c]{%     \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}     }      EDIT: I have encountered this issue. It has nothing to do with the specific table used but the fact that the table may contain math characters or somehow messes with the way LyX deals with math characters inside tex code. No idea how that works behind the scenes but something flips up under certain circumstances. To solve the issue, there must be some TeX code that uses math in the LyX doxument, before the code above is called. "$ $" suffices.


title: How to automatically scale inline TikZ code in subscripts?

text: I want to use inline TikZ code to create my own subscript symbol. For example something like               $V_{\tikz{ \draw [|->] (0,0) -- (2ex,0); }}$      The problem is that it is not scaled. The length of the arrow is longer than 2 times the character `x` (`ex` means the height of character `x`). How can I fix this? The problem becomes really painful, if the symbol is a subscript of a subscript. TikZ doesn't scale the symbol although the absolute height of `ex` changes. I don't want to use a 'standard' math symbol. Actually, my symbol is more complicated and no mathematical symbol is available.


title: How to fit a wide table landscape orientation

text: I have this simple code: I can build the table on landscape orientation, but when I insert the command adjustbox, there are some erros: Not in outer par mode undefined conttrol sequence ... Error package graphics division by 0.               \begin{landscape}     \begin{adjustbox}{width=\textheight,totalheight=\textwidth,keepaspectratio}     \begin{table}     \centering\small     \caption{Summary of analytical expression for $\textrm{PFD}_\textrm{avg}$ Calculations} \label{Summary}             \begin{tabular}{lcccc}       \toprule             \textrm{Analytical Expression}   & FPT & FPT with \emph{p}PPT & FPT with \emph{np}PPT & Comments \\       \cmidrule{1-5}     IEC-61508-6 & $ \binom{n}{n-k+1} \lambda_D^{n-k+1} \tau^{n-k} \cdot \frac{\lambda_{DU}}{\lambda_{D}}$ & $\binom{n}{n-k+1} \lambda_D^{n-k+1} \tau^{n-k} \cdot \frac{(TCF)\lambda_{DU}}{\lambda_D}\left(\frac{\tau}{n-k+2}+MRT\right)$ & &      \\      &$\left(\frac{\tau}{n-k+2} +MRT\right)+\frac{\lambda_{DD}}{\lambda_{D}}(MTTR) $ & $ +\frac{(1-TCF)\lambda_{DU}}{\lambda_D}\left(\frac{\tau_{OH}}{n-k+2}+MRT\right)+\frac{\lambda_{DD}}{\lambda_D}MTTR  $ & & \\     Simplified  & $\binom{n}{n-k+1}\frac{(\lambda_{DU}\tau)^{n-k+1}}{n-k+2}$ &  &  &  \\     Formulas & & & & \\     Non-Approximate& $1-\sum_{x=k}^n \left[S(k,n,x) \cdot \frac{1-e^{-x \cdot \lambda \cdot \tau}}{x \cdot \lambda \cdot \tau} \right]$& $1-$ & $1-$ & $S(k,n,x) = \sum_{y=k}^n \left[\binom{n}{x} \cdot \binom{x}{y} \cdot (-1)^{x-y}\right] $ \\     Equations & & $\sum_{x=k}^n \left[S(k,n,x).\frac{1-e^{-x\lambda t_{TD}}}{x\lambda t_{TD}}.\frac{1}{m}.\sum_{i=1}^m\left(e^{-x(1-E)\lambda(i-1)t_{TD}}\right)\right]$&$\sum_{x=k}^n \left[S(k,n,x) \cdot \sum_{i=1}^m \left( e^{x \cdot (1-TCF) \cdot \lambda \cdot t_{i-1}} \cdot \frac{1-e^{-x \cdot \lambda \cdot t_{TDi}}}{x \cdot \lambda \cdot \tau} \right) \right]$ &$ \hspace{5 mm}\textrm{for}  \hspace{3 mm}  x=k,...,n$ \\     $\Delta$-Testing & $ \frac{n!(\lambda_{DU} \tau)^{n-k+1}}{(n-k+2)!(k-1)!}$ & $\frac{1}{m} \sum_{i=1}^m \sum_{j=0}^{n-k} \binom{n}{j} ((i-1)\lambda_b t_{TD} )^j \frac{(n-j)!(\lambda t_{TD})^{n-j-k+1}}{(n-j-k+2)!(k-1)!} $ &  &  \\      & &  $+  \frac{1}{m} \sum_{i=1}^m \sum_{j=n-k+1}^{n} \binom{n}{j} ((i-1)\lambda_b t_{TD})^j$& & \\        Policy & & & & \\                                 \bottomrule             \end{tabular}     \end{table}     \end{adjustbox}     \end{landscape}


title: When defining a new macro inside a new macro (in xparse) how do I make the internal map long?

text: I would like to use a DeclareDocumentCommand in order to be able to define a different command (using arguments from the first). I would like to make the internal arguments long. Here is the code I have as well as the output.               \documentclass{article}     \usepackage{xparse}     \begin{document}               \DeclareDocumentCommand{\DC}{m}{%     \DeclareDocumentCommand{#1}{+m}     {%     ##1     }     }          \DC{test}          \test{Will this          break?}     \end{document}      and I get an "unknown argument type e" error. However if I do               \documentclass{article}     \usepackage{xparse}     \begin{document}               \DeclareDocumentCommand{\test}{+m}{%     #1     }          \test{Will this          break?}     \end{document}      It works fine.


title: Addmargin on even and odd pages

text: I have large outer margins and I want some time more text, on the left for even pages and on the right for odd pages. I tried:               \begin{addmargin*}     ...     \end{addmargin*}      But the result is good only on the first page. Can anyone help me? Here is my MWE (after trying to implement solutions in Dennis's answer):               \documentclass{scrbook}      \usepackage[inner=1.5 cm,outer=5.5cm]{geometry}      \usepackage{lipsum}      %\usepackage{scrextend} % load it if you're not using a KOMA class      \usepackage{lipsum}      \begin{document}      \chapter{One}      \lipsum[1-6]      \section{One-one}      \lipsum[1-3]      \setlength{\oddsidemargin}{15.5pt}      \setlength{\evensidemargin}{15.5pt}      \lipsum[2-11]      \lipsum[1-12]      \setlength{\oddsidemargin}{0pt}      \setlength{\evensidemargin}{0pt}      \section{One-two}      \lipsum[1-3]      \end{document}


title: pgfplots - subplots with common legend

text: This is a followup question of this one. It uses the same MWE but about a different issue so a separate it here. I used Tikz node to create the custom legend but used absolute positioning to place it where I wanted it to appear (below the plots, in the middle). I always try to use relative positioning when I create my Tikz images, but I don't know how to do it here. Or maybe there is some totally different approach in producing subplots with common legend?


title: pgfplots, custom legend and tikz library external

text: I try to create Tikz figure with several `pgfplots` subplots. I want to have one legend for them since they all have the same curves. I found out from this question that i can label and than reference each curve. I used that to create simple legend at the bottom of the subplots. And it looked just fine when I tried it as a separate file. Then I put it in my thesis where I use the Tikz `external` library which solves the TeX memory problem I encountered before because I have many plots. The problem that occurs can be reproduced by this MWE:               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{external}     \tikzexternalize     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot coordinates { (0,0) (1,1) };\label{plot:p1}     \end{axis}     \node (A) at (1,-1) {\ref{plot:p1} Plot 1};     \end{tikzpicture}     \end{document}      which produces: ![enter image description here](http://i.stack.imgur.com/Gvpi3.png) instead of: ![enter image description here](http://i.stack.imgur.com/Sxpph.png) (I'm using just one plot here instead of subplots for simplicity). Notice the question marks for the missing reference in the first image. Of course, if I comment out the 4th line (don't use externalize) the reference turns out just fine (the second image). So I wonder: > How can I get the reference and still use externalize? P.S.: TexLive 2011 on Ubuntu 11.10


title: Vertical alignment with nested tables

text: It's almost embarrassing to ask: How can I vertically align the contents of one column to the top beside a second column holding nested tables. Please have a look at the minimal working example:               \documentclass{article}          \usepackage{booktabs}          \begin{document}          \begin{tabular}{cl}       \textbf{top/center} & \textbf{top/left} \\       \midrule       foo &       \begin{tabular}{ll}         bla & blub \\         bla & blub \\         bla & blub \\       \end{tabular} \\       \midrule       bar &       \begin{tabular}{ll}         bla & blub \\         bla & blub \\         bla & blub \\         bla & blub \\       \end{tabular} \\     \end{tabular}          \end{document}      In this example, "foo" and "bar" should be aligned to the top vertically and to the center horizontally. The nested tables should be aligned top left. The contents of the tables are filled dynamically. Thus, I cannot apply tricks like using `\raisebox` or something (or at least I don't know how to apply such tricks dynamically in my case).


title: Child's birthday invitation template

text: I am trying to do a birthday invitation for my daughter for her 4th birthday. Are there ready-made Latex templates available? So far I was just downloading some bitmap templates and using GIMP to fill it in, but the printed results are mediocre.


title: Different symbols in $...$ and align environments

text: Is there a way to force LaTeX to produce different symbols either in `$...$` or `\begin{align}...\end{align}` environments? For example               $ \mymacro $      should lead to > A while               \begin{align} \mymacro \end{align}      should produce > B ............................................................ (1) (without the dots).


title: correcting kerning for tikz shapes as accents in mid-word

text: I'm trying to place arrow shapes above certain letters in a text. I tried compensating for the extra space of the `tikzpicture` in mid-word, using `execute at begin picture` and its `end` pair. The results aren't very good, is there a better way of doing this? ![enter image description here](http://i.stack.imgur.com/KSueE.png)               \documentclass{minimal}     \makeatletter          \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{TeX Gyre Pagella}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{shapes.arrows}          \newcommand\toneUp[1]{%     \def\mychar{#1}%     \begin{tikzpicture}[         execute at begin picture={             \pgfmathparse{0.5*(1.6mm-\widthof{\mychar})}             \hspace*{-\pgfmathresult mm}         },         execute at end picture={             \pgfmathparse{0.5*(1.6mm-\widthof{\mychar})}             \hspace*{-\pgfmathresult mm}         }]         \node[inner sep=0pt, outer sep=0pt] (mychar) {\mychar};         \node[single arrow, minimum height=5mm, minimum width=7mm, single arrow head extend=3mm, single arrow head indent=1mm, scale=0.3, red, fill=red, rotate=90, above=0.3mm of mychar.north, anchor=west] {};     \end{tikzpicture}     }          \setlength{\parindent}{0pt}     \makeatother          \begin{document}          ārop\toneUp{i}tehi\\     paṇṇ\toneUp{ā}kār\toneUp{a}\\     bh\toneUp{ū}te          \end{document}


title: (Tikz) graphics: series of pictures _outside_ beamer-style frames and overlays?

text: I want to create a series of related graphs, for instance, higlighting the traversal through a graph. It works nice using overlays in beamer frames. Can I do analogous things in a normal document? Of course not an "overlay", but side-by-side pictures where the first gives the only<1>-part of the figure as shown in the presentation, the second the only<2>-part etc. Martin


title: \textsuperimposetilde does not superimpose as \sum subscript

text: Compiling the document, the tilde and `P` lie seperately under the \sum operator, but as the command `superimpose` would suggest, I would like them to be superimposed. Works just fine when using `\textsuperimposetilde{P}` as subscript for alphabetical characters.               \documentclass[11pt]{article}     \usepackage{geometry}                     \geometry{letterpaper}                             \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage{amsmath}     \usepackage{tikz-cd}     \usepackage{tikz}     \usetikzlibrary{matrix,arrows,decorations.pathmorphing}     \newcounter{qcounter}     \usepackage{fontenc}     \usepackage{marvosym}     \usepackage{wrapfig}     \usepackage{harpoon}     \usepackage{textcomp}     \usepackage{MnSymbol}     \usepackage{mathtools}     \usepackage{xfrac}     \usepackage[safe]{tipa}          \newcommand\sit[1]{%     \textsuperimposetilde{#1}}          \begin{document}          \[      \not{\text{S}}_{hkl}\, =\,  \sum_{\sit{P}}\, f_{{\sit{P}}_{a}}\, e^{[-i2\pi (hu_{p}+kv_{p}+ lw_{p}]}      \]          \end{document}


title: Drawing gluino with feynmf

text: Is it possible to draw gluino instead of curly or gluon line in feynmf (gluino line is zigzag with a line inside or curly with a line inside) Thanks. Here is my code:               \begin{fmffile}{feynman/phase_space}     \begin{fmfgraph*}(150,100)     \fmfleft{p1,p2}     \fmfright{t1,t2,chi1,chi2,t3,t4}     \fmf{fermion}{p1,vp}     \fmf{fermion}{p2,vp}     \fmflabel{$ P $}{p1}     \fmflabel{$ P $}{p2}     \fmflabel{$ t $}{t1}     \fmflabel{$ \bar{t} $}{t2}     \fmflabel{$ t $}{t3}     \fmflabel{$ \bar{t} $}{t4}     \fmflabel{$ \widetilde{\chi}_1^0 $}{chi1}     \fmflabel{$ \widetilde{\chi}_1^0 $}{chi2}     \fmf{curly,label=$\widetilde{g}$, label.side=right, tension=2}{vp,vg1}     \fmf{curly,label=$\widetilde{g}$, label.side=left, tension=2}{vp,vg2}     \fmf{plain}{vg1,t1}     \fmf{plain}{t2,vg1}     \fmf{dashes}{vg1,chi1}     \fmf{plain}{vg2,t3}     \fmf{plain}{t4,vg2}     \fmf{dashes}{vg2,chi2}     \fmfblob{.15w}{vp}     \fmfdot{vg1,vg2}     \fmffreeze     \fmfi{plain}{vpath (__p1,__vp) shifted (thick*(0,2))}     \fmfi{plain}{vpath (__p1,__vp) shifted (thick*(1,-1.5))}     \fmfi{plain}{vpath (__p2,__vp) shifted (thick*(0,2))}     \fmfi{plain}{vpath (__p2,__vp) shifted (thick*(1,-3))}     \end{fmfgraph*}     \end{fmffile}


title: Printing a cross across another symbol

text: Is there any command or macro for printing a character with a cross over it?


title: Shared counter (between description environments) results in "undefined control sequence"

text: The objective is to share the counter `SharedCTR1` across the description environments. The following code works with only one description environment, but not with both.               \documentclass{report}          \begin{document}          {\newcounter{SharedCTR}     \def\SharedCTR1{\stepcounter{SharedCTR}\arabic{SharedCTR}}          \section{Section one}          \begin{description}       \item[desc \SharedCTR1.] text text.       \item[desc \SharedCTR1.] text text text.       \item[desc \SharedCTR1.] text text text text.     \end{description}                                %% In original doc: extra curly bracket was here.               \section{Section two}          \begin{description}       \item[desc \myUseCaseCTR1.] text text.          % Fails on this line.       \item[desc \myUseCaseCTR1.] text text text.       \item[desc \myUseCaseCTR1.] text text text text.     \end{description}          \end{document}      I first thought the problem was the number `1` in the name but it still won't work if I remove it. The error is the following:               ! Undefined control sequence.     <argument> desc \myUseCaseCTR                                    1.     l.20   \item[desc \myUseCaseCTR1.]                                        text text.          % Fails on this line.      * * * [edit] In the original (long) document it was written, at some point, `\end{description}}`. There was an extra curly bracket `}` which was causing the error a few lines later when the variable was being used again in a different description environment. It took me awhile to spot the problem.


title: alltt package's \alltt{} makes a newline

text: `alltt` causes a line break (newline). How do i suppress this? I want something to the effect of `\verb+HELLO+` in that it does what `\begin{verbatim} \end{verbatim}` does except doesn't cause the line to break.                \documentclass{article}      \usepackage{alltt}           \begin{document}           The line will break HERE: \alltt{a}           \end{document}


title: How to follow the "Knuth license"

text: I want to use some of the code from `manfnt.mf`. Perhaps my situation is best summarized by this (draft) commit message (slightly edited to look okay when processed as markdown): > New file dbend.mf > > Copy of http://mirrors.ctan.org/systems/knuth/dist/lib/manfnt.mf, which has > a modification date of "1989-08-11 11:39:25" listed. > > http://ctan.org/tex-archive/systems/knuth/dist/lib says that this is under > the Knuth License (http://ctan.org/license/knuth): > > This software is copyright and you are explicitly granted a   >  license which gives you, the “user” of the software, legal   >  permission to copy, distribute and/or modify the software, so long as if > you modify the software then it carry a different name from the original > software. > > I have already renamed it preparatory to modifying it. (I was going to do > this regardless of the license because I plan to strip out everything but > the "dangerous bend" symbol.) I'm wondering:   1. Why don't `/usr/share/doc/texlive-base/copyright` or `/usr/share/doc/texlive-base/Licenses.gz` give a license for this file? All I could find was this in the latter:              misc:     texmf-dist/fonts/source/public/misc/*     texmf-dist/fonts/tfm/public/misc/*     texmf-dist/omega/ocp/misc/*     texmf-dist/omega/otp/misc/*     texmf-dist/tex/generic/misc/*     texmf-dist/tex/plain/misc/*        2. How does CTAN "know" that this license applies? ~~I didn't see anything about this in-tree, either on CTAN or on ftp.cs.stanford.edu ...~~ Oh, huh, in checking that I had the right domain just now, I noticed ftp://ftp.cs.stanford.edu/pub/tex/README.KNUTH, which seems to say something at least similar. (`manfnt.mf` is in ftp://ftp.cs.stanford.edu/pub/tex/dist/lib/.)   3. What should I put in the license blurb for my modified file, if I want to (say) CC0 my contributions?


title: How can I vertically align two minipages with subfigures and differing caption length?

text: Following "Placing two figures (each having subfigures) next to each other", I used the following code in order to place two figures with subfigures next to each other putting the subfigures vertically:               \documentclass{book}     \usepackage[demo]{graphicx}     \usepackage{caption}     \usepackage{subfig} % Needs subfig for this example.          \begin{document}          \begin{figure}     \begin{minipage}{.48\textwidth}     \centering     \subfloat[]{\includegraphics[width=.4\linewidth]{fig1}}\\     \subfloat[]{\includegraphics[width=.4\linewidth]{fig2}}     \caption{First figure with two subfigures with very very very very long caption}     \label{fig:testa}     \end{minipage}\hfill     \begin{minipage}{.48\textwidth}     \centering     \subfloat[]{\includegraphics[width=.4\linewidth]{fig3}}\\     \subfloat[]{\includegraphics[width=.4\linewidth]{fig4}}     \caption{Second figure with two subfigures}     \label{fig:testb}     \end{minipage}     \end{figure}          \end{document}       This is already the style that I wanted but it does not look very nice if the captions are different because this leads to the fact that the pictures placed next to each other are not at the same hight. How can I change this? I tried to place a minipage around every picture but this does not change anything. * * * **Edit** Actually, I think I have not really asked the right question, sorry! In fact, I have three subfigures in each `minipage`, each having a caption and these captions have a different length. In this case it does not help me to align the two figures at the top or bottom because the subfigures do still not match. Sorry for not having explained this better in the first place.


title: Header or footer of title page differs with that of main text

text: My purpose is that   1. every page except title page has same header and footer.   2. for title page,   ==> it has `exactly same footer` with that of other page.   ==> and it has `completely different header` with that of other page. By default, title page will switch to `plain` pagestyle. Then we can define whatever in it. In my case, since title page has same footer with that of other page, I first define a pagestyle for whole article, then redefine a different header in title page. This header is only local to title page and won't influence the header of other pages. After defining my own header `leftheadertitlepage` for title page, the footer of title page `disappeared`. If I used `fancyhdr`'s header, e.g., `\fancyhead[L]{whatever}`, the footer of title page will be there as I desire. In both cases, the header and footer for other pages are OK. So how to make title page have my own header and a general footer of whole article? Following is a small example. Please help check.               \documentclass[titlepage,a4paper]{article}          \usepackage{calc}     \usepackage[demo]{graphics}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\footrulewidth}{0.4pt}     \rfoot{\thepage}     \cfoot{}          \begin{document}          \begin{titlepage}     \thispagestyle{fancy}     \fancyhead{}     \renewcommand{\headrulewidth}{0pt}          \newcommand\leftheadertitlepage{%     \begin{tabular}[b]{@{}l}     \begin{minipage}[b]{0.6\textwidth}     \includegraphics{test}      \end{minipage}     Energietechnik GmbH \\     Gesch\"{a}ftsbereich\\     Energietechnik\\     \end{tabular}     }     \settototalheight\headheight{\maxof{\leftheadertitlepage}}     \lhead{\leftheadertitlepage}          \textbf{\Huge{title page}}     \pagebreak     \end{titlepage}     \lhead{}     \chead{demo}     whatever     \newpage     demo          \end{document}      With the help from Seamus and Matthew, I agree with Seamus's suggestion: ====================>   In title page, first, use the default pagestyle `plain`, then define the large image at the top that makes it look like a header. Finally, restore the pagestyle `fancyhdr` to make its footer exactly same with that of other pages.   <==================== Following is the updated code:               \documentclass[titlepage,a4paper]{article}          \usepackage{calc}     \usepackage[demo]{graphics}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\footrulewidth}{0.4pt}     \rfoot{\thepage}     \cfoot{}          \begin{document}          \begin{titlepage}     % by default, the pagestyle of title page is plain     \renewcommand{\headrulewidth}{0pt} % cancel out the decorative line          \newcommand\leftheadertitlepage{%     \begin{tabular}[b]{@{}l}     \begin{minipage}[b]{0.6\textwidth}     \includegraphics{test}      \end{minipage}     Energietechnik GmbH \\     Gesch\"{a}ftsbereich\\     Energietechnik\\     \end{tabular}     }          \newlength{\temp}     \settototalheight\temp{\maxof{\leftheadertitlepage}}     \vspace*{-\temp} % make the below image move up, then it looks like a header          \leftheadertitlepage % define the large image and put it at the top          \textbf{\Huge{title page}}     \thispagestyle{fancy} % restore fancyhdr pagestyle     \pagebreak     \end{titlepage}     \lhead{}     \chead{demo}     whatever     \newpage     demo          \end{document}      In the end, thank Seamus and Matthew again.


title: Romanian fonts in `bibtex`

text: I need romanian characters ş and ţ in citations. For this I updated chicago style (`chicago.bst` file) and for et. al. i replaced: first " ş.a. " but i got ?.a. instead second " \cb{s}.a." but i get the following error               \cb{s}.a.}{2007}]{Li2007a}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.[/code]      The WME is:               \documentclass[oneside,romanian]{scrbook}     \usepackage[]{fontenc}     \usepackage[utf8x]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{type1ec}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ucs}     \usepackage{hyperref}     \usepackage{natbib}     \usepackage{etoolbox}          \makeatother          \usepackage{babel}     \begin{document}     \cite{Li2007a,RouxSmart:95,Schwind:96,Wood1996,Haff1996}          \bibliographystyle{chicagoro}     \addcontentsline{toc}{chapter}{\bibname}\bibliography{D:/JURNALE/a,articles,D:/JURNALE/b}          \end{document}      link to bib file link to modified chicago style I tried in `\usepackage[utf8x]{inputenc}`, `utf8x` and `latin1` without succes. Because I use LyX and because I have limited time I cannot use `biblatex`. Edit: the result of the combelow \cb{s} command ![combelow \\cb{s} command](http://i.stack.imgur.com/Pljbm.png) Any clue would help!


title: How to use one footnote for many replicated citation using biblatex?

text: > **Possible Duplicate:**   >  Repeat the same reference in footnote on different pages I use biblatex package to render references as footnotes to facilitate accession to them. I noticed that when I'm trying to cite some reference many times in the same page, it places a new footnote for each citation. I want to place just one full citation footnote for replicated citations, so the output will be:   * One full citation footnote for replicated citations per page.   * A new full citation footnote for a citation (if it was cited for first time in this page) even it was cited in another page. (to clarify citations in printed versions). Note: I use `\footfullcite{}` to cite references.


title: Multiple citing

text: I am currently working on my bachelors degree and I am having trouble with BibLaTeX and Biber. The Problem is as follows: I want to cite the same paper more than once, and I want it to appear at the bottom of the page everytime too, but with the same number as the first cite. I am using the `chem-angew` style, so I can get a footnote cite with `\footfullcite`, but if I use it more than once for the same paper, the numbers in the literature at the end of the document get messed up. Is it possible to cite the same paper multiple times within a document with `\footfullcite`?


title: Include pdf-graphic without including the whole pdf

text: I have drawn a lattice in latex with tikz, successfully compiled it to a pdf and been able to include it in my document. However, the whole PDF (i.e. A4 page) is included and I only want to include the lattice I have drawn. Is it possible to automatically only include that lattice and not all the "blank space" around it? (I know "crop" is an option, but if I want to change the lattice so that it changes size, it will be a bother to update the crop coordinates all the time.)


title: Name "Chapter" is not showed in the table of the content

text: In my LaTeX code I add the line               \tableofcontents      And begging of each chapter i have these lines.               \renewcommand{\vspace}[2]{}\chapter{ }     {\huge\bf Introduction}     \addcontentsline{toc}{chapter}{Introduction}      When i compile my code it shows               1                                                                                5         Introduction                                                                  5             1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5     2                                                                                6         Computing                                                                     6             2.1 Computing type . . . . .... . . . . . . . . . . . . . . . . . . . . . 6      Like this, But I want to get the "Chapter" name to in front of the number like this.               Chapter 1          Introduction              1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5     Chapter 2          Computing              2.1 Computing type . .  . . . . . . . . . . . . . . . . . . . . 6      How can I do that?


title: width multicolum not sum of combined cells

text: I have the following table, but the multicolumn cell width is not the same as the sum of the cells it is combined from. I assume, this is caused by some margins in each cell, i.e. that the cel width (distance between the two vertical lines) is equal to the set cell width plus some margin - but what is this margin, or what is the easiest way to set the width of the multicolumn cell to be equal to the sum of the widths of the cells it is combined of? Thanks               \documentclass[10pt]{article}     \usepackage{array}          \begin{document}          \begin{tabular}         {|>{\raggedright}p{2cm}l|>{\centering}p{0.9cm}|>{\centering}p{0.9cm}|>{\centering}p{0.9cm}|}         \hline           &  & {March} & {April} & {May}\tabularnewline         \hline          \multicolumn{2}{|c|}{{Species}} & \multicolumn{3}{>{\centering}p{2.7cm}|}{{This is the problem cell, as it has not the width as the ones combined}}\tabularnewline         \hline      \end{tabular}          \end{document}      results in the following table: ![results in this table](http://i.stack.imgur.com/UmS5M.png)


title: Different graphic formats in a document

text: I have a large LaTeX document with figures in .eps, .pdf, .png, .tif(f), .jpg formats as well as `pstricks` code and `psfrag` fragment. One approach to compile this document is to use an external program like Illustrator to convert all files to .eps and then use the trusted `latex`+`dvips`+`ps2pdf` path; but this is tedious. I have not found any other approach that really works:   1. Using `epstopdf` (with appropriate conversion rules) with `pdflatex` handles everything except psfrag fragments   2. `auto-pst-pdf` with `pdflatex` cannot handle .tif(f) files I was wondering if anyone knows a workaround to make either `epstopdf` consistent with `psfrag` or to make `auto-pst-pdf` to handle .tif(f), or maybe suggest a better approach.


title: rename table name in beamer

text: hello i need rename `cuadro` for `tabla`. i use this command but no work.               \renewcommand{\listtablename}{Índice de tablas}     \renewcommand{\tablename}{Tabla}      the command work in latex normal but no beamer presentation. the beamer presentation show CUADRO y i want show TABLA. Someone had the same problem? thanks and greetings.


title: Follow up: How to add a page number on the bottom of the first pages in table of contents, list of figures/tables and bibliography?

text: I managed to provide MWE (thanks to @lockstep) for the problem previously described here How to add a page number on the bottom of the first pages in table of contents, list of figures/tables and bibliography?. The problem is that I am using `\pagestyle{uheadings}`, and it prevent the solution to work.               \documentclass[12pt,a4paper,oneside]{mwbk}          \usepackage{polski}     \usepackage{natbib}          \makeatletter           \let\ps@opening\hf@plain    %it works without adding uheadings     \makeatother          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     \end{filecontents}          \usepackage{lipsum}          \begin{document}          \pagestyle{uheadings}         %this is what I added.          \tableofcontents          \chapter{foo}     \thispagestyle{plain}         %this is what I added.          Some text \citep{A01}.          \lipsum[1-10]          \bibliographystyle{asr}     \bibliography{\jobname}          \end{document}       Have you any idea how to include page numbers on the bottom of the first pages in table of contents, list of figures/tables and bibliography while using `uheadings`?. `\thispagestyle{plain}` works for chapters.


Trying to use BibTex in texmaker, but whenever I have \cite{stuffs} it gives an error. Specifically the error: ! Paragraph ended before \@citex was complete. \par l.25 I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best. I need to make this work. Please help.


title: How to make vim short key for xelatex and pdflatex both?

text: I have learned that the following setting in _vimrc will let `\ll` compile by engine `pdflatex`:               let g:Tex_DefaultTargetFormat='pdf'     let g:Tex_CompileRule_pdf = 'pdflatex -aux-directory=F:/Vim/my_latex_doc/temp --synctex=-1 -src-specials -interaction=nonstopmode $*'      My problem is can be make some modification such that it will compiled by `xelatex` when I press `\lx`?


title: Verbatim environment that can break too long lines?

text: I want to generate a PDF of user-submitted text using LaTeX. To handle crazy user input, I first thought about using the `verbatim` package, but of course it doesn't break up too long lines. Is there some package that works similar to `verbatim` (i.e., accept any input) but formats the text nicely?


title: Switching between single- and multi-column format

text: I'm trying to create a pdf for a journal where the authors are in multiple column format but the rest of the document/text is not. How can I get this to work? It auto formats the rest of my document into two columns. I'm exporting it to pdf and I'm using TeXworks.               \documentclass[10pt,twocolumn]{article}          \title{Article Title}     \author{         First Author\\         Department\\         school\\         email@edu       \and         Second Author\\         Department\\         school\\         email@edu         \and         Third Author\\         Department\\         school\\         email@edu         \and         Fourth Author\\         Department\\         school\\         email@edu     }     \date{\today}          \begin{document}          \maketitle          \begin{abstract}     This part should be in a single column.     \end{abstract}          \section{Introduction}     \ldots           \end{document}


title: Are theorems, lemmas etc as new paragraphs or as in a paragraph?

text: Curious about skips above and below them and the indentation.


title: Getting missing $ error but I don't know where to put it

text: Newbie in LaTeX here. On this the line I'm getting "missing $" error but I don't know where exactly it wants me to put it:               $g_2 $= $N_2${$f_2$ - (\underbrace($\int_a^b g_1^{*}f_2dx$)_{$g_1^t\cdot f_2$} $g_1$}\\      Someone help?


title: Equation numbers are shown in reverse parentheses

text: I am using               \begin{equation} a = b \end{equation}      to write the equations in my paper. However, the problem is that the number related to each equation is not shown in the correct format like the picture ![wrong numbering format](http://i.stack.imgur.com/JJ7AU.png) How can I fix this? This is what I have at the first of my code:               \usepackage{graphicx}     \usepackage[justification=centering]{caption}     \usepackage{float}     \usepackage{url}% typeset urls     \usepackage{times}     \usepackage{url}     \usepackage{latexsym}     \usepackage{fontspec}     \usepackage{multirow}     \usepackage{listings}     \usepackage{setspace}     \usepackage{listings}     \usepackage{fontspec}     \usepackage{amsmath}     \usepackage{polyglossia}     \usepackage{color}     \usepackage{bidi}     \newfontfamily\faFont[Script=Arabic]{Yas}      \newenvironment{Fa}{\begin{RTL}\faFont}{\end{RTL}}     \newcommand{\fa}[1]{{\faFont\RL{#1}}}     \newcommand\Mark[1]{\textsuperscript#1}     \definecolor{backcolour}{rgb}{0.95,0.95,0.92}     \definecolor{darkblue}{rgb}{0.95,0.95,0.92}     \setmainlanguage{english}     \setotherlanguage{farsi}     \newfontfamily\farsifont[Script=Arabic]{Yas}


title: How do I nest subdrawings in a bigger drawing in TikZ?

text: I want to draw several complex drawings and put them all together in a bigger TikZ drawing. How do I do that? So far, this is what I have done:               \documentclass[preview]{standalone}          \begin{document}     \begin{tikzpicture}       \draw[help lines] (0,0) grid (10, 10);            \node (rectifier) at (0,0) {         \begin{tikzpicture}           \node (sine) at (1.25,3) {             \begin{tikzpicture}[scale=0.4]               \draw (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0);             \end{tikzpicture}           };           \node (rect) at (2.75,1) {             \begin{tikzpicture}[scale=0.4]               \draw (0,2) sin ++(1,1) cos (2,2) sin (3,3) cos (4,2) ;             \end{tikzpicture}           };           \draw (0,0) rectangle (4,4) -- (0,0);         \end{tikzpicture}       };     \end{tikzpicture}     \end{document}      **Problem:**   I want the whole `(rectifier)` box and all its contents to be scalable from the top level, like so:               \node (rectifier) at (0,0) {       \begin{tikzpicture}[scale=0.5]       ...       ...       ...      But it scales only the box, and not the sinusoid drawings. **Extension:**   Is there an "object-oriented" paradigm in TikZ, where I can declare classes of objects and simply instantiate them in a bigger drawing?


title: How to join the left end of an arrow with a line?

text: \documentclass[a4paper,twoside]{article}     \usepackage{xypic}     \begin{document}          \xymatrix{     A\ar@{-} [rr]  & & D\ar @{-}[r] & E\\      L\ar @{-}[rrr]              &         &         & M \\     P\ar[rrr]\ar[uu]  & R\ar[ruu] & S & T\ar @{-}[uu]     }          \end{document}        This produces the following diagram : ![Commutative  diagram](http://i.stack.imgur.com/PWcax.png) But, I would like to produce the diagram below : ![Adjusted diagram](http://i.stack.imgur.com/NAWh5.png) How can I do this using the package `xypic`?


title: Center a column in align

text: I have the following type of code in my document:               \begin{align*}            (-m)+m & \stackrel{\mathrm{Ax 1.1 (i)}}{=}  m+(-m)\\       &\stackrel{\mathrm{Ax 1.4}}{=}  0 \\      I want to align on the `=` but that is complicated by the fact that there is something hovering over it. It would seem to be easier to align their centers (no matter what, that is where the `=` will be). How can I center a column in `align` (or `align*` to be honest, I am not that clear on the difference)


title: problems with lion 10.8.3 on the last iMac 27"

text: I have tried to typeset very basic documents and it does not work! It cannot find documents like `book.class` or `bk12.clo`. I have checked all settings and seem OK (at least the work very well on my airbook an d on any other mac I have ever used). Is there somebody knowing what to do?


title: Is it okay for a command to slurp more arguments than it is passed to?

text: Is it okay for a control sequence `\foo` to include another control sequence `\slurp` which slurps more arguments than `\foo` actually passes to it? For example, is it okay to do this:               \documentclass{article}          \newcommand\foo  [1]{#1 \slurp}         \newcommand\slurp[3]{#1 #2 #3}          \begin{document}     \foo{a}{b}{c}{d}     \end{document}      Instead of this?               \documentclass{article}          \newcommand\foo  [4]{#1 \slurp{#2}{#3}{#4}}         \newcommand\slurp[3]{#1 #2 #3}          \begin{document}     \foo{a}{b}{c}{d}     \end{document}


title: Displaying long division manually with some caveats

text: Due to odd circumstances, I need to present long division manually (in math mode). That is, without using a macro. Moreover, I cannot use `\multicolumn` or `\cline`. Normally, I would do:               \[     \begin{array}{cccc}     & 0. & 7 & 5 \\ \cline{2-4}     \multicolumn{1}{c|}{4} & 3. & 0 & 0 \    & 2. & 8 & \\ \cline{2-3}     & & 2 & 0 \    & & 2 & 0 \\ \cline{3-4}     & & & 0     \end{array}     \]      but is there a way to obtain similar results without `\multicolumn` or `\cline`? I'm also open to options using asymptote. I'm not looking for a generator as they don't insert a 0 when the divisor does not go into the dividend. I'd like a manual way of doing this that looks half- way decent.


title: Problem with algorithm2e and portuguese option

text: I have this little algorithm with two For statements and one if-else. I'm using the option `portuguese` on the preamble and here's the problem: instead of displaying the words " _faça_ " and " _fim_ " (do and end, respectively), I get " _hacer_ " and " _fin_ ". Here's my preamble:               \documentclass{article}     \usepackage{cmap}     \usepackage{lmodern}                 \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}      \usepackage[brazil]{babel}     \usepackage{lastpage}     \usepackage{indentfirst}     \usepackage{color}           \usepackage{graphicx}            \usepackage{amsmath}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{multirow}     \usepackage[brazilian,hyperpageref]{backref}         \usepackage[alf]{abntex2cite}     \usepackage[portuguese]{algorithm2e}      And here's the code:               \begin{document}     \begin{algorithm}[htbp]     \SetAlgoLined     \LinesNumbered     \Dados{audio, tamanho, nivel, filtro, ch}     \Entrada{i, j, inicio, comprimento}     \BlankLine     $inicio \leftarrow 0$\;       $comprimento \leftarrow tamanho$\;     \Para{$i \leftarrow 0$ \Ate $i<nivel$}{         $inicio \leftarrow 0$\;     $comprimento \leftarrow tamanho/2^{i-1}$\;     \Para{$j \leftarrow 0$ \Ate $j<2^{i-1}$}{             \eSe{j é par}{                     transformada\_wavelet(audio[inicio],comprimento, 1,'n', filtro, ch)\;                 }{                     transformada\_wavelet(audio[inicio],comprimento, 1,'i', filtro, ch)\;                 }             }     }     \caption{A DWT-packet}     \label{alg:dwtp}     \end{algorithm}     \end{document}      The result (i'm using pdfLaTeX on Windows):               ...     para i ← 0 até i < nível hacer     ...     para j ← 0 até j < 2^(i-1) hacer     ...      If I put `\SetKwFor{Para}{para}{fa\c{c}a}{fim para}` on the TeX file, I get the right output. But this command is on the package already. Why doesn't it work?


title: \moderncvicons{awesome} giving error!

text: I'm getting an error when compiling a resume of moderncv, with pdflatex in Mageia 2 i586 and TEXlive 2011. Why? First I added the command `\moderncvicons{awesome}`, then I added `\usepackage{fontawesome}` and `\usepackage{fontspec}`. Still getting error mgs, I wrote a simple *.tex file and compiled it with XeLatex, just to try out `fontawesome`:               \documentclass[a4paper,11pt]{article}     \usepackage{fontspec}     \usepackage{fontawesome}     \usepackage[english, italian]{babel}          \begin{document}     \faLinkedinSign     \end{document}      Guess what? Yes, still getting errors! Can you please help me understand what's the problem? I even tried looking for TeXlive 2013 for Mageia but it's not out yet.


title: Change linewidth for the whole document, while keeping fancyhdr wide?

text: Somebody noticed that `\abstract` changes the linewidth for the whole document (here). The problem was the syntax: with correct syntax as below this is avoided.               \begin{abstract}      This is an abstract. This is an abstract.      \end{abstract}      while this keeps the linewith for the rest of the document:               \abstract     This is the abstract      But what if I want to intentionally keep the linewidth the same for the rest of the document, but use correct syntax? Is there a way of knowing the linewidth used in the abstract and setting it manually? This is interesting, if one uses the `fancyhdr`package, and one wants the headers be wider than the text.


title: How do I draw a graph in tikz where the vertices are only represented by the label names?

text: Right now, what I have is               \documentclass[11pt]{article}     \usepackage{tikz}     \usepackage{tkz-graph}     \tikzstyle{vertex}=[circle, draw, inner sep=0pt, minimum size=6pt]     \newcommand{\vertex}{\node[vertex]}     \begin{document}          \begin{center}         \begin{tikzpicture}[scale=0.7]             \vertex[label=$p_1$](p1) at (-1,1.5) {};             \vertex[label=$p_2$](p2) at (1,1.5) {};             \vertex[label=$p_3$](p3) at (-1,0) {};             \vertex[label=$p_4$](p4) at (-1,-1.5) {};             \vertex[label=$p_5$](p5) at (1,-1.5) {};         \tikzset{EdgeStyle/.style={->}}             \Edge(p1)(p3)             \Edge(p3)(p4)             \Edge(p1)(p5)             \Edge(p2)(p4)             \Edge(p2)(p5);         \end{tikzpicture}     \end{center}          \end{document}      which produces the following: ![bad things](http://i.stack.imgur.com/cyhlo.png) I am fairly new to tikz so I apologize if this is a dumb question, but how do I get it so that, instead of circles, the vertices will only be displayed as the text labels $p_1$, $p_2$, etc. (which should be positioned where the circles currently are)? There will also probably need some padding around the labels so the arrows don't run overlap with them. I'm not sure how to do either of these things.


title: How can one put a marker to every page in a chapter?

text: I am trying to create some sort of tabbing for a template am designing. I want the title page to have the colors of the chapters and then all of the pages within a chapter to have a marking as shown below. The title page should use the page height and split it with respect to the total number of chapters. The rectangles shown should follow an odd-even page criteria so that the display is proper. Here is a sort of a MWE:               \documentclass[12pt,twoside,letterpaper]{report}          \usepackage[text={4.95in,7.5in},centering,bottom=1.5in,showframe]{geometry}     \usepackage[dvipsnames]{xcolor}     \usepackage{tikz}     \usepackage{lipsum}     \usepackage{fancyhdr}     \usetikzlibrary{calc}          %-------------------------------------------------------------------------     %                        Chapter Page Header/Footer      %-------------------------------------------------------------------------     \fancypagestyle{plain}{%     \fancyhf{} % clear all header and footer fields     \fancyhead{} % clear all header fields     \fancyfoot{} % clear all footer fields     \fancyhead{     \ifodd\thepage         \tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north east) rectangle ($(current page.east)+(-0.5,9)$);}     \else     \tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north west) rectangle ($(current page.west)+(0.5,9)$);}     \fi     }     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }     %-------------------------------------------------------------------------     %                       Header/Footer Page Styles     %-------------------------------------------------------------------------     \fancyhead{} % clear all header fields     \fancyfoot{} % clear all footer fields     \fancyfoot[RO]{\thepage$|$}     \fancyfoot[LE]{$|$\thepage}     \fancyhead{     \ifodd\thepage         \tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north east) rectangle ($(current page.east)+(-0.5,9)$);}     \else     \tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north west) rectangle ($(current page.west)+(0.5,9)$);}     \fi     }     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \pagestyle{fancy}          \begin{document}          \title{Your Paper     \tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north east) rectangle ($(current page.east)+(-0.5,9)$);}     \tikz[remember picture, overlay]{\draw[fill=magenta] ($(current page.north east)+(0,-5)$) rectangle ($(current page.east)+(-0.5,4)$);}}     \author{You}          \maketitle     \newpage     \chapter{Test 1}     %\tikz[remember picture, overlay]{\draw[fill=cyan] (current page.north east) rectangle ($(current page.east)+(-0.5,9)$);}     \newpage     %\tikz[remember picture, overlay]{\draw[fill=magenta] ($(current page.north east)+(0,-5)$) rectangle ($(current page.east)+(-0.5,4)$);}     \chapter{Test 2}     \lipsum     \chapter{Test 3}     \lipsum     \end{document}      ![enter image description here](http://i.stack.imgur.com/0nfox.png) ![enter image description here](http://i.stack.imgur.com/fgBXr.png) Note that chapter 2 should have the magenta color with the marker shifted down by the right amount. I was thinking with a `foreach` statement but I don't know how to test if you are still in chapter 1 or 2 and so on. I think the tricky part will be then to set the colors depending on the amount of chapters. So probably having a default say 20 colors to be used in order as they appear (and hence allowing the user to decide what colors to use and for which chapter) for the chapter markers would be good.


title: Equivalent of \DTLiflastrow

text: With the `datatool` package there is a `\DTLiffirstrow`. I am looking for a similar command to detect the last row, `\DTLiflastrow`, but could not find one. I attempted to create my own but was not successful. If the title row is separate form the data one can use               \DTLiffirstrow{\\\Midrule}{\\\cmidrule{1-2}}      to produce the horizontal lines as in: ![enter image description here](http://i.stack.imgur.com/9XF62.png) But if the title is part of the data, I don't see how to do that without an equivalent of `\DTLiflastrow`. Without which I get an extra blank line at the bottom: ![enter image description here](http://i.stack.imgur.com/ztCJk.png) If you un-comment my attempt of `\DTLifLastRow` you get: > ! Missing number, treated as zero. `\dtlrows@` ## Code:               \documentclass{article}          \usepackage{datatool}     \usepackage{booktabs}     \def\Midrule{\midrule[\heavyrulewidth]}          % Make csv in question     \usepackage{filecontents}     \begin{filecontents*}{scientists2.csv}     name,surname,     First,Last     Albert,Einstein,     Marie,Curie,     Thomas,Edison,     \end{filecontents*}          \newcommand{\DTLifLastRow}[3]{%         % #1 = db         % #2 = code for last row         % #3 = code for all other rows             \dtlifnumeq                 {\DTLrowcount{#1}}                 {\DTLcurrentindex}% {\value{DTLrowi}}%                 {#2}{#3}%     }          \begin{document}          \DTLloaddb{myDB}{scientists2.csv}     %\DTLdisplaydb{myDB}% Useful for debugging.          \begin{tabular}{ll}\toprule         \textbf{First Name} & \textbf{Last Name}%         \DTLforeach*{myDB}{\Name=name,\Surname=surname}{%             \DTLiffirstrow{\\\Midrule}{\\\cmidrule{1-2}}%             \Name & \Surname         }%         \\\bottomrule     \end{tabular}          \bigskip\noindent     But what if the first row of the table was the header row.     How do I produce the above table format without the manual header.     \medskip          \begin{tabular}{ll}\toprule         \DTLforeach*{myDB}{\Name=name,\Surname=surname}{%             \Name & \Surname             \DTLiffirstrow{\\\Midrule}{\\\cmidrule{1-2}}%             %  I think I need to replace the above with something like this:             %\DTLiffirstrow{\\\Midrule}{%             %       \DTLifLastRow{}{myDB}{\\\cmidrule{1-2}}%             %}%         }%         \\\bottomrule     \end{tabular}     \end{document}


title: Undesired equal sign in beamer using \dimexpr

text: I'm using the following script in beamer to locate our logo at the right-most corner of all pages in the presentation,               \begin{textblock}{5}(10.0, \dimexpr 0.5\headheight - 7.5pt )        \includegraphics[width=40pt]{logo.png}     \end{textblock}      The placement of the textblock in the page is fine, however there is an undesired equal sign (see added image) in the page. It's the first time I use `\dimexpr`, do I make a mistake? ![enter image description here](http://i.stack.imgur.com/0JfCE.png) I think this undesired equal sign comes from `\dimexpr 0.5\headheight - 7.5pt` this part of script. Because when I replace it with, for example, `1`, the equal sign goes. I just tried to do something `\dimexpr 15pt - 7.5pt` it still gives an undesired equal sign.


title: Printing backslash from a luacode* environment

text: My first attempt with LuaLaTex gave me some headache, trying to generate LaTex code from within LuaLaTex. This required me to print the backslash (to get a LaTeX control sequence).. I think I have found a solution now, but maybe this could also be of interest to others, so I try to post it here as question anyway.. (See also the following questions Printing LaTeX code in LuaTeX and How does one insert a backslash or a tilde into LaTeX?) From the `luacode` package documentation, page 2 it says: > The variant luacode* goes further and makes even backslash a normal > character Consider the following code:               \documentclass{article}     \usepackage{luacode}     \begin{document}     \begin{luacode*}       tex.sprint("\");     \end{luacode*}     \end{document}      Compiling this with `lualatex` gives the error               ! LuaTeX error <\directlua >:1: unfinished string near '"");'.     \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 }      Then I thought I just have to add another backslash to escape the first:               tex.sprint("\\");      But now I get the error:               ! Undefined control sequence.     l.1 \


title: elsarticle with latest version of pgfplots

text: I want to submit a paper to Elsevier using it's `elsarticle` class. My document uses some commands from the latest version of `pgfplots`. However, Elsevier uses a TeXlive distrubution with `pgfplots v1.2.2`. Has anyone resolved this issue? Is it possible to upload a later version of pgfplots for their building process?


title: autonum, amsmath and \qedhere

text: I have a weird behavior of the `\qedhere` command while using `amsmath` in combination with `autonum`. Consider the minimal (not working) example below: In unreferenced equation with `\qedhere` (Theorem 2) the qed symbol is not shown at all. Not using the `autonum` package obviously resolves this issue, but then both equations are numbered. Is there a way to get `\qedhere` working with `autonum`? Another (maybe related) problem occurs if the `\usepackage{amsmath}` \- line is commented out. Now the second, unreferenced equation gets the right qed symbol but the referenced equation does not display correctly (the diamond is shown in front of the numbering "(1)" ).               \documentclass{article}                          \usepackage{amsmath}                 \usepackage{amsthm}                          \usepackage{thmtools}                    \usepackage{autonum}                   \declaretheoremstyle[qed=$\diamondsuit$]{myTheorem}     \declaretheorem[style=myTheorem]{theorem}          \begin{document}     Refer to equation \ref{eq:eq1}.     \begin{theorem}     \begin{equation}\label{eq:eq1}     a = b+c \qedhere     \end{equation}     \end{theorem}          \begin{theorem}     \begin{equation}     a = b+c \qedhere     \end{equation}     \end{theorem}          \end{document}


title: Remove Formatting in Table of Contents

text: I have custom colouring in the section headings, i.e. `\section{\textcolor[red]{Heading}}`, so when I use `\tableofcontents` it prints the table of contents including all the unnecessary colouring. Is there a way I can print the table of contents in all black text, but keep the actual colour coding I did for the sections?


title: A LaTeX log analyzer application (visualizing TeX expansion)

text: Consider the following MWE, `test.tex`:               \documentclass[12pt]{article}          \begin{document}          \tracingassigns=1     \tracingmacros=1          \def\aaa{something}     \def\bbb{else \aaa, else}     \edef\ccc{third \bbb, level}          \tracingassigns=0     \tracingmacros=0          \end{document}      If you build this with `pdflatex test.tex` \- then in the logfile, `test.log`, you get something like this ( _linebreaks added for legibility_ ):               {into \tracingassigns=1}     {changing \tracingmacros=0}     {into \tracingmacros=1}               {changing \aaa=undefined}     {into \aaa=macro:->something}          {changing \bbb=undefined}     {into \bbb=macro:->else \aaa , else}          \bbb ->else \aaa , else          \aaa ->something          {changing \ccc=undefined}     {into \ccc=macro:->third else something, else, le\ETC.}               {changing \tracingassigns=1}      Now, this explains the expansion steps done by (La)Tex quite well for this short example - unfortunately, it becomes extremely hard to read (for me) once you have to deal with possibly hundreds of these expansions, some maybe dealing with typesetting procedures. So I was thinking - it shouldn't be too extremely difficult to build an application, which would basically read the logfile line by line, and allow for "stepping" through the logfile; I'd imagine rightarrow keyboard key `->` would step you forward through the log, and leftarrow key `<-` would step backwards; possibly, one could specify line number of the logfile as a starting point as well. Then, the application would simply react on '`^{changing`', '`^{into`', and possibly '`^\\(.*)->(.*)`'; and would display the line, as well as the "current" token elsewhere on screen; so at the "changing" line, the extra portion of the screen would say `\aaa=undefined`; and upon "into" line, the snippet would change to `\aaa=macro:->something`. I think just this facility would make visualizing and understanding the (La)Tex expansion process much more easy (especially in "real" documents). And in fact, such an application doesn't even need a full-blown GUI - I'd imagine a `ncurses` terminal application would do just as well (problems with display of long strings in limited width terminal notwithstanding). So, I was wondering - is there any application similar to this out there?


title: Aligning minipages inside list environment

text: I use an own environment to typeset exercises with exercise-numbering at the left and exercise-body at the right. When I want to put two minipages in the exercise-body, they aren't aligned anymore with the exercise-number. `\noindent`before the minipage dosen't work. See the MWE:               \documentclass{article}     \usepackage{lipsum}     \usepackage{tikz}          \newlength{\exlmargin}     \setlength{\exlmargin}{0.1\textwidth}          \newcounter{exnum}     \setcounter{exnum}{1}     \newcommand*{\points}{}          \newenvironment{exc}[1]{%         \renewcommand*{\points}{#1}%         \begin{list}{}{%             \setlength{\leftmargin}{\exlmargin}%             \setlength{\labelwidth}{0pt}%             \setlength{\itemindent}{0pt}%         }%         \item[]%         \makebox[0pt][l]{%  % Put a null-wide box for exercise number.             \hspace{-\parindent}%             \hspace{-\exlmargin}%             \makebox[\exlmargin][l]{\arabic{exnum}\refstepcounter{exnum}}%             \hss%   % Put a infinite shrink (and stretch) to avoid overfull of th null-wide box.         }%         \ignorespaces}{%    % Let (La)TeX ignore the spaces following         \ifnum \points>0 \hspace*{0pt} \hfill \mbox{(\points\ PTS)} \fi%         \end{list}%     }               \begin{document}          \begin{exc}{4}         \lipsum*[2]     \end{exc}          \begin{exc}{2}         \begin{minipage}[t]{0.5\linewidth}\vspace{0pt}             \lipsum*[2]         \end{minipage}%         \begin{minipage}[t]{0.5\linewidth}\vspace{0pt}             \begin{tikzpicture}                 \draw (0,0) rectangle (\linewidth,3);             \end{tikzpicture}         \end{minipage}     \end{exc}          \end{document}      ![No alignment between the 2 and the body while using minipages.](http://i.stack.imgur.com/Yrid2.jpg) What to do to align the number and the body while using minipages? BTW: Any clue how to get the _(2 PTS)_ aligned with the last line of the left minipage? ## Edit I realized that the spacing has also an issue when using a tabular in the exercise-body:               \begin{exc}{2}         \begin{tabular}{cc}             text&text\\             text&text\\             text&text\\         \end{tabular}\par     \end{exc}      ![enter image description here](http://i.stack.imgur.com/sIxJQ.jpg)


title: How to arrage multiple figures?

text: I try to arrage multiple figures in one page, but I failed. I hope they display as follow: ![enter image description here](http://i.stack.imgur.com/7lHuN.png) Any suggestion will be greatly appreciated.


title: How to avoid the break of framed/shaded?

text: I have a problem with the `framed` environment. I am writing a document (article), and several parts of it have a gray background. Unfortunately, when a new page comes, such a shaded environment is cut in half :( How can I avoid this? (with no use of `\newpage...`) Example: In the document generated by this code, I would like the second shaded environment to be placed in the second page:               \documentclass{article}     \usepackage{framed,color}     \definecolor{shadecolor}{gray}{.75}     \begin{document}     \begin{shaded}     Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text     \end{shaded}     \begin{shaded}     Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text     \end{shaded}     \end{document}


title: Making large substack more readable?

text: I have the following code:               \[\mathcal{I}(A,B) = \inf_{\substack{h : M\times I\rightarrow M\\                                  h(\cdot,t) \;homeomorphism\\                                 h(x,0) = x\;\forall\; x\in X\\                                         h(A,1) = B                                   }} \max_{x\in X} \text{len} \;h(x, \cdot)\]      But the conditions in my substack are very tiny with respect to the rest of the equation. ![enter image description here](http://i.stack.imgur.com/Md9jh.gif) Is there a way to increase the size of just the text in the substack? Maybe the spacing as well?