title: What is the simplest way to align a line with a circle?

text: Is there a simple way with TikZ to align a line to a circle without manually specifying an arc to join two separate lines like in the example below?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \filldraw[black] (0.5,0.5) circle (0.5);         \draw[-,thick,red] (-1,1) -- (0.5,1);         \draw[-,thick,red] (1,-1) -- (1,0.5);         \draw[-,thick,red] (1,0.5) arc (0:90:0.5);     \end{tikzpicture}     \end{document}      > ![Example image](http://i.imgur.com/9rAkXG7.png) If possible the solution should be a single command producing the following behaviour:   1. Draw a circle C (specified by its center and radius)   2. Draw a line with three parts:      1. First part is the line segment from any point P to a point Q on the perimeter of C.     2. Second part is the arc of 90 degrees angle along the perimeter of C.     3. Third part is the line segment away from the arc. In **pseudo code** :               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \filldraw[black] (0.5,0.5) coordinate (C) circle (0.5);         \draw[-,thick,red] (-1,1) -- (0.5,1) arc (C,90) -- (1,0.5);         % The line above would draw a line to (0.5,1),          % an arc of 90 degrees around (C) and continue          % from there towards (1,0.5)     \end{tikzpicture}     \end{document}      The pseudo code above should result in the same image as above. # Optional features Even more convenient would be to allow arbitrary angles and to continue the line after the arc with the direction of the tangent at the exit point: In **pseudo code** :               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \filldraw[black] (0.5,0.5) coordinate (C) circle (0.5);         \draw[-,thick,red] (-1,1) -- (0.5,1) arc (C,45) -- (1cm);         % The line above would draw a line to (0.5,1),          % an arc of 45 degrees around (C) and continue a          % line of 1cm length from there     \end{tikzpicture}     \end{document}


title: latex beamer toc - don't display bubbles

text: I'm currently creating my first presentation using LaTeX's `beamer` package. Is there any way to change the enumeration symbol on the table of contents page? Currently it looks like this, which is a little bit too "splashy?!" for me: ![LaTeX beamer table of contents](http://i.stack.imgur.com/Li5Pi.png)


title: Is LuaLaTeX our future?

text: I've read somewhere that LuaTeX is choosen to be mainstream for LaTeX development? Is it really true? E-TEX: Guidelines for Future TEX Extensions -- revisited says nothing about that. I mean where is it stated that _Luatex was adopted by the pdfTeX team as a successor to pdftex and the development of pdftex is closed_ as –@Alain Matthes writes in his comment?


title: How can I remove an undesired indentation?

text: I've got the following frame:               \begin{frame}     \frametitle{TP-Basis}     Ausgangspunkt:      \begin{align*}     s(x) = \begin{cases} a+bx & x \leq k \\ c+dx & x > k \end{cases}     \end{align*}     \only<2>{     \begin{figure}     \includegraphics[width=.70\textwidth]{PiecewiseLinear_2}     \end{figure}}     \only<3->{Um eine stetige Funktion zu erhalten, wird eine zusätzliche Bedingung benötigt:      \begin{align*}     & &  a + bk &= c + dk\\     \Leftrightarrow & & c &= a+bk-dk \\     \Leftrightarrow & & c &= a+bk-dk +  \underbrace{bx-bx}_\text{=0}     \end{align*}     }     \end{frame}      Everything's fine, however the word "Um" gets indented. I'd like that sentence to be aligned with "Ausgangspunkt". How would I go about doing that? I've tried `\noindent`without success.


title: How can I get utf8 character

text: I want to make cross references for sections to be symbols but after using the description given I got error report saying keyboard character used is undefined in inputencoding 'utf8'. What might be the way out?


title: Using utopia and another roman font in (pdf)LaTeX

text: I need to create a document with Utopia (Fourier package) as the default font. However, at a certain point I need to change the default roman font to say for e.g. CM-Roman. At this point reverting back to utopia makes the text seem thicker and broader. The MWE below illustrates my problem.               \documentclass[12pt, a4paper, draft]{article}     \usepackage{fourier}     \newcommand{\ffont}[2]{          \fontencoding{#1}          \fontfamily{#2}          \selectfont     }          \begin{document}          Fourier-Utopia\\     The quick brown fox jumps over the lazy dog.\\          \ffont{OT1}{cmr}     Compuer Modern Roman\\     The quick brown fox jumps over the lazy dog.\\          \ffont{T1}{put}     Fourier-Utopia Again\\     The quick brown fox jumps over the lazy dog.\\          \end{document}      This seems to happen only with the Utopia Font. Can anyone let me know the correct way to achieve this please. Thanks


title: Figure in the Chapter

text: How can I put an image together with the chapter style in scrbook class (chaptername, chapternumber capitalized - left aligned -, and a figure above them, centered, like the scheme below)?                                                  figure                                                   chaptername chapertnumber


title: Cell coloring (highlighting) with in-out effects in a table in beamer

text: I need cell coloring (or highlight effect) in a cell of a table in `beamer` after a click (I mean, I am planning to talk about something in that frame and I will emphasize just a number in a cell at the end of my talk), and I tried many commands such as `\onslide<>`, `\only<>`, `\visible<>`, and new commands use `\colorbox` but any of them worked. Lastly, I came across some `\rowcolor<>{colorname}` codes and I tried to arrange those codes (without know newcommand structure completely) for cell coloring with in-out effects but there is something wrong so I got an error like that Misplaced `\noalign`. What is the problem with it?               \documentclass[xcolor=table]{beamer}          \rowcolors{1}{gray!30}{gray!10}          \makeatletter     \def\rowcolor{\noalign{\ifnum0=`}\fi\bmr@rowcolor}     \newcommand<>{\bmr@rowcolor}{%         \alt#1%             {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}%              {\ifnum0=`{\fi}\@gooble@rowcolor}%      }          \newcommand{\@gooble@rowcolor}[2][]{\@gooble@rowcolor@}     \newcommand{\@gooble@rowcolor@}[1][]{\@gooble@rowcolor@@}     \newcommand{\@gooble@rowcolor@@}[1][]{\ignorespaces}     \makeatother          \makeatletter     \def\cellcolor{\noalign{\ifnum0=`}\fi\bmr@cellcolor}     \newcommand<>{\bmr@cellcolor}{%         \alt#1%             {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}%              {\ifnum0=`{\fi}\@gooble@cellcolor}%      }          \newcommand{\@gooble@cellcolor}[2][]{\@gooble@cellcolor@}     \newcommand{\@gooble@cellcolor@}[1][]{\@gooble@cellcolor@@}     \newcommand{\@gooble@cellcolor@@}[1][]{\ignorespaces}     \makeatother          \begin{document}     \begin{frame}{The MWE}%          \only<2>{\rowcolors{1}{blue!30}{blue!10}}     \only<1,3>{\rowcolors{1}{gray!30}{gray!10}}          \begin{center}     \begin{tabular}{cc}         A & B \\         A & B \\         A & B \\         \rowcolor<4>{green} C & D \\         \rowcolor<4,5>{yellow} E & F \\         \rowcolor<4-6>{green} G & H \\         \rowcolor<6>{red} Y & S \\         A & B \\          \end{tabular}     \end{center}          \par         \visible<1>{Testing default row colouring ... \\}     \visible<2,3>{Testing change of default colors ...\\}     \visible<4-6>{Testing in-out of custom colors ...\\ (caution: The order of defaults colors can change)\\}          \vfill     \scriptsize{      Based of answer of Martin Scharrer      \url{http://tex.stackexchange.com/questions/18427/why-cant-i-wrap-rowcolor-in-only-beamer}}          \end{frame}           \begin{frame}{Cell Coloring with In-out Effects}        \begin{center}        \begin{tabular}{cc}         A & B \\         C & \cellcolor<3>{green} C \\         D & E \\         F & G \\              \end{tabular}         \end{center}         \end{frame}          \end{document}


title: Split citation into author and year

text: I have this in my `.tex`:               This study was done by \cite{mogul1997potential} in X and lately proposed to be      a present feature in HTTP servers \cite{mogul2002delta}.      It generates: > This study was done by [Mogul et al. 1997] in X and lately proposed to be a > present feature in HTTP servers [Mogul et al. 2002]. I want to split the citation into two parts, the author and the year as you can see. How do I do that? Example: > This study was done by Mogul et al. in 1997 and lately proposed to be a > present feature in HTTP servers [Mogul et al. 2002]. I am using this template. Example:               \documentclass[12pt]{article}     \usepackage{sbc-template}     \usepackage{graphicx,url}     \usepackage[latin1]{inputenc}       \sloppy          \usepackage{amsmath}          \title{bb a a}     \author{Frederico Schardong\inst{1}}     \address{aa aa aa \email{aa@aa.aa}}          \begin{document}           \maketitle          \begin{abstract}     Hi     \end{abstract}          \section{Introduction}     This study was done by \cite{mogul1997potential} in X and lately proposed to be      a present feature in HTTP servers \cite{mogul2002delta}.          \newpage     \bibliographystyle{sbc}     \bibliography{sbc-template}          \end{document}      and this would be my references file:               @article{mogul2002delta,       title={Delta encoding in HTTP},       author={Mogul, Jeffrey and Krishnamurthy, Balachander and Douglis, Fred and Feldmann, Anja and Goland, Yaron and van Hoff, Arthur and Hellerstein, D},       journal={Work in Progress},       year={2002}     }          @inproceedings{mogul1997potential,       title={Potential benefits of delta encoding and data compression for HTTP},       author={Mogul, Jeffrey C and Douglis, Fred and Feldmann, Anja and Krishnamurthy, Balachander},       booktitle={ACM SIGCOMM Computer Communication Review},       volume={27},       number={4},       pages={181--194},       year={1997},       organization={ACM}     }


title: biblatex - Order last-first for the names of multiple editors?

text: For all bibliography items containing multiple editors, I must print the same order of names for multiple editors as I have them for multiple authors. For the authors, I got it to work (see here), but this does not cover the case of multiple editors (unless I made a mistake?). The relevant part of a representative bibliography item currently looks like > G. E. R. Lloyd/G. E. L. Owen (ed. by) but it must be > Lloyd, G. E. R./Owen, G. E. L. (ed. by) # MWE               \documentclass[     12pt,     a4paper     ]     {scrreprt}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     %\usepackage[english]{babel}          \usepackage[     language=auto,     style=authoryear,     backend=bibtex,     isbn=false,     doi=false,     citereset=chapter,     maxcitenames=3,     dashed=false,     sorting=nyt,     firstinits=true,     terseinits=false     maxbibnames=99,     uniquename=init     ]{biblatex}          \renewbibmacro*{byeditor+others}{%       \ifnameundef{editor}         {}         {\printnames[byeditor]{editor}%          \setunit{\addspace}%          \usebibmacro{byeditor+othersstrg}%          \clearname{editor}%          \newunit}%       \usebibmacro{byeditorx}%       \usebibmacro{bytranslator+others}}          \usepackage{xpatch}     \xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}          \begin{filecontents*}{lit.bib}     @InCollection{brandt,       options     = {useprefix=false},       hyphenation     = {german},       indexsorttitle  = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},       author      = {von Brandt, Ahasver and Erich Hoffmann},       editor      = {Ferdinand Seibt},       indextitle      = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die},       title       = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448},       shorttitle      = {Die nordischen L{\"a}nder},       booktitle   = {Europa im Hoch- und Sp{\"a}tmittelalter},       series      = {Handbuch der europ{\"a}ischen Geschichte},       number      = {2},       publisher   = {Klett-Cotta},       location    = {Stuttgart},       date        = {1987},       pages       = {884--917},       annotation      = {An \texttt{incollection} entry with a \texttt{series} and a \texttt{number}.                 Note the format of the printed name and compare the \texttt{useprefix} option in                 the \texttt{options} field as well as \texttt{vangennep}. Also note the                 \texttt{indextitle, and \texttt{indexsorttitle} fields}}     }     @InProceedings{moraux,       keywords    = {secondary},       hyphenation     = {french},       indexsorttitle  = {De Anima dans la tradition grecque},       author      = {Moraux, Paul},       editor      = {Lloyd, G. E. R. and Owen, G. E. L.},       indextitle      = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},       title       = {Le \emph{De Anima} dans la tradition gr{\`e}cque},       subtitle    = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}                 Themistius},       shorttitle      = {\emph{De Anima} dans la tradition gr{\`e}cque},       booktitle   = {Aristotle on Mind and the Senses},       booktitleaddon  = {Proceedings of the Seventh Symposium Aristotelicum},       eventdate   = {1975},       publisher   = cup,       location    = {Cambridge},       date        = {1979},       pages       = {281--324},       annotation      = {This is a typical \texttt{inproceedings} entry. Note the \texttt{booksubtitle},                 \texttt{shorttitle}, \texttt{indextitle}, and \texttt{indexsorttitle} fields.                 Also note the \texttt{eventdate} field.}     }     \end{filecontents*}          \addbibresource{lit.bib}          \DeclareNameAlias{sortname}{last-first}          \renewcommand{\multinamedelim}{\addslash}     \renewcommand{\finalnamedelim}{\addslash}                    \begin{document}     \chapter{First Chapter}     \begin{itemize}         \item For the case of multiple editors, these are just some words.\footcite[Cp.][p. xi]{moraux}. This currently looks like         \begin{verbatim}         G. E. R. Lloyd/G. E. L. Owen (ed. by)         \end{verbatim}         but I must have         \begin{verbatim}         Lloyd, G. E. R./Owen, G. E. L. (ed. by)         \end{verbatim}     \end{itemize}     \printbibliography     \end{document}


title: How to get a package into texlive

text: Say I have written an awesome package called "worldpeace.sty" and uploaded it to CTAN. What can I do to get the package in to texlive?


title: Latex fonts causing "Undefined control sequence" error in pgfplot

text: I am trying to modify the font size of some text labels in a pgfplot graph I'm playing around with, but it seems pgfplot doesn't understand certain font sizes such as \normal etc. Yet the pgfplot documentation states > A font can be any LATEX argument like \footnotesize or \small \bfseries I have created a test-case:               \begin{tikzpicture}      \begin{axis}[     log ticks with fixed point,     xlabel=x,     ylabel=y,     enlargelimits=0.2     ]           \addplot[only marks, black, mark=triangle*, mark options={fill=white}]     coordinates {      (0.5, 10)       (0.6, 20)       (0.7, 30)     };           \node [above] at (axis cs:  0.5,  10) {\small A};      \node [above] at (axis cs:  0.6,  20) {\small B};      \node [above] at (axis cs: 0.7, 30) {\small B};     \end{axis}     \end{tikzpicture}      I am using LyX as my editor. The following font-sizes throw up an Undefined control sequence error:               \smallest      \smaller      \normal      \larger      \largest      Am I missing something?


title: 3D surface plots in TikZ

text: I need to plot a surface plot using TikZ. I have the (x,y) coordinate and the corresponding function value in a table form. I have not done 3D plots before in TikZ and hence I would appreciate any help. I would want a surf plot like this, but I do not have a closed form expression for my function. Instead, I have a table of values as shown below.The (X,Y) values are a two dimensional uniform grid on the domain [0,4] * [0,4]. ![enter image description here](http://i.stack.imgur.com/2o7Hp.png)


title: Redefine options in TikZ-UML sequence diagrams

text: I have several `TikZ-UML` sequence diagrams and mostly I always set the options `dt=5` and `padding=3` for all `umlcall`. Is it possible to set these two variables for these values as default?               \documentclass{report}     \usepackage{tikz}     \usepackage{tikz-uml}     \begin{document}          \begin{tikzpicture}           \begin{umlseqdiag}             \umlbasicobject{B}             \umlbasicobject[x=6]{C}                  \begin{umlcall}[op=msg1, return={r0, r1}, dt=4, padding=3]{C}{B}             \end{umlcall}                  \begin{umlcall}[op=callback, return={ok}, dt=5, padding=3]{B}{C}             \end{umlcall}                  \begin{umlcall}[op=msg2, return=r2, dt=5, padding=3]{C}{B}             \end{umlcall}                \end{umlseqdiag}     \end{tikzpicture}          \end{document}


title: automatically cope with special characters in LaTeX hyperlink anchor caption

text: I am generating LaTeX code in an automated way and have run into a problem I'm not quite sure how to solve. The problem occurs when I am generating a clickable contents page using hyperlinks. File names must be given as clickable text in the contents, in the following manner:               \hyperlink{my_file.dat}{my_file.dat}\\      The difficulty arises in coping with the special characters that can arise in filenames (and I do not have some defined filename format). I know that I could manually escape the underscore, but this isn't an option here because this code is to be generated automatically for many files. My first attempt involved using verbatim in conjunction with cprotect, however I couldn't get this to work. My current attempt involves the use of url, in the following manner:               \hyperlink{my_file.dat}{\url{my_file.dat}}\\      However, this is inelegant. Would anyone have some inventive solutions to this or some ideas I might try? Many preemptive thanks for any assistance


title: pgfplots: putting marker labels outside of the plot

text: the following code:               \documentclass{article}          \usepackage[english]{babel}          \usepackage{pgfplots}                \usepackage{tikz}     \usepgfplotslibrary{groupplots}          \begin{document}          \begin{figure}     \begin{tikzpicture}     \pgfplotsset{width=7cm}     \pgfplotsset{every axis title/.style={at={(0.5,0)},below,yshift=-24pt}}     \pgfplotsset{every axis grid/.append style={very thin,dashed,gray}}          \begin{groupplot}[     group style={     xlabels at = edge bottom,     ylabels at = edge left},     width=0.67\linewidth,     height=0.67\linewidth,     xlabel={Original},     every axis x label/.style=     {at={(ticklabel cs:0.5)},anchor=near ticklabel, font=\scriptsize},     ylabel={DiSL-based},     every axis y label/.style=     {at={(ticklabel cs:0.5)},rotate=90,anchor=near ticklabel, font=\scriptsize},     xtick={500,1500,2500},     xticklabel={\axisdefaultticklabel },     ytick={500,1500,2500},     yticklabel={\axisdefaultticklabel },     extra x tick style={grid=major},     extra y tick style={grid=major},     axis equal,     ticklabel style={font=\scriptsize},     cycle list={     {black,fill=lightgray},     },     nodes near coords,     legend entries = {$ASM$, $AspectJ$, $other$,$geo. mean$},     legend columns=-1,     legend style={font=\scriptsize},     legend style={draw=none},     legend style={at={(0.75,1.18)}}     ]     \nextgroupplot[title={},xmin=0,ymin=0,xmax=2500,ymax=2500]     \addplot+[ mark=*,only marks, point meta=explicit symbolic, font=\scriptsize]      coordinates {     (650,70) [jcarder]% jcarder      (470, 105) [jp2]% jp2     (1306, 37) [jrat]% jrat     (2489 , 280)[emma] % emma      (1048,788) [cobertura]% cobertura     };     \nextgroupplot[title={},xmin=0,ymin=0,xmax=2500,ymax=2500]     \addplot+[mark=square*,fill=lightgray,only marks, point meta=explicit symbolic,    font=\scriptsize] coordinates {     (100, 225) [senseo]% senseo     (120, 124) [racer]% racer     };     \draw[/pgfplots/every axis grid] (axis cs:0,0) -- (axis cs:2500,2500);     \end{groupplot}     \end{tikzpicture}      gives me a plot with very dense marker labels that are hard to read. Unfortunately I can't post images here, but my question is there a way to put the marker labels (racer, senseo, jp2) outside of the plot and direct to the markers with arrow?


title: Using \input|texlua... to emulate \directlua in pdfTeX

text: When `--shell-escape` is enabled, `pdfTeX` allows to run external programs and input the result expandably with `\input|"..."`. Together with the Lua interpreter `texlua`, this could be used to provide a dumbed down version of `\directlua`. However, `texlua` expects a file name as its argument. In my setup (Ubuntu 10.04, with up-to-date TeXLive 2012 install), one can run `pdftex --shell-escape` on               \everyeof{\noexpand}     \message{\input|"echo print\string\(3.4+5.7\string\) > tmp.lua ; texlua tmp.lua" a}     \bye      to get `\message{9.1}`. Note that the `\everyeof{\noexpand}` is in part for convenience, it would be possible to make the construction work (not entirely robustly) without this non-expandable step. This approach is not portable because it relies on `echo`, which probably doesn't exist in Windows environments. One way around this would be to have a simple Lua script taking the code `print\string\(3.4+5.7\string\)` as its argument (see a recent question on texlua arguments), then somehow performing it. Is this possible? Otherwise, we need an os-dependent approach. A second problem is that special characters such as parentheses need escaping. Which ones? In particular, I'm worried about quotes `"`, which are used to enclose the argument of `\input|`. Given a list of which escapings to perform, I have some code up my sleeve to do that expandably (see the `l3kernel-extras` package on the LaTeX3 svn repository). Basically, my question boils down to: "How can I invoke `texlua` from `pdfTeX` with arbitrary Lua code as portably as possible?"


title: Backup of user-defined entries of autocompletion in Texmaker?

text: Does anybody know where Texmaker stores the user-defined entries to the autocompletion feature? I'd like to back up (as well as export) my own entries.


title: Centering captions under figures

text: Is there a way to do this? All mine are left aligned; however, I want them centered. How is it done? Also related: how do I embolden all of my captions?               \documentclass[a4paper,12pt,fleqn,titlepage]{report}     \usepackage[margin=2.0cm]{geometry}                % See geometry.pdf to learn the layout options. There are lots.     \geometry{letterpaper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     \usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}     \usepackage{ulem}     \usepackage{mathtools}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{epstopdf}     \usepackage{longtable}     \usepackage{color}     \usepackage{subfigure}     \usepackage{wrapfig}     \usepackage{pdfpages}     \usepackage{makecell}     \usepackage{caption}     \usepackage{titlesec}     \newcommand{\sectionbreak}{\clearpage}     \titleformat{\chapter}[display]       {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}     \titlespacing*{\chapter}{0pt}{-30pt}{12pt}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}     \renewcommand{\thefootnote}{\arabic{footnote}}     \usepackage[perpage,bottom]{footmisc}          \begin{document}          \begin{table}[h!]     \centering     \captionsetup{width=13cm}     \caption{Load of stuff above the table which is wider than the table, can use width to limit that as above but want it centralised, also might be numbers in here which means when I want to embolden the entire caption from the preamle so that it does it for all figures in my document that the numbers like this $n=1,2,3,4,5,6$ and $7$ will embolden too. If I put this in at the moment it looks like my actual text and so there is lttle way to discern between the two.}     \vspace{0.3cm}     \begin{tabular}{| l | l | l |}     \hline     Thing1 & Thing2 & Thing3 \\ \hline     blah1 & blah2 & blah3 \\ \hline     \end{tabular}     \label{table:stuff}     \end{table}          \end{document}      Please excuse the preamble as I don't really know what relates to what, I just know that these have been collected over time to be able to write my entire document so all are used at some point. I you want I can edit them out... So I want a way to embolden, centralise and change font size of all my captions globally, and by centralise I mean center align, so they are not left aligned.


title: Ensure float appears directly after `\afterpage` and `landscape`

text: I have a large (full page) landscape figure that I would like to appear on the page opposite to a large (full page) portrait figure. The landscape figure is generated like so:               \afterpage{         \begin{landscape}             \begin{figure}                 \centering                 \includegraphics[scale=1]{path/to/the/file.pdf}                 \caption{The Caption}             \end{figure}         \end{landscape}     }      The `afterpage` allows the landscape page to float around. I would now like to add a figure that is on the opposite page; I have done so currently by adding it into the `landscape` and rotating it:               \afterpage{         \begin{landscape}             \begin{figure}                 \centering                 \includegraphics[scale=1]{path/to/the/file.pdf}                 \caption{The Caption}             \end{figure}                  \begin{figure}                 \centering                 \includegraphics[scale=1,angle=-90]{path/to/another/file.pdf}                 \caption{The Other Caption}             \end{figure}         \end{landscape}     }      This has a couple of problems with it, though - firstly, it doesn't ensure that they're on facing pages (only that they're on consecutive pages), and secondly it results in a rotated caption for the second figure, which is not ideal because it's really a portrait figure. I have looked for a solution to this problem, but can't seem to find it. Can anyone suggest one, or point me in the right direction?


title: Table numbers overwrite table captions in list of tables with double-digit tables

text: I am having a problem where the table numbers overrun into the table captions in my list of tables for tables with longer numbers. I am using the attached nuthesis.cls file (based on amsbook.cls). I have tried using the tocloft package with no success. The suggestion in: List of figures and list of tables overlaps figure/table indices with proceeding text when double figures are used also does not work. Below is a MWE - thanks in advance for the help! I would also like to eliminate the extra floating period after Appendix in the table of contents. Any suggestions?                   \documentclass[12pt]{nuthesis}  % The nuthesis class is based on                         % amsbook.cls.         \usepackage{amsmath,graphicx,epsfig,float,enumerate,import,rotating,here,array,comment,subfigure}         %\usepackage[subfigure]{tocloft}              %\makeatletter         %\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{3em}}% 3em instead of 2.3em         %\let\l@table\l@figure         %\makeatother                        \author{AUTHOR NAME}         \title{Essays}         \degree{DOCTOR OF PHILOSOPHY}  % Default: DOCTOR OF PHILOSOPHY         \field{FIELD}                  % Default: Mathematics         \graduationmonth{August}             \graduationyear{2012}                \begin{document}         \frontmatter        % Preliminary pages start here.         \maketitle      % Produces the title page.         \copyrightpage      % Creates the copyright page.         \abstract       % Abstract.             What you did         \acknowledgements   % Acknowledgements (optional).             Thanks.         \tableofcontents         \listoftables       % List of Tables and List of Figures will be placed         \listoffigures      % here, if applicable (optional).              \mainmatter             % Actual text starts here.              \chapter{Chapter 1}          \section{Introduction}              I would love my table names to not be written over by numbers.         \setcounter{table}{9}         \begin{table}[htbp]\centering \footnotesize           \caption[Summary Statistics]{Summary Statistics \label{sumstats_bondanalysis}}             \begin{tabular}{cc}\hline\hline                Name &    N \\                XYZ & 5 \\\hline             \end{tabular}         \end{table}              \appendix          \chapter{Data Appendix}         \end{document}      The nuthesis.cls code is:                   %%% This is nuthesis.cls         %%% for writing doctoral dissertations at the         %%% Mathematics Department of Northwestern University; and         %%% Electrical Engineering and Computer Science, Northwestern University         %%%         %%% Author: Miguel A. Lerma (mlerma@math.northwestern.edu)         %%% Date:5/4/2005         %%% Edited by: Debjit Sinha (debjitsinha@yahoo.com)         %%% for NU Electronic dissertation requirements.         %%% Date:4/15/2006         %%%         %%% ====================================================================         %% \CharacterTable         %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z         %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z         %%   Digits        \0\1\2\3\4\5\6\7\8\9         %%   Exclamation   \!     Double quote  \"     Hash (number) \#         %%   Dollar        \$     Percent       \%     Ampersand     \&         %%   Acute accent  \'     Left paren    \(     Right paren   \)         %%   Asterisk      \*     Plus          \+     Comma         \,         %%   Minus         \-     Point         \.     Solidus       \/         %%   Colon         \:     Semicolon     \;     Less than     \<         %%   Equals        \=     Greater than  \>     Question mark \?         %%   Commercial at \@     Left bracket  \[     Backslash     \\         %%   Right bracket \]     Circumflex    \^     Underscore    \_         %%   Grave accent  \`     Left brace    \{     Vertical bar  \|         %%   Right brace   \}     Tilde         \~}         \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)         [1994/12/01]% LaTeX date must December 1994 or later         \ProvidesClass{nuthesis}[2005/05/04 v1.6a by Miguel A. Lerma]         \PassOptionsToClass{oneside}{amsbook}         \DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsbook}}         \ProcessOptions\relax         \LoadClass{amsbook}         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%              %\def\singlespace{\renewcommand{\baselinestretch}{1}}         %\def\singlehalfspace{\renewcommand{\baselinestretch}{1.4}}         %\def\doublespace{\renewcommand{\baselinestretch}{1.8}}              %\RequirePackage{doublespace}       % MAL - 5/8/2001         %\def\onehalfspace{\spacing{1.4}}   % MAL - 5/8/2001         %\def\doublespace{\spacing{1.8}}    % MAL - 5/8/2001              \RequirePackage{setspace}                        % MAL - 4/19/2003         \renewcommand{\onehalfspacing}{\setstretch{1.4}} % MAL - 4/19/2003         \renewcommand{\doublespacing}{\setstretch{1.8}}  % MAL - 4/19/2003              % Page numbering should be at normal size         % (amsbook.cls yields scriptsize) - MAL 6/17/2003         \def\ps@plain{\ps@empty           \def\@oddfoot{\normalfont\normalsize \hfil\thepage\hfil}%           \let\@evenfoot\@oddfoot}              % Another place where amsbook.cls yields scriptsize         % (amsbook.cls yields scriptsize) - MAL 7/15/2003         \def\ps@headings{\ps@empty           \def\@evenhead{%             \setTrue{runhead}%             \normalfont\normalsize        % changed from scriptsize - MAL 7/15/2003             \rlap{\thepage}\hfil \leftmark{}{}\hfil}%           \def\@oddhead{%             \setTrue{runhead}%             \normalfont\normalsize \hfil  % changed from scriptsize - MAL 7/15/2003             \rightmark{}{}\hfil \llap{\thepage}}%           \let\@mkboth\markboth           \def\partmark{\@secmark\markboth\partrunhead\partname}%           \def\chaptermark{%             \@secmark\markboth\chapterrunhead{}}%           \def\sectionmark{%             \@secmark\markright\sectionrunhead\sectionname}%         }              \def\contentsname{Table of Contents}              \def\chapter{%           \if@openright\cleardoublepage\else\clearpage\fi           \thispagestyle{myheadings}\global\@topnum\z@           \@afterindenttrue \secdef\@chapter\@schapter}              \setlength{\topmargin}{0.0in}         \setlength{\headheight}{0.2in}         \setlength{\headsep}{0.5in}              \setlength{\textheight}{8.2in}         \setlength{\footskip}{0.0in}              \setlength{\textwidth}{6.5in}         \setlength{\oddsidemargin}{0.0in}         \setlength{\evensidemargin}{0.0in}              \renewcommand\thesection{\thechapter.\@arabic\c@section}         \renewcommand\thefigure {\thechapter.\arabic{figure}}         \renewcommand\thetable {\thechapter.\arabic{table}}                   \newcommand{\numwidth}{10em}              %% SECTION heading spacing and font         %%         % arguments are: #1 - sectiontype name         % (for \@sect)   #2 - section level         %                #3 - indent         %                #4 - top separation         %                #5 - tempskipa, bottom separation         %                #6 - font control         % if tempskipa <= 0 the heading is a run-in heading              \def\section{\@startsection{section}{1}%           \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%           {\normalfont\bfseries\centering}}         \def\subsection{\@startsection{subsection}{2}%           \z@{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}%           {\normalfont\bfseries}}         \def\subsubsection{\@startsection{subsubsection}{3}%           \z@\z@{-.5em}%           {\normalfont\bfseries}}              \def\th@plain{%           \thm@headfont{\bfseries}           \let\thmhead\thmhead@plain \let\swappedhead\swappedhead@plain           \thm@preskip.5\baselineskip\@plus.2\baselineskip                                             \@minus.2\baselineskip           \thm@postskip\thm@preskip           \itshape         }         \def\th@definition{%           \thm@headfont{\bfseries}%           \let\thmhead\thmhead@plain \let\swappedhead\swappedhead@plain           \thm@preskip.5\baselineskip\@plus.2\baselineskip                                             \@minus.2\baselineskip           \thm@postskip\thm@preskip           \upshape         }         \def\th@remark{%           \thm@headfont{\bfseries}%           \let\thmhead\thmhead@plain \let\swappedhead\swappedhead@plain           \thm@preskip.5\baselineskip\@plus.2\baselineskip                                             \@minus.2\baselineskip           \thm@postskip\thm@preskip           \upshape         }                   % This redefinition of the proof environment is obsolete - MAL 5/4/2005         %\renewenvironment{proof}[1][\proofname]{\par \normalfont         %  \topsep6\p@\@plus6\p@ \trivlist \itemindent\z@         %  \item[\hskip\labelsep\bfseries         %    #1\@addpunct{.}]\ignorespaces         %}{%         %  \qed\endtrivlist         %}              % Better just redefine the font for proofname         % - suggested by Ezra Getzler 5/4/2005         \renewcommand{\proofname}{\bfseries{Proof}}                   \numberwithin{equation}{chapter}                   \def\@captionheadfont{\normalfont}  % \scshape in amsbook.cls                   \def\@title{Title of dissertation required}              \def\degree#1{\def\d@gree{#1}}         \def\d@gree{DOCTOR OF PHILOSOPHY}   % spelling corrected - MAL 3/8/2002         \def\field#1{\def\fi@ld{#1}}         \def\fi@ld{Mathematics}         \def\campus#1{\def\c@mpus{#1}}         \def\c@mpus{EVANSTON, ILLINOIS}              \def\graduation@month{\ifcase\month\or             June\or June\or June\or June\or June\or June\or December\or             December\or December\or December\or December\or December\fi}         \def\graduation@year{\number\year}              \def\graduationmonth#1{\def\graduation@month{#1}}         \def\graduationyear#1{\def\graduation@year{#1}}              \def\@date{\graduation@month \graduation@year}                        \def\frontmatter{%           \cleardoublepage         %  \pagenumbering{roman}         %  \pagestyle{plain}           \pagenumbering{arabic}           \pagestyle{myheadings}         }         \def\mainmatter{%           \cleardoublepage         %  \pagenumbering{arabic}         %  \pagestyle{myheadings}         }         \def\backmatter{\cleardoublepage}                   \def\titlepage{%           \cleardoublepage           \thispagestyle{empty}\setcounter{page}{1}}         \def\endtitlepage{\newpage}                   \def\copyrightpage{%           \cleardoublepage         \begin{center}           \ \\           \vspace{\fill}         \copyright \ Copyright by \authors{} \graduation@year \\         All Rights Reserved         \vspace{\fill}         \end{center}}         \def\endcopyrightpage{\newpage}                   \def\maketitle{\par           \@topnum\z@ % this prevents figures from falling at the top of page 1         \begin{titlepage}         \begin{center}         NORTHWESTERN UNIVERSITY\par         \vfill         {\large \@title}\par         \vfill         A DISSERTATION\par         \vspace{0.5cm}         SUBMITTED TO THE GRADUATE SCHOOL\par         IN PARTIAL FULFILLMENT OF THE REQUIREMENTS\par         \vspace{0.5cm}         for the degree\par         \vspace{0.5cm}         \d@gree{}\par         \vfill         Field of \fi@ld\par         \vfill         By\par         \vspace{0.5cm}         \ifx\@empty\authors         Author's name required\par           \else           \authors\par           \fi         \vfill         \c@mpus\par         \vspace{0.5cm}         \graduation@month{} \graduation@year{}         \end{center}         \end{titlepage}         }                   \renewcommand{\abstract}{%         \chapter*{\abstractname}         \bigskip         \begin{center}         \@title{}\par         \bigskip         \authors{}\par         \end{center}         \bigskip         }         \def\abstractname{ABSTRACT} % capitalized - MAL 5/3/2002                   \newcommand{\acknowledgements}{\chapter*{\acknowledgementsname}}         \def\acknowledgementsname{Acknowledgments}         \newcommand{\preface}{\chapter*{\prefacename}}         \def\prefacename{Preface}         \newcommand{\introduction}{\chapter*{\introductionname}}         \def\introductionname{Introduction}         \newcommand{\vita}{\chapter*{\vitaname}}         \def\vitaname{Vita}              % Taken from amsbook.cls and modified.         % The references must use normal size font,         % and be single spaced with double space         % between items.         \renewenvironment{thebibliography}[1]{%           \@xp\chapter\@xp*\@xp{\bibname}%         %  \normalfont\footnotesize            % commented out (MAL-5/4/2001)           \labelsep .5em\relax           \renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty           \list{\@biblabel{\theenumiv}}{%             \settowidth\itemsep\@mainsize      % MAL - 5/9/2001         %    \singlespace                       % MAL - 5/9/2001             \begin{singlespace}             \settowidth\labelwidth{\@biblabel{#1}}%             \leftmargin\labelwidth \advance\leftmargin\labelsep             \usecounter{enumiv}}%           \sloppy \clubpenalty\@M \widowpenalty\clubpenalty           \sfcode`\.=\@m         }{%           \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%         %  \endsinglespace                      % MAL - 5/9/2001             \end{singlespace}           \endlist         }         \def\bibname{References}                   \def\appendices{\par           \c@chapter\z@ \c@section\z@           \let\chaptername\appendixname           \def\thechapter{\@Alph\c@chapter}}              \def\appendix{\par           \c@chapter\z@ \c@section\z@           \let\chaptername\appendixname           \def\thechapter{{}}           \renewcommand\thesection{\@arabic\c@section}}                   \doublespacing                   \endinput         %%         %% End of file `nuthesis.cls'.


title: Biber failed to identify author name with "-"

text: When the author name with "-", biber tends to generate dummy characters around the name. For example, one input in bib file as the following.               @article{Baker,     author = {Baker, F.B. and Al‐Karni, A},     journal = {Journal of Educational Measurement},     pages = {147--162},     title = {{A comparison of two procedures for computing IRT equating coefficients}},     url = {http://onlinelibrary.wiley.com/doi/10.1111/j.1745-3984.1991.tb00350.x/abstract},     volume = {28},     year = {1991}     }      when the above input compiled in latex, error message will be generated and if check back to the bbl file, the "-" became fffd...               \name{labelname}{2}{}{%             {{uniquename=0,hash=4d61c716006737e01dad3e296d8cb4b2}{Baker}     {B\bibinitperiod}{F.B.}{F\bibinitperiod}{}{}{}{}}%             {{uniquename=0,hash=bbeb8c73c9f3f7bd033ecb2e8bbdab2d}     {Al\x{fffd}\x{fffd}\x{fffd}Karni}{A\bibinitperiod}{A}{A\bibinitperiod}{}{}{}{}}%           }      and the output of pdflatex will be > Baker, F. & AlfffdfffdfffdKarni, A. (1991). A comparison of two procedures > for computing IRT equating coefficients. Journal of Educational Measurement, > 28, 147–162. rather than the original one as > Baker, F. & Al-Karni, A. (1991). A comparison of two procedures for > computing IRT equating coefficients. Journal of Educational Measurement, 28, > 147–162. Is it a bug of biber or biblatex? And how to fix it?


title: Numbering the list of figures in the table of contents

text: So I'm having a slight problem with the `\listoffigures` command and the way LaTeX makes the table of contents. In my preamble I'm using `\usepackage[nottoc,numbib]{tocbibind} ` because I want to include the bibliography in the ToC (and with a section-number as well). However, I can't seem to figure out how to do the same for list of figures. The package tocbibind sadly don't have an option like `numlof` and all results on google either don't give me a working result or has something to do with "how to manually add an item in the ToC", which isn't really what I'm looking for. In short, how do I add the listoffigures in the ToC with a number attached to it. Just to add, I can add the list of figures in the ToC without problems, but I'd like a section-number as well. I'm using the `article` class by the way. EDIT: Silly me, I was also using the `tocloft`package, in order to make a way to list the source of a bunch of images. The process is described at List of figures: source below image caption? It seems the two methods conflict each other. I'd really like to have both the numbered LoF in the ToC and a way to list the source of each figure.


title: XeTeX: problem with g-brief2 and polyglossia

text: Today I discovered a problem with the `polyglossia` package and the `g-brief2` class. I hope someone can help me to fix it. :) Here is my `polyglossia` MWE (`polyg.tex`):               \documentclass[a4paper,11pt]{g-brief2}     \usepackage     {%%         fontspec,         polyglossia,         lmodern,         relsize     }     \setmainlanguage[spelling=new,babelshorthands=true]{german}          \Name               {My Name}     \Unterschrift       {My Name}     \Betreff            {Subject}     \Datum              {\today}     \Anrede             {Dear,}     \Gruss              {Regards,}{0.5cm}          \begin{document}         \begin{g-brief}             bla bla bla         \end{g-brief}     \end{document}      The log for compiling (`xelatex polyg.tex`) contains the following message:               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.18 ^^I\begin{document}      So, where is the problem? – Best regards and thanks for your assistance!


title: EB Garamond on LaTeX

text: I'm looking for the EB Garamond font on LaTeX. Precisely that. And my search, on Google and on TeX.SX, hasn't returned anything, yet. I'm aware that I can have URW-Garamond No. 8 on LaTeX, e.g., `\usepackage[urw- garamond]{mathdesign}`, and I know I can have EB Garamond on XeTeX, but these are not what I'm looking for.


title: How to normalize a vector in pgf/tikz?

text: I'm drawing a picture in pgf/tikz in which I define some vectors (coordinates) at the start. The picture changes depending on these initial coordinate positions. eg:\coordinate (A) at (3,4); During the drawing, I need to normalize these vectors. How do I compute the corresponding vector that is a normalized version of A?


title: Increase the indent in an algorithm

text: > **Possible Duplicate:**   >  Indenting lines of code in algorithm This is my algorithm:               \usepackage{algorithm}     \usepackage{algorithmic}     \begin{document}     \begin{algorithm}[H]     \caption{My algo}     \begin{algorithmic}[1]     \STATE instruction 1     \STATE instruction 2     \end{algorithmic}     \end{algorithm}     \end{document}      Please, how can I increase the indent before instruction 1?


title: How to format y tick label into a consistent decimal style in pgfplots

text: I have this plots ![here](http://i.stack.imgur.com/44OSH.jpg). It is generated by the `pgfplots` code at the bottom. For the y tick labels, instead of the one shown in the figure, I would like to have `{2, 4, 6, 8, 10}` by the y ticks, and a `$10^{-2}$` on top of y axis, just like Jake's solution to this question, which produces a figure with the desired y tick label format. (However, this does not do so for my `ytick={0.02, 0.04, 0.06, 0.08, 0.1}`) ![here](http://i.stack.imgur.com/k5IN6.jpg)               \documentclass{article}     \usepackage{pgfplots}              \begin{document}          \begin{tikzpicture}[scale=0.9]     \begin{axis}[     minor tick num=1,     xmin=0,     xmax=6,     ymin=0,     ytick={0.02, 0.04, 0.06, 0.08, 0.1},     xlabel={X}, ylabel={Y},     yticklabel=\pgfmathprintnumber{\tick}]     \addplot [black,thick] table [row sep=crcr]{     0 0\\     2 0.15\\     };     \end{axis}     \end{tikzpicture}          \end{document}


title: trying to set text where section header has different margin and textwidth from section text

text: i am trying to set some text where the section header has a different margin and textwidth from the section text. the screenshot shows a mockup of how i would like the final layout to look (including some of the section text layout usecases). section headers are in sans serif. ![enter image description here](http://i.stack.imgur.com/BGMhs.jpg) any advice on how best to implement this without resorting to tables? the easiest and cleanest thing would be to define separate geometry for section headers and section text? is this possible?


title: Should I include page numbers with landscape?

text: In my paper I have two separate `longtables` that each go across 3 pages in `landscape` mode. Which is typographically better (i) include page numbers in the bottom center of these tables (ii) have no page numbers under these tables.


title: Missing $ inserted, any ideas where?

text: I have been staring at the screen for what seems like hours trying to understand this error. I cannot see why it's giving me an error message. It's more than likely that I have been staring at the screen too long to see it but here is the code:               Then clearly $P((q_a < {\theta} < q_b)|y) = 1 – {\alpha}$; so     our confidence that ${\theta}$ lies in $(q_a, q_b)$ is simply     $100 {\times} (1-{\alpha})%$. This interval is a $100 {\times}     (1-{\alpha})%$ credible set (or simply Bayesian confidence     interval) for ${\theta}$. This interval is relatively     straightforward to calculate and has a direct interpretation     that the frequentist interval does not. This interval is     sometimes called the equal tail credible set for the simple     reason that it is obtained by removing an equal amount of     support $(\frac{{\alpha}}{2})$ off both sides of     $p({\theta}|y)$. Note that for symmetric unimodal posteriors,     this equal tail interval will be symmetric about this mode      If anyone can see where the error is I would really appreciate it. The compiler says it is in the line "This interval ....." but I can't see the issue


title: What's the right space to right the alignment of a right aligned align environment?

text: As Hilbert would have put it, had he lived in the TeX-era: > No one shall expel us from the Paradise that AMS has created. and one aspect of that paradise is release from the tyranny of `eqnarray` by use of the magnificent `align` environment (and its siblings). One feature of the `align` environment is that it saves us considerable time and effort by only requiring _one_ alignment character in, for example,               \begin{align*}     x &= y + z \\     a &= b + c     \end{align*}      and all the spaces are _just right_. But just _occasionally_ I want to align things by the other side of the relation sign. And then the automatic spacing doesn't work:               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \[       x = y + z     \]          \begin{align*}     x &= y + z     \end{align*}          \begin{align*}     x =& y + z      \end{align*}          \end{document}      ![misaligned alignment](http://i.stack.imgur.com/OLp1H.png) Clearly, I can just add the right amount of space. But equally clearly there's a right amount of space to be added. What is it?


title: Problem with CountriesOfEurope package

text: Compiling the MWE below:               \documentclass{article}     \usepackage{CountriesOfEurope}     \pagestyle{empty}          \begin{document}     \EUCountry{139}     \end{document}      results in a blank .dvi file, and with both `dvips` and `ps2pdf` (or with `pdftex`), I get error messages telling me that the font CountriesofEurope was not found. I have a complete and updated MikTeX 2.9 installation running on Windows XP and I've checked that the .afm, enc., .map, .pfb, and .tfm files are installed in the corresponding folders. I have updated the FNDB and also ran the shell command `updmap`. Any idea on what the problem may be would be welcome. The .log file from a pdflatex compilation is appended next:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2012.7.25)  25 JUL 2012 00:52     entering extended mode     **Europe          ("C:\Documents and Settings\_\Mis documentos\LaTeX WinEdt Styles and Files\Euro     pe.tex"     LaTeX2e      Babel  and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\CountriesOfEurope\CountriesOfEur     ope.sty"     Package: CountriesOfEurope 2012/04/18 v0.21 CountriesOfEurope Font(RN,hv)      ("C:\Archivos de programa\MiKTeX 2.9\tex\latex\graphics\keyval.sty"     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     ))     No file Europe.aux.     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.     LaTeX Font Info:    ... okay on input line 5.     LaTeX Font Info:    Font shape `U/CountriesOfEurope/m/n' will be     (Font)              scaled to size 10.0pt on input line 6.     [1          {C:/Documents and Settings/_/ConfiguraciÃ³n local/Datos de programa/MiKTeX/2.9/     pdftex/config/pdftex.map}]     ("C:\Documents and Settings\_\Mis documentos\LaTeX WinEdt Styles and Files\Euro     pe.aux") )      Here is how much of TeX's memory you used:      325 strings out of 493921      4053 string characters out of 3144430      49070 words of memory out of 100000000      3697 multiletter control sequences out of 15000+200000      3900 words of font info for 15 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      23i,4n,19p,164b,100s stack positions out of 5000i,500n,10000p,200000b,50000s          !pdfTeX error: pdflatex (file CountriesOfEurope): Font CountriesOfEurope at 600      not found      ==> Fatal error occurred, no output PDF file produced!


title: How can I split an equation over two lines

text: I am having the following equation:               \begin{equation}       Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right)     \end{equation}      which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation. The linebreak `\\` does not work.


title: Automatically breaking formulas

text: > **Possible Duplicate:**   >  How can I split an equation over two lines I am trying to compile my papers into Kindle readable PDF files. I can get pretty good outputs by just changing the height and the width of the document. One problem is formulas run out of the page and I cannot really adjust them manually for hundreds of formulas. I am wondering if there is any package that automatically breaks a formula if it runs out of the page margins.


title: How to break long expressions automatically in displaymode?

text: Whenever an expression is too long, it will be broken automatically in inline mode but done nothing in displaymode E.g. MWE:               \documentclass[11pt]{article}     \begin{document}          $1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0$          \[1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0\]           \end{document}      The upper one will be broken whereas the lower one not. So how to make auto break also works in displaymode?


title: Equation too long

text: > **Possible Duplicate:**   >  How can I split an equation over two lines I have a long equation,               $\operatorname{E} (Z_{n+1} - Z_n | X_1,..., X_n)     = \operatorname{E} (S_{n+1}^2 - (n+1) \sigma^2 - S_n^2 + n \sigma^2  | X_1,..., X_n)     = \operatorname{E} (S_{n+1}^2 - S_n^2 - (n+1) \sigma^2 + n \sigma^2  | X_1,..., X_n)     = \operatorname{E} (X_{n+1}(X_{n+1} + 2\sum_{i=1}^n X_i) - \sigma^2 | X_1,..., X_n)     = \operatorname{E} (X_{n+1}X_{n+1}) + 2\operatorname{E} (X_{n+1}) \sum_{i=1}^n X_i - \sigma^2     = \sigma^2  - \sigma^2 =0     $.      which I think causes warning: > Overfull \hbox (3.16257pt too wide) Is there some way automatically line-break long equations? Or must I specify where to line-break? Thanks!


title: How do I put a linebreak in a displaymath?

text: > **Possible Duplicate:**   >  How can I split an equation over two lines I have a `displaymath` formula that's too long. `\linebreak` and other commands that work in inline math don't seem to do anything. Is there any way to break the `displaymath` onto multiple lines? (or preferably, have latex break it automatically?) I saw some other related questions here at tex.stackexchange, which said "use `align`/`eqnarray*`/etc instead". My formula doesn't need breaking for layout reasons, just because it's too long, so I'd prefer to keep using `displaymath`. Is there a way to linebreak _without_ changing environments?


title: Inserting a line break in a formula

text: I have the following formula in `LaTeX`:               \begin{equation}     =\sqrt[m]{\mid C_{new}\left(pi\right)-f\left(pi\right)\mid^{m}-\mid C_{k}\left(pi\right)-f\left(pi\right)\mid^{m} +\sum_{i=1;i}^{length\left(C_{k}\right)}\mid C_{k}\left(i\right)-f\left(i\right)\mid^{m}}     \end{equation}      How can I insert a line break after `+` which is coming before `sum`, as the formula is wide to fit the template I'm using. Thanks.


title: Customise Table of Contents header and heading

text: When using `\tableofcontents` my TOC gets generated like this: ![Table of Contents](http://i.stack.imgur.com/m0YOJ.png) Why does the word Contents appear twice and what is the easiest way of changing it to only show the header and not the big heading. How can I change the actual word to something like "Table of Contents", and also switch it to a different font like Times New Roman? I am using `\documentclass[paper=a5,pagesize=pdftex]{scrbook}` in this instance and the current font seems to be associated with that. Although when using               \dottedcontents{chapter}[2.5em]{}{2.3em}{1pc}      it comes out like this: ![ToC 2](http://i.stack.imgur.com/SKSnM.png) Which looks a little better around the contents, but still with the main heading and header in the same fashion.


title: How to suppress overfull hbox warnings up to some maximum?

text: I want LaTeX not to give warnings for overfull hboxes up to some maximum of say 2 pts. How to achieve this?


title: Change option of natbib in AIP

text: I really want to have my references generated with BibTeX like [1], [2] instead of 1, 2 in the AIP class which uses `revtex4-1.cls`. I guess I need to change the `super` option of the package `natbib`. I tried               \PassOptionsToPackage{square,sort,comma,numbers}{natbib}      but it doesn't work. Any idea?


title: How can I access the size of a tikzpicture's bounding box outside the tikzpicture?

text: I'm trying to calculate the size of a tikzpicture using the current bounding box, but every time I try to extract the coordinates I get 0pt (for everything). ![enter image description here](http://i.stack.imgur.com/t5LnH.png)               \documentclass{article}     \usepackage{tikz}          \newlength{\mywidth}     \newlength{\myheight}          % computes width and height of tikzpicture          \newcommand{\pgfsize}[2]{ % #1 = width, #2 = height      \pgfextractx{#1}{\pgfpointdiff{\pgfpointanchor{current bounding box}{south west}}      {\pgfpointanchor{current bounding box}{north east}}}      \pgfextracty{#2}{\pgfpointdiff{\pgfpointanchor{current bounding box}{south west}}      {\pgfpointanchor{current bounding box}{north east}}}     }          \begin{document}          \noindent     \begin{tikzpicture}     \draw node[rotate=90]{      \framebox{      \begin{tabular}{c|c}      first column & second column\\      \hline      1 & A\\      2 & B\\      $\vdots$ & $\vdots$      \end{tabular}     }};     \draw[color=red] (current bounding box.south west) -- (current bounding box.north east);     \pgfsize{\mywidth}{\myheight}     \end{tikzpicture}          \noindent     Width = \the\mywidth \\     Height = \the\myheight     \end{document}      As you can see, one can draw a line across the bounding box, so it exists and is non-trivial. I'm thinking I may have to use \pgfgettransformentries, but when?


title: Get (obtain/print/typeout) the width of a (standalone) pgfplot?

text: I'm using the `tikz2pdf` script, which I think internally uses the standalone class, to compile my `tikz` and `pgfplots` figures. Say, I have this simple example:               \begin{tikzpicture}     \begin{scope}          \begin{axis}[       clip=true,       axis x line=middle, % use middle to have x-axis at y=0! (bottom is at ymin!)       axis y line=middle, % also use middle here (left rotates the label || y-axis!)       grid = major,         grid style={dashed},     ]     \addplot[blue,domain=0:3.1] {sin(deg(x))};     \end{axis}     \end{scope}     \end{tikzpicture}      Here is the image of the PDF generated by `tikz2pdf`: ![test_pdf](http://i.stack.imgur.com/BbXyAm.png) Now, the pdf reports this size:               $ pdfinfo test.pdf  | grep 'Page size'     Page size:      217.165 x 184.36 pts      (.. or from `evince`: 77 × 65 mm) - what I don't understand is: Where is this default size set? Is there a command/length I could `\typeout` to terminal, maybe after the `\end{axis}`, which will tell me what is the current page (or `tikzpicture`, or `pgfplot` graphic) size (width and/or height)? * * * The thing is - in the above image, I would like to keep y-axis as is (so, 65mm), and I'd like to "stretch" the x-axis to some 1.5 times the original (so, to 115.5mm); with otherwise the same ranges as shown on the image above. I'm aware I could use the key `width` to set a width (e.g. Formatting a pgfplot graph. Thicker bars and total width - TeX - LaTeX Stack Exchange), but I don't know what the initial/default width of the plot is (and the manual doesn't seem to mention that either). Since I cannot see what is the default width - I'd either have to rely on a different program, say, `evince` to give me that number; or I'd have to blindly enter values until I see something that I like - both being approaches which I dislike. (I'd rather obtain the actual length that Latex/Tikz/Pgfplots see as width and `\typeout` it to terminal/log - and then specify the `width` key based on that value).


title: Path for saving PDF in TexStudio

text: Is it possible to change the place, where TexStudio (I use last version of TEXStudio) on Windows 8) puts generated PDF file? By default all files (.tex and related .pdf, .aux etc.) are in the same folder. I would like to make a separate folder for PDf's, and make all PDF's be stored in it.


title: Printable margin notes that leave rest of the content intact

text: Let me give you some background on my problem. I am working on application which generates and compiles LaTeX code. For debugging purposes I need it to add some additional informations next to the standard document content. In the perfect case these informations should **not interrupt** natural **flow of the text** , apper **near the content** (may be at the margin), **be printable** and require only **one compilation**. I need these debug notes for **math, inline math, sections, tables** , sometimes inside **multicols** environment. I have tried `marginpar`, several packages like `todonotes`, `marginnote`, boxes with zero height and overlap or even printing pdf comments but I can't achieve my goal. So far marginpars seem to be the best, but they do not appear exactly where I would like and sometimes (in example before sections) create additional vertical gap. They also ruin multicols. Behavior of the package `lineno`, which adds line number before every line seems very nice but I have no idea how to adapt it. Do you have any clues?


title: Paragraph with a given aspect ratio?

text: I using `tikz` together with package `varwidth`, I find myself playing out with different values for paragraph width, so as to achieve an "optimal" aspect ratio. Ideally, I would have liked to have an environment similar to `varwidth` which would make a best effort attempt to produce a paragraph with a given aspect ratio.               \begin{aspectparagraph}{2.5}     some text, which would automatically be formatted with      different widths, so as to find the width which is closest     to (in this case) 2.5. This could be approximated by computing the total     text ``natural'' length, and then computing an approximate width based on the     line height.     \end{aspectparagraph}


title: Identical marks in header with onesided memoir

text: I'm using memoir for an onesided document, but I wanted to have both the chapter and section numbers and names in the header. I'm using this to achieve it (from Including both chapter name and name of section in header using memoir)               \pagestyle{ruled}     \makeoddhead{ruled}{\sffamily\leftmark}{}{\sffamily\rightmark}      This works great most of the time, however for the ToC and bibliography, both of which are two pages long, I have the same label twice in the header, which looks terrible. I would like to only show the `\rightmark` if it's different from the `\leftmark`. Or somehow change the labeling of those two things. For example it works OK in introduction, which is an `\unnumberedchapter` and has no `\section`. I've tried changing `\bibsection` to `\unnumberedchapter` but that didn't help. Thanks.


title: "Display math should end with $$" when using MathML with amsmath and \fbox with tex4ht

text: I just like to get an understanding on why I get this error, only when I use `MathML` and not in other configurations. pdflatex work fine with this MWE. Only when there is an \fox{}, will tex4ht gives an error. The MWE is below, showing 3 cases. The case with the `\fbox` fails only with tex4ht, and only when using `mathml`. Here is the MWE               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \[     \fbox{$\sin(x)=0$}   % OK      \]          \begin{equation}     \sin(x)=0   \tag{1}   % OK     \end{equation}          \begin{equation}     \fbox{$\sin(x)=0$} \tag{1}    %fails only with mathml     \end{equation}          \end{document}      now, pdflatex compiles the above with no problem, here is the pdf ![Mathematica graphics](http://i.stack.imgur.com/vmoNs.png) now, tex4ht compiles it ok, with default html setting:                 htlatex foo.tex "htm"      no error. HTML is generated ok. Now with I use mathml (which I wanted to do for mathjax use), I get an error               >htlatex foo.tex "htm,mathml"     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     .........     (/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html-mml.4ht)     (/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-uni.4ht))     (./foo.aux)     ! Display math should end with $$.     <to be read again>                         \bgroup      l.16 \end{equation}          ?       The error is due to using `\fbox{}` Any idea what is going on? Is this an tex4ht issue, or mathml or something else? The above is small example from autogenerated code by Scientific word. It is generated when I put a box around an equation in display mode. texlive 2013, linux mint


title: When should we use \begin{center} instead of \centering?

text: After reading this question Should I use center or centering for figures?, I want to know the answer of the following. When should we use `\begin{center}` instead of `\centering`? For example, should we use this one?               {%     \centering     <other contents>     }      or this one?               \begin{center}     <other contents>     \end{center}


title: Make the text left side

text: I am trying to write in a template LaTeX document, all the text I am writing is centred. I couldn't find the command causing this problem and I don't know how should I make the text start from left side again (normal LaTeX format). Any suggestion would be appreciated.


title: Which macros define spaces around table and float environments?

text: I am trying to define the length of vertical space between tables and text globally in my document. So far, I have been using                   \setlength{\intextsep}{0cm}         \setlength{\floatsep}{0cm}         \setlength{\textfloatsep}{0cm}         \setlength{\intextsep}{0mm}         \setlength{\belowcaptionskip}{0cm}         \setlength{\abovecaptionskip}{0mm}      in my preamble. Moreover, I also use the caption package, which I define as follows:               \usepackage[%         font=small,         textfont=bf,         nooneline,         justification=raggedright,         format=hang,         labelsep=quad,         skip=0mm     ]{caption}       I don't want the space to be zero, of course, but even if it is set to zero, I still have white space between tables and text as well as caption and text. This leads me to believe that there are more macros involved through whom the space between tables/captions and text is defined. I couldn't find a complete list of the macros involved, however (I looked e.g. here and here). Are there still macros missing from the list above that potentially change the spacing between tables/captions and text? EDIT: A typical table in my document:               \begin{table}[H]     \begin{center}     \begin{tabular}{lll}     1 & 2 & 3 \\     \end{tabular}     \end{center}     \caption{...}     \label{...}     \end{table}      Where option `H` requires the `float` package.


title: \center and \centering

text: > **Possible Duplicate:**   >  When should we use \begin{center} instead of \centering? I found that               \center     \begin{tabular}{...}     ...     \end{tabular}      and               \centering     \begin{tabular}{...}     ...     \end{tabular}      both make the following table centered. My questions are:   1. Are `\center` and `\centering` the same? What is the difference between them?   2. Are they both commands? What are the scopes that they apply to? (note that in the examples, there are no `table` environment.) Thanks!


title: When should \begin{center}\end{center} ever be used?

text: I know that `\begin{center}\end{center}` cause excess white space so it is always suggested that `\centering` should be used which I use all the time. What would ever justify the use this tag? Maybe if you want a title (non official) at the top of a page? What I mean is that you have a document and on page 3 you are going to discuss the `3 body problem` whereas you were on topic about the `2 body problem` previously? Or would another environment suit that better still?


title: Reference equation in align* environment with cleveref

text: In order to control equations numbering I use the `Align*` environment where I put `\numberthis` at the end of the equation that I want to number. After, I label the numbered equation but when I want to make a reference to that equation using `\cref` command of the `cleveref` package I obtain a wrong reference (to another page). It is working with the minimal working example below, but it is not working in my thesis document (the reference send me to a figure in the page before the equation). Could some one say to me if there is something wrong ?               \documentclass[12pt,a4paper,english,french]{book}     \usepackage{amsmath}             \newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}} % for numbering in  the align* environment     \usepackage[colorlinks=true, linkcolor=blue]{hyperref}     \usepackage[nameinlink]{cleveref}     \begin{document}     Text     \begin{align*}     a & = b \numberthis \label{eqn413} \\     c & = d \\     e & = f \\     \end{align*}     \newpage     The \cref{eqn413} show that bla bla.     \end{document}


title: What is the LaTeX code for an "open semicolon"

text: May I know what is the LaTeX code for the following symbol? I can't find it in `detexify`. ![enter image description here](http://i.stack.imgur.com/sNm2u.png)


title: Escaping backslashes in command line

text: **Issue resolved, please see end of question for details** I am passing a file path as a parameter to a tex script, run by pdflatex on Windows. Here's an example of a command:               pdflatex -interaction=nonstopmode -halt-on-error -job-name=c:/target/job1 "\newcommand{\inputFileParam}{c:/Source/job1}\input{c:/Scripts/somescript.tex}"      Note that the paths are delimited using forward slashes. This is not recognized by Windows. **Therefore on Windows I need to use backslashes.** However, I cannot find a way to escape those backslashes that belong to the path correctly. Unless correctly escaped, pdflatex treats the sequences which start with a backslash as commands, and fails with undefined command error. **To summarize, How do I escape the path backslashes in:**               \newcommand{\inputFileParam}{c:\Source\job1}\input{c:\Scripts\somescript.tex}      **EDIT - Solution** The answers below helped separate multiple issues with the above command.   1. Forward slashes work fine in Windows   2. Escaping backslashes is achieved (if needed) by prepending each path part with `\string`:  (for example: `C:\string\dirname\string\filename.ext`)   3. `-job-name` should not contain a full path. `-output-directory` should be used in conjunction with `-job-name` to specify the path, otherwise an error is issued.    4. **The "file not found" error was in fact due to another issue**. As you see, `C:\Source\job1` was provided without extension. Such a file, without extension, indeed exists in the specified directory. However, it seems that pdflatex assumes a PDF extension if none is provided. Therefore when I added the file `C:\Source\job1.pdf` the command worked flawlessly.  It should be noted that the error string both on console and in log referred to "c:\Source\job1" without extension.


title: First reference to equation underlined

text: In these days I'm writing at my Bachelor's Thesis and I've got a new problem. I have to underline the first reference to figures, tables and equations. By searching in the Internet I've already found a solution for the figures an the tables. But I didn't succeed editing the code, so that is would work with equations. Does anybody know, how to change the solution of figures/tables for the equations? I'm using the align-environment for the equations, labeling it with the prefix `eqn:` (`\ref{eqn:abc}`) My Code-Sample:               \documentclass[         pagesize,         DIV = calc,         liststotoc,         bibtotoc,         idxtotoc]{scrreprt}              \usepackage{amsmath}               \newif\ifMeinFormat     %\MeinFormattrue     \MeinFormatfalse          \makeatletter     \@ifdefinable\evtlfett{%     \ifMeinFormat     \let\evtlfett\@firstofone     \else     \let\evtlfett\underline     \fi     }%          \def\p@figure{\expandafter\p@@figure}%     \def\p@@figure#1{\@figmkdef{#1}}%     \DeclareRobustCommand\@figmkdef[1]{%     \@ifundefined{figmk#1}     {%     \global\@namedef{figmk#1}{}%     \evtlfett{Abbildung #1}%     }%     {Abbildung #1}%     }%          \def\p@table{\expandafter\p@@table}%     \def\p@@table#1{\@tablemkdef{#1}}%     \DeclareRobustCommand\@tablemkdef[1]{%     \@ifundefined{tblmk#1}     {%     \global\@namedef{tblmk#1}{}%     \evtlfett{Tabelle #1}%     }%     {Tabelle #1}%     }%          \makeatother          \begin{document}     \section{test}     {\begingroup erster Verweis auf die Figur: \ref{fig} \endgroup}\\     zweiter Verweis auf die Figur: \ref{fig}\\     erster Verweis auf die Table: \ref{tab}\\     zweiter Verweis auf die Table: \ref{tab}\\     erster Verweis auf die Gleichung: \ref{eqn:abc}\\     zweiter Verweis auf die Gleichung: \ref{eqn:abc}\\          \begin{figure}     Irgend ne Figur     \caption{\label{fig}Text}     \end{figure}          \begin{table}     Irgend ne Table     \caption{\label{tab}Text}     \end{table}          \begin{align}     a + b = c \label{eqn:abc}     \end{align}          \end{document}


title: How to make circumflexes wider but still of a fixed size in XeTeX?

text: Circumflexes looks too small and they are to close to the symbol in the PDF generated by XeLaTeX from `UTF-8` source with Asana Math font for mathematics: ![enter image description here](http://i.stack.imgur.com/bAtH8.png) Source:               \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage{fontspec}     \usepackage[math-style=ISO,bold-style=ISO,nabla=upright,partial=upright,vargreek-shape=unicode]{unicode-math}     \setmathfont{[Asana-Math]}          \newcommand*{\op}[1]{\hat{\mathup{#1}}}          \begin{document}          \begin{equation}         \op{H} = \op{T} + \op{V}      \end{equation}          \end{document}      I want to make circumflexes wider to be more clearly separated from the symbols underneath them, but `\widehat` is not an option since it produces circumflexes of variable size. The solution in How can I manually choose the size of a wide accent? (math mode) doesn't work for me. Seems like there is some incompatibility between the `accents` package and `UTF-8` encoding. I really like Asana Math, so I don't want to change the font.


title: How to typeset VBA code in LaTeX?

text: I have a lot of VBA (Visual Basic for Applications, the programming language in Microsoft Office) code which I have to add to my thesis in the appendix. I wonder how I can most comfortably list those lines of code (which have to be structured in a certain way, as there are many, many lines) include those in my pdflatex document. Has anybody here experience with typesetting large amounts of VBA code? * * *               Option Explicit          Sub Signal(strSignalfolge As String, Optional lngTakt As Long = 100)     'Prozedur erzeugt eine Serie von Warntönen.     'Die optionale Variable lngTakt gibt den Takt in Millisekunden vor (Standard: 100 ms)     'Das Muster kann über die String-Variable strSignalfolge beeinflusst werden:     ' Stern (*)     -> 1 Warnton     ' Ziffern 1..9  -> 1..9 Takte Pause     ' Leerzeichen   -> 1 Sekunde Pause     ' Minus (-)     -> 1.5 Sekunden Pause         Dim i As Integer         Dim b As String         For i = 1 To Len(strSignalfolge)             b = Mid(strSignalfolge, i, 1)             Select Case b                 Case "*": beep                 Case 1 To 9: DELAY CInt(b) * lngTakt                 Case " ": DELAY 1000                 Case "-": DELAY 1500             End Select             DELAY lngTakt         Next i          End Sub          Public Function strParse(Data As String, Trenn As String, Nr As Integer)     'Funktion trennt die Zeichenkette <Data>         On Error Resume Next         Dim MainData() As String, SplitData() As String         MainData = Split(Data, Trenn)         SplitData = Split(MainData(Nr - 1), Trenn)         strParse = SplitData(0)     End Function               Public Sub ProtokollZeile(strData As String)     'Gibt eine Protokollzeile im Direktfenster aus: Datum, Uhrzeit und <strData>         Debug.Print Now & " " & strData     End Sub          Sub NetSend(strmsg As String, Optional strEmpf As String = "imf3beck")     'Prozedur sendet die Kurznachricht <strMsg> über das Intranet an den Rechner <strEmpf>         Dim a         a = Shell("cmd.exe /c net send " & strEmpf & " " & strmsg, vbMinimizedFocus)         MsgBox "(net send message)" & vbCr & strmsg     End Sub          Sub NetSendMessungBeendet(Optional strBem As String = "")     'Sendet über das Netzwerk eine Statusnachricht, dass die Messung beendet wurde und gibt diese     'Nachricht auch lokal als Warndialog aus     Dim strMsgText As String     strMsgText = (Format(Now, "hh:mm:ss") & " Messung beendet" & strBem)     NetSend (strMsgText)     End Sub          Public Function ZellBereichAdresse(strZellber As String) As String     Application.Volatile     ZellBereichAdresse = CStr(Range(strZellber).Address)     End Function


title: Can anyone explain why setting \lineskiplimit breaks align?

text: OK, so this is a follow-up to one of my previous questions: If you uncomment the `\lineskiplimit` line, LaTeX goes crazy. Why? Does anyone have an idea how to fix it (without manually changing `\lineskiplimit` temporarily, or hacking into `amsmath`, which seems a bit nightmare-ish)?               \documentclass{article}          %\lineskiplimit=-\maxdimen     \usepackage{amsmath}          \begin{document}     A sample aligned equation:     \begin{align*}       c^2&=a^2+b^2     \end{align*}     \end{document}


title: Converting MS Word mathtype to LaTeX

text: Does anyone know of an easy, effective, and preferably free way to convert Word documents with Mathtype 5.2 equations to the LaTeX format?


title: Tex Nested Loops

text: I am trying to write a simple nested loop in LaTex, without using any special packages, using only the \loop...\if... \repeat syntax. I think I may be lacking a basic understanding of the rules for this construct, namely, are nested loops allowed? My application is a simple diary generator, below is a simplified version of the code which does not work. Instead of printing out 12 months worth of 30 days, it gives the output at the bottom of the page.               \newcounter{currentday}     \newcounter{currentmonth}     \newcommand{thecurrentmonth}{\arabic{currentmonth}}     \newcommand{thecurrentday}{\arabic{currentday}}          \newcommand{\makewholediaryflat}{%             \setcounter{currentday}{1}        \setcounter{currentmonth}{1}                  \loop % MONTH          Including a month: \thecurrentmonth               \setcounter{currentday}{1}%               \loop% DAY            Inputting Day \thecurrentday of month \thecurrentmonth                 \addtocounter{currentday}{1}                 Deciding whether to input day \thecurrentday...                 \ifnum\value{currentday}< 30           \repeat% DAY                \addtocounter{currentmonth}{1}                Deciding whether to input month \thecurrentmonth...                \ifnum\value{currentmonth}<13         \repeat% MONTH            }          \begin{document}       \makewholediaryflat     \end{document}      Any simple thing that I am missing here as to why this would not work? The output from the program is:               Including a month: 1     Inputting Day 1of month 1     Deciding whether to input day 2...     Inputting Day 2of month 1     Deciding whether to input day 3...     Inputting Day 3of month 1     Deciding whether to input day 4...     Inputting Day 4of month 1     Deciding whether to input day 5...     Inputting Day 5of month 1     Deciding whether to input day 6...     Inputting Day 6of month 1     Deciding whether to input day 7...     Inputting Day 7of month 1     Deciding whether to input day 8...     Inputting Day 8of month 1     Deciding whether to input day 9...     Inputting Day 9of month 1     Deciding whether to input day 10...     Inputting Day 10of month 1     Deciding whether to input day 11...     Inputting Day 11of month 1     Deciding whether to input day 12...     Inputting Day 12of month 1     Deciding whether to input day 13...     Inputting Day 13of month 1     Deciding whether to input day 14...     Inputting Day 14of month 1     Deciding whether to input day 15...     Inputting Day 15of month 1     Deciding whether to input day 16...     Inputting Day 16of month 1     Deciding whether to input day 17...     Inputting Day 17of month 1     Deciding whether to input day 18...     Inputting Day 18of month 1     Deciding whether to input day 19...     Inputting Day 19of month 1     Deciding whether to input day 20...     Inputting Day 20of month 1     Deciding whether to input day 21...     Inputting Day 21of month 1     Deciding whether to input day 22...     Inputting Day 22of month 1     Deciding whether to input day 23...     Inputting Day 23of month 1     Deciding whether to input day 24...     Inputting Day 24of month 1     Deciding whether to input day 25...     Inputting Day 25of month 1     Deciding whether to input day 26...     Inputting Day 26of month 1     Deciding whether to input day 27...     Inputting Day 27of month 1     Deciding whether to input day 28...     Inputting Day 28of month 1     Deciding whether to input day 29...     Inputting Day 29of month 1     Deciding whether to input day 30...     Inputting Day 30of month 1     Deciding whether to input day 31...     Deciding whether to input month 2...     Deciding whether to input month 3...     Deciding whether to input month 4...     Deciding whether to input month 5...     Deciding whether to input month 6...     Deciding whether to input month 7...     Deciding whether to input month 8...     Deciding whether to input month 9...     Deciding whether to input month 10...     Deciding whether to input month 11...     Deciding whether to input month 12...     Deciding whether to input month 13...     Deciding whether to input month 14...     Deciding whether to input month 15...     Deciding whether to input month 16...     Deciding whether to input month 17...     Deciding whether to input month 18...     Deciding whether to input month 19...     Deciding whether to input month 20...     Deciding whether to input month 21...     Deciding whether to input month 22...     Deciding whether to input month 23...     Deciding whether to input month 24...     Deciding whether to input month 25...     Deciding whether to input month 26...     Deciding whether to input month 27...     Deciding whether to input month 28...     Deciding whether to input month 29...     Deciding whether to input month 30...     Deciding whether to input month 31...


title: A problem with numbering the problem part of my book in the table of contents

text: I want that the Problem's part of my book be considered at the table of content but I don't want it be numbered in my main text as a section . How can I Handle it ?               \dodumentclass{book}     \begin{document}          \maketitle     \tableofcontents     \listoffigures      \listoftables                    \section{problem}     \end{document}


title: Tikzpicture with overlay takes up space

text: Consider this MWE:               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[remember picture,overlay]         \node [circle, fill=red!90!black, minimum width=15em] at (current page.center) {};     \end{tikzpicture}          \section{Amazing movable type!}     \end{document}      The section title is moved even though the picture with overlay should take up no space. Try inputting just a section title without `tikzpicture`, and notice that there is less vertical space above section title:               \documentclass{article}          \begin{document}     \section{Amazing movable type!}     \end{document}      or see illustration: ![Tikzpicture with overlay takes up space](http://i.stack.imgur.com/eo8aI.png) The behavior is the same with comments which should eat up spaces:               \documentclass{article}     \usepackage{tikz}          \begin{document}%     %     \begin{tikzpicture}[remember picture,overlay]%         \node [circle, fill=red!90!black, minimum width=15em] at (current page.center) {};%     \end{tikzpicture}%     %     \section{Amazing movable type!}     \end{document}      I noticed that extra vertical space is added when:   * tikzpicture is inputted before `section` titles   * tikzpicture is inputted before `description` environment   * tikzpicture is inputted before `itemize` environment   * tikzpicture is inputted before `enumerate` environment Tikzpicture behaves as expected with normal text. For example, this will work fine:               \documentclass{article}     \usepackage{lipsum, tikz}          \begin{document}     \section{Amazing movable type!}     \begin{tikzpicture}[remember picture,overlay]         \node [circle, fill=red!90!black, minimum width=15em] at (current page.center) {};     \end{tikzpicture}%but you must not leave some space here, otherwise, a single blank space is shown before text.     \lipsum[13]          \end{document}      Why is that happening and how can it be prevented? The `\useasboundingbox (0,0);` suggestion from Make tikz picture floating does not help. ## edit Caramdir's suggestion to input`\nointerlineskip` before `tikzpicture` seems to fix vertical space issue for section titles, but descriptions and similar environments still have undesired extra vertical space. See illustration: ![nointerlineskip kludge](http://i.stack.imgur.com/VXiXd.png)


title: Typearea setting except for frontmatter

text: Is it possible to get a page layout for a document with typearea package EXCEPT for frontmatter (the cover of my thesis), which should be a classic book-oneside documentclass? my current code (simplified) is:               \documentclass[10pt,a4paper,italian,oneside]{book}     \usepackage[headinclude = true, footinclude=false]{typearea}          \setlength{\footnotesep}{0.3cm}     \setlength{\skip\footins}{1cm}     \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}          \usepackage{subcaption}     \usepackage{gensymb}     \usepackage{url}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}           \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage[italian]{babel} %sillabazione     \usepackage{enumerate}          \usepackage{array}     \usepackage{fancyhdr}     \pagestyle{fancy}          \renewcommand{\chaptermark}[1]{%     \markboth{\thechapter\ #1}{}}          \fancyhf{}     \fancyhead[R]{\bfseries\thepage}     \fancyhead[L]{\bfseries\nouppercase{\leftmark}}          \usepackage{float}     \usepackage{algorithm}     \floatname{algorithm}{Algoritmo}     \usepackage{algorithmic}     \usepackage{listingsutf8,multicol}          \usepackage{natbib}          \usepackage{setspace}          \numberwithin{figure}{chapter}     \numberwithin{table}{chapter}          \usepackage{hyperref}     \hypersetup{bookmarksnumbered}               \linespread{1.5}          \begin{document}          \frontmatter          \input{./beginEnd/title.tex}     \cleardoublepage     \tableofcontents          \typearea[2mm]{12}     \recalctypearea          \mainmatter          \input{./chapters/chapter01_introduzione.tex}     \input{./chapters/chapter02_movementepathfinding.tex}          \backmatter          \bibliographystyle{alpha}     \nocite{*}     \bibliography{./beginEnd/biblio}     \addcontentsline{toc}{chapter}{Bibliografia}          \end{document}      * * * EDIT: I managed to set my custom DIV and BCOR settings only after the title page and the table of content in the following way:               \documentclass[10pt,a4paper,italian,oneside]{book}     \usepackage{typearea}          \setlength{\footnotesep}{0.3cm}     \setlength{\skip\footins}{1cm}     \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}          \usepackage{subcaption}     \usepackage{gensymb}     \usepackage{url}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}           \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage[italian]{babel} %sillabazione     \usepackage{enumerate}          \usepackage{array}     \usepackage{fancyhdr}               \renewcommand{\chaptermark}[1]{%     \markboth{\thechapter\ #1}{}}          \fancyhf{}     \fancyhead[R]{\bfseries\thepage}     \fancyhead[L]{\bfseries\nouppercase{\leftmark}}          \usepackage{float}     \usepackage{algorithm}     \floatname{algorithm}{Algoritmo}     \usepackage{algorithmic}     \usepackage{listingsutf8,multicol}          \usepackage{natbib}          \usepackage{setspace}          \numberwithin{figure}{chapter}     \numberwithin{table}{chapter}          \usepackage{hyperref}     \hypersetup{bookmarksnumbered}               \linespread{1.5}          \begin{document}          \frontmatter          \input{./beginEnd/title.tex}     \cleardoublepage     \tableofcontents          \KOMAoptions{DIV=12,BCOR=2mm,headinclude=true,footinclude=false}     \recalctypearea     \pagestyle{fancy}          \mainmatter          \input{./chapters/chapter01_introduzione.tex}     \input{./chapters/chapter02_movementepathfinding.tex}          \backmatter          \bibliographystyle{alpha}     \nocite{*}     \bibliography{./beginEnd/biblio}     \addcontentsline{toc}{chapter}{Bibliografia}          \end{document}      For pages after the table of content it obviously work, but calling \usepackage{typearea} already loads some default values for DIV and BCOR, so the title page and the table of content are already affected. Instead, what I would like to achieve is having these two pages with the same top and bottom margin ratio as defined by the default latex book class (which should be 1:1, instead of KOMAscript's 1:2). Is there a way to say: "start KOMAscripting my pages only from this particular point"?


title: Wrap text around a tabular

text: I would like to wrap some text around a `tabular` as the figure shows. Do I have to use `minipage` and fix the width of the table, and the width of the text on the left hand? Isn't there a simpler way? ![enter image description here](http://i.stack.imgur.com/ndsVE.png)


title: How can I get my footnotes placed similarly in the columns of my document

text: I just noticed that footnotes on the first and last page of a document get placed differently as demonstrated in this MWE. In this particular example, the problem shows up in a two-column document where the second column is seen by LaTeX to act in the role of the last page.               \documentclass{article}     \usepackage[landscape,                 twocolumn,                 margin=0.5in,                ]{geometry}     \setlength{\columnsep}{3em}     \setlength{\columnseprule}{0.4pt}     \usepackage{lipsum}     \pagestyle{empty}     \begin{document}          This is a short section\footnote{Hello}          \pagebreak     \setcounter{footnote}{0}          This is a short section\footnote{Hello}          \end{document}      For the purposes of my document, the left and right columns should be identically typeset. So, I'm not happy that the footnotes get placed differently. What I would prefer is that both footnotes get placed as the first footnote in the left hand column. Any ideas how to do this?


title: Is there a nice way to make a strikethrough for the square subset character in LaTeX?

text: I am working on some math that uses the square subset notation. I need a good way to strikethrough the character in LaTeX. I have tried using the package "cancel" but the strikethrough it produces for the squaresubset character is ugly and looks out of place relative to ⊈ which looks quite nice.


title: How can I turn Vim LatexSuite on Manually?

text: VLS's commands such as `^J` and `F5` do not work always for me inside Vim so how can turn VLS manually or do some other tricks to get VLS working more often? The word "often" could mean that VLS gets triggered with every *.tex -ended file. Also, how can I see whether the VLS is even enabled?               $ cat ~/.vimrc          filetype plugin on     set modeline     set modelines=20      **Perhaps related**   1. Help me to write Long LaTeX equations fast with colours and possibly with other aids   2. http://vim-latex.sourceforge.net/


title: In tikz \node's text, how to use \multiinclude to include several pictures?

text: This code tries to use \multiinclude from `xmpmulti` inside a tikz node text to include for example a series of files pic-0.pdf, pic-1.pdf,..., etc. and doesn't compile and throws out error listed below. Is it possible to use \multiinclude in a tikz node? If it is, how to do it? Or if not, is there alternative ways to manage the same effect: showing a stack of slides inside a tikz node?               \documentclass{beamer}          \usepackage{tikz}     \usepackage{xmpmulti}          \begin{document}     \begin{frame}       \begin{tikzpicture}         \node {           \multiinclude[format=pdf,graphics={width=.45\textwidth}]{pic}         };       \end{tikzpicture}     \end{frame}     \end{document}      The error beamer gives is               ! Package tikz Error: Giving up on this path. Did you forget a semicolon?.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.14 \end{frame}          ! You can't use `\lastskip' in restricted horizontal mode.     \@let@token ...{}\beamer@lastskipcover =\lastskip                                                    \edef \beamer@lastskiptext...     l.14 \end{frame}


title: modernCV seems to forbid any hyphenation. How can I switch that off?

text: I'm writing a document with the help of the `modernCV` class, using (a modification of) the `casual` style. It looks like this class is penalizing hyphenation pretty severely. Why is that so? I can't find something like `\hyphenpenalty=` set to a very high value in `moderncv.cls`. How can I allow hyphenation in the cover letter?