title: long table working in TexNiccenter but not in R Studio GUI

text: I'm having a weird error where my code is working just fine in TexNiccenter but unable to compile within the R studio GUI (probably not an R studio problem just R problem). Here's some background: my tables were overflowing and did not fit within the page so I tried to implement the longtable package to fit the tables within the pdf. My friend helped me construct the workable code in TexNiccenter but I can't reproduce it within R studio. Can anyone look at my code and point me in the right direction as to how to get it workable within studio? Here's my code:               %LANDSCAPE MODE FOR TABLE     \usepackage{pdflscape}          %Footnotes become endnotes     %\usepackage{endnotes}% http://ctan.org/pkg/endnotes     %\let\footnote\endnote                    \usepackage{fullpage}          \usepackage{tikz}          \usepackage{titling}          %\usepackage{fancyhdr}     %\pagestyle{fancy}     %\lhead{}     %\chead{}     %\rhead{\thepage}     %\lfoot{}     %\cfoot{}     %\rfoot{}          %\setlength{\droptitle}{2em}   % This is your set screw          \usepackage[margin=0.95in]{geometry}                              %Landscape Mode for PDF     \usepackage{pdflscape}     \usepackage{amsmath, amsthm, amssymb}     \usepackage[compact]{titlesec}     %============Article Title, Authors================                    \usepackage{longtable}     %===================Startup========================     \begin{document}           \begin{longtable}{| p{.40\textwidth} | p{.80\textwidth} |}        \hline      & Belgiumtotal & Germanytotal & Estoniatotal & Irelandtotal & Greecetotal & Spaintotal & Francetotal & Italytotal & Cyprustotal & Latviatotal & Luxembourgtotal & Maltatotal & Netherlandstotal & Austriatotal & Portugaltotal & Sloveniatotal & Slovakiatotal & Finlandtotal \\        \hline     Belgiumtotal & 1.00 & 0.49 & 0.57 & 0.88 & 0.34 & 0.98 & 0.97 & 0.98 & 0.91 & 0.26 & 0.96 & 0.42 & 0.94 & 0.85 & 0.91 & 0.96 & 0.88 & 0.98 \\        Germanytotal & 0.49 & 1.00 & 0.93 & 0.73 & 0.71 & 0.53 & 0.60 & 0.63 & 0.32 & 0.88 & 0.68 & -0.05 & 0.69 & 0.86 & 0.72 & 0.52 & 0.82 & 0.51 \\        Estoniatotal & 0.57 & 0.93 & 1.00 & 0.83 & 0.75 & 0.61 & 0.64 & 0.69 & 0.41 & 0.93 & 0.75 & 0.15 & 0.70 & 0.88 & 0.73 & 0.58 & 0.80 & 0.56 \\        Irelandtotal & 0.88 & 0.73 & 0.83 & 1.00 & 0.66 & 0.93 & 0.91 & 0.94 & 0.72 & 0.65 & 0.94 & 0.20 & 0.95 & 0.94 & 0.94 & 0.92 & 0.92 & 0.85 \\        Greecetotal & 0.34 & 0.71 & 0.75 & 0.66 & 1.00 & 0.44 & 0.39 & 0.43 & 0.18 & 0.75 & 0.49 & -0.23 & 0.54 & 0.56 & 0.49 & 0.45 & 0.53 & 0.28 \\        Spaintotal & 0.98 & 0.53 & 0.61 & 0.93 & 0.44 & 1.00 & 0.98 & 0.97 & 0.90 & 0.34 & 0.94 & 0.27 & 0.96 & 0.87 & 0.94 & 1.00 & 0.90 & 0.97 \\        Francetotal & 0.97 & 0.60 & 0.64 & 0.91 & 0.39 & 0.98 & 1.00 & 0.98 & 0.91 & 0.37 & 0.95 & 0.28 & 0.97 & 0.91 & 0.95 & 0.98 & 0.94 & 0.99 \\        Italytotal & 0.98 & 0.63 & 0.69 & 0.94 & 0.43 & 0.97 & 0.98 & 1.00 & 0.86 & 0.42 & 0.99 & 0.39 & 0.96 & 0.93 & 0.94 & 0.95 & 0.94 & 0.97 \\        Cyprustotal & 0.91 & 0.32 & 0.41 & 0.72 & 0.18 & 0.90 & 0.91 & 0.86 & 1.00 & 0.09 & 0.84 & 0.42 & 0.80 & 0.72 & 0.79 & 0.89 & 0.78 & 0.95 \\        Latviatotal & 0.26 & 0.88 & 0.93 & 0.65 & 0.75 & 0.34 & 0.37 & 0.42 & 0.09 & 1.00 & 0.47 & -0.10 & 0.47 & 0.69 & 0.52 & 0.33 & 0.59 & 0.26 \\        Luxembourgtotal & 0.96 & 0.68 & 0.75 & 0.94 & 0.49 & 0.94 & 0.95 & 0.99 & 0.84 & 0.47 & 1.00 & 0.43 & 0.94 & 0.93 & 0.92 & 0.92 & 0.93 & 0.94 \\        Maltatotal & 0.42 & -0.05 & 0.15 & 0.20 & -0.23 & 0.27 & 0.28 & 0.39 & 0.42 & -0.10 & 0.43 & 1.00 & 0.13 & 0.21 & 0.13 & 0.18 & 0.15 & 0.38 \\        Netherlandstotal & 0.94 & 0.69 & 0.70 & 0.95 & 0.54 & 0.96 & 0.97 & 0.96 & 0.80 & 0.47 & 0.94 & 0.13 & 1.00 & 0.93 & 0.97 & 0.97 & 0.96 & 0.93 \\        Austriatotal & 0.85 & 0.86 & 0.88 & 0.94 & 0.56 & 0.87 & 0.91 & 0.93 & 0.72 & 0.69 & 0.93 & 0.21 & 0.93 & 1.00 & 0.94 & 0.85 & 0.98 & 0.86 \\        Portugaltotal & 0.91 & 0.72 & 0.73 & 0.94 & 0.49 & 0.94 & 0.95 & 0.94 & 0.79 & 0.52 & 0.92 & 0.13 & 0.97 & 0.94 & 1.00 & 0.94 & 0.97 & 0.92 \\        Sloveniatotal & 0.96 & 0.52 & 0.58 & 0.92 & 0.45 & 1.00 & 0.98 & 0.95 & 0.89 & 0.33 & 0.92 & 0.18 & 0.97 & 0.85 & 0.94 & 1.00 & 0.90 & 0.96 \\        Slovakiatotal & 0.88 & 0.82 & 0.80 & 0.92 & 0.53 & 0.90 & 0.94 & 0.94 & 0.78 & 0.59 & 0.93 & 0.15 & 0.96 & 0.98 & 0.97 & 0.90 & 1.00 & 0.90 \\        Finlandtotal & 0.98 & 0.51 & 0.56 & 0.85 & 0.28 & 0.97 & 0.99 & 0.97 & 0.95 & 0.26 & 0.94 & 0.38 & 0.93 & 0.86 & 0.92 & 0.96 & 0.90 & 1.00 \\         \hline     \caption{Your caption here} % needs to go inside longtable environment     \label{tab:myfirstlongtable}     \end{longtable}     Table \ref{tab:myfirstlongtable} shows my first longtable.          %===================End Document===================     \end{document}      ^This is working fine within TexNiccenter but when I try in R studio I am getting the `Option Clash for geometry` error as well as the `extra alignment tab` error Any ideas? Thanks!


title: Over wide figure with caption of the same width that both spill out of the right margin and are aligned flush left

text: This question is similar to that question, but instead I want to place a figure caption flush left aligned to an overwide figure so that it spills out of the right margin. **MWE**               \documentclass{scrartcl} % KOMA-Script article     \usepackage{lipsum}     \usepackage[english]{babel}     \usepackage{epsfig}     \usepackage{graphicx}\graphicspath{Figures}     \usepackage{float}     \usepackage[format=plain,justification=raggedright,font={small}]{caption}     \captionsetup[figure]{width=1.2\textwidth}          \begin{document}           \lipsum[120]     \begin{figure}[thbp]       \includegraphics[draft,width=1.2\textwidth]{Figures/foo.pdf}%       \caption{Caption that has the same width as the figure, but should be aligned to the left as everything else, but should spill out of the right margin}       \label{fig:key}     \end{figure}          \lipsum[120]          \end{document}      What I want is this: ![Result](http://i.stack.imgur.com/3Xc2n.png)


title: Problem with sidecaption and memoir alignment

text: I try to use sideCaption with memoir class, and i have two problems (red anotation in image 1) :   * sideCaption doesn't respect the margin at left ...   * how can i say to saidCaption to align the figure name to the top of my figure ? The minimal code :               \documentclass[a4paper, 12pt,twoside, openright]{memoir}     \usepackage{polyglossia}     \setdefaultlanguage{french}     \usepackage{fontspec}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}     \usepackage{xparse}     \usepackage{graphicx}     \usepackage[protrusion=true]{microtype}          \graphicspath{{FigureIntroduction/}}          \makeatletter     \renewcommand{\fnum@figure}[1]{\textbf{\figurename~\thefigure}}     \makeatother          \begin{document}          \chapterstyle{bringhurst}          \begin{figure}[!h]     \begin{sidecaption}[fortoc]{Le "champignon informationnel" proposé par Frédéric Kaplan est révélateur de l'augmentation du champs d'expérimentation rendu possible par la numérisation des données, puis la simulation numérique.}[fig:I_Champi]      %\centering      %\resizebox*{\textwidth}{!}{\includegraphics{champignonKaplan.png}}      \includegraphics[width=\linewidth]{champignonKaplan.png}       \end{sidecaption}     \end{figure}          \end{document}      The result : ![enter image description here](http://i.stack.imgur.com/e6Y7Y.png)


title: In beamer, how do you make \only work after the frame?

text: I believe I understand `\only<...>{...}` fairly well, but I'm having problems with it. In particular, if `\only` comes after the frame it's supposed to be on, the text doesn't appear. Here is a very simple example:               \begin{frame}     \pause      text      \pause      more text     \pause      even more text     \only<1>{only text}     \end{frame}      The "only text" never shows up. But if I put the `\only<1>{only text}` earlier (before the very first pause), then it appears. Any help is appreciated. EDIT: By the way, here's what I'm actually trying to get to work. The images at the bottom don't appear.               \begin{frame}     \pause     %     \begin{lemma}\label{lemma1}     \pause      Fix $\eta:[0,+\infty]\to[0,+\infty]$ for which there exists      \pause $\xi:[0,+\infty]\to[0,+\infty]$ which is convex, pointwise      dominates $\eta$, is finite on $[0,+\infty)$ and vanishes at the origin.     \pause Given $c\in[0,+\infty)$ arbitrary, define $\eta_c:[0,+\infty]\to[0,+\infty]$ by     \pause     %     $$\eta_c(x):=\max\Big\{cx,\inf_{\substack{\mbox{\tiny$\xi$ convex on $[0,+\infty]$}\\     {\mbox{\tiny$\xi\geq\eta$ on $[0,+\infty]$}}}}\xi(x)\Big\},\qquad\forall\,x\in[0,+\infty].$$     %     \pause Then $c\,{\rm id}\leq\eta_c$ on $[0,+\infty]$,      \pause $\eta\leq\eta_c$ on $[0,+\infty]$,      \pause $\eta_c$ is convex,      \pause $\eta_c^{-1}(\{0\})=\{0\}$,      \pause $\eta_c^{-1}(\{+\infty\})=\{+\infty\}$,      \pause is strictly increasing      \pause and continuous.     \end{lemma}     %     \begin{overlayarea}{\textwidth}{\textheight}     \only<1>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta01}\end{figure}}     \only<2>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta02}\end{figure}}     \only<3>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta03}\end{figure}}     \only<4>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta04}\end{figure}}     \only<5>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta05}\end{figure}}     \only<6>{\begin{figure}\includegraphics[width=0.8\linewidth]{Eta06}\end{figure}}     \end{overlayarea}     %     \end{frame}


title: Sudden Problems with TOC

text: After installing all of the new updates available in TexLive about an hour ago (23/3/14 - previous update 19/3/14), I'm having trouble with some of my TOC entries. When I have a figure with a separate TOC entry that involves a `\ce{}` environment, I get error messages saying that the control sequence `\aaaa` is not defined. Here's a MWE:               \documentclass[a4paper,12pt,final]{book}          \usepackage[version=3]{mhchem}            \begin{document}     \tableofcontents     \listoffigures          \begin{figure}[htbp]     \begin{center}     pretty picture     \caption[X-ray crystal structure of [Rh(acac)\ce{(MCP)2}{]}.]{X-ray crystal structure of [Rh(acac)\ce{(MCP)2}].}     \label{fig:fig2p2}     \end{center}     \end{figure}          \end{document}      I've tried using `\texorpdfstring`, but I end up with the same problem. I've gone back to older copies of the file that were working fine last night, but I have the same problem. I suspect that one of the updates I've just installed has done something to cause this, but I have no idea which one, or how to fix it. Please help!! I'm using texshop, compiling using dvi.


title: Drawing parallelogram with fixed angle, width and height?

text: I want to draw parallelograms with fixed angle, width and height, but it seems that `trapezium` in PGF/TikZ cannot specific the height without changing angles.               \documentclass[tikz]{standalone}     \usetikzlibrary{shapes.geometric}     \begin{document}     \begin{tikzpicture}     \tikzstyle{every node}=[trapezium, draw, minimum width=3cm,     trapezium left angle=120, trapezium right angle=60]          \node[trapezium stretches body]         at (0,0) {A};          \node[trapezium stretches body, rotate=-30]         at (0,1.5) {A rotate $-30^\circ$};          \node[minimum height=1cm, trapezium stretches body]         at (5,0) {B};          \node[minimum height=1cm, trapezium stretches body, rotate=-30]         at (5,1.8) {B rotate $-30^\circ$};          \node[minimum height=1cm]         at (0,-2) {C};          \node[minimum height=1cm, rotate=-30]         at (0,-4) {C rotate $-30^\circ$};          \node[minimum height=1cm, trapezium stretches]         at (5,-2) {D};          \node[minimum height=1cm, trapezium stretches, rotate=-30]         at (5,-4) {D rotate $-30^\circ$};          \end{tikzpicture}     \end{document}      The output:![enter image description here](http://i.stack.imgur.com/SPpoC.png) **I want a vertically fat version of A with the same width.** A and B have different angles, just adding " **minimum height** ". Rotated version of A has vertical west/east sides, that's what I need. Rotated version of B does not have vertical west/east sides, however, I do need a "higher" parallelogram with the same angles and width as A. C: Removing " **trapezium stretches body** " results in a parallelogram whose width and height out of control. D: Replacing "trapezium stretches body" with " **trapezium stretches** " helps nothing.


title: Modular Documents, including image from other LaTeX-Project

text: I am currently writing on a document where I want to include subfiles; I am creating a modular document. Now, the problem is, that I am including (read: input) files, that have been used for other modular documents, too. This is a problem, because some of the files, that I wish to include also contain images (i.e. links to images). So, when I now include file z, LaTeX-compiler produces the error: "Warning: could not find image so and so". Of course, that's logical, since the very image itself was originally intended to be used by another main.tex, to which (pardon me this reificiation) the relative link makes sense. I know, that I could use absolute links, however, for obvious reasons, I'd like to avoid, using them. Another solution would be, to "emulate" the original relative link. For instance, if I originally used "includegraphics={../graphic.png}, then, by copying the specific image to that place of the new main.tex, that would be ../ of the new main.tex, i.e., the directory "below" the new main.tex, everything would check out fine. Unfortunately, in some cases, this is not possible. I would, lastly, rather not copy the files to be included in my new main.tex, since I'd like changes to be dynamic for both files. Just to clarify, what these files are intended to do: they constitute semester-summaries. However, my newest idea, was to create a meta-document, where I would simply compile all the documents, and have some sort of meta- study-years-file. Hence the problem. Best Regards, Niklas


title: How to put a label on a wire using CircuiTikz

text: I would like to put a label on a short circuit element. I have tried something like this:                    \draw          (2,2) to [short=$L = \lambda/4$, *-*] (5.5,2)          (2,0) to [short, *-*] (5.5,0);      but nothing happens. How can I do that? Thank you.


title: Results of xfor loop failing with numerical arguments

text: I am trying to write a macro that selects an item from a comma separated list, `\select{2}{A,B,C,D,E}` results in `B`. I am using the `xfor` package to process the list, but would try `etoolbox` if that offered a better solution. Now for the problem: the macro works fine for plain text, however if the item is a number, I get an unclosed `\ifnum`.               ! Incomplete \ifnum; all text was ignored after line 29.                           \fi       Here is the minimal example               \documentclass{article}     \usepackage{xfor}     \usepackage{biblatex}          \makeatletter     \newcount\select@count     \newcount\select@i     \newcommand\select[2]{%         \select@i=1\select@count=0%         \@for\@@select@item:={#2}\do{\advance\select@count by1}%         \ifnum#1>\select@count??\else%         \@for\@@select@item:={#2}\do{%           \advance\select@i by1%           \ifnum#1<1??\@endfortrue\fi%           \ifnum\select@i=#1\@@select@item\@endfortrue\fi%         }%       \fi%     }     \makeatother          \begin{document}     \begin{itemize}       \item \verb+\select{0}{A,B,C,D,E}+ gives \select{0}{A,B,C,D,E}       \item \verb+\select{1}{A,B,C,D,E}+ gives \select{1}{A,B,C,D,E}       \item \verb+\select{2}{A,B,C,D,E}+ gives \select{2}{A,B,C,D,E}       \item \verb+\select{5}{A,B,C,D,E}+ gives \select{5}{A,B,C,D,E}       \item \verb+\select{10}{A,B,C,D,E}+ gives \select{10}{A,B,C,D,E}     %  these do not work     %  \item \verb+\select{1}{1,2,3,4,5}+ gives \select{1}{1,2,3,4,5}     %  \item \verb+\select{2}{1,2,3,4,5}+ gives \select{2}{1,2,3,4,5}     \end{document}      Any thought on why it fails with numbers? Do I need to protect my list?


title: Superscripts in bibliography with bibtex

text: Is there a bibliography style (I'm using `bibtex`) that works with `article` class where the numbers appear as superscripts and also numbered as they appear in the text (as in `unsrt`)? I read some related questions using `revtex`, but nothing seem to work with basic `article` class.


title: Could not insert pdf graphics

text: Using `\includegraphics[width=\linewidth]{mypdf}` I tried to insert a PDF image to my XeLaTeX document. But instead of the images empty area places in its place.               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \includegraphics[width=\linewidth]{my.pdf}     \end{document}      I got following in console:               ** WARNING ** Multiple DecodeFilter not supported.     ** WARNING ** Could not handle a content stream.     ** WARNING ** pdf: image inclusion failed for "./my.pdf".      )     (see the transcript file for additional information)     Output written on test.pdf (1 page).     SyncTeX written on test.synctex.gz.     Transcript written on test.log.      What may be wrong? What kind of PDFs can be inserted in tex files?


title: Save and load TikZ graphs

text: > **Possible Duplicate:**   >  Outsourcing TikZ code Pardon the question, I'm an undergrad using TikZ and LaTeX to write-up my final term report. Is there a way to write the code for a tikzpicture in one section of the document and import it somewhere else? My report is on Knight Tours, and so the graphs have many verticies/edges and thus my document is separated by long pieces of code just to draw the graphs. If possible, I'd like to have all the code for the graphs at the end of my document, and be able to import the figures using a few lines elsewhere in my document? Is this possible? I'm also CS guy, so this is mostly just for code readability and modularity than anything. Thanks!


title: Labeling loops in tikz picture

text: I need to label the edges and the loop on this graph, but I'm having some trouble.               \begin{tikzpicture}       [scale=.5,auto=left,every node/.style={circle,fill=blue!20}]       \node (n2) at (0,8) {$x_{2}$};       \node (n1) at (-3,6)  {$x_{1}$};       \node (n3) at (3,6)  {$x_{3}$};       \node (n4) at (2,2) {$x_{4}$};       \node (n5) at (-2,2)  {$x_{5}$};     \foreach \from/\to in {n1/n3,n1/n5,n5/n4,n3/n4,n1/n2}     \draw (\from) -- (\to);     \draw[bend left] (n2) to (n3);     \draw[bend right] (n2) to (n3);     \draw(n4) to [out=160,in=100,distance=3cm] (n4);          \end{tikzpicture}      Thanks for the help.


title: Assistance creating a table with different amount of columns on rows

text: I am trying to create a table in LaTex, which has different a number of columns on some rows, this is what I am trying to achieve:                          Title1             Title2     Row1   1    2     3       1     2    3          Row2          Row3      The only tables I have created previously have the dame amount of columns on each row, this one needs three columns on the top row and then 7 on the next three rows, just not sure how to achieve this.


title: Companion for \ell

text: In mathematical writing I often use `\ell` when I need an 'ell' variable, because `l` looks like a `1`. In fact, I expect this is why the symbol exists :). Now, it often happens that my '\ell' stands for (l)eft, and I would like to have a symbol for an 'r' variable that stands for (r)ight. > Is there a simple way to make a cursive looking r?


title: Display appendix chapter like: "Appendix", and sections like "Appendix A: My appendix title"

text: I wish to make my appendix chapter like: "Appendix", and sections like "Appendix A: My appendix title" "Appendix B: My second title" by writing:               \chapter{Appendix}     \section{My appendix title}     \section{My second title}      My first problem is that the "Appendix A:" - section numeration thing and the section name is on top of each other. Here's an image of the problem: ![enter image description here](http://i.stack.imgur.com/Yir9M.png) With this I have used the package `\usepackage[title]{appendix}`, and the commands:               \begin{appendices}     \renewcommand{\appendixname}{Appendix}     \gdef\thechapter{\arabic{equation}}     \gdef\thesection{\appendixname\Alph{section}}     \end{appendices}      I want the chapter counter to continue from the content and not start on `0`, but be in this example `2`, and also the section to be like:               \gdef\thesection{Appendix \Alph{section}\colon\ } %And then get section name and the dots      By this line I get an error message, like its too long or something, because if I don't make the line so long I don't get the error. Don't know why. If I use the package or not, and just say: `\appendix` is the same by me, I just tried both to see if I manage to get it as I want.


title: LaTeX getting "Missing } inserted" error

text: I'm getting "Missing } inserted" error, when compiling with `pdflatex` and I really don't understand why. This is occurring in a `beamer` `frame`. Maybe someone comes up with something useful.               \documentclass{beamer}     ...     \usepackage[utf8x]{inputenc}     \usepackage{default}     \usepackage{times}     \usepackage{graphics}     ...     \begin{frame}\frametitle{3\textonehalf. Generace}              \begin{block}{3\textonehalf. Generace}             \begin{itemize}                 \item OOP             \end{itemize}         \end{block}              \begin{exampleblock}{Jazyky 3\textonehalf. generace}             \begin{itemize}                 \item první Smalltalk                 \item C{}\verb!++!, Objective-C, Object Pascal, Java                 \item statické / dynamické             \end{itemize}         \end{exampleblock}          \end{frame}     ...      I get the error on the last line.


title: font-lock defining keywords containing special characters and whole-words

text: I found the reference to `"\\\"` on line 283 of `font-latex.el` of `auctex-11.86`, and I'd like to remove it as a warning (which is easy enough to delete manually). I have not figured out a way to define certain special keywords so that font-lock knows that I am referring to a whole-word, rather than a potential sub-word. For example, if I define the word `not` as a keyword and then type the word `nothing`, the first part of `not`hing gets higlighted. The same thing happens with slashes and so forth. Set forth below is a list of special character keywords that I'd like to please define as whole-words so that I can classify them as different colors using variations of the method described below. Some of the following would be defined as a warning color (i.e., because they are missing the backslash). When corrected within the *.tex document, the symbol with the backslash would be a different color -- e.g., `#` could be red, and `\\#` could be blue. For that to work, there would two variations of the sample code below, each defined with a different set of colors.               "     \     ~     \\     ~\\     \S     #     \#     $     \$     %     \%     &     \&     not                    (defvar lawlist-face-red (make-face 'lawlist-face-red))     (set-face-attribute 'lawlist-face-red nil :background "white" :foreground "red" :bold t)     (font-lock-add-keywords 'latex-mode '(     ("     "     \\|     #     \\|     $     \\|     %     \\|     &     " 0 lawlist-face-red prepend)      * * *               (defvar lawlist-face-blue (make-face 'lawlist-face-blue))     (set-face-attribute 'lawlist-face-blue nil :background "white" :foreground "blue" :bold t)     (font-lock-add-keywords 'latex-mode '(     ("     \\\\     \\|     ~     \\|     \\\\\\\\     \\|     ~\\\\\\\\     \\|     \\\\S     \\|     \\\\#     \\|     \\\\$     \\|     \\\\%     \\|     \\\\&     \\|     not     " 0 lawlist-face-blue prepend)      * * * **EDIT** Here is a working draft that incorporates the the answer of A.Ellett. AUCTeX already has a predefined warning mechanism for `$`, `&`, and `\\\`. `%` is a comment without the backslash, which is already colorized. I've overridden the `\\\` and `#` with the code below -- the Emacs built-in warning for `#` is italics. AUCTeX has auto-correct for quotations when typing them in latex- mode, but I frequently copy / paste data containing improper LaTeX quotations and I needed a warning mechanism such as is outlined below:               (defvar lawlist-face-a (make-face 'lawlist-face-a))     (set-face-attribute 'lawlist-face-a nil :background "white" :foreground "orange" :bold t :underline nil :font "Courier" :height 200)          (defvar lawlist-face-b (make-face 'lawlist-face-b))     (set-face-attribute 'lawlist-face-b nil :background "white" :foreground "cyan" :bold t :underline nil :font "Courier" :height 200)          (defvar lawlist-face-c (make-face 'lawlist-face-c))     (set-face-attribute 'lawlist-face-c nil :background "white" :foreground "blue" :bold t :underline nil :font "Courier" :height 200)          (font-lock-add-keywords 'latex-mode '(          ("#\\|\"\\|~" 0 lawlist-face-a t)          ("\\(\\\\\\)[^a-zA-Z@]" 1 lawlist-face-a t)          ("\\\\\\\\" 0 lawlist-face-b t)          ("\\bnot\\b\\|~\\\\\\\\\\|\\\\#\\|\\\\\\$\\|\\\\S\\|\\\\%\\|\\\\&" 0 lawlist-face-c t)          ) 'prepend)


title: LaTeX version warning for multicol package

text: # Background While implementing Frank Mittelbach's answer, the `pdflatex` command returned the following warning:               LaTeX Warning: You have requested, on input line 13, version                    `2011/12/20' of package multicol,                    but only version                    `2011/06/27 v1.7a multicolumn formatting (FMi)'                    is available.      Accompanied shortly thereafter by the following error:               Underfull \hbox (badness 10000) in paragraph at lines 199--199     \OT1/cmr/m/n/10 dic-tum gravida mau-      # Code The code is straightforward:               \documentclass{article}     \usepackage{lipsum}     \usepackage{mccolaction}          \newif\ifinlast     \def\columnbreakunlesslast{%         \docolaction{\typeout{in first column}\inlastfalse}%                                {\typeout{in middle column}\inlastfalse}%                                {\typeout{in last  column}\inlasttrue}%         \unless \ifinlast \columnbreak \fi      }          \begin{document}          \begin{multicols*}{3}     \section{First}     \lipsum[1-2]          \columnbreakunlesslast          \section{Second}     \lipsum[4-5]     \end{multicols*}          \end{document}      # Problem I tried the following commands:               tlmgr update --self     tlmgr update --list     tlmgr update --all      Each returned with " _no updates available_ ". # Question How do I upgrade the multicols package using TeX Live 2013 on Linux?


title: latexmk pointing to a line of code with an error that I don't see

text: When trying to compile my code, latexmk keeps hitting me with an undefined control sequences. I have checked above, below, and the line it says is causing the issue, but I don't see anything wrong. Warning message:               ./230OrbitalMechanicsNotes.tex:969: Undefined control sequence.     l.969         \draw                        [-latex](-2,0) -- (2,-2) node[right, scale = .75] at (0,-.9)      Code snippet:               \begin{figure}[H]           \centering           \begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]             \draw (-2,0) -- (2,0);             \draw[dashed, -latex] (-1.5,-2) -- (2,-2) node[below, scale = .75]             at (0,-2) {\(v_{\venus} = 35.022\)};             \draw[-latex] (-2,0) -- (-1.5,-2) node[left, scale = .75] at (-1.7,-1)             {\(\nu_2\);             \draw[-latex](-2,0) -- (2,-2) node[right, scale = .75] at (0,-.9)             {\(v_2 = 12.9005\)};             \draw[red] (-1.3,0) arc (0:-40:.44) node[right, scale = .75]             at (-1.2,-.2) {\(\sigma_2 = \frac{\pi}{9}\)};             \draw[green] (1.5,-2) arc (180:140:.35) node[left, scale = .75]             at (1.4,-1.8) {\(\sigma_2\)};             \draw[blue] (-1.5,0) arc (0:-80:.48) node[right, scale = .75,             fill = white] at (-1.8,-.6) {\(\varphi_2 = 68.2036\)};           \end{tikzpicture}         \end{figure}      I dont see any missing `;`, `(`, `(`, `[`, `]`, `{`, `}`.


title: relative positioning in multipart nodes

text: Is there a way do draw a line from the beginning of the tip of the brace, using relative positioning?               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{shapes.multipart,positioning,decorations.pathreplacing}          \begin{document}        \begin{tikzpicture}          \draw[help lines] (0,0) grid (3.0,3.0);          \node[align=center,draw,shape=rectangle split,                rectangle split horizontal,rectangle split parts=3, text width=2cm] (A)                {1\nodepart{two}2\nodepart{three}3};          \draw [decoration={brace,mirror,raise=5pt},                 decorate,below=10pt](A.one south) -- node[below=10pt]{}(A.two south);          \draw [->] (-1.1,-0.5) --(-1.1,-2);        \end{tikzpicture}     \end{document}


title: Margin note and paragraph not aligned when skipping a page

text: I am using the "marginnote" and "geometry" packages to set marginnotes features:               \usepackage[a4paper, top=3.2cm, bottom=3cm, outer=4cm, inner=4cm, heightrounded, marginparwidth=2.3cm, marginparsep=0.3cm]{geometry}     \usepackage{marginnote}\renewcommand*{\marginfont}{\scriptsize\sffamily\bfseries}      and I call margin notes just before the paragraph:               \marginnote{Unification sociétale.}[0.4cm]Le Monde comme \og{}société\fg{} représente la \og{}combinaison...      At the end of a page, if a paragraph is pushed on the next page, margin notes do not follow the paragraph it is connected to. In this picture, I would expect the margin note "Unification sociétale" to be aligned to the paragraph beginning by "Le Monde..." on the next page. ![enter image description here](http://i.stack.imgur.com/yf3RQ.png) Does anybody know how I can keep margin note and paragraph knit together? Thanks !


title: Could foreach generating figure have coordinate?

text: I Encounter a problem that is foreach loop generating figure can have coordinate? this is I asked before How can I finish this about LTE diagram using filldraw rectangle now I want put this diagram into a part of my tikz figure, but I don't know how to coordinate it. please help me! Or I only have to use orringe method to complete my figure...(using draw grid)


title: typing @ sign in lstlisting

text: is there a way to type the "@" sign in lstlisting? I have tried just putting @ or \@ but both don't seem to work:               @testing     123      or               \@testing     123      it just outputs               testing123


title: How to annotate figures with TikZ without affecting the float position? a template for western blots

text: I want to do some kind of figures, typical of Western blotting in biology. The figures are enclosed with a frame using `mdframed` package. A MWE example is shown below. In the middle of creating this panel of figures, few issues arose. The position of the figure below was displaced, the code was cluttered, and I said that it would be even more cluttered if I would continue doing things like I've done. Therefore, I decided to ask the help of the community before ending up with awful lines of codes. **What is needed:**   1. put a number just beside (at the right side) each arrowhead (there are 6 of them) to indicate the size of the migrated protein, e.g., numbers like `10kDa`, `15kDa`, `25kDa`, `35kDa`, `40kDA`, `55kDa` (from bottom to top). It would be helpful if the code would treat this as relative coordinates and not absolute ones (really appreciate that, because I would apply the same arrowheads, with their corresponding number labels above, to the rest figures exactly).   2. The labels above the blots should stay `45` degrees rotated, had they been `90` rotated no displacement of the below figure would occur, given the lines of code below. So what should be done, in this case, to avoid this unwanted behavior of displacement?   3. Application of the `45` degree-rotated labels to the other two figures the same way and to make sure that this would not lead to similar displacements of figures.   4. It would be helpful, indeed, to provide a shortcut code in `TikZ` so that to reduce the amount of the already cluttered code needed to annotate such pictures.    5. The label `beta-actin` should be put on the left side of the small figure below each of the larger figures as shown in the MWE. This caused a further displacement of the smaller figure (if you compare the figure c of MWE with the actual figure c). This label should be applied for the rest two above figures, exactly the same manner, without causing any side effects.  MWE code:               \documentclass{scrartcl}     \usepackage{xcolor}      \usepackage{caption}     \usepackage{floatrow}        \usepackage{subcaption}     \usepackage[demo]{graphicx}     \usepackage[framemethod=tikz]{mdframed}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,positioning,shadows,trees,calc,decorations.markings}          \begin{document}     \begin{figure}     \begin{mdframed}[       align=center,       linecolor=black,       fontcolor=black,       backgroundcolor=white,       userdefinedwidth=0.9\textwidth,       roundcorner=5pt,       skipabove=0pt,       skipbelow=0pt,       leftmargin=0pt,       innerleftmargin=20pt,       innerrightmargin=0pt,       innertopmargin=5pt,       innerbottommargin=5pt,        innerlinewidth=0pt,       middlelinewidth=0pt,       outerlinewidth=1pt]     \floatsetup[subfigure]{captionskip=10pt}     %===================== upper two subfigures ================     \begin{minipage}{.44\textwidth}         \begin{subfigure}{\linewidth}         \centering         \begin{tikzpicture}[remember picture]          \node [anchor=south west,draw=orange,line width=5pt, inner sep=0pt] (a) {\includegraphics[width=5cm, height=5cm, clip= true, trim = 0 0 0 0]{whatever}};         \end{tikzpicture}         \begin{tikzpicture}[remember picture]         \node [anchor=south west,draw=orange,line width=5pt, inner sep=0pt] (asupp) {\includegraphics[width=5cm,height=.75cm, clip= true, trim = 0 0 0 0]{whatever}};         \end{tikzpicture}         \caption{Image}         \label{fig:mwe:a}         \end{subfigure}\\[0ex]     \end{minipage}     \begin{minipage}{.44\textwidth}         \begin{subfigure}{\linewidth}         \centering         \begin{tikzpicture}[remember picture]             \node [anchor=south west,draw=orange,line width=5pt, inner sep=0pt] (b) {\includegraphics[width=5cm, height=5cm, clip= true, trim = 0 0 0 0]{whatever}};         \end{tikzpicture}         \begin{tikzpicture}[remember picture]             \node [anchor=south west,draw=orange,line width=5pt, inner sep=0pt] (bsupp) {\includegraphics[width=5cm, height=.75cm, clip= true, trim = 0 0 0 0]{whatever}};         \end{tikzpicture}         \caption{Image}         \label{fig:mwe:b}        \end{subfigure}     \end{minipage}     \vfill     %===================== the one below subfigure ================     \begin{minipage}{.94\textwidth}       \begin{subfigure}{\linewidth}       \centering       \begin{tikzpicture}[remember picture]      \node [anchor=south west,draw=orange,line width=5pt, inner sep=0pt] (c)          {\includegraphics[width=5cm, height=5cm, clip= true, trim = 35 0 0 0]{whatever}};       \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,.2); %arrowhead            \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,1.6);            \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,3);            \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,3.6);            \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,4.1);            \path [decoration={markings, mark=at position 1 with {\arrow[scale=2,rotate=180]{latex}}}, decorate] (5.1,4.6);              % add labels         \node [anchor=south west, xshift=35pt, rotate=45] at (c.north west) {Lane1 ABC};              \node [anchor=south west, xshift=70pt, rotate=45] at (c.north west) {Lane2 DEF};              \node [anchor=south west, xshift=105pt, rotate=45] at (c.north west) {Lane3 GHI};              \node [anchor=south west, xshift=135pt, rotate=45] at (c.north west) {Lane4 JKL};       \end{tikzpicture}       \\[0ex]       \begin{tikzpicture}[remember picture]        \node [anchor=south west, draw=orange,line width=5pt, inner sep=0pt] (csupp) {\includegraphics[width=5cm, height=.75cm, clip= true, trim = 0 0 0 0]{whatever}};        \node[anchor=south west,font=\ttfamily,xshift=-50] at (csupp.south west) {$\beta$-actin};       \end{tikzpicture}       \caption{Image}       \label{fig:mwe:c}       \end{subfigure}      \end{minipage}          \end{mdframed}     \RawCaption{\caption{General Caption.}     \label{fig:mwe}}     \end{figure}          \end{document}      which yields:   ![enter image description here](http://i.stack.imgur.com/YVjVW.png) The figure c, for instance, looks like this in the original image:   ![enter image description here](http://i.stack.imgur.com/S4oaw.png) **Update:**   Code is updated now so that MWE works using demo images by using `\usepackage[demo]{graphicx}` option.


title: Typesetting a matrix with crossing arrows on it

text: I'm able to draw matrices on LaTeX but I don't know how to put crossing arrows on it as the second matrix in the figure. ![Example of what I want](http://i.stack.imgur.com/Wt3wo.png) I tried to make it 5 x 5 matrices and put `\diagup`, `\diagdown` on diagonals but it didn't seem like a good idea.


title: Error using the align environment

text: What is the origin of the error LaTeX detects when compiling the code below? It produces the correct diagram, but tells me there is an error with `aligned'.               \documentclass[11pt]{scrartcl}     \usepackage{amsmath}     \newcommand{\id}{\mathrm{id}}            \begin{document}     \[     \left\lbrace     \begin{align}     \lbrace*\stackrel{\alpha}{\longrightarrow} *'\rbrace & =  d_2\phi(\id)=\phi_1(d_2)=a\stackrel{f}{\longrightarrow}b\\     \lbrace*'\stackrel{\beta}{\longrightarrow} *''\rbrace & =  d_0\phi(\id)=\phi_1(d_0)=b\stackrel{g}{\longrightarrow}c\\     \lbrace*\stackrel{\beta\circ\alpha}{\longrightarrow}*''\rbrace & =  d_1\phi(\id)=\phi_1(d_1)=a\stackrel{h}{\longrightarrow}c     \end{align}     \right.     \]     \end{document}      How can I solve this? Thanks! **Edit** As pointed out by in the comments, the problem is that `align` enters math mode on its own, and should not be used inside `\\[...\\]`. Instead, one should use `\\\begin{aligned}...\end{aligned}`.


title: Attached: curriculum vitae to french

text: I'm trying to write a cv and a related letter in french. But, I'm getting on the bottom of the letter this text in english: ![enter image description here](http://i.stack.imgur.com/zlLF3.png) How do I to make it appear in french ? The only setting that I'm using is this :               \documentclass[11pt,a4paper,french]{moderncv}      Is there something wrong with this, please?


title: Adding border/frame around boxes

text: I'm trying to modify a package to suit my needs but since I'm not very familar with the tex macro language I would like to add a border around the boxes created by the package so I can see exactly what they are doing. The code that allocates the boxes is               \setbox0\box\csname pc@column@\number\count@\endcsname%     \csname pc@column@width@\number\count@\endcsname\z@%          \vbox{\unvbox\@tempboxa}%      and I'd like to simply put a frame around it or even give it a unique semi- opaque background color.


title: Vim syntax highlighting of partial tex file used with \include is incorrect

text: I am using vim to edit latex files. The document is long and so I split each chapter in its own .tex file. Each .tex file is then included into the main document using the `\include` directive. The main problem is that when edited the separate .tex files, the syntax highlighting is incorrect. The main tex file which includes all the chapters is correctly highlighted because it contains the preamble and `\begin{document} ... \end{document`, but since the partial files do not include those statements it is highlighted incorrectly. Do anyone know of a quick fix for this?


title: Call for Bibtex fails

text: I am having problems when I try to run bibtex with both TEXmaker and in the terminal. I'm using centOS. In w8 everything runs ok, and I get the final pdf with correct references. In Linux though, with TEXmaker I get               Error : could not start the command      when I try to compile, either by doing it manually or with quickbuild. I compile by doing latex+bibtex+latex+latex. In the terminal my bash script looks like this:               export fi=Level2 export day=`date +%d%m%y`     cp $fi.tex OLD/$fi$day.tex     #clean  rm -rf  $fi.bbl $fi.aux $fi.blg $fi.dvi $fi.log $fi.pdf     latex $fi.tex bibtex $fi latex $fi.tex latex $fi.tex dvipdf $fi.dvi $fi.pdf     #okular $fi.pdf & gnome-open $fi.pdf &      Both the .bib and the .bst are in this directory. natbib is loaded by default, but if I call the packadge I get the same result.               \clearpage \bibliographystyle{model2-names} %%     \bibliography{./Bibtex/global} \bibliography{global_scat} \clearpage      I use Bibtex in Linux insted of biblatex because I need to be able to run the tex file both OS without major changes to it.


title: Perfectly scale line, paragraph, image, anything up to textwidth

text: I want to scale a multi line text up to the available textwidth. I found something here: pgfplots: how can I scale to text width? and here: http://stackoverflow.com/questions/3106587/scale-an-equation-to-fit-exact- page-width and also, probably the most promising: How to scale a tikzpicture to \textwidth I also want to scale a word up to the textwidth to produce a very simple poster and I'm doing something like this:               \centering\noindent\resizebox{\textwidth}{!}{Queue here!}      But that doesn't work for multi line solutions, i.e.               \centering\noindent\resizebox{\textwidth}{!}{Queue\\here!}      Would result in an error: > ! LaTeX Error: Something's wrong--perhaps a missing \item. > > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. ...   >  l.12 ...ent\resizebox{\textwidth}{!}{Queue\here!} Note that the above mentioned code doesn't work as expected if the text is more high than wide, i.e.               \centering\noindent\resizebox{\textwidth}{!}{!}      would not fit the exclamation mark onto the page, because it will grow too tall and way beyond the page. As mentioned in How to scale a tikzpicture to \textwidth I also tried the adjustbox package. However, the following doesn't work as expected for two reasons: Firstly, it doesn't break lines, and secondly, it makes the text grow beyond the right border (according to the paper compile with the geometry package and showframe as argument).               \minsizebox{\textwidth}{!}{foo\\bar}      Just right now, I am looking for a solution that allows me to produce a poster type of document with multiple lines without wasting space, i.e. make it as big as possible. Obviously, I want to switch the paper as I usually do, namely just by changing i.e. "a4paper" into "a3paper" somewhere in the document. Ideally, there is a generic solution that scales anything, including graphics, etc., up to the page. In my use case scenario, assuming that nothing else will be on the page is very reasonable. The ideal solution also works in corner cases like the above mentioned exclamation mark. FWIW: Here is the code I have so far:               \documentclass[landscape]{minimal}     \usepackage[showframe,a4paper]{geometry}     \newcommand{\vstretch}[1]{\vspace*{\stretch{#1}}}     \usepackage{adjustbox}          \begin{document}     \topskip0pt     \vstretch{1}     \minsizebox{\textwidth}{!}{foo\\bar}     %\centering\noindent\resizebox{\textwidth}{!}{!}%     \vstretch{1}     \end{document}      My fallback workflow up to now is something along the lines of: Create a simple document, use pdfcrop and then pdfnup --nup 1x1 to scale it up.


title: Table of content for Dictionary

text: I have one problem in the latex `\tableofcontents`. Look at the image I circled.               For Dictionary from A-Z               1-250      How to do that in latex in `\tableofcontents`? Is it possible in LaTeX? ![enter image description here](http://i.stack.imgur.com/b3AfL.jpg)


title: Can I set an adjustable line spacing to avoid orphans and widows?

text: I have a relatively simple question. I'm compiling a large document and finding that I have a lot of pages that start with the last two lines of a paragraph. Is there a way to allow the line-spacing to vary to avoid this? It's currently set to `\onehalfspacing` using the `setspace` package. _Update following David's answer_ : Is there a way to allow a general spacing feature to vary for the same purpose? The two-liners are mostly caused by `\widowpenalty=10000` and `\clubpenalty=10000` to avoid widows and orphans. I was hoping that the penalties would squeeze text onto one page rather than expanding it to more on the next page. I've been searching the site for an answer to this but I haven't manage to find one even though I imagine a solution, if one exists, has been described somewhere else. Other than, of course, just rewriting a few sentences...


title: design a macro that replaces \divide

text: One of the arithmetic instructions (`\divide`) does not even have an equivalent in standard LaTeX. The inx expressions can be used in arguments to macros (the `calc` package doesn't employ category code changes to achieve its goals)


title: xetex: setting a font only for the text

text: I am using               \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{Ubuntu}      to change the "text" font in my latex document. However this has messed up some math equations and things like               \mathbf{E} \exp \sin \cos      are also displayed using the font for the text which makes it look ugly and inconsistent with the rest of equation. Is there a way to fix this so that the above specified font is only used for text and not anywhere in the equations?


title: Unequal space between paragraphs and header-footer

text: As you can judge from the page below, the vertical space between the text and the header line and the text and the footer line is not equal..... ![enter image description here](http://i.stack.imgur.com/96AOt.png) This is much more prominent in a PDF reader so I am trying to get equal space. How do I accomplish this using these settings?               \documentclass[12pt,a4paper,english,openany,oneside]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{-2}     \setcounter{tocdepth}{1}          \makeatletter          \pdfpageheight\paperheight     \pdfpagewidth\paperwidth          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[includeheadfoot,margin=1.5cm]{geometry}     \usepackage{etoolbox}     \usepackage{calc}     \makeatletter     \pretocmd{\@part}{\gdef\parttitle{#1}}{}{}     \pretocmd{\@spart}{\gdef\parttitle{#1}}{}{}     \makeatother          \usepackage{lipsum}     \usepackage[Bjornstrup]{fncychap}          \usepackage[nouppercase,headsepline,footsepline,automark]{scrpage2}     \clearscrheadfoot     \clearscrheadings     \chead{}     \cfoot{}     \ihead{headertext}     \ohead{\parttitle}     \ifoot{\rule{0pt}{\ht\strutbox+\dp\strutbox}\leftmark}     \ofoot{\rule{0pt}{\ht\strutbox+\dp\strutbox}\thepage}     \pagestyle{scrheadings}          \usepackage{url}     \usepackage{pdfcolmk}     \usepackage{graphicx}     \usepackage{tikz}     \providecommand{\HUGE}{\Huge}% if not using memoir     \newlength{\drop}% for my convenience          \makeatother          \usepackage{hyperref}


title: global confusion

text: Simply put, when should I care if something is global or not? What does this really mean? If my package, for example, provides               \newcommand*{\setfooter}[1]{\def\mypackage@footer{#1}}      And I later use `\mypackage@footer` inside the package, is it correct that i used `\def` and not `\gdef`? To append to `\maketitle`, why do i use `\gappto{\maketitle}{\thispagestyle{fancy}}` (`\gappto` is from `etoolbox`, equivalent to `\g@addto@macro`) rather than simply `\appto`, when both seem to work? (from this answer)


title: copy figures and "input"ed LaTeX source files from absulute directories to a local one

text: For example, In my `main.tex` I use               \input{/home/certain-directory/chapter-1.tex}      and               \input{/home/another-directory/chapter-2.tex}      I also have some figures included by their absolute paths in my `/home/results-directory`. **Question:** Are there any tools available for copying the source with figures to another directory (with sub-directories to hold the figures)? Such that we can compile on another PC without manually editing the absolute paths.


title: Manipulating sortname field in biblatex

text: I provide certain bibliography entries with the option `frg` to achieve a bit of a different format than for the rest of my entries. Among other things, I want to have them sorted by editor instead of by author. My idea was to automatically copy the `editor` field to the `sortname` field to achieve this, so I used the following code in my `bbx`-file:               \newbool{cbx:frg}     \DeclareEntryOption{frg}[true]{\csuse{bool#1}{cbx:frg}}%     \AtDataInput{%       \ifbool{cbx:frg}{%          \savename*{editor}{\bbx@blah}%          \restorename{sortname}{\bbx@blah}%        }{}%     }%      but this does not seem to work.


title: Create groupplot 3 x 6

text: I asked a similar question before: Create 2x2 groupplot with +1 plot to the side? For that time using the subfigure environment wasn't a problem. But I do not want to use the subfigure environment now, so I am looking for a different solution. The plot I want to create is:               |-----------------|     |        | Plot 4 |     | Plot 1 |--------|      |        | Plot 5 |     |-----------------|     |        | Plot 6 |     | Plot 2 |--------|      |        | Plot 7 |     |-----------------|     |        | Plot 8 |     | Plot 3 |--------|      |        | Plot 9 |     |-----------------|      Plot 1,2,3 have namely the same x-axis (and for those interested it is a impulse response plot), as well as the plots 4,..,9 (which are bode plots, magnitude + phase). Does anyone have any idea? I think groupplots should be extend to have some tabular capabilities. If you are looking for a minimal example I don't have really one since I do not know how to create this but the code of the solution of my previous question might get you started, http://tex.stackexchange.com/a/117685/15360 ps. btw the solution does not necessarly have to be using the groupplot environment. The main reason I use groupplot very often because I know then that the alignment is good. Also when you show the x- and ylabels aswell as the ticks of x and y. So it is meanly about that the alignment is correct.


title: Set width of a custom environment

text: I'm trying to make a letter template (I don't want to use the existing one) and I am trying to make an environment for the adress at the top. I want it to be a certain width and located to the right part of the page, but aligned left. I can not figure out how to do it. Creating custom layouts and templates overall in LaTeX has brought me much headache. I tried to do something like this:               \newenvironment{head}     {\leftskip=2cm}     {\leftskip=0cm}      But it doesn't work. :/


title: How to draw a scheduling scheme?

text: I would like to draw an arbitration scheduling scheme. I tried to draw one with xfig, but the result is... not so nice ;-): ![enter image description here](http://i.stack.imgur.com/0AZ0G.jpg) Does anyone know a good way to draw this in LaTeX? The result don't have to be exactly like my example. I also tried the `pgfgantt` package, but don't know how to change the right border from the bar of "Master 3"...               \begin{ganttchart}[vgrid, hgrid]{15}     \ganttbar{Master 1}{7}{9} \\     \ganttbar{Master 2}{2}{4} \\     \ganttbar{Master 3}{5}{6} \ganttbar{}{10}{10} \\     \ganttbar{Master 4}{11}{13}     \end{ganttchart}


title: How to align this table fit the page-width?

text: I want to align this table. This is mycode               \documentclass[a4paper, 12pt]{article}     \usepackage[left=15mm,right=20mm,top=20 mm,bottom=20mm]{geometry}     \usepackage{lipsum}     \usepackage{longtable}     \begin{document}     \lipsum[1]     \begin{longtable}{|p{10.8 cm}|p{6 cm}|}     \hline      \multicolumn{1}{|c|}{\textbf{\textit{Solve}}}&\multicolumn{1}{|c|}{\textbf{\textit{Result}}} \\     \hline       &\\      &\\      &\\      &\\      &\\      &\\     &\\      \hline      \end{longtable}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Lywu2.jpg) How to align this table fit page width when I change my set up in `geometry?`


title: Tikz snake arrows

text: As suggested by the manual, I use the following code the draw snake lines. I defined a `snake arrow/.style`, it works perfect when I apply it to a single `edge`'. But it does not work if I apply it to a grouped `\draw` or `\path`.               \documentclass[a4paper,12pt]{amsart}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{arrows,calc,decorations.pathmorphing}     \tikzset{snake arrow/.style=     {->,     decorate,     decoration={snake,amplitude=.4mm,segment length=2mm,post length=1mm}}     }     \begin{document}          \begin{tikzpicture}       \foreach \i in {0,...,4}{       \node (p\i) at (2\i, 4\i+1){}; % random node       }       \draw%[snake arrow] %this does not work       (p0) edge[snake arrow] (p1)% this works       (p2) edge (p4);     \end{tikzpicture}          \end{document}


title: "etc." abbreviation macro gives error when used in caption

text: I've been using the abbreviation macros for i.e., e.g., and etc. that are provided in this post. However, I just discovered that the etc. macro, and a similar one I made for et al. both cause errors when used inside a caption. When I compile the code below, I get an error `Argument of \@caption has an extra }`. Is there a way to modify the macro to fix this? Thanks.               \documentclass{article}     \usepackage{caption}          \usepackage{xspace}     \newcommand*{\eg}{e.g.\@\xspace}     \newcommand*{\ie}{i.e.\@\xspace}          \makeatletter     \newcommand*{\etc}{%         \@ifnextchar{.}%             {etc}%             {etc.\@\xspace}%     }     \makeatother          \begin{document}          \begin{figure}     \caption{Me \etc} % This causes problems     \label{}     \end{figure}          \end{document}


## Question How can I prevent the label / frame to be split from source code in minted? What I am talking about is this: ![enter image description here](http://i.stack.imgur.com/vc8fq.png) ## MWE mwe.tex:               \documentclass[a5paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[margin=2.5cm]{geometry} %layout     \usepackage{minted} % needed for the inclusion of source code          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \inputminted[linenos, numbersep=5pt, tabsize=4, frame=lines, label=n-damen.py]{python}{n-damen.py}     \end{document}      n-damen.py:               #!/usr/bin/env python     # -*- coding: utf-8 -*-          def get_next(n, i, damen_pos):         for i in range(n):             candidates  = set(list(range(n)))             candidates -= set(damen_pos)             candidates -= set(list(range(damen_pos[i]+1)))             candidates  = list(candidates)             if len(candidates) > 0:                 damen_pos[i] = candidates[0]                 return i, damen_pos             else:                 damen_pos = damen_pos[0:i] + [0]*(n-i)                 i -= 1          def is_attacked(damen, x, y):         """ Wird das Feld (x,y) von einer der Damen angegriffen? """         for dy, dx in enumerate(damen[:y]):             if dx == x or dy == y or abs(x-dx) == abs(y-dy):                 return True         return False          def finde_loesung(n):         """ Platziere n Damen so auf einem n x n Feld,             sodass sich keine Damen schlagen.          """         # damen[i] ist die x-position von Dame i in Zeile i         damen = [0]*n         i = 1         solutions = []         while 0 <= i < n:             while not is_attacked(damen, damen[i], i):                 if i == n-1:                     yield damen                     break                 i += 1             i, damen = get_next(n, i, damen)          def alle_loesungen(n):         generator = finde_loesung(n)         return list(generator)          print(len(alle_loesungen(11)))      Compile it like this:               pdflatex -shell-escape mwe.tex -output-format=pdf


title: Datetime capitalize month

text: I'm using the `datetime` package. How could I have a date format with the month name in capital letters?               \usepackage{datetime}     % some code here     \newdateformat{mifecha}{Bilbao, a \THEDAY~de \monthname[\THEMONTH] de \THEYEAR}     \mifecha\date{\today}      Gives me: > Bilbao, a 15 de noviembre de 2013 But I would like: > Bilbao, a 15 de Noviembre de 2013 I have tried the command `\capitalisewords` without success, but maybe it's because I should use a combination of `\expandafter` commands or something related.


title: How can I perform a simple file search in LaTeX?

text: I'm looking to improve my `gitinfo` package by reducing the amount of setup needed. For this, I want to be able to search for a file in the current directory, then the parent, then the grandparent ... until either (a) I find the file [OK] or (b) find a directory called `.git` [Error message a] or (c) fall off the top of the file system tree [Error message b]. I've tried nesting `\InputIfFileExists`, but that only gives me a fixed maximum number of levels. Sorry, I really don't have a clue as to the simplest approach; so pointers to useful packages to use or copy would be a good option, rather than predigested answers (though these, obviously, would be very welcome). * * * Having done a little more reading, finding a directory might be a bit more difficult, so finding a file `.git/description` would do.


title: List of Updates available in TexLive utility the same every time

text: For some reason I keep getting the same available updates every time I open TexLive Utility. I update all of them (200mb worth of updates) and after getting the message that it was successful, I close TexLive, and when I open again the same updates are there available as if I had not just updated them. I am using TexLive Utility Version 1.17, on Mac OSX 10.8.5.


title: Setting a new Float at the exact place in the code

text: I am using the following code for reporting algorithms.               \usepackage{caption}     \floatstyle{ruled}     \newfloat{Algorithm}{thp}{lop}     \floatname{Algorithm}{Algorithm}     \newcommand{\listofAlgorithms}{\listof{Algorithm}{Algo List}}     .....               Here my explanation 1          \begin{Algorithm}[!ht]     \begin{verbatim}     here my algo 1     \end{verbatim}     \caption{Encrypt}     \end{Algorithm}          Here my explaination2          \begin{Algorithm}[!ht]     \begin{verbatim}     here my algo 2     \end{verbatim}     \caption{Encrypt2}     \end{Algorithm}      However sometimes the represented algorithm is not placed at the same place than in the code. What I mean is that it is going on the next page, leaving the text above. I would like to keep the same code but with algorithms at the exact place. That is to say that breaking algorithm between would be possible 2 pages is possible. How can I do it? Indeed, on my example, it is displayed as such on the pdf:                Here my explanation1      Here my explanation2      here my algo1      here my algo2      I do not want to refer the algorithm to a special place.


title: Minion Pro and Monospace Font

text: This is more a typography question than a TeX one, but can anyone recommend me a good monospaced font that blends well with Minion Pro?


title: Vertical space between chapter title and top in book document class

text: Does anyone know how to change the distance between a chapter title (or table of contents title, or...) and the top of the page, when using the book document class? I'm satisfied with the rest of the typesetting, so I want to do this with minimal intervention.


title: set x axis text labels from data file in pgf plots

text: Here is the MWE:               \documentclass{article}          \usepackage{pgfplots, filecontents}     \pgfplotsset{compat=1.8}          \begin{filecontents}{horizontal.dat}     Name Self PR ST PA CO TO     RS 95.8 87.8 94.6 99.2 87.4 91.9     MS 99.2 84.6 91.1 100.0 91.0 91.0     SM 83.4 65.6 72.2 62.5 77.4 71.4     \end{filecontents}          \begin{document}          \pgfplotstableread{horizontal.dat}{\horizontal}     \begin{tikzpicture}[scale=1]         \begin{axis}[                 ybar,                 xtick=data,                 xticklables from table={\horizontal}{Name}             ]             \addplot table [             x=Name,           y=TO] {\horizontal};                  \addplot table [             x=Name,           y=Self] {\horizontal};         \end{axis}     \end{tikzpicture}          \end{document}      All I am trying to do is draw a bar chart with whatever appears in under Name as X axis, whatever appears in Self as data for 1st bar and whatever appears in TO as data for 2nd bar. So, against RS on X axis, there will be two bars. One for 95.8 and the other for 91.9, etc. It keeps telling me RS is not a floating point number! How do I solve this?


title: sets and enclosing braces

text: How can I denote a set of numbers with curly braces around them (curly braces are usually the standard for sets in mathematical textbooks). I tried the following:               $d={3, 2, 2, 1, 1, 1}$      Tex rendered the text without the curly braces


title: \overrightarrow with garamond: gap in the arrow

text: Typesetting `$\overrightarrow{OQ}$` yields a very unpleasant gap in the arrow when used with garamond. Here's a minimal working example that shows the problem. It looks okay without the garamond line.               \documentclass{article}     \usepackage[garamond]{mathdesign}         \begin{document}     \[\overrightarrow{OQ}.\]     \end{document}      This is clearly an unwanted feature. Is it possible to fix this? (discarding garamond is not an option, I've already typeset and printed several hundreds of pages with it, and I want uniformity in my documents for my students).


title: no citations / bibliography after updating biblatex from 1.7 to 2.2

text: I am using MacTex and Latexian to write my thesis. I use `biblatex` for my bibliography and everything worked fine until I discovered that I can change the Alphabetic-labels with `/DeclareLabelalphaTemplate`. I got the idea from here: Biblatex alphabetic style like [Smith, 2005] Since that only produced "unknown control sequence" in my thesis and in the minimal example of the answer to the question posted above. Here is an example based on the question from above and what I use in my thesis:                   \documentclass{scrartcl}     \usepackage[utf8]{inputenc}      \usepackage[ngerman]{babel}     \usepackage[babel,german=quotes]{csquotes}     \listfiles     \usepackage[backend=biber,style=alphabetic,maxalphanames=1]{biblatex}     \addbibresource{testbib.bib}          \renewcommand*{\labelalphaothers}{}          \DeclareLabelalphaTemplate{       \labelelement{         \field[final]{shorthand}         \field{labelname}         \field{label}       }       \labelelement{         \literal{,\addhighpenspace}       }       \labelelement{         \field{year}       }     }          \begin{document}     \cite{Leroy1978a,Leroy1978b}     \citeauthor{Witt1991}     \footcite{Schmidt-Ott1993}     \printbibliography     \end{document}      testbib.bib contains:               @article{Leroy1978a,     author = {Leroy, Rodney L.},     journal = {Corrosion-NACE},     keywords = {Inhibitor,Zink},     mendeley-tags = {Inhibitor,Zink},     number = {3},     pages = {98--109},     title = {{Chelate Inhibitors for Zinc and Galvanized Products}},     volume = {34},     year = {1978}     }     @article{Leroy1978b,     author = {Leroy, Rodney L.},     journal = {Corrosion-NACE},     keywords = {Inhibitor,Zink},     mendeley-tags = {Inhibitor,Zink},     number = {4},     pages = {113--119},     title = {{Polythioglycolate Passivation of Zinc}},     volume = {34},     year = {1978}     }     @book{Witt1991,     address = {D\"{u}sseldorf},     author = {Witt, C. A.},     edition = {2. Auflage},     isbn = {3870171715},     keywords = {Inhibitor,Zink},     mendeley-tags = {Inhibitor,Zink},     publisher = {Aluminium-Verlag},     title = {{Korrosionsinhibitoren f\"{u}r Aluminium, Blei, Kupfer und Zink}},     year = {1991}     }     @phdthesis{Schmidt-Ott1993,     author = {Schmidt-Ott, K.},     school = {Staatliche Akademie der Bildenden K\"{u}nste Stuttgart},     title = {{Reinigung von Silberoberfl\"{a}chen}},     type = {Diplomarbeit},     year = {1993}     }      I tried to solve that by updating `biblatex` from 1.7 to 2.2 and biber to 1.2. Now I don't get "unknown control sequence" anymore but I don't get any bibliography either. My citations are now printed as the citation-keys. The log-file including the file-listing says:                  *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)     biblatex.sty    2012/08/17 v2.2 programmable bibliographies (PK/JW/AB)     biblatex2.sty    2012/08/17 v2.2 programmable bibliographies (biber) (PK/JW/AB)     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)       logreq.sty    2010/08/04 v1.0 xml request logger       logreq.def    2010/08/04 v1.0 logreq spec v1.0       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)          url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.       blx-dm.def     alphabetic.dbx     biblatex-dm.cfg     blx-compat.def    2012/08/17 v2.2 biblatex compatibility (PK/JW/AB)     biblatex.def         standard.bbx    2012/08/17 v2.2 biblatex bibliography style (PK/JW/AB)     alphabetic.bbx    2012/08/17 v2.2 biblatex bibliography style (PK/JW/AB)     alphabetic.cbx    2012/08/17 v2.2 biblatex citation style (PK/JW/AB)     biblatex.cfg          english.lbx    2012/08/17 v2.2 biblatex localization (PK/JW/AB)     TSWLatexianTemp_000053.bbl      ***********               LaTeX Warning: There were undefined references.               Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                TSWLatexianTemp_000053     (biblatex)                and rerun LaTeX afterwards.      When I run `biber` on it manually I get:               ERROR - Cannot find control file 'TSWLatexianTemp_000005.bcf'! -      did you pass the "backend=biber" option to BibLaTeX?      I don't know what's wrong because the `bcf`-file is in the same folder as the rest and I used `backend=biber`. Do you know a way to fix this without downgrading `biblatex` and not using `/DeclareLabelalphaTemplate`?


title: Two column problem

text: I'm trying to replicate a certain part of a scanned book. However, I'm unable to get two columns, which have enumeratation on the left, line of the right column which is in the parallel with first (part of sentence or a) line of the left part, and are without indentation. I tried with ''parcolumns'', aligning was good, but I was unable to get enumerate to work, also the biggest problem was to turn **off** indentation. I could _fake_ enumeration, but it would be good if I don't have to. **;)** I made screenshot. I'm grateful for any help. ![a busy cat\]\(!\[a busy cat](http://i.minus.com/iz5pLRLxpz2cO.png)


title: Remove numbers in bibliography

text: I want to remove the numbers in the bibliography. For example: > FERREIRA, L. P. (Org.). O fonoaudiólogo e a escola. São Paulo: Summus, 1991. without number. I am trying `\bibitem [] {Askey}`, but `[]` appears in the document. Can someone tell me how this is done?               \documentclass{article}     \begin{document}      Resultados obtidos foram utilizado: Askey (1985),$^{\cite{Askey}}$     \begin{thebibliography}{99}         \bibitem [] {Askey} ASKEY, R.; WILSON, J.           \emph{Some Basic Hypergeometric Polynomial that Generalize Jacobi Polynomial}.            Memoirs of the American Mathematical Society, v. 54, p. 1-55, 1985.      \end{document}


title: How should I create complex objects using xtemplate?

text: Consider the following trivial example:               \documentclass{article}     \usepackage{xtemplate}          \ExplSyntaxOn     \DeclareObjectType { test } { 10 }     \ExplSyntaxOff          \begin{document}     oh, nose!     \end{document}      > >     ERROR: xtemplate error: "bad-number-of-arguments" >   >     --- TeX said --- >     ! >     ! Bad number of arguments for object type 'test'. >     ! >     ! See the xtemplate documentation for further information. >     ! >     ! For immediate help type H <return>. >     !...............................................   >   >     l.8 \DeclareObjectType { test } { 10 } >   >     --- HELP --- >     From the .log file... >   >     |''''''''''''''''''''''''''''''''''''''''''''''' >     | This is a coding error. >     | >     | An object may accept between 0 and 9 arguments. >     | You asked to use 10 arguments: this is not supported. >     |............................................... >   * * * As we know, TeX only formally supports macros that take up to 9 arguments:               \def\TooLong#1#2#3#4#5#6#7#8#9{haha!}      When necessary in the past, we've gotten around this by daisy-chaining these:               \def\macro{\@macro@a}     \def\@macro@a#1#2#3#4#5#6#7#8{(something with 8 arguments)\@macro@b}     \def\@macro@b#1#2#3#4#5#6#7#8{(something with 8 more arguments)}      The use of `\macro` would now necessarily eat 16 tokens from the input stream. Obviously, having so many arguments has been superseded in the 'modern era' by the use of key-value arguments:               % ... \usepackage{expl3} ... \ExplSyntaxOn ...     \keys_define:nn { test } {       option-1 .tl_set:N = \l_test_key_a_tl,       option-2 .tl_set:N = \l_test_key_b_tl,       option-3 .tl_set:N = \l_test_key_c_tl,       % ...     }      Even though a command using this key-value interface would only consume one token—the group containing the user's key-value settings—the logical understanding is that `test` takes some `n` arguments—potentially all of them required (`option-n .value_required:`). This logical understanding that an object has `n` user-definable attributes is something that is valued across the design layers. The document designer isn't going to care that TeX can only take 9 arguments because of some in-borne (and mostly arbitrary) restriction on macro definitions. In reality it won't matter: these arguments will be absorbed via a saner and more maintainable key-value system. How should the responsible role convey the idea that some object has more than 9 qualities? * * * If desired, I may bring the general question up on LaTeX-L, but a suggestion of what to do 'for now' will be appreciated as an accepted answer. :) * * * ### Example Use Case I am building a modular (and thus extensible) resume/cv solution, and I'd like to model it after the fantastic `exsheets` package. To do so, I need to use the templating idea. Consider an employment record object. I'll note, per the discussion, that not all of these elements are required.   1. Job Title   2. Company   3. Company Title   4. Company Link   5. Field   6. Level of Technicality   7. Start date   8. End date   9. Related Technologies   10. etc. Forgive me for not being able to conjure up more than nine 'real' elements, but I hope I'm getting the idea across. Note that the document designer _is_ the one who decides which arguments are mandatory and which are not; this selection should not be limited (a discussion for LaTeX-L). I want to take this opportunity that the pure idea of a mandatory argument--- just considering the words, here---doesn't imply that it's a positional argument. That would get _awful_. But that is certainly a discussion rather than a proper question. I'll prepare a proper question / proposal for LaTeX-L when I don't need to do so on company time, though `:)`


title: Aligning a Tikz Picture in line with the surrounding Text

text: I'd like to align a Tikz Picture in line with the surrounding Text. Here is a MWE Example:               \documentclass[a4paper,10pt]{article}     \usepackage{tikz}     \usetikzlibrary{arrows,chains,matrix,positioning,scopes}          \makeatletter     \tikzset{joinlabel/.code=\tikzset{after node path={%     \ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%      edge[every join]#1(\tikzchaincurrent)\fi}}}     \makeatother           \tikzset{>=stealth',every on chain/.append style={join},          every join/.style={->}}          \begin{document}          Text, more text        \begin{tikzpicture}[start chain] {      \node[on chain] {$0$};      \node[on chain] {$A$} ;      \node[on chain, joinlabel={node[above] {$\scriptstyle\varphi$}}] {$B$};      \node[on chain, joinlabel={node[above] {$\scriptstyle\psi$}}] {$C$};      \node[on chain] {$0$}; }     \end{tikzpicture}     text and more text go here...     \end{document}      Here's the Output: ![An Output!](http://i.stack.imgur.com/D4UwM.png) To make things more explicit: I am looking for a solution that does not change the code much but however lets me make align the TikZ picture in line with the surrounding Tikz. Code taken from: This code is taken from here -- Stephan Kottwitz's TeXamples. (I have some very bad work-arounds that I got to know when I posted it on chat. I may compile them and write them up as a CW answer.)


title: How do I fix "roman.sty not found" using LaTeX?

text: I've been using Texmaker on Ubuntu 12.04 for a while now. I've editing several documents and especially resumes. However, I've recently been experiencing several problems with LaTex and Texmaker, starting from the upgrade to Ubuntu 12.10. Every time I try to run the file, I have the same error message :               ! LaTeX Error: File `roman.sty' not found.     Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)     Enter file name:     ! Emergency stop.     <read *>     l.3 \moderncvtheme[grey,roman]{classic}     ^^M     *** (cannot \read from terminal in nonstop modes)     Here is how much of TeX's memory you used:     3985 strings out of 493485     55137 string characters out of 3143526     154265 words of memory out of 3000000     7282 multiletter control sequences out of 15000+200000     4403 words of font info for 15 fonts, out of 3000000 for 9000     957 hyphenation exceptions out of 8191     42i,0n,53p,787b,152s stack positions out of 5000i,500n,10000p,200000b,50000s     ! ==> Fatal error occurred, no output PDF file produced!      This problem really just started when I upgraded Ubuntu from 12.04 to 12.10. During the installation process, I've been notified about "some packages" removal but I don't know which ones. I've tried to remove all the `.tex` files and packages I have and performed a new installation. The problem is still the same. Here is a relevant part of my LaTeX document for where it errors out on:               \documentclass[10pt,a4paper,roman]{moderncv}          \moderncvtheme[grey,roman]{classic}                     \usepackage[utf8]{inputenc}     \usepackage[scale=0.95]{geometry}     \setlength{\hintscolumnwidth}{2cm}     \AtBeginDocument{\setlength{\maketitlenamewidth}{10cm}}     \AtBeginDocument{\recomputelengths}      I've also asked this question on Tex.se


title: Absolute positioning of an image without overlaying the text

text: The following will position an image at the specified page coordinates.               \documentclass{article}          \usepackage{lipsum}     \usepackage[demo]{graphicx}     \usepackage[absolute,overlay]{textpos}     \setlength{\TPHorizModule}{1mm}     \setlength{\TPVertModule}{1mm}          \begin{document}          \lipsum[1-3]     \begin{textblock}{20}(80,100)     \includegraphics{foo}     \end{textblock}          \end{document}      However, in this case, the image will be overlaid on top of the text. Not what I want. What I do want is something that looks more like what you get from this code.               \documentclass{article}          \usepackage{lipsum}     \usepackage[demo]{graphicx}          \begin{document}          \lipsum[1]          Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at,     tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy     pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa     ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Mae-     cenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum.     Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla     \begin{center}     \includegraphics{foo}     \end{center}     vitae enim. Pellentesque tincidunt purus vel magna. Integer non enim.     Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cur-     sus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum     pellentesque felis eu massa.               \end{document}      In this case, the image does not overlay the text and instead the paragraph is split and a clearing is made to fit the image. I would like to do something which produces this effect but do so using something more like what `textpos` does. In other words, I would to say to LaTeX to put an image at a particular position on the page but to produce a clearing around that image where no text is allowed.


title: Mid-paragraph drop cap / float (lettrine)

text: I'm trying to typeset drop caps, but I have some instances where I need a drop cap to be mid-paragraph. I'm picturing something like:                /\  *Some multiline text     /==\ starts here and goes     below, eventually  ending     up below.  Now, the  next     sentence  is   associated     with the marker  'B'  but     lies  in  the  same para-     |`D) graph.  *Left it is,     |,D) the  second  marker,     dropped below the line on     which  this  sentence had     began.      In this case, it's not strictly a drop cap in the sense of being the first letter of a word in the paragraph, but rather I'm wanting some reliable and simple way to typeset something like the above. Clearly, the `lettrine` package was the first place I looked, but it always forces a paragraph and doesn't really let you tie a drop cap to a particular word or sentence in the paragraph in this sense. After looking through many of the questions about `lettrine`, I came to the conclusion that there are plenty of caveats here; for example, `lettrine` doesn't seem to do very well across page breaks. I suppose what I really want is just some way of making a rectangular float flush with the left edge that is   * associated with a particular point in the text (a la `todonotes`), always starting on the same line;   * always a certain number of lines deep (in my case, 2);   * careful not to split across page boundaries;   * automatically given the correct width (with letters like m or numbers like 15 using more space than letters like i or numbers like 2).


title: pgfplots: plot smaller range of table and still use enlargelimits=true

text: I am using pgfplots to plot two simple (x,y)-plots of the same data from a table file. The first plot shows all of the data points and in the second plot I want to zoom in on some specific range of the data. However when I use `xmin` and `xmax` to restrict the range the first and last point gets placed on the axis box. I want to add a little space between the axes and the points so I try to set `enlargelimits=true` but then points outside the range gets shown and are not clipped away as I thought they would be. Is there a way to do this without having to copy the desired data-point into a new table? Heres an example of what I try to do: I have the data file `plotdata.dat`:               # plotdata.dat     x   y     0   0     1   1     2   4     3   9     4   16     5   25     6   36     7   49     8   64     9   81     10  100     11  121     12  144      And my latex document looks like this:               \documentclass[11pt]{article}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[xmin=1, xmax=11, enlargelimits=true]     \addplot[only marks] table[x index=0, y index=1] {plotdata.dat};     \end{axis}     \end{tikzpicture}          \end{document}      Then even though `xmin=1` the plot shows also the `x=0` point. I don't want to just set the axis limits so that only the range is shown but instead ignore points outside the range...


How to remove the unbalanced white space below the top rule of the formatted output? ![enter image description here](http://i.stack.imgur.com/fbBn3.png)               \documentclass{article}     \usepackage[a4paper,margin=25mm]{geometry}     \usepackage{xcolor,showexpl}          \usepackage[active,tightpage]{preview}     \PreviewBorder=3pt     \PreviewEnvironment{LTXexample}          \lstset     {         language={[LaTeX]TeX},         basicstyle=\scriptsize\ttfamily,         keywordstyle=\color{blue}\bfseries,         backgroundcolor=\color{yellow!50},         numbers=none,         frame=single,         rframe=single,         tabsize=1,         pos=r,         explpreset={%         },     }          \usepackage{amsmath}     \begin{document}          \begin{LTXexample}     \begin{equation}     E=mc^2     \end{equation}     \end{LTXexample}          \begin{LTXexample}     \begin{align}     ax^2+bx+c             & = 0\\     ax^2+bx              & = -c      \end{align}     \end{LTXexample}          \end{document}


title: Preamble vs. external style file - same code doesn't work in the later

text: I'm experiencing the following issue when using `todonotes` along with `TikZ` and its `externalize` library. If my document contains no `\todo`'s then it compiles just fine and seems like the externalization of TikZ does it trick. However, once there are `\todo`'s in the document, then some of them fail the compilation. If I surround such a problematic `\todo` as follows:                \begingroup       \tikzexternaldisable       \todo{Note's content}%       \tikzexternalenable       \endgroup      Then the compilation runs smoothly again. So, the next step is naturally to re-define the `\todo`. Thus, in the preamble I added the following:               \makeatletter     \renewcommand{\todo}[2][]{%       \begingroup \tikzexternaldisable       \@todo[#1]{#2} \tikzexternalenable       \endgroup}     \makeatother      and everything seems to be right. The problem I have is that I stuffed all my preamble in a separated `.sty` file. When I move the last snippet to the `.sty` file then the problem occurs again. (The last snippet is coming from this answer). Otherwise, the `.sty` file loads correctly, as far as I can tell. **Summary:** My question is why the _same_ code when it is in the "main" file behaves as expected, but when it is moved to a style file which is loaded (correctly) it doesn't work anymore. I guess it has nothing to to in particular with neither `TikZ` nor `todonotes` - but I mention them as they caused a problem in my case.


title: Setting Space Between Paragraph in A Custom Class

text: I've been trying set space between paragraph to 3 spaces with 1.5 line spacing on text (based on my thesis requirement). Searching around, looks like everyone suggest either using the `parskip` package or writing your own class. Since this is my thesis, I'm thinking about learning to write my own class, but I haven't find a good documentation on that (can't afford TeX Companion). Looking inside the `artikel3` class suggested in `parskip` documentation I see that there's two possibility of doing this, and I'm not sure which one is right:   1. Redefine the paragraph like this:              \newcommand*\paragraph{         \@startsection{paragraph}{4}{\z@}%             {3.25ex \@plus1ex \@minus.2ex}%             {-1em}%             {\normalfont\normalsize\ParaFont}}        2. Setting up the `\parskip` to 3 spaces and then setting it back to normal for all other elements (ToC, list, title, etc) I have a hunch that it is the second option, but I can't see how I can set 1.5 line spacing with 3 line spacing between paragraph. I have zero clue on how to do this. Could you help me? Thanks before.


title: How can I have Beamer number slides in a frame title?

text: More or less what it says on the tin: I want something like:               \frame{\somecounterforpagenumbers : My Title}      I assume there is a built in counter that I can reference here, but I'm not sure what it is.


title: How to fix the alignment of table cells?

text: While trying to improve the answer for another question, I am stuck at getting proper horizontal alignment. The alignment problem is evident in second column. It also shows up as difference in spacing of element 16 and 12(or 26) from the arrow. Why is this happening and how can I fix it? ![Incorrect alignment](http://i.stack.imgur.com/gxdGg.png)               \documentclass{standalone}          \usepackage{amsmath}     \usepackage{array}              \newsavebox{\boxname}         \newcolumntype{B}{@{}>{\begin{lrbox}{\boxname}}c%                              <{\end{lrbox}{\fbox{\unhbox\boxname}}}}         \newcommand{\dummy}{\phantom{01}}         \newcommand{\lastelem}[1]{\multicolumn{1}{B}{#1}}          \begin{document}          \begin{tabular}{c @{ } B *2{ @{$\to$} B }}         1 & \lastelem{\dummy}                                     \\         2 & \dummy              & \lastelem{16}                   \\         4 & \lastelem{\dummy}                                     \\         5 & \dummy              & 12             & \lastelem{26}  \\     \end{tabular}          \end{document}      Interestingly the problem is present when I try,               \begin{tabular}{c}         \lastelem{\dummy} \\         \fbox{\dummy} \\     \end{tabular}      This gives "reverse" indentation than the previous table. However the following works fine.               \begin{tabular}{B}         \lastelem{\dummy} \\         \dummy \\     \end{tabular}      Output of other cases, ![Another example](http://i.stack.imgur.com/l3bfZ.png)


title: Aligning a sample resume

text: I have two questions:   1. How do you edit the tex file so that "Contact information" and "DEPT" are aligned horizontally?    2. What do you need to edit so that "Education" isn't cut off to the left of the paper? I'm not using a4 paper but I'm using a standard 8.5 x 11 inches paper.  `resume.cls` can be found at http://linux.dsplabs.com.au/files/p54-resume/resume.cls I'm using this photo also: http://upload.wikimedia.org/wikipedia/commons/c/c3/BallonKathedrale01_edit.jpg Although the picture is fairly big, isn't there a way so that the left column stays on the page? Please save the picture as "hot-air-balloon" in order for tex to compile. Thanks.               \documentclass[margin,line]{resume}          \usepackage{color}     \usepackage{fancyhdr}      \pagestyle{fancy}     \usepackage[latin1]{inputenc}       \usepackage[english,danish]{babel}     \usepackage{amsfonts}      \usepackage[T1]{fontenc}     \usepackage{graphicx,wrapfig}     \usepackage{url}     \usepackage[colorlinks=true, a4paper=true, pdfstartview=FitV,     linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}     \pdfcompresslevel=9               \renewcommand{\familydefault}{\sfdefault}                        \addtolength{\oddsidemargin}{0.20in}         \addtolength{\evensidemargin}{0.20in}         \addtolength{\textwidth}{-0.45in}              \addtolength{\topmargin}{.5in}         \addtolength{\textheight}{-1.75in}                    \catcode`~=11       \newcommand{\urltilde}{\kern -.15em\lower .7ex\hbox{~}\kern .04em}     \catcode`~=13                           \begin{document}          \lfoot{LEFT}     \cfoot{CENTER}     \rfoot{\thepage \hspace{10mm}}     \fancyhead{}     \renewcommand{\headrulewidth}{0pt}                         {\sc \Large \bf  NAME HERE}     \begin{resume}         \vspace{0.5cm}         \begin{wrapfigure}{R}{0.6\textwidth}             \vspace{-1cm}            \begin{center}            \includegraphics[width=0.6\textwidth]{hot-air-balloon}            \end{center}             \vspace{-1cm}           \end{wrapfigure}                      \section{\mysidestyle \color{red} \bf Contact\\ information}%\vspace{2mm}         DEPT \\          PHONE: 123-456-7890 \\                   \section{\mysidestyle\color{red} \bf Education}             \textbf{SOME DEGREE from SOME SCHOOL.}   MORE DETAILED INFORMATION WILL BE MENTIONED HERE.             \end{resume}      \end{document}


title: Change caption of figure for references

text: I changed the caption of my figures running the following command (I'm using the `babel` package):               \addto\captionsngerman{\renewcommand{\figurename}{Abb.}}      If I use `\autoref{$LABEL}` to reference to the figure, however, it still shows the original figure caption, instead of "Abb. X". Do I have to renew the command for `refname` as well? If so, would that change anything, if I now use `\ref` on something else besides my figures? Here the MWE:               \documentclass[a4paper]{IEEEtran}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{hyperref}          \addto\captionsngerman{\renewcommand{\figurename}{Abb.}}          \begin{document}          \autoref{fig:foobar}          \begin{figure}[htb]         \caption{BarFooCamp}         \label{fig:foobar}     \end{figure}          \end{document}


title: Why doesn't a \foreach variable work in \draw in an \axis?

text: I'm finding some weird behavior with TikZ's `\foreach` within an `\begin{axis}` environment. This works:               \foreach \x in {-2,-1,...,2} {       \addplot[thick, domain=0.05+(\x*2-1)*pi/2:+(\x*2+1)*pi/2-0.05] (x, {tan(deg(x))});      }      but this doesn't:               \foreach \x in {-2,-1,...,2} {       \draw (\x,-5) -- (\x,5);     }      It gives the error               ! Undefined control sequence.     <argument> \x                    ,-5     l.771     \end{axis}      Here's the really weird part: it only fails when the axis has defined bounds. For example, here's a MWE that works (but doesn't draw anything):               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}       \begin{axis} % [ ymin=-3, ymax=3, xmin=-5, xmax=5]         \foreach \q in {-2,-1,...,2} {           \draw (axis cs: \q,-5) -- (axis cs: \q,5);         }       \end{axis}     \end{tikzpicture}     \end{document}      but removing the comment causes it to fail. Why is this and how can I prevent it? (My end goal is to draw five segments of the tangent function and their verical symptotes.)


title: How to add vertical rule between two horizontally aligned minipages?

text: I need to have a vertical rule between the text and an image. `paracol` package breaks across pages. I do not want to have that.               \documentclass[a5paper]{scrbook}          \usepackage{adjustbox}     \usepackage{tikz}               \begin{document}          \begin{adjustbox}{valign=t,minipage={.45\textwidth}}     \[     a=b     \]     \end{adjustbox}     \begin{adjustbox}{valign=t,minipage={.45\textwidth}}     \begin{tikzpicture}     \draw [thick,red] (0,0) rectangle (2,1);     \end{tikzpicture}     \end{adjustbox}          \end{document}      With `multicol` the text and image alignment is wrong.               \documentclass[a5paper]{scrbook}     %     \usepackage{tikz}     \usepackage{multicol}     \setlength\columnseprule{.4pt}     \begin{document}     \begin{multicols}{2}     \[     a=b     \]     \columnbreak     \begin{tikzpicture}     \draw [thick,red] (0,0) rectangle (2,1);     \end{tikzpicture}     \end{multicols}     \end{document}


title: Compiling the latex->dvips->ps2pdf with dvips -Ppdf

text: The documents I create heavily depend on postscripts (I use `pstricks` quite a lot). I've had some issues with resolution, and it's been recommended to try using `dvips -Ppdf`. But recently, I've been using the `animate` package, which happily now supports compiling along the `latex->dvips->ps2pdf` route. I've now noticed in several places, such as the `animate` package documentation and in a solution to Move-around box in PDF display, that the switch `-Ppdf` not be used. But nothing is said why this should not be done. Could someone explain why/when this switch should not be used?


title: Create CV with moderncv in relative folder

text: I'm trying to create my CV in LaTeX but got into problems. I'm using Ubuntu 12.04, the package `texlive-latex-extra` includes the 2008 version of moderncv, but I want to use the newer 2012 moderncv version which has it's differences. I cannot uninstall that package because some packages there are used by other documents. I've downloaded the new moderncv from CTAN but I'm having trouble using it. I'm trying to organize my document using the following layout:   * `style/` <- moderncv files, *.sty, *.cls, etc.   * `publish/` <- pdflatex output.   * `cv.tex` <- My CV.   * `publications.bib` <- My publications.   * `face.png` <- Photo.   * `Makefile` <- Makefile :P In my Makefile I have:               all:         TEXINPUTS=./style//:$TEXINPUTS pdflatex -halt-on-error -output-directory ./publish/ ./cv.tex     clean:         rm -rf ./publish/*      The problem comes here: When I try to `make` I got several errors:               (./style/moderncv.cls     Document Class: moderncv 2012/08/10 v1.1.3 modern curriculum vitae and letter document class     ! LaTeX Error: File `size11.clo' not found.     ! LaTeX Error: File `etoolbox.sty' not found.     ! LaTeX Error: File `ifthen.sty' not found.     ! LaTeX Error: File `xcolor.sty' not found.     ! LaTeX Error: File `fontenc.sty' not found.     ! LaTeX Error: Unknown option `T1' for package `fontenc'.      An I don't know how to fix them. I can compile the document if I move the `style/*` files (moderncv classes) to the same directory as the `cv.tex` file but that's a mess. What am I missing?