title: Sequence model diagram in TikZ

text: How would I create something like this in TikZ, such that I could reuse the template to create other diagrams like this one? ![enter image description here](http://i.stack.imgur.com/iCOtG.png) Update: Using the code from Gonzalo Medina, I get the following error:               ! Package pgfkeys Error: I do not know the key '/tikz/myline/.pic' and I am going to ignore it. Perhaps you misspelled it.     See the pgfkeys package documentation for explanation.      The actual code is:               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage[danish]{babel}     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usetikzlibrary{positioning}          \newcommand\Intent[1]{%       \textbf{Intent:}~#1%     }     \newcommand\Trigger[1]{%       \textbf{Trigger:}~#1%     }          \begin{document}          \begin{tikzpicture}[     myline/.pic={       \draw[ultra thick]          ++(2.5pt,5pt) --          ++(-5pt,-5pt) --         ++(5pt,0pt) --         ++(-5pt,-5pt)         ;         \node[anchor=west,font=\itshape,text width=3cm,align=left,xshift=10pt] {#1};       },     mynode/.style={       text width=4cm,       align=left,       anchor=west       },     arr/.style={       ->,       >=latex       }     ]     \node[mynode] (l1) {\Intent{lorem ipsum}};     \node[mynode,right=of l1] (r1) {\Trigger{lorem ipsum}};     \node[mynode,below=of r1] (r2) {Some other text};     \node[mynode,below=of r2] (r3) {Some other text};     \node[mynode,left=of r3] (l2) {\Intent{lorem ipsum}};     \node[below=of r3] (r4) {Done};          \draw[arr] (r1) -- (r2);     \draw[arr] (r2) -- coordinate (aux) (r3);     \draw[arr] (r3) -- (r4);          \pic at (aux) {myline={some text goes here}};     \end{tikzpicture}          \end{document}      Not sure if it matters, but my latex version is:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)


title: Signature in preface

text: I would like to make a signature field in the preface which looks like this:                                          City(#1) \today                            ___________________           ______________________                   NAME (#2)                        NAME (#3)                                     __________________                                 NAME (#4)      I wold like it to be a `\newcommand` with 4 arguments.. The "city \today" and "NAME (#4) should be centered (textwidth) and NAME (#2) and NAME (#3) with some spacing to the margins.. my preface:               \documentclass[pdftex,10pt,b5paper,twoside]{report}     \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}


title: \the\thislevelcount is available inside a ForEachX loop, but \thislevelitem is not (the forarray package)

text: I'm trying to loop though a comma delimited list and print out the elements in a table. Here is the code that works half-way for doing this:               \documentclass[10pt,a4paper]{article}          % \usepackage[includeheadfoot, margin=1.5cm,headsep=25pt,footskip=25pt,a4paper]{geometry}      \usepackage[left=1.0cm, right=1.0cm, top=2cm, bottom=3cm, bindingoffset=0cm, showframe=true]{geometry}     \setlength{\headsep}{30pt}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{marvosym}     %\usepackage{setspace}     \usepackage{array}     \usepackage[english=nohyphenation]{hyphsubst}     \usepackage[english]{babel}     \usepackage{booktabs}     %\setlength{\heavyrulewidth}{2pt}     \usepackage{fancyhdr}     \usepackage{tabularx}     \usepackage{tikz} % for using foreach loops     \usepackage{xspace}     \usepackage{ifthen} % http://texdoc.net/texmf-dist/doc/latex/base/ifthen.pdf          \usepackage[nomessages]{fp} % http://ctan.org/pkg/fp. For doing calculations like add, subtract, divide, etc.     % for moving the tables to the left     \usepackage[strict]{changepage}          %\usepackage{pgfmath,pgfkeys} % https://tex.stackexchange.com/questions/117427/rounding-up-decimal-number-using-latex-3     %\newcommand\RoundingUpFunction[1]{%     %  \pgfmathparse{ceil(#1)}%     %  \pgfmathprintnumber[int trunc]{\pgfmathresult}%     %}     % \RoundingUpFunction{2.7}          \fancyhf{}          %% Top center     \chead{         This is the header     }     \cfoot{}     \renewcommand{\headrulewidth}{0.4pt}     \pagestyle{fancy}          % This is for the list of skills     \usepackage{forarray}     \newcommand{\nCols}{0} % change this in doc - but first need to define it here in the pre-amble     \newcommand{\nRows}{0}     \newcommand{\skillsList}{0}          % This is for putting ampersands inside conditionals for tables     % https://tex.stackexchange.com/questions/7590/how-to-programmatically-make-tabular-rows-using-whiledo/7594#7594     % https://tex.stackexchange.com/questions/165126/how-do-i-use-the-ampersand-inside-a-foreach-or-conditional-or-other-group-e     \makeatletter     \newtoks\@tabtoks     \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}}     \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}}     \newcommand*\resettabtoks{\@tabtoks{}}     \newcommand*\printtabtoks{\the\@tabtoks}     \makeatother          \begin{document}     \def\and{&\xspace}     % -------------------------------------------------------- Summary --------------------------------------------------------     \begin{adjustwidth}{-0.02cm}{}     \begin{tabularx}{\textwidth}{@{}>{\raggedright}p{2.2cm}@{}p{16.8cm}@{}}     \textbf{Summary} & This is a summary.     \end{tabularx}     \end{adjustwidth}     % -------------------------------------------------------------------------------------------------------------------------               % -------------------------------------------------------- Skills ---------------------------------------------------------     % list the skills      \renewcommand{\skillsList}{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x} %      \renewcommand{\nCols}{4} % this is the total number of columns for the skills only (need to add one for the label)          % count all the skills to get the number of skills. This will allow calculation of the number of rows.     \newcounter{nSkills}     \ForEachX{,}{\stepcounter{nSkills}}{\skillsList}          % calculate the number of rows as the ceil(number of skills/number of columns)     \FPdiv\nRows\thenSkills\nCols     %\def\zeropfive{0.5}     %\FPadd\nRows\nRows\zeropfive     \FPround\nRows\nRows0     % nRows is \nRows     number of skills: \thenSkills          % Now create the table     %\textbf{IT Skills} & This & here & is filler & a lot of it \\     %\textbf{IT Skills} & 1 & 2 & 3 & 4          \begin{adjustwidth}{-0.02cm}{}     \begin{tabularx}{\textwidth}{@{}>{\raggedright}p{2.2cm}@{}>{\raggedright}X@{}>{\raggedright}X@{}>{\raggedright}X@{}>{\raggedright\arraybackslash}X@{}}     \resettabtoks     \foreach \r in {1,...,\nRows}{  % https://stackoverflow.com/questions/2561791/iteration-in-latex         \foreach \c in {1,...,\nCols}{             \ForEachX{,}{                  % The number of the element of the list is: \r-(\c-1)*nRows                 \FPsub\factor\c1                 \FPmul\term\factor\nRows                 \FPadd\rowElementToShow\r\term                 \FPtrunc\rowElementToShow\rowElementToShow0                      \ifthenelse{\equal{\the\thislevelcount}{\rowElementToShow}}{                     %\ifthenelse{\the\thislevelcount < \thenSkills}{                         \addtabtoks{&} \eaddtabtoks{\the\thislevelcount} \addtabtoks{\thislevelitem}  % \addtabtoks{& blah & blah & blah \\ }                     %}{}                 }{}             }{\skillsList}           }         \addtabtoks{\\}     }     \printtabtoks     \end{tabularx}     \end{adjustwidth}     % -------------------------------------------------------------------------------------------------------------------------               \end{document}      And here is what this code outputs: ![PDF output from code above](http://i.stack.imgur.com/U057v.png) I would like to have the same output except with the skill beside each number, so `1:a 7:g` etc. The variable for this should be `\thislevelitem`, but this variable in `addtabtoks{}` gives no output, and in `eaddtabtoks{}` gives an error, even though `\thislevelcount` is available. Any thoughts on what I could do to fix this? Thanks!


title: Exporting TikZ to EPS using MacTex

text: I have followed the instructions for exporting to an `.eps` file from a TikZ drawing provided here: http://tex.stackexchange.com/a/8646/8078. However, I cannot get any of the methods to produce an `.eps` file successfully. I am working on a MAC, OS 10.6.8, running MacTeX via TexShop. When I use the following code, a `.pdf` is created, but no `.eps` file is created. Here is the code:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}          \usetikzlibrary{external}          \tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error      -interaction=batchmode -jobname "\image" "\texsource" &&     pdftops -eps "\image".pdf}}     \tikzexternalize          \begin{document}          \tikzset{external/force remake}          \begin{tikzpicture}[yscale=3.5,xscale=4.5]          \draw[->] (0,0) -- (2,0) node[below, text width=2cm] {Before Tax Income $z$};     \draw[->] (0,0) -- (0,2) node[below left, text width=1.8cm] {After Tax Income $z - T(z)$};          \begin{scope}     \clip (0,0) rectangle (1,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \begin{scope}     \clip (1,0) rectangle (2,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \draw[rotate around={45:(1,1)},red] (.6,1.1) node[left] {$L$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.125,.125)},rotate around={45:(1,1)},cyan] (.6,1.1) node[left] {$M$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.25,.25)},rotate around={45:(1,1)},ForestGreen] (.6,1.1) parabola bend (1,1) (1.4,1.1) node[right] {$H$};          \draw[dashed] (1,0) node[below] {\textcolor{red}{$z^{*}$}} -- (1,2);          \draw[dashed] (1.25,0) node[below] {\textcolor{ForestGreen}{$z^{*}+\triangle z^{*}$}} -- (1.25,2);          \path (.15,.1) node[right] {slope = $1-t$};          \end{tikzpicture}          \end{document}       As suggested in http://tex.stackexchange.com/a/8646/8078, I also try alternative ways to create the `.eps`, namely, using the following code, where the system call is changed, and `latex` is used to compile, rather than `pdflatex`:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}          \usetikzlibrary{external}          \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error     -interaction=batchmode -jobname "\image" "\texsource";     dvips -o "\image".ps "\image".dvi;     ps2eps "\image.ps"}}     \tikzexternalize          \begin{document}          \tikzset{external/force remake}          \begin{tikzpicture}[yscale=3.5,xscale=4.5]          \draw[->] (0,0) -- (2,0) node[below, text width=2cm] {Before Tax Income $z$};     \draw[->] (0,0) -- (0,2) node[below left, text width=1.8cm] {After Tax Income $z - T(z)$};          \begin{scope}     \clip (0,0) rectangle (1,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \begin{scope}     \clip (1,0) rectangle (2,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \draw[rotate around={45:(1,1)},red] (.6,1.1) node[left] {$L$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.125,.125)},rotate around={45:(1,1)},cyan] (.6,1.1) node[left] {$M$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.25,.25)},rotate around={45:(1,1)},ForestGreen] (.6,1.1) parabola bend (1,1) (1.4,1.1) node[right] {$H$};          \draw[dashed] (1,0) node[below] {\textcolor{red}{$z^{*}$}} -- (1,2);          \draw[dashed] (1.25,0) node[below] {\textcolor{ForestGreen}{$z^{*}+\triangle z^{*}$}} -- (1.25,2);          \path (.15,.1) node[right] {slope = $1-t$};          \end{tikzpicture}          \end{document}      In this case, I get the following error message: > ./tikz_eps2.tex:55: Package tikz Error: Sorry, the system call 'latex > -shell-es cape -halt-on-error -interaction=batchmode -jobname > "tikz_eps2-figure0" "\def\t ikzexternalrealjob{tikz_eps2}\input{tikz_eps2}"; > dvips -o "tikz_eps2-figure0".p s "tikz_eps2-figure0".dvi; ps2eps > "tikz_eps2-figure0.ps"' did NOT result in a u sable output file > 'tikz_eps2-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify > that you have enabled system calls. For pdflatex, this is 'pdflat ex -shell- > escape'. Sometimes it is also named 'write 18' or something like that . Or > maybe the command simply failed? Error messages can be found in 'tikz_eps2 > -figure0.log'. If you continue now, I'll try to typeset the picture. I hit return, latex continues to compile a `.pdf`. As a result, a `.ps` is created that I can open, but the `.eps` file that is created is "empty." That is, when I try to open the `.eps` it with `Preview`, I get the error "Warning: Empty Job. No PDF file produced." Or, if I open the `.eps` file in Adobe Illustrator, all that shows is a blank canvace. Finally, I also use this syntax for the extranlize command:               \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error     -interaction=batchmode -jobname "\image" "\texsource" &&      dvips -o "\image".ps "\image".dvi &&     ps2eps "\image.ps"}}     \tikzexternalize[shell escape=-enable-write18]      After this, I get the same result as in the second case. I should also mention that I try to directly use `ps2eps` to convert the `.ps` an `.eps` in OS X Terminal. I get the following message in Terminal: > Input files: /Users/nomad/Dropbox/tex_remote/TiKz/tikz_eps2-figure0.ps > Processing: /Users/nomad/Dropbox/tex_remote/TiKz/tikz_eps2-figure0.ps > Rendering with existing %%BoundingBox: 0 0 345 225 Calculating Bounding > Box...ready. %%BoundingBox: 4 3 332 225 Creating output file > /Users/nomad/Dropbox/tex_remote/TiKz/tikz_eps2-figure0.eps ... ready. However, the resulting `.eps` is still "blank" as in the previous cases.


title: Circuitikz line and component color

text: I wish to make a component (capacitor) in my circuit a different color (blue). When I use the code:               \begin{document}     \usepackage{circuitikz}     \begin{center}     \begin{circuitikz}      \draw(0,0) to [C,l_=$C$,*-*,color=blue](0,2);     \end{circuitikz}     \end{center}     \end{document}      This happens: ![](http://i.stack.imgur.com/wflaP.png) But I want the lines going to the capacitor to be blue too and not black. How do I do this if I wish to add additional components to my circuit later on and want those to be black? Can I also make the label C blue too? Thanks


title: Vertically aligning hyphens and en dash in a compound word

text: I was wondering if there is a way to make the hyphen and en dash in a compound word appear at the same "height." For instance the style guide I'm following suggests using en dash to reduce the ambiguity in post-apocalyptic-–science fiction movies. It's only a small difference but I was curious if there is a proper way to handle this. Here is a screenshot of what they suggest it should look like: ![screenshot from style guide](http://i.stack.imgur.com/jqkms.png) And here is what it looks like in my final pdf doc, notice how the hyphen is at one height and the en dash is at another:![screenshot from my pdf](http://i.stack.imgur.com/oE1Mu.png) Here is an MWE:               \documentclass[]{book}          \begin{document}     post-apocalyptic--science fiction movies     \end{document}


title: preview-latex generates .png previews but does not place them in the buffer

text: When generating previews, I get a small, empty white box with a border around it. I looked inside the .prv folder and the .png files are indeed being created. emacs has support for .png (e.g. image-dired and image-view-mode correctly display them). MWE:               \documentclass{article}     \begin{document}     $3+4$     \end{document}      I've tried AUCTeX 11.86 (with the patch described here https://bugzilla.redhat.com/show_bug.cgi?id=646632 which fixes a gs error by changing some flags), the latest development version, which includes the patch, and the version packaged with Aquamacs 2.4, since in Aquamacs.app, preview-latex works fine. emacs 24.1.1 under X with ghostscript 9.05, texlive-2011, on OS X 10.7.


title: How to compile a ConTeXt input file that contains PSTricks code?

text: I can compile the following input file using `context filename` unless I un- comment the PSTricks code.               \usemodule[pstricks]          \setuphead[title][style={\ss\bfd},         before={\begingroup},         after={John Doe, the author\smallskip\currentdate\bigskip\endgroup}]          \starttext          \title{\CONTEXT}                    %\begin{pspicture}[showgrid=true](4,5)     %\psline(0,0)(3,3)     %\end{pspicture}          \stoptext


title: Replace non-ascii characters with biblatex, part 2

text: This is a follow-up to the question Can't replace non-ascii characters with biblatex. The aim is to replace certain character strings in `.bib` file entries with other strings. Compiling the following document now works fine in `xelatex`:               \documentclass{article}     \usepackage[style = authoryear-comp]{biblatex}     \usepackage{fontspec}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1968,         AUTHOR = "John Lennon",         TITLE = "xåy",         YEAR = "1968"}     \end{filecontents}     \DeclareSourcemap{       \maps[datatype = bibtex]{         \map{            \step[fieldsource = title,               match = \regexp{xåy},                replace = {abc}]         }       }     }     \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/Opw1M.png) But when I use the common macro `\aa` instead of `å`, it fails:               \documentclass{article}     \usepackage[style = authoryear-comp]{biblatex}     \usepackage{fontspec}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1968,         AUTHOR = "John Lennon",         TITLE = "x{\aa}y",         YEAR = "1968"}     \end{filecontents}     \DeclareSourcemap{       \maps[datatype = bibtex]{         \map{            \step[fieldsource = title,               match = \regexp{xåy},                replace = {abc}]         }       }     }     \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/CT6OL.png) Apart from replacing macros like `\aa` in my `.bib` file with UTF-8 characters like `å`, is there any way to overcome this problem?


title: Extra column in pgfgantt chart

text: I have created a basic gantt chart using pdfgantt (pretty much copied one of the examples) but would like to make a couple of (extra) modifications to it. I really need to be able to number my groups and bars and would like to have an extra column to the left hand side of the labels with this numbering (i.e. in the following example Part 1 would be numbered 1, task 1 of part 1 would be numbered 1.1 etc.). I have my example below to which I would like to add this feature. Thanks in advance for your help!!               \begin{figure}[h]      \begin{center}      \begin{ganttchart}[       x unit=2.0cm, y unit title=0.4cm, y unit chart=0.6cm, vgrid,       title/.append style={draw=none, fill=RoyalBlue!50!black}, title left shift=0.01, title right shift=-0.01,       title label font=\sffamily\bfseries\color{white},       title label node/.append style={below=-1.6ex},title height=1,       bar/.append style={draw=none, fill=OliveGreen!75},       bar height=.3, bar label font=\normalsize\color{black!90}, bar label text={#1\hspace*{0.1cm}},       group right shift=0.05, group top shift=.6, group height=.1, group peaks height=.2, group peaks width=0.1, group left shift=-0.05,       group label node/.append style={align=right}, group label text={#1\hspace{0.2cm}},       milestone left shift=0.94, milestone right shift=0.06, milestone height=0.4, milestone label text={#1\hspace*{0.1cm}},       bar incomplete/.append style={fill=Maroon}]{1}{8}       % Titles       \gantttitle{2013}{3}\gantttitle{2014}{5} \\       \gantttitle{Q4}{3}\gantttitle{Q1}{3}\gantttitle{Q2}{2}\\       \gantttitle{10}{1}\gantttitle{11}{1}\gantttitle{12}{1}\gantttitle{1}{1}\gantttitle{2}{1}\gantttitle{3}{1}\gantttitle{4}{1}\gantttitle{5}{1} \\       \ganttset{progress label text={}, link/.style={black, -to}}       % Part 1       \ganttgroup{Part 1}{1}{4} \\       \ganttbar[progress=25, name=T1A]{Task 1}{1}{3} \\       \ganttbar[progress=25, name=T2A]{Task 2}{2}{2} \\       \ganttbar[progress=25, name=T3A]{Task 3}{3}{3} \\       \ganttbar[progress=25, name=T4A]{Task 4}{3}{3} \\       \ganttbar[progress=25, name=T5A]{Task 5}{3}{3} \\       \ganttbar[progress=25, name=T6A]{Task 6}{3}{4} \\       % Part 2       \ganttgroup{Part 2}{4}{8} \\       \ganttbar[progress=25, name=T1B]{Task 1}{4}{6} \\       \ganttbar[progress=25, name=T2B]{Task 2}{4}{8} \\       \ganttbar[progress=25, name=T3B]{Task 3}{6}{8} \\       % Overviews       \ganttgroup{Overview}{1}{8} \\       \ganttmilestone{Milestone 0}{0} \\       \ganttmilestone{Milestone 1}{2} \\       \ganttmilestone{Milestone 2}{3} \\       \ganttmilestone{Milestone 3}{8} \\       \ganttset{link/.style={OliveGreen}}      \end{ganttchart}      \end{center}     \end{figure}


title: phase of tikz's snake decoration

text: Is it possible to change the phase of the `snake` decoration? I want it to start, e.g. at the maximum of a wiggle. I find the option `phase` only for dashes.


title: Align table caption with left border of longtable

text: Subj. I cannot use `singlelinecheck=off` because it aligns it to the left border of the page. And why table is too narrow?               \documentclass[12pt,a4paper,oneside]{article}     \usepackage[left=35mm,right=15mm,top=2cm,bottom=2cm,bindingoffset=0cm]{geometry}     \usepackage[utf8x]{inputenc} % указать кодировку русского текста     \usepackage[russian]{babel} % указать, что язык текста - русский          \usepackage{cmap}          \usepackage{makeidx}     \makeindex          \usepackage{indentfirst}      \setlength{\parindent}{1.25cm}          \usepackage{caption}     \captionsetup[table]{labelsep=endash}          \usepackage{ltablex}     \usepackage{lipsum}     \begin{document}         \keepXColumns             \begin{tabularx}{\textwidth}{| l | X |}                   \caption{A long description of this awesomest table ever. No, seriously.}\\             \hline              First & Second\\ \hline \hline             \endfirsthead             \captionsetup{singlelinecheck=off}             \caption{A short one}\\             \hline              First & Second\\ \hline             \endhead             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             Lols & \lipsum[150] \\ \hline             \end{tabularx}     \end{document}


title: Beamer: don't enumerate the first section in the TOC

text: I have several sections in a Beamer document, starting the section number 1 on the second section. For that I use               \tableofcontents[firstsection=2]      but the first section has the number zero. So, I would like the first section without number. Soomething like the option `\frontmatter` for the book class. Any idea? This is the MWE:               \documentclass{beamer}          \usetheme{CambridgeUS}          \begin{document}          \begin{frame}{Contents}     \tableofcontents[firstsection=2]     \end{frame}          \section{no-numerated section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \section{First Section}          \subsection{First sub-section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \subsection{Second sub-section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \section{Second Section}          \subsection{First sub-section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \subsection{Second sub-section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \section{Third section}          \begin{frame}     \begin{itemize}     \item          \end{itemize}     \end{frame}          \end{document}


title: link size and color (nameref)

text: I create a link with `\nameref`:               \section*{\Huge {\color{DarkRed}This is a headline}}     \label{sec:headline}      When I reference to this section with               \nameref{sec:headline}      The link is displayed the same size (Huge) and color (Dark Red) as the section title. The hyperref setup is:               \usepackage[colorlinks=true,linkcolor=black]{hyperref}      How can I avoid that link color and size are taken from the section setup. I want to keep them independent from one another. EDIT: Minimal working example:               \documentclass{article}          \usepackage[colorlinks=true,linkcolor=black]{hyperref}     \begin{document}          \nameref{sec:headline}          \newpage     \section*{\Huge {\color{red}This is a headline}}      \label{sec:headline}          \end{document}


title: Using \glsaddall without listing page numbers

text: In continuation to the thread How to use `\glsaddall` to list all the unused entries in list of nomenclatures and list of glossaries without printing the page numbers in the lists?


title: Draw array(data structure) with underbraces at subarray

text: I'm pretty new to latex and I'm having some difficult to draw this: ![Ignore the sketch at the top of image](http://i.stack.imgur.com/EenCn.jpg) It is very important that the dots do not be inside a column, but act like a separator (actually it indicates that there are an unknown number of elements between the two parts of array) I have no idea how to do this. Also if I draw 2 arrays they won't be at same line, and I think it is not the correct way to think to solve the problem... Thank you in advance.


title: Colorbar for pgfplots contour plot

text: I have to draw a contour plot of a large dataset, so I use **lualatex** as compiler. This example also works with normal **latex** , i.e. latex+dvips+ps2pdf. It works fine in **latex** but for the large amount of data I have I require a solution using **lualatex**. What I want to do is plot a 2D-contour I read in from some matlab calculations. Since the contour lines are pretty tight, I do not want labels in my plots, but the heights cannot be completely neglected and should be mentioned. So what I am looking for is either (preferably) a colorbar for the height values or some other kind of legend to display the heights (I am mainly interested in the order of magnitude, not some fancy details here). Alas, colorbar style produces just an empty bar. How can this be done correctly? Preferrably I would stick to the given data format and not calculate the point meta information myself using any non-standard data-output. Have a look at my (rather large due to the data) MWE:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{filecontents}     \pgfplotsset{compat=1.10}     \usepgfplotslibrary{colormaps}     \listfiles          \begin{document}          \begin{filecontents*}{contours.txt}     % contours in matlab export format:     % first line: height value | number of points     % empty line: new height contour     % (   -8.000000e-01,  +27) ==> contour '   -8.000000e-01', consists of 27 points     % first line is reserved for height value and number of values            -8.000000e-01     +2.700000e+01            +9.298664e-01     +3.100000e+00            +9.425839e-01     +3.000000e+00            +9.698291e-01     +2.900000e+00            +1.000000e+00     +2.829558e+00            +1.015251e+00     +2.800000e+00            +1.087289e+00     +2.700000e+00            +1.100000e+00     +2.686407e+00            +1.200000e+00     +2.603061e+00            +1.204984e+00     +2.600000e+00            +1.300000e+00     +2.552224e+00            +1.400000e+00     +2.519138e+00            +1.500000e+00     +2.501552e+00            +1.551839e+00     +2.500000e+00            +1.600000e+00     +2.498741e+00            +1.612658e+00     +2.500000e+00            +1.700000e+00     +2.510011e+00            +1.800000e+00     +2.536488e+00            +1.900000e+00     +2.579387e+00            +1.934295e+00     +2.600000e+00            +2.000000e+00     +2.648558e+00            +2.052969e+00     +2.700000e+00            +2.100000e+00     +2.759507e+00            +2.125867e+00     +2.800000e+00            +2.171795e+00     +2.900000e+00            +2.200000e+00     +2.997366e+00            +2.200652e+00     +3.000000e+00            +2.212428e+00     +3.100000e+00     % (   -6.000000e-01,  +36) ==> contour '   -6.000000e-01', consists of 36 points     % first line is reserved for height value and number of values            -6.000000e-01     +3.600000e+01            +6.450855e-01     +3.100000e+00            +6.520548e-01     +3.000000e+00            +6.669855e-01     +2.900000e+00            +6.906688e-01     +2.800000e+00            +7.000000e-01     +2.771533e+00            +7.265882e-01     +2.700000e+00            +7.765533e-01     +2.600000e+00            +8.000000e-01     +2.563254e+00            +8.478595e-01     +2.500000e+00            +9.000000e-01     +2.444816e+00            +9.521974e-01     +2.400000e+00            +1.000000e+00     +2.365752e+00            +1.100000e+00     +2.309798e+00            +1.122826e+00     +2.300000e+00            +1.200000e+00     +2.271037e+00            +1.300000e+00     +2.243961e+00            +1.400000e+00     +2.226175e+00            +1.500000e+00     +2.216722e+00            +1.600000e+00     +2.215114e+00            +1.700000e+00     +2.221269e+00            +1.800000e+00     +2.235502e+00            +1.900000e+00     +2.258563e+00            +2.000000e+00     +2.291738e+00            +2.019028e+00     +2.300000e+00            +2.100000e+00     +2.340503e+00            +2.190532e+00     +2.400000e+00            +2.200000e+00     +2.407411e+00            +2.294865e+00     +2.500000e+00            +2.300000e+00     +2.506214e+00            +2.364773e+00     +2.600000e+00            +2.400000e+00     +2.666529e+00            +2.415326e+00     +2.700000e+00            +2.450228e+00     +2.800000e+00            +2.474706e+00     +2.900000e+00            +2.490138e+00     +3.000000e+00            +2.497341e+00     +3.100000e+00     % (   -4.000000e-01,  +47) ==> contour '   -4.000000e-01', consists of 47 points     % first line is reserved for height value and number of values            -4.000000e-01     +4.700000e+01            +4.121411e-01     +3.100000e+00            +4.162488e-01     +3.000000e+00            +4.250489e-01     +2.900000e+00            +4.390079e-01     +2.800000e+00            +4.589111e-01     +2.700000e+00            +4.859784e-01     +2.600000e+00            +5.000000e-01     +2.559536e+00            +5.233061e-01     +2.500000e+00            +5.739589e-01     +2.400000e+00            +6.000000e-01     +2.359249e+00            +6.448749e-01     +2.300000e+00            +7.000000e-01     +2.241668e+00            +7.485041e-01     +2.200000e+00            +8.000000e-01     +2.163065e+00            +9.000000e-01     +2.106929e+00            +9.154680e-01     +2.100000e+00            +1.000000e+00     +2.066755e+00            +1.100000e+00     +2.036846e+00            +1.200000e+00     +2.014678e+00            +1.292516e+00     +2.000000e+00            +1.300000e+00     +1.998903e+00            +1.400000e+00     +1.988971e+00            +1.500000e+00     +1.983693e+00            +1.600000e+00     +1.982795e+00            +1.700000e+00     +1.986232e+00            +1.800000e+00     +1.994179e+00            +1.845915e+00     +2.000000e+00            +1.900000e+00     +2.007387e+00            +2.000000e+00     +2.026780e+00            +2.100000e+00     +2.053259e+00            +2.200000e+00     +2.088613e+00            +2.225761e+00     +2.100000e+00            +2.300000e+00     +2.137725e+00            +2.393978e+00     +2.200000e+00            +2.400000e+00     +2.204738e+00            +2.497559e+00     +2.300000e+00            +2.500000e+00     +2.302942e+00            +2.567519e+00     +2.400000e+00            +2.600000e+00     +2.460471e+00            +2.618401e+00     +2.500000e+00            +2.655260e+00     +2.600000e+00            +2.682907e+00     +2.700000e+00            +2.700000e+00     +2.783521e+00            +2.703086e+00     +2.800000e+00            +2.716685e+00     +2.900000e+00            +2.725258e+00     +3.000000e+00            +2.729260e+00     +3.100000e+00     % (   -2.000000e-01,  +55) ==> contour '   -2.000000e-01', consists of 55 points     % first line is reserved for height value and number of values            -2.000000e-01     +5.500000e+01            +2.015527e-01     +3.100000e+00            +2.034614e-01     +3.000000e+00            +2.075505e-01     +2.900000e+00            +2.140368e-01     +2.800000e+00            +2.232852e-01     +2.700000e+00            +2.358626e-01     +2.600000e+00            +2.526312e-01     +2.500000e+00            +2.749154e-01     +2.400000e+00            +3.000000e-01     +2.314760e+00            +3.049582e-01     +2.300000e+00            +3.472067e-01     +2.200000e+00            +4.000000e-01     +2.110448e+00            +4.074905e-01     +2.100000e+00            +5.000000e-01     +2.001149e+00            +5.013777e-01     +2.000000e+00            +6.000000e-01     +1.933295e+00            +6.678578e-01     +1.900000e+00            +7.000000e-01     +1.886642e+00            +8.000000e-01     +1.853701e+00            +9.000000e-01     +1.829264e+00            +1.000000e+00     +1.810904e+00            +1.078017e+00     +1.800000e+00            +1.100000e+00     +1.797166e+00            +1.200000e+00     +1.787170e+00            +1.300000e+00     +1.780034e+00            +1.400000e+00     +1.775346e+00            +1.500000e+00     +1.772854e+00            +1.600000e+00     +1.772430e+00            +1.700000e+00     +1.774053e+00            +1.800000e+00     +1.777804e+00            +1.900000e+00     +1.783883e+00            +2.000000e+00     +1.792627e+00            +2.062975e+00     +1.800000e+00            +2.100000e+00     +1.804674e+00            +2.200000e+00     +1.820992e+00            +2.300000e+00     +1.842670e+00            +2.400000e+00     +1.871696e+00            +2.473804e+00     +1.900000e+00            +2.500000e+00     +1.911733e+00            +2.600000e+00     +1.969658e+00            +2.639606e+00     +2.000000e+00            +2.700000e+00     +2.058423e+00            +2.733790e+00     +2.100000e+00            +2.794742e+00     +2.200000e+00            +2.800000e+00     +2.210974e+00            +2.836362e+00     +2.300000e+00            +2.866601e+00     +2.400000e+00            +2.889144e+00     +2.500000e+00            +2.900000e+00     +2.562435e+00            +2.905958e+00     +2.600000e+00            +2.918372e+00     +2.700000e+00            +2.927500e+00     +2.800000e+00            +2.933901e+00     +2.900000e+00            +2.937937e+00     +3.000000e+00            +2.939821e+00     +3.100000e+00     % (   +0.000000e+00,  +47) ==> contour '   +0.000000e+00', consists of 47 points     % first line is reserved for height value and number of values            +0.000000e+00     +4.700000e+01            +0.000000e+00     +3.100000e+00            +0.000000e+00     +3.000000e+00            +0.000000e+00     +2.900000e+00            +0.000000e+00     +2.800000e+00            +0.000000e+00     +2.700000e+00            +0.000000e+00     +2.600000e+00            +0.000000e+00     +2.500000e+00            +0.000000e+00     +2.400000e+00            +0.000000e+00     +2.300000e+00            +0.000000e+00     +2.200000e+00            +0.000000e+00     +2.100000e+00            +0.000000e+00     +2.000000e+00            +0.000000e+00     +1.900000e+00            +0.000000e+00     +1.800000e+00            +0.000000e+00     +1.700000e+00            +0.000000e+00     +1.600000e+00            +1.000000e-01     +1.570782e+00            +2.000000e-01     +1.570782e+00            +3.000000e-01     +1.570782e+00            +4.000000e-01     +1.570782e+00            +5.000000e-01     +1.570782e+00            +6.000000e-01     +1.570782e+00            +7.000000e-01     +1.570782e+00            +8.000000e-01     +1.570782e+00            +9.000000e-01     +1.570782e+00            +1.000000e+00     +1.570782e+00            +1.100000e+00     +1.570782e+00            +1.200000e+00     +1.570782e+00            +1.300000e+00     +1.570782e+00            +1.400000e+00     +1.570782e+00            +1.500000e+00     +1.570782e+00            +1.600000e+00     +1.570782e+00            +1.700000e+00     +1.570782e+00            +1.800000e+00     +1.570782e+00            +1.900000e+00     +1.570782e+00            +2.000000e+00     +1.570782e+00            +2.100000e+00     +1.570782e+00            +2.200000e+00     +1.570782e+00            +2.300000e+00     +1.570782e+00            +2.400000e+00     +1.570782e+00            +2.500000e+00     +1.570782e+00            +2.600000e+00     +1.570782e+00            +2.700000e+00     +1.570782e+00            +2.800000e+00     +1.570782e+00            +2.900000e+00     +1.570782e+00            +3.000000e+00     +1.570782e+00            +3.100000e+00     +1.570782e+00     % (   +2.000000e-01,  +55) ==> contour '   +2.000000e-01', consists of 55 points     % first line is reserved for height value and number of values            +2.000000e-01     +5.500000e+01            +2.013739e-01     +0.000000e+00            +2.024108e-01     +1.000000e-01            +2.055740e-01     +2.000000e-01            +2.110283e-01     +3.000000e-01            +2.190722e-01     +4.000000e-01            +2.301799e-01     +5.000000e-01            +2.450758e-01     +6.000000e-01            +2.648652e-01     +7.000000e-01            +2.912697e-01     +8.000000e-01            +3.000000e-01     +8.265445e-01            +3.279292e-01     +9.000000e-01            +3.794935e-01     +1.000000e+00            +4.000000e-01     +1.030812e+00            +4.572205e-01     +1.100000e+00            +5.000000e-01     +1.139929e+00            +5.850948e-01     +1.200000e+00            +6.000000e-01     +1.208593e+00            +7.000000e-01     +1.254717e+00            +8.000000e-01     +1.288085e+00            +8.459457e-01     +1.300000e+00            +9.000000e-01     +1.312486e+00            +1.000000e+00     +1.330574e+00            +1.100000e+00     +1.344175e+00            +1.200000e+00     +1.354255e+00            +1.300000e+00     +1.361452e+00            +1.400000e+00     +1.366179e+00            +1.500000e+00     +1.368692e+00            +1.600000e+00     +1.369120e+00            +1.700000e+00     +1.367483e+00            +1.800000e+00     +1.363700e+00            +1.900000e+00     +1.357570e+00            +2.000000e+00     +1.348752e+00            +2.100000e+00     +1.336711e+00            +2.200000e+00     +1.320635e+00            +2.296876e+00     +1.300000e+00            +2.300000e+00     +1.299258e+00            +2.400000e+00     +1.269856e+00            +2.500000e+00     +1.229700e+00            +2.556082e+00     +1.200000e+00            +2.600000e+00     +1.171926e+00            +2.684634e+00     +1.100000e+00            +2.700000e+00     +1.083425e+00            +2.761928e+00     +1.000000e+00            +2.800000e+00     +9.302234e-01            +2.813832e+00     +9.000000e-01            +2.850056e+00     +8.000000e-01            +2.876767e+00     +7.000000e-01            +2.896787e+00     +6.000000e-01            +2.900000e+00     +5.796880e-01            +2.911567e+00     +5.000000e-01            +2.922530e+00     +4.000000e-01            +2.930469e+00     +3.000000e-01            +2.935852e+00     +2.000000e-01            +2.938974e+00     +1.000000e-01            +2.939998e+00     +0.000000e+00     % (   +4.000000e-01,  +47) ==> contour '   +4.000000e-01', consists of 47 points     % first line is reserved for height value and number of values            +4.000000e-01     +4.700000e+01            +4.117565e-01     +0.000000e+00            +4.139878e-01     +1.000000e-01            +4.207952e-01     +2.000000e-01            +4.325333e-01     +3.000000e-01            +4.498443e-01     +4.000000e-01            +4.737488e-01     +5.000000e-01            +5.000000e-01     +5.827813e-01            +5.061323e-01     +6.000000e-01            +5.511144e-01     +7.000000e-01            +6.000000e-01     +7.828193e-01            +6.119223e-01     +8.000000e-01            +6.990859e-01     +9.000000e-01            +7.000000e-01     +9.008632e-01            +8.000000e-01     +9.787218e-01            +8.348187e-01     +1.000000e+00            +9.000000e-01     +1.034207e+00            +1.000000e+00     +1.074902e+00            +1.081170e+00     +1.100000e+00            +1.100000e+00     +1.105225e+00            +1.200000e+00     +1.126776e+00            +1.300000e+00     +1.142162e+00            +1.400000e+00     +1.152270e+00            +1.500000e+00     +1.157642e+00            +1.600000e+00     +1.158556e+00            +1.700000e+00     +1.155058e+00            +1.800000e+00     +1.146970e+00            +1.900000e+00     +1.133864e+00            +2.000000e+00     +1.115011e+00            +2.059572e+00     +1.100000e+00            +2.100000e+00     +1.088708e+00            +2.200000e+00     +1.052542e+00            +2.300000e+00     +1.004495e+00            +2.307658e+00     +1.000000e+00            +2.400000e+00     +9.361881e-01            +2.441528e+00     +9.000000e-01            +2.500000e+00     +8.377354e-01            +2.529339e+00     +8.000000e-01            +2.590982e+00     +7.000000e-01            +2.600000e+00     +6.816485e-01            +2.635009e+00     +6.000000e-01            +2.667752e+00     +5.000000e-01            +2.692168e+00     +4.000000e-01            +2.700000e+00     +3.566031e-01            +2.709394e+00     +3.000000e-01            +2.720829e+00     +2.000000e-01            +2.727461e+00     +1.000000e-01            +2.729635e+00     +0.000000e+00     % (   +6.000000e-01,  +38) ==> contour '   +6.000000e-01', consists of 38 points     % first line is reserved for height value and number of values            +6.000000e-01     +3.800000e+01            +6.444328e-01     +0.000000e+00            +6.482186e-01     +1.000000e-01            +6.597684e-01     +2.000000e-01            +6.796837e-01     +3.000000e-01            +7.000000e-01     +3.699459e-01            +7.098511e-01     +4.000000e-01            +7.539780e-01     +5.000000e-01            +8.000000e-01     +5.788139e-01            +8.145836e-01     +6.000000e-01            +9.000000e-01     +6.981460e-01            +9.019755e-01     +7.000000e-01            +1.000000e+00     +7.760325e-01            +1.039656e+00     +8.000000e-01            +1.100000e+00     +8.312433e-01            +1.200000e+00     +8.705182e-01            +1.300000e+00     +8.985591e-01            +1.307662e+00     +9.000000e-01            +1.400000e+00     +9.156823e-01            +1.500000e+00     +9.247248e-01            +1.600000e+00     +9.262632e-01            +1.700000e+00     +9.203755e-01            +1.800000e+00     +9.067609e-01            +1.831263e+00     +9.000000e-01            +1.900000e+00     +8.834369e-01            +2.000000e+00     +8.490788e-01            +2.100000e+00     +8.021655e-01            +2.103683e+00     +8.000000e-01            +2.200000e+00     +7.333510e-01            +2.238255e+00     +7.000000e-01            +2.300000e+00     +6.342651e-01            +2.326662e+00     +6.000000e-01            +2.388279e+00     +5.000000e-01            +2.400000e+00     +4.753975e-01            +2.431225e+00     +4.000000e-01            +2.461581e+00     +3.000000e-01            +2.482165e+00     +2.000000e-01            +2.494103e+00     +1.000000e-01            +2.498016e+00     +0.000000e+00     % (   +8.000000e-01,  +27) ==> contour '   +8.000000e-01', consists of 27 points     % first line is reserved for height value and number of values            +8.000000e-01     +2.700000e+01            +9.286755e-01     +0.000000e+00            +9.355837e-01     +1.000000e-01            +9.566595e-01     +2.000000e-01            +9.930007e-01     +3.000000e-01            +1.000000e+00     +3.134802e-01            +1.054472e+00     +4.000000e-01            +1.100000e+00     +4.538252e-01            +1.149931e+00     +5.000000e-01            +1.200000e+00     +5.368432e-01            +1.300000e+00     +5.905824e-01            +1.326241e+00     +6.000000e-01            +1.400000e+00     +6.223554e-01            +1.500000e+00     +6.385605e-01            +1.600000e+00     +6.413175e-01            +1.700000e+00     +6.307660e-01            +1.800000e+00     +6.063674e-01            +1.816499e+00     +6.000000e-01            +1.900000e+00     +5.616013e-01            +1.993790e+00     +5.000000e-01            +2.000000e+00     +4.948996e-01            +2.088383e+00     +4.000000e-01            +2.100000e+00     +3.833321e-01            +2.147170e+00     +3.000000e-01            +2.185790e+00     +2.000000e-01            +2.200000e+00     +1.369073e-01            +2.207134e+00     +1.000000e-01            +2.213531e+00     +0.000000e+00\end{filecontents*}              \begin{tikzpicture}             \begin{axis}[colorbar, colormap/jet, colorbar horizontal]                      \addplot                     [                     contour prepared,                     contour prepared format=matlab,                     /pgfplots/contour/labels=false,                     ]                     table {contours.txt};             \end{axis}         \end{tikzpicture}     \end{document}      which produces the output shown below (red ellipsoid to mark the problematic area not part of pgfplots output) ![rendered mw- example](http://i.stack.imgur.com/zPrpq.jpg) # Update 1 Based on comments and discussion below, I am led to think this is a problem of the version of pgfplots I am using. Still an update to **TeX 3.14159265 (TeX Live 2014/W32TeX)** yielded no different results. I suppose that my pgf packages are up to date, but to ensure this I added the `\listfiles` command in the example above. If you can compile a filled colorbar from my example, I would gladly see the files-part of your log to detect version differences. This is my file list:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     pgfplots.sty    2014/02/28 v1.10 Data Visualization (1.10-2-gb39fe75)         tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)          pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)       pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)     graphicx.sty    2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    2014/05/08 v1.15 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)       pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)       pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)      pgfkeys.sty          pgfkeys.code.tex      pgfmath.sty          pgfmath.code.tex       pgffor.code.tex         tikz.code.tex     filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX      document     supp-pdf.mkii     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      ***********      I have read elsewhere that for interpolation-shading with lualatex one needs to install the development pgfplots package, which I haven't done(no need for interp-shading czrrently). Maybe this empty colorbar is an additional bug?


title: How to create enumerate environment with item number in the format (i,j)?

text: \begin{enumerate}[(i)]       \item     \end{enumerate}      This gives the items with roman numbering. But I want to numbering in (i,j) format, i.e. I want my items numbered like (1,2),(1,1), (5,4) etc. What to do?


title: Include links for certain paragraphs

text: I would like to include links/reference points in my latex document, e.g. ![Picture showing 3 pages and a link from page 3 to page 1](http://i.stack.imgur.com/bvsa8.jpg) The situation is the following: There is a certain paragraph on, say page 11, and on page 13 there is a link and when the reader clicks this link (which does not necessarily have to be blue) then the reader is taken to the desired paragraph on page 11. And I imagined my code to look like this:               Lie groups are smooth manifolds     ...     Lie algebra.          \CreateLink{LabelLie}{Paragraph about Lie groups}     Lie groups play an enormous role in modern geometry,        ...     and are studied in representation theory.          In the 1940s–1950s, Ellis Kolchin, Armand Borel       ...     in number theory.          On a "global" level, whenever a        ...     analysis on the manifold.  (see \LinkTo{LabelLie})      Is such a construction possible?


title: Latex picture overlapps with caption

text: I have two versions of a latex project in English and Japanese with the same picture declaration:               \begin{figure}[h!]         \centering         \includegraphics[scale=0.4]{eps/figure1.eps}         \caption{The model of a grid, a two state Markov chain}         \label{markovchain}     \end{figure}      In the English version, the pdf output looks well. However, in the Japanese version, the picture isn't located at right position. The latex commands for compile are uplatex + dvipdfm. The eps picture: input eps picture The pdf file: output pdf file ![output pdf file](http://i.stack.imgur.com/89TYH.jpg) I guest the problem is command combination, so I've tried different command combinations but not successful. Please guide me to overcome this issue.               \documentclass[uplatex]{ujarticle}      \usepackage{its2014}      \usepackage{graphicx}      \usepackage{fancyhdr}      \usepackage{algorithm}      \usepackage{algorithmic}      \usepackage[cmex10]{amsmath}      \usepackage{multirow} \usepackage{url}      \usepackage{subfigure}           \begin{document}      \subsection{IMACモデルと更新方法} 本節では...      \begin{figure}[h!]      \centering      \includegraphics[scale=0.4]{eps/figure1.eps}      \caption{The model of a grid, a two state Markov chain} \label{markovchain}      \end{figure} ここで、$\lambda_{exit}$は状態occupiedから状態freeに遷移する確率である．$\lambda_{entry}$は状態freeから状態occupiedに遷移する確率である．      \end{document}


title: changing intersection between axes in PSTricks

text: I am having some issues with axes in PSTricks. Here is my current MWE,               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node, pst-plot}     \psset     {         unit=0.1cm,     }                    \usepackage{siunitx}     \begin{document}     \begin{pspicture}[showgrid=false](-5.0, -23)(110.0, 20.0)     \psaxes[Dx=10,Dy=10,linewidth=1pt,ticksize=2pt]{->}(0,0)(0.0,-23)(105,20)[$z (\si{\milli\meter})$, 0][$$,90]     \end{pspicture}     \end{document}      I have two issues:   1. I want to rotate all tick-labels, both on the x- and y-axis (including the x-axis label) by 90 degrees CCW.   2. I want for the two axis to meet at the bottom of the y-axis instead of (0, 0), as it is now.


title: A vertical line between an \fbox and a minipage?

text: ![enter image description here](http://i.stack.imgur.com/lSKZx.jpg) I use a template of beamer. In a frame, there is a `\fbox` on the left and a `minipage` on the right. But I found it very ugly. So I imagine that it would be nicer if I add a blue vertical line here. Since the main color of the template is blue. `For the .sty files, please download at http://www.ist.tugraz.at/staff/weiglhofer/misc/tugrazposter/`               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}           \mode<presentation> {         \usetheme{TUGraz}         }     \usepackage{tikz}     \usepackage{pgflibraryshapes}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes}     \usetikzlibrary{automata}     \tikzstyle{model_node}=[circle,draw=black,fill=tuggreen!50,minimum size=50pt]     \tikzstyle{tool}=[draw,double,rounded corners,inner sep=10pt]     \tikzstyle{aut_node}=[circle,draw=black,fill=black,inner sep=0pt,minimum size=7pt,font=\footnotesize]          \usefonttheme[onlymath]{serif}     \boldmath     \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}                                      \begin{document}               \begin{block}{Primal Dual Algorithm{\color{block title.bg}p}}          \fbox{     \begin{minipage}[c]{0.48\textwidth}%     $\bullet$ Initialization: $\tau\sigma\le\frac{1}{\norm{K}^2}$,$\theta\in\sbra{0,1}$,$(x^0,y^0)\in X\times Y$,$\overline{x}^0 = x^0, \lambda \in \mathbb{R}$          $\bullet$ Iterations $n\ge 0$: Update $x^n, y^n$ as follows,     \begin{align*}        y^{n+1}&=(I+ \sigma \partial F^*)^{-1}(y^n+\sigma K \overline{x}^n)  \\        x^{n+1}&=(I+\tau \lambda\partial G)^{-1}({x}^n-\tau K^*y^{n+1})   \\           \overline{x}^{n+1} &= x^{n+1}+\theta (x^{n+1}-x^{n})     \end{align*}     \end{minipage}     }     \hfill      \begin{minipage}{0.48\textwidth}     \centering     Online Primal-dual Algorithm:     \begin{equation*}       \left\{        \begin{array}{rl}     \widetilde{L}^{n+1}&=\frac{\avg{K(x^n-x^{n-1}),y^{n+1}-y^n}}{\norm{x^{n-1}-x^n}\norm{y^{n+1}-y^n}}\\        L^{n+1}&=\max\lbra{L^n,\widetilde{L}^{n+1}}\\         \tau^{n+1}&=\frac{a}{{L^{n+1}}}, \sigma^{n+2}=\frac{1}{a{L^{n+1}}} \\     \end{array}       \right.     \end{equation*}      \end{minipage}                         \end{block}               \end{document}


title: Titlesec problem, defining space before section with \titlespacing

text: I am using the `article` document class and have trouble with the `\titlespacing` command of the `titlesec` package (explicit). I want to have more space before the `\section`. MWE:               \documentclass[a4paper,12pt,fleqn,twoside]{article}     \usepackage[explicit]{titlesec}     \usepackage{varwidth}     \usepackage{xhfill}     \usepackage{parskip}          \titleformat{\section}[display]      {\Huge}{\filleft\thesection}{-2ex}       {\hspace*{\dimexpr-6em-10pt\relax}         \advance\hsize6em\advance\hsize10pt%         \rule[0.5ex]{6em}{1pt}\hspace{10pt}%          \begin{varwidth}{\textwidth}\raggedright#1\end{varwidth}%        \hspace{10pt}\xrfill[0.5ex]{1pt}%      }           \titlespacing{\section}{0cm}{8cm}{2cm}          \begin{document}     \section{abc}     abcbacbabcbabcbacbabcbabcbabcbac     \cleardoublepage     \section{def}     abcbacbabcbabcbacbabcbabcbabcbac     \end{document}      But I have trouble with the `\titlespacing` command, it seems like it is getting overwritten by something.   Has it got to do with the explicit command of the titlesec package? * * * Another question:   With my current section heading style, is it possible to only enlarge the section number without enlarging the section text?


title: Can comment delimiters be typeset in a style different from commentstyle?

text: Using `listings`, I'm trying to typeset single-line comments in a very specific way: although whatever follows should be typeset according to the value passed to the `commentstyle` key, the opening delimiter should be typeset in the identifier style (i.e. that of the "normal code"). I've been playing around with the different _types_ (`s`,`m`,`l`) and the `i` prefix of `morecomment` offered by the `listings` package, to no avail. Any idea? **Edit** : Of course, one requirement is that I shouldn't have to alter the listing itself to to obtain the desired output; introducing delimiters in the listing is cheating :)               \documentclass{article}          \usepackage{xcolor}     \usepackage{listings}     \lstset%     {%         basicstyle=\ttfamily,         commentstyle=\itshape\color{blue},         morecomment=[s]{\%\%}{\^^M},     }          \begin{document}          \lstset{}     \begin{lstlisting}     confusion=Inf %% this is a comment     \end{lstlisting}          How can I get the opening comment delimiter (\texttt{\%\%}) to be typeset,     not in blue, but in the default colour (black)?          \end{document}      ![output screenshot](http://i.stack.imgur.com/CQJpM.png)


title: excel2latex leads to the error: "Unicode char 8... not set up for use with LaTeX"

text: Compiling LaTeX to pdf worked fine until I used code generated by `excel2latex`. Now I'm getting the error "Unicode char 8… not set up for use with LaTeX".               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage{booktabs,multicol,multirow}     \usepackage{textcomp}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \begin{document}          \begin{table}     \begin{tabular}{rc}     \toprule           & \textbf{Volume} \\     \midrule     \multicolumn{1}{c}{Phusion Taq Polymerase} & 0.5 l \\     \multicolumn{1}{c}{5 ˣ Phusion buffer HF} & 10 l \\     \multicolumn{1}{c}{dNTPs } & 1 l \\     \multicolumn{1}{c}{Primer forward} & 2.5 l \\     \multicolumn{1}{c}{Primer reverse} & 2.5 l \\     \multicolumn{1}{c}{DNA} & 2 l \\     \multicolumn{1}{c}{Water} & 31.5 l \\     \bottomrule     \end{tabular}%     \label{tab:addlabel}%     \end{table}          \end{document}


title: Make predictive mode default emacs

text: Every time I fire up Emacs, I run `M-x predictive-mode`. Is there a way to automate that and preferably while editing TeX.


title: Column alignment in ltablex

text: I tried to apply the method proposed in How to get column alignment in tabularx? to right align cells in a `ltablex`. However I have a problem when the size of the table is just enough for my columns: some cells end up on two lines, with the first one empty. Here is a minimal example:               \documentclass[a4paper, 12pt]{report}          \usepackage[french]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{etoolbox}     \AtBeginEnvironment{tabular}{\footnotesize}     \AtBeginEnvironment{tabularx}{\footnotesize}     \AtBeginEnvironment{longtable}{\footnotesize}          \usepackage{multirow}     \usepackage{ltablex}     \usepackage{array}     \newcolumntype{Y}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}X}     \newcolumntype{Z}{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}X}               \begin{document}          %\renewcommand{\tabcolsep}{3pt}          \begin{tabularx}{160pt}{ X  Y  Z }     % head       \hline        Name &        Long~name &        Name  \\       & [unit] & [$longunit$]  \\*        \hline\hline      \endhead     % foot       \hline     \endfoot      % body     \multirow{3}{1.6cm}{Text on two lines} & 0 & 0 \\*      & 0 & 0   \\*      & 0 & 0   \\     \end{tabularx}               \end{document}      I get this result: ![Compilation result](http://i.stack.imgur.com/jesMX.png) I found out that removing the `\hspace{0pt}` in the Y and Z column type definition solves the problem, but as it might be useful in other situations I would like to know if there is a better way to deal with this ? Also, if I uncomment the line that redefined the `tabcolsep`, the Y and Z columns become left aligned again. Is there a way to have right aligned or center columns with a lower `tabcolsep`?


title: insert -> Senseless!

text: Working with LyX, I opened the Insert menu in order to insert a label. Accidentally, my mouse selected something else, I don't know what, and before I knew it, I saw the phrase "Senseless!!!" in the middle of the page. I tried to look at the Insert menu to find out what could generate such phrase. I looked for "Insert -> Criticism" or "Insert -> Content Analysis" or "Insert -> What the reviewers are going to say about your paper", but haven't found anything like this. What makes LyX say "Senseless!!!"???


title: Need to 'rescale' a complex document (page size and fonts) to A5 from A4

text: What I'm asking might not be within my capabilities, but I'm trying to change a document to print on 74 pages of A5 instead of 74 pages of A4. I have managed to change the papersize to A5 but it prints on 146 pages, as the fonts are still at the original size! I haven't a clue how to 'scale' all the fonts by 0.5 ( _i.e._ make every instance of every character 50% of its original size). I've found some clues that adding `[scaled=0.5]` to a font package is something of a solution, but it doesn't work with the document I'm trying to change. Changing the `\documentclass` from `10pt` to `5pt` doesn't do anything (and maybe it wouldn't - I am clueless) The header is below, I hope it's OK to post it all. I can follow simple instructions, but this is my first exposure to this world!               \documentclass[10pt,a5paper,twoside]{article}          \usepackage[latin1]{inputenc}     \usepackage[german,english]{babel}     \usepackage[textwidth=11.3cm,textheight=18.0cm,includehead]{geometry}     \usepackage{multicol}     \usepackage{ifthen}                         \newboolean{germanorder}     \setboolean{germanorder}{false}          \newboolean{usepdflinks}     \setboolean{usepdflinks}{true}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[RO,LE]{\textbf\thepage}     \fancyhead[RE]{\textbf{\nouppercase{\leftmark}}}     \fancyhead[LO]{\textbf{\nouppercase{\rightmark}}}     \renewcommand{\sectionmark}[1]{\markboth{test}{\thesection.\ #1}}          \fancypagestyle{plain}{         \fancyhf{}         \fancyfoot[R]{\textbf{\thepage}}         \renewcommand{\headrulewidth}{0pt}         \renewcommand{\footrulewidth}{0pt}     }          \ifthenelse{\boolean{usepdflinks}}     {\usepackage[pdftex,pdfborder={0 0 0}]{hyperref}}     {         \newcommand{\hyperlink}[2]{#2}         \newcommand{\hypertarget}[2]{#2}     }          \newcommand{\comment}[1]{}   % Remove comments     \newcommand{\explanation}[1]{}   % Remove comments     \newcommand{\cardtext}[2][]{#2}     \newcommand{\apx}[2][]{#2}     \newcommand{\ruling}[2][]{#2}     \newcommand{\notenglish}[1]{#1$^\dagger$}     \newcommand{\changed}[2][]{#2}     \newcommand{\MOOR}{\textsc{MOOR}}          \newcommand{\de}[1]{(\textsl{\foreignlanguage{german}{#1}})}     \newcommand{\numberref}[1]{\textbf{\small #1}}     \newcommand{\cardref}[3]{\hyperlink{#3}{#1 %     \ifthenelse{\boolean{germanorder}}{\de{#2}}{\numberref{#3}}}}          %\newcommand{\card}[5]{\hypertarget{#3}{}%     %\ifthenelse{\boolean{germanorder}}{%   German and other languages     %\noindent\textbf{\textsl{#2}}\hfill\numberref{#3}\nopagebreak          %\noindent\textbf{#1}\hfill{\tiny#4}}{% English     %\noindent\textbf{#1}\hfill{\tiny#4\hspace{0.5em}}\numberref{#3}}%     %\nopagebreak          %\noindent#5\vspace{0.3\baselineskip} }          \newcommand{\card}[5]{\hypertarget{#3}{}%     \noindent\parbox[b]{5.24cm}{\noindent\textbf{#1}\\[-1ex]{\tiny#4}}%     \hfill{\hfill\raisebox{4pt}{\textbf{\Large #3}}}%     \nopagebreak          \noindent#5\vspace{0.5\baselineskip} }          \newcommand{\action}[3]{\noindent\hypertarget{#2}{\textbf{#1}}\hfill%     \nopagebreak          \noindent#3\vspace{0.3\baselineskip}}          \newcommand{\actionref}[2]{\hyperlink{#2}{``#1''}}          \newlength{\guessheight}     \settoheight{\guessheight}{I}     \newlength{\guessdepth}     \settodepth{\guessdepth}{g}     \addtolength{\guessheight}{0.6\guessdepth}     \addtolength{\guessdepth}{0.2\guessdepth}     \newlength{\guesswidth}     \settowidth{\guesswidth}{I}          \newcommand{\ecp}[2][]{\makebox[2pt][l]{\rule{\fboxrule}{\guessheight}\rule[\guessheight]{\guesswidth}{\fboxrule}}#2\makebox[2pt][r]{\rule[-\guessdepth]{\guesswidth}{\fboxrule}\rule[-\guessdepth]{\fboxrule}{\guessheight}}}          \newcommand{\english}[1]{%     \ifthenelse{\boolean{germanorder}}{}{\item \textsl{#1}}     }          \newenvironment{explanationlist}{\small\begin{list}{$\Rightarrow$}{\setlength{\topsep}{0pt}\setlength{\itemsep}{0pt}}}{\end{list}}          \newcommand{\sectionline}{\begin{center}\rule{4cm}{0.2mm}\end{center}}          \addtolength{\columnsep}{1mm}               \begin{document}


title: Error using "x expr" in "\addplot table" options

text: I have not been succesfull using `x expr` in `\addplot table` options, within Tikz/pgfplots. I don't think the problem is with the package being installed or not, because I have been using `\addplot table` for a long time. See my minimal example:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{filecontents}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}               \begin{document}     %     \begin{tikzpicture}     %     \begin{axis}     \addplot table [col sep=comma, x index=0, y expr = \thisrowno{1}-1] {./antinumu/table_dm2_minimized.csv};     %     \end{axis}     %     \end{tikzpicture}     %     \end{document}      Error message in Linux terminal:               ! Package pgfkeys Error: I do not know the key '/tikz/y expr' and I am going to      ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 ...}-1] {./antinumu/table_dm2_minimized.csv};          ? H     This error message was generated by an \errmessage     command, so I can't give any explicit help.     Pretend that you're Hercule Poirot: Examine all clues,     and deduce the truth by order and method.


title: Algorithm2e does not allow nested if

text: I was trying to put a nested if in algorithm area like this:                         \If{$isContentMethod(\mathcal{M})$}{                 $URI \leftarrow getURI(SubCG, \mathcal{M})$\;                 \If($URI \in \mathcal{P}_c$){                     $Permission \leftarrow getPermission(URI, \mathcal{P}_c)$\;                     $\mathcal{B}.add(Permission, URI, Entrypoints)$ \;                 }              }      But LaTeX keep giving me errors:               ! Argument of \algocf@Ifmain has an extra }.     <inserted text>     \par     l.69 }     I've run across a `}' that doesn't seem to match anything.


title: Photo formatting

text: Why my code is not supporting when I insert the image? Here the code               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}     \usepackage{graphicx}          \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}          \newcommand{\piRsquare}{\pi r^2}                             %     \begin{document} \baselineskip=22pt     \section{Lorentz Transformaton: Demystifying The Calculations}     Let us consider,  there are two observer $A$ and $A^\prime$  who are observing from  the reference frame $S$ and $S^\prime$.     Let we create a pulse which is spreading with time. We will measure the event according two both frame.     In S frame,  we have $x=ct$ and in $S'$ frame,  $x^\prime =c t^\prime$.     \begin{figure}      \centering      \includegraphics{problem1.png}      % problem1.png: 866x162 pixel, 96dpi, 22.91x4.29 cm, bb=0 0 649 121     \end{figure}          Problems:     1.      \end{document}      This is the image: ![enter image description here](http://i.stack.imgur.com/MmllH.png)


title: Extra }, or forgotten \right

text: My MWE:               \documentclass{report}          \usepackage{amsmath}          \begin{document}          \begin{align}     y &= a \\     =& -2c_1\bar{z}_1^2 + 2\bar{z}_1\bar{z}_2 + 2\bar{z}_2 \left ( -\bar{z}_1 -c_2z_2 - \frac{3\epsilon}{2}\bar{z}_2 -\sigma_{2,1}\cos(x_1)\Delta x_1 \notag \right. \\     \left. &- \sigma_{2,2}\Delta x_2 -\sigma_{2,3} \Delta u +c_2 \chi_2 \vphantom{\frac{1}{1}} \right ) - 2\gamma \sigma_{2,1}^2\cos^2(x_1) \Delta x_1^2 - \gamma \sigma_{2,2}^2 \Delta x_2^2   - 2\gamma \sigma_{2,3}^2 \Delta u^2     \end{align}          \end{document}      The error I get:               Extra }, or forgotten \right.      The expected result: ![enter image description here](http://i.stack.imgur.com/b7UAj.png)


title: Cross-references in headers, clash between fancyhdr and hyperref

text: I am writing my thesis and using `fancyhdr` for the headers. Just the standard "Chapter name on odd pages and section name on even pages". I also need to use the `hyperref` package to break up long urls in my bibliography. The problem I have is that when I use this package (and `breakurl`), the cross-references in the header appear as question marks. That is, if I have a section/chapter whose name includes a reference to an equation, for example, that reference does not show properly in the header. Below is a minimal example. After compiling, see the header in Page 15, for example. If I comment out               \usepackage[breaklinks=true]{hyperref}     \usepackage{breakurl}      the header displays the reference correctly. Any ideas why or how to work around this?               \documentclass[a4paper,11pt,twoside]{book}          \usepackage[rmargin=2cm,includeheadfoot,bmargin=2cm,tmargin=3cm, lmargin=4cm]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead[]{\footnotesize{\leftmark}}     \rhead[\footnotesize{\rightmark}]{}     \bibliographystyle{plain}          %If I comment the following two lines, no problem.     \usepackage[breaklinks=true]{hyperref}     \usepackage{breakurl}               \begin{document}          \title{Fake Title}     \author{Me}     \date{\today}     \maketitle          \chapter{First Chapter}          \section{First}     a \newpage b \newpage c \newpage     \section{Second}     \begin{equation}     x=2     \label{eq:myEquation}     \end{equation}     a \newpage b \newpage c \newpage     \section{Third}     \label{sec:thirdSection}     a \newpage b \newpage c \newpage          \chapter{Some thoughts about Section~\ref{sec:thirdSection}}     \section{First}     a \newpage b \newpage c \newpage     \section{About Equation~\ref{eq:myEquation}}     a \newpage b \newpage c \newpage     \section{First}     a \newpage b \newpage c \newpage     \end{document}


title: Using unicode-math makes an equation ugly

text: Using `unicode-math` makes following equation ugly. Is it a bug? How to solve that?               \documentclass[10pt,a4paper]{article}     \usepackage{unicode-math}     \begin{document}     $-| P |<r_u<|P|$     \end{document}      ![enter image description here](http://i.stack.imgur.com/DI538.png)


title: \newcommand and comma separated parameters

text: I would like to learn to manipulate comma separated lists in Latex. To give a concreet but artificial example, I would like to have this command:               \swap{1,10}      expand to this:               {10,1}      How can I achieve it?


title: Cannot automatically insert bibliography in Texworks

text: I've just installed MacTeX and used TeXworks. However, every time a want to insert a new BibTeX record, I have to manually execute BibTeX command in a terminal and then run Typeset in TeXworks, otherwise I will receive 'citation undefined' warning and a citation is displayed as '[?]'. I want to ask for a way to manually execution all required commands for inserting bib just by clicking on Typeset in TeXworks.


title: Plain TeX online documentation/references?

text: I am a non-beginner plain TeX user, mostly typesetting cheat sheets for computer science. I own _The TeXbook_ and have seen some TeX manuals for the compilers, such as pdfTeX manuals and so forth. My problem is that I struggle to find online information whenever I want to find out more about some macro that is not working, or some specific fine point of TeX typesetting. (For example today, I needed to learn more about `\fam` and how to typeset bold fonts in math mode, and it took me a while before I learned which commands to use and how.) The major problem with searching for plain TeX information is that 90% of information I find through Google search are relevant to LaTeX and not plain. Are there any good online documents/websites in English that describe in detail finer points on plain TeX? List built-in macros, recommended practices (many people define their own variation on optional variables in macros), and so on? As an example of literature that I look for, I have found TeXbook naruby, which is a book in Czech about TeX and lists its base macros with examples and explanations. I would like to find comparable literature/website in English for plain TeX.


title: How do I add only arrowheads to an EPS gnuplot figure?

text: As part of a diagram I want to add arrowheads indicating direction, but don't want the lines that normally come with them. Creating a very short line with an arrowhead is acceptable and works in gnuplot's wxt terminal, but the head shrinks to nothing when used with the epslatex terminal. How can I add arrowheads with no lines attached? MWE:               reset     #set terminal wxt size 225,300     set terminal epslatex color size 2.25,3     set out "del3.tex"          set xrange[0:100]     set yrange[0:100]          set key off     set lmargin 0     set rmargin 0          set style arrow 5 head filled size 7, 20, 60 lt -1#arrow with 1 head          set arrow from 20,50 to 80,50 as 5     set arrow from 20,30 to 21,30 as 5          plot x,x          set output#flush file output     exit      In this example file the second arrowhead is properly-sized when used with the wxt terminal (see commented line), but not when including the generated eps figure in latex.


title: Problem using the German letter "eszett" ß in theorem environment

text: I have the following problem(s) using some special German letters: I would like to keep the two lines               \usepackage[latin1]{inputenc}     \usepackage[ngerman]{babel}      Unfortunately, the symbol ß is not displayed correctly...instead, I got warnings or error messages or mistakes...maybe, because I use ß before `\begin{document}`, where I would like to declare the names for the occuring theorems and definitions by `\newtheorem`...but if so, how to circumvent this? I would be grateful, if anybody was able to help me get rid of these problems. Thank you very much. Here is a minimal example:               \documentclass[a4paper]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{dsfont}     \usepackage{amssymb}     \usepackage[matrix , arrow, curve]{xy}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{graphicx}     \usepackage[pdftex]{color}     \usepackage{hyperref}          \deffootnotemark{(\thefootnotemark)}     \deffootnote{1.5em}{1em}{\textsuperscript{(\thefootnotemark)}}               \newtheoremstyle{dotless}{}{}{}{}{\bfseries}{}{\newline}{}     \theoremstyle{dotless}     \newtheorem{Proposition}{Proposition}     \setcounter{section}{1}     \numberwithin{Proposition}{section}     \newtheorem{Definition}[Proposition]{Definition}     \newtheorem{Lemma}[Proposition]{Lemma}     \newtheorem{großer Satz von Fermat}[Proposition]{großer Satz von Fermat}                              \begin{document}                    \section{0. Einleitung}     In dieser Arbeit untersuchen wir...          \begin{Proposition}     erhedtjhndtjhdet     \end{Proposition}          \begin{großer Satz von Fermat}     \label{großer Satz von Fermat}     blablablablabla     \end{großer Satz von Fermat}          \end{document}


title: Caption package destroys center/varwidth

text: I have received a wonderful comment how to get listings centered:               \documentclass[a4paper]{book}     %\usepackage[hang,small,it,hypcap=true]{caption}  % screw hypcap     \usepackage[T1]{fontenc}     \usepackage{fancyvrb}     \usepackage{listings}     \lstset{       fancyvrb=true,%     }     \usepackage{varwidth}          \lstset{         basicstyle=\linespread{0.94}\ttfamily,%         fancyvrb=true,%         captionpos=b     }          \begin{document}          \begin{center}\begin{varwidth}{\linewidth}%     \begin{lstlisting}[caption={I want to be centered},label={lst:label2}]     trait Sys[S <: Sys[S]] {       type Tx     <: stm.Txn[S]       type Var[A] <: stm.Var[S#Tx, A]       type ID     <: stm.Identifier[S#Tx]       type Acc       ...     }     \end{lstlisting}\end{varwidth}     \end{center}          \end{document}      So far so good: ![enter image description here](http://i.stack.imgur.com/zbmCd.png) If I add the `caption` package (uncomment in the example above) which I _must do_ because a lot of stuff relies on it, the centering is destroyed: ![enter image description here](http://i.stack.imgur.com/Tss4N.png) I also found that adding the `showframe` package has the same problem, so perhaps the culprit is `center` or `varwidth` and not `caption`. How to fix this?


title: Google Translate cannot read a .PDF made in LaTeX

text: I have received a .pdf document from a colleague who uses LaTeX (I use Office products and have no knowledge of LaTeX at all). The document however is written in German, a language I speak, but not fluently, so there are parts of the text I need help with. However if I attempt to copy parts and then paste them on e.g. Google translate, the character-spacing between words is deleted, effectively stacking the words one after another. GTranslate cannot then recognise these properly and as a result, it cannot translate. Is there a way to go around this? Perhaps, by converting the .pdf to another format (that a Windows user like myself can do)? Also, I've mentioned the problem to my colleague and he couldn't figure out a solution to this, so I'd appreciate any hints as to what I can do (rather than things he could try using LaTeX). Thanks in advance!


title: Bibliography Issue apacite: Argument of \@@cite has an extra }

text: I am having an issue when citing references within my thesis. I use the `apacite` package. Below is the basic structure of the code:               \documentclass[12pt]{report}     \usepackage{apacite}          \begin{document}          \chapter{Literature Review}     Several methodological challenges arise when modeling count data (see      \cite{lord_statistical_2010} for a good review).          \bibliographystyle{apacite}     \bibliography{references}          \end{document}      This is the entry in the .bib file:               @article{lord_statistical_2010,     title = {The statistical analysis of crash-frequency data: A review and            assessment of methodological alternatives},     volume = {44},     issn = {09658564},     shorttitle = {The statistical analysis of crash-frequency data},     url = {http://linkinghub.elsevier.com/retrieve/pii/S0965856410000376},     doi = {10.1016/j.tra.2010.02.001},     number = {5},     journal = {Transportation Research Part A: Policy and Practice},     author = {Lord, Dominique and Mannering, Fred},     month = jun,     year = {2010},     pages = {291--305}         }      However when I run the `PDFLaTeX` I get the following error:               error: line 0 : Argument of \@@cite has an extra }      I generate the `references.bib` file using Zotero software. I very recently changed the package style to `apacite`. Previously I had used `\bibliographystyle{plain}` and the references had generated as desired. But now I have hit this roadblock. I am now clueless as to why this is happening. Any help is greatly appreciated!


title: How to avoid page numbering being re-started by titlepage?

text: See the MWE below. How can I avoid that page numbering in the frontmatter is re-started by `\titlepage`? I would like the preface to have page number V. * * *               \documentclass{book}            \usepackage{lipsum}                       \usepackage[plainpages=false,pdfpagelabels]{hyperref}     \hypersetup{pageanchor=false}            \usepackage{bookmark}           \title{Lipsum}           \author{lpdbw}                            \begin{document}           \frontmatter     \pagenumbering{Roman}          \lipsum                          \begin{titlepage}           \maketitle                  \end{titlepage}                  \chapter*{Preface}     \lipsum          \mainmatter          \chapter{Introduction}     \lipsum          \end{document}      * * * PS: Question edited and reformulated.


title: Winbugs plots in latex

text: I conducted a bayesian analysis and obtained some plots in winbugs. Does any one how to put the history graphs in WinBUGS in Latex? I could not save the plots as pdf.


title: Can multi-Book Memoir-class documents forgo Parts without breaking bookmarks?

text: I wish to create a multi-Book Memoir-class document without the need for Part sections. Doing so breaks the bookmarks appearing in the PDF document. E.g., if I have a document such as               \documentclass{memoir}     \begin{document}     \book{Book1}      %\part{Part1}       \chapter{Chapter1}       \chapter{Chapter2}       \chapter{Chapter3}     \end{document}      the PDF's "chapter" bookmarks are structured like   * Book1      * Chapter1        * Charper2       * Charper3 instead of the expected   * Book1      * Chapter1     * Charper2     * Charper3 I noticed that by uncommenting the Part section in the above MWE, the chapter bookmarks are correctly structured:   * Book1      * Part1        * Charper1       * Charper2       * Charper3 Is there a way to forgo Parts and still get properly indented "chapter" bookmarks?


title: How to dynamically name and store macros/variables in \foreach in TikZ for later use?

text: I am generating a figure in TikZ using the `\foreach` command, dynamically setting the node values using a macro (adapted from this question: TikZ: Using Loop to Draw Grid of Nodes). Now, I want to reuse the nodes' labels at a later point in my document, but they don't seem to be stored (see Is it possible to refer to node label and reuse it for labeling other nodes in tikz?). I thus need to somehow use macros to store the labels. Is it somehow possible to dynamically generate names for macros/variable (e.g. `\label1`, `\label2`, ..., `\labelN`), and then use `\pgftruncatemacro{\myLabel}{...}` to store a value in those? Here is my code example (where I am of course not doing the above yet). I have indicate the relevant part. I essentially want to get variables indexed by `\x` and `\y` so that I can use them later as “`\label\x\y`”:               \documentclass{minimal}          \usepackage{tikz}     \tikzset{mainstyle/.style={circle,draw,fill=gray!40,minimum size=20}}          \begin{document}     \begin{tikzpicture}            \def\xmin{1}       \def\xmax{4}       \def\ymin{1}       \def\ymax{5}       \def\lattconst{3.0}            \foreach \x in {\xmin,...,\xmax}         \foreach \y in {\ymin,...,\ymax}         {           %%%           % This should be a dynamic, e.g. “\{label\x\y}”           \pgfmathtruncatemacro{\label}{\x - \xmax *  \y + \xmax * \ymax}           %%%           \pgfmathsetmacro{\xpos}{\lattconst*\x}           \pgfmathsetmacro{\ypos}{\lattconst*\y}           \node [mainstyle] (\x\y) at (\xpos,\ypos) {\label};         }          \end{tikzpicture}     \end{document}


title: How to embed figure short descriptions (as would be displayed in the List of Figures) within the table of contents in LaTeX?

text: The document I'm writing has all the figures in Appendix A (since there is a lot of source code included in latter appendixes, it would not make sense to put the figures as the final part of the document). I am aware I can have a separate list of figures that lists the caption short descriptions, but what I want is for this to be included in the table of contents itself. For example, instead of:               Table of Contents     1 Section 1 ......... 1       1.1 subsection .... 1     A Figures ........... 3     B Source Code ....... 5       B.1 more code ..... 6          List of Figures     Desc. 1 ............. 3     Desc. 2 ............. 4      I want:               Table of Contents     1 Section 1 ......... 1       1.1 subsection .... 1     A Figures ........... 3       Desc. 1 ........... 3       Desc. 2 ........... 4     B Source Code ....... 5       B.1 more code ..... 6      I've been scouring the internet but can only find information on how to include the List of Figures' page number in the table of contents using `\addcontentsline{toc}`. Would I manually have to include caption short descriptions with `\addcontentsline{toc}` for every figure or is there some way I can automate this? Any help much appreciated


title: How to produce a tight box with a fancy border?

text: I'd like to be able to typeset a tightly-boxed formula with a fancy border. My progress so far has been to produce a box (with mdframed) with the fancy border I want (with tikz), but instead of being tight around its contents, it always extends to the width of the line.               \documentclass{beamer}           \mode<presentation>     \usetheme{Madrid}          \usepackage[framemethod=tikz]{mdframed}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          % Caution-tape frame style     \mdfdefinestyle{caution}{linewidth=10pt,       tikzsetting={decorate,decoration={markings,           mark=between positions 0 and 1 step 6pt           with {              \fill[yellow] (-3pt,-2pt) -- (0pt,-2pt) -- (3pt,2pt) -- (0pt,2pt) -- (-3pt,-2pt);             \fill[black] (0pt,-2pt) -- (3pt,-2pt) -- (6pt,2pt) -- (3pt,2pt) -- (0pt,-2pt);     }}}}          \begin{document}          \begin{frame}{testing}            \begin{mdframed}[style=caution]         $\frac{d}{dx} x^2 = 2x$       \end{mdframed}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/KaKNe.png) I am not sure if mdframed is capable of drawing a tight box. If it is, I would appreciate any pointer to the right incantation. If not, I am in need of an alternative. I have looked at the empheq package, which allows a custom "box command" to be specified, but I am at a loss about how to translate my fancy border code into the form it wants. Additionally, I'd like for it to be possible for the box to be embedded in a line of text, like:               \begin{frame}{testing}     My cool equation is \begin{foo}$\frac{d}{dx} x^2 = 2x$\end{foo}, isn't it neat?     \end{frame}


title: Using let command in TikZ but want to have reference to new point later as well

text: I'm beginning to use TikZ and am having some issues understanding the proper way to reference my data points without specifying the precise absolute positions for all of them. An example of the simple situation I'm confused with is as follows: Let's say I have 3 points, `A=(ax,ay)`, `B=(bx,by)` and `C=(bx,by-1)`. I want to draw lines between these points, but I also want them to be labelled A, B and C so that I may refer to them later. If I simply define my points A and B like so:               \coordinate (A) at (ax,ay);     \coordinate (B) at (bx,by);      then what is the best way to get C? Should I try something like               \coordinate (C) at "some way of referring to B's coordinates and doing math on them"      or do I have to use some (seemingly) clumsy statement like               \coordinate (C) at let \p1 = (B) in (\x1,\y1-1);      It seems like it'd be best if I could do the former option, but many answers on this type of topic online focus on the use of the 'let' command. However, my usage of the let command above is incorrect. I also tried things like               let \p1 =(B) in \coordinate (C) at (\x1,\y1-1);      but this also didn't work. I haven't seen any examples of the let command used in conjunction with \coordinate so not sure what the syntax should be. So my question is, what is the best way to assign C? I could define it inline when using \draw to draw the line from A to B to C, but then I don't think I'd have access to the C coordinate again without recomputing.


title: axis y line*=right does not move ylabel to right

text: When I recompile this code from the pgfplots gallery (example_291.tex), I get the following graph which clearly does not move the `ylabel` to the right for the second `axis` ![enter image description here](http://i.stack.imgur.com/yqi83.png)                   \documentclass{standalone}         \usepackage{pgfplots}         \usepackage{textcomp}         \begin{document}              \begin{tikzpicture}          \begin{axis}[ scale only axis, xmin=-5,xmax=5,          axis y line*=left, xlabel=$x$, ylabel=Absolute]          \addplot {x^2};          \end{axis}               \begin{axis}[ scale only axis, xmin=-5,xmax=5,          ymin=0,ymax=1000, yticklabel= {$\pgfmathprintnumber{\tick}$\textperthousand},           axis y line*=right, axis x line=none,          ylabel style={font=\tiny}, ylabel=per thousand]               \end{axis}          \end{tikzpicture}         \end{document}      I tried to change the style of the `ylabel` to investigate it to the boundaries of my pgf knowledge. It changed the font to `tiny` but still the `ylabel` is at left. Thanks in advance.


title: href adds unwanted '.pdf' to path provided

text: I have following code in my tex file.               \\href{DEListComparison/inputFilesForGENE_E/}{link caption} \\      The link in the output pdf file turn out to be *DEListComparison/inputFilesForGENE_E/.pdf*. I got unnecessary .pdf in the link. Is this a bug or I did something stupid? How can it be resolved ?


title: Can't get \fancyheadoffset to work

text: I have loaded the `fancyhdr` package and I want to make the headers and footers wider (clamp them to the margin), so I inserted the following line after the package has loaded: `\fancyheadoffset[LE,RO]{\marginparsep + \marginparwidth}` This is from an example in the document Page layout in LaTeX. But when I try to compile I get the following error: `Missing number, treated as zero` two times, and equally many plus signs in my document. When I enter `\marginparsep` in the body text, I also found that this gave the same error message. Why is it missing? I need it! :P


title: Stop page count before appendix

text: I'm trying to find a way to stop the page count in my report. So the count stops, then it comes to the appendix. Then have a separate count for the appendix, with the footer also changing so when the appendix starts, the page count says (e.g.) Page 1 of 12 pages.


title: Using indentation to automatically begin and end itemize environments

text: This is a question one might answer with "Why the hell would you want to do it?!", sort of an experiment. What I am looking for is a way to write lists with many levels of nestings (notes for school) in a "natural" way. Previously, I used an elaborate system of Pandoc, LaTeX and Makefiles to generate notes with occasional LaTeX snippets, however, I would like a more integrated workflow (for example, embedding pseudocode in a codebox environment in a Pandoc/Markdown file is quite challenging, as Markdown was designed with HTML in mind). If I make `+` an active character, like               \makeatletter     \mathchardef\@my@mathplus=\mathcode`+     \catcode`+=\active     \def{+}{\ifmmode\@my@mathplus\else\item\fi}     \mateatother      I can write itemizes like               \begin{itemize}     + one     + two     + three     \end{itemize}      however, I would like to get rid of `\begin{itemize}` and `\end{itemize}` and write notes like               + one         + subitem one         + subitem two     + two     + three      resulting in the nested list, neatly rendered. Is there a way to achieve this, or I should consider some kind of pre- procession instead? (Creative and mildly insane answers are appreciated.)