title: Matrix of nodes over multiple columns in tikz

text: I want to create a diagram with tikz in which entries overdraw more than one column. I solved this problem already with the fit package. But now there is a problem with the look of the nodes within the matrix. The text in the multicolumn rectangles is not centered. How can I solve this Problem?               \documentclass[         a4paper,         12pt,         headings=normal,      % small     ]{scrartcl}          \usepackage{tikz}     \usetikzlibrary{positioning,arrows,chains,matrix,scopes,fit}          \begin{docoument}          \begin{tikzpicture}          \tikzset{element/.style={rectangle,                                  inner sep=0pt,                                 minimum width=15mm,                                 very  thick,                                 draw = black,                                 top  color=blue!20!white!20, bottom  color=blue!70!white,                                 font=\tiny,                                 }}     \tikzset{element2/.style={rectangle,                                     minimum  size=5mm,                                 very  thick,                                 draw = black,                                 top  color=blue!20!white!20, bottom  color=blue!70!white,                                 font=\tiny                                 }}     \tikzset{point/.style={circle,                             inner  sep=0pt,                             minimum  size=2pt,                             fill=red                             }}              \matrix (table) [%         matrix of nodes,         nodes in empty cells,         row  sep=4mm,column  sep=5mm,         nodes={text centered}         ] {%             \node(p1)[point]{}; &  & \node(p2)[point]{}; &  &  & \node(p3)[point]{}; &  &  & \\             &  &  &  &  &  &  &  &\\             &  &  &  &  &  & \node()[element2]{$+1$}; &  & \\             &  &  & \node(p4)[point]{}; &  &  &  &  & \node(p5)[point]{}; \\             &  &  &  &  &  &  &  & \\             \node(p6)[point]{}; &  &  & \node(p7)[point]{}; &  &  &  &  & \\             & \node(p8)[point]{}; &  &  &  &  & \node(p9)[point]{}; &  & \\             &  &  &  &  &  &  &  & \\             \node(p10)[point]{}; &  &  &  &  &  &  &  & \\         };         \node[fit=(table-2-2)(table-2-4),element]{label1};         \node[fit=(table-2-7)(table-2-9),element]{label2};         \node[fit=(table-5-2)(table-5-3),element]{label3};         \node[fit=(table-5-6)(table-5-7),element]{label4};         \node[fit=(table-7-4)(table-7-5),element]{label5};         \node[fit=(table-8-4)(table-8-5),element]{label6};          \end{tikzpicture}          \end{docoument}


title: Tikz Polar Grid

text: I'm working on a Smith Chart using TikZ. Currently I'm writing it with everything scaled to a unit circle (centered on 0,0 with a radius of 1) without units. Then scaling so it's a reasonably sized figure. The problem I'm running into is that when drawing some of the minor grid lines for certain sections, particularly when you're close to the x-axis the radius of the circles i'm drawing becomes much larger than is possible in TikZ. For example this halts with a `Dimension too large` error due to the `1/\x` term for position and radius:                   \foreach \x in {0.01, 0.02, ..., 0.2} {                 \draw (1, {1/\x}) circle ({1/\x});         }      Image without circles whose radii are too large: ![Image without circles whose radii are too large.](http://i.stack.imgur.com/hFniP.png) What I'm thinking, is instead of drawing individual circles it would be much easier to draw a polar grid to avoid drawing circles with extremely large radii. However, I haven't been able to find any information about how to do that. Is there a package or work-around for drawing polar grids?


title: Is there an implementation of WEB/NOWEB for LaTeX?

text: The `WEB` system is great, but it's a little cumbersome sometimes and very much rigid in its design. Is there a LaTeX document class for WEB-style documents? I'd like to program in other languages than Pascal and C---perhaps even generalized as a 'pure' algorithm.


title: Is there an "endproof" package?

text: You may be familiar with the endfloat package, which moves all figures and tables to the end of your document. Is there a similar package for achieving that kind of results with `proof` environments (as defined in the amsthm package)? For instance, the following chunk: > Theorem 1: some wonderful statement. > > _Proof:_ some astonishing proof. would appear (when the package is used) in the text as: > Theorem 1: some wonderful statement. > > _Proof:_ see page P. and then page P would contain something like: > _Proof of Theorem 1 page XXX:_ some astonishing proof.


title: Set color of title-background

text: I'm trying to give the title (and the title only (with some margin), not the entire page) in the first page of my presentation background color "greyone". This background-box should be page-wide while text is centered. I haven't been able to figure out how to.. I've defined a new beamer template in my preamble by               \documentclass['serif]{beamer}     \usecolortheme{eelke}     % INFORMATION     \title{Presentation Title}     \author{A. Uthor}     % FRONTPAGE     \defbeamertemplate*{title page}{eelke}[1]     {     \centering     \usebeamerfont{title}\inserttitle\par % this should have a background box in color grayone. Text should be white for readability.     \vskip20pt     \usebeamercolor[bg]{titlelike}     \setbeamerfont{author}{size=\fontsize{11}{15}}     \usebeamerfont{author}\insertauthor\par %     \vskip20pt     \setbeamerfont{date}{size=\fontsize{11}{15}}     \usebeamerfont{date}\insertdate\par} \begin{document}\begin{frame}\maketitle\end{frame}\end{document}      ` Further I have defined a new color in beamercolorthemeeelke.sty file               \definecolor{greyone}{RGB}{77,77,77}     \setbeamercolor{palette quaternary}{fg=white,bg=greyone, wd=\paperwidth}     \setbeamercolor{titlelike}{parent=palette quaternary}      which is called for in the preamble: \usecolortheme{eelke} Can anyone help me out? Edit: MAW added


title: Hexagon with exscribed triangle

text: I am learning tikz now, it is painfully slow, but I am slowly learning. I am trying to reproduce the image below. ![What my desired output is](http://i.stack.imgur.com/0AQZi.png) Here is my code so far. This is basically a rip of from the pgf manual.               \documentclass[10pt,a4paper]{article}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{backgrounds}     \usepgflibrary{shapes}     \usetikzlibrary{through}          \begin{document}          \begin{figure}[!htpb] \centering     \begin{tikzpicture}     \foreach \a in {5,...,5}{      \draw[blue, dashed] (\a*2,0) circle(0.5cm);     \node[regular polygon, regular polygon sides=\a, minimum size=1cm, draw] at    (\a*2,0) {};     }     \end{tikzpicture}     \end{figure}     \end{document}      Some problems with this code   * How do i scale this image?   * How do I label each side ?   * Once again, how do I make that pesky angle ?    * Is there a way to do this for a n-gon? When I scaled the image using simply `\begin{tikzpicture}[scale=3]...` only the circle grew. Labeling each point manually is sort of tedious.. =( * * * **EDIT:** I DID IT WOEEE Code us ugly though... :D:DD:               \documentclass[10pt,a4paper]{article}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{backgrounds}     \usepgflibrary{shapes}     \usetikzlibrary{through}          \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfsetlayers{background,main,foreground}          \begin{document}          \begin{figure}[!htbp]     \centering     \Large      \begin{tikzpicture}[scale=1]     \node (A) [draw,thick,regular polygon, regular polygon sides=6, minimum     size=7cm,outer sep=0pt,fill=gray!20] {};     \node at (A.corner 1) [anchor=360/6*(1-1)+270] {$D$};     \node at (A.corner 2) [anchor=360/6*(2-1)+270] {$E$};     \node at (A.corner 3) [anchor=360/6*(3-1)+270] {$F$};     \node at (A.corner 4) [anchor=360/6*(4-1)+270] {$A$};     \node at (A.corner 5) [anchor=360/6*(5-1)+270] {$B$};     \node at (A.corner 6) [anchor=360/6*(5-1)+270] {$C$};     \node at (A.corner 4) [right,above] {\hspace{3.5cm}$AB=16$cm};     \coordinate [label=above:\textcolor{blue}{$S$}] (S) at (0.95,1);     \draw[gray, thick, dashed] (0,0) circle(3.52cm);     \path[draw] (0.7,-0.3) node {$\alpha$};     {     \begin{pgfonlayer}{foreground}     \draw[gray,thick, dashed] (A.corner 4) -- (S) -- (A.corner 5);     \end{pgfonlayer}     }          \begin{scope}       \path[clip] (S) -- (A.corner 4) -- (A.corner 5) -- cycle;       \draw [red, fill=red!20] (S) circle (30pt);       \draw [black] (S) circle (30pt);     \end{scope}     \end{tikzpicture}     \end{figure}     \end{document}


title: How to append data to a temporary file?

text: I want to create a new temporary file (named `main-temp.tex`), append data to it multiple times, and import the contents later. I haven't learnt how to use TeX file operation, both reading and writing. In this question, I think I need writing operation only because reading data from a file line by line is not needed in my scenario below. Thus using `\input{}` is enough to read all data.               % main.tex          \documentclass{article}     \usepackage{xcolor}          \newcommand\AppendAnswer[1]     {         % code to append #1 to a shared temporary file named main-temp.tex     }          \newcommand\AddQuestion[2]% #1 and #2 stand for question and answer, respectively     {%       % code to markup  question #1       % for example       {\color{blue}#1}        %       % code to append answer #2       \AppendAnswer{#2}      }                         \begin{document}     \section{Questions}     % Add some questions:     \AddQuestion{Are you kidding?}{No. I am not a joker.}     \AddQuestion{Really?}{Yes!}               \section{Answers}     % imports answers from the shared temporary file named main-temp.tex     \input{main-temp}          \end{document}      How to append data to a temporary file? I know using `\--enable-write18` switch is mandatory when invoking `latex`. I don't want to use the existing package such as `exercise`, etc.


title: How to change numbering in remark?

text: I am writing a book on mathematics. I want to get the following text document :   ![enter image description here](http://i.stack.imgur.com/unlgP.png) I have written the following code :               \documentclass{book}     \usepackage{amsthm}     \theoremstyle{plain}     \newtheorem{theorem}{Theorem}[section]     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \theoremstyle{definition}     \newtheorem*{example}{Example}     \newtheorem{definition}{Definition}     %\theoremstyle{remark}     \newtheorem{remark}{Remark}               \begin{document}              \chapter{Number Theory}     \section{Congruence}     \begin{theorem}     Here is my theorem.     \end{theorem}     \begin{remark}      Text     \end{remark}               \begin{remark}      Text     \end{remark}               \begin{remark}      Text     \end{remark}     \begin{proposition}      Here is my proposition.     \end{proposition}     \begin{remark}      Text     \end{remark}               \begin{remark}      Text     \end{remark}     \begin{lemma}      Here is my lemma.     \end{lemma}     \begin{remark}      Text     \end{remark}          \end{document}        This produces :   ![enter image description here](http://i.stack.imgur.com/lrvnV.png) But I don't like this style. How can I change "remark" number ? Also I want the font in proposition "normal font".


title: disable automatic insertion of \selectlanguage and \inputencoding in LyX

text: Is there a way to disable LyX's automatic insertion of `\selectlanguage` and `\inputencoding`? I like being able to switch languages by hand once in a while, but 99% of the times LyX inserts those commands automatically, it breaks my ERT hacking only since it thinks my opening { is English, while my closing } should be British, or something equally uninteresting. Today I had some cryptic error because LyX was switching between `\inputencoding{latin1}` and `\inputencoding{latin9}` (I prefer UTF8) and threw in a few braces in less than fortunate places... I know I can solve issues caused by `\selectlanguage` by resetting language in the "text style" window. Is there a similar quick fix for `\inputencoding` I could use until I can disable its automatic insertion? To be complete, I use: Ubuntu 13.04 LyX 2.0.3 (2012-02-19) Built on Jun 1 2012, 15:14:25 The following example is not exactly what I intended to ask before, but hopefully similar enough. In Lyx everything looks innocent:               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass article     \begin_preamble     \RequirePackage{microtype}     \end_preamble     \use_default_options true     \maintain_unincluded_children false     \language english     \language_package none     \inputencoding default     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing single     \use_hyperref false     \papersize a4paper     \use_geometry false     \use_amsmath 2     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine basic     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 3     \tocdepth 3     \paragraph_separation skip     \defskip medskip     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Standard     test     \end_layout          \end_body     \end_document      Now, after conversion to tex, with `lyx --export pdflatex test.lyx`, a suspicious `\selectlanguage{english}` appears:               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage{amsmath}     \usepackage{amssymb}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \RequirePackage{microtype}          \makeatother          \begin{document}     \selectlanguage{english}     test          \end{document}      and indeed running `pdflatex test.tex` fails:               ! Package babel Error: You haven't loaded the language english yet.          See the babel package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.23 \selectlanguage{english}          ?       compiling the pdf from Lyx directly gives the same error.


title: Equations in captions causing compile error while converting LaTeX to HTML

text: I can manage to convert LaTeX files into HTML with Tex4ht while keeping equations as they are with the config file provided by @michal.h21 on http://tex.stackexchange.com/a/185802/52068 But it fails when there is an equation with single dollar sign ($equation$) in caption of the images. With Error:               TeX capacity exceeded, sorry [input stack size=30000]      MWE:               \begin{figure}[h]     \begin{center}     \includegraphics[width=0.9\textwidth]{F39_B.png}      \caption{Teleportation: the system consists initially of two entangled electrons (2 and 3) with Alice and Bob, respectively, in the state $\ket{\Upsilon}$ (see text). Alice measures one of the Bell states, shown here as $\ket{\Phi^+}$, for example. She sends this outcome classically to Bob, who then corrects the entangled state, here using the identity operator, to put his electron into the state $\ket{\nearrow}$. }     \label{fig:teleport1}     \end{center}     \end{figure}      Not sure if I need to add some other parameters to the config file in order to cover equations in captions or there is something wrong with my LaTeX file. thanks in advance.


title: Define a command for italic, bold and centered title inside a quote

text: Inside my quote, I have a bold, italic and centered header. How can I define a command so that I can typeset this text all in one go? I tried: `\newcommand{\QuoteTitle}[1]{\centerline{\textit{\textbf{#1}}}}` but it just jammed the whole thing on one line! Here is what I need it to look like, given this input:               \begin{quote}     ``\QuoteTitle{Quot paria coniculorum in uno anno ex uno pario germinentur.}          Qvidam posuit unum par cuniculorum in quodam loco, qui erat undique     pariete circundatus, ut sciret, quot ex eo paria germinarentur in uno     ....''     \end{quote}      _should_ produce the following output: ![enter image description here](http://i.stack.imgur.com/gk7Wy.jpg)


title: Trying to typset Persian(Farsi) with MikTeX - expl3.sty not found

text: > **Possible Duplicate:**   >  Latest MiKTeX-Update broke XeLaTeX with fontspec I am a new user of LaTeX. I have installed MikTeX 2.9 and my editor is: TeXnic. Actually, I installed the `xepersian` package with the MikTex package manager. However, when I enclose `\usepackage{xepersian}` I get this error: `File 'expl3.sty' not found!` What is my problem? Can you help me please?


title: Lowercase textnumero

text: I'm trying to reproduce a title from an older book, which uses what it seems to be a lowercase numero sign (see image below). Is there a symbol like this in latex (or even unicode for that matter!)? Currently I simply doing this: `n.\textsuperscript{o}` where the "o" is the lowercase letter "O". ![scan](http://i.stack.imgur.com/tsh2a.jpg)


title: filecontents replaces tabs with spaces

text: `filecontents` package replaces tabs with spaces. Is there any solution to preserve tabs in the generated file without changing the following code?               \begin{filecontents*}{textWithTabs.txt}     Aa    Bb    Cc     1     2     3     \end{filecontents*}      Generated file is:               Aa Bb Cc     1 2 3      Desired file is:               Aa    Bb    Cc     1     2     3


title: Command line equivalent of "$preview_mode = 1"?

text: I'm setting up variants of running the latexmk command, and need some help writing a command line that will be used whenever I do not want to use the `.latexmkrc` file (i.e., -norc). On Mac, it is sometimes necessary to use `$preview_mode = 1` when not running continuous preview in order to launch a previewer. Is there a command line equivalent for `$preview_mode = 1`?


title: Using resizebox on sub-expressions in math mode

text: As part of an image that I am generating I need the ability to shrink or grow part of a math expression by a numerically controlled/arbitrary amount. Can anyone think of a way to do this? For example I would like to shrink or grow the radical and everything in it, but leave the rest of the standard quadratic formula standard size.


title: Can I avoid connecting to MiKTeX update server?

text: It seems that each time I try to update/install new packages, the MiKTeX update wizard will internally first connect to http://api.miktex.org/Repository.asmx. Is it possible to skip this step? It's really slow for me to connect internationally but would be much much faster since lots of mirrors within country are available. Or is there any trick to use proxy only for this http://api.miktex.org/Repository.asmx URL but not mirrors I will connect to?


title: Indent an entire paragraph / section?

text: I am writing a document with some odd spacing. I am copying another document, and therefrore the layout must be almost exact. I have sections divided by letters below, and some paragraphs in each section. Most of these paragraphs should be indented so that they align with the text after each section and not the section number. Will try to clarify with a small code. I do not have the ability to provide a minimal example, will do so later though               a)   Some section title inserted here with some custom gibberish          How the rest of the paragraph looks with no ident, also a problem      with seveleral lines aswell          Here is another small part that is not supposed to be indented        Here is how I want it to look               a)   Some section title inserted here with some custom gibberish               How the rest of the paragraph looks with no ident, also a problem           with seveleral lines aswell          Here is another small part that is not supposed to be indented        So yeah, I think I can do it with `\hspace*{5mm}`. But this only works for single lines. Any suggestions? * * * Edit: MWE               \documentclass[10pt,a4paper]{article}     \usepackage[hmargin=3cm,vmargin=3.5cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[norsk]{babel}          \usepackage{enumitem}     \usepackage{titletoc}     \usepackage{booktabs}     \usepackage{relsize}     \usepackage{array}     \usepackage[hidelinks]{hyperref}     \usepackage[dvipsnames*,svgnames]{xcolor}     \usepackage{mathtools}          \usepackage{fixltx2e}     \usepackage{lmodern}          \newcommand{\oppgave}[2]{\section*{Oppgave #1 {\normalfont\normalsize (#2 poeng)}     \addcontentsline{toc}{section}{Oppgave #1}}}          \newcommand{\del}[1]{\paragraph*{#1)     \addcontentsline{toc}{subsection}{#1)}}}          \newlist{deloppg}{enumerate}{1}     \setlist[deloppg]{label=\arabic*),leftmargin=1.40cm,itemsep=5pt}          \begin{document}          \tableofcontents          \newpage          \section*{Fasitsvar til regneoppgaver}     \addcontentsline{toc}{section}{Fasitsvar til regneoppgaver}          \newpage          \noindent     \phantomsection     \addcontentsline{toc}{section}{{\color{red}\Large{Del 1}}}     \fcolorbox{black}{LightSteelBlue}{\parbox[t][1.25cm][c]{\textwidth}{\begin{center}\textbf{Del 1 \\Uten hjelpemiddler}\end{center}}}          \oppgave{1}{18}          \del{a} \label{1a}      Vis at den deriverte til funksjonen $O(x) = \dfrac{500}{x} + 8x^2 $ er      %      \begin{align*}      O'(x) = \frac{ \, -500 + 16x^3 \, }{x^2}      \end{align*}     %     \del{b} Deriver funksjonene \\     \begin{deloppg}     \item  $ f(x) = 3  \ln(2x)       $      \item  $ g(x) = 3x \cdot e^{x^2} $ \aa      \end{deloppg}     %     \vspace{5mm}     %     \del{c} Vi har gitt polynomfunksjonen $f(x)=x^3 - 3x^2 - 13x + 15$     \begin{deloppg}     \item Vis at $f(1)=0$. Bruk polynomdivisjon til å faktorisere $f(x)$  i førstegradsfaktorer     \item Løs ulikheten $f(x)\leq 0$     \end{deloppg}      %     \vspace{5mm}     %     \del{d}     Mengden av lava som spruter ut per time ved et vulkanutbrudd kan      tilnærmet beskrives ved et funksjonsuttrykk $f(x)$. Funksjonsverdiene      er målt i tonn, og $t$ er antall timer etter begynnelsen av utbruddet. \\     \\     Du får vite at: $f(0)=300, \qquad f'(10)=0 \qquad \textnormal{og} \qquad         f''(10) = -10$\\     \\      Hva kan du si om vulkanutbruddet på grunnlag av disse opplysningene?           \end{document}}      * * * I felt I had to include this much of my document to show of where the mistake happens. Was a lot of work finding the packages and such. My preamble only includes 4 packs each with a common theme. So I had to extract all the packages needed to make this page work. The problem is in the last section. Where I want the text to be aligned with the rest. Will try Werner's suggestion =)


title: TikZ: Superimpose text over arrow

text: I am trying to superimpose some text over an arrow with TikZ. I know it is possible to have the text _over_ the arrow but this is not what I am trying to achieve. What I have done so far is:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}     \begin{tikzpicture}        \node(n1){n1};       \node(n2)[below right=3cm and 3cm of n1]{n2};       \draw[->] (n1) -- node[sloped, fill=white]{Text} (n2);     \end{tikzpicture}     \end{document}      However, this only works on a white background. Is there a better way to do obtain the same result?


title: How to use otf fonts correctly?

text: I'm using Linux. I'd discovered that is possible to run `lualatex` and use my system fonts. Well, I'm trying to see how they look like. Here is my sample:               \documentclass[11pt,a4paper]{amsart}     \usepackage[math]{fontspec}     \usepackage{unicode-math}     \setmathfont{Asana-Math.otf}     \usepackage{fontenc}     \setmainfont{Droid Serif}     \begin{document}     \[(D_e\Phi_{\gamma(s)})^{-1}(\gamma'(s))=\varphi'(s)(D_e\Phi_{\alpha(\varphi(s))})^{-1}(\alpha'(\varphi(s)))\]     \end{document}      After running `fc-list` I just copy some font name and use it on `\setmainfont`, like above. My question is: how to be sure that I'm doing this for text and math fonts? When I change as above does the math fonts change accordingly? How to test the math fonts also? How to list all the other `otf` fonts to use in `\setmathfont`?


title: Suppress headers and footers for complete chapter

text: For my thesis, I need to include a chapter which can "stand alone", meaning it must be formatted in a way that allows the pages to be exported and be published separately. This means, I need to get rid of the header and footer on these pages. I tried using               \thispagestyle{empty}      and it works as expected, but I don't want to set it manually for each page in my chapter. Is there a way to extend this command to spread to all pages in the current section or is there another way to achieve my goal?


title: Expansion Issue with omit list provided to \DTLdisplaydb

text: In my DB the number of columns is rather large. Hence, I am trying to eliminate _any_ columns which contain only 0 entries. The number of columns, nor the column keys, are know upfront. So, I step through the DB and generate a list of columns that are to be omitted. When I do that the omit list provided seems to be ignored. Below I have omitted the code that determines which columns are There are no problems for the case of:   * Manually specified omit list: So `\DTLdisplaydb[A,C]{myDB}` works fine.   * Omit list specified by a macro that has fixed content: So              \def\ListOfColumnsToOmit{A,C}     \DTLdisplaydb[\ListOfColumnsToOmit]{myDB}      also works fine. Only for the case where I compute the list of columns to omit and add them to `\ListOfColumnsToOmit` via the `\AddToCommaSeparateList` macro do things break. So, the correct result would be that the last table was identical to the two middle tables. ![enter image description here](http://i.stack.imgur.com/6j5LR.png) ## References:   * Expansion issue when adding to CSV list from within a \foreach   * How keep a running list of strings and then process them one at a time ## Code:               \documentclass{article}     \usepackage{xstring}     \usepackage{datatool}          % Make csv for question     \usepackage{filecontents}     \begin{filecontents*}{MyData.csv}     A, B, C, D, E     0, 1, 0, 2, 3     0, 0, 0, 4, 4     0, 2, 0, 0, 5     \end{filecontents*}          \makeatletter     % http://tex.stackexchange.com/questions/83595/expansion-issue-when-adding-to-csv-list-from-within-a-foreach/     \newcommand*{\AddToCommaSeparateList}[3][,\space]{%         % #1 = separator         % #2 = listname         % #3 = content to add to CSV list         \IfStrEq{#2}{}{}{\g@addto@macro#2{#1}}% Don't add a leading comma in list         %         % Extra brace group in case #3 contains a comma         \begingroup\edef\x{\endgroup%           \noexpand\g@addto@macro\noexpand#2{{#3}}}\x%     }%     \makeatother               \begin{document}     \DTLloaddb{myDB}{MyData.csv}          With \emph{no} omit list provided:\par     \noindent\DTLdisplaydb{myDB}%          With manually specified omit list:\par     \noindent\DTLdisplaydb[A,C]{myDB}%          \def\ListOfColumnsToOmit{A,C}     With fixed macro  omit list:\par     \noindent\DTLdisplaydb[\ListOfColumnsToOmit]{myDB}%          \def\ListOfColumnsToOmit{}     \AddToCommaSeparateList{\ListOfColumnsToOmit}{A}%     \AddToCommaSeparateList{\ListOfColumnsToOmit}{C}%     With generated macro omit list:\par     \noindent\DTLdisplaydb[\ListOfColumnsToOmit]{myDB}%          The omit list was: \ListOfColumnsToOmit     \end{document}


title: How to make a short running author list?

text: I am writing a paper (using the amsart class) where we have four authors. The problem is that the author names on the even pages spill over onto the page numbers and obscure them. What I'd like to do is to define a short running author list (where, say, given names could be replaced by initials) and have it placed on top of the even pages. But how does one do that within amsart?


title: Convert included .eps files to .pdf with xetex during the first compilation only

text: Is there a way to have xetex convert .eps files, included with \includegraphics, to .pdf during the first compilation only and subsequently use the generated .pdf files, as pdflatex does?


title: How to move sidebar to "bottombar" of Marburg theme?

text: I would like to move the dark sidebar of Beamer Marburg theme to a footer (bottombar) that would contain email address instead of outline. Thank you for your answer.


title: How to convert command parameters into optional ones?

text: LaTeX allows the use of optional parameters. Sometimes one wants to _rewrite_ a command by making certain parameters optional:               \newcommand{\foo}[2]{         #some commands     }      to:               \newcommand{\foo}[2][a]{         #some commands     }      As far as I know, overloading is not supported in LaTeX thus making certain parameters optional cannot be done with low coupeling because calls to the method `\foo{a}{b}` must be converted to `\foo[a]{b}`. One cannot define the helper method `\foo{}{}` such that the package is backwards compatible. I'm wondering what tools are available to rewrite command calls automatically, or macros to solve this problem elegantly.


title: pstricks rput does not place stuff precisely

text: ## Description I want to use `pstricks` to place some stuff in a large (almost A0) `pspicture`. Any stuff I place in the picture with the `\rput` command, **is not placed precisely**. Why? The farther away from the grid origin I place it, the larger offset it gets. Here is a minimal working example. ## Minimal working example               \documentclass[pstricks,border=2cm]{standalone}     \begin{document}     % Draw a large picture (81x81 cm)     \begin{pspicture}(81,81)          % This "X" in the grid origin (0,0) is placed precisely (no error here)     \rput{0}(0,0){X}     % An "X" put to (80,80), however, is placed with a significant offset (ERROR)     \rput{0}(80,80){X}     % Drawing a line that far away, on the other hand, works precisely again (no error)     \psline(79,79)(80,80)          % commands which draw the grid and label it on all 4 sides     \psset{origin={0,0}}     \psgrid[gridcolor=red, subgriddiv=1, griddots=10, gridlabels=12pt](81,81)(0,0)     \psgrid[gridcolor=red, subgriddiv=0, griddots=10, gridlabels=12pt]     \end{pspicture}          \end{document}      ## My configuration I am using MiKTeX-XeTeX 2.9.4987 (0.9999.3) (MiKTeX 2.9 64-bit), Windows 7. XeTeX is Version 3.1415926-2.5-0.9999.3 (MiKTeX 2.9 64-bit) In order to typeset a picture this large with `xelatex`, I had to use the workaround Heiko Oberdiek suggested as a solution to this problem. It boils down to replacing the parameter `-dEPSCrop` with `-sPAPERSIZE=a0` in `dvipdfmx.cfg`. ## Error presentation   * X was specified to be placed by `\rput` at (80,80) but it is placed off grid by approx 3 millimeters.   * Error does not happen with `\psline` which is drawn precisely where I specified: ![X is placed off grid](http://i.stack.imgur.com/JJFJB.png) I tried `\rput(x,y){stuff}` where I gradually changed `x` and `y`. The error gets linearly bigger and bigger the farther from the grid's origin X is placed. Enabling the rulers in Acrobat Reader (used to view the resulting PDF) proved that the grid and the line are placed precisely. The X, however, is not. ## Expected result At the grid's origin everything looks fine (X is placed precisely): ![X is placed precisely](http://i.stack.imgur.com/s5XRg.png) I'd expect the X be placed just like this at `(80, 80)`


title: zmin axis value for a 3d plot in TikZ

text: If I plot this the z axis does not start at 0 but somwhere negative. How do I fix this?               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}      \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \pgfplotsset{     colormap={whitered}{     color(0cm)=(white);     color(1cm)=(orange!75!red)     }     }     \begin{tikzpicture}          \begin{axis}[%     %axis equal,     colormap name=whitered,     width=20cm,     view={340}{25},     enlargelimits=false,     grid=major,     %domain=-10:1,     %y domain=-1:1,     samples=41, %57      xlabel=$x$,     ylabel=$y$,     zlabel=$z$,     zmin=0.0,     yticklabels={,,},     xticklabels={,,},     %zticklabels={,,},     ]          \addplot3[thick, draw=red, mark=*, fill=orange, opacity=0.2] coordinates {(1,1,0)(-1,1,0)(-1,-1,0)(1,-1,0)(1,1,0)};          \end{axis}     \end{tikzpicture}     \end{document}


title: Summation as exponent

text: x^{\displaystyle\sum_{k=1}^n {n \choose k}p^k + 1}      ![enter image description here](http://i.stack.imgur.com/ehuUQ.png) How can I make the exponent look smaller?


title: Apply Chapter heading style to table of contents/bibliography heading

text: I am using the following fancy styles for chapter headings               \documentclass[12pt]{report}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage[hidelinks]{hyperref}     \usepackage[%                 left=1.46in,%                 right=0.98in,%                 top=0.98in,%                 bottom=0.98in%                 ]{geometry}%     \usepackage{setspace}     \usepackage{titlesec}     \usepackage{fourier}     \usepackage{titletoc}          \makeatletter     \newcommand{\thechapterwords}     {\thechapter}     \def\thickhrulefill{\leavevmode \leaders \hrule height 0.6ex \hfill \kern \z@}     \def\@makechapterhead#1{%       %\vspace*{50\p@}%       \vspace*{10\p@}%       {\parindent \z@ \centering \reset@font             \thickhrulefill\quad             \scshape \@chapapp{} \thechapterwords              \quad \thickhrulefill             \par\nobreak             \vspace*{10\p@}%             \interlinepenalty\@M             \hrule             \vspace*{10\p@}%             \LARGE \bfseries \decofourleft \hspace{0.1cm} #1 \hspace{0.1cm} \decofourright \par\nobreak              \par             \vspace*{10\p@}%             \hrule         %\vskip 40\p@         \vskip 40\p@       }}     \def\@makeschapterhead#1{%       %\vspace*{50\p@}%       \vspace*{10\p@}%       {\parindent \z@ \centering \reset@font             \thickhrulefill             \par\nobreak             \vspace*{10\p@}%             \interlinepenalty\@M             \hrule             \vspace*{10\p@}%             \Large #1\par\nobreak             \par             \vspace*{10\p@}%             \hrule         %\vskip 40\p@         \vskip 40\p@       }}      These work fine on \chapter{...}. How can I apply this styling for table of contents heading and bibliography and references headings as well? This is the code I have.               \tableofcontents     \addtocontents{toc}{~\hfill\textbf{Page}\par}          ... chapters          \renewcommand\bibname{Bibliography and References}     \bibliographystyle{plain}     \bibliography{references}      Thanks a lot for any help. I'm still new to Latex and I've been looking all over. Below are screenshots of what the titles look like. Of course I dont want table of contents/ bibliography to have chapter {chapter no.} ![This is what chapter headings look like](http://i.stack.imgur.com/Orsdg.png) ![This is what the table of contents look like](http://i.stack.imgur.com/pSYsO.png)


title: Capitalize the first letter of each word in biblatex

text: I'm trying to get every word in the title of each article in my reference list in capital letters (So Something Like This For Every Title). However, somehow `\MakeSentenceCase` remains active no matter what I do. This is how I am trying to get this done:               \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[backend=biber, style=authoryear]{biblatex}     \DeclareFieldFormat[article]{title}{\MakeCapital{#1}}      The manual also mentions `\MakeUppercase`, which I have also tried, and nothing changes either. When I use `\textbf` (just for testing purposes), then the titles _do_ turn into boldface titles. So `DeclareFieldFormat` does work, just not `MakeCapital`.


title: Overlay red rectangles on top of verbatim text

text: I am using Beamer to prepare a presentation. In some slide I need to print a great deal of verbatim text and, also, I need to draw some red rectangles on top of it. What would be the most straightforward way to do it? I'm struggling with fancyvrb and also with tikz.               \documentclass[pdf]{beamer}     \usepackage{semiverbatim}          \begin{document}          \newsavebox\myv     \begin{frame}[fragile]     \frametitle{IAEA phase-space file format}     \begin{lrbox}{\myv}\begin{minipage}{\textwidth}     \begin{semiverbatim}     $ xxd -b -l 100 ELEKTA_PRECISE_6mv_part1.IAEAphsp     0000000: 00000001 01101001 01010011 01001000 10111111 10100011  .iSH..     0000006: 11110110 10101101 11000000 01111110 00000100 10011110  ...~..     000000c: 11000000 11101011 10001011 10110101 10111110 01110011  .....s     0000012: 01110010 10100111 10111110 11001101 11001100 01001100  r....L     0000018: 00111101 00000100 00000000 00000000 00000000 01100111  =....g     000001e: 00000000 10000000 00000001 00000001 00100011 11011111  ....#.     0000024: 01101110 00111110 00000100 10110010 10000010 00111111  n>...?     000002a: 10110101 01000001 11010000 10111110 01101011 01111111  .A..k.     0000030: 00011111 00111101 10111011 00101111 01010000 10111100  .=./P.     0000036: 11001101 11001100 01001100 00111101 00000000 00000000  ..L=..     000003c: 00000000 00000000 01100111 00000000 10000000 00000001  ..g...     0000042: 00000001 01101000 10100000 11001110 00111111 01000010  .h..?B     0000048: 10011010 10101100 10111111 00000111 00010110 01100010  .....b     000004e: 01000000 01000010 00101010 01000011 10111101 11110111  @B*C..     0000054: 11101011 00000101 00111110 11001101 11001100 01001100  ..>..L     000005a: 00111101 00000000 00000000 00000000 00000000 01100111  =....g     0000060: 00000000 10000000 00000001 00000001                    ....     $     \end{semiverbatim}     \end{frame}     \end{document}      This is how I'd like the image to show up (notice the red rectangles): ![enter image description here](http://i.stack.imgur.com/C2XS1.png)


title: Template with each page divided in three parts

text: I'm looking for a template where each page of the document is divided in three sections. The upper half of the page is divided in two columns, with the left column being a quote of some original text, and the right column some comments associated to specific parts of the text on the left. The lower half of the page contains "free format" text. The following is an image with two sample pages: ![enter image description here](http://i.stack.imgur.com/ptaxz.jpg) (In response to David comment) The bottom half text flows automatically. The upper class is defined by the user. Note that the height of the upper half in each page can vary from page to page. The following picture illustrates this situation. ![enter image description here](http://i.stack.imgur.com/RH4AI.jpg) Is there a latex template or an easy way to achieve this?


title: Assign categories to subsection, the create list of categories (like list of figures)

text: Basically I'm using LaTeX to organize my sheet music. Each piece of music is a subsection, which shows up in the ToC. What I would like to do is assign a category to each piece of music and then organize these categories in a "List of Categories" at the front of the document much like the "List of Figures". I haven't found a way to do this, and am wondering if this community could help. I'm competent with LaTeX but am not experienced with making my own commands. Hoping there's a package that could help with this. **EDIT:** Per Sean's request, here's an example of what I'd like to see: * * * # List of Levels ## Level 6 .1 Prelude in C Minor, Op. 28, no. 20 ........ page # .2 Sonata in G Major, L 84, K 63 ................ page # ## Level 8 .1 Consolations ......................................... page # * * * Where "Prelude in C Minor, Op. 28, no. 20" is the subsection title. It would be nice to include the section title (which is the composer), but that's not necessary. What I'd like to do is add a \level{x} command at the end of the \subsection{} command in order to generate this list, where "Level" is the category I'd like to sort by. **EDIT2:** Here's a MWE to show the structure of the document. I'd like to add a sort level to each of the subsections to get the "List of Levels." A PDF is added at the end of each subsection using \includepdf{}. * * *               \documentclass[twoside]{book}     \begin{document}          \pagenumbering{roman}     \tableofcontents     \pagenumbering{arabic}          \part{Sheet Music}         \chapter{Classical}             %%%%%%%%%%%%%%  Sections by composer             \section{Bach, Johann Sebastian}                 \clearpage                 \addcontentsline{toc}{subsection}{Prelude BWV 846}                  \section{Beethoven, Ludwig van}                  \clearpage                 \addcontentsline{toc}{subsection}{Pathetique}         \chapter{Romantic}             \section{Debussy, Claude}                 \clearpage                 \addcontentsline{toc}{subsection}{Suite Bergamasque}             \section{Schumann, Robert}                \end{document}


title: How do I put a blank page IN summary?

text: my summary have two pages, page ix and page x, but I want to just let even pages have contents, so I have to put a blank page between those two. So I need to have the summary at pages ix and xi, and page x completely blank. Somebody knows how to do that? Thanks in advance.


title: Can I create a node list from some text entirely within lua?

text: I'm playing around with luatex and learning about nodes and callbacks. What I'd like to do is be able to add some text via a particular callback. The type of callback that I'm interested in is one where the input is a node list (think `hpack_filter`) so I want to append the text in the form of a node list. This is simple enough if I have my text to append already stored as a node list (say `stuff`):               function appendStuff(h)        local l = node.tail(h)        l.next = node.copy_list(stuff)        return h     end      The difficulty is in populating that node list in the first place. What I'd like to do (because I'm lazy) is to specify a string, say `hello world`, pass it to TeX to convert it to a node list, and then save the resulting node list. I've figured out how to do this from the TeX side, see code below. What I'd like to do is do it entirely from the lua side. I realise that TeX will have to be involved at some point, but is there a proper way to do this? At the moment, my best guess is to have lua issue the relevant TeX commands via a `tex.print()`. Using `hpack_filter` as my callback (is there a better one?) I would have lua install the callback, issue the TeX command to create a box, then uninstall the callback (and, for cleanliness, destroy the box). That just feels cludgey. Is there a better way to accomplish this? If it helps, I can arrange it so that my strings don't need expansion (though, of course, it would be better if that was allowed). Here's some code to play with:               \documentclass{article}     \usepackage{filecontents}     \usepackage{luatexbase}          \begin{filecontents*}{texttonodes.lua}     local stuff          function saveNodeList(h)        print("Saving box")        stuff = h        luatexbase.remove_from_callback('hpack_filter',"Save a box")     end          function saveNextBox()         luatexbase.add_to_callback ( 'hpack_filter', saveNodeList, "Save a box" )     end          function useLastBox()         luatexbase.add_to_callback ( 'hpack_filter', useNodeList, "Use a box" )     end          function useNodeList(h)        if stuff then           local l = node.tail(h)           l.next = node.copy_list(stuff)        end        luatexbase.remove_from_callback('hpack_filter',"Use a box")        return h     end          \end{filecontents*}          \directlua{dofile('texttonodes.lua')}          \newbox\mybox          \newcommand\savetext[1]{%       \directlua{saveNextBox()}%       \setbox\mybox=\hbox{#1}%     }     \newcommand\usetext[1]{%       \directlua{useLastBox()}%       \setbox\mybox=\hbox{#1}%       \unhbox\mybox     }          \begin{document}          \savetext{hello world}          \usetext{goodbye earth, }          \end{document}


title: Where are conflicts between biber and biblatex

text: I have seen they're is a lot of problems between `biber` and `biblatex` on fedora, but I need it ! I have (on a fedora 20 with `texlive-full`) `biber` 1.8 because of the old age of texlive fedora package but it doesn't work on my tex files... The same file on Archlinux texlive distribution works ... So I imagine this is a dependence problem. Someone can help me? here the log error :               Use of uninitialized value $name in lc at /usr/share/perl5/Biber/SortList.pm line 87.          Use of uninitialized value $lssn in concatenation (.) or string at /usr/share/perl5/Biber.pm line 682. Use of uninitialized value $lname in concatenation (.) or string at /usr/share/perl5/Biber.pm line 682.          INFO - This is Biber 2.0 (beta) INFO - Logfile is 'These.blg' INFO - Reading 'These.bcf' WARN - Warning: Found biblatex control file version 2.5, expected version 2.6 INFO - Found 84 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file './partie2/biblio-partie2.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 INFO - Found BibTeX data source './partie2/biblio-partie2.bib'      Edit : with biber 1.8               INFO - This is Biber 1.8 INFO - Logfile is 'These.blg' INFO - Reading 'These.bcf' INFO - Found 84 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file './partie2/biblio-partie2.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 INFO - Found BibTeX data source './partie2/biblio-partie2.bib'          Process exited with error(s)      Thank's E


title: Wrong x-axis with pst-plot

text: Consider the following example:               \documentclass{article}          \usepackage{pst-coil,pst-plot}          \def\tilskud#1#2{%      \psline[linewidth=1.5pt,linecolor=red]%       (!#1 1986   sub 0)%       (!#1 1986   sub #2 8 sub 2 div)%       (!#1 1986.2 sub #2 8 sub 2 div)%       (!#1 1985.8 sub #2 8 sub 2 div)     }          \begin{document}          \begin{pspicture}(-1.35,-0.4)(9.15,7.7)     \psaxes[       yAxis=false,       xLabels={,1987,,1989,,1991,1992,1992,1994}     ]{->}(0,0)(0,0)(8.5,0)[Fish,0][,90]     \psyTick(0){0}     \psaxes[xAxis=false](0,0)(0,0.2)     \pszigzag[coilarm=0.0625,coilwidth=0.3,coilheight=0.5](0,0.2)(0,0.8)     \psaxes[       xAxis=false,       Oy=10,       dy=0.5,       ylabelFactor={\cdot 10^6}     ]{->}(0,1)(0,0.75)(0,7.35)[,0][Horse,90]     \multido{\r=1+0.5}{13}{\psline[linestyle=dotted](0,\r)(8.5,\r)}     \tilskud{1987}{14.28}     \tilskud{1989}{15.548}     \tilskud{1991}{21.4}     \tilskud{1992}{20.24}     \tilskud{1993}{17.64}     \tilskud{1994}{14.442}     \end{pspicture}          \end{document}      ![output](http://i.stack.imgur.com/NRcmY.jpg) I would like to have the labels as I have tried to define them using `xLabels`; how do I get this?


title: Put subfigure labels inside figures using subfig package

text: I'd like to put subfigure labels (a), (b), etc., at the top left corner of subfigures like the following figure: ![image](http://i.stack.imgur.com/46m66.jpg) I know there are some workarounds like this post (with `stackengine`) or this post (with `subcaption`). However, I don't want to use `stackengine` unless there's really no way to do so, and REVTeX4 rules out the `subcaption` option. I therefore wonder if there exists a workaround specifically for `subfig` package (and potentially compatible with REVTeX4). The following MWE provides an unsuccessful attempt to achieve the desired effect:               \documentclass{revtex4-1}     \usepackage{graphicx}     \usepackage{subfig}     \captionsetup[subfloat]{farskip=-10pt, position=top}          \begin{document}     \begin{figure}     \centering         \subfloat[][]{         \includegraphics[width=0.45\linewidth]{example-image-a}}         \subfloat[][]{         \includegraphics[width=0.45\linewidth]{example-image-b}}\\         \subfloat[][]{             \includegraphics[width=0.45\linewidth]{example-image-c}}         \subfloat[][]{             \includegraphics[width=0.45\linewidth]{example-image-a}}         \caption{abcd}     \end{figure}     \end{document}


title: Create a table of contents

text: I'm new in LaTeX, and I want to create a TOC like this one ![The required output](http://i.stack.imgur.com/OA7u1.png) TIP: every red box is a link to a certain area in the article.


title: Tikzmarks being placed arbitrarily when shifting tikzpicture

text: I wanted to center my `tikzpicture` canvas for all my slides so that can consistently position objects. For some reason, when I added `shift=(current page.center)` to all my `tikzpicture` picture environments, the `tikzmark`'s I used positioned their marks extremely arbitrarily. I've tried to distill a MWE below which replicates this strange behaviour.               \documentclass[xcolor={svgnames}]{beamer}          \usetheme{boxes}     \useoutertheme{infolines}          \usepackage{tikz}     \usetikzlibrary{tikzmark}          \begin{document}          % I tried this, but it didn't work.     %\tikzset{%     %  every picture/.append style={%     %        shift=(current page.center)     %        }}          \begin{frame}       \begin{itemize}         \item \tikzmark{a} abcd         \item abcd         \item abcd       \end{itemize}       % Including shift in the options causes the tikzmark to move arbitrarily.       \begin{tikzpicture}[remember picture,overlay]%,shift=(current page.center)]         \node at (current page.center) {o};         \node at (pic cs:a) {tikz-a};       \end{tikzpicture}          \end{frame}          \end{document}      Here is what it looks like when I don't shift the `tikzpicture`. ![tikzmark doing the right thing](http://i.stack.imgur.com/HaVNJ.png) And now when I do. ![tikzmark failing](http://i.stack.imgur.com/s5EOx.png) I get the same behaviour if I append the shift to `tikzpicture`; I did so with the intention that it would appropriately shift `tikzmark`'s coordinates too. I also find it funny that the page centers (marked with an 'o') are the same in both cases; this is not usually true with the slides I'm trying to make though. Finally, I am using the 1.0 version of `tikzmark` from CTAN.


title: Is there an easy way to patch commands containing ^^J?

text: I'm currently looking at various questions related to `multicol` and try giving answers to some of them. Often enough the answer would involve patching `\balance@columns` or similar macros and in that case `\patchcmd` from `etoolbox` fails because there are newline characters in the macro, e.g.,                      \message{^^JColumn               \number\@tempcnta\space                badness: \the\badness\space}%      Now, I can of course add the whole definition of `\balance@columns` to my answer, but this command has 165 lines, so I would rather like to avoid this. Is there any easy way to patch nevertheless (or get rid of the `^^J` from the outside) that I'm missing?


title: Preserve memoir headings for 1 page

text: The default behavior of the `memoir` package is to change the headings immediately upon sectioning. This is counterintuitive to me, as I think the headings are to remind the reader of the section they are currently reading. This is not necessary when a new section begins, as the section header does that for them. The reader still needs a reminder as to which section they are _finishing_ rather than which they are starting. How can I change that behavior so the headers are updated on the _next_ page after a section command, rather than the actual page of the section command? If you run the MWE I provide below, look at pages 2–4. I want the following headers:   * page 2: the heading is as I want it   * page 3: I want the heading to match that of page 2   * page 4: the heading is as I want it Can I do this within `memoir`? MWE:               \documentclass[17pt,letterpaper,oneside]{memoir}     \usepackage{lipsum}          \copypagestyle{MWE}{headings}     \makepsmarks{MWE}{%         \nouppercaseheads         \createmark{section}{right}{nonumber}{}{}         \createmark{chapter}{left}{shownumber}{Chapter\ }{:\ }}     \makeoddhead{MWE}{\leftmark}{}{\rightmark}     \makeoddfoot{MWE}{}{\thepage}{}     \pagestyle{MWE}               \begin{document}     \chapter{The MWE}         \section{Introduction}             \lipsum[1-5]         \section{History of the MWE}             \lipsum[6-10]          \end{document}


title: makeindex: Illegal Roman number

text: I'm currently writing some appendices and I'm wondering why _some_ keywords don't show up in the index. The page-number is redefined for every section of the Appendix (A..., B..., C..., etc.). I've discovered, that there is always this error: > Scanning input file testfile.idx...done (0 entries accepted, 4 rejected). Content of file `testfile.idx`:               \indexentry{A}{C1}     \indexentry{B}{C1}     \indexentry{C}{C2}     \indexentry{D}{C2}      Content of makeindex-logfile:               Scanning input testfile.idx...     !! Input index error (file = testfile.idx, line = 1):        -- Illegal Roman number: position 2 in C1.     !! Input index error (file = testfile.idx, line = 2):        -- Illegal Roman number: position 2 in C1.     !! Input index error (file = testfile.idx, line = 3):        -- Illegal Roman number: position 2 in C2.     !! Input index error (file = testfile.idx, line = 4):        -- Illegal Roman number: position 2 in C2.     done (0 entries accepted, 4 rejected).      This works fine for pages starting with A, B and E (probably more), but fails with C and D. Therefore, I'm afraid that makeindex is interpreting C and D as Roman numerals for 100 and 500, respectively. MWE:               \documentclass{scrbook}     \usepackage{makeidx}     \makeindex          \begin{document}         \pagenumbering{arabic}\renewcommand{\thepage}{C\arabic{page}}         A\index{A}  B\index{B}         \clearpage         C\index{C}  D\index{D}         \cleardoublepage         \printindex     \end{document}      **What do I have to do to get makeindex interpreting "C1", etc. as it is?** * * * UPDATE: Problem on the pagenumbering encountered with hyperref: ![Adobe Reader](http://i.stack.imgur.com/HlCsZ.png)


title: Installing colortbl package

text: I have MiKTeX 2.9 basic installation (using Windows). When I go into the package manager and try to install `colortbl` package (to get `colortbl.sty`) I get the following message: > Error response from server: 404 Am I doing something wrong?


title: Latex ignoring vspace. How do I get these two images on the same page?

text: I have the following to insert two images into a latex document:               \begin{center}         \hspace*{-1in}         \includegraphics[width=8.5in]{rmse.pdf}         \vspace*{-2in}         \hspace*{-1in}         \includegraphics[width=8.5in]{mae.pdf}     \end{center}      This allows them to width across the width of the page perfectly, but the problem is I can't get them both on the same page. They would easily fit, except latex is insisting there be about 3 inches between them. I've tried a figure, subfigures and negative vspace* (which gets ignored). Can anyone tell me a simple way to reduce the spacing/margins/whatever to get latex to realize they fit together?


title: Keyval undefined error

text: I am new to Beamer. When I run a sample code:               \begin{frame}      \begin{itemize}     \item Assuming equal power allocation at the source \vspace{0.2cm}     \item Water-filling scheme at the relays over spatial \& temporal domains \vspace{0.1cm}     \item IAPC at each relay puts a lid on the water vessel     \end{itemize}     \begin{columns}[2]     \column{0.4\textwidth}     \begin{itemize}         \item Relays are rarely used at very low \& high SNRs \vspace{0.2cm}         \item Stronger relay is used more often \vspace{0.2cm}     \end{itemize}     \column{0.6\textwidth}     \includegraphics[scale=0.4]{Figures/Pon/Pon_naf1_c.eps}     \end{columns}     \end{frame}      I get error: `Package keyval Error: 2 undefined \end{frame}`. Anyone know what's wrong?


title: add custom citation that differs in format than the rest

text: This has been bugging me for quite some time now but can't find a nice way to work it out. I have a list of citations that follow the regular author. Year. Title. Journal. Volume: Pages layout. I have to cite a legal document (Water framework directive). How do I go about this, as the paper has no authors, journals, pages... I would like it to appear in the text as > ... V Sloveniji smo leta 2000 sprejeli _Vodno direktivo (2000/60/EC)_ (v > nadaljevanju: VD), ki v evropskem prostoru enotno ureja politiko upravljanja > površinskih in podzemnih celinskih voda, vključno s somornico in morjem.... and in the references as > Ter Braak, C. J. F., Verdonschot, P. F. M. 1995. Canonical correspondence > analysis and related multivariate methods in aquatic ecology. Aquatic > Sciences 57(3): 255–289. > > _Vodna direktiva (2000/60/EC)_ > > Wickham, H. 2009. ggplot2: elegant graphics for data analysis. Springer New > York. ISBN 978-0-387-98140-6. How should I specify my BibTeX source to achieve this? _EDIT_ This is a more or less minimal working example. Style file can be found here, and the bib file here.               \documentclass{article}          \usepackage{natbib}          \begin{document}          As specified in \citet{vd} and \citep{Fraschetti2006} \dots          \bibliographystyle{custom_style}     \bibliography{test}          \end{document}      _EDIT 2_ A workaround that worked for me (for now). The four questionmarks in question (hehe) were the result of missing year in the bib file. I have modified the custom_style.bst from               FUNCTION {format.date}     { year "year" bibinfo.check duplicate$ empty$         {           "empty year in " cite$ * "; set to ????" * warning$            pop$ "????"         }         'skip$       if$       extra.label *     }      to                  FUNCTION {format.date}         { year "year" bibinfo.check duplicate$ empty$             {               "empty year in " cite$ * "; set to " * warning$                pop$ ""             }             'skip$           if$           extra.label *         }


title: Integrate 'Sweave.sty' in the TeXLive 2010 search path (on Linux)

text: I'd like to add 'Sweave.sty' to my search-path, so that I don't need to copy 'Sweave.sty' to every Sweave-Document I create. I've located 'Sweave.sty' in '/usr/share/R/share/texmf/tex/latex'. I tried to create a symlink to this folder in my package-folder, however, this didn't really work. Anyway, I think adding this folder to TeXLive's search path would be the most elegant solution. I also found instructions on how to expand the search path in TexLive (here). Well, I seem to be too stupid to understand that :-( Could somebody explain in clear words how I can add the path mentioned above to my search path? Thank you!


title: Measure restriction sign

text: I need to use a notation for the restriction of a measure to a set. It is similar to `\mu \llcorner A`, but I want the symbol defined by `\llcorner` to be bigger. I can't seem to find the right command for this. ![enter image description here](http://i.stack.imgur.com/l1NMh.png) ![enter image description here](http://i.stack.imgur.com/scpmY.png) ![enter image description here](http://i.stack.imgur.com/c5viE.png) The result I want is something like the symbol in the pictures. The second picture is from Evans and Gariepy. The third one is from Federer's Geometric Measure Theory, so I don't think they are just isolated notations.


title: Automatic linebreaking inside displaymath

text: Yes, I know of the existence of `breqn`, and I am very excited about this package. I am trying to write a mathematics paper, that will be typeset in two different styles (different page sizes, and different textblocks, &c). At some point I have to typeset a long exact sequence, which looks approximately like               \[ 1 \to A \to B \to C \to D \to E \to F \to \ldots \]      In my paper, all these letters are actually longer mathematical expressions (cohomology groups). In one paper, this sequence fits nicely on the page, but in the other, I get an hbox overflow error. I immediately thought of `breqn`, but the result of using               \begin{dmath*}       1 \to A \to B \to C \to D \to E \to F \to \ldots     \end{dmath*}      is that I get a linebreak at every `\to`. This is not what I want. There should be just 1 linebreak (if needed), and it should automatically be chosen at the `\to` between `C` and `D`. How do I accomplish this?


title: How to modify Subsubsection Header (apa6.cls)?

text: I am using the `apa6.cls` for my document and need a different format of the section headers. I managed to modify the section and subsection header to match my criteria (see below). But the `\subsubsection` is still indented and followed by a dot, which I'd like to modify: > _Stimulusmaterial._ (with indention) In the end, the Subsubsection header should look like > _Stimulusmaterial_ (without indention)               \documentclass[ngerman,man,12pt,a4paper,noextraspace,donotrepeattitle]{apa6}     \usepackage[english,ngerman]{babel}          \begin{document}     \section{\normalfont{Methode}}     \subsection*{\centering\normalfont\textit{Material}}     \subsubsection{\normalfont\textit{Stimulusmaterial}}     \end{document}      As far as I tried, `\noindent` did'nt work and i have no idea how to remove the dot.


title: Combining the caption and fltpage package when using twopage setting in book class

text: I have run into a strange problem when using the `caption` package and the `fltpage` package in the `book` documentclass with the `twoside` setting.   After eliminating all kinds of variable it turned out that what is given below is the true MWE for the problem. I assume I'm doing something wrong as I'm relatively new to LaTeX and probably missed something in the documentation of the `caption` package.               \documentclass[twoside]{book}     \usepackage{caption}     \usepackage[leftFloats, CaptionAfterwards]{fltpage}          \begin{document}          \captionsetup[FPfigure]{format=hang, font=small, labelfont=bf}          \begin{FPfigure}         \fbox{\rule[-10cm]{0pt}{\textheight}Frame ... page.\hspace{5cm}}         \caption{A caption alone ... figure without a caption!}     \end{FPfigure}          \end{document}      If the option `twoside` is removed than it will produced the desired layout for the caption. But with it I get the following errors: > 7x Illegal parameter number in definition of \AP@ \end{FPfigure}   >  Undefined control sequence \end{document} Environment undefined.   >  Undefined control sequence \end{document} Package caption Error: No float > type '' defined 29x Missing \endcsname inserted Reference `FPfigure-1-pos' > on page 1 undefined on input line 10. If the `fltpage` environment is not used (just a normal figure) then also no errors are given and the correct layout is produced.   I'm working on a Windows system using MiKTeX 2.9 As this is for my thesis I really need the `twoside` option. Any help would be greatly appreciated. I must say that I didn't try other classes.


title: Best way to connect 2 nodes with path going around other node

text: Imagine the following MWE:               \documentclass{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \node [draw, circle, minimum width=1cm] at (0,0)  (n1) {n1};     \node [draw, circle, minimum width=1cm] at (3,-1) (n2) {n2};     \node [draw, circle, minimum width=1cm] at (4,0)  (n3) {n3};          \path [in = 270, out = 0] (n1) edge (n3);          \end{tikzpicture}     \end{document}      How can correctly control the path to go around node `n2`? I know there are various methods, using an auxiliary `coordinate`, or with `controls`, but I am not sure what would give a better result. ![enter image description here](http://i.stack.imgur.com/HPJyn.jpg)


title: Add Table in Header with image

text: I'm trying to create question paper using Latex. Sample copy of expected header for first page is mentioned below. Note: Image above "First Page Header". Can you please suggest, how can I add table in header with Image on left hand-side as mentioned below. Is there any recommended package? ![enter image description here](http://i.stack.imgur.com/Kxpy9.png)


title: clipping a rectangle in TikZ doesn't work

text: I have this code :               \documentclass[tikz]{standalone}     \usepackage[utf8]{inputenc}     \usepackage{comment}     \usepackage{tkz-euclide}     \usetkzobj{all}      \tikzset{     b/.style={draw, rectangle, rounded corners=1.5ex,minimum height=0.4in, text width = .7in, minimum width=1in,align=center},     d/.style={draw, rectangle, rounded corners=1.5ex,minimum height=0.4in, text width = .5in, minimum width=.5in,align=center},     c/.style={draw, rectangle, rounded corners=1ex, minimum height=0.2in, minimum  width=.3in,align=center},     }     \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,backgrounds}          \begin{document}      \pgfmathsetseed{1}        \begin{tikzpicture}           \draw (0,.5) circle (0.2cm);        \node[rectangle] (user) at (0, -1) {User};        \draw (0,0.3) -- (0, -.2);        \draw (-.1, .1) -- (.1, .1);        \draw (0,-.2) -- (.12,-.6);        \draw (0,-.2) -- (-.12, -.6);             \node[b] (server) at(0, 2) {Server};             \node (node1) at (4,4){};                  \node[b, above=6cm of user] (app) {App};                       \coordinate (a) at (app.north);         \coordinate (c) at ($(node1.east) + (.3,0)$) ;         \coordinate (b) at (server.east);  % modify the -1cm offset here             % Draw the arc through the points         \tkzCircumCenter(c,b,a)\tkzGetPoint{O}         \tikzset{compass style/.append style={<-,thick,black}}         \tkzDrawArc(O,b)(a)               \node[above=1cm of app] (abapp){};         \node (righ) at ($(node1.east) + (1.2,0)$){Results};              \node[left=12 of node1.center, text width = 2.5cm](scn) {};                   \node[draw, fill opacity=0.2,fill=blue, fit=(righ)(abapp)(scn)(user)] (fiter) {};              \clip (fiter.south west) rectangle (fiter.north east);             \end{tikzpicture}                \end{document}        I got this result (the white above the blue rectangle is a part of the result) : ![enter image description here](http://i.stack.imgur.com/C9Gx1.png) How can I print only the blue part (compile it to see my problem)? I used `clip` but it doesn't work. The white space is created when I draw the arc through the three points.


title: \includeonly not including parts correctly because of _ in the file name and breqn

text: I am trying to use               \include{...}       and               \includeonly{...}       to structure my thesis and faster compile the document. As long as I only use `\include{...}` everything works fine. But once I try to use `\includeonly{...}` in the preamble I only get the table of contents, the list of figures and tables and the Bibliography but no actual content. I don't know what I am doing wrong. I tried to remove some packages I am using but so far I couldn't find one that causes the problem. In case it matters every "part" consists of `\chapter{...}` parts, `\section{...}`and `\subsection{...}` parts including text, tables and figures. Here is what I have in my main document (I left the whole preamble in case one of the packages I use causes the problem):               \documentclass [a4paper,12pt,DIV=10,BCOR=0.5cm]{scrreprt}      \usepackage[german, english]{babel}     \usepackage{cite}     \usepackage[pdftex]{graphicx}     \graphicspath{{Pictures/}}     \usepackage{hyperref}     \usepackage{textgreek}     \usepackage[toc,page]{appendix}     \usepackage{sidecap}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{breqn}     \usepackage{tabularx}     \usepackage{tabu}     \usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}      \usepackage{fixltx2e}     \linespread{1}                    \includeonly{part_1}                         \begin{document}          \pagenumbering{Roman}     \pagestyle{headings}               \include{titlepage}               \setcounter{page}{0}          \tableofcontents     \listoffigures     \listoftables                         \include{abstract}                    \pagenumbering{arabic}          \include{part_1}          \include{part_2}          \include{part_3}                         \bibliography{thesis.bib}{}     \bibliographystyle{unsrt}                    \end{document}      After some try and error I found an answer: There seems to be an issue with using _ in file names when using `\includeonly`. By using only file names without `_`, like `part1` or `part-1` everything seems to work fine. Strangely there are documentations about `\include` and `\includeonly` that use _ in their file names like this one here: http://en.wikibooks.org/wiki/LaTeX/Modular_Documents


title: Can I change the language the commands are written in to British English?

text: Hi basically I am a newbie to this software, just getting the hang of the basics but I found that all the commands are in american english. Is there something I can use, download or one of these 'package' things that can change this for me?


title: Line breaks and the URL package

text: Long URLs need to be broken at the end of a line. Here's a topic about that. That topic suggests adding the hyphens option to the URL package, and also to define               \renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z}      I've done both, but it still doesn't work. Below is a copy of an example. Any ideas?               \documentclass[10pt, a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[swedish,english]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{amsmath}     \usepackage[hyphens]{url}     \usepackage{hyperref}     \renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z}          \usepackage{fixmath}     \usepackage{graphicx}     \usepackage[usenames,dvipsnames]{color}     \usepackage[small,font=it]{caption}     \usepackage{amssymb}     \usepackage{icomma}     \usepackage{verbatim}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \setlength{\parindent}{0pt}      \setlength{\parskip}{2ex}          \begin{document}          This is a test. Kurzweil says technology increases exponentially (\url{http://www.kurzweilai.net/the-law-of-accelerating-returns}).          \end{document}      **EDIT:** I am using latex and then dvipdf to compile.


title: Can I place a caption inside of an image?

text: I've recently seen this the following image in this question: ![enter image description here](http://i.stack.imgur.com/JxMNo.jpg) As I was looking for a way to create nice captions (without the "Figure:") for a beamer presentation, I wondered if it was possible to create this effect within LaTeX. I got so far with GIMP: ![enter image description here](http://i.stack.imgur.com/WAUin.jpg) ![enter image description here](http://i.stack.imgur.com/Eyzox.jpg) I did it like this:   1. add a white layer where the caption will go and set it's transparancy to 50%   2. gaussian blur on the image where the caption will go 3 add the caption Can I do this within LaTeX, too? I have a couple of images which I would like to include in a beamer presentation like this, so it would be great if this worked. (I've tried a google image search for this, but "latex caption" seems not to be good ... even when I filter explicit results) ## My try:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}          \usepackage{tikz}          \begin{document}     \begin{preview}         \begin{tikzpicture}             \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\linewidth]{foto-martin.jpg}};             \begin{scope}[x={(image.south east)},y={(image.north west)}]                 \draw[white, fill=white!50!transparent] (0,0.05) rectangle (1,0.1);                 \node at (0.5, 0.075) {\Huge Martin};             \end{scope}         \end{tikzpicture}     \end{preview}     \end{document}      But I don't know how to get the transparency / positioning working. As somebody suggested imagemagick, I tried this:               width=`identify -format %w foto-martin.jpg`; \     convert \         -background '#0008' \         -fill white \         -gravity center \         -size ${width}x40 \             caption:"Martin" \             foto-martin.jpg +swap \         -gravity south \         -geometry +0+10\         -composite  out.jpg      But I can't get some padding for the text in the caption and the box arround.


title: connecting arrows between vertical and curved line

text: I would like to make a few alterations to the following figure:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{snakes,arrows}          \begin{document}     \begin{tikzpicture}     % draw the ground     \draw (0,0) -- (8.5,0) .. controls (8.5,-1) and (10,-1).. (11,-1) -- (14,-1);     % draw lake surface     \draw [snake = snake,segment amplitude =.4mm, segment length = 5mm] (8.5,0) -- (14,0);     % draw the wind velocity field     \draw[very thick,gray](12,0)--(12,5);     \draw (12,0)..controls(12.5,2) and(14,3) ..(14,5);% draw profile     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nDIUK.png) From this figure I would like to add horizontal arrow lines from the straight vertical line to the curved line. My attempt:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{snakes,arrows}          \begin{document}     \begin{tikzpicture}     % draw the ground     \draw (0,0) -- (8.5,0) .. controls (8.5,-1) and (10,-1).. (11,-1) -- (14,-1);     % draw lake surface     \draw [snake = snake,segment amplitude =.4mm, segment length = 5mm] (8.5,0) -- (14,0);     % draw the wind velocity field     \draw[very thick,gray](12,0)--(12,5);     \draw (12,0)..controls(12.5,2) and(14,3) ..(14,5);% draw profile     \foreach \y in {2,3,5}     \foreach \x in {12.5,14,14}{     \draw[=>stealth,->](12,\y)--(\x,\y);     }     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yex6d.png) which is obviously incorrect, but I cant seem to solve this. Also, how could I make the horizontal lines be drawn 5 time evenly spaced vertically?


title: Spacing after section title with res.cls

text: It is possible to change spacing after a section title with following               \usepackage[compact]{titlesec}     \titlespacing{\section}{0pt}{1em}{2em}      However, when I am using `res.cls` by               \documentclass{res}      and try to set the spacing after section title, I am getting this error               Argument of \section has an extra } \ttl@extract\section     Paragraph ended before \section was complete  \ttl@extract\section     Paragraph ended before \in@ was complete  \ttl@extract\section     Too many }'s \ttl@extract\section          Missing number, treated as zero \section{Objective}     Illegal unit of measure (pt inserted) \section{Objective)      Is there a way to manually specify spacing after section title while using `res.cls`? I was only able to change the spacing after a section (not the title) through `res.cls`.


title: Using showkeys and cleveref together

text: I'd like to use `showkeys` to show me the labels of my definitions (this works) and the labels of the used references (this does not work). The reason for the latter problem is that I use the `cleveref` package, i.e. `\Cref{thm:something}` instead of `\ref{thm:something}`. Changing all `\Cref` to `\ref` helps, but I'd like to stick to `\Cref`.               \documentclass[12pt,a4paper]{scrbook}     \usepackage[]{showkeys}     \usepackage{cleveref}     \begin{document}     \chapter{A}     \label{cha:A}     \chapter{B}     In \Cref{cha:A} something was done.     In \ref{cha:A} something was done.     \end{document}


title: How can I plot bigger amounts of data?

text: I am currently playing around with hailstone sequences (collatz numbers). I would like to create a plot like this (from Wikipedia): ![enter image description here](http://i.stack.imgur.com/Sfe32.png) But I don't know how this kind of plot is called (it's neither a line plot, nor a scatter plot or a bar chart or a histogram, although it looks similar). I would like to plot how many steps you need from a number `n` to get to `1`. The x-axis should be numbers (from 1 to M, with M as high as possible) and the y-axis should be the number of steps. As I didn't know how the kind of plot above is called (and I was not able to find a name) I used a scatterplot: ![enter image description here](http://i.stack.imgur.com/Vl8zI.png) Sadly, this seems to consume a lot of memory. Plotting 4100 (n, steps from n to 1) pairs worked, but when I increased it to 4150 pairs, I got:               ! TeX capacity exceeded, sorry [main memory size=3000000].     \endvarwidth ...\vbox \bgroup \unvcopy \@tempboxa                                                        \@tempdima -\maxdimen \let...     l.28 \end{document}      I think the following could eventually solve my problem:   * switch to gnuplot (I have no idea how to read a CSV-file with gnuplot and I only used gnuplot+LaTeX once. Does anybody have a minimal working example with instructions how to compile it?)   * switch diagram type to the diagram above (How is it called?)   * don't actually write the numbers n in csv file, but get it from the line number (How can I get the line number from a CSV file in my code below for x?)   * switch to another type of plot like here (I guess this will be more complicated and it seems as if I had to use gnuplot / R. Does anybody know how to apply this to my problem?) All code I've written is on GitHub. This is the LaTeX code I've written so far:               \documentclass[varwidth=true, border=2pt]{standalone}     \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[margin=2.5cm]{geometry} %layout          \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}         \begin{axis}[                 axis x line=middle,                 axis y line=middle,                 enlarge y limits=true,                 %xmin=0, xmax=2150,                 %ymin=0, ymax=600,                 width=15cm, height=8cm,     % size of the image                 grid = major,                 grid style={dashed, gray!30},                 ylabel=steps,                 xlabel=$n$,                 legend style={at={(0.1,-0.1)}, anchor=north}              ]               \addplot[scatter,only marks] table [x=n, y=steps, col sep=comma] {../steps.csv};         \end{axis}     \end{tikzpicture}     \end{document}      I would like to plot at least 100,000 elements (rather 10,000,000 if possible). How can I do it?


title: Incorrect vertical spacing inside a mdframed environment

text: I have some problems about vertical spacing before and after some environments inside a mdframed environment. It is as if `topsep=0`. The insertion of `\setlengh{\topsep}{8pt plus 2pt minus 4pt}` fixes the problem except for the first list environment inside each mdframed environment. ![enter image description here](http://i.stack.imgur.com/waIe5.png)               \documentclass{article}     \usepackage{amsthm}     \usepackage{lipsum}     \usepackage[framemethod=tikz]{mdframed}     \newtheorem{theorem}{Theorem}          \begin{document}         \verb?\topsep?=\the\topsep          \begin{mdframed}     \verb?\topsep?=\the\topsep          \lipsum[11]          \begin{itemize}       \item \verb?\topsep?=\the\topsep     \end{itemize}                                \lipsum[11]          \begin{itemize}       \item \verb?\topsep?=\the\topsep     \end{itemize}          \lipsum[11]          \begin{verbatim}       $[G\colon H\cap K] = [G\colon H][H\colon H\cap K]$     \end{verbatim}          \begin{theorem}       \lipsum[11]     \end{theorem}          \lipsum[11]     \end{mdframed}     \end{document}


title: Dos and Don'ts of \pgfplotsset{compat=newest}

text: **Question** I just upgraded to 1.9. Christian recommends against the `\pgfplotsset{compat=newest}`, but that leaves one having to come back and update `compat=x.y` in one's projects, several times, over a long period of time. I realise that if the project originally worked there's no need, but that's not always the case. Plenty of my projects get reused and improved. But, it's not a big deal if there really is no better alternative. What would be considered a valid use of `compat=newest`, if there is one. And, is it one thing or the other - `compat=x.y` or `compat=newest`? **Conclusion** The bulk of Christian's answer is about the utility of being able to set the maximum version on a per project basis and not only that, it highlights a built in feature that can actually recommend an appropriate version. None the less, the last paragraph is the telling one. It's better to have `compat` set to the latest version you currently know gives you what you want. It may seem that newest is a good idea if you're up to date with latest, but it won't always be. So `compat=newest` is an ironic feature. It seems there is no Do. The Dos apply to the other settings of `compact` and the facilities they provide.


title: Create association lines between characters

text: I intend to create "association lines" between characters, where the start of the line is one or more characters inside a word, and the end of the line is a single character. Something like this (created in MS Word): ![enter image description here](http://i.stack.imgur.com/2rTTN.png) I'm trying to mimic/replicate something from a book, where it looks like this: ![enter image description here](http://i.stack.imgur.com/UAliO.png) It doesn't matter much for my purposes whether the lines are underneath or above the words (but it would be nice if I knew how to do either). I think it would be best to have these drawings as figures (i.e. inside a `figure` environment or something similar). I'm sure there are lots of different ways one can accomplish this, but I have (as of yet) no reasons to prefer one way or another (simply because I have no idea how to do this). I'm open to all suggestions. * * * **EDIT** : Questions about `pst-asr` based on Alan Munn's suggestion. MWE:               \documentclass{article}     \usepackage{pst-asr, fontspec}     \setmainfont{Linux Libertine O}     \begin{document}     \psset{         reptype = nots, % representation type = no timing slots         xgap = 0.5em, % set width of space between each character (how can this be set to the 'normal' space between characters?)         sysym = L, % what does this do? I changed it to 'H', but the output is the same         syB = 2em, % set the distance between the top of the phoneme tier and the bottom of the syllable tier?         everyph = \normalfont % the format of every character on the phoneme tier         }         \asr[syB = 2em] asa| % why does syB need to be set independently for this one?             \tierput(1,sy){H} % put what's in {} in character position 1 on the syllable tier             \assoc(1,sy)(1,ts) % draw association line from the bottom of character position 1 on the syllable tier to the bottom of character position 1 on the time slot tier         \endasr         \hspace{3em}         \asr asta|             \tierput(1,sy){H}             \assoc(1,sy)(1,ts)             \assoc(1,sy)(2,ts)         \endasr     \end{document}


title: How to create email hyperlink with predefined subject in LaTeX?

text: I´m wondering if you can include an email hyperlink in a PDF, that will not only open my mail application with the specified mail address, but also insert a subject, which I specified in LaTeX? I found something, that hints in the right direction, however, I seem to be unable to make it work. There is the "pracjourn" class, which is supposed to have this implemented in the following macro from http://ctan.uib.no/macros/latex/contrib/pracjourn/pracjourn.pdf (p.15): > This macro takes three arguments to typeset a mailto email hyperlink. The #1 > takes the email address, #2 takes the default subject of the email, and #3 > is the text to appear in the output as the hyperlink.               230 \newcommand\tpj@compose@mailto[3]{%     231 \edef\@tempa{mailto:#1?subject=#2 }%     232 \edef\@tempb{\expandafter\html@spaces\@tempa\@empty}%     233 \href{\@tempb}{#3}}      I don´t really know what to do with that macro... Even using the pracjourn class doesn´t support this command, which is obviously due to the @ in the command name and I can only guess, that this is not meant for LaTeX, but TeX?!


title: Turn off syntax highlighting in minted?

text: How do I turn off syntax highlighting in minted? Defining my DSL with a CFG and then a PEG; and the syntax highlighting is getting in the way.


title: Number sections in secondary table of contents

text: I have a main document which contains a secondary documents table of contents. I'm using the example given in the first half of this answer. My secondary ToC doesn't use section numbering. I assume this is because I haven't defined the necessary bits for `toca`, but I'm not sure what those bits are. ### How can I enable section numbering for my secondary table of contents? Here's a minimal, working example:               \documentclass{report}     \usepackage{tocloft}     \makeatletter     \newcommand\tableofcontentsA{%         \@starttoc{toca}%     }     \makeatother          \begin{document}     \tableofcontents          \section{Main introduction}     \section{Example Document-2 Table of Contents}     % These are all defined in the same page, so disable page numbering\     \cftpagenumbersoff{chapter}     \cftpagenumbersoff{section}     \cftpagenumbersoff{subsection}          \addcontentsline{toca}{chapter}{Introduction}         \addcontentsline{toca}{section}{foo}         \addcontentsline{toca}{section}{bar}     \addcontentsline{toca}{chapter}{baz}         \addcontentsline{toca}{section}{barbar}          \tableofcontentsA     \section{Main Conclusion}          \end{document}      Here's what it produces: ![Example document](http://i.stack.imgur.com/pR3ET.png) I'd like to have something more like this:               1 - Main intro     2 - Example ToC         1 - Intro         1.1 - foo         1.2 - bar         2 - Baz         2.1 - barbar     3 - Main Conclusion


title: Footer text under poster

text: I am using the `baposter` package to create a basic poster and under the last box I'd like to put some normal un-boxed footer text. But I don't really know how to achieve this. `baposter` itself doesn't seem to have a footer component. If I just put the text as is under the last box, nothing is shown and if I put it between `\end{poster}` and `\end{document}`, it is shown on a new page. So what is the easiest way to just put a line of normal footer text under the last box of a `baposter`?


title: Table column widths disproportionate due to multicolumn cell being too long

text: I'm trying to typeset a table that would have a header in the first row (I'm not looking for a different/better solution to adding a header, but for a fix to this solution. Thanks). I want to achieve this by **having a multicolumn cell spanning all the columns of the first row**. The problem is that if the text is too long, the **column widths are uneven** , with the last column accumulating excess width. I would expect all of the columns to be of _approximately_ the same width (although I cannot find a decent source that would say they should), given the fact that all the text in the second row is of _approximately_ the same width. I find this behaviour quite puzzling and have no idea what the cause could be. I know I could perhaps remedy this by manually setting the column widths, but am curious as to how to fix this without doing that ( **I do not need** or indeed want the **columns to be of the same width** , but roughly proportional to the length of their content), preferably but not necessarily by using the tabular environment only (some other conflict with the document class I am using). What is it that I'm doing or assuming wrong? And why? MWE:               \documentclass{article}     \begin{document}          \begin{tabular}{ccccc}     \multicolumn{5}{c}{This is a piece of text. The longer it is, the longer the last column.} \\      1 & 2 & 3 & 4 & 5 \\     \hline     \end{tabular}          \end{document}      Resulting table. Notice how the last column of the second row accumulates excess width. ![](http://i.stack.imgur.com/O5oJ6.png)


title: Align columns correctly in multicolumn enviroment

text: I have the following table:               \documentclass[a4paper,11pt]{report}          \usepackage[english]{babel}     \usepackage{booktabs}          \begin{document}             \begin{tabular}{|cc|ccc|}             \hline             \multicolumn{2}{|c|}{Parameters} & \multicolumn{3}{|c|}{This is some long text about precision and recall}\\             \hline             n & p &S& P & R\\             \hline             3000 & 0.5 & 3000 & 0.01 & 1.00\\         3000 & 0.1 & 3000 & 0.01 & 1.00\\         3000 & 0.008 & 30 & 1.00 & 1.00\\         \hline         \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/XANm4.png) As you can see the variables S,P and R are not aligned correctly. I want them each to take the same space. How can I do this?


title: swap x and y axis on data generated plot

text: I have generated a plot using a long list of plot coordinates (x,y). I would like to plot the data as (y,x) with y on the horizontal axis and x on the vertical axis. Is there any way to do that? I want to avoid generating the data again or invert by hand the (x,y) to (y,x). Thanks!               \begin{tikzpicture}          \begin{axis}[     width=2in,     height=2in,     scale only axis,     xmin=-0.2, xmax=0.15,     xtick={-0.2,-0.1,0,0.1},     scaled x ticks = false,     x tick label style={/pgf/number format/fixed},     ymin=-0.1, ymax=0.7,     scaled y ticks = false,     y tick label style={/pgf/number format/fixed},     axis lines=left,     axis on top]     \addplot[only marks,mark=*,color=blue,line width=2.0pt] plot coordinates{ (-0.157508722022685,-0.0618570189718741) (-0.151664833094664,-0.0515966883381529) (-0.145564835252092,-0.040823938776308) (-0.139190452250407,-0.0294967207779095) (-0.132521672953995,-0.0175681338079243) (-0.12553655513375,-0.00498567308655944) (-0.118211006929595,0.00830966963892551) (-0.110518545011038,0.0223845008246773) (-0.102430029660386,0.0373143588089115) (-0.0939133791975919,0.0531853589452309) (-0.0849332700533765,0.0700962421608876) (-0.0754508355568791,0.0881609593871301) (-0.0654235205799195,0.107511971554234) (-0.0548043511797005,0.128304532815312) (-0.0435426432953672,0.150722344204677) (-0.0315837272782253,0.174985172251473) (-0.0188698246180387,0.201359353223726) (-0.00534192152608734,0.230172683799602) (0.00905671632198194,0.261836217436385) (0.0243733112413743,0.296877414534431) (0.0406316912795995,0.335992918393738) (0.0578048302999246,0.380137343750061) (0.0757586843741441,0.430683077324108) (0.0941307367012631,0.489733069616693) (0.112044793360859,0.560802333252538) (0.127355632830606,0.65053016141635) };          \end{axis}     \end{tikzpicture}


Want to add more column on the left side?               \documentclass{article}     \usepackage{pgfgantt}     \usepackage{rotating}     \usepackage[graphicx]{realboxes}          \newganttchartelement*{mymilestone}{     mymilestone/.style={     shape=isosceles triangle,     inner sep=0pt,     draw=cyan,     top color=white,     bottom color=cyan!50     },     mymilestone incomplete/.style={     /pgfgantt/mymilestone,     draw=yellow,     bottom color=yellow!50     },     mymilestone label font=\slshape,     mymilestone left shift=0pt,     mymilestone right shift=0pt     }          \newgantttimeslotformat{stardate}{%     \def\decomposestardate##1.##2\relax{%     \def\stardateyear{##1}\def\stardateday{##2}%     }%     \decomposestardate#1\relax%     \pgfcalendardatetojulian{\stardateyear-01-01}{#2}%     \advance#2 by-1\relax%     \advance#2 by\stardateday\relax%     }               \begin{document}     \begin{sidewaysfigure}     \begin{ganttchart}[vgrid, hgrid]{1}{36}     \gantttitle{2014}{12}      \gantttitle{2015}{12}     \gantttitle{2016}{12}\\     \gantttitlelist{1,...,36}{1}\\     %First Group     \ganttgroup{Group 1}{1}{10} \\     \ganttbar{Task 1}{2}{3} \\     \ganttbar{Task 2}{4}{10} \\     \ganttbar{Task 3}{9}{12}\\     %\ganttlink{elem0}{elem1}     \ganttlink{elem1}{elem2}     \ganttlink{elem2}{elem3}     %\ganttmilestone{Milestone 1}{11}     %Second Group     \ganttgroup{Group 2}{14}{20} \\     \ganttbar{Task 1}{15}{18} \\     \ganttbar{Task 2}{18}{21} \\     \ganttbar{Task 3}{22}{24}\\     %\ganttlink{elem4}{elem5}     \ganttlink{elem5}{elem6}     \ganttlink{elem6}{elem7}     %\ganttmilestone{Milestone 1}{11}     %Third Group     \ganttgroup{Group 3}{25}{27} \\     \ganttbar{Task 1}{26}{28} \\     \ganttbar{Task 2}{28}{32} \\     \ganttbar{Task 3}{32}{35}     %\ganttlink{elem8}{elem9}     \ganttlink{elem9}{elem10}     \ganttlink{elem10}{elem11}     %\ganttmilestone{Milestone 1}{11}     \end{ganttchart}     \end{sidewaysfigure}          \end{document}       ![enter image description here](http://i.stack.imgur.com/gWrit.jpg)


title: tkz-euclide.sty cannot be found

text: I am trying to use `tkz-euclide` package. I am using Fedora 16. Installed TeX Live. Everything is working well. Paths are OK. Unfortunately when I try `\usepackage{tkz-euclide}`, it says `tkz-euclide.sty` cannot be found. I checked that it is actually installed by the command:               tlmgr show tkz-euclide      So what is the problem here? Any ideas?


title: Why haven't any TeX->HTML converters been updated to use current web standards/style?

text: I think that updating these converters would help TeX stay relevant as a document processing language. In these last few years, web development has really skyrocketed. CSS3 has brought along a lot of support for rich typography on the web as well as hyphenation using TeX algorithms. There are also a lot of APIs and tools for typography and math. The web is catching up with typesetting; it will never be the same as PDF, but it's worth updating these tools for better conversion of LaTeX to web documents. There are many advantages to web pages   * Loads faster than PDF   * Available across devices and browsers (no need for a PDF reader), including mobile   * By using the MathJax API, you can have high-quality typography for math expressions, with scaling and easy exporting of LaTeX and MathML   * By embedding/popup/linking math expressions to WolframAlpha, equations retain their symantic encoding, and expressions/documents become interactive   * You can link to specific parts of the document externally and internally (you could convert TeX tags to support this)   * Tikz and metapost pictures can be translated to SVG, enabling adding good looking and scale-able diagrams and illustrations   * Tool tips, alt-tags, hover-icons, animations, etc. which could potentially aid usability/accessibility I'm new to TeX and StackExchange, and I don't have the programming chops to develop something like this, but maybe someone out there is interested in a project like this. Eitan Gurari's software is orphaned and needs someone to take on the challenge of continuing projects like this. (The tag TtH might also belong here, but I couldn't add it. It's a single C file program to convert TeX to html) * * * Edit: Based on the current responses, I just want to clarify my question. TeX is for pretty-printing. I haven't seen a single example of converted TeX->HTML actually look good, and math is usually converted into ugly HTML or images. It's probably possible to bundle resources to take the output of the tools and style them, but I was hoping to at least see an example of this done attractively--or, better yet--a converter that actually pretty-prints a webpage similar to how LaTeX does to DVI/PDF.