title: Tree-like diagram (flow chart?) showing selection of scientific papers when reviewing

text: I know the title I came up with is not self-explanatory, but I will show straight on some real life examples: ![I can't find which paper I got this from](http://i.stack.imgur.com/IKmgc.png) ![A Systematic Review of the Prothrombotic Effects of an Acute Change in Posture, 2007](http://i.stack.imgur.com/1RTri.png) Part 1, Question 1:   * Which package(s) is(are) closely suited for such diagrams? I would not prefer solutions that invovle converting from Inkscape to tikz, for example. Any relevant tips and tricks on the general process of achieving similar results, because replicating one of those might be useful for someone, but useless for everyone else (every diagram is different!). Part 2   * Having zero experience with tikz, I have reached to the following result so far: ![my attempt so far](http://i.stack.imgur.com/8z2fC.png) My MWE is an adaptation from the pgfmanual (pages 127-128) and has several problems but at least shows what my layout looks like (actually an adaptation from the second example above):               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{calc,trees,positioning,arrows,chains}     \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}[level distance=40mm,sibling distance=5mm]     \node (1) at (-2,0) [draw,label=below left:{n=XYZ}]{This is the first query};     \node (2) at (2,0) [draw, label=below left:{n=XY}]{This is the second query};     \node (refs) at (0,-2) [draw,label=below left:{n=XYZ}]{Total papers retrieved}     child[grow=left]     {node[draw,label=below left:{n=XY}]{papers from references}}      child[edge from parent fork right,grow=right]     {     child {node[draw,label=right:{n=XY}]{exclusion criteria1}}     child {node[draw,label=right:{n=XY}]{exclusion criteria2}}     child {node[draw,label=right:{n=XY}]{exclusion criteria3}}     child {node[draw,label=right:{n=XY}]{exclusion criteria4}}     child {node[draw,label=right:{n=XY}]{exclusion criteria5}}     child {node[draw,label=right:{n=XY}]{exclusion criteria6}}     }     child[grow=down] {node[draw,label=below left:{n=XY}]{Total included papers}};     \draw (node cs:name=2,anchor=south) |- (0,-1);     \draw[-open triangle 90] (node cs:name=1,anchor=south)     |- (0,-1) -| (node cs:name={refs},anchor=north);     \end{tikzpicture}     \caption{Selection of articles}     \label{fig:flowchart}     \end{figure}     \end{document}      Questions:   * Am I going anywhere with that code, or would I be better off if I scrap it and start from scratch?   * If my text inside the boxes becomes longer, how do I force it to go onto a second line and not grow forever on one line?   * How do I adjust the children branches seperately (left / right hand side)? When I shorten the right branch, the left becomes equally shortened and boxes overlap, ruining the whole thing.   * I want to get rid of the arrow, but nothing changes when deleting the part with the "open triangle".   * I don't know how to insert gaps between the exclusion criteria so as to move the labels "below left" and keep it consistent. I don't want the boxes to touch.   * Any suggestion to make it readable actually! In case I have omitted something, please leave a comment and I'll try to add extra information. Thanks for your help


title: Insert text in ToC but not in Shorttoc

text: I'm trying to find a way to insert some text at the end of the table of contents, without it being written in the shorttoc. To be precise, my advisor does not want me to write "Written with \LaTeX" on the first page, so I decided to put it at the very end. But now it appears two times : in the shorttoc and in the table of content. I suppose there's a way to use "addtocontent" to do this, but I don't see how ... Here's a MWE, and i'm trying to get rid of the first occurence of "Écrit avec Latex" :               \documentclass[a4paper,12pt,oneside]{book}      \usepackage{shorttoc}     \begin{document}          \shorttableofcontents{LA}{0}                \chapter{Solala}           \addtocontents{toc}{ \vfill \protect\begin{flushright}  Document écrit avec \LaTeX.\par \protect\end{flushright}}               \tableofcontents          \end{document}


title: How best to procrastinate and learn LaTeX?

text: Slightly tongue-in-cheek this one but written in good faith... I am a competent user of LaTeX and use it with Eclipse as IDE, MacTexlive as install, and XeTeX as engine to author my PhD. However, there are times when I like to procrastinate and love LaTeX as an end in itself not just as a means to an end. What would you recommend as a good way of procrastinating whilst usefully extending my capabilities and abilities to use LaTeX? In the past SVN, biber and beamer have served to distract me from my thesis. Any more potentially fruitful areas?


title: txt2tags and mathmode

text: How to create mathmode on txt2tags before convert to LaTeX? how to make `$\frac{\sqrt x}{x^2}$` on txt2tags and convert to LaTeX? i search this question on the Google, without sucess.


title: Creating fillable PDFs

text: I'd like to create a LaTeX document that when rendered into PDF, has forms that can be filled out using Adobe Reader or other such programs. Then I'd like to be able to extract the data. I deliberately would like to avoid using Acrobat for all the usual reasons (non-free, need different versions for different platforms etc). Can this be done ?


title: clickable check boxes in pdf through latex?

text: This is more out of curiosity than anything, but can LaTeX produce a pdf with a clickable check box? I imagine not, but it would be great to be proven wrong.


title: Creating PDF-forms with TeX/LaTeX?

text: I've been looking at the creation of PDF-forms - ie. PDF-documents with boxes where the user may fill in information like name and phonenumber or simply check a box to confirm something - in LibreOffice. Is it possible to make such "fill-in-able" PDF-documents with TeX or LaTeX? If it's possible, which extra (unusual?) packages will I need? I'm thinking of rather simple forms... perhaps with textbox or textline to fill-in things like name or address, and perhaps check-and/or radio-boxes for confirming or choose between multipple-choice options. Bonus question... Is it possible to design such forms with LyX?


title: Problem regarding Latexdiff, Perl and MikTex 2.9 on Win7

text: I try to implement this interesting solution for latexdiff and multiple files. There are other questions regarding missing perl scripts but I cannot relate them or their solutions to my problem (i.e. perl script not found)(perhaps because I am a beginner). However using...   * Win7 (64-bit)   * GitHub (Sourcetree, Git version 1.8.0msysgit.0)   * MikTex 2.9    * ActivePerl version 5.16.2.1602   * cygwin I receive the following error: ![Error](http://i.stack.imgur.com/5sp3i.png) I am a beginner but already checked that Algorithm-diff is installed: `C:\progs\perl\site\lib\Algorithm` ![algorithm-diff \(perl\) is installed](http://i.stack.imgur.com/xR0xk.png) Can someone help? I cannot find the path `/usr/lib/perl5...`. Latexdiff is installed in `C:\Program Files\MiKTeX 2.9\scripts\latexdiff`. Perl is installed in `C:\progs\perl`but the folder `lib\perl5`is not there. **Update:** Tried to implement this solution for How to change @INC to find Perl modules in non-standard locations by adding `C:\progs\perl\site\lib` to the new Environment (User) Variables PERL5LIB and PERLLIB. It did work.


title: Beginners guide for biblatex BY EXAMPLE

text: I decided to turn the original question into several questions and simplified the basic one. Many thanks to Alan Munn. I would like to use biblatex, however I found no simple guide for beginners BY EXAMPLE. I read this Biblatex guide?, but it is not by example. This guide, which I found in this question: What to do to switch to biblatex? in the last answer, does not concentrate on the following. At first I thought this question biblatex for idiots might help, but it doesn't really do that. I hope there is someone who is willing to pick up the gauntlet and create a simple guide by example, without general option, but with many sample different types of citations really written. (Feel free to revise the question top to bottom in order to provide the simplest guide for beginners as an answer. I'm willing to contribute as much as I can) The bibliography is in a `.bib` file, of course. My own citation style needs are rather traditional. I need a simple author- year like AuthorLastName (1995). I can use a possessive version of citation: AuthorLastName's (1995) (the 's should be added by a suitable command). Parentheses citation (ALN (1995)) might be easy to achieve manually if it is complicated. From time to time multiple authors citation like AuthorLastName, ALN2 and ALN3(2001) may be found helpful, as multiple authors by the first author last name like ALN et al. (2002) should be available. Multiple citations for the same author(s): ALN (2003,2004) looks like an integral part. Anyone?


title: Scale TikZ nodes and shapes for a given canvas size

text: I have the following code to produce an hexagon coverage area:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathreplacing} % for expanding waves     \usetikzlibrary{decorations.markings}          \tikzset{%         terminal/.style = {draw, shape = circle , thick, radius = 2cm},         area/.style = {draw, shape = regular polygon, regular polygon sides = 6, thick, minimum width = 10cm},         basestation/.style = {draw, shape = dart, shape border rotate = 90, thick, minimum width = 1cm, minimum height = 1cm},         transmission/.style = {decorate, decoration = {expanding waves, angle = 7, segment length = 4}, thick},         label/.style = {font=\footnotesize}     }          \usepackage{tikzscale}     \usepackage{adjustbox}          \usepackage{filecontents}     \usepackage{silence}     \WarningFilter{latex}{Overwriting file}     \WarningFilter{latex}{Tab has been converted to Blank Space}          \newcommand*{\FILE}{test}          \begin{filecontents*}{\FILE.tikz}     \begin{tikzpicture}     \draw [help lines, step = 0.5cm] (-5,-5) grid (5,5);     \node [area] at (0,0) {};     \node [basestation] (ENB) at (0,-0.5) {eNB}; % not exactly at center          \node [terminal] (UE2) at (-0.5,2) {UE};     \node [terminal] (UE3) at (2.5,-1) {UE};          \draw [blue, transmission] (ENB.north) -- (UE3) node [midway] (celllink1) {};     \draw [blue, transmission] (ENB.north) -- (UE2) node [midway] (celllink2) {};          \node [label] (celllinktext1) at (1, -1.5) {Cellular Link};     \node [label, align = center] (celllinktext2) at (-2, -1) {Cellular\\ Link};          \path [out = 90, in = 210] (celllinktext1) edge (celllink1);     \path [out = 90, in = 180] (celllinktext2) edge (celllink2);     \end{tikzpicture}     \end{filecontents*}          \newlength\WFIG     \setlength{\WFIG}{252.0pt} % column width          \begin{document}     %\includegraphics[width=0.5\WFIG]{\FILE.tikz}     %\resizebox{0.5\WFIG}{!}{\input{\FILE.tikz}}     \begin{adjustbox}{width=0.5\WFIG}         \input{\FILE.tikz}     \end{adjustbox}     \input{\FILE.tikz}     \end{document}      I have drawn that picture to a one-column document. Now I want to use that picture for a two-column document. Therefore I am trying to properly scale it. I have tried the `\adjustbox`, `\scalebox`, and `tikzscale` (this does not work for this case). There are some approaches explained in How to scale a tikzpicture to \textwidth and Scale TikZ figure to linewidth when relative positioning used and TikZ: Expand width of each picture to given size. However I am not sure what is the _best_ approach, if there is a _best_ approach. I also would like for the font to remain as much as possible the same (a possible solution for this would be to draw all text in a foreground layer that is unscalable, but I don't know if it even possible). ![enter image description here](http://i.stack.imgur.com/rrlCm.png) Any thoughts on this?!


title: Horizontal braces with XeTeX take too much space

text: After some experiments and tests, I managed to create the following code for `\upbracefill` and `\downbracefill` in Plain XeTeX, which it seems is that used for `\underbrace` and `\overbrace`:               \def\midshift#1{     \setbox0=\hbox{#1}\dimen0=\ht0\advance\dimen0by+\dp0\advance\dimen0by-1ex     \lower.5\dimen0\box0 }          \def\rotatebrace#1{%     \leavevmode\setbox0=\hbox{#1}\rlap{%     \kern.5\wd0\dimen0=\ht0\advance\dimen0by-\dp0%\advance\dimen0by+1ex%     \raise.5\dimen0\hbox{\special{x:gsave}\special{x:rotate 90}}}%     \box0\special{x:grestore}}          [...]          \XeTeXmathchardef\bracelu = 0 3 `\⎧     \XeTeXmathchardef\bracemu = 0 3 `\⎨     \XeTeXmathchardef\braceru = 0 3 `\⎩     \XeTeXmathchardef\bracebar = 0 3 `\⎪     \XeTeXmathchardef\braceld = 0 3 `\⎫     \XeTeXmathchardef\bracemd = 0 3 `\⎬     \XeTeXmathchardef\bracerd = 0 3 `\⎭          \def\upbracefill{\rotatebrace{\midshift{$\bracelu$}}%         \cleaders\hbox{\rotatebrace{\midshift{$\bracebar$}}}\hfill         \rotatebrace{\midshift{$\bracemu$}}%         \cleaders\hbox{\rotatebrace{\midshift{$\bracebar$}}}\hfill         \rotatebrace{\midshift{$\braceru$}}}%     \def\downbracefill{\rotatebrace{\midshift{$\braceld$}}%         \cleaders\hbox{\rotatebrace{\midshift{$\bracebar$}}}\hfill         \rotatebrace{\midshift{$\bracemd$}}%         \cleaders\hbox{\rotatebrace{\midshift{$\bracebar$}}}\hfill         \rotatebrace{\midshift{$\bracerd$}}}%      Where Cambria Math is loaded for the 3. family.   However, the height of these braces are bigger because of the middle part of the brace, and I can't find a way to shrink/limit the height of the box, without which the brace would fall apart. I originally used the `:vertical` parameter for the font, which I figured has no dimension in horizontal text. So how can I make this horizontal brace height smaller? (preferably to the character width, which is now the height.)


title: Image placement in LaTeX (twocolumn mode)

text: I'm beginning to work on my senior thesis for biochemistry and I'm excited to use LaTeX to make a nice looking final product. I'm new to LaTeX though so I don't actually know that much about it. Before I invest too much time in LaTeX I wanted to make sure I could do everything I needed to with the software. In biology it is typical to use a two-column format for papers so I decided to use the `twocolumn` option in document class at the start of my document. I've found a way to get a one column abstract, include the paper's title in the corner of every page, and include page numbers throughout (all requirements I set for myself). The last thing I wanted to get working before I set down to start making the actual document was images (also known as "floats" in LaTeX?). 99% of my data is actual graphics, either graphs or western blots, so getting images in the document is key. I have figured out how to use the `graphicx` package to do so and using `figure*` instead of `figure` made it span the entire page. The problem is that the image almost always appears on the page _after_ the reference, not on the same page. This is annoying because the way it looks right now I will never have an image on the same page I talk about it, it will always be exactly one page later. Now that I have my rationale out of the way here is the short version: Is there a trick to placing images where you want them consistently and automatically, specifically in a 2-column document. I included the full rationale because there may be a much better way to approach this that is "outside the box" so to speak and in most of my searching online the first suggestions involve people recommending the asker do something other than what they specifically asked for. To give an example, here is a minimum example:               \documentclass[12pt,twocolumn]{article}          \usepackage{lipsum}     \usepackage{stfloats}          \begin{document}     \section*{Introduction}     \setlipsumdefault{13-19}      \lipsum          {\bf Here is where I reference Figure~\ref{one}}          \begin{figure*}[tbph]     \makebox[\textwidth]{\framebox[5cm]{\rule{0pt}{5cm}}}      \caption{And here is the actual figure.     \label{one}}      \end{figure*}          \lipsum          \end{document}      I found some suggestions to use the `multicol` package and used it to make a two column page, but it didn't seem to fix the float placement. Also, most people seemed to say that specifying `twocolumn` in documentclass was the most efficient way to do it for a document that will be almost entirely 2 columns. I understand I could manually move the placement of the images around in my text and fix it, but I will be doing several rounds of revisions and don't want to have to fix it every time. Is there a good solution or will LaTeX not work for me? I apologize if this is a duplicate, most of the other questions I found were a year or more old and I hoped there would be a more modern solution.


title: External font with portable MiKTeX, Version 2.9

text: I have an external font and be able to use it in my documents on my desktop computer with MiKTeX 2.9. Now I try to use the same font with portable MiKTeX 2.9. The external font is located in my local TeXFM. With normal MiKTeX I need to call               initexmf --edit-config-file updmap      to open the local file `updmap.cfg` for inserting `Map thefont.map`. Portable MiKTeX (starting from the Command Prompt you get from the taskbar entry for MiKTeX portable) opens the system `updmap.cfg` in `<portable- MiKTeX>\miktex\config`, which is changed always you update portable MiKTeX. It is a quick and very dirty workaround to change the system file until the next update, but how can I tell portable MiKTeX to use the external font and remember it over the next update? For me this is an unwanted behavior, I would tend to see it as a bug.


title: Book cover with pstricks

text: Why I get error with the color of the maroon box? (`line 26`)               \documentclass[12pt]{article}     % load the necessary packages     \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry}     \usepackage[dvipsnames,prologue,table]{pstricks}     \usepackage{pst-text}     \usepackage{pst-char}     \usepackage{pst-grad}     \usepackage{graphicx}     \usepackage{lipsum}     % begin the document and suppress page numbers     \begin{document}     \pagestyle{empty}     % create the box with the front cover picture     \newsavebox\IBox     %%\sbox\IBox{\includegraphics[height=9in]{flower.eps}}     % set up the picture environment     \psset{unit=1in}     \begin{pspicture}(13.24in,9in)     % set up the fonts we use     \DeclareFixedFont{\PT}{T1}{ppl}{b}{it}{0.5in}     \DeclareFixedFont{\PTsmall}{T1}{ppl}{b}{it}{0.4in}     \DeclareFixedFont{\PTsmallest}{T1}{ppl}{b}{it}{0.3in}     \DeclareFixedFont{\PTtext}{T1}{ppl}{b}{it}{11pt}     \DeclareFixedFont{\Logo}{T1}{pbk}{m}{n}{0.3in}     % create a maroon background     \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)     % place the front cover picture     \rput[lb](7.24,0){\usebox\IBox}     % put the text on the front cover     \rput[lb](7.74,7){\PT \color{white}{Secrets of the Stamen}}     \rput[lb](8.94,6){\PTsmall \color{white}{Yuri Robbers}}     \rput[lb](9.04,0.8){\PTsmallest \color{white}{Lughdunum Press}}     % put the text on the spine (note the rotation over 270 degrees)     \rput[l]{270}(6.62,8.5){\PTsmall%     \color{white}{Yuri Robbers --- Secrets of the Stamen}}     % put the publisher’s logo on the spine     \rput[b](6.62,0.75){\color{white}{\fbox{\Logo L}}}     % Create a Box containing the text for the back cover     \newsavebox\Blurbbox     \sbox\Blurbbox{\begin{minipage}{4.5in}     \textcolor{white}{\lipsum[1]}     \end{minipage}}     % And position the box     \rput[tl](1,8){\usebox\Blurbbox}     % Then we close all open environments     \end{pspicture}     \end{document}      ## Error               linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 26: Undefined control sequence ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     linea 0:  ************************************(pst-char) The package `pst-char' is obsolet!(pst-char) You should use `pst-text' directly:(pst-char) \usepackage{pst-text}(pst-char) ************************************.     linea 46: Overfull \hbox (17.62482pt too wide) in paragraph      * * *               ! Undefined control sequence.     <recently read> \c@lor@to@ps     l.26 ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.


title: thmtools declaration for theorem and proof.

text: I'm using thmtools to specify the theorem and proof environments. The problem that arises is that I want my theorems stated in italics and my proofs in non- italic. The following is my initial setup:               \documentclass{report}          \usepackage{amsfonts, amssymb, amsthm}     \usepackage{mathtools}     \usepackage{undertilde}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{hyperref}          \usepackage{thmtools}     \declaretheoremstyle[         spaceabove=-6pt,          spacebelow=6pt,          headfont=\normalfont\bfseries,          bodyfont = \normalfont,         postheadspace=1em,          qed=$\blacksquare$,          headpunct={:}]{mystyle}      \declaretheorem[name={Proof}, style=mystyle, unnumbered]{Proof}          \declaretheoremstyle[         spaceabove=6pt,          spacebelow=6pt,          headfont=\normalfont\bfseries,         notefont=\mdseries\bfseries,          notebraces={(}{)},          bodyfont=\normalfont\itshape,         postheadspace=1em,         headpunct={:}]{mystyle}     \declaretheorem[name={Theorem}, style=mystyle,numberwithin=section]{thm}      as with the bodyfont, I've declared the theorem statements to be italic. I have not done so for the proofs, nevertheless, both the theorem and proof are stated in italics.


title: Other methods to determine the page size of an external pdf?

text: I would like to query the page size of an external PDF in a document. I can box an included PDF and measure the box (with or without actually using the box), as shown in the MWE, but I'm wondering if there's a more direct method that could be used without actually using `\includegraphics{}` on the PDF. The ideal solution would be similar to using `\pdflastximagepages` to get the number of pages in a PDF. ## MWE (using a boxing/measuring solution):               \documentclass{article}     \usepackage{graphicx,mwe,printlen}     \uselengthunit{in}          \begin{document}     \newsavebox\mybox     \savebox{\mybox}{\includegraphics{example-image-a.pdf}}     The width is \printlength{\wd\mybox} and the height is \printlength{\ht\mybox}.          \usebox{\mybox}     \end{document}      ## Output: ![enter image description here](http://i.stack.imgur.com/IvyAx.png)


title: Put section and page numbers in the margin with KOMA Script

text: Using the `scrartcl` document class, I would like to put the section number into the page margin, as is seen for example in the famous `l2tabu` document. That should be easily possible with KOMA Script, but I can not find how. Also, how can the same be done with page numbers, as is done for example in the good old `LaTeX Companion`?


title: Why are box dimension assignments both local and global?

text: Consider the following code.               \setbox0 \hbox{XXX}     \fbox{\copy0}          {             \setbox0\hbox{ZZZ}             {\wd0 0pt}             \fbox{\copy0}     }          \fbox{\box0}      This produces three ruled boxes. The two XXXs are inside the rules, the ZZZ is not. After `\wd0 0pt`, box 0 has width 0 and this assignment is global which explains why ZZZ is not entirely inside the rules. At the same time, the assignment is local in that it doesn't affect the box 0 which contains the XXX. What is the purpose of this behavior? Alternatively, what is the utility of being able to set the dimensions of boxes outside the current group? **Edit** : To be clear, this was not a question about **what** the behavior is, it was a question about **why** Knuth gave TeX this behavior. I thought there might be a use for it that I didn't see since TeX by Topic explicitly mentions it. My suspicion now is that Taco's comment about it being merely an implementation detail, not a design goal, is the right answer.


title: Moving page number for new chapters pages to the top

text: Using classic-thesis, and using \pagestyle{scrheadings} the first page of new chapters shows the page number at the bottom left/right corner of the page. I would like to change only the position of the page number and moving it to the top left/right. I searched and I guess that I have to use something like:               \deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}% Here I have to modify something     \pagestyle{pgnumbottomcenter}     \renewcommand{\chapterpagestyle}{pgnumbottomcenter}      What should I modify to move the page number to the top, (maintening all others characteristics of the page number style)?


title: How to put signature number in footer (derived from page number)?

text: To make my book easier to bind I'd like to automatically put the signature number with small type in the footer of the first page of each octavo signature (except the first one which is given since it has the title page). So that means I want to do this:               If         (page number) == ( [some number that is evenly dividable with 16] + 1 )     then         write "Book title --- ( ( [page number]-1 ) / 16)"         with small type in the footer of the page        * How can this be achieved in Context?   * How can this be achieved in Plain Tex? Happy for any pointers or examples. Thanks!


title: If LaTeX is only a macro package, why does it have its own executable?

text: From other answers on this site and the FAQ of the TeX User Group my understanding is that:   1. TeX is the original typesetting program, written by Knuth   2. Omega, eTeX, pdfTeX, XeTeX, LuaTeX are _engines_. They are variations of the original TeX program, written in different languages, designed to give almost the same output for the same input as the original TeX, but with great variations in the inner workings and slight variations in the interface that make possible for the user to access the inner workings   3. LaTeX and ConTeXt are _macro packages_. They are like libraries of TeX macros. While LaTeX works on all the engines, the last version of ConTeXt (Mark IV) works only with LuaTex, because it uses many features exclusive of this engine. What I do not understand is why both LaTeX and ConTeXt require their own executable. Isn't it possible just to include in the TeX source files where one wishes to use LaTeX just the definitions of the LaTeX macros (maybe with an `\include` directive)?


title: Error Undefined control sequence. <argument> \rightarrowfill@

text: I got this error with latex: It seems that mchem doesn't work properly with iopart.cls . Unfortunately I didn't find the solution for this specific problem in any forum. I tried load manually \usepackage{amsmath} either on the main.tex file and in the iopams.sty this is the piece of code that produce the error:               \ce{e  + H  -> e + H}       this is the error message: > ! Undefined control sequence. \rightarrowfill@ \displaystyle l.54 \ce{e + H > -> e + H } The control sequence at the end of the top line of your error > message was never \def'ed. Any ideas? P.S. I know that writing \rightarrow instead of "->" bypass the problem, but what is the purpose of mchem then? thank you very much I begin with this simple document:               \documentclass[12pt]{iopart}     \usepackage[version=3]{mhchem}     \begin{document}     this is a test     \end{document}      And I get this error when building pdflatex:               LaTeX Error: Command \equation* already defined.      Then I add this specific lines as they are reported in the template I downloaded               % the following 5 rows serves to load mchem package without conflicting with amsmath     \makeatletter     \@namedef{ver@amsmath.sty}{}     \makeatother     \usepackage{amstext}      And the building succeeds. But when I put a reaction :               \begin{document}     \ce{CO2+ -> CO2}     this is a prova     \end{document}      I got the error reported at the beginning of the post. I'm using amsmath and mhchem from texlive 2013. I know someonelse got a similar problem http://compgroups.net/comp.text.tex/converting-amsmath-to-iopart/353826


title: why pstilt doesn't tilt my text ?

text: The following code was writen with MikTeX and compiled with XelateX. The result is Texte1 not tilted. Why ?               \documentclass[11pt,twocolumn]{article}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[francais]{babel}     \usepackage{amsfonts,amsmath,amssymb}          \usepackage{pstricks}     \usepackage{pstricks-add}          \begin{document}          \pstilt{45}{Texte 1}          \end{document}


title: Align without display math?

text: Is it possible to use the `align` environment without the display math? For example, I would like `\sum` to look as if it were inline. The solution given here does not work, insofar as the summation symbols are still written in the big, display style. The `alignat` environment also produces this behaviour.


title: Latex create a second keywordstyle using listing doesn't work

text: I need to insert some code in my latex document, using listings. I create my own set, for a java language               \lstset{     language=Java,     aboveskip=3mm,     belowskip=3mm,     showstringspaces=false,     columns=flexible,     basicstyle={\small},     numbers=none,     numberstyle=\tiny\color{gray},     morekeywords=[1]{@},     keywordstyle=[1]\color{red},     keywordstyle={[2]\color{red}},     keywordstyle=\bfseries\color{purple!40!black},     otherkeywords={String,async,await,Task,var},     keywords=[2]{DatabaseField,DatabaseTable},     commentstyle=\color{ForestGreen},     stringstyle=\color{mauve},     captionpos=b,                    % sets the caption-position to bottom     breaklines=true,     breakatwhitespace=true,     tabsize=3}      As you can see, I've tryed many solution founded online, but neither of this is working for me. I know that the correct syntax should be :               keywords=[<number>]{<list of keywords>}     keywordstyle={[<number>]<style commands>}      But, is not working, also the bold text in my "normal" keywordstyle is ignored, where's my mistake?


title: elsarticle not working with citep

text: I'm trying to use the \citep command in Latex and my document class is elsarticle. The problem is that it displays numbers not authoryear citations in the text which is what I'm looking for. Here are related parts of my code:                   \documentclass[preprint,11pt]{elsarticle}              \usepackage{natbib}      ...                   \bibliographystyle{plainnat}              \bibliography{ML}      And I'm obviously using the \citep command like this:                   I once read \citep{edelman1993magnetic}      And my .bib file looks like this:               @article{wolf2009regional,     title={Regional brain activation changes and abnormal functional connectivity of the         ventrolateral prefrontal cortex during working memory processing in adults with attention-deficit/hyperactivity disorder},     author={Wolf, Robert C and Plichta, Michael M and Sambataro, Fabio and Fallgatter,     Andreas J and Jacob, Christian and Lesch, Klaus-Peter and Herrmann, Martin J and     Sch{\"o}nfeldt-Lecuona, Carlos and Connemann, Bernhard J and Gr{\"o}n, Georg and others},     journal={Human brain mapping},     volume={30},     number={7},     pages={2252--2266},     year={2009},     publisher={Wiley Online Library}     }      The result looks like:               I once read[1]      I'm looking for a result like this:               I once read(wolf., 2009)      Elsevier is actually looking for: Text: All citations in the text should refer to:   1. Single author: the author's name (without initials, unless there is ambiguity) and the year of publication;    2. Two authors: both authors' names and the year of publication;    3. Three or more authors: first author's name followed by 'et al.' and the year of publication.  Thanks in advance


title: 2 different bibliographies

text: I'm writing my thesis and I would like to make 2 "bibliography" references: The first one would be for the publications I'm in and the second one for external references. I've made one *.bib file right now and it's working but I have no idea how I should work with 2 *.bib files. Any suggestion will be appreciated.


title: emph ignores the page margin

text: Why `\emph` ignores the page margin? How can I fix it by setting the word in emph to a new line? See the example below: ![Example](http://i.stack.imgur.com/kymuo.png) EDIT: The second line of the text is too long. I don't want "edu.kit.sdq.modeljoin.compliance.model" to be separated, but to be placed on a new line, so that the page margins are correct. EDIT 2: MWE:               \documentclass[11pt, a4paper]{article}          \begin{document}     mdskam saskksk smdlakm dklsa mldk dlksam lkdsam sksksk \emph{de.de.de.de.de.de.de.de.de.de} dsamkld samkl samkl dsamkl dsamkl mdslkam dlskam dklsam kldasm dklsamlkd smalk maslkmdsalkas mnsbh ds dsm fndjk sdfdslkm dsmk ldsm klfdsm fklds      \end{document}


title: apa6.cls helvetica font in section headers and figure captions

text: Usually the section headers of `apa6`documents are sans-serif and bold. I needed them not bold so I redefined all sections/subsections like this to meet my criteria:               \documentclass[man,12pt,a4paper,noextraspace,donotrepeattitle,longtable]{apa6} % 12 pt., doppelter Zeilenabstand usw.          \usepackage[latin1]{inputenc} % für ä,ö,ü,Ä,Ö,Ü,ß usw.          \usepackage[english,ngerman]{babel}          \usepackage[T1]{fontenc}      % für exakte Darstellung von Umlauten wie Ä          \usepackage{lmodern}          \usepackage{lipsum}           % Dummy-Text     \setlipsumdefault{8}          % Standard-Einstellung: Verwendung nur eines Lipsum-Paragraphs (in diesem Fall des achten)          %\usepackage{longtable}     \setlength{\LTleft}{0pt}      % linksbündige Tabellen (longtable)          \usepackage{etoolbox}          \usepackage{environ}          \usepackage{booktabs}          %\let\tnote\relax             % Freigabe des \tnote Befehls für ctable          %\usepackage{ctable}          \usepackage{threeparttable}          \usepackage{threeparttablex}          \usepackage{textgreek}        % griechische Buchstaben im Text-Modus          \usepackage{enumerate}          \makeatletter     \renewcommand{\section}{\@startsection {section}{1}       {\z@}       {\b@level@one@skip}       {\e@level@one@skip}       {\centering\normalfont\normalsize}}     \renewcommand{\subsection}{\@startsection{subsection}{2}       {\z@}       {\b@level@two@skip}       {\e@level@two@skip}       {\centering\normalfont\normalsize\itshape}}     \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}       {\z@}       {\b@level@two@skip}       {\e@level@two@skip}       {\normalfont\normalsize\itshape}}     \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%       {0\baselineskip \@plus 0.2ex \@minus 0.2ex}%       {-1em}%       {\normalfont\normalsize\itshape\addperi}}     \makeatother      However, recently I discovered that my format requirements are that section headers and figure captions should be in a sans-serif font (I'd prefer Helvetica) which there are not after the above customizations. If I try the `\helvetica` command in the preamble, the log says it is ignored and I should use the `helv` document class option. If I use that option, all text in the document is helvetica, but I need the text to be in times new roman. How do I modify the section headers to helvetica font while the document text remains in times? And what about figure captions?


title: Vertically centered underscore

text: What is the mathematical symbol equivalent to a vertically centered underscore ? I need a symbol a little larger than a simple minus.


title: Is there a combination of LaTeX gnuplot flowchart?

text: I know this is not always a good idea, but I think it might be a good idea in some situation. Is there an improved LaTeX version or something, can have the `gnuplot` scripts inside of the LaTeX file, so during compilation, it can compile the `gnuplot` scripts as well. Now we have to generate the EPS file first, or `.tex` file first. The same apply to flowchart, I really wish there could be a solution that can dynamically compile and build in the flowchart scripts in the LaTeX file. Am I missing something or what?


title: Etiquette for math subscripts and superscripts

text: It is my first question here, I hope it is not too stupid... I am writing my thesis in math and I need a lot of subscripts and superscripts. My problem arises since in subscripts and superscripts numbers and capital letters are too big to appear with a small letter. For instance, I have to write things like `$c_{1}$ or $q_{A*}$` (I know it is not that nice having both `A` and `\\*`, but the function is called `$q_{A}$` and the operation `_{*}` has a precise meaning). And it is not that nice. Then I started using `\scriptscriptstyle` when I have capital letters or numbers (for instance `c_{{\scriptscriptstyle 1}}`. And finally I noticed that several times I have to subscribe things like `_{2g}` or `_{k+1}` and there numbers come back to their original size. Hence I was wondering whether there is a standard way or etiquette to deal with this issue (since now I feel either I go back to standard style or I start writing things like `u_{{\scriptscriptstyle 2}g}`...)               \documentclass[a4paper,11pt,oneside,openright]{book}      \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{amsmath,amscd}     \usepackage[english]{babel}     \usepackage{latexsym}     \begin{document}     $Hom_{0}(X)$ or $Hom_{\scriptscriptstyle 0}(X)$?     But then I have also $Hom_{2g-1}(X)$...     Then also $c_{1}$ or $c_{\scriptscriptstyle 1}$      Mixed things like $k^{2g-2p+s}$ or $(u_{{\scriptscriptstyle 1}},\ldots,u_{g}, \tilde{u}_{{\scriptscriptstyle 1}}=u_{g+1}, \ldots , \tilde{u}_{g}=u_{2g})$     Also $\omega_{E}$ is quite annoying.     \end{document}


title: Find a extremal value in external data file with pgfplot

text: Basically I'm plotting many curves stacked one after the other in pseudo 3D to show transient behaviors. I need every x axis to be at the same place so I use a `ymin` and `ymax` optional entry for the `axis` environment. So far I used a variable that I changed by hand, but I'm wondering if there is a way to find a min and max from several external tables (18 here) and use it as a variable in my case.


title: Remove additional space around \underbrace{…}

text: How do I remove the additional space that is added when using `\underbrace{...}`, to get the same width in both lines:               \documentclass{scrreprt}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath}          \usepackage{beramono}          \begin{document}          \texttt{https://example.org/foo/id/123456789/bar/baz}          $     \underbrace{\texttt{https://example.org/foo}}_{\text{Base-URL}}%     \texttt{/id/}%     \underbrace{\texttt{123456789\vphantom{g}}}_{\text{Foo-ID}}%     \texttt{/}%     \underbrace{\texttt{bar/baz\vphantom{g}}}_{\text{Function}}     $     \end{document}      ![Underbrace problems](http://i.stack.imgur.com/uLeia.png) * * * **Edit:** Using the approach of Werners answer, I defined a command, because I need this special underbrace without spacing a several times:               ...     \newcommand{\underbracewithoutspace}[2]{\mathrlap{\underbrace{\phantom{#1\strut}}_{#2}}#1}          $     \underbracewithoutspace{\texttt{https://example.org/foo}}{\text{Base-URL}}%     \texttt{/id/}%     \underbracewithoutspace{\texttt{123456789}}{\text{Foo-ID}}%     \texttt{/}%     \underbracewithoutspace{\texttt{bar/baz}}{\text{Function}}     $


title: Labels for each bibliography entry within an entry set with biblatex

text: I have a few references that consist of several bibliography entries that are grouped via `biblatex`'s command `\defbibentryset` (using `biber` as backend). The standard behaviour of `biblatex` is to seperate the entries by a semicolon without any further labelling. I wonder wether there is a possibility to assign a label (arabic or roman numbers or letters) to each of the entries so that it looks like [1] a) bibliography entry; b) bibliograhpy entry; c) ...


title: Capital letter expanded letter space kerning

text: I am using the following code               \usepackage{microtype,textcase}     \textls*[110]{\textbf{\MakeUppercase{Specialties}}}      I would like to achieve even letter spacing. Unfortunately, the kerning of the "ALT" is not good. Is there any way to make this better (even spacing)? Edit: One thing that improves the letter spacing between the L and T is to do               \usepackage{microtype,textcase}     \textls*[110]{\textbf{\MakeUppercase{Specia{l}{t}ies}}}      but the A and the L are still too far apart. Also, I am using this code as a command with the "Specialties" part being an argument. It would be nice to have a solution to make the letter spacing even without having to do tricks like this.


title: What is \null and when do we need to use it?

text: Up to now I don't understand well what `\null` actually is and when we need it. I have only known that it can be used to create hypothetical anchors as follows.               \documentclass{article}     \usepackage[a6paper,margin=2cm]{geometry}     \parindent=0pt          \begin{document}     \hfill xport \hfill\null\\     \null\hrulefill{} never \hrulefill\par     \hrulefill{} dies. \hrulefill\par     \hfill really? \hfill\null\par               \newpage     \null     \vfill     \hfill The End \hfill\null     \end{document}        1. What is `\null` and when do we need to use it?   2. Why do `\hrulefill` and `\hfill` need starting `\null` when they follow `\\\` but not need `\null` when they follow `\par`?   3. Why does `\hfill` always need ending `\null` but `\hrulefill` not need it?


title: Beamer: set mode mid-presentation

text: In Beamer, is it possible to switch between handout mode and presentation mode in the middle of a presentation? The reason I want to do this is that I am working through a slide deck in multiple lectures. I want to omit the pauses for slides from previous lectures to support quickly navigating to them for reference (handout mode), while for the current lecture I would like to include the pauses for presentation purposes (presentation mode). Here's a minimal example:               \documentclass[pdftex,handout]{beamer}          \begin{document}          \begin{frame}{Frame 1}     Step 1 \pause Step 2 \pause Step 3     \end{frame}          % I want to switch to presentation mode here!          \begin{frame}{Frame 2}     Step 4 \pause Step 5 \pause Step 6     \end{frame}          \end{document}      After compiling, I would like to have four slides. One slide showing the entire Frame 1, and three slides showing the three stages of Frame 2.


title: Cannot generate bibliography using TeXworks from MiKTeX

text: I am trying to generate a bibliography with no luck until now. I get an empty one. Here is my code.               \documentclass[12pt,twoside, openright, a4paper]{report}          \usepackage{fontspec}          \usepackage{cite}     \usepackage{fancyhdr}               \begin{document}               \title{test}     \author{test}     \maketitle          \tableofcontents{}     \listoffigures     \listoftables          \input{chapters/c1/chapter1.tex}          \input{chapters/c2/chapter2.tex}          \bibliographystyle{plain}      \bibliography{biblio}               \end{document}      my biblio.bib is               @conference{tess,         author = "test",         title = "test",         year = 2010,     }      and in TeXworks I use the option "XeLaTeX+MakeIndex+BibTeX". I read somewhere that I had to include the `plain.bst` file. Did it but didn't work. I tried everything. Any ideas?


title: Draw a chain of beads

text: I would like to reproduce this kind of figure: ![enter image description here](http://i.stack.imgur.com/mGH7Y.png) I'm wondering what's the best way to achieve that with TikZ. My guess is to draw an element composed of a circle + a link and to link this element by specifying only an angle (since the distance is always the same). Any suggestions?


title: How can we decide a glue or a kern when we are writing a macro?

text: I don't know if I am right. Let's read the codes :)               \setbox0=\vbox{a\par       \vskip2pt       \kern2pt       b}     \showbox0      the snippet of the log file:               .\glue 2.0     .\kern 2.0     .\glue(\parskip) 0.0 plus 1.0     .\glue(\baselineskip) 5.05556      When we               \setbox1=\vbox{\unvbox0       \setbox2=\lastbox       \unskip       \unskip       \global\skip0=\lastkern       \unkern       \global\skip1=\lastskip       \unskip}      Sometimes, we have no chance of examining the log file, so, how can we decide the glue or the kern in some `\skip<number>` is glue or kern?


title: Parallel make with standalone package

text: This question is a LaTeX question, although it might actually be resolved by changing the build procedure of the document instead of the document itself. I have a document that includes a bunch of subfiles, where each has preamble of its own. I use the `standalone` package to accomplish this. Now I have two versions of my `main.tex` file, where each only contains the preamble and an `\include{...}` list of all the subfiles. The two `main` files compile fine, each yielding a layout-wise different version of the document (one optimized for A4 printing, using two-column layout and somesuch, and one that is for ebook displays). Now I have a Makefile that builds both versions of the document. But since Make builds the two independent documents at the same time, pdfLaTeX is run on the standalone sub-documents separately and in parallel, causing all kinds of awkward errors, since files are written and read at the same time by two different instances of pdfLaTeX. I can think of several solutions to this problem, but wanted to ask for suggestions:   * Simply don't build the two documents simultaneously. Easiest solution, but somewhat unsatisfactory.   * Don't use `standalone` and remove preamble from subfiles. Since I have ~30 subfiles, this would be non negelegible amount of open-and-delete-work, plus I like the feature of being able to compile the subdocuments separately for developement/debugging.   * Use an alternative to `standalone` that doesn't have this problem (is there one?)   * Somehow tell `standalone` to use different filenames for the helper files for the two different document versions (my favourite, but I don't know if it's possible) Any suggestions?


title: Drawing molecules with tikz

text: I have to draw a molecule in 3D with a little pore represented by a 3D sphere inside of it with the same center. I have never used TikZ but I know that it's useful for drawing in LaTeX and I hope that someone will can give me pointers...


title: Multiple authors, with multiple affiliations

text: I have a paper with 3 authors, affiliated to 3 institutions, and it's supposed to abide to the `IEEEtran` format. Author A is affiliated to X and Z, Author B is affiliated to X, and Author C is affiliated to Y. I wonder if (and how) I can organize the author section like: ![enter image description here](http://i.stack.imgur.com/8uxGN.png) As you can see, Author 1 has multiple affiliations. I guess I could have a completely separate column for each author, with his affiliation below, but Author 1 would then have 4 lines of affiliation... The code I currently have is:               \documentclass[10pt, conference, compsocconf, letterpaper]{IEEEtran}          \pagestyle{plain}          \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{graphicx}     \usepackage{color}     \usepackage{amssymb}     \usepackage[draft]{fixme}     \usepackage{soul}          \begin{document}          \title{Paper Title}          \author{         \IEEEauthorblockN{Author 1}         \IEEEauthorblockA  {             University X\\             Country of X\\             University Z\\             Country of Z         }         \and         \IEEEauthorblockN{Author 2}         \IEEEauthorblockA  {             University X\\             Country of X         }         \and         \IEEEauthorblockN{Author 3}         \IEEEauthorblockA  {             University Y\\             Country of Y         }     }          \maketitle          \end{document}


title: Clearing page style, but adding on page number

text: \documentclass[11pt,a4paper]{article}         \usepackage[T1]{fontenc}         \usepackage{lipsum}         \usepackage{tocloft}         \begin{document}              \tableofcontents         \thispagestyle{empty}             \newpage              \section{Preface} %want section number to be 0         \thispagestyle{empty}             \pagenumbering{roman}         \lipsum[1-3]         \newpage              \section{Start From Here}         \lipsum[1-5]              \section{And So On...}         \lipsum[1-5]         \end{document}      Currently I have page numbering and title in the header and for both the header and footer I have a line (I'm not sure what it's called). For the preface, I want all of that gone, which is why I used `\thispagestyle{empty}`, but I _do_ want a roman page numbering in the bottom center. > How can I get the page numbering on the preface to show a roman numeral? (As > of now it only shows in ToC).


title: Figure is chopped off when inserting a MATLAB table as eps figure

text: I am trying to include a `MATLAB UI` table (which I have previously saved as an `.eps` figure and put it into the same folder as my `.tex` file) into a LaTeX document, using:               \begin{figure}     \centering     \includegraphics{Table_TEST1}        %{Figure name without .eps extension}     \caption{Caption1}     \label{fig:Test1Table}     \end{figure}      However, only a part of the figure appears, one quarter of the figure is chopped off. I tried to use               \includegraphics[scale=.5]{Table_TEST1}       instead, the figure is rescaled but one part of the figure is still missing. Any idea on how to solve this problem? When I open the `eps` figure using an `eps` viewer, it says that the dimensions are: width:470, height:293. I don't know if this fact is playing a role in the problem.


title: How to change bibliography style from [1] to 1

text: I know that several people have already asked this question, but for some strange reason the suggestions are not working. I have tried inserting:               \makeatletter     \renewcommand\@biblabel[1]{#1.}     \makeatother      into the preamble of my `.tex` file, of the `.ltb` file, and of the style file that I am using, however nothing changes the references. This is and example of what has been tried:               \documentclass[noheadings]{uncthesis}       \usepackage{amsmath,amssymb,amsthm,slashed,amsfonts}          \makeatletter     \renewcommand\@biblabel[1]{#1.}     \makeatother          \begin{document}     Alan Sokal~\cite{Sokal96} recommends Bourbaki's     text~\cite{Bourbaki70} for a gentle introduction to set theory.     \begin{thebibliography}{plain}     \bibselect{Bib}     \end{thebibliography}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uvNeF.png) The corresponding Bib.ltb would be:               \documentclass{amsart}     \usepackage{amsrefs}     \begin{document}      \begin{bibdiv}     \begin{biblist}     \bib{Bourbaki70}{book}{     title={Th\'eorie des ensembles},     author={Bourbaki, Nicolas},     date={1970},     publisher={Hermann},     address={Paris}     }     \bib{Sokal96}{article}{     title={Trangressing the boundaries},     subtitle={Toward a transformative hermeneutics of quantum gravity},     author={Sokal, Alan},     journal={Social Text},     volume={46/47},     date={1996},     pages={217--252}     }     \end{biblist}     \end{bibdiv}     \end{document}      I have also tried inserting:               \makeatletter     \renewcommand{\BibLabel}{%       \hfill       \Hy@raisedlink{\hyper@anchorstart{cite.\CurrentBib}\hyper@anchorend}%     \thebib.%     }     \makeatother      However, this yields the error message               2063: Undefined control sequence.     \BibLabel ->\hfill \Hy@raisedlink                                    {\hyper@anchorstart {cite.\CurrentBib }\hy...     l.2063 \begin{thebibliography}{plain}      Are there any other suggestions? Thank you!


title: How does one get a psbarcode in a letter's title?

text: Here is what I'm working with thus far:               \documentclass{letter}          \newcommand*{\BottomLeftX}{1.0in+\hoffset+\oddsidemargin}%     \newcommand*{\BottomLeftY}{\paperheight-1.0in-\voffset-\topmargin-\headheight-\headsep-\textheight}%          \newcommand*{\AbsolutePosition}[4][]{%         % #1 = tikz options         % #2 = x (from south west corner of page         % #3 = y         % #4 = text         \begin{tikzpicture}[overlay, ultra thick]             %\draw [shift={(#2,#3)},#1]  (current page.south west) circle (2pt)              \draw [#1]  ($(current page.south west) + (\BottomLeftX,\BottomLeftY) + (#2,#3)$)                  %circle (2pt) %  adding `[opacity=0.2]` to the node below will let you see this reference point                     node[] {#4};         \end{tikzpicture}%     }          \usepackage{float}     \usepackage[english]{babel}     \usepackage{fix-cm}      \usepackage{marvosym}     \usepackage{auto-pst-pdf}     \usepackage{pst-barcode}     \usepackage{background}     \usepackage{amsmath}     \usepackage{ textcomp }     \usepackage{graphicx}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{textpos}     \usepackage{pstricks}     \backgroundsetup{%       scale=2,       %% change accordingly       angle=0,       %% change accordingly       opacity=.2,    %% change accordingly       color =black,  %% change accordingly       contents={\begin{tikzpicture}[remember picture,overlay]             \node at ([yshift=-5pt,xshift=0pt]current page.center) {\includegraphics[width=5cm]{filmax.jpg}};         \end{tikzpicture}}     }     \usepackage[usestackEOL]{stackengine}     \edef\tmpbs{\the\baselineskip}     \setstackgap{L}{\tmpbs}     \newlength\tmpwd     \newlength\tmpht     \usepackage{invoice}     \fboxrule=1pt          \let\svaddress\address     \renewcommand\address[2][]{%       \ifx\relax#1\relax\svaddress{#2}\else       \def\theaddress{#2}\invoicenote{#1}\fi}          \def\invoicenote#1{%       \def\stackalignment{l}       \setbox0=\hbox{\expandafter\Longstack\expandafter{\theaddress}}       \tmpwd=\wd0\relax       \tmpht=1.5cm %\ht0\relax       \def\y{\fboxsep=0pt\fbox{\rule{0pt}{\tmpht}%         \stackon[\tmpht-\tmpbs]{\rule{\dimexpr\textwidth-\tmpwd-3cm\relax}{0pt}}%         {\hspace{0.23cm}~\textsf{\strut {\color{red}INVOICE}}~~\smash{\Longunderstack{#1}}}}}       \svaddress{\llap{\y\hspace{0.31cm}}\expandafter\Longstack\expandafter{\theaddress}}     }          %  ANY OF THESE FORMS WILL WORK:     %\address{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     %\address[~]{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     \address[\footnotesize Attention to: \hspace{0.15cm}Master of Provisions\\ \footnotesize Your Ref.\textnumero:\\ \footnotesize Our Ref.\textnumero:\\ \footnotesize Credit Terms: NET 15]{\emph{Invoice from:} \\ {\tiny My Address} \\ My Address \\ \begin{pspicture}(5,0.5in)\psbarcode{DATA}{height=0.1 width=1.82}{royalmail}\end{pspicture}}          \signature{Tin Tin}     \date{Hong Kong, Thu Apr 24 2014}     \begin{document}       \begin{letter}{\emph{Invoice to:} \\ {\tiny To Address} \\ To Address \\ To Address }         \opening{Invoice no. 0000000001}         Hello, and good evening\footnote{My representative's name is Georges Prosper Remi.}.         \begin{invoice}{USD}{0}           \ProjectTitle{Invoice}%           \Fee{Database Maintenance} {12999.99} {1}           \AbsolutePosition[fill=red,draw=red]{4.1cm}{-7.21cm}{\includegraphics[scale=0.5]{sig.png}}         \end{invoice}         \closing{\emph{Invoice Release Authorization:}}     \vspace{0cm}     %\begin{pspicture}(0.5in,0.5in)\psbarcode{0000000001}{eclevel=L}{qrcode}\end{pspicture}\hspace{5cm}      %\includegraphics[scale=0.3]{foot.png}     \fbox{         \parbox{11.54cm}{             ~\textsf{{\color{red}COMMENTS}}             \vspace{1.5cm}                  \hspace{9.25cm}{\tiny Master of Provisions}         }     }     \begin{textblock}{10}(-0.5,1.25)     \centering     Thank you for your business. \\ \vspace{0.5cm}\fontsize{10}{10}\selectfont {\Large\Letter} tintin@ics.ch \hspace{0.2cm} {\Large\Telefon} +1 (555) 555 - 5555     \end{textblock}       \end{letter}      In particular this portion:               \begin{letter}{\emph{Invoice to:} \\ {\tiny To Address} \\ To Address \\ To Address }      What I'd like to do is this:               \begin{letter}{\emph{Invoice to:} \\ {\tiny To Address} \\ To Address \\ To Address \\ \begin{pspicture}(5,0.5in)\psbarcode{DATA}{height=0.1 width 1.82}{royalmail}\end{pspicture}}      However, I get the following error:               Argument of \@no@pgbk has an extra }.     <inserted text>               \par     l.161 \end{letter}      Not sure what this means as the brackets seem spot on...


title: Special L for Lie Derivative

text: Does anyone happen to know how to typeset the special L character found, for example, in eq. 2.41 in this paper: http://arxiv.org/pdf/1107.5792v2.pdf that is being used for the Lie derivative? Thanks for the help!


title: Asymmetrical layout in two-sided document

text: I use two-sided document mode in `Book class KOMA Script`. It works well in the sense that the ToC, chapters, titles starts from the odd pages. Exactly we I need in a book. In a recent book I need to have asymmetrical text blocks in one spread—aligned to the left—in order to accommodate the margin notes to the right, and yet I want the beginning of the book (intro, ToC etc.) and the colophon to have a symmetrical layout. Since the two-sided mode defines the margins as `inside---outside`, which is a symmetrical layout through the spine, how can I have an asymmetrical margins in the two-sided mode? The second question is, how can I turn back to symmetrical margins for some particular pages? ![diagram](http://i.stack.imgur.com/NZzfp.png)


title: Change Section Label in Table of Contents and Section Title

text: I need help with how sections created in the appendix are labeled in the table of contents and the section title itself. As it sits now, I have each appendix as a section with a capitalized alpha character. Looking at the table of contents, I would like to change from "A Tables for Chapter One" to "Appendix A Tables for Chapter One." Likewise, I would like the title of the section (last page) to make the exact same change. Finally, I want the titles of each table and figure to remain as they are, i.e., without the word "Appendix." Details: I am using the msuphddissertation class file, which is structured as a memoir. The contents of the class file are below the tex file with the example dissertation.               \documentclass{msuphddissertation}     \usepackage{subfig,chngcntr,titlesec}          \begin{document}          \TOC      \LOT          \newpage     \addcontentsline{toc}{chapter}{APPENDICES}          \appendix          \counterwithin{table}{section}     \counterwithin{figure}{section}     \renewcommand\thesection{\Alph{section}}          \section{Tables for Chapter One}          \begin{table}[h!]     \center     \caption{Intestesting First Table}     \begin{tabular}{l*{4}{c}} \hline\hline     Var1 & 1.00 & 1.00 & 1.00 & 1.00\\     \hline\hline      \end{tabular}     \end{table}          \end{document}      =============================================== Class file:               % MSU Ph.D Dissertation class file     % Copyright by Clifford E. Weil and MSU Board of Trustees 2010     % This file must not to alter or distributed.     % New users should download the latest distribution from     % http://www.math.msu.edu/~weil/MSU_Ph.D._Dissertation.zip          % Report bugs to Clifford Weil (weil@math.msu.edu).     % Latest revision 8/12/13      % Identification     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{msuphddissertation}          % Bring in the regular book class     \LoadClass[12pt,oneside]{book}          % Bring in needed packages     \RequirePackage{ifthen}     \RequirePackage{setspace}     \RequirePackage[titles,subfigure]{tocloft}     %\RequirePackage{subfig}     \RequirePackage[margin=1in]{geometry}     \RequirePackage{pdflscape}     %\RequirePackage{fancyhdr}     \RequirePackage{rotating}          % Change to double spacing as defined by MS Word     % Redefine the \doublspacing command     \renewcommand{\doublespacing}{%       \setstretch {1.9}%  default       \ifcase \@ptsize \relax % 10pt         \setstretch {1.9}%       \or % 11pt         \setstretch {1.9}%       \or % 12pt         \setstretch {1.9}%       \fi     }          % Number all levels of document divisions     \setcounter{secnumdepth}{6}          % Set depth of table of contents     \setcounter{tocdepth}{6}          % Set second level of sub(super) scripts to 10 pt.     % Thanks to Lee Larson for this fix.     \DeclareMathSizes{12}{12}{10}{10}     \DeclareMathSizes{10}{10}{10}{10}     % Set footnote font size to 12pt.          % Define the command \unit      \newcommand*{\unit}[1]{\def\fromunit{#1}}          %Define the Title Page     \newcommand\maketitlepage{\begin{titlepage}%         \vspace*{.55in}               \begin{center}%               \MakeUppercase{\@title}%                \begin{doublespace}                     By                     \begin{tabular}[t]{c}%          \@author           \end{tabular}%           \end{doublespace}           \vspace{\fill}       {%       A  DISSERTATION      \vspace{\baselineskip}%              Submitted to \\         Michigan State University \\        in partial fulfillment of the requirements \\        for the degree of               \vspace{\baselineskip}%          \fromunit % Inserts unit name and degree type%              \vspace{\baselineskip}%          {\number\year}             }          \vspace{\baselineskip}       \end{center}      \end{titlepage}}%          % Define the command \abstractname      \newcommand{\abstractname}{\textbf{ABSTRACT}}          %Define the abstract environment for the dissertation       \newenvironment{abstract}{%         \thispagestyle{empty}              \pagenumbering{roman}                \begin{center}%              \bfseries \abstractname\vspace{\baselineskip}                  \MakeUppercase{\@title}                 \vspace{\baselineskip}                By            \vspace{\baselineskip}                     \begin{tabular}[t]{c}%          \@author           \end{tabular}          \end{center}                \begin{doublespace}          \addtocounter{page}{1}          }           {\end{doublespace}\pagestyle{empty}\newpage}          % Define the Copyright Page           \newenvironment{copyrt}{%         \newpage          \thispagestyle{empty}          \vspace*{\fill}          \begin{center}          \begin{tabular}{l}          Copyright by\\          \MakeUppercase{\@author}\\          \number\year          \end{tabular}         \end{center}\vfill}         {\newpage}          % Define the Dedication Page       \newcommand{\dedname}{DEDICATION}         \newenvironment{dedication}{%        \newpage          \thispagestyle{plain}           \pagestyle{plain}           \vspace*{\fill}}          {          \vfill}          % Define the Acknowledgement Page        \newcommand{\ackname}{ACKNOWLEDGMENTS}         \newenvironment{acknowledgment}{%           \newpage           \thispagestyle{plain}           \pagestyle{plain}            \begin{center}          {\bfseries\ackname}          \vspace{\baselineskip}          \end{center}          \begin{doublespace}           }          { \end{doublespace}\thispagestyle{plain}           \pagestyle{plain}}          % Define the Preface Page         \newcommand{\prefname}{PREFACE}             \newenvironment{preface}{%                 \newpage                 \thispagestyle{plain}                 \pagestyle{plain}                 \begin{center}                 {\bfseries\prefname}                  \vspace{\baselineskip}                 \end{center}             \begin{doublespace}     }             {\thispagestyle{plain}         \end{doublespace}                 \pagestyle{plain}     }          % Redefine the \chapter command to put "Chapter"      % before each chapter entry in the ToC and to put     % "Appendix" before each appendix entry in the ToC.     % Move up to top of page.     % Replaced \chaptername by \@chapapp 7-26-12     % Added \singlespacing command after \typeout 2/27/2014     \renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi                             \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@chapter\@schapter}     \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                            \if@mainmatter                              \refstepcounter{chapter}%                              \vspace*{-4\baselineskip}                                    \typeout{\singlespacing\@chapapp\space\thechapter.}%                                 \addcontentsline{toc}{chapter}%          {\protect\numberline{\@chapapp\space\thechapter}#1}%                            \else                              \addcontentsline{toc}{chapter}{#1}%                            \fi                         \else                           \addcontentsline{toc}{chapter}{#1}%                         \fi                         \chaptermark{#1}%                         \addtocontents{lof}{\protect\addvspace{10\p@}}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}          % Rededefine the table of contents command      \renewcommand\contentsname{TABLE OF CONTENTS}      \renewcommand\tableofcontents{\begin{singlespace}%         \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi         \chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase\contentsname}             \@mkboth{%               \MakeUppercase\contentsname}{\MakeUppercase\contentsname}               }%         \@starttoc{toc}%         \if@restonecol\twocolumn\fi         \end{singlespace}}          \newcommand{\TOC}{     \clearpage     \pagestyle{plain}     \tableofcontents     \clearpage     \pagestyle{plain}}              \renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}         \renewcommand{\cftaftertoctitle}{\vspace{\baselineskip}}             \setlength{\cftbeforechapskip}{\baselineskip}         \renewcommand{\cftchapnumwidth}{6em}            %  Define the \LOT command to augment the \listofftables command     \renewcommand\listtablename{LIST OF TABLES}      \renewcommand\listoftables{%            \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi        \chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase        \listtablename}}         \addcontentsline{toc}{chapter}{\textbf{LIST OF TABLES}\vspace{\baselineskip}}%           \@mkboth{\MakeUppercase\listtablesname}%                   {\MakeUppercase\listtablename}%        \begin{singlespace}         \vspace{-1\baselineskip}        \@starttoc{lot}%         \if@restonecol\twocolumn\fi         \end{singlespace}         }          \newcommand{\LOT}{     \clearpage     \setlength\cftbeforetabskip{\baselineskip}     \listoftables     \clearpage     \pagestyle{plain}}              \renewcommand{\cftafterlottitle}{\vspace{\baselineskip}}         \renewcommand{\cfttabnumwidth}{6em}           \renewcommand{\cfttabpresnum}{Table }               % Define the \LOF command to augment the \listoffigures command     \renewcommand\listfigurename{LIST OF FIGURES}      \renewcommand\listoffigures{%            \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi        \chapter*{\vspace{-2.5\baselineskip}\centerline{\large \MakeUppercase\listfigurename}}         \addcontentsline{toc}{chapter}{\textbf{LIST OF FIGURES}\vspace{\baselineskip}}%           \@mkboth{\MakeUppercase\listfigurename}%                   {\MakeUppercase\listfigurename}%        \begin{singlespace}         \@starttoc{lof}%         \if@restonecol\twocolumn\fi         \end{singlespace}         }          \newcommand{\LOF}{     \clearpage     \setlength\cftbeforefigskip{\baselineskip}     \listoffigures     \clearpage     \pagestyle{plain}}              \renewcommand{\cftafterloftitle}{\vspace{\baselineskip}}         \renewcommand{\cftfignumwidth}{6em}           \renewcommand{\cftfigpresnum}{Figure }               % Define the Abbreviations Page         \newcommand{\keyname}{Key to Symboles and Abbreviations}         \newenvironment{abbreviationskey}{%         \addcontentsline{toc}{chapter}             %{\textbf{\keyname}\textmd{\leaders\hbox to 1em{\hss.\hss}\hfill}}             {\textbf{\keyname}}             \newpage\thispagestyle{plain}\pagestyle{plain}         \begin{center}         {\bfseries{\MakeUppercase{\large\keyname}}}         \end{center}             }{\newpage}          % Single space quotation environments.     \renewenvironment{quotation}                    {\begin{singlespace}\list{}{\listparindent 1.5em%                             \itemindent    \listparindent                             \rightmargin   \leftmargin                             \parsep        \z@ \@plus\p@}%                     \item\relax}                    {\endlist\end{singlespace}}     \renewenvironment{quote}                    {\begin{singlespace}\list{}{\rightmargin\leftmargin}%                     \item\relax}                    {\endlist\end{singlespace}}              % Redefine the \appendix command to replace "Chapter"     % by "Appendix" for appendices in the ToC      \newcommand{\appname}{APPENDICES}     \renewcommand\appendix{\par     \clearpage\vspace*{\fill}     \begin{center}     \Huge{\textbf{\appname}}     \end{center}     \vfill     \newpage     %%  The next three lines added 8-2-12     %\addcontentsline{toc}{chapter}{\textbf{\appname}\textmd{\leaders\hbox to 1em{\hss.\hss}\hfill}}                     %\thispagestyle{myheadings}       \setcounter{chapter}{0}%       \setcounter{section}{0}%       \gdef\@chapapp{\appendixname}%       \gdef\thechapter{\@Alph\c@chapter}        \clearpage      }          % Single space the bibliography     \renewenvironment{thebibliography}[1]           {    \clearpage               \vspace*{\fill}               \begin{center}               \Huge \textbf{\MakeUppercase{\bibname}}                 \addcontentsline{toc}{chapter}{\textbf{\bibname}                         \vspace{\baselineskip}}%               \end{center}               \vfill               \newpage           \chapter*{\vspace{-2.2\baselineskip}\centerline{\MakeUppercase{\bibname}}}%               \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%              % \addcontentsline{toc}{chapter}{\textbf{\bibname}\textmd{\leaders\hbox to 1em{\hss.\hss}\hfill}              %\vspace{\baselineskip}}%                    \begin{singlespace}                     \list{\@biblabel{\@arabic\c@enumiv}}%                                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin\labelsep                 \@openbib@code                \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%                 \setlength{\itemsep}{.2in}           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}           {\def\@noitemerr            {\@latex@warning{Empty `thebibliography' environment}}%          \endlist\end{singlespace}}          % Define the msulandscape environment.     \let\LS@makecol=\@makecol     \let\LS@makefcolumn=\@makefcolumn     \def\LS@rot{%         \setbox\@outputbox\vbox{\hbox{\rotatebox{90}%         {\makebox[-4.5in][l]{\raisebox{-.4in}{\the\value{page}}}\box\@outputbox}}}}     \def\msulandscape{%         \clearpage         \thispagestyle{empty}         \begingroup         \vsize=\textwidth         \hsize=\textheight         \linewidth=\hsize         \columnwidth=\hsize         \@colroom=\vsize         \textheight=\vsize         \@colht=\vsize         \def\@makecol{\LS@makecol\LS@rot}%         \def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}     \def\endmsulandscape{%         \ifGin@pdftex         \pdfpageattr{/Rotate 90}         \fi         \clearpage          \endgroup         \global\@colht=\textheight         \global\vsize=\textheight         \global\@colroom=\textheight}          % Define the lscapenum environment.     \newenvironment{lscapenum}{      \clearpage\thispagestyle{empty}       \begin{landscape}        \pagestyle{fancy}        \fancyhead{} % clear all header fields        \fancyfoot{} % clear all footer fields        \renewcommand{\headrulewidth}{0pt}        \rfoot{           \setlength{\unitlength}{\textheight}          \begin{picture}(0,0)              \put(.077,0.78){\begin{sideways}\thepage\end{sideways}}          \end{picture}        }     }     {      \end{landscape}      \pagestyle{plain}     }          % Set the starting page style     \pagestyle{empty}


title: Change to two columns

text: I have a paper written in LNCS style. Is there any easy way to convert it to a two-column style? Simply using /two-column doesn't work as the columns are narrow, lines overflow, and it looks terrible overall. I tried switching class files, but then everything started to break (in particular, my definitions, author lists etc.) Is there any style sheet or class that will turn this class into nice looking two-columns that is compatible with the environments used in the original?


title: Define error bar color in scatter class

text: I'm using `scatter/classes` to define color and markers for a plot, and I would like to specify the error bar color this way as well (to match the marker color). I have seen the error bar colors in scatter plot post, but I don't know how to use the scatter class color, rather than the mapped color. Specifying the error bar color in the `scatter/classes` does not work.               \documentclass[article]{standalone}                    \usepackage{graphicx}     \usepackage{pgf,tikz}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.7}          \begin{document}     \begin{tikzpicture}         \begin{axis}           \addplot [scatter,             only marks,             scatter src=explicit symbolic,             scatter/classes={               A0={mark=o,red,/pgfplots/error bars/.cd,                 error mark options={draw=red}},               A1={mark=square,blue}},             error bars/.cd,             y dir=both,             y explicit]            table[x=x,y=y,y error=err,meta=class,row sep=crcr] {             x y err class\\             0 0 1   A0\\             1 1 1   A0\\             2 0 1   A1\\             3 2 2   A1\\           };         \end{axis}     \end{tikzpicture}     \end{document}      ![Error bars do not match scatter class](http://i.stack.imgur.com/h2V2Z.png)


title: Cannot compile tabu

text: I have been trying to compile the following tabu environment with xelatex, but to no avail:               \documentclass{article}     \usepackage{xcolor}     \usepackage{tabu}                         \begin{document}     \taburowcolors 10{green!25 .. yellow!80}     \begin{tabu}{X[-1]X}     %\everyrow{\midrule}     \repeatcell 2{     rows=10,     text/col1=Teste,     text/col2={Row number            \row$=$\thetaburow},     }     \end{tabu}          \end{document}      It generates an error: "undefined control sequence \end{tabu}."


title: TikZ: Polar coordinates referencing system

text: Many times I like to use polar coordinates but the reference frame is always at the origin. This is a bother when I went to draw a specific angle and radius from a location other than the origin. I end up having to do `xshift` and/or `yshift` or the `scope` environment. Is it possible to have polar coordinates work from the location I start each time; that is, it interprets the starting point as its origin. I don't just mean for one instance though. If I say, `\draw (1,1) -- (30:1cm);` and then later use `\draw (-2,5) -- (60:1cm);` each location will be treated as the origin when the line is drawn.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node at (0,0) {O};     \draw(-3,2) -- (45:1cm);     \end{tikzpicture}     \end{document}      From the picture, we see that the line was drawn right and down. However, 45 degrees from (-3,2) should be up and right since my reference frame wasn't the origin here. ![enter image description here](http://i.stack.imgur.com/eZ4Gd.png)


title: Text size in inkscape

text: I use the pdf+tex output for inkscape drawings so image fonts match document fonts and TeX can render the mathematics. When I scale the image for inclusion in my document, text does not scale (a well known problem). As the MWE below shows, I can tinker with font size manually. I'd like to be able to do that automatically, with a macro that wraps `\svgwidth` to reuse its argument. (I know I may still have to play with text positioning.) I have looked at the related questions on this site. inkscape screen capture: ![enter image description here](http://i.stack.imgur.com/HVPJN.png) (I can provide a link to the inkscape svg file if necessary.) MWE output: ![enter image description here](http://i.stack.imgur.com/4cC7q.png) The MWE:               \documentclass[12pt]{article}          \usepackage{amsmath}     \usepackage{color} % for inkscape     \usepackage{graphicx}          \begin{document}          Example with 12 point type in a 3 inch box in inkscape.          No size set (so the real thing)     \begin{center}     \input{inkscapeout.pdf_tex}     \end{center}          2/3 size     \begin{center}     \def\svgwidth{2in}     \input{inkscapeout.pdf_tex}     \end{center}          2/3 size with small font     \begin{center}     \def\svgwidth{2in}     \small{     \input{inkscapeout.pdf_tex}     }     \end{center}          2/3 size with tiny font     \begin{center}     \def\svgwidth{2in}     \tiny{     \input{inkscapeout.pdf_tex}     }     \end{center}          \end{document}      and, finally, the pdf_tex file generated by inkscape.               %% Creator: Inkscape 0.48.3.1, www.inkscape.org     %% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010     %% Accompanies image file 'inkscapeout.pdf' (pdf, eps, ps)     %%     %% To include the image in your LaTeX document, write     %%   \input{<filename>.pdf_tex}     %%  instead of     %%   \includegraphics{<filename>.pdf}     %% To scale the image, write     %%   \def\svgwidth{<desired width>}     %%   \input{<filename>.pdf_tex}     %%  instead of     %%   \includegraphics[width=<desired width>]{<filename>.pdf}     %%     %% Images with a different path to the parent latex file can     %% be accessed with the `import' package (which may need to be     %% installed) using     %%   \usepackage{import}     %% in the preamble, and then including the image with     %%   \import{<path to file>}{<filename>.pdf_tex}     %% Alternatively, one can specify     %%   \graphicspath{{<path to file>/}}     %%      %% For more information, please see info/svg-inkscape on CTAN:     %%   http://tug.ctan.org/tex-archive/info/svg-inkscape     %%     \begingroup%       \makeatletter%       \providecommand\color[2][]{%         \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%         \renewcommand\color[2][]{}%       }%       \providecommand\transparent[1]{%         \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%         \renewcommand\transparent[1]{}%       }%       \providecommand\rotatebox[2]{#2}%       \ifx\svgwidth\undefined%         \setlength{\unitlength}{215.5bp}%         \ifx\svgscale\undefined%           \relax%         \else%           \setlength{\unitlength}{\unitlength * \real{\svgscale}}%         \fi%       \else%         \setlength{\unitlength}{\svgwidth}%       \fi%       \global\let\svgwidth\undefined%       \global\let\svgscale\undefined%       \makeatother%       \begin{picture}(1,0.09907193)%         \put(0,0){\includegraphics[width=\unitlength]{inkscapeout.pdf}}%         \put(0.02059777,0.037881){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Boxed 12 pt mathematics: $x^2 + y^2 = z^2$.}}}%


title: Hyperref, target name without .1

text: Can `hyperref` make anchors with arbitrary name? After `\currentpdfbookmark{\contentsname}{toc} \tableofcontents` I got PDF that can be linked like http://some.where/filename.pdf#nameddest=toc.1. However, ".1" feels unnecessary.


title: Font Handling in XeTeX

text: Knuth's original Tex implementation uses TFM files to use font information for typesetting. Since XeTeX supports TrueType and OpenType fonts through `fontspec` package, how does it use these type of fonts? Does it produce TFM file level information on the fly during typesetting? Also, is TFM format enough to represent all necessary information required for typesetting documents using OpenType or TrueType fonts? As a side question, if TFM files in generated on the fly, does it mean that unless a font is available on both in Linux and Mac, I can't compile a `.dvi` file on Linux and see it in Mac?


title: Drawing a grid on array of images

text: I have nice story to tell with pictures. There Maltese type cross which is processing and twisting at the same time. So to make it more visual in paper i need grid something like this Drawing on an image with TikZ but on the whole array of images. How Can I draw a grid on the array of images. I have something like this, sequence of images in which something is precessing around image's locus, and want to give more visual effect to reader.               \documentclass{article}          \usepackage{graphicx}     \usepackage{subfig}     \usepackage{multirow}     \usepackage{array}     \usepackage{color}     \usepackage{tikz}     \usepackage{graphicx}     \begin{document}          \begin{figure}     \centering     \advance\leftskip-3cm     \advance\rightskip-3cm          \begin{tabular}{llll}          \hspace{5mm}\subfloat[A]{\includegraphics[trim = 10mm 10mm 70mm 20mm,clip,scale=0.15]{image1}} &     \hspace{-5mm}\subfloat[A]{\includegraphics[trim = 10mm 10mm 70mm 20mm,clip,scale=0.15]{image2}}\\     \hspace{5mm}\subfloat[A]{\includegraphics[trim = 10mm 10mm 70mm 20mm,clip,scale=0.15]{image3}} &     \hspace{-5mm}\subfloat[A]{\includegraphics[trim = 10mm 10mm 70mm 20mm,clip,scale=0.15]{image4}} \\          \end{tabular}     \caption{Time Evolution}     \end{figure}     \end{document}


title: Typesetting a definition

text: My current set up for type setting definitions is               \newenvironment{definition}[1][Definition:]{\begin{trivlist}                                \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}      which produces ![enter image description here](http://i.stack.imgur.com/LztWt.png) I don't really like this look but I don't want my definitions to look like the my physicals laws which are done in the `mdframed` package with the option `framemethod = tikz`               \begin{mdframed}[backgroundcolor = gray!30,       frametitle = Oberth effect]       Is where the use of a rocket engine when traveling at high speed generates       much more useful energy than one at low speed.     \end{mdframed}      and look like ![enter image description here](http://i.stack.imgur.com/lSz94.png) Are there any suggestions on what I can do have the `definition` environment not be so plain but not mimic the look of the `mdframed` environment?               \documentclass{article}     \usepackage[framemethod = tikz]{mdframed}     \newenvironment{definition}[1][Definition:]{\begin{trivlist}                                    \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}     \begin{document}     \begin{definition}     This is a definition.     \end{definition}     \begin{mdframed}[backgroundcolor = gray!30,       frametitle = Oberth effect]       Is where the use of a rocket engine when traveling at high speed generates       much more useful energy than one at low speed.     \end{mdframed}     \end{document}


title: How to divide document for black and color printing?

text: Most of my document is black text, but there is a color figure here and there. I would like to print the text on a black and white printer, and the figures on a color printer. I know i could just select the pages with figures and print them whole on the color printer, but then the text would look different. Is there a way (in PDF Latex) to generate two separate versions of the document, one with only the text, but with space left for the figures, and the other with the figures only, but in their proper positions, so that i can print the two versions on top of one another? I'm willing to manually mark the parts i want to separate.


title: Centered table with left aligned text

text: I am making a centered table but want the headings in the far left column to be left-aligned instead of centred. Preamble:               \documentclass[11pt]{article}     \usepackage{indentfirst}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}          Table code:     \begin{table}[ht]     \caption{Regression standard errors} % title of Table     \centering % used for centering table     \begin{tabular}{c c c c c} % centered columns (4 columns)     \hline\hline %inserts double horizontal lines     Confidence Interval & N=10 & N=30  & N=100 & N=500 \\ [0.5ex] % inserts table      %heading     \hline % inserts single horizontal line     Asymptotic & \% & \% & \% & \% \\     Efron & \% & \% & \% & \% \\     Hall & \% & \% & \% & \%   \\     Percentile-t & \% & \% & \% & \% \\     Symmetric percentile-t & \% & \% & \% & \% \\ [1ex] % [1ex] adds vertical space     \hline %inserts single line     \end{tabular}     \label{table:nonlin} % is used to refer this table in the text     \end{table}


title: How to change the style of "Contents" heading?

text: Help me, please to make the style of "Contents" heading to be as `\chapter{Le choix du thème}`. Also I would like to put all headings a little bit higher and to fix the `hyperref` for "Contents" in pdf               \documentclass[12pt]{report}           \usepackage{fontspec}     \usepackage[hidelinks]{hyperref}          \usepackage{xunicode}     \usepackage[no-sscript]{xltxtra}     \usepackage{csquotes}     \usepackage{polyglossia}     \setdefaultlanguage{french}     \setotherlanguages{german,english,greek,polish,russian}          \setmainfont[Mapping=tex-text]{CMU Serif}          \usepackage{setspace}     \usepackage{tocloft}                    \newfontfamily\greekfont[Script=Greek,Mapping=tex-text]{CMU Serif}     \newfontfamily\russianfont[Script=Cyrillic,Mapping=tex-text]{CMU Serif}          \usepackage{titlesec}          \titleformat{\chapter}[display]% NEW         {\Huge\bfseries\centering}{\chaptertitlename\ \thechapter}{5pt}{\Large}% NEW     \titlespacing*{\chapter}{0pt}{30pt}{20pt}% NEW     \titleformat{\section}       {\bfseries}       {\thesection}{1em}{}               \renewcommand\cftchappresnum{\chaptername\newline}     \setlength{\cftchapnumwidth}{3.5cm}               \renewcommand{\thechapter}{}     \renewcommand{\thesection}{\Roman{section}.}                    \usepackage[backend=biber,style=verbose-ibid,citepages=suppress,sorting=nty,babel=other]{biblatex}          \renewcommand\mkbibnamelast[1]{\textsc{#1}}                    \begin{document}          \doublespacing          \tableofcontents                         \renewcommand{\chaptername}{Préface}     \addtocontents{toc}{\protect\renewcommand\protect\chaptername{Préface}}     \chapter{Le choix du thème}     Balah blah blah L'Organisation des Nations unies (ONU)                \renewcommand{\chaptername}{Introduction}     \addtocontents{toc}{\protect\renewcommand\protect\chaptername{Introduction}}     \chapter{Initiatives du PO}     \section{Les lettres du PO 1904}     Balah blah blah (ONU)                     \renewcommand{\thechapter}{\arabic{chapter}}     \renewcommand{\thesection}{\thechapter.\arabic{section}}     \setcounter{chapter}{0}     \setcounter{section}{0}     \renewcommand{\chaptername}{Chapitre}     \addtocontents{toc}{\protect\renewcommand\protect\chaptername{Chapitre}}     \chapter{Les décisions des CP}     \section{Les décisions des CP de Rhodes 1964}               \chapter{L'ouvre de la CIP}     \section{Les décisions de la I\textsuperscript{re} CPP}               \chapter{Évaluation de l'œuvre accomplie et perspectives}     \section{Évaluation de l'œuvre accomplie}               \renewcommand{\thechapter}{}     \renewcommand{\chaptername}{Conclusion}     \addtocontents{toc}{\protect\renewcommand\protect\chaptername{Conclusion}}     \chapter{}                         \printbibheading[heading=bibintoc]     \printbibliography[keyword=primary,heading=subbibliography,title={Les sources principaux}]     \printbibliography[keyword=secondaire,heading=subbibliography,title={Les sources secondaires}]          \end{document}      Thank you.


title: Orphan lines with memoir

text: I have read that for memoir in order to set separation between paragraphs you use               \abnormalparskip{6pt}       However I have a question: Does it fix to 6pt or does it allow a little variation between minus and max setting \parskip. If the behaviour is differnt how can I set it to give a min an a max. I have some orphan lines which I want to remove, but using clubpenaty and widowpenalty makes the document look ugly.               \setlength{\parskip}{6pt plus 0.2 \baselineskip minus 0.2 \baselineskip}      I don't know how can I write a mwe for this issue. Sorry for that. Edit: MWE               \documentclass[11pt, twoside, a4paper]{memoir}          \usepackage[utf8]{inputenc}     \usepackage[spanish, es-noquoting, es-tabla]{babel}     \usepackage[spanish]{translator}     \usepackage[T1]{fontenc}          \usepackage[a4paper,                  hmargin = 2.5cm,                 vmargin = 2.5cm,                 twoside,                 includefoot,                 includehead,                 bindingoffset = 0.1cm                  ]                  {geometry}               \setlength{\parindent}{1em}     \setsecnumdepth{subsubsection} %Numeracion hasta subsection     \setcounter{tocdepth}{3}     %\setlength{\parskip}{6pt plus4mm minus3mm}     \abnormalparskip{6pt} % este es el que hay que usar en memoir 12          %Headers     \openright          \pagestyle{ruled}%          %\clubpenalty=10000     %\widowpenalty=10000          \begin{document}     \vspace*{55em}          xx xxxx xx xx xxxxxxxx xx xxxxxxxxxxx xx xxxxxxx xxx xxxxxxxxxxxx xx xxx xxxxxxxxxxxxx xxxxxxxxxxx, xxxxxxxxxx xx xx xxxxxx xxx xxx xxxxxxxx xxxxxxx xxx xxx xxxxxxx xxxxxxxxxxxxx, xx xxxxxx xx xx xx, xxx xxxxxxxx xx xxxxxxxxxxxxxxx x xxx xxxxx xx xxxxxxx xxxxxxx xx xxxxxxxxxxxxxxx xx xxx xxxxxxx xx xxxxxxxxxxxx xxxxxxx x xxx, xxxx xx xxx xxxxxxxxxxxxxx, xxxxxxxx xxxxxx xx xxxxxxxxxxxxx xx xxx xxxxxxxxxx xx xxxxxxxxx xxxxxx xx xx xx x xx xxxxxxxxxxx xxxxx xx.     \end{document}


title: One acronym for two words

text: I got a problem with my acronyms. I try to use one acronym for two words. I don't get any warnings or errors but it does not really work. The following is a minimalistic example.               \begin{document}       \begin{acronym}[Acronyms]          \acro{ac1} {Acronym}          \acro{ex} {Example}          \acro{BA} [BA] {Bank Analyzer}          \acro{BAL} [BA] {Balance Analyzer}       \end{acronym}       \section{\acl{BA}}       \subsection{Balancing in \acl{BA}}       The \ac{BA} is not the \ac{BAL}.     \end{document}      My output is like this: > # Bank Analyzer > > ## Balancing in Bank Analyzer > > The BA is is not the Balance Analyzer (BA). But the last line should be: > The Bank Analyzer (BA) is not the Balance Analyzer (BA). Hope I could explain my problem good enough that you can help me :D. If you need additional information, please tell me. Edit: Firstly I had a confusing post. I edited it in hope to make it more clear.


title: How can I export the *.bbl file after compiling with TexPad and using central *.bib file?

text: I am using TexPad for Mac and I have a central `*.bib` file with my bibliography which is automatically generated using Mendeley. Everything works nicely, but now I want to send my colleague the bibliography (but not my entire `*.bib` file) of our joint work, i.e. the `*.bbl` file and I can't seem to find it anywhere, because TexPad takes care of all the auxiliary files so neatly that they are apparently nowhere to be found - anybody every had that problem?


title: How to decrease the counter in tikz foreach loop

text: I have the following code:               \documentclass[11pt]{article}     \usepackage[a4paper]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}[node distance = 0.5cm, auto]     \node (0) {Block 0};     \node (1) [below= of 0.south] {Block 1};     \node (2) [below= of 1.south] {Block 2};     \end{tikzpicture}     \end{document}      It prints this: ![enter image description here](http://i.stack.imgur.com/vlUav.png) I tried to do the same with pgf loop, but don't know how to decrease the counter:               \foreach \x in {0,...,2}     {       \ifnum\x=0\relax           \node (\x) {Block \x};       \else           %\prev=\x - 1 <- ???           \node (\x) [below= of \prev.south] {Block \x};       \fi     }


title: Iterate over certain matrix cells

text: I have a matrix and want to reference several nodes of this matrix. How do I add a line for some of the cells? I came up with this:               \documentclass[12pt]{scrbook}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \begin{tikzpicture}             \matrix (m) [matrix of nodes]             {1 & 2 & 3 & 4 & 5 \\};                  \foreach \i in {0, 3}             {                     \pgfmathsetmacro\iplusone{1+\i}                     \pgfmathsetmacro\itimesfour{4*\i}                     \draw (m-1-\iplusone .south) -- node [at end] {\itimesfour} +(0, -1);             };     \end{tikzpicture}     \end{document}      Which is a simplified version of what I want to do. However, this does not work and gives the error:               Package PGF Math Error: Unknown operator `s' or `so' (in '0.south').      I don't know where to start with this error at hand.


title: Bibliography with biblatex: how to create additional labels using authoryear-style?

text: I've got a problem with my bibliography. I'm working with `biblatex` using authoryear-style. I did some modifications for my semester paper, but there's still one problem left: I'd like to display **additionally** the last name(s) of the author and the year in the bibliography (just as in the continuous text). Both last name and year should be formatted bold. Here's an example: In the continuous text: Test (Bögelsack et al. 1985). In the bibliography: **Bögelsack et al. 1985** Bögelsack, G.; Kallenbach, E.; Linnemann, G. (1985): Roboter in der Gerätetechnik. Heidelberg: A. Hüthig. isbn: 3778510428. Here's my .tex:               \documentclass{scrreprt}          \usepackage[ngerman]{babel}     \usepackage[babel, german=quotes]{csquotes}     \usepackage[style=authoryear, maxcitenames=2, firstinits=true, uniquename=init, backend=biber]{biblatex}     \usepackage{filecontents}          \addbibresource{Label.bib}          \AtBeginBibliography{%     \renewcommand*{\multinamedelim}{\addsemicolon\space}     \renewcommand*{\finalnamedelim}{\addsemicolon\space}     \renewcommand{\labelnamepunct}{\addcolon\space}     \DeclareFieldFormat{title}{#1\isdot}     \DeclareNameFormat{sortname}{     \iffirstinits         {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}         {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%         \usebibmacro{name:andothers}}     }          \DefineBibliographyStrings{ngerman}{andothers={et\ al\adddot}}          \begin{filecontents}{Label.bib}     @book{Bogelsack.1985,     author = {B{\"o}gelsack, G. and Kallenbach, Eberhard and Linnemann, Gerhard},     year = {1985},     title = {Roboter in der Ger{\"a}tetechnik},     address = {Heidelberg},     publisher = {A. H{\"u}thig},     isbn = {3778510428}     }     \end{filecontents}          \begin{document}          Test (\cite{Bogelsack.1985}).          \printbibliography          \end{document}      I spent many hours searching on the web to find a solution, but I didn't find anything about this topic. Does anybody have an idea?