title: lstlisting environment ignores tabs

text: I have this LaTeX code:                   \lstset{         language=Java,         tabsize=8,         keepspaces,         extendedchars=true,         rulecolor=\color{black},         basicstyle=\footnotesize,         aboveskip=5pt,         upquote=true,         columns=fixed,         showstringspaces=false,         extendedchars=true,         breaklines=true,         frame=single,         showtabs=true,         showspaces=false,         showstringspaces=false,     }          \begin{frame}[fragile]     \begin{lstlisting}         public class Teddy {             public MethodName(String name, int var) {                  this.name = name;             }         }     \end{lstlisting}     \end{frame}      Beamer ignores my tabs inside the lstlisting because my frame is fragile. But I need it to be fragile, because I get the "Runaway Argument"-Exception, when there is no fragile. What can I do, except importing the Lsting from an external file? I don't want to define a new command for each source code listing, like proposed in this solution: How to prevent beamer.sty from removing the tab alignment of lstlisting.sty ?


title: Writing several lines before chapter title

text: How can I get the style like: * * * # chapter 1 bla bla bla bla ... bla bla bla bla ... * * * A paragraph before chapter title --- this line is precisely on place where the first line of the other pages start. the second line # chapter 2 bla bla bla bla ... * * * # chapter 3 bla bla bla bla ... * * * This question is concerned with Why chapter label below the section label on new page even if by setting same spacing before title (use titlesec package)? **Edit** (for Yiannis) Thanks. However, that isn't my demand. See below ![enter image description here](http://i.stack.imgur.com/Emp4G.png).


title: How to right align a table in a tikz picture

text: I currently have set up a command that draws a box with a shadow and some text inside that box. I want it to have a minimum-width, but when I set it, the table is now aligned in the center of the box when the table is smaller than the boxes width. I'd like it to be right-aligned. Here's the current setup:               \documentclass{scrlttr2}     \usepackage{tikz}     \usepackage{color}          \usetikzlibrary{shadows}          \definecolor{myblue}{rgb}{0, 0.58, 0.85}          \newcommand*\invhead[1]{\sffamily{\color{myblue}\footnotesize{\textbf{#1}}}}          \tikzstyle{shadedbox} = [       draw=black,       shade,       top color=white,       bottom color=bottom,       drop shadow={         top color=black,         bottom color=black,         shadow xshift=2pt,         shadow yshift=-2pt,       },       thin,       rectangle,       inner sep=2pt,       inner ysep=2pt     ]          \newcommand*\monobox[2]{%       \begin{tikzpicture}         \definecolor{top}{RGB}{250,250,250}         \definecolor{bottom}{RGB}{235,235,235}         \node [shadedbox, minimum width=3.1cm] (box) {           \begin{tabular}{r}             \invhead{\scriptsize #1}\\             \footnotesize{#2}\\           \end{tabular}         }       \end{tikzpicture}     }          \setkomavar{fromname}{TestCompany}     \setkomavar{fromaddress}{37 Test Road, Someplace\\Somewhere, 6020\\Australia}     \setkomavar{fromphone}{+61 123 1234 1234}     \setkomavar{fromemail}{accounts@testcompany.com}     \setkomavar{signature}{TestCompany}     \setkomavar{invoice}[Invoice number]{1234}     \setkomavar{date}[Issue Date]{\today}     \setkomavar{customer}[Account number]{1234567}          \begin{document}     \begin{letter}{%       Mr Nick Sandford\\       23 Test St\\       Somewhere, Someplace\\       Australia     }          \opening{Dear Nick Sandford,}     \monobox{Test Box}{\$0.00}     \closing{Regards}     \end{letter}     \end{document}      I call it like `\monobox{This Bill}{\$20.00}`. This is what it looks like when it is rendered: ![boxes](http://i.stack.imgur.com/13b8a.png) Hopefully I'm not doing anything too wrong :).


title: Why chapter label below the section label on new page even if by setting same spacing before title (use titlesec package)?

text: \documentclass{book}     \usepackage[margin=0pt,papersize={50pt,70pt}]{geometry}     \usepackage{titlesec}     \titleformat{\chapter}{\Huge\bfseries}{}{0em}{}     \titleformat{\section}{\Huge\bfseries}{}{0em}{}     \titlespacing*{\chapter}{0pt}{0pt}{0pt}     \titlespacing*{\section}{0pt}{0pt}{0pt}     \begin{document}     \chapter{abc}     \newpage\section{abc}     \end{document}      ![](http://i.stack.imgur.com/AGpkh.png) This question is concerned with Writing several lines before chapter title


title: Split equation problem

text: I would like to split the following equation in two parts. Very basic thing, seems to be.               \begin{equation}     \zeta_k(x) = \frac{\sin (\frac{1}{2} (x - x_0)) \cdots \sin(\frac{1}{2} (x-x_{k-1}))}     { \sin ( \frac{1}{2} (x_k - x_0)) \cdots \sin(\frac{1}{2} (x_k - x_{k-1}))} %     %     \frac{\sin ( \frac{1}{2} (x - x_{k+1})) \cdots %     \sin(\frac{1}{2} (x - x_{2n}))}{\sin(\frac{1}{2} (x_k - x_{k+1})) \cdots %     \sin(\frac{1}{2} (x_k - x_{2n}))}     \label{eq3}     \end{equation}      I inserted amsmath package and tried with begin split and so on but can not get to the point where I separate the equation into two lines, one that contains               \zeta_k(x) = \frac{\sin (\frac{1}{2} (x - x_0)) \cdots \sin(\frac{1}{2} (x-x_{k-1}))}     { \sin ( \frac{1}{2} (x_k - x_0)) \cdots \sin(\frac{1}{2} (x_k - x_{k-1}))} %     %      and the other that contains               \frac{\sin ( \frac{1}{2} (x - x_{k+1})) \cdots %     \sin(\frac{1}{2} (x - x_{2n}))}{\sin(\frac{1}{2} (x_k - x_{k+1})) \cdots %     \sin(\frac{1}{2} (x_k - x_{2n}))}      any suggestions?


title: Problem with \label and \ref in TexMaker

text: I've got a problem using `\label` and `\ref` in Texmaker 3.1 (MiKTeX 2.9). When I put label somewhere, i got a frame with label name in it. How can I hide it?               \begin{figure}[h]     \includegraphics[width=0.75\textwidth]{img/2}\caption{SomeCaption}     \label{fig:4eb1}     \end{figure}     $\frac{w}{w_1}-1=4$ $4\leqslant n\leqslant3$, using (pic. \ref{fig:4eb1}),blah-blah.      PS: Sorry for my awesome English. :) * * * ![enter image description here](http://i.stack.imgur.com/fqnHG.png)


title: Does LaTeX define a semantic equivalent of \textbf ?

text: In HTML, there's the distinction between `<em>` as semantic markup and `<i>` as its pure-formatting equivalent. LaTeX has the same distinction: `\emph` is semantic markup, rendered using `\textit`. HTML also includes an analogous distinction between `<strong>` and `<b>`. Does LaTeX define a semantic command (e.g. `\strong{...}`, but that doesn't exist) that gets rendered using `\textbf`? EDIT: on very similar lines, does LaTeX define a semantic command like `\quote{...}` that will render using quotation marks (of some preferred type)? (HTML has `<q>`.)


title: How to make my own LaTeX template?

text: Ok I know that my question is quite local, however, I have struggled with it for a long time and I could not find the answer, so I decided to post it here. I have to rewrite a book (which was written using Word) by LaTeX, without changing the structure and the content. This book is divided into 2 parts; part 1 has 2 chapters and part 2 has 3 chapters. Chapters are numbered by alphabet letter like `Chapter A`, `Chapter B`,... and theorems in each chapter are numbered depending in its chapter like `Theorem A1`, `Theorem B7`,... I have searched on the Internet for book templates, but I found nothing that fully appropriate with this style of book. Every time I tried I got troubles with numbering theorem, with index and content.... :| Could you please help me to write the appropriate LaTeX code? Please do not tell me that I should change the way the book behaves, since the author want to keep it, and I am just an editor only. Thank for reading my question! **update** : Here is the picture that I made : ![enter image description here](http://i.stack.imgur.com/CR0ad.png) For the theorem, I number it by hand, as the following code :                  \indent \textbf{Định lý A1.}         (Thales thuận dạng hình học)\emph{Nếu ba đường thẳng đôi một song song $a, b, c$ cùng bị hai đường thẳng $\Delta, \Delta'$ tương ứng cắt tại $A, B, C; A’, B’, C’$ thì $\dfrac{AB}{BC}=\dfrac{A'B'}{B'C'}$. }


title: How to make this pgfkeys code more compact and streamlined?

text: I have just managed to create my first command with `pgfkeys`. I defined a command `\myset`, whose purpose is to make (for example)               \myset[big]{abc}      correspond to               \bigl\{abc\bigr\}      Part of my goal was to do this in a way that would easily let me create variants later, using different delimiters; in particular, I didn't want my `\pgfkeys` code to refer to the `\\{` and `\\}`. Working from this TeX.SE thread and the relevant section of the PGF manual, here is what I came up with:               \documentclass{article}     \usepackage{pgfkeys}     \pgfkeys{/delimitersizes/.is family, /delimitersizes,      default/.style = {auto},      auto/.style = {leftsize = auto, rightsize = auto},      big/.style = {leftsize = big, rightsize = big},      bigg/.style = {leftsize = bigg, rightsize = bigg},      Big/.style = {leftsize = Big, rightsize = Big},      Bigg/.style = {leftsize = Bigg, rightsize = Bigg},      leftsize/.style = {leftdictionary/#1/.get = \leftdelimitersize},      rightsize/.style = {rightdictionary/#1/.get = \rightdelimitersize},     leftdictionary/.cd,       big/.initial = \bigl,       bigg/.initial = \biggl,       Big/.initial = \Bigl,       Bigg/.initial = \Biggl,       auto/.initial = \left, }     \pgfkeys{/delimitersizes, rightdictionary/.cd,       big/.initial = \bigr,       bigg/.initial = \biggr,       Big/.initial = \Bigr,       Bigg/.initial = \Biggr,       auto/.initial = \right, }          \newcommand{\myset}[2][]{     \pgfkeys{delimitersizes, default, #1}     \leftdelimitersize\{#2\rightdelimitersize\} }          \begin{document}     $\myset[big]{abc}$     \end{document}      This functions as it is supposed to, but considering the finished product, it seems like there's a significant amount of "code duplication", and shuffling around of information before getting to use it. I realize this is a rather open-ended question, but can people suggest how to improve this code to make it more compact and streamlined?


title: Artifacts from Latex configuration showing in output

text: I've written some Latex in my Doxygen comment that looks like this...               /*!     @note     @latexonly          \documentclass{article}     \usepackage{courier}          \lstset{basicstyle=\footnotesize\ttfamily}          \begin{document}     \fontsize{10pt}{12pt}\selectfont     \newpage     \begin{verbatim}          CONTENT               \end{verbatim}     \end{document}     @endlatexonly     */      Produces this after running 'pdflatex'               article courier     basicstyle=     (PageBreak: No text in PDF)      CONTENT      What am I doing wrong? I just wanted to set the text to a monospace font and have it output verbatim. Note: I'm running MikTeX 2.9 on windows 7 ## Update: I Took a look in the .tex file doxygen makes for the class with this comment and found this.                \begin{DoxyNote}{Note}      //Everything above               \end{DoxyNote}      Could that create the odd things I'm seeing? ## Update 2: I found this, > Starts a block of text that will be verbatim included in the generated LaTeX > documentation only. So that tells me MiKTeX doesn't like those labels. When Doxygen creates the .Tex files this bit shows up in the middle. Does LaTeX have rules about defining a preamble in the middle of a document? This is the first thing I've ever done in LaTeX so I'm not surprised that I'm having issues. I did some testing and when I remove `\documentclass`,`\begin{document}` and `\end{document}` it didn't get rid of the artifacts but it did fix some other problems I opened another question about funny enough. And then moved to here


title: enumitem: renaming the list marker

text: I am using `enumitem` to create a list. My goal is to label each item as `Case: 1`, `Case: 2`, etc. With the `enumerate` package, I was able to do               \begin{enumerate}[{Case} :1]     \item     something     ...     \end{enumerate}      I tried this with `enumitem` but it didn't work. I also tried `label = {Case} : 1` and `label = {Case :}` as optional arguments. In the first try, the case didn't increase from 1, and the in the second, incrementation never started start. How can I achieve this result with `enumitem`?               \documentclass{article}     \usepackage{enumitem}     \begin{document}     \begin{enumerate}[not sure what to put here for desired result]     \item     \item     \end{enumerate}     \end{document}


title: How to set the width of \cancel

text: I have 2 TikZ nodes with fixed text width:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usepackage{cancel}     \begin{document}     \begin{tikzpicture}     \node[text width = 3cm] (1){text text text text text text text text text text text text};     \node[text width = 3cm, below = of 1.south]{\cancel{text text text text text text text text text text text text}};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/mGQW8.png) As far as I understand `\cancel` text is inside `\hbox`, and LaTeX doesn't understand, how to split it into words. Is it possible to set it's width as well?


title: Scaling a TikZ figure from an external file

text: I would like to insert figures which were created with TikZ to my LaTeX document. I suppose that if I create the TikZ figure inside the document, that wouldn't be a problem - I'd just play with the `scale` value which comes right after `\begin{tikzpicture}`. However, sometimes the figure is too complicated for it to be written explicitly in the LaTeX document, so I create the figure in a different file and use `\input{foo.tikz}`. The problem with that is that I don't see how to scale it to fit the rest of the document.


title: No room for a new \dimen when including TikZ

text: > **Possible Duplicate:**   >  No room for a new \dimen I have a fairly large document which uses 30 or so packages. I was going to add some TikZ graphics, so I added the following to my header file:               \usepackage{tikz,pgfplots}      However, this gave me a lot of errors of the type               ! No room for a new \dimen .      After looking around, this seems to be related to a limitation of TeX. Is it not possible to use TikZ with many other packages? I am using MikTeX 2.9 and pdflatex.


title: Latex: conflict titlesec and tikz packages

text: I am using the `IEEEtran` class and I also call in my preamble the `titlesec` and `tikz` packages. If `tikz` is not called my code runs fine. Otherwise, (when calling the `tikz` package) I am given this error log:               /usr/local/te/usr/local/texlive/2012/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code     .tex:22: No room for a new \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                       \fi      l.22 \newdimen\tikzleveldistance          ? w \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                       \fi      l.20 \newdimen\tikz@lastysaved          ?       I would thank if somebody may give me feedback on this conflict.


title: Conflict between TikZ with decorations.text library, caption and booktabs packages and progressbar theme

text: > **Possible Duplicate:**   >  No room for a new \dimen I obtain an error when using simultaneously the above 4 elements. When removing one of them (which I do not wish), the output is fine.               \documentclass{beamer}     \usepackage{tikz}                 % 1     \usetikzlibrary{decorations.text} % 1     \usepackage{caption}              % 2     \usepackage{booktabs}             % 3     \usetheme{progressbar}            % 4          \begin{document}     \begin{frame}          \end{frame}     \end{document}      The `progressbar` theme comes from Sylvain Bouveret's webpage. The error message output by pdfLaTeX is the following (LaTeX does not return any error):               *geometry* detected driver: pdftex     (/usr/local/texlive/2012/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ! No room for a new \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                   \fi      l.1253 \newdimen\MPscratchDim                               % will be assigned global     ?


title: Option clash between TikZ, psplot, geometry, and hyperref

text: I know someone who is working on a LaTeX document requiring pst-plot, geometry, and hyperref, and I recently gifted him some TikZ improvements of diagrams that didn't seem to be working out for him. However, TikZ is clashing with the other packages, hyperref being the most critical. How does one circumnavigate around such an obstacle without sacrificing much? **Edit** : Minimal example:               \documentclass[z,11pt]{amsart}     \usepackage{pst-plot}     \input xy     \xyoption{all}     \usepackage{mathptmx,tikz}     \usetikzlibrary{matrix,arrows}     \begin{document}     Test     \end{document}      The error produced seems to be               /usr/local/texlive/2013/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code     .tex:19: No room for a new \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                        \fi      l.19 \newdimen\tikz@lastxsaved


title: No room for a new \dimen despite of loading etex

text: After upgrading to TeX Live 2013 one of my books does not compile any longer. I do load `etex`, but still have not enough room. What can I do? Back in 1994 I had a colleague who hacked the LaTeX source code and increased the number of registers there, but this is probably not the way to go. Is there anything I can do? Loading `eetex` or even `eeetex`? =:-) I can compile the document when I do not load `soul`, but I need `\st`. Edit: This is the error message               ! No room for a new \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                       \fi      l.322 \newinsert\@indexbox          ? x          Here is how much of TeX's memory you used:      22107 strings out of 493316      370083 string characters out of 6137929      515169 words of memory out of 5000000      25110 multiletter control sequences out of 15000+600000      10432 words of font info for 28 fonts, out of 8000000 for 9000      957 hyphenation exceptions out of 8191      75i,1n,77p,581b,275s stack positions out of 5000i,500n,10000p,200000b,80000s     No pages of output.      This is an example:               \documentclass{scrbook}          \usepackage{etex}               \usepackage{ifthen}     \provideboolean{draft}     \setboolean{draft}{false}          \usepackage[latin1,utf8x]{inputenc}          \usepackage[T1]{fontenc}     \usepackage{times}          \usepackage[T1]{tipa}          \usepackage{amssymb}          \usepackage{eurosym}          \usepackage{jambox}          \usepackage[paperwidth=170mm,paperheight=240mm,textwidth=126mm,textheight=196mm,tmargin=25mm,driver=dvips]{geometry}     \usepackage{natbib}     \usepackage{scrpage2}          \usepackage{ngerman}\selectlanguage{german}     \usepackage[german]{varioref}          \usepackage{graphicx}          \usepackage{subfig}     \usepackage{tikz-qtree}          \usepackage[figuresright]{rotating}               \newdimen\widelabel     \widelabel=0.0pt               \usepackage{tree-dvips,pstricks,pst-node,lastpage,float,comment,soul}               \usepackage{ogonek}                \usepackage{authorindex}     \usepackage[bookmarks=true,hyperindex=true,%     breaklinks=true,     draft=false,plainpages=false,hyperfootnotes=false,%     pdfauthor={Stefan Müller},%     pdftitle={Grammatiktheorie},%     pdfkeywords={PSG, GB, GPSG, HPSG, LFG, TAG, LTAG, Syntax, Deutsch},     ps2pdf=true  %ohne diesen Treiber geht der Zeilenumbruch in URLs     ]{hyperref}% for pdf files          \usepackage{breakurl}          \usepackage{array}     \usepackage{calc}     \usepackage{varioref,ifthen}     \usepackage{xspace}          \usepackage{index}          \begin{document}          Unfortunately there was no room left for the book.          \end{document}      I think it is this one call to \newdim, which I extracted from a non-CTAN stylefile that I use, that makes the difference ...


title: pstricks-add incompatible with beamer?

text: Beamer seems to clash with pstricks-add:               \documentclass{beamer}     \usepackage{pstricks}     \usepackage{pstricks-add}          \begin{document}      Lorem Ipsum     \end{document}      Gives the following error:               ! No room for a new \dimen .     \ch@ck ...\else \errmessage {No room for a new #3}                                                       \fi      l.1895 \newdimen\pst@chartHeight      But it runs smoothly without `pstricks-add` or replacing `beamer` with `article`.


title: Tikz: Draw simple shortened curved line between two coordinates in tikz

text: I'm creating an overlay to a picture. The picture has several objects and I want to draw arrows between them. I only have the coordinates and not the sizes so I must offset the arrows as not to overlap the objects. Here is the image to use. Try to create an arrow, similar to the yellow curved line, to the black circle from the green circle. ![Arrows](http://i.stack.imgur.com/hnRDQ.png) I would like to "shorten" the arrows by giving a length that it offsets from both ends. (so 0cm would start and stop the arrow at the endpoints and 0.1cm will start it 0.1cm and stop it at 0.1cm) I would also like to set a curvature amount like "0.4" that will curve the arrow some amount. (0 = straight, 1 = maximum curvature possible)               \begin{tikzpicture}     \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics{hnRDQ.png}};     \coordinate (G) at (2.3,6.1);     \coordinate (R) at (6.4,3.9);     \coordinate (B) at (2.1,1.7);     \draw [green] (G) -- (R);     \draw [red]   (R) -- (B);     \draw [black] (B) -- (G);     \end{tikzpicture}      (the coordinates are only approximate) Clarify: I want to basically specify the radius of curvature of the "arc". So, instead of having to specify the angle in and the angle out I want to specify one number. The in and out angles should be easily computed from the radius of curvature... Basically I would like to do something like `\draw (A) [arc=0.5] (B);` And it draws a 3 point arc with the 3rd point being on the radius of curvature, the 0.5 specifying out far out.


title: Altering title page : apa6e

text: I am using the `apa6e` package. I once asked a question (LINK) about altering it and received some code to do so. I am getting somewhat more comfortable with LaTeX and now have two changes I'd like to make to the title page. I don't understand how the code worked to alter the title page so I believe studying the code will help me see how the title page is altered. I'd like to (a) split the title onto two lines after the colon and (b) I'd like to inset a comment at the bottom of the page That is left justified. Annotated comments would be helpful as I try to understand how to alter the title page.               \documentclass[leavefloats]{apa6e}     \usepackage[american]{babel}     \usepackage{csquotes}     %--------------------------      \makeatletter      \renewcommand{\maketitle}{%      \thispagestyle{titlepage}%      \vspace*{1in}%      \Centering\@title\\\@author%      \vfill%      \ifdefined%      \apaSIXe@leavefloats{}      \fi      \RaggedRight%      \mspart{\@title}%      }      \makeatother          \title{The super long title: It be broken by LAtex but I'd like to break on the colon}          \shorttitle{SHORT}     \author{Bob}          %\Comment_at_the_bottom_of_page{Presented at a conference}          \date{\today} % or \date{24Jan11} for example     \begin{document}     \maketitle     \end{document}


title: Is it possible to use $ as a macro delimiter?

text: Experimenting with macro definitions that use strange delimiters (see e.g. this or this question), I thought it would be fun to have a macro that takes an argument of the form "a/b" and turns this into a fraction. This is achieved by               \def\myfrac#1/#2 {\frac{#1}{#2}}      which scans everything before the slash into `#1` and everything following the slash until next space into `#2`. Hence,               $\myfrac 72/31 $     $\myfrac 7/13 34\times\pi$      produce ![compiled code](http://i.stack.imgur.com/xwWN5.png) as desired. But -- unsurprisingly --               $\myfrac 72/31$      gives a `**! Missing } inserted.**` error, as -- of course -- the delimiting space is missing. To circumvent this, I wanted to define               \def\myfrac#1${\@myfrac#1 }     \def\@myfrac#1/#2 {\frac{#1}{#2}}      i.e. scan everything up to the next `$`, add a space to the end and then pass it to the other macro. This, however, results in `! Missing $ inserted.` Note, however, that it works with a "normal" delimiter:               \documentclass{minimal}          \makeatletter     \def\myfrac#1x{\@myfrac#1 }     \def\@myfrac#1/#2 {\frac{#1}{#2}}     \makeatother          \begin{document}     $\myfrac 72/31x$ $\myfrac 3/15 x$     $\myfrac 7/13 34\times\pi x$     \end{document}      produces ![compiled output](http://i.stack.imgur.com/Bts4M.png) as expected. So is there a way to replace `x` in the above code with `$`?


title: \angle symbol in tabular column definition

text: I've got a table full of phasors, and I'm trying to write it as follows:               \documentclass[a4paper,journal]{article}     \usepackage[cmex10]{amsmath}     \begin{document}     \begin{table}[h!]         \caption{Bus Voltages}         \label{tab:appdx-busvoltages}         \begin{center}             \begin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}             \hline                  \hline             \textbf{Bus} & \multicolumn{2}{c}{\textbf{$V$ (p.u.)}} \\             \hline                 b1 & 1.0 & 0.00 & * \\                 b2 & 0.8983 & -7.12& \\                 b3 & 0.9136 & -5.80 &\\                 b4 & 0.8841 & -9.01 &\\             \hline                  \hline             \end{tabular}         \end{center}         * \textbf{b1} is the `slack bus', and has such has a fixed voltage.     \end{table}     \end{document}      It works, in that it produces the following output: ![Output](http://i.stack.imgur.com/xPUOg.png) But I also get a stack of errors:               paper1.tex:111: Illegal parameter number in definition of \reserved@a. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@fortmp. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@nextchar. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Illegal parameter number in definition of \@preamble. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:111: Only one # is allowed per tab. [...gin{tabular}{c|r@{$\angle$}r@{$^\circ$}l}]     paper1.tex:117: Missing # inserted in alignment preamble. [         b1 & 1.0 &]     paper1.tex:117: Missing $ inserted. [           b1 & 1.0 &]     paper1.tex:117: Missing $ inserted. [           b1 & 1.0 &]     paper1.tex:117: Missing $ inserted. [           b1 & 1.0 &]     paper1.tex:117: Missing $ inserted. [           b1 & 1.0 &]     paper1.tex:118: Missing # inserted in alignment preamble. [         b2 & 0.8983 &]     paper1.tex:118: Missing $ inserted. [           b2 & 0.8983 &]     paper1.tex:118: Missing $ inserted. [           b2 & 0.8983 &]     paper1.tex:118: Missing $ inserted. [           b2 & 0.8983 &]     paper1.tex:118: Missing $ inserted. [           b2 & 0.8983 &]     paper1.tex:119: Missing # inserted in alignment preamble. [         b3 & 0.9136 &]     paper1.tex:119: Missing $ inserted. [           b3 & 0.9136 &]     paper1.tex:119: Missing $ inserted. [           b3 & 0.9136 &]     paper1.tex:119: Missing $ inserted. [           b3 & 0.9136 &]     paper1.tex:119: Missing $ inserted. [           b3 & 0.9136 &]     paper1.tex:120: Missing # inserted in alignment preamble. [         b4 & 0.8841 &]     paper1.tex:120: Missing $ inserted. [           b4 & 0.8841 &]     paper1.tex:120: Missing $ inserted. [           b4 & 0.8841 &]     paper1.tex:120: Missing $ inserted. [           b4 & 0.8841 &]     paper1.tex:120: Missing $ inserted. [           b4 & 0.8841 &]      If I remove the `@{$\angle$}` from my column definitions in `\begin{tabular}{...` then the errors go away. Any idea why this is occurring / how I can achieve the same formatting without incurring these errors?


title: Even columns in document with long bibliography

text: I am writing a document in two column format and the last two pages are devoted to the bibliography, which I generate with BibTeX. I need to finish the last page with the two columns having the same size. I am lost at that point. I have tried to use `\enlargethispage{-X cm}` finding X by trial and error. The problem is that when using that command after the call to `\bibliography{MyBib}`, the outcome is not the expected one: bibliography items span along all the first column and there is no column adjustment. I found out that if I write the command before `\bibliography{MyBib}` everything works as expected, but the problem is that the bibliography takes two pages so I can't do that, the only possibility is writing `\enlargethispage` afterwards. Could you please help me on that? * * * I self-answer :-) I suceeded by manually editing the .bbl file. If you have a smarter solution please let me know. Thanks.


title: How can I make text inside set notation look like normal text?

text: I'm very new to LaTeX, and have never been very good with computers, so apologies for not knowing how to post questions on here properly or missing out anything important. I have this:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \[F_f=\{z\in \mathbb{\hat{C}}:(\vert f^n(z) \vert) is bounded\}\]     \end{document}      "is bounded" comes out in italics and I'd like it to look like normal text (as in text not in `$$` or `\\[\\]` signs. Any help would be appreciated. And I realize that I've got lots of `\` signs missing, they don't seem to show up.


title: protocol message diagram - rectangle

text: ![enter image description here](http://i.stack.imgur.com/rzjBI.jpg)               \documentclass{article}     \usepackage[margin=12mm]{geometry}     \usepackage{hyperref}     \usepackage[underline=true]{pgf-umlsd}     \usetikzlibrary{calc}     \begin{document}          \begin{sequencediagram}     \newinst{ue}{UE}     \newinst[3]{nodeb}{Node B}     \newinst[3]{rnc}{RNC}     \mess{ue}{RRC Connection Request}{rnc}     \mess{rnc}{Radio Link Setup Request}{nodeb}     \mess{nodeb}{Radio Link Setup Response}{rnc}     \mess{rnc}{Establish Request}{nodeb}     \mess{nodeb}{Establish Confirm}{rnc}     \mess{rnc}{RRC Connection Setup}{ue}     \postlevel     \mess{nodeb}{Synchronization Indication}{rnc}     \filldraw[fill=black!30] ($(RRC Connection Setup to)+(0,-.3)$) rectangle ($(Synchronization Indication from) +(0,.3)$)     node[midway] {L1 Synchronization};     \mess{ue}{RRC Connection Setup Complete}{rnc}     \end{sequencediagram}          \end{document}      if I would like to draw a rectangle at above all message, large from first node to the end node, between the nodes and the first message RRC Connection Request; or draw a rectangle large from first node to the end node at bottom, under the last message RRC Connection Setup Complete, all like the rectangle in the picture "L1 Synchronization" How can I do it?


title: Strange behaviour with PGF/TikZ and Plain TeX output routine

text: I noticed a strange behavior when running PGF/tikZ with pdfTeX on my Debian box : a simple session without tikz:               pdftex     **\relax     *Hello World     *\bye      do output the page number on the page footer. On the other hand, loading tikz:               pdftex     **\relax     *\input tikz.tex     *Hello World     *\bye`      does make the page number on the footer disappear. The page size does not seems to be the cause. Does any of you have any idea of the cause behind this behaviour?


title: headlines are not shown with tikz input (plain TeX)

text: I'm usign plain TeX with custom headlines. If I load Tikz packages with                \input tikz      then headlines are blank. The following are my headlines (some commands don't belong to plain TeX, but I think that those don't create the output bug)                   \headline={%         \ifodd\pageno\leftheadline\else\rightheadline\fi}                \def\rightheadline{%         \ifInizioCapitolo{\nopagenumbers\global\InizioCapitolofalse}%         \else         \ifnum\chapnum>0{%                 \folio\qquad{}{\uppercase{\the\chapnum.\ \chaptertitle}}\hfill\copyright}             \else%                 {\folio\qquad{}\uppercase{\chaptertitle}\hfill\copyright}             \fi%         \fi}              \def\leftheadline{%         \ifInizioCapitolo{\nopagenumbers\global\InizioCapitolofalse}%         \else                 \ifnum\chapnum>0{%                 \copyright\hfill{\uppercase{\the\chapnum.\ \chaptertitle}}\qquad\folio}                 \else%                 {\copyright\hfill{\uppercase{\chaptertitle}}\qquad{}\folio}                  \fi%         \fi}      I'm already using tikz in LaTeX documents but I would use it in plain ones too. So, I can fix this bug?


title: beamer, forest, bulleted list inside

text: How can I use a bulleted list in a forest environment               \documentclass{beamer}     \usetheme{CambridgeUS}     \usepackage{tikz}     \usepackage{forest}     \begin{document}     \begin{frame}{Conceptual model-functional GI disorder}     \begin{forest}     [Eary life- Genetic  environmental factors,fill=yellow!50, rounded corners     ]     \end{forest}     \end{frame}     \end{document}      * * * I want it to appear like this ## Early life   * Genetic factors    * Environmental factors This is a single node for illustration .


title: Use XeLaTeX in Texmaker instead of pdfLaTeX

text: I use TeX Live 2010 and my editor is Texmaker Bidi. It was working probably good but from 2 months ago I've encountered with the error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! Fatal fontspec error: "cannot-use-pdftex"     !      ! The fontspec package requires either XeTeX or LuaTeX to function.     !      ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"     ! instead of plain "latex" or "pdflatex".     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................      when I'm trying to load `xepersian` LaTeX. but I do not know how can I change pdfLaTeX to XeLaTeX. * * * This is the second edit of my question . the code is :                \documentclass{article}     \usepackage{pstricks}     \usepackage{pst-bezier}     \usepackage{xepersian}      \settextfont{XB Zar}      \setlatintextfont{Junicode}      \setdigitfont{XB Zar}      \begin{document}      !سلام دنیا     \begin{pspicture}(3,3)     \psbcurve(1,2)(5,7)(2,2)(12,3)     \end{pspicture}          \end{document}      but the output does not include the shapes .


title: Need some help with this program (Xetex)

text: I don’t know how to use XeTeX or to activate it and I don’t know what’s wrong with this program. I am trying to get pdf via Texmaker (in Urdu with nastaleeq font) I have basic-miktex-2.9.4407 , texmakerwin32_install , TXCSetup_1StableRC1 , winedt60 installed on my system (OS Windows 7 Ultimate 32 bit)               \documentclass{article}     \usepakage{fontspec}     \newfontfamily\urdufont[Script=Arabic,Scale=1.4]{Jameel Noori Nastaleeq}     \begin{document}     \setRTL     \urdufont     j j  k i l a d      \end{document}      Kindly tell me a simple way to get the output.


title: Problem viewing document in TEXmaker "Fontspec requires XeTeX or LuaTeX"

text: I'm trying to use a template from online and when I upload the zip into Texmaker it gives the following error "! Fatal fontspec error: "cannot-use-pdftex" ! ! The fontspec package requires either XeTeX or LuaTeX to function. ! ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex" ! instead of plain "latex" or "pdflatex". ! ! See the fontspec documentation for further information. ! ! For immediate help type H ." **What I have tried** I've looked at several posts in this forum, but none seem to have worked. I tried making a custom command for both XeLatex and LuaLaTeX, but neither has worked. I think maybe I don't have something properly downloaded? My custom commands look like this XeLaTeX: xelatex --interaction=nonstopmode %.tex LuaLaTeX: lualatex --interaction=nonstopmode % Possibly these are wrong though. When I run either command, it just says "Error : could not start command" Thanks for the help, and once again I've read most of the threads related to this, but to no avail, so I think I'm doing something else wrong. **Below is what my texmaker preferences look like...let me know how to change them in order for this to work. Running quick build or my custom command doesn't work and results in the same error** ![enter image description here](http://i.stack.imgur.com/wTmtC.png) ![enter image description here](http://i.stack.imgur.com/1dBef.png)


title: How to write a tree with no (visible) root with TikZ?

text: I’m trying to write a tree structure in TikZ. The trees in question are labelled on the leaf only; there is no label on inner nodes. Because I don’t use `node` on inner nodes, the tree structure joins. However, it seems I still need to write a `\node` to start the tree. While I can leave its label empty, it is still displayed as a white circle which disconnect the structure. How can I avoid this?               \documentclass{article}     \usepackage{tikz}          \begin{document}          % The broken structure bothers me     \begin{tikzpicture}     \node {}         child { node {a} }         child {           child {node {b}}           child {node {c}}         }     ;     \end{tikzpicture}          % This is what I want, but without the added root.     \begin{tikzpicture}     \node {} % this node should not exist       child {         child { node {a} }         child {           child {node {b}}           child {node {c}}         }       }     ;     \end{tikzpicture}          \end{document}


title: How to teach ConTeXt to recognize and format custom syntax?

text: I have a document filled with editor's comments, appearing like this:               \starttext              This [is ]some text with         comment[s] added to show         corrections to erro[r]s.          \stoptext      I need to make the comments in bold, so that they are more visible. The result would be the same as this:               \starttext              This {\bf [is ]}some text with         comment{\bf [s]} added to show         corrections to erro{\bf [r]}s.          \stoptext      Is there any way to teach ConTeXt to format all of the text appearing in the square brackets in this format and the square brackets, without manually adding the `{\bf *}` syntax to the text?


title: package for type-setting computational problems

text: There are many packages which allow to type-set algorithms. I'm wondering whether there is a ready-to-use solution which allows to type-set computational problems? I mean an environment which would include the name, input and output of a problem, and which would format it in a neat way.


title: How to merge multiple footnotes?

text: Is it possible to merge multiple footnote? For example: `"Solution A\footenote{Created by person C} and solution B\footnote{Created by person C} are great".` The footnote should then be just one with the text `"Created by person C"`.


title: Changing the paper size in a tex document

text: I'm trying to get a `letter` paper size in my tex documents but no matter what line of code I use I end with the same `a4` size. I'm using texmaker and `LaTeX` -> `dvips` -> `ps2pdf` sequence. I've tried the `geometry` package and `letterpaper` in documentclass option but it did not help me. What can I do?


title: ! Package keyval Error: hyperref undefined. l.4319 \ProcessKeyvalOptions{Hyp}?

text: I know that the question may be too stupid, but I'm trying to compile the TeX file of Calculus Made Easy by Silvanus Thompson available at this page with TeXworks but the compiling always end up with the following line:               ! Package keyval Error: hyperref undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.4319 \ProcessKeyvalOptions{Hyp}          ?       And I'm a complete noob at LaTeX and I have no clue of what's going on. I've googled a little but it seems that none of the results I've seen adress the problem I'm having. Yes, I've pressed `H <Return>` but then there's a lot of stuff appearing on the screen and I'm lost again.


title: How to remove bookmarks from you pdf latex file?

text: how does one remove bookmarks from a LaTeX generated pdf file? I wrote the `article` in LaTeX. When submiting the `.pdf` to IEEE eXpress for checking, I get the error: > file contains bookmarks. Any ideas how to solve it? I already tried:               \hypersetup{bookmarks={false}}


title: Beamer - Transparent footline?

text: I am using a picture as a background for beamer slides. I would like to have my name and page numbers at the bottom of the slide. I do not like the bottom bar to cover the background image. Is it possible to make the bottom bar in transparent colour with names and page numbers visible? These are themes I am using in the example:               \usetheme{Boadilla}     \usefonttheme{structurebold}     \usecolortheme{seagull}      ![The example slide](http://i.stack.imgur.com/CwOXW.png)


title: Bibliography with alphabetical order, year order but without brackets in references part

text: I am trying to find a bibliography that looks like the one here. I found this but it doesn't have this style and when I try some of them LaTeX cannot find them. How do I have to add them to my LaTeX and how should I find the bibliography I mentioned. I tried apa-style which looks like the one I mentioned but the problem is it also puts brackets in bibliography part in the main pdf which I don't want them.


title: Theorem without counter (any TeX)

text: I often use theorems on LaTeX and have defined various kinds of them. At times, however, it is best not to define a specific theorem which would otherwise be a once-in-a-long-time usage, as for example with the "Fundamental Theorem of Algebra" or the "Hairy Ball Theorem" and such. A pdf I found on the Internet suggests the following code:               \makeatletter     \newtheorem{@thmattr}[thm]{\theorem@attr}     \newenvironment{thmattr}[1]     {\def\theorem@attr{#1}\begin{@thmattr}}     {\end{@thmattr}}     \makeatother      The only problem is that, besides needing a definition of a counter `thm` (which can easily be solved by removing the `[thm]`), this gives such theorems a counter. So I get "Fundamental Theorem of Algebra 1", which doesn't make sense since there is only one theorem with that name. So the question is: how do I make a theorem with no counter?


title: Numbering figures and tables in part

text: Here is the deal: I'm writing my thesis and I divided the thesis into 3 parts, each part had 2 chapters. At the beginning of each part, I added two pages of introduction. However, the numbering of figure and table in these two pages followed the previous chapter. Here is the structure: > Chap1: Introduction Part1 (2 pages of introduction of this part) > > Chap2: ... > > Chap3: ... Part2 etc. In the two pages of Introduction, the numbering followed the previous chapter (i.e. chapter 1). I want to change the numbering to `I.1`, `I.2`, etc. and make it appear in `List of table` and `figure`. Anyone can help me?


title: Change TOC to use underline in subsubsections

text: I am using the package `memoir` and I need to redefine the fonts in TOC with this rules:   * For Chapters: _all-caps_ and _bold_   * For Sections: _bold_   * For SubSections: _bold_ and _italic_   * For SubSubSections: _bold_ and _underline_   * For SubSubSubSections: _nothing to do_ I had success to configure `sections`:               \renewcommand{\cftsectionfont}{\bfseries}      `subsections`:               \renewcommand{\cftsubsectionfont}{\bfseries\itshape}      But for `chapters`, I didn't have success to use `\MakeUppercase`:               \renewcommand{\cftchapterfont}{\MakeUppercase\bfseries}      and for `subsubsections`, I didn't have success to put on underline               \renewcommand{\cftsubsubsectionfont}{\bfseries\underline}      So, how I put underline and uppercase?


title: Right shift of a node in a tree

text: I want to shift a node to the right because it coincides with another node: ![no description](http://i.stack.imgur.com/KSzRt.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{trees}          \begin{document}          \begin{tikzpicture}[sibling distance=2.5cm, level distance=2.5cm]     \node {S}       child {[dotted]  node {\{E.v:=0\}}}       child {  node {E}       child{[dotted]  node {\{T.v:=1\}}}       child {  node {T}       child {  node {F}       child {  node {NB}}       child{[dotted]  node {\{F.v:=SR(NB)\}}}}       child{[dotted]  node {\{T.v:=T.v*F.r\}}}       child [sibling distance=2cm]{  node {R2}       child  {  node {$\varepsilon$}}}}       child{[dotted]  node {\{E.v:=E.v+T.v\}}}       child {  node {R1}       child[sibling distance=0.8cm]{[dotted]  node {\{T.v:=1\}}}       child [sibling distance=0.5cm]{  node {+}}       child {  node {T}       child {  node {F}       child {  node {NB}}       child{[dotted]  node {\{F.v:=SR(NB)\}}}}}       child{[dotted]  node {\{E.v:=E.v+T.v\}}}       child {  node {R1}       child {  node {$\varepsilon$}}} }}     ;     \end{tikzpicture}          \end{document}       ![enter image description here](http://i.stack.imgur.com/KSzRt.png)


title: How uninstall TeXLive 2013 under Windows 8?

text: How does one uninstall the previous version (2013) of TeXLive under Windows (Windows 8, to be specific).


title: MiKTeX, nomencl - Couldn't find input index file

text: > **Possible Duplicate:**   >  Using package nomencl I was searching for this problem on this webpage and I found several related questions, however, with no accepted answer. I hope this entry will help others to solve the problem quickly in the future. I am using MiKTeX 2.9 with package `nomencl`, on Windows 7. I was trying to make a abbreviation list but I was facing this error when trying to invoke make index:               Couldn't find input index file MYFILE nor MYFILE.idx      This part of my previous LaTeX code is relevant:               \documentclass[11pt, a4paper]{article}          %list of abbreviations     \usepackage[intoc]{nomencl}     \makenomenclature          \begin{document}          \tableofcontents % Include a table of contents          \newpage % Begins the essay on a new page instead of on the same page as the table of contents          \printnomenclature     \newpage      \section{Introduction} % Major section          Every Global Navigation Satellite System (GNSS)\nomenclature{GNSS}{Global Navigation Satellite System}, as GPS\nomenclature{GPS}{Global Positioning System}, GLONASS and      PdfLaTeX does no error and _"the nomenclature file`<filename>.nlo` corre- sponding to your LATEX file `<filename>.tex` and to write the information from your `\nomenclature` commands to this file"_ as it is written in A Package to Create a Nomenclature - page 2. The next step, to run MakeIndex produces error:               Couldn't find input index file MYFILE nor MYFILE.idx      end no abbreviation list is created. The next step according to the manual is to run               "makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls"      But How?


title: Nomenclature does not appear

text: I can't create a list of abbreviations. I have been using `nomencl` package. I put `\makenomenclature` and               \nomenclature{symbol}{name of symbol}     \printnomenclature      But nomenclature doesn't appear. Thanks


title: Why does a defined command appear differently in the align environment?

text: In the LaTeX document shown below, my definition `\comp` does not show correctly in the align environment. Why it is this the case? ========== Begin LaTeX scripts =============               \documentclass[12pt,reqno, oneside]{amsart}     %     {\catcode`\,=13 \gdef,{\mskip 5mu}} % 5 mu is the space between parts     \def\comp{\bgroup\catcode`\,=13\relax\compx}     \def\compx(#1){#1\egroup}     %     \begin{document}     The desired effect of ``comp'' is     $$\text{The natural numbers are }\comp(1, 2, 3, 4, \dots).$$          However, in the align environment it becomes the following, with annoying commas in between the numbers:     \begin{align*}     \text{The natural numbers are }&\comp(1, 2, 3, 4, \dots).     \end{align*}     \end{document}


title: Italic small caps fonts in .fd files

text: I want to declare a custom font family and one of my `otf` files is called `BemboTitlingMTStd-Italic.otf`. I want to use this whenever I use the command `\textit{\textsc{...}}` in my document, but I can't find anything in the `fntguide` on how to combine small caps and italic `otf` files: > The most common values for the font series are: > > **m** Medium > > **b** Bold > > **bx** Bold extended > > **sb** Semi-bold > > **c** Condensed > > The most common values for the font shape are: > > **n** Normal (that is `upright' or`roman') > > **it** Italic > > **sl** Slanted (or `oblique') > > **sc** Caps and small caps So do I really have to choose between italic shape or small caps shape, or can I combine the two in my `.fd` file? Ideally the command would look a little like:               \DeclareFontShape{T1}{Bembo}{m}{sc}{it}{        <-> T1--Bembo--TitlingMTStd--Italic     }{}%      ...But obviously that didn't get me anywhere. Any suggestions? PS: Feel free to edit tags or add tags, I couldn't find an appropriate one for the problem. Sorry.


title: Incomplete \iffalse using pgfmath naming a TikZ node

text: In trying answer Is it possible to use a macro to name a TikZ node?, I attempted to use the solution provided at pgfmath expansion - call a command from within a pgfmath environment, but this yielded the error message               Incomplete \iffalse; all text was ignored after line 67.     <inserted text>                    \fi      from the example               \documentclass{article}     \usepackage{tikz}          \newcommand{\mathresult}[1]{%         \pgfmathparse{#1}\pgfmathsetmacro\mymathresult{\pgfmathresult}%     }     \newcommand{\mymacro}[2]{%         \mathresult{#1}%         \pgfmathparse{#2 + \mymathresult}%         \pgfmathsetmacro\mymathresult{\pgfmathresult}\mathresult%     }%          \begin{document}     \begin{tikzpicture}         \node (0) at (0,0) {X};         \node (\mymacro{2}{3}) at (1,2) {Y};         \draw (\mymacro{2}{3}) -- (0);         \draw (5) -- +(3,0) {Z};     \end{tikzpicture}     \end{document}


title: Techniques to make tabular contents copyable

text: Take the following table:               \documentclass{article}     \begin{document}     \begin{tabular}{|c|c|}     11 & 21 \\     12 & 22 \\     \end{tabular}     \end{document}      **What are the techniques to make this table text-copyable (as much as possible)?** For example, Evince sees this as text (note that order and lines are lost):               11     12     21     22      (Acrobat does slightly better job in this case but still can get confused in larger tables). One alternative I explored is to use `accsup`. However I don't know how to enforce tabs (between cell) and new lines; this doesn't work:               \documentclass{article}     \usepackage{accsupp}     \begin{document}     \BeginAccSupp{ActualText=11\t 21\n 12\t 22\n} %this line produces errors     \begin{tabular}{|c|c|}     11 & 21 \\     12 & 22 \\     \end{tabular}     \EndAccSupp{}     \end{document}      What code I have to put to get this as copyable text `11 \tab 21 \n 12 \tab 22 \n`? Is there other technique to help the PDF viewer at lest follow (flow) the copyable text in a more sensible way? * * * **EDIT** : I made some mild progress using `accsup` by defining a line-by-line alternative text:               \documentclass{article}     \usepackage{accsupp}     \begin{document}     \begin{tabular}{|c|c|}     \BeginAccSupp{ActualText=11 21} 11 & 21 \EndAccSupp{} \\     \BeginAccSupp{ActualText=11 21} 12 & 22 \EndAccSupp{} \\     \end{tabular}     \end{document}      Still I don't know how to add the tab characters but the copying has improved * * * **EDIT 2** : I can produce a tab charactar with `\BeginAccSupp{method=hex,unicode,ActualText=0009}` but then I can't combine it with normal text. (As in `ActualText=a ?0009? b`). * * * **EDIT 3** : A line-by-line variant from Heiko's answer:               \documentclass{article}     \usepackage{accsupp}     \begin{document}     \begin{tabular}{|c|c|}     \BeginAccSupp{method=plain, ActualText=11\string\t 21}     11 & 21     \EndAccSupp{}\\     \BeginAccSupp{method=plain, ActualText=12\string\t 22}      12 & 22      \EndAccSupp{}\\     \end{tabular}     \end{document}


title: \includegraphics: Dots in filename

text: `\includegraphics` cannot handle filenames that contain more than the one dot, separating the filename from the extension. Apparently it uses everything after the first dot as extension and then, of course, complains about an unknown graphics extension. This is annoying as I very often have filenames that contain parameter values, e.g. `plot_a0.4_b0.6.pdf`. Is there a way to teach LaTeX to interpret only the string behind the last dot as extension?


title: Special characters in graphics filenames

text: This is my third question in the series of transforming some (~167) documents from HTML to LaTeX. The other questions were related to {inputenc} and {wrapfig}. The original document have several graphics (~168) from different sources and different naming conventions. I am using the `graphicx` package with the `\includegraphics` command. I don't have any problems with PNG and JPEG files with only letters, numbers and hyphens in their names. I have a couple of GIF files (non-animated) which I attempted to solve using the receipt here: Convert gif image to png on the fly . Unsuccessfully. (Also command `\epstopdfDeclareGraphicsRule` fails in XeLaTeX, and as there are only two files I might rather convert them manually or with my conversion script.) However I have a problem with PNG and JPEG files with special charactes, mainly those including a period `.` (`includegraphics` things that `something.svg.png` is an unrecognized `.svg.png`), an underscore `_` (if I don't mask that character it attempts to shift to mathmode; if I mask it it does not find the file), and a percent sign `%` (as most of these files were downloaded from internet URL, special chars are masked using the percent sign and I preserved that convention in the filenames. Again, with the masked percent '\%' '\includegraphics' does not find the file and without it the TeX engine assumes it is an end-of-line and the code breaks). While I can still rename the files to something LaTeX and `graphicx` will handle, I still would like to now what are the correct way to mask special characters, and particularly `.`, `_`, and `%`.


title: How do I make pdfLaTeX accept a graphics file with a period in its name?

text: > **Possible Duplicate:**   >  \includegraphics: Dots in filename Many of my graphics files have periods in their names. This causes a problem with pdflatex. For example, if I want to include the graphics file `this.or.that.pdf` I get this error:               ! LaTeX Error: Unknown graphics extension: .or.that.pdf.      Is there a way around this other than renaming all my files?


title: Why filename with two dot such as "a.b.eps" cannot be compiled by xelatex?

text: I have a figure name "L=10_W=8.00.eps", I put it in the \figure environment by               \includegraphics{L=10_W=8.00.eps}      compile it with xelatex, but get error: File ended prematurely After I renamed it to "L=10_W=8.eps", the error goes away.


title: Chapterbib with subdirectories does not compile

text: I'm using chapterbib package to generate a bibliography for each chapter. But the compilation fails. Here is the content of my principal.tex file:               \documentclass[phd]{theseUL}          \usepackage{lmodern}     \usepackage[utf8]{inputenc}     %\usepackage[french]{babel}     \usepackage{fancyhdr}     \usepackage{amsfonts}     \usepackage{url}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{color}     \usepackage{verbatim}     \usepackage{enumerate}     \usepackage{makeidx}     \usepackage{topcapt}     \usepackage{setspace}     \usepackage{rotfloat}          \usepackage[square,sort,comma, authoryear]{natbib}     \usepackage{chapterbib}          \begin{document}          \part{Contexte général et état de l'art}     \include{../chap1_introduction/chap1_introduction}     \input{../chap2_definitions/chap2_definitions}          \end{document}      Here is the content of chap1_introduction.tex               \chapter{Introduction}  %%This is chapter 1          \phantomsection\addcontentsline{toc}{chapter}{Introduction}          Text          \bibliographystyle{authordate1}     \bibliography{principal}      And so for the content of chap2_definitions.tex               \chapter{Definition} %%This is chapter 2          \phantomsection\addcontentsline{toc}{chapter}{Definition}          Text          \bibliographystyle{authordate1}     \bibliography{principal}      This is how I compile my documents:   1. pdflatex principal.tex (success)   2. pdflatex principal.tex (success)   3. bibtex principal (2 errors, I guess it is normal: see output #1)   4. bibtex ../chap1_introduction/chap1_introduction (see output #2)   5. bibtex ../chap2_definitions/chap2_definitions (see output #3)   6. pdflatex principal.tex   7. pdflatex principal.tex Output #1               XXXX@IFTEaigny2:~/Phd/principal$ bibtex principal     This is BibTeX, Version 0.99c (TeX Live 2009/Debian)     The top-level auxiliary file: principal.aux     The style file: authordate1.bst     Illegal, another \bibstyle command---line 51 of file principal.aux      : \bibstyle      :          {authordate1}     I'm skipping whatever remains of this command     Illegal, another \bibdata command---line 52 of file principal.aux      : \bibdata      :         {principal}     I'm skipping whatever remains of this command     Database file #1: principal.bib     Warning--to sort, need author or key in GrownUpDigital2009     Warning--empty author in GrownUpDigital2009     Warning--empty journal in GrownUpDigital2009     Warning--empty journal in Torres2008     (There were 2 error messages)      Output #2               XXXX@IFTEaigny2:~/Phd/principal$ bibtex principal     This is BibTeX, Version 0.99c (TeX Live 2009/Debian)     The top-level auxiliary file: ../chap1_introduction/chap1_introduction.aux     The style file: authordate1.bst     I couldn't open database file chap1_introduction.bib     ---line 43 of file ../chap1_introduction/chap1_introduction.aux      : \bibdata{chap1_introduction      :                            }     I'm skipping whatever remains of this command     I found no database files---while reading file ../chap1_introduction/chap1_introduction.aux     Warning--I didn't find a database entry for "Downes2005"     Warning--I didn't find a database entry for "Hadjerrouit2005"     Warning--I didn't find a database entry for "Hadjerrouit2007"     Warning--I didn't find a database entry for "Wilson2007"     Warning--I didn't find a database entry for "Seffah2002"     Warning--I didn't find a database entry for "Torres2008"     Warning--I didn't find a database entry for "Downes2004"     Warning--I didn't find a database entry for "GrownUpDigital2009"     (There were 2 error messages)      output #3 is same than output #2 principal.bib is the entire citation databse for the whole document and is in /principal; so I have principal/principal.bib. Should I compile the chapters bibtex from the chapter subdirectory, or from the principal subdirectory as I did? I tried both withe the same result. Thank you.


title: Move everything a little bit left in beamer

text: I am putting an image in each column on a slide, everything is perfect except that because the first image starts too far right and it pushes a small part of the second image off the slide. How can I move where the images begin a little to the left so the entire images are included on the slide? Here is my code, again it would fit but it starts too far to the right on the slide.               \begin{frame}     \frametitle{Trends in total Events}     \begin{columns}     \column{.5\textwidth}          \includegraphics[scale=.4]{eventsgraph1.pdf}          \column{.5\textwidth}     \includegraphics[scale=.4]{eventsgraph2.pdf}     \end{columns}     \end{frame}


title: Pandoc: minimal headers for LaTeX output

text: I'm taking `mediawiki` text and trying to convert it to `latex` in Pandoc. All seems to be reasonably well. However, I had to make sure to use:               \documentclass{book}     \usepackage{hyperref}     \begin{document}     ... pandoc output ...     \end{document}      to get LaTeX to work at all - specifically, importing `hyperref` wasn't particularly intuitive. Is there a canonical list of packages I should be importing to handle any output from `pandoc -f latex` ? Or even just a list of "you should import this to cover this use-case". (I ask because I have further problems deep inside my document, and suspect this is the cause instead of Pandoc producing malformed LaTeX.) * * * GarethJones is absolutely right; using `-s` (`\--standalone`) gets you the headers for free, and was exactly what I needed. I also needed to use **xelatex** rather than latex in order to properly support unicode in order to parse some of the odder unicode characters (left- to-right direction marks, amongst others) and to ensure it output the correct ligatures (`fl` was being converted to Æ rather than ﬂ)


title: Physical Review Letters Style

text: Does anyone have latex template like the one they use in Physical Review letters (i.e. two columns in one paper) journal?


title: defining Style of flowchart tikz

text: I have been trying to define styles to make a good block flowchart in TikZ package, but I'm not very good at it, could you make one with a combination of blue, cyan and green? I need to describe the process of solving a pair of differential equations. I have this in the preamble:               \usepackage{tikz}     \usetikzlibrary{%         decorations.pathreplacing,%         decorations.pathmorphing,%         arrows,         shapes,         shapes.geometric         }         \tikzstyle{load}   = [ultra thick,-latex]         \tikzstyle{stress} = [-latex]         \tikzstyle{dim}    = [latex-latex]         \tikzstyle{axis}   = [-latex,black!55]      \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]      \tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]      \tikzstyle{process} = [rectangle, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!30]      \tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text width=3cm, text centered, draw=black, fill=green!30]      \tikzstyle{arrow} = [thick,->,>=stealth]      One of the flowcharts I do is this               \begin{center}     \begin{tikzpicture}[node distance=3cm]     \node (start) [startstop] {Dada una EDO de $1^{er}$ orden};     \node (dec1) [decision, below of=start,yshift=-1cm] {¿Es de la forma $\frac{dy}{dx}=f(x)\cdot g(y)$?};     \node (pro1a) [process, right of=dec1, xshift=2cm] {Emplee una sustitución $u$, tal que $\frac{du}{dx}=G(u)F(x)$ y siga el caso como si:};     \node (pro1b) [process, below of=dec1,yshift=-1cm] {Transforme en $\frac{dy}{g(y)}=f(x)dx$};     \node (pro2) [process, below of=pro1b] {Integre};     \node (end) [startstop, below of=pro2] {$H(y)=T(x)+C$, Solución general};     \draw [arrow] (start) -- (dec1);     \draw [arrow] (dec1) -- node[anchor=east] {sí} (pro1b);     \draw [arrow] (dec1) -- node[anchor=south] {no} (pro1a);     \draw [arrow] (pro1a) |- (pro1b);     \draw [arrow] (pro1b) -- (pro2);     \draw [arrow] (pro2) -- (end);     \end{tikzpicture}     \end{center}      and I get this: ![my flowchart](http://i.stack.imgur.com/cwQjV.png) I've been watching and these styles have caught my attention ![style 1](http://i.stack.imgur.com/fD1al.png) ![style 2](http://i.stack.imgur.com/mJUKZ.png) ![style 3](http://i.stack.imgur.com/57lYj.png)


title: Drawing a box at the bottom of the page

text: I want to draw a box with some text inside at the bottom of a page, and remove that page number. So far, I can draw the box and fill it with text using the table environment. I'm using the `p` option to make it have its own page. But I can't make it appear at the bottom, I tried the 'b' option and the `\null \vfill` commands and nothing seems to be working... Also, the page number won't disappear, even when I type `\thispagestyle{empty}` D: This is the document               \documentclass[12pt, oneside, draft]{report}     \usepackage[brazil]{babel}     \usepackage[latin1]{inputenc}      To give more details, I have a custom page in a separate file, and the page with the box should follow that one, but if I simply try to add the code of the box after it, it gets mixed with other pages. I tried the `\newpage` command, but the problem still remained, then I tried to create a separate file for the box code, but it didn't make any difference. The only time I got something was with the `p` option, but with that I have no control of where the box should be placed. I hope that the following code represents the error properly...               \input{./file.tex}          \begin{table}[p]     \thispagestyle{empty}     \centering         \begin{tabular}{|l|}             \hline             Random text\\ in\\ the box             \hline         \end{tabular}     \end{table}          \section*{Section}     A new section I start, that's the part that mixed with the table if I remove the 'p' option.      And the file.tex, just for the sake of the example               Some formatted text all over the page.          \newpage     %Still worked even without this command.      Can someone give me some help, please? :)


title: Spaces in names causes problem with graphicx

text: I keep getting the file name of my images next to the image. For example: ![enter image description here](http://i.stack.imgur.com/uNDYN.png)   * The full path of the file is `\\\Shared Folders\courses\acce\14\exams\mtndfa.png`. From reading other tex.stackexchange questions, I found that the problem is almost certainly the space between "Shared" and "Folders". Unfortunately, as I'm using VMWare, I don't think there is much I can do about that name; that's the name VMWare gives it. (The files are on my Mac disk, but TeX is running under Windows on a VM.)   * I know I could compile on the Mac, but my editor (Scientific Workplace) is on Windows, so that's not very convenient.   * I also learned that using grffile might help; it didn't.   * Finally I learned that using quotes around the file name might help, but as the file name is relative, not absolute, the problem is not with the name as it is in my TeX file, but as it is after being made absolute. Perhaps this is why griffle didn't help. Here is the start of my file:               \documentclass{article}%     \usepackage{amsfonts}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{grffile}%     \setcounter{MaxMatrixCols}{30}%     \usepackage{amssymb}      * * * EDIT: I found out that SWP is rewriting the `\includegraphics` command. I've updated the code below. And, here is the `\includgraphics` command               \begin{figure}[ptb]%     \centering     \includegraphics[     natheight=0.866500in,     natwidth=1.886200in,     height=0.8994in,     width=1.9242in     ]%     {//vmware-host/Shared Folders/courses/acce/14/exams/mtndfa.png}%     \end{figure}


title: LyX citation styles after insertion

text: I'm using LyX with the bibliography set to `natbib` > `Author, Year` in Document Settings and `plainnat` in the bibliography settings. So far, so good. This has the desired effect within the bibliography and the citations look good, with one exception - they are not surrounded with brackets, so they appear in the text as just `Cited, 2006` rather than `(Cited, 2006)`. This seems to be because I was using the Default (numerical) setting until now, and changing to `natbib` has given the 'insert citation' dialogue multiple citation styles. Every one of my 250+ citations has now defaulted to the style without brackets. So, question:   * Is it possible to change all citation styles in one go?   * Is it possible to change the `natbib` behaviour someway to put the brackets in (like the `\bibpunct` preamble or something?) Any help much appreciated! Worst case scenario I'll go back to numerical citations...


title: table width exceeds paper width in tabu environment

text: I made a table using the tabu environment. The code is attached below. There are two things I don't know how to fix. 1. The table width exceeds the page width. 2. how to change the vertical alignment for the first A and B and G and H...What I also don't understand is why construction types occupy two rows. Any help would be appreciated. Have been stuck here for two days. The table I intend to make is attached at last. (I made the second table using the tabular environment. However, I couldn't make it work in longtable environment so I tried to switch to tabu environment and hope longtabu will work.)               \documentclass{article}          \usepackage{amsmath,amsfonts,amssymb,amsthm}     \usepackage{tabu}     \usepackage{longtable}     \usepackage{makecell,interfaces-makecell}     \usepackage{multirow}          \begin{document}          \begin{tabu} {|X[cm]|X[cm]|X[cm]|X[cm]|X[cm]|X[cm]|X[cm]|X[cm]|}     \hline     \multicolumn2{|c|}{A} & B &\multicolumn5{|c|}{     \begin{tabu}spread 0pt{*5X[cm]}     {Construction Types}\\\hline     A & B & C & D& E\\     \end{tabu}}     \tabuphantomline     \hline     \multicolumn2{|c|}{         \begin{tabu}spread \linewidth{X[cm]|X[cm]}         $[$+animate$]$ & A\\\hline         $[$-animate$]$ & B\\         \end{tabu}}     & G & H & I & J & \\     \hline     \tabuphantomline     \end{tabu}          \end{document}      ![enter image description here](http://i.stack.imgur.com/ZIod4.jpg) ![enter image description here](http://i.stack.imgur.com/uXdId.jpg)


title: Removing a few lines in a table

text: I have this code:               \documentclass{article}     \usepackage{booktabs}          \begin{document}     \begin{center}         \begin{tabular}{c|lccc|c|}         & \multicolumn{5}{c}{\textbf{Political Party Preference}}\\\toprule         & & \textbf{Democrat} & \textbf{Republican} & \textbf{Independent} & \textbf{Total}\\\midrule         \textbf{Gender} & \textbf{Male} & 11 & 7 & 2 & 20\\         & \textbf{Female} & 7 & 8 & 1 & 16\\\midrule         & \textbf{Total}  & 18 & 15 & 3 &  36\\\bottomrule         \end{tabular}         \end{center}          \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/Cyf14.png) But I'd like to produce the table shown at: ![http://www.education.com/study-help/article/inference-two-way- tables/](http://i.stack.imgur.com/C9Ejf.gif) Any suggestions?


title: How to add font commands to a pgfplotstable header cell?

text: I'm trying to change the cell color and text color of the header of a `pgfplotstable`. Changing the cell color is not that much of a problem because I can just prefix the row with `\rowcolor`:               \documentclass{standalone}     \usepackage{colortbl}     \usepackage{pgfplotstable}     \definecolor{cellshade}{rgb}{0.42, 0.55, 0.84}     \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}     \begin{document}     \pgfplotstabletypeset[         col sep=comma,         column type={C{5em}},     every first column/.style={reset styles,string type,column type={>{\color{white}\cellcolor{cellshade}\arraybackslash}C{5em}}},     %    /pgfplots/colormap={orangewhiteorange}{color=(myorange) color=(white) color=(myorange)},     %    color cells={min=-1,max=1,textcolor=black},         every head row/.style={before row={\rowcolor{cellshade}}},         /pgf/number format/fixed,         /pgf/number format/skip 0.     ]{     Component,1,2,3     1,1.000,.186,.074     2,.186,1.000,.003     3,.074,.003,1.000     }     \end{document}      ![table with black header text](http://i.stack.imgur.com/wU7kJ.png) But clearly what the table should look like is this: ![table with white header text](http://i.stack.imgur.com/kVmcX.png) I'm stuck finding a good way to change the header text color though. I could change the name of each individual column but that's pretty inelegant. I know that I could in principle adapt this answer but it's not only also very inelegant IMHO (it changes the font style of the whole table first and then reverses this in postprocessing), it's also a solution that doesn't scale in general and in my case in particular it's not really applicable because a detail that I've mostly left out of the above MWE is that I postprocess the table cells anyway. I use this code to color in the table body, so this is what the table actually looks like (or should look like at least): ![table with right header and colored cells](http://i.stack.imgur.com/ZPUQC.png) Sure, I could adapt this code but I'm using it in other tables, too, and going this route would lead to disaster sooner or later. It's also not The Right Thing To Do™. So, long story short, how do I add font commands (or, I imagine, any other commands) to header cells in particular, without affecting the rest of the table.


title: Hide framezoom from handout

text: I have an image which is zoomed in a beamer presentation, when I try to do a handout of the presentation the slide with the zoomed image is shown. As I look at the handout the slide shown is the one with the zoomed image, therefore the original slide is hidden. I have tried this, but it does not work out:               \framezoom<handout:0><1><2>[border=0](6cm,4.6cm)(4.5cm,3cm)      The commands that I'm using to do the handout are:               \documentclass[utf8,handout]{beamer}      and               \usepackage{pgfpages}     \pgfpagesuselayout{4 on 1}[letter,border shrink=1mm]


title: Error showing up when using multicolumn and colors

text: I have a document that is creating the exact output I'm looking for, yet when I compile it I'm getting two errors. After tooling around for a little bit, I was able to pinpoint their location to the `\multicolumn` commands in my code:               \begin{tabular}{|P{9cm}P{9cm}|}     \hline     \multicolumn{2}{|c|}{\large \rowcolor{black} \color{white} {\bf Testing Modifications (highlight or circle)}} \\      \hline     Time Limit Waved         & On-Task Focusing Prompts \\     Exam/Sep Location        & Waive Spelling Reqs \\     Questions Read Aloud     & Revise Test Format \\     Answers Any Way          & Revise Test Directions \\     Calc/Abacus Permitted    & Breaks \\     \multicolumn{2}{|l|}{\AddLabel Other:} \\     \hline     \end{tabular} \\[.4cm]          {\bf \underline{PRESENT LEVELS OF PERFORMANCE}} \\[.4cm]          \begin{tabular}{|p{4.25cm}|p{4.25cm}|p{4.25cm}|p{4.25cm}|}     \hline     \multicolumn{4}{|c|}{\large \rowcolor{black} \color{white} {\bf Evaluation Results}} \\      \hline     & & & \\[1.2cm]     \hline     \end{tabular} \\[.4cm]      The exact error I'm getting is:               ! Misplaced \noalign.     \rowcolor ->\noalign       Since the output doesn't seem to be affected, it hasn't been bothering me all that much, but I definitely am curious as to why this error is here.


title: Show whitespace characters in monospace environments

text: I need to render an ASCII file for printing in a way that removes ambiguity if (very unlikely) one decides to type it in and validate the signatures. Essentially, I need a monospace typesetter that would typeset a 'blank space' symbol for space, a CR/LF symbol (and proceed to the next line for readability) whenever a CR/LF is encountered, etc., making it obvious if there are any trailing whitespaces before the CR/LF, if there is a character present, etc. Is there a font that already accomplishes that goal? *nix utility? TeX module/package/derived system? Is this even the proper SE site for this kind of questions? Would you think I'd have better luck at SuperUser? StackOverflow?


title: Remove brackets from cite commands in biblatex

text: I use brackets to fill out missing information in the bibliography. But when I include this information in citations in the text, these brackets should not appear. In the example below, the text should read > As John Lennon wrote in 1970 ... The bibliography should nevertheless still retain the brackets. (The custom `\citeauthorfullname` macro is something I found here).               \documentclass{article}     \usepackage[style = authoryear]{biblatex}     \DeclareCiteCommand{\citeauthorfullname}       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \DeclareNameAlias{labelname}{first-last}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexnames{labelname}}          {}%        \printnames{labelname}}       {\multicitedelim}       {\usebibmacro{postnote}}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @book{lennon1970,         AUTHOR = "J[ohn] Lennon",         TITLE = "This book was released with my Imagine album",         YEAR = "[1970]"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     As \citeauthorfullname{lennon1970} wrote in \citeyear{lennon1970} \ldots     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/tHrqE.png)


title: makeindex and restricted \write18

text: I use the `nomenclature` package to create nomenclature sections for my papers. I haven't done a paper in a while with a nomenclature, but today it is not working. In order to use the `nomenclature` package, I need to run `makeindex` and then rerun my LaTeX file. I normally have the following at the very first line of my LaTeX file and everything works fine automatically pretty much.               \immediate\write18{makeindex "paper".nlo -s nomencl.ist -o "paper".nls}      Today it isn't working though. It seems as though `\write18` restricted mode is the problem. It's possible something changed with TeX Live since I last wrote a paper with a nomenclature section when I upgrade my operating system at some point. I can get `bibtex` to run with `\write18`. Any reason why `makeindex` would not work? I thought it should be a safe program. If I run with `\--shell-escape`, everything works fine, but I don't want to do that because restricted mode was created for a reason. I can also run the `makeindex` command manually in a bash shell and everything works fine, but I am using kile and don't want to have to run another command all the time. Simplest example file I can create:               \immediate\write18{makeindex "paper".nlo -s nomencl.ist -o "paper".nls}     \documentclass[11pt]{article}     \usepackage{nomencl}     \makenomenclature     \begin{document}         \printnomenclature         some text         \nomenclature{$symbol$}{description}     \end{document}      Running `pdflatex paper.tex` produces no nomenclature. Running `pdflatex --shell-escape paper.tex` produces a nomenclature. When testing, make sure you delete all the extra files in the directory after running with `\--shell- escape` or change the symbol name because you may think the problem is solved when in fact the `makeindex` command was just run by your last test. How can I see what commands are allowed in restricted mode? If I run `kpsewhich --var-value shell_escape_commands` in bash, it returns 'bibtex,bibtex8,kpsewhich,makeindex,mpost,repstopdf,'. So, It seems as if makeindex should work. I am using `pdflatex` on Ubuntu 13.04.


title: Why am I getting this "Couldn't load requested aspect" error?

text: I want to include some Matlab scripts in my thesis. Unfortunately, I can't get `listings` to work properly. If I try to compile the following code,               \documentclass[11pt]{report}     \usepackage{listings}     \begin{document}     Bla bla bla.     \end{document}      I get the following error:               Package Listings Error: Couldn't load requested     aspect\lst@RequireAspects\lst@loadaspects      Why is that happening and what can I do to remedy the problem?


title: Insert code or text file in latex as is?

text: **Question : How can I insert a txt file ( a source code) as such in latex without any change in indentation, tabs, formatting etc?** **Scenario :** Consider I have a text file as below ( It is a part of a VHDL code edited in gEdit ): ![enter image description here](http://i.stack.imgur.com/qkgcV.png) I want to include this code in Latex as it is. I used verbatim method available in Kile, and below is the result I got : ![enter image description here](http://i.stack.imgur.com/18Oko.png) **You can see the tabs and indentation is dislocated.** ( This is just a small part, remaining part is also similar, means, everything dislocated) **How can I add this code as such into a latex file ?** **EDIT :** It is after the comment of @Kurt; I also used `listings` package. Again the same problem. Intendation is not correct. Also, it even cut some portions of text on the right side.               library IEEE;     use IEEE.STD_LOGIC_1164.ALL;          entity TOP_MODULE is         port (CLK          : IN STD_LOGIC;                   -- clock               RESET        : IN STD_LOGIC;                   -- reset signal               DECODED_DATA : OUT STD_LOGIC_VECTOR(0 TO 15)   -- decoded message               );     end TOP_MODULE;


title: auto-detect conditional probabilities in macro

text: Is it possible to write a macro that detects whether there is a `|` character in its arguments, and expands that to something else? In concrete terms, I want to be able to use the following definitions simultaneously:               \def\P(#1){\Pr\left( #1 \right)}     \def\P(#1|#2){\Pr\left( #1 \mid #2 \right)}      Whenever in the text I write a probability `$\P(X)$`, the first definition should be used, whereas `$\P(X|Y)$` should use the second. If possible, a simple TeX/LaTeX solution is preferred, since many journals put restrictions on usable packages. I know this could be achieved using simply two different macros. The reason for this question is that the abstract of a paper often ends up printed in plain text (think the arXiv email), and I would like it to be as readable as possible.


title: How to format content in multicolumn list in latex

text: I have tried finding the answer on google but to no avail, hence here. I have a multicolumn list in my latex file.               \begin{multicols}{3}     \begin{itemize}     \item blah1     \item blah2 blah3 blah4     \item blah5 blah6          \end{itemize}     \end{multicols}      So right now it automatically formats my multicolumn as - blah1 and blah2 in column1, blah3 and blah4 in column2 and remaining in column3. however I want each item to be in its own column, so blah1 goes into column1, "blah2 blah3 blah4" goes into column2, and "blah5 blah6" go in column3. How do I achieve this?


title: tikzexternalize does not update on OS X

text: I believe this issue is on OS X only, as I could not reproduce it on Linux: Using tikzexternalize, the pdf is not updated whenever I change the tex-file. Instead, I always get the following answer (from latexmk/pdflatex):               ===== Image './figures/main-figure0' is up-to-date. ======      Even if I manually delete the pdf, the figure is not rebuilt. It does not even check for the source file once the final pdf is ready. I suppose this has something to do with time stamping on OS X, but have no real clue how to get this working. Any thoughts/suggestions/debugging possibilities? Best, jochen


title: Create a title for beamerposter

text: How to create a nice title for beamer poster using default available theme. Where I can found complete reference about beamer poster?


title: Why don't those non-alphanumeric chars (*/_) get colored in blue, here?

text: Consider the following example:               \documentclass{article}          \usepackage{listings}     \usepackage{xcolor}          \lstset{language=R,         morecomment=[l]{>},         commentstyle=\color{blue},         alsoletter={*}         }     \begin{document}          \begin{lstlisting}     > q_A=0:6     > q_B=6-q_A     > N_A=6     > N_B=4     > (factorial(q_A+N_A-1)/(factorial(q_A)*factorial(N_A-1)))     [1]   1   6  21  56 126 252 462     \end{lstlisting}          \end{document}      The above code compiles to a simplified version of the image below (from the main document): ![http://i.imgur.com/D3rkYpZ.png?1](http://i.stack.imgur.com/az5i4.png) When compiling this, the asterisk `*`, the underscore `_`, and the slash `/` are all still treated as special characters that should _not_ be highlighted. I've already included the `alsoletter` key to include e.g. `*`, but the key seems to be ignored. How can I get the entire line starting with a `>` to be blue? I've already checked e.g. How can I get identifier style to apply to '%' (in a Perl listing)? for special identifiers, but that doesn't seem to work here. Neither does the "normal" approach of simply using `alsoletter=*` or `alsoletter={/}`, etc. Where is it going wrong?


title: How to add more space between list items?

text: I have a list. Editor says it shall have more space between items. How to achieve such thing?


title: Theorem numbers in bold

text: With the standard theorem-like environemnts (at least when using amsthm), one obtains something like > Theorem 2.3. where "Theorem" is in bold but "2.3." is not. I would like to have the number in bold too. A first solution may look like               \newtheorem{thm}{Theorem}[section]     \renewcommand{\thethm}{\textbf{\arabic{section}.\arabic{thm}}}      The problem with this solution is that every reference to a theorem number will be in bold as well, and I don't want this inside the text. Is there a way to have only the numbers in theorem headings in bold? **EDIT** As it was pointed out, my actual example is slightly more complicated than that. I am using a modified theorem style; a minimal example follows               \documentclass[reqno]{amsart}          \usepackage{amsthm, lipsum}     \swapnumbers          \newtheoremstyle{dotless-thm}     {3pt}     {3pt}     {\it}     {}     {\bfseries}     {}     {.5em}     {}          \theoremstyle{dotless-thm}     \newtheorem{thm}{Theorem}[section]          \begin{document}     \begin{thm}     \lipsum     \end{thm}     \end{document}      Even though I use `bfseries` for the theorem body font, the number appears in normal font.


title: Does \documentclass{book} by default take care of gutter for inner side of page?

text: I'm hoping to create a book at the site lulu using LaTeX instead of Microsoft Word, and they say: > Leave at least .5" margins on all your pages. Most books will require a > gutter of .2" to .3". I know how to set the .5" margins, but I've never done much with the book documentclass. Do I need to specifically tell it to add a gutter? Whether or not gutter is added by default, I guess I need to know how to specify that .2", since that is pretty specific.


title: White space under wrapfigure caption

text: Wrapfigure environment has excessive whitespace BELOW the caption. Inserting negative vspace just shifts the position of the caption relative to the image, actually increasing the 2+ lines of pointless space that usually sit below it. Any ideas?


title: No \citation, \bibdata, \bibstyle commands

text: I tried compiling a file that uses the `fancytooltips` package, according to Gonzalo Medina's answer at Showing the bibliographic entry in a popup when you hover over the citation key. I was able to do `pdflatex bibtips.tex`. It produces the `.aux` file:               \relax      \abx@aux@sortscheme{nty}     \abx@aux@cite{goossens93}     \@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \abx@aux@cite{knuth79}      But when I tried doing `bibtex bibtips.aux`, the result is               This is BibTeX, Version 0.99d (TeX Live 2012)     The top-level auxiliary file: bibtips.aux     I found no \citation commands---while reading file bibtips.aux     I found no \bibdata command---while reading file bibtips.aux     I found no \bibstyle command---while reading file bibtips.aux     (There were 3 error messages)      How can I fix it?


title: Using \evaluate in nested \foreach loops with TikZ

text: I would like to draw two grids side by side using TikZ; the left one being a complete square grid, and the right one being a lower-triangular one. I tried writing the following code to make the figure, but \yy is always equal to \y, and it only draws straight lines. What am I doing wrong? Is there a better way to draw the triangular grid?               \begin{tikzpicture}         % Grid         \draw[step=1,color=gray] (0,0) grid (5,5);         % Pads         \draw (4.5,4.5) node {G};              \foreach \x [evaluate=\x as \ystart using int(\x-6), evaluate=\x as \xx using int(\x+1)] in {6, 7,..., 10}           \foreach \y [evaluate=\y as \yy using int(\y+1)] in {\ystart, ..., 4}           \draw [color=gray] (\x,\y) rectangle (\xx,\yy) node {\y, \yy} ;         % Pads         \draw (10.5,4.5) node {G};          \end{tikzpicture}


title: How do I make a command to display a custom title page?

text: I followed the advice on the question What do \makeatletter and \makeatother do? to try to make a custom command that displays a custom title page, but it is not working.               ./article.tex:17: You can't use `\spacefactor' in vertical mode.\@ ->\spacefactor                       \@m     l.17 \makecustomtitle          Sorry, but I'm not programmed to handle this case;     I'll just pretend that you didn't ask for it.     If you're in the wrong mode, you might be able to     return to the right one by typing `I}' or `I$' or `I\par'.     ./article.tex:17: Missing $ inserted.<inserted text>                     $     l.17 \makecustomtitle          I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.     ./example.tex:17: You can't use `\spacefactor' in math mode.\@ ->\spacefactor                       \@m     l.17 \makecustomtitle          Sorry, but I'm not programmed to handle this case;     I'll just pretend that you didn't ask for it.     If you're in the wrong mode, you might be able to     return to the right one by typing `I}' or `I$' or `I\par'.     ./example.tex:17: Missing $ inserted.<inserted text>                     $     l.17 \makecustomtitle          I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.      What follows is the simplified code:               \documentclass[12pt]{article}          \newcommand{\makecustomtitle}{     \begin{titlepage}       \makeatletter            \@title by \@author            \makeatother     \end{titlepage}     }          \begin{document}     \title{Please, be my title}     \author{Andres Riofrio}          \makecustomtitle          Take on me.          \end{document}


title: Adding tabs between two parts of one equation

text: I need to add a tab between after the semicolon in the equation shown below:               \begin{equation}     Thr =  4\sigma_n;\sigma_n = median \left(\frac{|x|}{0.6745}\right)     \end{equation}      How can I do this?


title: I am trying to email a .tex file that uses \includegraphic? HELP?

text: I am trying to email a .tex file that uses \includegraphics. The file compiles on my computer but does not compile on the computer of the person I am emailing because of the \includegraphics. Is there any way to fix this?


title: Single paragraph with styling and larger \parskip

text: I'd like to use something like this:               {\bfseries\small Some text here...\setlength{\parskip}{1em}}          More text here in the next paragraph...      In order to increase the spacing after a single paragraph, but this doesn't seem to change anything. Is there a right way to do this or do I have to use `\vspace`?


title: How can I show coordinates by grid in TikZ automatically?

text: I have the following `TikZ` code which draws a grid and shows the coordinates. To display the coordinates I am using the loop `foreach`.               \documentclass[12pt]{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \draw[help lines,step=.2] (-2,-2) grid (7,4);     \draw[help lines,line width=.6pt,step=1] (-2,-2) grid (7,4);     \foreach \x in {-2,-1,0,1,2,3,4,5,6,7}      \node[anchor=north] at (\x,-2) {\x};     \foreach \y in {-2,-1,0,1,2,3,4}      \node[anchor=east] at (-2,\y) {\y};     \end{tikzpicture}     \end{document}      Is there a way do simplify the code in this way that I have a key like `show coordinates` (maybe `step coordinates/.initial=step` ):               \draw[help lines,step=.2,show coordinates=true] (-2,-2) grid (7,4);      Or a modification of the command `grid` like               \draw[help lines,step=.5] (-2,-2) gridwithcoordinates (7,4);      ![enter image description here](http://i.stack.imgur.com/9BH1p.png) By using `pstricks` it is very simple with the command `\psgrid`               \documentclass[12pt]{article}     \usepackage{pstricks}          \begin{document}     \begin{pspicture}(-2,-2)(7,4)     \psgrid     \end{pspicture}     \end{document}      _Bonus_ : How can I set a larger line width for the help lines at the integer coordinates (see picture above)? (I don't know the correct words ;-) )


title: Creating interactive slide (beamer)

text: I want to create an interactive slide, which will have two parts:   1. In the left side, some comments will be given in `enumerate` environment (one will be highlighted at each overlay)   2. In the right side, an image will accompany the currently highlighted text (say, an arrow will be shown in that image) For example, have a look at frame numbered 23 of this file. **Screen-shot:** ![](http://i.stack.imgur.com/Uevxd.png) What is the best way to do this? As per asked, this is (a short version of) what I am trying... **MWE**               \documentclass{beamer}          \begin{document}     \begin{frame}     \begin{minipage}{0.2\textwidth}     \begin{enumerate}     \item this is 1     \item this is 2     \end{enumerate}     \end{minipage}     \hfill     \begin{minipage}{0.75\textwidth}     \only<1> {\includegraphics[width=.75\textwidth]{fig4-2}}     \only<2> {\includegraphics[width=.75\textwidth]{fig4-3}}     \end{minipage}     \end{frame}     \end{document}      The images are: fig4-2 ![](http://i.stack.imgur.com/cUAII.png) fig4-3 ![](http://i.stack.imgur.com/kOXdi.png) # Update * * * As @GonzaloMedina replies on the left-hand-side part (that solves my current problem), now I am left with dynamically creating the images. That means, rather than creating each image separately and then including is a tiresome and monotonous job. There should be some better way to reproduce one image from its predecessor. To complete the whole question, as per his (Gonzalo Medina) suggestion, I am creating this follow-up question.


title: Alone pawn: LaTeX

text: If you know, how to work with chess in LaTeX, please help! I want to make an alone pawn to go. This code works, but shows lots of other pieces:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage{chessboard, skak}     \begin{document}         \begin{frame}             \newgame\setchessboard{markstyle=border,color=blue}             \only<1>{\mainline{1.a4}}             \only<2>{\hidemoves{1.a4}}             \chessboard         \end{frame}     \end{document}      This code shall work for an alone pawn, but it doesn't moves:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage{chessboard, skak}     \begin{document}         \begin{frame}             \newgame\setchessboard{markstyle=border,color=blue}             \only<1>{\mainline{1.a4}}             \only<2>{\hidemoves{1.a4}}             \chessboard[setpieces = {Pa2}] % Pawn         \end{frame}     \end{document}      Documentation for the lib


title: "Missing Number" error when using "switch" in "boolexpr"

text: \pdfoutput=1     \documentclass[12pt]{amsart}     \usepackage{boolexpr}          \def \p{1}     \def \q{1}          \begin{document}     \switch[\p=]     \case{\q}abc     \endswitch     def     \end{document}      Compiling the above I get the following error               ! Missing number, treated as zero.     <to be read again>                         \bex@=0 truepart      l.12 \endswitch      But if we change the definition to               \def \q{2}      or change the line to               \switch[1=]      it will be OK. But only change the line to               \case{1}abc      yields the same error. Any idea why this happens? Thank you in advance.