title: I cannot download proTeXt on re-trial after an aborted first trial

text: I tried to download proTeXt from the TUG site. The internet connection was interrupted, and I could then not complete it. On trying again, however, I have not been able to access the site at all, try as I may. Please how may I proceed?


title: Images floated left and right with text between

text: I need to recreate this in LaTeX: ![three-column section](http://i.stack.imgur.com/mtz19.png) The rest of the page is "normal", i.e. no division into columns. I have both images as separate files. What would you suggest? Thanks.


title: Specific colour in equation links

text: In hyperref package, is it possible to specify a specific color for equation links different than other link colors ? Following are present color specifications that I am using for `hyperref` package               colorlinks=true,       % false: boxed links; true: colored links     linkcolor=red,          % color of internal links     citecolor=blue,        % color of links to bibliography     filecolor=magenta,      % color of file links     urlcolor=cyan         (Is it possible to do it with \cref ?) Thanks.


title: A simple way to print an incomplete TOC

text: I would like to print a table of contents after each part of a book class document. This toc will show only the contents of the relevant part. I could use the `minitoc` package but (1.) it primary intended to print toc after each chapter (not part) and (2.) it seems a very complex and heavy package (800 pages of doc) which modifies deeply titles formating. So, I'm looking to a easier way to do this simple request. A solution which does not change the layout or fonts characteristics is preferable. In fact, I just want a way to use the classic `\tableofcontents` command several times _but_ in order to show only the part 1, and then the part 2, 3, ... .


title: I need pointers on how to draw my neural-network diagram

text: Please help me draw this diagram. I'm practicing on TikZ, but it's so difficult. ![enter image description here](http://i.stack.imgur.com/YyDti.jpg) I don't know which library I should use, matrix/chain or another something ? I also don't know how to draw a circle connector like picture. Please help me draw this picture.


title: Rotated text in side margin

text: I've typeset a very wide table using `longtable` and rotating all the cells. As a consequence, if I want to place a "right" header, it ought to be in the bottom of the right margin, with the text rotated. I've been looking at some combination of `fancyhdr` and `rotating`, but can't get it to work. Rotating the text isn't the problem, but how does one place text at the bottom of a side margin? Right now I have               \pagestyle{fancy}      \lhead{}     \chead{}     \rhead{}     \lfoot{}     \cfoot{}     \rfoot{\begin{turn}{-90}\parbox{2in}{test \\ line two}\end{turn}}      which, of course, doesn't actually end up in the side margin.


title: Run a macro before the start of each frame/slide?

text: I have a macro that I want to run just before every new beamer frame. I could just a define `myframe` environment that runs the macro then starts a standard frame, but I'd rather do it differently if I can. Beamer has neat `\AtBeginSection` functionality, but am I right in thinking there's no such analogue like `\AtBeginFrame`... And would the situation be different if I actually wanted to do something before setting each _slide_? [Edit: I asked this last part as a separate question]


title: 4 authors, but half of the final author's name is moved to next lne. How can I stop it?

text: We have 4 authors. However when I use elsarticle 2 things are happening: 1. it does not give me an option to put word "and" before the 4th author's name 2. Due to the length of names, 4th author's name is divided in half and first name is shown on the first line and the last name is in a new line. How do I get around this?


title: Is there a package to divide pages of A4 to 2 pages of A5 each?

text: When I read a pdf book in my iPod touch using iBook software in landscape mode, I must zoom in each page manually. It means if I proceed to each page, I must zoom in until the left-right margins get aligned with the left-right margins of the display--- approximately 1/2 of a page will be displayed. My idea is to divide each page in my book into 2 pages of A5. I hope I can do this for all pages automatically because doing it manually for more than 500 pages becomes tedious. Is there a package to do that?


title: Cg Code in Latex

text: I am writing some document which contains Cg (C for Graphics) code in the document. I want to show the code in a neat highlighted mode. Any easy method to suggest? I tried the listings package but it doesn't support Cg language.


title: Importing a .png file into .tex file

text: I've been trying to input a graph into my `.tex` file, but it won't work. I've put the `.png` file in the same folder as the `.tex` file and a part of my code looks like:               \documentclass[16pt, a4paper]{article}     \begin{document}           .           .           .          \usepackage{graphicx}      \begin{figure}           \includegraphics{Gaussfit.png}       \end{figure}     \end{document}      The error message I'm getting is:               ! LaTeX Error: Can be used only in preamble.      How can I fix this problem ?


title: biblatex: format of author field in op.cit. loc.cit

text: I'm using `biblatex` and I must strictly obey some formatting rules for my thesis. Here's the problem: `biblatex` does not display author's first name (initial or full, whatever) when calling op.cit. and loc.cit. formatting. I've been digging into forums and `biblatex` source files (`.bst`, `.def`, `.cbx` and so on ...) and I can't solve the problem despite hours of search. Please help me, I'm getting crazy! By the way, how could I disambiguate Jane Doe from Joan Doe if using `firstinits=true` in such case? Many thanks for your help! MWE below:               \documentclass{article}     \usepackage[style=verbose-trad1,backend=biber,firstinits=true]{biblatex}     \DeclareNameAlias{default}{last-first}          \begin{filecontents}{\jobname.bib}     @article{SmithJ,         Author = {John Smith},         Title = {A great paper for sure},         Year = {2000}}     @article{DoeJane,         Author = {Jane Doe},         Title = {An even better paper},         Year = {2002}}     @article{DoeJoan,         Author = {Joan Doe},         Title = {This one is published},         Year = {2014}}     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     Smith dummy ref\footcite{SmithJ}.     DoeJane dummy ref\footcite{DoeJane}.     Call opcit with Smith ref\footcite[39]{SmithJ}.     Call opcit with DoeJane ref\footcite[35]{DoeJane}.     Introduce DoeJoan ref\footcite[18]{DoeJoan}.     Call loccit with DoeJane ref\footcite[35]{DoeJane}.     Call loccit with SmithJ ref\footcite[39]{SmithJ}.     \end{document}


title: Long brackets in flalign*

text: I'm trying to type a nice looking long sum of functions: ![example of what looks okay](http://i.stack.imgur.com/F2mco.jpg) I managed to do it with combination of `flalign*` and `\mspace`:               \begin{flalign*}     f(a+h)-f(a)=&f(a_1+h_1,\dots\mspace{25mu}\dots,a_n+h_n)-f(a_1,\dots\mspace{120mu}\dots,a_n)=\\     =&f(a_1+h_1,a_2+h_2,\dots\mspace{1mu}\dots,a_n)-f(a_1,a_2,\dots\mspace{95mu}\dots,a_n)+\\     +&f(a_1+h_1,a_2+h_2,a_3,\dots,a_n)-f(a_1+h_1,a_2,\dots\mspace{55mu}\dots,a_n)+\\     &\dots\\     +&f(a_1+h_1,\dots\mspace{24mu}\dots,a_n+h_n)-f(a_1+h1,\dots,a_{n-1}+h_{n-1},a_n)\\     \end{flalign*}      I'm pretty happy with what I got, but here's my question: is it possible to make right brackets place themselves automatically in the right place? `\phantom` could help, if not for `a_n+h_n` instead of `a_n` bit. And is it possible to use another `&` pointer (say, `&2`), to mark the line of "-"s? On the side note: how come this whole "reputation" does not allow me to make new tags? Aren't they suppose to, you know, HELP people?


title: pgfplots: legendentrys are wrong

text: I'm using pgfplots to plot a lot of data as you can see below. For some of the plots I'v specified a legendentry, but the marks for these plots are not shown in the legend. does anyone know where the mistake is? ![](http://i.stack.imgur.com/4S2rG.png)               \documentclass[a4paper]{article}     \usepackage{pgfplots}     \usepgflibrary{shapes.geometric}     \usetikzlibrary{patterns,arrows}     \begin{document}              \begin{tikzpicture}           \centering           \begin{axis}[             height=10cm,             width=\columnwidth,             enlarge y limits=0.07,             enlarge x limits=0.03,             legend style={at={(0.5,-0.1)}, anchor=north,legend columns=-1},             %ylabel={Bezugsphoneme: regspr. Vnt. (Hn)},             symbolic x coords={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w},             xtick=data             ]                  \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=-] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=a] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=aa] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=ai] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=au] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=b] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=o, scale=0.7, draw=black, solid}] table[x=vpid, y=c] {data.dat}; \addlegendentry{c}             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=d] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=triangle, scale=0.8, draw=black, solid}] table[x=vpid, y=ee] {data.dat}; \addlegendentry{ee}             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=schwa] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=E] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=EE] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=f] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=g] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=ii] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=i] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=k] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=m] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=n] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=ng] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=oo] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=oe] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=oee] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=o] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=oi] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=p] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=pf] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=square, scale=0.7, draw=black, solid}] table[x=vpid, y=r] {data.dat}; \addlegendentry{r}             \addplot+[sharp plot, only marks, mark options={mark=diamond, scale=0.8, draw=black, solid}] table[x=vpid, y=s] {data.dat}; \addlegendentry{s}             \addplot+[sharp plot, only marks, mark options={mark=pentagon, scale=0.8, draw=black,solid}] table[x=vpid, y=sch] {data.dat}; \addlegendentry{sch}             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=t] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=ts] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=uu] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=u] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=v] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=uee] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=ue] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=z] {data.dat};             \addplot+[sharp plot, only marks, mark options={mark=-, scale=0.8, draw=black}] table[x=vpid, y=sth_sch] {data.dat};                      \addlegendimage{-}             \addlegendentry{others}                \end{axis}         \end{tikzpicture}     \end{document}      * * * The data table:               vpid    -   a   aa  ai  au  b   c   d   ee  schwa   E   EE  f   g   ii  i   k   m   n   ng  oo  oe  oee o   oi  p   pf  r   s   sch t   ts  uu  u   v   uee ue  z   sth_sch     a   4   17  6   8   2   10  28  10  33  6   0   0   3   17  23  4   2   1   14  0   5   0   0   20  0   0   0   79  1   18  10  0   0   3   7   1   0   13  0     b   0   11  2   4   1   2   33  0   24  3   2   0   0   2   12  6   5   0   62  0   5   0   0   1   0   7   2   50  2   22  36  0   0   4   10  0   0   2   0     c   1   12  2   3   1   5   11  1   33  3   4   0   0   6   12  11  2   0   17  0   7   1   0   1   0   6   0   56  3   7   17  0   0   16  28  1   1   3   0     d   0   18  1   6   4   6   56  7   58  6   3   0   4   15  18  15  4   1   27  0   1   1   0   3   0   12  0   74  45  29  29  0   0   8   17  1   0   24  2     e   0   16  1   3   1   8   46  9   35  6   6   0   3   18  11  5   0   0   21  0   2   0   1   22  0   5   2   78  2   47  14  0   1   9   1   0   0   3   2     f   0   1   1   10  2   10  68  7   35  2   5   0   2   7   10  9   0   0   15  0   0   0   0   4   0   3   2   65  24  30  40  0   0   10  1   0   0   1   0     g   4   28  16  40  3   26  49  16  27  10  3   0   5   19  40  40  4   0   24  1   8   0   0   7   0   3   3   71  52  24  19  0   2   5   15  2   2   14  0     h   0   4   1   1   4   5   56  4   29  1   3   0   5   7   19  9   1   1   10  0   0   1   0   2   0   4   2   35  15  35  26  0   2   5   3   0   0   5   0     i   1   10  2   5   5   2   111 8   27  0   2   0   0   11  16  17  1   1   13  0   4   0   0   7   0   1   2   48  30  37  16  0   2   8   5   0   0   2   0     j   0   13  1   5   5   2   95  5   36  2   1   0   1   3   21  20  0   6   11  0   1   0   0   6   0   4   1   43  21  15  15  0   0   4   7   0   0   8   0     k   0   9   9   7   9   12  76  7   41  4   2   0   8   11  31  15  4   0   16  0   12  0   0   4   0   7   2   82  27  43  10  0   0   3   10  0   0   5   0     l   0   12  6   11  8   6   64  9   35  2   4   0   11  15  33  19  1   1   17  0   18  0   0   6   0   3   1   63  44  15  23  0   0   9   27  0   0   31  0     m   0   30  4   3   4   10  64  7   48  6   2   0   3   8   20  8   0   0   26  0   11  1   0   9   0   2   0   115 0   66  13  0   0   14  6   0   0   15  0     n   0   17  0   8   4   6   65  7   33  3   4   0   4   9   22  6   5   3   9   0   7   0   1   4   0   2   2   59  24  44  18  0   1   2   3   0   0   6   0     o   0   1   1   0   3   12  77  5   30  2   3   0   1   10  15  6   0   0   7   0   2   0   0   1   0   4   0   51  0   45  21  0   1   5   3   1   0   2   0     p   0   28  4   6   5   6   41  8   38  1   0   0   2   4   43  3   1   0   17  0   3   0   0   4   0   4   0   65  2   35  26  0   1   2   21  0   0   3   3     q   0   14  3   4   6   2   60  2   30  2   3   0   6   13  29  2   0   1   9   0   3   0   0   3   0   4   2   66  0   38  10  0   0   6   14  0   0   8   0     r   0   40  7   5   5   5   109 13  43  3   2   0   5   17  30  25  1   1   14  0   3   0   0   13  0   4   0   74  71  32  22  0   6   2   22  0   0   4   0     s   1   12  1   2   2   17  41  14  26  2   0   0   3   18  22  5   0   0   11  0   3   0   0   7   0   1   1   62  4   41  8   0   2   4   1   0   0   6   1     t   6   81  44  16  6   20  111 23  31  29  6   0   3   34  70  61  3   0   8   0   24  0   0   13  3   6   3   95  102 52  56  0   18  5   35  6   1   8   0     u   0   19  5   4   17  15  114 22  38  2   8   0   5   8   24  16  1   0   10  0   13  0   0   7   0   2   0   82  25  61  25  0   0   0   11  0   0   13  0     v   0   25  7   6   11  20  142 7   21  6   4   0   7   21  45  15  3   1   12  0   13  0   0   5   0   0   0   52  24  23  37  0   2   6   11  0   0   16  0     w   0   24  1   6   14  6   74  14  15  3   3   0   11  12  22  2   5   1   3   0   7   0   0   6   0   2   0   46  0   35  17  0   1   2   8   0   0   14  0


title: Simpler boxplots in pgfplots - is this possible?

text: When I wanted to plot boxplots in pgfplots, I started using the solution proposed by Jake in the question linked to above. However, as I wanted to plot more than one set of boxplots in the same figure (ie, using groupplots), the plot definition started getting quite unwieldly quite fast: with four `addplot`s for the boxes alone, plus another for the outliers, I had 10+ `addplot` commands per figure. What I'm after is a simpler way of doing this. Ideally, what I'd like would be a style definition that took care of all the same things that the `addplot` commands have been doing so far, so that I could do a simple               \addplot [boxplot] table {testdata.dat};      and be done with it, with the added possibility of passing some additional arguments to specify colour, marker type and such. I tried with a `\newcommand` which worked, but I couldn't manage to pass options to pgfplots, so I started looking for alternatives. What I think I need for this is a similar approach to that used in `scatter` plots in pgfplots, like Jake's solution for this question, so that I could specify the coordinates for the box and the whiskers with a number of meta points. However, the solutions I've found all seem to use either 3 or maybe 4 numbers to specify each mark on the plot, and for boxplots I need 6. I've managed to get quite close by enclosing equivalent TikZ commands to those written by Jake into a `@pre marker code` block, but I seem to be having scale problems despite using `disabledatascaling` and such, which as I understand should solve the issue. The problem here is that, unlike the last question I linked to, (I think) I cannot use `\pgfplotspointmeta`, since I'm trying to recover more than just one point. Then again, I might be barking at the wrong tree. Here's a minimal (not) working example:               \documentclass{article}     \usepackage{pgfplots}          \pgfplotsset{       boxplot/.style={         mark=-,         mark size=0.5em,         scatter,         point meta=0,         only marks,         axis equal,         disabledatascaling,         visualization depends on={\thisrow{boxtop}        \as \boxtop},         visualization depends on={\thisrow{boxbottom}     \as \boxbottom},         visualization depends on={\thisrow{whiskertop}    \as \whiskertop},         visualization depends on={\thisrow{whiskerbottom} \as \whiskerbottom},         visualization depends on={\thisrow{x}             \as \bpx},         scatter/@pre marker code/.append code={           \draw % box             (axis cs:\bpx,\boxbottom)     -- ++ (  0.5em, 0pt) |-             (axis cs:\bpx,\boxtop)        -- ++ ( -0.5em, 0pt) |-             (axis cs:\bpx,\boxbottom)     -- cycle;           \path % top whisker             (axis cs:\bpx,\boxtop)        -- (axis cs:\bpx,\whiskertop);           \path % bottom whisker             (axis cs:\bpx,\boxbottom)     -- (axis cs:\bpx,\whiskerbottom);           \path % top whisker marker             (axis cs:\bpx,\whiskertop)    -- ++ ( 0.25em, 0pt) --             (axis cs:\bpx,\whiskertop)    -- ++ (-0.25em, 0pt);           \path % bottom whisker marker             (axis cs:\bpx,\whiskerbottom) -- ++ ( 0.25em, 0pt) --             (axis cs:\bpx,\whiskerbottom) -- ++ (-0.25em, 0pt);         }       }     }          \begin{document}       \begin{figure}         \begin{tikzpicture}           \begin{axis}             \addplot [boxplot] table[y=median] {                 x whiskerbottom boxbottom median boxtop whiskertop                  1 42            45        47     47     48                  2 36            39        40     41     43                  3 41            44        45     46     47                  4 20            29        31     36     38                  5 31            32        34     36     39              };           \end{axis}         \end{tikzpicture}       \end{figure}     \end{document}      The problem with this is, like I said above, that the TikZ commands don't seem to be using the same axis coordinate system (despite my attemps at the opposite by using `axis cs`; I actually get better results without it). ![here](http://i.stack.imgur.com/r1q0I.png) It seems as if the only thing I need is to make sure both pgfplots and TikZ are using the same scale, but I'm fresh out of ideas. Can this be done? Or is the approach just flawed, and I should navigate around the problem instead of finding a solution?


title: Unexpected indent for all bold paragraphs after first

text: After the first lines in a paragraph I have an unexpected indent. My question here is why is it there and how can I avoid it?               My .tex file is like this:     \documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}     .........          \chapter{chapterTitle}          \section{sectionTitle}          \textbf{part1}: +5 xyz\\*     \textit{description}\\*          \textbf{part2}: comments\\     \textit{description}\\          \textbf{part3}: comments          ......      Part 1 has no indenting, but part 2 and part 3 each start with the bold parts indented (if something from teh comments or description (description as a whole are not indented thus only the bold part is indented each) is in a new line then it is not indented each.


title: \@ifnextchar inside pmatrix?

text: I created a function which handles a superscript followed after the function. I do that by using `\@ifnextchar^`. Everything works well, except in any `pmatrix` environment. Why? As a quick-and-dirty example I created the (useless) function `\fv` to debug it a little:               \documentclass{report}     \usepackage{amsmath}          \makeatletter     \newcommand{\fv}[1]{         \@ifnextchar^{A}{B}     }     \makeatother          \begin{document}              \begin{align*}             \begin{pmatrix}                 \fv{x}, \fv{x}^y             \end{pmatrix} = \fv{x} = \fv{x}^y         \end{align*}          \end{document}      I had expected a result in the form (B,Ay)=B=Ay. But what I get is (B,By)=B=Ay. Is there a way to detect the superscript in `pmatrix` environments as well?


title: Force minimum paper size in "standalone" (or use an alternative)

text: I compile small latex math snippets using the `standalone` document class. I rasterize the resulting PDF to a PNG image using ImageMagick and finally include these images in some HTML document. However, for technical reasons of this procedure, I want to ensure a specific height of the document **above + below the baseline** , let's say the letter "Q" should always fit vertically, even if the document only contains one single "a". I thought about including a **phantom** letter, but this also introduces additional whitespace in the horizontal dimension. Is there an easy way to tell `standalone` (or a special environment) to at least include a specific height above + below the baseline of the text? Is there some phantom-similar thing which enlarges the bounding box but doesn't occupy space by itself? I also thought abut a tikz image which doesn't draw anything but specify a bounding box. However, including the tikz package for this reason only will make compilation very slow since I have to compile dozens of latex snippets. I use `lualatex` (but only because of the easy integration of true type fonts) and currently I compile the latex snippets using the following document template (the `...` is replaced with the latex snipped to be rendered):               \documentclass{standalone}     \usepackage[T1]{fontenc}     \usepackage{xcolor}     \usepackage{arev}     \usepackage{amsmath}     \begin{document}     $...$     \end{document}      (If this is not possible, I'll just use a phantom text to specify my minimum vertical bounding box + auto-crop the rasterized image horizontally.)


title: Using \caption for tikzpicture

text: I needed to move a picture to the right side of a slide, so I used `tikzpicture`! but with using the `\caption`, it will put the caption right in the middle of the picture. How can I move the caption? Here is my code:               \begin{figure}     \begin{tikzpicture}[remember picture,overlay]         \node [xshift=-2.8cm,yshift=-1cm] at (current page.east)         {\includegraphics[width=0.7\textwidth]{Geant_topology.jpg}};          \end{tikzpicture}     \caption{Geant Topology}     \end{figure}


title: Alignment issue with longtabu

text: I'm using `longtabu` to create a table. This is the code:               {\footnotesize      \begin{longtabu} to \textwidth {|l|c|c|l|l|c|c|c|c|}          \hline     \textbf{Frame} &     \textbf{Cam} &     \textbf{ID} &     \textbf{Class} &     \textbf{State} &     \textbf{Type} &     \textbf{Time} &     \textbf{Info ID (2)} &     \textbf{Info ID (4)}      \\ \hline     \endfirsthead          \endhead          \endfoot          \endlastfoot          403 & 2 & O@61 & Pers. & Not assoc. & None & 0 & A@201 & B@NA \\ \hline          \end{longtabu}     }      And this is the result: ![result longtabu](http://i.stack.imgur.com/EcpB4.png) How can I fix the mismatch between rows?


title: Use multiple tikz picture with onslide command in the single frame in beamer

text: I have multiple tikz pictures in the single frame in beamer. In the first tikz picture I was able to use the only overlay and onslide command. However, for the second picture I am not able to achive the same effect. What I want is at onslide<4> onwards I want to show the contents on the second tikz picture. The sample code inside a frame is as follows:               \begin{frame}     \frametitle{Age of Water under dye from all Rivers}              \only<1->{\begin{tikzpicture}         \centering             \node [](0,0)(start){ \includegraphics[clip,trim=10 370 400 10,width=0.8\textwidth,height=0.85\textheight]{figures/dye-rivers}};     %       \draw [step=0.5cm,thin,dotted] (-5,-4) grid(5,4);     %       \node [circle]at (-4.5,0){0};     %       \node [circle,radius=0.9cm,fill=red!30,] at (-4.5,0)(a){};             \onslide<2->{\draw [red,fill=red!30](-4.3,-0.2)circle(0.1cm);             \draw [red,fill=red!30](-3.3,0)circle(0.1cm);             \draw [red,fill=red!30](-2.5,-0.7)circle(0.1cm);             \draw [red,fill=red!30](-4.,-0.8)circle(0.1cm);             \draw [red,fill=red!30](-4.,-1.2)circle(0.1cm);             \draw [red,fill=red!30](4.3,1.6)circle(0.1cm);             \draw [red,fill=red!30](3.3,2.7)circle(0.1cm);             \draw [red,fill=red!30](1.6,3.5)circle(0.1cm);             \draw [red,fill=red!30](1.3,3.5)circle(0.1cm);}                      \node [rectangle,text width=4cm,red] at (5.5,3) (return) {$Q_2 = 169 A^{0.616}$     \linebreak Mason et. al. 1998};             \onslide<3-> \node [rectangle,text width=4cm,red] at (5,0) (return) {Smaller near the source     \linebreak Increases away from the source};             \onslide<3-> \draw [red](-3.3,-1.5) circle(0.7cm);%wolf bay small age         \end{tikzpicture}}                  \begin{tikzpicture}             \node [](0,0)(start){ \includegraphics[clip,trim=400 370 0 0,width=0.8\textwidth,height=0.85\textheight]{figures/dye-rivers}};         \draw [step=0.5,dotted](-5,-4) grid (5,4);         \end{tikzpicture}               \end{frame}


title: Defining a point on a path by direction of another path

text: Is it possible to define a point when I have two paths such as:               beginfig(1);       u := 1cm;       path p[];       p0 := (1u,3u)--(2u,2u);       p1 := (2u,0)--(3u,2u);       for i=p0,p1: draw i; endfor;     endfig;     end      so that if continuing `p0` to the `p1`, the wanted point would be there. ![enter image description here](http://i.stack.imgur.com/RSVAM.png) I've tried the `dir`* commands, but all the examples I've found seem to either be overly complex for my understanding, or use them in curve definitions.


title: Removing vertical space inside \maketitle

text: In `\documentclass{article}`, the `\maketitle` command results in a lot of wasted vertical space. Is there any way for me to remove it? In other words, I'd like the author to appear directly below the title, and the date directly below the author.


title: How to insert pdf (as a graphic file) in LaTeX

text: I am trying to insert some ready image-pdf files to my LaTeX code. (I use pdfLaTeX and my distributor is TeXnicCenter.) But I will get this error:               Package pdftex.def Error: File 'fig1.pdf' not found.      I already tried putting `fig1` not `fig1.pdf`, having both `.pdf` and `.eps` files in the given directory, but nothing changed. My code is:               \documentclass[a4paper,10pt, reqno]{amsbook}     \usepackage{graphicx}     \graphicspath{F:/(some path here...)/pdfs/}     \DeclareGraphicsExtensions{.pdf,.eps}                    \begin{document}          \begin{figure}[!htb]     \centering     \includegraphics[width=0.7\textwidth]{fig1.pdf}     \caption{Digraph.}     \label{fig:digraph}     \end{figure}          \end{document}


title: Koma article class linespacing problems

text: Now I have badbox warning with this table :               \documentclass[11pt,a4paper,twoside,twocolumn]{scrartcl}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage[francais]{babel}     \usepackage[T1]{fontenc}     \usepackage{multicol}     \usepackage{textcomp}     \usepackage{multirow}     \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{caption}      \setlength{\columnsep}{30pt}     \usepackage[tracking=true]{microtype}     \usepackage{geometry}     \geometry{a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm}     \captionsetup[table]{skip=10pt}     \raggedbottom     \begin{document}          \twocolumn[\begin{@twocolumnfalse}           \begin{abstract}     some text here     \end{abstract}          \end{@twocolumnfalse}]            \section*{title}     \subsection*{title}     some tex here          \begin{table}[ht!]     \small     \caption{Concentrations d'ADN mesurées par spectrophotométrie et rapports d'absorbance A$_{260\;\unit{nm}}$/A$_{280\;\unit{nm}}$.}     \label{tab:absorbance}     \begin{tabularx}{7,9cm}{X p{1,8cm} X}     \hline      \textbf{Extrait de la souche N°} & \textbf{[ADN]* en ng/$\mu$L}  & \textbf{Rapport d'absorbance A$_{260\;\unit{nm}}$/A$_{280\;\unit{nm}}$} \\       \hline     1 & 1178,13 & 2,23 \\       2 & 957,52 & 1,68 \\       6 & 1470,09 & 2,18 \\       7 & 983,12 & 2,11 \\       11 & 1003,30 & 1,15 \\       12 & 536,17 & 1,88 \\       14 & 1163,83 & 2,10 \\       17 & 201,00 & 1,84 \\       18 & 552,17 & 2,15 \\       19 & 890,13 & 2,26 \\       20 & 588,75 & 2,07 \\       22 & 307,13 & 1,83 \\      \hline      \end{tabularx}      \caption*{\small\raggedright *[ADN] : Concentration d'ADN$_{\text{extrait}}$}     \end{table}          some text here          \end{document}


title: exam class and align* environment

text: I wonder if there is a conflict between the `align` environment and the exam class. I have the following and it gives an error for `\begin{align*}`               \documentclass[answers,11pt]{exam}     \usepackage{graphicx}     \usepackage{amssymb}          \title{xxx}     \author{yyy}     \date{ }             \begin{document}     \maketitle          Please submit the answers by placing hard copy solutions in the assignment boxes.               \qformat{\textbf{Question~\thequestion.} \hfill}           \begin{questions}     \question Given the following histories:          \begin{align*}     H_{1} = & \{W_{2}(x), W_{1}(x), R_{3}(x), R_{1}(x), W_{2}(y), R_{3}(y), R_{3}(z), R_{2}(x)\} \\     H_{2} = & \{R_{3}(z), R_{3}(y), W_{2}(y), R_{2}(z), W_{1}(x), R_{3}(x), W_{2}(x), R_{1}(x)\} \\     H_{3} = & \{R_{3}(z), W_{2}(x), W_{2}(y), R_{1}(x), R_{3}(x), R_{2}(z), R_{3}(y), W_{1}(x)\} \\     H_{4} = & \{R_{2}(z), W_{2}(x), W_{2}(y), W_{1}(x), R_{1}(x), R_{3}(x), R_{3}(z), R_{3}(y)\}     \end{align*}          \begin{parts}     \part Which of the above histories are conflict equivalent and why?     \part Which of the above histories are serializable and why?     \end{parts}     \end{questions}     \end{document}


title: Eat double space

text: How can I get a command to eat an unnecessary space, consider the below:               \documentclass{article}     \newcommand{\mycommand}[1]{#1}     \begin{document}              %Creates single spaces         Discussed \mycommand{before} in section 1              %Creaetes a double space         Discussed \mycommand{} in section 3          \end{document}      I have a more complicated command elsewhere, sometimes the result is 'empty' in which case a double space is created (which I don't want), the above is in effect what is happening. I need some logic that detects if the argument is empty, and if so, eats one of the spaces.


title: Multi-line options with the `\usepackage` command

text: When including a package using the `\usepackage` command that has a lot of options, are there:   1. Any restrictions on how the options can be split across multiple lines?   2. Any best practices for formatting the options across multiple lines? ### Examples               % Example #1     \usepackage[letterpaper,                 left=1in,                 right=1in,                 top=1.5in,                 headheight=1in,                 headsep=.3in     ]{geometry}          % Example #2     \usepackage[letterpaper,                 left=1in,                 right=1in,                 top=1.5in,                 headheight=1in,                 headsep=.3in]     {geometry}


title: Unnumbered theorem-like environments using thmtools

text: This produces an error (`\\* already defined`):               \documentclass{report}     \usepackage{thmtools}     \declaretheorem[numbered=no]{theorem}     \begin{document}          Nothing.     \end{document}      Adding package `amsthm` solves the problem:               \documentclass{report}     \usepackage{amsthm}     \usepackage{thmtools}     \declaretheorem[numbered=no]{theorem}     \begin{document}          Nothing.     \end{document}      But what should I do if I would like to define my own `proof` environment (without changing my existing LaTeX code)? This produces an error (`\proof already defined`):               \documentclass{report}     \usepackage{amsthm}     \usepackage{thmtools}     \declaretheorem[numbered=no]{proof}     \begin{document}          Nothing.     \end{document}      I could use package `ntheorem` as the backend of package `thmtools`, but the documentation of `thmtools` says that some features do not work with `ntheorem`.


title: Separation by semicolon instead of comma in biblatex' \cites

text: I am using `biblatex`+`biber` for the bibliography of my thesis. I use the `numeric-comp` citation style. Overall this works perfectly. I generally use `\cite` to cite references; but occassionally also `\cites`, namely when I want to cite references in a specific (non-numeric) order, or when I want to specify page numbers for some (but not all) cited references using postnotes (i.e. between `[]`). My question is about the latter usage of `\cites`, for example:               \cites[pp.173--199]{SomeBook}{SomePaper} Which produces (10=SomeBook; 20=SomePaper):               [10, pp.173–199, 20] I find the commas slightly confusing here. Therefore I was wondering if it is possible to somehow tell `biblatex` to use another separator, say a semicolon. So that I would get:               [10, pp.173–199; 20] However, I do _not_ want to replace commas with semicolons everywhere, only in this specific case. So all uses of `\cite`, and uses of `\cites` without postnotes, should still use commas. If necessary I would be ok with a solution based on a separate command for the specific case. For example a `\semicites` command that uses a differently configured `\cites` internally. **EDIT 2** I changed my mind and went with a solution based on Marco's answer.


title: Latex command for unfilled \bigstar

text: `\bigstar` produces a black star. What is the LaTeX command for white or unfilled `\bigstar`? The `unicode-math` package has a command `\bigwhitestar`, but I am not able to use it in the usual way. When I compile with `\usepackage{unicode-math}`, I get the following error:               ! Package unicode-math Error: Cannot be run with pdfLaTex!     (unicode-math)         Use XeLaTeX or LuaLaTex instead.      PS: I need the big white star symbol to reference a point in a Matlab generated figure. I cannot compile with xetex or xelatex because they do not use the conference style file properly, i.e. the output looks quite different from that of latex.


title: Create landscape image page in pdf, without breaking text flow

text: Here is an MWE. If you compile this to PDF, you get a half-empty page on the first page, as the last part of the text doesn't come up, but is forced onto a new page. Compare this with the same thing, but with the `\begin{landscape}` removed.               \documentclass[11pt,a4paper,twoside,openright]{book}     \usepackage{graphicx}     \usepackage{pdflscape}          \begin{document}          \chapter{blah}          blah blah          \section{something}     \begin{landscape}     \begin{figure}[p!]       \includegraphics{figures/someimage.pdf}     \end{figure}     \end{landscape}               A whole lot more text.          \end{document}      Thing is, I really need a full page landscape for this particular figure, because it has so much detail. Is there a way to do this that doesn't break the text flow so badly? (perhaps using another package? the `pdflscape` documentation is horrendous - 14 pages, and only two lines dedicated to usage.)


title: Numbering of head title on titlepage?

text: I want to combine several independent papers in a pdf-format. However, due to time constraints, I am looking for a "quick and dirty" solution. Therefore, I manually constructed a table of contents and adjusted the page numbers on my papers with the command `\setcounter`. In order to be consistent with the table of contents, the head titles of each paper need to be numbered. Unfortunately, this cannot be done with the command `\setcounter`. Do you know any sort of command that does this? Moreover, is there a possibility to left align the head title of each paper (incl. the numbering)? The following example should help understanding my problem.               \documentclass[a4paper]{article}     \oddsidemargin 0cm      \textwidth 16cm          \usepackage[bottom,flushmargin,hang]{footmisc}     \usepackage{fancyhdr}     \usepackage{array}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} %für Tabellen     \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} %für Tabellen     \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} %für Tabellen          \pagestyle{fancy}     \fancyhead{}          \begin{document}          \title{\textbf{Title (should be numbered and left-aligned).}}          \author{Author information should be in this format.}                    \date{}          \maketitle     \thispagestyle{empty}          \begin{center}          \begin{abstract}     Abstract here     \end{abstract}     \end{center}          \end{document}


title: Natbib puts reference data one line per item

text: I'm using:               \documentclass[oneside,article,openbib,12pt,titlepage]{memoir}     \usepackage[authoryear,round]{natbib} % Better bibliography support     \bibpunct{(}{)}{,}{a}{,}{,}      in the preamble of my document and               \backmatter     \renewcommand{\bibname}{References}     \bibliographystyle{chicago}        \bibliography{listb,mybib}      in the body of the file. But a typical formatted reference is: > Freely, I. (1997).   >  A small paper.   >  The journal of small papers -1. to appear. I've tried other non-`natbib` styles (e.g., `regstud`), and the reference flows and wraps as it should. So how does one get `natbib` to do the same? Also, how does one get `natbib` to include the authors' entire first names?


title: Applying a style globally (example in fancyhdr - across page styles)

text: Imagine I wanted to make **all** footers, pagestyles, etc. in bold. There's nothing like a `\globalpagestyle` or something, so my take on the problem was something like this:               \documentclass{article}     \usepackage[a6paper]{geometry}     \usepackage{fancyhdr}%     \let\Rfoot\rfoot%     \renewcommand\rfoot[1]{\textbf{\Rfoot{#1}}}%     \rfoot{I want to be bold! All the time}%     \begin{document}     \thispagestyle{plain}     Footer up your ass     \newpage     \pagestyle{plain}     Cookie     \end{document}      ...but I suspect I've been somewhat clumsy here. How to apply a style (be it bold series, be it a box, be it some weird tikzpicture background, etc.) to every future footer? I'm looking for a solution that involves the use of the `\textbf` command so that this solution can be applied to different styles as well (imagine you want a box around everything, etc.)


title: using [] in the caption of the subfigure

text: The `subfigure` caption uses []. Because of that, I am unable to use [] in its caption.               \subfigure[ This [] is important]      How do I use the brackets in the caption of the subfigure?


title: pgfplot: plotting a large dataset

text: I try to plot a dataset which is large using `pgfplots`. Since I'm aware of problems with large files, I used the external mode. I additionally increased `main_memory` from `3000000` to `6000000`. It crashes nevertheless, saying that `pdflatex` exceeded main memory. But if I look at the memory consumption of my system during compilation, I can't see any increase in memory usage. I couldn't find any explanation what `main_memory` takes, is it byte or Kbyte? If I increase it at a larger value, `fmtutil-sys --all` will fail and `pdflatex` won't work anymore. Can I get around this somehow?               \documentclass{article}          \usepackage{pgfplots}     \usepackage{pgfplotstable}          \usepgfplotslibrary{external}      \tikzexternalize          \begin{document}          \begin{tikzpicture}       \begin{axis}         \addplot table[x expr=\coordindex, y index=0] {largefile};       \end{axis}     \end{tikzpicture}          \end{document}      I also tried to compile with `lualatex` (just replaced `pdflatex` with `lualatex`) but this also seems to call `pdflatex`? At least I got this error message (same for `lualatex` and `pdflatex`):               ! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error -interact     ion=batchmode -jobname "report-figure0" "\def\tikzexternalrealjob{report}\input     {report}"' did NOT result in a usable output file 'report-figure0' (expected on     e of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls.      For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'wri     te 18' or something like that. Or maybe the command simply failed? Error messag     es can be found in 'report-figure0.log'. If you continue now, I'll try to types     et the picture.      Excerpt from `report-figure0.log`:               ! TeX capacity exceeded, sorry [main memory size=6000000].     \pgfplotsapplistXXpushback@smallbufoverfl ...toka                                                        \the \t@pgfplots@tokb \the...     l.13 ... expr=\coordindex, y index=0] {largefile};                                                       ^^M       `largefile` is 5.7 Mb is size and has 593932 datapoints. I barely dare to say that I also have a file of 163 Mb in size with 18928305 datapoints. I thought this is no problem because gnuplot can handle those files fast without problems. head of `largefile`:               9409252     17298051     21351017     24466010     26952485     29389696     31442872     33345635     35029538     36710432      Please find the dataset here. I'm using texlive2012:               $ pdflatex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)      restricted \write18 enabled          $ lualatex     This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012)      restricted \write18 enabled.


title: Cross-referencing within text

text: Is there a way to reference a place in the text using `\hyperref`, instead of using `\nameref` to reference the section that portion of text belongs to? Probably a WME will help in getting my point across:               \documentclass[onecolumn,twoside]{revtex4}          \usepackage{xpatch}% http://ctan.org/pkg/xpatch     \makeatletter     \xpatchcmd{\@ssect@ltx}{\@xsect}{\protected@edef\@currentlabelname{#8}\@xsect}{}{}%    Patch \<section>*     \xpatchcmd{\@sect@ltx}{\@xsect}{\protected@edef\@currentlabelname{#8}\@xsect}{}{}% Patch \<section>     \makeatother     \usepackage{hyperref}% http://ctan.org/pkg/hyperref          hypersetup{pdfstartview=FitH,pdfpagemode=UseNone}          \begin{document}          \title{Title}     \author{Author}     \affiliation{Affiliation}          \maketitle          \section*{FirstSection--$E \times H$ vs.$\ \textbf{E} \times \textbf{H}$}      text text text text text text text text text text text text text text text text text   text text text text text text text text text text text text text text text text   text text text text text text text text text text text text text text text text text text   text text text text text text text text text text text text text text text text   text text text text      \bf I want to return here, not at the beginning of FirstSection \rm    \label{sec:marker1} \nameref{sec:marker2}     text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text           \section*{SecondSection} \label{sec:marker2}     You can also see in \nameref{sec:marker1} that \ldots     \end{document}


title: How do I enumerate the items in beamer table of contents

text: I'm inserting a `\tableofcontents` slide in my beamer presentation. The trouble is that I have everything in `itemize` environment throughout my presentation. (Gives a better view to the audience.) The Table of Contents, however appears without the itemization/enumeration. Can the entries in `tableofcontents` be itemized? I can't find an option in `beamer` manual or online to this effect. Here's my current table of contents:               \begin{frame}<beamer>       \frametitle{Outline}       \tableofcontents[section,subsection]     \end{frame}      p.s. I'm also using the `\AtBeginSection` overlays so those have to change as well.


title: Labeling several out/incoming lines collectively in Feynmp?

text: Suppose I have two outgoing lines in Feynmp, o1 and o2. I know how to label each and one of them. But suppose I want to draw a huge curly bracket going from o1 to o2 and then label that bracket. Is it possible doing this with only Feynmp, or do I need to go Tikz on this? Example (taken from page 28):               \begin{fmfgraph}(40,25)     \fmfpen{thick}     \fmfleft{ip,il}     \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}     \fmf{fermion,tension=2}{ip,vp}     \fmf{fermion}{vp,vq,oq3}     \fmf{fermion}{vp,oq1}     \fmf{fermion}{vp,oq2}     \fmf{photon}{vl,vq}     \fmf{fermion,tension=2}{il,vl}     \fmf{fermion}{vl,ol}     \fmfblob{.15w}{vp}     \fmfdot{vq,vl}     \fmffreeze     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}     \end{fmfgraph}      Suppose I want to label the outgoing/incoming lines collectively, how would one go about in `feynmp`? Or do I have to use `tikz`?


title: TeXLive 2011 and pdf graphics problem?

text: A friend of mine updated TexLive from 2009 version to 2011 version over the weekend. Now he is having problems with pdf graphics files. The following is what he said. > I am having trouble with compiling my source files in TEX. Is there any way > I can go back to the 2009 version? > > All my files include graphics which were all imported as .pdf files. But in > the updated version, it wants me to import them as .eps or .ps Of course I > could have done that from the beginning, but the older version asked for > .pdf and that was what I did. Is this possible? That is, Does TeXLive 2011 not backward compatible? I would like to pick your brains before calling him. He does have a lot of TeX documents and converting all graphics would be a nightmare for him. In the worst case scenario, how could he disable TeXLive 2011 so he could go back to TeXLive 2009? His operating system is OS X 10.6.


title: How to use the aux file

text: This is not a terribly well-formed question, sorry. I don't really know what information is in the .aux file, or how I can make use of it in other (related) documents. What's the best reference for understanding how this works? One common thing I would like to be able to do is the following: I have a book that contains lots of `\label`s. I would like to be able to reference those labels from the solutions manual, which is separately created (as a .tex file) and generated (as a PDF).


title: Meaning of fontspec related error

text: I've edited a document. The edited document works well on my system, but apparently reports this error on another system:               Undefined control sequence.     <argument> ...ontspec_tmp_int\endcsname 255*\real{0.5}\relax      What is this error about? The error appears when calling `\maketitle` which has been redefined to (not my doing):               \def\maketitle{       \thispagestyle{empty}         \vfill       \begin{raggedright}       \leavevmode         \vskip 1cm         {\fontsize{50}{60}\fontspec[Color=red,Opacity=0.5]{Adobe Garamond Pro}\textbf{\@title}\par}         \vskip 1cm         \normalfont         {\Huge {\textit{\@author}\par}}       \vfill             {\Large Name}         \newline               {\Large \href{mailto:name@name.edu}{name@name.edu}}             \newline               {\Large \href{http://name.com}{http://name.com}}             \newline         {\Large \@date\par}        \end{raggedright}       \null       \cleardoublepage     }


title: What's the best way to arrange LaTeX documents?

text: I am very new to LaTeX. First question I have is can latex do this?   1. I have ~1000 verses    2. Each verse has its meaning in English and Sanskrit.    3. three authors commentaries on each verse.  When I finish typing, I want to be able to generate following pdfs.   1. Only verses as a pdf   2. Verses with english meaning as pdf   3. Verses with Sanskrit meaning as pdf    4. Verses with Meaning & commentaries as a pdf.  If LaTeX can do this then, please tell me how should I arrange my documents to avoid lot of copy pasting later. ![enter image description here](http://i.stack.imgur.com/wP2jQ.jpg)


title: Template for Software Release Notes

text: Is there a good template for software release notes? I typically cover new features, bug fixes, and enhancements. I'm currently using HTML but its ugly and not easy to distribute. Ultimately, I'd like to produce a single PDF.


title: Square with a diamond in it

text: In math mode, I'm trying to make a square with a diamond in it. My failed attempt has been to put the following in the preamble:               \newcommand{\sqdiamond}{\mathbin{\rlap{$\mspace{2mu}\diamond$}\hbox{$\square$}}}      However, the diamond symbol is not scaled properly relative to the square. I'd like the corners of the diamond to touch the midpoints of the sides of the square, and I can't figure out how to "scale" the diamond appropriately. Is there another way to do this?


title: Use \def without including the square bracktes with pgfplot?

text: I would like to define a line style to use in my pictures. But would still like to retain the flexibility to be able to tweak these if needed in the actual picture, as in the third picture (commented out) below. But can't seem to get this to work. I believe it has something to do with the fact that the `\def`s have a comma separated list in them, but then again the second picture has no problems.. Any ideas?               \documentclass{article}     \usepackage{pgfplots}          \def\LineStyleWithSqBrackets{[green, thick]}     \def\LineStyleWithoutSqBrackets{green, thick}          \begin{document}          \begin{tikzpicture}[scale=0.3]         \draw [green, thick] (0,0) circle (7);     \end{tikzpicture}          \begin{tikzpicture}[scale=0.3]         \draw \LineStyleWithSqBrackets   (0,0) circle (7);     \end{tikzpicture}          %\begin{tikzpicture}[scale=0.3]     %   \draw [\LineStyleWithoutSqBrackets]   (0,0) circle (7);     %\end{tikzpicture}     \end{document}


title: TikZ: Labeled point

text: I'm currently doing:               \node [label=below:crimson]     (crimson) at (0.1,-0.9)   {};      \draw [fill=black] (crimson) circle (1pt);      Is there a way of doing this in one command?


title: Is it possible to embed a YouTube video using LaTeX?

text: I'd like to embed a YouTube video inside a PDF generated by LaTeX, now I know it is possible to embed videos using the `movie15` package but that includes the video in the PDF. I was hoping there would be some way to embed the video as a flash object that streams it from YouTube when you get to the slide. Anyone managed to do it before?


title: difficulty creating PDF of Wikipedia page via LaTeX using Pandoc

text: I have a problem converting a Wikipedia page to a PDF using Pandoc. Pandoc attempts to convert web pages to PDF format via LaTeX and the problem I am having appears to be with LaTeX, which is why I ask the question here. Here is what I am attempting to do:               pandoc -s --latex-engine=xelatex -r html http://en.wikipedia.org/wiki/Wikipedia_talk:Manual_of_Style/Dates_and_numbers/Archive_142 -o archive_142.pdf      Some prerequisites I have set up on Ubuntu are as follows:               sudo apt-get -y install texlive-latex-recommended texlive-fonts-recommended texlive-xetex texlive-latex-extra      The terminal output when I attempt to do this is as follows:               pandoc: Could not find image `//upload.wikimedia.org/wikipedia/en/thumb/2/2a/Replacement_filing_cabinet.svg/40px-Replacement_filing_cabinet.svg.png', skipping...     pandoc: Could not find image `//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Symbol_confirmed.svg/20px-Symbol_confirmed.svg.png', skipping...     pandoc: Could not find image `//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Symbol_confirmed.svg/20px-Symbol_confirmed.svg.png', skipping...     pandoc: Could not find image `//en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1', skipping...     pandoc: Could not find image `//bits.wikimedia.org/images/wikimedia-button.png', skipping...     pandoc: Could not find image `//bits.wikimedia.org/static-1.24wmf2/skins/common/images/poweredby_mediawiki_88x31.png', skipping...     pandoc: Error producing PDF from TeX source.     ! Unable to load picture or PDF file '//upload.wikimedia.org/wikipedia/en/thumb     /2/2a/Replacement_filing_cabinet.svg/40px-Replacement_filing_cabinet.svg.png'.     <to be read again>                         }     l.92 ...g/40px-Replacement_filing_cabinet.svg.png}      The desired PDF file is not produced. Would you happen to have any idea on how to approach this problem?


title: Avoiding multiple label-refs in simply-formatted documents

text: I want to build a file with a number of math problems and solutions, like: > Problems > >   1. ... > >   2. ... > > > > ... > > Solutions > >   1. ... > >   2. ... > > > > ... I want to link back and forth between problems and the corresponding solutions, and vice-versa. In particular, it would be nice to be able to click on the problem number (1., 2., ...) and have it jump to the corresponding solution, and vice-versa. Is there a way to do this without having to repeatedly type label-ref for every problem and solution?


title: Create my own templates with include files, how to create directory structure?

text: I want to have a directory called "Templates" where I would like to have .tex files and image files for inclusion. An example template would setup a letter format with watermark, fancy header, language settings, font selection etc. I want to have my templates at one place, and have all other documents at another location. For example:               Documents        |        |-  Templates        |     |        |     |-- letter_header.tex        |     |-- company_watermark.png        |        |- Contracts        |     |        |     |-- Company 01        |     |     |        |     |     |-- contract01.tex        |     |     |-- contract02.tex        |     |     |-- contract03.tex      Here is my problem. From contract01.tex I would like to do something like this:               \include{../../Templates/letter_header.txt}      However, this won't work because LateX cannot write aux files in that directory. Under Microsoft Windows, there is no symbolic link that could be used. I understand that it is a security risk to allow latex to write into any directory ( (How) can I include the file somedir/file.tex in the file somedir/subdir/anotherfile.tex ). So what is the safe way? Can I specify that under "Documents" it should be able to write to any directory? Most important question: there must be thousands using LateX with their own templates, and they probably want to separate template code from actual content. Are all of them forced to use clumsy / unsafe solutions? UPDATE: Uploaded an example here: https://www.dropbox.com/s/15dxnu48wdqp897/SyncedFolder.zip What I want is to be able to use my businessletter class from test01.tex, test02.tex, test03.text or from any folder under SyncedFolder/Documents. The watermark.jpg file belongs to the businessletter class, and so it should be loaded from the class file. results of setting TEXINPUT: ![enter image description here](http://i.stack.imgur.com/U0ziD.png)


title: Why the small cap command is ignored?

text: I have a thesis front page. Would like to write the surnames with small caps. But it doesn't work. See here (the packages are required):               \documentclass[12pt,a4paper,draft]{article}     \usepackage{url}      \begin{document}     \thispagestyle{empty}     \setlength{\oddsidemargin}{53pt}     \setlength{\evensidemargin}{53pt}     \setlength{\marginparwidth}{57pt}     \setlength{\footskip}{30pt}          {\large \textbf{Albert E\textsc{instein}}}\\[0.2cm]     \end{document}      Font sample: ![enter image description here](http://i.stack.imgur.com/c1wul.png) Used Thesis Template: Easy Thesis


title: Undefined control sequence \coloneqq

text: I'm trying to export a PDF of a LyX document (it has never caused a problem before). Below I have posted pictures of the error message along with the equation LyX highlighted for me. I don't know what `\hbox` is, and I didn't use that in my code. Can someone please help me edit the equation so that I can export a PDF? ![enter image description here](http://i.stack.imgur.com/IDRQl.jpg) ![enter image description here](http://i.stack.imgur.com/do3X1.jpg)


title: Trying to understand Memoir page layout

text: I'm trying to figure out how to set up custom page layout in memoir. below is a page I set up in InDesign and transferred the dimensions into a minimal memoir document. I just can't figure out why it's not working.               \documentclass{memoir}           \setstocksize{477pt}{315pt}     \settrimmedsize{477pt}{315pt}{*}     \settrims{0pt}{0pt}     \settypeblocksize{420pt}{252pt}     \setlrmargins{39pt}{24pt}     \setulmargins{30pt}{27pt}     \setheadfoot{10pt}{10pt}     \setheaderspaces{20pt}{10pt}          \checkandfixthelayout     \usepackage{lipsum}          \begin{document}     \lipsum          \end{document}      here are the error messages:               ./memtest:7: LaTeX Error: Missing \begin{document}. [\setlrmargins{3]     ./memtest:9: Class memoir Error: The combination of argument values is ambiguous. [\setheadfoot]     ./memtest:11: Paragraph ended before \setfillsize was complete. []     ./memtest:11: Too many }'s. []     ./memtest:13: Class memoir Error: \spinemargin (109.26999pt) and/or \textwidth (252.0pt) and/or \foremargin (164.02501pt) are too >large for \paperwidth (315.0pt) by 210.295pt. [\usepackage]>     ./memtest:13: Class memoir Error: \headheight (420.0pt) and>/or \headsep (0.0pt) are too large for \uppermargin (0.0pt) by 420.0pt.> [>\usepackage]>          [Done!]


title: R figure to LaTeX - cloudy and diffuse text

text: I am a newbie to R and LaTeX, and cannot find any hint for my problem. Perhaps it is a silly question, but I tried to get a R-diagram into my LaTeX document without the axes out of focus. So far so good, in R I used the following notation:               BoxPDT<-ggplot(dat,aes(Anforderung,Beanspruchung,fill=Anforderung))+geom_boxplot()+facet_grid(.~Lauf)+theme(axis.text.x=element_text(angle=90,size=16,vjust=0.5),axis.title=element_text(size=20,vjust=0.5),axis.text.y=element_text(size=16,vjust=0.5),legend.position="none")+     theme(axis.text=element_text(family="mono",face="bold"))     dev.copy(jpeg, "C:/Users/name/Documents/D/AStlich/Latex/Bilder/BoxPDT.jpeg")      Then I put it in LaTeX via `\begin{figure} \begin{center} \includegraphics[width=0.75\textwidth]{C:/Users/name/Documents/D/A/S/Latex/Bilder/BoxPDT} \label{fig:BoxPDT} \caption{Boxplot der NASA TLX Auswertung über die einzelnen Parametrierungsschritte (1-3). Wobei 1 für ..., 2 für... und 3 für ... steht.} \end{center} \end{figure} \end{figure}` but all I get is a cloudy and diffuse picture. Strictly speaking just the axes are cloudy and diffuse. ![That is, what my latex editor shows after including the figure.](http://i.stack.imgur.com/S866O.jpg) As you can see, the text of the figure is much cloudy as the text of the written text beneath. Moreover, the distance between axes text and axes titles is very small. I would apprciate for some hints and please excuse my bumpy English.


title: Typeset d'Alembertian operator in 'classicthesis'

text: What are the proper latex inputs for typesetting the bare d'Alembertian operator, and the d'Alembertian operator with either a tilde or a hat or a bar on top in a document prepared using classicthesis documentclass? I understand that the package eulervm is used in classicthesis.


title: How to create a figure with math content

text: What's wrong with the following figure in the text? First, it says "amsmath: Unable to redefine math accent \vec." and then "Undefined control sequence" but neither is any helpful to me. It uses LLNCS (Lecture Notes for Computer Science), see http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0               \documentclass{llncs}     \usepackage{amsmath}     \title{Aussagenlogik}     \author{someone}     \institute{somewhere}          \begin{document}          \maketitle          \section{Einleitung}     \paragraph{...}          \section{Definition einer Aussage}     \paragraph{...     }          $\[X sei eine Aussage. Dann ist der Wahrheitswert W(X) wie folgt definiert:\\     W(A) = \begin{cases} wahr, \mbox{wenn X zutrifft}\\ falsch, \mbox{wenn X nicht zutrifft}     \end{cases}     \cite{Sie}\]$          \begin{thebibliography}{999}       \bibitem {Sie} Bla Bla     \end{thebibliography}          \end{document}


title: Removing brackets from biblatex references for lncs

text: I want BibLaTeX bibliography without square brackets, but without putting things all on one line, because that's what lncs requires. That is, I have               \documentclass{article}          \usepackage{biblatex}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }          @misc{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},     }          @misc{C03,       author = {Cuthor, C.},       year = {2003},       title = {Charlie},     }     \end{filecontents}          \bibliography{\jobname}          \begin{document}          \nocite{*}          \printbibliography          \end{document}      And I want the same bibliography (multiple lines), just without the square brackets.


title: Control order of columns in table

text: Is there maybe a way to define the order of columns oneself? Say I have               \begin{tabular}{ l l l }       A1 & C1 & B1 \\       A2 & C2 & B2 \\       A3 & C3 & B3 \\     \end{tabular}      but really want               \begin{tabular}{ l l l }       A1 & B1 & C1 \\       A2 & B2 & C2 \\       A3 & B3 & C3 \\     \end{tabular}      and would like to avoid having to move all the content.


title: Algorithm counter is broken with journal style file

text: With the style file gSCS2e.cls, found at http://www.tandf.co.uk/journals/authors/gscslatex.zip as well as the algorithm package, if I compile the following LaTeX document, the Algorithm counter seems to be broken. It is stuck at 1 and does not increment. Specifically, the final words in my example document are "This is Algorithm 1" repeated twice. The Algorithm counter increments within a section, however. I get the expected results with other style files, so there is probably something wrong with the style file. I was not successful in obtaining a solution from the journal. I am sure this is well beyond my knowledge, hence I'm asking for help here. The journal proofs do not show this problem. I initially thought they had fixed the problem in a more recent version of the class file, but after repeated requests and much confusion, I think it is possible that someone hand-edited the output. At any rate, I have never seen a version of this class file more recent than the version I have been using all along, namely, 2.4 ("First released 2008/05/02"). Unfortunately this is a real problem for me because I cannot circulate preprints with this brokenness.               \documentclass{gSCS2e}     \usepackage{algorithm, algpseudocode}     \begin{document}     \title{Title}     \maketitle          \section{First section}     \begin{algorithm}     \caption{First algorithm}     \label{first}     \begin{algorithmic}[1]     \State some stuff     \end{algorithmic}     \end{algorithm}          \section{Second section}     \begin{algorithm}     \caption{Second algorithm}     \label{second}     \begin{algorithmic}[1]     \State some more stuff     \end{algorithmic}     \end{algorithm}          This is Algorithm~\ref{first}. This is Algorithm~\ref{second}.     \end{document}


title: fncychap and hyperref messes up page references

text: When using `fncychap` and `hyperref` together, the page number for references to the appendices are off. The Appendix A reference links to the first chapter, appendix B links to the second chapter, etc...               \documentclass{report}     \usepackage[]{hyperref}     \usepackage{fncychap}          \begin{document}     \pagestyle{plain}     \tableofcontents          \chapter{One} \label{one}     This refers to the page for chapter 1: \autoref{appendix}.     The table of contents is also off.          \appendix     \chapter{Two} \label{appendix}     This is the appendix          \end{document}      This creates a document where the references in the table of contents link appendix A to the wrong page number (page 2 instead of page 3).


title: Text positiong in cell (tabular)

text: I'm using the `beamer` class and this code:               \begin{tabular}{|c|l|}\hline     \includegraphics[scale=0.4]{2_1} &  hey ho \\ \hline      s & ho  hey \\ \hline     \end{tabular}      and I get this output: ![tabular_image](http://i.stack.imgur.com/yTy3J.png) How can I make the "hey ho" text stay on top of it's cell? I'd like for it to stay attached to the top horizontal line, not the bottom one. I tried substituting it with `\vtop{\hbox{hey ho}}` (only hint I could google up) but the result is the same.


title: TikZ: inverted cone (similar to linked thread but different issue)

text: How to draw a simple cone with height and radius with TikZ? In the above thread, a cone was created. However, if I invert the cone, the lines from the origin to the cone edges cuts through the cone. This is not visually pleasing. How can I get the line to only intersect the `(\pm 2, 3)` without going through ellipse opening?               \documentclass[tikz]{standalone}     \usetikzlibrary{calc}     \usetikzlibrary{intersections}     \usetikzlibrary{shadings}          \begin{document}     \begin{tikzpicture}       \coordinate (h) at (0, 3);       \coordinate (O) at (0, 0);            \draw (O) -- +(0, 4);       \draw (O) -- +(3, 0);       \draw (O) -- +(-3, 0);            \fill[       top color = gray!50,       bottom color = gray!10,       shading = axis,       opacity = 0.25       ]       (h) ellipse[x radius = 2, y radius = 0.5];       \fill[       left color = gray!50!black,       right color = gray!50!black,       middle color = gray!50,       shading = axis,       opacity = 0.25       ]       (2, 3) -- (O) -- (-2, 3) arc[x radius = 2, y radius = .5, start angle = 180,       end angle = 360];            \draw (-2, 3) arc[x radius = 2, y radius = .5, start angle = 180,       end angle = 360] -- (O) -- cycle;       \draw[dashed] (-2, 3) arc[x radius = 2, y radius = .5, start angle = 180,       end angle = 0];     \end{tikzpicture}      \end{document}      ![enter image description here](http://i.stack.imgur.com/Y3cG3.png)


title: How to put resized arrow tips at both ends of a dashed line?

text: I know how to put a resized arrow tip at one end of a dashed line, but not at both ends. See the image below.               \documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article}     \usepackage[top=1cm,right=1cm,bottom=1cm,left=1.5cm,noheadfoot]{geometry}     \usepackage{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings,patterns,calc}          \begin{document}          {\begin{tikzpicture}[>=angle 60]          \draw[<->,line width=0.15mm,dashed,dash pattern=on 1mm off 0.5mm] (0,0.5)--(5,0.5) node[right] {Default arrows are too small};          \draw[line width=0.15mm,dashed,dash pattern=on 1mm off 0.5mm,decoration={markings,mark=at position 1 with {\arrow[line width=0.1mm,scale=1.5]{>}}},postaction={decorate}] (0,0)--(5,0) node[right] {How to put arrows like this at both ends ?};          \end{tikzpicture}          \end{document}      ![](http://i.stack.imgur.com/KKjTR.jpg)


title: tikzrput : undefined control sequence \rput

text: I am having some weird trouble with the `tikzrput` package. I use it on my Macbook with TeX Live and it works perfectly. On the other hand on my Ubuntu at work (with TeX Live too) it really does not want to work. Every `\rput` line gives me after compilation something like:               Undefined control sequence \rput{0}(0,3.5){$\lambda$}      I fear it is not a problem of integrating `tikzrput.sty` because when I remove it, the error turns into only:               Undefined control sequence \rput      Without those `\rput` lines, everything works fine (TikZ is well installed along with `pgf` on my Ubuntu). Could this be a problem of compatibility between `tikzrput` and my TikZ version? (everything is upgraded to the last version).


title: Figure filled with longtable

text: I am currently creating a `figure` which is filled by `longtable` inside, why I do this is because I need the caption to be **figure** , while on the other hand, I need the `table` environment. The thing is, the reason I use `longtable` is I will create a big table, but putting it inside a `figure` has made it unseparated. Is there a way to do this actually? So what I already have are: 1.               \begin{longtable}{ccccc}     % Long content     \end{longtable}      This is ok, but I dont have the `Figure` caption (if it's possible to put this caption somewhere, maybe this will be an easier solution) 2.               \begin{figure}       \begin{longtable}{ccccc}       % Long content       \end{longtable}     \end{figure}      With this, I will have the caption, but the table will always be in a page (they don't want to be separated).


title: The algorithms' captions appear in the list of abbreviations

text: I have a problem with the list of abbreviations. The problem is that the algorithms' captions appear in the list of abbreviations! I use the `loabbrv` package for the abbreviations, and by the command `\listofabbreviations` I generate the list of abbreviations. Inside my document, I have some algorithms written using the packages `algorithm` and `algorithmicx`. When the list of abbreviations is generated the algorithms' captions appear just in the middle of the abbreviations list! I really appreciate your help for avoiding this problem. Thanks a lot


title: Wrong display when I have more than 9 chapters in ToC

text: I'm in a really bad situation with my ToC in the book that I write. Everything is fine until the 9th chapter. There's the "9", some space and then the name of the chapter. But on the 10th (or more) chapter, the "1" of the "10" is under the "9". So the "0" of the "10" is where there should be a space. As a result, there is no space between the number of the chapter and the name of the chapter. I expected that LaTeX would deal with it as it does with the bibliography entries. It leaves some space empty on the start of one digit numbers so they will be all aligned at the end. (For example, when we have [9] and [10], the 0 is under the 9) Let me show you my preamble as well               \documentclass[12pt,a4paper]{book}     \usepackage[english, greek]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{kerkis}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{units}     \usepackage{array}     \usepackage{framed}     \usepackage{extarrows}     \usepackage[makeroom,Smaller]{cancel}     \usepackage[pdftex]{graphicx}     \usepackage[top=3.2cm, bottom=2.8cm, left=2.9cm, right=2.9cm,headsep=9mm]{geometry}     \usepackage[Bjornstrup]{fncychap}     \usepackage{fancybox}     \usepackage{fancyhdr}     \usepackage{colortbl}     \usepackage{xcolor}     \usepackage{footmisc}     \usepackage{subfiles}     \usepackage{float}     \usepackage{slashbox}     \usepackage[official]{eurosym}          (Here there are some commands but they've got nothing to do with that)          \begin {document}     \frontmatter     \tableofcontents     \newpage     \thispagestyle{empty}     \mbox{}     \newpage               \mainmatter     .     .     .


title: font size in math mode

text: $\sum\limits_{\substack{locations \\ L_j}}$      The word _locations_ is quite long - longer than the summation symbol Sigma. I would like to control the size of _only_ the word _locations_ , but I am having trouble   1. `$\sum\limits_{\substack{ locations \\\ L_j}}$` has no effect on the size of _locations_.   2. `\fontsize{0.5cm}{1pt}\selectfont $\sum\limits_{\substack{locations \\\ L_j}}$` makes the summation symbol sigma smaller but not *locations   3. inserting `\tiny`, `\scriptsize` etc has no discernable affect. Nor does `\text{\tiny locations}`, etc.


title: How would one achieve superscript references with the multibbl package?

text: I am using multibbl to manage separate bibliographies, and prefer to use superscript citations. However, multibbl clashes with cite (a little) and other packages: natbib biblatex (much worse).               \documentclass{book}          % Bibliography     \usepackage[superscript,biblabel]{cite}     % Citation management     \usepackage{multibbl}          \newbibliography{lit}     \newbibliography{gen}          \begin{document}          Some point.\cite{lit}{pem1976}          \nocite{gen}{ha}{*}          \bibliographystyle{lit}{plain}     \bibliography{lit}{ch4biblit}{Literature}          \bibliographystyle{gen}{plain}     \bibliography{gen}{ch4bibgen}{General}          \end{document}      In this example, cite prevents citations from being passed to the lit.aux file. Funny enough, \nocite works fine. When the cite package is commented out, citations pass correctly to the aux, but the formatting is obviously lost. What is the easiest solution?


title: Regarding groupnotation and spacing

text: (G, *) is certainly an acceptable notation for a group. However, I prefer the notation ![enter image description here](http://i.stack.imgur.com/XQw8t.gif). As you can see, the distance between the letters and brackets are uncomfortably long. Is there a way to shorten the distance?


title: Problem with latex box

text: I defined a new command in order to create an empty box with a title. The code is the following:                 \newcommand{\mybox}[2]{     \textbf{\emph{#1}}     \vspace{2mm}     {\centering\fbox{             \begin{minipage}{\textwidth}                 \hfill\vspace{#2}             \end{minipage}     }   }     }      The problem is that when I used this exact same code without the new command I defined, the output was what I expected - a bold italic title and below that, an empty box. However, when I use it with the new command, fox example `\mybox{Title}{1in}` the box is next to the title! It is very confusing! I would appreciate your help, thank you very much in advance!


title: \includegraphics and \includepdf both remove all copy (text) from my (R outputted) pdf graphs, using pdfTeX

text: I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2010.8.30) in TexMaker 2.1 on Mac OSX. I installed the whatever latex packages using the "easier" method at http://guides.macrumors.com/Installing_LaTeX_on_a_Mac - the MacTex batch. I'm outputting some graphs to PDFs in R and want to include them in my PDF report. Both includegraphics and includepdf input the same, only the lines and colors, but not the text in the legend or the main title. What's going on? Here is a link to my pdf: http://db.tt/2KYaSmw or http://www.scribd.com/doc/43122065/Vf and some sample tex:               \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{pdfpages}     \begin{document}          Bladebla          \includepdf{Vf.pdf}      \includegraphics{Vf.pdf}          What more bla bla     \end{document}      I tried just this snippet of code, and I get the same results, so nothing else in my preamble should be interfering with it.


title: Vertically align multiple labels

text: I have a sketch with two aligned lines. These lines have a label each. When you look on my example, you will see, that the labels "Top" and "Inlet" do not share the same baseline. Both labels are placed individually. How can I define a baseline for both of them?               \begin{tikzpicture}[scale=20]     % Specify the coordinates     \coordinate (P1) at (-0.125,0.15);     \coordinate (P2) at (-0.0635, 0.15);     \coordinate (P3) at (-0.0605, 0.15);     \coordinate (P4) at (0.0, 0.15);          \coordinate (P5) at (-0.125,0);     \coordinate (P6) at (-0.0635,0);     \coordinate (P7) at (-0.0605,0);     \coordinate (P8) at (0.0,0);          \coordinate (P9) at (-0.102588, -0.03);     \coordinate (P10) at (-0.0605, -0.03);     \coordinate (P11) at (0.0, -0.03);          \draw[line width=0.5pt] (P1) -- (P2) -- (P6) -- (P10) -- (P7) -- (P3) -- (P4);     \draw[line width=0.5pt] (P1) -- (P5) -- (P9);     \draw[line width=0.5pt] (P4) -- (P11);     \draw[line width=0.5pt] (P1) -- (P2)  node [midway, above] {Inlet};     \draw[line width=0.5pt] (P3) -- (P4)  node [midway, above] {Top};          \end{tikzpicture}      ![Image generated by the code.](http://i.stack.imgur.com/QqFtY.png)


title: Typeset references without newlines between entries

text: > **Possible Duplicate:**   >  Reduce bibliography to one line Is it possible to typeset references without inserting a new line between items, i.e. to make the references section look something like: > Foo et al. 2008, Nature, 100, 200 • Bar & Baz et al. 2010, Science, 300, 400 > • Einstein, 1905, New Scientist, 5, 6 where "•" is perhaps some configurable delimiter character, rather than something like: > Foo et al. 2008, Nature, 100, 200 > > Bar & Baz et al. 2010, Science, 300, 400 > > Einstein, 1905, New Scientist, 5, 6 I use BibTeX at the moment to get something like the second example, and would prefer to continue to use it for the time being if possible, so solutions that don't involve migration to biblatex are particularly welcome!


title: Constant baseline position

text: Is there a way to set a constant base line position? For example, to the baseline of the first line under any circumstances (even if the lines bump each other) started with 1 cm from the top of the page, the second - from 2cm and so on.


title: How to fit ellipse into another object - using intersections and calc library

text: I would like to ask, how to place ellipse into any object, so that the length of the main arm is defined by `line1` (point A, B) in my code:   * calculate the coordinates of the ellipse midpoint    * rotation angle of the ellipse   * length of the main arm of the ellipse. Code is:                   \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{intersections, calc}          \begin{document}         \begin{figure}[hb!]             \centering                 \begin{tikzpicture}                   \draw[xstep=0.5, ystep=0.5, dashed, color=gray] (-1,-1) grid (5,5);                      \draw[->] (0,0) -- (7,0) node[right] {$x$};                    \draw[->] (0,0) -- (0,7) node[above] {$y$};                   \coordinate (dS) at (2,0.5);                   \shade[name path=teleso,ball color=blue!10!white,opacity=0.50,line width=1,draw=black] plot [smooth cycle] coordinates                         {(0,0) (1,-1) (3,0) (2.5,2) (3,3) (3,4) (2,5) (-1,3) };                   \draw (3,4) node[right]{S};                         % ploska dS                         \shade[bottom color=black,top color=black!50!blue!35](dS) node[below]{$dS$} rectangle +(0.5,0.5);                   \draw[->] (dS) ++ (0.25,0.25) -- +(1,0.5) node[right]{$\vec{n}$};                   \draw[->] (dS) ++ (0.25,0.25) -- +(2,1.5) node[right]{$\vec{h}$};                   \draw[fill=black] (2,3) circle (0.05) node[above, black]{$objem$};                     \draw[name path=line1](-1.5,3.5) -- (3,1.5);                   % Intersections                   \path [name intersections={of=teleso and line1, name=cross}] ;                   \foreach \i in {1,2}                     \fill [color=red] (cross-\i) circle (2pt) ;                   % ellipse                    \coordinate [label=left:$A$] (A) at (cross-1);                   \coordinate [label=right:$B$] (B) at (cross-2);                   \draw[red,line width=1mm]                         let \p1 = ($(B)-(A)$) in (A) -- ++(45:({veclen(\x1,\y1)}););                   \fill [color=cyan, opacity=0.25]                          ($ (A)!0.5!(B) $) ellipse (2cm and 1cm);                 \end{tikzpicture}          \end{figure}     \end{document}      Picture still looks as follows:![enter image description here](http://i.stack.imgur.com/eUpgc.png)


title: Why is the linespread factor as it is?

text: The blog post Quick note on line spacing discusses line spacing and it says > To change the line spacing for the entire document, you can use the > `linespread` command in your preamble: >   >   >     \linespread{<factor>} >   > > The factor is somewhat confusing. For double-spacing you have to use 1.6 and > for one-and-a-half spacing 1.3. Not very intuitive, but I'm sure there is a > reason for it. This unintuitive factor triggered my curiosity. What is the reason for it being as it is? This question is just motivated by my curiosity and I have no practical reason for asking it. Feel free to close it if it's inappropriate or see at as post in the same vein as \nothing, \varnothing and \emptyset in that it asks about history or some design decision.


title: Conditional figure environment (sideways, bottom captions)

text: For my phd dissertation I would like to have a new environment for figures that gives me the possibility to either place the caption `sideways` if there is enough space (say the figure width is < 0.6 column width) otherwise places the caption below the figure. The `sideways` caption should switch left and right based on `odd` `even` page too, and it can stretch the line width limit in that part. An example for the `sideways` captions: say the figure width is `0.5\columnwidth`, then the caption can start from `0.6\columnwidth` to `1.2\columnwidth`. Could someone give me the direction on how to realize this in `latex`? For my thesis I am using `xelatex` - `memoir`. This is the type of `sideways` figures that I am looking for: ![enter image description here](http://i.stack.imgur.com/voRYD.png) EDIT: By the helpful comment of Ipsen and some tweaking I am managed to reach to the thing that I want although not perfect yet. Code:               \documentclass{memoir}          \usepackage{graphicx}     \usepackage[english]{babel}     \usepackage{lipsum}     \usepackage{calc}          \renewcommand*{\sidecapstyle}{%     \captionnamefont{\bfseries}%     \slshape%     }          \renewcommand*{\sidecapfloatwidth}{0.5\linewidth}     \setsidecaps{0.1\textwidth}{.55\textwidth}     \sidecapmargin{outer}     \setsidecappos{b}     \strictpagecheck     \sidecapraise 0.05\textheight          \begin{document}          \chapter{Captions}     \begin{figure}[tb]     \raggedright     \begin{sidecaption}{This is a subcaption just for illustration purposes. This is a subcaption just for illustration purposes.      This is a subcaption just for illustration purposes. Page number is \LARGE\textbf{\thepage}}[fig:test]     \includegraphics[width=\linewidth]{Picture}     \end{sidecaption}     \end{figure}          \lipsum[2-2]          \begin{figure}[tb]     \raggedleft     \begin{sidecaption}{This is a subcaption just for illustration purposes. This is a subcaption just for illustration purposes.      This is a subcaption just for illustration purposes - Page number is \LARGE\textbf{\thepage}}[fig:test]     \includegraphics[width=\linewidth]{Picture}     \end{sidecaption}     \end{figure}          \lipsum[1]          \end{document}      Page 1 of output: ![enter image description here](http://i.stack.imgur.com/CF7bR.png) Page 2 of output: ![enter image description here](http://i.stack.imgur.com/Uq9tu.png) As you see `page` number in `float` is not correct, thus, I have problem automatically parsing `\raggedleft` and `\raggedright` after `\begin{figure}`. How does `sidecaption` find which page it is now?


title: array environment with tags/labels

text: I try to come up with a couple of formulas which should be aligned according to a relation symbol but also to the left. Have a look at the following example:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align}     T &= x + y \\     T_{\text{total}} &= y     \end{align}     %     \[     \begin{array}{lcl}     T &=& x + y \\     T_{\text{total}} &=& y     \end{array}     \]     \end{document}      While using the `align` environment each line is tagged with a number but the terms on the left hand side are aligned to the right. I tried to solve that by using an `array` environment where I can easily control how the left and right hand side of an equation should be aligned, but know I cannot tag the lines anymore. Does someone has an idea how to align equations to a symbol and at the same time control the alignment of the left and right hand side of the equations?


title: Can't copy-paste from my PDF. Any idea why?

text: When using copy paste from the PDF generated from my Latex document, the text comes out garbled. What could be causing this? This is an example of the original text: > At last, and taking the risk a being too abstract, I should point out that > evolutionary algorithms are inspired by nature's evolutionary process. This > is a good opportunity to gain some insight how deeply can that metaphor > hold. Specially since life itself is less a phenomena of optimising > functionality but more of getting good results with what you already have > while not becoming too sensitive to internal and external variation. This > last aspect must not stand in the way of obtaining phenotypes with > biological interest but is relevant nonetheless. And this is the garbled copy-paste: > ❆t ❧❛st✱ ❛♥❞ t❛❦✐♥❣ t❤❡ r✐s❦ ❛ ❜❡✐♥❣ t♦♦ ❛❜str❛❝t✱ ■ s❤♦✉❧❞ ♣♦✐♥t ♦✉t t❤❛t > ❡✈♦❧✉t✐♦♥❛r2 ❛❧❣♦r✐t❤♠s ❛r❡ ✐♥s♣✐r❡❞ ❜2 ♥❛t✉r❡✬s ❡✈♦❧✉t✐♦♥❛r2 ♣r♦❝❡ss✳ ❚❤✐s > ✐s ❛ ❣♦♦❞ ♦♣♣♦rt✉♥✐t2 t♦ ❣❛✐♥ s♦♠❡ ✐♥s✐❣❤t ❤♦✇ ❞❡❡♣❧2 ❝❛♥ t❤❛t ♠❡t❛♣❤♦r > ❤♦❧❞✳ ❙♣❡❝✐❛❧❧2 s✐♥❝❡ ❧✐❢❡ ✐ts❡❧❢ ✐s ❧❡ss ❛ ♣❤❡♥♦♠❡♥❛ ♦❢ ♦♣t✐♠✐s✐♥❣ > ❢✉♥❝t✐♦♥❛❧✐t2 ❜✉t ♠♦r❡ ♦❢ ❣❡tt✐♥❣ ❣♦♦❞ r❡s✉❧ts ✇✐t❤ ✇❤❛t 2♦✉ ❛❧r❡❛❞2 ❤❛✈❡ > ✇❤✐❧❡ ♥♦t ❜❡❝♦♠✐♥❣ t♦♦ s❡♥s✐t✐✈❡ t♦ ✐♥t❡r♥❛❧ ❛♥❞ ❡1t❡r♥❛❧ ✈❛r✐❛t✐♦♥✳ ❚❤✐s > ❧❛st ❛s♣❡❝t ♠✉st ♥♦t st❛♥❞ ✐♥ t❤❡ ✇❛2 ♦❢ ♦❜t❛✐♥✐♥❣ ♣❤❡♥♦t2♣❡s ✇✐t❤ > ❜✐♦❧♦❣✐❝❛❧ ✐♥t❡r❡st ❜✉t ✐s r❡❧❡✈❛♥t ♥♦♥❡t❤❡❧❡ss✳ The commands I run to generate the pdf are:                   pdflatex thesis.tex         bibtex thesis         pdflatex thesis.tex         pdflatex thesis.tex      I am using the debian packages from debian wheezy. This is the minimum example with the problem.               \documentclass{article}          % The Unicode character encoding UTF8 includes several special characters and characters with accents.     % The following code specifies that the encoding of the LaTeX document source file is UTF8.     % Font encoding is specified as T1, because it supports the encoding of extended character sets in fonts.     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{textcomp}          \title{A optimisation tool for the functional improvement\\ of Biological Models}     \begin{document}          Some garbled text with an accented à.          Some garbled text.          \end{document}


title: How to make an environment such as "theorem" not have italics

text: I found this: How to change the font style in theorem environment? as well as this: Italic in theorem environment Neither however seem to make sense to me as I have been using the following:               \newtheorem{theorem}{Theorem}[section]     \begin{theorem} \emph{(Fundamental Lemma)} Let $A$ and $A'$ with collections $\partial$ and      Stuff goes here: But it becomes "italicized"     \end{theorem}      However it seems that with the above two links one is either just defining whole new constructs (which I somewhat understand), or just using `\textbf`, which I don't want the `\textbf` to override the italics as I don't want bold faced text. What I am after is being able to construct a "Theorem" which keeps track of the numbering and updates itself i.e. 1.1 to 1.2 if another theorem tag is added before.


title: New command with variable number of parameters

text: I would like to create new command with functionality like this (pseudo code):               \newcommand{\myCommand}[numOfParameters]  {        for (i = 0; i < numOfParameters / 3; i++) {          \somecommand1{#(i*3 + 1)}          \somecommand1{#(i*3 + 2)}          \somecommand1{#(i*3 + 3)}       }     }      Is it possible to implement such like this in LaTeX ? Here is example of usage (by request): Here is a macros to show 2 images per row ...               \newcommand{\twoimages}[6] {         \begin{figure}[htb!]             \begin{minipage}[h]{0.49\linewidth}                 \begin{center}                     \includegraphics[width=#3\linewidth]{#1} \\                      \caption{#2}                      \label{ris:#1}                 \end{center}             \end{minipage}             \hfill             \begin{minipage}[h]{0.49\linewidth}                 \begin{center}                     \includegraphics[width=#6\linewidth]{#4} \\                      \caption{#5}                     \label{ris:#4}                 \end{center}             \end{minipage}         \end{figure}     }      I'd like to make macros for N (user-defined number) images


title: \includeonlyframes and pdftitle

text: When I use `beamer` with `\includeonlyframes{someframe}`, the resulting PDF has the same pdftitle as the overall document. Is there any way to set the pdftitle to the title of the `someframe`, the only frame I am including?               \documentclass{beamer}     \includeonlyframes{frametwo}     \title{Document title}     \begin{document}%     \begin{frame}[label=frameone]{Frame one}     Spam     \end{frame}     \begin{frame}[label=frametwo]{Frame two}     Eggs     \end{frame}     \end{document}      Running `pdflatex mini` results in a PDF with title _Document title_. Is there any way to get the title of the only frame that is compiled?


title: TeXLive/PDFTeX fonts loading problem

text: I'm using TexLive on Windows Please look at my error log               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (Web2C 2011)      restricted \write18 enabled.     entering extended mode     (./APSBezierSegment_out.tex     LaTeX2e      Babel  and hyphenation patterns for english, dumylang, nohyphenation, uk     english, usenglishmax, loaded.     (c:/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (c:/texlive/2011/texmf-dist/tex/latex/base/size10.clo))     (c:/texlive/2011/texmf-dist/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (c:/texlive/2011/texmf-dist/tex/latex/amsmath/amstext.sty     (c:/texlive/2011/texmf-dist/tex/latex/amsmath/amsgen.sty))     (c:/texlive/2011/texmf-dist/tex/latex/amsmath/amsbsy.sty)     (c:/texlive/2011/texmf-dist/tex/latex/amsmath/amsopn.sty))     (c:/texlive/2011/texmf-dist/tex/latex/graphics/color.sty     (c:/texlive/2011/texmf-dist/tex/latex/latexconfig/color.cfg)     (c:/texlive/2011/texmf-dist/tex/latex/pdftex-def/pdftex.def     (c:/texlive/2011/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (c:/texlive/2011/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))     (c:/texlive/2011/texmf-dist/tex/latex/pxfonts/pxfonts.sty)     (c:/texlive/2011/texmf-dist/tex/latex/base/fix-cm.sty     (c:/texlive/2011/texmf-dist/tex/latex/base/ts1enc.def))     (c:/texlive/2011/texmf-dist/tex/latex/base/latexsym.sty)     (c:/texlive/2011/texmf-dist/tex/latex/base/ucs.sty     (c:/texlive/2011/texmf-dist/tex/latex/unicode/data/uni-global.def))     (c:/texlive/2011/texmf-dist/tex/latex/base/inputenc.sty     (c:/texlive/2011/texmf-dist/tex/latex/base/koi8-r.def)     (c:/texlive/2011/texmf-dist/tex/latex/base/utf8x.def))     (c:/texlive/2011/texmf-dist/tex/latex/pict2e/pict2e.sty     (c:/texlive/2011/texmf-dist/tex/latex/pict2e/pict2e.cfg)     (c:/texlive/2011/texmf-dist/tex/latex/pict2e/p2e-pdftex.def)     (c:/texlive/2011/texmf-dist/tex/latex/graphics/trig.sty))     (c:/texlive/2011/texmf-dist/tex/latex/base/fontenc.sty     (c:/texlive/2011/texmf-dist/tex/latex/base/t1enc.def)     (c:/texlive/2011/texmf-dist/tex/latex/base/t2aenc.def)     (c:/texlive/2011/texmf-dist/tex/latex/base/t2acmr.fd)     ! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not fo     und.                              relax      l.100 \fontencoding\encodingdefault\selectfont          ?      ! Emergency stop.                              relax      l.100 \fontencoding\encodingdefault\selectfont          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on APSBezierSegment_out.log.      And here is mine input file:               \documentclass{article}     \usepackage{amsmath}     \usepackage{color,pxfonts,fix-cm}     \usepackage{latexsym}     \usepackage[mathletters]{ucs}     \usepackage[koi8-r,utf8x]{inputenc}     \usepackage{pict2e}     \usepackage[T1,T2A]{fontenc}     \usepackage{wasysym}     \usepackage[hebrew,english]{babel}     %\usepackage[english]{babel}     \begin{document}     \begin{picture}(0,0)     \qbezier(200,0)(150,150)(400,0)     \end{picture}     \end{document}      What is the problem here. And how that can be solved?


title: I cannot get an image and `lstlisting` aligned in a table

text: > **Possible Duplicate:**   >  How to align picture top left in a table? I want to display an image and some lines of monospaced text with line breaks (as far as I know, `lstlisting` is the only option). The upper bounds of both image and text should both be aligned at the top of the row, but I always result in either the image or the monospace text at the wrong position. As I don't understand whats wrong I haven't got any clue how to fix this.               \documentclass[10pt]{article}     \usepackage{graphicx}     \usepackage{listings}     \usepackage{verbatim}     \begin{document}     \lstset{         breaklines     = true     }     \begin{tabular}{|p{3cm}|p{10cm}|}     \hline     \includegraphics{/Users/jenserat/Downloads/test.png} & \begin{lstlisting}     Some listing.     Some listing. Some lines can get quite long and should be wrapped.     Some listing.     Some listing.     Some listing.     Some listing.     Some listing.     Some listing.     \end{lstlisting} \\     \hline     \end{tabular}          \end{document}      I tried using different combinations of tabular, tabularx, graphics, graphicsx, minipages without luck. I want to avoid some ugly hacks using `vspace` as this latex code should be generated by some script which probably will get distributed. I'd like to use a table, but am not bound to one. I do not mind using tabularx and do not mind what column style I use (as long as the code is left-aligned). ![Wrong display with hint how it should look like](http://i.stack.imgur.com/mmXAE.jpg)