title: Wrong behaviour of wrapfigure environment when using "placement = outer"

text: I'm trying to place some pictures inside my text using the wrapfig package of Donald Arseneau with KOMAscript of Markus Kohm. The intention is to place the pictures partly in the margin area at the outer side of a twosided document. According to the package documentation I have to set the `placement` parameter value to the capital letter `O` to gain _the outside edge–far from the binding_ , and the `overhang` parameter to a value of _how much the figure should hang out into the margin_. That's what I have done in the attached minimum working example. As you can see in the attached picture, this works fine on odd pages, but the picture is misplaced on even pages. Additional it seems that the `overhang` parameter -- different from the manual's description -- specifies the value how much the figure should hang into the **text** (not the margin). Is it my fault, or a bug in the package?               \documentclass[twoside]{scrartcl}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{blindtext}          \begin{document}          \section{Hello, World!}     \Blindtext          \begin{wrapfigure}{O}{1cm}         \includegraphics[width=3cm]{qr}     \end{wrapfigure}     \Blindtext          \blindtext          \begin{wrapfigure}{O}{1cm}         \includegraphics[width=3cm]{qr}     \end{wrapfigure}     \Blindtext          \end{document}      ![enter image description here](http://i.stack.imgur.com/qGWME.png)


title: Reference in LaTeX chapter style

text: I would like to add a note in the LaTeX Chapter environment that the work I am describing in the following has been published in a paper. In other words, it should look something like this:               Chapter 6          The Evolution in research          The research described in this Chapter has been published in:     R. Moor and J.Morris. The Evolution of Research, Workshop on     Education, 2010, pp. 180-190               Once upon a time ....       Or alternatively:               The research described in this Chapter has been published in:     R. Moor and J.Morris. The Evolution of Research, Workshop on     Education, 2010, pp. 180-190          Chapter 6          The Evolution in research               Once upon a time ....       Anyone an idea if there is something like a template for doing that in LaTeX?


title: Natbib: merging author(s) with the same name(s)

text: I defined the following command in my manuscript:               \newcommand{\citesep}[2]{\citeauthor{#1}#2~\cite{#1}}      which allows me to print, for instance, "Knuth and Tarjan's algorithm [16]" using `\citesep{knuth-681}{'s algorithm}`. However, this causes an unwanted behaviour with papers with the same authors; for example, `\citesep{knuth-681,knuth-702}{'s work}` produces "Knuth and Tarjan, Knuth and Tarjan's work [16,17]" whereas I'd like it to print "Knuth and Tarjan's work [16,17]". Any idea how to fix that?


title: adaptive \ldots with no ("...") spacing

text: Due to the typographic traditions I'm used to, I prefer my `\ldots` to have no spacing in between, ideally exactly the same amount as in text. In math mode I would like to write things like `\(1, 2, \ldots, n\)` and have the spacing be adaptive:   * if the next character is a comma, I'd like something very thin like `\kern .08333em` (i.e., half of a `\thinspace`) afterwards;   * if there is an opening parenthesis ("(", "[", "{", ...) before or a closing parenthesis (")", "]", "}", ...) after the dots, there should be no or only tiny additional spacing (i.e., less than `\kern .08333em`);   * and whatever other adaptations of space _around_ `\ldots` or `\dots` are normally produced by (La)TeX;   * _feel free to add other ideas_. What is the best way of redefining `\ldots` for these purposes?


title: Fine tuning of a wrapfigure?

text: When no other solution seems available, fine tuning by hand may be helpful. Lately, I was trying to raise the content of a `wrapfigure` because it was eating the bottom margin. I had something like:               \begin{wrapfigure}{r}{6cm}\centering     \raisebox{20pt}{     \begin{minipage}[t]{5.8cm}     figure content     \caption     \end{minipage}}     \end{wrapfigure}      but it does not work. Would you have a solution? We have to make sure that the `wrapfigure` environment does not know that something is moved inside. (It makes me think of the `\mathclap` command from the `mathtools` package).


title: Indent a package listitem

text: I'm new to latex and I understand how to indent lists, but what if they are lists items that are derived from a package. In this case, I really like the `moderncv` package. Here is a working example.               \documentclass{moderncv}     \moderncvtheme[green]{classic}        \firstname{Joe}     \familyname{Blow}     \begin{document}     \maketitle     \section{Profile}     \cvline{Wet-Lab}{\Large Protein expression and purification}     \cvlistitem{Novel cloning strategies}     \cvlistitem{Novel Pufication strategies}     \cvlistitem{Cell culture and maintenance}     \end{document}      I need the `\cvlistitem` indented slightly more than the package gives. Any advice?


title: Can I use latexmk -C for cleaning up only, and compile with another tool?

text: Can I compile my document with other tools and use `latexmk -C` **only for cleaning** up? One application could be to use it then in the `clean:` section of a `Makefile` that uses `pdflatex` for `make pdf`.


title: How can I prevent page breaks from occuring inside the body of a function?

text: Is it possible to tell the listings package to not insert page breaks inside a function body?               void foo()         {     //  Do not insert page break here         }          //But here is fine


title: How to configure Okular so that I can locate the line approximately correct, when in forwardPDF

text: I am using `Kile` editing my `tex` files, with `Okular` for viewing the `dvi` and `PDF` files. And I can search the source file from PDF fairly well. I have configured `Kile` as follows in order to highlight the source line when search incontrovertibly:               Configure Kile->Editor->Fonts & Colors->Text Area Background,       then I changed the default color of `Current line` into blue for example, thus I can locate the line when I clicked `Shift+Click` in `PDF` file. But I can not do so when in `ForwardPDF`, that is from `tex` to `PDF`. What I have seen is just the page of the `PDF` file that corresponds to the source file. How can I configure my `Okular` (or `Kile`), so that I can locate the line (for example, by highlight the line) when in `forwardPDF`?


title: Force longtabu width + skip vertical space between tables

text: Here is an MWE:               \documentclass[10pt]{article}     \usepackage[a6paper]{geometry}     \usepackage{longtable}     \usepackage{tabu}          \begin{document}          \begin{longtabu} to \textwidth {|X|p{10mm}|p{10mm}|p{10mm}|}         \hline              \multicolumn{4}{|p{60mm}|}{             \centering \textbf{W2014-000001}                  Heading text for first type: this one has start and end         } \\          \hline         \textbf{Name} & \textbf{Start} & \textbf{End} & \textbf{Value} \\         \hline         \endfirsthead         \hline         \textbf{Name} & \textbf{Start} & \textbf{End} & \textbf{Value} \\         \hline         \endhead         Name1 & Start1 & End1 & Val 1 \\ \hline         Name2 & Start2 & End2 & Val 2 \\ \hline         Name3 & Start3 & End3 & Val 3 \\ \hline         Name X & StartX & EndX & ValX \\ \hline     \end{longtabu}          \begin{longtabu} to \textwidth {|X|p{10mm}|p{10mm}|p{10mm}|}         \hline         \multicolumn{4}{|p{60mm}|}{             \centering \textbf{W2014-000002}                  Heading text for second type: it has longer names         } \\           \hline         \multicolumn{3}{|p{50mm}|}{\textbf{Long name}} & \textbf{Value} \\         \hline         \endfirsthead         \hline         \multicolumn{3}{|p{50mm}|}{\textbf{Long name}} & \textbf{Value} \\         \hline         \endhead         \multicolumn{3}{|p{50mm}|}{This is a bit longer name 1} & Value1 \\ \hline           \multicolumn{3}{|p{50mm}|}{This is a bit longer name 2} & Value2 \\ \hline           \multicolumn{3}{|p{50mm}|}{This is a bit longer name 3} & Value3 \\ \hline         \multicolumn{3}{|p{50mm}|}{This is a bit longer name X} & ValueX \\ \hline           \end{longtabu}                          \end{document}      Looks like this: ![enter image description here](http://i.stack.imgur.com/JQySI.jpg) I want to make them the very same width, and also have zero vertical space between them. In other words, they should look like a single table. Using a single longtabu is not an option, because first heading and other headings are different for the two tables! I wonder why it is not stretching to \textwidth?


title: Differences in texlive implementations

text: I run the same input file in two computers, one having TeX Live/Debian under Ubuntu, the other with TeX Live/opensuse under SUSE 11.1. The second one fails to handle the file properly. In particular, it cannot resolve references of type `\ref{label}` in the list of figures and (probably therefore) it cannot break lines properly. Reading the log-files I just notice that pdfTeX under SUSE loads many additional packages not loaded by the Ubuntu distribution. Questions: Have you seen similar problems before? Anywhere I could read to get advice? How can I control which packages should pdftex load within each distribution?


title: Conference Announcement Poster

text: I am creating a conference announcement poster which can be downloaded here. The poster is not finished yet. I need to add list of invited speakers, information about registration, and NSF grant info which we got to pay for expenses. There are people on this forum who know infinitely more about TeX, typography and creating posters than me. Could you kindly tell me your opinion about what I have done so far, share some of your own samples or direct me to possible templates? I actually have a very nice template of conference poster but it is ill suited for conference announcement. I am just afraid that what I have done so far doesn't look professionally. On the top of it the background image is apparently cut due to my incompetence. The source code is available here. ![enter image description here](http://i.stack.imgur.com/PNz3Z.png)


title: break line at comma inside listings

text: I'm trying to do some listings environments, but I'm encountering problems. The ideal output is this:               [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦     ⤷ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦      ⤷ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦      ⤷ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,⤦     ⤷ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦     ⤷ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦     ⤷ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]      And it actually works for smaller lines such as this example, however, for bigger lines I get an error "! Dimension too large." As you can see I have a space (' ') after each comma, so one way to make the lines smaller would be to take out the space. However, when I do that, the line breaking stops working... I don't mind taking out the whitespace, but then I need some way of telling the lstlisting environment to **break line at commas** (','). Here is my working environment:               \usepackage{MnSymbol}      \lstset{prebreak=\raisebox{0ex}[0ex][0ex]         {\ensuremath{\rhookswarrow}}}      \lstset{postbreak=\raisebox{0ex}[0ex][0ex]         {\ensuremath{\rcurvearrowse\space}}}      \lstset{breaklines=true, breakatwhitespace=true}


title: How should I manage to get titled and untitled paragraphs together?

text: I know, the question doesn't explain too much. That's why I'm going to do that here. I'm writing a technical paper and I have a few sections. Within each section, there are a few paragraphs. Some of them are titled with `\paragraph` but some of them not. The thing is: when I have an untitled one below a titled one, the untitled one looks odd. Graphically seems that it is contained in the other, even using indentations. My question is: When I use `\paragraph`, should I use it in each paragraph of the section? Written in another way: Can untitled paragraphs be between titled ones? Is that correct? Anyway, the paragraph titles are more seen in other kinds of documents, not essentially Technic. So, feel free to recommend me how to organize better the document structure. P.S.: Making a `\subsection` would be too much. I mean, the info in each section is not enough to do that.


title: Number Algorithm floats with dependency (subalgorithms environment)

text: What I have: 3 algorithms, like so:               \begin{algorithm}     \caption{Caption One}     ...     \label{alg:one}     \end{algorithm}          \begin{algorithm}     \caption{Caption Two}     ...     \label{alg:two}     \end{algorithm}          \begin{algorithm}     \caption{Caption Three}     ...     \label{alg:three}     \end{algorithm}      What I want: I want algorithm 1 to be numbered in the same manner as the rest of the algorithms in the document, say, as **Algorithm 1**. Then I want Algorithms 2 and 3 to be numbered **Algorithm 1a** (or 1.1, or 1-a, or whatever) and **Algorithm 1b**. Then I want numbering to continue as previous, so that the next algorithm is **Algorithm 2**. Can this be done, and if so, how?


title: TikZ graph not aligning

text: I am having two issues with TikZ pictures. I have three graphs side by side, and I am having issues, but only with some of them, which is very odd. First the x-axis is going out of alignment (some graphs 0 is starting above the x axis). Further, sometimes they are appearing on the right side of the page (all 3 as a whole). Does anyone know what's up? ![enter image description here](http://i.stack.imgur.com/LGClQ.png) ![enter image description here](http://i.stack.imgur.com/UNydk.png)               \usepackage[numbers]{natbib}     \usepackage{graphicx}     \usepackage{url}     \usepackage{mathtools}     \usepackage{listings}     \usepackage{afterpage}     \usepackage{subcaption}          \usepackage{tikz}     \usepackage{pgfplots}          \lstset{basicstyle=\ttfamily\footnotesize,breaklines=true}          \begin{figure}[tbp]     \centering     \begin{subfigure}{0.26\linewidth}     \caption{Average Playback Version}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1,  2},     xticklabels={0.5, 1, 2.375},     enlargelimits=0.15,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,1.0) (1,2.730392156862745) (2,5.5777777777777775)}; %no prefetching     \addplot         coordinates{(0,2.227722772277228) (1,4.368932038834951)(2,5.821256038647343)}; %1ahead     \addplot         coordinates{(0,3.308080808080808) (1,5.458128078817734) (2,5.894230769230769)}; %2ahead     \addplot         coordinates{(0,3.645320197044335) (1,5.579710144927536) (2,5.91866028708134)}; %3ahead     \addplot         coordinates{(0,3.6161616161616164) (1,5.586538461538462) (2,5.913461538461538)}; %4ahead     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Playback Smoothness}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1,  2},     xticklabels={0.5, 1, 2.375},     enlargelimits=0.15,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,1.0) (1,0.35290032443312624) (2,0.3632628202048895)}; %no prefetching     \addplot         coordinates{(0,0.054394041151172384) (1,0.07615289788041628)(2,0.22011558857202693)}; %1ahead     \addplot         coordinates{(0,0.03554400773960198) (1,0.14257504150852274) (2,0.3774166052065033)}; %2     \addplot         coordinates{(0,0.03961959500334247) (1,0.16638478387140487) (2,0.3830491443385205)}; %3     \addplot         coordinates{(0,0.019048507238026372) (1,0.15373343226268732) (2,0.38489573116089204)};   %4     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Prefetching Overhead}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     xtick={0, 1, 2},     xticklabels={0.5, 1, 2.375},     enlargelimits=0.15,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,0.0) (1,0) (2,0)}; %no prefetching     \addplot         coordinates{(0,0.1419330653262516) (1,0.20864903902261225)(2,0.08526972243645012)};     \addplot         coordinates{(0,0.30093283802483317) (1,0.15273218048993692) (2,0.05025336703845387)};     \addplot         coordinates{(0,0.4714792928713229) (1,0.1685468393484924) (2,0.04331154050139798)};     \addplot         coordinates{(0,0.8938421340289666) (1,0.2328490684012425) (2,0.055865530184037435)};         \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \caption{PC Browser: Constant Available Bandwidth}     \end{figure}


title: TTF font not displaying lowercase letters

text: I'm trying to use an OCR-A font in a LaTeX document to embed a short code. I've finally got it reading a system font that I've installed (I think from ocr-a-font), which works well in any other application that I've tried it in, including GIMP, Inkscape, and Synfig. When I try to use it in my LaTeX document, I'm only seeing the uppercase and numeral characters.               {\fontfamily{ocra}\fontseries{m}\fontshape{n}\selectfont [xxxx-xxxx] }      The document is an `article`, with `hyperref`, `enumitem`, and `tikz`, and I'm compiling with `pdflatex`. MWE (requires font to be installed, so I don't know how useful it will be)               % mwe.tex     \documentclass{article}     \begin{document}     {\fontfamily{ocra}\fontseries{m}\fontshape{n}\selectfont aBcD-0123 }     \end{document}      When compiled with `pdflatex mwe.tex`, I only see `BD-0123`. ![MWE Output \(PDF viewed in Document Viewer\)](http://i.stack.imgur.com/R8LCV.png) Might anyone know what is causing this, and how it could be remedied?


title: Vertical alignment problem with \arraystretch and m column definition

text: For some reason, in `m{}` columns, once `\arraystretch` pushes row height above the text height, the text ceases to be absolutely aligned. Instead, the first line is centered vertically and the rest fall below it. Any thoughts on why this is and/or how to fix it?               \documentclass{article}     \usepackage{array}     \begin{document}     \renewcommand{\arraystretch}{4}     \noindent\begin{tabular}{m{3in}c}         \hline         [19:21] time to take the tree outside\newline         [19:21] but I just let him back in! &          [19:21] time to take the tree outside\\     \hline     \end{tabular}     \end{document}        Okay, here's the more complete version.               \documentclass{article}     \usepackage{array}     \usepackage{tabularx}     \newcommand{\ccol}{\centering\arraybackslash}     \renewcommand{\tabularxcolumn}[1]{>{\ccol}m{#1}}     \begin{document}     \renewcommand{\arraystretch}{4}     \noindent\begin{tabularx}{\textwidth}{m{2.1in}X}         \hline         [19:21] time to take the tree outside\newline         [19:21] but I just let him back in! &          [19:21] time to take the tree outside\\         \hline     \end{tabularx}      \end{document}


title: Alignment at specific character with S column from siunitx

text: To avoid starting a new question yet again, I'll use this tread as the problem is the same as the first one.               \documentclass{article}          \usepackage{booktabs,dcolumn}     \usepackage{calc}     \usepackage[locale=DE]{siunitx}          \newcommand*\mc[1]{\multicolumn{2}{c}{#1}}     \newcommand*\Alignment[1]{% Alignment at `--'.       \multicolumn{1}{r@{}}{\llap{\makebox[\widthof{--}][c]{#1}}}     }          \begin{document}          \begin{table}      \centering      \caption{Something.}      \label{tbl:4}       \begin{tabular}{                  S[table-format=2.0]         @{--}    S[table-format=2.0]         @{\quad}                  S[table-format=5.0]         @{\quad}                  S[table-format=5.0]       }        \toprule         \mc{St{\o}jniveau}       & {1994} & {2005-planen} \\         \mc{\si{\decibel}}       & {---}  & {---}         \\        \midrule         55                  & 59 & 19491  & 12430         \\         60                  & 64 &  7111  &  2644         \\         65                  & 69 &  1191  &   320         \\         70                  & 74 &   280  &    43         \\         \Alignment{$> 75$}  &    &    52  &     1         \\        \bottomrule       \end{tabular}     \end{table}          \end{document}      ![output2](http://i.stack.imgur.com/NtbXq.jpg) How do I get the correct alignment in the first column?


title: underfull \hbox (badness 10000) in paragraph

text: Why do I get the message: > Underfull `\hbox` (badness 10000) in paragraph at lines 107--108 I want a blank line between the problem name and the table, but if I use `\\` or `\newline` along with a blank space, or if I use two `\newline`, I get the "underfull `\hbox`" message.               \begin{solution}{1.2}\newline % Line 107              \newlength{\mylen}\settowidth{\mylen}{$p \to q$}% Widest element             \begin{tabular}{*{5}{|>{\centering\arraybackslash\rule{0pt}{1.05em}}m{\mylen}}|}                 \hline                 $p$ & $q$ & $p \land q$ & $p \lor q$ & $p \to q$\\                 \hline                 T & T & T & T & T\\                 \hline                 T & F & F & T & F\\                 \hline                 F & T & F & T & T\\                 \hline                 F & F & F & F & T\\                 \hline             \end{tabular}         \end{solution}


title: Xelatex and pdfLatex and thesis template

text: I'm trying to use this template here to right my thesis. I am using xelatex because i need to write my thesis in greek. The template works great when i compile it usint xelatex without adding xgreek package. But after adding it all hell breaks loose :). This is what i get I add this:               \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont{Arial}      and get this:               10] [11]) (./Appendices/AppendixA.tex [12]     Παράρτημα \MakeUppercase {α\anw@true \anw@print \relax }.     ! Undefined control sequence.     \MakeUppercase ...ppercaseUnsupportedInPdfStrings     l.3 \chapter{AppendixTitleHere}     % Main appendix title     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      I don't know what can be wrong...I tried other templates and always get wierd errors like environment not defined. But i see in the .sty file it is defined and so the .sty file is used inside the main.tex file....I am getting bit frustrated and really wanted to use latex...


title: Change whitespace above and below a section heading

text: I want to change the spacing around a section heading so that there is less of a gap between it and the paragraph that follows. I found the following commands               \usepackage[compact]{titlesec}       \titlespacing{\section}{0pt}{0pt}{0pt}      But that produces the error `Package titlesec Error: Entered in horizontal mode.`. Googling has not found any useful answers for that. Is there another way to change the spacing around headings or is there an easy fix for that error? Im using fancyhdr and sectsty if that makes a difference.


title: How to draw a split arrow

text: > **Possible Duplicate:**   >  How to draw a Sankey Diagram using TikZ I want to have an arrow which splits up and one end is pointing then downwards. When you compile the code below you should see my progress by far. I couldn't upload an image and ascii art is not my field of talent. ![enter image description here](http://i.stack.imgur.com/3RoCj.png) But when you see the picture, you can obviously see my problem. My code looks like this:               \documentclass[tightpage]{standalone}     \usepackage[pdftex,active,tightpage]{preview}     \usepackage{varwidth}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}     \usetikzlibrary{arrows}          \begin{document}       \begin{preview}         \begin{varwidth}{20\linewidth}           \newcommand{\splitarrow}[3] {             \node[inner sep=0pt] (thirdnode) at ($ (#1.east)!.333!(#2.west) $) {};             \node (twothirdnode) at ($ (#1.east)!.666!(#2.west) $) {};             \node (twothirdbelownode) [below=2em of twothirdnode] {#3};             \draw[line width=2ex] (#1.east) -- (thirdnode.center);             \draw[line width=1.5ex,-triangle 90 cap]                ([yshift=0.25ex]thirdnode.center) -- ([yshift=0.25ex]#2.west);             \draw[line width=0.5ex,-fast cap,draw=red]                ([yshift=-0.75ex]thirdnode.center) to[bend angle=45,bend left]                  (twothirdbelownode.north);           }                \begin{tikzpicture}             \node (nodeleft)  {};             \node (noderight) [right=3em of nodeleft.west] {};             \splitarrow{nodeleft}{noderight}{$\eta$};           \end{tikzpicture}         \end{varwidth}       \end{preview}     \end{document}      Thanks for any help! Cheers Reza Edit: Did some better picture: ![enter image description here](http://i.stack.imgur.com/qx5wQ.png) here the code:               \newcommand{\splitarrow}[3] {       \node (twothirdnode) at ($ (#1.east)!.666!(#2.west) $) {};       \node (twothirdbelownode) [below=2cm of twothirdnode] {#3};       \draw[line width=1cm,-triangle 90 cap] ([yshift=0.75cm]#1.east) --          ([yshift=0.75cm]#2.west);       \draw[line width=0.5cm,rounded corners=20pt,-fast cap] (#1.east) -|          (twothirdbelownode);     }


title: Remove dots from TOC, have page numbers right after titles

text: When looking for some inspiration for how to come up with a template for my thesis, I came across the wonderful `classicthesis` package. Since I'm working on some very progressive material, however, I was more looking for a `modernthesis` kind of style and am now composing that for my own taste. One thing I really like about `classicthesis` is that the page numbers appear right after section titles in the table of contents. I would also like to have that for my documents, which use KOMA-Script throughout. How can I do that?


title: Location of the numeration in the text

text: I been looking to see how to put the location of the numeration of the different sections to one side of the margin, something like this. ![enter image description here](http://i.stack.imgur.com/s3h7K.png) As you can see the numeration is "before" of the beginning of the margin. Is that possible in lyx?


title: Repairing old tkz-2d TIKZ Example

text: I want use the following TikZ example: TikZ Example Intersecting arcs However, the package `tkz-2d` has been superseeded by `tkz-euclide`. It produces numerous errors and the ouput is a little dot. Downloading an old version of tkz-2d didn't help either as it produced even more errors.               \documentclass{article}          \usepackage{tikz, tkz-euclide}          \usepackage[graphics,tightpage,active]{preview}     \setlength{\PreviewBorder}{3pt}     \PreviewEnvironment{tikzpicture}     \begin{document}          \begin{tikzpicture}       % Initialize tkz-2d and set the range of x and y values       \tkzInit[xmin=-4.1,xmax=5.2,ymin=-4.1,ymax=8]       \tkzClip            % Define two points using TikZ. Note TikZ coordinates can be given       % in polar form.       \coordinate (A) at (100:8);       \coordinate (B) at (50:8);            % Draw a circle. Note star form of \tkzPoint defines points but does       % not draw them.       \tkzPoint*(0,0){C} % center of circle       \tkzPoint*(0,4){R} % radius of circle       \tkzCircle(C,R)            % Define the points that are tangent to the circle where the tangent       % line passes through either A or B       \tkzTgtFromP(C,C,R)(A){D}{E}       \tkzTgtFromP(C,C,R)(B){F}{G}            % Compute the distance between A and D (the result is stored in       % \tkzmathLen)       \tkzMathLength(A,D)            % Fill and highlight the sector centered at A       \tkzFillSector*[color=blue!80!black,opacity=0.5](A,\tkzmathLen pt)(D,E)       \tkzArc*(A,A,D)(D,E)            % Fill and highlight the sector centered at B       \tkzMathLength(B,F)       \tkzFillSector*[color=red!80!black,opacity=0.5](B,\tkzmathLen pt)(F,G)       \tkzArc*(B,B,F)(F,G)            % Find the intersection of the two arcs         \tkzInterCC(A,A,D)(B,B,F){H}{I}            % Draw the intersection       \tkzDrawPoint[pos=below left](I)     \end{tikzpicture}          \end{document}      Can someone help to get this working?


title: Separating edges starting from same node

text: I have following code -               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,automata,calc,shapes, positioning}          \begin{document}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,node distance=3.0cm,thick]       \tikzstyle{every state}=[fill=white,draw=black,text=black,minimum size=45pt]            \node[state]         (A) {$A$};       \node[state]         (B) [right of=A] {$B$};       \node[state]         (C) [right of=B] {$C$};                 \path (A) [loop above] edge (A);       \path (A) edge (B)              (B)  edge  (C)              (A) edge [bend left=45] node [above, xshift=-2mm,yshift=-3.5mm,very near start] {$1$} (B)               (A) edge [bend left=45] (C);           % Hard-coded the token location since i don't know about it.      \fill[black] (0.00,1.75) circle  (2pt);     \end{tikzpicture}          \end{document}      This generates an image like this - ![enter image description here](http://i.stack.imgur.com/ZIYLF.png) However, I would like to add some text to the edges. Thus I want to have my output something like this - ![enter image description here](http://i.stack.imgur.com/O8XNY.png) How can I achieve this in the Tikz? Thanks ! Raj


title: Crossing bonds in chemfig

text: Sometimes, molecular structures have crossing bonds, and we want to indicate which bond is in the foreground. In the `chemfig` example below, I have done this by first drawing a thick, white bond to an empty fake substituent; this bond then serves as a background for a real bond.               \documentclass{minimal}     \usepackage{chemfig}     \setatomsep{6em}     \begin{document}     \chemfig{                   A            -[:-45]B       -[:180,0.75]C             -[:45]D             }     %                      \quad\quad      %     \chemfig{                    A             -[:-45]B        -[:180,0.75]C             (-[:45,,,,white,line width=3pt]) % fake substituent              -[:45]D              }     \end{document}      ![enter image description here](http://i.stack.imgur.com/JooGt.png) This works, but there must be a better way. `chemfig` is built on `tikz`, so may be the `tikz.decorations` library can be used to create a bond style that carries its white background with it at all times. Does anyone know how to do this?


title: pstricks drawing has overlap with text

text: The following code produces a figure that has overlap with my text in LaTeX. It seems as if latex doesn't create a space for this figure. Can anybody help me with it?               \documentclass[12pt,oneside,english]{book}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=3cm,rmargin=3cm}     \pagestyle{plain}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{float}     \usepackage{amsmath}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \numberwithin{equation}{section}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{qtree, amssymb, amsthm, graphicx,graphics, makeidx,esint,bm,pstricks,pst-node,pst-tree,algorithmic,algorithm}               \makeatother               \begin{document}     \begin{figure}[H]     \begin{align*}     \psmatrix     \cnodeput(0,-4){E}{ e_{n-1} }     \cnodeput(-2,-2){A}{ e_{n-2} }      \cnodeput[fillstyle=crosshatch,hatchsep=6pt](2,-2){C}{ e_{n-2}^* }     \cnodeput(-4,0){A1}{e_{n-3}}      \cnodeput[fillstyle=crosshatch,hatchsep=6pt](0,0){A2}{ e_{n-3}^* }     \cnodeput(-6,2){A11}{ \ldots }     \cnodeput[fillstyle=crosshatch,hatchsep=6pt](-2,2){A12}{ \ldots }     \psset{nodesep=3pt}      \ncarc{->}{E}{A}      \ncarc{->}{E}{C}     \ncarc{->}{A}{A1}      \ncarc{->}{A}{A2}     \ncarc{->}{A1}{A11}      \ncarc{->}{A1}{A12}     \endpsmatrix     \end{align*}\caption{\label{fig:Selection-of-edges}Selection of edges in Algorithm}     \end{figure}     this is some text in the document     \end{document}


title: generate simple cylindrical shape with text in latex (tikz)

text: I am attempting to generate the following diagram in latex: ![enter image description here](http://i.stack.imgur.com/GeXoR.png) I've been using the tikz package, which although its capabilities seem to be endless, it does have a rather steep learning curve. I am currently learning how to generate simple diagrams including circles, arrows, squares, and have no idea how to include text yet. I am working through the manual so I will eventually have a good understanding of the tool, but as of yet, the diagram shown is beyond my capabilities. Could someone specify how I should go around generating this diagram? Many thanks for your help.


title: Appendix in beamer: customizing page format

text: Here is a simple example of a beamer document. Say that I have an appendix called A and an appendix B. In appendix A, I have three slides. This should appear with numbering A.1, A.2 and A.3, while in appendix B, I have two pages. These should appear as: B.1 and B.2 I have done these things so far:               \documentclass[xcolor=dvipsnames,11pt,mathserif]{beamer}      \usepackage{appendixnumberbeamer}     \usetheme{CambridgeUS}      \usecolortheme{seagull}     \setbeamertemplate{items}[ball]      \setbeamertemplate{blocks}[rounded][shadow=true]      \useoutertheme{infolines}     \everymath{\displaystyle}     \usepackage{easylist}            \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{xfrac}      \usepackage{amssymb}     \usepackage{ulsy}       \usepackage{graphicx}     \usepackage{epstopdf}      \usepackage{appendix}     \newtheorem{acknowledgement}{Acknowledgement}       \newtheorem{algorithm}{Algorithm}     \newtheorem{axiom}{Axiom}     \newtheorem{case}{Case}     \newtheorem{claim}{Claim}     \newtheorem{conclusion}{Conclusion}     \newtheorem{condition}{Condition}     \newtheorem{conjecture}{Conjecture}     \newtheorem{criterion}{Criterion}     \newtheorem{findings}{Findings}     \setbeamertemplate{navigation symbols}{}      \DeclareGraphicsExtensions{.pdf,.png,.jpg, .eps}          \author{PSK}      \title{My title}                \begin{document}          \begin{frame}     \titlepage     \end{frame}               \section{Introduction}     \begin{frame}{}     The aim of this presentation is to provide insight to 4 papers. These papers talk in general about the following topics:           \begin{itemize}     \pause     \item Spatial Equilibrium  \\     \pause     \item Inter-temporal dynamics \\     \pause     \item Marine Reserves \\     \pause     \item Exploitation of resources across space     \end{itemize}          \end{frame}               \section{Brock $\&$ Xepapadeas}          \begin{frame}[label = Brock-Xepapadeas]     They develop a local stability analysis. The problem that they have to solve is                      \hyperlink{model}{\beamergotobutton{here}}:     \end{frame}               \begin{frame}{}     \begin{itemize}     \item Spatial domain is a circle.      \item Current value Hamiltonian suggests that negative diffusion means that the movement in space is from low shadow values to higher ones. Authors identify a new mechanism, ODI, used to study pattern formation.     \item They use \textit{LQ approximation} to check the stability of the system.     \item (Main finding): If problem has quadratic payoff, linear transition functions, then the optimal dynamics are unstable.     \item Main target: Analyze the diffusion induced instabilty.      \end{itemize}          \begin{claim}     Diffusion may act as a stabilizing force when FOSS is unstable. The only way for this to happen is if we have a negative eignevalue.     \end{claim}          \end{frame}                    \begin{frame}{}     Critique     \begin{itemize}     \item Possible extension by the introduction of another state variable.     \item Spatial domain can be enriched (\textit{e.g.}, use fractal framework)      \item The study of diffusion by \textit{kernels}.     \item Use stochasticity      \end{itemize}     \end{frame}          % Hyperlinks should be placed to appendix          % Appendix part for hyperlinks          \appendix          % appendix frame 1          \section*{Appendix}     \begin{frame}[label = model]     The model:      \begin{small}     \begin{align}         \underset{\{u(t,z)\}}{max}\displaystyle  & \int_{z_0}^{z_1}\int_{0}^{\infty}e^{-\rho         t}f\left(x(t,z), u(t,z)\right)\,dtdz \\         \vspace{4mm}             & \text{s.t.} \quad \frac{\partial x(t,z)}{\partial t} = g(x(t,z), u(t,z)) +         D\cdot\frac{\partial^2 x(t,z)}{\partial z^2} \text{,} \quad x(t_0,z) \, \text{given} \\     \vspace{4mm}     & \text{with spatial boundary conditions} \notag \\     \vspace{4mm}     & (x(t,z_0)) = x(t,z_1) = \bar{x}(t) \text{,} \quad \forall t \, \text{the space is a         circle}      \end{align}      \end{small}          Back to \hyperlink{Brock-Xepapadeas}{\beamergotobutton{main}}     \end{frame}               \end{document}


title: Table input from separate .tex file

text: I am trying to use the `\input` command to insert a table produced by STATA (statistics software). The problem is that I am unable to adjust the size of the table, I have tried `\resizebox` and other options with various errors. My code looks like this:               \documentclass[12pt, a4paper, abstracton, norsk]{scrartcl}                    \usepackage[onehalfspacing]{setspace}                    \usepackage[T1]{fontenc}                                 \usepackage[utf8, latin1]{inputenc}                      \usepackage{graphicx}               \begin{document}               \clearpage     \begin{singlespace}          \begin{table}          \input{table}          \end{table}               \end{singlespace}          \end{document}      the table.tex file looks something like this:               \begin{center}     \begin{tabular}{lcc} \hline      & (1) & (2) \\      & ACA & ACA \\      & str\_all & str\_all \\     VARIABLES & Baseline FE & full controls \\ \hline     \vspace{4pt} & \begin{footnotesize}\end{footnotesize} & \begin{footnotesize}\end{footnotesize} \\     str\_all\_1982 & 0.0159 & 0.0234 \\     \vspace{4pt} & \begin{footnotesize}(0.0131)\end{footnotesize} & \begin{footnotesize}(0.0143)\end{footnotesize} \\     Share age>60 &  & -0.303 \\     \vspace{4pt} & \begin{footnotesize}\end{footnotesize} & \begin{footnotesize}(0.371)\end{footnotesize} \\     Constant & 0.876*** & 0.910*** \\      & \begin{footnotesize}(0.00104)\end{footnotesize} & \begin{footnotesize}(0.0938)\end{footnotesize} \\     \vspace{4pt} & \begin{footnotesize}\end{footnotesize} & \begin{footnotesize}\end{footnotesize} \\     Observations & 118,319 & 117,831 \\     $R^2$ & 0.016 & 0.025 \\     Cohortdummies & yes & yes \\     Kommunedummies & yes & yes \\     clustering & kommune & kommune \\     Fylkesdummies & no & no \\     vgo fixed & no & no \\     komm time trend & no & no \\     fylke time trend & no & no \\      Kommuner & 235 & 235 \\ \hline     \multicolumn{3}{c}{\begin{footnotesize} Robust standard errors in parentheses\end{footnotesize}} \\     \multicolumn{3}{c}{\begin{footnotesize} *** p$<$0.01, ** p$<$0.05, * p$<$0.1\end{footnotesize}} \\     \end{tabular}     \end{center}


title: Remove comma from moderncv's \cventry

text: This image shows the excerpt of a CV produced with the `moderncv` document class: ![](http://i.stack.imgur.com/R7Lu8.png) Notice that after the bold text there is a comma. This seems to be produced automatically. How can I stop this?


title: Equation Labeling and xypic

text: Suppose I have the following TeX code for a diagram using xymatrix:               \begin{align}\label{diagram}     \xymatrix{     C\ar[r] & D &\\     B\ar[u] &   & \\     A\ar[u] &   &}     \end{align}      This creates a diagram with the equation label lining up with the first row, so it looks something like "C -> D (1)". How do I get it to line up with the B so that the equation label is aligned with the vertical center of the diagram?


title: Please help me fix a problem of tabbing

text: I typed a paragraph in `tabbing` environment. I use `\=` to place tab, and `\>` to move to tab position. It's alright with short line. But with long line, it out of line width. I don't know how can fix error. Please help me, here my code and resutlt:               \documentclass[12pt]{extbook}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}          \begin{document}          \begin{tabbing}          where \hspace{5mm}\= is the index for a typical neuron in the hidden layer \\     \> i is the index for a typical neuron in the input layer \\     \> $v_{ji}$ is the typical weight connecting $j^{th}$ neuron in hidden layer to $i^{th}$ neuron in the input layer //     % \> n is the number of outputs      % \> $b_j$ is the bias and f is the output\\     \end{tabbing}     \end{document}      ![enter image description here](http://i.stack.imgur.com/0MyBA.jpg)


title: Show or hide rows of a tabular controlled by a global variable

text: Is it possible to show or hide rows of a table by setting a global boolean variable?               \documentclass{minimal}          % some boolean variable X          \begin{document}          \begin{tabular}{ccc}     A & B & C \\     A & B & C \\     A & B & C \\ %show this row iff X is true     A & B & C \\     A & B & C \\ % show this row iff X is true     \end{tabular}          \end{document}


title: Vertical space between headlines, tables, images and the following text too large

text: Is there a way to **globally** set a value (or minimum and maximum value) for the vertical space between, for instance, headlines, tables, images and the like **and** the following text. Right now I have the problem with my document that some of these vertical spaces are just too big and it does not look very pretty.


title: Changing elements of arrays in Beamer without shifting the unchanging elements.

text: An array is to be displayed in a Beamer presentation with some elements constant across all slides in the frame. Other array elements, however, must change with the overlay in the frame and are of non-constant height and width. It would seem desirable to reserve an unchanging amount of room for each variable array entry with something akin to `\overlayarea` or `\overprint` within the array itself, but this has so far failed to work. The commands which do work like `\temporal` end up changing the positioning of the entire array between slides. Is there a preferred and/or elegant solution to this problem within Beamer?


title: How to write a mathematics problem book

text: I'm a mathematics student and a newbie latex-user, and would start to collect my favourite problems in a problem book written in latex, dividing the content in two parts: the first, with the labeled problems, with the source of the problems, the origin et cetera; the second part, with the respective solutions. Obviously I would do my best, with the two parts hyperlinked and an index, aiming to create a good document for others students. I have yet no idea how to do it in a pretty and efficent way. I'm looking for a template, a similar .tex document where to see how to do it without having to read a lot of manuals. Any suggestion? Thanks


title: Self-publishing an academic journal

text: I am an occasional LaTeX user and have used it for a number of personal projects, including trying to write a technical book. To that end, I have no problems. Late last year, I was volunteered to assist with the editing and production of an academic journal for the church organisation that I am licensed through. I have previously published formal documents using Macs and InDesign software, but no longer have those resources. I do have Linux and LaTeX and an appreciation for the high quality output it generates. I have seen many references to using provided style sheets to submit single articles to journals, but I want to be the journal that writers submit their articles to. Are there any open-source, free or even commercially available journal document classes available for someone to use to publish their own academic journal?


title: Incompatibility of biblatex and tex4ht when using defernumbers

text: There seems to be a known incompatibility between `biblatex` and `tex4ht` when using `defernumbers=true`. I have one large `.bib` file. In the document I want to group the references into different categories. When using numerical labels, this requires `defernumbers=true` to obtain consecutive numbering. Everything works fine, apart from that `htlatex` chokes on this option with the following error:               ! LaTeX Error: Missing \begin{document} in `'.      Forcing the run to continue for the example below, I obtain a usable .html, but there is a erroneous `span` tag right at the beginning:               <span      class="cmr-10">01 12</span>     <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd">        This example illustrates the problem:               \documentclass{article}      \usepackage{filecontents}           \begin{filecontents}{sample.bib}      @article{Smith42,         AUTHOR = {Smith},          TITLE = {Some Title},          JOURNAL = {Some Journal},         YEAR = {1942},     }     @article{Aronson12,         AUTHOR = {Aronson},          TITLE = {Some Title},          JOURNAL = {Some Journal},         YEAR = {1912},     }     \end{filecontents}          \usepackage[style=numeric,defernumbers=true]{biblatex}      % The following instead of the previous line works with tex4ht, but the numbering is not as desired.     %\usepackage[style=numeric]{biblatex}           \bibliography{sample.bib}           \DeclareBibliographyCategory{group1}     \DeclareBibliographyCategory{group2}     \addtocategory{group1}{Smith42}     \addtocategory{group2}{Aronson12,Smith42}          \begin{document}      \nocite{*}     \printbibliography[category=group1]     \printbibliography[category=group2]     \end{document}      Note that the problem doesn't occur without the option `defernumbers=true`. I am using an up-to-date TL 2011 distribution, i.e., a `biblatex.sty` version 1.7 dated 2011/11/13 19:09:07 and `biblatex.4ht` dated 2011-09-18-16:07. Is there a workaround for this that doesn't require editing the `.bib` file?


title: Unumbered chapter causing 0.X.X section

text: I have the following macro               \newcommand{\softChapter}[1]{              %Create chapter         \chapter*{#1}              %Add it to TOC         \addcontentsline{toc}{chapter}{#1}              %Reset section counter, to avoid precedent section         %from interfering         \setcounter {section} {0}     }      I do want it have to do, an unumbered chapter, expect for one thing. The sections under i start, with 0, so my section are 0.X.X. I want my section to be. X.X


title: Wordle-like word clouds - can it be done without using an image?

text: I have seen the answer to this question: http://tex.stackexchange.com/questions/917/wordle-like-word-clouds So yes it can be done by generating an image and inserting it, but that's kind of cheating. I'd like to be able to generate a word cloud that is made of searchable text, rather than a .png file. Does anyone know if that is possible? **Edit** I'm interested in any style, it doesn't have to be a complex cloud with words in different directions, it could be a "horizontal" cloud like some of those here.


title: LaTeX: collecting "values" and spitting them out several times?

text: I'm cleaning up some old LaTeX documents describing an API. In the process I'm creating my own little style for describing the API, but I've bumped up against a bit that seems to force me into a violation of DRY. To follow the style of the old document each function should be described in the following format:               <function signature>     <table describing each argument>     <description of return value>      Ideally I'd like to create an environment and a couple of commands to describe arguments and return type. Something like               \begin{function}{getQuestion}     \return{string}{String with the question.}     \argument{bar}{int}{The answer to the ultimate question.}     \argument{baz}{int}{Number of years you are willing to wait for the question.}     \end{function}      This should then produce something like               \textit{string} getQuestion ( \textit{int} bar, \textit{int} baz )          \begin{tabular}{lll}     bar & int & The answer to the ultimate question \\     baz & int & Number of years you are willing to wait for the question.          \textbf{Returns:} \textit{string} - String with the question.      But for this to work I think I need to collect all arguments (`\argument`) in some way so I can iterate over them twice. In the past, when I've had to only collect _one_ value I've used `\newcommand` and `\renewcommand`, but I don't see how I can use that to collect more than one value. Any pointers on how I can approach this?


title: References in example environment (linguex package)

text: I am using the linguex package to create examples, like this:               \ex. First-level example     \a. Second-level example     \b. Second-level example     \a. Third-level example      looks like this: (1) First-level example      a. Second-level example      b. Second-level example         (i) Third-level example This is my code:               \documentclass[12pt,a4paper,listof=totocnumbered,bibliography=totoc]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman,english]{babel} % globale verwendung im dokument     \usepackage[babel,german=guillemets]{csquotes} % anführungszeichen nach sprache wählen     \usepackage{tipa} % ipa-sonderzeichen     \usepackage{MnSymbol}     \setlength{\parindent}{0pt} % einrückung bei absätzen unterbinden          \usepackage{linguex}          \begin{document}     \selectlanguage{ngerman}     \tableofcontents          \section{Präsuppositionen}     Der Satz in \ref{inferenz} beinhaltet (mindestens) zwei Inferenzen:      \Next[i] %in diesem Block habe ich die Referenz mit dem Befehl \Next aus dem linguex-Paket erzeugt, im nächsten mit \label     Jenny hat die roten Schuhe gekauft und \Next[ii] sie bereut es. Das Zeichen      $\glq\gg\grq$  %\grq als schließendes einfaches Anführungszeichen (in Vorlage öffnet es auch)     wird im Folgenden verwendet, um anzuzeigen, dass es sich bei B um eine Präsupposition von A handelt.          \ex. Jenny bereut, dass sie die roten Schuhe gekauft hat. \label{inferenz}     \let\oldalph=\roman\let\alph=\roman %römische Zählung lokal schon in Ebene 2     %Klammerung     \renewcommand{\SubExLeftBracket}{(}      \renewcommand{\SubExRightBracket}{)}     \a. $\gg$ Jenny hat die roten Schuhe gekauft.     \b. $\gg$ Jenny bereut den Schuhkauf.          Wird die initiale Äußerung nun negiert wie in \ref{negation}, bleibt nur Inferenz \ref{negationa} bestehen, wohingegen Inferenz \ref{negationb} von der Negation betroffen ist.          \ex. Jenny bereut nicht, dass sie die roten Schuhe gekauft hat. \label{negation}     \let\oldalph=\roman\let\alph=\roman %römische Zählung schon in Ebene 2     %Klammerung     \renewcommand{\SubExLeftBracket}{(}      \renewcommand{\SubExRightBracket}{)}     \a. $\gg$ Jenny hat die roten Schuhe gekauft. \label{negationa}     \b. $\not\gg$ Jenny bereut den Schuhkauf. \label{negationb}          \ex.     \a.[Q:] Fährt Marche mit Homers Auto?     \b.[C:]\# Nein, Homer hat kein Auto.     \c.[C'] Hey, warte mal! Homer hat doch gar kein Auto.          \subsection{Quantoren}     \ex. \a. Alle Linguisten sind Nerds.     \b. $\forall$x (Linguisten(x) $\rightarrow$ Nerd(x))          \ex. Georg ist immer müde, während er Nachtschicht hat. \\     $\not \rightarrow$ Georg ist immer müde.          \ex. Immer $\lbrace$während er Nachtschicht hat$\rbrace_{Restriktion}$ [ist Georg müde]$_{Nukleus}$          \subsection{Experiment}          \ex. \a.[Con 1:~] Komplementsatz, Brückenverb          \b.[Con 2:~] Temporalsatz          \b.[Con 3:~] Semifaktiver Komplementsatz          \begin{table}[!h]     \centering     \begin{tabular}{|c|c|c|c|c|}     \hline     & \textit{wissen} & \textit{erfahren} & \textit{auch} & \textit{wieder}\\     \hline     \textit{Nein,\dots} (Projektion) & 38,24 & 51,96 & 87,25 & 99,02\\     \hline     \end{tabular}     \caption{Ergebnisse}     \end{table}          \section{Kausalsätze}     Typischerweise weisen Hauptsätze V2-Stellung auf (vgl. Beispiel \ref{v2}), wohingegen Nebensätze mit VL-Stellung gebildet werden wie in Beispiel \ref{vl}.          \ex.     \ag. Sam \textbf{isst} nur Salat.\\      Sam eats only salad.\\     $\grq$Sam only eats salad.'\label{v2}     \bg. Sam ist sehr mager, weil er nur Salat \textbf{isst.}\\     Sam is very skinny because he only salad eats.\\     $\grq$Sam is very skinny because he only eats salad.'\label{vl}          \ex.     \ag. Niemand$_i$ war verärgert, weil er$_i$ nicht eingeladen \textbf{war.}\\         nobody$_i$ was angry because he$_i$ not invited was\\         $\grq$Nobody$_i$ was angry because he$_i$ \textbf{was} not invited.'     \b.*Niemand$_i$ war verärgert, weil er$_i$ \textbf{war} nicht eingeladen.          \ex.     \ag. Die Straße ist weiß, weil es geschneit \textbf{hat.}\\         the road is white because it snowed has.\\         $\grq$The road is white because it has snowed.'     \b. CAUSE ($\exists$ e$_1$ [snow (e$_1$)], $\exists$ e$_2$ [white (street, e$_2$)])          \end{document}      I have already changed that roman numbers appear in the second level. Now I have a problem concerning the references. At the moment they appear as (1-i), (1-ii) and so on in the text (1 for the first level and i/ii for the second). How is it possible that only the second level is printed, just as (i) and (ii)?


title: Proof titles with ntheorem

text: I am using the `ntheorem` package. I have a theorem in a document where the proof appears somewhat later. When I start the proof, I'd like to indicate what exactly I am proving. Currently the code I am using looks like this:               \documentclass{article}          \usepackage{ntheorem}          \theoremstyle{nonumberplain}          \theorembodyfont{\upshape}     \newtheorem{proof}{Proof}          \begin{document}          \begin{proof}[Proof of something]       Proof here.     \end{proof}          \end{document}      This results in output like: > **Proof (Proof of something)** Proof here. I would like it to instead just look like > **Proof of something.** Proof here. Is it possible to do this? This will happen several times in the document, so I'd rather not create a custom environment for each instance.


title: Wrapping a Feynman diagram in an ellipse or a circle?

text: I used a variation of the following code in order to create Feynman like diagram in latex using the answer in Drawing a scattering Feynman diagram with TikZ However, I want to wrap the diagram inside a circle or an ellipse? Does anybody can suggest how I can do this?               \documentclass[11pt]{article}     \usepackage{tikz}     \usetikzlibrary{positioning,arrows}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.markings}          \begin{document}          \tikzset{     particle/.style={thick,draw=blue, postaction={decorate},         decoration={markings,mark=at position .5 with {\arrow[blue]{triangle 45}}}},     gluon/.style={decorate, draw=black,         decoration={coil,aspect=0}}      }          \begin{tikzpicture}[node distance=1cm and 1.5cm]     \coordinate[label=left:$e^{-}$] (e1);     \coordinate[below right=of e1] (aux1);     \coordinate[above right=of aux1,label=right:$e^{-}$] (e2);     \coordinate[below=1.25cm of aux1] (aux2);     \coordinate[below left=of aux2,label=left:$e^{-}$] (e3);     \coordinate[below right=of aux2,label=right:$e^{-}$] (e4);          \draw[particle] (e1) -- (aux1);     \draw[particle] (aux1) -- (e2);     \draw[particle] (e3) -- (aux2);     \draw[particle] (aux2) -- (e4);     \draw[gluon] (aux1) -- node[label=right:$\gamma$] {} (aux2);     \end{tikzpicture}     \end{document}


title: Problem with polyglossia with "babelshorthands" enabled and minted: .out.pyg file is not generated anymore

text: Since some years I'm working with `polyglossia` and the `minted` package in combination with XeLaTeX and English texts without any problems. Now I had to write a document in German with some code, so I wanted to use `polyglossia` with German as main language and `babelshorthands` enabled together with `minted`. When I try to compile this document, the `.out.pyg` file is not generated and XeLaTeX throws an error. This issue disappears if I disable `babelshorthands`. Please consider the following MWE:               \documentclass{article}          \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{german}          \usepackage{minted}          \begin{document}         \begin{minted}{python}             x = 1         \end{minted}     \end{document}      The code above throws the aforementioned error. Now remove `babelshorthands=true` as option from the `\setmainlanguage` command:               \documentclass{article}          \usepackage{polyglossia}     \setmainlanguage{german}          \usepackage{minted}          \begin{document}         \begin{minted}{python}             x = 1         \end{minted}     \end{document}      The document should now compile without any errors. Is this a bug in `polyglossia`/`minted` or am I doing something wrong? Thanks for your support in advance.


title: What reasons (if any) are there for compiling in interactive mode?

text: I'm a command-line junkie and often compile with a simple `pdflatex filename.tex` from a terminal, and I forget (or am too lazy) to type `-interaction=nonstopmode` or `interaction=batchmode`. Hence, when I encounter errors, I've given the interactive prompt, which I find confusing and unintuitive, and usually get out of it as quick as possible with 'q'. Does anyone make use of the interactive prompts, and find them useful or advantageous as opposed to simply parsing the .log file, fixing the problem and recompiling from the beginning? Is it worth learning the interactive system? If I had to guess, I'd suppose the interactive mode hasn't changed much since the early days of TeX, when it took _much longer_ to compile a document, and you might not want to start from scratch when you made one tiny mistake. But now that compilation takes seconds at most, is there a compelling reason ever to use interactive mode? I ask partly because I'm on the verge of putting `alias pdflatex='pdflatex -interaction=batchmode'` in my `.bashrc`, but I wonder whether anyone thinks I'd be losing anything by doing so. If so, is there any free documentation out there about how to use the interactive system? (Or am I overthinking/overcomplicating it?)


title: Aligning side-by-side tables with blank lines

text: I'm sure this is simple, but I can't figure it out. I'm trying to produce side-by-side tables that look like this: ![enter image description here](http://i.stack.imgur.com/GwsNk.jpg) except that the left-hand table should have completely blank lines instead of the two vertical lines in every other row. I tried this:               \begin{equation*}     \begin{array}{| c | c | c | c |}     \hline     \multicolumn{4}{|c|}{\Delta t = 0.1}\\\hline     k & t_k & u_k & f(t_k,u_k) \\\hline     0 & 0 & 2 & -2 \\\hline\\\hline     1 & 0.1 & 1.8 & -1.7 \\\hline \\\hline     2 & 0.2 & 1.63 & -1.43 \\\hline \\\hline     3 & 0.3 & 1.487 & -1.187 \\\hline \\\hline     \end{array}     \qquad     \begin{array}{| c | c | c | c |}     \hline     \multicolumn{4}{|c|}{\Delta t = 0.05}\\\hline     k & t_k & u_k & f(t_k,u_k) \\\hline     0 & 0 & 2 & -2 \\\hline     1 & 0.05 & 1.9 & -1.85 \\\hline     2 & 0.1 & 1.808 & -1.708 \\\hline      3 & 0.15 & 1.722 & -1.572 \\\hline     4 & 0.2 & 1.644 & -1.444 \\\hline     5 & 0.25 & 1.571 & -1.321 \\\hline     6 & 0.3 & 1.505 & -1.205 \\\hline     \end{array}     \end{equation*}      which produced the output above. Is there an easy way to do what I want? (I'm using the `array` and `multirow` packages).


title: How do I get rid of the extra blank line at the end of my listing?

text: I have the problem that I use a `lstlisting` inside an `itemize`. This leads to the problem of an extra line in my source code block which I'm not able to delete. I already tried nearly every parameter which affects spacing but nothing worked. This is my program:               \documentclass[a4paper]{scrartcl}     \usepackage[usenames,dvipsnames,table]{xcolor}     \usepackage[latin1]{inputenc}     \usepackage[ngerman,english]{babel}          \usepackage{listings}     \lstset{language=[Visual]{C++},     keepspaces=true,     tabsize=2,     xrightmargin=\parindent,     basicstyle=\ttfamily,     frame=single,     framesep=1mm,     framerule=0pt,     columns=fullflexible,     backgroundcolor=\color[gray]{0.9}}          \begin{document}     There are two kinds of header files:     \begin{itemize}       \item content       \begin{lstlisting}[belowskip=-\baselineskip]       #include <iostream>       \end{lstlisting}       \item more content.     \end{itemize}     \end{document}      which produces me the following output: ![enter image description here](http://i.stack.imgur.com/b29Se.png) I've already seen posts dealing with this topic like this one: vertical extra space below lstlisting environment inside a list environment But setting `\parsep` to `0pt` didn't work for me. I also tried               \begin{lstlisting}[belowskip=-\baselineskip]     #include <iostream>     \end{lstlisting}      like suggested in another post but then I have a problem with my frame.


title: How to combine two LaTeX files

text: I have two separate LaTeX pages: one is a `report` and one is a `beamer`. I need to submit them as a single `pdf` and there should be consistency between the files, e.g. if the report finishes in the 50th page, the beamer should start from the 51st page. Can someone please help me with that? Any help would be greatly appreciated!


title: Weird issue involving pstricks, dvi->ps->pdf toolchain, and the letter combination rt

text: This is an extremely weird bug [Edit]it's not a bug, the problem was in my code. I spent 1 hour bringing this down to a small working example, can't figure out if its minimal. Set up: Ubuntu latest release, standard updated .tex. File:               \documentclass{beamer}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage{pst-plot}     \usepackage{pst-math}     \newcommand{\polarWedge}[3]{%     \pstVerb{%     /t #1 def%     }%     }%     \begin{document}     \begin{frame}     \begin{pspicture*}(-3,-1)(1.5,2.3)%     \polarWedge{0}{1}{t 2 div 1 add}%     \end{pspicture*}     rt     \end{frame}     \end{document}      Symptoms: This does not compile properly with dvi->ps-pdf toolchain. Compiles with pdflatex. The issue is with the letter combination rt. If you change rt to r t or to any other letter combination, the issue disappears. This is the weirdest thing I've ever seen in latex (could it be the way the rt letters are processed?) I am not sure how reproducible this issue is, please let me know if you get the same problem on your machine! * * * [Edit]The issue is now resolved. The problem was correctly identified by Herbert: What happens is that t is used as an internal variable and my redefinition of t messes up something. The solution proposed by Herbert was also the correct one: I need to define a local dictionary in which I evaluate the variable t, and then pop the dictionary. I am posting a corrected version of the slide. I must admit this was not a bug, but a manifestation of my lack of knowledge of postscript. * * * [Edit]@cfr: no your minimal example does not address the same issue as my example. In my example, if you remove the pspicture, the slide will compile just fine with the letters rt. The rt-bug shows up only if you use the pspicture. * * * @Herbert: yes, I do believe the issue lies in the letter t being used in more than one place, combined with the use of the \pstVerb to redefine the letter t. However, I do need to assign values to the letter t to evaluate my function. Is there a way to do that without using \pstVerb? * * * [Edit] @cfr: The error I got was from the ps2pdf executable. The error report looks like this: Process started: ps2pdf "pstricksProblem".ps Error: /invalidrestore in --restore-- Operand stack: (r) 0.4 --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1916 1 3 %oparray_pop 1915 1 3 %oparray_pop 1899 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1839 3 4 %oparray_pop --nostringval-- 1823 3 4 %oparray_pop --nostringval-- Dictionary stack: --dict:1175/1684(ro)(G)-- --dict:1/20(G)-- --dict:163/200(L)-- --dict:189/300(L)-- Current allocation mode is local Current file position is 133316 GPL Ghostscript 9.10: Unrecoverable error, exit code 1 Process exited with error(s) * * * [Edit] Since people asked, the original slide looks like this:               \documentclass{beamer}     \usepackage{etex}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage{auto-pst-pdf}     \usepackage{pst-plot}     \usepackage{pst-math}     \newcommand{\polarWedge}[3]{%     \pstVerb{%     /t #1 def%     /firstX #1 57.29578 mul cos #3 mul def%     /firstY #1 57.29578 mul sin #3 mul def%     }%     \pstVerb{%     /t #2 def%     /secondX #2 57.29578 mul cos #3 mul def%     /secondY #2 57.29578 mul sin #3 mul def%     }%     \pscustom[fillcolor=cyan, fillstyle=solid, linecolor=blue]{%     \psline(0,0)(! firstX firstY)(! secondX secondY)(0,0)%     }%     }%     \newcommand{\drawPolar}[4]{%     \parametricplot[#4]{#1}{#2}{#3 t 57.29578 mul cos mul #3 t 57.29578 mul sin mul}%     }          \begin{document}     \begin{frame}     \begin{pspicture*}(-3,-1)(3.5,3.3)%     \uncover<2->{%     \polarWedge{0}{0.05}{3 t sub}%     }%     \uncover<3->{%     \polarWedge{0.05}{0.1}{3 t sub}%     }%     \uncover<4->{%     \polarWedge{0.1}{0.15}{3 t sub}%     }%     \uncover<5->{%     \polarWedge{0.15}{0.2}{3 t sub}%     }%     \uncover<6->{%     \polarWedge{0.2}{0.25}{3 t sub}%     }%     \uncover<7->{%     \polarWedge{0.25}{0.3}{3 t sub}%     }%     \uncover<8->{%     \polarWedge{0.3}{0.35}{3 t sub}%     }%     \uncover<9->{%     \polarWedge{0.35}{0.4}{3 t sub}%     }%     \drawPolar{0}{2.5}{3 t sub}{linecolor=red, plotpoints=1000}%     \end{pspicture*}     \uncover<1-10>{}     rt     \end{frame}     \end{document}      [Edit] The variable I use is called t, because I am passing the function 3 t sub as an argument to a function which calls \parametricplot, and the variable name in use for parametricplot is t. If you wish, I am making a function whose argument is a function. Of course, my setup relies entirely on the assumption that the variable "t" is a local variable. That this is the case is supported by the fact that the above slide works when the letters r and t are separate. What is the role of letters r and t being side by side however, is something I can't figure out. [Edit] Final corrected version of the slide. The correction followed from the advice of Herbert (many thanks!) and a little reading of postscript documentation.               \documentclass{beamer}     \usepackage{etex}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage{auto-pst-pdf}     \usepackage{pst-plot}     \usepackage{pst-math}     \newcommand{\polarWedge}[3]{%     \pstVerb{%     /firstX  1 dict begin /t #1 def #1 57.29578 mul cos #3 mul end def%     /firstY  1 dict begin /t #1 def #1 57.29578 mul sin #3 mul end def%     /secondX 1 dict begin /t #2 def #2 57.29578 mul cos #3 mul end def%     /secondY 1 dict begin /t #2 def #2 57.29578 mul sin #3 mul end def%     }%     \pscustom[fillcolor=cyan, fillstyle=solid, linecolor=blue]{%     \psline(0,0)(! firstX firstY)(! secondX secondY)(0,0)%     }%     }%     \newcommand{\drawPolar}[4]{%     \parametricplot[#4]{#1}{#2}{#3 t 57.29578 mul cos mul #3 t 57.29578 mul sin mul}%     }          \begin{document}     \begin{frame}     \begin{pspicture*}(-3,-1)(3.5,3.3)%     \uncover<2->{%     \polarWedge{0}{0.05}{3 t sub}%     }%     \uncover<3->{%     \polarWedge{0.05}{0.1}{3 t sub}%     }%     \uncover<4->{%     \polarWedge{0.1}{0.15}{3 t sub}%     }%     \uncover<5->{%     \polarWedge{0.15}{0.2}{3 t sub}%     }%     \uncover<6->{%     \polarWedge{0.2}{0.25}{3 t sub}%     }%     \uncover<7->{%     \polarWedge{0.25}{0.3}{3 t sub}%     }%     \uncover<8->{%     \polarWedge{0.3}{0.35}{3 t sub}%     }%     \uncover<9->{%     \polarWedge{0.35}{0.4}{3 t sub}%     }%     \drawPolar{0}{2.5}{3 t sub}{linecolor=red, plotpoints=1000}%     \end{pspicture*}     \uncover<1-10>{}     \end{frame}     \end{document}      -Todor Milev


title: How to represent tic tac toe table in Latex?

text: Hi all I need numbers from 1.... 8 as below in a table.               0 1 2      3 4 5      6 7 8


title: How to represent a data set in latex?

text: I have below data.I would like to upload into latex doc in the below format.               Length Left Right Bottom Top Diagonal     214.8 131.0 131.1 9.0 9.7 141.0     214.6 129.7 129.7 8.1 9.5 141.7     214.8 129.7 129.7 8.7 9.6 142.2     214.8 129.7 129.6 7.5 10.4 142.0     215.0 129.6 129.7 10.4 7.7 141.8     214.4 130.1 130.3 9.7 11.7 139.8     214.9 130.5 130.2 11.0 11.5 139.5     214.9 130.3 130.1 8.7 11.7 140.2     215.0 130.4 130.6 9.9 10.9 140.3     214.7 130.2 130.3 11.8 10.9 139.7     ...     ...     ...     ...     ...     ...


title: How to deal with very long lines that do not contain spaces?

text: I have a problem with a `lstlisting` environment. I want to use it for displaying several very long lines that can not be reformatted. Independently of the option `breakatwhitespace=true` or false my lines are not broken down so that the end is far outside of the printable area. How to specify that line breaks are allowed at any character? Or is it possible to specify the characters (besides whitespace) that can be used for a line break? Alternative: inserting a special (not-printed) character that indicates "break line here" - doe something like this exists?               \begin{lstlisting}[]     Test1: 33b7a2f7c4cc93c46dd4ee2ed81aa1eb-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a     Test2: 33b7a2f7c4cc93c46dd2423423423423-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a     \end{lstlisting}      **Update:** The answer from _egreg_ works fine. Additionally I found a different approach which works directly with a `lstlisting` environment:               \begin{lstlisting}[breakatwhitespace=true, literate={\-}{}{0\discretionary{-}{\\}{}}]       ...     \end{lstlisting}      It allows to break the lines also at hyphenations. It has some drawbacks especially that the line breaks are looking different from the others in the environment. But may be for others this code may be helpful... Found here: LaTeX: Lstinline and Hyphenations


title: Picture not formatting to text width

text: I'm trying to format a picture so that it fills the text width however it always errors and fills the whole page.               \includegraphics[width=\textwidth]{circle}      is the line I'm currently using also this is probably relevent               \documentclass[twocolumn,reprint,nofootinbib]{revtex4-1}          \usepackage{graphicx}      Also this is the error I'm getting:               Overfull \hbox (264.0pt too wide) in paragraph


title: Specific error bars in pgfplots possible?

text: For plots with a lot of points it often looks very crowded if each point has its own error bar. Is there an easy way to only draw certain error bars in pgfplots? I could not find any option besides drawing the data twice. So in short: is there a command such as `error mark indices` or a similar option to influence the drawing of error marks? Here is my MWE, this is basically how it should look like:               \documentclass[tikz,preview]{standalone}          \usepackage{tikz,pgfplots,filecontents}     \pgfplotsset{compat=1.7}           \begin{filecontents*}{data.dat}     X Y Y_error     1 1.39 0.1     2 2.44 0.1     3 3.62 0.1     4 4.81 0.1     \end{filecontents*}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         clip mode=individual,         ]         \addplot+[each nth point=4,forget plot,error bars/.cd,y dir=both,y explicit]                      table[x=X,y=Y,y error=Y_error] {data.dat};         \addplot+[] table[x=X,y=Y,y error=Y_error] {data.dat};         % these command do not seem to exist:         % error mark repeat=4         % error mark indices={1}     \end{axis}     \end{tikzpicture}           \end{document}


title: How to create a page with two columns that can span pages to achieve my special goal?

text: I am a Chinese plain TeX user and also a beginner. Now I encounter a hard question, that is > I must write some numbered English paragraphs at the left column and its > corresponding Chinese translations at the right column which have the same > number with the English one. The first lines of the English paragraph and > its corresponding Chinese translations should be located at the same > horizontal line. Here is an example if I can't explain this question clearly: ![enter image description here](http://i.stack.imgur.com/CWTvR.jpg) My method to solve this problem is using `\halign` with two `\vtop`, but it can't span pages or produce overfull, underfull `\vbox`.               \newcount\mycount     \mycount=1     \bigskip     \halign{\tabskip=.5in             \vtop{\hsize=3in\noindent\number\mycount.\enspace#}&             \tabskip=0pt\vtop{\hsize=3in             \noindent\romannumeral\mycount.\enspace#\global\advance\mycount by1}\cr             ...}      so ugly it is :-( Anyone else has a better solution?


title: Improved PSTricks figure for everyone interested

text: First: This post might not be appropirate for this site, so feel free to close it if necessary. I have improved on the drawing by Thomas Söll from here and I thought someone might find it useful.               % latex filename.tex     % dvips filename.dvi     % ps2pdf filename.ps          \documentclass[       a4paper,       dvipsnames     ]{article}          \usepackage{lmodern}     \usepackage{amsmath}     \usepackage{       pst-grad,       pst-plot     }     \usepackage{xfrac}     \usepackage[       locale=DE     ]{siunitx}          %%% Flydning af figurer %%%          \makeatletter       \providecommand*{\setfloatlocations}[2]{\@namedef{fps@#1}{#2}}     \makeatother     \setfloatlocations{figure}{htbp}          %%% LaTeX 3-syntaks %%%          \ExplSyntaxOn       \cs_new_eq:NN \calc \fp_eval:n     \ExplSyntaxOff          %%% Definitioner %%%          \def\radioaktivt{%       \psscalebox{0.0125}{%         \pscircle[           fillstyle=solid,           fillcolor=yellow,           linestyle=none         ](0,0){5}         \pswedge*(0,0){5}{0}{60}         \pswedge*(0,0){5}{120}{180}         \pswedge*(0,0){5}{240}{300}         \pscircle*[           linecolor=yellow         ](0,0){1.5}         \pscircle*(0,0){1}       }     }          \def\ikkeradioaktivt{%       \pscircle*[         linecolor=SeaGreen       ](0,0){0.0625}     }          \def\henfald{rand 301 mod 50 div round 50 div }          \def\simpel#1{!#1 \henfald add \henfald \i\space 5 mul 16 div add 0.121 add }          \def\halveringerB{\calc{\Halveringer-1}}     \def\halveringerC{\calc{\Halveringer+1}}          \def\maerkerX{\calc{1.5*\i+0.75}}     \def\maerkerYa{\calc{10*2^(-\i)}}     \def\maerkerYb{\num{\calc{100*2^(-\i)}}}          \def\konstA{\calc{1.5*\i+0.25}}     \def\konstB{\calc{32*2^(-\i)}}     \def\konstC{\calc{32-\konstB}}     \def\konstD{\calc{1.5*\halveringerC+0.75}}     \def\konstE{\calc{\konstD-0.75}}     \def\konstF{\calc{\konstD+0.15}}          \newcommand*\halveringer[1]{%      \def\Halveringer{#1}      \centering       \begin{pspicture}(-1.7,-0.6)(\konstF,11.2)         \psframe[           linestyle=none,           fillstyle=gradient,           gradangle=45,           gradmidpoint=1,           gradbegin=gray!80,           gradend=gray!30         ](0,0)(\konstE,10.25)         \multido{\i=0+1}{\halveringerC}{%           \psframe[             dimen=middel,             linecolor=NavyBlue,             linewidth=1pt,             fillstyle=gradient,             gradangle=90,             gradmidpoint=1,             gradbegin=NavyBlue!50,             gradend=white           ](\konstA,0)(!\konstA\space 1 add \maerkerYa\space)         }         \multido{\i=0+1}{\halveringerC}{%           \psframe[             dimen=middel,             linecolor=NavyBlue,             linewidth=1pt,             fillstyle=gradient,             gradangle=90,             gradmidpoint=0,             gradbegin=SeaGreen!30,             gradend=white           ](\konstA,10)(!\konstA\space 1 add \maerkerYa\space)         }         \multido{\i=0+1}{\halveringerC}{%           \rput(\konstA,0){%             \multido{\i=0+1}{\konstB}{%               \rput{!\henfald 777 mul}(\simpel{0.125}){\radioaktivt}               \rput{!\henfald 777 mul}(\simpel{0.375}){\radioaktivt}               \rput{!\henfald 777 mul}(\simpel{0.625}){\radioaktivt}               \rput{!\henfald 777 mul}(\simpel{0.875}){\radioaktivt}             }           }           \rput(\konstA,\maerkerYa){%             \multido{\i=0+1}{\konstC}{%               \rput(\simpel{0.125}){\ikkeradioaktivt}               \rput(\simpel{0.375}){\ikkeradioaktivt}               \rput(\simpel{0.625}){\ikkeradioaktivt}               \rput(\simpel{0.875}){\ikkeradioaktivt}             }           }         }         \psaxes[           ticks=none,           labels=none,           arrowinset=0.05,           arrowscale=1.6,           arrowlength=1.8         ]{->}(0,0)(-0.3,-0.3)(\konstD,10.75)[$t$,0][Radioaktive atomer~(\si{\percent}),90]         \psplot[           algebraic,           linecolor=red,           linewidth=1.5pt         ]{0.75}{\konstE}{10*0.5^(2*(x-0.75)/3)}         \psxTick(0.75){\text{start}}         \psxTick(2.25){T_{\sfrac{1}{2}}}         \multido{\i=2+1}{\halveringerB}{%           \psxTick(\maerkerX){\i\space \cdot T_{\sfrac{1}{2}}}         }         \multido{\i=2+1}{\halveringerB}{%           \psxTick(\maerkerX){\i\space \cdot T_{\sfrac{1}{2}}}         }         \multido{\i=0+1}{\halveringerC}{%           \psyTick(\maerkerYa){\maerkerYb}         }       \end{pspicture}     }          \pagestyle{empty}          \begin{document}          \begin{figure}       \halveringer{5}     \end{figure}          \end{document}      ![output](http://i.stack.imgur.com/PX8F0.jpg) The comments, labels, and macro names are Danish but changing them should be doable. If you can improve further on the code, feel free to post your suggestion(s). **Usage** All you have to do is type `\halveringer` and give the number of halftimes as argument.


title: Mixing itemize with multi-line math displays

text: I have a list of equations that I want to enumerate using itemize. The equations should also be numbered equations. This is no problem if those equations fit onto one line -- I just typeset them between dollar signs (and use the macro from the first answer to How to label text with equation number? to number things). The problem arises when some of the equations take multiple lines. I want to use \begin{split} to split them up. The problem is that using \begin{equation} and \begin{split} forces everything to be on a new line, and I want this stuff to appear on the line with the big dot from itemize. It won't let me use split in in-line math. How can I get this to work? EDIT : Here is an example to illustrate what I want:               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{itemize}     \item \[\begin{split}     7x+2y = &3z+7w\\             &+23654     \end{split}\]     \end{itemize}          \end{document}      The problem with the above is two-fold : first, the math is on a separate line from the big dot, and second it is centered. I ignored the numbering at this point to make things easier to understand.


title: Produce parentheses around number of equation

text: Is there any direct command which can help me to put the number of a equation in the parentheses, for example if I write the following:               \begin{equation} \label{eq:1}     this is my equation      \end{equation}          I need this equation: \ref{eq:1}      I need to produce the following > I need this equation: (1) I need that **(1)** .


title: Chapter titles distance

text: I am using the titlesec package to adjust the chapter titles/headings of my text. Yet, I have trouble with the resulting distance between these new titles and the body of the text. Namely, the distance becomes substantially smaller than what it is when no adjustment is made, i.e., chapter titles are the default ones. I have noted that this decreament of the distance, probably has to do with the text body moving "upwards". Here is what I have compiled:               \documentclass[12pt, twoside, a4paper]{book}     \usepackage{graphics}     \usepackage[dvips]{graphicx}     \usepackage{fancyhdr}     \usepackage[namelimits]{amsmath}     \usepackage[mathcal]{euscript}     \usepackage{blindtext}     \usepackage{amsmath}     \usepackage[textheight=630pt]{geometry}     \topmargin -0.1in     \setlength{\headheight}{14.71pt}     \parskip=3pt     \addtolength{\parindent}{2pt}     \usepackage{titlesec}          \titleformat{\chapter}[display]            {\bfseries\Large}            {\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter}            {.5ex}            {\titlerule[.1ex]\filleft}               \begin{document}     \chapter*{Introduction}          \blindtext[3]          \blinddocument     \end{document}      Any ideas of how to restore this distance back to the default? The titlesec documentation is not of great help (to me at least) on this issue.


title: Best subfigure placement wrt length of subcaptions

text: My Problem is twofold: First i'm not sure what the established/best way is to place the captions in question. Secondly i don't know how to do implement my ideas with Latex. ![Image describing the placement problem](http://i.stack.imgur.com/cxh5q.png) My supervisor suggested, that i should place the graphics on the same height (as indicated by the red line). I'm not sure if this is the right approach, since it would generate whitespace as you can see in the following image (MS Paint ftw). ![correction according to supervisor](http://i.stack.imgur.com/jF8ry.png) So my Questions are:   1. Is he right? Should i just force them somehow on the same height? (Maybe using a tabular approach?)   2. Is there maybe a automated scaling approach?      * That could mean with respect to both image size and text length.     * Or just with respect to image height like in the following picture (which might bring problems when the text is long and the width is small). How can something like that be accomplished? (i can't even do it in paint) ![enter image description here](http://i.stack.imgur.com/ZIlRD.png)   3. Or should i just put all the text in the main caption and write only one-liner in the subcaptions? A MWE (i don't know how i can include graphics that everybody has in his installation):               \documentclass[twoside, 12pt, a4paper, parskip, draft]{scrbook}          \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}      This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.           \begin{figure}[ht]         \centering         \begin{subfigure}[b]{0.40\textwidth}             \includegraphics[width=\textwidth]{Bilder/related/guwip.pdf}             \caption{Erfassung der Fußposition mit einer der beiden Varianten.}         \end{subfigure}%         ~          \begin{subfigure}[b]{0.54\textwidth}             \centering             \begin{minipage}{\linewidth}                 \includegraphics[width=0.32\textwidth]{Bilder/related/swappdishsmall.pdf}                 \includegraphics[width=0.32\textwidth]{Bilder/related/swappshoesmall.pdf}                 \includegraphics[width=0.32\textwidth]{Bilder/related/swappcompsmall.pdf}             \end{minipage}             \caption{Erfassung mithilfe der anderen Variante und der mit magischen Bällen versehenen Schuhe. Der Nutzer wischt mit seinen Füßen innerhalb der Schale und erreicht damit etwas.}         \end{subfigure}         \caption{Bilder der auf Motion Capturing basierenden Ansätzen die Fußposition zu verfolgen.}     \end{figure}          This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.      \end{document}


title: How to get sentence case in section titles without biblatex

text: I would like to change my section titles into sentence case just like the solution here: How to make sections into sentence case The `titlesec` package is already included in my document to modify section title formatting, so this seems like a good solution. The problem is that I am using a `book` class and require the `chapterbib` package. When I include the `biblatex` package to use the `\MakeSentenceCase` macro, it tells me that it's incompatible with `chapterbib` and fails to compile. Is there an alternative method I can use to access `\MakeSentenceCase` or create a similar macro for use in the `\titleformat` command?


title: Changing subsection numbering within a chapter

text: I have chapters and I want the subsection numbering to correspond to the chapter numbering.. for example:               Chapter 1          1.1 blah blah     1.2 hello      At the moment, I have:               Chapter 1          1 blah blah     2 hello      Here is my preamble code:               \documentclass[12pt]{report}     \usepackage{graphicx}     \usepackage{geometry}     \usepackage{fixltx2e}     \usepackage{grffile}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{floatrow}     \usepackage{amsmath}     \usepackage{longtable}     \usepackage{tocbibind}     \usepackage{fancyhdr}     \usepackage{titlesec}     \usepackage{epstopdf}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{tabularx}     \usepackage{tabu}     \usepackage{ragged2e}     %\usepackage[justification=centering]{caption}     \usepackage[titles]{tocloft}     \usepackage{caption}     \usepackage{tocloft}          \newcolumntype{L}{>{\RaggedRight\arraybackslash}X}          \titleformat{\section}       {\normalfont\fontsize{14}{12}\bfseries}{\thesection}{1em}{}     \makeatletter     \renewcommand{\paragraph}{%       \@startsection{paragraph}{4}%       {\z@}{1.2ex \@plus 1ex \@minus .2ex}{-1em}%       {\normalfont\normalsize\bfseries}%     }     \renewcommand{\baselinestretch}{1.0}     \makeatother     \setcounter{secnumdepth}{3}     \begin{document}      Then after a title page, TOC, abstract etc..               \newpage\null\thispagestyle{empty}\newpage          {\newgeometry{left=0.98in,right=0.98in,top=0.98in,bottom=0.78in}     %\addtocontents{toc}{~\hfill\textbf{Page}\par}     \setcounter{tocdepth}{2}     \tableofcontents\thispagestyle{empty}\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}     \newpage     \setcounter{page}{1}     \renewcommand{\thesection}{\arabic{section}}      I just use `\section` to create the sections.


title: Citation "et al." only for four and more authors with natbib and jf.bst

text: I am using the package `natbib`and the following jf.bst-file for the citation in my thesis http://faculty.haas.berkeley.edu/stanton/texintro/. According to the citation requirements the citation has to print out all the last names of the author when the number of authors are less than four. The problem now is, as sson as I have more than two authors I get for instance "Doyle et al. (2006)" whereas the output is supposed to be "Doyle, Lundholm and Soliman (2006)". According to the natbib reference sheet http://merkel.zoneo.net/Latex/natbib.php I can get my desired output by using `\citet*`. This actually is tedious as I have to check every time the number of authors before deciding which cite-command to use. Is there a way to automatically make Late understands that with the normal `\cite` command I can get the output mentionend above?


title: Why does inserting a space with {} only work some of the time?

text: I was just trying to customize my footnotes and noticed some strange (to me, at least) behavior. Usually, if I'm inserting a one-character white space I'll simply insert a pair of empty curly braces like so `{}`. Trying to do this with `\thefootnote`, however, produced no space. Compare:               \documentclass{article}          \renewcommand{\thefootnote}{\arabic{footnote}\hspace{1em}}          \begin{document}          Some dummy text.\footnote{This one works.}          \end{document}      to               \documentclass{article}          \renewcommand{\thefootnote}{\arabic{footnote}{}}          \begin{document}          Some dummy text.\footnote{This one produces no space.}          \end{document}      Why is it that empty curly braces produce no space here? In general, when should I not expect empty braces to produce a white space? Is this an instance of some more general TeX phenomenon?


title: Glossaries: vertical aligment of acronyms' long names

text: How can I vertically align entries in my acronyms' list? I use the Glossaries package to generate it.   Here is MWE:               % !TeX program = xelatex     % !TeX encoding = utf-8     % !TeX spellcheck = ru_RU          \documentclass[12pt, a4paper]{article}          \usepackage{polyglossia}     \setdefaultlanguage{russian}     \setmainfont[Ligatures=TeX]{Times New Roman}          \usepackage[xindy={glsnumbers=false}, nonumberlist, nopostdot, nogroupskip]{glossaries}     %\setglossarystyle{super} % uncomment for style "super"     \makeglossaries          \begin{document}          \newacronym{bam}{ДАП}{Двунаправленная Ассоциативная Память}     \newacronym{ai}{ИИ}{Искусственный Интеллект}     \newacronym{am}{АП}{Ассоциативная Память}     \newacronym{ann}{ИНС}{Искусственная Нейронная Сеть}     \newacronym{an}{ИН}{Искусственный Нейрон}     \newacronym{it}{ИТ}{Информационные Технологии}     \glsaddall          \printglossaries          \end{document}      With the default style I have the following:   ![default style](http://i.stack.imgur.com/wNKgG.png)   As you can see, the long names are not vertically aligned.   What I want can be achieved with the               \setglossarystyle{super}      But it this case, short names lose the BOLDness, some small horizontal indent appears and the spacing between lines becomes smaller:   ![super style](http://i.stack.imgur.com/Co3Mh.png)   where RED is some extra indent, which I don't need.   Thank you for your answers!


title: Soul vs Microtype in regards to Tracking

text: When using small/all caps, I was told to adjust the tracking alongside. I have found `\SetTracking` from `microtype` and `\so` from `soul`. Is there an advantage to using one or the other and if yes why? Do they do exactly the same thing?


title: Is it possible to strip the protocol in \url?

text: I would like to have               commons.wikimedia.org/wiki/File:Blue_Unknot.png      as text for the link               https://commons.wikimedia.org/wiki/File:Blue_Unknot.png      As I want line-breaking, I can't use               \href{https://commons.wikimedia.org/wiki/File:Blue_Unknot.png}{commons.wikimedia.org/wiki/File:Blue_Unknot.png}      but               \url{https://commons.wikimedia.org/wiki/File:Blue_Unknot.png}      shows `https://`. Is it possible to tell get rid of the protocol in the displayed text, but still have a correct link? # Minimal not-working example               \documentclass[a6paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage{hyperref}   % links          \begin{document}         \section{url}         Trivialer Knoten: \url{https://commons.wikimedia.org/wiki/File:Blue_Unknot.png}              \section{href}         Trivialer Knoten: \href{https://commons.wikimedia.org/wiki/File:Blue_Unknot.png}{commons.wikimedia.org/wiki/File:Blue\_Unknot.png}              \section{href + path}         Trivialer Knoten: \href{https://commons.wikimedia.org/wiki/File:Blue_Unknot.png}{\path{commons.wikimedia.org/wiki/File:Blue_Unknot.png}}     \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/7Jxjw.png)


title: Equations in the margin: automatic flush right or left?

text: _How can I automatically have equations in a`\marginnote` aligned flush left or right in a two-sided document?_ A previous question suggested to make equations flush left by using `flalign*` and extra alignment characters. This can also be used to make the equations flush right as demonstrated below. The question: how to do this automatically for equations that appear in `\marginnote`s? The solution probably will use an if-then-else for even/odd pages, but how to cleanly incorporate this with the `(fl)align*` environment?               \documentclass[twoside]{scrartcl}     \usepackage{amsmath}     \usepackage{lipsum}     \usepackage{marginnote}     \begin{document}     \lipsum[1]     \marginnote{Is flush left (manually)       \begin{flalign*}         a&=1 &\\         b&=1 &       \end{flalign*}}     \lipsum[2]     \marginnote{How to make flush left automatically?       \begin{align*}         a&=1\\         b&=1       \end{align*}}     \lipsum[3-6]     \marginnote{Is flush right (manually):       \begin{flalign*}         && a&=1\\         && b&=1       \end{flalign*}}     \lipsum[7]     \marginnote{How to make flush right automatically?       \begin{align*}         a&=1\\         b&=1       \end{align*}}     \lipsum[8-9]     \end{document}


title: How to avoid background / frame break in code listings with math / mathescape?

text: I have lots of C++ sources with LaTeX formulas in the comments. Ideal for using the listings packages to pretty print the source. However, most of the formulas break either, the background or the frame lines when the formula is "tall" (e.g. contains an integral or a sum) as seen in the following working example and preview. The question is: how can I force listing not to break the frame on tall lines produced by tall math equations?               \documentclass{article}     \usepackage[]{listings}     \usepackage{xcolor}      \lstset{             backgroundcolor=\color[gray]{0.9},             frame=single,             mathescape=true,     }     \lstset{language=C++}     \begin{document}          \begin{lstlisting}     for(i = 0; i < 10; i++)     {     // gratuitious equation $\mathcal{D}_3(x) = \frac{x^n}{n} \int_{0_0}^{x^2} \frac{t^n}{e^t-1}dt$      *p++ = i;     House h = new house();     int romms = h.getRooms():     }     \end{lstlisting}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Y7Cwi.png) Note: If this is an intrinsic limitation of listings packages, then the real question could be how can equations be force to use the normal vertical space as much as possible in math mode. For example to force integrals and sums to be even shorter than inline math model. I am also aware of this other question: listings with background color and mathescape broken, but that only solved for a particular math symbol.


title: How can I access specific elements of a Bibtex entry in my Latex document?

text: I keep all my sources in the one Bibtex file, and noticed in Jabref that there's a "review" field. I thought this would be a handy place to keep notes while doing a literature review, and was wondering how I could go about making a document which showed this review field. Basically, I'd like to use this as a kind of annotated bibliography. So is there some way I could access this field in a Latex document? Like:               \cite{Barniv:1985}.review()       Or something to that effect.


title: How to insert code with accents with listings?

text: I'm trying to insert source code in LaTeX with using `listings`, but my code has accents and pdflatex gives me this error:               Unicode char \u8:�\expandafter not set up for use with LaTeX.      This is a code the reproduces the error. ## example.tex               \documentclass{article}     \usepackage{listings}     \usepackage[utf8]{inputenc}     \usepackage[spanish]{babel}          \begin{document}          \lstinputlisting[language=C++]{code.cpp}          \end{document}      ## code.cpp               // Código con una tilde      What can I do to generate the PDF correctly?


title: Sorting tlpdb.tlu output

text: I get an output from tlpdb.tlu, which is unsorted. When I now use `table.sort` the output as a pdf is still unsorted.               tlpdb = read_tlpdb( kpse.var_value("SELFAUTOPARENT") )     table.sort(tlpdb)      Do I need a compare function for this?