title: Plot using pgfplots from a text file in long form (vs wide form)?

text: In the statistical programming language `R`, there are two different forms to represent data. The _wide form_ looks like the following:                    subject time age weight height     1 John Smith    1  33     90   1.87     2 Mary Smith    1  NA     55   1.54      The _long form_ looks like the following:                    subject variable value     1 John Smith     time  1.00     2 Mary Smith     time  1.00     3 John Smith      age 33.00     4 Mary Smith      age    NA     5 John Smith   weight 90.00     6 Mary Smith   weight 55.00     7 John Smith   height  1.87     8 Mary Smith   height  1.54      Source of example: Hadley Wickham's paper. But note that I changed Mary's weight to 55 where previous it was NA. Is it possible to read in a text file which is in long form, and to plot for example the height against the weight?               \documentclass{standalone}          \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}       % the following code doesn't work, but communicates the idea       % of what I want to work       \addplot [x variable=height,y variable=weight] {input.txt};     \end{axis}     \end{tikzpicture}     \end{document}      The reason why I am asking this question is because I want to plot the output of a computer simulation program which I have written, and it is easier to output in long form than it is in wide form. Currently, I use an `R` script `convert.R` to read in the text file `in.txt` in long form and to convert it into a text file `out.txt` in wide form, which pgfplots can read. It would be more convenient if somehow pgfplots could read and process `in.txt` directly without requiring me to run `convert.R` manually.


title: Delayed import of graphics for latex->DVI->PNG

text: I have a need for producing PNG output from latex. My current method - and the only one I am aware of - is to `latex` and then `dvipng`. In order to do this, I need to include an eps of any graphics I wish to import because `latex` won't have it any other way (right?). Is there any way to delay the import of graphics until I get to the `dvipng` stage so that I could use, say, a png resource instead of an eps to get my final product?


title: looking for Latex editor with good structure tree layout view that can handle verbatim

text: I thought to ask if someone knows of a good Latex editor with good side panel that shows the structure of the document. I have a large document, and many sections and subsections and it is very hard to navigate without a tree like side structure I can use to jump around the document. I use TexMaker now, which does have this, but the problem is that it gets confused when I add `\section` and `\chapters` in `verbatim` environment (I have many of these, since I use Latex to document things and need to do this in many places). Hence the structure view/tree becomes very misleading as it is thinking the `\chapter` tag inside a verbatim environment is an actual `\chapter` that belong to the document. I also tried kyle editor on Linux. Here is a MWE and a screen shot to explain more the problem               \documentclass[12pt]{article}     \begin{document}          \section{A}          This how to write book style          %----------------     \begin{verbatim}     \documentclass[12pt]{book}     \begin{document}     \chapter{some chapter}  %---> This is not a real chapter !     text is here     \end{document}     \end{verbatim}     %----------------          The above was an example.          \section{B}          another section          \end{document}      Here is a screen shot ![Mathematica graphics](http://i.stack.imgur.com/zywqq.png) You can see that the layout/tree structure on the left panel is wrong. It should not have picked the \chapter since that is inside verbatim. But the editor have no way of knowing this I suppose. (but it is a Latex editor, should it not know this?) I also use `Verbatim` environment and not just `verbatim`. Same issue ofcourse. May be there is a way to configure it to tell the editor to ignore everything inside these environments?


title: BibTeX permission denied

text: I recently upgraded from Ubuntu 12.04 to Ubuntu 13.10 and had to reinstall TexLive 2013 and TeXWorks. Ordinary typesetting with pdfLaTeX works fine. However, when I try to run BibTeX, the only console output is "Permission denied" and it doesn't compile the bibliography. I have tried compiling on another machine with the same tex and bib files and it works fine, so I know my source files are fine and the problem must be with how LaTeX is installed. I thought since the error mentioned permissions, that somehow I had installed it so that only the root user can access BibTex. I tried opening TeXWorks as root (via sudo texworks) and then used that version of TeXWorks to compile, but it couldn't even compile using pdfLaTeX. How can I change the settings of TeXWorks and/or TeXLive to make BibTeX compile again?


title: Unusual problem with eqnarray

text: I have this code that gives me two problems:   1. `y` and `x` are displayed incorrectly in the first and third row of the `eqnarray`, like if they had a `\rm` in front of them, why?   2. it gives me              main.tex:91 Undefined control sequence.     <argument> \D      ^0       l.91 \Gamma(\Dz     (t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\Af\right|^2 \{ \l...     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      have I forgot to declare something? Here is my example code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{xfrac}     \title{ aaa }     \author{FLR }     \date{June 2011}     %% %%%%%%%%%%%%%%%%%%%%%%%     %% Packages to be used     %% %%%%%%%%%%%%%%%%%%%%%%%      \usepackage{amsfonts} %for integers using \mathbb{Z}     \usepackage{lineno}  % for line numbering during review     \usepackage{graphicx}  % to include figures (can also use other packages)     \usepackage{caption}     \usepackage{pdflscape}     \usepackage{afterpage}     \usepackage{subcaption}     \usepackage{wrapfig,booktabs}     \usepackage{xfrac}     %\usepackage{epstopdf}     \usepackage{xspace}     %      % predefined symbold     \usepackage{multirow}     \usepackage{floatrow}     % Table float box with bottom caption, box width adjusted to content     \newfloatcommand{capbtabbox}{table}[][\FBwidth]          \usepackage{blindtext}     \usepackage{color}     \usepackage{colortbl}     \usepackage{amsmath} % Adds a large collection of math symbols     \usepackage{ifthen} % for conditional statements     %\graphicspath{{./}} % Make Latex search fig subdir for figures     % %%%%%%% CHOOSE --------     \newboolean{pdflatex}     %\setboolean{pdflatex}{false} % use this if using eps figures     \setboolean{pdflatex}{true} % use this if using non-eps figures     %          \newboolean{articletitles}     \setboolean{articletitles}{true} % False removes titles in references          \newboolean{uprightparticles}     \setboolean{uprightparticles}{false} %Set to true to get roman particle symbols          \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{upgreek} % Adds in support for greek letters in roman typeset          \usepackage{hyperref}    % Hyperlinks in references     \usepackage[all]{hypcap} % Internal hyperlinks to floats.     \usepackage{natbib}     \usepackage{graphicx}               \def\CP  {\ensuremath{C\!P}\xspace}     \def\CPV  {\ensuremath{C\!PV}\xspace}     \def\C  {\ensuremath{C}\xspace}     \def\P  {\ensuremath{P}\xspace}     \newcommand{\Ap}  {\ensuremath{{\cal A}_{\rm{P}}}\xspace}     \newcommand{\Apnoef}  {\ensuremath{{\cal A}_{\rm{P~no~eff}}}\xspace}     \newcommand{\Acp}  {\ensuremath{{\cal A}_{\rm{CP}}}\xspace}     \newcommand{\Araw}  {\ensuremath{{\cal A}_{\rm{RAW}}}\xspace}     \newcommand{\AGamma}  {\ensuremath{{\cal A}_{\rm{\Gamma}}}\xspace} %     \newcommand{\Af}  {\ensuremath{{\cal A}_f}\xspace}     \newcommand{\Afb} {\ensuremath{\bar{\cal A}_f}\xspace}     \newcommand{\Am}  {\ensuremath{{\cal A}_m}\xspace}     \newcommand{\Adir}{\ensuremath{{\cal A}^{\rm dir}}\xspace}     \def\DDbar {\ensuremath{\kern -0.1em \stackrel{\kern 0.1em \textsf{\fontsize{5pt}{1em}\selectfont(---)}}{D}\kern -0.3em}\xspace}     \def\Dz{\ensuremath{\D^0}\xspace}     \begin{document}          \maketitle                    % (4) %     \begin{eqnarray}     \label{eq:p-1}     \Gamma(\Dz(t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\Af\right|^2 \{     \left(1+|\lambda_f|^2\right)\cosh(y\tau)+\left(1-    |\lambda_f|^2\right)\cos(x\tau)\nonumber\\     &+&2\Re(\lambda_f)\sinh(y\tau)-2\Im(\lambda_f)\sin(x\tau)\},\nonumber\\     \Gamma(b(t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\bar\Af\right|^2 \{     \left(1+|\lambda^{-1}_f|^2\right)\cosh(y\tau)+\left(1-    |\lambda^{-1}_f|^2\right)\cos(x\tau)\nonumber\\     &+&2\Re(\lambda^{-1}_f)\sinh(y\tau)-2\Im(\lambda^{-1}_f)\sin(x\tau)\},     \end{eqnarray}     %               \end{document}


title: Bibliography as \section instead of \section*

text: I’m writing on my thesis at the moment and have a problem with the bibliography. I want to have a bibliography for every chapter. I included the `\usepackage[sectionbib]{chapterbib}` command. The bibliography is now in the list of contents, but not as section. How can I change the `sectionbib` to make a `\section` of it instead of a `\section*`?


title: Strategies for nice vectors

text: I'm investigating about possible strategies to get nice vectors, discarding bold fonts. To make it simple, I'm not very happy with traditional ways of writing vectors with arrows. Please compare `$\overrightarrow{OM}$`, `$\overrightarrow{M}$`, `$\vec{OM}$` and `$\vec{M}$`. My preference goes to the `$\vec{M}$` command which is not suited for longer names like `$\vec{OM}$` and I do not like `\overrightarrow`. I would be interested in possibles ways to overcome these problems. Thank you


title: How do I obtain multline-type alignment within a group of equations?

text: I want to achieve something like the following (for now achieved using Microsoft Paint): ![alt text](http://i46.tinypic.com/2wgammf.png) That is, I want to group a number of multi-line equations within a single equation-type environment (i.e. they have the same number) and have each one aligned like in the "multline"-environment (first line left-aligned, last line right-aligned). Is this possible?


title: Easiest way to connect the center with a point on the circumference

text: I have to draw many figures like this: ![enter image description here](http://i.stack.imgur.com/csFpv.png) with different angles but not for pie charts. What is the easiest way to draw the lines from the center to the circumference? I searched a lot but only found uber-complicated solutions! I'm sure this must be easy, probably I'm just failing to search for the right keywords. Can anyone help?


title: Using TikZ in journal articles

text: I had not been aware of Tikz before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if people have any experience with submitting papers that use TikZ to scientific journals. Do they tend to automatically support it, or definitely not accept it, or work with you if you can convince them it's needed? Something else entirely? (I recognize that it would be possible to use TikZ in my copy of a paper, then generate a raster image from the output, and include that in place of the `tikzpicture` in the copy I submit, but that's not what I'm wondering about here.) I'm personally interested in physics journals, but I think answers from any field could be potentially useful to others who may be wondering the same thing.


title: Marginpar appearing on the wrong side (using memoir)

text: The subject line pretty much says it all: some marginal notes (beginning of the second page) do not appear on the correct side. (The question is: how can I fix this automatically?) Below is a MWE that I got from my code, where I removed as much text as possible (and replace the missing text by a vertical space). I tried to remove some equations and the itemize environment to simplify things further, but could not get the right value of `\vspace` to still illustrate the problem. * * * _This is a partial answer to my problem ... If I write`\strictpagecheck` before each `\marginpar` **and** if I explictly write `\marginparmargin{outer}` (which is supposed to be the default), the notes on the second page all get positioned on the correct side. The problem is that the notes that were previously on the wrong side now partly overlap the other ones._ * * * _Commenting on an answer which was deleted by its author: I do not want the`oneside` option as this is going to be printed as a book. Also, I tried `sidepar` and it definitely does not work: the notes on the first page are on the wrong side and some of the ones on the second overlap. Eventually, I will want to add figures as well as text in the margins._               \documentclass[11pt,openany]{memoir}          \setstocksize{11in}{8.5in}     \settrimmedsize{\stockheight}{\stockwidth}{*}     \settypeblocksize{9.0in}{30pc}{*}     \setlrmargins{0.7in}{*}{*}     \setulmargins{1.0in}{*}{*}     \setheadfoot{30pt}{26pt}     \setheaderspaces{*}{30pt}{*}     \setmarginnotes{0.2in}{1.5in}{0.2in}     \checkandfixthelayout     %          \begin{document}     Some text to get things started.     \vspace*{17cm} % to minimize the amount of text on the page.          Some text\marginpar{First note} with some notes in the margin.     Some text\marginpar{Second note} with some notes in the margin.     Some text\marginpar{Third note} with some notes in the margin.          \begin{itemize}     \item First item.           $$A=B$$     \item Second item.         $$A=B$$     \end{itemize}          Yet more text with a note\marginpar{Fourth note} followed by an equation.     $$     A = B     $$          Now we can see the problem.\marginpar{This note is on the wrong side.}.      With some more text\marginpar{And another note on the wrong side.}      so we can perhaps start seeing what is going on.     Some text added with other notes and a reasonably long sentence to keep     the notes somewhat separate\marginpar{Note 1 on the correct side}.     Some text added with other notes and a reasonably long sentence to keep      the notes somewhat separate\marginpar{Note 2 also}.          \end{document}


title: Tikz: function and node's position

text: With the following code I am able to create three normal distributions with different means. Although the graph looks good, I have some problems in placing the nodes in the right coordinates. It is obvious that the coordinates of the graph and those of the a4 page are not the same. This is something logical I suppose, so that the graph can be actually created. In order to put the nodes, I had to follow the trial and error technique until I find the right place on the graph. Of course this does not seem to be an ideal solution. I hope you can give me some hints of how to deal with the aforementioned. The code:               \documentclass[hidelinks,parskip=full,12pt]{article}     \usepackage{tikz}                             \usepackage{pgfplots}                         \usetikzlibrary{intersections}      \usetikzlibrary{calc}     \usetikzlibrary{positioning}          \begin{document}          \begin{center}     \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}     \begin{tikzpicture}     \begin{axis}[every axis plot post/.append style={        mark=none,domain=-5:20,samples=50,smooth},      axis x line*=bottom, % no box around the plot, only x and y axis     axis y line*=left, % the * suppresses the arrow tips     enlargelimits=upper] % extend the axes a bit to the right and top     \addplot {\gauss{2}{2}};     \addplot {\gauss{8}{2}};     \addplot {\gauss{14}{2}};     \end{axis}          \draw (1.55, 5.6) node{$f(\theta_A, x)$};     \draw (3.50, 5.6) node{$f(\theta_B, x)$};     \draw (5.50, 5.6) node{$f(\theta_C, x)$};          \end{tikzpicture}     \end{center}          \end{document}


title: Two columns within mdframed frame

text: I want to add a simple two-column text within `framed` frame. I tried `multicols` as               \begin{mdframed}     \setlength{\columnsep}{10pt}       \begin{multicols}{2}         \begin{itemize}          TEXT         \end{itemize}       \end{multicols}     \end{mdframed}      The problem is that when the text is long, it will start from the next page to fit the text within a page, though the frame is started from the current page.


title: Allowing line break at ',' in inline math mode?

text: In the inline math mode (`$...$`), if the formula is too long, LaTeX will try to break it on operators, e.g.               very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc      may be rendered as               very long text followed     by a very long equation     like a+b+c+d+e+f+g+h+i+     j+k+l etc      However, the break won't happen if they are separated by commas, e.g.               very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc      will overflow the page like               very long text followed     by a very long equation     like a,b,c,d,e,f,g,h,i,j,k,l     etc      How to make LaTeX able to insert line breaks after a comma too?


title: How to include extra ticks in pgfplots without them appearing in bold face?

text: In order to include a cross through the origin in my plot, I write the following under `\begin{axis}`:               extra x ticks={0},     extra y ticks={0},     extra tick style={grid=major},      However, the 0s appear in bold face in my plot. How can I prevent this?


title: Customizing chapter style with tikz

text: How can I customize chapter style like below picture? ![enter image description here](http://i.stack.imgur.com/a4vd9.jpg) Thank you in advance.


title: How to generate table of contents for each section that includes all its subsections

text: I can't seem to figure minitoc well enough to do this. I have report style, and I want the main tableofcontents to show chapter and sections only. Then inside each section, I want a minitoc of contents that lists everything inside that section only, i.e. subsection, subsubsection, etc... The same for each section. So, I'd like something like this as the top (i.e. main) table of contents               1.  chapter one     1.1 section one     1.2 section two      The when I go to section one there will be small toc               section one     1.  subsection one     1.1 subsubsection one     1.2 subsubsection tow     2.  subsection two     2.1 subsubsection one      Whatever the numbering is, that is no problem with me. The goal is this: I want the main toc to display just chapters and sections, and the rest show in each section. I tried this:               \documentclass[]{report}%     \usepackage{minitoc}     \setcounter{tocdepth}{1}     \begin{document}     \tableofcontents      \chapter{chapter one}     \section{section one}     \minitoc       \subsection{subsection one}         stuff       \subsection{subsection two}           stuff     \section{two}     \minitoc       \subsection{subsection one}         stuff       \subsection{subsection two}       \end{document}      But this shows the same toc in each sections as well as at the top. I tried also               \documentclass[]{report}%     \usepackage{minitoc}     \setcounter{tocdepth}{1}     \begin{document}     \dominitoc     \tableofcontents      \chapter{chapter one}     \section{section one}     \minitoc       \subsection{subsection one}         stuff       \subsection{subsection two}           stuff     \section{two}     \minitoc     \mtcskip       \subsection{subsection one}         stuff       \subsection{subsection two}       \end{document}      same thing. ALso tried               \documentclass[]{report}%     \usepackage{minitoc}     \setcounter{tocdepth}{1}     \begin{document}     \doparttoc     \tableofcontents      \chapter{chapter one}     \section{section one}     \doparttoc       \subsection{subsection one}         stuff       \subsection{subsection two}           stuff     \section{two}     \doparttoc       \subsection{subsection one}         stuff       \subsection{subsection two}       \end{document}      But now no toc shows up at all in each section. I am trying to follow the minitoc.pdf and table 1.3 there seems to be what I need to do, but I am missing something. ![enter image description here](http://i.stack.imgur.com/pZMN9.png) Any help on how to do this. Thanks.


title: Font {Times} on personalized contents [error]

text: I'm trying to change the style of the Table of contents The following commands let the Table of contents in the desired style. But when I use `\usepackage{times}` to use the font Times New Roman, the numbering of the sections of Table of contents is centralized. What can I do to make the numbering not be centered?               \documentclass{article}     \usepackage{titletoc}     %\usepackage{times}          % \dottedcontents{<section>}[<left>]{<above-code>}     % {<label width>}{<leader width>}     \dottedcontents{section}[0em]{\bfseries}{2.9em}{1pc}     \dottedcontents{subsection}[0em]{}{3.3em}{1pc}          % center the toc heading     \renewcommand{\contentsname}{\centering Contents}          \begin{document}          \tableofcontents          \section*{Introduction}     \addcontentsline{toc}{section}{Introduction}     \section{Test section one}     \subsection{Test subsection}               \section{Test section two}     \subsection{Test subsection}     \subsection{Test subsection}     \end{document}


title: Is there a way to make math mode subscripts automatically non-italic?

text: I'm currently working on a report where the majority of subscripts will be non-italic. The way I know how to do this currently is via `\mathrm{}`, which is an absolute horror when you have to do it many times per equation. Any ways around this? I do have the `mtpro2` package, but not sure if there is an option I'm overlooking.


title: Math expression in header

text: I'm trying to put short math expressions in my chapters or sections like this:               \chapter{Basic topological concepts in $\mathbb{R}^{n}$ }      The problem is that headers seem to ignore the math part and I can't find a workaround. Obviously I don't want to use an alternative title. I'm working with the tufte-book class which can be found at this page or the official site. This code will reproduce the problem:                \documentclass{tufte-book}      \usepackage{amsmath,amsfonts,amsthm}      \usepackage[utf8]{inputenc}           \begin{document}      \mainmatter      \chapter{This chapter title $ \mathbb{R}^{n} $}      \newpage       another page      \newpage      Page with header      \end{document}      ![This is the header in this example](http://i.stack.imgur.com/hWF1g.png) Edit: I forget that I made little changes in the fonts to the tufte-book class. In the original one the problem still happen but instead of showing a "\" it doesn't show anything: ![enter image description here](http://i.stack.imgur.com/bk23E.png)


title: \listoffixmes gives an error with revtex4

text: I get the error               ! Illegal unit of measure (mu inserted).      when I try to include `\listoffixmes` in a `revtex4` document. I think that it has something to do with `revtex4` redefining the way to make table of contents, but I do not know enough LaTeX to know how to fix it. This code should reproduce the problem:               \documentclass{revtex4}     \usepackage[draft]{fixme}          \begin{document}          \listoffixmes          Some text.\fxnote{A short note}          \end{document}      Is there a simple way to solve this?


title: What's most important if I want to produce a lightweight document?

text: If for some reason I want to create the lightest document (in terms of the weight of the output file, _not_ the font), what would be some good practices? Specifically in terms of:   * **Packages** : do they add significant weight to the file? Are there some which are particularly heavy?   * **Graphics** : should they be EPS, PDF? Some other format? Is `TIKZ` code always lighter?   * **Classes** : do some add more bulk than others?   * (Some other important things I'm sure I'm missing...) Of course I could just start trying to "play" with the above mentioned elements, but I was hoping to get an informed answer, not just the result of trial-and-error experiments.


title: How to make two line apex

text: I'd like to split the apex in two lines. I'm commenting a part of an equation with `\overbrace` and I need to split the comment in two line because it is too long.               $$ x = \overbrace{y}^{very big comment} $$


title: Parallel text: keeping translation column on the outside of the page

text: I'm trying to use the package parcolsx. Parcolsx is small package that I have residing with my .tex document. It's described here: reverse the positions of two unequal columns The large text which starts in the outside column (on the right column) on page 1 should be switched to the outside column (or left column) on page 2 (and so on from odd to even pages) It isn't working that way for me, the large column is always on the right side of the page. Can anyone tell me why it isn't working... Here is a minimal version of my code:               \documentclass[12pt]{memoir}           \usepackage{lipsum}          \usepackage{parcolumns}     \usepackage{parcolsx}               \begin{document}         \begin{parcolumns}[%     sloppy        = true,     sloppyspaces  = true,     nofirstindent = true,     colwidths     = {1=0.43\textwidth, 2=0.53\textwidth}     ]{2}     \colchunk[1]{\small\indent%       \lipsum[14]        \lipsum[15]       \lipsum[16]       \lipsum[17]     }     \colchunk[2]{\Large\indent%       \lipsum[10]       \lipsum[11]       \lipsum[12]       \lipsum[13]     }     \end{parcolumns}       \end{document}      ======================= the code which resides in parcolsx.sty with my tex document:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{parcolsx}          \RequirePackage{changepage}     \strictpagecheck          % add the additional boolean key `alternate'      % to the `parcolumns' environment     \newif\ifpc@alternate     \define@key{parcolumns}{alternate}[true]{%     \pc@boolkey{pc@alternate}{#1}%     }          % slightly modify the `\pc@placeboxes' macro to distinguish between odd     % and even pages, if the option `alternate=true' was passed to the     % `parcolumns' environment     \def\pc@placeboxes{%       \global\let\@tempa\relax%       \hb@xt@\linewidth{%         \vfuzz30ex %         \vbadness\@M%         \splittopskip\z@skip%         % odd is the default         \ifpc@alternate \checkoddpage \else \oddpagetrue \fi%         \ifoddpage           % count up from 1 to N_col           \count@\z@%           \loop\ifnum\count@<\pc@columncount%             \advance\count@\@ne%             \pcx@placeboxes@body%             \ifnum\count@<\pc@columncount%               \strut\hfill\ifpc@rulebetween\vrule\hfill\fi%             \fi%           \repeat%         \else           % count down from N_col to 1           \count@\pc@columncount%           \loop\ifnum\count@>\z@%             \pcx@placeboxes@body%             \advance\count@\m@ne%             \ifnum\count@>\z@%               \strut\hfill\ifpc@rulebetween\vrule\hfill\fi%             \fi%           \repeat%         \fi       }%       \@tempa%     }          % the fraction of `\pc@placeboxes' that does not depend on the page     % parity     \def\pcx@placeboxes@body{%       \expandafter\ifvoid\csname pc@column@\number\count@\endcsname%         \hskip\csname pc@column@width@\number\count@\endcsname%       \else%         \expandafter\setbox\expandafter\@tempboxa%           \expandafter\vsplit\csname pc@column@\number\count@\endcsname%             to \dp\strutbox%         \expandafter\@tempdimb\csname pc@column@width@\number\count@\endcsname%         \hbox to \@tempdimb {\vbox{\unvbox\@tempboxa}\hfill}%       \fi%       \expandafter\ifvoid\csname pc@column@\number\count@\endcsname%       \else%         \global\let\@tempa\pc@placeboxes%       \fi%     }


title: Name of the section

text: I would like the following, which I have been unable to resolve: the section title should be of the form Section Sectionnumber. Sectiontitle (E. g. Section 1. On a theorem of Euler.) I have tried some primitive `\renewcommand`, but it failed in the sense that I only want Section to appear in the section headings, but not in the numbering of theorems etc.               \documentclass[12pt]{amsproc}     \begin{document}     \section{Preliminaries.}     \end{document}


title: How to use the Parallel package with proper environment options?

text: If I use:               \begin{Parallel}[c]{0.47\textwidth}{0.47\textwidth}     \ParallelLText{paragraph 1 left}     \ParallelRText{paragraph 1 right}     \ParallelPar     \ParallelLText{paragraph 2 left}     \ParallelRText{paragraph 2 right}     \ParallelPar     \end{Parallel}      I get:               paragraph 1 left          paragraph 1 right     paragraph 2 left          paragraph 2 right                         1      If I use:               \begin{Parallel}[p]{\textwidth}{\textwidth}     \ParallelLText{paragraph 1 left}     \ParallelRText{paragraph 1 right}     \ParallelPar     \ParallelLText{paragraph 2 left}     \ParallelRText{paragraph 2 right}     \ParallelPar     \end{Parallel}      I get:                                   1          paragraph 1 left                         2          paragraph 1 right                         3          paragraph 2 left                         4          paragraph 2 right                         5      What should I use in order to get:                                   1          paragraph 1 left     paragraph 2 left                         2          paragraph 1 right     paragraph 2 right                         3      ? Can this be achieved with _parallel_? If not, what are the options? Please let me specify that I'm starting to work on a book (+300 pages) that will have to be entirely in the desired form (even pages in one language and odd pages in another language; all paragraphs will have to be synchronized, e.g. paragraph#1_right will be the translation of paragraph#1_left).


title: When running Bibtex with a statement that has a comma at the end, this is obscuring real problems

text: When I run bibtex on document with a citation such as `\cite{European00Presidency}` and the .bib entry looks like this:               @MISC{European00Presidency,           author = {European Council,},       title = {Presidency conclusions},       year = {2000},       keywords = {Lisbon Strategy},       publisher = {European Council,},       type = {Government Document},       url = {http://www.consilium.europa.eu/uedocs/cms_data/docs/pressdata/en/ec/00100-r1.en0.htm}     }      I get the very unhelpful warning message that " "European Council," **has a comma at the end** for entry European00Presidency" Which i really don't care about. But it hides other warnings such as entry not found or what ever. I would like to turn that warning off in Bibtex. Does anyone know how to do that. I'm using MikTex 2.9, Jabref 2.9.2 and texmaker 4.1.1 As this is a problem for anyone dealing with large numbers of corporate authors I think there should be an option of changing this


title: Find point of page break in an external document

text: I am creating multiple versions of a document from a single LaTeX source. Specifically, I have a series of lessons that have an instructor version (with notes and answers) and a plain student version. I am using the optional package to conditionally print the instructor's notes, following the basic methods outlined here: http://www.latex- community.org/forum/viewtopic.php?f=5&t=2060. And it works well. All I have to do is set a single flag. My problem is this: the instructor's notes are often very long--too long to make marginal notes feasible. That means the pagination is different in the instructor and student versions of the document. If possible, I would like to automatically place references to the student- edition pagination as marginal notes in the instructor edition. To create such notes currently, I have to generate a final version of the student edition and manually add notes at the right place for the instructor edition, a process that is time-consuming, prone to error, and brittle, as any revisions are likely to invalidate the old pagination. This is not an ordinary external cross-referencing problem because I'm not setting a label at a fixed point ahead of time. I presume what I would need to do is process the student edition, write out the context of the page break that LaTeX has calculated to an auxiliary file, and process that information when creating the instructor's edition. I haven't found any packages that address this problem, so I'm looking for any guidance as to how to tackle it. Is there anything I can hook into in the aux file that will give me this information? I don't know enough about LaTeX/TeX internals to even know where to start looking. The following generates text that exemplifies my current situation:               \documentclass{article}     % change option to either 'student' or 'instructor'     \usepackage[instructor]{optional}     \usepackage{lipsum}     \begin{document}          \lipsum          \opt{instructor}{\textsf{\lipsum}}          \lipsum          \end{document}


title: Position of year date in moderntimeline

text: In this example, the > 2012 seems to be further away from the blue bar than the > 2010 is. Can the > 2012 be moved toward the bar, so that the > 2012 and the > 2010 are equidistant to the blue bar? ![enter image description here](http://i.stack.imgur.com/4a16g.png) Here is my MWE:               % compile with LuaLaTeX          \documentclass[11pt,a4paper,sans]{moderncv}      \moderncvstyle{classic}      \moderncvcolor{blue}          \usepackage[firstyear=2004,lastyear=2014]{moderntimeline}     \usepackage{etoolbox}                \usepackage[ngerman]{babel}                                   \firstname{John}     \familyname{Doe}          \makeatletter     \pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}     \NewDocumentCommand\tldatelabelcventryn{O{center}O{color1}mmmmmmm}{%     \pgfmathsetmacro\tl@endyear{\tl@lastyear}%     \pgfmathsetmacro\tl@startfraction{(#3-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%     \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%      \cventry{\tikz[baseline]{%          \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);          \fill [\tl@runningcolor] (0,0)             rectangle (\hintscolumnwidth,\tl@runningwidth);          \fill [#2] (0,0)             ++(\tl@startfraction*\hintscolumnwidth,0pt)             node [tl@startyear,yshift=5pt,anchor=#1] {#4}             node {$\bullet$};  }  }             {#5}{#6}{#7}{#8}{#9}  }     \makeatother%          \tltextstart[north]{\scriptsize}     \tltextend[south]{\scriptsize}          \begin{document}          \tlcventry{2010}{2012}{test}{}{test}{}{test}            \end{document}


title: Empty line after \paragraph?

text: In order to have a subsubsubsection I have used `\paragraph`. The problem is that I get text immediately after the tittle. How do I make to get a empty line after `\paragraph`?


title: Problem with \bordermatrix inside array

text: When a `\bordermatrix` is placed inside an `array`, the spacing between rows will be wrong (see the MWE below). What is causing this problem? Is there a solution?               \documentclass{book}          \begin{document}          A simple matrix created with \verb+\bordermatrix+; right spacing between rows:     \[       \bordermatrix{%         & 1 & 2 \cr         1 & x1 & x2 \cr         2 & x3 & x4 \cr         3 & x5 & x6}     \]          The same matrix inside an \texttt{array}; wrong spacing between rows:     \[     \begin{array}{c}       \bordermatrix{%         & 1 & 2 \cr         1 & x1 & x2 \cr         2 & x3 & x4 \cr         3 & x5 & x6}     \end{array}     \]          \end{document}


title: How can I use the align environment in flashcards document class?

text: I currently have this working example for flashcards: ## mycards.cfg Use `A7` flashcards that get printed on `A4` paper.               \NeedsTeXFormat{LaTeX2e}[1996/12/01]     \ProvidesFile{avery5388.cfg}     \newcommand{\cardpaper}{a4paper}     \newcommand{\cardpapermode}{portrait}     \newcommand{\cardrows}{4}     \newcommand{\cardcolumns}{2}     \setlength{\cardheight}{70mm}     \setlength{\cardwidth}{100mm}     \setlength{\topoffset}{0mm}     \setlength{\oddoffset}{0mm}     \setlength{\evenoffset}{0mm}     \endinput      ## definitionen.tex               \documentclass[mycards,frame]{flashcards}     \usepackage{amsmath,amssymb}% math symbols / fonts     \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{ntheorem}     \newcommand{\thmfoot}{}     \theoremstyle{break}     \setlength\theoremindent{0.7cm}     \theoremheaderfont{\kern-0.7cm\normalfont\bfseries}      \theorembodyfont{\normalfont} % nicht mehr kursiv     \theoremseparator{\thmfoot}     \newtheorem{definition}{Definition}          \begin{document}          \begin{flashcard}{Jordankurve}     \begin{definition}         Sei $X$ ein topologischer Raum. Eine (geschlossene)         \textbf{Jordankurve} in $X$ ist ein Homöomorphismus          $\gamma: [0, 1] \rightarrow C \subseteq X$         ($\gamma: S^1 \rightarrow C \subseteq X$)     \end{definition}     \end{flashcard}          \begin{flashcard}{Knoten}     \begin{definition}         Eine geschlossene Jordankurve in $r^3$ heißt \textbf{Knoten}.     \end{definition}     \end{flashcard}          \begin{flashcard}{äquivalente Knoten}     \begin{definition}         Zwei Knoten $\gamma_1, \gamma_2: S^1 \rightarrow r^3$ heißen         \textbf{äquivalent}, wenn es eine stetige Abbildung         \[H: S^1 \times [0,1] \Rightarrow r^3\]         gibt mit          \[             H(z,0) = \gamma_1(z)             H(z,1) = \gamma_2(z)         \]         und für jedes         feste $t \in [0,1]$ ist          \[H_z: S^1 \rightarrow r^2, z \mapsto H(z,t)\]         ein Knoten. Die Abbildung $H$ heißt \textbf{Isotopie} zwischen         $\gamma_1$ und $\gamma_2$.     \end{definition}     \end{flashcard}     \end{document}      which renders to: ![enter image description here](http://i.stack.imgur.com/qinwX.png) ## Question When I change                   \[             H(z,0) = \gamma_1(z)             H(z,1) = \gamma_2(z)         \]      to                   \begin{align*}             H(z,0) &= \gamma_1(z)\\             H(z,1) &= \gamma_2(z)         \end{align*}      I get               ! Argument of \align* has an extra }.     <inserted text>                      \par      l.39         H(z,0) &                          = \gamma_1(z)\\     ?      ! Emergency stop.     <inserted text>                      \par      l.39         H(z,0) &                          = \gamma_1(z)\\     !  ==> Fatal error occurred, no output PDF file produced!      What's the problem here? How can I fix it?


title: Adapt BibTeX style to give all initials

text: I'm using a modification of the plainyr BibTeX style. Although my bib-file contains all initials for some authors (e.g. B.D. McKay), I end up with just the first initial in my document (e.g. B. McKay). I thought about editing the BibTeX style myself, but after seeing the code, I decided against it. Maybe there are some people who are more knowledgeable in this area of expertise. I want my final document to include the initials for all the names, and not just those of the first name. This is the relevant code of the BibTeX style, or at least, I think it is the relevant code.               FUNCTION {format.names}     { 's :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=           nameptr #1 >             { namesleft #1 >                 { ", " * t * }                 { numnames #2 >                     { "," * }                     'skip$                   if$                   t "others" =                     { " et~al." * }                     { " and " * t * }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }


title: Setting up pdfpages with memoir?

text: I am using memoir for writing my PhD thesis. In my university we have to include submitted, accepted, and prepared drafts of related papers as appendices. These papers have all been previously created using LaTeX (using the class elsarticle). I have them as PDF with white borders/margins stripped away using Adobe Acrobat. They are therefore in different sizes. My question is in regard to pdfpages. How can I make sure that a pdf-page is inserted correctly on a full document-page (without a Chapter-title). I use the following class-options and predefined layout:               \documentclass[a4paper,12pt,twoside,onecolumn,openright,final,showtrims]{memoir}     \semiisopage[12]     \checkandfixthelayout      My problem is that pdfpages seems to center the pdf-page itself on the entire stock (if we use memoir-jargon). I want the pages to center/fit in the area delimited by lengths such as `\textwidth` and `\textheight` (defined in the memoir manual, memman.pdf, on page 10 and 11). I use the following options with `\includepdf`:               \includepdf[         pages={-},         frame=false, % so I can adjust this if I need it         noautoscale=true, % I should scale it myself, right?         scale=1.0, % is this 1.0 by default?         pagecommand={\thispagestyle{plain}}, % I guess this is necessary?         %templatesize={\textwidth}{\textheight}, % not sure this work?         offset={0mm 0mm} % my guess is, that I need to adjust this one?     ]{<paper_pdf_filename>}      As I mention above, I would likely need to adjust `offset` so that the pages are placed/fitted in the area called "body" on page 10-11 in the memoir manual. **Further elaborations:** I would like the pages of each paper to be part of the surrounding document. The entire thesis will still have material after the inserted papers. It will continue with a global reference section and perhaps even a short index. The inserted pages of each paper should exist as if they are exactly that - inserts - not pages on their own. Which is why I use the pagestyle `plain` to include the thesis page number. If you take a look at memman.pdf on page 10-11, you will see the different page-margins for the memoir-class. I need the logic box of each inserted page to have an offset such that is correct in regards to these margins. I have tried the following (using the calc-package):               \newcommand{\pdfxoffset}{\marginparsep + \marginparwidth + \trimedge}     \newcommand{\pdfyoffset}{\uppermargin + \trimtop}      With these options for `\includepdf`:               pagecommand={\thispagestyle{plain}},     width=\textwidth,     height=\textheight,     offset={\pdfxoffset mm \pdfyoffset mm}      But it does not fit entirely as I want it (but almost). I am also not exactly sure what I am doing here. Can I just add lengths together like this? Not sure I even grasp the programming-language constructs in TeX/LaTeX.


title: Bigfoot - problem in automatically or manually perform line breaks

text: I am using the bigfoot package in order to have two categories of footnotes along with the parameter `para`, in order to place the footnotes one after the other. The problem I am facing is on the line breaking of a single footnote. Though the package automatically places a new footnote on the next line when there is no space left, it doesn't do the same for one single footnote and no matter how long it is it keeps it on same line. Is there a way of doing this splitting automatically for single footnotes? I have tried to do it manually using `\\\`, and I still faced trouble because the successor footnotes of the one which had the line break were also automatically placed in a new line and not the same according to `para`. Here is a sample of my code: Edit: Sorry, you are perfectly right about the fake long word. The only problem is actually when I want to manually break the line or move the next footnotes below. Then I get an unwanted extra line break after the next footnote.               \documentclass[12pt]{book}     \usepackage[english]{babel}          \usepackage[ruled, para]{bigfoot}     \newfootnote[para]{A}     \newfootnote[para]{B}          \begin{document}     This is a text\FootnotetextA{}{First footnote} \FootnotetextA{}{Second footnote} \FootnotetextA{}{etc} \FootnotetextA{}{etc} \FootnotetextA{}{etcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}     \FootnotetextA{}{etc} \FootnotetextA{}{etc} \FootnotetextA{}{etc \\}      \FootnotetextA{}{etc} \FootnotetextA{}{etc} \FootnotetextA{}{etc}          \FootnotetextB{}{This is the second footnote}           \end{document}      ![enter image description here](http://i.stack.imgur.com/M9jg8.png)


title: Table: Caption is centered but table itself not

text: I have another problem with a table in my document. The following code centers the caption but not the table itself. Any hints why?               \begin{table}[htbp]     \begin{tikzpicture}     \node (table) [inner sep=0pt] {     \begin{tabular}{l|l|l}       \textbf{Class} & \textbf{Package} & \textbf{Project} \\     \hline     FANIN & CALLS & CALLS\\     FANOUT & NOM & AHH\\     CALLS & NOP & ANDC\\     HIT (only root classes) & & NOC\\     NDC & & NOP\\     NOA & & \\     NOM & & \\     NOPAR & & \\     \end{tabular}     };     \draw [rounded corners=.5em] (table.north west) rectangle (table.south east);     \end{tikzpicture}     \caption{Metrics provided by the webservice}     \label{tbl:web_service_metrics}     \end{table}


title: Times (or Termes) with protrusion/hanging in ConTeXt MkIV

text: On the ConTeXt wiki, http://wiki.contextgarden.net/Protrusion#MkIV, some examples are given of how to use Termes fonts and how to use microtypographical extensions. The bottom example works, but   * I am unable to change fonts successfully   * I am only able to enable the microtypographical extensions by using the last example. Thanks in advance.


title: Typesetting poems

text: I have ~250 poems to typeset, consisting of ~40 verses each. 99% are in this form:               line 1     line 2     line 3     line 4          line 5     line 6     line 7     line 8          ...      The "source" of each poem is a PDF file which I use to copy / paste into a plain text file. Now the task is to format these poems while avoiding too much markup. I could do this:               \begin{verse}     line 1 \\     line 2 \\     line 3 \\     line 4 \\     \end{verse}          \begin{verse}     line 5 \\     line 6 \\     line 7 \\     line 8 \\     \end{verse}      But I much prefer not adding `\begin{verse}` and `\end{verse}` around each verse and I would like to avoid the double backslash at the end of each line. What can I do? Some "rules"   * No page break is allowed inside a 4 line verse   * I want to avoid markup, but if it's not possible, its OK to add markup   * All exceptions are handeld manually   * No other special formatting is required (each of the four lines are flush left and ragged right, no automatic line breaking   * Some poems should be mulitcolumn, if feasible   * Each poem is in its own file, having a `\title{...}` and a `\date{...}` before it starts (I could put this somewhere else though).


title: How to make a phenyl radical with chemfig?

text: I'm trying to make a phenyl radical using chemfig, so far I've used this code:               \chemfig{*6(-\Lewis{0.,}=-=-=)}      What I obtain however is this, with a "broken" angle in the phenyl: ![wrong](http://i.stack.imgur.com/LQAlp.png) How to obtain a representation like this one? ![correct](http://i.stack.imgur.com/lZ8TA.gif)


title: Using value of a table as color indicator for \addplot like a colormap

text: I am trying to use a relative value (percentage) extracted of a table to define the color of several 2D plots like this: ![Sample plot with different colors](http://i.stack.imgur.com/GUbx1.jpg) At the moment I'm using `addplot[mesh]` together with a self defined colormap but I'd rather prefer a different way as `mesh` doesn't work with some modifications I want to do later.               \addplot[mesh,point meta=\yValRel,point meta min={0}, point meta max={100}] table [x=x\datasetNumber, y=F\datasetNumber] {\dataXF} ;      I would prefer something like this, where the value read from the table is directly used as an relative operator for the colormapping:               \addplot[color=orange! \yValRel !blue] table [x=x\rowNumber, y=F\rowNumber] {\dataXF};      This command works with pre-defined variables, but `\pgfmathtruncatemacro{\yValRel}{\pgfplotsretval}` doesn't read the value during the loop (when printing the number with `node at (axis:cs 3,\yValRel) {\yValRel};` it prints always the same number). Has anyone a proper solution? Below you find a working minimum example. Thanks!               \documentclass{standalone}          \usepackage{pgfplots,pgfplotstable}     \usetikzlibrary{calc}          \pgfplotsset{colormap={blueorange}{color(0)=(blue); color(100)=(orange);}}     \pgfplotstableread{         x0  F0  x1  F1  x2  F2         1   10  1   10  1   40         2   20  2.5 15  1.5 30         3   30  3.5 25  1.8 20         4   40  4   40  4.8 15         5   50  5   45  5   10     }\dataXF         \pgfplotstableread{         0   40  80     }\dataY          \begin{document}     \begin{tikzpicture}      \begin{axis}[colormap name=blueorange]          \pgfplotsinvokeforeach{2,...,0}{         \pgfmathtruncatemacro{\datasetNumber}{#1}              \pgfplotstablegetelem{0}{[index] \datasetNumber}\of\dataY         \pgfmathtruncatemacro{\yValRel}{\pgfplotsretval}              %\addplot[color=orange! \yValRel !blue] table [x=x\rowNumber, y=F\rowNumber] {\dataXF};         \addplot[mesh,point meta=\yValRel,point meta min={0}, point meta max={100}] table [x=x\datasetNumber, y=F\datasetNumber] {\dataXF} ;     }     \end{axis}     \end{tikzpicture}     \end{document}


title: Customization of the frame's contents

text: I'm trying to set an image on left of an itemize using this code. How to customize there position? I'm just trying to put them on top of my frame after the header.               \documentclass{beamer}          \begin{document}          \begin{frame}          \begin{columns}     \column{.5\textwidth}     \includegraphics[width=\linewidth]{example-image-b}     \column{.5\textwidth}     \begin{itemize}         \item A.         \item B.     \end{itemize}     \end{columns}          \end{frame}          \end{document}      Any brilliant suggestion, please?


title: How to reset author list using authblk

text: I recently posted a question that is still unanswered. I'm trying to put several articles into a publication. In each article the authorlist is defined using authblk. So I have: Article 1:               \begin{document}     \title{title1}     \author[*]{First}     \author[**]{Second}     \affil[*]{FirstAffil}     \affil[**]{SecondAffil}     \maketitle     Text     \end{document}      Article 2:               \begin{document}     \title{title2}     \author[*]{Third}     \affil[*]{ThirdAffil}     \maketitle     Text     \end{document}      Main file:               \documentclass[a4paper]{article}     \usepackage{import}     \usepackage{authblk}          \begin{document}     \subimport{Folder1/}{article1}     \subimport{Folder2/}{article2}     \end{document}      My problem was that with the second `\maketitle` (the one corresponding to article 2), ALL the authors appeared. I solved this problem inserting the following code between the two `\subimport`commands:               \makeatletter     \renewcommand{\AB@authlist}{}     \renewcommand{\AB@affilist}{}     \makeatother      In this way the list of authors is reseted. However, now in the second article the author is PRECEEDED by a comma, so I get something like this: title1 First* and Second** *FirstAffil **Second Affil Text title2 , Third* *ThirdAfiil Text I guess that there is some counter associated with the author list that is not reseted, so `\maketitle` assumes that the Third author is in fact the third, and not the first one. Does someone know how can reset this counter (if it exists) or how can I solve this problem anyway?


title: Reformatting the way references to figures do appear

text: How can one make LaTeX insert Figure into `\ref` calls automatically, i.e. instead of writing: `See data in Figure \ref{fig:JobInformationDialog}` simply write: `See data in \ref{fig:jobInformationDialog}` and have LaTeX insert Figure `[fignum]` when it gets compiled?


title: How to perform mathematical operation in latex?

text: I am new to `LaTeX`. I'm working on some sample `LaTeX` examples. The sample I want to create a progress bar in my document. My sample code is shown below. Any help would be appreciated.               \documentclass{article}     \usepackage{amsmath}     \usepackage{lastpage}     \usepackage[draft,subsubsection]{progress}     \renewcommand{\ProgressDocOutput}[1]{%     \vskip-0.6cm\ProgressDrawBar{#1}\vskip 0.4cm}     \ProgressGfxXSize = 1725     \ProgressGfxYSize = 120     \begin{document}     Page1     \progress{\thepage*100/\pageref{LastPage}}  % it should rturn 50     \pagebreak     Page2     \progress{\thepage*100/\pageref{LastPage}}  % it should rturn 100     \end{document}


title: \begin{frame} on input line 181 ended by \end{beamer@framepauses}. \end{frame}

text: \begin{frame}     Find the 2nd derivative, locate local extrema, find the points of inflection,     and discuss concavity, for the function $f(x)= x^{3} + 10x^{2} + 25x -50}$.          \begin{displaymath}         f'(x)= 3x^{2} + 20x + 25 = 0     \end{displaymath}.     We find critical points at $\frac{-5}{3},\frac{137}{2}$.     Find the 2nd derivative, $f(x)=6x+20=0$, which gives us possible points of inflection.     \end{frame}     \end{document}


title: Renaming LaTeX file to index.tex causes tex4ht to give error when using minitoc

text: >cat t2.tex     \documentclass[titlepage]{report}%     \usepackage{minitoc}     \begin{document}           foo      \end{document}      now               htlatex t2.tex "html,4"      No errors. Now I name it to `index.tex` and try again:               >cp t2.tex index.tex     >htlatex index.tex "html,4"     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)     ....     (/usr/share/texmf/tex/generic/tex4ht/html4-math.4ht))     (/usr/share/texmf/tex/generic/tex4ht/index.4ht     ! Undefined control sequence.     <argument> \printindex           l.41 ...name{\the\@nameuse{idxtitle@\@indextype}}}          ?       any other name seems to work ok               cp index.tex indexx.tex     htlatex indexx.tex      no errors. Only when the name is `index.tex`. And this is ONLY when I include `minitoc`. If I remove `minitoc`, then it compiles ok:               >cat index.tex     \documentclass[titlepage]{report}%     %\usepackage{minitoc}     \begin{document}     foo      \end{document}          >htlatex index.tex       No error (just need to make sure to remove all old `index.aux` and other `index.*` stuff before trying again. but no error. So. why is including package `minitoc` causes `tex4ht` error ONLY when the source LaTeX file is called `index.tex`? specs:               >tex4ht -v     tex4ht.c (2009-01-31-07:33 kpathsea)          >latex -v     pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)          >uname -a     Linux 3.5.0-17-generic #28-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux


title: Make an index of historical time periods

text: I'm writing my thesis & I want to make an index with centuries, years, month, day, event & historical periods. So I try to build some commands, but unsatisfactory, I'm looking for your help. What are difficulties ?   * I have numerical datas & names (l'armistice, 15 janvier 1857, 1455, 19ème siècle)   * I have some composed periods (1801-1812, du 11ème au 13ème siècle)   * I need to indent my index (`event!day!month!year!centuries`)   * Sometime, I have only century, or year   * I want to classify all dates & centuries BCE (-200 ; -3 ; 23 ; 190 ; 1850 ; 2014)   * I don't know whether to make one or more commands What I tried : First step, a command for only centuries who's good, with a `*` for BCE centuries (For classify negatives centuries, I use fractions) :               % !TEX encoding = UTF-8 Unicode     \documentclass{scrbook}     \usepackage[english,frenchb]{babel}                  \usepackage[quiet]{fontspec}                         \usepackage[automark]{scrpage2}              \usepackage[babel,french=guillemets*]{csquotes}     \usepackage{index}                                       \usepackage{ifthen}                                      \usepackage{ifmtarg}                                     \usepackage{fp}                                                 \setmainfont{Adobe Garamond Pro}       \addtokomafont{disposition}{\normalfont}     \makeindex     \newindex{can}{cax}{cad}{Index des périodes} % makeindex period.cax -o period.cad       \makeatletter\newcommand*{\sivide}{\@ifmtarg}\makeatother        \makeatletter\newcommand*{\sistar}{\@ifstar}\makeatother           \newcommand*{\siglo}{\sistar\siglom\siglop}     \newcommand\siglop[1]%      {\ifthenelse{#1 = 1}%                             {#1\up{er}~siècle de notre ère\index[can]{#1@#1\up{er}~siècle de notre ère}}%       {#1\up{ème}~siècle\index[can]{#1@#1\up{ème}~siècle}}}%     \newcommand\siglom[1]%                                {\ifthenelse{#1 = 1}%       {#1\up{er}~siècle avant notre ère\index[can]{0,6@1\up{er}~siècle avant notre ère}}%       {#1\up{ème}~siècle avant notre ère\index[can]{\FPeval{\fraction}{1/#1}\fraction @#1\up{ème}~siècle avant notre ère}}}          \begin{document}     \siglo*{12} … \siglo*{1} … \siglo{14} … \siglo{1}     \printindex[can]     \end{document}      Another command (who remplace the first) for centuries & years, but my index fail :                   \newcommand*{\lan}{\sistar\lans\lano}         \newcommand\lano[2]%          {\sivide{#2}%           {{\ifthenelse{#1 = 1}%                                    {#1\up{er}~siècle de notre ère\index[can]{#1@#1\up{er}~siècle de notre ère}}%            {#1\up{ème}~siècle\index[can]{#1@#1\up{ème}~siècle}}}}%           {\sivide{#1}%            {#2 de notre ère\index[can]{1\up{er}~siècle de notre ère!#2@#2}}%            {#1#2\index[can]{\FPeval{\fraction}{#1+1}\fraction \up{ème}~siècle!#2@#1#2}}}}         \newcommand\lans[2]%          {\sivide{#2}%           {{\ifthenelse{#1 = 1}%            {#1\up{er}~siècle avant notre ère\index[can]{0,6@1\up{er}~siècle avant notre ère}}%            {#1\up{ème}~siècle avant notre ère\index[can]{\FPeval{\fraction}{1/#1}\fraction @#1\up{ème}~siècle avant notre ère}}}}           {\sivide{#1}%            {-#2\index[can]{1\up{er}~siècle avant notre ère!\FPeval{\fraction}{1/#2}\fraction @-#2}}%            {-#1#2\index[can]{\FPeval{\fraction}{#1+1}\fraction \up{ème}~siècle avant notre ère !\FPeval{\fraction}{1/#2}\fraction @-#1#2}}}}      and in the text               \lan*{12}{} … \lan*{1}{} … \lan{14}{} … \lan{1}{} …           \lan*{11}{16} … \lan*{}{18} … \lan{}{20} … \lan{19}{90} …       So after, I'm stuck ! Thank you for your help


title: Draw table-looking layout with axes

text: I need to draw a container bay layout like the one below. I am a complete noob with TIKZ. ![bay example](http://i.stack.imgur.com/RNWy1.png) You can see it as a kind of table with axes. Both axes have variable sizes, and it would be good for the numbers to start with 1 instead of 0. I will need to create layouts like this often so creating a template that takes an input like this               {}{6}{3,9,0}{5}{4,1,2,7}{8}      would be nice. You can structure it differently, but you get the idea. The boxes will always contain number 0-99, no text. Additionally, could you please describe how to edit one of the boxes to be shaded (grayish), crossed out (diagonal lines in the background). I would ask it in a new question, but this is closely related to the type of element you use to draw.


title: \printbibliography[heading=none] with apacite

text: I want to hide the title of the bibliography, which is usually done by using `\printbibliography[heading=none]` command instead of `\bibliography`, but the command is undefined in `apacite` package. Are there any nice workarounds, that hide the section title and hide the entry from the TOC?


title: Math notation and Fonts

text: I'm creating a rather large document/thesis/book that will contain a lot of math. I'm having problems getting a consistent set of math fonts or notation for different types of variables. Specifically, I have scalar variables, vectors, matrices, and tensors that I would like to all look different. I had sort of settled on the following:   1. scalar - 'regular' italicized   2. vector - same as scalar, but with an arrow (latex `\vec`)   3. matrix - bold (preferably upright as well)   4. tensor - preferably blackboard font, but also maybe the same as a matrix That's all well and good, except my field uses many Greek letters, both lower and uppercase. In addition, after writing a long section with latex's `\vec`, it looks ugly and crowded, particularly when combined with superscripts. Most documents I've seen fudge many of them together. So any mathematicians/latexticians have opinions on getting a consistent notation for a large document? As a side note, I'm currently using kpfonts, and would like to keep that (or Palatino) for the main text.


title: What's a good multiplatform text editor/system?

text: In the past, I've given up learning LaTeX because: General   * Installing and using fonts is a pain.   * Simple things like custom page headers are insufferably hard to implement.   * Documentation for the above items is incomplete.   * LaTeX shows 10 errors for every 1 SLOC, so the code is impossible to debug.   * So many errors that I feel like my code will never compile.   * It's a pain having to scroll/find a previewed page every time I update it. Cross-compatibility   * Code that compiles in LyX doesn't compile in TeXnicCenter/MiKTeX.   * Code that compiles in TeXnicCenter/MiKTeX doesn't compile in TeXShop/MacTeX.   * Code that compiles in TeXShop/MacTeX doesn't compile in LyX.   * Specifically, adding newlines breaks compilation. Systems   * TeXShop/MacTeX requires 1GB of hard drive space.   * TeXShop has no Windows or Linux version.   * TeXShop has few graphical abilities. I would do better with vi or emacs.   * TeXnicCenter has no Linux or Mac OS X version.   * TeXnicCenter updates references such as table of contents and BibTeX every three compiles.   * TeXnicCenter compilation shortcut requires four button presses on a Mac laptop.   * LyX's WYSIWYG isn't really a WYSIWYG. I was able to quickly learn Perl, Python, Ruby, newLISP, and Haskell because they don't have these problems. Instead, these languages offer:   * A single multiplatform, standard edition.   * Alternative editions for the minority of users who really need them.   * A small collection of binaries: perl, cpan; python, pythonw; ruby, irb, rdoc; newlisp; ghc, ghci, runghc, hugs, runhugs.   * All-in-one installers: ActiveState Perl, Python, RubyInstaller, newLISP, Haskell Platform.   * Small installation size (with the exception of GHC Haskell vs Hugs)   * Detailed tutorials with solutions for common errors. In conclusion, I reserve judgment on TeX/LaTeX until the community not only produces a multiplatform system, but champions it in a highly visible way. LyX isn't even mentioned at Obtaining LaTeX.


title: How can one undefine an already processed class option?

text: I'm using a class `classX` that accepts class option `optionX`. Thus, I can write:               \documentclass[optionX]{classX} ...      Now, as I understand it, being a class option, after `classX` processes this option, `optionX` is globally defined. All well and good, except that subsequently, for `packageY` that also accepts `optionX` (same option name, however semantically unrelated), the two lines   1. `\usepackage{packageY}`   2. `\usepackage[optionX]{packageY}` both (erroneously) produce the same effect. All would be well if I could undefine `optionX` before executing `\usepackage{packageY}.` (At this point I should also note that, lest anyone be worried about how this might affect `classX`'s subsequent performance, there's no need for the slightest concern -- `classX` has no need of this option remaining defined after executing its class `\ProcessOptions`). So, to the heart of my question, would anyone with better TeX\LaTeX knowledge than I, have any idea how to go? FYI, I've tried several of the usual suspects: `\let\optionX\@undefined` along with several clueless stabs at `\let\<prefix>@optionX\@undefined` after scouring source2e.pdf. (JW: sadly I don't think I can hold back for LaTeX3's promised encapsulated namespaces solution. _sigh._ )


title: miktex does not autoinstall via texmaker

text: MikTeX on the command line automatically installs missing packages, but when I run latex via TeXMaker, it does not. How can I achieve that?


title: Changing the textwidth of the notes in Beamer (repost from SO)

text: I've asked this on SO and didn't get a good answer, so I'm reposting it here. * * * I've been using the beamer class to create presentations in LaTeX and I love it. Recently I started using the \note command to add notes to my handout so that I have a printed version with some pointers to remind myself of things I want to say in the lecture.   I have a problem with the longer lines in the notes environment as they seems to spill out of the right end of the page without formatting correctly. I don't know if this is so for a reason, but in any case, I would like to find out how to change it. Clearly, I do not want to change the width of the text everywhere, only in the note environment. Here is a minimal example:               \documentclass[beamer]{beamer}     \title{An example of itemize in notes not working in beamer}     \usetheme{Boadilla}     \setbeameroption{show notes}     \begin{document}     \begin{frame}     $$  e^{i\pi}+1=0$$     \end{frame}     \note[itemize]{     \item At vero eos et accusamus et iusto odio dignissimos ducimus qui blandiis pra     }     \end{document}      which results in: ![alt text](http://imgur.com/CC6rL.png) Without the [itemize] option it works fine. If you put a \begin{itemize}...\end{itemize} environment manually the result is the same. Any ideas? Thanks


title: Change background colour of {verbatim} environment

text: In an existing document which is not to be modified (except for the preamble), all instances of `\begin{verbatim}...\end{verbatim}` should have their contents rendered not only in a monospaced font but also on a grey background. How can this be done?


title: Text overflows out of paragrapgh layout

text: I have no idea why it overflows out. What can I do? connect_metu.mobi_2.php is out of the layout. ![the right bottom side of the paragrapgh](http://i.stack.imgur.com/qjwuz.png)


title: Not able to switch to any other document class than "article"

text: I'm using LyX with Hebrew and whenever I'm trying to change my document setting to something else than article (i.e. article(AMS)) I can't create a pdf. I'm getting these errors:               Undefined control sequence          Undefined control sequence          Package inputenc Error: Keyboard character used is undefined          Package inputenc Error: Keyboard character used is undefined          Package inputenc Error: Keyboard character used is undefined          Undefined control sequence      Thanks a lot, Amihai


title: Disable babel's shorthands

text: I want to disable babel's shorthands in my own sty file. But since I can use `\shorthands{off}` only inside the document environment, I struggle with this. Is there a way to disable babel's shorthands in the preamble already?


title: dvipng error when using htlatex on eps file. includegraphics Unrecoverable error 36096

text: I am hoping someone here can give me a hint about this error. I am not really sure this is latex problem, but part of the software that I am using to process the latex document. The setup is very simple. one eps file of a plot created from Mathematica software and then exported to eps. One tex file that includes this graphics file. I want to make HTML of this using htlatex.               \documentclass[10pt,notitlepage]{article}%     \usepackage{graphicx}     \begin{document}       \includegraphics{mma_e1}     \end{document}      The eps file is valid, in the sense that I can open it using many apps and view it. gsview, etc.. I can run latex fine on it, and looking at the file .ps file, the image is there. pdflatex also work. Image is in the final pdf file. Only `htlatex foo.tex` gives this error, in dvipng processing               >htlatex foo.tex      This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)     .....     System call: dvipng -T tight -x 1400 -D 72 -bg Transparent -pp 1:1 foo.idv      -o foo0x.png     This is dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson     dvipng warning: DVI magnification of 1000 over-ridden by user (1400)      GPL Ghostscript 9.06: Unrecoverable error, exit code 1     --- Warning --- System return: 36096     Entering foo.css     Entering foo.tmp      So, I am not sure why this error happens on this one .eps file generated by Mathematica. Other eps files work with no problem with htlatex. I mean other eps files generated by other apps. Only the images exported by Mathematica to eps seem to give htlatex a problem. Is it possible the type of eps file generated by Mathematica is not supported by dvipng? Is this a problem with dvipng or with Mathematica not generating eps files with the right format? But then why I can open the eps file just fine with other applications? I have put the above tex file and the .eps file in this folder at my site if someone would like to give it a try http://12000.org/tmp/v6/ When I open the eps file using text editor, it looks a little strange, as it seems to have some non-ascii chars in it,in the first line. But this is how it was generated. Here is a screen shot of top of the eps file. ![enter image description here](http://i.stack.imgur.com/IuMsc.png) The question is: What is the cause of this error from dvipng?


title: How to give different margin sizes for verso and recto pages in ConTeXt?

text: I am creating a simple page layout for a book, which should have 1 cm margins along the top, bottom, and edge, but leave 3 cm in the middle margin, where the pages will be glued together.                _____________________  _     |  ____    |    ____  | _ 1cm     | |    |   |   |    | |     | |    |   |   |    | |     | |____|   |   |____| | _     |__________|__________| _ 1cm          | |    |   |   |    | |      1cm     3cm 3cm     1cm      I have thoroughly tested many options described in the new page design manual, but nothing worked as expected. This example is the closest I have gotten:               \setuppapersize[A5][A4, landscape]          \setuparranging[2SIDE]          \setuplayout[grid=yes, margin=10mm, leftmargin=5mm, width=103mm, rightmargin=5mm, backspace=30mm, topspace=10mm, top=5mm, header=0mm, height=190mm, footer=0mm, bottom=5mm, bottomspace=0mm, backspace=30mm]          \showframe     \starttext         \input knuth         \input knuth         \input knuth         \input knuth     \stoptext        * How can I ensure that verso pages have a 1 cm left margin and recto pages have 1 cm right margins?   * How can I ensure that the first page, table of contents, and all `\part`'s begin on a recto page?   * Why does my document appear to have 3 layers of frames around the text, as seen by `\showframe`, while the page design manual only has 1?


title: Print LaTeX in 8.5x11 inch format

text: Linux defaults to A4 paper size rather than letter. The only answer I found online was to run `pdflatex` with the `-t` flag.               $ pdflatex -t letter myfile.tex      but I get the error:               warning: Could not open char translation file `letter.tcx'.      The first line of my file is               \documentclass[margin,line]{res}      because I'm using someone else's template, found here: http://www.terpconnect.umd.edu/~briankw/resources/resume.cls. How can I make 8.5x11 inch pdf's with latex, and still use this template?


title: `pdflatex -shell-escape <file>` and \psbarcode from pst-barcode

text: I use `pdflatex` and I am interested in using `\psbarcode` from `\usepackage{pst-barcode}`. I think I found the answer in the last post  here but the explanation starts with `run pdflatex -shell-escape <file>` How and where to do this? Could you please give me an example with some file name and file extension. I suppose I have to write .tex? I work on Windows 7. I use TeXnicCenter.


title: Default distance between axis numbers and axis labels pgfplots

text: What is the default distance between the axis numbers and axis labels in the plots made with pgfplots?![enter image description here](http://i.stack.imgur.com/E27rE.jpg)


title: Best practices for using MATLAB images in LaTeX?

text: I am writing a paper currently using PDFTEX, and I make heavy use of MATLAB figures. The problem is that when I make a MATLAB figure, I can adjust it to any size, before saving it. When I save it, I can save it as a .png, .tiff, .jpg, etc. Lastly, on LaTeX itself, I can adjust the size of the image there as well, (height, width, etc etc). All those choices give me various quality images on my paper, so I am not sure what to do... do I have MATLAB images always large and then shrink them in LaTeX? Or make them small in MATLAB and expand them LaTeX? Is one image format better for display purposes in a PDF? What are best practices here? Thank you.


title: Can't load iguanatex64 into Powerpoint2013

text: I tried out IguanaTeX with PPT 2013 under Windows 8.1 . I initially loaded it and it worked fine on a blank presentation. The next time I opened up PowerPoint, I got a message saying that PowerPoint had stopped working had to close down. The third time I opened up PPT, it said that it had had difficulty with IguanaTex, and did I want to disable it? If I disabled it, things were ok, but of course I couldn't use IguanaTex. If I said not to disable it, I got the "PowerPoint has stopped working" message. I'm using PowerPoint 2013 (64 bit version) on 64-bit Windows 8.1, and IguanaTex64. Any suggestions for how to debug or solve this problem?


title: Chess notation does not show figurine font

text: I am new to LaTeX/`skak`. I use `htlatex` to generate a small ebook html.               \documentclass{book}          \usepackage[ps,mover]{skak}          \title{test1\\Test}     \author{Asim}          \begin{document}          \parindent=0pt          \maketitle               \newgame     \mainline{1. d4 d5} \mainline{2. c4 Nf6 }               \end{document}      But the resultant notation shows up as an english letter 'N' instead of the figurine notation. What wrong am I doing? I have attached the log file (when I run `htlatex`), resultant `.mobi` file and the locations where I have Figurine fonts: https://docs.google.com/folder/d/0B5UN6Nh9m6BjZmxPNjV5NHhGcU0/edit Appreciate if somebody could help, since I have tried everything that I could.


title: How can I make the copied-pasted text from an pdflatex output still readable/compilable by pdflatex?

text: ## The issue I compile a `latex` document which contains accents ("é" for instance), then I copy the text from the `pdf` generated by `pdflatex`. Then, I paste this text to my `latex` file. The resulting file cannot be completed, for some encoding reason. Is there a way to solve this problem? ### PS: My system is OSX. My TeX distribution is TeXLive. My PDF previewer is Preview (the default Apple previewer application). ### PPS: This problem seems to be related more to Apple's Preview application than anything else. ## Minimal non-working example               \documentclass{article}          \usepackage{cmap}     \usepackage[french]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{document}          Copy this text "éàoùôêèç" and then paste it here : éàoùôêèç          Then compile again.          \end{document}      ## The error > ./Sans-titre.tex:10: Package inputenc Error: Unicode char \u8:Ì not set up > for use with LaTeX. > > See the inputenc package documentation for explanation. Type H for immediate > help. ... >   >   >                                                    l.10 ... oÃ¹ÃŽÃªÃšÃ§" and > then paste it here : eÌ >                                                   aÌouÌoÌeÌeÌcÌ§ >   ![enter image description here](http://i.stack.imgur.com/fBuew.png)


title: Stretch line spacing to fill page

text: I'm writing a thesis which has to be double spaced with a 12 point font size and with set margins. However, due to each page having different subsections, pictures etc., the text doesn't line up nicely with the bottom margin. I've included a minimum working example below:               \documentclass[a4paper,12pt]{report}     \usepackage[twoside,top=3.5cm,bottom=2.8cm,inner=4cm,outer=2.5cm]{geometry}     \usepackage{lipsum}     \usepackage{setspace}          \doublespacing     \begin{document}          \section{Section title}     \lipsum[3-4]     \section{Section title}     \lipsum[6-7]     \section{Section title}     \lipsum[8-9]     \section{Section title}     \lipsum[9-14]          \end{document}      Is there any way to enable either the paragraph spacing or line spacing to stretch in order for the text to fill the entire vertical range on each page? I've been trying things like:               \usepackage{parskip}     \setlength\parindent{20pt}     \setlength{\parskip}{0.5\baselineskip plus 8pt minus 8pt}      but nothing seems to work.


title: What are the exact semantics of \detokenize?

text: How does `\detokenize` work? The e-TeX Short Reference Manual states: > When followed by a `<general text>`, expands to yield a sequence of > character tokens of `\catcode` 10 (space) or 12 (other) corresponding to a > decomposition of the tokens of the `<balanced text>` of the unexpanded > `<general text>`; c.f. `\showtokens`. The effect is rather as if > `\scantokens` applied to the `<general text>` within a régime in which only > `\catcodes` 10 and 12 existed. Note that in order to preserve the boundaries > between control words and any following letter, a space is yielded after > each control word including the last. What does that mean in plain English? I want to understand this snippet of code:               \def\task#1{\@task#1::\@nil}     \def\@task#1:#2:#3\@nil{%       \if\relax\detokenize{#2}\relax       ...      I think that `\task` is defined as a macro taking one argument which calls `\@task`. I don't know what `\@nil` means -- it is probably used to end the macro call. I also don't know what `\relax` and `\detokenize` do, but detokenize takes the second part of the argument for the `task macro` (the parts are separated with semicolons).


title: Documentation of lmodern package?

text: Recently I have faced some problems with `lmodern` package. I wanted to read the documentation to educate myself of possible parameters that can be specified when using the package, and what I can do with it later. However, after spending some time on google I couldn't find it. I only found:   * An interesting _article_ about lmodern (http://www.tug.org/pracjourn/2006-1/robertson/robertson.pdf). While interesting and useful it probably does not cover everything.   * a CTAN folder, but it didn't contain a documentation either (http://www.ctan.org/tex-archive/info/lmodern) Where can I find full documentation for the `lmodern` package?


title: How can I easily store and extra node information in a macro for a tikz picture

text: The following code results in an error:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \def\aebelowof{below=of A}     \begin{document}          \begin{tikzpicture}            \node (A) at (0,0) {NODE A};       \node[right=of A]  {NODE B};            \node[\aebelowof] {node C};          \end{tikzpicture}          \end{document}      The error is:               ! Package pgfkeys Error: I do not know the key '/tikz/below=of A' and I am goin     g to ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.12   \node[\aebelowof]                              {node C};     ?       I know I can get around this by writing:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \def\aebelowof{below=of A}     \begin{document}          \begin{tikzpicture}            \node (A) at (0,0) {NODE A};       \node[right=of A]  {NODE B};            \expandafter\node\expandafter[\aebelowof] {node C};          \end{tikzpicture}          \end{document}      But for the code this is supposed to be embedded in, it'll be difficult or near impossible to get the `\expandafter`s placed in there. Basically what I would like to do is store information about how the nodes should be formatted and placed in various macros. What I would like to know is whether there is a `tikz` or `pgf` trick I'm unaware of that could come to the rescue here. **UPDATE** Here's a bit more involved example. There's to be some kind of user interface where the user sets the position, but I don't force the user into a particular kind of configuration/positioning.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \def\aeposition{}     \newcommand\setposition[1]{\def\aeposition{#1}}     \begin{document}          \setposition{left=of A}     \begin{tikzpicture}            \node (A) at (0,0) {NODE A};       \node[right=of A]  {NODE B};            \expandafter\node\expandafter[\aeposition] {node C};          \end{tikzpicture}               \setposition{below=3in of C}     \begin{tikzpicture}            \node (C) at (0,0) {NODE C};       \node[right=of C]  {NODE D};            \expandafter\node\expandafter[\aeposition] {node E};          \end{tikzpicture}          \end{document}      In short, the key word, the equal sign between key word and value, and the value are all being stored in the macro.


title: Cleveref Links missing

text: i have a problem with cleveref. I'm using cleveref with the nameinlink-option but there is still no link. This is my header:               \documentclass[12pt,a4paper]{scrreprt}          \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{enumerate}     \usepackage[english]{babel}     \usepackage{fontenc}     \usepackage{graphicx,epsfig,color}     \usepackage[nameinlink]{cleveref}     \usepackage{geometry}     \usepackage{float}     \geometry{       left=2cm,       right=2cm,       top=2cm,       bottom=3cm,       bindingoffset=5mm     }          \usepackage{dsfont}     \DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}     \usepackage{setspace}     \usepackage{ifpdf}     \usepackage{caption}      And i'm using:               \Cref{cor:simplification}      I don't get what I'm doing wrong.


title: Font size is different on the Contents page

text: I use `memoir` class and got some problems with ToC. Chapter style defined as:               \font\robotoLarge="name:Roboto:protrusion=default;expansion=default;tlig;trep" at 24pt          \makechapterstyle{general}{     \renewcommand*{\chapterheadstart}{\vskip 30mm}     \renewcommand*{\printchaptername}{}     \renewcommand*{\printchapternum}{}     \renewcommand*{\printchaptertitle}[1]{\hspace*{16mm}\robotoLarge{}##1\rule[-1ex]{0pt}{1ex}}     \renewcommand*{\afterchaptertitle}{\hrule height 0.5mm\vskip 40pt}}\chapterstyle{general}      But when ToC is created, the chapter style is defferent: the font is smaller, the `\hrule` has no space before and sticks to letters. How can the style of ToC be fixed to be the same as my main chapterstyle?


title: Debugging pgf-math

text: Just learned about pgfmath, but how can I debug it?               \pgfmathparse{..} \pgfmathresult      doesn't print anything inside a tikzpicture environment. How can I simply print the result of an expression to check weather the calculation was done correctly?


title: How to Spell-Check LaTeX in multiple languages / language variants

text: I am writing a PhD Thesis / Dissertation and would like to be able to spell- check the thing. The problem is that I'm required to write it in UK English, while many of my quotations are written in US English. This makes spell- checking quite a pain. Is there a way to tag sections of LaTeX text as being UK English / US English, and have a spell-checker either respond to that tagging or skip the sections which aren't in the particular language variant? I've asked this over at http://stackoverflow.com/posts/4451944 but couldn't really get resolution as to the best way to do this. Edit: I'm using TeXnicCenter with the latest version of MikTex. This is for a PhD thesis of between 70 and 100,000 words. Most sources are in U.S. English, while the thesis must be written in U.K. English. There are literally hundreds of quotations, so exporting them is probably not reasonable.


title: mdframed around figure with threeparttable

text: I'm trying to draw a border around a figure (using mdframed) with a threeparttable. However, the size of the border is not adjusted correctly. How can I adjust the border to correctly wrap around the image? See an MWE below:               \documentclass[oneside,ngerman,english]{scrbook}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \makeatletter     \usepackage{mdframed,threeparttable}     \makeatother     \usepackage{babel}     \begin{document}     \begin{figure}[h]     \begin{mdframed}     \caption{\textbf{Primary headaches}}     \centering     \begin{threeparttable}     \includegraphics[scale=0.6]{abbildung_kopfschmerzen.png}     \begin{tablenotes}[para]     \textbf{Erlaeuterungen:} TTH=Kopfschmerzen vom Spannungstyp (Tension Type Headache)     \end{tablenotes}     \end{threeparttable}     \end{mdframed}     \end{figure}     \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/pLyUh.png) The picture abbildung_kopfschmerzen.png: ![](http://i.stack.imgur.com/1VLsO.png). Btw, I couldn't add threeparttable as a tag.


title: Adobe Garamond Pro not working with XeLaTeX

text: Adobe Garamond Pro and XeLaTeX Guys, I am trying to use opentype fonts using XeLaTeX. Now when, I am trying to use Adobe Garamond Pro. It says > ! Font `\zf@basefont=Garamond` at 10.0pt not loadable: Metric (TFM) file or > installed font not found. My operating system is Fedora 12. The /usr/share/fonts contain both folder name linux-libertine and Garamond in which it contains the .otf files. When of use Linux Libertine it is fine with Latex but Adobe Garamond Pro shows error. See the code below: **For Linux Libertine**               \documentclass[10pt]{book}     \usepackage{xltxtra}     \setmainfont{Linux Libertine} % could be any Unicode font     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \end{document}      **Output:** ![alt text](http://i.stack.imgur.com/tlLnG.jpg) **Now using Garamond - Code**               \documentclass[10pt]{book}     \usepackage{xltxtra}     \setmainfont{Garamond} % could be any Unicode font     %\setmainfont{Adobe Garamond Pro} % could be any Unicode font     %\setmainfont{AGaramond Pro} % could be any Unicode font     %I have used all possible combination.     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \end{document}      **Output is a BLANK File**               The log says something like this:     (/usr/share/texmf/tex/latex/base/fixltx2e.sty))     ! Font \zf@basefont=Garamond at 10.0pt not loadable: Metric (TFM) file or insta     lled font not found.     \zf@fontspec ...ntname \zf@suffix " at \f@size pt                                                        \unless \ifzf@icu \zf@set@...     l.3 \setmainfont{Garamond}                                % could be any Unicode font     ?       As you can see, I have tried every possible way to name the font. So what should I do to fix this serious issues? P.S. Both fonts are installed in my computer. Verification:               ls -R /usr/share/fonts/linux-libertine/ /usr/share/fonts/linux-libertine/: LinBiolinumB.ttf  LinLibertineBI.ttf  LinLibertineC.ttf  LinLibertine.ttf LinBiolinum.ttf   LinLibertineB.ttf   LinLibertineI.ttf          ls -R /usr/share/fonts/Garamond/     /usr/share/fonts/Garamond/:     AGaramondPro-BoldItalic.otf  AGaramondPro-Regular.otf     AGaramondPro-Bold.otf        AGaramondPro-SemiboldItalic.otf     AGaramondPro-Italic.otf      AGaramondPro-Semibold.otf


title: What hyper referencing package is compatible with MiKTeX 1.20e?

text: I am looking for the basic functionality of the `hyperref` in a package that would be compatible with MiKTeX 1.20e. (This is needed for uploading files to an organization which supports MiKTeX 1.20e but not later.) I want to be able to refer to sections and tables in a document.


title: Work around 'Dimension too large' using `framed` with `listings`

text: I'm including an external source code file as an appendix using the `listings` package. The `framed` package is being used to ensure multi-page listings frames are fully closed. The problem is if my source code file is >1704 lines I see this error               Dimension too large.       with this description:                \end{framed}          I can't work with sizes bigger than about 19 feet.     Continue and I'll use the largest value I can.      From what I can find online about 'Dimension too large', the error is not specific to either package mentioned above. But I think the problem ultimately lies in `framed` since the document compiles if I remove the frame. So either I:   * Restrict length of source file to <1705 lines   * Remove the `framed` frame from listing Does anyone have other solutions? I don't like either of these.


title: How to set a letter to the margin of the page and position it vertically according to alphabetical order?

text: I would like to place a letter (that indicates which letter in the dictionary is shown) on the outer side of the book, set it for example in a darker box and position that letter vertically. Users of the dictionary can later easily access a searched headword by using the letter division on the side. Minimum example:               \documentclass[twocolumn]{book}     \usepackage[top=1.5cm, bottom=1.5cm, left=2cm, right=2cm]{geometry}     \usepackage{fancyhdr}     \usepackage[utf8x, utf8]{inputenc}     \usepackage[T1]{fontenc}     \newcommand\entry[3][]{\hangpara{2em}{1}{\fontfamily{phv} selectfont{\textbf{{#2}}}}\          #3\ifx\relax#1\relax\markboth{#2}{#2}\else\markboth{#1}{#1}\fi         \par}\nopagebreak[4]     \newcommand*{\dictchar}[1]{\centerline{\LARGE\textbf{#1}}\par}     \pagestyle{fancy}     \fancypagestyle{basicstyle}{%     \fancyhf{}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}     \fancyhead[LE,RO]{\textbf{\chaptitle}}     \fancyhead[LO,RE]{\textbf{\thepage}}}     \fancypagestyle{dictstyle}{%     \fancyhf{}     \fancyhead[LE,LO]{{\fontfamily{phv}\selectfont{\textbf{\rightmark}}}}     \fancyhead[CO,CE]{\thepage}     \fancyhead[RE,RO]{{\fontfamily{phv}\selectfont{\textbf{\leftmark}}}}}     \begin{document}     \pagestyle{dictstyle}     \dictchar{a}     \entry[headwords]{headwords}{translations}     \clearpage     \dictchar{b}     \entry[headwords]{headwords}{translations}     \end{document}      How can I place thumb indexes from \dictchar values now to the right odd and left even margin?


title: Undefined control sequence \tkzDrawArc

text: I'm trying to follow an example of arc drawing from one tex.stackexchange question:               \begin{tikzpicture}         \tkzDefPoint(0,0){O}         \tkzDefPoint(2,-2){A}         \tkzDefPoint(60:2){B}         \tkzDrawLines[add = 0 and .5](O,A O,B)         \tkzDrawArc[rotate,color=red](O,A)(180)         \tkzDrawPoints(O,A,B)         \tkzLabelPoints[below](O,A,B)     \end{tikzpicture}      And I keep getting this error message               Undefined control sequence.     \tkzDrawArc     [rotate,color=red](O,A)(180)     ?      I'm using the following packages:               \usepackage{fullpage,amsfonts,amsmath,amssymb}     \usepackage{txfonts}     \usepackage{tikz}     \usepackage{tkz-euclide}     \usepackage[margin=0.5in]{geometry}     \usepackage{yhmath}      What am I missing?


title: Shorthand characters in section titles (Xe(La)TeX)

text: I have learnt how to define shorthands by the commands               \useshorthands{(a character, e.g. ')}        in the preamble and               \defineshorthand{(shorthand code)}{(expansion)}        just after `\begin{document}`, e.g. `\defineshorthand{'a}{apple`} to get `«'a»` typesetted into `«apple»`. Trouble is, when I try to put a shorthand character (in my case, the apostrophe `'`) in the title of a section, subsection, subsubsection or chapter and combine that with the table of contents, I get an error message apparently related to the toc file. All of that, naturally, after creating a command `\newcommand{\6}{'\Gr{}}`, where `\Gr` is a font family of the same font as the default font, a command created to avoid the typesetting of shorthands which are not supposed to be shorthands, as 'a turns to apple in any context, even if it's ' a with a blank in the middle. Therefore the section title contains the command `\6`. Why does that happen and how do I solve it? For example the error is produced with:               \documentclass[a4paper]{report}     \usepackage[italian]{babel}     \useshorthands{'}          \begin{document}       \defineshorthand{'a}{apple}            \section{Un'\,arpa}       \tableofcontents            \end{document}      The error produced is:               .mu2.toc:2: Missing $ inserted.       <inserted text>       $       l.2 ...t@token \egroup \Gr {}arpa}{1}       {section.0.1}            ?       and the full .toc file reads:               \select@language {italian}       \contentsline {section}{\numberline {0.1}Un^\bgroup          \prime \futurelet \@let@token \egroup \,arpa}{1}      the last two lines being one line together.


title: Mysterious white space between abstract and section

text: When I use the following code, it generates a huge white space between 1.1 Dataset and my abstract.               \documentclass[12pt,twoside,a4paper,openright]{report}          \usepackage{amsthm}     \usepackage{qutthesis}               \begin{document}     \chapter[Evaluation]{Evaluation}     \label{cha:eval}          This chapter evaluates the performance of our the news detection framework by. First we evaluate performance of PMM in retrieval task and show that representing tweets using patterns performs better than baseline term-based models and other related pattern models. Then we evaluate the news detection algorithm using PMM and show the results of using single features and combining multiple features. This chapter details the experiment design including the testing environment, datasets, baseline models, and evaluation methodology.                \section {Dataset}     Obtaining a microblog dataset is a challenging task. Twitter TOS (terms of service) restricts the distribution of tweets in many forms. Most of the previous studies use different proprietary datasets collected manually and are not available publicly, making it difficult for replicating their experiment results. TREC (Text REtrieval Conference) microblog dataset is the only publicly available microblog dataset with annotations, which will be used in the retrieval and news detection evaluation.                \subsection {TREC Microblog Dataset}     The TREC microblog dataset (TRECMB) is the latest publicly available large-scale microblog dataset.    The dataset is pre-processed by standard text pre-processing techniques and non-English tweets are removed.               \end{document}      qutthesis is the prescribed thesis format by my university. Please let me know if you need me to upload it. Or it can be downloaded from http://users.tpg.com.au/yctian/LaTeX/qutthesis/QUTThesisTemplate.zip The big gap disappear if the subsection is removed, or not using the thesis template. Thanks for the help. ![enter image description here](http://i.stack.imgur.com/F0u7v.png)