title: Spelling in TeXstudio

text: I have troubles enabling spell check in TeXstudio under Windows. I know that my question is quite localized but I need help. TeXstudio is set UTF-8 encoding and I am writing in Bulgarian. I downloaded dictionary files from here. They are encoded in ANSI and they are for OOo 3.0 and above. When I copy the files in TeXstudio dictionary folder and switch to Bulgarian in TeXstudio I get the following: > Could not determine encoding. I tried to change dictionary encoding to UTF-8 or to change end-of-line character to UNIX but nothing happens. Any other suggestions?


title: page numbers on the side of the page

text: Can anybody tell me if it is possible to have page numbering on the side of the page? I mean on the right side on odd pages and on the left side on even pages. ![enter image description here](http://i.stack.imgur.com/YPN0c.jpg)


title: Text selection in generated pdf misbehaves with two-column layout + equations

text: I'm using pdf(la)tex to generate a document laid out in two columns. There are equations in both columns. I noticed that if I select text in the PDF (using either evince or Apple's Preview - haven't tried Acrobat) the selection doesn't reliably stick to one column or the other. The usual misbehavior is that clicking-and-dragging across an equation in one column causes the entire other column to become selected, but I've seen several other (difficult to describe) weird behaviors. Is this a bug in pdftex, or a bug in the document class (IEEEtran.cls), or something I can correct with a package, or what?


title: mathscript glyphs in nomenclature list

text: I am trying to use a glyph defined by \mathscr{F} in a list of nomenclature. The explanation shows in the list fine, but the glyph doesn't. Anyone come across this before or have a solution\workaround? Probably not strictly a minimum example below, but I thought it may be an upshot of my code perhaps.               \documentclass[12pt,a4paper]{scrreprt}     \usepackage{mathrsfs, amsmath}     \usepackage{nomencl}          \makenomenclature          \renewcommand{\nomname}{Nomenclature \& Abbreviations}     \begin{document}     \renewcommand{\nompreamble}{         \protect\thispagestyle{fancy}}             \twocolumn                  \phantomsection {chapter}{Nomenclature \& Abbreviations}                     \chaptermark{Nomenclature \& Abbreviations}                     \printnomenclature[1.8cm]                     \pagebreak     $\mathscr{f}=h \nu$     \nomenclature{\mathscr{f}}{Frequency}     \end{document}


title: Unicode symbols in hyperref links

text: EDIT: It looks like this solution \detokenize{} is working in my situation. Mark it for answered. I've searched all over Internet including Stackoverflow, but I can not found a solution in this problem:               \usepackage[unicode]{hyperref}     \begin{document}     \begin{figure}[H]     \href{run:/$HOME/Workspace/ĄČĘĖĮŠŲŪŽ/tests/V-832-2.qti}{\includegraphics[scale=0.5]{Graph1}}     \end{figure}     \end{document}      Problem with this file is this (when I click onto a link in generated PDF):               Workspace/\begingroup \let \relax \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ą}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Č}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ę}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ė}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Į}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Š}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ų}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ū}intopreamble]\begingroup \let \relax     \relax \endgroup     [Pleaseinsert\PrerenderUnicode{Ž}intopreamble]/testams/V-832-2.qti      How to make `hyperref` work with a Unicode paths? Suggestions to use `utf8`, `utf8x` for `inputenc` didn't work for me. My inputenc is with those options: \usepackage[utf8x]{inputenc}. Using a unicode=true tag didn't solve my problem.


title: ! LaTeX Error: Something's wrong--perhaps a missing \item

text: I am using TEXMAKER. Here is a code segment.               \usepackage{algorithmic}      begin{algorithmic}     \FOR {$i\gets0$ to $n$} \do         \FOR {$j \gets$0 \TO $min(i,k)$} \do              \IF {$j=0$ \OR $j=i$}                 \STATE $C[i,j] \gets  1$             \ELSE                 \STATE $C[i,j] \gets  C[i-1,j-1]+C[i-1,j]$             \ENDIF         \ENDFOR     \ENDFOR     \RETURN C[n,k]          \end{algorithmic}


title: Defining a \newcommand for environment in CircuiTikz

text: I have made the following macro for an op-amp with open connectors in circuitikz:               \newenvironment{opamp5}[5]     {     \begin{circuitikz}     \draw (0,0) node[op amp] (opamp) {};     \draw (-2,-0.49) to[short, o-] (opamp.+) (-2.2,-0.49) node[anchor=east] {${#1}$};     \draw (-2,0.49) to[short, o-] (opamp.-) (-2.2,0.49) node[anchor=east] {${#2}$};     \draw (-0.08,1.5) to[short, o-] (opamp.up) (-0.08,1.6) node[anchor=south] {${#3}$};     \draw (-0.08,-1.5) to[short, o-] (opamp.down) (-0.08,-1.6) node[anchor=north] {${#5}$};     \draw (1,0) to[short, -o] (2,0) -- (opamp.out) (2.1,0) node[anchor=west] {${#4}$};     \end{circuitikz}     }      To draw an op-amp with labels, starting from the positive input terminal and moving clockwise to the negative Vcc terminal you simply enter the environment opamp5 as I have defined above:               \begin{opamp5}     {1}{2}{3}{4}{5}     \end{opamp5}      My question is, instead of making this circuitikz picture an environment, is there any way I can define it as a command so i can link to other elements of a circuit diagram? I tried using the same syntax and defining it as \newcommand instead, but LaTeX did not like that. My goal is to have various new commands that I can link together smoothly instead of drawing an op-amp manually each time I need one in a circuit diagram. Rather than having to begin and end an environment, it is much more convenient if I can have a shorter syntax that will produce the same picture. Thanks


title: titlepage environment - no control sequence is recognized

text: I am using 2 templates from Wikibooks for creating a title page for a document. One template is for testing and the other one for the titlepage itself. They are shown below. The problem I have is that I am getting undefined control sequence within the titlepage environment even for the most basic latex commands. I can't figure out what to do. Here is the code:               \documentclass[12pt,a4paper]{report}          \usepackage{graphicx}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \begin{document}          \input{./title.tex}     \end{document}      title.tex contains this:               \begin{titlepage}     \vspace*{\fill}     \begin{center}     \Huge{Title goes here}     \end{center}     \vspace*{\fill}     \end{titlepage}      No matter what I put inside titlepage, even just \text{something}, it still gives undefined control sequence. Please help!


title: Why ' every label/.style={draw}' also `fill`s?

text: Please look at next code and its result:               \documentclass[tikz,border=2mm]{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}          \begin{tikzpicture}[every node/.style={draw=red,fill=green},]     \node[label=above:a] (A) {AAA};          \node[label={[draw]above:b}, right=of A] (B) {BBB};          \begin{scope}[every label/.style={draw}]         \node[label=above:c, right=of B] (C) {CCC};     \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/VRqPS.png) I understand that `labels` are `nodes` which are created after its main node. (Look at Every non-label node in TikZ), so I understand that options `draw` or `fill` inherit main node colors as is shown in middle node. But I don't understand why `every label/.style={draw}` also fills the label, as is shown in right most node above. Could you explain it?


title: Table with alternating row colours and rounded corners

text: I am trying to create a table with alternating row colours _and_ rounded corners. I combined two answers so far to achieve this:   * Thorsten Donnig's answer about alternating row colours.   * Jake's answer about adding rounded corners to a table. This works great in general, but the problem is that the alternating row colours method fills a proper square, not a rounded one, and the row colour "leaks" outside the table border. See the top left and bottom left corners of the image below. Is there an easy way to fix this? Maybe by using the named `tikz` node to clip everything outside it? # Issue: ![Issue](http://i.stack.imgur.com/1yfTE.png) # MWE:               \documentclass[border=10pt,10pt,table]{standalone}          \usepackage{tikz}     \usepackage{xcolor}     \usepackage{array}     \usepackage{booktabs}     \usepackage{tabularx}     \definecolor{tablerow1}{RGB}{225,217,205}     \definecolor{tablerow2}{RGB}{236,229,221}          \begin{document}       \rowcolors{2}{tablerow1}{tablerow2}       \begin{tikzpicture}       \node (thetable) [inner sep=0pt] {         \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash\hsize=1.4\hsize}X>{\raggedright\arraybackslash\hsize=0.6\hsize}X}           \arrayrulecolor{white}           \textbf{Column 1} & \textbf{Column 2} \\ \hline           Some text. & Some text. \\ \hline           Some text. & Some text.         \end{tabularx}       };       \draw [rounded corners=.5em] (thetable.north west) rectangle (thetable.south east);       \end{tikzpicture}     \end{document}


title: TikZ: nodes with text, scale = or \large, \Large, \Huge?

text: If one needs to slightly increase the size of the text in a TikZ node. What are the pros and cons of using `scale=` in the style options instead of changing the font size with the usual LaTeX\TeX macros: `\Huge`, `\Large` and `\large` ?


title: Classroom Seating Chart in TikZ?

text: I would like to make a random classroom seating chart starting from a numbered list of students. I would also like to specify the number of seats per row (as it varies in my classroom) and the number of seats per table (2, else 1, in my case). My specific classroom configuration of 22 seats looks like this (where S = a seat):               S   S S   S S   S S   S  ← 8 seats in row      S S   S S   S S   S S   ← 8 seats in row         S S   S S   S S      ← 6 seats in row       front of classroom How would I solve this problem with TikZ in general, where I would only have to pass it an array of the number of seats in each row from the front of the room ({6,8,8} in my specific case), a list of students {"Albert","Bob","Chris",…,"Zach"}, and the number of seats per table (2, else 1, in my specific case)? thanks


title: How can I avoid overlapping text labels in tikz scatter plot?

text: I tried to plot a scatter in latex using tikzpicture.               \begin{tikzpicture} [x=12cm,y=4cm]     \begin{axis}[xlabel={y title}, ylabel={x title}]     \addplot[scatter,mark=*,only marks, point meta=x,nodes near coords*={\data},     visualization depends on={value \thisrow{dataname} \as \data},]      table [x=x,y=y]{     x      y    dataname     99    113   water     37    142   rain     18    164   liver     5   195 coast     69   95 butterfly     330 36  mountain     121 96  dragonfly     208 0   greentree     };     \end{axis}     \end{tikzpicture}      However, in this case, some labels are overlapped and one can't see correctly. How can I avoid the overlap? I think one way to do it is to draw it more widely. However I found that [x=12cm,y=4cm] does not work. Or is there a smarter way to do it?


title: How to make a sidebar to the bottom in beamer?

text: I am on my way to create a beamer template according to the powerpoint template from my institute. For the theme I need the possibility to use a footline plus a left sidebar. The problem is that the sidebar should go to the bottom and not to the top line of the footline. The sidebar should only be a slim line on the left side for estetic reasons. No relevant content. What I did get so far is in the picture: ![Page created with the theme](http://i.stack.imgur.com/P2XSZ.png) The colors will be set later correctly. I want the black block go to the bottom end of the page. The green is the footline (for correct identification). I created the black block using (`\ILEA@Sidebar@Width` is a fixed, pre-defined length in the theme)               \defbeamertemplate*{sidebar left}{ILEA}{%     \rule{\ILEA@Sidebar@Width}{\textheight}%     }      I first thought of calculating the height of the foot line and then to enlarge the rule height by that but the gap between the black rule and the green background will not be included, will it? If I disable the footline (make it empty), the gap is still there. So it seems to be not the raw footline, that inserts the space here. I"ll give you a (more or less) minimal working example to reproduce what I did:               \documentclass{beamer}     \setbeamersize{sidebar width left=12pt}     \setbeamercolor*{footline}{fg=red,bg=green}     \setbeamertemplate{navigation symbols}{}     \setbeamertemplate{footline}{%     \begin{beamercolorbox}{footline}%     ~\hfill \insertframenumber\hspace{10pt}\vspace{1ex}%     \end{beamercolorbox}}     \setbeamertemplate{sidebar left}{%     \rule{10pt}{\textheight}}     \begin{document}     \begin{frame}     \frametitle{Der Titel}     Mein Text     \end{frame}     \end{document}      EDIT: I want to avoid hardcodeing some length values other than estetic ones into the template. Otherwise it might quickly happen, that any modification to let's say the font size might lead to destruction of the template. So I'd like to let latex calculate this required length. If you put instead `\setbeamertemplate{sidebar left}{a \vfill b}` you see, that latex seems to know the correct height of the availabe space. As far as I know, `\textheight` represents the length of the vertical availabe space. So I tried this length. Is there a better way to handle things?


title: Syntax Highlight in Winedt

text: I am using `Winedt 7.1` and learning `TikZ` and I am thinking about to add the commands to the `keyword.ini`, in the help they mentioned, adding to many keywords may affect the performance. Is there a possibility that the `TikZ- Commands` are only highlighted inside a tikzpicture environment?


title: Is it possible to draw a 3d cylinder using TikZ-3dplot?

text: I want to draw a clyinder between two planes. I want to specify the distance between the planes and position and radius of the cylinder. ![Result](http://i.stack.imgur.com/9vHi3.png) I would like to use tikz-3dplot, because it allows a free rotation of the Viewpoint if everything is implemented with it. There are a few Threads in which the creation of 3D bodies in TikZ, Drawing simple 3D cylinders in TikZ and Drawing 3D cylinder have been discussed. Unfortunately those solution seem not to work with tikz-3dplot, because they all manipulate the 'Viewpoint' themself. This leads to the Problem, that a manipulation of the viewpoint with \tdplotsetmaincoords only rotates all Objects except the Cylinders. ![Result at the moment with tikz](http://i.stack.imgur.com/IeXWh.png) ![Result at the moment with Tikz - front view](http://i.stack.imgur.com/bV8ri.png) Another User had a very similar question which yielded no answer yet. How to draw a 3d cylinder using TikZ-3dplot? To summarize: I want to draw a cylinder in 3d using tikz-3dplot. At the Moment i can draw the circle at the end of the cylinder and a line from border to border, which only recognizes rotation around the x-axis. The Question is how can i put the lines correctly at the side of the cylinder. ![Solution at the moment](http://i.stack.imgur.com/WvLLX.png) Example of Code:               \documentclass[convert = false, tikz]{standalone}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{textcomp}          \usepackage{amsmath}     \usepackage{tikz-3dplot}          \begin{document}          %Configure here Rotation around x and y axis     \pgfmathsetmacro{\x}{60}     \pgfmathsetmacro{\y}{100}          \tdplotsetmaincoords{\x}{\y}          \begin{tikzpicture}[ tdplot_main_coords]            \coordinate (O) at (0, 0, 0);              \draw[-latex] (O) -- (-8, 0, 0) node[font = \small, pos = 1.1] {\(x\)};         \draw[-latex] (O) -- (0, 6, 0) node[font = \small, pos = 1.1] {\(y\)};         \draw[-latex] (O) -- (0, 0, 6) node[font = \small, pos = 1.1] {\(z\)};              % define size of planes         \pgfmathsetmacro{\planesize}{4}              %plane1         \filldraw[blue, opacity = .2]              (0, 0, 0)               -- (0, \planesize, 0)               -- (0, \planesize, \planesize)               -- (0, 0, \planesize)               -- cycle;                   %Define Plane in which the circles of the cylinder are drawn.         \tdplotgetpolarcoords{0}{1}{0}         \tdplotsetthetaplanecoords{\tdplotresphi}              %\tdplotdrawarc[coordinate system, draw styles]{center}{r}{angle start}{angle end}{label options}{label}         %circle on first plane         \pgfmathsetmacro{\radius}{0.5}         \tdplotdrawarc[tdplot_rotated_coords]{(1,1,0)}{\radius}{0}%         {360}{}{}              %circle on second plane           \tdplotdrawarc[tdplot_rotated_coords]{(1,1,4)}{\radius}{0}%         {360}{}{}              %line from middle to middle         \draw[tdplot_rotated_coords] (1,1,0) -- (1, 1, 4) node[font = \small, pos = 1.1] {};              %First Edge of cylinder          \draw[tdplot_rotated_coords]           ({1+sin(\x)*\radius},           {1+cos(\x)*\radius},0)            --           ({1+sin(\x)*\radius},           {1+cos(\x)*\radius},            4)           node[font = \small, pos = 1.1] {};                   %plane2         \filldraw[blue, opacity = .2]                  (-4, 0, 0)                   -- (-4, \planesize, 0)                   -- (-4, \planesize, \planesize)                   -- (-4, 0, \planesize)                   -- cycle;     \end{tikzpicture}     \end{document}


title: Is there any Word/Writer - LaTeX demonstration document available?

text: I often hear how better the LaTeX is but the comparisons I have found, did not persuade me. Is there something like "showcase document" containing different kind of formatting, formulas etc. available in PDF in versions made from LaTeX and Word/Writer? It would be very useful to have such PDFs, which I could print and visually compare and possibly also show to my boss to see if the difference is so noticeable. I am thinking about creating some of our reports in LYX instead of LO Writer.


title: Common style for global TOC, LOF, LOT and titletoc partial TOCs (with hyperref & caption)

text: I am currently writing my PhD thesis, and I have trouble defining a common style for my global TOC and the partial TOCs generated by titletoc. Basically if you check the following MWE, I like the general style of the global TOC, in particular the fact that hyperref links include the labels. However, I find that the dotted lines in the global TOC are not dense enough, and prefer those of the partial TOCs.               \documentclass[12pt,a4paper]{book}          \usepackage{caption}     \usepackage{titletoc}     \usepackage[colorlinks]{hyperref}     \usepackage{lipsum}          \renewcommand{\cleardoublepage}{\clearpage}          \newcommand{\PartialToc}{\vspace*{0.5pc}\vbox{\bf\large\noindent Chapter contents}\vspace*{0.3pc}\startcontents[chapters]\vspace*{0.3pc}\printcontents[chapters]{p}{1}{}\vspace*{0.3pc}}          \begin{document}          % Custom style for partial TOCs     \titlecontents{psection}[3.6em]{\small\bfseries}{\contentslabel{1.8em}}{}{\mdseries\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{}     \titlecontents{psubsection}[6.0em]{\small}{\contentslabel{2.4em}}{}{\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{}          \tableofcontents     \listoffigures     \listoftables          \chapter{Chapter 1}          \vfill     \lipsum[1-2]     \vfill\PartialToc\clearpage          \section{Section 1}     \lipsum[1]          \begin{figure}[t]         \caption{Figure 1}     \end{figure}          \section{Section 2}     \lipsum[1]     \subsection{Subsection 2.1}     \lipsum[1]     \subsection{Subsection 2.1}     \lipsum[1]     \section{Section 3}     \lipsum[1]          \begin{table}[t]         \caption{Table 1}     \end{table}          \end{document}      Therefore, I tried to increase the density of the dotted lines in the global TOC, by adding the following titletoc style declarations after `\begin{document}`:               \titlecontents{section}[3.8em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}}{\titlerule*[0.25pc]{.}\contentspage}{}     \titlecontents{subsection}[6.2em]{}{\contentslabel{2.9em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}      However, in this case, the hyperref links are changed, which I would like to avoid (no I am not a maniac...). Is there a way to achieve this ? And can this also be used to make the hyperref links in the partial TOCs include the labels ? And as a subsidiary question, how do I assign the same style to entries in the List of Figures and List of Tables ? Thank you for your help


title: Journal Paper Specs

text: I use the `titlesec` package to adjust the section/subsection and font issue:               \documentclass[b5paper, 11pt]{article}      % Use this line for a4               \usepackage[T1]{fontenc}          \usepackage{mathptmx}          \usepackage{titlesec}          \titleformat{\section}[block]       {\fontsize{12}{15}\bfseries\sffamily\filcenter}       {\thesection}       {1em}       {\MakeUppercase}     \titleformat{\subsection}[hang]       {\fontsize{12}{15}\bfseries\sffamily}       {\thesubsection}       {1em}       {}     \titleformat{\subsubsection}[hang]       {\fontsize{12}{15}\bfseries\sffamily}       {\thesubsubsection}       {1em}       {}          \begin{document}     \section{Section one}     \subsection{Subsection one}     \subsubsection{Subsubsection one}     \end{document}      How to change this to achieve: sections : times new roman, hang, bold 12pt subsections : times new roman, hang, italic 12pt


title: pgfplots ybar glued to the y axis

text: My ybars are glued to my yaxis. How can I increase the horizontal space between the axis and the first bar, making them more condensed? I already tried setting x = 5cm for instance, but I just want them closer together. ![enter image description here](http://i.stack.imgur.com/cTlj4.jpg)               \documentclass[fullpage, 12pt, a4paper, doublespacing]{article}          \usepackage{pgfplots}     \usepackage{pgfplotstable}          \definecolor{transfertoserver}{HTML}{D7191C}     \definecolor{database}{HTML}{FDAE61}     \definecolor{transfertoclient}{HTML}{ABDDA4}     \definecolor{rendering}{HTML}{2B83BA}               \begin{document}       \begin{figure}       \centering       \begin{tikzpicture}      \begin{axis}[       ybar=8pt,%=8pt, % configures ‘bar shift’     %          enlargelimits=0.25,     % bar width=12pt,     %  x=6cm,     ylabel={Number of Instances},           ymin=0,     %       legend pos= outer north east,      symbolic x coords={training set, test set},      xtick=data,       nodes near coords,      ]      \addplot[fill=transfertoclient] coordinates {(test set, 35) (training set, 218)};\addlegendentry{Hits}      \addplot[fill=rendering] coordinates {(test set, 5) (training set, 142)};\addlegendentry{Non-hits}      \end{axis}     \end{tikzpicture}     \caption{Class distribution of the split training and test sets.}     \label{fig:bal2}     \end{figure}     \end{document


title: TikZ: how to apply an affine transformation?

text: I would like to draw something like this: ![enter image description here](http://i.stack.imgur.com/DBia7.jpg) The best I can do so far:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \resizebox{0.95\textwidth}{!}{     \begin{tikzpicture}     \newcommand\Square{+(-1,-1) rectangle +(1,1)}     \draw (0,0) rectangle (8,6);\node at (4,0.5) {$I_1$};     \node[label=$p$]  (p) at (3,4) {};     \draw [orange] plot [only marks, mark size=2.5, mark=*] coordinates {(3,4)};     \draw[fill =blue,fill opacity=0.1] (p)  \Square;          \draw (10,0) rectangle (18,6);\node at (14,0.5) {$I_2$};     \node[label=below:$p'$]  (p') at (12.5,2.7) {};     \draw [orange] plot [only marks, mark size=2.5, mark=*] coordinates {(12.5,2.7)};          \draw[thick,->] (p) edge[bend right] (p');     \draw[fill =blue,fill opacity=0.1,rotate=50] (p') \Square;     \end{tikzpicture}}     \end{document}      ![enter image description here](http://i.stack.imgur.com/QQcT6.png) The result is not very satisfactory. Hope somebody can help. Thank you in advance.


title: Shifted hyperlink with includestandalone

text: I have a problem with includestandalone and a tikz-grafic with a hyperref. My MWE: I define a image as picture.tex:               %Save as picture.tex     \documentclass[tikz]{standalone}     \usepackage{hyperref}     \usetikzlibrary{positioning}     % ----------------------------------------------------------------     \begin{document}          \begin{tikzpicture}     \node (problem) {Problem};     \node (ask) [below=of problem] {Ask at \url{http://www.stackexchange.com}};     \node (solution) [below=of ask] {Solution};     \draw[->] (problem) -- (ask) -- (solution);     \end{tikzpicture}     \end{document}      The picture looks fine, the link is correct. Now I include the picture with `includestandalone` in my main document:               \documentclass[paper=a6]{scrartcl}     \usepackage{tikz,standalone}     \usepackage{hyperref}     \usetikzlibrary{positioning}          % ----------------------------------------------------------------     \begin{document}     \includestandalone{picture}     \end{document}     % ----------------------------------------------------------------      The picture looks ok, but the hyperlink is moved to the bottom: ![enter image description here](http://i.stack.imgur.com/Guv0Y.png) Some additional information:   * The a6-option is only used to get a smaller screenshot. It has no influence on the problem.   * The red arrow in the screenshot is not part of the document, it should only show the problem.   * If I use `\input` instead `\includestandalone` the link is correct. But this is not the solution I need. My original picture is large and I scale it with `\includestandalone[width=\textwidth]{picture}`.   * Up to now I use `\usepackage[hidelinks]{hyperref}` to make the wrong link invisible. My question: How can I get the correct position of my hyperlink in an included tikz-picture? * * * In meantime I updated to TeXLive 2013 and the error still exists. My listfile-result:                *File List*     scrartcl.cls    2012/07/29 v3.11b KOMA-Script document class (article)     scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent basics and keyval usage)      scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent basics and keyval usage)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)     tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)     scrsize11pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (11pt)     typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)         tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)          pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)       pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)       pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)      pgfkeys.sty          pgfkeys.code.tex       pgffor.code.tex         tikz.code.tex     standalone.sty    2012/09/15 v1.1b Package to include TeX sub-files with preambles      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     currfile.sty    2013/02/01 v0.7b Provides the file path elements of the current input file     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     filehook.sty    2011/10/12 v0.5d Hooks for input files     filehook-scrlfile.sty    2011/01/03 v0.1 filehook patch for scrlfile package     gincltex.sty    2011/09/04 v0.3 Include external LaTeX files like graphics     svn-prov.sty    2010/04/24 v3.1862 Package Date/Version from SVN Keywords     adjustbox.sty    2012/05/21 v1.0 Adjusting TeX boxes (trim, clip, ...)      adjcalc.sty    2012/05/16 v1.1 Provides advanced setlength with multiple back-ends (calc, etex, pgfmath)     trimclip.sty    2012/05/16 v1.0 Trim and clip general TeX material     collectbox.sty    2012/05/17 v0.4b Collect macro arguments as boxes     tc-pdftex.def    2012/05/13 v1.0 Clipping driver for pdftex     ifoddpage.sty    2011/09/13 v1.0 Conditionals for odd/even page detection     varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages     filemod-expmin.sty    2011/09/19 v1.2 Get and compare file modification times (expandable; minimal)     hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX     hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)     hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)       hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)       ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)      intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)     bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)       bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)     uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)     letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)      hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)     xcolor-patch.sty    2011/01/30 xcolor patch     atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)     atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)     refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)      hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)      auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)       pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)     hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive          url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.      hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX     rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)     supp-pdf.mkii     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section     gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)     myarticle.out     myarticle.out      picture.tex    Graphic file (type tex)      picture.tex    Graphic file (type tex)      ***********      I tested my result with Acrobat Reader and Sumatra (both on windows). Any idea?


title: StrSubstitute not working nicely with pgfplots

text: This question is related to my older question here, but now slightly different. I now have a function that is supposed to take two multivalued arguments. One contains the columns i want to plot. If i escape the dollar signs in my column names as in my previous question, trying to make a legend results in one legend entry containing the whole, comma-separated string. However, trying to do get around this like in the code sample below results in LaTeX complaining that \stripped is an undefined command sequence. What am i getting wrong?               \documentclass{beamer}          \usepackage{xstring}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5}          \def\multiplot#1 of #2{                   \begin{frame}             \begin{tikzpicture}             \begin{axis}[                 title={Title},                 xlabel={Recall},                 ylabel={Precision},                 ymin=0,                 ymax=1,                 legend style={font=\tiny,                     anchor=north,                     yshift=-8ex,                     at={(current axis.south)}},             ]     \foreach \fileRep in {#2} {                 \foreach \colname in {#1} {                 \addplot table[ y =\colname] {\fileRep};         \StrSubstitute{\colname}{$}{\string$}[\stripped]         \addlegendentry{\stripped}         }         }             \end{axis}             \end{tikzpicture}         \end{frame}     }          \begin{document}          \multiplot{org/apache/tools/ant/helper/ProjectHelperImpl$ProjectHandler/results.json, org/apache/tools/ant/taskdefs/Javadoc$SourceFile/results.json} of {reports/report.csv}          \end{document}      Example file:               Recall  org/apache/tools/ant/helper/ProjectHelperImpl$ProjectHandler/results.json   org/apache/tools/ant/taskdefs/Javadoc$SourceFile/results.json     0   0.5 0.6


title: Formatting: Numbering paragraphs of sections

text: I have some problems in writing an article with inequalities. What I want to say: Now, it appears as               Cauchy's Inequality          1. Introduction     2. Theorem          Bernoulli's Inequality          3. Introduction     4. Theorem      **But** , I want to appear as               Cauchy's Inequality          1. Introduction     2. Theorem          Bernoulli's Inequality          1. Introduction     2. Theorem      What can I do? What I use:               \documentclass[a4paper,12pt,fullpage,doublespace]{report}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{mathrsfs}     \usepackage{amsmath}     \usepackage[usenames,dvipsnames]{color}     \usepackage{algorithmic}     \usepackage{algorithm}     \usepackage{hyperref}          \usepackage{variations}     \usepackage[romanian]{babel}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{graphicx}          \newtheorem{theorem}{Teorema}     \newtheorem{lemma}[theorem]{Lem\u a}          \newtheorem{corollary}[theorem]{Corolar}     \newtheorem{proposition}[theorem]{Not\u a}          \theoremstyle{definition}     \newtheorem{definition}[theorem]{Defini\c{t}ia}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Consecin\c t\u a}     \newtheorem{example}[theorem]{Exemplul}     \newtheorem*{acknowledgements}{Observa\c{t}ie}


title: Strange error when compiling in texmakerE

text: Recently I've started getting a weird error in Texmaker I can't understand. To make it worse, it seems to disappear at the slightest change. On the good side, it doesn't prevent compilation. On the bad side, it's awfully annoying. Below is a minimal (not) working example. It seems like a problem with Texmaker parsing compiler output more than anything... am I right? (I've “fixed” it by inserting a line break before the second formula for which xxxxx is a placeholder... still, I would appreciate some input.)               \documentclass{amsart}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \newtheorem{prop}{Proposition}     \DeclareMathOperator{\tp}{{tp}}                    \begin{document}          \begin{prop}     Lorem ipsum.          Consider the natural restriction map $\pi\colon S_{P^2}(M)\to {S_P(M)}^2$ (i.e.\ $xxxxxxxxxxxxxxxxxxxxxx$).          \end{prop}     \end{document}


title: "exsheets" package: How to use "chapter-hook" when using \printsolutions[all]?

text: I'm writing a book which includes exercises spreaded through its chapters. To typeset the exercises I'm using the `exsheets` package. I want to make an appendix with all the solutions listed per chapter (and I've been aware this wasn't possible, according to Exsheets: how do I print the 'solutions' on the same line?). I've seen that the newest version of `exsheets` has a **chapter-hook** option that, according to the manual (found at http://ctan.mirrors.hoobly.com/macros/latex/contrib/exsheets/exsheets_en.pdf.): > [chapter-hook = {code}] Adds "code" to the list of solutions every time > solutions from a new chapter are printed (before the solutions of the > corresponding chapter are printed). The problem is that it's the only mention of **chapter-hook** the author makes, with no particular examples, so I don't even know where to put the option. I've tried with the following:               \chapter{Grouped Exercises I}     \begin{question}         Integrate $\int \cos{x}\ \mathrm{d}x$     \end{question}     \begin{solution}         $\sin{x} + C$     \end{solution}     % ...     % more code here     % ...     \appendix     \chapter{Solutions to exercises}     \printsolutions[all,chapter-hook={Chapter}]      but when compiling with pdfLaTeX, it throws the error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! LaTeX error: "kernel/key-choice-unknown"     !      ! Key 'exsheets/exsheets_print_solutions/chapter-hook' accepts only a fixed     ! set of choices.     !      ! See the LaTeX3 documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.6 \printsolutions[all,chapter-hook={Chapter}]      What to do? How's the correct way of using **chapter-hook** option under these circumstances? Thanks in advance!


title: Command \env already defined

text: This is a follow-up to How to ignore everything in the document environment?. The code below is intended to extract the value of a token that occurs _before_ `\begin{document}`. For some reason, there is a problem with the `\DisablePreamble` macro that I can not figure out. Surprisingly, it seems to have been working in my actual use case, but not when I try to make a MWE (in an attempt to reproduce another problem). File `goo.tex` is an extremely simplified test case as it does not have any preamble so it doesn't need to invoke `\DisablePreamble` \-- and this works. But, in my real use case (as in `foo.tex`), there is a preamble and a complete `document` environment that needs to be ignored, and hence the need for `\DisablePreamble`. The example below produces: > MyToken=goobar > > MyToken=goobar as the `\ExtractMyTokenA` line is commented, but with `\ExtractMyTokenA` uncommented it _should_ yield (note change in second line): > MyToken=goobar > > MyToken=foobar When the call to `\ExtractMyTokenA` is uncommented, this yields: > >     ./TeX-SE.tex:75: LaTeX Error: Command \env already defined. >                 Or name \end... illegal, see p.192 of the manual. >   ## References:   * How to ignore everything in the document environment? ## Notes:   * To get the given MWE to failure you need to uncomment the `\ExtractMyTokenA` line.   * The actual problem is in `\DisablePreamble`, but this MWE seems more complicated than it really is as:      1. I have two temp files `foo.tex` and `goo.tex` as test cases.     2. The macros `\ExtractMyTokenA` and `\ExtractMyTokenA` are pretty much identical: Once calls `\DisablePreamble` and the other does not. ## Code:               \documentclass{article}     \usepackage{environ}          %  This file is ONLY needed once we get past the error message.     %\usepackage{filecontents}% Comment out so as to NOT overwrite foo.tex and goo.tex.     \begin{filecontents*}{foo.tex}         \documentclass{standalone}         \usepackage{MyStandardPackages}         \input{MyStandardSetup}              \MyToken={foobar}%   <----- Only this line should be executed. ALL other lines in foo.tex are to be ignored.              \begin{document}            lots of text here                 \SetSomeVarable{\SomeVar}{Some Value}                 \begin{SomeEnvironment}                lots more stuff here as well            \end{SomeEnvironment}         \end{document}     \end{filecontents*}          % This file does not have a preamble so won't need a call to "\DisablePreamble"     \begin{filecontents*}{goo.tex}         \MyToken={goobar}%   <----- Only this line should be executed. ALL other lines in foo.tex are to be ignored.     \end{filecontents*}          %% ------------------------------     %% Problem is in here somewhere!!  Shows up once we uncomment "\ExtractMyToken{foo}" below.     \newcommand{\DisablePreamble}{%             \renewcommand{\documentclass}[2][]{}%  remove def'n of \documentclass             %% http://tex.stackexchange.com/questions/165258/how-to-ignore-everything-in-the-document-environment             \providecommand{\env@document@save@env}{}% To keep environ happy             \providecommand{\env@document@process}{}%             \RenewEnviron{document}{}% Ignore everything within the "document" environment.             \renewcommand{\usepackage}[2][]{}%      }%          \newtoks{\MyToken}     \newcommand{\FileWithPath}{}%     \newcommand{\ExtractMyTokenA}[1]{% Same as \ExtractMyTokenB, except invokes "\DisablePreamble"          % #1 = File Name with path         \begingroup%             \DisablePreamble%             % -----------             \let\OldInput\input%         Need to redefine \input as the file being read uses             \renewcommand*{\input}[1]{}% \input before \begin{document}.             % -----------             \edef\FileWithPath{#1}%             \OldInput{\FileWithPath}%             \global\MyToken=\expandafter{\the\MyToken}         \endgroup%     }%          \newcommand{\ExtractMyTokenB}[1]{% Same as \ExtractMyTokenA, except "\DisablePreamble" is commented.         % #1 = File Name with path         \begingroup%             %\DisablePreamble% This works great for the case where there is no preamble.             % -----------             \let\OldInput\input%         Need to redefine \input as the file being read uses             \renewcommand*{\input}[1]{}% \input before \begin{document}.             % -----------             \edef\FileWithPath{#1}%             \OldInput{\FileWithPath}%             \global\MyToken=\expandafter{\the\MyToken}         \endgroup%     }%               \begin{document}         \ExtractMyTokenB{goo}%  <----- This does not invoke \DisablePreamble, and works          MyToken=\the\MyToken\par         % ------------         %\ExtractMyTokenA{foo}%   <----- This invokes \DisablePreamble, which fails          MyToken=\the\MyToken\par     \end{document}


title: Publishing to Arxiv with Hyperlinks

text: In addressing this question the first thing to note is that everything works, compiles and displays correctly on my computer. However, when I go to upload my document to arXiv.org sometimes things change. In particular, publishing URLs in a bibliography to the arXiv.org is (apparently) very difficult. Issue 1: Bibliography not showing up at all. Issue 1 Solved: Publishing to Arxiv using Biblatex-Biber Issue 2: Bibliography displays urls outside the border of the document. It doesn't wrap the text of the url in a bibliography item. Again, it works fine on my computer, just not on the website arXiv.org. Issue 2 Solved: Line breaks of long URLs in bibliography? Issue 3: With the setup from the first two issues, I now have a new problem. If a URL wraps to a new line, like this               [5] Author. Title. PhD thesis. Place, May 2011. url: http://aaaaaaaaaaa.a         aaaaaaa/aaaaaaa.aaaaaaaa/aaaaaaa.aaa.aaaaaa.      arXiv.org disables the hyperlink. Again, hyperlinks are not disabled and work perfectly fine on my system. But wrapped urls on arXiv.org no longer have hyperlinks. If a bibliography item looks like               [6] Author. Title. PhD thesis. Place, May 2011. DOI: aaaa.aaa/a.aaa.aa      so that it does not break, the the hyperlink stays intact. How do I solve issue 3? I am surprised that this is not a more common issue, considering the extensive use of the arXiv. MWE: test.TEX               %Document Type     \documentclass[reqno]{amsart}     %Bibliography Commands     \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[style=numeric-comp,firstinits=true,backend=bibtex,%backref=true,     ]{biblatex}     \bibliography{test.bib}     \DeclareFieldFormat[article,book,incollection,phdthesis,misc]{volume}{\mkbibbold{#1}}     \DeclareFieldFormat[article]{publisher}{\textnormal{#1}}     \DeclareFieldFormat[article,book,phdthesis]{title}{\mkbibemph{#1}}     \setcounter{biburlnumpenalty}{7000}     \setcounter{biburllcpenalty}{7000}     \setcounter{biburlucpenalty}{8000}     %Packages     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{mathrsfs}     \usepackage{enumerate}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{graphicx}     \usepackage{tikz,caption}     \usetikzlibrary{arrows,shapes,trees}     \usepackage{verbatim}     \usepackage{url}     \usepackage[hyperindex,breaklinks]{hyperref}     \hypersetup{linkcolor=blue, citecolor=red, colorlinks=true}     \usepackage{array}     \begin{document}     Reference \cite{one} and \cite{two}.      \printbibliography     \end{document}      test.BIB               @ARTICLE{one,     url = {http://www.google.com}}     @Article{two,     url = {http://tex.stackexchange.com/questions/182523/publishing-to-arxiv-with-hyperlinks?noredirect=1#comment420451_182523}}      If you compile this on a local system it works fine. But if you try to publish this to the arXiv, it no longer has a hyperlink for the second item.


title: Emphasise a particular keyword in minted

text: In minted, how do I highlight a particular set of keywords by making them bold. Say for example consider the MWE,               \documentclass[a4paper , 12pt]{article}     \usepackage{minted}     \usemintedstyle{manni}     \begin{document}     \begin{minted}{java}     class Test     {         public static void main(String args[])         {             System.out.println("Hello World");         }     }     \end{minted}     \end{document}       The above generates this:   ![enter image description here](http://i.stack.imgur.com/Zwy6k.png)   Now, whenever I use the keyword `class`, it should be in bold. How do I do that?


title: Trouble Displaying Listings Package

text: I will show the settings of the `listings package`, like this MWE:               \documentclass{article}     \usepackage{xcolor}     \usepackage{listings}     \lstset{         backgroundcolor=\color{yellow!10},        basicstyle=\ttfamily\footnotesize,        breakatwhitespace=false,        breaklines=true,        captionpos=b,        commentstyle=\color{green},        deletekeywords={...},        escapeinside={\%*}{*)},        frame=leftline,        keepspaces=true,        keywordstyle=\color{blue},        language={[LaTeX]{TeX}},        morekeywords={documentclass,document,book,article,usepackage,begin,end,newcommand,renewcommand,table,tabular,figure,toprule,midrule,bottomrule},        numbers=left,        numbersep=5pt,        numberstyle=\ttfamily\color{blue},        rulecolor=\color{blue},        showlines=true,        showspaces=false,        showstringspaces=false,        showtabs=false,        stepnumber=1,        stringstyle=\color{blue},        tabsize=2,        title=\lstname     }     \begin{document}     \begin{lstlisting}[caption=Listings Package Setting]     \lstset{          backgroundcolor=\color{yellow!10},         basicstyle=\ttfamily\footnotesize,         breakatwhitespace=false,         breaklines=true,         captionpos=b,         commentstyle=\color{green},         deletekeywords={...},         escapeinside={\%*}{*)},         frame=leftline,         keepspaces=true,         keywordstyle=\color{blue},         language={[LaTeX]{TeX}},         morekeywords={documentclass,document,book,article,usepackage,begin,end,newcommand,renewcommand,table,tabular,figure,toprule,midrule,bottomrule},         numbers=left,         numbersep=5pt,         numberstyle=\ttfamily\color{blue},         rulecolor=\color{blue},         showlines=true,         showspaces=false,         showstringspaces=false,         showtabs=false,         stepnumber=1,         stringstyle=\color{blue},         tabsize=2,         title=\lstname     }     \end{lstlisting}     \end{document}      but does not show what I want ![listing trouble](http://i.stack.imgur.com/acqdw.jpg)


title: All blocks of beamerposter should be of same height

text: I will greatly appreciate your help with this question. I use `beamerposter` and want all the blocks (across various columns) to be of the same height (= max height of among all other blocks). I came across your solution here: How to modify columns/column environments so they resize automatically to the largest column ? However, in case of `beamerposter`, blocks can be located in different columns. And this trick of placing blocks inside columns and count the height does not work here. I need somehow to fetch all blocks of all columns of the poster and compute max height (and set each block height to this value, maybe a certain parameter for blocks ?). I imagine there should be a way to re-use a solution from here: How to modify columns/column environments so they resize automatically to the largest column ? by nesting blocks into special dummy columns to count them and to adjust their height. I tried to play around this idea but failed in my tryings. Can you please suggest a solution here? I will greatly appreciate your help with this question. Thank you / John


title: In chemfig, grouping with \color ineffective, unlike \textcolor

text: Some strange behaviour which contradicts the documentation was encountered when creating a figure of 5-cafeoylquinic acid with `chemfig`. It is stated in the manual that > The atoms are displayed in tikz nodes which behaves like boxes of TeX and it > is as if these atoms were put in a group. Therefore, the color change > remains local to the atom. An example is given why writing `O\color{red}H` doesn't work and why `O{\color{red}H}` should be used instead. A remark says, > The same effect can be obtained with \textcolor. The following code yields the desired output (Win7 TeXLive 2013 with chemfig 1.0g, rev. 32270):               \chemfig{         [:30]HO-*6(-=-(-=[::-60]-[::60](=[2]O)-[:-30]{\color{red}O}>         *6(--(([6]<OH)-(-[:30]OH)=[6]         \textcolor{red}{O}         )--(<:OH)-(<HO)-)         )=-(-HO)=)         }      ![5-cafeoylquinic acid](http://i.stack.imgur.com/bSR7F.png) However, when I try to invoke an equivalent colouring with simple `{\color{red}O}`, something odd occurs (line 4):               \chemfig{         [:30]HO-*6(-=-(-=[::-60]-[::60](=[2]O)-[:-30]{\color{red}O}>         *6(--(([6]<OH)-(-[:30]OH)=[6]         {\color{red}O}         )--(<:OH)-(<HO)-)         )=-(-HO)=)         }      ![5-cafeoylquinic acid with misplaced O](http://i.stack.imgur.com/avbGH.png) It had worked with the middle “O” but failed with the last one! Why does the presumably equivalent function act the ape?


title: A problem with vertical positioning of `multicols`

text: In my previous question, I asked about a problem with vertical alignment at the bottom of the page; the solution (provided by egreg) was simple and obvious. However, here is a less-minimal example (i.e., one closer to my real problem), including `multicols` environment. The problem (again) is that even a _really_ infinitely stretchable glue won't help move the two-column text down, so that its bottom is aligned with other pages. Any hints?               \documentclass[12pt]{article}          \usepackage{vgrid}% here only to help visualize the problem     \usepackage{multicol}     \setlength{\multicolsep}{0pt}     \usepackage[height=11\baselineskip,paperheight=20\baselineskip]{geometry}     \usepackage{lipsum}          \begin{document}     \flushbottom     \lipsum[1-2]          \vskip 0pt plus 1filll     {\begin{multicols}{2}\footnotesize     \lipsum[2-3]     \par\end{multicols}}          \end{document}


title: Adjust box around hyperref footnote links

text: Is it possible to adjust the size of the box around the footnote links produced by `hyperref`? Specifically, I would like to move the base of the box closer to the base of the object inside.               \documentclass[12pt]{article}     \usepackage{hyperref}     \begin{document}     The quick brown fox jumps over the lazy dog\footnote{and lands on a spike}.     \end{document}      ![footnote link](http://i.stack.imgur.com/92gO8.png)


title: Non-invasive replacement for \fbox?

text: I am trying to create a macro that improves on `\fbox` by working correctly in all cases and by being minimally invasive with respect to padding. What I've got so far works fairly well, but I'm having trouble measuring text width, height, and depth in certain cases. My question is _How do I calculate these correctly?_ **Why I don't like \fbox:**   1. Notice below how `\fbox` gets the bounding boxes correct on the ‘,’ and the ‘l’, but completely messes up the fraction size when invoked as `$\frac{\fbox{1}}{\fbox{2}}$` and the superscript size when invoked as `$x^{\fbox{2}}$`.   2. `\fbox` draws a rule _around_ the bounding box rather than inside it. Thus, no matter how thin the rule, it still alters the dimensions of the text being boxed. In other words, `\fbox` is not minimally invasive. Below, the padding and line thickness are set with `\setlength\fboxsep{0pt}` and `\setlength\fboxrule{0.001pt}`. Setting `\fboxrule` to `0pt` causes the rule to disappear altogether. ![\\fbox hello world](http://i.stack.imgur.com/sOI8o.png) **First attempt at a non-invasive box (using \vrule):** My first attempt used a `\vrule`. This was good, but it obscured text when the bounding box overlapped another character, for example the ‘r’ below. Worse yet, I didn't see how I could draw a dark rule around the box. So I threw out that idea. ![\\vrule hello world](http://i.stack.imgur.com/EzTU5.png) **Second attempt (using TikZ):** Next I used TikZ to draw a translucent filled box. The edge is not a stroked path around the box but rather is four very thin filled rectangles _inside_ the bounding box. ![\\fillbox hello world](http://i.stack.imgur.com/I6aPJ.png) Now this is getting somewhere. The problem, however, is in how I’m measuring the width, height, and depth of the bounding box. I'm using `\settowidth`, `\settoheight`, and `\settodepth` and giving these the value `#1` passed to the macro. This approach works great for regular text, but once something is in a superscript, subscript, a fraction, or a stacked relation—or in any other font or size for any reason—it breaks down. **Problems:** As you can see, the widths, heights, and depths of certain elements below have been calculated incorrectly. The most egregious of is the `\cdot`, whose bounding box appears to its left because my macro doesn't know that it is a binary relational operator needing extra space. I'm not sure if that is fixable, but is there at least some way to fix the superscripts and subscripts? Because although `$v_{\fillbox{x}}$` comes out with undisturbed spacing, it's measuring the size of `x`’s bounding box based on `#1` being `x` (normal size and style) and not `_x` (subscripted math size and style). ![\\fillbox code](http://i.stack.imgur.com/6Xviv.png) Finally, why does the stacked relation disturb the horizontal spacing? **Minimal working example:**               \documentclass{article}          \usepackage{tikz}          \makeatletter     \newlength\fillbox@height%     \newlength\fillbox@depth%     \newlength\fillbox@width%     \newcommand{\fillbox}[1]{%       \ifmmode%         \settoheight{\fillbox@height}{$#1$}%         \settodepth{\fillbox@depth}{$#1$}%         \settowidth{\fillbox@width}{$#1$}%       \else%         \settoheight{\fillbox@height}{#1}%         \settodepth{\fillbox@depth}{#1}%         \settowidth{\fillbox@width}{#1}%       \fi%       \raisebox{-\fillbox@depth}{%         \begin{tikzpicture}[scale=1]         \pgfsetfillcolor{yellow!90!red}         \pgfsetfillopacity{0.5}         \pgfsetrectcap         \fill (0,-\fillbox@depth) rectangle (\fillbox@width,\fillbox@height);         \pgfsetfillcolor{yellow!50!black}         \pgfsetfillopacity{1}         \fill (0,-\fillbox@depth)               rectangle (\fillbox@width,-\fillbox@depth+.1pt);         \fill (0,\fillbox@height)               rectangle (\fillbox@width,\fillbox@height-.1pt);         \fill (0,-\fillbox@depth)               rectangle (.1pt,\fillbox@height);         \fill (\fillbox@width,-\fillbox@depth)               rectangle (\fillbox@width-.1pt,\fillbox@height);         \end{tikzpicture}%         \kern-\fillbox@width%       }%       #1%     }     \makeatother          \begin{document}          \vskip1em     $\fillbox{p}_{\fillbox{x}}       \mathrel{\stackrel{\fillbox{_{~+}}}{\fillbox{\leftarrow}}}       \fillbox{(}\fillbox{\frac{\fillbox{1}}{\fillbox{2}}}\fillbox{\cdot}       \fillbox{a}_{\fillbox{x}}\fillbox{\cdot}%       \fillbox{\Delta}\fillbox{t}^{\fillbox{2}}\fillbox{)} \fillbox{+}       \fillbox{(}\fillbox{v}_{\fillbox{x}}\fillbox{\cdot}%       \fillbox{\Delta}\fillbox{t}\fillbox{)}$\fillbox{;}\par     $\fillbox{v}_{\fillbox{x}}       \mathrel{\stackrel{\fillbox{_{~+}}}{\fillbox{\leftarrow}}}       \fillbox{a}_{\fillbox{x}}\fillbox{\cdot}%       \fillbox{\Delta}\fillbox{t}$\fillbox{;}\par          \vskip1em     $p_x \mathrel{\stackrel{_{~+}}{\leftarrow}}       (\frac{1}{2}\cdot a_x\cdot\Delta t^2) + (v_x\cdot\Delta t)$;\par     $v_x \mathrel{\stackrel{_{~+}}{\leftarrow}} a_x\cdot\Delta t$;\par          \end{document}      _(Note: I didn't tag this question with`tikz` because even though it uses TikZ, the question is really about spacing and boxing; TikZ just happens to be used.)_


title: Can I license my package under Creative Commons

text: A while ago I made a package in order to generate nice theroem boxes for the redaction of some lecture notes I made for my school (voluntarily, as a student). Today I realized that my school were using this package everywhere and without my permission. I would like to license this package using Creative Commons (I'm very happy to let everyone use my package, but not without my permission, especcially for what they are doing with it). T* _he problem is that my package uses some other packages_ *, like xkeyval, ifthen or tikz. Most of them are under LPPL, and **I don't know if I can license my work with my conditions knowing that it uses other pieces under specific licensing**... I hope that my question is clear : I'm not really fluent in English. Thank you, Flyerjet


title: Where can I find the old tutorial.tex from csquotes package?

text: I was researching a `csquotes` problem and I came across a reference to `tutorial.tex`. The file is no longer included in `csquotes` and I can not find any reference to the removal in the `csquotes` changelog. Where can I find `tutorial.tex`?


title: align list of symbols with dash

text: I'm trying to make a list of symbols and I have something like this               P --- pressure          eta --- viscosity          lambda(P,T) --- thermal conductivity      ... I need to align this list with dash symbol. I tried to make it with `nomencl` package and tabbing but it didn't help me.


title: Resorting the *.bib file as appeared in *.tex and rewriting to a new *bib file (biblatex)

text: I have quite a huge database of citations, but not all of them are included in the document. And of course they are not ordered by appearance in the text, because sometimes I have to go back to some earlier part and include more citations. In our work group it is common practice to share the citation libraries with each other, once the thesis is finished. Since the `bibtex` format is quite common amongst many scientific journals I would like to include the bibliography as a digital copy. Hence I need to resort the whole `*.bib` file and remove citations unnecessary. As suggested I have looked on the several possibilities mentioned in How to split all BibTeX referenced entries from a big BibTeX database to a copy? Unfortunately those work only for the bibtex case. I suppose it does have to do something with how the literature is cited: Bibtex:               \citation{Schroedinger1926}      Biblatex:               \abx@aux@cite{Schroedinger1926}      That way neither BibTool nor Jabref do the job. I am currently trying the `bibtex2html` approach, but that does not compile. One thing that I probably should mention is that I am using biber as a backend. So, the basic question is how can I get the same result with the above combination for biber+biblatex. I could change those commands by hand, but I really do not want to mess around with automatically written files. ( I could do it with `grep` and `sed` but I would rather save the pain.)


title: Is there any possibility of decreasing extra space before the equation when line nearly breaks in the following?

text: \documentclass[11pt,a4paper]{article}     \usepackage{blindtext}     \usepackage{amsmath}          \begin{document}     Preliminary Theorem 1.1.2. If $(\lambda_1,...,\lambda_n)$, $(\mu_1,...,\mu_n)$,      and $(k_1,...,k_n)$ are arrangements of $(1,...,n),$ then \begin{flalign*}     &\epsilon\bordermatrix{&\cr&\lambda_1,...,\lambda_n \cr&\mu_1,...,\mu_n      \cr}=\epsilon\bordermatrix{&\cr&\lambda_{k_1},...,\lambda_{k_1} \cr&\mu_{k_1},...,\mu_n \cr}. \end{flalign*}     \end{document}


title: Enumitem: using the resume command in enumerate

text: \documentclass[11pt, letter]{article}     \usepackage{enumitem}     \begin{document}     \begin{enumerate}[label = \arabic*]       \item       \item     \end{enumerate}     \begin{enumerate}[resume]       \item       \item     \end{enumerate}     \end{document}      ![enter image description here](http://i.stack.imgur.com/jmsll.png) Why is `resume` adding `.` now? If I could, I would like to add `.` to the first enumerate too but isn't `resume` supposed to follow suit exactly? So I also need `\arabic*.` for the period with the first list.


title: I can not change the mode or submode of the current document in WinEdt 8

text: WinEdt 8 adds the submode UNIX to the current document. I can not delete it in Document Setting. Why does WinEdt 8 do so?


title: Remove indent of paragraph in fullwidth and add line skip with tufte-latex

text: The partial answer is here - Remove indent of paragraph and add line skip with tufte-latex It does not work on fullwidth text. How to achieve that?               \documentclass[nols,symmetric,justified,marginals=raggedouter]{tufte-book} % Use the tufte-book class which in turn uses the tufte-common class          \begin{document}               \bigskip     \begin{fullwidth}     The design of the front matter in Tufte's books varies slightly from the traditional design of front matter. First, the pages in front matter are traditionally numbered with lowercase roman numerals ( i, ii, iii, iv,). Second, the front matter page numbering sequence is usually separate from the main matter page numbering. That is, the page numbers restart at 1 when the main matter begins. In contrast, Tufte has enumerated his pages with arabic numerals that share the same page counting sequence as the main matter.          There are also some variations in design across Tufte's four books. The page opposite the full title page (labeled ``frontispiece'' in the above table) has different content in each of the books. I          The dedication appears on page~6 in age of the introduction.          None of the page numbers (folios) ofedication page.     \end{fullwidth}               \end{document}


title: How to fix these MathML generated code by Tex4ht, or change Latex code to bypass the problem

text:
**updated** : Added the MathML code in source form at the bottom of this, as requested. I am now configuring tex4ht to generate MathML instead of .png for the math. Then MathJax is loaded for final display. I found 3 problems (so far) with the MathML code generated by tex4ht. The first one, `\pm` (plus or minus sign) generates wrong mathml code, the workaround I just found is to use `\mp` (minus or plus) instead (but I prefer to use `\pm` as it is more common). For some reason `\mp` works while `\pm` does not. The third problem (dot) also have a good work around in Latex which I can use. The second problem does not have work around in Latex code so far. (The extra large size of the summation sign) So I need some help in what to do configure tex4ht or Mathml to avoid this problem, at least for case (2), as the others I have a work around for now. But I prefer to use `\pm` for case (1). I am on Linux, using TL 2013. Please assume I am a newbie when giving any instructions on what to do. Below I show screen shot of the math generated by MathML with the pdflatex output next to it, and the latex code. Below that is the MathML code for each case. These cases are numbered 1 to 3. Case (2) (the big summation) has a MathML workaround, which is to remove `<mo mathsize="big">`, however, I do not know how to tell htlatex about this, or where to configure this change, or where to change things in TL installation to do this change. I can't ofcourse edit the HTML file each time I build it to fix mathml by hand. I have hundreds or thousands of small html files that I build from Latex. ![enter image description here](http://i.stack.imgur.com/GhW9G.png) The MWE follows (collection_of_problems.tex)               \documentclass[12pt]{report}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}          %(1)     \[     y=\pm\sqrt{x}     \]          \[      y=\mp\sqrt{x}  %work around, but I prefer (1) not this one.     \]          % (2)     \[     k= \sum_{i}^{2} m_{i}(x)     \]          %bad dot (3)          \[     \overset{\rightarrow}{a} = \overset{\centerdot}{\omega}_{2}     \]          \[     \overset{\rightarrow}{a} = \overset{\cdot}{\omega}_{2}     \]          \[     \overset{\rightarrow}{a} = \overset{\bullet}{\omega}_{2}     \]     \end{document}      The command to use to build the htm file                htlatex  collection_of_problems.tex "my,htm"      Where my.cfg file, in the same folder, is the following:               \Preamble{mathml,ext=htm}     \Configure{VERSION}{}       \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}       \Configure{HTML}{\HCode{\Hnewline}}{\HCode{\Hnewline}}       \Configure{@HEAD}{}       \Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}       \Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht       (http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}       \Configure{@HEAD}{\HCode{<link                rel="stylesheet" type="text/css"                href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}       \Configure{@HEAD}{\HCode{\Hnewline}}       \Configure{@HEAD}{\HCode{\Hnewline}}          \begin{document}     \EndPreamble      When the .htm is created, simply double click on it and assuming you are connected to the internet, MathJax will be loaded in your browser and you'll see the problem as shown in the screen shots above. To build the pdf file, `pdflatex file.tex` ofcourse. ps. strange why `\mp` works but not `\pm`. Here is the code for `\pm` ![enter image description here](http://i.stack.imgur.com/4JP0z.png) **Updated:** MathML code. Case (1)
<math xmlns="http://www.w3.org/1998/Math/MathML"       display="block" >     <mrow>     <mi>y</mi> <mo      class="MathClass-rel">=</mo> <mo      class="MathClass-bin">±</mo><msqrt><mrow><mi>x</mi></mrow></msqrt>     </mrow></math>      case (2)

<math xmlns="http://www.w3.org/1998/Math/MathML"  display="block" >     <mrow>     <mi>k</mi> <mo class="MathClass-rel">=</mo><munderover accentunder="false" accent="false">     <mrow><mo mathsize="big"> ∑</mo>     </mrow><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></munderover><msub><mrow>     <mi>m</mi></mrow><mrow><mi>i</mi></mrow></msub><mrow >     <mo class="MathClass-open">(</mo><mrow><mi>x</mi></mrow>     <mo class="MathClass-close">)</mo></mrow></mrow></math>      case (3)
<math      xmlns="http://www.w3.org/1998/Math/MathML"       display="block" ><mrow>     <mover class="overset"><mrow><mi>a</mi></mrow><mrow>      <mo class="MathClass-rel">→</mo></mrow></mover>      <mo class="MathClass-rel">=</mo><msub><mrow> <mover class="overset">     <mrow><mi>ω</mi></mrow><mrow>      <mo class="MathClass-bin">▪</mo></mrow></mover></mrow><mrow><mn>2</mn></mrow></msub>     </mrow></math>
      **update 2:** A workaround is found, thanks to @Khaled Hosny in the comments below, which is to use UTF-8. Changing the tex4ht command to change the default, fixed the problem with `\pm`. This is the new command to use.               htlatex foo.tex "my,htm,charset=utf-8" " -cunihtf -utf8"      Only problem left, is the large size of summation. Case (2) above. Changing the default renderer to MathML from the default HTML-CSS fixed this as well. But I am not sure now if this is something I can control and change from my end using MathJax setting, or if this is something on the client browser side only, so I can let it go.


title: Error 32512 (driver return code)

text: I'm using XeTeX, Version 3.1415926-2.4-0.9998 I'm creating tex file using PHP and storing it on linux server. [ex: abc.tex] Then creating .sh file with command to execute *.tex file using xelatex [ex: abc.sh] sample content of abc.sh /usr/local/texlive/2012/bin/x86_64-linux/xelatex abc.tex If i execute abc.sh on linux command prompt, required PDF is getting generated. But, If i execute abc.sh from apache webserver via php , it's giving error as :               Error 32512 (driver return code) generating output;     file abc.pdf may not be valid.      [Note: There is NO PDF File generated] Can you please suggest any pointers to solve this?


title: What's the difference between the various methods for producing for loops?

text: I've been wondering about the various methods available for looping over a comma separated list and the like. In particular, I was wondering about their various strengths and weaknesses. In other words, I was wondering about such things as the following (but not solely limited to this list):   1. whether or not they're expandable,    2. how they handle empty items,    3. how they handle extraneous leading and trailing spaces   4. whether you can use `\def`/`\edef` or need to use `\gdef`/`\xdef` to save information from within the loop for later use. In no particular order, here's a list of looping methods I'm familiar with. In the following list `\current@item` represents a macro, taking one argument, for formatting the current item in iteration. Using commands from the `2ekernal`:               %% \@for     \def\@for@myloop#1{%%       \@for \x:=#1 \do{\current@item \x}}          %% \@tfor (not a comma separated list--probably shouldn't be here)     \def\@tfor@myloop#1{%%       \@tfor \x:=#1 \do{\if,\x\relax\else\current@item \x\fi}}      Using `etoolbox` package               %% `etoolbox`:  need to be careful whether passed a macro:     %%  in that case expansion may be necessary to that the      %%  delimiters are visible to `\forcsvlist`     \def\etoolbox@myloop#1{%%       \expandafter\forcsvlist       \expandafter\current@item       \expandafter{#1}}      Using `pgffor` package               %% pgffor     \def\pgffor@myloop#1{%%       \foreach \x in {#1} {\current@item \x}}      A homebrew method:               %% version a la `ae`     \def\@ae@myloop#1,#2\@nil{%%       \current@item{#1}%%       \expandafter\ifx\expandafter\relax\detokenize{#2}\relax\else         \@ae@myloop#2\@nil        \fi     }     \def\ae@myloop#1{%%       \@ae@myloop#1,\@nil     }      Then there are also the various `expl3` methods such as (there are quite a few, so this is hardly exhaustive):               \tl_map_inline:nn     \tl_map_function:Nn     \clist_map_inline:Nn     \seq_map_inline:Nn      Here is a MWE illustrating the results of each of these (including one LaTeX3 version):               \documentclass{article}     \usepackage[margin=0.5in,paperheight=15in]{geometry}     \usepackage{xparse}     \usepackage{etoolbox}     \usepackage{pgffor}     \usepackage{enumitem}     \makeatletter          \def\my@item@count{0}     \def\step@my@counter{\xdef\my@item@count{\number\numexpr\my@item@count+1\relax}}     %% \rules to emphasize how spaces are seen and treated!     \def\current@item#1{\step@my@counter\item \rule{0.4pt}{2ex}#1\rule{0.4pt}{2ex}}          %% `etoolbox`     \def\etoolbox@myloop#1{%%       \forcsvlist \current@item {#1}}       %% but if passed a macro, then it  first needs to be expanded so the delimiters are visible to `\forcsvlist`.  You'll need to write       %% \expandafter\forcsvlist \expandafter\current@item \expandafter{#1}}          %% \@for     \def\@for@myloop#1{%%       \@for \x:=#1 \do{\current@item \x}}          %% \@tfor     \def\@tfor@myloop#1{%%       \@tfor \x:=#1 \do{\current@item \x}}          %% pgffor     \def\pgffor@myloop#1{%%       \foreach \x in {#1} {\current@item \x}}          %% version a la `ae`     \def\@ae@myloop#1,#2\@nil{%%       \current@item{#1}%%       \expandafter\ifx\expandafter\relax\detokenize{#2}\relax\else         \@ae@myloop#2\@nil        \fi     }     \def\ae@myloop#1{%%       \@ae@myloop#1,\@nil     }          \def\listoffruit#1#2#3{%%       \def\my@item@count{0}%%       \noindent       List of type \texttt{#1}: \parbox[t]{3in}{\raggedright#3}       \begin{itemize}[topsep=4pt,itemsep=2pt]         \csname#1@myloop\endcsname{#2}%%       \end{itemize}       Total number of bulleted items: \my@item@count       \par \vspace{2ex}\hrule\par \vspace{2ex}       }          \ExplSyntaxOn     \NewDocumentCommand{\expl@myloop}{ m }     {       \clist_map_inline:nn{#1}{\current@item {##1}}     }     \ExplSyntaxOff          \makeatother     \def\apples{apples}     \def\bananas{bananas}     \def\cherries{cherries}          \begin{document}          \listoffruit{etoolbox}{apples,, oranges, bananas ,cherries}{Ignores leading spaces and empty items. Trailing spaces not ignored.}          \listoffruit{@for}{apples,, oranges, bananas ,cherries}{Empty lines and trailing or leading spaces not ignored.  Something goes on with last item in list.}          \listoffruit{@tfor}{\apples,{} {oranges}\bananas\cherries}{Spaces ignored, all other token respected, bracketed tokens treated as one.}          \listoffruit{pgffor}{apples,, oranges, bananas ,cherries}{Ignores leading spaces, empty items and trailing spaces not ignored.}          \listoffruit{ae}{apples,, oranges, bananas ,cherries}{Leading or trailing spaces not ignored.  Empty items not ignored.}          \listoffruit{expl}{apples,, oranges, bananas ,cherries}{Trailing or leading spaces ignored.   Empty items ignored.}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Ns2w5.png) Issues I'm aware of:   * I believe `\@for` is not expandable,    * `\cslist_map_inline:nn` is expandable but with limitations: i.e., it is not expandable in an `f`-type argument.   * `pgffor`'s `\foreach` loop in executed within a group. So you need to use `\gdef` or `\xdeg` to save information from within the group for later use. I've not fully explored which others of the loops presented here have a similar _short-coming_ (not sure that's the right choice of word). I have no idea whether `\foreach` is expandable or not.   * Some methods handle their lists rather nicely whether passed explicitly or implicitly via a macro. For example, `pgffor`'s `\foreach` knows what do to with a list passed via a macro. `etoolbox`'s `\forcsvlist` needs that macro to first be expanded: hence the reason my first illustration of a `\forcslist` is as complicated as it is. So what I'm interested in here is:   1. Responses which address the strengths and weaknesses of the different approaches presented here as itemized at the beginning of this post, but not necessarily limited to those suggestions since I may be unaware of other important issues.. For example, I'm not really sure which are expandable.   2. Responses which introduce other methods for iterating over a list of items along with their known weaknesses and strengths.   3. Responses which can illustrate realistic examples for which one would want to use such a loop in an expandable context   4. Reponses which illustrate how one can save information gathered from within the group for later use.


title: How to compare the beginning of an argument

text: I need to write a simple function in tex (ConTeXt more precisely, but I suspect that does not matter here), that does one thing when the first argument #1 begins with a particular string, and does something else when it does not. Like (in pseudo code):               \def\somefunction#1{     if (#1.beginsWith"fig:")       do this     else       do that     endif     }      How can that be done:


title: Some changes to the article class layout

text: 1. I am using `amsthm` but do not want **THEOREM 1** to be boldface.   2. I want even numbered pages to have the author's name and odd numbered ones to have the title.   3. Also, while using `authblk` package how do I get author affiliations on the last page after references and on the right side when I have a co-author and both of us have different affiliations? Or should I be replacing `authblk` with some other package?


title: change font size of particular column

text: How to change the font size of a particular column using `pgfplotstable`? I only found how to change the font size of the whole table with e.g. `font=\small`. edit: the column header may be changed as well, although it would be nice to have this as an option.


title: Remove issn/doi/url when using plainnat and natbib

text: I am using `natbib` and the `plainnat` style for the references. I would like to know how can I remove the ISSN, DOI and URL from the references without deleting them in the .bib file. I have seen some solutions in other posts but using `biblatex`; is there any solution for using `natbib`? This is the code I am using:               \documentclass[12pt,a4paper]{article}     \usepackage[english]{babel}     \usepackage[square,sort&compress,comma,numbers]{natbib}     \author{Me}     \title{Article}     \begin{document}     \maketitle     \begin{abstract}         This article...     \end{abstract}     \section{Intro}         According to \citet{John2003} ...     \bibliographystyle{plainnat}     \bibliography{bibl}     \end{document}      `bibl` contains an entry with the keycode John2003


title: intersection coordinate systems

text: I'm trying to write a \newcommand to draw a little stick-man in PGF. It isn't finished yet, but right now, it looks like this:               \newcommand{\man}[1] {     % #1 : The position of the head of the stick man       \coordinate (X) at (#1);       \coordinate (Y) at ($(#1)+(0,1mm)$);       \draw [black,fill=green,thin] ($(#1)+(290:2mm)$) arc (-70:240:2mm)--++(-3mm,0)--++(0,-1mm)       --++(3mm,0)--++(0,-3mm)--++(225:3mm)--++(315:1mm)coordinate(A)--++(45:1mm)coordinate(B)--       (intersection of A--B and X--Y)--       (#1)--cycle;      }      The function input #1 is the center of his head. The path starts off on the right side of his head, draws an arc (his head) to the left side, then traces his left arm, and the left side of his body. When it comes to his leg, I switch to using polar coordinates, because I want his leg to extend out at 45 degrees. The question arises on the way back from drawing his left leg. I want his crotch (for lack of a better word) to be directly below the center of his head. So I'm trying to find a way to define the point that lies on the intersection of the vertical line through (#1) and the line at 45 degrees through (A). Right now I have to define coordinates (X) and (Y) ahead of time, which define the vertical line through the center of his head. and I have to define (A) and (B) on the path to define the line at 45 degrees along his leg. I can then use (intersection of A--B and X--Y). My question is, can I do this more elegantly without needing to define these extraneous coordinates (X), (Y) and (B)? I tried things like               (intersection of A--$A+(45:1mm)$ and X--$X+(0,1mm)$)      but that didn't work. As per Peter's comment, here is a minimum working example:               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{calc}     \newcommand{\man}[1] {     % #1 : The position of the head of the stick man       \coordinate (X) at (#1);       \coordinate (Y) at ($(#1)+(0,1mm)$);       \draw [black,fill=green,thin] ($(#1)+(290:2mm)$) arc (-70:240:2mm)--++(-3mm,0)--++(0,-1mm)       --++(3mm,0)--++(0,-3mm)--++(225:3mm)--++(315:1mm)coordinate(A)--++(45:1mm)coordinate(B)--       (intersection of A--B and X--Y)--       (#1)--cycle;      }          \begin{document}     \tikz{\man{3,3}}     \end{document}


title: Is \AfterEndPreamble really executing code after any \AtBeginDocument code?

text: The `babel` package loads the (last) language at begin document, thanks to an `\AtBeginDocument` command (lines 12.256 and 12.257 of its kernel):               \AtBeginDocument{%     \expandafter\selectlanguage\expandafter{\bbl@main@language}}      On the other hand, the `\AfterEndPreamble` command from the `etoolbox` package is supposed to execute "code [...] at the very end of `\begin{document}`, after any `\AtBeginDocument` code." But it seems not to be the case in the following MCE:               \documentclass[french]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{etoolbox}     \usepackage{babel}     %     \AfterEndPreamble{%       \title{Quelle crise?}%     }     %     \begin{document}     \maketitle     \end{document}      Indeed, if executed after the french language would be loaded, `\title{Quelle crise?}` should give a thin space before the "?" as it is the case in the following MCE:               \documentclass[french]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{etoolbox}     \usepackage{babel}     \begin{document}     \title{Quelle crise?}     \maketitle     \end{document}


title: Change alignment and colour of quote in Moderncv

text: I'm using `ModernCV` to create my resume with the `casual` style : example. I wanted to change the alignment (to the left) and colour (to dark grey) of the quote section (where I intend to write a few lines about myself). I'm using Texmaker as the editor. I'm new to Latex, so somehow I can't get the right syntax to make this change. Also, should I change the .tex or the moderncvstylecasual.sty file? Appreciate any help.


title: psgraph with y-axis on left and right of graph and axis labels

text: I'm attempting to plot two quantities on one graph each with their own vertical axis. I've got as far as the MWE below but am stuck on two problems.   1. Can I make the right hand axis have the same line style as the left axis (I can probably fudge it with `\psline` but I'd like to know if there is a 'proper' way)   2. Can I make the right hand vertical axis have an axis label like the left but with "Current [A]" (without quotes) centred on the vertical position of the axis and `0.3in` to the right of the axis line. The data files are available from `capv.txt`, and `capi.txt`. The output from the code below look like ![enter image description here](http://i.stack.imgur.com/cL3vU.jpg) I have not provided 'real' data. When looking at the data given, one might wonder why I want two vertical axes. The two data sets I'm intending to plot have widely differing peak magnitudes and different units, but are related in time (x axis) so I find plotting them in this way desirable.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{pstricks,pst-plot,pstricks-add}          \begin{document}          \begin{pspicture}(1,1)          \readdata{\voltage}{capv.txt}     \readdata{\current}{capi.txt}     \psset{llx=-1cm,lly=-1cm}          \psset{xAxisLabel={Time [ms]}, xAxisLabelPos={c,-0.3in}, yAxisLabel={Voltage [V]}, yAxisLabelPos={-0.3in,c}}          \begin{psgraph}[axesstyle=axes,xticksize=0 6,yticksize=0 20,subticks=0,ylabelFactor=,Dx=5,dy=1,Dy=1,Oy=-3](0,-3)(20,3){6cm}{3cm}          \pstScalePoints(1e4,1e0){}{}     \listplot[linecolor=blue,linewidth=1pt,showpoints=false]{\voltage}          \psaxes[axesstyle=axes,yticksize=0 20,ylabelFactor=,dy=1\psyunit,Dy=1,ylabelPos=right, xAxis=false, yAxis=true, Oy=-3](0,-3)(20,3)          \pstScalePoints(1e4,1e0){}{}     \listplot[linecolor=red,linewidth=1pt,showpoints=false]{\current}     \end{psgraph}     \end{pspicture}     \end{document}


title: Character combination and horizontal spacing

text: Thanks for this awesome website that helped me countless times! I need to use double square brackets. I know about those in the `stmaryrd` and `MnSymbol` packages, and I heard about `unicode-math`—but for various reasons, I'd prefer to use a combination of characters. I tried the most direct solution:               \documentclass{article}     \usepackage{amsmath}     \newcommand{\ldb}{\mathopen{\lbrack\!\lbrack}}      \newcommand{\rdb}{\mathclose{\rbrack\!\rbrack}}     \begin{document}     $\ldb s \rdb = \ldb s \rdb$   $\ldb s \rdb$      \end{document}      However, spacing between the brackets is not constant throughout the document, as shown below: ![enter image description here](http://i.stack.imgur.com/Net0u.png) OK, that's nitpicking, but it's even uglier when zooming out, and obvious when printed. (EDIT: I'm talking about the gap between the two "glued" brackets, not the spacing on each side of the double-bracket as a character. For example, the first closing double-bracket is a tiny bit thinner than the first opening one; the third opening one is even thinner.) How to type NOT \delta and NOT \ll explains what's happening, but unfortunately does not provide a solution. I tried a lot of ideas, notably building upon \subseteq + \circ as a single symbol ("open subset"); I tried this too: bracket with doubled delimiters But to no avail. My latest attempt is the following:               \documentclass{article}     \usepackage{amsmath}     \newcommand{\ldb}{\mathopen{\ooalign{\makebox[.4em][l]{$\lbrack$}\cr\makebox[.4em][r]{$\lbrack$}\cr}}}                                                            \newcommand{\rdb}{\mathclose{\ooalign{\makebox[.4em][l]{$\rbrack$}\cr\makebox[.4em][r]{$\rbrack$}\cr}}}     \begin{document}     $\ldb s \rdb = \ldb s \rdb$   $\ldb s \rdb$      \end{document}      but it gives similar results. It seems that some stretchable spacing or kerning remains, and I don't know how to remove it. I'm no TeX specialist… Any idea is much welcome! (BTW, I tried using XeLaTeX and pdfTeX.)


title: How do you write a vector with an underline instead of an arrow?

text: I don't like the way the vector with an arrow `$\vec{x}$` looks. I would prefer to indicate it with a line underline but when I google it nothing comes up to show me how to do it. Does anyone know?               \documentclass[a4paper,11pt]{article}               \begin{document}           \vec{x}           \end{document}


title: ConTeXt enumerate in margin

text: For short answer quiz, I like to provide an answerblank in right margin with same number as the question: In pdfLaTeX I do this with a `newcommand`:               \newcommand{\ansblank}{\leavevmode\marginpar{\labelenumi\hrulefill\raggedright\par}      Then in `enumerate` environment:               \item\ansblank blah blah      In ConTeXt MKIV I can do (thanks to Marco):               \definemargindata [mymarginrule] [width=3.5cm,location=right,]     \define\ansblank         {\inright{\getnumber[itemgroup:itemize]. \thinrules[n=1]}}      My problem is that I want to do this in ConTeXt MKII. Why? Euler font does not work for me in MKIV (TeXLive 2012 via MacTeX) and I am not able to keep up with MKIV changes. I want to use ConTeXt because of METAPOST integration and enhancements. The line:               \define\ansblank{\inright\thinrule}      works in MKII but only gives a line in the right margin (obviously). Is there a `\getnumber` for MKII? Sorry, I was not allowed to upload output image in original post (and still can't.) This should show what is desired:               1) Write the prime factors of 1001                                1) ___________      (Use of NeoEuler in mkiv might be another thread; I've had some trouble with it already.)


title: Choice keys and exception handling

text: Recently, I switched a self-written "bundle package" from using `xkeyval` to `keyreader`. One reason for this, beside the backward compatibility, was that the definition of keys is more convenient in keyreader, especially for choicekeys. One thing that is missing tough is the variant `\define@choicekey+`, where faulty user input can be caught by a self-defined macro.   My first, and rather obvious, question is if there is a solution for this in `keyreader`. However, the more I thought about the problem, the more I wished there was an exception mechanism in LaTeX. As far as I understand it (which admittedly is not so much), in `pgfkeys` (and maybe `ltxkeys`?) there exists something like that when you define handlers for keys in the _/error/_ tree. So apart from shoehorning code to fit `pgfkeys` paradigm, do approaches to exceptions in LaTeX exist?


title: XeTeX with CJK: wrong font for numero sign

text: I'm using XeTeX in a MiKTeX 2.9 environment on Windows. Recently, I've added the xeCJK package to a larger document for including a short passage in Chinese. This, however, caused (among others) the numero sign to be displayed in the wrong font: it automatically switches to MingLiU instead of Linux Libertine. Here's an example:               \documentclass{article}          \usepackage[no-math]{fontspec}     \usepackage[indentfirst=false]{xeCJK}     %\usepackage[fallback,indentfirst=false]{xeCJK}     \usepackage{amsmath}     \setmainfont[Mapping=tex-text,Variant=01]{Linux Libertine O}     \setCJKmainfont{MingLiU}     %\setCJKfallbackfamilyfont{rm}{Linux Libertine O}          \usepackage{xltxtra}     \usepackage[russian,ngerman,american]{babel}     \usepackage{ifthen}     \usepackage{fancyhdr}     \usepackage{setspace}     \usepackage{enumitem}     \usepackage{graphicx}     \usepackage{hyperref}          \begin{document}          漢語大詞典 Test test     \No 3          \end{document}      Can I prevent this somehow, for instance, by explicitly selecting a font before \No or by deactivating the automatic selection of the CJKmainfont (it is only a short passage, which I could easily enclose by a macro)? Besides "\No" I also tried \textnumero from the textcomp package, which yielded the same result. Thank you!


title: How should one format a proof inside a proof, or 'inner proof'

text: I've come across this a few times and have yet to find a general consensus on how to format a proof inside of a proof. Should there be a proof environment within the proof environment that is indented? Should there be a different QED. This thread somewhat talks about an approach, but cases are a bit different that "inner proofs". I checked AMS' Mathematics in Type but it had no mention of such a scenario.


title: Pgfplots and arithmetic with data files

text: I have a file (table) with a lot of columns. In the first column I have time and in the nexus three columns that represent vector components. Now I want to plot vector magnitude in function of time. It is possible to do it with a simple command? Another problem. I have a file containing an angular speed and a work that are related. Now, instead of work I want to plot efficiency. It is possible to divide the work column by a number? And if I have to use a different number for each work point and his differents numbers are stored in a file, it is still possible? For the first case I have the following code:               \documentclass{standalone}          \useoackage{pfgplots}          \begin{document}          \begin{figure}     \centering             \begin{tikzpicture}         \begin{axis}[title={}, xlabel={$x$}, ylabel={$z$},%         legend cell align=left]                  \addplot[orange,thick]                 table[x index=0,y index=1] {mydata.dat};                  \legend{}         \end{axis}         \end{tikzpicture}     \end{figure}          \end{document}      And the following file:               0 0 0 0     1 0.1 0 0     2 0.2 0.1 0     3 0.3 0.2 0.1      I want to plot the square root of the sum of the square of the last three columns (the columns represent vector components, so I want the magnitude) in function of time (the first column). Is it possible? Ps: I posted this two problems in the same question because I think they are strictly related.


title: Shifting parts of a tree to the left, create overlapping sisters in tikz-qtree?

text: I have a problem with a very large tree. What I woul like to do is moving the first node (1 NP) to the left to give more room for the others. The second node V_e1 dominating er could also go to the left. The Adj node could even go into the area of the Det node. Is this possible?               \documentclass{minimal}     \usepackage{graphicx,tikz-qtree}          \newcommand{\relliste}[1]{%     \mbox{%     $%     %     \left\langle \textrm{#1} \right\rangle%     $%     }%     }          \newcommand{\feattab}[1]{[\begin{tabular}[t]{@{}l@{}}#1 ]\end{tabular}}          \newcommand{\eliste}{%     \mbox{%     $\left\langle\right\rangle$}%     }               \begin{document}          \resizebox{\linewidth}{!}{%     \begin{tikzpicture}     \tikzset{level 1/.style={level distance=8\baselineskip}}%     \tikzset{level 2/.style={level distance=8\baselineskip}}%     \tikzset{level 3/.style={level distance=8\baselineskip}}%     \tikzset{level 4+/.style={level distance=6\baselineskip}}%     \tikzset{frontier/.style={distance from root=40\baselineskip}}%     \Tree[.{V$_{e1}$\feattab{              SPR \relliste{ },\\              COMPS \eliste\\              RELS  \relliste{ h4:present(e1, h5), h5:eaqual\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\              HCONS \relliste{ h7 $=_q$ h9 } }}               [.{{1} NP\feattab{                             RELS  \relliste{ },\\                             HCONS \relliste{ } }}  han ]               [.{V$_{e1}$\feattab{                   SPR \relliste{ {1} },\\                   COMPS \eliste\\                   RELS  \relliste{ h4:present(e1, h5), h5:equal\_rel(e, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\                   HCONS \relliste{ h7 $=_q$ h9 } }}                   [.{V$_{e1}$\feattab{                       SPR  \relliste{ {1} },\\                       COMPS \relliste{ {2} },\\                       RELS  \relliste{ h4:present(e1, h5) },\\                       HCONS \eliste }} \edge node[auto=left]{Inflectional LR};                     [.{V$_e$\feattab{                       SPR  \relliste{ {1} },\\                       COMPS \relliste{ {2} },\\                       RELS  \eliste,\\                       HCONS \eliste }} er ] ]                   [.{{2} NP$_{e1}$\feattab{                           head|subj \relliste{ {1} NP$_x$ },\\                           SPR \eliste,\\                           RELS  \relliste{ h5:equal\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\                           HCONS \relliste{ h7 $=_q$ h9 } }}                     [.{NP$_y$\feattab{                           SPR \eliste,\\                           RELS  \relliste{ h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\                           HCONS \relliste{ h7 $=_q$ h9 } }}                       [.{{3} Det\feattab{                             RELS  \relliste{ h6:some(y, h7, h8) },\\                             HCONS \relliste{ h7 $=_q$ h9 } }} en ]                       [.{N$_y$\feattab{                             SPR \relliste{ {3} }\\                             RELS  \relliste{ h9:smart(e2, y), h9:man(y) },\\                             HCONS \eliste }}                          [.{Adj\feattab{                               RELS  \relliste{ h9:smart(e2, y) },\\                               HCONS \eliste }} klog ]                         [.{N$_y$\feattab{                               RELS  \relliste{ h9:man(y) },\\                               HCONS \eliste }} mand ] ] ]                   ]               ]     ]     \end{tikzpicture}}          \end{document}


title: What does p.d. mean in biblatex?

text: I have a biblatex bibliographical reference as follows :               @MISC{Constitutionfr35,       title = {Constitution du 4 octobre 1958 - Article 15},       owner = {leo},       timestamp = {2013.09.20}     }      Which gives in the pdf file : `Constitution du 4 octobre 1958 - Article 15 p.d.` What does mean this p.d. ? And how to remove it ?