title: Skype icon on moderncv

text: I am using moderncv with classic style. I wrote my personal info on the top of the page, precisely on the left of my picture. I need to write my linkedln and skype account in the same line so as not to overcome one page for my CV. How can I create skype icon ? How can I write both the info of linkedln and skype on the same line with a short space in the middle? Thank you **Edit** Since the OP was not able to add the code from the comment, I do it for him/her in this 'outstanding' case. (C.Hupfer)               \documentclass[10pt,a4paper,sans]{moderncv} \moderncvstyle{classic}     \moderncvcolor{blue}      \usepackage{lipsum}      \usepackage[a4paper, top=1.5cm, bottom=0.5cm, left=1cm, right=1cm,nofoot]{geometry}      \setlength{\hintscolumnwidth}{3cm}      \renewcommand*{\namefont}{\fontsize{35}{80}\mdseries\upshape}     \renewcommand*{\titlefont}{\fontsize{15}{80}\mdseries\upshape}     \firstname{V}      \familyname{M}      \title{Curriculum Vit\ae{}}      \address{xxxx}{xxxx}      \mobile{xxxx}      \email{xxx}     \social[linkedin]{xxxx} %NOW HERE I WOULD LIKE TO ADD SKYPE ON THE SAME LINE       \extrainfo{Born in XXX (XXX), on June XX, XXX \\ Car owner, License Drive A, B} %\photo[60pt][0.4pt]{pictures/Fototessera_3} \begin{document} \vspace*{-15.5mm}      \makecvtitle \vspace*{-11.7mm} \hrulefill \hspace{2pt}      \today           \end{document}


title: Chemmacros: Adjusting the properties of the coupling constant J

text: I am working with the package `chemmacros` and using its convenient experimental environment to typeset my data and it works perfectly fine. However I would like to adjust the way the coupling constants _J_ are displayed. There are three things I would like to change:   1. The coupling nuclei are displayed in italics, I would like to have upright nuclei.   2. They are displayed in brackets, but I would like to have them as a subscript.   3. The number of the bonds between the coupling nuclei _n_ is displayed as a superscript before the _J_. Unfortunately, the distance between the J and this number _n_ is too large. Is there a way to make it smaller? Here is my MWE:                   \documentclass[a4paper,10pt,bibliography=totoc,listof=totoc]{scrreprt}         \usepackage{chemmacros}         \usepackage{siunitx}         \chemsetup[nmr]{delta=(ppm),pos-number=side,use-equal,format = \bfseries,list=true}                \sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}              \begin{document}         \begin{experimental}              \NMR(400)[C6D6] \val{2.01} (d, \J(2;CH)[Hz]{25.0}, \#{24},  \pos{5})              \end{experimental}         \end{document}      Thank you for your help!


title: "Fatal error" when using TikZ externalize

text: So I'm having problems with TikzExternalize. I have a paper with a large amount of dynamically built graphs. I get to a certain point in my files and I can't build anymore. Once I get to this point I can no longer build any of the files I was building earlier, if I comment that figure out it works perfectly again. If I insert a totally different figure it has the same issue. An example code for the figure is below, I'm also using these in a pdfscape and multicolumn environment Happens with something as simple as the code below:               \begin{tikzpicture}       \draw (0,0) --(1,2);     \end{tikzpicture}      Here is the error:               ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e     rror -interaction=batchmode -jobname "tikzfigures/Report-figure53" "\def\tikzex     ternalrealjob{Report}\input{Report}"' did NOT result in a usable output file 't     ikzfigures/Report-figure53' (expected one of .pdf:.jpg:.jpeg:.png:). Please ver     ify that you have enabled system calls. For pdflatex, this is 'pdflatex -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 'tikzfigures/Report-     figure53.log'. If you continue now, I'll try to typeset the picture.      In the file all I get is the usual junk and:               !  ==> Fatal error occurred, no output PDF file     produced!      MWE               \documentclass[]             % options: RDPonly, coveronly, nocover     {article}                       %   plus standard article class options     \usepackage[pdftex]{lscape}          \usepackage{multicol}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows, positioning, calc, external}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \tikzexternalize[prefix=tikzfigures/]          \begin{document}     \begin{multicols}{2}         \begin{tikzpicture}           \draw (0,0) --(1,2);         \end{tikzpicture}                  \columnbreak              \begin{tikzpicture}           \draw (0,0) --(1,2);         \end{tikzpicture}                  \columnbreak              \begin{tikzpicture}           \draw (0,0) --(1,2);         \end{tikzpicture}     \end{multicols}          \end{document}


title: splitting an equation inside curly brackets onto 2 lines without using \Big

text: I have a long equation:               \begin{equation} \begin{split}     X_{t} = mean(\left\{|Y_{t-4} - Z_{t-4}|,...,\\                         |Y_{t+4} - Z_{t+4}|\right\})     \end{equation} \begin{split}      that I want to split over 2 lines and align as shown, but because it uses set notation and has small normal brackets outside the curly brackets, I don't want to use big curly brackets with the \bigg command when split over 2 lines. The \split command prevents me from using \left\ { and \right\ } with a line split. Is there a way of forcing small curly brackets with the split line command? **How I solved the problem:** This can be achieved by use of pseudo-parentheses:                \begin{equation} \begin{split}      X_{t} = mean(\left\{&|Y_{t-4} - Z_{t-4}|,...,\right\.\\                         &\left\.|Y_{t+4} - Z_{t+4}|\right\})      \end{equation} \end{split}      or better still as @Werner suggested, without the use of \right or \left:               \begin{equation} \begin{split}     X_{t} = mean(\{&|Y_{t-4} - Z_{t-4}|,...,\\                    &|Y_{t+4} - Z_{t+4}|\})     \end{equation} \end{split}      I used the second option as it was simpler.


title: tabu to textwidth yields a table wider than textwidth

text: I have a code for a table that should fit to textwidth, but for some reason it doesn't. Any ideas why?               \documentclass {article}          \usepackage [T2A] {fontenc}     \usepackage [utf8] {inputenc}     \usepackage [english,russian] {babel}          \usepackage{longtable}     \usepackage{array}     \usepackage{tabu}          \usepackage{lipsum}          \begin{document}              \lipsum[1-1]         \tabulinesep = 1mm         \begin{longtabu} to \textwidth {|c|X[p]|c|c|c|c|c|}             \hline             &              & \multicolumn{5}{c|}{\bfseries Количество часов} \\ \cline{3-7}             %         \bfseries         \begin{tabular}{c}             № \\ модуля          \end{tabular}             & \centering\bfseries Наименование модулей             & \bfseries Всего             & \multicolumn{3}{c|}{\bfseries%                 \begin{tabular}{c}                 Аудиторная \\ работа                  \end{tabular}}             & \bfseries                 \begin{tabular}{c}                 Внеауд. \\ работа \\ СР                 \end{tabular} \\ \cline{4-6}         &             &             & \bfseries Л             & \bfseries ПЗ             & \bfseries ЛР             &              \\ \hline         \end{longtabu}         \noindent\hrulefill     \end{document}      ![Too wide table](http://i.stack.imgur.com/bsouZ.png)


title: create macro to verbatim output of command

text: The code               \newcommand{\dosomething}[1]{#1 #1}     \expandafter\verb\expandafter+\dosomething{blub}+      produces the verbatim-output `blub blub`. Now I want to create a macro `\myverb` for the second line, i.e., I want that               \myverb{blub}      or               \myverb+blub+      creates the verbatim-output `blub blub`. How can I achieve this (in TeX or LaTeX)? A follow up question is, how to achieve it with a `verbatim`-environment instead of `\verb`? Here a concrete example:               \begin{verbatim}       \begin{evaluatecode}          a = 1+1          b = 2^a          print a,b       \end{evaluatecode}     \end{verbatim}      But I want that the environment `evaluatecode` is expanded first (in my case, the calculations are sent to some software, an output is returned; `evaluatecode` already exists), and then, the result is displayed in verbatim. I.e., I want that the code               \begin{verbatimevaluate}          a = 1+1          b = 2^a          print a,b     \end{verbatimevaluate}      does the following: first the input of `verbatimevaluate` is processed by the `evaluatecode`-environment and its outcome stands in an `verbatim`-environment.


title: How to enumerate inside form

text: I am trying to create a task list wherein I can mark if a task is done or not using check boxes. I am using `CheckBox` from `Form` for that.   Now I want to enumerate those tasks. Part of my `Latex` content is here -               \documentclass{minimal}     \usepackage[pdftex]{hyperref}     \begin{document}     \begin{Form}     \noindent     Tasks:\\                    \begin{enumerate}     \item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task1}\quad \\     \item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task2}\quad \\     \item \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex]{task3}\quad \\     \item \CheckBox[bordercolor={0 0 0},height=0.5ex,width=1.5ex]{task4}\quad \\     \end{enumerate}      \end{Form}     \end{document}     \end      But it doesn't work! I don't why it doesn't put numbers before tasks.


title: Creating a gls from a spreadsheet

text: I have a spreadsheet of 1925 terms that I wish to build a glossary for. Short of manually adding tags to each line and exporting to a plain text file, is there a way to convert the spreadsheet into a gls file? The spreadsheet has each term split into separate columns for the term, its type (noun, verb, etc.) and defintion.


title: change margins of a template to the normal DIN-A4 standard

text: recently I found a template for a cover sheet. The code is written blow. Unfortunately, it is quite far away from being minimal, but I wanted to show you the whole design. My "problem" now is the following: I would like to have the normal margins of DIN-A4-Paper, but the template has smaller margins or even no margin at some sides of the sheet. I expect the solution of the problem to be contained in the "adjust the page margins"-section, but I don't know, how to change it appropriately. Perhaps you can help me. (The formatting of the page should remain constant, I would only like to have the normal margin on each side.)               \documentclass[a4paper,11pt]{scrartcl}     % -------------------------------------------------     % character encoding     % -------------------------------------------------     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1,ansinew]{inputenc}     \RequirePackage{lmodern}     \usepackage{marvosym}     \usepackage{graphicx}     \usepackage{color}     \usepackage{framed}     \pagestyle{empty}     % -------------------------------------------------     % adjust the page margins     % -------------------------------------------------     \usepackage[scale=1]{geometry}     \setlength{\parindent}{0pt}     \addtolength{\parskip}{0pt}     \setlength{\footskip}{0pt}     \setlength{\headheight}{15pt}     \setlength{\topskip}{0pt}     % -------------------------------------------------     % positioning of text elements     % -------------------------------------------------     \usepackage[absolute]{textpos}     \setlength{\TPHorizModule}{1cm}     \setlength{\TPVertModule}{\TPHorizModule}     %     % -------------------------------------------------     % personal data     % -------------------------------------------------     \def\firstname{Max}     \def\familyname{Mustermann}     \def\FileAuthor{\firstname \familyname}     \def\FileSubject{Cover}     %     % -------------------------------------------------     % Font     % -------------------------------------------------     \renewcommand{\ttdefault}{pcr}     %     % -------------------------------------------------     % from moderncvstylecasual.sty:     % -------------------------------------------------     \definecolor{blau}{rgb}{0.20,0.40,0.65}     \definecolor{hellblau}{rgb}{0.25,0.50,0.75}     \definecolor{dunkelgrau}{rgb}{0.35,0.35,0.35}     \definecolor{hellgrau}{rgb}{0.45,0.45,0.45}     \definecolor{schwarz}{rgb}{0,0,0}     \newcommand*{\firstnamefont}{\fontsize{25}{27}\sffamily\mdseries\upshape}     \newcommand*{\familynamefont}{\firstnamefont}     \newcommand*{\titel}{\fontsize{25}{27}\mdseries\upshape}     \newcommand*{\inhalt}{\fontsize{15}{17}\mdseries\upshape}     %     \begin{document}     \sffamily     %     % -------------------------------------------------     % title     % -------------------------------------------------     \begin{textblock}{10}(1,2)     \color{dunkelgrau}{     \bfseries \begin{Large}\titel{Long Title ABCD}\end{Large}}     \end{textblock}     %     % -------------------------------------------------     % table of contents     % -------------------------------------------------     %\renewcommand{\labelitemi}{}          \begin{textblock}{10}(12.9,21)     \color{blau}{\inhalt{     \begin{itemize}\setlength{\itemsep}{-1pt}         \item Item A         \vspace{0.1cm}         \item Very Long Item B         \vspace{0.1cm}               \item Item C         \vspace{0.1cm}               \item Item D         \vspace{0.1cm}               \item Long Item E         \vspace{0.1cm}               \item Very Long Item F         \vspace{0.1cm}               \item Long Item G         \vspace{0.1cm}               \item Long Item H     \end{itemize}     }}     \end{textblock}     %     % -------------------------------------------------     % vertical line     % -------------------------------------------------     \begin{textblock}{1}(13.5,0)     \color{hellblau}{\vrule width 2pt height 21cm}     \end{textblock}     % -------------------------------------------------     % picture     % -------------------------------------------------     \begin{textblock}{3}(1,4)     \color{schwarz}{\fbox{\includegraphics[width=11cm]{picture}}}     \end{textblock}     %     % -------------------------------------------------     % address     % -------------------------------------------------     \begin{textblock}{9.7}(1,16.2)     \color{hellblau}{\begin{flushleft}         \vspace{-3.5cm}         {\bfseries \begin{large}\firstnamefont{\color{hellgrau}{\firstname}}~\familynamefont{\color{dunkelgrau}{\familyname}}\end{large}}\\[.35ex]         \huge\itshape%         Musterstraße 1\\         12345 Musterstadt\\[.35ex]         \Mobilefone~{ABCD}\\         \Letter~{verylongaddress@abc.com}     \end{flushleft}}     \end{textblock}     \end{document}


title: Colored horizontal line between two text

text: How I can get color horizontal line between two text ? I am using command `\rule{16cm}{1mm}`., Can any one suggest how to change the color of horizontal line.


title: Resources For Calculating Average Sentence Length

text: I'm writing my masters thesis and my supervisor has picked up my sentence structure, in that they are too long. She commented that Microsoft Word has a feature to investigate 'large' sentences. How can I do this with TeX? I'm using a mac and TexShop.


title: When splitting an equation, why do parentheses appear in different sizes?

text: I have the following equation which I have split in two lines, why do I get the `(` after `=` to be smaller that the closing `)`?               \begin{equation}\label{testequation}     \begin{split}     d_{m}^{\sim \phi}\left(A,f\right) = \left( \mid1-Y(R)\mid^{5} -|-f(M)|^{9} +\\  \sum_{i=1;i\neq p_{i}}^{length\left(H}\right)}  \mid I\left(i\right)\right.  \left. \vphantom{\sum_{i=1;i\neq pi}^{length\left(R\right)}} -f\left(i\right)\mid^{m}\right)^{1/m}     \end{split}     \end{equation}      Thanks.


title: How to shorten natbib bibliography authors to et al

text: I'm using `aastex` (which uses `natbib`) with zotero (which outputs a bib file). I've gone into the `natbib` `abbrvnat.bst` file and removed isbn, url & doi etc. At the moment it reads: > M. G. Abadi, B. Moore, and R. G. Bower. Monthly Notices of the Royal > Astronomical Society, 308 (4):947–954, 1999. I need it to read: > M. G. Abadi et al. Monthly Notices of the Royal Astronomical Society, 308 > (4):947–954, 1999. How do I force et al? And how do I get rid of the double spacing between bibliographic items?


title: Lag when scrolling on Mac in LyX

text: I have a macbook pro (OSX 10.9.1) and i'm using LyX (2.0.6). After using LyX for a while it has suddenly started to lag when i scroll (trackpad gestures and mouse wheel). Have anybody encountered this problem and know how it can be solved?


title: How to draw a line from the origin to the last point of \psrline?

text: Consider the following code to draw the Theodorus' spiral.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pstricks-add}          \begin{document}          \begin{pspicture}[showgrid](-5,-5)(5,5)        \psset{linecolor=blue}       \pstVerb{/Angles 0 def}       \psStartPoint(0,0)       \psVector[arrows=-](1,0)       \multido{\i=1+1}{15}       {% why is % needed here?           \pstVerb{Angles 1 \i\space 1 sub sqrt atan add /Angles exch def}           \psVector[arrows=-](!1 Angles PtoC)           \psline(! cp.X cp.Y)       }     \end{pspicture}               \begin{pspicture}[showgrid](-5,-5)(5,5)       \psset{linecolor=red}       \def\points{(0,0)(1,0)}%       \pstVerb{/Angles 0 def}       \multido{\i=1+1}{15}       {           \xdef\points{\points(!1 Angles 1 \i\space 1 sub sqrt atan add dup /Angles exch def PtoC)}       }       \expandafter\psrline\points     \end{pspicture}     \end{document}      ## Explanation The first approach with `psStartPoint` and `\psVector`,               \begin{pspicture}[showgrid](-5,-5)(5,5)        \psset{linecolor=blue}       \pstVerb{/Angles 0 def}       \psStartPoint(0,0)       \psVector[arrows=-](1,0)       \multido{\i=1+1}{15}       {% why is % needed here?           \pstVerb{Angles 1 \i\space 1 sub sqrt atan add /Angles exch def}           \psVector[arrows=-](!1 Angles PtoC)           \psline(! cp.X cp.Y)       }     \end{pspicture}      produces ![enter image description here](http://i.stack.imgur.com/NnmPw.png) and the second approach with `\psrline`,               \begin{pspicture}[showgrid](-5,-5)(5,5)       \psset{linecolor=red}       \def\points{(0,0)(1,0)}%       \pstVerb{/Angles 0 def}       \multido{\i=1+1}{15}       {           \xdef\points{\points(!1 Angles 1 \i\space 1 sub sqrt atan add dup /Angles exch def PtoC)}       }       \expandafter\psrline\points     \end{pspicture}      produces incomplete output as follows. ![enter image description here](http://i.stack.imgur.com/Fy8cl.png) ## Question How can I draw a line from the origin to the last point of `\psrline` invoked for each iteration? I have tried the following but `(!cp.X cp.Y)` does not exist.                 \begin{pspicture}[showgrid](-5,-5)(5,5)       \psset{linecolor=red}       \def\points{(0,0)(1,0)}%       \pstVerb{/Angles 0 def}       \multido{\i=1+1}{15}       {           \xdef\points{\points(!1 Angles 1 \i\space 1 sub sqrt atan add dup /Angles exch def PtoC)}           \expandafter\psrline\points           \psline(! cp.X cp.Y)       }       \end{pspicture}


title: Why is texlbl attribute sufficient for node, but not for edge in dot2texi?

text: I'm using dot2texi to embed mindmaps (= graphs) with arbitrary latex markup in nodes and on edge labels in latex documents (compiled with pdflatex) which should be layout completely automatic. Atfter experiencing great results with nodes. I'm wondering why my edge labels are not displayed when they are in the texlbl attribute. Please take a look at the following example:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}          \usepackage{dot2texi}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \usepackage[german, ngerman]{babel}     \usepackage[babel, german=quotes]{csquotes}          \begin{document}     \begin{dot2tex}[tikz,autosize, scale=1.0, dot]       digraph G {         A [texlbl="\begin{minipage}{5cm}ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNOP \end{minipage}"];         B [texlbl="B"];         C;         A -> B [texlbl="\begin{minipage}{10cm}abcdefghijklmnopqrstuvw abcdefghijklmnopqrstuvw abcdefghijklmnopqrstuvw abcdefghijklmnopqrstuvw abcdefghijklmnopqrstuvw \end{minipage}"];         C -> B [texlbl="\begin{minipage}{10cm}1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 \end{minipage}"];         B -> C;       }     \end{dot2tex}     \end{document}      Adding the tikzedgelabels option causes horrible layout. When I add label=" " to the edges, the layout happens with dot layout but is errornous with circo, neato, twopi and fdp. What am I missing? EDIT: this is a pending issue which will be part of dot2tex 2.9 (see https://code.google.com/p/dot2tex/issues/detail?id=18 for details)


title: Connection handshake diagram with TikZ

text: I'm trying to get the following diagram on TikZ. However, I didn't find any package that is able to draw something similar. The most similar one I found was a sequence diagram using `pgf-umlsd`. ![handshake](http://i.stack.imgur.com/1vA4x.png) The following code is the best attempt to get the diagram. The problem is that I **need the lines to be diagonals** to show the delay in the connection. How can I achieve this using TikZ?               \documentclass[tikz, border=2mm]{standalone}          \usetikzlibrary{arrows,shadows}     \usepackage{pgf-umlsd}          \begin{document}         \begin{sequencediagram}             \newthread[white]{c}{Initiator}             \newinst[4]{s}{Receiver}                  \mess{c}{FIN}{s}             \mess{s}{ACK}{c}             \mess{s}{FIN}{c}             \mess{c}{ACK}{s}              \end{sequencediagram}          \end{document}      ![enter image description here](http://i.stack.imgur.com/NFPwJ.png) ## Similar questions Network/Message Sequence Diagram poses the same problem, but the solution there is to use `msc`. However, I would like to get a TikZ solution (I think it looks nicer). protocol message diagram - arrow colored has a similar solution using `pgf- umlsd`, but it has the same limitation of using only horizontal lines.


title: Line break in section name

text: Is there any easy way to force a line break in a section name manually, without getting the line break in the Table of Contents? It's because I have a rather long section name, and it breaks just only the last three letters and it looks stupid, but there is no problem in ToC. I have tried double-\ but it breaks the line in the ToC as well. I have looked at How to put a line-break in section heading? and tried               \texorpdfstring      And it does break the line, but the new line starts below the section number, not below the section name. (I'm using PDFLaTeX for compiling in TexMaker, and I would prefer not to change that.) Another solution could be to squeeze the title a bit, if that is possible? I don't think it would be noticeable.


title: Description Environment options in LyX

text: The code given here can be used to adjust the `items` and `text` in `description` environment. I wonder how to use these options `[leftmargin=!,labelwidth=\widthof{\bfseries The longest label}]` with `beamer` in `LyX`. Thanks


title: Undefined citations

text: I have been putting references into my document with no problems until today. Now all of a sudden when I put a new reference in I get two error messages and get told the following: > Package natbib warning: Citation xzy on page x undefined on line y > > Package natbib warning: There were undefined citations I am using windows, MiXTeX 2.9, TeXnic center, and JabRef. I have looked at the bib file that JabRef generates and the citation information is in the file. The citations I had in previously still compile ok and can be entered in new parts of the document without error. Its just the new citation that I put into the Jabref program today that wont work.               \documentclass{article}          \usepackage[a4paper,hmargin={2cm,2cm},vmargin={2cm,2cm}]{geometry}     \usepackage{setspace}     \usepackage[maxauthors=20,etalmode=truncate,biblabel=period]{achemso}     \usepackage[journal=rsc]{chemstyle}     \usepackage{chemscheme}     \usepackage[version=3]{mhchem}     \usepackage{textcomp}     \usepackage{threeparttable}     \usepackage{textcomp}     \usepackage{lmodern}      \usepackage{color, colortbl}     \usepackage{array}      \usepackage{float}     \usepackage{color}     \usepackage{soul}     \usepackage{picins}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          text goes here.\cite{Global2013}           \bibliography{References}          \end{document}      The offending part of the .bib file follows:               @TECHREPORT{Global2013,       author = {Future Markets, Inc},       title = {The Global Market for Quantum Dots},       year = {2013},       owner = {x},       timestamp = {2013.06.17}     }


title: Cases environment problem, when used with subscript

text: I am trying to use the cases environment but I get the message, missing $ inserted.                   \begin{cases}            deg(u_i)  \textrm{ if u_i on primary diagonal} \\          -1 & \textrm{ if u_i u_j adjacent} \\           0 & \textrm{otherwise}         \end{cases}      Is the use of subscript, the problem? Any solutions?


title: Using ntheorem's counter inside theorem statement

text: I'm using `ntheorem` package and I would like to use the theorem's counter within the theorem's statement. This is useful when you're defining a special object you wish to reference elsewhere, like:               \begin{theorem}          For every foo, there exists a bar_\thcounter such that blah.      \end{theorem}      Since the text has more than one bar defined, I wan't this particular one to be "bar_{1.1.2}" if the theorem is named as "Theorem 1.1.2".


title: Can't Use 'ŋ' In My LaTeX Document

text: I am creating a textbook for a constructed language of mine. It's alphabet contains the letter 'ŋ', which LaTeX does not seem to like. For example:               \ae{}r\ng{} & past participle & He had eaten \\ \hline      Gives me this error:               Command \ng unavailable in encoding OT1. \r{u}\ng      I have UTF8 enabled:               \usepackage[utf8]{inputenc}      How can I fix this problem?


title: Autosum Table contents in LaTeX

text: I am trying to add the contents of a latex table, having something like this in mind: How can I automatically calculate sums in a LaTeX table? But this solution does not work for me... Is there any other way ?


title: Alternative to \rm

text: Is there any alternative latex syntax to the _defunct_ `\rm`? I am using `LaTeX2e` and so I have a long list of warnings whenever I execute my `.tex` document.


title: Is it possible to set a default value for an argument in a TikZ style?

text: In a command like:               \tikset{qar/.style={draw,rectangle,fill=#1}}      is it possible to add a default key value for the option `fill` so that if you have:               \node [qar] {};      the node will be filled with the default color (for example, red) while if you have:               \node [qar={blue}] {};      the node will be filled with the selected color? And what if instead of one there are two arguments like:               \tikset{qar/.style 2 args={draw=#2,rectangle,fill=#1}}      ?


title: How do I change the spacing for math operators?

text: I have defined my own math operator (for displaying the order of certain function sequences--this is not the "normal" Big-O notation, though) by:               \newcommand{\order}[1]{\ensuremath{\operatorname{o}\left({#1}\right)}}      This leads to pretty strange spacing: ![strange spacing](http://i.stack.imgur.com/Fbqit.png) How can I resolve this? Is there a better way to specify the operator?


title: Compress 5-6 to 5f. in a citation's postnote: \rangelen in \ifnumequal

text: I am trying to automatically convert page ranges in a postnote given as, e.g., `\textcite[4-5]{Smi83}` to _4f._ iff the range is exactly two pages long. It appears that biblatex' `\rangelen` is made for that, however contrary to the documentation it breaks whenever I try to use it inside etoolbox' `\ifnumequal`:               ! Missing number, treated as zero.     <to be read again>                      \begingroup      l.36 Test: \ifnumequal{2}{\rangelen{4-5}}                                             {f.}{something has gone wrong.}      What am I doing wrong? Here's a complete example that shows the error:               \documentclass{article}          \usepackage[style=authoryear]{biblatex}          \renewcommand*{\postnotedelim}{\addcolon}          \DeclareFieldFormat{postnote}{%     \ifpages{#1}%         {\ifnumequal{2}{\rangelen{#1}}%             {\mkfirstpage{#1}\bibstring{sequens}}%f.             {\ifnumequal{\rangelen{#1}}{0}% open range                 {\mkfirstpage{#1}\bibstring{sequentes}}%ff.                 {\mkcomprange{#1}}}}% compress closed range         {#1}}% no range -> just print it          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{Smi83,     author = {Smith, S.},     year = {1983},     title = {Sierra},     }     @misc{Jon01,     author = {Jones, J.},     year = {2001},     title = {Juliet},     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}          % Works:     Rangelen: \rangelen{4-5}          % Breaks:     Test: \ifnumequal{2}{\rangelen{4-5}}{f.}{something has gone wrong.}     %! Missing number, treated as zero.     %<to be read again>      %                   \begingroup      %l.36 Test: \ifnumequal{2}{\rangelen{4-5}}     %                                         {f.}{something has gone wrong.}          See e.g. \textcites[4-5]{Smi83}[10-15]{Jon01}. Also see \textcite[42]{Smi83}     and \textcite[90\psqq]{Jon01} as well as \textcite[ although this is only     slightly relevant]{Smi83}.          \printbibliography          \end{document}


title: Why is the title font smaller than chapter/part fonts in the book class?

text: This is not really a very important question, but I have noticed that the default "Book" class has a relatively normal-sized font for the title page, which contains the title of the book and the name of the author(s), but the font for a part or a chapter heading is _huge_. It is almost as if the title is inconsequential, and only the titles of the chapters are important. Is there a stylistic reason that this is the default? From a design perspective, is this normal (for published books, say)?


title: Overlay symbol with another

text: Is it possible to overlay a symbol with another? I want to write an equal sign with a question mark overlayed (or the other way around). Note I don't want               \stackrel{?}{=}      I want the question mark to be right on top, to cross over the equal sign (which creates kind of a new sign). Is this possible? How? Or is there a one character sign for this?


title: How to align multiple lines on same indent?

text: Desired effect is this: ![enter image description here](http://i.stack.imgur.com/ePv0L.png) But my document is this: ![enter image description here](http://i.stack.imgur.com/AVNuu.png) my code:               From paragraph 1: \\     \textbf{Q1}\quad The writer calls the advertising industry ‘universal’. What phrase is used later in the paragraph to echo this idea? \hfill [1] \\ \\     From paragraph 2: \\     \textbf{Q2}\quad (a) How do we realise early in the paragraph that the writer does not regard advertisements as simply ways of \textquoteleft{}relaying necessary information\textquoteright{}? \hfill [1] \\ \\     (b) The cafe owner \textquoteleft{}might be tempted\textquoteright{} to add to his advertisement. What does he hope to achieve by doing this? \hfill [1] \\ \\     (c) Explain \textbf{in your own words} why the writer feels that the world of advertising is such a dangerous place for ordinary people. \hfill [2] \\ \\     \textbf{Q3}\quad Why do you think that the writer finds it surprising that advertising methods are similar throughout the world? \hfill [1] \\ \\


title: What fonts are installed on my box?

text: How can I find out which fonts are currently available in my TeX installation? (I'm using a Mac, OS 10.6.x, if that matters, although I'd prefer a machine- independent TeX-based answer). Thanks. As a followup, I tried googling for an answer to this question, without much success. Is there somewhere I could have looked for myself?


title: Glossaries: customize number lists (page numbers) attached to each acronym

text: I would like to exclude the Table of Contents and Glossary itself from the page numbers that appear attached to each acronym indicating the pages where the entries have been used. If this cannot be done, I would like to correct the number referring to the glossaries itself since as it can be seen in the picture, it should be 59 instead of 58. It refers to the first page of acronyms although the acronym is not in the first page. ![enter image description here](http://i.stack.imgur.com/HL8ly.jpg) Here you have an example of my code:               \documentclass[12pt,a4paper,twoside]{report}           \usepackage{hyperref}  %hyperref bf glossaries     \usepackage[acronym,numberedsection,toc]{glossaries}          \makeglossaries          \newacronym{nrt1}{NRT}{Near-Real-Time}     \newacronym{avhrr1}{AVHRR}{Advanced Very High Resolution Radiometer}     \newacronym{eumetsat1}{EUMETSAT}{European Organization for the Exploitation of Meteorological Satellites}     \newacronym{npp1}{NPP}{National Polar-orbiting Partnership}     %etc          \begin{document}     %acronyms are cited here using \acrshort{}, \acrfull{}...          \glsaddall\printglossaries          \end{document}


title: Increasing spacing of dots in vdots

text: Basically I want a `\vdotsfor` command that does what `\hdotsfor` does but for vertical dots. Need to increase spacing of dots over two rows so it looks pretty instead of having to use two `\vdots` on both rows. (The other thread that is top-related to this has some code but it doesn't do anything for me.)


title: pgfplots 3d cylindrical coordinate system

text: I am trying to plot a cylindrical coordinate system using `pgfplots`. The idea would be to plot the `r,theta` plane similar to what `polaraxis` provides, see here. I don't know how to translate something like this into a 3D environment. Is there an easy way to plot a custom coordinate system within the current 3D axis? **UPDATE** : I may not have been precise enough. I am specifically interested in plotting the coordinate/axis system, i.e. the `r,theta` grid in a 3D plot.


title: Where is fontspec.cfg?

text: I'd like to write `\let\newfontinstance=\newfontfamily` in fontspec.cfg, but I cannot find that. May I please know where I can find it? Thank you!


title: How do I use the sin function in LaTeX3

text: I am exploring some of the LaTeX3 routines and syntax. How do I get to use functions such as `sin` etc. I get an error with the sin function in the following (please uncomment _sin_ function to view the error) :               \documentclass{article}     \usepackage{expl3}          \begin{document}          \ExplSyntaxOn     \newcommand*\sampleCalculation{%       \fp_new:N  \mynumber       \fp_set:Nn \mynumber{150}       \fp_sub:Nn \mynumber{5}       \fp_add:Nn \mynumber{-1}       \fp_div:Nn \mynumber{12}       \fp_mul:Nn \mynumber{0.0001}       \fp_sub:Nn \mynumber{-38}       \fp_abs:N  \mynumber       \fp_neg:N  \mynumber      %\fp_sin:N  \mynumber       \fp_use:N  \mynumber       }          % aliases      \let\real\fp_new:N     \let\realset\fp_set:Nn     \let\realadd\fp_add:Nn     \let\realsub\fp_sub:Nn     \let\realdiv\fp_div:Nn     \let\realmul\fp_mul:Nn                    \newcommand\sampleCalculations{%       \real    \Z       \realset \Z{150}       \realsub \Z{5}       \realadd \Z{-1}       \realdiv \Z{12}       \realmul \Z{0.0001}       \Z     }          \ExplSyntaxOff          \sampleCalculation          \sampleCalculations               \end{document}


title: One pgfplot per page in single PDF file

text: I'd like to reduce my redundancy when making plots with `pgfplots`. I want to have a single PDF file, such that I can include them on a per-page basis with `graphicx`. The `multi` class option for the `standalone` class (the class I'm writing my plots with) looks promising, but instead of treating the plot as a single _block_ , `multi` treats the plot as a single _page_. (which I assume is `multi`'s purpose). As an example, I'd like to achieve a result similar to this PDF file, but with pgfplots (from "A Course on Deterministic Distributed Algorithms" by Jukka Suomela). **MWE Code:**               % Remove the `multi` option and the code in between the     % comment bars to achieve the `standalone` default output.     \documentclass[multi]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot {x^2};     \end{axis}     \end{tikzpicture}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \clearpage     \begin{tikzpicture}     \begin{axis}     \addplot {x^2};     \end{axis}     \end{tikzpicture}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \end{document}      **MWE Output:** ![mwe output](http://i.stack.imgur.com/kUBiv.png)


title: Change package margins within a section of the document

text: I am using a style file that I found for a CV but I need to include the cover letter with the CV in a single file. So I am just putting the cover letter on the first page. The margins though are too small on the right hand side. So how can I override this and put more space on that side?


title: glossaries: including an entry without page location

text: In the `glossaries` package, `\glssee{label}{aaa,bbb,ccc,ddd}` will cross- reference entries, but it doesn't include the referenced entry if it is not otherwise included in the glossary. (e.g. there will be missing links). The package provides the `\glsadd` command to include a glossary entry without generating a link or other text on the page, so one could add the missing entries like so               \glsadd{entry1}\glsadd{entry2}\glsadd{entry3}     \printglossaries      But this will add the page number to the numberlist (the page before the glossary). I suppose `\glsadd` was primarily meant for referencing page ranges with its optional argument. There is the `nonumberlist` package option, but is it really necessary to drop an entire feature just to do away with a few irrelevant page numbers? **For example, can`\glsadd` be redefined in a way that doesn't add the page number to the numberlist?** (It's very predictable, so if one knows that page 192 is not necessary, one could manually remove the extra `\setentrycounter[]{page}\glsnumberformat{192}\delimN` strings from the `.gls` file when adding the final polish to the document, but I wonder if that hack can be avoided.)


title: BibTeX: change field labels

text: I currently have a BibTeX entry for a book, of which I want to cite a section, like this:               @inbook{..., chapter = {1}, ...}      During the output of the bibliography, this will be printed as               ..., chapter 1, ...      Can I somehow change the prefix of the chapter, so that it reads "section 1" or any text I want? More generally, is there a command to adapt any of the keyword labels to your likings?


title: Equation with Large Matrix Dimension

text: I'm trying to code this matrix equation below, ![enter image description here](http://i.stack.imgur.com/IV0bZ.png) I'm not an expert in latex, but I've been successful dealing with other matrix equations. However with this one, I can't achieve it. The alignment of the entries makes it more difficult to code. I tried the left hand side, but this is best I can do,               \documentclass{article}         \usepackage{booktabs}     \usepackage{amsmath}     \begin{document}     \begin{equation}         \label{fig:yulewalkermuch2}         \left[\begin{array}{c}         s=1\begin{cases}         \begin{array}{c}         \gamma_{00}(1)\\         \gamma_{10}(1)\\         \vdots\\         \gamma_{\lambda 0}(1)         \end{array}         \end{cases}\\         \midrule         s=2\begin{cases}         \begin{array}{c}         \gamma_{00}(2)\\         \gamma_{10}(2)\\         \vdots\\         \gamma_{\lambda 0}(2)         \end{array}         \end{cases}\\         \midrule         \qquad\,\,\vdots\\         \midrule         s=k\begin{cases}         \begin{array}{c}         \gamma_{00}(k)\\         \gamma_{10}(k)\\         \vdots\\         \gamma_{l 0}(k)         \end{array}         \end{cases}         \end{array}\right]=     \end{equation}     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/8M22Q.png) I really appreciate if you could help me with both the left and right hand side of the equation, especially with the alignment of the entries, from rows to columns. It's fine with me if you could just give me a code even for small dimensions only, so that I could expand it then.


title: hyphenation of text within math

text: I would like text like               \((\abcdefghij,\abcdefghij)\)-pair      (with `\abcdefghij` defined as `\textit{abc\-defg\-hij}`) to be hyphenated as               (abc·defg·hij,·abc·defg·hij)-·pair      ("·" indicates all possible linebreak points; there would of course need to be hyphens if the adjacent characters on both sides are letters). Let's assume that I need a macro like `\abcdefghij` in many places in the document. How can I achieve the intended hyphenation?


title: Tikz and pgf: Grid of Dots with Text and Circles

text: I wish to have a grid of points or dots along with the labels, and combine them into a single figure like the one below. ![enter image description here](http://i.stack.imgur.com/V2KKW.png) I tried the closest graph I can for the first grid in the top left, and here's the result of it,               \documentclass{article}        \usepackage{tikz}       \begin{tikzpicture}         \foreach \x in {0,1,2,3,4,5,6}         \foreach \y in {0,1,2,3,4,5,6}         {         \draw (\x,\y) circle (0.3cm);         }         \fill (3,4) node {\textbf{A}};         \fill (4,3) node {\textbf{B}};         \fill (3,3) node {\textbf{X}};         \fill (3,2) node {\textbf{C}};         \fill (2,3) node {\textbf{D}};       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/HBYUE.png) I would be happy if you could help me with the codes of these grids for both two and one dimension. Thank you in advance!


title: Glyph collision with package mathastext

text: I was trying to type math in captions with a sans font when I came upon the `mathastext` package and I got greedier. I tested it with the following MWE:               \documentclass{memoir}          \usepackage[mdugm]{mathdesign}     \usepackage[subdued,defaultnormal,defaultrm,italic]{mathastext}     \usepackage{garamondx}     \usepackage{biolinum-type1}     \renewcommand\familydefault\sfdefault     \Mathastext[biolinum]     \useosf% changes figure style in garamondx     \renewcommand\familydefault\rmdefault          \newcommand{\testtext}{%     Distribution of singularities -- zeroes and poles -- for     the transfer function $A_v(f)$ in the $s$-domain according to $Q$.     \emph{Remark:} Observe that for $Q=1/2$, we have $p_0=\omega_0$.      Testing oldstyle figures 0123456789.     \begin{equation}      V_i(j\omega)=\frac{1}{2}      \sum_n{}V_n\exp\{-j\phi_n\}\delta(j\omega\pm{}j\omega_n)\,,     \end{equation}}          \begin{document}     \pagestyle{empty}     %\MTVersion{normal}     \testtext     \par\MTVersion{biolinum}     \testtext     \end{document}      Almost everything works fine, but there are a couple of things I'd like to get fixed. First, there are glyph collisions in math mode both in the roman font and in the sans font -- check the `(f` and the `(j`. The former does not occur when I do not resort to the `mathastext` package. Hence, I'd like to be able to use the package but either avoiding such collision or loading it only to have available a "sans math" mode. I haven't been able to load the packages in order for the math roman to be not affected by the `mathastext` package, though -- which, as I advanced, is interesting since the collisions do not occur when loading the `mathdesign`package without appending `mathastext`. Any help or suggestion about this issue? Secondly, I'd like to avoid the glyph collision in the sans font. Is there a convenient way to avoid it without having to issue a command or a control sequence every time I'm going to type `(f` or `(j`? Lastly, when using the sans font I get oldstyle figures even for math mode. Maybe this has to do with the `biolinum-type1` package, but how could I have text figures in text mode and lining figures in math mode?


title: How to draw inside a TikZ node, using node style?

text: I would like to define a node style, so that the node will look like the LaTeX symbol `\oplus`, i.e. a circle with lines from north to south, and east to west. (I also have more complicated examples in mind.) I think that I should draw the lines in the `execute at end node`, or `after mode path` arguments, but nothing I have tried seems to work. The code I have in mind is something like this:               \tikzstyle{foo}=[circle,draw,execute at end node={\draw ??????}]      To rephrase the question: How can one do arbitrary drawing within a node, and define this as a style? In particular, how do you get the coordinates of the current node in a style?


title: Block diagram with dsp/TikZ for adaptive feedback cancellation

text: Hello graphic tex lovers :) I'm trying to draw a diagram in TikZ as close as possible to this one: ![enter image description here](http://i.stack.imgur.com/EWZqZ.png) I'm using the dsp TikZ library and I think my attempt is going in the right direction; however there are a few things I didn't manage to set up properly, as you can see from the MWE               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{dsp,chains}     \begin{document}          \begin{tikzpicture}          % Blocks and nodes     \node[dspnodeopen,dsp/label=below] (ns) {$v(t)$};      \node[dspmultiplier,left=of ns,fill=gray] (mic) {};     \node[dspadder,left=of mic,left=1.5cm] (add) {};     \node[coordinate,left=of add,left=2.35cm]                  (fp1) {};     \node[dspfilter,above=of fp1,above=1.5cm]                     (gain) {$G$};     \node[coordinate,above=of gain,above=1.5cm]                  (fp2) {};     \node[dspnodefull,right=of fp2,right=2.55cm]                  (adnode) {$u(t)$};     \node[dspfilter,right=of gain,right=1.15cm]                     (adfilt) {$\hat{F}$};     \node[dspsquare,right=of fp2,right=4cm]                  (ls) {};     \node[dspfilter,right=of gain,right=4cm]                  (feedback) {F};     \node[dspnodefull,left=of add]                  (afupd1) {};     \node[coordinate,above=of afupd1,above=1cm]                  (afupd2) {};     \node[coordinate,right=of adfilt,above=3.5cm,right=0.5cm]                  (afupd3) {};     % Connections     \draw[dspconn] (ns) -- (mic);     \draw[dspline] (mic) -- node[midway,below=0.09cm] {$y(t)$} (add);     \draw[dspline] (add) -- node[midway,below] {$d[t,\hat{\mathbf{f}}(t)]$} (fp1);     \draw[dspline,dashed] (afupd1) -- (afupd2);     \draw[dspconn,dashed] (afupd2) -- (afupd3);     \draw[dspconn] (fp1) -- (gain);     \draw[dspline] (gain) -- (fp2);     \draw[dspline] (fp2) -- (adnode);     \draw[dspline] (adnode) -- (ls);     \draw[dspconn] (adnode) -- (adfilt);     \draw[dspconn] (adfilt) -- node[midway,right] {$\hat{y}[t |\hat{\mathbf{f}}(t)]$} (add);     \draw[dspconn] (ls) -- (feedback);     \draw[dspconn] (feedback) -- (mic);           \end{tikzpicture}           \end{document}      This is what my MWE looks like: ![enter image description here](http://i.stack.imgur.com/Nkv0S.png) Namely, the things I couldn't properly recreate are:   1. the microphone and loudspeaker symbols (those gray blocks)   2. the vertical alignment of the filter blocks   3. the right positioning of the dashed olique line (it should cut the block with \hat{F} right in the middle)   4. curved lines to and from the filter block with F   5. plus and minus signs in the adder. Is anybody willing to help this poor TikZ user? Thanks ;)


title: align icons to dictionary entries

text: I'm trying to typeset a small dictionary. Many of the entries come with a couple of icons that I would like to display in the margin just left of the entry, top-aligned with the beginning of the entry. I hacked together a solution using tabular and lots of vspace/hspace but it all became a horrible mess and is really hard to change if I want to adjust any spacing or sizes. There must be a better way - can anyone point me towards a package or paradigm useful for this? For some entries the icons take more vertical space than the text entry itself and spacing between entries should be adjusted.


title: Xindy: Encapsulations for Index

text: Well, I struggled to improve my index generated by **Xindy**. I tried to add several entries with bold page numbers by using `\index{...|textbf}` as classified in **latex-loc-fmts.xdy** , without any success. When running **Xindy** (no matter which way, tex2xindy/texindy/xindy) together with **texindy.xdy** , the following errors are reported (Yes, they are errors because affected entries won't be passed to the generated .ind - IOW not displayed):               line X: multiple |'s     ...     WARNING: unknown attribute `textbfhyperpage'! (ignored)      I've no idea how to handle this behavior and would be pleased, if somebody would share his experiences. BTW: I'm using Xindy-2.4 (TL2012)... UPDATE:               \documentclass{article}     \usepackage{hyperref} % conflict!     \usepackage{makeidx}     \makeindex     \begin{document}     start     Nunc ligula faucibus \index{vel|textbf}. Nullarutrum porttitor...     \index{a}\index{b}\index{ä}\index{z}     end     \printindex     \end{document}      ...compiled with:               latex <file> && xindy -M texindy <file> && latex <file>      ...results: It works without `hyperref`, but when it's been crawled it doesn't. Since hyperref is more or less a standard, it's necessary for me to get Xindy working together with hyperref. Any ideas?


title: Long names first for each chapter?

text: I'm writing my thesis using the `memoir` class and `natbib`, with citations such that, at the first occurrence, the full list of authors is given, and "et al." from the second onwards:               \usepackage[authoryear, longnamesfirst]{natbib}      Since all chapters can be read independently, I was wondering whether there's a way to define the longnamesfirst option such that it applies for each chapter separately rather than the entire document...


title: Why won't \ifx match on list element of a foreach list if that element is a macro?

text: I have the following:               \documentclass{minimal}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}          \def\nend{6}     \def\rb{1.5mm}          \draw (0,0) -- (\nend,0);          \foreach \x in {0,...,\nend} {%         \coordinate (\x) at (\x,0);     }          \foreach \x in {\nend,0} {%     \ifx\x\nend         \draw[fill] (\x) circle[color=blue,radius=\rb] node[blue,below=2mm] {$x_{n}$};     \else         \draw[fill] (\x) circle[radius=\rb] node[black,below=2mm] {$x_{\x}$};     \fi     }          \end{tikzpicture}          \end{document}      I get this: ![enter image description here](http://i.stack.imgur.com/e2bCP.png) I expect the last node to be x_n, but it is not. I have seen the answers to this question, but I am working with an integer already so I would expect things to match. This happens whether \nend is first or last in the list. This example does work:               \documentclass{minimal}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}          \def\nend{6}          \pgfmathparse{\nend-1}     \pgfmathsetmacro{\nm}{\pgfmathresult}          \def\nf{3}          \def\rb{1.5mm}     \def\rs{1mm}          \draw (0,0) -- (\nend,0);          \foreach \x in {0,...,\nend} {%         \coordinate (\x) at (\x,0);     }          \foreach \x in {1,...,\nm} {%     \ifx\x\nf         \draw[fill,color=blue] (\x) circle[radius=\rb];     \else         \draw[fill] (\x) circle[radius=\rs] node[below=2mm] {$x_{\x}$};     \fi     }          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Chmmm.png) The moment I try to match on the last element, though, it fails.


title: Borders of tables

text: I have been working on my first LateX report, and everything works fine, except tables. It seems that some of the lines appear and other don't (In all my tables). I have tried adding and removing spaces, but nothing seems to work. Any idea why? ![enter image description here](http://i.stack.imgur.com/oviZ7.jpg) Code:               \begin{table}[H]     \centering     \rowcolors{1}{Maroon!10}{Maroon!20}     \begin{tabular}{|l|l|l|}\hline     \textbf{Material } & \textbf{Reflectivity ($\rho$)} & \textbf{Price (kg)}\\\hline         Copper         & $0.75$ &  6.497US\textdollar\\\hline     Gold           & $0.76 \pm 0.03$ & 44000US\textdollar\\\hline     Various aluminum surfaces - range  & $0.82 - 0.92 $ & 1.716US\textdollar\\\hline     Anodized aluminum    & $0.82 \pm 0.05$ & 1.716US\textdollar\\\hline     Silver (unstable as a front surface mirror) & $0.94 \pm 0.02$ & 680US\textdollar\\\hline     \end{tabular}         \caption{Specular reflectance values for different reflector materials (prices March 2014)}     \label{tab:fb4}     \end{table}


title: Sublime text problem with quote coloring

text: I'm using sublime text 3 with `latexing` plugin on ubuntu, and i have a weird error on every color scheme i use, specially with double quote. ![enter image description here](http://i.stack.imgur.com/WxVUD.png) Only the solarized theme seems to work, other theme have the same weird bug on coloring. I'm using this configuration :               \documentclass[a4paper, 11pt,twoside, openright]{memoir}     \usepackage{polyglossia}     \setdefaultlanguage{french}     \usepackage{fontspec}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}     \usepackage{xparse}     \usepackage{graphicx}     \usepackage[protrusion=true]{microtype}


title: What is the correct way to pass array elements to TikZ styles?

text: I'm trying to use styles to generate _TikZ_ figures that have repeated, regularly spaced elements by looping through an array, but am perplexed by the results I'm getting. For example, if I define the style               state/.style={circle,draw=none,inner sep=0pt,minimum size=7mm,label=center:$#1$,name=#1}      then when I try to iterate through an array as the source of the arguments to the style, as in               \def\labels{{e,a,a^2,a^3}};\def\dim{4};     \foreach \n in {0,1,2,3} {         \node[state={\labels[\n]}]at({cos(90+\n*(360/\dim))},{sin(90+\n*(360/\dim))}){};}      I get an error: _Package pgf Error: No shape named e is known._ If I change around the definition of the array and the iterator(s)a bit,               \def\nodes{0/{e},1/{a},2/{a^2},3/{a^3}};\def\dim{4};     \foreach \n\lab in \nodes{         \node[state={\lab}]at({cos(90+\n*(360/\dim))},{sin(90+\n*(360/\dim))}){};}      I can get the result I want (see MWE), but I'd rather not do this, as it requires an array structure that's not generally useable for my purposes. ![enter image description here](http://i.stack.imgur.com/Z8TrP.png) How can I get the first form of the iterator and array to work? * * *               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{petri}          \begin{document}          \tikzset{         redarrow/.style={->, red, fill=none,>=stealth, thick},         state/.style={circle,draw=gray,inner sep=0pt,minimum size=7mm,label=center:$#1$,name=#1}}          \begin{center}          \begin{tikzpicture}     % This approach results in an error     % \def\labels{{e,a,a^2,a^3}};\def\dim{4};     % \foreach \n in {0,1,2,3} {     %   \node[state={\labels[\n]}]at({cos(90+\n*(360/\dim))},{sin(90+\n*(360/\dim))}){};}     \def\nodes{0/{e},1/{a},2/{a^2},3/{a^3}};\def\dim{4};     \foreach \n\lab in \nodes{         \node[state={\lab}]at({cos(90+\n*(360/\dim))},{sin(90+\n*(360/\dim))}){};}     \draw[redarrow](e)--(a);\draw[redarrow](a)--(a^2);\draw[redarrow](a^2)--(a^3);\draw[redarrow](a^3)--(e);     \end{tikzpicture}          \end{center}          \end{document}


title: How to turn on/off certain types (e.g. citation, url, file) of hyperref links?

text: The `hyperref` manual doesn't seem to document a way of turning different types of links (citation, url, cross-reference, file, ToC, footnote) on/off independently. One possible scenario would be to enable all links created with `\href` (url links) but disable all other types of links. Another scenario would be to enable all citations links but disable all other types of links. How can that be done? One related question is Selectively turn off hyperref links, but it only addresses how to turn cross-reference links off.


title: How can I remove the highlight bar in kTikZ/qTikZ?

text: I've been asking this question already in KDE and Qt communities but it seems that I can't find a kTikZ or qTikZ user there, so I thought to ask it here too because maybe there are kTikz users here. The problem is very simple, I don't want the highlight bar which automatically appears where the cursor is placed to highlight the current line. I can't find the option to configure the bar presence or to change its color. Problem is that my text color is set to white/gray and the bar color is also white/gray, so I can't read the line where the cursor is actually placed. I don't want to change the text color because it is bound to an high contrast theme I need for my poor eyesight. The problem is just with the kTikZ bar which I don't want. I hope this is not too OT but its very difficult to find LaTeX users on the web and kTikZ users especially. I saw there are already questions on how to use software like emacs, Vim, etc. so I hope you'll accept my question too.


title: Insert annotations using XeTeX and BibTeX / BibLaTeX in MacTeX 2012

text: I have the following problem. My `.tex` file (see below) works in MacTeX 2011 without problems (build it using XeLaTeX => BibTeX => XeLaTeX). After I updated from MacTeX 2011 to MacTeX 2012 it doesn't work. During build I get the following error in console.               This is BibTeX, Version 0.99d (TeX Live 2012)     The top-level auxiliary file: ABook.aux     I found no \citation commands---while reading file ABook.aux     I found no \bibdata command---while reading file ABook.aux     I found no \bibstyle command---while reading file ABook.aux     (There were 3 error messages)      My `.tex` file is the following :               % !TEX TS-program = xelatex     % !TEX encoding = UTF-8 Unicode     \documentclass[a4paper,12pt,two side,titlepage]{scrbook}     \usepackage{xltxtra}     \usepackage{fontspec}     \usepackage{polyglossia}     \setdefaultlanguage{german}     \usepackage{xunicode}     \usepackage{metalogo}            \usepackage{unicode-math}     \usepackage{amsmath}     \setmainfont{TeX Gyre Pagella}     \setmathfont{Palatino}     \usepackage[autostyle=true]{csquotes}     \usepackage[natbib=true,style=authoryear]{biblatex}     \newcommand*{\annotecite}[1]{\citefield{#1}{annotation} \autocite{#1}}     \bibliography{NaWiLibrary}     \begin{document}     \enquote{\annotecite{MikrobiologieBrock}}     \printbibliography     \end{document}      My example entry in the `.bib` (BibTeX) file is the following :               @book{MikrobiologieBrock,         Annote = {Kapitel 1, Seite 8, Zusammenfassung ...      },         Author = {Michael T. Madigan, John M. Martinko},         Date-Added = {2012-11-10 13:55:04 +0000},         Date-Modified = {2012-11-14 08:59:46 +0000},         Edition = {11., aktualisierte Auflage 2009},         Isbn = {978-3-8273-7358-8},         Pages = {1248},         Publisher = {Pearson Studium},         Title = {Brock Mikrobiologie},         Url = {http://www.pearson-studium.de/main/main.asp?page=bookdetails&ProductID=169347},         Year = {12 / 2008},         Bdsk-Url-1 = {http://www.pearson-studium.de/main/main.asp?page=bookdetails&ProductID=169347}}      Has someone a idea how to fix this ?


title: How to typeset Hess' Cycle in tikz-cd?

text: I want something like this:                               A        B            ΔH        \       /         (-397*2)      \     /                          C      Where the arrow points from `A` to `C`, and from `B` to `C`. How can I do this with `tikz-cd`? I now know how to do this using aliases, how can I do this without alias


title: How to make a doublesided longtable with a doublesided header?

text: I'm currently struggeling to extend a onesided `longtable` with fixed column widths to a double-sided layout (where the position of the columns changes depending on even/odd pages). My current approach would be to change the table to a onecolumn layout and switch the layout of the rows depending on left/right pages, but keeping the same row heights - thus avoiding instable solutions. This will most likely work - but I also need _different table headers_ on the pages. But `longtable` as is stores the table head in a box, so the headers are the same on every page. Is there a way to get different headers on even and odd pages _with_ `longtable`? Related: Is there a list enviroment with doublesided page headers?


title: LaTeX compilation of simple document fails

text: I am just starting to work with LaTeX for the first time, so I apologize if my question is trivial. I recently got a first `.tex` document from my supervising tutor, with the request we compile it twice via `pdflatex` so that references will work. After manually installing the TeX Live 2012 distribution, pdflatex fails to compile the document. From what I can understand, the problem is a some kind of missing font:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     (./sem-aus.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty     (/usr/share/texmf-texlive/tex/latex/base/utf8.def     (/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)     (/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)     (/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))     (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty     (/usr/share/texmf-texlive/tex/latex/base/t1enc.def)     kpathsea: Running mktextfm ecrm1000     /usr/share/texmf/web2c/mktexnam: Could not map source abbreviation for ecrm1000.     /usr/share/texmf/web2c/mktexnam: Need to update ?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1000     This is METAFONT, Version 2.718281 (TeX Live 2009/Debian)               kpathsea: Running mktexmf ecrm1000     ! I can't find file `ecrm1000'.     <*> ...ljfour; mag:=1; nonstopmode; input ecrm1000          Please type another input file name     ! Emergency stop.     <*> ...ljfour; mag:=1; nonstopmode; input ecrm1000          Transcript written on mfput.log.     grep: ecrm1000.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1000' failed to make ecrm1000.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not found.     <to be read again>                     relax      l.100 \fontencoding\encodingdefault\selectfont          ? x            No pages of output.     Transcript written on sem-aus.log.      I am pretty sure I set up TeX Live correctly; I also included the distribution in my PATH variable so that the binaries should be found. What is going wrong? I am pretty clueless and thankful for any hints. **Update 1:** I installed the TeX Live distribution into `/usr/share/texlive/2012/i386-linux`, and I see the path `/usr/share/texmf- texlive/tex/latex/base/` appear instead - could this be a sign that the `pdflatex` command is looking in the wrong places? Again, since I have (yet) to learn what the files are used for, I don't know if this hunch makes any sense. **Update 2:** I realized the `pdflatex` command invoked some TeX Live 2009 binary that was roaming around in my system. After removing those packages (hopefully without anything remaining), I will try again and see what happens. **Update 3:** Through some weird bash caching mechanism, it was still invoking the old binary even though the PATH was set correctly. I removed all of the `texlive` packages from my package management system, and finally got it working.


title: Why does defining a new command inside a framed block not work?

text: Why does the following 'minimal working example' work               \documentclass[a4,german]{book}     \usepackage{framed}          \begin{document}          \newcommand{\myText}{Bliblibli!}          \begin{framed}     Blabla      \end{framed}          \myText          \end{document}      but not this here, when defining the new command inside a "framed" block? 'Minimal non-working example':               \documentclass[a4,german]{book}     \usepackage{framed}          \begin{document}          \begin{framed}         Blabla \newcommand{\myText}{Bliblibli!}     \end{framed}          \myText          \end{document}      Does the framed package simply not support this feature, or do I do something wrong?


title: Is there a list environment with (double sided) page headers?

text: This question is an extension of Headers and footers for listing environment?: I have a list of objects (like tables or simply boxes) that should be vertically stacked (so it's a list) and is longer than one page and I want to put a header (and maybe a footer) for the list on every page (but I don't want to use the page header/footer for the list header/footer). And I need a double sided solution (different headers on even/odd pages). Currently I use `longtable` for that, but that doesn't work well in a double sided layout (see How to make a doublesided longtable with a doublesided header?).


title: Line spacing in wrapped table text

text: I have a document where the text is set to double spacing. I have some text inside tables, which I use the paragraphy specifier for. It wraps properly, but spacing is set to single. Is it possible to have the paragraph cells of table be double spaced? Here's an example document:               \documentclass{article}     \usepackage{booktabs}     \usepackage{setspace}          \doublespacing          \begin{document}          test          test          \begin{figure}[t]     \centering     \begin{tabular}{l r r}     \toprule     Item      & 0.5 & 0.2  \\     Something & 0.3 & 34.2 \\     \bottomrule     \end{tabular}     \caption{This should be single spaced.}     \end{figure}          \begin{figure}[t]     \centering     \begin{tabular}{p{0.25\linewidth} p{0.65\linewidth}}     \toprule     Item      & This is a long line of text that will get wrapped since it doesn't fit                 in the table . It gets wrapped properly, but since it's a paragraph, I                 would like it to have the same spacing as the rest of the document,                 here doublespacing. \\     Something & Blah blah text goes here \\     \bottomrule     \end{tabular}     \caption{This should have the paragraph cell double-spaced.}     \end{figure}          \end{document}      and it gets rendered like this: ![enter image description here](http://i.stack.imgur.com/A7Niy.png) Is there some way to make just paragraphy cells (e.g. `p`, `m`, and `b`) have double spacing while leaving alone the other types of cells? Preferably, it would be something I could set in my preamble for all tables without having to specify it inline.


title: How to get correct dimensions for a ggplot2 plot in beamer

text: I have a beamer presentation made with Sweave that I'm preparing and was wanting to place some ggplot2 graphs in but the aspect ratio does not seem to come out correct. This is what is in my Rnw file.               \begin{frame}[containsverbatim]     \frametitle{Basic Workflow}\begin{itemize}     \item Start R (Start > All Programs > R > R x64 2.12.0 )\\     \item Load Packages     <<>>=     library(ggplot2)     library(MASS)     @     \item Load Data     <<>>=     data(iris) # or read.csv/read.table/etc.     head(iris[,3:5],n=3)     @     \item Graph Data     <<>>=     qplot(Petal.Length,Petal.Width,color=Species, data=iris)->p     @     \end{itemize}\end{frame}     \begin{frame}{Basic Workflow, Cont.}     <<fig=T,echo=F>>=     show(p)     @     \end{frame}      what comes out is a graph with the bottom cut off that takes up the left half of the page.


title: Can I have automatically adjusted plates in a graphical model?

text: I have an existing graph with some nodes and edges, written with TikZ/pgf, and I need to add a couple of plates to them to make it a hierarchical model (similar to those in http://en.wikipedia.org/wiki/Hierarchical_Bayes_model). I can hard-code the position and size of the rectangles, but I am wondering if there are ways to do this automatically? i.e. can I specify the nodes and circle-less text nodes that the rectangles need to bound to, and have the rectangles expand when they get bigger?


title: How bad is slack \makeatother discipline really?

text: Following Will Robertson's admission that _Fwiw, i'm not aware of any troubles with a missing_ `\makeatother`, _but you're right. It's a bad habit of mine to omit it_ , and my own progressive slackness about the same thing following my realisation that I never see it matter, I wonder how important the `\makeatother` discipline is? The worst consequence I can think of for experienced users from slackness about closing with `\makeatother` is that one's slackness might spread to omitting `\ExplSyntaxOff` with `expl3`, which is very far from trouble-free. But that's not a mistake anyone is going to get used to making. The insidious worry is that not following the discipline means that some people might become unclear about the distinction between "package/Knuth namespace" and "user namespace". But I can't say that either of these considerations seems very urgent. It doesn't seem important in the same way as such a programmatic discipline as eliminating avoidable state in interfaces. Is there something more compelling?


title: autogobble for lstinputlistings

text: In the manual for listings it says that `gobble` has no effect for `lstinputlistings`. Since the manual is about four years old now and after reading How to automatically skip leading white spaces in listings my question is if there is a way to activate `gobble` or even better `autogobble` for `lstinputlistings`? **Edit:** I have tried `\lstinputlistings[gobble=3]{hello.c}` and it does not work and I have set `tabsize=3`. **MWE:**               \documentclass{article}          \usepackage{listings}     \lstset{tabsize=3,frame=single,numbers=left}          \usepackage{filecontents}     \begin{filecontents*}{hello.c}     if (a<b){         if (b<a){             //do something         }     }     \end{filecontents*}          \begin{document}     \noindent     Using \verb|\begin{lstlisting}... gobble=3| works:     \begin{lstlisting}[gobble=3,firstnumber=2,linerange={2-4}]     if (a<b){         if (b<a){             //do something         }     }     \end{lstlisting}          \bigskip\noindent     Using \verb|\lstinputlisting gobble| does not work:     \lstinputlisting[gobble=3,firstnumber=2,linerange={2-4}]{hello.c}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Ld7lw.png) **Update:** after playing around with S. Murugan's code I came up with this which also sets firstnumber according to firstline -- something I've also wanted.               \documentclass{article}     \usepackage{listings,xifthen,filecontents}          \lstset{tabsize=3,numbers=left,frame=single,basicstyle=\Huge\ttfamily,columns=flexible}     \newlength{\gobble}     \newlength{\gobblea}     % The width of a single space. basicstyle from lstset should be used     \sbox0{\Huge\ttfamily \ }     \newcommand{\mylist}[5]{     %#1 is number of tabs, could be calculated like in listings-autogobble with autogobble=true or be an extra option     %#2 is tabsize, which is set in lstset     %#3 is firstline from lstset     %#4 is lastline from lstset     %#5 is the filename, the only thing which should be an argument and not an option.          % Remove a single space     \setlength{\gobble}{-\the\wd0}     % Reindent a bit by dividing by 1.1, then multiply by tabsize and number of indentation levels     \setlength{\gobble}{0.90909090909090909090909090909091\gobble*#1*#2}     \setlength{\gobblea}{\gobble}     \addtolength{\gobblea}{10pt}     % Check if firstline is defined     \ifthenelse{\isempty{#3} \OR \equal{#3}{0}}{%     % Check if lastline is defined     \ifthenelse{\isempty{#4}}{%     \lstinputlisting[firstnumber=1,firstline=1,framexleftmargin=\gobble,xleftmargin=\gobble,numbersep=\gobblea]{#5}     }{     \lstinputlisting[firstnumber=1,firstline=1,lastline=#4,framexleftmargin=\gobble,xleftmargin=\gobble,numbersep=\gobblea]{#5}     }     }{     \ifthenelse{\isempty{#4}}{%     \lstinputlisting[firstnumber=#3,firstline=#3,framexleftmargin=\gobble,xleftmargin=\gobble,numbersep=\gobblea]{#5}     }{     \lstinputlisting[firstnumber=#3,firstline=#3,lastline=#4,framexleftmargin=\gobble,xleftmargin=\gobble,numbersep=\gobblea]{#5}     }     }     }          \begin{filecontents*}{hello.c}     if (b<a){        //do something     }     \end{filecontents*}     \begin{filecontents*}{hello1.c}     if (a<b){        if (b<a){           //do something        }     }     \end{filecontents*}          \begin{document}     \lstinputlisting[firstnumber=2,linerange={1-3}]{hello.c}     %mylist{#tabs}{#tabsize}{firstline}{lastline}{filename}     \mylist{1}{3}{2}{4}{hello1.c}     \mylist{2}{3}{3}{3}{hello1.c}     \end{document}      **Update** Now it should work for any font size (tested from 8 to 60pt) and for any basicstyle (tested from \tiny to \Huge). Now it would be really nice, if I could just write `\lstinputlisting[tabs=1,firstline=2,lastline=4]{hello.c}` and it would fetch `tabsize=3` and `basicstyle=\Huge\ttfamily` from `lstset{}`. **Update 7/06/2013** In How to extend the \lstinputlisting command there is a nicer way to achieve the desired result.


title: Computer powered down during tlmgr update, now tlmgr won't update packages, nor itself

text: As title says, I was updating the packages in my TL installation (by `tlmgr update --all`) from the command line in Win7, but for some strange reason the computer just powered down during the update, and now after restarting it I can't get `tlmgr` to update anything (packages or itself by `tlmgr update --self`). I can run the commands from the command line, but nothing happens. The command line window just stays black for a long time until the following line of text appears:               at C:/texlive/2011/tlpkg/TeXLive/TLPOBJ.pm line 108, <TMP> line 1.      After this appears, it returns back to the command line where I can type any new commands. I assume this ends up in a reinstall of TL2011, but if someone have any suggestions for how I can try to fix this in order to avoid the reinstalling TL I'd be glad. I also tried downloading the latest update of `tlmgr` from tug.org manually and install it, but didn't help. Could it work to just replace the whole tl2011 install dir with one installation that got the exact same structure and file names from another computer (e.g. I have used `C:\texlive\2011` on both computers)? Below is a screen shot of the command line window (which basically gives me no leads). ![screen shot of cmd window](http://i.imgur.com/UaVdz.png)


title: How to use \addtocontents to indent to section/subsection names

text: \chapter{C}     \section{S}     \subsection{SS1}     \subsection{SS2}     \addcontentsline{toc}{subsection}{AddedSS}      results in               1  C ................... 1        1.1 S ............... 1            1.1.1 SS1 ....... 1            1.1.1 SS2 ....... 1            AddedSS ......... 1      But I would like to get added manually subsection `AddedSS` to be indented to subsection names, like this :               1  C ................... 1        1.1 S ............... 1            1.1.1 SS1 ....... 1            1.1.1 SS2 ....... 1                  AddedSS ... 1      How to achieve this to added manually subsection?


title: How do I get a straight line in \begin{tikzpicture}[decoration=Koch snowflake]?

text: The following code               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{decorations.fractals}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}[scale=3,decoration=Koch snowflake]     \draw decorate{ (0,0) -- (3,0) };     \draw decorate{ decorate{ (0,-1) -- (3,-1) }};     \draw decorate{ decorate{ decorate{ (0,-2) -- (3,-2) }}};     \draw decorate{ decorate{ decorate{ decorate{ (0,-3) -- (3,-3) }}}};     \end{tikzpicture}          \end{document}      Gives me the following picture: ![enter image description here](http://i.stack.imgur.com/o7jPb.png) To emphasize the initiator and I'd like the first figure to be a straight line, like on this picture: ![enter image description here](http://www.vanderbilt.edu/AnS/psychology/cogsci/chaos/workshop/Fig4.7.GIF) The problem is that I don't quite understand what the numbers `{ (0,0) -- (3,0) }` mean, and being new to TeX, I also don't know where to look it up.


title: Gnuplottex basic example fails with 'undefined control sequence'

text: I'm using latest TeXLive on Linux, and have `gnuplot` installed. I have also installed `gnuplottex` package. Then, I'm trying to compile the basic gnuplottex CTAN example, example- pdf.tex; however, I get this:               $ pdflatex -shell-escape test.tex     ...     ! Undefined control sequence.     \gnuplotverbatimwrite ...e \openout \verbatim@out                                                        #1 \BeforeStream \let \do ...     l.7 ...f,terminaloptions={font ",10" linewidth 3}]          ? X      (full log here) Anyone have any idea how do I get this basic example to work?


title: Hyphenated last name while using the apacite package

text: I am using the `apacite` package for citing references and do not know how to suppress the output of a hyphenated last name with the initial of a first name. For example, I enter the following entry with the appropriate fields:               @phdthesis{lillomartin:1986,         Author = {Lillo-Martin, Diane},         School = {University of California, San Diego},         Title = {Parameter setting: Evidence from use, acquisition, and                   breakdown in American Sign Language},         Year = {1986}         }      When I cite the said author, e.g. `\cite{lillomartin:1986}`, the output shows up like this: > (D. Lillo-Martin, 1986) How do I change the entry so the citation shows up without the first name initial, e.g.: > (Lillo-Martin, 1986)


title: Implementation of a C compiler in TeX ?

text: Seeing the many things already done with TeX, I wonder if anyone has implemented a C (or C++) compiler in TeX. This does not seem too far fetched as an experiment. I do not expect great performance. I am also interested about experiments towards a Lisp interpreter or a Java compiler.


title: Is there a way to use long or Unicode filepaths with texify?

text: I use MiKTeX and it’s TeXworks and there is the command for making XeLaTeX+MakeIndex+BiBTeX at once. This uses texify and when your file is somewhere in the directory tree where there are non-standard (long or non- ASCII) names of directories or of the file in the path, the texify won’t take it. Don’t you know if there is a way how to make it work without renaming all the directories in the path to only-ASCII names?


title: Sigplanconf algorithm2e missing algorithm when figure

text: I am rewriting a paper, and stumble over this problem where algorithms are missing in my appendix. I was able to reproduce the problem. The following code only display 2 out of the 4 algorithms on the first page, then the figure, then nothing else. If I shorten the algorithms, all 4 appear on the first page. But I cannot in reality shorten my algorithms. You can find the style file sigplanconf.cls here. Why does it disappear?               \documentclass[preprint,10pt,nocopyrightspace,letter]{sigplanconf}     \usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)     \usepackage{amsmath}     \usepackage{latexsym}     \usepackage{mathabx}     \usepackage[demo]{graphicx}     %\usepackage{graphicx}     \usepackage[plain,noend,noline,boxed]{algorithm2e}      \begin{document}          \begin{algorithm}     \SetAlgoNoLine          \KwData{The data} \KwResult{The result}     \BlankLine     initialize \;     \ForEach{s $\in$ g} {        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;     }     \caption{CodeGeneration}     \end{algorithm}               \begin{algorithm}     \SetAlgoNoLine     \KwData{The data} \KwResult{The result}     \BlankLine     initialize \;     \ForEach{s $\in$ g} {        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;     }     \caption{Other code generation}     \end{algorithm}          \begin{algorithm}     \SetAlgoNoLine          \KwData{The data} \KwResult{The result}     \BlankLine          initialize \;     \ForEach{s $\in$ g} {        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;        Do something \;          }     \caption{Last code generation}     \end{algorithm}          \begin{algorithm}     \SetAlgoNoLine     \caption{RuleTest}     \end{algorithm}          \begin{figure*}[ptbh]     \centering     \includegraphics[width=\textwidth,height=10cm]{a}     \caption{Additional screen shot }     \end{figure*}     \end{document}


title: Adjacent rectangles with label on borders

text: I want to use `tikz` to generate adjacent rectangles having label on each border. 7     6 5   3 2    0   **___ __ ___ __ ___ __ ___ __ ___ __**   | ** ___ ___ _**|_ ** ___ ___ _**|_ ** ___ __ ___** |   I've tried this:               \begin{tikzpicture}           \node[above left] (b) at (0,0) {7};           \node[above left] (b) at (2,0) {6};           ... %same for the others           \draw (0,0) rectangle (2,1);           \draw (2,0) rectangle (5,1);           \draw (5,0) rectangle (8,1);     \end{tikzpicture}      But the output is not as I want, the label are not above the rectangles. I guess its because the rectangle is not defined with the node or something like that. Is it possible to do that with `tikz`? If yes how should I do it?


title: How to avoid line breaking after subsection in Memoir?

text: \documentclass{memoir}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{bbm}     \usepackage{graphicx}     \usepackage{epsfig}     \usepackage[all]{xy}          \setcounter{chapter}{0}     \setcounter{secnumdepth}{3}     \renewcommand*\thesection{\arabic{section}}     \renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}      This gives me a "line" break after section, subsection, subsubsection. I want to keep the "line" break after section, but for subsections and subsubsections I want the text to continue on the same line right after the heading.


title: abstract, tableofcontents and listoffigures in twocolumn, landscape report

text: \documentclass[a4paper,landscape,twocolumn]{report}     ....     \begin{document}     \begin{abstract}     bla bla bla     \end{abstract}          \tableofcontents     \listoffigures          \chapter{Introduction}     ....      I get the main text nicely on 2 columns in landscape mode. However, the abstract, the table of contents and the list of figures goes in a single column that stretches the whole page, which is looking - ahemm - less than funny on a landscape A4 page. I have tried to enclose the abstract in a separate `\begin{twocolumn} ... \end{twocolumn}`, that does not change enything. Same with the toc and the list of figures. If I put the twocolumn environment inside the abstract environment it gives me 1 page withe the word "Abstract" and the abstract text itself in 2 columns on the next page. I could live with that, yet it is still unsatisfactory. How can I get the whole document - except the title page - in two columns? I am using MikTex 2.8.


title: Notation table in each Chapter/Part

text: I am currently writing a large document (book class divided into several parts) and would like to introduce suitable notation tables at the beginning of each part of the document. Up to now I have been looking at the documentation of some (standard?) references for making indexes and notation tables such as the package `glossaries` or the package `nomencl`, but I have not found any indication for automatically generating such notation tables at the beginning of each part or chapter of the text. In particular I am looking for a way to print the list of the relevant symbols used in each part/chapter at the beginning of the same chapter/part possibly repeating symbols already used in previous parts. The only solution which came to my mind is to manually defining different glossaries for each part/chapter within the glossaries package. However this could be time consuming and not very portable and might lead to issues when cross.referencing for definitions. Is there any better and more flexible solution? Example of output which I am trying to obtain > # Chapter 1 > > ## Notation > > A .. p.1 > > B .. p.2 > > Text containing first occurrence of symbol A and B > > # Chapter 2 > > ## Notation > > A ... p.1 > > C ... p.11 > > Text containing first occurrence of symbol C and a tagged occurrence of > symbol A


title: How to reduce the space between two slashes when using \url?

text: This is a follow-up question to Space between two slashes. Bianca Lobo's answer (defining a `\twobar` command with proper kerning) is nice; however, it doesn't work in the argument of the `\url` command of the package of the same name. How can one reduce the space between two slashes when using `\url`? (I'm interested in a solution for sans-serif as well as for roman fonts.)               \documentclass{article}          \usepackage{url}          \newcommand{\twobar}{/\kern-0.2em/}          \begin{document}          \sffamily     \urlstyle{sf}          http:\twobar www.tex.stackexchange.com          \url{http://www.tex.stackexchange.com}          \url{http:\twobar www.tex.stackexchange.com}          \bigskip          \rmfamily     \urlstyle{rm}          http:\twobar www.tex.stackexchange.com          \url{http://www.tex.stackexchange.com}          \url{http:\twobar www.tex.stackexchange.com}          \end{document}      ![enter image description here](http://i.stack.imgur.com/CITCl.jpg)


title: Draw Curly Braces in TikZ

text: I am using TikZ with the following code to draw a picture. How can I turn the curly bracket next to `$P_2$` to the right?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}          \begin{document}          \begin{tikzpicture}[scale=1]     \draw[thick] (-1,0) rectangle +(6,7.5);     \filldraw[thick, top color=white,bottom color=red!50!] (0.5,0) rectangle node{$N_S$} +(1.3,0.5);     \filldraw[thick, top color=white,bottom color=red!50!] (2.2,0) rectangle node{$N_L$} +(1.3,0.65);     \filldraw[top color=white,bottom color=blue!50!] (0.5,0.5) rectangle node{$P_{1}$} +(1.3,0.5);     \filldraw[top color=white,bottom color=blue!50!] (2.2,0.65) rectangle node{$P_{2}$} +(1.3,1.0);     \filldraw[top color=white,bottom color=blue!50!] (0.5,1.0) rectangle node{$P_{3}$} +(1.3,1.5);     \filldraw[top color=white,bottom color=blue!50!] (2.2,1.65) rectangle node{$P_{4}$} +(1.3,2.0);     \filldraw[top color=white,bottom color=blue!50!] (0.5,2.5) rectangle node{$P_{5}$} +(1.3,2.5);     \filldraw[top color=white,bottom color=blue!50!] (2.2,3.65) rectangle node{$P_{6}$} +(1.3,3.0);     \draw [decorate,decoration={brace,amplitude=10pt},xshift=-4pt,yshift=0pt]     (0.5,0.5) -- (0.5,5.0) node [black,midway,xshift=-0.6cm]      {\footnotesize $P_1$};     \draw [decorate,decoration={brace,amplitude=10pt},xshift=-4pt,yshift=0pt]     (3.5,0.65) -- (3.5,6.5)node [black,midway,xshift=9pt] {\footnotesize     $P_2$};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/cYWCD.png)


title: How to convert PDF to EPS?

text: I can't find a tool to convert PDF to EPS, neither in MikTeX nor in TeXLive. Is there such a tool actually? * * * **Update:** Based on Herbert's accepted answer, I simplify his batch as follows:               #!/bin/sh     # $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $     # Convert PDF to encapsulated PostScript.     # usage:     # pdf2eps <page number> <pdf file without ext>          pdfcrop "$2.pdf" "$2-temp.pdf"     pdftops -f $1 -l $1 -eps "$2-temp.pdf" "$2.eps"     rm  "$2-temp.pdf"      For Windows users, create a batch file, name it `pdf2eps.bat` as follows:               rem pdf2eps <page number> <pdf file without ext>     echo off     pdfcrop "%2.pdf" "%2-temp.pdf"     pdftops -f %1 -l %1 -eps "%2-temp.pdf" "%2.eps"     del  "%2-temp.pdf"


title: TikZ arrow misaligned in italicized text

text: Based on the questions How can I draw arrows between words in linguistic examples? and Add arrow pointing from one table cell to another, I'm trying to draw a curved arrow from one character to another within a word. Whereas it looks fine with normal text, the arrow is slightly misaligned when the text is italicized (i.e. the arrow doesn't take into account that the text has been italicized). What to do?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \noindent     abcd\tikz[baseline, remember picture] \node[inner sep = 0pt, anchor = base] (finisharrow){e};fgh\tikz[baseline, remember picture] \node[inner sep = 0pt, anchor = base] (startarrow){i};jklmnopqrstuvwxyz\\     \begin{tikzpicture}[remember picture, overlay, shorten <=.2ex, shorten >=.2ex]         \path[->, thin](startarrow) edge[out = 90, in = 90] (finisharrow);     \end{tikzpicture}     \\ \textit{abcd\tikz[baseline, remember picture] \node[inner sep = 0pt, anchor = base] (finisharrow){e};fgh\tikz[baseline, remember picture] \node[inner sep = 0pt, anchor = base] (startarrow){i};jklmnopqrstuvwxyz}     \begin{tikzpicture}[remember picture, overlay, shorten <=.2ex, shorten >=.2ex]         \path[->, thin](startarrow) edge[out = 90, in = 90] (finisharrow);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/UnqID.png) (Based on what I found in the pgf manual, I first tried to use `\draw` with `arc(::)` rather than `\path`, but I wasn't able to connect the characters. I'm open to suggestions using `arc` instead, if that's better).


title: Two (or more!) piecewise functions on same line

text: Want to display two piecewise functions on the same line. Currently using 'cases' to define two piecewise functions on two separate lines. It looks ugly. They can fit on the same line, but how?


title: Creating a lattice multiplication image on LaTeX

text: I need an image detailing the lattice multiplication method and it should look like this: ![http://megamindacademy.com/wp-content/uploads/2011/09/Lattice-Method-for- Multiplication-Example-51.jpg](http://i.stack.imgur.com/sRq0a.jpg)


title: Calculating and showing the sum of squares in a diagram

text: Using some plain old Metapost code I am able to create a basic plot of linear regression. The question is: Can I create a graphics with e.g. TikZ which allows me to specify a few points coordinates (black) )and two points (or the coefficients of the linear model) for the regression line and then automatically   * draws the red lines   * plots the green points   * shows a calculated sum of squares in the diagram It could come handy to do it in LaTeX directly to show how the parameters of the regression line influence the sum of squared differences. ![enter image description here](http://i.stack.imgur.com/BIRCB.jpg)


title: Make the multicolumns in a row equally sized?

text: I have some big tables and I want to know how it is possible to make the columns in a row all equally sized. You can see in the row 'Intra Prediciton' that the column with the content 'I_PCM' is bigger than the others in its row. Same with '16x8' and '8x8' in the next row. Is it possible to fix that? Here the image: ![image](http://i.stack.imgur.com/CyMRC.jpg) I also appreciate other suggestions how to improve the tables. heres the mess ...                   \newcolumntype{Y}{>{\columncolor[gray]{.8} } c|}         \newcolumntype{N}{>{\columncolor[gray]{.8} \color{gray}}  c|}          %Spaltenzahl 8     % \color{gray} \color{lightgray} %\rowcolor{hellgrau} \cellcolor{dunkelgrau}          \begin{tabular}{|       >{\color{white}  \columncolor[gray]{.2}[.5\tabcolsep]}      c       |       >{\columncolor[gray]{.8}[.5\tabcolsep]}     c        |      >{\columncolor[gray]{.8}[.5\tabcolsep]}     c       |       >{ \columncolor[gray]{.8}[.5\tabcolsep]}        c   |       >{ \columncolor[gray]{.8}[.5\tabcolsep]}        c   |       >{ \columncolor[gray]{.8}[.5\tabcolsep]}        c       |   >{ \columncolor[gray]{.8}[.5\tabcolsep]}        c   |   >{ \columncolor[gray]{.8}[.5\tabcolsep]}        c    }      \hline     Bildverfahren                                                   &           \multicolumn{3}{Y}{progressive}     &  \multicolumn{3}{Y} {interlaced } \\       \hline     Frames/Slices                                                   &       \multicolumn{2}{Y}{I}       &       \multicolumn{2}{Y}{P}       &   \multicolumn{2}{Y}{B}       \\     \hline      Slices                                                                             & \multicolumn{3}{N}{nein}   &  \multicolumn{3}{Y}{ja}  \\      \hline     Transformation                                              & \multicolumn{2}{N}{8x8 DCT}       & \multicolumn{2}{Y}{8x8 IDCT} & \multicolumn{2}{Y}{4x4 IDCT} \\     \hline     Adaptive Quantization                   & \multicolumn{2}{N}{nein} & \multicolumn{2}{N}{Lumi} & \multicolumn{2}{Y}{Variance} \\     \hline     Max. Ref Frames                                         & \multicolumn{3}{N} {keine} & \multicolumn{3}{Y}{16} \\     \hline     B-Pyramid                                                               &\multicolumn{3}{N} {nein} & \multicolumn{3}{Y} {ja} \\     \hline     Loop-Filter                                                                 & \multicolumn{3}{N} {nein} & \multicolumn{3}{Y} {ja} \\     \hline     Entropiekodierung                                   & \multicolumn{3}{Y} {CAVLC} &  \multicolumn{3}{Y}{CABAC} \\     \hline     SubPixel ME                                                         &  \multicolumn{2}{N} {nein} & \multicolumn{2}{N} {halb} &  \multicolumn{2}{Y}{viertel} \\     \hline     Intra Prediction                                                & \multicolumn{1}{N} {nein} & \multicolumn{1}{Y}{16x16} & \multicolumn{1}{Y}{8x8} &  \multicolumn{1}{Y}{4x4}  &\multicolumn{2}{Y}{ I\_PCM}\\     \hline     MB-Partitionierung                                  & \multicolumn{1}{Y}{16 x 16} & \multicolumn{1}{Y}{8x16} & \multicolumn{2}{Y}{16x8} & \multicolumn{2}{Y}{8x8} \\     \hline     SubMB-Partitionierung                   & \multicolumn{1}{N}{nein} & \multicolumn{1}{Y}{8x8} & \multicolumn{1}{Y}{4x8} & \multicolumn{1}{Y}{8x4} & \multicolumn{2}{Y}{4x4} \\     \hline     %Intra Prediction & \color{gray} nein  & 16×16 & 8×8 &  4×4  \\     Farb-Sampling                                                   &           \multicolumn{2}{Y}{4:0:0}       & \multicolumn{2}{Y}{4:2:0} &  \multicolumn{1}{Y}{4:2:2} &  \multicolumn{1}{Y}{4:4:4} \\     \hline     Bit-Tiefe                                                                       & \multicolumn{1}{Y}{8}  & \multicolumn{2}{Y}{8 bis 10} & \multicolumn{2}{Y}{8 bis 12} & \multicolumn{1}{Y}{8 bis 14} \\     \hline     Error Prevention /Handling  &  \multicolumn{3}{N} {nein} &\multicolumn{3}{Y}{ja} \\     \hline     Level/Profile                                                       &  \multicolumn{3}{N} {nein} &\multicolumn{3}{Y}{ja} \\     \hline         \end{tabular}      EDIT: Isn't that cool? Used tablet now... ![my cool table](http://i.stack.imgur.com/InB54.png) Unfortunately the vrules are sometimes not so beautiful. You see it when comparing the last two lines. Should I color the table?