title: How do I make frame environment play nice with \textbf?

text: I am getting a strange error message when I put textbf into a frame environment. Minimal Example               \documentclass{article}     \listfiles          \begin{document}          \begin{frame}     \textbf{Lemma 1}          \end{frame}          \end{document}      Error Message:               ! Missing number, treated as zero.     <to be read again>                        }     l.8 \textbf                {Lemma 1}      When I comment out the \textbf, the file compiles fine. When I use \textbf normally, the file also compiles fine. Note: I am using pdflatex on Linux.


title: ShareLatex font type in a beamer presentation

text: Is there an easy way to change the font type in ShareLatex? I've tried all of the instructions I could find on their website, but they do nothing. Let's say, for example, that I wanted to use Windows font Arial in a beamer presentation. How would you do this?


title: Font size as a key-value pair using pgfkeys does not work

text: I want to define a new environment whose contents can be typeset using a specific font family and size optionally specified as key-value pairs. For handling the key-value pairs I am using pgfkeys. Why is LaTeX not accepting passing the font size as a key-value pair like `fontsize=\large`, though it has no problem with `fontfamily=\sffamily`? How to fix this? Here is a minimal example:               \documentclass{minimal}     \usepackage{lipsum}     \usepackage{pgfkeys}          \pgfkeys{       /myenv/.cd,       fontfamily/.store in = \myenvfontfamily,       fontsize/.store in = \myenvfontsize,     }          \newenvironment{myenv}[1][]{%       \pgfqkeys{/myenv}{#1}%       \ifdefined\myenvfontfamily\myenvfontfamily\fi       \ifdefined\myenvfontsize\myenvfontsize\fi     }{%     }%          \begin{document}     \lipsum[1]     \begin{myenv}[fontfamily=\sffamily,fontsize=\large]       \lipsum[2]     \end{myenv}     \lipsum[3]     \end{document}      pdflatex fails with the message:               ! Undefined control sequence.     \myenvfontsize ->\large           l.24 ...env}[fontfamily=\sffamily,fontsize=\large]      I want to define an environment where the user should be able to set the font using key-value pairs, much like the `Verbatim` environment from the fancyvrb package (although font setting is not the primary goal of the environment).


title: How to create counters with index?

text: I need to create counters with names like mycounter1, mycounter2,... Basically this should be a counter-valued data array. The code like               \newcounter{index}     \newcounter{\csname mycounter\the\value{index}\endcsname}      does not work. It seems that it is impossible to use `\csname`...`\endcsname` for counter names. Using `\expandafter` with different variants also does not help. Is there a way to resolve this problem?


title: First initials only in elsarticle (biblatex incompatible)

text: I have bib files with a mixture of full first names and first initials only (and the same for middle names). I have to submit a paper in elsarticle now and would like to make this consistently first initial only. I have seen solutions that require you to edit the style file (see e.g. http://jonmccune.wordpress.com/2009/01/11/first-initials-only-in-bibtex/) and in `biblatex` you just set `firstinits=true` it seems. My problems are twofold. I don't think I am allowed to edit the `elsarticle` style file for submission and it seems `biblatex` and `elsarticle` are incompatible. If I try to use biblatex I get               ! LaTeX Error: Command \bibhang already defined.                Or name \end... illegal, see p.192 of the manual.                    \documentclass{elsarticle}     \usepackage{biblatex}     \begin{document}          \section{}     \printbibliography          \end{document}      Is it possible either to use `biblatex` in a way which keeps the `elsarticle` styling unchanged or to use `bibtex` and get first initials only without editing the style file?


title: How can I create geocharts in LaTeX?

text: What I need is something like this: ![enter image description here](http://i.stack.imgur.com/LWZKW.jpg) The problem with this R package is that you can't export into pdf format to include in a LaTeX document. Any suggestions?


title: Can't use utf8 encoding with datatool

text: I am using datatool to manage tables and I am getting errors when the `data.csv` file (encoded either as UTF-8 or ANSI) has characters like 'á'. I can get it around by having `data.csv` encoded as ANSI and using `{\'a}`, but that is too boring to do. The interesting thing is, if I add `\usepackage[T1]{fontenc}`, I can encode `data.csv` as UTF-8 and use chars like 'á' without problems, but the font looks damn ugly. `file.tex`               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{datatool}     \begin{document}     The quick brown fox jumps over the lazy dog     á é õ ç {\c{c}} {\~a}     \begin{table}         \DTLloaddb{data}{data.csv}         \DTLdisplaydb{data}     \end{table}     \end{document}      `data.csv`               a,e     a,c      `data.csv`               {'/a},{'/e}     {\~a},{\c{c}}      `data.csv`               á,é     ã,ç


title: Modify flip beamer theme

text: Recently I came across `flip beamer theme`. You can find it here I didn't like the `current frame/total frames` page numbering style so I added in the `.tex` file the following lines               \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%     \oldmacro\hfill%     \insertframenumber\,}%/\,\inserttotalframenumber      but it didn't work. I thought of trying to see what's going on in the `.sty` files. In `beamerouterthemeFlip.sty` I replaced               \node at (\paperwidth-5ex,4ex){\small$^\text{\insertframenumber}/_\text{\inserttotalframenumber}$};      with                \node at (\paperwidth-5ex,4ex) {\small $\insertframenumber$};      and it worked. ![changing numbering style](http://i.imgur.com/VsfGq.jpg) Now I want to add `smoothbars` on top...The ones with circle...Something like that ![circles and smooth bars](http://i.imgur.com/m8y3W.jpg) In `.tex` file I added               \useoutertheme[subsection=true]{smoothbars}      but not only it didn't work, it somehow ruined the beauty of the theme. ![the loss of beauty](http://i.imgur.com/rVlMx.jpg) Is there a way to achieve that? Circles on top without ruinning everything... I am also trying to add a `logo` but using               \logo{\includegraphics[scale=.05]{logo.jpg}}      It is not working...


title: What is the easiest way to quickly generate an image from TeX source?

text: Often one wants to quickly generate an image from a small piece of TeX. (E.g. for inclusion in a question here.) What's the quickest way of doing it?


title: Precompiled preamble with TikZ/Externalize

text: I'm using the _externalize_ capability of TikZ (`external` library) to speed up compilation of my TikZ pictures (as explained in Script to automate externalizing tikz graphics). In addition, I would like to speed up compilation by precompiling the preamble. It is explained in http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/ how this can be achieved. The command for precompiling the header is:               pdflatex -ini -job-name="main" "&pdflatex fmt.tex\dump"      where `fmt.tex` contains the documentclass and package declarations, and the header is subsequently inserted into the file by having the first line say               %&fmt      Both methods by themselves work well and result in nice speed-ups. Now, I am trying to apply both methods at the same time. This gives me the following error-message during compilation:               ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e         rror -interaction=batchmode -jobname "figures/fmt-figure0" "\def\tikzexternalre         aljob{fmt}\input{fmt}"' did NOT result in a usable output file 'figures/fmt-fig         ure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enab         led system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it          is also named 'write 18' or something like that. Or maybe the command simply fa         iled? Error messages can be found in 'figures/fmt-figure0.log'. If you continue          now, I'll try to typeset the picture.      Note: I am compiling with option `-shell-escape` already. In addition, I precompiled the header with that option as well. Minimal working (breaking) example: fmt.tex - the header               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize[prefix=figures/]      test.tex - the main file               %&fmt     \begin{document}     \begin{tikzpicture}     \node[draw, circle, minimum width=1cm] {};     \end{tikzpicture}     \end{document}


title: LaTeX options for kindle?

text: I was wondering if there are any good settings to produce a PDF suitable for reading on a (6 inch) kindle. Main use is for intermediate reading of academic papers while they are being written:   1. Text needs to be large enough to be readable.    2. Equations need to be readable.    3. I don't care much what happens to the figures. They may appear on a separate page  I prefer a solution with 3 files for every project, one which contains the text and equations (paper), one which compiles to standard format, and one which compiles to kindle friendly format.


title: Unable to use external PostScript pictures generated by TikZ

text: I'm using external EPS from TikZ figures following the suggestions found in "Export eps figures from TikZ". Images are correctly created but when I get the PS of the main document with `dvips` I can't see any pictures. It looks like a problem of size of the image or resolution, because the pages where I put pictures appears just all white with the caption of the figure. Also the text of the page is covered. I don't get any error message. Is there any other option I have to give to `dvips`? My code is:               \hyphenation{Post-Script}     \usepackage{epsfig,import,graphicx,tikz,pgfplots}     \usepgfplotslibrary{external}     \tikzexternalize[prefix=tikzFigures/,shell escape=-enable-write18]     \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error     -interaction=batchmode -jobname "\image" "\texsource" &&     dvips -o "\image".ps "\image".dvi}}           \begin{document}              \begin{figure}[thb]             \input{images/fig1.tikz}             \caption{caption}             \label{fig:label}         \end{figure}          \end{document}      and run with               latex --src -interaction=nonstopmode -enable-write18      and then               dvips -P pdf      Here is the code of `images/fig1.tikz`:               \begin{tikzpicture}              \begin{axis}[             name=plot1,             scale only axis,             xlabel={$x [m]$},             ylabel={$y [m]$},             title={image},             view={0}{90},             colormap={bw}{gray(0cm)=(0);gray(1cm)=(1)},             colorbar             ]                  \addplot3[surf]file{images/matrix.dat} ;              \end{axis}          \end{tikzpicture}      I'm using MikTeX 2.9 on a Windows XP system.


title: Custom Equation Numbering

text: > **Possible Duplicate:**   >  Label equation with a symbol I wanted to know if there a way to create your own custom markings for equation numbering instead of the automatic numbering. Preferably, I would like it to be flexible to the point where I could name the equation with almost any command such as `\dagger` or `\Faxmachine`. I know those are pretty silly, but just wanted to emphasis that I did not want to just have custom numbering such as `{1,3,5,...} or {1.1,1.2,1.3,...}, etc`. I may want a symbol say `star`. No specific environment is acquired.


title: TikZ: placing a line (transformed into a sinusoidal shape) parallel to an edge connecting nodes

text: I am drawing a little sketch, where a line enters a circle, and three other lines come out. Above each line, there is to be a tittle sinusoidal curve (almost as if I used a construct like `\node (a) edge node[auto] {Some caption} (b);` which you can find on page 48, PGF manual 2.10); this illustrates what I have so far (code below): ![enter image description here](http://i.stack.imgur.com/EuIeZ.png) **My question is:** How can I place a wiggly line such as there is on the left above the other 3 lines on the right? Especially the lines also going north and south east are troubling me. Furthermore: how can I get anchors around the middle node (potential) which are placed on a circle, so that my edges coming all have the same length? **So far:** I achieved placing the line above the left edge by placing two empty nodes above it, and shifting one to the left on the x axis, and one to the right, and naming them:               \node[shape=coordinate] (arrow start) [left=of potential,xshift=-1cm] {}         edge [post] node[auto,above,name=wavestart,yshift=0.3cm,xshift=-0.7cm] {}                     node[auto,above,name=waveend,yshift=0.3cm,xshift=0.7cm] {} (potential);      Afterwards I could connect those new nodes easily by just creating another edge between them and pathmorphing it:               \path (wavestart) edge[decorate,decoration={snake,amplitude=1.4mm, segment length=15pt}] (waveend);      All code:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{patterns,positioning,decorations.pathmorphing,arrows}          \begin{document}          \begin{tikzpicture}%         [post/.style={->,shorten >=1pt,>=stealth',semithick}]              \node[circle, draw=black, pattern color=gray,%          pattern=north east lines,label=below:$V(x)$,%          minimum size=1cm] (potential) {};         \node[shape=coordinate] [above right=of potential] (outgoing up) {};         \node[shape=coordinate] [right=of potential] (outgoing mid) {};         \node[shape=coordinate] [below right=of potential] (outgoing down) {};              \path (potential)             edge[post] (outgoing up)             edge[post] (outgoing mid)             edge[post] (outgoing down);              \node[shape=coordinate] (arrow start) [left=of potential,xshift=-1cm] {}             edge [post] node[auto,above,name=wavestart,yshift=0.3cm,xshift=-0.7cm] {}                                     node[auto,above,name=waveend,yshift=0.3cm,xshift=0.7cm] {} (potential);              \path (wavestart) edge[decorate,decoration={snake,amplitude=1.4mm, segment length=15pt}] (waveend);                    \end{tikzpicture}          \end{document}


title: apa6 package: heading line exceeds textwidth

text: I'm using the apa6 package with the document mode "doc". Now I ran into some problems with the heading line. On even pages the heading line exceeds the textwidth on the left hand side and on odd pages on the right hand side. **Even page:** ![even](http://i.stack.imgur.com/kUC8o.png) **Odd page:** ![Odd page](http://i.stack.imgur.com/n2GrF.png) **Example Code:**               \documentclass[doc]{apa6}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa,sortcites=true,sorting=nyt]{biblatex}     \DeclareLanguageMapping{american}{american-apa}          \ifapamodeman{\setlength{\textwidth}{5.76772in}%     \setlength{\textheight}{9.19291in}}{}          \title{Sample APA-Style Document Using the \textsf{apa6} Package}     \author{Brian D. Beitzel}     \affiliation{SUNY Oneonta}     \leftheader{Beitzel}     \abstract{This is the abstract}     \keywords{APA style, demonstration}     \begin{document}     \maketitle          Text long enough to fill several pages...     \end{document}      I guess it is a bug in this otherwise excellent apa6 package. Is there a quick (and dirty) way to fix this issue?


title: Drawing horizontal line same width as the page width

text: I've been trying to draw a line with width the same as the page width. I use `fancyhdr` and I have a line for my footer, and I want the their widths to be equal. I tried `\line(1, 0){\textwidth}` and `\line(1,0){\pagewidth}` but no luck. I know I can use `\line(1,0){450}` for example, but that means I would have to play around and find the exact page width.


title: Line break in caption of wrapfigure

text: I use the wrapfigure package for placing images in my text at the right side. Now my problem is, that my image is really small and my caption is larger then the image. Instead of a line break at the end of the line it adds the chars below each other. This looks like the following: ![Error on wrapfigure package](http://i.stack.imgur.com/29yk4.png) So is it possible to add a line break after "Abbildung 4.3:" with the content of \caption? My code looks like this:               \begin{wrapfigure}{R}{2,76cm}     \includegraphics[]{./bilder/mockup-endtimeError}     \caption{Error Start- Endzeit}     \label{mockup-endtime-error}     \end{wrapfigure}      BR & Thanks, mybecks


title: Change chapter heading and insert line at top of pages.

text: I'm using this preamble:               \documentclass[pdftex,10pt,b5paper,twoside]{report}     \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}     \usepackage[comma]{natbib}     \usepackage{lmodern}     \usepackage{setspace}     \usepackage{amsmath,amssymb,amsfonts}      \usepackage{graphics}                      \usepackage{color}                   \usepackage{hyperref}                  \usepackage{graphicx}     \usepackage{listings}     \usepackage{courier}                  \usepackage{longtable}     \usepackage{rotating}     \usepackage{calc}     \usepackage{caption}     \usepackage{booktabs}     \usepackage{ctable}     \usepackage{mathtools}      My problem is that I do not have enough time to completely redo the layout of the hole report, but I would like to fix to things.   1. How do I remove "Chapter" heading and replace it with \chapter{ **THIS** }. Like:              1 Introduction          text text text text text text text text text      instead of:              Chapter 1          Introduction          text text text text text text text text text      Also, I need the "new" heading to be placed at the "Chapter" position.   2. How do i make a line at the top of the pages telling which "chapter" you're in. (not in the appendices though)


title: How to insert a double quote mark in TeXStudio?

text: I want to enclose my path (contains some spaces) with double quotes. I have tried pressing shift+' on English keyboard, but unfortunately TeXStudio translates this as two single quotes. Shortly speaking, how to insert a double quote mark in TeXStudio? * * * Update: TeXMakerX has changed its name to TeXStudio.


title: How do I break up a bibliography into separately numbered sections?

text: There are at least two use cases where one might want to list items in a bibliography under separate subsections with different numbering conventions.   * a CV, where you'd like to list journal papers, conference papers, workshop papers, etc under different categories (often needed in academic settings);   * an annotated bibliography, where you might need different sections for different topics being covered.  What I'd like is a method that allows me to specify names of subsections, and for an added bonus, different numbering conventions for each subsection, and then will list `\cite`s in different sections as per my wishes.


title: Conventions for typesetting complex vectors and vectors with complex components

text: I was wondering if there were conventions for typesetting vectors and complex numbers. I grew up in France and I'm used to putting an arrow on my vectors (`$\vec{v}$`) and a bar on my complex numbers (`$\bar{z}$`) when the variable type is not obvious. This page on the LaTeX wikibook suggests using a bold font for vectors. I think I have seen that used in textbooks too. What about complex numbers? And vectors with complex coordinates? Are there any conventions there?


title: How to get BibLaTeX-chicago use title case capitalization?

text: According to the 16th version of the Chicago Manual of Style, titles in the reference list are now supposed to be capitalized in title case style rather than sentence casing. Yet, as far as I understand, BibLaTeX-chicago (0.9.9b) does not seem to make any automatic changes to the capitalization of `.bib`-entries. Is there any way (except for doing it manually for each entry, of course) to get BibLaTeX-chicago use title case capitalization for the entry field `title` in all entry-types (regardless of how the title is formatted in the `.bib`-field) ? Here's a MEW:               \documentclass[12pt, a4paper]{article}     \usepackage[authordate,strict,backend=biber, cmsdate=old]{biblatex-chicago}     \begin{filecontents}{bibsample2.bib}     @BOOK{Smith2003,      title = {This is the book title},      publisher = {Penguin},      year = {2003},      author = {Smith, James},      address = {London},         }     @ARTICLE{Doe1970,      author = {Doe, John J.},      title = {this is the article title},      journal = {Great Journal},      year = {1970},      volume = {40},      pages = {207-234},     }     \end{filecontents}     \addbibresource{bibsample2.bib}     \begin{document}     \autocite{Smith2003}     \autocite{Doe1970}     \printbibliography     \end{document}      So, what I'm looking for is for these titles to be spelled as This is the Book Title This is the Article Title in the output. I'm using the latest version of BibLaTeX (2.5), Biber (1.5) and BibLaTeX- chicago (0.9.9b). Any pointers are greatly appreciated..


title: Caption on the side of a table

text: I tried to use the `floatrow` package together with the approach from the accepted answer from (Caption on the side of a figure) to put my table caption to the right top hand side of my table. However, whatever I tried so far did not work out at all. I use the `float` package. Not very often but that is why I do not want to or cannot use the `sidecap` package which looks actually much simpler. I quickly tried the `minipage` approach which seems to work but not sure if I should use it. Here is my simple table which I used to try to bring the caption to the right top:               \documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}          \usepackage{tabu}     \usepackage{booktabs}          \begin{document}          \begin{table}          \begin{tabu} to \textwidth {X[L] X[L]}          \toprule          AAAAAA & BBBBBB \\     AAAAAA & BBBBBB \\     AAAAAA & BBBBBB \\     AAAAAA & BBBBBB \\     AAAAAA & BBBBBB \\          \end{tabu}          \caption{This is the caption This is the caption This is the caption This is the caption This is the caption This is the     caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the     caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the     caption}          \end{table}          \end{document}      Can anyone help with this `floatrow` approach?


title: Lists, counters, and refs

text: I'm trying to create an environment containing a single-instance, numbered list (so that I can easily control the spacing, etc.). The problem is that I cannot used `\ref` to cross-ref to the enumerated item. The code of a MWE is:               \documentclass{article}         \newcounter{tesisc}     \AtBeginDocument{\setcounter{tesisc}{1}}     \newenvironment*{Tesis}       {\begin{list}         {$(\arabic{tesisc})$}         {\setlength{\rightmargin}{0cm}          \setlength{\leftmargin}{2\parindent}}         \item       }       {\end{list}\refstepcounter{tesisc}}     \begin{document}     \begin{Tesis}       Testing testing testing testing testing testing testing testing testing testing.       \label{th:one}     \end{Tesis}     \begin{Tesis}       Testing testing testing testing testing testing testing testing testing testing.       \label{th:two}     \end{Tesis}     This is one reference: \ref{th:one}. This is another reference: \ref{th:two}.     \end{document}      My environment numbering works fine, but not the cross-referencing. ![enter image description here](http://i.stack.imgur.com/3b3Da.png) How can I tweak my definition in order for my references work?


title: Adjusting the width of a block to cross a column border

text: I am facing a slight esthetic problem with a block. Originally my slide is divided in two columns of 0.6\linewidth and 0.4\linewidth. In the first column, there is two images next to each other with below some formula and below the problematic block. On the second column, there is just two images on top of each other with a slight caption below. The block is taking two lines and thus don't fit into the slide, as seen below. ![enter image description here](http://i.stack.imgur.com/JmKyN.jpg) Here is the code I am using:               \documentclass[pdf,10pt,xcolor=table]{beamer}          \begin{document}          \begin{frame}{The aerodynamic model of \citet{Sane2002}}         \begin{columns}             \begin{column}{.6\linewidth}                 \begin{minipage}{\columnwidth}                     \begin{center}                         \raisebox{-0.5\height}{\includegraphics[width=3.5cm]{Pictures/Chapter1/Wingview_Robofly}}                         \raisebox{-0.5\height}{\includegraphics[width=3.5cm]{Pictures/Chapter1/Polar_Curve}}                     \end{center}                 \end{minipage}                     \begin{align}                 {\color{red}F_{aero}}= & {\color{green}F_{trans}}+{\color{cyan}F_{added}}+{\color{violet}F_{rot}}+(F_{wc})\\                 \onslide<4->{                 \text{with} &\quad\scriptstyle\color{green}F_{trans} = \frac{\rho SU_{t}^2\hat{r_2}^2(S)}{2}\left[C_{L}^2\left(\alpha\right)+C_{D}^2\left(\alpha\right)\right]^{1/2}\nonumber\\                 & \quad\scriptstyle\color{cyan}F_{added} = \rho\frac{\pi}{4}R^2\bar{c}^2\left(\ddot{\phi}\sin\alpha+\dot{\phi}\dot{\alpha}\cos\alpha\right)\int_0^1 \! \hat{r}\hat{c}^2\left(\hat{r}\right) \, \mathrm{d}\hat{r}\nonumber\\                 & \scriptstyle\color{cyan}\phantom{\quad\scriptstyle\color{cyan}F_{added} =}  - \ddot{\alpha}\rho\frac{\pi}{16}\bar{c}^3R\int_0^1 \! \hat{c}^2\left(\hat{r}\right) \, \mathrm{d}\hat{r}\nonumber\\                 & \quad\scriptstyle\color{violet}F_{rot} = C_{rot,exp}\rho U_{t}\dot{\alpha}\bar{c}^2R\int_0^1 \! \hat{r}\hat{c}^2\left(\hat{r}\right) \, \mathrm{d}\hat{r}}\nonumber                     \end{align}                     \vspace*{-.75cm}                     \begin{block}{}\setbeamertemplate{itemize  item}[triangle]                         \begin{itemize}                             \item Not compatible at first sight with a flexible wing                         \end{itemize}                     \end{block}             \end{column}             \begin{column}{.4\linewidth}                 \vspace*{-0.625cm}                 \begin{center}                     \includegraphics[width=1.1\columnwidth]{Pictures/Chapter1/Advanced_Rotation_Forces}\\                     \includegraphics[width=.6\columnwidth]{Pictures/Chapter1/Advanced_Rotation_Motion}                 \end{center}                 \vspace*{-0.75cm}                 \begin{flushright}                     {\fontsize{4pt}{4.8pt}\selectfont Images: \citet{Dickinson1999} and \citet{Sane2002}}                 \end{flushright}             \end{column}             \end{columns}     \end{frame}          \end{document}      So that everything fit into one slide, I want to modify locally the block width so that it can go beyond the column border and the text fit on a single line.


title: Marking a specific point on an arc

text: I want to draw a line from one arc to other but I do not know if it is possible to mark a point on an arc and start drawing on that point. Is it possible to draw lines like below image? ![enter image description here](http://i.stack.imgur.com/p0R9i.jpg)               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}       \draw[thick] (90:3cm) arc (90:0:3cm);       \draw[thick] (90:3cm) arc (180:90:3cm);     \end{tikzpicture}          \end{document}


title: blank 'ticks/axis' labels in pgfplot/Tikz plot

text: Very first time using LuaLatex and Tikz/PGF to generate plot of a function (I use it for directed graphs _a lot_ , but not functions). Following MWE works pretty well, except that I want to prevent writing the 0 label on the x-axis at the origin. If you run this, you'll see that the x-axis label 0 overlays the vertical y-axis. Not what I want.               \documentclass{article}           \usepackage[latin1]{inputenc}      \usepackage{tikz}           % GNUPLOT required      \begin{document}      \pagestyle{empty}           \begin{tikzpicture}[x=0.1cm,y=1.2cm]           % set up maximum and minimum x- and y-coordinates       \def\xmin{-0.5}        \def\xmax{81.8}        \def\ymin{-1.8}        \def\ymax{2.5}            % draw and label axes         \draw[->] (\xmin,0) -- (\xmax,0) node[right] {$N$};         \draw[->] (0,\ymin) -- (0,\ymax) node[above] {$dN$};           % tick marks and tick labels on axes              \foreach \x in {0,5,...,80}                       \draw (\x,1pt) -- (\x,-3pt)                          node[anchor=north] {\footnotesize\x};              \foreach \y in {-1.5,-1.0,...,2}                       \draw (1pt,\y) -- (-3pt,\y)                               node[anchor=east] {\footnotesize\y};           % now plot the function        \draw[color=blue,thick, smooth,domain=0:80.1] plot[id=logistic] function{0.1*x*(1-     x/70)} node[right]{$\frac{dN}{dt}=rN\left(1-\frac{N}{K}\right)$};        \end{tikzpicture}              \end{document}       I tried using \phantom               \foreach \x in {\phantom,5,...,80}                       \draw (\x,1pt) -- (\x,-3pt)                          node[anchor=north] {\footnotesize\x};       but that wouldn't compile. The only thing I've found that works is to insert a period (dot), instead of the zero:               \foreach \x in {.,5,...,80}                       \draw (\x,1pt) -- (\x,-3pt)                          node[anchor=north] {\footnotesize\x};       This works, more or less, but seems 'clunky' (inelegant). I'm sure there is a better way - suggestions?


title: llncs and caption - underfull hbox

text: I'm using the `llncs` document class and try to get two figures side-by-side. I found a solution, but I get a hbox underflow if my captions have a bad length. Here is a minimal example:               \documentclass{llncs}          \begin{document}          \begin{figure}     \begin{minipage}[t]{0.4\linewidth}     \caption{Fragwrdige Zusammengehrigkeit bei sehr grosen Clustern}% Underfull \hbox (badness 10000) in paragraph at lines     \end{minipage}%     \begin{minipage}[t]{0.4\linewidth}     \caption{Text}     \end{minipage}     \end{figure}          \end{document}      The PDF output seems to by OK, so I could ignore this warning. But I wonder if there is a correct solution for this problem. Any ideas?


title: How to call a package added previously

text: I'm using the package `mcode` to show matlab code in my thesis. This package requires the `xcolor` package so it automatically loads it. My problem is that I have to call the `table` option in the `xcolor` package but when I call it after `mcode` I get an error because it was previously called in `mcode`. How can I resolve the issue?


title: Is there a difference between texconfig rehash and mktexlsr?

text: With reference to this answer; Is there a difference between texconfig hash and mktexlsr? For example: Is `sudo texconfig rehash` able to clean up ls-R in cases where `mktexlsr` remains deficient? or; Is this only due to the `sudo` in the former command?


title: Rotate sidewaystable (twoside option): Top of table to the left

text: I have 3 sidewaystable's in a row, but have broken up the table into 3 separate tables, each of one page (much easier). I'm using the twoside option for the document. But this seems to affect the rotation of the tables: What I want, is that the top of the table is always to the left, when you read the thesis, so you can read through two tables with out turning the paper. I am thinking of something like `\rotatebox{180}` or `\begin{rotate}{180}`, but this doesn't seem to work, as the rotation axis is in the middle (or something?), or because I put it in the wrong place? This is the beginning of my table:               \documentclass[10pt,a4paper,twoside]{report}           \begin{document}          \begin{sidewaystable}\footnotesize     \caption{}     \begin{minipage}{\textwidth}     \begin{tabularx}{\textwidth}{     >{\raggedright\arraybackslash\advance\hsize9em}X     >{\raggedright\arraybackslash\advance\hsize9em}X     X     X     X     >{\raggedright\arraybackslash\advance\hsize4em}X     >{\raggedright\arraybackslash\advance\hsize8em}X      }     \hline     1 & 2 & 3 & ... \\      Does any one have a hint?


title: Mixing symbols and numbers as footnote markers

text: I have several numbered footnotes in a text, but some of them I would like to see them as symbols. I tried with the next command               \footnote[10]{this is a footnote}      and it works, it changes the next number by 10, but if intead of 10 I use `\dag` it doesnot work, or if I use `\dagger` it writes 8825. Any idea?


title: Is LaTeX nowadays still that superior to Word?

text: I've been trying to switch to LaTeX from Word (with which I have good experience) And I've been disapointed after some days of LaTeX learning and creating. I like the layout of the **report** class of LaTeX. And I like its way of organizing informtions, math and bibliography. But ... **Installation and price :** I won't talk much. Now with MikTeX it's fast. And everybody has Word. The text editor of MikTeX is not good. But that doesn't matter, we can get another. For the price, LaTeX has the big advantage of being free even if everyone has Word nowadays. But this is a good point for LaTeX **Compatibility :** Don't tell me Word can't output PDFs please ... For the rest, Word is only on Windows. That sucks. LaTeX is multiplatform. That is cool ! **Table of Contents, Index, etc ...** The only difference is that instead of a command you need to insert it manually. It doesn't not update automatically on Word. But CTRL + A, then F9 updates it. You can apply a style far more easily on Word. **Coding :** I've been studying Computer Science. I know HTML, PHP, C++, etc ... So I won't talk about the time I took to master some of the LaTeX concepts. However, once I want to modify my default LaTeX template, I always end to looking for :   * A package   * A command   * A way to make a simple exemple of the command work   * A way to modify an existing command in order to make my template be modifyed This takes times. And has to be repeated for each type of modifications. I find it much more easier in Word, clicking on the text, modifying it. Clicking the header, change the size, etc ... **Templating :** People say that once a template is made on LaTeX, it's easy to maintain for large documents. Whereas for Word this is not true. I think this is false. Styles in Word is the same as a simple `\chapter{}` command. And once set (like a preambule command configuration) it stays forever in the document. Just click the list numbers in Word to make it adapt the numbers of the title ... Clicking on a quick style in Word is the same as writing the appropriate command. **Bad Typography :** Well, this is true but tends to become false. I'm using Calibri so I didn't notice anything at the first place. An attempt with Times New Roman make it obvious. But there are now fonts that accept ligatures in Word I'm using Word 2010 I've made the so _famous_ tests with _fi_ and so one ... things are not that bad. Even in Times New Roman (I'm using Calibri). **Not Real Small Caps :** This is quite nice in LaTeX. I find it cool. But when reading I don't really notice the difference at the first place. I had to read it on the internet to notice it. **Ligatures :** This points goes to LaTeX. I've found it amazing to make glyphs and so one. However, some fonts accept it in Word such as Gabriola or Calibri. So this is true but tends to become false. I'm using Calibri so I didn't notice anything at the first place. An attempt with Times New Roman however made it obvious. **Default template :** Okay, I like the report class. But when I'm writing a report with it. The default template looks like an autobiography. And modifying it is not _that_ fast. Lots of commands. Not that easy. And if I want to modify it again a little. There another _that long_ command. I've shown my LaTeX template and my Word template to friends. I only used the default titles in Word. I used the TOC of Word and LaTeX. I use the same title numerotation-type. I used the default font on LaTeX and Calibri on Word 80 % of the people told me (without knowing LaTeX I've told them both are Word) that they prefer the Word style. Sometimes, people that say LaTeX is so nice make me thing this is just a matter of recognition. When you see something that is obviously LaTex, this makes it seem like it is more serious. Even if the content is crap. Just because of the "aura" made by the fact that major scientific works are made in LaTeX. **References :** You can do that in Word. Just click on the appropriate option ... **Tables :** I HATE tables in LaTeX. Took me lot of time to master them (I used `table`, `tabular` and `longtable`). **Numbers displaying :** The acceptation of different height support is also in Word. But the problem is that we need to activate it. **Table of Contents :** There is a slight point there. LaTeX's default TOC is cool. But Word's not bad too. **Template saving :** Just save your word template as you can save a LaTeX template ... where is the problem ???? **Grammar Checker :** Well ... **Word becomes slow :** Okay, this is not entirely false. Word tends to become slower. I'm running a 100++ pages document and its slower than LaTeX. But well, once opened its okay. **References, Bibliography :** Well, there I'm shocked. Okay, LaTeX is good. But Word does it just fine. Plus you have a graphic editor ... **WYSYWYG vs WYSYWYM :** Come on ... this is stricly inferior not to see what you have. If my text is in the type of my "Title 1", I'll see it immediately. And I find it far more nice than a command. I'm lost in my LaTeX file if I don't put **HUGE** comments to separate the sections. Plus you can navigate through sections with the Word explorer. **Long document vs Short document :** This is the point I find most ridiculous. Word is just as good as LaTeX for long documents ... the style is set for the document, you cna concentrate on the contents. About automatic image placement. Even if in the majority of case I need an explicative scheme which I want right under my introduction text. That made me use `[h]` and its variant a lot. **Scientific Formulas :** Well ... I've been typing my lectures with Word and I can do it real-time ... But I must admit that LaTeX is quite good at it. But I won't say it is superior. **Packages for every purpose :** To end well. This is a point for LaTeX of course. Writing chemistry, music and so one is far more easier than in word. Well, apart from that. I don't really type music in my Math class. But whatever. For general purpose, I find that Word can be better than LaTeX. So, that's it ... I'm not really satisfyed. Is this a bad _question_ ? This is not a question ... well I'm sorry about it ... where could I move it if it's not suitable for this website ? I don't know where to get an answer ... Update : Bear in mind I assume you are aware of actuality and not using OS that dates from the 70' ... I'm talking about future.


title: How do I define custom shortcuts in WinEdt 7?

text: In WinEdt 5.5 I defined some keyboard shortcuts like `Ctrl`+`Shift`+`Q` to insert quotation marks (`\enquote{****}`) or `Ctrl`+`Shift`+`I` to italicize the text (`\emph{****}`) (where `****` stands for the currently marked text). This was done through `Options -> Menu Setup`. In WinEdt 7 (and possibly also in WinEdt 6) this menu option no longer exists, but I am sure that it is still possible to define those shortcuts. But where and how?


title: How do I format a regular expression in math mode?

text: I want to display some regular expression, like the following, in LaTeX math mode.               \[     (F+(A+I*)*)|(F*(A+I*)+)E     \]      However, the spacing is all wrong, because TeX formats + and * as binary operators, rather than as postfix ones. I would expect that the postfix operators would appear close to the preceding operand, and, in cases where the successor element is an operand, they would introduce some additional space to prevent the appearance's ambiguity. An example formatted in the way I'd like it to be appears below. I have marked with red the places where additional spacing is unwanted and with green places where additional spacing is required. However, I'd be open to other formatting suggestions from typography experts. ![enter image description here](http://i.stack.imgur.com/EvbTe.png) Is there a way to handle this without adding manual spacing commands?


title: Create landscape tables with apa6 document class

text: How can I create landscape tables with the apa6 document class? The `landscape` environment seems to be ignored; the table is still upright. I guess the problem is that tables and figures are automatically moved to the end of the document. Is there a way to have landscape tables anyway?               \documentclass[man]{apa6}          \usepackage[american]{babel}     \usepackage[utf8]{inputenc}     \usepackage{pdflscape} %landscape pages     \shorttitle{foo}          \begin{document}     Some text          \begin{landscape}     \begin{table}[tp]     \captionbox{Some table}     {\begin{tabular}{cc}\toprule     \textbf{foo} & \textbf{bar} \\ \midrule     foobar & 1 \\     foobaz & 2 \\ \bottomrule     \end{tabular}}     \end{table}     \end{landscape}          \end{document}


title: Figures not obeying margins

text: I have a few figures in my document not obeying the margin constraints:               \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}      Most do. But these one's don't... they are defined as the others like,               \begin{figure} [p]     \centering     \includegraphics[scale=0.6]{old_zig_1}     \caption{Example of a forward looking algorithm that identifies peaks \& troughs.}     \label{fig:old_zig_1}     \end{figure}      Not sure why. Any ideas? What are my options...? Simply change the scaling...?


title: Increase the bending distance of a ``to`` path in TikZ

text: I have problem with an small graph. The path between the node **J** and **B** should to the right of node **I**. Is there a way to do this?               \documentclass[11pt]{article}      \pagestyle{empty}       \usepackage{tikz}     \usetikzlibrary{arrows,positioning,automata}          \begin{document}     \centering     \begin{tikzpicture}[>=stealth',shorten >=1pt,node distance=2cm,on grid,initial/.style    ={}]         \node[state]        (0)                     {};         \node[state]        (A) [below =of 0]       {};         \node[state]        (B) [below =of A]       {B};         \node[state]        (C) [below left =of B]      {};         \node[state]        (D) [below left =of C]      {};         \node[state]        (E) [below right =of C]     {};         \node[state]        (F) [below left =of D]      {};         \node[state]        (G) [below right =of D]     {};         \node[state]        (H) [below right =of E]     {};         \node[state]        (I) [right =of H]       {I};         \node[state]        (J) [yshift=-2cm,below right =of G]     {J};         \node[state]        (X) [yshift=-1cm,below =of J]       {};              \tikzset{mystyle/.style={->}}          \path   (0) edge    [mystyle]   node    {}  (A);         \path   (A) edge    [mystyle]   node    {}  (B);         \path   (B) edge    [mystyle]   node    {}  (C);         \path   (C) edge    [mystyle]   node    {}  (D);         \path   (C) edge    [mystyle]   node    {}  (E);         \path   (D) edge    [mystyle]   node    {}  (F);         \path   (D) edge    [mystyle]   node    {}  (G);         \path   (E) edge    [mystyle]   node    {}  (H);         \path   (B) edge    [mystyle]   node    {}  (I);         \path   (F) edge    [mystyle]   node    {}  (J);         \path   (G) edge    [mystyle]   node    {}  (J);         \path   (H) edge    [mystyle]   node    {}  (J);         \path   (I) edge    [mystyle]   node    {}  (J);         \path   (J) edge    [mystyle]   node    {}  (X);              \tikzset{mystyle/.style={->,relative=false,in=0,out=0}}         \draw [->] (J) to [bend right=100 ] (B);         %\path  (J) edge    [mystyle]   node    {}  (B); %similar problem     \end{tikzpicture}          \end{document}


title: LaTeXML and pdfpages

text: I can't find a lot of informations about LaTeXML here but I hope somebody can help me. In a LaTeX document, I use a `\includepdf` with the option `pages`. I have created a mystyle.sty.ltxml in which I use the following macro :               RequirePackage('graphics');     DefMacro('\includepdf[]{}','\includegraphics[#1]{#2}');      When I want to compile with :               latexmlpost --dest=mypage.xhtml mydoc.xml, latexmlpost      the script transforms my pdf to a png. But every page is print above the previous, so we can't read the file. (by example, this png was generated from a "3 pages document") Does someone have a solution ? Sorry for my bad english


title: Can I use beamer without setting \documentclass to beamer?

text: I want to have a PDF that is the normal type: `\documentclass[a4paper,11pt]{article}` with normal TeX tables, graphs and words, but I want it such that there's `beamer` slides scattered throughout of the form `\documentclass[handout]{beamer}` with `\usepackage{beamerthemesplit}`. Is this possible? I haven't been able to get `beamer` to work without setting `\documentclass` to `beamer`.


title: Quotation marks in Beamer

text: I have something like this               \documentclass[xcolor=svgnames]{beamer}     \usecolortheme[named=Crimson]{structure}      \usetheme[height=7mm]{Rochester}      ...     \begin{document}     \begin{frame}     In fact     \begin{align*}       ``Formula''     \end{align*}     \end{frame}     \end{document}      (the `Formula` needs to be in math mode) and I get ![enter image description here](http://i.stack.imgur.com/7KSg4.jpg) What am I doing wrong?


title: scrbook with amsbook style header/footer

text: I am using `scrbook`. I like the look of the running heads and page numbering of `amsbook`. Is there a way to get the same style with `scrbook`? I already tried:               \setkomafont{pagehead}{\normalfont\normalcolor\sc\smaller}      MWE for `amsbook`:               \documentclass[]{amsbook}          %opening     \title{A Title}     \author{Joe Miller}          \usepackage{blindtext}          \begin{document}          \maketitle          \Blinddocument     \end{document}


title: In LuaTex is it possible to change font/language according to the script/glyphs used?

text: I am a XeLaTeX user and I often have to typeset english-greek documents. Packages like xgreek or polyglossia are great but in order to apply the correct hyphenation rules you have to declare the text that belongs to the secondary language. On the long run, this can become cumbersome. In XeLaTeX I am using the `XeTeXinterchartoks` mechanism that allows me to change automatically the hyphenation rules and/or the font without explicitingly declaring them. The procedure involves grouping together the glyphs of a Unicode Block and then automatically applying tex commands when transitioning from a group to another one. For those not familiar with the `XeTeXinterchartoks`, more info can be found at xetex-reference pages 13-14. Lately I got interested in Lua(La)Tex. I want to know if there is a way to achieve similar results in LuaTex. As was pointed in a previous question, in LuaTeX there is not a direct analogue to `XeTeXinterchartoks` but it was suggested that there are other, more powerful ways to achieve the same goal. So the questions are   1. How can I change the hyphenation rules/font automatically according to the glyphs used without declaring them?    2. Can someone provide a minimum working example or at least point me to some references?   3. One of the drawbacks of `XeTeXinterchartoks` is that the settings are global. Is there a way in LuaTeX to set this feature (if it exists) on and off, thus providing more flexibility?


title: Incompatibility between etextools and etoolbox command \dolistloop (\forlistloop)?

text: The following code uses the `etoolbox` package to convert a list `a,b,c` into an internal list (called `\mylist`) and then typesets that with colons: `a:b:c:`. However, when I load the `etextools` package (by uncommenting the second line), I get no list output.               \documentclass{minimal}     \usepackage{etoolbox}     %\usepackage{etextools}     \begin{document}     A list:     \def\mylist{}     \forcsvlist{\listadd\mylist}{a,b,c}     \def\do#1{#1:}     \dolistloop{\mylist}     \end{document}      I suspect it is is a bug since `etextools` claims to depend on `etoolbox`. Is this a bug or am I doing something wrong? In either case, how can I use `\dolistloop` with `etextools` (which I want for goodies like `\expandnext`)? ## Notes   * `\show\mylist` produces the same output `a|b|c|` in both cases, so the problem is with `\dolistloop` which expands to `\forlistloop\do`   * The `\forlistloop` command becomes substantially more complicated when `etextools` is used.   * This question might be relevant (but not obviously).


title: Ref a picture within a node

text: I would like to know if we can reference a (tikz)picture within a node from another picture. In this way, I could create a PDF with multiple pictures which give details of each node from my first picture. Thanks.


title: Has anyone written a script to resolve a certain set macros?

text: Here's the idea: Like most people, I use a lot of custom macros that are often nothing more than shortened versions of commands that I use often. This is great for me, but makes the latex cryptic for others who need to read it. Does anyone know of a way to resolve/expand a certain bunch of macros? It could take as input a `tex` file and one or more `sty` file containing macros, and it eliminates from the `tex` file all the macros in the `sty` file, leaving a `tex` file that no longer needs the `sty` files.


title: How to clear what has been previously declared with \AtEndDocument?

text: I am using a class file that uses `\AtEndDocument` to include a table of contents at the end of the document. However, I would like to override the original `\AtEndDocument` and force the document not to have a TOC at all _without_ having to change the document class. How can I achieve that? The `.cls` file without the :               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{docclass}[2009/07/02 Whitepaper Style]     \DeclareOption{a5paper}{\OptionNotUsed}     \DeclareOption{b5paper}{\OptionNotUsed}     \DeclareOption{letterpaper}{\OptionNotUsed}     \DeclareOption{legalpaper}{\OptionNotUsed}     \DeclareOption{executivepaper}{\OptionNotUsed}     \DeclareOption{landscape}{\OptionNotUsed}     \DeclareOption{twoside}{\OptionNotUsed}     \DeclareOption{draft}{\OptionNotUsed}     \DeclareOption{notitlepage}{\OptionNotUsed}     \DeclareOption{openright}{\OptionNotUsed}     \DeclareOption{leqno}{\OptionNotUsed}     \DeclareOption{fleqn}{\OptionNotUsed}     \DeclareOption{openbib}{\OptionNotUsed}     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}     \ProcessOptions     %%     \LoadClass[a4paper,11pt,oneside,onecolumn,final,openany,chapterprefix=false]{scrreprt}     \RequirePackage[T1]{fontenc}     \RequirePackage[english]{babel}     \RequirePackage[english]{varioref}     \RequirePackage[ansinew]{inputenc}     \RequirePackage[pdftex]{graphicx}     \RequirePackage{wrapfig}     \RequirePackage{color}     \RequirePackage{float}     \RequirePackage{datetime}     \RequirePackage{fancyvrb}     \RequirePackage{fancyhdr}     \RequirePackage{ae}     \RequirePackage{bbding}     \RequirePackage{amsmath}     \RequirePackage[hang,flushmargin]{footmisc}     \RequirePackage[         pdftex,         colorlinks=true,         linkcolor=black,         citecolor=black,         urlcolor=black,         menucolor=black,         filecolor=black,         breaklinks=false,         bookmarksnumbered=false,         pdfpagelayout=OneColumn,         pdfstartview=FitH         ]{hyperref}          %% more commands          \fontfamily{cmss}          \AtBeginDocument{%       \hypersetup{%         pdftitle={\HREFpdftitle},         pdfauthor={\HREFpdfauthor},         pdfsubject={\HREFpdfsubject},         pdfkeywords={\HREFpdfkeywords},         pdfcreator={\HREFpdfcreator}       }%     }          \AtEndDocument{%         \newpage\pdfbookmark[0]{Contents}{TOC}\tableofcontents\thispagestyle{fancy}     }      The document:               \documentclass{docclass}     \begin{document}     \section*{Section 1}     foo bar baz     \section*{Section 2}     lorem ipsum ...     \end{document}      **Note:** I have tried simply including `\AtEndDocument{}` in the document, but this doesn't yield the expected result.


title: BibTeX files: How to concatenate BibTeX files from different folders and keep valid links for referenced files?

text: My BibTeX files contain references to files, like PDF files. I use the field "file" to indicate the referenced files. This is useful to associate files with a BibTeX entry. Moreover one can directly open the file from some software, such as JabRef. I would like to concatenate BibTeX files located in different folders and keep valid relative links. Valid links will allow to access the files from the concatenated BibTeX file. A dummy command cat will lose all relative links. Here is an example of what I except from the concatenation. Below are two BibTeX files located in two different folders. The field 'file' indicates the location of the referenced file. In the concatenated result file, these 'file' fields are modified to take into account the location of the files.               Root dir     |- RootA     |  - A.bib     |- RootB     |  - B.bib      with `A.bib`               @MISC{XY,       title = {John Doe's Book},       author = {John Doe},       file = {johnDoe.pdf:johnDoe.pdf:pdf},     }      with `B.bib`               @MISC{XX,       title = {Jane Doe's Book},       author = {Jane Doe},       file = {janeDoe.pdf:janeDoe.pdf:pdf},     }      I would like the concatenation of the two files to look like this:               @MISC{XY,       title = {John Doe's Book},       author = {John Doe},       file = {johnDoe.pdf:RootA/johnDoe.pdf:pdf},     }          @MISC{XX,       title = {Jane Doe's Book},       author = {Jane Doe},       file = {janeDoe.pdf:RootB/janeDoe.pdf:pdf},     }      The tools I have used so far do not do such things... The basic idea I have to do this, is to use a combination of command lines tools such as sed and cut. But it seems painful and not robust. And I should also mention that one should make difference between absolute links and relative links. Finally, the result file depends on where we run the concatenation command... Does anyone has a better idea, or know a software that performs that operation?


title: Too many compiles when using latexmk with mpgraphics

text: \documentclass{article}     \usepackage{mpgraphics}     \begin{document}     \begin{figure}     .     \label{fig:a}     \caption{a}     \end{figure}     \begin{mpinline}     draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0)     \end{mpinline}     \ref{fig:a}     \end{document}      I use MikTex 2.9 and TexMaker. I compiled this MWE with means of `latexmk`. To be more precise, the command was: `latexmk -e "$pdflatex=q/pdflatex -synctex=1 -shell-escape -interaction=nonstopmode/" -pdf %.tex`. My document compiled over and over and over. A log says that:               Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'C:/tmp/tmp-fig1.pdf' 'tmp-fig1.pdf' ------------ Run number 1 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -shell-escape -interaction=nonstopmode -recorder "tmp.tex"' ------------          Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'C:/tmp/tmp-fig1.pdf' 'tmp-fig1.pdf' ------------ Run number 2 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -shell-escape -interaction=nonstopmode -recorder "tmp.tex"' ------------          Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'C:/tmp/tmp-fig1.pdf' 'tmp-fig1.pdf' ------------ Run number 3 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -shell-escape -interaction=nonstopmode -recorder "tmp.tex"' ------------          Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'C:/tmp/tmp-fig1.pdf' 'tmp-fig1.pdf' ------------ Run number 4 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -shell-escape -interaction=nonstopmode -recorder "tmp.tex"' ------------          Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'C:/tmp/tmp-fig1.pdf' 'tmp-fig1.pdf' ------------ Run number 5 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -shell-escape -interaction=nonstopmode -recorder "tmp.tex"' ------------      Finally, it compiled five times which is 3 more than necessary.   I suspect the reason is that pdfs that are results of `mpinline` are not binary equal (they contain a timestamp or something like that?) and that causes latexmk to think that it needs to compile again. When compiling very long document this behaviur is really annoying as it consumes a lot of time. Can it be fixed?


title: How to imply the format-like picture with LaTeX?

text: ![enter image description here](http://i.stack.imgur.com/eazjL.png) How to imply the format-like picture?


title: make flashmode work

text: I am not sure whether this is an appropriate question for tex.SE. Anyway: I am trying to use Flashmode, which I discovered reading the answers to this question. Unfortunately I am not able to make it work. The best that I am able to get is the following: the .tex file is saved immediately after any modification (as expected), but the preview does _not_ change. Did anyone of you experience the same problem? Do you know how to solve it? I think I did all I was supposed to do (I followed in particular the original site and this other site. Maybe it's just a little detail that I'm missing...


title: LaTeX semantic checker

text: I used to write papers in math on LaTex. I wounder if there exists some program which makes semantic check. I want that there will check for example that it will warn on grammar mistakes, and will know to handle latex. Warn for example if I open ( but not close it. Check for math common mistakes like +\ldots+ ussually should be +\cdots+.


title: Elegant way to define a package with translations

text: A problem that sometimes arises with constructing packages, is enabling translations. Currently I maintain two packages `foo-nl.sty` (Dutch version) and `foo- en.sty` (English version). A problem with this approach is of course that one needs to synchronize the two packages, and there is no mechanism to check if this is the case. What other options are there to provide translations. It would be nice to automatically set the language as well, based on the `\usepackage[dutch]{babel}` command in the main document.


title: How could I get rid of the blank in this case?

text: I use the following code to generate two page with two figs per page.               % get on left side of a 2-page spread     \clearpage     \ifodd\value{page}\mbox{}\clearpage\fi          % two images on this page     \includegraphics{f1}          \vspace{...}     \includegraphics{f2}          \clearpage          % two more images on this page     \includegraphics{f3}          \vspace{...}     \includegraphics{f4}           % caption     \vspace{...}     \captionof{figure}{........}          \clearpage      But the paper would looks like: > Paragraph A...   >  A lot of blank....   >  two page of four figures   >  Paragraph B... How could I let Paragraph B follow Paragraph A and get rid of the blank area?


title: \citefield link to bibliography (hyperref & backref)

text: I would like to know if there is a way to get links and backref links on a \citefield command. For example, I want to cite only the title of a reference:               \citefield{ref}{title}       or any other field, and get the hyperlink to the reference and the corresponding backref link. EDIT: MWE               \documentclass{article}     \usepackage[backref=true]{biblatex}     \usepackage{hyperref}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,     author = {Author, A.},     year = {2001},     title = {Alpha},     }     @misc{B02,     author = {Buthor, B.},     year = {2002},     title = {Bravo},      }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          Some text \cite{A01,B02}.          \newpage          In this cite \citefield{A01}{title} I do not get any link          \clearpage          Some more text \cite{A01}.          \printbibliography          \end{document}


title: Doubts for customize classicthesis

text: I downloaded the `classicthesis` from its site and I was analysing the contents of the class, the manual, examples and all that. But I have few doubts yet about how to customize well the classic thesis class for my needs. First of all I need to use the options `spanish` and `mexico` for `babel`. I read about the `es-lcroman` option necessary for write in Spanish, but I'm not sure if it works fine with the option `mexico`or there is not a problem. Well, reading the `classic-thesisconfig.tex` document I found a lot of option, and a very interesting way to create a preamble. I use to divide my documents and use `\include` commands for add them, but the options of the preamble in another document looks nice. However, I don't know how to fix few problems, the first of all is that I don't use the `natbib`package for my references, instead I prefer to use biblatex. Now, I see in classicthesis we can use a command `\PassOptionsToPackage{arg1}{arg2}` and I understand that `arg1` are the options of the package, and `arg2` the name of the own package. But I'm not sure why it uses this instead the old `\usepackage` command. I also don't know if I need to use the `\PassOptionsToPackage` for load each package? I'm using the KOMA script class `scrbook`,using `letterpaper` size and I want to know if with classic thesis I can still use the options of the class such as the `\dictum` environment or `\lowertittleback` or `\dedication` because for me there are very useful. In fact I need to create a document in Spanish, with few margin notes in polythonic Greek, English, German, Dutch and French. And the packages I'm using are:               \usepackage[intlimits]{amsmath}     \usepackage{amsthm,amssymb,empheq,bm} % My doubt is how to add the other packages in addition of amsmath?     \usepackage{siunitx}      Instead of `acronym` I want to use the package `glossaries` for create the acronym list, a glossary and a list of symbols. For graphics in addition to the `graphicx` package I need also this:               \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{calc}     \usetikzlibrary{through}     \usetikzlibrary{backgrounds}     \usetikzlibrary{fit}     \usetikzlibrary{fadings}      Where and how put it? And for the revisions before finish the thesis I need to use               \usepackage[colorinlistoftodos,spanish,textsize=footnotesize]{todonotes}      I know about the problems with biblatex and Greek but I'll find a way to solve it, (surely with `xelatex`) meanwhile I want to know how to add these package for work using the classicthesis style. I have another final doubt, inside the `classicthesis-config.tex` document there is a part about autoreferences, I don't understand for what this can be useful but I see there is a redefinition of commands for English and German. So if I need to write in Spanish should I translate this commands into Spanish also or simply comment them? An attempt of MWE for illustrate better my question, starting from the `classicthesis.tex` file would be:               \documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,%1headlines,% letterpaper a4paper                 footinclude=true,cleardoublepage=empty,abstractoff, % <--- obsolete, remove (todo)                 BCOR=5mm,paper=letter,fontsize=10pt,%11pt,a4paper,%                 spanish,mexico,%                 ]{scrbook}     \input{classicthesis-config} % where are part of my troubles     \begin{document}     \frenchspacing     \raggedbottom     \selectlanguage{spanish} % <--- this isn't redundant?     %\renewcommand*{\bibname}{new name}     %\setbibpreamble{}     \frontmatter %All the following files previously customized     \include{FrontBackmatter/DirtyTitlepage}     \include{FrontBackmatter/Titlepage}     \include{FrontBackmatter/Titleback}     \cleardoublepage\include{FrontBackmatter/Dedication}     %\cleardoublepage\include{FrontBackmatter/Foreword}     \cleardoublepage\include{FrontBackmatter/Abstract}     \cleardoublepage\include{FrontBackmatter/Publication}     \cleardoublepage\include{FrontBackmatter/Acknowledgments}     \pagestyle{scrheadings}     \cleardoublepage\include{FrontBackmatter/Contents}          \mainmatter     \cleardoublepage     %\part{Some stuff}     \include{Chapters/Chapter01}     \cleardoublepage     %\part{The Showcase}     \include{Chapters/Chapter02}     \include{Chapters/Chapter03}          %etc.          \appendix     \cleardoublepage     \part{Appendix}     \include{Chapters/Chapter0A}          \backmatter          \cleardoublepage\include{FrontBackmatter/Bibliography}     \cleardoublepage\include{FrontBackmatter/Colophon}     \cleardoublepage\include{FrontBackmatter/Declaration}     \end{document}      I think that's all. Regards.


title: How to add cover pages to appendices?

text: For my thesis, I need to have appendices preceded by a cover page. From school manual: ![enter image description here](http://i.stack.imgur.com/WZbpN.png) As of now, I have               \documentclass[12pt,letterpaper,oneside]{book}     \usepackage[toc,page]{appendix}     ...     \begin{appendices}     \input{appendix.parallel.tex}     \input{appendixdistortioncheck.tex}     \input{appendix.code.tex}     \end{appendices}      Each file starts with a `\chapter{Blah}` line. The appendices themselves don't show up too well, ![enter image description here](http://i.stack.imgur.com/ttD5U.png) perhaps because I needed to reformat the chapter headings. The TOC shows up well. (I tried using `\part{...}` instead of `\chapter{...}`, and it does create a cover page for each appendix, ![enter image description here](http://i.stack.imgur.com/BesL9.png) but now the TOC is messed up.) ![enter image description here](http://i.stack.imgur.com/QSctV.png) What would you advise? Thank you!


title: exsheets and tikz matrix

text: What is the problem with this file?               \documentclass{article}     \usepackage{exsheets}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}          \begin{question}     \begin{tikzpicture}     \matrix (magic) [matrix of nodes]       {         8 & 1 & 6 \\         3 & 5 & 7 \\         4 & 9 & 2 \\       };     \end{tikzpicture}     \end{question}          \end{document}      The compiler says               ./mini.tex:16: Undefined control sequence.     <argument> \pgf@matrix@last@nextcell@options


title: Is it possible to include a .bib file inside another one?

text: When I started writing documents I decided to use a single `.bib` file in the main document directory. Each document would be created in a subdirectory and terminate with               \bibliography{../biblio}      \end{document}      I now realize that this might not have been the smartest choice, as my `.bib` file is growing considerably. In an attempt to avoid being forced to fix all my `.tex` files, I would like to know if it is possible to include other `.bib` files (e.g., one for articles, one for book, one for urls, etc.) from inside the "main" one. Or if you have other suggestions that would avoid me such tedious (but probably deserved) task.


title: Making use of entire page in TikZ

text: I am using the TikZ package to create stacked timelines. See example below. Whenever I make some small modification to the timelines, I have to spend lots of time adjusting all the coordinates. If anyone could help me simplify this, it'd be greatly appreciated. My more specific questions follow:   * How can a tikz image be made to conform to the dimensions of the page body?   * How can nodes placed along timelines maintain their relative spacing if the dimensions of the timeline change?   * How can informational nodes referred to in the timelines be spaced horizontally so that they don't overlap one another? (note: I would consider using chains or matrix to do this, but I'm not sure how to incorporate the other elements of the timelines with them.) code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{tikz}     \usetikzlibrary{snakes,positioning}     %% define help lines     \tikzset{help lines/.style={color=black!50,very thin}}     \tikzset{main labels/.style={     %Shape     rectangle,     % Size     minimum size=6mm,     rounded corners=2mm,     % Border     very thick,     draw=red!50!black!50,     %Filling     top color =white,     bottom color=red!50!black!20,     % Font     font=\sffamily,}}     \tikzset{side labels/.style={     %Shape     rectangle,     % Size     minimum size=6mm,     rounded corners=2mm,     % Border     very thick,     draw=black!50,     %Filling     top color =white,     bottom color=black!20,     % Font     font=\sffamily,     % Anchor     anchor=east,}}     \tikzset{date labels/.style={     % Font     font=\sffamily,     % Anchor     anchor=north east,     %Angle     rotate=45}}     \tikzset{event/.style={     %Shape     rectangle,     % Size     rounded corners=2mm,     % Border     thick,     draw=#1!50,     %Filling     fill = #1!20,     % Font     align=center,     font=\sffamily\scriptsize,     }}     \tikzset{outline/.default=black}     \begin{document}     \begin{tikzpicture} %     % draw help lines     \foreach \a in {1,2,6,7,11,12}     \draw [help lines](-1,\a) -- (10,\a);     % draw labels and titles     \node [main labels] at (5,13.5) {Community \#1};     \node [main labels] at (5,8.5) {Community \#2};     \node [main labels] at (5,3.5) {Community \#3};     \foreach \b in {2.5,7.5,12.5}     \node [side labels] at (-1,\b) {Response};     \foreach \c in {1.5,6.5,11.5}     \node [side labels] at (-1,\c) {Impact};     \foreach \d in {0.5,5.5,10.5}     \node [side labels] at (-1,\d) {Historical Event};     % draw dates     \draw [->] (0,9.9) -- (10,9.9);     \draw [->] (0,4.9) -- (.2, 4.9) {[snake] (.2, 4.9) -- (.8,4.9)} (.8,4.9) -- (1,4.9) -- (10,4.9);     \draw [->] (0,-0.9) -- (10,-0.9);     % draw date labels     \draw (0,4.85) node [date labels] {1690} -- (0,4.95) node (hua1690a) {};     \draw (1,4.85) node [date labels] {1970} -- (1,4.95) node (hua1970a) {};     \draw (3.076923,4.85) node [date labels] {1979} -- (3.076923,4.95) node (hua1979a) {};     % draw events     \begin{scope}[on grid]     \node (huafound) [event=blue] at (0,5.5) {\small Founded};     \draw [blue!50] (huafound) -- (hua1690a);     \node (huaroad) [event=blue] [right= 1.35 of huafound] {\small Road};     \draw [blue!50] (huaroad) -- (hua1970a);     \node (huaconasupo) [event=blue] at (3.076923,5.5) {\small CONASUPO};     \draw [blue!50] (huaconasupo) -- (hua1979a);     \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/rISys.png)


title: Best way to part answers from solutions?

text: Now, if anyone could change the title into something better that would be great =) I am writing a rather long document, which contains plenty of integrals. I have a big list of integrals sorted in a three column style, as pictured below ![enter image description here](http://i.stack.imgur.com/GRtNB.png) The image is a tad old. Now, I want to link both the soutions and the answers to each question using hyperref. (Where the answer means just the antiderivate, and the solution means all the small steps to compute the integral) My problem is that I do not know what the best way to do this is. Right now, I have turned every integral into a hyperlink, as the MWE shows.               \documentclass[10pt,a4paper]{article}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{enumitem}     \usepackage{multicol}     \usepackage{mathtools}     \usepackage[english]{babel}     \usepackage{changepage}          \newcommand{\dx}{\mathop{}\! \text{d} x}     \newcommand{\R}{ \mathbb{R} }     \newcommand{\CC}{\mathcal{C}}          \newenvironment{IntList}[1]{%     \centering     \setlength{\columnsep}{50pt}     \begin{adjustwidth}{-3em}{-2em}\begin{multicols}{#1}\begin{enumerate}[itemsep=5pt]}{\end{enumerate}\end{multicols}\end{adjustwidth}}          \usepackage[hidelinks]{hyperref}     \hypersetup{         colorlinks=true,        %  false: boxed links; true: colored links         linkcolor=black,        %  color of internal links         citecolor=cyan,         %  color of links to bibliography         filecolor=magenta,      %  color of file links         urlcolor=cyan           %  color of external links     }     \newcommand{\IntExerc}[2]{\item \hyperref[#1]{\mbox{ \( \displaystyle #2 \) }}}          \begin{document}          \subsection{Huge ass list of problems}          \begin{IntList}{3}     \IntExerc{R1.1}{\int \frac{x^2+3x}{x^2} \dx }     \IntExerc{R1.22}{\int\sin(x)\,\mathrm{d}x}     \IntExerc{R1.2}{\int_0^1 \frac{x}{x^2+1} \dx}     \IntExerc{R1.3}{\int \frac{x}{x+1} \dx}     \IntExerc{R1.4}{\int_{-3}^{3} \frac{1}{1-x} \dx}     \IntExerc{R1.5}{\int \sqrt{4-x} \dx}     \IntExerc{R1.6}{\int_{0}^{1/2} \left( 2x - 1\right)^{50} \dx}     \IntExerc{R1.7}{\int \sqrt[n]{x} \dx}     \IntExerc{R1.8}{\int \frac{1}{x \ln x} \dx}     \IntExerc{R1.7}{\int \sin x \cos x \dx}     \IntExerc{R1.8}{\int_{1}^{\sqrt{e-1}} \ln\left( 1 + x^2 \right)x\dx}     \IntExerc{R1.9}{\int \frac{x}{e^x} \dx}     \IntExerc{R1.10}{\int \sin x \cos x \dx}     \IntExerc{R1.11}{\int_1^{e^n} \ln x \dx \ n \in \R}     \IntExerc{R1.12}{\int x \cdot a^x \dx}     \IntExerc{R1.13}{\int \log_{10} (x) \dx}     \IntExerc{R1.14}{\int_{\pi/6}^{\pi/3} \sin(x)^2 \dx}     \IntExerc{R1.15}{\int_1^e \int \frac{\pi}{-x^2} \dx \dx}     \IntExerc{R1.16}{\int_{0}^{\ln 2} x\ln(x+1) \dx}     \IntExerc{R1.17}{\int \frac{x e^x}{(x+1)^2} \dx}     \IntExerc{R1.18}{\int \frac{1}{1+\sqrt{x}}\dx}     \IntExerc{R1.19}{\int \frac{\ln x}{\sqrt{x}} \dx}     \IntExerc{R1.20}{\int_{\pi}^{\pi} \frac{\sin(1/x)e^{x^2}}{\sqrt{x!}} \dx}     \IntExerc{R1.21}{\int \frac{x-1}{\sqrt{x^2 + 2x + 7}} \dx}     \IntExerc{R1.22}{\int \frac{1 + e^x}{\sqrt{e^x + x}} \dx}     \IntExerc{R1.23}{\int \frac{e^x + 1}{e^x - 1} \dx}     \IntExerc{R1.24}{\int_{a}^{a+2\pi} \sin x+1 \dx}     \IntExerc{R1.25}{\int \frac{x^2 + 2x + 2}{x-1} \dx}     \IntExerc{R1.26}{\int_{0}^1 e^{-y^2}  \dx}     \IntExerc{R1.30}{\int_{-3/4}^{4} \frac{x+1}{(x+2)^4}\dx}     \IntExerc{R1.27}{\int x^3\sqrt{1-x^2} \dx}     \IntExerc{R1.40}{\int \ln\left(\frac{1}{\sqrt{x}}\right) \dx}     \IntExerc{R1.28}{\int \sin(2x)e^{\sin(x)^2} \dx}     \IntExerc{R1.29}{\int x \ln \left( \frac{1}{x}\right) \dx}     \IntExerc{R1.30}{\int 2^x e^x \dx}     \IntExerc{R1.30}{\int \binom{x+1}{x} \dx}     \IntExerc{R1.31}{\int \frac{1}{\sqrt{x}\left( 1 + \sqrt{x}\right)} \dx}     \IntExerc{R1.32}{\int_{1}^{\log_e(a)^2} e^{\sqrt{x}}\dx}     \IntExerc{R1.33}{\int \frac{x^2}{x^2 - 1} \dx}     \IntExerc{R1.34}{\int \frac{x}{1 - x^2 + \sqrt{1 - x^2}} \dx}     \IntExerc{R1.34}{\int_{1}^{\sqrt{e-1}} \ln\left( 1 + x^2 \right)x\dx}     \IntExerc{R1.36}{\int \frac{x^2}{x^2 + 4x + 8}\dx}     \IntExerc{R1.37}{\int \frac{1}{x \ln(x)^n} \dx}     \IntExerc{R1.38}{\int_{0}^{\infty} x^3 e^{-x}  \dx}     \IntExerc{R1.39}{\int e^{x + e^x} \dx}     \IntExerc{R1.40}{\int \ln(x)^3 \dx}     \IntExerc{R1.41}{\int \frac{x e^x}{\left( x + 1\right)^2}\dx}     \IntExerc{R1.42}{\int_n^m (m-x)(x-n)\dx}     \IntExerc{R1.41}{\int \frac{\pi}{\sqrt{e^2-16}}\dx}     \IntExerc{R1.40}{\int \frac{\sin(2x)}{\sin x} \dx}     \IntExerc{R1.40}{\int_0^{\pi/3n} \tan(nx) \dx}     \IntExerc{R1.40}{\int \frac{4a}{x^2-a^2} \dx}     \IntExerc{R1.40}{\int e^{\sin(x)^2}e^{\cos(x)^2}  \dx}     \IntExerc{R1.40}{\int \frac{e^{\ln\left(x^2 + 1 \right)}}{x+1} \dx}     \IntExerc{R1.40}{\int_{\pi/6}^{\pi/2} \frac{1}{\tan x} \dx}     \IntExerc{R1.40}{\int \frac{x^2+1}{x(x^2+3)} \dx}     \IntExerc{R1.40}{\int \frac{1}{\sqrt[3]{x} + x} \dx}     \IntExerc{R1.40}{\int \frac{1}{x \ln x - x} \dx}     \IntExerc{R1.40}{\int_{0}^{\pi} \frac{x^2 \sin(x)}{\pi - 2} \dx}     \IntExerc{R1.40}{\int \sqrt{\sqrt{x} + \sqrt{x}\,} \dx}     \IntExerc{R1.40}{\int 2^{\ln x} \dx}     \IntExerc{R1.40}{\int_{2}^{5} \frac{2 - 4}{x^4 - x^2} \dx}     \IntExerc{R1.40}{\int \cos( \sin(x) ) \cos x \dx}     \IntExerc{R1.40}{\int \left(x + x^2\right)e^{3(x+\ln 3)} \dx}     \IntExerc{R1.40}{\int \cos(x)\sin(2x) \dx}     \IntExerc{R1.40}{\int \frac{1}{2x \sqrt{\ln x}} \dx}     \IntExerc{R1.40}{\int \frac{\log_5(x)}{\log_{25}(x)} \dx}     \end{IntList}          \subsubsection{Word problems}          $$ \int_{1/2}^{\sqrt{3}/2} \frac{x^3}{\left( \frac{5}{8} - x^4\right)\sqrt{\frac{5}{8} - x^4}}\quad $$          \newpage          \newpage          \begin{align}     \int \frac{x^2+3x}{x^2} \dx & = \int \frac{x^2}{x^2} + \frac{3x}{x^2} \dx = \int 1 \dx + 3\int \frac{dx}{x} = x + 3 \ln|x| + \CC  \label{R1.1}\\     \int\sin(x)\,\mathrm{d}x & = -\cos(x) + C \label{R1.22} \\     \int\sin(x)\,\mathrm{d}x & = -\cos(x) + C \label{R1.40}     \end{align}          First straight integration problems, then word problems          \end{document}      **Question(s):** What is the best way to separate the plain answer, from the solution? (Are any of the ideas below good?)   * Can one perhaps add a spoiler tag (Opens on click)?   * Make the numbers into separate links?   * Add seperate links next to each integral? (I think this would make it very cluttered) Oh, and is there any way to make the hyperref go both ways? That I could click on the answer, and get back to the questions? Cheers, thanks in advance for any suggestions, answers or comments =)


title: Using glossaries in Texlipse

text: Is there a way of adding a glossary using the glossaries package in Texlipse?               %%% GLOSSARIES     \usepackage[xindy]{glossaries}     \makeglossaries          \begin{document}          \newglossaryentry{A}{name=area,description={Area}}     \glsaddall     \printglossaries          \section{Section Header}     Text Text Text          \end{document}      (I have installed Perl as I am on a windows system (as per the documentation) but that doesn't seem to have changed anything...unless I missed some key part!)


title: How to change the layout of the grading table in the exam document class

text: I'm using LuaLaTeX with the exam document class and I would like (if it's possible) to change the default layout of the grading table to be more like the tables from the booktabs package. How can I do that? I read the manual and even if the table command has many options I didn't find a way to do that. I also read a similar question about the exsheet package but the answer provided doesn't compile. Here is a minimal working example with the tables I'd like to change at the end of it.               % !Mode:: "TeX:UTF-8"     \documentclass[a4paper,addpoints,11pt]{exam}           \usepackage{fontspec}                         \usepackage{polyglossia}                                    \begin{document}          \begin{questions}     \question[10]     Example question     \question[20]     Example question     \question[30]     Example question     \question[40]     Example question     \question[50]     Example question     \end{questions}          \begin{center}     \pointtable[v][questions]     \end{center}          \begin{center}     \pointtable[h][questions]     \end{center}          \end{document}      And here is the result ![enter image description here](http://i.stack.imgur.com/FQiwf.jpg)


title: How to make appendix appear in part level of table of contents?

text: In a `book` documentclass I would like to have an appendix which appears in the table of contents at the part level. The TOC should look like this:               Preface     Part title       Chapter title       Chapter title     Part title       Chapter title       Chapter title     Appendix: Some title     Bibliography     Index      I know how to include the bibliography and the index with `\addcontentsline{toc}{part}{...}` and I even know about `\phantomsection` trick to get it to point to the right place in the PDF. But how do I convince the appendix to go to the `part` level of TOC? It goes under `chapter` of the last part. I do not care if I make an appendix "by hand", i.e., without using \appendix. By the way, I am using `\titlesec` to customize chapter and part formatting.


title: TikZ: Key to the \draw command to modify the inside nodes

text: Suppose I have the following code:               \documentclass{article}          \usepackage{tikz,amsmath}          \begin{document}          \begin{tikzpicture}[scale=6]     \tikzstyle{xthick} = [thick, |-|]     \tikzstyle{xthin} = []     %     \draw[xthick](.93,-.6)node[left]{\bfseries 00\,00\,00\,00\,00}--(1,-.6);     \draw[xthin](1.013,-.625)--(1.082,-.625)node[right]{00\,00\,00\,00\,10};     \draw[xthin](.972,-.65)node[left]{00\,00\,00\,11\,00}--(1.041,-.65);     \draw[xthin](1.054,-.675)--(1.124,-.675)node[right]{00\,00\,00\,11\,10};     \draw[xthick](.901,-.7)node[left]{\bfseries 00\,11\,00\,01\,01}--(.971,-.7);     \draw[xthin](.983,-.725)--(1.053,-.725)node[right]{00\,11\,00\,01\,11};     %     \draw[xthin](.963,-.8)node[left]{00\,00\,00\,00\,00\,00}--(1,-.8);     \draw[xthin](.974,-.825)--(1.012,-.825)node[right]{00\,00\,00\,00\,00\,11};     \draw[xthick](.901,-.85)node[left]{\bfseries 00\,11\,00\,01\,01\,01}--(.938,-.85);     \draw[xthin](.977,-.875)--(1.015,-.875)node[right]{00\,11\,00\,01\,01\,10};     \end{tikzpicture}          \end{document}      I would like to a code with the very same output, just without the need for `\bfseries`. Is is possible to make the `xthick` key of `\draw` modify the nested `node`s?


title: Decrease padding in \boxed

text: I am using `\boxed` to draw a small box around a symbol in math mode. I would, however, like to decrease the padding between the symbol and the box. While I found solutions involving other commands/packages, I'd prefer to stuck to stick to `\boxed`. Also, adding `\smash` does not work. MWE:               \documentclass{article}     \begin{document}          \[ \boxed{\leq} \quad \boxed{\smash{\leq}} \]          \end{document}      ![enter image description here](http://i.stack.imgur.com/CzcSm.png)


title: Installing a LaTeX template that has only .tex files

text: I downloaded the Legrand Orange Book template from http://www.latextemplates.com/template/the-legrand-orange-book , but I can't figure out how to actually install/use it. When I downloaded `memoir`, it had an installer that automatically put the files where they need to go, so all I needed to do was `\documentclass{memoir}` For the Legrand template, I've created a personal directory structure `texmf`, but putting in the two `.tex` files from the Legrand template doesn't seem to do anything. How do I use the template? I use Scrivener to write my document (it has MMD3), so `memoir` works very well. I just want to use the Legrand Orange Book. I'm running `TeXShop` installed as part of `MacTex` distribution. Thanks.


title: LaTeX places a float in the middle of my script. How do I prevent this?

text: I have a multi-page script in my thesis, and I have used the `listings` package to format the source code. This works really well, however LaTeX wants to put a float in the middle of this code, which looks bad. I can use `\clearpage`, and `[H]` to force the offending figure elsewhere, but I think that a more robust solution would be to tell LaTeX not to place floats in the source code. Can I do something like this?               \NoFloatsHere{        \begin{lstlisting}            Source Code...        \end{lstlisting}     }      I can't find an option in the listings package to stop the code from being broken by floats. This question is similar, and the proposed solution "works", but there is nothing stopping LaTeX from placing figures elsewhere in my sourcecode. Is there a better way? How to prevent figures from floating 'into' listings


title: New environment creates table at the top of document

text: I have the following code:               \begin{table}[ht]        \centering        \rowcolors{2}{smileOrange!25}{white}        \begin{tabular}{|c|c|c|}            \theader{Importance & Titre du document & Auteur}                 \trow{1 & some-com-config-files.tar.gz & Florian Margaine}            \trow{2 & some-com-solr-folder.tar.gz & Florian Margaine}        \end{tabular}     \end{table}      Working fine. The table is correctly generated. (`\theader` and `\trow` are custom commands, `smileOrange` is a custom color.) Wanting to get rid of the `\begin{table}` boilerplate, I created this new environment:               \newenvironment{smileTable}     {        \begin{table}        \centering        \rowcolors{2}{smileOrange!25}{white}     }     {        \end{table}     }      So I use this environment like this:               \begin{smileTable}        \begin{tabular}{|c|c|c|}            \theader{Importance & Titre du document & Auteur}                 \trow{1 & some-com-config-files.tar.gz & Florian Margaine}            \trow{2 & some-com-solr-folder.tar.gz & Florian Margaine}        \end{tabular}     \end{smileTable}      (I keep the `\begin{tabular}` so that I can declare the number of columns. If you know of any better way, please say so. But this is not the point of this question.) The issue is that the table generated with the new environment ends up at the top of the document, right after the table of contents. Why is that so?


title: "Listings" environment for GAP

text: I was searching the web for a possible environment where I can put my GAP (Groups, Algorithms, Programming) codes. The most promising I saw was the "listings" package. But to my disappointment, this doesn't naturally recognize GAP codes. Any other suggestions on this? Thanks! P.S. This is my first time to write my codes in LaTeX.


title: How can I draw an arc from point A -> B on a 3D sphere in TikZ?

text: I'm basing myself on http://www.texample.net/tikz/examples/spherical-and- cartesian-grids/ and now I need to add a arc from point P to Q. What I was able to get so far: ![Result so far](http://i.imgur.com/wEy1G.png)               \begin{tikzpicture}[scale=1,every node/.style={minimum size=1cm}]     %% some definitions          \def\R{4} % sphere radius          \def\angEl{25} % elevation angle     \def\angAz{-100} % azimuth angle     \def\angPhiOne{-110} % longitude of point P     \def\angPhiTwo{-45} % longitude of point Q     \def\angBeta{30} % latitude of point P and Q          %% working planes          \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole     \LongitudePlane[xzplane]{\angEl}{\angAz}     \LongitudePlane[pzplane]{\angEl}{\angPhiOne}     \LongitudePlane[qzplane]{\angEl}{\angPhiTwo}         \LongitudePlane[nzplane]{\angEl}{-86}     \LatitudePlane[equator]{\angEl}{0}     \fill[ball color=white!10] (0,0) circle (\R); % 3D lighting effect     \coordinate (O) at (0,0);     \coordinate[mark coordinate] (N) at (0,\H);     \coordinate[mark coordinate] (S) at (0,-\H);          \DrawLongitudeCircle[\R]{\angPhiOne} % pzplane     \DrawLongitudeCircle[\R]{\angPhiTwo} % qzplane     \DrawLatitudeCircle[\R]{\angBeta}     \DrawLatitudeCircle[\R]{0} % equator     %labelling north and south     \node[above=8pt] at (N) {$\mathbf{N}$};     \node[below=8pt] at (S) {$\mathbf{S}$};         \draw[-,dashed, thick] (N) -- (S);          %setup coordinates P and Q     \path[pzplane] (0:\R) coordinate (P);     \draw[->] (O) -- node[above=4pt] {$\overrightarrow{P}$} (P);     \path[qzplane] (\angBeta:\R) coordinate (Q);     \draw[->] (O) -- node[above=2pt] {$\overrightarrow{Q}$} (Q);     \path[nzplane] (153:\R) coordinate (N);     \draw[->,color=red] (O) -- node[right=2pt] {$\overrightarrow{N}$} (N);     \draw (P) arc (-110:-45:\R) (Q);         \end{tikzpicture}      Is there a possibility to make an arc from P to Q with the center O? **Upon request,** the full compilable sourcecode: http://pastebin.com/m809Jwp7


title: hyperref takes me to page 1 in beamer instead of referenced frame

text: The following document compiles fine and the link is shown as I would like it to be shown. But when I click on "here" in the resulting pdf I am taken to page 1 instead of the page where the reference is. I would like to be taken to the referenced page.               \documentclass[english]{beamer}     \usepackage{babel}     \begin{document}          \begin{frame}     \frametitle{the referencing slide}     As you can see \hyperref[refthis]{here}     \end{frame}               \begin{frame}     \frametitle{random stuff}     in between slide     \end{frame}          \begin{frame}     \frametitle{Reference this}          I want to reference this frame. \label{refthis}          \end{frame}     \end{document}


title: Equations and Double Spacing

text: If a document (in any class) is double spaced, how do you redefine the spacing around centered equations as if there was single spacing? Whenever I use double spacing, I feel like the space before and after a centered equations is too large.


title: TikZ: Large arrow tips at the end of smooth curves

text: I have problems with adding a large arrow tip to smooth curves. It works perfect with straight lines, but as soon as I use the `edge` command, the arrow tips are added to the beginning of the curve instead of the end of the curve! A minimal example is shown here:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows, decorations.markings}     \tikzstyle{every picture}+=[remember picture] % remember every node     \begin{document}     A: $A = \tikz[baseline=-.65ex]{\node[](){$a$};} + \tikz[baseline=-.65ex]{\node[](){$b$};}$ \\     B: $B = \tikz[baseline=-.65ex]{\node[](end1){$c$};} + \tikz[baseline=-.65ex]{\node[](end2){$d$};}$ \\     A explanation \tikz[baseline=-.5ex,overlay]{\node [coordinate] (start1) {}; \draw[very thick,>=latex,shorten >=2pt,decoration={markings,mark=at position 1 with {\arrow[scale=2.5]{>}};},postaction={decorate}] (start1) edge [out=0, in=-90] (end1);} \\ % this is where the first arrow tip fails     B explanation \tikz[baseline=-.5ex,overlay]{\node [coordinate] (start2) {}; \draw[thick,>=latex,shorten >=2pt,decoration={markings,mark=at position 1 with {\arrow[scale=2.5]{>}};},postaction={decorate}] (start2) edge [out=0, in=-90] (end2);} % this is where the second arrow tip fails     \end{document}       How can I add the arrow tip to the end of the curved path?


title: Mountain Lion TexLive 2013 font installation problem

text: I'm stuck here for hours trying to install fonts for TeXLive 2013. I did the same stuff as always:   1. unzip to `/usr/local/texlive/texmf-local`   2. run `sudo mktexlsr`   3. then `sudo updmap-sys --enable Map 5ch.map` After running the last line I'm getting message: > >     updmap: resetting $HOME value (was /Users/sFun) to root's actual home > (/var/root). >     updmap is using the following updmap.cfg files (in precedence order): >       /usr/local/texlive/2013/texmf-config/web2c/updmap.cfg >       /usr/local/texlive/2013/texmf-dist/web2c/updmap.cfg >     updmap is using the following updmap.cfg file for writing changes: >       /usr/local/texlive/2013/texmf-config/web2c/updmap.cfg >     dvips output dir: "/usr/local/texlive/2013/texmf- > var/fonts/map/dvips/updmap" >     pdftex output dir: "/usr/local/texlive/2013/texmf- > var/fonts/map/pdftex/updmap" >     dvipdfmx output dir: "/usr/local/texlive/2013/texmf- > var/fonts/map/dvipdfmx/updmap" >     pxdvi output dir: "/usr/local/texlive/2013/texmf- > var/fonts/map/pxdvi/updmap" >   >     ERROR:  The following map file(s) couldn't be found: >       5ch.map (in /usr/local/texlive/2013/texmf-config/web2c/updmap.cfg) >   >       Did you run mktexlsr? >   >       You can disable non-existent map entries using the option >         --syncwithtrees. >   I also tried the same stuff for the texmf in the user library - same error message:(


title: Overfull \hbox warning for TOC entries when using memoir documentclass

text: I get `Overfull` warning for TOC entries when using `memoir` documentclass. They seem to occur when the page number for chapter title entries (highlighted in bold text) exceeds 2-digits or section page number exceeds 3-digits. I do not get the warning for chapter headings if I switch to `book` documentclass. But it still happens for sections heading. How can I fix this?               \documentclass[oneside, draft]{memoir}          \usepackage[showframe]{geometry}     \usepackage{lipsum}          \newcommand{\repeattext}[1]{#1 #1 #1 #1 #1 #1}          \begin{document}          \tableofcontents          \chapter{Chapter 1}         \lipsum         \section{Section 1.1}   \repeattext{\repeattext{\lipsum[1-150]}}          \chapter{Chapter 2}         \lipsum[2]         \section{Section 2.1}   \repeattext{\repeattext{\lipsum[1-150]}}          \chapter{Chapter 3}         \lipsum[2]         \section{Section 3.1}   \lipsum[2]          \end{document}


title: Are there any disadvantages of TeX being Turing complete?

text: I have read that TeX is Turing complete. I was wondering if making TeX Turing complete gave raise to unwanted effects.


title: boxes spanning several pages

text: I defined some time ago a box environment with the following features:   * It has a frame-color and a background color   * It stores the marginnotes, if any, and restore them at the end of the box. I use for this the commands `\mpgmpar@savemarginpars` and `\mpgmpar@restoremarginpars` from the package `minipage-marginpar` It worked "perfectly", but now i need to put a very long text in these boxes, and there is not page break. My actual code, which is clearly far from optimal, is :               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{blindtext}     \usepackage{xcolor}     \usepackage{minipage-marginpar}     \usepackage{fancybox}          \newcommand{\strokecolor}{}     \newcommand{\fillcolor}{}     \newlength{\currentparskip}               \makeatletter     \newenvironment{mabox}[3]{%     \renewcommand{\strokecolor}{#2}     \renewcommand{\fillcolor}{#3}     \begin{Sbox}%     \setlength{\currentparskip}{\parskip}% save the value of paragraph skip     \begin{minipage}{#1}%     \setlength{\parskip}{\currentparskip}% restore the value     \mpgmpar@savemarginpars     }%     {\end{minipage}\end{Sbox}\fcolorbox{\strokecolor}{\fillcolor}{\TheSbox} mpgmpar@restoremarginpars}     \makeatother          \begin{document}          \begin{mabox}{10cm}{blue}{gray}     0000          \blindtext \blindtext          11111          \blindtext \blindtext          2222          \blindtext \blindtext          3333          \blindtext \blindtext     \end{mabox}     \end{document}      So, how could I modify the definition of `mabox`, so that I keep the present features, and that the box would span several pages if the content is very long ?


title: Saving Chemfig submolecules in a separate file, to be recovered into beamer

text: Please consider the following code               \documentclass[t]{beamer}      \usepackage{chemfig}     \begin{document}          \begin{frame}       \frametitle{1st frame}     \definesubmol{x}{-[:+30,.6]-[:-30,.6]}     \definesubmol{y}{-O-(=[2,.6]O)-!x!x!x!x!x!x!x!x}     \chemfig{[2,0.5]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}          \end{frame}          \begin{frame}       \frametitle{2nd frame}     \chemfig{[2,0.5]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}     \end{frame}          \end{document}      What I would like to achieve is to build submolecules first and then assemble them in successive frames. If I write the submolecules that I need within each frame, soon the whole code become complicate and cluttered. The only solution I was able to find was to save the submolecules in an external .tex file, to be invoked each time from within frames when needed. Something like the following               \documentclass[t]{beamer}          \usepackage{chemfig}         \begin{document}              \begin{frame}           \frametitle{1st frame}         \input{submoleculesChemfig.tex}         \chemfig{[2,0.5]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}         \end{frame}              \begin{frame}           \frametitle{2nd frame}          \input{submoleculesChemfig.tex}              \chemfig{[2,0.5]([0]!y)-[,1.5]([0]!y)-[,1.5]([0]!y)}         \end{frame}              \end{document}      Is there a better solution, without using the external file ? Thanks


title: Intervening pages that do not add to page-count?

text: Is there a way to add pages to the middle of a document in such a way that they are not only unnumbered but also do not add to the overall sequence of numbered pages? Like this:               page 1     page 2     page 3     extra-numerary page     page 4     extra-numerary page     extra-numerary page     page 5      I do not know the actual page count at any moment; this is calculated by LaTeX.