title: Drawing a complex figure in Tikz

text: I want to draw this figure in Tikz (apologies for poor image quality): ![enter image description here](http://i.stack.imgur.com/EnT89.jpg) However, I can't quite figure out a good way to go about it. The only way I know how to draw this is as follows:   1. Declare a scope which includes arrows halfway along each line segment, and `\draw` each of the 14 line segments on the outside inside this scope.   2. Manually `\draw` the rest of the lines and label them accordingly.   3. Manually `\fill` the 8 shaded regions.   4. Add the two arcs on the sides and label one `\gamma`. Surely this is not the most efficient method. Using the `calc` package might save me a little calculation, but not much time overall. The only other way I've thought to do this is define a command which draws each unshaded triangle, and another which draws each shaded one, but I'm not sure how to automate the label placement, or how to declare a scope within `newcommand` to use my method for getting arrows on the sides. What is the best way to draw something like this?


title: Body Text Affected in using txfonts package

text: I don't want to use txfonts package because the Body will be affected. I just want to declare the correct font that being use by `\varmathbb` tag/code but I did not fount it.               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{txfonts}     \usepackage{dsfont}     \usepackage{lipsum}     %\DeclareSymbolFont{letters}{OT1}{cmr}{m}{n}     %\DeclareSymbolFontAlphabet{\varmathbb}{letters}          \begin{document}          \lipsum[1]     $\mathds{R}$               $\mathbb{R}$               $\varmathbb{R}$ -output should look this by not using the txfonts package.          \end{document}


title: Footnotes doesn't work inside tasks

text: See the following MWE. For some reason the footnotes inside `tasks` environment are not displayed, while they work in `enumeration`.               \documentclass{article}          \usepackage{enumitem}     \usepackage{tasks}          \begin{document}     \begin{tasks}         \task test\footnote{test a}     \end{tasks}     \begin{enumerate}         \item test\footnote{test b}     \end{enumerate}     \end{document}


title: Using a handwriting font from myscriptfont.com

text: I'd like to use a font created from my handwriting at myscriptfont.com. It generates either OTF or TTF fonts, and they are usable (obviously with many limitations!) in various OS X programs. I can't get them to work under XeLaTeX, however. Here's my minimal example (you'll need either my ScottMorrison.otf or ScottMorrison.ttf font installed).               \documentclass{article}          \usepackage{xltxtra}     \usepackage[T1]{fontenc}     \setmainfont{ScottMorrison}          \usepackage{lipsum}          \begin{document}     \lipsum     \end{document}      which produces the message > LaTeX Font Warning: Font shape `T1/ScottMorrison(0)/m/n' undefined (Font) > using`T1/cmr/m/n' instead on input line 5. and, of course, text in Computer Modern. (Note that it really is seeing the installed font file, if you change the `\setmainfont` command to some other string completely different error messages arise.) > Is there some way to make fonts like these usable in XeLaTeX?


title: Change grid line dash pattern such that grid intersections look uniform

text: We can set the appearance of the grid like follows:               \pgfplotsset{       grid style = {         dash pattern = on 0.05mm off 1mm,         line cap = round,         black,         line width = 0.5pt       }     }      The result may look like this: ![enter image description here](http://i.stack.imgur.com/bWIWE.png) At the intersection of the x- and y-grid-lines, this looks not very nice. What I like to see is somewhat like this (only recognize how the dash pattern is chosen differently in x- and y-direction to fit nicely): ![enter image description here](http://i.stack.imgur.com/6xIfL.png) This will produce somewhat like the first image:               \documentclass[a4paper,10pt]{scrartcl}     \usepackage[greek,english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{pgfplots}          \pgfplotsset{       grid style = {         dash pattern = on 0.05mm off 1mm,         line cap = round,         black,         line width = 0.5pt       }     }          \begin{document}          \begin{tikzpicture}     \begin{axis}[grid = major]     \addplot[color=red,mark=x] coordinates {     (2,-2.8559703)     (3,-3.5301677)     (4,-4.3050655)     (5,-5.1413136)     (6,-6.0322865)     (7,-6.9675052)     (8,-7.9377747)     };     \end{axis}     \end{tikzpicture}          \end{document}


title: How to make a plot from table data?

text: Having the following table: ![enter image description here](http://i.stack.imgur.com/zbd8R.png) How can we make a plot diagram showing the relation between P,Q? I would like the P-value on y-axis and the Q-values on the x-axis.


title: How to change format of xticklabel when loaded from table

text: I have the following code               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{filecontents}          \begin{filecontents}{testdata.dat}       6.3e-05 0.8767984145412976 0.6       0.000125 12.85965577546382 9.970000000000001       0.00025 16.95140970189756 13.76       0.0005 14.61328253838453 12.13       0.001 21.24630316052836 17.76       0.002 33.45255040918443 27.81       0.004 0 17.97       0.0056 0 0       0.008 0 0       0.0112 0 0       0.016 0 0       0.0224 0 0       0.0315 0 0     \end{filecontents}          \usetikzlibrary{calc}     \usetikzlibrary{pgfplots.groupplots}     \pgfplotstableread{testdata.dat}\datatable     \begin{document}          \begin{tikzpicture}     \begin{axis}[        ybar=0pt,       /pgf/bar width=5pt,       bar cycle list,       width=6cm,       height=2cm,       scale only axis,       xmajorgrids,       ymin=0, ymax=100,        ymajorgrids,       tick label style={font=\scriptsize},       x tick label style={/pgf/number format/sci},       xticklabels from table={\datatable}{0}     ]       \addplot table[x expr=\coordindex,y=1]{\datatable};       \addplot table[x expr=\coordindex,y=2]{\datatable};      \end{axis}     \end{tikzpicture}     \end{document}      which gives me this plot ![enter image description here](http://i.stack.imgur.com/4Ucus.png) Now instead of the fixed format for the xticklabels I want the scientific format and want an xtick on every delivered coordinate. How do I achieve this? I tried it with `x tick label style={/pgf/number format/sci}` but that did not help. **Update:** To have every xtick I had to use the option `xtick=data`.


title: Where does TeXstudio store the .cwl files for hyperref and xspace?

text: TeXstudio uses .cwl files for storing information about which macros are defined by which packages, one file per package. This information is used for autocompletion suggestions and highlighting of unrecognized macros. Most of these files I can find in `C:\Users\doncherry\AppData\Roaming\texstudio`. For some packages, e.g. `hyperref` and `xspace`, however, I can’t find them in that directory and neither in the program’s directory `C:\Program Files (x86)\TeXstudio`. Where are they hiding? Are they hard-coded into the executables?


title: Running out of main memory when using loops in TikZ

text: I have a TikZ drawing (namely, pairs of rulers) that I want to replicate 12 times, side by side. I'm using `foreach` constructs to help me in this process and to draw the 5-cm, 1-cm and 1-mm ticks for the rulers. However, I am running out of memory when I try to draw them more than a third time. I tried externalizing the process, without success, and I am reluctant to try to increase the main memory. How would I go about solving this? Here's the MWE:               \documentclass[tikz,convert=false,12pt]{standalone}          \renewcommand*\familydefault{\sfdefault}      \usepackage[T1]{fontenc}     \usetikzlibrary{external}      \tikzexternalize          \begin{document}          %%%%  Any unit not specified is multiplied by 1 mm. This allows some fancy scaling.      \begin{tikzpicture}[x=1mm,line cap=rect]                 %%%% We need 12 rulers, mirrored, for a grand total of 24 rulers. Each pair of       %%%% rulers will be offset 10 cm from the previous pair.             \foreach \i in {0,...,2}{ %%%% Ideally, this would be 11 and not 2.          \tikzset{xshift/.expanded=\i*100mm}              %%%% Draw the red millimeter tick marks.         \foreach \y in {0.1,0.3,...,69.9}         \draw [color=red, line width=0.15mm] (10mm,\y) -- (0mm,\y)         node[color=red] {};                 %%%% Draw the black millimeter tick marks         \foreach \y in {0,0.2,...,69.8}         \draw [color=black, line width=0.15mm] (10mm,\y) -- (0mm,\y)         node[color=black] {};                   %%%% Draw the red minor(centimeter) tick marks with the red labels.          \foreach \y in {1,3,...,69}         \draw [color=red, line width=1mm] (20mm,\y) -- (0mm,\y)         node[color=red, anchor=east] {\pgfmathprint{int(\y)}};                 %%%% Draw the black minor (centimeter) tick marks with the black labels.          \foreach \y in {0,2,...,68}         \draw [color=black, line width=1mm] (20mm,\y) -- (0mm,\y)         node[color=black, anchor=east] { \pgfmathprint{int(\y)}};                        %%%% Draw the black major (5-cm) tick marks with the black labels. This paints over         %%%% the minor tick marks in the same place.         \foreach \y in {0,10,...,70}         \draw [color=black,line width=2mm] (30mm,\y) -- (0mm,\y)         node[fill=white,anchor=east] {\Huge \textbf{{\pgfmathprint{int(\y)}}}};              %%%% Draw the red major (5-cm) tick marks with the red labels. This paints over         %%%% the minor tick marks in the same place.         \foreach \y in {5,15,...,65}         \draw [color=red, line width=2mm] (30mm,\y) -- (0mm,\y)         node[fill=white,anchor=east] {\Huge \textbf{\pgfmathprint{int(\y)}}};                   %%%% Draw the vertical line that ties it all together.              \draw [line width=2mm](0mm, 0mm) -- coordinate (y axis mid) (0mm,700mm);                        %%%% ------------------------------ REVERSED RULERS              %%%% Draw the red millimeter tick marks. Reversed.         \foreach \y in {0.1,0.3,...,69.9}         \draw [color=red, line width=0.15mm] (60mm,\y) -- (70mm,\y)         node[color=red] {};                 %%%% Draw the black millimeter tick marks. Reversed         \foreach \y in {0,0.2,...,69.8}         \draw [color=black, line width=0.15mm] (60mm,\y) -- (70mm,\y)         node[color=black] {};              %%%% Draw the red minor tick marks with the red labels. Reversed         \foreach \y in {1,3,...,69}         \draw [color=red, line width=1mm] (50mm,\y) -- (70mm,\y)         node[color=red, anchor=west] {\pgfmathprint{int(\y)}};                 %%%% Draw the black minor tick marks with the black labels. Reversed         \foreach \y in {0,2,...,68}         \draw [color=black, line width=1mm] (50mm,\y) -- (70mm,\y)         node[color=black, anchor=west] { \pgfmathprint{int(\y)}};              %%%% Draw the black major tick marks with the black labels. This paints over         %%%% the minor tick marks in the same place. Reversed         \foreach \y in {0,10,...,70}         \draw [color=black,line width=2mm] (40mm,\y) -- (70mm,\y)         node[fill=white,anchor=west] {\Huge \textbf{{\pgfmathprint{int(\y)}}}};              %%%% Draw the red major tick marks with the red labels. This paints over         %%%% the minor tick marks in the same place. Reversed         \foreach \y in {5,15,...,65}         \draw [color=red, line width=2mm] (40mm,\y) -- (70mm,\y)         node[fill=white,anchor=west] {\Huge \textbf{\pgfmathprint{int(\y)}}};              %%%% Draw the vertical line that ties it all together, reversed          \draw [line width=2mm](70mm, 0cm) -- coordinate (y axis mid) (70mm,700mm);              % %%%% Draw crop marks.         % \draw [very thin, color=black, loosely dashed](-1, 0cm) -- coordinate         % (y axis mid) (-1cm,71cm);            }                \end{tikzpicture}          \end{document}          %%% Local Variables:      %%% mode: latex     %%% LaTeX-command: "latex -shell-escape"     %%% TeX-master: t     %%% End:


title: Latex text color in TeXShop

text: I would find it immensely helpful if my footnote text color in my LaTeX source could automatically appear different from my regular text color. As it does when you put a % before a line. That is, if when I wrote:                Though he acknowledges space, it is far from central to his analysis.  What Foucault      brings to the board is the issue of normalization.\footnote{Much of the following      line of thought comes from a detailed reading of Late Foucault, a period of his      research commonly referred to as his ethical phase.  Spliced in is some...      bababa} Normalization, according to Foucault...      And my footnote just goes on and and it takes too long to get to the next bit of body text while I'm editing. It would be great if I could do something at the start, so that when I wrote \footnote{} Everything inside the {} would show up as burgundy or some other gentle color. I have found suggestion that I can use \footnote{mark1} and then later write out the text with mark1 is such and such, but I think this would add clutter to my text, given that I have so many footnotes.


Commonly, in the mathematical literature, the Heaviside function it is not simply refereed as H(t-theta). The letter H is drawn with a different letter. My question is: How to define the Heaviside function in LaTeX? While I was looking the answer I found that: The H of Heaviside function can be drawn as               $\mathcal{H}$.


title: How can I get rid of a blank page that appears me before my references?

text: I'm using WinEdt 7. I would like to know how can I eliminate the blank page that appears before my references. This is my code (.tex):                    \renewcommand{\bibname}{            \clearpage\pagestyle{myheadings}%             \markboth{}{}%             \renewcommand{\bibname}{REFERENCIAS BIBLIOGRÁFICAS}%             \setboolean{SetDSpace}{false}%            \chapter*{\bibname}%             \addcontentsline{toc}{extrachapter}{\bibname}%             \setboolean{SetDSpace}{true}%          }      The other code is in a. cls file but it doesn't displays well, I mean it doesn't displayed neither the title nor the link to the table of contents. So I created the above code and put it in the main .tex file. This is the .cls code:               \renewcommand{\bibname}{REFERENCIAS BIBLIOGR\'AFICAS}%     \renewenvironment{thebibliography}[1]%      {\renewcommand{\bibname}{REFERENCIAS BIBLIOGR\'AFICAS}%      \clearpage\pagestyle{myheadings}%       \markboth{}{}%       \setboolean{SetDSpace}{false}%       \chapter*{\bibname}%       \addcontentsline{toc}{extrachapter}{\bibname}%       \setboolean{SetDSpace}{true}%       \list{\@biblabel{\@arabic\c@enumiv}}%            {\settowidth\labelwidth{\@biblabel{#1}}%             \setlength{\parsep}{\BaseDiff\baselineskip}%             \setlength{\itemsep}{0ex}%             \setlength{\leftmargin}{\labelwidth}%             \addtolength{\leftmargin}{\labelsep}%             \@openbib@code             \usecounter{enumiv}%             \let\p@enumiv\@empty             \renewcommand\theenumiv{\@arabic\c@enumiv}}%       \sloppy       \clubpenalty10000       \@clubpenalty \clubpenalty       \widowpenalty10000%       \sfcode`\.=1000\relax}      {\def\@noitemerr        {\@latex@warning{Empty `thebibliography' environment}}%       \endlist\clearpage}


title: TikZ: how would we construct a bullet?

text: I am drawing a block hanging from a string, but at some time later, the block is struck by a bullet. I am trying to construct a crude bullet but that seems to be harder than I have anticipated. Thus how do we draw a bullet?               \documentclass[tikz]{standalone}          %  draws block hanging from a string     \newcommand\block{       \draw (0, 0) -- (0, -1.5cm) -- (-.5cm, -1.5cm) rectangle (.5cm, -2.5cm);}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);       \coordinate (P1) at (0, -1.5cm);            \block            \begin{scope}[rotate = 60]         \coordinate (P2) at (0, -1.5cm);              \block         % trying to draw a bullet         %\draw (0, -2cm) -- ++(0, -.25cm) -- ++(;        \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nnyfk.png) Bullets: ![enter image description here](http://i.stack.imgur.com/Y0jz9.png)


title: Which font should be used for diagrams/graphs/flow charts?

text: I'm using the standard serif fonts in KOMA script for typesetting my thesis, 11pt for normal text. What font and font size would be recommended for use in graphs, diagrams and flow charts? The same font as the normal text or a sans serif font for better "contrast"? What about font size in graphics?


title: Creating paper forms in LaTeX?

text: I want to create a handout with dotted lines for the recipient to fill in, a little like this: ![this](http://i.stack.imgur.com/oLWMR.jpg)   What's the best way to do so? I could imagine doing it as a `tikzpicture`, but that seems clunky. Is there a better way?


title: Negative y value in polar plot

text: I'm having some trouble with polar plots. I have to plot negative values, but without changing direction. I tried to set the `ymin` value to be negative, but it doesn't work.               \documentclass[10pt,border=10pt]{standalone}     \usepackage{pgfplots}     \usepgfplotslibrary{polar}          \begin{document}     \begin{tikzpicture}     \begin{polaraxis}[        xticklabel=$\pgfmathprintnumber{\tick}^\circ$,        ymin=-10,        xtick={0,30,...,330}]     \addplot table{        0  -1         30 -2        45 -3        60 -4        75 -5        };     \end{polaraxis}     \end{tikzpicture}     \end{document}      Any suggestion? For clarity, this is what I expected. ![img](http://i.stack.imgur.com/MkNRK.png)


title: How can I break a long URL in bibliography

text: I have a problen with a long url on LaTeX, I want to break it but I don't know how. The line in LaTeX is:               \bibitem{} Information Intel 8085: \\ \url{http://www.ehowenespanol.com/informacion-microprocesador-intel-8085-sobre\_138668/}       When I compile, I can see in PDF the following url:               http://www.ehowenespanol.com/informacion-microprocesador-intel-80     -138668/      Can I make some kind of \breakline or \ in the url?


title: How do you add the second reference?

text: I have and it works               @misc{GDP:2012,     ALTauthor = {The World Bank},     ALTeditor = {},     title = {GDP Per Capita (Current \$US)},     year = {2012},     url = {http://data.worldbank.org/indicator/NY.GDP.PCAP.CD},     }      and I have tried to add the second reference after it like here:               @misc{GDP:2012,     ALTauthor = {The World Bank},     ALTeditor = {},     title = {GDP Per Capita (Current \$US)},     year = {2012},     url = {http://data.worldbank.org/indicator/NY.GDP.PCAP.CD},     }               {GDP:2013,     ALTauthor = {The World Bank3},     ALTeditor = {Sexolopianos},     title = {GDP Per Capita (Current \$US)},     year = {2013},     url = {http://data.worldbank.org/iffdicator/NY.GDP.PCAP.CD},     }      But it didn't work. What should one do to add the second source in order to make it work.


title: Latex table of content gives wrong page numbers

text: I think it does not count the images. What should I do?


title: Tikz-uml error when using positioning keywords

text: I use the `tikz-uml` package with MikTeX. I put it in the '...latex/misc' directory and used the 'Refresh FNDB' function in the settings. Consider this minimal example:               \documentclass{article}          %Tikz Stuff     \usepackage{tikz}     %Required for Tikz-UML     \usepackage{ifthen}     \usepackage{xstring}     \usepackage{calc}     \usepackage{pgfopts}     \usepackage[ngerman]{babel}     \usetikzlibrary{positioning}     %     \usepackage{tikz-uml}     %     \begin{document}     %     \begin{tikzpicture}     \umlsimpleclass{A}     \umlemptyclass[below left=2cm and 2cm of A, anchor=north]{B}     \umlclass[right=4cm of B.north, anchor=north]{C}{i : int \\ r : double}{}     \umlVHVinherit[arm2=-1.2cm]{B}{A}     \umlVHVinherit[arm2=-1.2cm]{C}{A}     \end{tikzpicture}      \end{document}      The package itself works. But, if I use the positioning keywords like above or below left I get the following error: > pdflatex> !TIKZUML ERROR : in umlclass, invalid option below left


title: How to put 2 headings on same line (next to each other)?

text: Can someone help me to put ''Author:'' on the same line as ''Supervisor:''?               \begin{minipage}{0.4\textwidth}     \begin{flushleft} \large     {\bf Author:}\\     aaa\textsc{bbb} % My name     \end{flushleft}     \end{minipage}     ~     \begin{minipage}{0.4\textwidth}     \begin{flushright} \large     {\bf Supervisors:} \\     ccc \textsc{ddd} \\% Name 1     eee \textsc{fff} \\% Name 2     \end{flushright}


title: Linespacing LaTeX for just a few lines

text: How can I increase the linespacing for just a few lines of code in LaTex?


title: Align 16 small images in a 4 x 4 grid

text: Does anybody know, how I can allign 16 images like a grid with 4 columns and 4 rows?               \begin{figure}     \begin{tabular}{cccc}     \subfloat[0,1 s]{\includegraphics[width = 1.5in]{25.gif}}&     \subfloat[25 s]{\includegraphics[width = 1.5in]{26.gif}}&     \subfloat[750 s]{\includegraphics[width = 1.5in]{27.gif}}&     \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{28.gif}}\\     \subfloat[0,1 s]{\includegraphics[width = 1.5in]{29.gif}}&     \subfloat[25 s]{\includegraphics[width = 1.5in]{30.gif}}&     \subfloat[750 s]{\includegraphics[width = 1.5in]{31.gif}}&     \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{32.gif}}\\     \subfloat[0,1 s]{\includegraphics[width = 1.5in]{33.gif}}&     \subfloat[25 s]{\includegraphics[width = 1.5in]{34.gif}}&     \subfloat[750 s]{\includegraphics[width = 1.5in]{35.gif}}&     \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{36.gif}}\\     \subfloat[0,1 s]{\includegraphics[width = 1.5in]{37.gif}}&     \subfloat[25 s]{\includegraphics[width = 1.5in]{38.gif}}&     \subfloat[750 s]{\includegraphics[width = 1.5in]{39.gif}}&     \subfloat[1618,55]{\includegraphics[width = 1.5in]{40.gif}}\\     \subfloat[0,1 s]{\includegraphics[width = 1.5in]{41.gif}}&     \subfloat[25 s]{\includegraphics[width = 1.5in]{42.gif}}&     \subfloat[750 s]{\includegraphics[width = 1.5in]{43.gif}}&     \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{44.gif}}&     \end{tabular}     \caption{4 x 5}     \end{figure}


title: Is there a tex package which allows links syntax for common wikis/wiki syntaxes (MediaWiki, dokuwiki, ...)?

text: I've tried to get around the problem of getting wiki users to do as much as possible in the wiki I'm maintaining and overcome limitations of wiki and HTML markup with LaTeX (this basically means abusing the wiki revision facilities in order to avoid to force people how to use a versioning system - think about that what you want). There're quite a lot of good plugins out there for popular wiki software, like MediaWiki and dokuwiki, and LaTeX to HTML transformation is not dark magic in general, i.e. thinkable for an arbitrary number of other wikis. It is only fun though if one is able to use the wiki link facilities (for both images or other resources and LaTeX includes) in the LaTeX markup when authoring wiki content in LaTeX which brings me to my question: Is there a LaTeX package which provides replacement of wiki links with links the LaTeX compiler can work with? I can imagine that it probably would need some setup regarding a relative root and web server rewrite rules, but technically speaking it should be possible!


title: Video embedded into the PDF of a LaTeX beamer document as flash makes Acrobat Reader 9.4.1 crash on slide transition

text: I have tried to embed a `.flv` video file into a PDF using either the package `flashmovie` or the package `media9` together with `beamer` and `pdfLaTeX`, as described, for instance, here. The video is shown correctly in Acrobat Reader 9.4.1 on Ubuntu. However, the reader crashes when I move on to the next slide, irrespective of the contents of that slide. The reader issues the error message `(acroread:7653): Gdk- WARNING **: gdk_window_set_user_time called on non-toplevel`. Has anyone come across this problem and knows the reason/a solution? Is the procedure described above still the recommended way of including videos into PDFs? Given that Acrobat Reader does not support flash anymore, it seems like there should be better ways. Here is a minimal non-working example with the `flashmovie` package:               \RequirePackage{flashmovie}      \documentclass{beamer}     \usepackage{flashmovie}     \begin{document}         \begin{frame}             \flashmovie[engine=flv-player,loop=1,width=146px,height=108px,auto=1,controlbar=0]{movie.flv}          \end{frame}         \begin{frame}         \end{frame}     \end{document}      Here is a minimal non-working example with the `media9` package:               \documentclass{beamer}     \usepackage{media9}[2013/11/12]     \begin{document}         \begin{frame}             \includemedia[width=146px,height=108px,activate=pageopen,addresource=movie.flv,flashvars={source=movie.flv}]{alternative}{VPlayer9.swf}         \end{frame}         \begin{frame}         \end{frame}     \end{document}


title: How to instert full citation, instead of citation key? List of Author's publication?

text: I'm using multibib to typeset two "bibliographies": references and bibliographies. My supervisors don't want any keys/number in the text nor in the bibliographies section. I'm using `\nocite{key}` to suppress the key appearance in the text, but this still generates citations keys in the bibliography section. How do I simply insert full citation without a key (inverse of what is printed by the `\cite`)? **Example** Lorem ipsum dolor sit amet, consectetur adipiscing elit.[1] Vivamus urna nisi, mattis eget convallis eget, sollicitudin eget quam. Duis lobortis odio vitae nulla vestibulum id suscipit ante elementum. Nulla vitae justo nec risus vehicula commodo.[2] Aenean commodo diam eget mi tincidunt condimentum. Nunc dolor nibh, mollis in vehicula auctor, porta aliquam lorem. Ut sagittis ipsum vel lorem sagittis sed bibendum ipsum molesti **References**   [1] _Citation_   [2] _Citation_ **Bibliography**   _Citation_   _Citation_ \- This one is best to read last.


title: How to set equal size of cells in tabular environment when \multicolumn extend the size of above cell?

text: The code example is shown as follows:               \documentclass{article}     \usepackage{latexsym}     \usepackage{bm}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}          \begin{document}          \begin{center}     \begin{tabular}{|c|c|c|c|c|c|c|c|c|}     \hline     \multicolumn{9}{|c|}{join} \\     \hline     \multicolumn{3}{|c|}{First Long Text} &     \multicolumn{3}{|c|}{Second Long Text} &     \multicolumn{3}{|c|}{Third Long Text} \\     \hline      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\     \hline     \end{tabular}     \end{center}          \end{document}      The table is shown in the image. How to set equal size of cells in the last line? ![enter image description here](http://i.stack.imgur.com/VNePM.png)


title: How to decorate a \pic path?

text: Consider the following example using the `angles` library and a `pic` path to mark an angle:               \documentclass[tikz,border=10pt]{standalone}     \usetikzlibrary{angles,decorations.markings}          \begin{document}          \begin{tikzpicture}[       >=latex,       decoration={       markings,       mark= at position 0.5 with         {           \arrow{<}         }       }     ]          \draw        (2,1) coordinate (A) node[label={right:$A$}] {} --       (0,0) coordinate (B) node[label={left:$B$}] {} --       (2,-1) coordinate (C) node[label={right:$C$}] {}       pic[->,draw=red,angle radius=1cm] {angle={C--B--A}};      \draw[<-] (3,1) -- (3,-1);             % The problem is here; pic doesn't seem to obey the decoration     \begin{scope}[yshift=-3cm]     \draw        (2,1) coordinate (A) node[label={right:$A$}] {} --       (0,0) coordinate (B) node[label={left:$B$}] {} --       (2,-1) coordinate (C) node[label={right:$C$}] {}       pic[draw=red,angle radius=1cm,postaction=decorate] {angle={C--B--A}};     \draw[postaction=decorate] (3,1) -- (3,-1);        \end{scope}          \end{tikzpicture}          \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/Hp40j.png) The image on top shows an angle marked using a red arc with an arrow in one end; in the image on the bottom I tried to use a decoration to add the arrow in the middle of the arc, but the `postaction=decorate` option was ignored; the straight lines to the right are not relevant and are only there for comparison: a simple `\draw` path obeys the decoration. What's the proper way to use a decoration for an arc created using the `angle` pic?


title: Consistent distance between bar plot groups of different sizes

text: I'm trying to make a bar plot where i always have one single bar paired against multiple bars. Two problems arise -- first, the first bar is assumed to have 6 other bar buddies and gets pushed to the left. I am aware that this has been answered here, but there's more. The second problem is, assuming that solution (2nd MWE) I get an absurd ammount of wasted white space between groups. Any ideas on how to achieve even spacing between bar groups and plot edges? Dirty hacks and manual approaches are fine if needed be.               \documentclass[border=5pt]{standalone}          \usepackage{pgfplots}         \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         ybar,         width=12cm,         xmin=0,xmax=2,         enlarge x limits=0.3,         ]     \addplot coordinates {         (0,2.5) };     \addplot coordinates {         (1,5) (2,7) };     \addplot coordinates {         (1,4) (2,10) };     \addplot coordinates {         (1,5) (2,8) };     \addplot coordinates {         (1,2) (2,6) };     \addplot coordinates {         (1,8) (2,10) };     \addplot coordinates {         (1,7) (2,4) };     \end{axis}     \end{tikzpicture}     \end{document}          \documentclass[border=5pt]{standalone}          \usepackage{pgfplots}         \pgfplotsset{compat=newest}          \pgfplotsset{         % #1: index in the group(0,1,2,...)         % #2: number of plots of that group         bar group size/.style 2 args={             /pgf/bar shift={%                     % total width = n*w + (n-1)*skip                     % -> subtract half for centering                     -0.5*(#2*\pgfplotbarwidth + (#2-1)*\pgfkeysvalueof{/pgfplots/bar group skip})  +                      % the '0.5*w' is for centering                     (.5+#1)*\pgfplotbarwidth + #1*\pgfkeysvalueof{/pgfplots/bar group skip}},%         },         bar group skip/.initial=0pt,     }          \begin{document}     \begin{tikzpicture}     \begin{axis}[         plot1/.style={fill=red!20},         plot2/.style={fill=blue!20},         ybar,         width=12cm,         xmin=0,xmax=2,         enlarge x limits=0.2,         ]     \addplot [bar group size={5}{6}] coordinates {         (0,2.5) };     \addplot [plot1,bar group size={0}{6}] coordinates {         (1,5) (2,7) };     \addplot [plot2,bar group size={1}{6}] coordinates {         (1,4) (2,10) };     \addplot [plot1,bar group size={2}{6}] coordinates {         (1,5) (2,8) };     \addplot [plot2,bar group size={3}{6}] coordinates {         (1,2) (2,6) };     \addplot [plot1,bar group size={4}{6}] coordinates {         (1,8) (2,10) };     \addplot [plot2,bar group size={5}{6}] coordinates {         (1,7) (2,4) };     \end{axis}     \end{tikzpicture}     \end{document}


title: How can I have numbered verbatim environments?

text: How can I have an automatically numbered verbatim environment, just like equations? I tried putting it like this:               \begin{equation}     \begin{verbatim}     bla... bla... bla...     \end{verbatim}     \end{equation}      but it gives me an error. I am sure there must be a better way.


title: In bst file, check if variable contains string

text: I have a bst file that handles a "collaboration" field in a bib entry as follows:               @article{test,           author         = "Smith, J.",           title          = "The Foo Title",           collaboration  = "BAR",           journal        = "Stack",           volume         = 0,           pages          = "1-10",           year           = 2013     }      Yields:               J. Smith (BAR Collaboration), The Foo Title, Stack 0, 1–10 (2013).      This is fine, except for entries in which the "collaboration" field already contains the word collaboration. My question is, _is there a simple way in which to modify the function below such that the "Collaboration" or "Collaborations" string is only added when required?_ The modified function would need to be case insensitive and also insensitive to singular/plural. Here is the current function:               FUNCTION {format.collaboration}     { collaboration empty$         { "" }         { collaboration num.names$ #1 >             {" (" collaboration * " Collaborations)" * }             {" (" collaboration * " Collaboration)" * }         if$         }       if$     }      Unfortunately, the reverse polish format of bibtex makes the learning curve so steep that the Tame the BeaST document and its examples are not really helping me. By the time I figure out a fix, I could have just changed all of my bib entries to be compliant. But going forward, it would be nice to have a function so I don't have to worry about it. Thanks!


title: How to redefine \label, \ref and \pageref in a way compatible with varioref?

text: In order to prevent conflicts with labels when gathering exercices from a database, I need to redefine the commands `\label`, `\ref` and `\pageref` to add a local prefix to labels. Unfortunately, the package `varioref` does not work anymore. Here is a MWE.               \documentclass{article}     \usepackage{varioref}          \newcommand*{\globallabel}[1]{global:#1}          \AtBeginDocument{%       \let\origref\ref       \renewcommand*{\ref}[1]{%         \origref{\globallabel{#1}}%       }       \let\origpageref\pageref       \renewcommand*{\pageref}[1]{%         \origpageref{\globallabel{#1}}%       }       \let\origlabel\label%       \renewcommand*{\label}[1]{%         \origlabel{\globallabel{#1}}       }     }     \makeatother          \begin{document}          Example 1: figure~\vref{fig:example1}.          Example 2: figure~\vpageref{fig:example2}.          \begin{figure}       \caption{Example 1}       \label{fig:example1}     \end{figure}          \clearpage          \begin{figure}       \caption{Example 2}       \label{fig:example2}     \end{figure}          \end{document}      I get               Example 1: figure 1 on page 1.     Example 2: figure on page 2.      instead of               Example 1: figure 1.     Example 2: figure on the next page.      In the log file, I found               LaTeX Warning: Reference `fig:example1' on page 1 undefined on input line 31.     LaTeX Warning: Reference `fig:example2' on page 1 undefined on input line 33.      I've tried to redefine the commands `\vref` and `\pagreref` in the same way ; without success.


title: Numbers keep continuing - Problem with subfig and ContinuedFloat

text: I have a problem with the numbering in continued subfloats. I just changed my package (subfigure) to subfig because I read that this allows me to continue subfloats on a new page using the command `\ContinuedFloat`. However, now I have the problem that the numbering (actually lettering) of subfloats continues, even if I close the figure environment and make a new one (containing subfloats) - see screenshot attached. This problem happens more than once, but here is an example of code. **edit** : I have narrowed it down: every time I use `\ContinuedFloat` the next normal figure environment will _also_ be a continuation.               \documentclass[a4paper]{scrreprt}     \usepackage{float}     \usepackage{subfig}          \begin{document}          \begin{document}     \begin{figure}[H]   \centering     \subfloat[Sommer während Schwall -- Überblick]     {\includegraphics[width=0.05\textwidth]{HEM_suitability-index.png}     \includegraphics[width=0.85\textwidth]{Drau2/Salmo/ist/SOM/WUA_Asw.png}}             \caption{Habitatverteilung für den Istzustand im Sommer (Bachforelle) -- Übersicht}     \end{figure}          \begin{figure}[H]   \centering            \ContinuedFloat      \subfloat[Sommer während Schwall -- Detail 1 \label{dr:s:ist:d1}]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/SOM/WUA_D1sw.png}}     \subfloat[Sommer w. Schwall -- Detail 2]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/SOM/WUA_D2sw.png}}          \subfloat[Sommer w. Sunk -- Detail 1]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/SOM/WUA_D1su.png}}     \subfloat[Sommer w. Sunk -- Detail 2]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/SOM/WUA_D2su.png}}             \caption{Habitatverteilung für den Istzustand im Sommer (Bachforelle)}             \label{dr:s:ist:som}     \end{figure}          \begin{figure}[H]   \centering              %--- NOT CONTINUEDFLOAT - but it does continue with the letters ---     \subfloat[Winter während Schwall -- Detail 1]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/WIN/WUA_D1sw.png}}     \subfloat[Winter w. Schwall -- Detail 2]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/WIN/WUA_D2sw.png}}          \subfloat[Winter w. Sunk -- Detail 1]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/WIN/WUA_D1su.png}}     \subfloat[Winter w. Sunk -- Detail 2 \label{dr:w:ist:d2}]     {\includegraphics[width=0.49\textwidth]{Drau2/Salmo/ist/WIN/WUA_D2su.png}}             \caption{Habitatverteilung für den Istzustand im Winter (Bachforelle) }             \label{dr:s:ist:win}     \end{figure}          \end{document}      ![](http://i.stack.imgur.com/UUXpt.jpg) I have been using `\phantomcaption` for when I don't need to display the first caption. That causes no problems in the further numbering. Help would be much appreciated because I am totally losing my nerves with subfigures. \- Thanks in advance!


title: Remove black line above references apsrev4

text: I'm using `revtex4` as my document class and `apsrev4` as my bib style. I would like to remove the horizontal black line above the references. How can I do this? Here's what I have without the text:               \documentclass[aps,12pt,tightenlines]{revtex4-1}          \usepackage{graphicx,topcapt,booktabs,SIunits,units,mhchem}               \begin{document}     \bibstyle{apsrev4}     \bibliography{research}          \pagestyle{plain}                              \end{document}      ![Output](http://i.stack.imgur.com/60FmZ.png)


title: Spacing in list of algorithms within classicthesis template

text: Consider the following screenshot: ![enter image description here](http://i.stack.imgur.com/Gw8PT.png) Differently than `\listoffigures`, `\listoftables` or `\lstlistoflistings`, the `\listofalgorithmes` command is adding an extra white space between chapters in the `classicthesis` template. I fixed it by adding two simple lines from a nice answer:               \newcommand*{\noaddvspace}{\renewcommand*{\addvspace}[1]{}}     \addtocontents{lof}{\protect\noaddvspace}      **Questions:**   * Is there a more elegant way to fix the spacing in the `scrreprt` class itself?   * Should this inconsistency be reported to `classicthesis` or `scrreprt` maintainers?


title: Trying to change from subfigure package to subcaption

text: I am working with a template that uses the package subfigure, as I understand that it is outdated (and also because I have problem understanding how to place to figures side by side using this package), I try to change into subcaption package, but it gives me the following error:               Package caption Error: The `subcaption' package does not work correctly(caption) in compatibility mode. \begin{document}      Anyone knows this problem? The packages that I use are:               \usepackage{jcappub}     \usepackage{dcolumn}% Align table columns on decimal point     %\usepackage[reqno]{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{bm}% bold math     \usepackage{hyperref}     \usepackage{url}     \usepackage[sort&compress]{natbib}     \usepackage{txfonts}     \usepackage{color}     \usepackage{epstopdf}     \usepackage{enumerate}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{caption}     \usepackage{subcaption}     % \usepackage{subfigure}     \usepackage{verbatim}     \usepackage{amsmath}     \usepackage{wasysym}


title: A phantom-like command that instead replaces the text with a horizontal line?

text: I'm trying to find a way of replacing part of text with a horizontal line. I'd like it to behave like the phantom command which replaces the text with an empty box of the correct width (and height), but instead put a horizontal line through the box. As a specific example, I'm seeking something like a `\phantomdash` command, where adding it to text in this manner               Lorem ipsum dolor sit amet, \phantomdash{consectetuer adipiscing} elit...      would replace "consectetuer adipiscing" with a horizontal line of the width of the argument "consectetuer adipiscing". _Question_ : Is there a command for this already? If not, what is a way to achieve this?


title: How to replicate the blue rectangles in the modern CV casual template?

text: I searched in the code and in the forums, but I can't seem to find how to pull such a trick. Help me, please. And, in advance, thank you !


title: Formatting my thesis document

text: I'm writing my thesis using `\documentclass[report]` and have two abstract sections in English and French. I switched languages using `\selectlanguage[french]`. I also added Acknowledgements using `\chapter*{Acknowledgements}`. My code is shown below (I have additional packages - not shown here).               \documentclass[12pt, Bold]{report}     \usepackage{tocbibind}     \usepackage[english,french]{babel}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{chngpage}     \usepackage{titlesec}     \titleformat{\chapter}[display]{\large\centering}{CHAPTER\ \thechapter}{0 pt}{ \Large\centering \vspace{-0.1in}}[\vspace*{-0.3in}]     \titleformat{\section} [hang] {\large\bf} {\large\thesection} {5pt} {\large} []      \titleformat{\subsection} [hang] {\bf} {\thesubsection} {5pt} {} []          \usepackage[hidelinks]{hyperref}           \begin{document}     \title{ Title commands \thispagestyle{empty}}     \makettile           \selectlanguage{english}     \begin{abstract}     text here     \end{abstract}     \phantomsection     \clearpage     \addcontentsline{toc}{section}{Abstract}          \selectlanguage{french}     \begin{abstract}     text here     \end{abstract}     \phantomsection     \clearpage     \addcontentsline{toc}{section}{Abr\'{e}g\'{e}}          \selectlanguage{english}     \chapter*{\large\textbf{Acknowledgements}}     text here     \clearpage     \phantomsection     \addcontentsline{toc}{section}{Acknowledgements}          \end{document}        1. The french abstract reads "Resume", I want this to be "Abrégé". I changed this for the table of contents entry but want the page to show "Abrégé" as well.    2. The table of contents lists the abstract, french abstract and acknowledgments but has the same page number for all. When clicked, it leads to the correct section but has incorrect page numbers.    3. The title page has a preceding empty page and a visible page number - 2. I checked several questions here related to these issues but haven't been able to recreate the fixes suggested for my document. Can these be fixed?


title: mdframed vertical space difference

text: in the example below, i used `mdframed` to surround my text with a box. But the vertical space above an below the box are different. I found one way to solve it with `\vspace*{}`. But is there a better way to do it? Because i don't understand why the space below the box is bigger than above? (The version of mdframed is 1.9b)               \documentclass[12pt,a4paper]{article}     \usepackage[utf8x]{inputenc}          \usepackage[framemethod=TikZ]{mdframed}     \parindent0mm          \begin{document}          test1     \begin{mdframed}[skipabove=0pt,skipbelow=0pt]       Das ist ein toller satz     \end{mdframed}     %\vspace*{-16pt}     test2 test test           \end{document}


title: LaTeX techniques and templates for writing a book

text: I am about to write a couple of books using LaTeX. I am fairly used to producing small LaTeX articles using Sweave and R, but I have never written a book using LaTeX and I am not conversant with the LaTeX practices standard for writing books. Also, though I have a few ideas about how to structure such a big document, not having written a book in LaTeX myself, I don't know what works and what doesn't in the long run. The books I am writing are:   * A book with a lot of charts and code (in R), and a few tables. I'll be using Sweave with this.   * A book with a lot of text and a few images. I'll be quoting passages and quite a few poems. An entire section/chapter could consist of poetry. Here are my questions (answers with examples/references will be appreciated):   1. What techniques/best-practices should I follow in writing the books using LaTeX? What are the packages that are typically helpful?   2. What are the packages in LaTeX that I could/should use for typesetting poetry?   3. Sweave is nice enough for including R code, but I would like something that looks more professional. I have seen and used `listings`, and though I still don't have a set of options which looks fancy enough, I am guessing `listings` will do with enough tweaking. Am I missing out on anything? Should I be using `listings` with any other package? Do you have nice `listings` templates to share?   4. Any nice templates for writing books? Or helpful online resources specific to writing books with LaTeX?


title: Creating Tic-Tac-Toe boards with LaTeX/TikZ

text: I am trying to create a diagram of tic-tac-toe boards similar to the one attached below. ![tic-tac-toe boards](http://i.stack.imgur.com/CgfAv.jpg) I cannot seem to find any documentation or examples on how to create these boards in LaTeX or TikZ. Does anyone know of a solution for this sort of diagram?


title: How do I create a pdf file from old tex code?

text: How can I convert the old tex file below into a pdf? I would very much like to know as I have a few other files that I would like to convert. Thanks. PS: I selected the shortest example I had to hand.               \hrule     \vskip 2cm     \centerline{\magtwotenrm Some reciprocal summation identities with      applications to the}     \centerline{\magtwotenrm Fibonacci and Lucas numbers}          \vskip 1cm          \centerline{\magonetenit Derek Jennings}     \centerline{\magonetenrm Faculty of Mathematics, University of Southampton,}     \centerline{\magonetenrm Southampton, Hampshire, SO17 1BJ, England.}          \vskip 2cm          \centerline{\magtwotenrm 1: Introduction}      \vskip 1cm           \noindent In this arcticle we use theta functions and simple telescoping     of series to produce some reciprocal summation results for the Fibonacci     and Lucas numbers. The two results that we prove are the following:     \gap     {\noindent\bf Theorem 1}     $${\left( \sum_{n=1}^\infty {1 \over F_{2n-1}} \right)}^2 -     \sum_{n=1}^\infty {1 \over F_{2n-1}^2} =      2\sum_{n=1}^\infty {1 \over F_{4n-2}^2}$$     \gap     {\noindent\bf Theorem 2}      $$\sum_{n=1}^\infty {\left( {2^n \over L_{2^n} } \right)}^2 = {4 \over 5}$$     \gap     \noindent $F_n$ and $L_n$ are the Fibonacci and Lucas numbers respectively,     satisfying the usual recurrence $U_{n+1}=U_n+U_{n-1}$ where $F_0=0$, $F_1=1$,     $L_0=2$ and $L_1=1$.     \vskip 2cm          \centerline{\magtwotenrm 2: Proof of Theorem 1}      \vskip 1cm     \noindent By simple series rearrangement we have           $$\sum_{n=1}^\infty {q^{2n-1} \over (1+q^{2n-1})^2} =      \sum_{n=1}^\infty (-1)^{n-1}{ nq^n \over 1-q^{2n}}.$$          \noindent Replacing $q$ by $q^2$ in the above then splitting the summation      over the odd and even numbers we obtain          $$\eqalign{     \sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2} &=      \sum_{n=1}^\infty (-1)^{n-1}{ nq^{2n} \over 1-q^{4n}} \cr     &= \sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} -     2\sum_{n=1}^\infty {nq^{4n} \over 1-q^{8n}}. \cr }\eqno(1)$$          \noindent Now a theorem originally due to Guass gives          $$\sum_{n=1}^\infty (2n-1){q^{8n-4} \over 1-q^{16n-8}} =     { \left\{ {1 \over 2} \theta_2(q^4) \right\} }^4$$          \noindent where           $$\theta_2(q) = \sum_{-\infty}^\infty q^{(n+1/2)^2} =     2q^{1/4} \prod_{n=1}^\infty(1-q^{2n})(1+q^{2n})^2.$$          \noindent Therefore           $$\sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} =      {\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2,\eqno(2)$$          \noindent using           $$\theta_2(q^2)^2 = 4 \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} }.$$          \noindent The last equality follows directly from equating the coefficient     of $x$ in (2) of {\bf [1]}.          \noindent Also, by simple series rearrangement we have           $$\sum_{n=1}^\infty { nq^n \over 1-q^{2n}} =     \sum_{n=1}^\infty {q^{2n-1} \over (1-q^{2n-1})^2},$$          \noindent which on replacing $q$ by $q^4$ gives          $$\sum_{n=1}^\infty { nq^{4n} \over 1-q^{8n}} =     \sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(3)$$          \noindent Using (2) and (3) to substitute for the summations in the RHS of     (1) gives          $$\sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2}=     {\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2 -2     \sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(4)$$          \noindent Setting $q=(1-\sqrt 5)/2$ in (4), and using the Binet form      $F_n = (\alpha^n - \beta^n)/(\alpha -\beta)$ of the Fibonacci numbers     ($\alpha = (1+\sqrt 5)/2$, $\beta = (1-\sqrt 5)/2$) we obtain Theorem 1.     \vskip 2cm          \centerline{\magtwotenrm 3: Proof of Theorem 2}      \vskip 1cm     \noindent Our starting point is the identity           $${q \over (1+q)^2} + {4q^2 \over (1-q^2)^2 } = {q \over (1-q)^2}.$$          \noindent This telescopes to          $${q \over (1+q)^2} + {4q^2 \over (1+q^2)^2 } + {16q^4 \over (1-q^4)^2}     = {q \over (1-q)^2}$$          \noindent and continuing the expansion process we arrive at          $$\sum_{n=0}^\infty {2^{2n} q^{2^n} \over (1+q^{2^n})^2} =      {q \over (1-q)^2}.$$          \noindent Now we put $q=(1-\sqrt 5)/2$ in the above identity and use the     Binet form of $L_n = \alpha^n + \beta^n$ of the Lucas numbers ($\alpha$,     $\beta$ as in section 2) to obtain Theorem 2.     \vskip 2cm          \centerline{\magonetenrm References}     \vskip .75cm     \item{[1]} D.Jennings {\sl An identity for the Fibonacci and Lucas numbers}     Glasgow Math. J. {\bf 35} (1993) 381--384.     \vfill\eject


title: Competition time: Design an error page!

text: Or a 404 or the "captcha" image. To go with our amazing new design, we need some amazing pictures to go on the error page, the 404 page, and the captcha page. They should have a lighthearted theme, vaguely related to the purpose of the page, and - of course - be TeX-related (the TeX-purists would say that it has to be actually _generated_ by TeX). For a couple of examples from other sites, see this post on meta by our amazing designer. So ... keyboards at the ready ... and ... _go_!


title: How do I get started with LaTeX on Windows XP?

text: My only knowledge of LaTeX is that it is a markup language that lets me concentrate on the structure of my document rather than its appearance. It uses tags similar to HTML. My problem is that I've only experienced all that through reading tutorials and Wikipedia. How do I start using LaTeX on Windows XP? I have programming experience in Python and MATLAB. I would prefer to start out "raw" or low-level, without any WYSIWYG's, so that I can get my hands dirty and understand how it works. But any answers about WYSIWYG's would surely be helpful as well. I have just installed LyX, but I'm not sure if it fits my "raw" preference well enough.


title: Why is docstrip putting extra macro calls in a hyperlink inside a footnote that has a tilde?

text: Here's a minimal example of Docstrip putting extra macro bits into a `\href` call inside a footnote when the URL has a tilde:               % \iffalse     \documentclass[a4paper]{ltxdoc}     \usepackage{hyperref}     \begin{document}     \DocInput{foo.dtx}     \end{document}     % \fi          % \title{The foo package\thanks{This document corresponds to     %     foo version, dated date.}}     %     % \author{The Author\thanks{Author's website with bad link:     %     \href{http://example.com/~user/} {foo}. Working link:     %     \href{http://example.com/user}{foo}} }     %     % \maketitle     %     % \section{Introduction}     %     % a link that works: \href{http://example.com/~user}     %     {foo}.      In the resulting PDF, the tilde in the URL in the footnote has some TeX macros in it you get:               http://example.com/\protect \unhbox \voidb@x \penalty \@M \ {}user/      so something is wrong with the tilde. How can I fix this?


title: Centered page numbers with headers in memoir class

text: I am in hurry and I really need to know how to style the page in `memoir` class. All the examples in page style such as Rule,empty, headings and Plain doesn't give the combination I need. Plain styles is the closest as it give bottom centered page numbers but without headers. I need both headers and page numbers at bottom centered on every page. Can anybody please give me solution?


title: Alternatives to Inkscape for EPS tagging for psfrag

text: So it seems the latest version of Inkscape is not very `psfrag`-friendly: If you insert text tags into your EPS then upon saving (even if you deselect "Convert text to paths") it still encodes the tags as things like `<01>Tj`, which can be worked around by manually replacing each by something like `(mytag)Tj` in the EPS source, but cumbersome if one has lots of EPS files to tag. Is there another way people are doing their tagging now? perhaps another vector graphics program, or another way to insert text into EPS all together?


title: How similar output do mathptmx and Times New Roman create?

text: How similar output do `mathptmx` and 'Times New Roman' (in Word) create? Times New Roman is the required font type (no comment) at a University for thesises... Is there big differences between the two? I've already checked unsing `lipsum`, they look indistinguishable. Is there specific characters or situations where they are notably different?


title: Background baseline grid with output routine

text: I am trying to get a baseline grid in the background of every page. I am using the plain format with XeTeX. This is what I have tried:               \baselineskip=13pt     \topskip=0pt \parskip=0pt     \newbox\gridbox     \setbox\gridbox\line{%       \special{color push rgb .8 .8 1}%       \vrule height\baselineskip width0pt \hrulefill%       \special{color pop}}     \def\grid{\vbox to0pt{%         \vtop to\vsize{\leaders\copy\gridbox\vfil}}}      Now, the above works just fine if I want to have a grid on a single page, by just calling `\grid`. However, I'd like it to be in every page, so I tried redefining plain's `\pagebody`:               \def\pagebody{\vbox to\vsize{\boxmaxdepth=\maxdepth \grid\pagecontents}}      but the grid keeps drifting from page to page even though I've removed every vertical stretchability/shrinkability. What am I doing wrong? ### UPDATE _Finally_ I managed to figure out what was causing the weird behaviour in my actual document vs. the minimal: it was `\lineskiplimit=-\maxdimen`. No-one could have guessed it of course. I don't know why it affects anything; the way I've understood, its only function is to figure out which one to use, `\baselineskip` or `\lineskip`, and since I have them both set the same, I had the `\lineskiplimit` the way it was. But it seems it's doing something besides that (I've already removed it from the `\displ@y` macro, for example).


title: Lstinline macro inside another environment

text: Why does the MWE below compile with errors only if I use ths `\lstnewenvironment` line? And how to define the verbatim macro inside an environment? I heard it's possible using plain TeX?               \documentclass{article}     \makeatletter     \IfFileExists{randompackageyoudonthave.sty}{     }{     \usepackage{listings}     \lstnewenvironment{Rcode}{\renewcommand\lstlistingname{Rcode}}% deleting this line makes this work     \newcommand{\code}[1]{\lstinline{##1}}     }     \makeatother     \begin{document}     \code{yeah! some code}     \end{document}


title: Boxed notes in MusixTeX

text: I need to put a box around some notes in a MusixTeX score. I've tried with `\fcolorbox`, but I get a white background (not transparent), covering the staff lines. I've also tried with Tikz, but I don't get the right spacing and positioning of notes. Any idea? ![Example](http://i.stack.imgur.com/qdMWQ.png)               \documentclass{article}     \usepackage{etex,musixtex}     \usepackage{tikz}          \begin{document}     \begin{music}     \startextract     \NOtes\wh{cde}\wh{f}\wh{g}\en     \endextract     % I want to box the F note with a red box     \startextract     \NOtes\wh{cde}\fcolorbox{red}{white}{\wh{f}}\wh{g}\en     \endextract     \startextract     \NOtes\wh{cde}\tikz[overlay]\node[draw,red]{\wh{f}};\wh{g}\en     \endextract     \end{music}          \end{document}


title: Simple Characteristic Function or Step Function in pgfplots

text: How would I go about creating a simple characteristic function plot such as this in pgfplots? It is not necessary for my Latex processor to generate the plot based on a function, manually drawing the coordinates and lines will suffice. Is pgfplots an appropriate tool for the job? ![characteristic function plots](http://i.stack.imgur.com/gAJlH.png)


title: pgfplots: 3D surface plot from data with free format

text: I want to plot 3D data from a file (data file) using `pgfplots`. The data represents an ellipsoid. I want to draw the outer shell like in the following picture, just without the background and in grayscale: ![ellipsoid](http://i.stack.imgur.com/nq7rY.png) I tried several approaches following the threads here and here but I had no luck. Eitherway I don't get the outer shell quadrilaterals of the ellipsoid, or gnuplot is running at 100% CPU load for several minutes without any result. Is it possible to do this with `pgfplots` and gnuplot or GNU Octave? How can it be done? Is the TeX memory sufficient? My MWE:               \documentclass{scrreprt}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{pgfplots}     \usepackage{tikz}     \usetikzlibrary{calc}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{figure}[htb]     \centering     \begin{tikzpicture}     \begin{axis}     \addplot3 [surf] gnuplot [raw gnuplot] {set dgrid3d 1152,1152 spline;splot 'criterion.txt';};     \end{axis}     \end{tikzpicture}     \end{figure}          \end{document}


title: How to use the primitive \the with dimen?

text: I know that I need to put an internal quantity after `\the`. I know the expansion is a list of tokens of catcode 12 (except for space characters). I know the next problem :               \skip0=30pt plus 2pt\relax     a\hskip\the\skip0 minus 1pt b      a\hskip\skip0 b       a\hskip\skip0 minus 1pt b      but in the sources of pgf/tikz, I see for example               \def\pgfgetlastxy#1#2{%         \edef#1{\the\pgf@x}%         \edef#2{\the\pgf@y}%     }%      `\pgf@x` is often preceded by `\the`. Why is `the` necessary in such cases? Do you know an example with a problem ?


title: How do I remove alphabetical grouping of acronyms in the list?

text: I would like an acronym list with equal vertical space between each acronym. My list is grouping acronyms that start with the same letter. How is this avoided? Here is the code for a MWE with this "problem":               \documentclass[11pt,a4paper,openany,oneside]{book}          \usepackage[acronym,nonumberlist,toc]{glossaries}     \usepackage{glossary-superragged}     \makeglossaries          \renewcommand*{\acronymname}{List of Acronyms and Abbreviations}     \renewcommand*{\glspostdescription}{} % remove trailing dot     \renewcommand{\glsnamefont}[1]{\textbf{#1}}     \newacronym[longplural={Affinity Diagrams}]{ad}{AD}{Affinity Diagram}     \newacronym{dom}{DOM}{Document Object Model}     \newacronym{svg}{SVG}{Scalable Vector Graphics}     \newacronym{spa}{SPA}{Single Page Application}          \begin{document}          \tableofcontents     \printglossary[style=super, type=\acronymtype]          \section{First section}          Here we go... \gls{ad}, \gls{dom}, \gls{svg} and \gls{spa}!     \end{document}      I get the following output: ![enter image description here](http://i.stack.imgur.com/UEf0o.png)


title: \usepackage]{listings} - Overfull \box problem - Smaller characters/font?

text: I am using this LaTeX code to implement some Python code in my LaTeX generated pdf document. I am using `\lstdefinestyle` because I have multiple styles for different code that I want to implement in the same file.               \lstdefinestyle{numbers} {numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=8pt}     \lstdefinestyle{MyFrame}{backgroundcolor=\color{yellow},frame=shadowbox}          \lstdefinestyle{Python}{language=Python,             frame=lines,             basicstyle=\ttfamily\small,              keywordstyle=\color{keywords},             commentstyle=\color{comments},             stringstyle=\color{red},             showstringspaces=false,             identifierstyle=\color{green},             procnamekeys={def,class}}      I am implementing in this way:               \begin{lstlisting}[style=Python]        print 'here the code'     \end{lstlisting}      The problem is that the code is going to give me an _`Overfull \hbox`_ error when I compile the LateX code. I wrote the code keeping an eye on the "gray line" on the right in my Python editor (Spyder): ![Code Example](http://i.stack.imgur.com/5EEm4.jpg) Unfortunately many code lines that don't go above the grey line that you can see in the picture (which I tought was a mark to show where to stop writing) will not fit in LaTeX. Is there anything that I can do to resize the code so that I don't get this result: ![LaTex Example](http://i.stack.imgur.com/KH3Y7.jpg) I would like the text to stay all inside the red line when it stays inside the gray line in Spyder. If I am asking too much I would like a solution to scale down the code so that it can enter in the box. Maybe there is something in lstlisting that I can use to resize the code? Re-writing the programs is not a solution :D.


title: Does anybody know a good source of (free) ornaments, decorations, frames, backgrounds etc.?

text: I'd like to prepare a "fancy" typographical project, more interesting visually than a "boring" black-on-white text. I'm not very talented at drawing, though, so I'd like to ask about a place to find (colorful) page backgrounds, page "frames", chapter title frames and the like. (I am aware of various "ornament" fonts, but this is not exactly the same thing - the things I'm asking for are bigger and not "monochromatic".) Both bitmaps and tikz/metapost programs would be welcome. I am also aware that it is very easy to "overdo" such things and get an ugly effect, but I'm going to accept this risk;). Note: this question is not exactly TeX-related, rather typography-related, so if there is a better place to ask this question, I'll be happy to learn about it, too.


title: Problems with accented characters in xelatex

text: The accented Portuguese characters work well when compiled with _pdflatex_ but not with _xelatex_ giving an _inputenc_ error. Why?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[portuguese]{babel}     \usepackage[T1]{fontenc}     \author{Sérgio}     \title{Há muito açafrão}     \begin{document}     \maketitle     Words/letters with accents: Sérgio áéíóúçãõ.     \end{document}


title: Draw a tRNA diagram

text: I am new to TeX. I want to draw a figure with many tRNA secondary structure Which packages to use to draw the tRNA itself? Are there any guides or tutorials? ![enter image description here](http://i.stack.imgur.com/DfDGx.png)


title: Proper outline in Devanagari and Arabic fonts

text: > Please save your time and energy on this question, I also submitted one > possible solution. Zdeněk Wagner, a Czech TeXist, in his article (the Zpravodaj journal of the Czechoslovak TeX Users Group, 1/2013) mentions a problem of getting proper outline font, e.g. for Devanagari and Arabic fonts, by using the `\pdfliteral` command. This is an example and a preview typeset in the CODE2000.TTF font. The problem is that we actually see how glyphs are put together, see picture on left, the correct form is shown in picture on right. How to get from the left picture to the right one? Why this example is running with `lualatex`, but not with `xelatex`?               %! {xe|lua}latex mal-deva.tex     %   xelatex is not working, lualatex does work     \documentclass[a4paper]{article}     \pagestyle{empty}\parindent=0pt     \usepackage{fontspec}     \usepackage{xltxtra}     \begin{document}     \huge     % http://web.archive.org/web/20101122142710/http://code2000.net/CODE2000.ZIP     \setmainfont[ExternalLocation]{CODE2000.TTF}%     \def\malword{देवनागरी}% Term in English: Devanagari     \pdfliteral page {q 2 Tr 0.7 w 0 0 1 0 k 1 0 1 .1 K}     \malword     \pdfliteral page {Q}     \end{document}      ![mnwe](http://i.stack.imgur.com/EYRwz.png)


title: How to typeset elementary combinatorics?

text: How would one typeset basic combinatorics, like variation and combination? For example, when using `\(V'_n^k\)` for variation with repetition, `n` and `k` are not vertically aligned. Something like `\(V'\begin{smallmatrix}k\\n\end{smallmatrix}\)` comes close, but the spacing is a little to wide, and it isn't left-aligned. So, what's the best or usual way to do this? (Preferably also working with MathJax.)


title: Sort bibliography file according to order of appearance of citations in LaTeX document

text: I am asking this question, because there does not seem to be an easy way in LaTeX to solve this problem: two documents sharing same reference numbering. My question: Is it possible to order a bibliography according to the order of appearance in a LaTeX document. What I originally wanted to do is mentioned in the link above, but as a workaround I would like to presort the references according to order of appearance in one document and give them the same citation numbers in the other document. I could then use `\nocite{*}` to the same bibliography in both documents with the same reference-numbers.


title: Graph of dependencies from LaTeX file

text: This is inspired by the MO question here. Suppose I'm writing a math paper, with theorem and proofs, etc. At the end of writing, I want to design a graph of dependencies, that is, a graph containing every theorem, lemma, etc., and directed arrows for when one theorem relies on some other lemma, theorem, etc. in its proof. What would be a slick way of doing this? I know the actual drawing of the graph will be hard, so I'm more interested in how to write this data to a file in an interesting way. Just redefining the `proof` environment, for example, seems to work, but how to get the actual theorem numbers/names in the graph data? It seems one would have to actually redefine the ref command in a more subtle way, and I don't know how to do that. It would be even cooler if you could control a few parameters, like maybe instead of looking "locally" at theorems, you could be more "global" and just look at chapter dependencies (and thus generate a Leitfaden), and maybe even more gradations in between. There could also be "threshold" parameters, so that one chapter has to reference another, say, 10 or more times before it becomes important enough to include in the graph data. You could even go crazy and include bibliography references too! I don't know the appropriate tags for this, so feel free to change them.


title: align* not aligning properly with \sqrt

text: Using this, everything is aligned properly:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     16x^2&=144&\text{| }&\text{sqrt}\\     4x&=12&\text{| }&\div\space 4\\     x&=\{3,-3\}     \end{align*}     \end{document}      However, if I change `\text{sqrt}` to `\sqrt` in an attempt to try to use the square root symbol instead, the text which is on the next line of code is put on the same line, right next to the square root symbol.


title: Unwanted question marks using beamer, tikz and mindmaps

text: I'm trying to use the `mindmaps` library inside a `beamer` presentation. After typesetting, I get questions marks that I didn't include. I just don't know where they come from. Can anyone tell me why this happens and how to avoid it? These are my MWE and the output slide:               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{mindmap}          \title{Presentation}     \author{Author}     \date{\today}          \begin{document}          \begin{frame}     ￼\frametitle{Basic concepts}     ￼￼￼￼     \begin{tikzpicture}[mindmap,concept color=blue!80]       \node [concept]                 {Root concept};       \node [extra concept] at (10,0) {extra concept};     \end{tikzpicture}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Lt0gB.png)


title: Errors with Japanese-English format

text: I am writing a paper, and it should be formatted with specific format. Somehow I got many errors and Google did not help. I want some experts to help me figure out and fix it. It is reporting following errors, ![errors when build](http://i.stack.imgur.com/2NnMj.png) When I click one of the errors, it pointed to at the end of .cls file. ![pointing to .cls file](http://i.stack.imgur.com/GxJuu.png) This LaTeX file is a sample file provided to me. But on my machine it is reporting such errors, thus, prevent me using this format. I am using windows7 64bits, and I made full installation of MikTeX 2.9. And now I could not figure out how to fix that.


title: Is there any advantage to using \addbibresource over \bibliography?

text: I've always used `\bibliography` to tell BibTeX where my bibliography is, and when I moved to `biblatex`, I didn't change. I see a lot of `biblatex` answers use `\addbibresource` instead. What is the advantage of this new command over its older rival?


title: pgfgantt not working with babel

text: In this example month names are printed in English even the babel package is loaded with French language.               \documentclass{article}     %\usepackage[pdftex,active,tightpage]{preview}     %\setlength\PreviewBorder{2mm}     \usepackage[frenchb]{babel}     \usepackage{pgfgantt}     \usepackage{lscape}                \begin{document}          \begin{landscape}              \begin{tikzpicture} % optional                 \begin{ganttchart}[x unit=2.5mm, time slot format=isodate]{2014-04-28}{2014-07-11}                     \gantttitlecalendar{month=name} \\                      \ganttbar{Task 1}{2014-04-28}{2014-05-10} \\                  \end{ganttchart}             \end{tikzpicture}         \end{landscape}          \end{document}      Babel is not working with pgfgantt?


title: How can I get items in my bibliography listed with square brackets?

text: I would like to use square brackets for citations in the text and in the bibliography. I figured out how to adapt the citations in the text, but I just don't find any way how to change the appearance of my bibliography. I am "condemned" to use a pre-defined document class. With this, I didn't need to insert a bibliographystyle. Instead, the bibliography could simply be created by inserting the command \bibliography{bib-file} in the text. There was also the option to change the style of citation in the text by using \citestyle{plain}. However, I don't know where both of those commands are configured or where they can be adapted. So the question is: Which are the corresponding files or parts to change the style of the bibliography? Thanks


title: How to make a portion of curve red using TikZ?

text: I want to make the the closed loop part of the figure by "ultra red" color only and the other part by blue. (from `(2,0) .. (0,0.93) .. (-0.93,0) .. (0,-0.93) .. (2,0)`)               \documentclass{standalone}             \usepackage{tikz}             \usetikzlibrary{hobby,decorations.markings}             \begin{document}             \begin{tikzpicture}[use Hobby shortcut]               % filled points               \fill (0,0) circle (1pt);               \fill (2,0) circle (1pt);               % middle crossing loop               \draw (3,-1) .. (2,0) .. (0,0.93) .. (-0.93,0) .. (0,-0.93) .. (2,0) .. (3,1);             \end{tikzpicture}             \end{document}      Please suggest what to do. Also suggest me if I include arrows into the curve, how to make changes of colors in to the arrows?


title: Problem with side-by-side tables

text: I've checked out related questions here, and found similar answers via Google, and still can't figure out why the following code does not produce two side- by-side tables. They are narrow enough to fit on the page, but for any variation of textwidth, using either parbox or minipage, I always get the tables stacked vertically on top of each other instead of left to right. I must be missing something obvious, but this is driving me nuts. What have I done wrong?               \documentclass{article}     \usepackage[margin=1in]{geometry}     \begin{document}          \begin{table}[h]      \begin{minipage}{0.4\textwidth}       \centering       \begin{tabular}{|l|l|c|}\hline         Site & Species & Abundance \\\hline         S1 & A.rubrum & 25 \\         S1 & A.saccharum & 5 \\         S2 & Q.rubrum & 45 \\\hline       \end{tabular}       \caption{Long-form data}       \label{tab:long-form}     \end{minipage}          \begin{minipage}{0.5\textwidth}      \centering      \begin{tabular}{|l|c|c|c|}\hline       Sites & A.rubrum & A.sacch & Q.rubrum \\\hline       S1    & 25 & 5 & 0 \\       S2    & 0 & 0 & 45 \\\hline      \end{tabular}      \caption{Wide-form data}      \label{tab:wide-form}     \end{minipage}          \end{table}          \end{document}


title: trackchange and citations

text: Trackchange for latex on sourceforge seems to have a problem with citations.               \change{text 1 \cite{Fels\_81}pad1}{text2 \cite{Fels\_81} pad2}      creates a problem due to the brackets encountered. Is there a work around to this?


title: Sublime Latexing and Knitr on .RNW files : Send lines to R console for evaluation

text: I am using Sublime Text 3 and the Latexing package to apply Knitr to compile .Rnw files that contain both Latex and R code. Overall, it works well in that I can compile the .Rnw files into PDFs nicely. But, I am not able to get an important piece of functionality to work as compared to what I have in .R files. Specifically, I am not able to send small pieces of code to R without compiling whole .Rnw file. I can compile the entire .Rnw file just fine, and that will of course evaluate all of the code chunks that I have knit into the document and create the PDF. I would like to be able to send small pieces of code to be evaluated in the R console without needing to compile the entire .Rnw file. (This is essentially what you can do in R Studio, and is useful for figuring out whether the code that I am including in the .Rnw file does what I want it to do without needing to compile the entire .Rnw file each time or without needing to copy/paste it into some other running R console). When I am just editing a .R document, I can do this via Command + Enter (using the Enhanced R package for Sublime) but this also doesn't work when editing a .Rnw document. Ideally, I'd like to be able to send it via REPL to the R console right within Sublime. Are there ways to accomplish this in Sublime that I don't know about, or are they just features that have yet to be developed?


title: Shifting text out of tabular cell

text: Is there a simple and robust way to achieve what is illustrated by the two black arrows below, i.e., shifting the title in a right-aligned column right by a fixed amount. ![](http://i.stack.imgur.com/fyJQT.png)               \documentclass[12pt]{article}\usepackage{array}     \begin{document}          \begin{tabular}{l>{\raggedleft}p{3.5cm}@{}}     Coltitle1 & Coltitle2 \tabularnewline     AB & 5 \tabularnewline     A & 11 \tabularnewline     AC & 10 \tabularnewline     \end{tabular}          \begin{tabular}{l>{\raggedleft}p{3.5cm}@{}}     Coltitle1 & LongColtitle2 \tabularnewline     AB & 5 \tabularnewline     A & 11 \tabularnewline     AC & 10 \tabularnewline     \end{tabular}     \end{document}      I'd like to avoid bad box(es)-warnings. Also, I would prefer (=not absolutely necessary) if the right end of the table would stay where it is, i.e., directly adjacent to the numbers. I.e.,               Coltitl|e2         instead of       Coltitle2|           5|                                  5  |          10|                                 10  |         ...|                                  ...|      where `|` marks the right end of the table.


title: trackchanges VS latexdiff

text: I am trying to decide whether to choose `trackchanges` or `latexdiff` for corrections on my thesis. Can anyone tell me their views? I have had problems with `latexdiff` choking on equations (is there any easy way out of that?). When someone says               "compile it with track-change option"      do they mean specifically trackchange or could it also be for latexdiff?


title: Drawing tree like structure

text: I have to draw the following figure. What I have now is uggly. Somehow the structure should be more balanced. Is there a way to do this with tikz-qtree? The point is that it is multiple dominance and furthermore the node lables are not within the tree but next to it. The top node does not have a label.               \documentclass{minimal}          \usepackage{pstricks}               \begin{document}          \begin{pspicture}(0,0)(10,10)     \rput[B](1,0){German}     \rput[B](3,0){Dutch}     \rput[B](5,0){Danish}     \rput[B](7,0){English}     \rput[B](9,0){French}     \rput[B](1.5,2){SOV}     \rput[B](1.5,1.6){VC}     \rput[B](3,4){V2}     \rput[B](7.7,2){SVO}          \psline(1,0.4)(4,5)     \psline(2,2)(3,0.4)     \psline(3.4,4)(5,0.4)     \psline(5,0.4)(7,2)     \psline(7,2)(7,0.4)     \psline(4,5)(9,0.4)     %\psgrid     \end{pspicture}          \end{document}


title: Displaying vectors in picture environment

text: I wanted to graph three vectors in the picture environment of LaTeX. One vector $x$ is from the origin to the point (1,2), another vector $y$ is from the origin to the point (3,1), and the sum $x + y$ is from the origin to (4,3). The length of $x$ is \sqrt{5}, the length of $y$ is \sqrt{10}, and the length of $x + y$ is 5. So, the length of $x + y$ should be more than 2.2 times longer than the length of $x$ and the length of $x + y$ should be more than 1.5 times longer than the length of $y$. This is not depicted in the graph. The lengths of $x$ and $x + y$ appear to be the same. I thought that maybe the horizontal axis may be scaled differently than the vertical axis. You can see that the length of the x-axis is the same as the length of the y-axis, and I set both the width and height to 100 (units). Does anybody have any comments about this? (I have used the TikZ package to display these vectors properly.) Is the picture environment in LaTeX really that bad? Here is the code. (I multiplied the lengths of all three vectors by 10. So, the length of $x$ is not 2.236068, which is about \sqrt{5}, it is 22.36068, which is about 10\sqrt{5}.)               \setlength{\unitlength}{1mm}          \begin{picture}(100,100)          \put(0,10){\vector(1,0){100}}          \put(102,8){$x$}          \put(10,0){\vector(0,1){100}}          \put(12,98){$y$}          \put(10,10){\vector(1,2){22.36068}}          \put(10,10){\vector(3,1){31.622777}}          \put(10,10){\vector(4,3){50}}          \end{picture}


title: Wrapping text in a table cell

text: My text alignment of the column headers - "Cumulative Number of Courses Required to be Passed" and "Cumulative Number of Senior Courses Required to be Passed" are clearly wrong. I do recognise that these are unusually long column headers, but I can't think of a more precise term than that at the moment. ![enter image description here](http://i.stack.imgur.com/lZ771.png) What I'd like is the two column headers to "wrap" more around the "BSc" and "EDP", although not exactly. Perhaps if the cut off is on the word "Courses" (move 'Required' to the second line), that would be nice. Also is it possible to move the EDP columns a bit more to the right, so that it is more closely aligned with the word "Courses" above? MWE:               \documentclass{article}     \usepackage{booktabs, threeparttable}     \usepackage{array}     \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}          \begin{document}     \begin{table}[H]     \begin{threeparttable}     \caption{Minimum Requirements for Automatic Readmission into the Science Faculty}     \label{table:sci}     \begin{tabular}{@{}p{0.18\textwidth}*{4}{L{\dimexpr0.1\textwidth-2\tabcolsep\relax}}@{}}     \toprule     & \multicolumn{2}{c}{\bfseries Cumulative Number of Courses Required to be Passed} &     \multicolumn{2}{c}{\bfseries Cumulative Number of Senior Courses Required to be Passed}  \\     \cmidrule(l){2-3} \cmidrule(l){4-5}     & BSc & EDP & BSc & EDP  \\     \midrule     First-year & 2 & 2 & --- & ---  \\     Second-year & 7 & 6 & --- & --- \\     Third-year & 11 & 10 & 3 & 2 \\     Fourth-year & 15 & 14 & 6 & 5 \\     \bottomrule     \end{tabular}     \end{threeparttable}     \end{table}     \end{document}


title: Problems installing LaTeX packages

text: I'm running TeXnicCenter 1.0 and have just started in LaTeX. I have managed to get text in, get a lot of the formatting commands working and have rendered to pdf. It's awesome. My problem is packages, specifically `wasysym`. I have been googling and tried:   * placing `wasysym.sty` in `C:\Program Files (x86)\MiKTeX 2.8\tex\latex\wasysym`   * placing `wasysym.sty` in the folder containing the document file   * running Refresh FNDB from `mo.exe` \- I get a permission denied error. No matter what happens, whenever I try to render a file containing `\usepackage{wasysym}` it refuses to render. I don't know enough about the error messages to work out what's happening. Can someone please help? PS I don't have trouble with standard/built-in packages like `parskip` etc. Just when I tried to install `wasysym` it threw a tantrum.


title: How to hide references from navigation bar in beamer class?

text: I am doing a presentation using the `beamer` class with the `Warsaw` theme. Further, I have to disclose my bibliography at the end of the presentation. Unfortunately, as soon as I type in               \bibliography{}      it is automatically treated as another section and therefor displayed in the navigation bar. However, I would like to hide this from the navigation bar. If it was a "normal" section/subsection, I simply could rely on               \section[]{section1} or \subsection[]{1.1}      using empty square brackets. But obviously, as mentioned above, `beamer` treats the command for bibliography automatically as another section. Hence, is there any simple code to hide exclusively the "reference section" from the navigation bar? I am using `natbib` following this question here: Beamer and Natbib Consequently, the MWE looks as follows:               \documentclass[12pt,english,hideothersubsections]{beamer}          %-------style of references------     \usepackage[sort]{natbib}     \setcitestyle{round,comma,aysep={,}}     \usepackage{filecontents}     %-----------          %------LAYOUT--------     \usetheme{Warsaw}%vordefiniertes Layout.     \usecolortheme{wolverine}%vordefinierte Farbgebung.     \usefonttheme{professionalfonts}%Schriftart.          %---------------     %Content titlepage:     \title[]{title}     \date[]{\today}     \author[]{author}     \institute{institution}     %--------------          \begin{document}          \makeatletter          \begin{frame}[plain]     \hspace*{-\beamer@leftsidebar}%     \advance\textwidth by \beamer@leftsidebar\relax     \beamer@leftsidebar=\z@     \begin{minipage}{\textwidth}\par%       \maketitle     \end{minipage}     \end{frame}     \makeatother          \section{section 1}     \subsection{subsection 1.1}     \begin{frame}         text 1     \end{frame}          \section{section 2}     \subsection{subsection 2.1}     \begin{frame}         text 2     \end{frame}          \section{section 3}     \subsection{subsection 3.1}     \begin{frame}         text 3     \end{frame}               %\section[]{References}          \begin{frame}{}     \scriptsize          \bibliographystyle{abbrvnat}     \bibliography{MAbib}     \end{frame}          \end{document}      I do not know how to implement in the MWE a source for `bibtex`. Hopefully it is working anyway. Thanks in advance for any input!


title: With biblatex, is it possible to replace one author of an author list by a bibnamedash or idem string?

text: With biblatex, the author can be replaced by a dash (or “idem”) in the bibliography. Is it possible to have this replacement also if there are multiple authors, and the first of these multiple authors is the same as the author of the book listed before? (It is somewhat difficult to describe, see the attached example instead, where “Buchautor, Hans-Wilhelm” should be replaced in `book3` as well.) I assume that it should be possible by customising `\DeclareNameFormat`, but I don’t know how. Minimal example:               \documentclass{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{book1,       author = {Buchautor, Hans-Wilhelm},       title = {Irgendein Buch},       location = {Buch am Wald},       date = {2000}     }     @BOOK{book2,       author = {Buchautor, Hans-Wilhelm},       title = {Ein anderes Buch},       location = {Berlin},       date = {2001}     }     @BOOK{book3,       author = {Buchautor, Hans-Wilhelm and Zweitautor, Zoran},       title = {Noch ein Buch},       location = {London and New York},       date = {2010}     }     \end{filecontents}          \usepackage[     style=authortitle,     backend=bibtex8     ]{biblatex}     \bibliography{\jobname}          \renewcommand*{\bibnamedash}{%       \bibstring[\mkbibbold]{idem\thefield{gender}}}          \begin{document}     \nocite{*}          \printbibliography     \end{document}      **Edit 15/02/2011 17:14** I should have added that there was a feature request for biber which pointed back to biblatex. See this feature request. **Edit 21/06/2011 9:26** Is this somehow possible now with biblatex 1.4/1.5? I played a bit with uniquename/uniquelist, but I could not get it to work.


title: Beamer overlays and XYpic

text: Let's suppose we have some really really trivial XY-pic drawing:               \xymatrix {       A & B \\       C & D     }      What I want to achieve would be something like:   1. Only `B` and `D` are visible on slide 1   2. On slide 2, we get an arrow between `B` and `D`   3. On slide 3, `A` appears and there's an arrow between `D` and `A` I can get the nodes to appear using the Beamer `\uncover` command, but the arrows seem to happily ignore that. Is there some way to get arrows only (from or until) certain overlay slides?


title: Biomedical Engineering: Applications, Basis and Communications bibtex style

text: I have a `bst` format problem about submit journal paper to the "Biomedical Engineering: Applications, Basis and Communications" In recently, I found the more similarity type that the output looks like: >   1. Batzoglou S, Jae DB, Stanley K, Butler J, Gnerre S, Mauceli E, Berger > B, Mesirov JP, Lander ES: **ARACHNE: a whole-genome shotgun assembler**. > _Genome Res_ 2002, 12:177-189. > but the BME journal request type as follows: >   1. Batzoglou S, Jae DB, Stanley K, _et al_., ARACHNE: a whole-genome > shotgun assembler, _Genome Res_ **12** :177, 2002. > Note: the et al will occur when number of authors is more than three * * * Thus, how can I modify the currently `bst` to the correct one?


title: How to change the height of a (multi)row in tabular with math

text: I have the following code:               \documentclass{article}     \usepackage{multirow}     \begin{document}     \begin{table}[htbp]         \centering             \begin{tabular}{lcccl}       \textbf{Irland}       &    -   &   -    &     x    &   $ FE_{UN}(t) - FE_{UN}(t=2003)$     \\ \hline       \textbf{Portugal} &   x  &   x &    x  &    \multirow{2}{*}{$ FE_{UN}(t) - \displaystyle{ \frac{1}{2}\cdot\sum_{u=t-2}^{t-1} FE_{UN}(u)}$}    \\        \textbf{Spanien}  &           x  & x   &     x     &  \\ \hline             \end{tabular}     \end{table}     \end{document}      which simply doesn't look good. ![enter image description here](http://i.stack.imgur.com/ytFc2.png) How can I fix this?!


title: What is the default \parskip in memoir?

text: Everywhere the usual word is that it is 0. But that is clearly wrong, it is 0 + some rubber length. But how is that rubber length defined? In my search I found the following definition in the memoir source:               \setlength\parskip{0\p@ \@plus \p@}      Now what does that actually mean? How can I for example scale it down so the rubber length is half the size? Half of what by the way? There is no number there just a `\p@` is that a length?


title: Best LaTeX Templates for books and lecture notes

text: I have written and submitted a lectures series in mathematics in arXiv, arXiv:1211.3404. Its format is book, but I have some difficulties with it. For example for page numbering, indexing, etc. I am going to extend my lecture notes in the form of a relatively long book, so I need to choose a better template for my work. I am looking for an easy to use and perfect book template in Latex. I need a template that allows indexing, adding appendices, different page numbering for introduction and content, different numbering for exercises. It is also favorable if the template (preferably) does not use so many user packages.


title: Using Arabic letters in moderncv package

text: I'm trying to include a small snippet or Arabic script into my document. This works fine if I use the documentclass `article`, but I'm using the `moderncv` package as provided here, and for some reason, it won't play nice with any of the Arabic packages for LaTeX (that I know of). Note: my MacTeX distribution also packages a `moderncv` package, but I think it's different: they give slightly different results. In fact, my document, as it is, doesn't compile with this version of `moderncv`. Anyway, I'm failing to include my piece of Arabic script. I've tried the following things:   * `\usepackage{polyglossia}`. But it requires XeLaTeX, and my document doesn't seem to want to compile with XeLaTeX (only with pdfLaTeX). I think there are some other XeLaTeX based solutions as well.   * `\usepackage{arabtex}` When I try to compile this, I get the following error, which I don't know how to resolve:              ! Undefined control sequence     <argument> \rm \it          l.551 \settransfont {\rm \it }                                   % standard font for transliteration        * `\usepackage[LAE,T1]{fontenc}\usepackage[arabic]{babel}` This gives me the following error: `! LaTeX Error: \tableofcontents undefined.` This is actually easy enough to fix: `\newcommand{\tableofcontents}{}`. Rinse and repeat for a few other commands. Until, finally, I get this error message:              ! Undefined control sequence.     \thetable ...\number \c@table .\number \c@chapter                                                        }\protect \else \protect \...     l.24 \section{Arabic}      Again, I don't know how to resolve this.   * Finally, I try setting the font directly, like this:              \usepackage[LAE,T1]{fontenc}     ...     {\usefont{LAE}{cmr}{m}{n}\selectfont العربية}      This does give me Arabic letters in my document, but they will end op left-to- right, and they will be the isolated forms of the letters, instead of joined letters. I don't mind if the solution is ugly, I just want it to work. It's only a few words in an otherwise completely English document. Here's a minimal document with the `moderncv` package that will reproduce the problem (on my machine, at least).               \documentclass[11pt,a4paper]{moderncv}     \usepackage[utf8]{inputenc}          \firstname{ABC}     \familyname{XYZ}     \title{curriculum vitae}          \begin{document}          \maketitle     \section{A section}          (...a few words in Arabic here...)          \end{document}


title: glossaries alignment disregarding prefix

text: This is a follow up question to glossaries and phantom. It was about the following alignemnt in a glossary:                symbol     #symbol      other     #other      rather than               symbol     #symbol     other     #other      I wanted to align terms as this and decided to use phantom, however this solution has the disadvantag that there is **to much whitespace** when I use the glossary symbol in text, since the phantom part appears as well. Is there any good solution to have the phantom part only in the glossary but not when using the term in text?               \documentclass{report}     \usepackage[sanitize=none]{glossaries}         \makeglossaries%          \newglossaryentry{nc:line:num}{         name=thing,         symbol=\ensuremath{\protect\hphantom{\#}l},         description=other thing}     \newglossaryentry{nc}{         name=thingy,         symbol=\ensuremath{\#l},         description=something}            \usepackage{glossary-mcols}     \begin{document}         \printglossary[style=altlong4col]         \clearpage%         nc:line:num glossary entry '\glssymbol{nc:line:num}`, notice the whitespace after the '     \end{document}


title: Textpos not showing anything

text: I'm trying to create a business card in LaTeX. Accordingly, I want to use `textpos` to absolutely position the various elements. **For some reason, textpos is just not showing anything.** What I want is for it to show things, where I put them. Any suggestions for how to fix this? Before anyone asks, yes, the `\includegraphics` command works just fine outside of the `textpos` block. There is no difference in `textpos` behaviour whether or not I have the M -- that is just to sanity check that the margins are as expected (i.e. none) I'm using MikTeX on Windows. My LaTeX is below.               \documentclass{beamer}          \usepackage{fontspec}     \usepackage[absolute,showboxes,verbose]{textpos}     \usepackage{geometry}     \geometry{paperwidth=90mm, paperheight=45mm, layoutwidth=90mm, layoutheight=45mm, left=0mm, top=0mm, right=0mm, bottom=0mm}          \usetheme{}     \setbeamertemplate{navigation symbols}{}           \begin{document}     %\fontspec[Ligatures=Rare,Contextuals=Swash,Contextuals=Alternate,StylisticSet=1,Style=TitlingCaps,Style=Alternate,Style=Swash,Contextuals=Swash]{Breathe Pro}\fontsize{12pt}{12pt}\selectfont     \fontspec{Palatino Linotype}\fontsize{12pt}{12pt}\selectfont     M          \begin{textblock*}{49mm}(10mm,10mm)\includegraphics[width=49mm]{tustinlogo01.png}\end{textblock*}          \end{document}


title: Figure goes to the end of the section

text: I am writing a paper using TeX, and I want to make this; > bla bla.... page of text but talking about Fig.1 bla bla * * * > New page with only the Fig. No text * * * > New page with text bla bla I tried `\begin{figure}[p]` but it put the figure to the end of the chapter. I tried here, but whatever I do, I get either the picture inside the paragraph with other text or the picture at the end of the chapter.


title: using ref inside chapter or section in lualatex

text: As stated in the original title of the thread, I would like to use a reference number inside a section name. Actually, it is to refer using the structure like               \section{Data related to Figure~\ref{fig:XY}}      The MWE for what I want is:               \documentclass[11pt,twoside,a4paper]{book}     \usepackage{hyperref}     \begin{document}     \chapter{First}\label{c:First}     \chapter{I want to use ref~\ref{c:First} here }\label{c:Second}     \section{Dummy section}     \newpage     \section{Dummy section in new page}     \end{document}      I tried to run such file into LuaLaTeX several times, since I am using it for my actual project. The related line in log output is               LaTeX Warning: Reference `C:FIRST' on page 4 undefined on input line 16.      The PDF file is generated, but the chapter name in page 4 becomes               CHAPTER 2. I WANT TO USE REF ?? HERE      I tried to find a possible duplicate, but I didn't find. Thanks in advance.


title: How to indent the graphics caption

text: I am writing my thesis in LaTeX with the document class `scrreprt`. My problem is that I include a graphic whose description starts at the left side of the page, which is usually nice, but in my case I have an `itemize` and `description` environment where the text already has a big gap towards the left border. I want the description of the graphic to be indented too. This options should not be set globally but only for this one picture.               \begin{description}     \item[I) ] bla     \item[II) ] bla       \begin{itemize}         \item bla         \item bla           \begin{center}         \includegraphics[width=0.88\textwidth]{bla.pdf}         \captionof{figure}[bla]{this text should show up further to the right}         \label{fig:bla}           \end{center}     \item[III) ]     \end{itemize}     \end{description}