title: Makebox alignment and use of Specific font size

text: The alignment of `\makebox` isn't proper(uneven on the left and right). How do I fix it? And How to use a specific font size (12pt,11pt) instead of `\Large` or similar switches. What I require is , globally the size must be 12pt and the headings need to be 14pt. Here is the MWE:               \documentclass[letterpaper,12pt]{article}     \newlength{\outerbordwidth}     \pagestyle{empty}     \raggedbottom     \raggedright     \usepackage[svgnames]{xcolor}     \usepackage{framed,tabularx,array}     \usepackage{tocloft}     \usepackage{mathptmx}          %-----------------------------------------------------------     %Edit these values as you see fit          \setlength{\outerbordwidth}{3pt}  % Width of border outside of title bars     \definecolor{shadecolor}{gray}{0.75}  % Outer background color of title bars (0 = black, 1 = white)     \definecolor{shadecolorB}{gray}{0.93}  % Inner background color of title bars               %-----------------------------------------------------------     %Margin setup          \setlength{\evensidemargin}{-0.25in}     \setlength{\headheight}{0in}     \setlength{\headsep}{0in}     \setlength{\oddsidemargin}{-0.25in}     \setlength{\paperheight}{11in}     \setlength{\paperwidth}{8.5in}     \setlength{\tabcolsep}{0in}     \setlength{\textheight}{9.5in}     \setlength{\textwidth}{7in}     \setlength{\topmargin}{-0.3in}     \setlength{\topskip}{0in}     \setlength{\voffset}{0.1in}               %-----------------------------------------------------------     %Custom commands     \newcommand{\resheadings}[1]{\vspace{8pt}       \parbox{\textwidth}{\setlength{\FrameSep}{\outerbordwidth}         \begin{shaded}     \setlength{\fboxsep}{0pt}\makebox[\textwidth][l]{\setlength{\fboxsep}{4pt}\fcolorbox{shadecolorB}{shadecolorB}{\textbf{{\mbox{~}\makebox[6.762in][l]{\large #1} \vphantom{p\^{E}}}}}}         \end{shaded}       }\vspace{-5pt}     }     %-----------------------------------------------------------               \begin{document}          \begin{tabularx}{7in}{Xr}       \textbf{\Large Your Name} & \textbf{\today} \\       Short description of you & E-mail \\       Adress & Homepage \\     \end{tabularx}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \resheadings{Education}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \end{document}      ![enter image description here](http://i.stack.imgur.com/kXYkM.png)


title: How can I do something after the next pagebreak?

text: I'm writing a document where I say something like "if you look at Figure 1 on the next page, then you will see that blah blah blah". So what I want to do is have latex skip a number when numbering pages. I know that I can do this using               \addtocounter{page}{1}      but, that will increase the counter on whatever page that command appears on. So I could compile my document and put it somewhere within the next page, but then if something changes and stuff moves around, it could end up on the wrong page, sort-of defeating the whole purpose of latex! So is there some way to tell latex to count up a page number AFTER the next pagebreak, wherever that pagebreak might be? ps I'm doing this so I can staple in a handwritten page.


title: How to create Candle Symbol in LaTeX

text: I have a need to insert a candle symbol in "elite" in the place of "i". I browsed through the comprehensive LaTeX symbols pdf and could not find any one matching up. Is there any easy way to achieve this? An image processing tool is always a way but I wanted to see if LaTeX has any solutions for it.


title: Feynmp: Circle with three vertices

text: I want to use `feynmp` to draw the one-loop correction to the vertex in phi^3 theory. This is just a circle with three evenly-spaced incoming lines. The thing is I want the figure to be dashed, so using pre-defined polygons won't work. The best I can do is this, but I want it to be a circle in the middle, not a tragically deformed hexagon:               \documentclass{article}     \usepackage{feynmp}     \begin{document}     \unitlength = 1mm     \begin{figure}[!h]     \begin{fmffile}{test1}     \begin{fmfgraph*}(48,20)     \fmfcurved     \fmfleft{i1,i2,i3}     \fmfright{o1,o2,o3}     \fmftop{t1,t2,t3}     \fmfbottom{b1,b2,b3}          \fmf{plain}{i2,v1}     \fmf{plain}{v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v1}     \fmf{phantom}{v4,t2}     \fmf{phantom}{v10,b2}     \fmf{phantom}{v7,o2}     %\fmffreeze     \fmf{plain}{v5,t3}     \fmf{plain}{v9,b3}          \end{fmfgraph*}     \end{fmffile}     \end{figure}     \end{document}      ![Image](http://i.stack.imgur.com/1A8q4.png)


title: How to display some text based on a condition inside a tabular environment?

text: I defined a variable `\@afwezig` that holds people that were not present at a certain meeting.               \long\def\@afwezig{}     \def\afwezig#1{\def\@afwezig{#1}}      Now I want to make the header of the meeting report as follows :               \newcommand{\makeheader}{     \noindent     \begin{tabularx}{\linewidth}{l X}       Aanwezig&: \@aanwezig \\       Verontschuldigd&: \@verontschuldigd \\      \ifx\@afwezig\@empty       \relax      \else      Afwezig&: \@afwezig \\      \fi %          \end{tabularx}          }      This is supposed to give a table with "Afwezig:" if I specify `\afwezig{somename}` in my document, but a table without the part "Afwezig:" if nothing is specified. Problem is, the part "Afwezig:" is displayed if I didn't specify '\afwezig', and I get tons of errors when I put `\afwezig{}` in my document file. The first error: > ! Incomplete \ifx; all text was ignored after line 10. What am I doing wrong here? PS : could somebody create a label with condition or if-else or so? thx


title: Error in PSTricks in circuit macros

text: I am trying the same way to use circuit macros through the example from Mr. Peter Jan Randewijk (http://staff.ee.sun.ac.za/pjrandewijk/wiki/index.php/M4_Circuit_Macros). I have installed M4 support as well DPIC and circuit macros. First I had the same erros above. After that, I downloaded the last psstring package (http://tug.org/PSTricks/main.cgi/) and the noCurrentValue passed and I got the following error:               Undefined control sequence \spline      I think I have done the correct way in installing pstrick package, altough I found few documentation about it. I am using Ubuntu 10.04.4. The same way I have tried in windows 7 and it worked well. Can anyone help me?


title: Modifying a thesis template: abstract environment

text: I am using a thesis template available here. I have a problem in working with this template: I would like to have a 'normal' abstract, directly after the title page. In this template the abstract is pimped with all kinds of additional information. I would just like to have the lay-out of the usual `\begin{abstract}` environment. I deleted all commands in the template concerning the abstract part, but I keep getting this additional stuff.


title: How to set the click on Down button effect on beamer?

text: How to make the effect of "When I click on Down button on beamer, another sentence appears" ? Do I need to set multiple frames? If yes, how to make all of these frames on the same page ? How to proceed please? Thanks a lot!


title: Create Pole/Point Integral Symbols

text: I want to create the following shaped integrals found in the unicode-math package symbols list: ![enter image description here](http://i.stack.imgur.com/KXylD.png) I created my own package a while ago for defining some symbols/shortcuts, and I want to _recreate_ these symbols (not simply import them from unicode-math because I want them to match the MinionPro font that I use for math, and since I want integrals to be upright (which I defined in my package as `\rint`) and created symbols not already in MinionPro for math I don't want to have to re- do all my previous work). There is a question here that asks something similar, but it's only for imposing a symbol on an integral. In other words, the integral runs through the symbol and it overlaps. I already know how to do this but as you can see, the integrals I want here stop where the point symbol is entered (i.e. it doesn't intersect with whatever symbol is in the middle). MinionPro (specifically, `MnSymbolF1`) already has the symbol in the middle of the last integral shown, but I'm also not sure if the middle two integrals use different symbols or simply shift/resize that symbol somehow. `MnSymbolF1` also has a symbol _like_ the one used in the first integral, but I guess shifted/flipped and possibly resized somehow. Thus, how can I **create** these symbols by myself, in a way that's compatible with LuaTeX (or at least XeTeX)?


title: Cannot find dvipng.sty but MikTeX installed package

text: I am trying to use Iguanatex, but the program cannot access dvipng. According to the MikTeX package manager, mixtex-dvipng-bin-2.9 has been installed and I see dvipng.exe in the MikTeX 2.9 installation directory. However, when I try to compile a simple document in WinEdt, I get the error " File 'dvipng.sty' not found." MikTeX does not try to install the package, ostensibly because it has already been installed. Could anyone please help me get dvipng (and, by extension, Iguanatex) working? Thanks!


title: Double-quote produces guillemets in emacs

text: I am having a totally bizarre problem with typing quote marks in tex documents in emacs. I work as an editor, so I receive tex source files from a publisher and I work on them. I work in emacs 24.3.1 with auctex 11.87, on Ubuntu 14.04. A few days ago, the following behavior began: when I type the double-quote key `"` in the source buffer, emacs inserts guillemets, `\og` and `\fg{}`, rather than ```` and `''`, which is what usually happens when pressing `"` in LaTeX- mode. Here is as much information as I could gather:   1. This only happens with files I receive from the publisher. It doesn't happen with pre-existing tex files on my machine, nor with new ones that I create.   2. It happens even when I start emacs with the `emacs -q` command, so that it doesn't read my `.emacs` file.   3. It still happens if I copy or move the file to another location from the command line.   4. It still happens if I copy or move the file to another location from the command line, then delete its contents within emacs.   5. It doesn't happen if I copy the file contents into a new buffer from within emacs.   6. It still happens if I delete the `.aux` and `.log` files.   7. The `"` key is bound to the command `TeX-insert-quote`.   8. The values of the variables `TeX-open-quote` and `TeX-close-quote` are ```` and `''`, respectively, as usual. I conclude from this that emacs is reading some "secret" information associated to the file that I don't know about. It is nothing in my settings and seems to have nothing to do with the file contents. Any thoughts/suggestions/fixes much appreciated. **Update:** The problem went away for a while, then reasserted itself. As per giordano's suggestion in the comments, I checked the value of `TeX-quote- language` and found that it is:               ("french" "\\og "          (lambda nil (concat "\\fg" (unless (member "xspace" TeX-active-styles)"{}"))) nil)      (However, the value of `TeX-quote-language-alist` is `nil`.) I think this is somehow being caused by the custom class file that I need to use for my work. Is there some way to just add a line in my `.emacs` that will override this behavior? I just want my normal quotes back!!


title: fullwidth environment with sidenotes package

text: How to have fullwidth text. Odd page result is not expected one. Even page result is correct.               \documentclass[twoside=semi]{scrbook}          \usepackage{sidenotes}     \usepackage[demo]{graphicx}          \usepackage[paperwidth=170mm, paperheight=240mm, left=142pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt     %,bindingoffset=30pt     ,asymmetric     ,reversemarginpar     ,showframe]{geometry}          \usepackage{blindtext}          \makeatletter     % fullwidth environment, text across textwidth+marginparsep+marginparwidth     \newlength{\overhang}     \setlength{\overhang}{\marginparwidth}     \addtolength{\overhang}{\marginparsep}     %     \newenvironment{fullwidth}       {\ifthenelse{\boolean{@twoside}}%          {\begin{adjustwidth*}{}{-\overhang}}%          {\begin{adjustwidth}{}{-\overhang}}%       }%       {\ifthenelse{\boolean{@twoside}}%         {\end{adjustwidth*}}%         {\end{adjustwidth}}%       }     \makeatother          \begin{document}          \begin{fullwidth}     %\secion{hh}     \minisec{hh}     \blindtext     \end{fullwidth}          \clearpage          \begin{fullwidth}     %\secion{hh}     \minisec{hh}     \blindtext     \end{fullwidth}               \end{document}       > Wrong Odd page ![enter image description here](http://i.stack.imgur.com/0FEaf.jpg) > Even page results are correct ![enter image description here](http://i.stack.imgur.com/CatpE.jpg)


title: Tikz wave not covering multiple tabular columns

text: This is a follow-up to my earlier questions here and here. In short, what I want to achieve is an arc over multiple columns, which I am achieving using Tikz. Code is shown below.               \documentclass[12pt]{article}     \usepackage{tikz}     \newcommand{\mulcol}[1]{\multicolumn{2}{c}{#1}}     \usetikzlibrary{decorations.pathmorphing}     \newcommand\myarc[2][]{%       \tikz[overlay,remember picture] \node at (0,0.4) (a) {};#2%       \tikz[overlay,remember picture] \node at (0,0.4) (b) {};       \begin{tikzpicture}[overlay,remember picture,out=35,in=145,distance=0.2cm]         \draw[#1] (a.center) to (b.center);       \end{tikzpicture}}          \begin{document}          \begin{center}     \begin{tabular}{*{6}{c}}     \myarc{a&a}&a&a&a&a\\     \myarc{\mulcol{a}}&\mulcol{a}&\mulcol{a}\\     \end{tabular}     \end{center}     \end{document}      **Produced output** : ![Output from the code above](http://i.stack.imgur.com/91S8l.png) With this the first row gives the correct orientation of the content and the arc above, but the second row offsets the content of the multicol forward (circled red in the figure). What causes this offset to occur and is there any way to correct it?


title: How to add a line break in math mode but number the whole as one formula?

text: I am trying to get the following formula on two lines like this:               \begin{equation}      W \in \mathbf{M}_N \rightarrow W' \in \mathbf{M}_{N+1}\\     (w_{ij})_{1\leq i,j\leq N} \mapsto (w_{ij})_{1\leq i,j\leq N+1}     \text{with} \left\{ \begin{array}{l}     w_{ij} = w_{ij} \quad \text{for} \; 1\leq i,j\leq N \\     w_{i,N+1} = w_{i,k}\\     w_{N+1,i} = w_{k,i}     \end{array} \right.     \end{equation}      I've read about `align` and `align*` environments, however I want something in between. What I want is this thing to be numbered (and to be able to reference it) but only once, as one formula, and what the `align` environment does is number both lines seperatly (or not at all in `align*`) What can I do to make this happen?


title: Odd graphics error -- "division by 0"

text: When I compile this code in `xelatex`...               \documentclass[letterpaper]{texMemo}     \usepackage{graphicx}     \usepackage{lipsum}          \memoto{You}     \memofrom{Me}     \memodate{\today}     \memosubject{Some stuff}     \logo{\includegraphics[width=0.3\textwidth]{/Dropbox/foo/bar/baz/my_cool_logo_file.png}}          \begin{document}              \maketitle              \lipsum[1]          \end{document}      I get errors about `unable to load picture or PDF file` and `package graphics Error: division by 0`. I did find this page, which looked promising, but it didn't solve the problem. I also had a look at the `grffile` package, but it didn't seem to offer anything I could use. How should I fix this problem?


title: Aligning numbers in tables

text: just wanted to create a table, that looks something like the following ![table](http://i.imgur.com/YABzM4O.jpg) First and second row are no problem at all, but the third row is difficult. I can't achieve this special alignment. Thanks in advance


title: How to change the default language of moderncv

text: How can I change the default language of moderncv?


title: Curly Quote usage in XeTeX via LyX

text: I have this preamble in my LyX document:               \widowpenalty=10000     \clubpenalty=10000     \raggedbottom     \usepackage{dtklogos}     \usepackage{fontspec}     %\defaultfontfeatures{Contextuals=Alternate,Numbers=Lining,SmallCapsFeatures={Kerning=Uppercase}}     %\setmainfont{Calluna}     %\setsansfont{Calluna Sans}     \setmainfont[Numbers={Lining},Ligatures={Historic,Rare,Discretionary,TeX},Contextuals=Swash]{Calluna}     \pagenumbering{roman}     \usepackage{microtype}      and got this output: ![enter image description here](http://i.stack.imgur.com/TF1Ql.png)   Notice the use of curly quotation marks appropriate to the language. As soon as I remove the `Ligature={...}` part of the `\setmainfont`, I get this output: ![enter image description here](http://i.stack.imgur.com/7dpDw.png) It is also the case if I uncomment `\defaultfontfeatures`, `\setmainfont` and comment out `\setmainfont [...],Liga...` right afterwards. I cannot seem to pinpoint where the option to have "curly quotes" used by default (which is what I see in the LyX menus) in XeTeX.


title: How to get a $^*$ aligned to the right

text: I use the term `^*\mathbb{R}` in my thesis, and this works fine. However if i have something like `x\in^*\mathbb{R}`, the asterisk moves to the left, like it belongs to the \in sign. How do I prevent this from happening and make it stick to the `\mathbb{R}`? Thanks


title: How do I add parfor in algorithmic environment?

text: I want to have a **parfor** loop in my algorithm listing (it should work exactly as standard **for** loop works). How to either change the displayed name of for loop or add my own loop which will keep the indents?


title: How to write Rudin's symbol for absolute continuity of measures?

text: In Rudin's Real and Complex Analysis, there is a symbol for stating measure `$\lambda$` is absolutely continuous with respect to measure `$\mu$`. The symbol is like `$\lambda\ll\mu$`, but not exactly.


title: Drawing a bijective map with TiKz

text: I am trying to produce a diagram similar to the following (from Wikipedia) ![Bijection](http://i.stack.imgur.com/q0opt.png) in TiKz. Now, I thought this would be relatively simple, however, I am having trouble getting the elements (the dots) to be of the correct size and am unsure how to elegantly surround the elements in an ellipse. My current TiKz code is               \documentclass{article}     \pagestyle{empty}     \usepackage{tikz}     \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%         shapes,shadows,matrix}          \begin{document}     \begin{figure}      \centering      \begin{tikzpicture}[ele/.style={fill=black,minimum size=2pt,circle}, node distance=7pt]       \node[ele] (a1) {};       \node[ele] (a2) [below=of a1] {};       \node[ele] (a3) [below=of a2] {};       \node[ele] (a4) [below=of a3] {};       \node[ele] (b1) [right=of a1,xshift=15pt] {};       \node[ele] (b2) [below=of b1] {};       \node[ele] (b3) [below=of b2] {};       \node[ele] (b4) [below=of b3] {};       \draw[->,thick] (a1) -- (b4);       \draw[->,thick] (a2) -- (b2);       \draw[->,thick] (a3) -- (b1);       \draw[->,thick] (a4) -- (b3);      \end{tikzpicture}     \end{figure}     \end{document}      which renders as ![Mine](http://i.stack.imgur.com/ATuEK.png) Can anyone recommend a more elegant means of drawing such a diagram?


title: Break line within a macro while writing to a file

text: I am trying to use (La)TeX as a macro pre-processor for a programming language. My idea is to use the `VerbatimOut` environment from the `fancyvrb` package to output essentially verbatim text, but using `@` as an escape character to introduce a macro. Here's an example of the sort of thing I have in mind:               \documentclass{article}     \usepackage{fancyvrb}          \def\definesortfunction #1;{%     #1[] sort(#1[]  a) {         if (a.length <= 1) return a;          static #1[] merge(#1[] b, #1[] c) {              #1[] toreturn;             int i = 0, j = 0;             while (i < b.length && j < c.length) {                 if (!(c[j] < b[i])) { toreturn.push(b[i]); ++i; }                 else { toreturn.push(c[j]); ++j; }             }             while (i < b.length) {                 toreturn.push(b[i]);                 ++i;             }             while (j < c.length) {                 toreturn.push(c[j]);                 ++j;             }             return toreturn;         }         int halfway = floor(a.length / 2);         #1[] b = sort(a[0:halfway]);         #1[] c = sort(a[halfway:a.length]);                        return merge(b, c);     }}          \begin{VerbatimOut}[commandchars=@\#~]{testoutputfile.asy}     bool operator <(pair a, pair b) {         return (a.x < b.x  || (a.x == b.x && a.y < b.y));          @definesortfunction pair;     \end{VerbatimOut}          \begin{document}     \VerbatimInput{testoutputfile.asy}     \end{document}      The resulting file works well as far as the Asymptote compiler is concerned. The problem is that the Asymptote source file is virtually unreadable (to humans) because the entire macro gets typeset on one line--including the line that was originally preceeded by three distinct line breaks. By playing with active characters, I have been able to replace the line breaks by the letters `^^M` or `\par` (both of which break the Asymptote compiler), but I have not found a way to replace them with actual line breaks. How can I do this? (Note that I am in no way wedded to the `fancyvrb` package; anything verbatim file-output environment with custom escapes would satisfy me, including one created on the spot. But since TeX code shows up sometimes in Asymptote files, being able to customize the escape characters is essential.)


title: Search and find an old style numeral in a pdf

text: I am compiling this tex file               \documentclass{article}     \usepackage{hfoldsty}     \begin{document}     1 $1$     \end{document}      with pdflatex and open the resulting pdf with evince. If I search the digit one (1), it finds only the second one which is in upper case and not in "old style". I tried               \input{glyphtounicode.tex}     \pdfgentounicode=1     \pdfglyphtounicode{textoneoldstyle}{0031}      but that didn't change anything. Also the packages `cmap` and `mmap` do not help which is expected, as far as I understand, because `hfoldsty` provides a virtual font with which these packages do not work. Could you please tell me how I can find the old syle 1 in the pdf?


title: Bold monospace font extra-large

text: I would like to print very large (e.g., font size 43) monospaced bold text. The methods I know don't seem to go together:               \documentclass[10pt, a4paper]{article}     \usepackage{anyfontsize}     \font\btt=rm-lmtk10          \begin{document}          {\btt TEXT1}          {\fontsize{43}{48}\selectfont TEXT2}          {\fontsize{43}{48}\selectfont \btt TEXT3}    %not working          \end{document}      ![enter image description here](http://i.stack.imgur.com/kNEQQ.png)


title: page number location in biblatex

text: I am using `\printbibliography` command to create bibliography in `biblatex`. The problem is the page number is located at the center bottom while i want it to be at the right bottom. I don't have the slightest how to modify it. I've tried modifying the environment but seems not to be the case. Anyone has an idea? _edit_ here's the MWE:               \documentclass[12pt,oneside]{book}     \usepackage{fancyhdr}     \usepackage[style=authoryear,labelnumber,defernumbers]{biblatex}     \addbibresource{bibli.bib}          \begin{document}     \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \addtolength{\headheight}{0pt}     \setlength{\headsep}{0pt}     \renewcommand{\headrulewidth}{0pt}     \rfoot{\thepage}     \thispagestyle{fancy}     \cite{haber}     \printbibliography     \end{document}


title: Function sign table, complete with first and second derivative, plus concavity/convexity and asymptotic behaviour - a better way?

text: There has got to be a better/easier way to do this!! And by the way, how does one format the code [when posting a question] to look nice, compact, and full of colours?               \documentclass{article}          \usepackage[2.5cm]{geometry}% http://ctan.org/pkg/geometry     \usepackage{amsmath}% http://ctan.org/pkg/amsmath          \begin{document}     \begin{tabular}{ l || l c c c c c c c r |}         $x$ \vspace{1pt}         & $ -\, \infty $         & \hspace*{-0.5cm}          & \hspace*{-0.5cm} $ -\, 1 $         & \hspace*{-0.5cm}         & \hspace*{-0.7cm} $0$         & \hspace*{-1.0cm}         & \hspace*{-0.5cm} $+\, 1$         & \hspace*{-0.5cm}         & \hspace*{-0.5cm} $ +\, \infty $ \\       \hline            \parbox[t][1.0cm]{2.0cm}{\vspace{1pt} $y' \,=\, \dfrac{\,x^{2} \,-\, 1\,}{x^{2}}$ \vspace{1pt}}         & $\begin{array}{c} \\ + \quad +\\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ + \quad + \quad +  \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ 0 \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ - \quad - \quad - \\ \end{array}$         & \hspace*{-0.7cm} $\begin{array}{c} \\ \vert \\ \end{array}$         & \hspace*{-1.0cm} $\begin{array}{c} \\ - \quad - \quad - \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ 0 \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ + \quad + \quad + \\ \end{array}$         & \hspace*{-1.0cm} $\begin{array}{c} \\ + \\ \end{array}$ \\       \hline             \parbox[t][1.0cm]{2.0cm}{\vspace{1pt} $y'' \,=\, \dfrac{2}{\,x^{3}\,}$ \vspace{1pt}}         & $\begin{array}{c} \\ - \quad - \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ - \quad - \quad - \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ - \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ - \quad - \quad - \\ \end{array}$         & \hspace*{-0.7cm} $\begin{array}{c} \\ \vert \\ \end{array}$         & \hspace*{-1.0cm} $\begin{array}{c} \\ + \quad + \quad + \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ + \\ \end{array}$         & \hspace*{-0.5cm} $\begin{array}{c} \\ + \quad + \quad + \\ \end{array}$         & \hspace*{-1.0cm} $\begin{array}{c} \\ + \\ \end{array}$ \\       \hline             \parbox[t][1.0cm]{2.0cm}{ $y \,=\, x \,+\, \dfrac{1}{\,x\,}$ }         & $-\, \infty \;\; \nearrow$         & \hspace*{-0.5cm} $ \begin{array}{c} \\ \nearrow \quad \nearrow \quad \nearrow \\ \bigcap \end{array} $         & \hspace*{-0.5cm} $ -\, 2 $         & \hspace*{-0.5cm} $ \begin{array}{c} \\ \searrow \quad \searrow \quad \searrow \\ \bigcap \end{array} $         & \hspace*{-0.7cm} $ \;\genfrac{}{}{0.0pt}{}{}{}_{-\,\infty} {\Big |}^{+\, \infty}\; $         & \hspace*{-0.7cm} $ \begin{array}{c} \\ \searrow \quad \searrow \quad \searrow \\ \bigcup \end{array} $         & \hspace*{-0.5cm} $ +\, 2 $         & \hspace*{-0.5cm} $ \begin{array}{c} \\ \nearrow \quad \nearrow \quad \nearrow \\ \bigcup \end{array} \vspace{2pt} $         & \hspace*{-1.0cm} $+\, \infty$ \\       \hline            \end{tabular}\\     \end{document}


title: having problems using arrayjobx with tikz - how can i use arrays in tikz?

text: I need the help of some smart people ;) I want to draw a picture with TikZ, which is heavily based on randomization and I want to make it quite parametrized. It's actually a graph of n nodes where edges are incident to nodes based on previous node placement, so one can _not_ do it all in only one for-loop, that's not possible (and i need x- and y-coordinates independently). In my plans i store x- and y-coordinates in an array and retrieve the data later for calculations. but I run into problems.... Array usage in TikZ is either limited or badly described (how to store/change data _after_ initialization?) So I use the package `arrayjobx`. below is a minimal non-working example (from my memory, unfortunately, my coding PC is currently not accessible; but I hope you see the problem without having a 100%-guaranteed compilable example):               \begin{tikzpicture}     \newarray\xcoord     \def \n {5}     \foreach \i in {1,...,\n}       {       % roll randomvalues and store them in arrays xcoord       \pgfmathsetmacro{\xe}{rnd*10}       \xcoord(\i)={\xe}            \foreach \j in {1,...,\i}       {         % access data in second nested loop; accessing is done with \checkArrayname and \cachedata to avoid parsing errors         \checkxcoord(\j)         \let\xf\cachedata         % next line is just for "debugging"         \node[draw,circle] at (\i,\j) {\xf};       }     }     \end{tikzpicture}      I can access the data without problems in the first loop. It's working fine. But in the second nested loop, no matter what value `\j` should have, `\xf` gets the value of `\xcoord(\i)`, instead of `\xcoord(\j)`. I tried it in different ways, using a counter for `\j`, using length-parameters instead of `\let`, etc. but the result is always the same. What could cause this behaviour? Does anyone of you know a workaround?


title: natbib problem with Inspire bibitem

text: Hi I go a bit of a problem (I'm helping a friend in writing her thesis). I'm almost there, only that it's not compiling here's the (example) code               \documentclass[11pt]{book}     \usepackage{geometry}     \geometry{letterpaper}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage{hyperref}     \usepackage[authoryear]{natbib}     \bibliographystyle{plain}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \title{Brief Article}     \author{The Author}               \begin{document}     \maketitle          this is a very old galaxy, as found in \citet{Ellerbroek:2013bba}          \begin{thebibliography}{99}              \bibitem{Ellerbroek:2013bba}           L.~E.~Ellerbroek, A.~Bik, L.~Kaper, K.~M.~Maaskant, M.~Paalvast, F.~Tramper, H.~Sana and L.~B.~F.~M.~Waters {\it et al.},           ``RCW36: characterizing the outcome of massive star formation,''           arXiv:1308.3238 [astro-ph.SR].              \end{thebibliography}              \end{document}        The compiler says: Package natbib Error: Bibliography not compatible with author-year citations. The same happens if I try other natbib options and \bibiographystyle available. I took the bibitem from Inspire.het (a notorious scientific papers search engine that many of you will probably know) Can anyone help me? thank you very much


title: Error when using both minted and TikZ externalize with xelatex

text: See the following MWE.               \documentclass{article}     \usepackage{minted, tikz}     \usepackage{fontspec}     \setmainfont{Arial}     \usetikzlibrary{external}     \tikzset{external/system call={%         xelatex \tikzexternalcheckshellescape         -halt-on-error -interaction=batchmode         -jobname "\image" "\texsource"}}     \tikzexternalize          \begin{document}     \begin{tikzpicture}       \draw (0,0) --(1,2);     \end{tikzpicture}     \end{document}      If I try to compile this with the command               xelatex -shell-escape bug.tex      I get the following error               This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)     entering extended mode          ! Package tikz Error: Sorry, the system call 'xelatex -halt-on-error -interacti     on=batchmode -jobname "bug-figure0" "\def\tikzexternalrealjob{bug}\input{bug}"'      did NOT result in a usable output file 'bug-figure0' (expected one of .pdf:.jp     g:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex,      this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or som     ething like that. Or maybe the command simply failed? Error messages can be fou     nd in 'bug-figure0.log'. If you continue now, I'll try to typeset the picture.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 \end{tikzpicture}      Notes:   1. Tested with Tex Live 2009 as packaged for Debian squeeze. The version of `minted`   (which is not in Tex Live 2009) is v1.7 (current release).   2. Removing any of `\tikzexternalize`, `\usepackage{minted}`, or the tikz picture   makes the error go away.   3. I found the magical incantation inside `\tikzset` when looking for a way to get tikz externalize to work with xelatex. It worked till I started using minted.   4. `xelatex` is needed because of `fontspec`, and `fontspec` is needed   because of `Arial`. Without `\setmainfont{Arial}` and `\usepackage{fontspec}`, the example compiles with              pdflatex -shell-escape bug.tex      Strangely, this is still uses `xelatex` somewhere because of the `\tikzset` thing   I added.   5. I was using `Arial` because of a journal's deranged requirement. I realised I   don't need to use it, and hence don't need to use `xelatex`. Since `pdflatex`   works fine with this example, the whole problem goes away for me. However, this   still looks like a bug to me, so posting.   6. The error is in the externalized file, which here defaults to `bug-figure0`. `bug-figure0.log` has               ! Package minted Error: You must invoke LaTeX with the -shell-escape flag.      It looks to me like minted and tikz externalize are colliding with each other for   some reason here.


title: Problem with using tikZ in Texmaker

text: I seem unable to use any TikZ command in TeXmaker. Whenever I use such command, I get the following error:               ! LaTeX Error: File `tikz.sty' not found.     Type X to quit or <RETURN> to proceed,or enter new name.     (Default extension: sty)Enter file name:! Emergency stop.<read > \usetikzlibrary      I'm also unable to download the package also. What should I do?


title: Indent successive lines an additional amount

text: I am trying to define an environment in latex that will indent each successive line of a short block of text by a fixed amount. For example, the first line will have no indentation, the second line will have a 1cm indentation, and the third line will have a 2cm indentation, etc. This will be used for short amounts of text that will probably be three lines at most. Anyone know if there is an environment that does something like this or if i can make one? I could not find an answer on here anywhere.


title: Big Parenthesis in an Equation

text: I have an equation contained inside `\[...\]`, which automatically makes a `\sum` with sub- and superscripts turn big--so that the summation sign looks awkward inside parenthesis. Any idea how to make the parenthesis completely enclose the whole summation?               \documentclass{article}     \begin{document}     We have:     \[ \sum_{i=1}^n i = (\sum_{i=1}^{n-1} i) + n =     \frac{(n-1)(n)}{2} + n = \frac{n(n+1)}{2} \]     \end{document}


title: Using color variable in TikZ before they are declared

text: I want to use the color of a path to set the color of the nodes. But I want the nodes to be lighter than the path color. And I want to do this before knowing what the path color will be. Hence, how do i get what will be active path color, so that I can adjust the node color?


title: \write18 pass % through to shell

text: This has sort of been touched on in some other postings, but for path reasons I would like to avoid using a shell script and just use ImageMagick's (IM) convert command line executable directly from a `\immediate\write18{...}` in a macro command, but in my IM convert instructions I need to pass the `%` (ASCII 37) as part of a macro. However I try to conceive of making a `%` \- and I have tried numerous ways(!) I always end up getting the Latex code I am using for the % passed through to the command line. The obvious one, `\%` goes to the shell as `\%` directly and that is the pattern followed by all other options. What I obviously seem to need is some way to generate the ASCII or unicode for `%` and get that to the shell from LaTeX via `\write18` or other. Or have some sort of temporary suspension on the LaTeX usage of `%` so that it can be part of a `\write18{}` and not break the command as a comment starter, and so be passed with out needing to be LaTeX escaped first.


title: How to make a conditional reference to a text label

text: I would like to make a conditional reference to an optional label in my latex document, see the Minimum Working Example below. Hence, IF the label exists somewhere in the document, THEN a reference will be made, some other place in the document, to that label. I am using the "etool" package, but I am not sure if any of the commands there are usefull for my purpose.               \documentclass{article}          \begin{document}          \section{Method}     ...the method is based on Anderson et. al 2012,     % CONDITIONAL FUNCTION      % IF \label{sec-appendix} EXISTS THEN:     {a summary of which is given in Appendix \ref{sec-appendix}.}     % ELSE     {not explained here.}     % END OF CONDITIONAL FUNCTION          \appendix     \section{Appendix}     \label{sec-appendix}          \end{document}


title: Centering dot in a tikz picture with specified coordinates

text: I’m trying to annotate the plot by drawing this dot on it. I specified the exact coordinates the center of the dot should be at, but apparently this isn’t the dots center... Is there a way to change this without chancing the coordinate a little? ![Full picture](http://i.stack.imgur.com/MkzvR.png) ![Enlarged](http://i.stack.imgur.com/AEmoW.png)               \documentclass[11pt, a4paper]{article}          \usepackage[latin1]{inputenc} % niet-ASCII-tekens gebruiken     \usepackage{tikz} % geavanceerde figuren maken     \usepackage[Gray,squaren,thinqspace,thinspace]{SIunits} % elegant eenheden zetten     \usepackage[dutch]{babel} % Nederlands als taal instellen     \usepackage[small,bf,hang]{caption} % bijschriften invoegen     \usepackage{pgfplots} % data plottenf     \pgfplotsset{compat=newest} % meest recente versie pgfplots gebruiken     \usepackage{pgfplotstable} % tabellen uit .csv laden     \usepackage{amsmath} % uitgebreide wiskundige mogelijkheden     \usepackage{pgf} %meer mooie plots     \usepackage{subcaption} %figuren naast elkaar         \usetikzlibrary{arrows,automata} %mooie pijlen          \begin{document}     \begin{figure}[ht]     \centering     \begin{subfigure}{0.48\linewidth}     \centering     \begin{tikzpicture}     \begin{loglogaxis}[     xlabel=frequentie $f (\hertz)$,     ylabel=transferfunctie $T\ (\frac{\volt}{\volt})$,     grid=both,      minor grid style={gray!25},      major grid style={gray!25},     no marks,     width=\linewidth]     \draw[*-,color=red!50] (axis cs:3e4,1) -- (axis cs:10e4,0.5) node[right,color=black] {$f_\text{\unit{3}{dB}}$};     \addplot [color=red] coordinates {(1e3, 1)     (3e4, 1) % breekpunt     (3*1e5, 0.1)};     \end{loglogaxis}     \end{tikzpicture}     \subcaption{Amplitude bode-plot.\label{BodeAmplitudeTweedeTrap}}     \end{subfigure}%     \hspace{5pt}     \begin{subfigure}{0.48\linewidth}     \centering     \begin{tikzpicture}     \begin{axis}[     xmode=log,     ymode=normal,     xlabel=frequentie $f (\hertz)$,     ylabel=fase $\phi (\degree)$,     ytick={-90,-45,0,45,90},     grid=both,      minor grid style={gray!25},      major grid style={gray!25},     width=\linewidth,     no marks]     \addplot [color=red] coordinates {(1e3, 0)     (3e3,0)     (3e4, -45) % breekpunt     (3e5,-90)     (1e6,-90)};     \end{axis}     \end{tikzpicture}     \subcaption{Fase bode-plot.\label{BodeFrequentieTweedeTrap}}     \end{subfigure}%     \caption{Bode-diagram transferfunctie tweede trap.\label{BodeEersteTrap}}     \end{figure}     \end{document}


title: Autocount and position labels around circular axis

text: I am trying to mimic a knob on an audio mixing desk in TikZ. So far I have the following: ![knob](http://i.stack.imgur.com/ZUdqV.png)               \begin{tikzpicture}       \draw[ultra thick] (0,0) circle [radius=0.5];       \foreach \angle/\label in         {           -45+0*270*0.25 / $0$,           -45+1*270*0.25 / $-20$,           -45+2*270*0.25 / $-40$,           -45+3*270*0.25 / $-60$,            -45+4*270*0.25 / $-\infty$         }       {         \draw +(\angle:0.25) -- +(\angle:0.5);         \draw (\angle:0.85) node {\label};       }       \draw[ultra thick] (0,0) -- +(45:0.5);     \end{tikzpicture}      Now I would like to support generic scales with arbitrary labels and number of ticks:   * All that I should need to do is to pass TikZ a list of labels that I want on my knob. In the example above: {$0$, $-20$, $-40$, $-60$, $-\infty$}.   * The code should then automatically draw the ticks and labels at equal distances between -45 and 225 degrees (i.e., the positions of $0$ and $-\infty$ in the example above). This will involve deriving the length of the passed list.   * Ideally, I'd like to specify the knob's current position by reference to the scale on the labels (e.g., to -60), rather than by specifying the angle (45 degrees in the example above). This might be tricky:     * On the one hand, I need the labels to be independent of the angle (e.g., $\infty$ symbol above)     * On the other hand, I'd like to be able to set the knob to intermediate positions such as -70 (in relation to the label scale), in which case the code should automatically interpolate and derive the corresponding angle. Any help would be most appreciated.


title: How can I underline a single word with LaTeX?

text: Given a simple paragraph, how do I underline a word in that paragraph? (Note: I post this here because it wasn't really obvious using google or this site and my TexNicCenter is somehow missing this highlighting option.)


title: Pagebreak destroys page layout

text: I have the following code to add an appendix to my document:               \appendix{}     \chapter{Questionnaire}     \pagebreak     \includegraphics[width=1\textwidth]{questionnaire1.png}     \includegraphics[width=1\textwidth]{questionnaire2.png}     \includegraphics[width=1\textwidth]{questionnaire3.png}     \includegraphics[width=1\textwidth]{questionnaire4.png}     \includegraphics[width=1\textwidth]{questionnaire5.png}     \includegraphics[width=1\textwidth]{questionnaire6.png}     \includegraphics[width=1\textwidth]{questionnaire7.png}      The problem is, the linebreak is destroying my layout. The next pictures shows how it should look like ![enter image description here](http://i.stack.imgur.com/2ZS9u.png) But unfortunately it looks like this ![enter image description here](http://i.stack.imgur.com/skMx7.png) So I dont know why the pagebreak destroys the layout. Any hints?


title: Is there a way to move the "year" to the back of a footnote citation, placing the "page" right before it?

text: The reason I want to do it is that the Bluebook style for American legal academica requires it. But I haven't been able to find out on how to do it. I have moved close to the desired _Bluebook_ result departing from Will Hardy's _Australian Guide to Legal Citation 2 or AGLC2_. According to the _Bluebook_ , the citation of articles and books should finish with the year they were published between brackets. So, for instance: **Article** : Author, _Title of the article_. 4 Harv. L. Rev 93, 98[this is the page] (year) **Book** [all in Small Caps]: Author, Title of the Book [page] (year) The files I use are the following:   * Will Hardy's ALC2 (aglc2.bbx and aglc2.cbx)   * A biblatex.cfg which looks like this (I think it is relevant for my question).  Biblatex.cfg:               \DeclareFieldFormat     [article,inbook,incollection,inproceedings,patent,thesis,unpublished]     {title}{\emph{#1\isdot}}     \DeclareFieldFormat     [book]     {title}{\sc{#1\isdot}}          \DeclareFieldFormat     [article,inbook,incollection,inproceedings,patent,thesis,unpublished]     {journaltitle}{\sc{#1}}          \renewbibmacro*{journal+issuetitle}{%     \printfield{volume}     \usebibmacro{journal}%     \setunit*{\addspace}%     \newunit}          \AtEveryCitekey{%     \clearfield{day}%     \clearfield{month}%     \clearfield{endday}%     \clearfield{endmonth}%     \clearfield{shorttitle}%     }          \endinput      Here's a MWE:               \documentclass[12pt,a4paper]{article}          \usepackage[utf8]{inputenc}          \usepackage[spanish]{babel}          \usepackage[backend=biber, sortlocale=auto, style=aglc2, citestyle=aglc2]{biblatex}          \usepackage{csquotes}          \addbibresource{america2.bib}          \begin{document}          This paper is an example of how footnotes should work in \emph{Bluebook}, the      style of citation used in American legal academia. We call authors such as Friedman,      who we think is awesome.\footcite[578]{friedman1} And we think he is awesome  again.\footcite[578]{friedman1}          And we cite him again.\footcite[578]{friedman1} But then we move on and cite some      other guy for ``a new jurisprudence of judicial restraint.''\footcite{balkin}          Some other guy gets cited \footcite{kurland} and then we cite Friedman again     but with another article.\footcite{friedman2} But then we cite a book.\footcite[22]{parker}          And we cite Kurland again\footcite{kurland}          \printbibliography          \end{document}      Sorry I didn't include, before, america2.bib:               @article{friedman1,         title = {Dialogue and Judicial Review},         volume = {91},         issn = {00262234},         url = {},         doi = {10.2307/1289700},         pages = {577},         number = {4},         journaltitle = {Michigan Law Review},         author = {Friedman, Barry},         urldate = {2014-06-03},         date = {1993-02},         file = {}     }          @book{parker,         title = {Here, the People Rule: A Constitutional Populist Manifesto},         volume = {},         url = {},         shorttitle = {Here, the People Rule},         pages = {},         journaltitle = {},         shortjournal = {},         author = {Parker, Richard D.},         date = {1992},         file = {}     }          @article{friedman2,         title = {Importance of Being Positive: The Nature and Function of Judicial Review, The},         volume = {72},         url = {},         shorttitle = {Importance of Being Positive},         pages = {1257},         journaltitle = {University of Cincinnati Law Review},         shortjournal = {U. Cin. L. Rev.},         author = {Friedman, Barry},         date = {2003},         file = {}     }          @article{kurland,         title = {The Supreme Court, 1963 Term},         volume = {78},         issn = {{0017811X}},         url = {},         doi = {10.2307/1338853},         pages = {143},         number = {1},         journaltitle = {Harvard Law Review},         author = {Kurland, Philip B.},         urldate = {2014-06-03},         date = {1964-11},         file = {}     }          @article{balkin,         title = {Understanding the Constitutional Revolution},         volume = {87},         url = {},         pages = {1045},         journaltitle = {Virginia Law Review},         shortjournal = {Va. L. Rev.},         author = {Balkin, Jack M. and Levinson, Sanford},         date = {2001},         file = {}     }


title: Definite article "The" moved to the back of the "title" of an article (solved)

text: I love LaTeX, but sadly there is not style for the _Bluebook Uniform System of Citation_ used in Law Schools. I won't go back to Word Processors, so I decided to tweak some existing style into something minimally useful. I have moved close to the desired result departing from Will Hardy's _Australian Guide to Legal Citation 2 or AGLC2_ , but I''ve found some obstacles. One of them is the "The" of a title, moving to its back (in the MWE it is in FN number 6). The files I use are the following:   * Will Hardy's ALC2 (aglc2.bbx and aglc2.cbx)   * A biblatex.cgf which looks I feel are probably irrelevant for this question.  Here's a MWE:               \documentclass[12pt,a4paper]{article}          \usepackage[utf8]{inputenc}          \usepackage[spanish]{babel}          \usepackage[backend=biber, sortlocale=auto, style=aglc2, citestyle=aglc2]{biblatex}          \usepackage{csquotes}          \addbibresource{america2.bib}          \begin{document}          This paper is an example of how footnotes should work in \emph{Bluebook}, the      style of citation used in American legal academia. We call authors such as Friedman,      who we think is awesome.\footcite[578]{friedman1} And we think he is awesome again.\footcite[578]{friedman1}          And we cite him again.\footcite[578]{friedman1} But then we move on and cite some      other guy for ``a new jurisprudence of judicial restraint.''\footcite{balkin}          Some other guy gets cited \footcite{kurland} and then we cite Friedman again     but with another article.\footcite{friedman2} But then we cite a book.\footcite[22]{parker}          And we cite Kurland again\footcite{kurland}          \printbibliography          \end{document}      Sorry about not including the america2.bib file before:               @article{friedman1,         title = {Dialogue and Judicial Review},         volume = {91},         issn = {00262234},         url = {},         doi = {10.2307/1289700},         pages = {577},         number = {4},         journaltitle = {Michigan Law Review},         author = {Friedman, Barry},         urldate = {2014-06-03},         date = {1993-02},         file = {}     }          @book{parker,         title = {Here, the People Rule: A Constitutional Populist Manifesto},         volume = {},         url = {},         shorttitle = {Here, the People Rule},         pages = {},         journaltitle = {},         shortjournal = {},         author = {Parker, Richard D.},         date = {1992},         file = {}     }          @article{friedman2,         title = {Importance of Being Positive: The Nature and Function of Judicial Review, The},         volume = {72},         url = {},         shorttitle = {Importance of Being Positive},         pages = {1257},         journaltitle = {University of Cincinnati Law Review},         shortjournal = {U. Cin. L. Rev.},         author = {Friedman, Barry},         date = {2003},         file = {}     }          @article{kurland,         title = {The Supreme Court, 1963 Term},         volume = {78},         issn = {{0017811X}},         url = {},         doi = {10.2307/1338853},         pages = {143},         number = {1},         journaltitle = {Harvard Law Review},         author = {Kurland, Philip B.},         urldate = {2014-06-03},         date = {1964-11},         file = {}     }          @article{balkin,         title = {Understanding the Constitutional Revolution},         volume = {87},         url = {},         pages = {1045},         journaltitle = {Virginia Law Review},         shortjournal = {Va. L. Rev.},         author = {Balkin, Jack M. and Levinson, Sanford},         date = {2001},         file = {}     }


title: How to refer a word to another section?

text: Suppose I have a text like this               Lorem ipsum dolor sit amet, consectetuer adipiscing elit,     sed diam nonummy nibh euismod tincidunt ut laoreet dolore     magna aliquam erat volutpat. Ut wisi enim ad minim veniam      I want to refer the word `euismod` to another section, so the reader can read about it in the right place. What are the possibilities?


title: Different macro behavior when supplied an argument

text: I want to define a macro, call it `\func`, so that `\func` will output`\phi`, and `\func[i]` will output `\phi(i)`. what is the easiest way to achieve this? I know there are other questions that address this issue - I guess one of them is exactly my question and I just don't get it :)


title: How do I prevent the second \subsubsection in my document being indented

text: The problem I'm having is that my second subsubsection is being indented. Probably something which is being done automatically. However, I'm new to LaTeX and don't have a clue how to fix it, so can someone please tell me how to. Below I have reproduced the problem but removed the text I wrote. I know the formatting might look a bit weird on the first page(the footnote), but it's okay with the original text I have so please ignore that. To clarify: I want NO indention on the second subsubsection which has the text "Brief History of Computer Simulation". Thank you.               \documentclass[12pt,a4paper,oneside]{article}          \begin{document}          \begin{center}     \section*{Simulation Techniques}     \end{center}          \vspace*{12mm}     \subsubsection*{Introduction}     \vspace*{2mm}          Text bla bla text here bla bla          \begin{center}     "bla bla"      \footnote{url bla bla}     \end{center}          \noindent More text here bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla          \noindent bla bla bla even more text \pagebreak     %---------------Page 2------------------     \subsubsection*{ Brief History of Computer Simulation}     \vspace*{3mm}     The first..     \end{document}      Furthermore, If you see anything that you discourage or anything that might cause me problems in the future please let me know. Thank you.


title: Problem with preparing presentation slides in persian/arabic language

text: I am trying to make my thesis presentation slides in persian language using beamer and xelatex or bidi; I am using texlive but when I run the following code without any error, the persian fonts do not appear in the final PDF file. What should I do? I have seen that the arabic fonts also work for persian language files, so if you can make these slides work for arabic language, it will be useful. Please note that I am very basic user, so please write your answers so basic that I understand them.               \documentclass{beamer}     \usepackage{setspace}          \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage{english}     \setotherlanguage{arabic}          \newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Yas}          \usetheme{Rochester}     \usecolortheme{wolverine}          \beamertemplatenavigationsymbolsempty          \setbeamertemplate{footline}[frame number]     \setbeamerfont{page number in head/foot}{size=\large}          \title{{\footnotesize \bf عنوان}}     \author[نویسنده]{نویسنده}     \institute[دانشگاه]{دانشگاه}          \AtBeginSection[]  % The commands within the following {} will be executed at the start of each section.     {     \begin{frame} % Within each "frame" there will be one or more "slides."       \frametitle{Presentation Outline} % This is the title of the outline.     \tableofcontents[currentsection]  % This will display the table of contents and highlight the current section.     \end{frame}     } % Do not include the preceding set of commands if you prefer not to have a recurring outline displayed during your presentation.          \begin{document}          \begin{frame}      \titlepage     \end{frame}                      \begin{frame}         \frametitle{اولین اسلاید}         %Content goes here       \end{frame}       \begin{frame}         \frametitle{دومین اسلاید}         \framesubtitle{دومین مطلب}         %More content goes here       \end{frame}     % etc     \end{document}


title: Switching from PDFLaTeX to XeLaTeX is messing with my pgftext coordinates

text: I'm working on a template for an automated report (using `knitr`). I created a title banner for my organization using TikZ; the last step to finish the branding was to switch to my organization's fonts. For this, I switched to XeLaTeX--my first time using it. The fonts work great! But the position of the logo in my `tikzpicture` got messed up, and I can't seem to do anything with it. Minimal Example:               \documentclass{article}     \usepackage[margin = 0.5in]{geometry}     \usepackage{graphicx}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}         \node at (1in, 1in) {\pgftext{\includegraphics[height=0.3in]{mylogo}}};         \node at (5in, 5in) {\pgftext{\includegraphics[height=0.3in]{mylogo}}};         \node at (2in, 2in) {First one};         \node at (3in, 3in) {Second one};     \end{tikzpicture}          \end{document}      When I run `PDFLaTeX` on the above code, everything works as expected: I see two logos, and both text nodes. If I run `XeLaTeX`, the normal text nodes still work as expected, but I only see one logo in the top left (I think they're both printed there). The question is: How can I position the image while using `XeTeX`? The `mylogo` file is a `.png`, not that I can imagine that affecting anything. I'm running MiKTeX on a Windows box; I just ran the updater so everything should be up to date.


title: Separating a decimal number into whole and fractional parts with only the digits using pgfmath

text: Note: Firstly my apologies for making this confusing to start with. I have finally clarified matters I hope. This particular question is asking for macros that will split pgfmath results. The ones initially provided by egreg do just that. I am asking this question in a more general context elsewhere. I know how to do this in c++, it's easy, but it's not so clear how to do it in LaTeX. In this case I'm working with 'pgfplots' so I have access to the pgfmath routines and thus I don't have to worry about how to remove the `pt` as they do it for me already. I want the whole digits with no trailing "." or ".0" and I want the fraction digits with no preceding "0.". The following MWE shows my failed attempts at doing this. **Output** : ![MWE Output](http://i.stack.imgur.com/fn8OS.jpg) **Code** :               \documentclass[12pt]{article}     \usepackage[a5paper,margin=14mm]{geometry}          \usepackage{pgfplots}          \pgfplotsset{compat=1.9, /pgf/declare function={F(\x)=(\x+5)*(\x-1)*(\x-5);}}          \newlength{\printvar}          \newcommand{\intprint}[1]{\pgfmathparse{int(#1)}\pgfmathresult}     \newcommand{\fracprint}[1]{\pgfmathparse{frac(#1)}\pgfmathresult}          \newcommand{\truncprint}[1]{\pgfmathtruncatemacro{\printvar}{#1}\pgfmathprint{\printvar}}     \newcommand{\diffprint}[1]{\pgfmathtruncatemacro{\printvar}{#1}\pgfmathprint{#1-\printvar}}          \begin{document}     \par PGFMathParse F(1.5): \pgfmathparse{F(1.5)}\pgfmathresult     \par TruncPrint: \truncprint{F(1.5)}\quad DiffPrint \diffprint{F(1.5)}     \par IntPrint: \intprint{F(1.5)}\quad FracPrint \fracprint{F(1.5)}     \end{document}


title: How to include information about title, author, publisher on a title page?

text: EDIT: Border is not part of the final result - it's just a screenshot. I want my title page (first page after cover) to look like this (taken from word document): ![](http://i.stack.imgur.com/CnuAL.png) What is the proper way of laying out a title page? Should I use the `title`, `author` commands, or just layout text with `vspace` and such? However, I don't know if LaTeX has fields for specifying `publisher` and `publisher place`. Any tips or examples on how to do this would be great.


title: Parenthesis too big with \hat in between

text: The calculation of the correct parentheses size fails when a letter with a `\hat` accent is in between:               \left(\hat{x}\right)      Manually specifying the size of the brackets would be a lot of work as they are part of a command (statistics: expected value):               \newcommand{\E}[1]{\mathbb{E}\left[{#1}\right]}      Is there a way to modify the command to produce correctly-sized brackets? Meta: Is there a way to have LaTeX code converted to images? Maybe it's that obvious that the help page do not mention it ...


title: Code readability

text: I'm getting my head around LaTeX, and I find really awesome the fact that the documents are completely editable with a plain text editor, while getting a really neat and professional output. I'm learning also a lot of concepts about typography, like how the spacing and the number of character per row have an effect on readability. But what I wonder is: there is a set of guidelines/themes to format better the code for readability? I'm not referring to indentation or code cleanliness, but about spacing and management of long paragraphs. Maybe I'm not aware of that, but I find strange that the author of a perfectly typesetted document has to read `courier` dense code.


title: Contribute a diagram to a package author?

text: Well, this turned out to be a completely different question than the one I started writing! Originally I was wondering how to make a version of `\textit` (and a parallel version of `\textsl`) that automatically tracks the nesting level and toggles on/off based on the oddness/evenness of the nesting depth. `\emph` of course does this, but it isn't guaranteed to render in italics, and there doesn't seem to be a corresponding slant version of `\emph` for slant. And then I discovered the `slemph` package, which provides exactly what I want. Sometimes, while formulating a question, one thinks of better search terms/phrases and is better able to find the answer! Anyway, I figured that a picture would be the best way to ask my question (originally), so I started out by making this drawing, which describes fictional macros `\RM`, `\IT`, `\SL`, and `\BF` which behave well together like `\textit`, `\textsl`, `\textbf`, etc.: ![](http://i.stack.imgur.com/fLpzu.png) And then I made this, which demonstrates the inner workings of the decision- making that I was hoping to hack together: ![](http://i.stack.imgur.com/wmYHV.png) But again, it turns out that `\textitswitch` and `\textslswitch` of package `slemph` already do exactly what I want, and I basically wasted my time making the diagrams. But I did learn some new things. :-) So, as long as I have these diagrams (and the accompanying LaTeX source), I'm wondering if there is a preferred way to submit things to package authors for their consideration. Is it acceptable to just e-mail them? Or is there a more formal gateway through CTAN? This particular package hasn't been updated in 13 years. I would definitely find a diagram like this helpful in the documentation for the package. I actually came across the package halfway through my investigation, but brushed it aside carelessly because I didn't realize from the description that it actually did what I wanted! A picture like this would have led me to see it immediately.


title: Lighter version of sans serif typeface

text: I am using the Frutiger font as the sans serif font in my document. It is invoked by               \renewcommand{\sfdefault}{pfr}      However this font is too bold for my taste. There is a ligher version available. I would like `{\sf Test}` to be rendered as               {\fontfamily{pfr}\fontseries{l}\selectfont Test}      and `{\sf \textbf{Test}}` to be rendered as               {\fontfamily{pfr}\fontseries{m}\selectfont Test}      (that is, the normal variant is now used as the bold typeface). How do I achieve this? I don't know the proper commands to so this and I suspect my `\renewcommand` is not the correct way of switching to Frutiger in the first place.


title: How to cross-reference labels in the text using LyX?

text: I'm having trouble using labels and cross-referencing in Lyx. I put a label into the document where I want it. It is not embedded in anything, it's just in the text. Then I put a cross-reference to link it at a different point in the paper. When I make the pdf, the cross-reference does not go to the link but rather to the top of the section it's in. What going on? However, within Lyx, whenever I use the (Navigate Bar -> Other Lists -> Labels and References) then the reference appears to work fine. It's just not working in the pdf.. What could be the problem? Thank you in advance!


title: Generating slides automatically in Beamer

text: In `Beamer`, we need to create each slide separately. Is it possible to generate those slides automatically (just like pages an `article` type document does)? Somewhat related: I occasionally see some bits are going beyond the bottom of a slide (texts or anything). Creating slides automatically, I hope, will remove this problem.


title: Options for decreasing this table's width?

text: I like the style of the following table (booktabs effects, nice caption, equal width of data columns, right alignment of data, width set equal to the `\linewidth`, able to look at two estimator evaluation criteria side-by-side (MPE and MAPE), etc.). What I do NOT like is the imperfect right-alignment of the data (e.g., see data row 3) because there's a little too much "stuff" in the table and `tabularx` is trying to get all of it to fit within `\linewidth`. Q: What are some good/standard options for dealing with this problem of a table with content that is too wide for the document? I figure a few are:   1. Use `longtable` and display the table in landscape (Would rather not do this. But it's not the worst approach)   2. Stack the table so that the "Est." column is repeated once and "MPE" section is above the "MAPE" section (Would rather not do this. Like the idea of being able to look straight across the table)   3. Decrease the font size of the document or the table (Not really an option. I just don't like this approach)   4. Don't insist on equal column-widths so that columns without "-" signs are a little smaller. Then everything can fit (Really don't like this approach. Prefer equal column widths)   5. Decrease `\tabcolsep`. (Not bad)   6. Remove a digit. (This is probably my leading candidate) ![tab1](http://i.stack.imgur.com/dbvFF.jpg)               \documentclass{article}     \usepackage{booktabs}     \usepackage{diagbox}     \usepackage{tabularx}     \usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon,tableposition=top,figureposition=top]{caption}     \begin{document}     \newcolumntype{R}{>{\raggedleft\arraybackslash$}X<{$}}     \begin{table}[ht]       \centering       \caption{My caption. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}       \begin{tabularx}{\linewidth}{@{}lRRRRRRRR@{}}         \toprule         & \multicolumn{4}{l}{MPE} & \multicolumn{4}{l}{MAPE}\\         \cmidrule(r){1-1}  \cmidrule(lr){2-5} \cmidrule(l){6-9}         \diagbox[trim=lr]{Est.}{Jumps} & 0 & 3 & 10 & 30 & 0 & 3 & 10 & 30 \\         \midrule         $\widetilde{JV}$                & 2.14 & 2.42    & 1.35     & -1.69  & 2.14 & 4.57 & 4.92  & 4.74 \\         $\widehat{JV}$                  & 1.99 & 2.16    & 1.12     & -1.83  & 1.99 & 4.47 & 4.91  & 4.81 \\         $\widehat{JV}_{\mathrm{BNS04}}$ & 0.35 & -4.35   & -12.91   & -26.35 & 3.11 & 5.48 & 12.95 & 26.35 \\          \midrule         $\widetilde{IV}$                & -2.03 & -2.52 & -1.33 & 1.73  & 6.54 & 6.37 & 5.24  & 3.71 \\         $\widehat{IV}$                  & -1.87 & -2.26 & -1.10 & 1.87  & 6.48 & 6.31 & 5.23  & 3.80 \\         $\widehat{IV}_{\mathrm{BNS04}}$ & -0.24 & 4.25  & 12.93 & 26.39 & 6.61 & 7.06 & 13.11 & 26.39 \\         \bottomrule       \end{tabularx}     \end{table}     \end{document}      NOTE: This is an extension of this previous question of mine where I was just trying to figure out how to do equal column widths and right-alignment in a table.


title: tikz code doesn't compile when opened after a while

text: I finished my phd a couple of months ago, compiled it then completely just fine. I opened it today to make changes and during compilation I get error messages about "missing number treated as zero". I realized it is about brackets are used when computing a value. for instance this works :               \documentclass{article}     \usepackage{pgfplots}     \usepackage{tikz}          \begin{document}      \begin{tikzpicture}      \def\x{5};      \def\y{4.5};     \foreach \p in {180,160,...,20}     {     \draw (0,0) -- (\x*\p:\y*\p/100);     }     \end{tikzpicture}     \end{document}      and this does not work, whereas it worked perfectly fine 2 months ago               \documentclass{article}     \usepackage{pgfplots}     \usepackage{tikz}          \begin{document}           \begin{tikzpicture}      \def\x{5};      \def\y{4.5};     \foreach \p in {180,160,...,20}     {     \draw (0,0) --({\x*(\p-20)}:{\y*({1.80-\p/100})});     }     \end{tikzpicture}          \end{document}


title: Loop Multi-Contingency using etoolbox

text: I want to use the `etoolbox` package to manage some loop contingencies over a counting index. In particular, I'd like to do something different on the first and last times through the loop. Now I can formulate ways to do that, for example in this MWE. In the first case, I use a nested `\ifboolexpr` whereas in the second example, I set up an arcane switching system for `toggle`s. Both of these approaches accomplish the underlying goal...               \documentclass{article}     \usepackage{etoolbox}     \newcounter{index}%     \begin{document}     \def\LAST{10}          \noindent%     \setcounter{index}{0}%     \whileboolexpr{test {\ifnumcomp{\theindex}<{\LAST}}}{%     \stepcounter{index}%     \ifboolexpr{test {\ifnumcomp{\theindex}{=}{1}}}%       {NOT\\}%       {\ifboolexpr{test {\ifnumcomp{\theindex}{=}{\LAST}}}%         {NOT\\}%         {\theindex\\}%       }%     }          \newtoggle{flag}     \noindent%     \setcounter{index}{0}%     \togglefalse{flag}%     \whileboolexpr{test {\ifnumcomp{\theindex}<{\LAST}}}{%       \stepcounter{index}%       \ifboolexpr{test {\ifnumcomp{\theindex}{=}{\LAST}}}{%         \togglefalse{flag}}{}%OFF FOR LAST COLUMN       \iftoggle{flag}{\theindex\\}{NOT\\}%       \toggletrue{flag}% ON FOR COLUMNS 2 TO \LAST-1     }%     \end{document}      ![enter image description here](http://i.stack.imgur.com/EPMjq.jpg) However, the documentation leads me to believe that I should be able to use a Boolean `and` or `or` to accomplish this contingency with a single `\ifboolexpr`. And yet, I have been unable to construct such a syntax to do so. Is there a way, using the `etoolbox` syntax, to perform a single "if" check to determine if this is "the first excursion OR the `\LAST` excursion" through the loop, or alternately, if this is "not the first excursion AND not the `\LAST` excursion" through the loop?


title: Centering content in tables with borders

text: I have encountered a problem using `\centering` within the tabular environment. The following code               \documentclass{article}          \begin{document}          \begin{tabular}{|r|r|} \hline     \centering{Lolcats}  & \centering{.com} \\ \hline     \end{tabular}          \end{document}      generates the error "`LaTeX Error: Something's wrong--perhaps a missing \item.`" The error leaves by removing "`\\ \hline`", but this also removes the last line of the table. Any ideas on what has gone wrong? Thanks!


title: Arc around a node in TikZ?

text: I have the following code:               \documentclass[12pt, openany]{memoir}     \usepackage{amsmath}     \usepackage{tikz}          \begin{document}         \[         \begin{tikzpicture}[node distance=2cm,auto]             \node (A) {$Q(\sqrt[6]{2}\:)$};             \node (B) [below of=A]{$Q(\sqrt{2}\:)$};             \node (C) [below of=B] {$Q$};             \draw[-] (A) to node {3; $x^3-2=Irr(\sqrt[6]{2},Q(\sqrt{2},x)$} (B);             \draw[-] (B) to node {2; $x^2-2=Irr(\sqrt{2},Q,x)$} (C);         \end{tikzpicture}     \]     \end{document}       I am wanting an arc (or whatever term should be used) from node A to node C without passing through node B; however, all of my attempts have been futile. The third line that I've been drawing is a straight line from node A to node C; how can I change it so that it instead curves around node B, preferably to the left?


title: Making overlay figures in TikZ

text: I'm trying to reproduce the following two figures in TikZ. ![Fig 1](http://i.stack.imgur.com/1s47I.png) ![Fig 2](http://i.stack.imgur.com/j2RSb.png) My attempted code for Fig 1 is               \documentclass{minimal}     \usepackage{tikz}     \begin{document}         \begin{tikzpicture}         \draw [fill=black, ultra thick, red]  (0.0,0.0) -- (0.5, 0.5) -- (0.5, 1.5) -- (0.0, 1.0) -- cycle;         \draw [fill=black, ultra thick, blue] (1.0,0.0) -- (1.5, 0.5)-- (1.5, 1.5)--(1.0, 1.0)--cycle;         \draw  (0.0,0.0)  -- (1.0, 0.0)-- (1.5, 0.5)--(0.5, 0.5)--cycle;         \draw  (0.0,1.0) -- (1.0, 1.0)-- (1.5, 1.5)--(0.5, 1.5)--cycle;         \end{tikzpicture}     \end{document}      ![My Fig 1](http://i.stack.imgur.com/ikGKh.png) and for the second figure the code is               \documentclass{minimal}     \usepackage{tikz}     \begin{document}         \begin{tikzpicture}         \draw [fill=black, ultra thick, red]  (1.0,0.0) -- (1.0, 1.0) -- (0.5, 1.5) -- (0.5, 0.5) -- cycle;         \draw [fill=black, ultra thick, blue] (0.0,0.0) -- (0.0, 1.0)-- (1.5, 1.5)--(1.5, 0.5)--cycle;         \draw  (0.0,0.0)  -- (1.0, 0.0)-- (1.5, 0.5)--(0.5, 0.5)--cycle;         \draw  (0.0,1.0) -- (1.0, 1.0)-- (1.5, 1.5)--(0.5, 1.5)--cycle;         \draw  (1.0, 0.0) -- (1.0, 1.0)  (0.5, 0.5) -- (0.5, 1.5);         \end{tikzpicture}     \end{document}      ![My Fig 2](http://i.stack.imgur.com/ESLGY.png) I'm a TikZ newbie and have troubles to produce exactly the same figures with more efficient code. I've a problem with overlays and exact coordinates. I'd highly appreciate if you could help me to fix these problems and get similar figures with more robust code.


title: I need help aligning my equations to the left

text: Here is my working code: I want my equation to be aligned to the left, does anyone see how? I want each `\iff` sign to be under an `\iff` sign.               \begin{eqnarray*}     e^z &=& e^w  \\     \iff log(e^z) &=& log(e^w) \\     \iff ln|e^z| + i\cdot Arg(e^z) &=& ln|e^w| + i\cdot Arg(e^w) \\     \iff z + i2\pi n_1 &=& w + i2\pi n_2 \\     \iff z - w  &=&  i2\pi(n_2 - n_1)      \end{eqnarray*}


title: How to get radio boxes right in PDF forms using hyperref?

text: I would like to create a fillable PDF form containing radio buttons using `hyperref`. The text fields turn out fine. The problem is with the radio boxes. Only _one_ fillable radio box is visible when opened in `evince` and `okular`. Both boxes show up in `skim` and `Preview` on MacOS, but the checks are not saved (as opposed to the text fields). (I am aware of the `eforms` package from the `acrotex` bundle, which makes the task easier, but forms created this way cannot be filled out by `evince` and `okular`.) Here's my MWE:               \documentclass{article}     \usepackage{hyperref}          \def\LayoutTextField#1#2{\makebox[6em][l]{#1: }\raisebox{-.5ex}{#2}}     \def\LayoutChoiceField#1#2{\makebox[6em][l]{#1: }#2}     \newdimen\longline     \longline=\textwidth\advance\longline-6em          \begin{document}     \begin{Form}     \TextField[name=Name,width=\longline,borderwidth=0,bordersep=4pt,backgroundcolor={.85 .85 .85}]{Name}\vskip1ex          \TextField[name=Affiliation,width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85},]{Affiliation}\vskip1ex          \ChoiceMenu[borderwidth=0,radio=true,backgroundcolor={.85 .85 .85}]{Are you a}{Student, Academic}\\          \TextField[name=Comment,multiline=true,width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85}]{Comments}\\     \end{Form}     \end{document}      What am I doing wrong with the radio boxes? Or is this an issue with the `poppler` library?


title: Manually set reference values

text: I'm working on a large-ish Latex document (my dissertation) in which each chapter has its own .tex file. For various reasons, I have two master files: one that includes all chapters and one that I modify over time to compile whatever chapter I happen to be working on at the time. For the most part, the chapters are independent and resolving references isn't a big deal. But, there's a handful of important results that need to get referenced across chapters and a few times when I need to refer to another chapter, i.e., `In Chap.~\ref{ch:other_chapter}, we discuss X, Y, and Z.`. As- is, that of course results in "Chap. ??" in the compiled document. I'd really like to be able to hand off a PDF of a single chapter to someone else to review without a bunch of "??" references (and not have to wait for the whole document to compile). SO.. Supposing that there's only a handful of such references so that it's manageable to do this manually, and supposing that I don't mind if their values aren't _quite_ right, is there a simple way to manually set the label values in my single-chapter master file so that my compiled document a) doesn't have a bunch of undefined references and b) doesn't include an empty chapter that's just there to populate the reference. I tried something like               % the chapter I'm currently working on     \include{the_chapter}          % so I can reference the next chapter without having to compile it     \setcounter{chapter}{2}     \label{ch:other_chapter}      But then `\ref{ch:other_chapter}` resolves itself as a Section of the chapter before it. I don't want to do this:               \include{the_chapter}          \chapter{The other chapter}     \label{ch:other_chapter}      Because this will actually generate a new chapter in the text, TOC, etc.


title: Positioning text both left and right on the same line

text: I am having a hard time positioning text. Especially if I need to 'float' elements to different sides. Currently, I'm trying to show a header with a 'subheader' that should be to the right of the header. Exactly to the right; not under it, not above it. Something like this:               MAIN TITLE                                 SUB TITLE          And here goes all the text, over the full page width.      The sub title should be exactly where the content box     ends, no matter what the size of the main title, nor      what the size of the sub title.           ANOTHER LONGER MAIN TITLE            ANOTHER SUBTITLE          This is another set of titles that shows just exactly     that the text subtitle should jump to the right of the     page, no matter the size.      I've tried many things but can not get this done. My closest fix was something like this:               \documentclass[11pt]{article}          \usepackage{parskip}     \usepackage{blindtext}          \begin{document}          \newcommand{\subtitle}[1]{\fbox{\vbox to 0pt{\hbox to 12.8cm{\hfill {#1}}}}}     \newcommand{\maintitle}[1]{\noindent\emph{#1 \vspace{0.01in}}}          \fboxsep0pt          \subtitle{Subtitle}     \maintitle{Title}          \blindtext          \subtitle{And a longer subtitle}     \maintitle{A longer title}          \blindtext          \end{document}      And this is what it looks like: ![enter image description here](http://i.stack.imgur.com/hEOU8.png) My problems are the following:   * In order to prevent that the position of the box is being influenced by the title, I need to actually put it before the title (so subtitle precedes title). This feels semantically wrong.    * Whatever I do, I can not get it to align at the same line. Always, whatever I put first pushes the other text down, even though it is a little bit.    * Creating a `\hfill` in an `\hbox` in an `\vbox` in an `\fbox` looks too complicated if I just want to float this box to the right. This should be easier, or not...?  What is the right way to tackle this issue?


title: Tutorial on positioning

text: As a beginner, I keep running into difficulties when in the need of positioning elements. Pushing them down, up, left or right should be easy concepts, but I find it hard to visualize as a beginner how this should be done, especially when I want to put something relative some some other element. In any way, this site has been most helpful but I was wondering if there is a recommended tutorial on how to position elements in LaTeX? Half of my searches direct to the LaTeX wiki and this page, but these do not answer my most common questions, like this or this. I'm specifically looking for documentation with regards to positioning that:   * Starts from scratch (focused at beginners)   * Uses images to illustrate (one image is worth... etc)   * Applies 'best practices' / explains what is the 'right way' and what is not, even though both might work.  I know, this is asking a lot. But I'm just wondering you know of something...


title: Why does picins exist in MikTeX but it does not exist in TeX Live?

text: If picins is not free, why does it exist in MikTeX?


title: How to install system wide packages without requiring an ls-R database (with texlive)?

text: ## Question How can I install packages for system-wide use, but without requiring the `ls-R` database to be updated? ## Background The texlive documentation indicates that user specific packages should be placed in `TEXMFHOME` while packages for multiple users should be placed in `TEXMFLOCAL` (both of which are organized by the TeX Directory Structure (TDS)). On your system, these locations can be found by using `kpsewhich` (they are configured as part of the installation, _not_ just as environmental variables):               kpsewhich -expand-var '$TEXMFHOME'         kpsewhich -expand-var '$TEXMFLOCAL'      As pointed out in this answer, the `TEXMFHOME` solution does not require the `ls-R` database to be updated: packages can just be added here and they will be found. The `TEXMFLOCAL` location, however, requires that `mktexlsr` (`texhash`) be run to update the `ls-R` database (which must be done as `root` if permissions are properly set). Is there a similar location to `TEXMFHOME` that _does not_ require an `ls-R` database for system-wide use? The use case is that a user on a shared system maintains a package that we host in `TEXMFLOCAL`. Whenever they change the names of files, the local `ls-R` database needs to be updated by an administrator. How can we allow the user to modify the package – including changing file names if needed – without requiring an admin to update `ls-R`? I realize that there will be a performance hit if the database is not used, a separate tree should probably be used. Also, I am sure that the settings for `TEXMFLOCAL` could probably be adjusted (by removing it from the `TEXMFDBS`?) to obviate the need for `ls-R`, but I am looking for a "standard" solution that meshes with the documented `texlive` system behaviour.


title: Increase space between two tables in minipage and TikZ overlay

text: Sorry but this is the MWE I could post. I also attached the image. The top image is what I am getting and the bottom one is what I desire. I manage to create nodes but do not know how to connect them. I tried this `\draw[-latex] (16.south) |- (28.south);` but that did not give me good output. Also I put a mini page with two tables. The gap between them is less however I desire bigger gap as shown in the desired output Thanks for your help               \documentclass{article}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}     \usepackage[svgnames]{xcolor}     \usepackage{tabularx}     \usepackage{placeins}      \usepackage{tikz}     \usepackage{pgf,pgffor}     \usetikzlibrary{calc}          \usetikzlibrary{positioning,shapes,shadows,arrows}     \usetikzlibrary{fit,shapes.geometric}     \newcounter{nodemarkers}     \newcommand\circletext[1]{%         \tikz[overlay,remember picture]              \node (marker-\arabic{nodemarkers}-a) at (0,1.5ex) {};%         #1%         \tikz[overlay,remember picture]             \node (marker-\arabic{nodemarkers}-b) at (0,0){};%         \tikz[overlay,remember picture,inner sep=2pt]             \node[draw,ellipse,fit=(marker-\arabic{nodemarkers}-a.center) (marker-\arabic{nodemarkers}-b.center)] {};%         \stepcounter{nodemarkers}%     }          \newcommand\fb\FloatBarrier % to put float barriers                    % Introduce a new counter for counting the nodes needed for circling     \newcounter{nodecount}     % Command for making a new node and naming it according to the nodecount counter     \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node (\arabic{nodecount}) {#1};}     % Some options common to all the nodes and paths     \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1cm,align=center,text depth=0.5ex,outer sep=1pt]     \tikzstyle{every path}+=[thick, rounded corners]          \begin{document}     \fb     \begin{table}[ht]     \begin{minipage}[b]{1\linewidth}      \begin{tabular}{l l c l}     & \tabnode{}& \tabnode{}&  \tabnode{} \\      & \tabnode{A} & \tabnode{D} &  \tabnode{G} \\       I & \tabnode{B} & \tabnode{E} & \tabnode{H}  \\        & \tabnode{C} & \tabnode{F} & \tabnode{I}  \\       & & & \\     & & & \\     & & & \\     & & & \\     II & \tabnode{One} & \tabnode{Two }& \tabnode{Three}   \\     & & & \\     & & & \\     III & \tabnode{First}& \tabnode{Second }& \tabnode{Third}  \\     \end{tabular}     \hspace{5cm}     \begin{tabular}{l l c l}     & \tabnode{}& \tabnode{}&  \tabnode{} \\     I & \tabnode{X} & \tabnode{Y} & \tabnode{Z}  \\       & & & \\     & & & \\     II & \tabnode{x} & \tabnode{y }& \tabnode{z}   \\     & & & \\     & & & \\     III & \tabnode{Xx }& \tabnode{Yy }& \tabnode{Zz}  \\     \end{tabular}     \end{minipage}     \end{table}          \begin{tikzpicture}[overlay]     \draw [Green] (4.west) -- (1.north west) -- (1.north east) -- (10.south east) -- (10.south west) -- cycle;     \draw [red] (5.west) -- (2.north west) -- (2.north east) -- (11.south east) -- (11.south west) -- cycle;     \draw [blue] (6.west) -- (3.north west) -- (3.north east) -- (12.south east) -- (12.south west) -- cycle;          \draw [Green] (16.west) -- (16.north west) -- (16.north east) -- (16.south east) -- (16.south west) -- cycle;     \draw [red] (17.west) -- (17.north west) -- (17.north east) -- (17.south east) -- (17.south west) -- cycle;     \draw [blue] (18.west) -- (18.north west) -- (18.north east) -- (18.south east) -- (18.south west) -- cycle;          \draw [Green] (28.west) -- (28.north west) -- (28.north east) -- (28.south east) -- (28.south west) -- cycle;     \draw [red] (29.west) -- (29.north west) -- (29.north east) -- (29.south east) -- (29.south west) -- cycle;     \draw [blue] (30.west) -- (30.north west) -- (30.north east) -- (30.south east) -- (30.south west) -- cycle;          \draw[-latex] (16.south) |- (28.south);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/jLCWq.jpg)


title: Small text near arrow tips

text: How can I add some tiny text near arrow tips? ###  Details I have an automaton like ![](http://i.stack.imgur.com/Fa26t.png) Now I want each edge to have the usual arrow tip, and close to the tip additionally a tiny text $\tau$. How can I do that? A nice and efficient solution would be great: Automatic positioning in a consistent manner, such that it becomes immediately visibly obvious that all arrows are of the type `\underset{\scriptstyle \tau}{\Longrightarrow}`. These criteria are more important than the exact positioning, but here's an example (with `\tau^*`, what I actually need) nevertheless: ![enter image description here](http://i.stack.imgur.com/XWE3m.gif) Better yet: with some text smaller than `\tiny`, to set it apart from the other text: ![enter image description here](http://i.stack.imgur.com/zpDmk.gif) ### I tried               (s0) edge[bend left] node[pos=0.3] {$a$} node[pos=0.9,swap] {$\tau^*$} (s1)      but nice positioning is very difficult that way. Minimal example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{automata}          \begin{document}     \begin{tikzpicture}     \node[state,inner sep=0pt,minimum size=.7cm] at (0,0) (s0) {$s_0$};     \node[state,inner sep=0pt,minimum size=.7cm] at (-1,-1) (s1) {$s_1$};          \path[->]       (s0)+(-.5cm,.5cm) edge[bend right,double] (s0)      (s0) edge[bend left,double] node[pos=0.3, auto] {$a$} (s1)      (s1) edge[bend left,double] node [auto] {$\epsilon,a$} (s0)      (s0) edge[loop above,double] node {$\epsilon,a$} (s0)      (s1) edge[loop below,double] node {$\epsilon,a$} (s1)      ;     \end{tikzpicture}     \end{document}


title: Call pdflatex with a stream

text: When creating LaTeX-driven reports, I would like to skip writing LaTeX sources to the disk prior to compilation and cleaning up afterwards. Can a stream be sent to `pdflatex` somehow?


title: Change period after the title

text: I will loose my nerves here... Please help me with this crazzy bibtex style code. I want to change my bibtex style file in order to change the dot after the authors and the title with the comma: > H. H. McAdams in A. Arkin. _Stochastic mechanisms in gene expression_. > Proceedings of the National Academy of Sciences, **94** (3) 814-819 (1997). with > H. H. McAdams in A. Arkin, _Stochastic mechanisms in gene expression_ , > Proceedings of the National Academy of Sciences, **94** (3) 814-819 (1997). How can I do that on this file https://www.dropbox.com/s/hog42r9fa669uzt/physicsFNM.bst ? Also I would need to make a Misc or Electronic source which looks like that: > N. FAMILYNAME, _TITLE_. Pridobljeno DATE iz LINK. How can I manage to do that? Thank you very much! Vito


title: knitr with TeXworks

text: There is a great piece on Yihui's site about using knitr with TeXShop. Taking some time for some self indulgent curiosity here. Is there a way to use knitr as an engine in TeXworks?


title: adding equations gradually to beamer highlight (hf-tikz)

text: I am trying to highlight equations of a linear program starting from buttom and add constraints to the highlight. Here is my MWE:               \documentclass{beamer}     \usepackage{lmodern,amsmath,amssymb}     \usepackage[beamer]{hf-tikz}          \usetheme{Copenhagen}          \begin{document}          \section{Mysection}     \subsection{A subsection}     \begin{frame}{The equations}     \begin{block}{}     \[       \begin{array}{r@{}r@{}r@{}l}         \text{Max} \quad z=x_1 &{} + 12x_2 \\[\jot]         \text{s.t.}\qquad 3x_1  &{} + \phantom{12}x_2 &{} &{} \leq 5 \\         x_1 &         &{}  &{} \leq 16 \\         \tikzmarkin<2->{a}                         15x_1 &{} + \phantom{12}x_2 &           &{} = 14 \\ \tikzmarkend<2->{a}                          \tikzmarkin<1>{a}x_1 &{} &{}   &{} \geq 0 \\                         &{} x_2 & &{} \geq 0\tikzmarkend{a}\\        \end{array}     \]     \end{block}     \end{frame}          \end{document}      I get a weird `2->` expression in my slides and also my highlight box doesn't cover the equation fully (in second slide). Am I missing something? Thank you in advance for your help. NOTE: ht-tikz always needs two comilation. The manual says: Two compilation runs are always necessary: the first one to compute the position of the markers (also called delimiters) and the second one to place the box. So, if you get an error in the first run, don't panic! Run it again...


title: How can I get curly arrow underneath a state in a state transition diagram

text: I have a simple state transition diagram that I'd like to render in latex ideally using regular mathmode markup. The arrows show the probability of going between states. ![enter image description here](http://i.stack.imgur.com/kPBTk.png)               \underbrace{\boxed{A}}_{1/4}     \;\mathrel{\mathop{\rightleftarrows}^{3/4}_{1/4}}\;     \underbrace{\boxed{B}}_{1/2}     \;\mathrel{\mathop{\rightarrow}^{1/4}}\;     \underbrace{\boxed{C}}_{1}      The left-to-right arrows are fine, but I'd like curly arrows rather than the underbraces to show the probability of remaining in the state. So there is a 1/4 probability of being in A and staying in A, a 1/2 probability of being in B and staying in B and so on. And I'd like to show this with an arrow below (or above) the state. Is this possible? Edit: here's my schematic. ![enter image description here](http://i.stack.imgur.com/hsUUF.png) however Werner has done a much nicer mock-up in his comment. ![enter image description here](http://i.stack.imgur.com/4kTwA.png) I'd prefer something like this but would be happy to settle for something cruder!


title: customizing moderncv \section title style

text: I would like to customize `\section` style in order to have the following title (forget the horizontal line) : ![title \\section](http://i.stack.imgur.com/BhadV.jpg) I imagine that I need to modify the following definition:               \renewcommand*{\section}[1]{%       \par\addvspace{2.5ex}%       \phantomsection{}% reset the anchor for hyperrefs       \addcontentsline{toc}{section}{#1}%       \strut\sectionstyle{#1}%       {\color{color1}\hrule}%       \par\nobreak\addvspace{1ex}\@afterheading}      The code I am using is:               \section{CORE COMPETENCIES}      Can you tell me how?


title: Break a subfigure set in two lines

text: Is it possible to break a figure block made by three subfigures in two lines? I would like to maintain the first subfigure on the first line and the other subfigures on the second line.               \begin{figure*}[t]     \centering         \subfigure[sub1]{\includegraphics{path1}\label{fig:path1}}         \subfigure[sub2]{\includegraphics{path2}\label{fig:path2}}         \subfigure[sub3]{\includegraphics{path3}\label{fig:path3}}     \end{figure*}


title: moderncv cover letter recipient data line length

text: I am writing a cover letter and CV using `moderncv`. The resulting output wraps the first two lines of the recipient information, making four lines, even though it's unnecessary (in this case). How can I change the output of the recipient data so that the committee name is on only one line and the school name is only on one line? Here is a MWE:               \documentclass[12pt,letterpaper,sans]{moderncv}     \moderncvstyle{classic}     \moderncvcolor{black}     \renewcommand{\familydefault}{\sfdefault}     \nopagenumbers{}     \usepackage[utf8]{inputenc}     \usepackage[scale=0.75]{geometry}     \usepackage{lipsum}          %% Personal data     \firstname{New PhD}     \familyname{Scholar}     \address{31415 Pi Street}{Largeville, ND, 58202}     \mobile{+1~(502)~321~1234}     \email{scholar@gmail.edu}          \begin{document}          % recipient data     \recipient{New Work and Research Studies Search Committee\\E. Pluribus Unum School of Grant Proposals and Other Funding}{Blueberry University\\204 N. Peach Ave.\\Buymore, WI 78115}     \date{\today}     \opening{Dear Committee Members,}     \closing{Regards,}          \makelettertitle     \lipsum     \makeletterclosing     \end{document}


title: Parameterizing TikZ Figure

text: I have this code that generates the process gantt chart:               \usetikzlibrary{shadows,arrows,positioning}     \begin{tikzpicture}[scale=0.75, transform shape]           \tikzset{every node/.style={minimum height=2em},             proc/.style={draw=black, fill=blue!15, drop shadow},           }                \node [draw, proc, minimum width=3em] (p2) {P2};           \node [draw, proc, minimum width=3em, right=0em of p2.east, anchor=west] (p3) {P3};           \node [draw, proc, minimum width=24em, right=0em of p3.east, anchor=west] (p1) {P1};                     \node [below=of p2.west] {0}  edge [draw] (p2.west);           \node [below=of p2.east] {3} edge [draw] (p2.east);           \node [below=of p3.east] {6} edge [draw] (p3.east);           \node [below=of p1.east] {30} edge [draw] (p1.east);           \end{tikzpicture}      The output: ![Process Gantt Chart](http://i.stack.imgur.com/Bkdo1.png) I can see a pattern over here and I can imagine passing the parameters (e.g. `p2/3,p3/3,p1/24`) to some command that uses some kind of for loop to automatically generate the code. Unfortunately, my TikZ/LaTeX skills are way below that. Can anyone help me get started with automating this?


title: Place chapter title between two lines

text: I want to place a chapter title between two lines. The lines shall be on the left and the right side of the centered title like in this screenshot: ![Desired result](http://i.stack.imgur.com/9a2Cl.png) Note that the lines are slightly _overhanging_ the text below. It would be nice if I could do the same. Obviously the length of the chapter titles is varies, so the solution needs to automatically adapt to the length. By now I have the following:               \documentclass{memoir}     \usepackage{graphics}     \usepackage{fontspec}          \makeatletter     \def\thickhrulefill{\leavevmode \leaders \hrule height 1pt \hfill \kern \z@}     \def\@makechapterhead#1{%       \vspace*{60\p@}%       {\parindent \z@ \centering \reset@font               {\color{headings}                 \scshape \large \@chapapp{} \thechapter               }             \par\nobreak             \interlinepenalty\@M         \Huge \itshape #1\par\nobreak         \thickhrulefill         \par\nobreak         \vskip 40\p@       }}     \usepackage{lipsum}     \setcounter{chapter}{12}     \begin{document}          \chapter{Implementation}     \lipsum     \end{document}      which gives me this: ![Current state](http://i.stack.imgur.com/Danwm.png)


title: Proper way to do a "page break"

text: Lets assume that in my latex code I have the following paragraph as an example. The leaked cabled from the US embassy to Washington indicate that in the run up to the May General Election Mr King told the Ambassador Louis Susman, that he was worried about the Conservative leadership’s “lack of experience”. Mr King’s fears, expressed in a meeting on Feb 16, were sent in a cable to the US Secretary of State, Hillary Clinton, and disclosed on Tuesday night by the WikiLeaks website. When I generate the pdf, the annoying thing is, that the last three words will be on a new page, also it looks like that:               The leaked cabled from the US embassy to Washington indicate that in the run     up to the May General Election Mr King told the Ambassador Louis Susman, that     he was worried about the Conservative leadership’s “lack of experience”.     Mr King’s fears, expressed in a meeting on Feb 16, were sent in a cable to     the US Secretary of State, Hillary Clinton, and disclosed on Tuesday night by     -------------------------------------------------- [start of new page ]     the WikiLeaks website          More text to follow.      This looks rubbish. So what I am trying to do is the following:                The leaked cabled from the US embassy to Washington indicate that in the run up to      the May General Election Mr King told the Ambassador Louis Susman, that he was      worried about the Conservative leadership’s “lack of experience”. Mr King’s fears,       expressed in a meeting on Feb 16, were sent in a cable to      \newpage      \noindent the US Secretary of State, Hillary Clinton, and disclosed on Tuesday      night by the WikiLeaks website.       Is this the proper way to solve such an issue or is there an easier way to do that? Many thanks