title: How to ignore missing images when compiling?

text: I can't find a pdf figure that goes into a latex document that I am trying to edit. Obviously with the file missing, the document can't compile. Is there some way to edit the file without recompiling, or otherwise without relying on each of the figures being in the same directory (or whatever specified path)? The figures are included via `\includegraphics`


title: biblatex philosophy autocite multiple sources wrong placement of optional text

text: I am trying to cite several authors but using the "cf." as a free text So far I came up with:               \usepackage[english]{babel}     \usepackage{csquotes}% Recommended               \usepackage[backend=biber,style=philosophy-verbose]{biblatex}          % ...      bla bla\autocites[cf.][376]{PlantingaResponseToAdams}[cf.]{craig1994adams}[and cf.][162-176]{Flint1998}.      which results in ![enter image description here](http://i.stack.imgur.com/B2RNw.png) How do I get the "cf." where it should be? Or is it common to place a "cf." only for the first of the multiple sources?


title: Adding a manually installed package/program manual into `texdoc`

text: I have manually installed a package/program related to LaTeX (it's `writer2latex` aka `w2l` in this case). Is there a way how to make `texdoc w2l` open the PDF documentation of this package?


title: Packages to plot functions such as the logistic function (or "S-shaped function")?

text: Is it possible to plot the graph of an S-shaped function in LaTeX? If yes, then how? Which packages should I use for that?


title: Discourage linebreaks before/after math

text: I would like to discourage linebreaks right before and after inline math displays, such that               now let $f$ be the function that connects      acts similar to               now let~$f$~be the function that connects       It's not important to me that the behaviour is exactly the same - in fact, I only want to discourage linebreaks at these locations, not necessarily completely forbid them. I have a long document with lots of inline math (as a matter of fact, my Masters thesis) and I would like to see things like                                     ... now let f     be the function that connects ...      and                                       ... now let     f be the function that connects ...      less often, without having to edit every single occurence (which would be several hundred manual edits).


title: Tabular, parbox, vertical alignment

text: What i want to achieve is really simple: I want to be able to align cell content at the top (which is the default behavior of tabular) while being able to manually break lines (and anything you could normally do in a paragraph environment). For instance: ![enter image description here](http://i.stack.imgur.com/EDeFh.png) I would expect this to work:               \begin{tabular}{|r|l|}         \hline         \parbox{3cm}{\raggedleft First Line\\SecondLine} &         \parbox{5cm}{\textbf{First line goes here}\\                      Second line would be here\\                      And so on, ...\\                      ... until the very end.} \\         \hline     \end{tabular}      However this produces the following result: ![enter image description here](http://i.stack.imgur.com/vQDkk.png) The left parbox is vertically centered. During the past two days, I've searched the whole LaTeX community in vain for a solution to this problem. I've come across solutions consisting in the use of raisebox that force you to manually grope for the right difference value depending on the content of the two cells. That is no solution to me. I want this to be automatic as it is in any document editor... I would be very surprised if LaTeX didn't allow this kind of construction! Regards


title: Problems with \ifthispageodd

text: I am using KOMA script for my document. Occasionally, I have a float that is wider than text width, and I want the float to be pushed into the **outer** margin. This is why I defined `\widefloat` command, that checks if page is odd using command `\ifthispageodd` and depending on the results pushes the float left or right. This works fine when float is in the middle of the page. However, when float is thrown into the next page, `\ifthispageodd` gives wrong result. Could you please tell me how to fix this up? MWE: the first float is correctly pushed into outer margin, the second is pushed into inner margin.               \documentclass[11pt]{scrbook}     \usepackage{tikz,lipsum}          \newcommand{\widefloat}[1]{%     \ifthispageodd{\makebox[\textwidth][l]{#1}}{\makebox[\textwidth][r]{#1}}}          \begin{document}          \lipsum[1]          \widefloat{     \begin{tikzpicture}     \draw (0,0) rectangle (16cm,10cm);     \end{tikzpicture}}          \lipsum[3]          \widefloat{     \begin{tikzpicture}     \draw (0,0) rectangle (16cm,10cm);     \end{tikzpicture}}          \lipsum[2]          \end{document}      ![enter image description here](http://i.stack.imgur.com/98HDr.png) ![enter image description here](http://i.stack.imgur.com/y9EOO.png)


title: frame around image and caption

text: I have an image wich is beside some text, and I would want to frame the image and the caption. My code is for now:               \begin{wrapfigure}[4]{r}{8cm}         \centering          \fbox{\includegraphics[width=7cm]{Encodages}}         \caption[Différents encodages]{Différents types d'encodage pour «Wikipédia, l'encyclopédie libre»}     \end{wrapfigure}     BLABLABLA TEXT      but the fbox is only around the image. How could I do that?


title: Why does a curve connecting a node from a column to another node in another column disappear?

text: I want to show items, each with a curve pointing to a point on the right figure. But in the following code, the curves disappear. What is wrong?               \documentclass{beamer}     \usepackage{graphicx}     \usepackage{pst-node}          \newsavebox\IBox     \savebox\IBox{\includegraphics[scale=.5]{example-image-a}}          \psset{xunit=.1\wd\IBox,yunit=.1\ht\IBox,arrows=->,linecolor=red}          \begin{document}     \begin{frame}[t]{Hello World and Hello Universe}     \begin{columns}[t]         \begin{column}{.3\linewidth}         \begin{enumerate}             \item<2-> \rnode[r]{HWl}{Hello World}\nccurve{HWl}{HWr}             \item<3-> \rnode[r]{HUl}{Hello Universe}\nccurve{HUl}{HUr}         \end{enumerate}         \end{column}         \begin{column}{.7\linewidth}         \begin{center}             \begin{pspicture}[showgrid=top](10,10)             \rput[bl](0,0){\usebox\IBox}             \pnode(2,4){HWr}             \pnode(5,8){HUr}             \end{pspicture}         \end{center}         \end{column}     \end{columns}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/PJUdU.gif)


title: addition in \coordinate

text: > **Possible Duplicate:**   >  Do I have to declare explicitly that point? How do you define a new `\coordinate` as the sum of two other coordinates? I often end up with a setting such as this               \coordinate (leg) at (4, 1.5);          \coordinate (base) at (leg)+(0,0);     \draw (base) +(-.1,-.1) rectangle +(.1,.1);     \draw (base) + (.1, 0) node[right]{analyticity region};           \coordinate (base) at (leg)+(0,-.5);     \draw (base) circle(.2);     \draw (base) + (.1, 0) node[right]{neighbourhood};       But the two blocks are drawn on top of each other. Apparently you can not do something like `\coordinate (A) at (B)+(C)`, can you recommend a workaround? I would prefer no ugly constructions with `pgfmath`, or at least to hide them. Thanks


title: How to convert text in a PDF file from fonts/text to outlines?

text: I have PDF graphic in which I would like to have fonts removed. All other properties of the file should remain (such as size, etc). The output file should be in PDF as well. The text itself should be converted to outlines. Can I do it at the moment of including the PDF figure in pdftex document? Or can I perhaps use a magic ghostscript command?


title: Citing @inbook with biblatex: how to put authors/editors before book title?

text: I'm trying to cite a chapter from a book using biblatex:               @inbook{ ,        crossref{X}     }        @book{X,     }.      This produces a citation in this layout:                   Authors. Title. [...] In: Title. Authors. [...]      I need to swap the Title and Authors in the "In:" reference, i.e. to get                   Authors. Title. [...] In: Authors. Title. [...]      Any idea? Thanks.


title: Changing order of fields for @incollection / @inbook

text: For one chapter references (`@inbook{Ramberg2013`) I need to change the field order. The field order after `In:` needs to be `Initials. Surname of author/editor(s) followed by ed/eds. if relevant. _title in italics_ . Place: publisher, pages.` The MWE:               \RequirePackage[l2tabu, orthodox]{nag}          \documentclass[a4paper,oneside,11pt]{memoir}           \usepackage{xpatch,etex,setspace,excludeonly,ifthen,etoolbox,logreq,makeidx,cals,graphicx}     \usepackage[british]{babel}     \usepackage[style=british]{csquotes}     \usepackage[style=authoryear,firstinits=true,uniquename=init,natbib=true,backend=biber,indexing=true,defernumbers=true,isbn=false,doi=false,dashed=false]{biblatex}          \addbibresource{ThesisMWE.bib}            % Bath Harvard formatting     \renewcommand*{\newunitpunct}{\addcomma\space}     %      \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\adddot\nopunct\isdot}     \DeclareFieldFormat[book,collection]{title}{{\mkbibemph{#1}\adddot\nopunct\isdot}}     \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}     \DeclareFieldFormat[online]{urlseen}{\mkbibbrackets{#1}}          % Change to address: publisher     \renewbibmacro*{publisher+location+date}{%       \printlist{location}%       \iflistundef{publisher}         {\setunit*{\addcomma\space}}         {\setunit*{:\space}}% ADDED       \printlist{publisher}%       \setunit*{\addcomma\space}%       \usebibmacro{date}%       \newunit}          % Initials always following surname in author field     \DeclareNameFormat{author}{%       \ifnumequal{\value{listcount}}{1}         {\ifnumequal{\value{liststop}}{1}           {#1\addcomma\addspace #4\addcomma\isdot}           {#1\addcomma\addspace #4}         }         {\ifnumless{\value{listcount}}{\value{liststop}}           {\addcomma\addspace #1\addcomma\addspace #4}           {\addcomma\addspace\bibstring{and} #1\addcomma\addspace #4\addcomma\isdot}         }%       }           % Custom strings     \DefineBibliographyStrings{british}{%     edition = {edn\adddot\nopunct\isdot},     in = {In\addcolon},     urlseen = {Accessed\addspace}     }          % Remove parentheses from year     \renewbibmacro*{date+extrayear}{%           \begingroup%             \clearfield{month}%             \clearfield{day}%         \ifboolexpr{%           test {\iffieldundef{date}}           and           test {\iffieldundef{year}}         }%           {\iftoggle{bbx:nodate}{\printtext{%             \midsentence\bibstring{nodate}}}{}}%           {\printtext{\printdateextra}}%            \endgroup}%     %        % Dot after year     \renewcommand{\labelnamepunct}{\adddot\space}          % Custom volume(number) and pp. xx-yy     \renewbibmacro*{volume+number+eid}{%       \printfield{volume}%       \printfield{number}%       \setunit{\addcomma\space}%       \printfield{eid}}          \nocite{*}          \begin{document}          \printbibliography     \end{document}      The `.bib` file:               @collection{9Barnes1995,         Address = {Cambridge},         title = {The Cambridge Companion to Aristotle},         Editor = {Jonathan Barnes},         Publisher = {Cambridge University Press},         Year = {1995}     }          @inbook{Ramberg2013,     title={For the Sake of His Own Generation: Rorty on Destruction and Edification},     author={Bjorn Torgrim Ramberg},     year={2013},     address={London},     publisher={Bloomsbury Academic},     booktitle={Richard Rorty: From Pragmatist Philosophy to Cultural Politics},     editor={Alexander Gr{\"o}schner and Colin Koopman and Mike Sandbothe}      }               @online{SEP-MP,         Author = {Dancy, Jonathan},         Editor = {Edward N. Zalta},         Subtitle = {The Stanford Encyclopedia of Philosophy},         Title = {{M}oral {P}articularism},         Edition="Spring 2009",         Url = {http://plato.stanford.edu/archives/spr2009/entries/moral-particularism/},         Urldate = {2010-08-06},         Year = {2009}     }          @INPROCEEDINGS{Garside2008,       author = {Darren Garside},       title = {{U}sing {S}ocial {N}etwork {A}nalysis to analyse speaking \& listening         in {P}hilosophy for {C}hildren communities of enquiry},       booktitle = {British Educational Research Association Annual Conference},       year = {2008},       address = "Edinburgh: Edinburgh Napier University",       date="2-5 September 2008"     }          @inbook{1Phillips2010,         year={2010},         Crossref = {9BaileyHandbook2010},         booktitle={The Sage Handbook of Philosophy of Education},         title={What is Philosophy of Education?},         author={D. C. Phillips},              pages={3--20}        }          @inbook{1Barrow2010,         year={2010},         Crossref = {9BaileyHandbook2010},         booktitle={The Sage Handbook of Philosophy of Education},         title={Schools of Thought in Philosophy of Education?},         author={Robin Barrow},              pages={21--36}       }          @book{9BaileyHandbook2010,       title={The Sage Handbook of Philosophy of Education},       editor={Richard Bailey and Robin Barrow and David Carr and Christine McCarthy},       year={2010},       publisher={Sage Publications Ltd},       address={London}     }          @book{9BaileyHandbook2012,       title={Mock entry to demonstrate difference between edited and authored entries},       author={Richard Bailey and Robin Barrow and David Carr and Christine McCarthy},       year={2010},       publisher={Sage Publications Ltd},       address={London}     }


title: How to add an author name or copyright symbol on each page in memoir class?

text: I am using the `memoir` document class to write my first book in calculus. How I can display my name, for example, on each page?


title: Using a big brace over multiple lines - multiple lines left of it

text: I am super helpless, I wanna do the following: Mathmode, 2 lines on the left, a brace over both (using array) and than I wanna have 3 lines on the right. A small example:               \begin{align*}     \left.     \begin{array}{l l}     &H_0 : \theta  \in \theta_0\\     &H_1: \theta \in \theta_1 \end{array}      \right \rbrace \theta \in \Theta  \      \theta_1 \cup \theta_0 = \Theta \       \theta_1 \cap \theta_0 = \empty      \end{align*}      Whereever there is only a spaceholder `\` i rather wish a new line. Any idea how to do that?


title: How to display simply an addition in latex

text: Given A, B, C _any_ string or maths code, given + _any_ operation of my choice, I would like to display a really simple calculation - here addition. On below the result I would like to obtain :                A     +B     __      C      I can't do it here, but please see the underline as right under B (not my above ugly displaying). A, B and C should be aligned. The operator is displayed on the left of B. Actually, I am wondering if there is a package for that, to perform this simply ?


title: Slow math typing

text: I have been using LaTeX for quite some time, but I find the math writing to be a bit frustrating. It seems to take me a relatively long time to code-write long math expressions, and sometimes it's hard to see where `{` start and end. I am interested in writing as fast as possible. Is code-typing each symbol really the fastest way? Is there any good program (in the spirit of Word's MathType) that enables producing math expressions by button clicking, that you recommend?


title: Remove section numbers only from title

text: I would like to remove the section number from only the title, but display it in the figures and equations in the section. My document class is `scrartcl` and I am using `sectsty` I tried               \section*{Problem 1}      but then all my figures and equations become 0.1,0.2... instead of 1.1, 1.2.. How does one go about this?


title: How can I specify a long list of math operators?

text: The preambles of my LaTeX documents often include many many lines of `\DeclareMathOperator` instructions, e.g.               \DeclareMathOperator{\Rep}{Rep}     \DeclareMathOperator{\Tet}{Tet}     \DeclareMathOperator{\Maps}{Maps}     \DeclareMathOperator{\Diff}{Diff}      Is there a nice way to _map_ some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?


title: Declaring a math operator for every capitalized word?

text: I've declared a lot of math operators lately, e.g. `\DeclareMathOperator{\Hom}{Hom}, \DeclareMathOperator{\End}{End}` and so forth. This is getting a bit annoying and seems automatable: what I'd really like is to have this behavior for every capitalized word, e.g. if I type `\Foo` in a document I'd like for this to be interpreted as a math operator without having to specify it in advance. Is there an easy way to do this?


title: Subfigures, long caption side by side

text: Hello I have really big problems with positioning my sub figures. I have long caption text and I think that is the reason why they don't fit side by side. What can I do for solving this problem. [t] didn't work.               \begin{figure}[t]         \centering         \begin{subfigure}[t]{.5\textwidth}             \centering             \includegraphics[width=12cm]{FIGURE1}             \caption{Really long text over 2 lines}             \label{fig:bestC1Sitting}         \end{subfigure}%               \begin{subfigure}[t]{.5\textwidth}             \centering             \includegraphics[width=12cm]{FIGURE2}             \caption{Really long text over 2 lines}             \label{fig:bestC1Standing}         \end{subfigure}          \end{figure}      I also don't get what's the point of \textwidth or linewidth? Are this relative positions? I would be really glad if somebody can help me.


title: Animated graphic in front of frame title?

text: I am using the beamertemplate and I have one frame:               \frame{     \frametitle{Title text}     \begin{textblock*}{50mm}[1,1](15.9cm,9cm)     \includegraphics[width=1.9cm]{thumbnail.png}     \end{textblock*}     \vspace{-0.5cm}     \hspace{1cm}     \animategraphics[scale=0.4,autoplay]{8}{movie}{000}{200}          }      The problem is, that the animatedgraphic has white space at the top, which is covering my title text. So how can I tell LaTex, that the title text is "more important" and that the title is in front of the animatedgraphic? So that the animatedgraphic is in the background?


title: Could not parse Input

text: I have a problem implementing a `tikzpicture`. I want to plot the Swiss Performance Index, which I was able to do time ago. Unfortunately I deleted the code from my thesis because I thought I will not include that diagram. Meanwhile I think I will use that in the thesis. But I get error messages all the time and I have no clue what I did different. Here is my code:               \begin{tikzpicture}         \begin{axis}[width=0.9\textwidth,height=0.4\textheight]                  \addplot table[x=Datum, y=Schluss] {SMIhist.txt};                   \end{axis}          \end{tikzpicture}      The inputs I have in the `SMIhist.txt` file. The entries look like this:               Datum    Schluss          2013-09-09  7'537.70         2013-09-06  7'549.36     .     .     .      As I mentioned before: it worked once but now I get the following error messages:               ./Vorlage.tex:494: Package PGF Math Error: Could not parse input '7'537.70' as      a floating point number, sorry. The unreadable part was near ''537.70'..          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...            NOTE: coordinate (2013-09-09,7'537.70) has been dropped because it     is unbounded      (in y). (see also unbounded coords=jump).       What do I do wrong?


It looks very beautiful! I'd love it! See http://www.science4all.org/le- nguyen-hoang/integer-programming/ Do someone know what software can draw this kind of figure? I'm interested in learning it. Thanks! ![enter image description here](http://i.stack.imgur.com/qTQDO.png)


title: Listings numbering doesn't restart

text: I have problem with listing numbering from this topic. Numbering isn't restarted, it just continues.               \AtBeginDocument{%       \renewcommand{\thelstlisting}{%         \ifnum\value{subsection}=0           \thesection.\arabic{lstlisting}%         \else           \ifnum\value{subsubsection}=0             \thesubsection.\arabic{lstlisting}%           \else             \thesubsubsection.\arabic{lstlisting}%           \fi         \fi       }     }      For subsubsection 4.2.1 it should start from the beginning but it continues so I'm getting 4.2.1.2 (because there is one previous listing). ![enter image description here](http://i.stack.imgur.com/uqT2o.png) ![enter image description here](http://i.stack.imgur.com/HVHFs.png)


title: standalone not working properly with PStricks?

text: I'm using Vaucanson-G to render automata (I also use TikZ, but here, I _want_ Vaucanson-G). Because it uses PStricks although I want to compile with pdflatex, I have put all my automata in separated files, which I `dvilatex|dvipdf|pdfcrop` before `\includegraphics`. It works well, but I thought this was a typical example of use of `standalone` (standalone 2012/09/15 v1.1b). However, the bounding-box is dead wrong. On the following input:               \documentclass{standalone}     \usepackage{vaucanson-g}          \begin{document}     \VCDraw{%       \begin{VCPicture}[-0.9]{(-1.4,-1.4cm)(5.4,1.4cm)}         \State{(0,0)}{A}         \State{(4,0)}{C}         \Initial{A}\Final{C}         \EdgeL{A}{C}{b}         \LoopN[.5]{A}{a + b}         \LoopN[.5]{C}{2a + 2b}       \end{VCPicture}     }     \end{document}      it produces (missing labels on top, too much space below, overall it seems that the BBox is shifted downward) ![Vaucanson-G and standalone](http://i.stack.imgur.com/nlvsX.png) whereas `pdfcrop` produces the expected result: ![Vaucanson-G and pdfcrop](http://i.stack.imgur.com/rgFtI.png) Is there something I can do to get the expected result? Thanks!


title: How to get automatically "origdate" with the date in a citation?

text: I am using `authoryear` with `biblatex`. When, for instance, I type `\parencite[p.6]{gusfield2009}`, I get : > (Gusfield, 2009, p.6) How to get also the `origdate` entry in the citation in order to have : > (Gusfield, [1981] 2009, p. 6)


title: eastern arabic numbers in page numbers

text: I am making a book using `arabtex`, the numbers inside the document are written in eastern arabic format. However the page numbers are in arabic format. How can I make them turn to eastern arabic?


title: Is it possible to create index from an external file?

text: I just have started to write my master thesis dissertation and I want to have an index section. I know about `makeidx` package and `\index{An important word!}` command. However, I was wondering if it's possible to create an external file containing all the words that I want to appear in the index section without using `\index` command in the `.tex` source file. The point is if I'm going to use `\index` command, eventually I will forgot to do so in some points. If it is possible to use an external file, is it also possible to limit the depth of such indexing mechanism? What I mean by _limiting_ is that [as an example] it only index the words if they appear in the subsections (and not in the subsubsection) or index only the first three occurrence in each section. Obviously I can do this with some simple find-and-replace mechanism in a text editor or a script but I was wondering if there is some _LaTeX magic_ for this purpose.


title: How to clearly demarcate frame/slide content when using article class for a beamer document?

text: When I use the article class with beamer, the slides are not clearly demarcated. Rather, the slides just blend in with the document as dot points, headings, and so on. This is fine when I actually want to create a stand-alone document. However, if I'm trying to create some notes to accompany a set of slides, it would be useful to clearly indicate where a slide starts and stops.   * What is a good strategy for clearly demarcating slide content from non-slide content using the article class with beamer?   * For example, how could I add a box around the slide content? ### Minimal example: Here's a minimal example               \documentclass{article}        \usepackage{beamerarticle}     \begin{document}     \begin{frame}{Frame title}     \begin{itemize}     \item A dot point     \item another dot point     \item Another dot point     \end{itemize}     \end{frame}          Some text outside the frame.        \end{document}      Which produces the following: ![enter image description here](http://i.stack.imgur.com/zQuAx.png)


title: Vertical alignment in table

text: I am making a table with LaTeX, and I have trouble with vertical alignment of the texts. When I have `\hline`, the text crosses the line. Here is the code:               \begin{tabular}{lcccc}     \hline\hline      & \textbf{$d_{(O_{1}-Zn/Mg)}(\SI{}{\angstrom})$}       & \textbf{$d_{(O_{2}-Zn/Mg)}(\SI{}{\angstrom})$}       & \textbf{$d_{(O_{3}-Zn/Mg)}(\SI{}{\angstrom})$}       & \textbf{$d_{(O_{\bot}-Zn/Mg)}(\SI{}{\angstrom})$} \\[1mm]     \hline      \textbf{Pure HB-NWs} &  &  &  &   \\     \hline\hline     \end{tabular}      Also I enclosed the undesired result to make my point clear. Please let me know how I can solve this problem. ![enter image description here](http://i.stack.imgur.com/8Qayx.jpg)


title: When to use or avoid grouping?

text: For writing my own TeX code, grouping (`\begingroup`, `\endgroup`) helps on automatically saving and restoring TeX "variables". > (La)TeX "variables" are either macros or registers. The registers can be > counters (integers), dimensions, skips (both fractional numbers with units) > or read/write handlers etc. Note that you can change them inside a group, > i.e. either `{` .. `}` or `\begingroup` ... `\endgroup` or a LaTeX > environment, then their old value is restored at the end of the group > automatically. (Martin Scharrer, How to save variables) On the other hand, grouping is not expandable (since the primitives `\begingroup` and `\endgroup` are not expandable).   1. How is TeX treating grouping? Does TeX only save and restore a specific variable when an assignment to it occurs? It seems when a global assignment (e.g. font assignment: `\fontdimen`, `\hyphenchar`, `\skewchar`; hyphenation assignment: `\hyphenation`, `\patterns`; box size assignment: `\ht`, `\dp`, `\wd`; ...) occurs that TeX omits saving and restoring.   2. ( **EDIT** ) Considering a TeX command using 5 to 10 "variables". In other words, it is temporarily assigning different values to them, for example `\baselineskip=30pt`. Is there any good reason to avoid grouping in this situation? Or should grouping be used here because of above advantage?


title: How to remove background picture from an appendix?

text: in my tex document I have to use a watermark (that's for a degree thesis) so I use this code:               \newcommand\BackgroundPic{     \put(70,-40){     \parbox[b][\paperheight]{\paperwidth}{%     \includegraphics[width=5cm,keepaspectratio]{marca_agua}%     }}}      In the appendix I use `\includepdf` to include some datasheets and the watermark is there. So how can I remove it from the pdfs included in the appendix?


title: Free - dereference - release - delete a newdimen length?

text: Somewhat similar to How to erase/delete a counter, I guess, but for `\newdimen`... So, consider the MWE:               \documentclass{standalone}          \usepackage{tikz}          \begin{document}       \begin{tikzpicture}         \newdimen\dx         \def\mytest{AA}         \typeout{\meaning\dx, \meaning\mytest}       \end{tikzpicture}       \typeout{\meaning\dx, \meaning\mytest}     \end{document}      The code outputs to stdout:               \dimen152, macro:->AA     \dimen152, undefined      I use `tikzpicture` just as a way to group; it is clear from the output, that the reference to the macro locally defined in the group, does not survive outside the group; however, the reference to the length `\dx` created by `\newdimen` did indeed survive. So in case I want to deallocate / dereference `\dx`, such that `\dimen152` "goes back" to the pool of "unused" `\dimen`s (if at all possible), what should I do?


title: Package "mdframed" creating arbitrary gaps in the border

text: I used to define a small environment with the package "mdframed". I've included the package in the following way:               \usepackage[framemethod=tikz]{mdframed}      This is how I've set up the environment:               \newenvironment{bspbox}       [2]       {\begin{mdframed}[linecolor=gray!25, innerleftmargin=3pt, innerrightmargin=3pt, leftmargin=5pt, rightmargin=5pt, skipabove=5pt, skipbelow=5pt, linewidth=0pt, frametitle={Title#2: #1}, frametitlefont=\normalfont\bfseries]}       {\end{mdframed}}      It works okay, but unfortunately, there are some arbitrarily placed gaps interrupting the line / frame. They can appear in various places, but in most cases, it looks like in the following screenshot: ![mdframed- environment](http://i.stack.imgur.com/7iSL6.png) The environment was used in my document in the following way:               \begin{bspbox}{}{}     \lipsum[1]     \end{bspbox}      To sum it all up, this is what the MWE looks like:               \documentclass[a4paper,10pt]{article}     \usepackage[dvipsnames,usenames]{xcolor} % mehr vordefinierte Farben     \usepackage[utf8]{inputenc}     \parindent0pt     \usepackage{tikz}     \usetikzlibrary{mindmap,shadows,trees,positioning,arrows,shapes}     \usepackage[framemethod=tikz]{mdframed}     \usepackage{lipsum}          \newenvironment{bspbox}       [2]       {\begin{mdframed}[linecolor=gray!25, innerleftmargin=3pt, innerrightmargin=3pt, leftmargin=5pt, rightmargin=5pt, skipabove=5pt, skipbelow=5pt, linewidth=0pt, frametitle={Title#2: #1}, frametitlefont=\normalfont\bfseries]}       {\end{mdframed}}          \begin{document}          \begin{bspbox}{}{}     \lipsum[1]     \end{bspbox}          \end{document}      Where lies my fault, why are there those arbitrary gaps interrupting the line?


title: How do I specify a round parenthesis below some text?

text: I need something similar to `\underbrace` but instead of curly brackets, I would like to have normal round horizontal paranthesis below my text. Similar to `\textbottomtiebar` but spanning the whole text. How do I achieve this with tex?


title: bug with page numbers when using soul package

text: I recently ran into a curious bug when using the `soul` package. I managed to boil it down to the following example. The problem is that the page numbers get messed up. In the example below, they should be 1, 2 and 3. In fact, they are 1, 0 , and 1, in that order. It appears (in some cases) that adding blank lines inside a `\hl` environment sometimes causes this problem, and removing the blank lines fixes the problem. As one can check, removing the blank line inside the `\hl{}` fixes the problem in the example below. It is also possible to fix the problem in other ways. Anyway, now that I have discovered this, I can work around the problem in my paper. However, I'm curious as to what is causing this, so I thought I might as well post the question. I didn't try asking the creator of`soul`, which I think is probably unmaintained. The last update was a long time ago. This is with Debian squeeze, using TeX Live 2009 and `soul.sty` version 2.4. I'm using the LaTex function `dummytext` below to generate dummy data courtesy of the kind folks on this site, see Generating dummy text programatically using TeX/LaTeX The specific solution I'm using is by Martin Scharrer.               \documentclass[10pt]{article}     \usepackage{soul}     \usepackage{pgffor}     \usepackage{setspace}     \doublespacing     \newcommand\dummytext[3]{%         \foreach \n in {1,...,#3} {%             \foreach \k in {1,...,#2} {%                 #1%             }%             \\         }%     }     \pagestyle{myheadings}     \begin{document}     \dummytext{HelloWorld}{5}{52}          \dummytext{HelloWorld}{5}{17}     \hl{          x     }     \end{document}


title: In kile, is it possible to Google search a selected text string?

text: For a project I'm working on currently, I need to go through a large bibtex file, checking each of the references. Thus I need to Google search each item. My current method is:   1. copy title,   2. open a new browser window,    3. paste title,   4. search. It seems to me that there could be a more efficient method. Many packages these days admit a "select text/right-click/search in Google" feature, which would save me time. Is there such a feature (or a similar feature) in Kile?


title: How to use a comma in lstlisting keywords?

text: I am creating a language for the _doxygen_ tool. I need to create a set of new keywords. When I try to use the comma in one of them, it does not highlighting. I protect comma with a backslash, but it seems to be useless. Does anyone know how I can use comma in new keywords ? Here is what I have tried.               \lstdefinelanguage{doxygen}%     {         alsoletter={\\,[,],/,*,\,},%         morekeywords=[2]{/**,*/,///,\\brief,\\author,\\date,%                          \\return,\\param[in,out],\\param[in],\\param[out],%                          \\pre,\\post},%         otherkeywords={},%         morestring=[b]"     }      The problem is with the `\param[in,out]` keyword. **[EDIT]** Here is a minimal example               % !TEX TS-program = pdflatex     \documentclass[11pt]{article}          \usepackage[dvipsnames,usenames]{xcolor}     \usepackage{courier}     \usepackage{listings}          \lstdefinelanguage{doxygen}%     {         alsoletter={\\,[,],/,*,\,},%         morekeywords=[2]{/**,*/,\\brief,%                          \\return,\\param[in,out],\\param[in],\\param[out]}     }          \lstdefinestyle{basic}{         basicstyle={\small \ttfamily},         keywordstyle={\bfseries\color{black}},         linewidth={\textwidth}     }          \begin{document}          \begin{lstlisting}[language=doxygen,style=basic]     /**        \brief compute the gcd             \param[in] n the first number       \param[in,out] m the second number and                         and gcd after the function returns       \return terminaison code      */     \end{lstlisting}          \end{document}        Thank you.


title: Alternative symbol sets for footnote marks

text: The `footmisc` package describes 3 additional systems in which one can apply numbering to footnotes in a paper: > bringhurst: ∗, †, ‡, §, ||, ¶. > > chicago: ∗, †, ‡, §, ||, #. > > wiley: ∗, ∗∗, †, ‡, §, ¶, ||. This is in addition to these methods: > arabic numerals: 1, 2, 3, 4, 5. > > roman numerals: I, II, III, IV, V. > > letters: a, b, c, d, e. For my purposes, I think a system such as bringhurst, chicago, or wiley are suitable, because custom symbols are used:   * Arabic numerals appear to frequently throughout my document already.   * I can't find single-character unicode roman numerals exceeding 12. When rendered in XeTex, numbers above (such as "ⅫⅡ") appear with an added space.   * The letters in the alphabet look too much like the text of the document. However, I find that the bringhurst, chicago, or wiley systems has some problems:   * They are limited to 6 or 7 symbols. I need at least 30, if not more.   * They do not appear to follow a logical pattern explaining the order or shape.   * They use symbols such as ¶, § and #, which I think usually carry very different meanings. Are there any other sets of symbols within LaTeX's packages or from unicode which you think could make good footnote marks?


title: Label on a tree edge to a node that has children

text: I have a problem when trying to label an edge that goes to a node that itself has children. Here is what I would like to do:               \begin{tikzpicture}         \node {A}         child { node {B} edge from parent [->] node [left] {\tiny 1} }         child { node {C} edge from parent [->] node [right] {\tiny 2}             child { node {D}  }             child { node {E}  }         }         ;     \end{tikzpicture}      This does not work because, it would appear, Tikz thinks D and E are children of my label. I have tried adding braces in different spots to no avail. So I have attempted a different strategy, given that my labelling needs are not very complicated, and tried this:               \begin{tikzpicture}[act1/.code={\node [above=5mm] {\tiny 1};},                         act2/.code={\node [above=5mm] {\tiny 2};}]         \node {A}         child { node {B} edge from parent [act1,->] }         child { node {C} edge from parent [act2,->]             child { node {D}  }             child { node {E}  }         }         ;     \end{tikzpicture}      `act1` gives just about the right result, but as soon as I use `act2`, the code refuses to compile and gives me an error message I am unable to make sense of: `! Package pgf Error: No shape named is known.` (with two spaces between "named" and "is") Any information about how to do this without resorting to a different package would be really appreciated!


title: How to get black trim markings in memoir when having colored text?

text: When I have colored text it seems that color rubs of on the trim markings when switching page. How can I make all of them black? An example:               \documentclass[showtrims,12pt]{memoir}          \usepackage{blindtext}     \usepackage{color}          \begin{document}     \pageav     \stockaiv     \trimFrame     \medievalpage     \setpagecc{\paperheight}{\paperwidth}{*}     \checkandfixthelayout     \color{red}     \blinddocument     \end{document}      (I had some trouble with making the example but at least it shows what I mean. Feel free to fix it for me if you know how to make it nicer)


title: Play animated graphic when "next slide" is clicked

text: I am giving a presentation and I have included an animatedgraphic in the following way:               \animategraphics[scale=0.4,autoplay]{8}{movie}{000}{200}      As you can see, this is played automatically. But I want to have it in the following way: I use a presentation tool, where I can click on "next slide" and "previous slide". So this tool is just imitating the left cursor and right cursor you would normally use to click to the next / previous slide. How can I tell LaTex to play the animation, when I click on "next slide". Is this possible using a presenter? EDIT: Ignore the presenter, a solution for the right cursor is ok!


title: bibliography is not order by appearances. Have already tried change abbrv to unsrt!

text: I'm very new to Texmaker and BibTeX. Need to get references in the order of appearances in my article, but it keeps showing order of authors. I've found similar questions and tried to change `abbrv` to `unset`, but it doesn't work. Really appreciate for help! I'm using thesis template and as you can see, I've already change style from abbrv to unsrt               \documentclass[master=eelt,masteroption=ei]{kulemt}     \setup{title={The best master thesis ever},       author={First Author\and Second Author},       promotor={Prof.\,dr.\,ir.\ Knows Better},       assessor={Ir.\,Kn. Owsmuch\and K. Nowsrest},       assistant={Ir.\ An~Assistent \and A.~Friend}}     % The following \setup may be removed entirely if no filing card is wanted     \setup{filingcard,       translatedtitle=,       udc=621.3,       shortabstract={Here comes a very short abstract, containing no more than 500         words. \LaTeX\ commands can be used here. Blank lines (or the command         \texttt{\string\pa r}) are not allowed!         \endgraf \lipsum[2]}}     % Uncomment the next line for generating the cover page     %\setup{coverpageonly}     % Uncomment the next \setup to generate only the first pages (e.g., if you     % are a Word user.     %\setup{frontpagesonly}          % Choose the main text font (e.g., Latin Modern)     \setup{font=lm}          % If you want to include other LaTeX packages, do it here.           % Finally the hyperref package is used for pdf files.     % This can be commented out for printed versions.     \usepackage[pdfusetitle,colorlinks,plainpages=false]{hyperref}          %%%%%%%     % The lipsum package is used to generate random text.     % You never need this in a real master thesis text!     \IfFileExists{lipsum.sty}%      {\usepackage{lipsum}\setlipsumdefault{11-13}}%      {\newcommand{\lipsum}[1][11-13]{\par And some text: lipsum ##1.\par}}     %%%%%%%          %\includeonly{chap-n}     \begin{document}          \begin{preface}       I would like to thank everybody who kept me busy the last year,       especially my promotor and my assistants. I would also like to thank the       jury for reading the text. My sincere gratitude also goes to my wive and       the rest of my family.     \end{preface}          \tableofcontents*          \begin{abstract}       The \texttt{abstract} environment contains a more extensive overview of       the work. But it should be limited to one page.            \lipsum[1]     \end{abstract}          % A list of figures and tables is optional     %\listoffigures     %\listoftables     % If you only have a few figures and tables you can use the following instead     \listoffiguresandtables     % The list of symbols is also optional.     % This list must be created manually, e.g., as follows:     \chapter{List of Abbreviations and Symbols}     \section*{Abbreviations}     \begin{flushleft}       \renewcommand{\arraystretch}{1.1}       \begin{tabularx}{\textwidth}{@{}p{12mm}X@{}}         LoG   & Laplacian-of-Gaussian \\         MSE   & Mean Square error \\         PSNR  & Peak Signal-to-Noise ratio \\       \end{tabularx}     \end{flushleft}     \section*{Symbols}     \begin{flushleft}       \renewcommand{\arraystretch}{1.1}       \begin{tabularx}{\textwidth}{@{}p{12mm}X@{}}         42    & ``The Answer to the Ultimate Question of Life, the Universe,                 and Everything'' according to \cite{h2g2} \\         $c$   & Speed of light \\         $E$   & Energy \\         $m$   & Mass \\         $\pi$ & The number pi \\       \end{tabularx}     \end{flushleft}          % Now comes the main text     \mainmatter          \include{intro}     \include{chap-1}     \include{chap-2}     % ... and so on until     \include{chap-n}     \include{conclusion}          % If you have appendices:     \appendixpage*          % if wanted     \appendix     \include{app-A}     % ... and so on until     \include{app-n}          \backmatter     % The bibliography comes after the appendices.     % You can replace the standard "abbrv" bibliography style by another one.          **\bibliographystyle{unsrt}     \bibliography{references}**          \end{document}          %%% Local Variables:      %%% mode: latex     %%% TeX-master: t     %%% End:


title: how to draw tree with a specified width between nodes

text: Below is what picture i want ![enter image description here](http://i.stack.imgur.com/kGwbG.jpg) > Words of level 1: Rule > > Words of level 2: Length Pattern Arcs > > Words of level 3: T1 T2 A1 > > Words of level 4: term_index term pos_tag ne_tag term_index term pos_tag > ne_tag start_index end_index semantic_type > > String of bottom line: 2 [1][][][LOC] [2][][][LOC] -> 1-2:loc-cons Below is my current code, and the picture generated by it.               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{trees}     \begin{document}          \pagestyle{empty}          \begin{tikzpicture}[edge from parent fork down]          \tikzstyle{level 2}=[level distance=1.3cm, sibling distance=10cm]     \tikzstyle{level 3}=[level distance=2.0cm, sibling distance=5cm]     \tikzstyle{level 3}=[level distance=2.0cm, sibling distance=3cm]     \tikzstyle{r}=[rotate=45]          \node {Rule}         child {node {Length}             child {node {2}}         }         child {node {Pattern}             child {node {$T_1$}                 child {node[r] {term\_index}}                 child {node[r] {term}}                 child {node[r] {pos\_tag}}                 child {node[r] {ne\_tag}}             }             child {node {$T_2$}                 child {node[r] {term\_index}}                 child {node[r] {term}}                 child {node[r] {pos\_tag}}                 child {node[r] {ne\_tag}}             }         }         child {node {Arcs}             child {node {$A_1$}                 child {node[r] {start\_index}}                 child {node[r] {end\_index}}                 child {node[r] {semantic\_type}}             }         };               %    \node{2[][][][LOC] [2][][][LOC] \rightarrow 1-2:loc-cons};          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/v3D1a.png) Can anyone help me with this, thanks a lot!


title: Prevent global hyphenation for a specific word

text: I know this is a common question. I want to stop LaTeX splitting the word "Byte". I already searched for the problem and found the solution with `\hyphenation`. I thought `\hyphenation{Byte}` would solve my problem. But unfortunately it doesn't work. I think it has something to do that he probably just uses this for "byte" and not for words that contain it (German example: "Bytestrom", LaTeX splits it By-testrom). The second solution which I found was using `\mbox` with `\newcommand`. I don't like this solution very much. So my questions are:   * Why does `\hyphenation{byte}` not work?    * Is there another way to solve my problem? * * * Example added by Jake:               \documentclass[a5paper]{article}     \usepackage[german]{babel}     \begin{document}     Trying to determine how a special word is hyphenated: Bytestrom.     \end{document}      ![](http://i.stack.imgur.com/jcnzc.png)


title: What commands are there for horizontal spacing?

text: I know that `\:` in LaTeX produces a space when rendered. Are there any alternatives, because my LaTeX renderer doesn't support `\:` (it renders it as text), and there is no help / FAQ that I can find.


title: Are there any embossed fonts?

text: I there some (build in) font like: Fluted Germanica ![enter image description here](http://i.stack.imgur.com/gYh9N.png) Shadowed Germanica ![enter image description here](http://i.stack.imgur.com/m0jra.png) Embossed Germanica ![enter image description here](http://i.stack.imgur.com/VLlAf.png) from Germanica family I would like use for math, so I need characters like `{` too. Or the installing and using `.ttf` file is the only way?


title: Outlined characters

text: How could I produce characters which are outlined when the character itself is in some color. A picture to illustrate what I'm after:   ![enter image description here](http://i.stack.imgur.com/J4V3l.png) The problems with the above are that:   * the outline is of no consistent width around the letter.   * the way I've done it (using tikz with a upscaled black node below the colored one), there is no easy way to control the width of the outline. Do you know of a way to accomplish this with TeX? I am using plain-format with XeTeX, but I'm interested in all ways to accomplish this.


title: Bold font problem while using Russian fonts

text: This refers to my previous question not able to write bold characters using textbf I installed the cm-extra font package but still there is a problem with boldface due to `\usepackage[english,russian]{babel}`.               \documentclass[11pt,table,a4paper]{article}     \usepackage{bold-extra}     \usepackage[T1,T2A]{fontenc}     \usepackage{CJKutf8}     \usepackage[english,russian]{babel}     \usepackage{fancyvrb}     \usepackage{myboldtt}     \def\n{\textbackslash n}     \begin{document}       Regular text. \textbf{Bold}.     \begin{Verbatim}[commandchars=\\\{\}]     %chunk = 1     <<echo=FALSE,results=tex>>=     cat("dataset","\n")     cat("\textbf{dataset}","\n")   # it should be bold      @     \end{Verbatim}     \end{document}      Please help me out in fixing this problem as I'm in great need.


title: Annoying emacs autoformatting in LaTeX mode

text: Typing, for example,               a^3      emacs would automatically change the source (!) to               a³      This causes all sorts of problems with spacing, double superscripts, etc. How can I turn off any such WYSIWYG behaviour? Here is a LaTeX example (copy-paste from emacs)               \begin{equation}       E(M) =  \pm 2\sqrt{\epsilon_0² + 16 t²-8t\epsilon_0}     \end{equation}      If I look at the file with more, I have for the same equation               \begin{equation}       E(M) =  \pm 2\sqrt{\epsilon_0<B2> + 16 t<B2>-8t\epsilon_0}     \end{equation}


title: problem with eqnarray

text: Would you like to help me please i'm a beginner ! what's wrong with my code?               {\setlength{\jot}{0.40 cm}          \begin{eqnarray*}           n^*_{11} & = & \dfrac{n_{1.}\times n_{.1}}{n} \\          & =  & \dfrac{120 \times 120}{200}     \\                    \text{avec}   \quad \sum_{k=1}^{q} n^*_{jk}  &  =  &  n_{j.}   \quad \text{ et}  \quad   \sum_{j=1}^{p} n^*_{jk}   = n_{.k}   \\              n^*_{jk}   & =   & \dfrac{120\times 120}{200}  \\            n^*_{12}   & =   & \dfrac{n_{1.}\times n_{.2}}{n} \\            &                  =    &  \dfrac{120\times 80}{200}  \\            n^*_{21}  &  =         &  \dfrac{n_{2.}\times n_{.1}}{n}  \\            n^*_{21}  & =   &   \dfrac{60\times 120}{200} \\$$          \end{eqnarray*}}      thank you


title: How to change font size in graphics included with \includegraphics

text: I woud like to change the font size of the picture inserted by `\includegraphics`.. have used the scaling 1 and the picture occupies my space, but the font in the picture is very small. How can I change the font size on that picture. scaling it more bigger is not the option. Here is the code:               \begin {figure} [!htb]     \includegraphics[scale=0.95]{pics/Cascaded_control.pdf}     \caption {Cascaded servo control[Len2]}     \label{cascaded}     \end {figure}


title: pgf-umlsd and externalize

text: **What would be the best solution to makepgf-umlsd and externalize compatible?** The latter expects `\end{tikzpicture}` which is "hidden" within `sequencediagram` environment the first provides. I guess I could convert beginning and the ending of the environment into two commands explicitly invoked at the beginning and ending of the `tikzpicture` environment meant to be sequence diagram, but it wouldn't survive `pgf-umlsd.sty` update (i.e. changing environment definition), requiring copy-paste to be redone. Is there any clever way to solve this problem with as minimal effort as possible and avoiding any copy-pasting? Should the package author be convinced to provide some begin-like and end-like commands for use within `tikzpicture` environment?               \documentclass{minimal}     \usepackage[paperwidth=48mm,paperheight=36mm,margin=0pt]{geometry}     \usepackage{parskip}     \usepackage{tikz}     \usepackage{pgf-umlsd}     \usetikzlibrary{external}     %\tikzexternalize     % uncommenting above line gives following error:     % ! File ended while scanning use of \tikzexternal@laTeX@collect@until@end@tikzpicture.     \begin{document}     \null\vfill     \begin{sequencediagram}     \newthread{a}{A}     \newinst[1]{b}{B}     \begin{call}      {a}{call}      {b}{return}     \end{call}     \end{sequencediagram}     \vfill     \end{document}      ![Output of the above document](http://i.stack.imgur.com/OaOAf.png) * * * Let's assume for a moment that author provides three macros (or: we changed pgf-umlsd.sty ourselves):   * `\sdinit` - layers declaration, required before starting `tikzpicture`   * `\sdbegin` - sequence diagram header for use at the beginning of `tikzpicture`   * `\sdend` - sequence diagram footer for use at the end of `tikzpicture` Modifying above listing to use them:               \sdinit     \begin{tikzpicture}     \sdbegin     ...     \sdend     \end{tikzpicture}      makes `externalize` happy, but the output is different. ![Output of the modified document](http://i.stack.imgur.com/Q9DKD.png) Right part of the rightmost box shadow disappeared. Why? What would be the best way to fix it?


title: Syntax error using PGF math function in coordinate

text: I would like to avoid setting too many of the values for the following picture too rigidly. For example, I would like to be able to set the position of point `A` and forever after that be able to retrieve the distance from other points to `A` through the `\path ... let ... in ...` structure. Here's my MWE:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \setlength{\parindent}{0pt}     \begin{document}          \begin{tikzpicture}[x=0.5cm,y=0.5cm]         \draw[help lines,blue!20,step=1] (0,0) grid (12,12);              \draw[fill]  (0,0) coordinate [label=180:Z] (Z) circle (2pt);           %% center of the picture         \draw[fill]  (5,5) coordinate [label=135:Q] (Q) circle (2pt);           %% center of the circle         \draw[fill]  (Q) -- +(  0:7)   coordinate [label=0:A] (A) circle (2pt); %% first point on the circle         %% drawing the circle         \draw[blue]  (A)                       let \p1 = ($ (A) - (Q) $) in                      arc(0:360:{veclen(\x1,\y1)});              %% these lines do work, but I don't want to explicitly state the radius as "7"         %% BEGIN <remove these lines>         \draw  [line width=0.4pt,red]                           (Q) -- +(320:7)                 coordinate (B) circle (2pt);         %% END <remove these lines>              %% after removing the above lines, uncomment the following lines to get error.         %% no matter how I try to tweak these line, I can't get it to work         %% \draw [line width=0.4pt,red]         %%       let \p1 = ($(A) - (Q)$) in         %%       (Q) -- +(320:{veclen(\x1,\y1)})          %%       coordinate (B) circle (2pt);              \draw[purple,line width=0.4pt]                (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                 coordinate [label=center:B] (Bl) circle (6pt);              \draw[blue]                  ($ (B) ! 0.45 ! (Q) $)                coordinate (tC) circle (2pt);              \draw[line width=1.5em,->]               (tC)                let \p1 = ($(tC) - (Q)$) in                   arc ({atan2(\x1,\y1)}:{atan2(\x1,\y1)+90}:{veclen(\x1,\y1)});          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/BXaud.png) After removing the lines I've flagged to be removed and uncommenting the following block of code, I get the following error:               ! Package tikz Error: Giving up on this path. Did you forget a semicolon?.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.30               (Q) -- +(320:{veclen(\x1,\y1)})          ?       In case I'm being unclear about what to remove and what to uncomment, here's the MWE which produces this error.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \setlength{\parindent}{0pt}     \begin{document}          \begin{tikzpicture}[x=0.5cm,y=0.5cm]         \draw[help lines,blue!20,step=1] (0,0) grid (12,12);              \draw[fill]  (0,0) coordinate [label=180:Z] (Z) circle (2pt);           %% center of the picture         \draw[fill]  (5,5) coordinate [label=135:Q] (Q) circle (2pt);           %% center of the circle         \draw[fill]  (Q) -- +(  0:7)   coordinate [label=0:A] (A) circle (2pt); %% first point on the circle         %% drawing the circle         \draw[blue]  (A)                       let \p1 = ($ (A) - (Q) $) in                      arc(0:360:{veclen(\x1,\y1)});              %% PROBLEMATIC LINES         \draw [line width=0.4pt,red]               let \p1 = ($(A) - (Q)$) in               (Q) -- +(320:{veclen(\x1,\y1)})                coordinate (B) circle (2pt);              \draw[purple,line width=0.4pt]                (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                 coordinate [label=center:B] (Bl) circle (6pt);              \draw[blue]                  ($ (B) ! 0.45 ! (Q) $)                coordinate (tC) circle (2pt);              \draw[line width=1.5em,->]               (tC)                let \p1 = ($(tC) - (Q)$) in                   arc ({atan2(\x1,\y1)}:{atan2(\x1,\y1)+90}:{veclen(\x1,\y1)});          \end{tikzpicture}          \end{document}      Why is it just this particular `\path ... let ... in` that's failing? **Incidentally** I don't like how the arrow is oriented. Recently, there was a post on this site which explalined how to correct such arrows. But no matter how much I've searched, I can't seem to find it. Anyone know the link?


title: Draw graphical model with many nodes

text: So I tried to follow the answer in http://stats.stackexchange.com/questions/16750/software-for-drawing-bayesian- networks-graphical-models with limited success. My problem is   1. How do I incorporate multiple variables without writing down all of them (eg. just say $\pi_1 - \pi_k$ or similar)   2. How do I incorporate 'ghost nodes' as seen for the ones connecting to $\pi_3, \pi_k$. ![enter image description here](http://i.stack.imgur.com/5PacG.jpg)


title: Space generated by theorem labels (XeTeX)

text: With the `thmtools` package, combining `\begin{foo}[name=bar,label=x]` with the line `\newtheorem{foo}{Foo}` in the preamble typesets to Foo xxx (bar), where xxx is a number. After the (bar) there is an extra space which is about 6pt. To remove it completely, as I have seen at Extra space before labeled theorem body with thmbox or thmtools+thmbox, it is sufficient to add % after the `label=x]` part. The point is, if I add any number of `\,`s after it, they get completely ignored, whereas `\hspaces`, `\quad`s and `\qquad`s don't. Try typesetting:               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[a4paper]{report}     \usepackage[italian]{babel}     \usepackage{thmtools}     \newtheorem{foo}{Foo}          \begin{document}     \begin{foo}[name=bar,label=x]\hspace{5cm}     With the space.     \end{foo}     \begin{foo}[name=bar2,label=x2]     Without the space.     \end{foo}     \begin{foo}[name=bar3,label=x3]\,\,\,\,\,\,\,\,     With 8 \verb"\,"s.     \end{foo}     \end{document}      On my computer, the `\,`s don't produce any space, whereas the `\hspace` does. Why does that happen? Adding % after the label seems not to eliminate the space. Since this has generated a couple of overful \hboxes, I'd like to know how I can remove it.               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[a4paper]{report}     \usepackage[italian]{babel}     \usepackage{thmtools}     \newtheorem{foo}{Foo}          \begin{document}     \begin{foo}[name=bar,label=x]%     With the \verb"%".     \end{foo}     \begin{foo}[name=bar2,label=x2]     Without the \verb"%".     \end{foo}     \end{document}      ![The code above typesetted](http://i.stack.imgur.com/Ly0Mf.png)


title: Why does (La)TeX give errors now and again for seemingly no reason?

text: Now and again, when I've written some new 'code' (plain text, equations, special commands etc.) in my LaTeX editor and I compile the file, I get an error. Normally when I get an error, I check the code that has subsequently been highlighted by the editor. However, in the case of these 'unexplained errors', no code highlighted (and as with all 'red' errors, the code doesn't compile). So, I compile again and... it works. Normally I just carry on writing but this time I thought I'd try to find out if anyone else has experienced this and if anyone know why it happens. **Edit 1** Here's a screenshot of the error that was obtained following Kurt's advice ![enter image description here](http://i.stack.imgur.com/6WhQ3.png)


title: Draw a surface from scattered curves

text: I have a few curves determined by some points. I need to plot the surface that they determine. That is, I have this ![enter image description here](http://i.stack.imgur.com/BlB7b.png)               \begin{tikzpicture}[scale=0.8]          \begin{axis}[%     width=12cm,height=12cm,     xmin=0,     view={40}{10},     ]          \addplot3 [blue]     table[row sep=crcr]{        1         0   -5.5829\\        1    5.0000    1.3534\\        1   10.0000    7.7874\\        1   15.0000   13.7943\\        1   20.0000   19.4479\\        1   25.0000   24.8223\\        1   30.0000   29.9933\\        1   35.0000   35.0408\\        1   40.0000   40.0512\\        1   45.0000   45.1203\\        1   50.0000   50.3570\\        1   55.0000   52.8128\\        1   60.0000   55.5201\\        1   65.0000   58.4550\\        1   70.0000   61.6084\\        1   75.0000   64.9836\\        1   80.0000   68.5942\\        1   85.0000   72.4631\\        1   90.0000   76.6207\\        1   95.0000   81.1053\\        1  100.0000   85.9621\\        1  105.0000   91.2436\\        1  110.0000   97.0097\\        1  115.0000  103.3281\\        1  120.0000  110.2751\\        1  125.0000  110.8469\\        1  130.0000  112.1175\\        1  135.0000  114.0816\\        1  140.0000  116.7429\\        1  145.0000  120.1141\\        1  150.0000  124.2169\\        1  155.0000  129.0815\\        1  160.0000  134.7475\\     };          \addplot3 [blue]     table[row sep=crcr]{        2         0   -5.3375\\        2    5.0000    1.5442\\        2   10.0000    7.9298\\        2   15.0000   13.8943\\        2   20.0000   19.5114\\        2   25.0000   24.8552\\        2   30.0000   30.0019\\        2   35.0000   35.0318\\        2   40.0000   40.0320\\        2   45.0000   45.0995\\        2   50.0000   50.3447\\        2   55.0000   52.7353\\        2   60.0000   55.3870\\        2   65.0000   58.2737\\        2   70.0000   61.3845\\        2   75.0000   64.7214\\        2   80.0000   68.2971\\        2   85.0000   72.1331\\        2   90.0000   76.2595\\        2   95.0000   80.7136\\        2  100.0000   85.5402\\        2  105.0000   90.7911\\        2  110.0000   96.5258\\        2  115.0000  102.8115\\        2  120.0000  109.7240\\        2  125.0000  110.2733\\        2  130.0000  111.5190\\        2  135.0000  113.4555\\        2  140.0000  116.0861\\        2  145.0000  119.4233\\        2  150.0000  123.4884\\        2  155.0000  128.3115\\        2  160.0000  133.9314\\     };          \addplot3 [blue]     table[row sep=crcr]{        3         0   -6.0748\\        3    5.0000    0.9575\\        3   10.0000    7.4763\\        3   15.0000   13.5574\\        3   20.0000   19.2753\\        3   25.0000   24.7045\\        3   30.0000   29.9213\\        3   35.0000   35.0058\\        3   40.0000   40.0445\\        3   45.0000   45.1332\\        3   50.0000   50.3808\\        3   55.0000   52.8484\\        3   60.0000   55.5586\\        3   65.0000   58.4873\\        3   70.0000   61.6252\\        3   75.0000   64.9753\\        3   80.0000   68.5508\\        3   85.0000   72.3737\\        3   90.0000   76.4738\\        3   95.0000   80.8881\\        3  100.0000   85.6606\\        3  105.0000   90.8424\\        3  110.0000   96.4915\\        3  115.0000  102.6739\\        3  120.0000  109.4633\\        3  125.0000  110.2664\\        3  130.0000  111.7478\\        3  135.0000  113.9048\\        3  140.0000  116.7442\\        3  145.0000  120.2812\\        3  150.0000  124.5397\\        3  155.0000  129.5523\\        3  160.0000  135.3603\\     };          \end{axis}     \end{tikzpicture}      But I need this ![enter image description here](http://i.stack.imgur.com/VIoqW.png) How can I do? Thanks.


title: Line graph superimposed on "Grouped Stacked" bar graph with pgfplots?

text: I need to superimpose a line graph over a stacked grouped bar graph (similar to answer to the question: Two level labels in bar plot). I have to superimpose a line graph for each group (it breaks at boundary of group). For example: First line graph connects S1, S2, S3; Second connects S4, S5, S6; and last one connects S7, S8, S9, S10. [Edit] I have managed to superimpose line graph on stacked bar graph. But I need a non-continuous line graph. Currently, points (S3,S4), (S6,S7) are also connected, which I don't want in my graph. How can I generate a graph like that?               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}          \makeatletter     \newcounter{groupcount}     \pgfplotsset{         draw group line/.style n args={5}{             after end axis/.append code={                 \setcounter{groupcount}{0}                 \pgfplotstableforeachcolumnelement{#1}\of\datatable\as\cell{%                     \def\temp{#2}                     \ifx\temp\cell                         \ifnum\thegroupcount=0                             \stepcounter{groupcount}                             \pgfplotstablegetelem{\pgfplotstablerow}{[index]0}\of\datatable                             \coordinate [yshift=#4] (startgroup) at (axis cs:\pgfplotsretval,0);                         \else                             \pgfplotstablegetelem{\pgfplotstablerow}{[index]0}\of\datatable                             \coordinate [yshift=#4] (endgroup) at (axis cs:\pgfplotsretval,0);                         \fi                     \else                         \ifnum\thegroupcount=1                             \setcounter{groupcount}{0}                             \draw [                                 shorten >=-#5,                                 shorten <=-#5                             ] (startgroup) -- node [anchor=north] {#3} (endgroup);                         \fi                     \fi                 }                 \ifnum\thegroupcount=1                             \setcounter{groupcount}{0}                             \draw [                                 shorten >=-#5,                                 shorten <=-#5                             ] (startgroup) -- node [anchor=north] {#3} (endgroup);                 \fi             }         }     }     \makeatother          \pgfplotstableread{     1   19.178  26.027  8.219   6.849   39.726  1     2   54.795  21.918  4.110   6.849   12.329  1     3   28.767  16.438  6.849   8.219   39.726  1     4   63.014  2.740   2.740   2.740   28.767  2     5   90.411  1.370   6.849   0.000   1.370  2     6   15.068  2.740   16.438  8.219   57.534  2     7   67.123  0.000   0.000   1.000   32.877  3     8   72.603  6.849   5.479   5.000   15.068  3     9   56.164  12.329  6.849   4.110   20.548  3     10  50.685  4.110   8.219   1.370   35.616  3     }\datatable          \begin{document}     \makeatletter     \begin{tikzpicture}     \begin{axis}[         ylabel=label,         xtick=data,         xticklabels={S1,S2,S3,S4,S5,S6,S7,S8,S9,S10},         enlarge y limits=false,         enlarge x limits=0.1,         ymin=0,ymax=100,         ybar stacked,         bar width=10pt,         legend style={           font=\footnotesize,           cells={anchor=west},           legend columns=5,           at={(0.3,-0.20)},           anchor=north,           /tikz/every even column/.append style={column sep=0.2cm}         },          draw group line={[index]6}{1}{X Group}{-3.5ex}{7pt},         draw group line={[index]6}{2}{Y Group}{-3.5ex}{7pt},         draw group line={[index]6}{3}{Z Group}{-3.5ex}{7pt}     ]          \addplot table[x index=0,y index=1] \datatable;     \addplot table[x index=0,y index=2] \datatable;     \addplot table[x index=0,y index=3] \datatable;     \legend{Far,Near,Here}     \end{axis}          \begin{axis}[         ylabel=label,         xtick=data,         xticklabels={S1,S2,S3,S4,S5,S6,S7,S8,S9,S10},         enlarge y limits=false,         enlarge x limits=0.1,         ymin=0,ymax=100,         legend style={           font=\footnotesize,           cells={anchor=west},           legend columns=5,           at={(0.71,-0.20)},           anchor=north,           /tikz/every even column/.append style={column sep=0.2cm}         },          draw group line={[index]6}{1}{X Group}{-3.5ex}{7pt},         draw group line={[index]6}{2}{Y Group}{-3.5ex}{7pt},         draw group line={[index]6}{3}{Z Group}{-3.5ex}{7pt}     ]          \addplot table[x index=0,y index=4] \datatable;     \legend{There}     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tbc45.jpg)


title: TikZ - "Circled" arrow

text: In the code below, I would like to add one text inside one "circled" arrow in gray like in the following ugly draw. ## Screenshot ![enter image description here](http://i.stack.imgur.com/8BwdM.png) ## Code               \documentclass{article}         \usepackage[utf8]{inputenc}         \usepackage{tikz}         \usetikzlibrary{arrows,shadows,positioning}              \tikzset{             frame/.style={                 rectangle, draw,                 text width = 6em, text centered,                 minimum height = 4em, drop shadow, fill=lime!40,                 rounded corners,             },             line/.style={                 draw, -latex', rounded corners = 3mm,             }         }               \begin{document}          \begin{tikzpicture}[font=\small\sffamily\bfseries,very thick,node distance = 4cm]         \node [frame] (pop) {Population};         \node [above=2cm, left of=pop] (init) {Initialisation};         \node [below=2cm, left of=pop] (term) {Termination};         \node [frame, above=2cm, right of=pop] (parents)  {Parents};         \node [frame, below=2cm, right of=pop] (off)  {Offspring};              \path [line] (parents)          -- node[right,align=left,pos=.5] {Recombination\\[3mm]Mutation}          (off);         \path [line] (init) |- (pop.170);         \path [line] (pop.190) -| (term);         \path [line] (off) -| node[below,pos=.25, align=center] {Survivor\\ selection}(pop);         \path [line] (pop) |- node[above,pos=.75, align=center] {Parents\\ selection}(parents);     \end{tikzpicture}          \end{document}


title: Aligning image and text in new command in TikZ

text: As a Teaching Assistant for a class, I am trying to draw a seating chart for the professor. The seating chart will have a photo of each student, the student's name, and where the student is sitting in the lecture room. Using labels and anchors in TikZ, I am able to manually create a label for each student, and use that label to anchor the name of the student with the image of the student.               \documentclass[12pt]{article}          \usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}     \usepackage{tikz}          \begin{document}          \begin{center}     \begin{tikzpicture}       \draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);            \node[anchor=base,inner sep=0] (image1) at (4,4)           {\includegraphics[width=25mm]{empty-face.png}};       \node[text width=30mm,align=center,anchor=north] at (image1.south)           {George Washington};            \node[anchor=base,inner sep=0] (image2) at (8,4)           {\includegraphics[width=25mm]{empty-face.png}};       \node[text width=30mm,align=center,anchor=north] at (image2.south)           {John Adams};            \node[anchor=base,inner sep=0] (image3) at (12,4)           {\includegraphics[width=25mm]{empty-face.png}};       \node[text width=30mm,align=center,anchor=north] at (image3.south)           {Thomas Jefferson};          \end{tikzpicture}     \end{center}          \end{document}      ![Partial output of minimum working example](http://i.stack.imgur.com/TbwUU.png) However, since there are 70 students in the class, it seems to be more elegant to define a new command `\student` to position the face and name of the student. More concretely, I want the following code to work.               \documentclass[12pt]{article}          \usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}     \usepackage{tikz}          % Usage: \student{x coord}{y coord}{name}{picture file}     \newcommand{\student}[4]{     % What should I put in here????     }          \begin{document}          \begin{center}     \begin{tikzpicture}       \draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);            \student{4}{4}{George Washington}{empty-face.png};       \student{8}{4}{John Adams}{empty-face.png};       \student{12}{4}{Thomas Jefferson}{empty-face.png};     \end{tikzpicture}     \end{center}          \end{document}      My question is: How should I define the `\student` command? Because I need it to generate a new label each time in order to align the name and picture of each student. One possible workaround is to let the `\student` command take 5 arguments, where I manually specify a new label each time. But this seems to be a clumsy and potentially error-inducing approach.


title: Lyx : change cross reference color

text: When i make a refference to a figure , the text appears black. How can i change cross reference's default black color to blye or cyan ? I had the same issue with citations but i figured it out with this (see in comments) : How to create bibliography in LyX Is it possible to do something like that for refferences ?


title: rounded rectangle with tikzpicture: oval not round

text: here's my MWE:               \documentclass{book}     \usepackage{lipsum}     \usepackage{fmtcount}     \FCloadlang{ngerman}     \usepackage[many]{tcolorbox}     \usepackage{calc}     \usetikzlibrary{positioning,shapes.misc,calc}     \usepackage[scale=1,angle=0,opacity=1]{background}     \usepackage{ifthen}     \usepackage{xcolor}          \definecolor{mp}{RGB}{240,240,240}          \SetBgScale{1}     \SetBgAngle{0}     \SetBgOpacity{1}     \SetBgContents{}          \newcounter{partshift}     \addtocounter{partshift}{-1}     \newcommand{\maxpart}{9}          \makeatletter       \newcommand{\parttitle}{}       \def\@part[#1]#2{%         \renewcommand{\parttitle}{#1}\pf           \ifnum \c@secnumdepth >-2\relax             \refstepcounter{part}%             \addcontentsline{toc}{part}{\bfseries\color{gray}\Ordinalstring{part}~\partname:\hspace{0.5em}#1}%           \else             \addcontentsline{toc}{part}{#1}%           \fi           \markboth{}{}%           {\centering            \interlinepenalty \@M            \normalfont            \ifnum \c@secnumdepth >-2\relax              \huge\Ordinalstring{part}\nobreakspace\partname              \par              \vskip 20\p@            \fi            \bfseries\color{gray}\fontsize{28}{30}\selectfont #2\par}%           \@endpart}          \newcommand\pf{%       \AddEverypageHook{%         \ifthenelse{\isodd{\thepage}}         {\SetBgContents{%           \begin{tikzpicture}[overlay,remember picture]           \node[                     fill=mp,                     inner sep=0pt,                     rounded rectangle,                     text width=5mm,             text height=\paperheight/\maxpart,                     align=center,                     anchor=north east] at                         ($ (current page.north east) + (1mm,-\thepartshift*\paperheight/\maxpart) $){};           \end{tikzpicture}}%         }         {\SetBgContents{%           \begin{tikzpicture}[overlay,remember picture]           \node[                     fill=mp,                     inner sep=0pt,                     rounded rectangle,                     text width=5mm,             text height=\paperheight/\maxpart,                     align=center,                     anchor=north west] at                          ($ (current page.north west) + (-1mm,-\thepartshift*\paperheight/\maxpart) $){};           \end{tikzpicture}}         }         \bg@material}%         \stepcounter{partshift}     }     \makeatother          \begin{document}          \part{A}     \chapter{a1}          \part{B}     \chapter{b1}     \lipsum[1-7]          \part{C}     \chapter{c1}     \lipsum[1-7]          \end{document}      ![enter image description here](http://i.stack.imgur.com/letoy.png) I'd like to make it look like the right one ![enter image description here](http://i.stack.imgur.com/JkqBN.png) How can I do that?


title: Is there an easy way to use only mathpazo's blackboard-bold facilities (without it using Palatino)?

text: The `mathpazo` package sets Palatino as the document's main font. However I am only interested in its blackboard bold symbols. Is there an easy way for me to only use Mathpazo's bb symbols?


title: fragile/verbatim R code inside probsoln when using an exterior Rnw file for the data sets

text: A follow-up on this question about using R code inside the environments used in `probsoln` package. If you uncomment out the section below and define the problem within the main Rnw file, the R code is compiled and presented correctly.   However, when you move that problem definition to a separate file and \load it in, the R code no longer is passed correctly.   I know the original answer from the previous thread had a verbatim environment around the R code, but I was unable to get that to work, the fragile option was what allowed it to work for me.               \documentclass{article}     \usepackage{probsoln}     \showanswers          %%% -- Problem Definition --%%     % \begin{defproblem}{comparing_rates2}[fragile]     % If 136,670,000 persons were wage and salary workers and 10,544,000 persons were self-employed, what is the fatal injury rate per 100,000 workers for each group?      %      % \begin{onlysolution}[fragile]%     %     \begin{solution}     %     \begin{enumerate}     %   \item Wage and salary workers have a fatal injury rate of 3.4 per 100,000 workers. \\     %   Self-employed workers have a fatal injury rate of 9.9 per 100,000 workers.      %   \item Self-employed workers have the worst outcome becuase they show a higher rate of fatal injury.      % \end{enumerate}      % <<>>=     % (4613/136670000)*100000     % (1044/10544000)*100000     % @     %     \end{solution}     % \end{onlysolution}     % \end{defproblem}          %% - Load all problems defined in the dataset     \loadallproblems{test_dataset.rnw}          \begin{document}          \ifthenelse{\boolean{showanswers}}{\title{Solution set for Week 1 HW}}{\title{Homework for Week 1 HW}}     \maketitle           \paragraph{Problem set 1.1: Comparing Rates}       \useproblem{comparing_rates2}          \end{document}


title: create a horizonal line having the length of the text

text: I would insert two horizontal line here an example:                 -------         Foo       -------      I had used `hrulefill` but the line has the length of the page.


title: Best practices in organizing BibDesk files

text: * How many BibDesk files? I am using LaTeX (and BibDesk) for research only (i.e., to write papers, book chapters, dissertation, etc.), therefore I need to cite an overlapping selection of references in each of my documents. Do you suggest that I stick to one BibDesk file for my bibliography? So far I have been creating different files for different documents, including the files in the document's folder (e.g. paper_one.tex and paper_one.bib in folder 'paper_one', paper_two.tex and paper_two.bib in folder 'paper_two', etc.). What happens is that I sometimes make small corrections to typos and other mistakes in, say, my paper_three.bib file, but those corrections won't transfer to other papers' .bib files. That is the main reason why I am considering unifying my .bib files. Won't I have a folder problem if I do so?   * Capitalization? Different publishers require different capitalization styles. I have used curly brackets in my .bib title entries to keep the capitalization as inputed by me (title case capitalization). Now I am submitting to a different publisher which requires sentence case capitalization only, and I will have to remove my curly brackets from my .bib. Any suggestions with that?


title: Difference between various methods for producing text in math mode

text: What is the difference between `\text`, `\textrm`, `\textnormal`, and `\mbox` (and possibly other commands commonly used to produce text in math mode)? Various (La)TeX tutorials teach different methods, and I am sure that there is either a best one or there are subtly different usage scenarios.


title: Ampersand in math in ConTeXt

text: I'm afraid this is fairly obvious and has been asked many times, but I could not find the answer. I am having trouble getting an ampersand in a displayed formula in ConTeXt. I tried the obvious `\&`, and it seems fine outside math, i.e. this works:               \starttext     $\Pr$ (A \& B)     \stoptext      but this does not:               \starttext     \startformula     \Pr (A \& B)     \stopformula     \stoptext      (and using an unescaped '&' fails as well, unsurprisingly). Of course I could use `\wedge` or the word "and", but if at all possible I'd rather use an ampersand.


title: When should we use \rput, \nput, and \uput?

text: I am writing a short tutorial for my friends about PSTricks. So I have to systematically explain the available macros such as `\nput`, `\rput` and `\uput` (among others) and reduce the possibility of confusion that might happen to my friends. I am also confused with the naming convention adopted by PSTricks for the macros above. What do `n`, `u`, `r` actually stand for? And what did the author want them to behave specially? If one macro can be replaced by other macros without much effort, I will suggest the reader to forget it and use the more powerful ones. Remembering many macros (with slightly different feature but replaceable) seem to be difficult for the beginners.


title: latex fancyhdr: is possible to use leftmark and rightmark alternatively?

text: I'm using this code to customize the header layout:               \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \lhead{\nouppercase{\rightmark}}     \rhead{\thepage}      I would like to have the section name in the top left of every page, in the form of “1.1 section”, and this is possible using \rightmark. But, like mentioned in the fancyhdr documentation, "on the ﬁrst page of a chapter (or a section in article style) the \rightmark will be empty". So, when \rightmark is empty I would like have printed the chapter name like “Chapter 1. Intro” instead of the section name, and this is possible using \leftmark. So my question is: can I use such an "else condition" in order to use \leftmark if \rightmark is empty, and to use \rightmark otherwise? Something like:               empty(\rightmark) ? \leftmark : \rightmark      Thanks in advance.


title: verbatim environment inside algorithm2e

text: I need to output `Prolog` style inside `algorithm2e` and It seems that I cannot use `\verb` inside `algorithm2e`. How can I use `\verb` or `verbatim` for only one line inside `algorithm2e` in Latex?


title: How to use maths symbols in text mode?

text: I try to add a center dot with `\circ` but it fails to compile. How to use maths symbol in text mode? The error message is               ovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,      welsh, loaded.     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))     (./untitled-1.aux)     ! Missing $ inserted.     <inserted text>                  $


title: Changing font in tabular

text: I desperately need someone's help. For the past hour I was trying to perform a task so diabolically difficult, even the Hercules himself couldn't achieve: change the freaking font in a table. My table looks something like this:               \begin{tabular}{|p{0.14\textwidth}|p{0.12\textwidth}|p{0.62\textwidth}|} \hline     something & something & something wider\\     lather & rinse & repeat \\     \hline     \end{tabular}      I want this table to be in verbatim font. I tried putting the whole tabular in `texttt{ }`, but it generates over `9000 badboxes` in Kile. Why ? Beats me, it looks fine. Putting the whole table in               \begin{verbatim}      \end{verbatim}      doesn't work. Then I found that you can set the font of a column:               \begin{tabular}{|>{\ttfamily}p{0.14\textwidth}|p{0.12\textwidth}|p{0.62\textwidth}|} \hline      And you know what? It actually worked! The first column was in verbatim. So, I tried the second one               \begin{tabular}{|>{\ttfamily}p{0.14\textwidth}|>{\ttfamily}p{0.12\textwidth}|p{0.62\textwidth}|} \hline      and it worked too! I tried it with the last one               \begin{tabular}{|>{\ttfamily}p{0.14\textwidth}|>{\ttfamily}p{0.12\textwidth}|>{\ttfamily}p{0.62\textwidth}|} \hline      and that of course generates badboxes. I'm _that_ close to success, and the pesky LaTeX has to make problems. I've read that you could set up a whole new environment to change the font, which, frankly, seems too excessive to do. So, how can I achieve what I want to achieve, without turning the whole world upside-down ?


title: My Own CV Template - Help!

text: I wanted to develop a hybrid of `moderncv` and article class, another CV template. I am facing difficulties. Here is my code till now:               \documentclass[12pt]{article}     \usepackage{libertine}     \usepackage{kantlipsum}     \usepackage[osf]{mathpazo}     \usepackage{titlesec}     \usepackage{marvosym}     \usepackage{array}     \usepackage{booktabs}     \usepackage{threeparttable}     \usepackage{siunitx}     \usepackage[left=2.54cm,right=2.54cm,top=2.54cm,bottom=2.54cm]{geometry}          \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}          \titleformat{\section}     [block]     {\normalfont\bfseries}     {\rule[0ex]{2cm}{4pt}}     {1em}     {}               \begin{document}     \noindent     \begin{minipage}{\textwidth}     \textbf{SUBHAM SONI}\\     address\\     \end{minipage}     \\[2mm]     \hrule     \section{CAREER OBJECTIVE}     \kant[2]     \section{EDUCATIONAL QUALIFICATION}     \centering       \begin{threeparttable}       \centering        \tabcolsep=3pt          \begin{tabular}{C{\dimexpr0.06\textwidth-2\tabcolsep-2\arrayrulewidth\relax}                           C{\dimexpr0.22\textwidth-2\tabcolsep-\arrayrulewidth\relax}                           C{\dimexpr0.22\textwidth-2\tabcolsep-\arrayrulewidth\relax}                           C{\dimexpr0.22\textwidth-2\tabcolsep-\arrayrulewidth\relax}                           C{\dimexpr0.15\textwidth-2\tabcolsep-\arrayrulewidth\relax}                           C{\dimexpr0.13\textwidth-2\tabcolsep-\arrayrulewidth\relax}}\toprule     \textbf{Sl. No.} & \textbf{Course} &  \textbf{Institution/ School}  & \textbf{Board/University}  &  \textbf{Year of  passing}  & \textbf{Aggregate}  \\ \midrule     1. & B.Tech. (Computer Science and Engineering)& Pondicherry  Engineering College  Puducherry & Pondicherry  University& April 2015 (pursuing) & 8.554\tnote{*} \\     2. & Higher  Secondary  &  Petit Seminaire H.S.S. Puducherry & Tamilnadu Board of     Higher Secondary  Education & March 2011  & \SI{92}{\percent} \\     3. & Matriculation  &  Petit Seminaire H.S.S. Puducherry & Tamilnadu Board of     Higher Secondary  Education  & March 2009 & \SI{90}{\percent} \\ \bottomrule         \end{tabular}              \begin{tablenotes}           \small           \item  \textbf{\item[*] \textbf{Cumulative grade point average up to 5\textsuperscript{th} semester}}.         \end{tablenotes}       \end{threeparttable}     \section{AREAS OF INTERESTS}     \begin{enumerate}     \item hollaa     \end{enumerate}     \end{document}       ![enter image description here](http://i.stack.imgur.com/IuAGc.png)   here, why areas of interests is spread like this? Secondly, the `enumerate` or `itemize` environment, how do I shift it beyond the bar, exactly under the first letter of the section title?


title: How to undo the feasible breakpoints of `lstlisting`?

text: Is there a way to prohibit pagebreaking at the beginning/end of an `lstlisting` environment? I'm trying to keep together the following two pairs of lines:   * the first line of `lstlisting` and the line before that   * the last line of `lstlisting` and the line after that But pagebreaking should be available (so using `minipage` is not a solution) - there are code snippets more than one page long. As far as I know `\end{lstlisting}` implicitly adds a feasible breakpoint so it has to be undone to do this.               \documentclass{article}          \usepackage[a6paper]{geometry}     \usepackage{listings}          \begin{document}          \textbf{Keep the first two together}          \vspace{22\baselineskip}          \noindent Line Before     \begin{lstlisting}     First line     Middle lines     Middle lines     Middle lines     Last line     \end{lstlisting}     Line After          \newpage          \textbf{Keep the last two together}          \vspace{17\baselineskip}          \noindent Line Before     \begin{lstlisting}     First line     Middle lines     Middle lines     Middle lines     Last line     \end{lstlisting}     Line After          \end{document}


title: Matrix and Node Padding

text: Trying to gain a little vertical padding with a `matrix of nodes` and having trouble. In a regular `matrix` I could just add `[2em]` etc after the row or column delimiter to add a little padding between rows or columns. That's not seeming to work in a `matrix of nodes`. Suggestions??               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{shapes, arrows, calc, positioning,matrix}          \tikzset{         state/.style={rounded rectangle, draw, text centered, minimum height=3em ,minimum width = 6em, inner sep = 5pt},         test/.style = {diamond, draw, shape aspect=2, inner sep = 0pt,text width = 7em,text centered},         action/.style ={rectangle, draw,text width=8em,inner sep = 3pt, minimum height=5em},         data/.style = {trapezium, draw, trapezium left angle=60, trapezium right angle=120pt, minimum height = 6em},         line/.style = {draw, -triangle 45},         list/.style = {rectangle, draw,minimum width = 6em},         ptr-box/.style = {rectangle, text width = 8em}     }          \begin{document}     \begin{tikzpicture}[         align = flush center,         font = \small]         \matrix [             matrix of nodes,             column sep = 0.5em,             row sep = 1.3em,              draw, dashed,             nodes = {solid},             ] (mtrx)         {           |[state]| \\         |[data]|  b\\         |[test]|  c\\         |[action]|d\\         |[test]|  e\\         |[action]|f\\         |[action]|g\\[2em] %Not working         };      \end{tikzpicture}          \end{document}      EDIT: I should have been more specific. I'm looking to add space only at the bottom and possibly to one side of the `matrix of nodes`


title: How to use named variables with one environment

text: Just after there is one code which has been proposed to me in this site. Instead of using `\begin{MyFrame}[1.5cm][2pt][1.3cm][blue][2][8ex]`, I would like to use something more friendly like `\begin{MyFrame}[lenght = 1.5cm , thickness = 2pt , distH = 1.3cm , color = blue, factor = 2 , distV = 8ex]`. If it is possible, how can I do that ?               % Source : http://tex.stackexchange.com/questions/33078/frame-with-only-crosses-in-two-opposite-corners/33087#33087          \documentclass{article}         \usepackage{xparse}         \usepackage{xcolor}          % Meaning of the variables     %    #1 --> Length : this controls the length of the rules used (default = 1cm)     %    #2 --> Thickness of the rule (default = 0.4pt)     %    #3 --> Horizontal distance between the rules and the text (default = 0.8cm)     %    #4 --> Color of the rule using the xcolor package (default = black)     %    #5 --> Factor is a number controlling the point of intersection of each pair     %           of rules used for the cross (default = 3)     %    #6 --> Vertical distance between the rules and the text (default = 2ex)         \DeclareDocumentEnvironment{MyFrame}{O{1cm}O{0.4pt}O{0.8cm}O{black}O{3}O{2ex}}         {%             \par\hfill\rlap{%                 \bgroup\color{#4}%                 \hskip-\dimexpr#1-#3\relax\rule{#1}{#2}%                 \hskip-\dimexpr#1/#5\relax\rule[-\dimexpr#1-\dimexpr#1/#5\relax]{#2}{#1}%                 \egroup             }%             \vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax%         }         {%             \par\nobreak\offinterlineskip\vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax\noindent%             \hskip-#3\bgroup\color{#4}%             \rule{#1}{#2}\hskip-\dimexpr#1-\dimexpr#1/#5-#2\relax%             \rule[-\dimexpr#1/#5-#2\relax]{#2}{#1}\egroup\par         }          % Just to generate text for the example.         \usepackage{lipsum}               \begin{document}          \begin{MyFrame}[1.5cm][2pt][1.3cm][blue][6][8ex]         \lipsum[1]     \end{MyFrame}          \end{document}


title: \verb in custom command

text: I have `\newcommand\dd[2]{\item[\texttt{#1}] #2}` and later I have               \dd{bc}{text \verb#$(echo 5+4 | bc)# text \verb#$((5+4))# text}      and I get               ! You can't use `macro parameter character #' in math mode.     <argument> ...nicht mit \verb ##$(echo 5+4 | bc)##     rechnen, sondern die neue...     l.74 ...ekten Rechnen, \verb#$((5+4))#, benutzen.}     Sorry, but I'm not programmed to handle this case;     I'll just pretend that you didn't ask for it.     If you're in the wrong mode, you might be able to     return to the right one by typing `I}' or `I$' or `I\par'.      How can I get the verbatim into my command without the command interpreting it wrongly?


title: Align environment immediately after section break

text: When I use an align environment immediately after a new section, there is a significantly increased line break between the section and the equation, too large for my taste. Is there a way to make this break the same size as if text were immediately after the section break? For example:               \documentclass[a4paper]{article}     \usepackage{amsmath}          \begin{document}          \section{F at the critical point}         \label{sec:1fi}              \begin{align*}             F(a)&=\frac{1}{2}         \end{align*}              The second derivative test has been to chosen in order to confirm the nature of the critical point:              \begin{align*}             F''(a)&=8+\frac{9}{2a^4}+\frac{5}{4a^6}         \end{align*}          \end{document}      Additionally, there is more space than I would like between the text and the second align, as compared to between the first align and the text.


title: Feynman Diagrams with jaxodraw-2.1-0

text: I want to use `jaxodraw` for drawing nice Feynman diagrams. I've already downloaded binaries from here http://jaxodraw.sourceforge.net/download/index.html and the program works fine. My problem is that once I run `pdflatex` in a file with the code exported by `jaxodraw`, I only got the labels and any diagram. This is my `.tex` file:               \documentclass[a4paper]{article}     \usepackage{axodraw4j}     \usepackage{pstricks}     \usepackage{color}          \setlength{\oddsidemargin}{0pt}     \setlength{\evensidemargin}{0pt}     \setlength{\topmargin}{0pt}     \setlength{\headheight}{0pt}     \setlength{\headsep}{0pt}     \setlength{\topskip}{0pt}     \setlength{\footskip}{0pt}     \setlength{\textwidth}{\paperwidth}     \addtolength{\textwidth}{-2in}     \setlength{\textheight}{\paperheight}     \addtolength{\textheight}{-2in}          \pagestyle{empty}          \begin{document}          %%JaxoComment:     %%JaxoScale{1.0}          \begin{center}     \fcolorbox{white}{white}{       \begin{picture}(410,314) (95,-47)         \SetWidth{1.0}         \SetColor{Black}         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](96,194)(192,122)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](192,122)(96,50)         \Photon(192,122)(288,122){7.5}{5}         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](288,122)(384,194)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](384,50)(288,122)         \Photon(384,194)(432,242){7.5}{3}         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](504,218)(432,242)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](432,242)(504,266)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](504,146)(384,194)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](384,50)(504,98)         \Photon(384,50)(432,2){7.5}{3}         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](504,-46)(432,2)         \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](432,2)(504,26)     %     % There is a postscript text here!     % There is a postscript text here!     % There is a postscript text here!     \Text(139,50)[lb]{\Large{\Black{$\overline{q}$}}}     \Text(233,44)[lb]{\Large{\Black{$\bar{t}$}}}       \end{picture}     }     \end{center}          \end{document}      I read something about install the `.sty` file and I downloaded it and follow this instructions http://blog.irrepupavel.com/2007/02/installing-latex-style- files-sty-on.html, but it doesn't works for me.


title: memoir margins setup

text: I wrote a little "book" by using the Memoir class. I'd need to have no more than 35 chars per line and no more than 70 chars on a columns. Is there some kind of settings to choose the best page layout based on the former requirements? If not, is there some other way to correctly change the default margins side? Thank you very much!


title: ConTeXt (mkiv): \seeindex word still appears in english

text: I need to put a `\seeindex` in my registry. Although I defined my document language to spanish, ConTeXt is still showing that word as "See" in the registry (in spanish it should be something like "Ver" or "Vea"):               \mainlanguage[es]     \starttext     test \index{aindex}test     test \seeindex{cindex}{aindex}text     \placeregister[index]     \stoptext      I thought `\mainlanguage[es]` would translate those things too... How can I get rid of this? Thanks in advance!