title: How to apply Tikz-styles in a /tabular{} definiton

text: I'm just starting out with Tikz, and find it amazing - but a bit overwhelming too. So here is an absolute beginners question: I copied this form somebody:               % Draw inside tables:     % Some options common to all the nodes and paths     \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt]     \tikzstyle{every path}+=[thick, rounded corners]      here      It was meant for drawing circles around tables or columns in a LaTeX table like this (there is a counter defined, so I can use numbers in referencing the tabnodes):               \begin{table}[htbp]     \begin{tabular}{ ...     \tabnode{$null?(s)$} & \tabnode{true} & \tabnode{false} ...     \end{tabular}     \begin{tikzpicture}[overlay]     % Define the circle paths     \draw [black](3.north west) -- (5.north east) --      (5.south east) -- (3.south west)  -- cycle;     ...     \end{tikzpicture}     \end{table}      This worked just fine, until I started to add other, independent, Tikz graphics to the document. Then, of course, the "options common to all the nodes and paths" caused problems, since they should not apply to the new independent graphs too. So my question is: how do I, after changing the "every picture", "every node","every path" definitions to, say, "overlay_picture", "overlay_node" and "overlay_path", apply these new definitions to the table definition? EDIT: (1) tabular overlay works, independent graphics not:               \documentclass[german, a4paper, table]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{latexsym}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}     \usepackage{tkz-graph}     \usepackage{tabularx}               %% (1) Draw inside tables :     %% Some options common to all the nodes and paths     \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt]     \tikzstyle{every path}+=[thick, rounded corners]          %% (2) Draw inside tables :     % \tikzset{mytablestyle/.style={% Now everything inside these braces are local to mytablestyle     %          every picture/.style={remember picture,baseline},     %          every node/.append style={     %                          inner sep=0pt,anchor=base,     %                          minimum width=1.8cm,align=center,     %                          text depth=.25ex,outer sep=1.5pt},     %                          every path/.append style={thick, rounded corners}     %         }     % }               % tikz definitions for other, independent pictures     \tikzstyle{abstract}=[rectangle, draw=black, rounded corners,     fill=blue!40, drop shadow, text centered, anchor=north, text=white,     text width=3cm]          \tikzstyle{comment}=[rectangle, draw=black, rounded corners,     fill=green, drop shadow, text centered, anchor=north, text=white, text     width=3cm]          \tikzstyle{myarrow}=[->, >=open triangle 90, shorten >=3mm, thick]          \tikzstyle{line}=[-, thick]               \begin{document}           %%% table with overlay     % Introduce a new counter for counting the nodes needed for circling     \newcounter{nodecount}     % Command for making a new node and naming it according to the nodecount counter     \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node (\arabic{nodecount}) {#1};}          % table     \begin{table}[htbp]       \centering     \begin{tabular}{ l@{\hspace{8mm}} !{\vrule width 1.5pt}         @{\hspace{10mm}} c@{\hspace{10mm}} c@{\hspace{10mm}}}       & \multicolumn{2}{l}{\large{constructor of s}} \\       \large{observations} & \tabnode{$nil$} & \tabnode{$adjoin(s', n)$}\\          \noalign{\hrule height 1.5pt}     \tabnode{$null?(s)$} & \tabnode{true} & \tabnode{false} \\     \tabnode{$head(s)$} & \tabnode{\textbf{error}} & \tabnode{n\vphantom{h}}\\      \tabnode{$tail(s)$} & \tabnode{\textbf{error}} & \tabnode{s'} \\      \end{tabular}     \begin{tikzpicture}[overlay]     % Define the circle paths     \draw [black](3.north west) -- (5.north east) --      (5.south east) -- (3.south west)  -- cycle;     \draw [black](6.north west) -- (8.north east) --      (8.south east) -- (6.south west)  -- cycle;     \draw [black](9.north west) -- (11.north east) --      (11.south east) -- (9.south west)  -- cycle;     \end{tikzpicture}     \end{table}               % independent tikz graphic     \begin{figure}[htp]      \centering     \begin{tikzpicture}[node distance=2cm]         \node (Fahrzeug) [abstract, rectangle split, rectangle split parts=2]             {                 \textbf{Fahrzeug}                 \nodepart{second}fortbewegen()             };         \node (Landfahrzeug) [abstract, rectangle split, rectangle split         parts=2, below left=of Fahrzeug]             {                 \textbf{Landfahrzeug}                 \nodepart{second}override \\ fortbewegen()             };         \node (Wasserfahrzeug) [abstract, rectangle split, rectangle split         parts=2, below right=of Fahrzeug]             {                 \textbf{Wasserfahrzeug}                 \nodepart{second}override \\ fortbewegen()             };             \node (Amphibienfahrzeug) [abstract, rectangle split, rectangle        split parts=2, below right=of Landfahrzeug]             {               \textbf{Amphibien-}\\               \textbf{fahrzeug}                 \nodepart{second}\phantom{()}             };              \draw[myarrow] (Landfahrzeug.north) --  (Fahrzeug.south);         \draw[myarrow] (Wasserfahrzeug.north) --  (Fahrzeug.south);         \draw[myarrow] (Amphibienfahrzeug.north) --  (Landfahrzeug.south);         \draw[myarrow] (Amphibienfahrzeug.north) --  (Wasserfahrzeug.south);     \end{tikzpicture}     \end{figure}     \end{document}       Output: ![Table overlays work](http://i.stack.imgur.com/oFUY5.png) (2) Independent graphics work, but table overlays not:               \documentclass[german, a4paper, table]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{latexsym}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}     \usepackage{tkz-graph}     \usepackage{tabularx}               %% (1) Draw inside tables :     %% Some options common to all the nodes and paths     % \tikzstyle{every picture}+=[remember picture,baseline]     % \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     % minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt]     % \tikzstyle{every path}+=[thick, rounded corners]          % (2) Draw inside tables :     \tikzset{mytablestyle/.style={% Now everything inside these braces are local to mytablestyle              every picture/.style={remember picture,baseline},              every node/.append style={                              inner sep=0pt,anchor=base,                              minimum width=1.8cm,align=center,                              text depth=.25ex,outer sep=1.5pt},                              every path/.append style={thick, rounded corners}             }     }               % tikz definitions for other, independent pictures     \tikzstyle{abstract}=[rectangle, draw=black, rounded corners,     fill=blue!40, drop shadow, text centered, anchor=north, text=white,     text width=3cm]          \tikzstyle{comment}=[rectangle, draw=black, rounded corners,     fill=green, drop shadow, text centered, anchor=north, text=white, text     width=3cm]          \tikzstyle{myarrow}=[->, >=open triangle 90, shorten >=3mm, thick]          \tikzstyle{line}=[-, thick]               \begin{document}           %%% table with overlay     % Introduce a new counter for counting the nodes needed for circling     \newcounter{nodecount}     % Command for making a new node and naming it according to the nodecount counter     \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node (\arabic{nodecount}) {#1};}          % table     \begin{table}[htbp]       \centering     \begin{tabular}{ l@{\hspace{8mm}} !{\vrule width 1.5pt}         @{\hspace{10mm}} c@{\hspace{10mm}} c@{\hspace{10mm}}}       & \multicolumn{2}{l}{\large{constructor of s}} \\       \large{observations} & \tabnode{$nil$} & \tabnode{$adjoin(s', n)$}\\          \noalign{\hrule height 1.5pt}     \tabnode{$null?(s)$} & \tabnode{true} & \tabnode{false} \\     \tabnode{$head(s)$} & \tabnode{\textbf{error}} & \tabnode{n\vphantom{h}}\\      \tabnode{$tail(s)$} & \tabnode{\textbf{error}} & \tabnode{s'} \\      \end{tabular}     \begin{tikzpicture}[overlay]     % Define the circle paths     \draw [black](3.north west) -- (5.north east) --      (5.south east) -- (3.south west)  -- cycle;     \draw [black](6.north west) -- (8.north east) --      (8.south east) -- (6.south west)  -- cycle;     \draw [black](9.north west) -- (11.north east) --      (11.south east) -- (9.south west)  -- cycle;     \end{tikzpicture}     \end{table}               % independent tikz graphic     \begin{figure}[htp]      \centering     \begin{tikzpicture}[node distance=2cm]         \node (Fahrzeug) [abstract, rectangle split, rectangle split parts=2]             {                 \textbf{Fahrzeug}                 \nodepart{second}fortbewegen()             };         \node (Landfahrzeug) [abstract, rectangle split, rectangle split         parts=2, below left=of Fahrzeug]             {                 \textbf{Landfahrzeug}                 \nodepart{second}override \\ fortbewegen()             };         \node (Wasserfahrzeug) [abstract, rectangle split, rectangle split         parts=2, below right=of Fahrzeug]             {                 \textbf{Wasserfahrzeug}                 \nodepart{second}override \\ fortbewegen()             };             \node (Amphibienfahrzeug) [abstract, rectangle split, rectangle        split parts=2, below right=of Landfahrzeug]             {               \textbf{Amphibien-}\\               \textbf{fahrzeug}                 \nodepart{second}\phantom{()}             };              \draw[myarrow] (Landfahrzeug.north) --  (Fahrzeug.south);         \draw[myarrow] (Wasserfahrzeug.north) --  (Fahrzeug.south);         \draw[myarrow] (Amphibienfahrzeug.north) --  (Landfahrzeug.south);         \draw[myarrow] (Amphibienfahrzeug.north) --  (Wasserfahrzeug.south);     \end{tikzpicture}     \end{figure}     \end{document}       Here is the output again, after compiling two times (sorry for the overly big output graphics): ![Independent graphics work, overlay not](http://i.stack.imgur.com/Fuk3D.png)


title: Overfull hbox (in the middle of page) in ToC with tocloft package and cftchapaftersnum

text: To customize the appearance of our Table of contents we use the tocloft package. One point we would like to implement is to underline the chapter entries in the ToC. However, if we use the `\cftchapaftersnum` command to specify a horizontal line we always get a weird overfull hbox warning. (Weird, because if I shorten the line, the overfull hbox is shown in the middle of the page. Small example compiled with MikTeX and pdfLaTeX:               \documentclass[draft]{book} % use draft to show overfull hboxes          \usepackage{tocloft}     % underline chapter entries:     \renewcommand{\cftchapaftersnum}{\hspace{4mm}\rule[-0.5mm]{0.5\textwidth}{.4pt}}           \begin{document}          \tableofcontents          \chapter{Antelope}     Antelope is a term referring to many even-toed ungulate      species found all over the world.          \rule[-0.5mm]{0.5\textwidth}{.4pt}      This \verb|\rule| does not generate a warning!          \section{Impala}     An impala is a medium-sized African antelope.          \emph{fin \dots}          \end{document}      Note that I've placed `0.5\textwidth` as ruler width in the example above. This way, my draft PDF shows the black rectangle for the overfull box in the middle of the page (just at the end of the `\rule`) What's going on here?


title: A question about customizing ref in enumitem package

text: I'm experimenting with **enumitem** version 3.4 (released Aug 2011) a little but facing a problem in customizing the `ref`. What I'm trying to reach is simple: Have list label in the form **1.1.3.** for example. This is easy using the `label*` key. However, I don't want the references to take the same form as the label. This is because the **dot** (.) at the end is inconvenient to appear in the middle of a sentence. So I defined the list as follows:               \newlist{procedureflow}{enumerate}{2}     \setlist[procedureflow,1]{label*=\color{blue!80!black}\arabic*.,ref=\arabic*}     \setlist[procedureflow,2]{label*=\color{green!80!black}\arabic*.,ref=\arabic{enumi}.\arabic*}      The problem with the above code is that the part `ref=\arabic{enumi}.\arabic*` evaluates using the current value of `enumi` which of course has nothing to do with the list that is yet to come later in the source file :( Here is the code in which the list is created:               \begin{procedureflow}         \item First         \item Second         \begin{procedureflow}              \item First First              \item Second Second\label{mylabel}         \end{procedureflow}     \end{procedureflow}     Here is a cross reference: \ref{mylabel}      There are similar examples in the user guide of enumitem (chapter 5, page 9), so I wonder how could I use the `ref` key to have the reference displayed as **1.1.3** (i.e. without a **dot** at the end)? (I feel something is not right in `enumitem` in that regard! At least the example seems not useful to me)


title: Modify smartcite from biblatex to change behaviour based on prenote

text: I have a question about the smartcite command from biblatex. I redefined it in the following way:               \documentclass{article}     \usepackage[style=alphabetic, autocite=footnote]{biblatex}          \DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]         {\usebibmacro{prenote}}         {\usebibmacro{citeindex}%                    \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}         {\multicitedelim}         {}          \DeclareMultiCiteCommand{\smartcites}        [\iffootnote\mkbibparens\mkbibfootnote]{\smartcite}{\multicitedelim}          \DeclareAutoCiteCommand{footnote}[f]{\smartcite}{\smartcites}          \begin{filecontents*}{bibliography.bib}     @BOOK{ABC,       author = {Cornelisse, J. W. and Schöyer, H. Ferry R. and Wakker, Karel F.},       title = {Rocket Propulsion and Spaceflight Dynamics},       year = {1979},       publisher = {Pitman},     }     \end{filecontents*}          \bibliography{bibliography.bib}          \begin{document}        Normal text\footnote{Some text \autocite[][20]{ABC}}.}     \end{document}      With this I get a footnote citation within the normal text and a parenthesized citation in a footnote when using the `\autocite` command. The problem is when I use e.g. `\footnote{Some text \autocite[][20]{ABC}}.}` I get as result `Some text ([ABC, S. 20]).` but what I would like to see is `Some text [ABC, S. 20].` when I don't give a prenote. But when there is a prenote like `\footnote{Some text \autocite[see][20]{ABC}}.}` I would like to get `Some text (see [ABC, S. 20]).` as a result. I tried to redefine the `\smartcite` command with:                  \DeclareCiteCommand{\smartcite}[\iffootnote{\ifthenelse{\iffieldundef{prenote}}{\textnormal}{\mkbibparens}}{\mkbibfootnote}]         {\usebibmacro{prenote}}         {\usebibmacro{citeindex}%                    \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}         {\multicitedelim}         {}      but it seems like the `\ifthenelse` command has no effect. Has anybody an idea how to fix it? Regards


title: Prevent line break before equation environment in enumerated list item

text: Suppose I have something like               \begin{enumerate}       \item          \begin{equation*}            some eq          \end{equation*}       \item          \begin{IEEEeqnarray*}{l}            eq 1 \\            eq 2 \\            ...            eq n          \end{IEEEeqnarray*}     \end{enumerate}      how would one go about removing the resulting line break that occurs when the equation starts, for both single line and multi-lined equations, so that the equation and the item numbering are aligned together? I thought this would be a relatively common issue but I can't find another post related to it - preventing the line break when beginning an item in an enumerated list with a new environment.


title: TikZ/PGF bounding box too large

text: I have a pdf graphic that needs to be inserted into a TikZ environment (where I can annotate it). However, the bounding box that is placed around the image includes unnecessary whitespace. The command is simply                 \begin{tikzpicture}        \node at (0,0) {\includegraphics[width=1.0\linewidth]{figure.pdf}};       \draw (current bounding box.south west) rectangle (current bounding box.north east);       \end{tikzpicture}      The bounding box for the actual pdf is tight. However, the result, outputted by tikz is not. There is significant whitespace on all sides. How do you tighten the bounding box?


title: I have two TOC - but one can´t be removed -

text: I have a TOC even but I did remove the `\tableofcontents`. If I add `\tableofcontents` I get TWO TOC but with diff "view"... One can't be removed.. How do I remove the unwanted toc? This TOC has no Header: "Innehållsförteckning” (Swedish)


title: How to convert a document from article to report?

text: Is there another way of doing this besides doing a manual find "section"/ replace all with "chapter" (and the same for subsections, subsubsections etc.) ?


title: brace in cases environment being displayed incorrectly because of package yhmath

text: Could someone please explain why I get this when using a cases environment? ![Broken cases brace](http://i.stack.imgur.com/397bt.png) The code behind this is               $$     \underbrace{\mathrm{u}(\tau )}_{\substack{=1\\ \text{για}\ \tau >0}} \underbrace{\mathrm{u}(t-\tau )}_{\substack{=1\\ \text{για}\ \tau <t}} =       \begin{cases}         1 & \text{για} \ 0<\tau <t, \ t>0 \\         &  \\         0 & \text{αλλού}       \end{cases}     $$      After following some advice in the comments, I have come to the conclusion that this only happens when including package yhmath. In particular, the offending command in that package is: \DeclareSymbolFont{largesymbols}{OMX}{yhex}{m}{n} Now, given that I've been including this package in most of the books I have written, and have no quick way of finding which of the package's commands I have been using, is there some workaround?


title: Horizontal Line Separating Steps in Aligned Equation

text: I have an equation that I'm trying to display with horizontal line separation. The result I'm looking for is similar to this question, but I'm not sure how to apply it to my equation (below).               \begin{equation*}     \begin{aligned}     x + 3& = &7\\     -3 & = &-3\\     x& = &4\\     \end{aligned}     \end{equation*}      Thanks!


title: hyperref vs includepdf

text: \documentclass[12pt,a4paper]{mwrep}     \usepackage{polski}     \usepackage[cp1250]{inputenc}     \usepackage{pdfpages}     \usepackage[hidelinks]{hyperref}     \renewcommand\baselinestretch{1.5}          \usepackage{etoolbox}     \patchcmd{\thebibliography}{*}{}{}{}          \makeatletter     \pretocmd{\tableofcontents}{%       \if@openright\cleardoublepage\else\clearpage\fi       \pdfbookmark[0]{\contentsname}{toc}%     }{}{}%     \makeatother          \begin{document}     %\begin{titlepage}     %\includepdf[pages=1-]{titlepage.pdf}     %\end{titlepage}     \tableofcontents     \chapter{A}     a\dots     \chapter{B}c\dots     \chapter{D}     d\dots     \chapter{E}     e\dots          \begin{thebibliography}{999}     \bibitem{bib1}Author:     \emph{Title},     Publisher, Year     \end{thebibliography}     \end{document}      Everything works good, I have nice links in pdf viewer. But when I uncomment three lines with `includepdf` I got errors when trying to compile. `titlepage.pdf` contains two pages but I don't think this is relevant. Second question, how can I add something to bookmars (generated by `hyperref`)? I want to add ~~ToC as well as~~ first page of `titlepage.pdf`. Also, adding `titlepage.pdf` brokes page numeration in pdf viewer (bookmarks). When I try to go to page 7, I to to page 5 instead. Can it be fixed? (I know it is the result of adding two extra pages at the beginning). Also, `hyperref` changes Polish letters.   I have chapter `Wstęp` but in bookmarks there is `Wstep`.   Can it be fixed? EDIT:   Bookmark to ToC solved. EDIT 2:   One more thing that I need is adding included pdf's first page to bookmarks.


title: Calling \end{document} in a macro

text: I have a file, which is meant to be used as a fragment file inside a larger document:               \include{boilerplate}     content     \include{boilerplate}      The goal is to make a fragment file compilable. So inside boilerplate.tex, I have:               \ifx\maindocument\undefined         \documentclass{article}         \def\maindocument{}         \begin{document}         fragment is now standalone     \else          fragment is finished         \end{document}     \fi      When I compile the fragment, I get:               (\end occurred when \ifx on line 1 was incomplete)      The "cause" of this is that inside my \ifx, I end the document and so the \ifx never finishes. However, everything seems to compile properly. How can I keep this general format, but make the error message go away? I tried putting an \expandafter{\end{document}} but that didn't help. * * * After incorporating the suggestions about \enddocument (or another macro), I was able to remove the error. However, a few remain:               (\end occurred when \iftrue on line 3 was incomplete)     (\end occurred when \ifnum on line 3 was incomplete)      Here is my boilerplate.tex now:               \def\prestuff{%         \documentclass{article}         \def\maindocument{}         \begin{document}         fragment is now standalone     }          \def\poststuff{%         fragment is finished         \end{document}     }          \ifx\maindocument\undefined         \expandafter\prestuff     \else          \expandafter\poststuff     \fi      So what about these errors?


title: Error "Reconstruction failed" with soul package

text: I've got a problem with the soul package while adding a letter-spacing to a result of a command that is defined just like this:               \newcommand{\myCommand}{some text}      In the document I'd like to have the result of that command displayed with letter-spacing:               \par{\centering{\Huge      \textbf{\myAnotherCommand{} \textsc{\so{\myCommand{}}}}     }\bigskip\par}      but I get "Package soul error: Reconstruction failed" and a black square after the text "some text". If I understand soul package documentation properly, it's a problem with "grouping hyphenatable material" or font switching commands, isn't it? Unfortunately, I've no idea how to fix it. Am I supposed to register some command with \soulregister? I'd be grateful for any advice.


title: Can images and tables be always placed immediately after the paragraph they are first mentioned, even if white-space needed to move to another page?

text: I would like to ensure that when I mention a table/figure in the text, the figure/table will appear after that paragraph ends. Even if this means leaving the rest of the page blank and putting the figure/table onto the next page. Is this possible?


title: Execute xelatex

text: My xelatex application in "C" directory. My Tex file is in "D" Directory. How can I run my tex file in "D" Drive? and cmd prompt?


title: Journal of Statistical Software class breaks preview in AUCTeX

text: I'm using `AUCTeX 11.86-11` on Debian stable. The `jss.sty` style file contained in the JSS style file zip archive breaks AUCTeX's preview for me even with a simple file. NOTE: the `jsslogo.jpg` file is also required. For example,the following file               \documentclass[article]{jss}      \begin{document}      $x$      \end{document}      gives the error > LaTeX found no preview images The more detailed error is:               ERROR: Illegal parameter number in definition of \MYLATEXline.          --- TeX said ---     <to be read again>                         1     l.386   \gdef\FV@BeginScanning#1^^M                                        {%      Can any AUCTeX user   1. confirm this   2. tell me what the problem is? I'll also try the AUCTeX list and update here if a solution is found.


title: caption of a table

text: I've got the following code:               \begin{center}     \sffamily     \captionof{table}{Codexample}     \begin{tabular}{ll}     \topule[2.5pt]     exampleline & example \\     ...     \bottomrule[2.5pt]     \end{tabular}     \end{center}      I've added the `\captionof{table}{..}` in order to give my table a heading. I assume that the whole table is a floating object (I hope this is the right English expression) and LaTex decides more or less where to put it. My problem is: In my document I've got some text before the table. LaTex produces an ugly PDF document: _The title of the table is on one page and the table itself on the next page._ How to correct that?


title: How to put a picture to the top right of a page?

text: I have written in TeX the following:               \section{A}     ... somethingA ...          \begin{picture}(100, 100)(-250, -110)     \includegraphics[scale=1]{face.png}     \end{picture}          \section{B}     ... somethingB ...      I have put specific parameters in picture `(-250, -110)` so that the picture is added in the top right of the created page. Although this works just fine, `face.png` appears where I want it, the problem is that there is a big gap between `somethingA` and `somethingB`. So I have something like this in the created document:               ... somethingA ...                              ... somethingB ...      Any ideas how to solve this?


title: why adding tocloft package causes tex4ht not to generate a table of contents?

text: texlive 2014 on Linux mint 17. This MWE does not generate a table of contents in the HTML file generated by htlatex               \documentclass{article}     \usepackage{tocloft}  %if this line is commented, then toc will show up     \begin{document}     \tableofcontents       \section{sec1}       some text 1       \section{sec2}       some text 2     \end{document}      if `tocloft` is _not_ used, then toc will show up in html. command to compile is               htlatex foo.tex      Then view the file `foo.html` in same folder to see the missing toc. This came up when I was trying to change the font size of the toc and used this package, which works ok with pdflatex, then noticed the toc is missing in the HTML file.


title: How to add a subtitle to a beamer?

text: Now i have a frametitle named "AAA", but now i've got a subtitle named "bbb", is there some ways to add "bbb" as a subtitle. The following is the codes:               \documentclass{beamer}     \usetheme{Warsaw}      \begin{document}     \begin{frame}     \frametitle{AAA}     \end{frame}     \end{document}      thanks


title: Warning about writing .cls files in texpad

text: I'm using texpad to typeset my documents. Everytime texpad compiles a document, a popup warning about denied writing permissions on the .cls file appears. Since I'm new to LaTeX, I do not know how does the typeset pipeline works, so I think that the typesetter is trying to write the installed class although it is not necessary. How to fix it? UPDATE Minimal working example causing the problem               \documentclass{sig-alternate}     \usepackage[english,spanish]{babel}     \usepackage[utf8]{inputenc}          \begin{document}          \title{Una revisión a la extracción automatizada de\\*      reglas de negocio }          \maketitle          \section{Introducción}          \bibliographystyle{abbrv}     \bibliography{estado_arte_v_1_ref}            \end{document}      ![Structure of my project](http://i.stack.imgur.com/f9Qnp.png)


title: How to modify the output of cited news articles in text with biblatex (Full date and name of news magazine)

text: I have one week left for handing in my thesis and I have quite a big problem. I cite a lot of Online-Newspaper Articles but in the text it looks like: > Text (Hürriyet Daily News 2013) The output SHOULD be like this: > Text (Hürriyet Daily News vom 16.03.2013) For my bibliography I am using biblatex with the author-year style luh-ipw from CTAN. My MWE looks like this:               \documentclass{scrreprt}          \usepackage{filecontents}         \begin{filecontents}{bibliographie.bib}     @newspaper{SZ.2013a,         Author = {{S{\"u}ddeutsche.de}},         Date = {2013-10-29},         Day = {29},         Month = {10},         Year = {2013},         Title = {T{\"u}rkei er{\"o}ffnet Bahntunnel unter dem Bosporus},         Url = {http://www.sueddeutsche.de/auto/nach-fast-zehn-jahren-bauzeit-tuerkei-eroeffnet-bahntunnel-unter-dem-bosporus-1.1806910},         Urldate = {2013-10-30}     }     \end{filecontents}          \usepackage[     backend=biber,     style=authoryear-luh-ipw     ]     {biblatex}          \bibliography{bibliographie}          \begin{document}          \parencite{SZ.2013a}          \printbibliography          \end{document}      I added the new type @newspaper thanks to the advice in the comments. So far so good, in the bibliography everything works as expected BUT: In the text I need to print the full date and have no idea how to modify the biblatex style accordingly.


title: Why does \leq show up as \le?

text: My only two packages are `amsmath` and `amsfonts`. When I type `\leq`, it shows up as if I had typed `\le`. How do I do the actual less-than-equals (`>=`) sign? Edit: I typed `\leq` and the output symbol was `>`, but I want `>=`. I am also using the site sharelatex.com as my editor. I think something was wrong with sharelatex, as when I closed my project and reopened, everything was fine.


title: How to align a word below other which is on the right side

text: As shown in the picture, I want the date to be below the external examiner. This is on the **right side** of the page. Help me ![enter image description here](http://i.stack.imgur.com/ZM3Lj.jpg)


title: Polyglossia and toc

text: I'm using `xelatex`, with the package `polyglossia` (french). I've got a problem with the formatting of the table of contents, using `xetex` and the package `polyglossia` (language: french). I don' manage to get the number of parts before the title ... Here is an ECM to understand this:               \documentclass[a4paper,12pt]{book}     \XeTeXinputencoding iso-8859-1     \usepackage{polyglossia}     \setmainlanguage{french}     \setotherlanguage{latin}     \setotherlanguage[variant=ancient]{greek}          \begin{document}     \tableofcontents     \part{Part title}     \chapter{Chapter title}     \section{section title}     \part{another part}     \end{document}      With this code here is the appearance of the toc : > Part title (without number ...) 1 chapter title > > 1.1. Section > > ... And I would like this formatting : > I. Title > > 1 Chapter title > > 1.1 Section title ... What should I do to have the "I" enabled in the toc ? Can somebody help me ? Thanks. vangelis


title: How do I use natbib and agsm

text: I am trying to use `natbib` and `agsm` for harvard style in my work but without success. Given the code below I get output: ...(?) in the pdf and a warning in the console:               pdflatex> Package natbib Warning: There were undefined citations.      If I change the bibstyle to `plainnat` it works. Whats wrong in this example? how can I make `agsm` work as bibstyle?               \documentclass{article}     \usepackage{natbib}     \usepackage{filecontents}          \bibliographystyle{agsm}     \begin{document}          \begin{filecontents}{mybib.bib}     @book{goossens93,             author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",             title = "The Latex Companion",             year = "1993",             publisher = "Addison-Wesley",             address = "Reading, Massachusetts"     }      \end{filecontents}          ...test\citep{goossens93}          \bibliography{mybib}     \end{document}


title: Texlipse + preview in TeXShop + SyncTeX

text: I'm having a LaTeX project in Eclipse, which is currently being previewed by TeXShop on a second screen (Mac OS X). The reason for such combination is that in TeXShop you can simply open external PDFs and they will be updating on fly with no need to press anything or refocus on the window (unlike in OSX's Preview and a few others). The rendering is better than in the viewer built into TeXlipse, the scrolling is smooth and continuous. I know that both TeXShop and TeXlipse support forward / inverse search in PDFs via SyncTeX, so in theory I can CMD+click back and fourth and jump from the rendered text to source and vice versa. TeXlipse even has some TCP port number in settings, which I can define. However, I could not figure out how to set things up and decided to ask what could be done. How can I combine TeXShop's viewer, TeXlipse and SyncTeX? TeXShop's viewer is not a must here, any free alternative that would render the pages well, have continuous and smooth scrolling and update the contents automatically will do the job.


title: Change Indentation Size in algorithmicx package

text: I'm using and enjoying the `algorithmicx` package, but would like to adjust the size of its indentations. In the `algorithms` package, I could do this with `\algsetup{indent=1em}`, but that doesn't seem to work here. Any thoughts?


title: Standard math environment for equally-spaced columns of expressions?

text: I often need a display environment which would let me easily present equally- spaced expressions in the same line, with content on successive lines appearing centred at the same x-coordinate as content on the first line. I can sort of get the effect I want like this:               \begin{align*}     x+y && e^{2 \pi i} && \sigma     \\     \text{First} && \text{Second} && \text{Third}     \end{align*}      But it's not quite perfect, as the 'columns' appear right-aligned, not centred. Of course I can achieve this easily enough using an array. But then I have to set the spacing between the columns myself, which the align environment does for me automatically. I just wonder if any of the standard math environments can do this already. I would like to be able to code it like this:               \begin{myenvironment*}     x+y & e^{2 \pi i} & \sigma     \\     \text{First} & \text{Second} & \text{Third}     \end{myenvironment*}


title: Center an image horizontally and vertically in a table with ConTeXt

text: \setuppapersize[A4]     \enableregime[utf-8]     \usemodule  [simplefonts][size=12pt]     \setmainfont[EB Garamond 12][expansion=quality,protrusion=quality]     \setuppagenumbering[location=]     \setupexternalfigures[location={local,global,default}]     \setupTABLE[r][odd][height=1.5cm,align={middle,lohi}]     \setupTABLE[r][even][height=5cm,align={middle,lohi}]     \setupTABLE[c][1][width=2cm,align={middle,lohi}]     \setupTABLE[c][2,3][width=8cm,align={middle,lohi}]     \starttext     \placetable[here,none]{}{%     \bTABLE     \bTR\bTD{}\eTD\bTH {$a>0$\\P est tournée vers le haut}\eTH\bTH{$a<0$\\P est tournée vers le bas}\eTH\eTR     \bTR\bTD{$\Delta>0$}\eTD \bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\eTR     \bTR\bTD [nc=3]\startquotation $f(x)$ est du signe de $a$ à l'extérieur des racines et du signe de $-a$ à l'intérieur des racines \stopquotation\eTD\eTR     \bTR\bTD{$\Delta<0$}\eTD \bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\eTR     \bTR\bTD [nc=3]\startquotation $f(x)$ est du signe de $a$ pour tout $x\neq \frac{-b}{2a}$\stopquotation\eTD\eTR     \bTR\bTD{$\Delta=0$}\eTD \bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\bTD \dontleavehmode\externalfigure[cow][width=4cm]\eTD\eTR     \bTR\bTD [nc=3]\startquotation $f(x)$ est du signe de $a$ pour tout $x$ réel\stopquotation\eTD\eTR     \eTABLE}     \stoptext


title: Left aligning a displayed equation in plain TeX

text: This one seems to be a rather simple question but right now I just run out of ideas. I simply want to left align a displayed equation using plain TeX, that is, I want the equation to start from the very left of the page but with the usual size of a displayed equation (thats why using just one '$' doesn't work). Please help!


title: Spacing of hline after text depends on letters extending past baseline

text: In the following code, the hrules are different distances from the baselines. The first hrule is at the baseline of the text and the second is at the bottom of the y. How can I make them the same whether or not letters extend past the baseline?               Section x     \hrule height 0.5pt     \vspace*{1cm}        Section y     \hrule height 0.5pt      Also, why is this behavior happening? Even if I put a `vspace{2pt}` between each Section x/y and hrule, the spacing between the text and the lines varies. I thought vspace created a space starting at the baseline of the text. Edit: One solution I have found to get an hrule at the baseline is to do               Section y     \\ \vspace{-\baselineskip}     \hrule height 0.5pt      but this is kind of hackish.


title: Position figure to absolute middle in multirow

text: I have two problems with my multirow:   1. I want the figures to position to absolute middle of the multirow, so the margin is equally big.   2. There are small gaps in the mulitrow cells where new rows are added, the red circle indicates one of the gaps. The source:               \begin{table}[H]     \centering         \begin{tabular}{|l|l|l|l|} \hline             \textbf{Exercise name} & Cable Crossover & \multirow{7}{*}{\includegraphics[height=32mm]{images/exercise/132_1.jpg}} & \multirow{7}{*}{\includegraphics[height=32mm]{images/exercise/1.png}} \\              \hhline{--~~}             \textbf{Exercise type} & Strength & & \\              \hhline{--~~}             \textbf{Muscle}       & Chest & & \\              \hhline{--~~}             \textbf{Other muscles}  & Shoulders & & \\              \hhline{--~~}             \textbf{Equipment}    & Cable & & \\               \hhline{--~~}             \textbf{Mechanic}     & Isolation & & \\              \hhline{--~~}             \textbf{Body area}    & Upper body & &\\              \hline         \end{tabular}         \caption{Exercise example based on Cable Crossover.}         \label{table:exercise_example_chest}     \end{table}       ![enter image description here](http://i.stack.imgur.com/nag3f.png)


title: Why does \setlength using tocloft causes strange alignment in TOC?

text: The problem I'm having is to align the number and text in the TOC. I searched and found one solution is to use package `tocloft`, like proposed in TOC Text - numbers alignment. Then I tried to apply it into my document, unfortunately I didn't get the expected result. ![\(the output\)](http://i.stack.imgur.com/nLg57.png) As you can see, the section and subsection are completely off when I use: `\setlength{\cftsecnumwidth}{4em}` **Minimal Example**               \documentclass[10pt,letterpaper]{article}          \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{ntheorem}     \usepackage{polynomial}     \usepackage{layouts}     \usepackage{enumerate}          \usepackage[version=0.96]{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,automata,backgrounds,petri,positioning}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.shapes}     \usetikzlibrary{decorations.text}     \usetikzlibrary{decorations.fractals}     \usetikzlibrary{decorations.footprints}     \usetikzlibrary{shadows}          \setcounter{tocdepth}{3}     \setcounter{secnumdepth}{3}     \usepackage[bookmarksopen,bookmarksdepth=3]{hyperref}     \usepackage{titlesec}     \usepackage{xcolor}          \definecolor{dark-red}{rgb}{0.4,0.15,0.15}     \definecolor{dark-blue}{rgb}{0.15,0.15,0.4}     \definecolor{medium-blue}{rgb}{0,0,0.5}     \hypersetup{         colorlinks, linkcolor={medium-blue},         citecolor={dark-blue}, urlcolor={medium-blue}     }          \usepackage{tocloft}               \title{\textbf{Solution for Chapter 1}}          \begin{document}     \setlength{\cftsecnumwidth}{4em}          \tableofcontents      \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex}     \maketitle              \phantomsection         \section*{1.1}         \addcontentsline{toc}{section}{\numberline{1.1} The following are the state diagrams for two DFAs, $M_1$, and $M_2$. Answer the following question          about each of these machines.}              The following are the state diagrams for two DFAs, $M_1$, and $M_2$. Answer the following question          about each of these machines.\\              \begin{tikzpicture}[shorten >=1pt, node distance=2cm,auto,on grid,initial text=, every state/.style={minimum size=3mm,draw=blue!50,very thick,fill=blue!20}]             \begin{scope}                 \node[state,initial]    (q_1)                           {$q_1$};                  \node[state,accepting]  (q_2)   [right=of q_1]          {$q_2$};                  \node[state]            (q_3)   [below right=of q_1]    {$q_3$};                       \path[->]                 (q_1) edge  [bend left]     node {a}        (q_2)                 (q_1) edge  [loop above]    node {b}        (q_1)                      (q_2) edge  [bend left]     node {a,b}      (q_3)                      (q_3) edge  [bend left]     node {a}        (q_2)                 (q_3) edge  [bend left]     node {b}        (q_1);                   \node [below=1cm, align=flush center,text width=8cm] at (q_3)                 {                     $M_1$                 };             \end{scope}                  \begin{scope}[xshift=8cm]                 \node[state,initial,accepting]  (q_1)                   {$q_1$};                  \node[state]             (q_2)  [right=of q_1]          {$q_2$};                  \node[state]             (q_3)  [below=of q_1]          {$q_3$};                  \node[state,,accepting]  (q_4)  [below=of q_2]          {$q_4$};                      \path[->]                 (q_1) edge  [bend left]     node {a}        (q_2)                 (q_1) edge  [loop above]    node {b}        (q_1)                      (q_2) edge  [bend left]     node {a}        (q_3)                 (q_2) edge  [bend left]     node {b}        (q_4)                      (q_3) edge  [bend left]     node {b}        (q_1)                 (q_3) edge  [bend left]     node {a}        (q_2)                      (q_4) edge  [loop below]    node {b}        (q_4)                 (q_4) edge  [bend left]     node {a}        (q_3)                            ;                \node [below=1cm, align=flush center,text width=8cm] at (q_3)                 {                     $M_2$                 };             \end{scope}         \end{tikzpicture}              \textbf{Solution}\\              \phantomsection          \subsection*{a.}         \addcontentsline{toc}{subsection}{a. What is the start state?}         What is the start state?\\             $M_1$ start states: $q_1$\\             $M_2$ start states: $q_1$\\              \phantomsection                  \subsection*{b.}         \addcontentsline{toc}{subsection}{b. What is the set of accept states?}         What is the set of accept states?\\             $M_1$ accepting states: $q_2$\\             $M_2$ accepting states: $q_1, q_4$\\              \phantomsection              \subsection*{c.}         \addcontentsline{toc}{subsection}{c. What sequence of states does the machine go through on input $aabc$}         What sequence of states does the machine go through on input $aabc$?\\             $M_1$: $q_1 \rightarrow q_2 \rightarrow q_3 \rightarrow q_1 \rightarrow q_1$\\             $M_2$: $q_1 \rightarrow q_1 \rightarrow q_1 \rightarrow q_2 \rightarrow q_4$\\              \phantomsection          \subsection*{d.}         \addcontentsline{toc}{subsection}{d. Does the machine accept the string $aabb$?}         Does the machine accept the string $aabb$?\\             $M_1$: No because the last state $q_1$ is not an accepting state.\\             $M_2$: Yes because the last state $q_4$ is an accepting state.\\              \phantomsection          \subsection*{e.}         \addcontentsline{toc}{subsection}{e. Does the machine accept the string $\varepsilon$?}         Does the machine accept the string $\varepsilon$?\\         No, both of them do not accept string $\varepsilon$.          \end{document}      Any idea? A link to a related question is also welcome. Many thanks in advance.


title: Memoir chapter page formatting

text: I am using the memoir class. I have a series of chapters defined, but I need to change the way the chapter title pages are formatted. In particular, by default the text "Chapter X" is spaced a couple cm further down the page than the top line of text on other pages, but I need it to be the same. Also, the page number on those pages is in the center of the footer, while I need it to be in the top corner like every other page. Is there a simple way to make these changes?


title: How to create two or three columns with squared bracket and three captions at the top of each?

text: I am a novice in LaTeX, so please guide me by an elaborate answer in each step.


title: how to label equations in this way?

text: Suppose Alice has an equation labelled by (3). After several pages, she wants to label a new equation by (3)', to indicate that the new equation (3)' is an analog of (3). How does she type in Latex to get the label (3)'?


title: Hypersetup settings to get glowing text in firefox PDF viewer

text: The `hyperref` package has a readme with settings to make all links glow (with a yellow background) when hovering over them (with the mouse) in Mozilla Firefox. See the link here. I can't find the source file for this manual anywhere. I want to use the same effects in my own PDF, which I also intend to make available for Mozilla Firefox viewers. Currently I got the following code:               \usepackage{hyperref}     \hypersetup{colorlinks=true,         urlcolor=yellow,         linkcolor=red,         citecolor=red,         hypertexnames=false,         pdfhighlight=/O,         anchorcolor=yellow,         }%      I am fiddling around with these `hypersetup` settings, but I'm getting right about nothing done. Does anyone know the settings used in the `hyperref` manual?


title: Automatically indexing references by author and year

text: I'm writing a literature review, and would like to add indices for both authors and publication year (i.e., two _separate_ indices). Now, I could manually enter the appropriate `\index{}` commands, but it seems like this is something that could be automatically handled by biblatex. It would certainly make maintenance a lot easier, an important consideration since I intend to keep the review up-to-date over the next couple of years as I progress through my research. I have been playing with the indexing option that is built into biblatex but cannot see how to make it work with multiple indices (or even index by year alone for that matter). Similarly, I have been looking at questions such as this one on writing custom `\cite` commands, but am struggling to see how they work as well. A manually indexed minimal working example (using biblatex and multind) which shows the sort of final result I'm after:               \documentclass{report}          \usepackage{filecontents}     \begin{filecontents*}{testing.bib}     @article{Author2010,         author="Author, A and Writer, B",         journal="Slackers Monthly",         title="An overly long treatise on procrastination",         year=2010,         month=jun,     }     @article{Writer2011,         author="Writer, B and Scribe, C",         journal="Fake Online Journal",         title="Waste of time or time of waste: procrastination in a modern society",         year=2011,         month=oct,     }     @book{Writer2003,         author="Writer, B",         title="Procrastination for dummies",         year=2003,         publisher="Procrastination House",         address="Auckland",     }     \end{filecontents*}          \usepackage[style=authoryear]{biblatex}     \addbibresource{testing}          \usepackage{multind}     \makeindex{authors}     \makeindex{years}          \begin{document}          \chapter{Introductory works}          \section{An overly long treatise on procrastination}          \fullcite{Author2010}     \index{authors}{Author, A!An overly long treatise on procrastination (2010)}     \index{authors}{Writer, B!An overly long treatise on procrastination (2010)}     \index{years}{2010!An overly long treatise on procrastination}          This paper was really useful in telling me how to waste more time rather      than doing real work.          \section{Waste of time or time of waste: procrastination in a modern society}          \fullcite{Writer2011}     \index{authors}{Writer, B!Waste of time or time of waste: procrastination in a modern society (2011)}     \index{authors}{Scribe, C!Waste of time or time of waste: procrastination in a modern society (2011)}     \index{years}{2011!Waste of time or time of waste: procrastination in a modern society}          Applies post-modern philosophical theory to procrastination.          \section{Procrastination for dummies}          \fullcite{Writer2003}     \index{authors}{Writer, B!Procrastination for dummies (2003)}     \index{years}{2003!Procrastination for dummies}          A classic reference book for anybody starting a research position.          \printbibliography     \printindex{authors}{Author index}     \printindex{years}{Year index}          \end{document}      And a Makefile to compile it:               default:         xelatex mwe         bibtex mwe         xelatex mwe         xindy -M texindy -M page-ranges -L english -C utf8 authors.idx         xindy -M texindy -M page-ranges -L english -C utf8 years.idx         xelatex mwe      So is this possible to achieve with a custom cite command (or a built-in one for that matter)? Or would I be better off writing a script to parse the BibTeX/biber output to generate the input to xindy?


title: TikZ matrix decoration

text: What I'm trying to achieve is a code structure to draw this kind of diagram: ![example](http://i.stack.imgur.com/YCwI4.jpg) I need to decorate a two-rows matrix grouping one or more columns with a square bracket above them, and then again with a square bracket grouping one or more subgroups (there may be more than three levels of nested groups). At first I tried nesting matrices with `above delimiter=\lbrack`, but TikZ told me that `You cannot nest pgfmatrix environments, yet`, so I ended up with something like this               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{matrix,fit,positioning,decorations.pathreplacing,arrows,calc}     \begin{document}     \begin{tikzpicture}[       group/.style={inner sep=0pt},       brace/.style={very thick,decorate,decoration={brace,amplitude=10pt}},       square/.style={-,to path={-- ++(0,.25) -| (\tikztotarget)}}     ]     \matrix (A) [matrix of nodes]     {       1--2 & 3--4 & 5 &       6--7 & 8--9 & 10 &       11--12 & 13--14 & 15--16 \\       %       I & V--I--V & V--IV &       V$^6$--IV & V$^7$ & V--IV &       I--V--I--IV & V$^7$--I & V--VI \\     };     \node (gdg) [group,fit=(A-1-1)(A-2-1)] {};     \node (boh) [group,fit=(A-1-2)(A-2-2)] {};     \node (z) [group,fit=(A-1-3)(A-2-3)] {};     \node (frase-a) [group,fit=(gdg)(boh)(z)] {};     \draw[square] ([yshift=.5cm]gdg.west) to ([yshift=.5cm]gdg.east);     \draw[square] ([yshift=.5cm]boh.west) to ([yshift=.5cm]boh.east);     \draw[square] ([yshift=.5cm]z.west) to ([yshift=.5cm]z.east);          \draw[square] ([yshift=1cm]frase-a.west) to ([yshift=1cm]frase-a.east);          \draw[brace] ([yshift=2cm]A.west) -- ([yshift=2cm]A.east);     \end{tikzpicture}     \end{document}      where I first draw the matrix, then I group each column in an invisible node (with `fit`) and then draw the square brackets as paths from/to west/east anchor point of groups, shifting coordinates on the y-axis. Which is quite unmaintainable and ugly. Of course the main target is to build something that could adapt to the variable width of matrix columns. Any suggestion would be very appreciated!


title: German umlaut breaks compilation with biber/biblatex - Why?

text: My document didn't compile and it took me hours to find the reason. When I finally found it, it was so unrelated to all my previous attempts to solve it and the error messages and warnings didn't give the slightest implication to it. That's why I want to understand the problem better, so I don't run into this issue again. To reproduce my problem, here is a very simple MWE:               \listfiles      \documentclass[a4paper]{scrreprt}      \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage[english]{babel}      \usepackage[babel,german=quotes]{csquotes}      \usepackage{lipsum}           \begin{document}     %Fußnote      \lipsum[1]      \newpage        \lipsum[1]           \end{document}      Important is the Umlaut ß in the word Fußnote in the commented line. If I compile that document in my editor Kile, where QuickBuild is set to PDFLaTex ==> biber ==> PDFLaTex ==> PDFLaTex ==> ViewPDF and biber is defined as in this post, I get the following error:               [biber] finished with exit code 2      As soon as I delete either the umlaut or the biber step in the compiling process, it works. I tried to google that problem but all I found were posts related to Umlauts in the bib-file. I simply don't see why the Umlaut in a comment breaks the compilation because of biber...Where is the connection? Also, note that I don't even load biblatex in this very simple MWE, so biblatex isn't used and doesn't appear in the log-file (if it is still of interest; if I read another log-file correctly, I use biblatex 1.7) A few more infos (I post as much as I can think of, maybe some stuff is unnecessary, sorry for that; if I miss something, let me know! For instance, the log-file does not contain any warnings, but I can post it if wanted):   * Kile Version 2.1.3   * Kile Encoding Setting: UTF-8   * Ubuntu 13.04 **Major edit** Thanks to the great comments, I figured out that the Umlaut isn't the real reason that is going on here (don't know why it solved my original problem). Please find an updated MWE:               \listfiles      \documentclass[a4paper]{scrreprt}      \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage[english]{babel}      \usepackage[babel,german=quotes]{csquotes}      \usepackage{lipsum}      % \usepackage[      %    citestyle=verbose,      %    labelyear=true,      %    bibstyle=authoryear,      %    block=space,      %    clearlang=true,      %    backend=biber      % ]{biblatex}     %\bibliography{\jobname}           %\DeclareRedundantLanguages{english,german,french}{english,german,ngerman,french}      \begin{document}          \lipsum[1]      \newpage        \lipsum[1]           \end{document}      This MWE   * doesn't work if I comment out the call to load `biblatex`   * does work if I load `biblatex`   * does work if I compile it with `biblatex` loaded and then comment that out again   * does not work if I delete the bcf file next. So my questions come down to this:   * Why doesn't the compiling work when `biblatex` isn't loaded, but the `biber` step is done in the compiling process? Why is there no clear errror message?   * What's going on here with the bcf files. Why does it work without `biblatex` loaded, but with a bcf file. Sorry for the major edit.


title: How do I cite work with its title and full information?

text: I use biblatex for citation, and it provides things such as `\citetitle` and `\fullcite`. `\fullcite` is almost what I want, but it starts with the authors not with the title. `\citetitle` will only cite the title but not the other data of the record. Is there a way to fully cite a bibkey by title first: "A novel approach...", F. Bar, B. Foo, In: "Novel Approaches of Novelty", 1656. Consider the following code:               \documentclass{article}     \usepackage{lipsum}     \usepackage{biblatex}     \usepackage{filecontents}     \begin{filecontents}{foobar.bib}     @article{foobar,       author={Bar Foo and Foo Bar},       title={A novel approach for citations},       journal={FOOBAR},       volume={23},       year={2042},     }     \end{filecontents}     \addbibresource{foobar.bib}          \begin{document}          This chapter is based on: \fullcite{foobar}\vspace{1cm}          This chapter is based on: \citetitle{foobar}\vspace{1cm}          But I still want to have it in normal mode as this \textcite{foobar}.     \printbibliography     \end{document}      Which will render to the following: ![enter image description here](http://i.stack.imgur.com/lcZR7.png) What I want is, to keep the references (and bib-style) and textcites as they are, but to change `\fullcite{foobar}` to start with the title (or simulate this behaviour): ![enter image description here](http://i.stack.imgur.com/vGJtc.png)


title: Tangents to a circle from a point outside of it (tikz)

text: I'm trying to plot in _TikZ_ the two tangents to a fixed circle passing through a given point. In some details, given an arbitrary circle centered at `C` with with radius `r`, and a point `P` outside of the circle. I want to plot the two tangents from `P` to the circle. My problems are mainly:   1. I want it to plot a general case, namely, the circle's center and radius should be arbitrary as well as the point outside.   2. The formulas, that I came up with, are not too friendly and involves cubic factors of coordinates and square roots. Any tips, advices, code fragments etc. will be very welcome! Epilog: This question was actually, the first step towards the generation of some plots related to the Poncelet's Porism. I felt on one hand that the built in methods, in TikZ related to the notion of tangents, were too hard for me to use. On the other hand, the `tkz-euclid` is too much in French :) Finally, I reverted to PiScript, which is easier to program in my mind. Here is one of the results I obtained (here's the source code, if you're interested): ![enter image description here](http://i.stack.imgur.com/fykGP.png) As for the answer I chose; it is the one which provides a solution to the question as I posed it in the simplest manner. Thank you all for the help!


title: Any way to change a character to an image?

text: Sometimes, it is needed to change a character to an image: for example, change _@_ in an email address to an image. Is there any way to do that?


title: How to concatenate a set of paths and a set of the reflected paths about a certain axis in a single \pscustom?

text: I want to draw a symmetric object made of a large number of points. To make the code cleaner, I want to use reflection technique. It means I just specify points on one side of the symmetrical axis, the points on the other side will be obtained by reflecting the specified points. Finally I want to concatenate those parts in `\pscustom` and do other operations such as filling or stroking. The following code snippet is just a simple example that has been trimmed off for the sake of simplicity, but it failed to produce the required symmetric object.               \documentclass{article}          \usepackage{pstricks-add}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=10pt\relax          \begin{document}     \begin{pspicture}[showgrid](-3,-3)(3,3)         \def\left{\psline(0,2)(2,0)(0,-2)}%         \pscustom[             fillstyle=solid,             fillcolor=yellow,             linecolor=red         ]{             \left             \psscalebox{-1 1}{\left}         }     \end{pspicture}     \end{document}      How to concatenate a set of paths and a set of the reflected paths about a certain axis in a single `\pscustom`? Note: I also want to get the corners on which the part and its reflected part meet properly glued as usual.


title: Why does \fbox sometimes place the box *over* the graphic image?

text: If I scale the graphic by, say 2.0, I can see the graphic poking out from behind the `\fbox`.


title: \DoubleSpacing not working as described

text: Page 48 of the `memoir` manual states this about using `\DoubleSpacing`: > The spacing in footnotes and floats (e.g., captions) is un- altered, which > is usually required once the controllers see what a blanket double spacing > brings. The problem is that this is not working for me. When I compile several memoir style documents, there is no difference between `\DoubleSpacing` and `\DoubleSpacing*`. I would like to use double spacing as described in the manual (No double spaces in footnotes and floats). Any help?


title: Verbatim in plain-format with XeTeX

text: _(I'm aware there has been a similar question before, but this one has a twist)_ I wanted a verbatim macro to use which would use an unlikely character as an end-of-verbatim -marker (unlikely as in it would be unlikely to be included in the text that would become verbatim), and looked up a couple of suggestions from Appendix D of _The TeXbook_ , until something caught my eye: > Another approach is to keep one character untouchable. For example, it’s > possible to define things so that `\verbatim⟨char⟩⟨text⟩⟨char⟩` will typeset > the `⟨text⟩` verbatim, where the `⟨text⟩` is not supposed to contain any > occurrences of the repeated delimiter `⟨char⟩`: >   >   >     \def\verbatim{\begingroup\setupverbatim\doverbatim} >     \def\doverbatim#1{\def\next##1#1{##1\endgroup}\next} >   Now, combining this with XeTeX would allow me to use a character from the wide, wide Unicode range as the end-marker. (Based on the finding that I can do eg. `\def\ﬁ{foo}`, and it works.) Alas, adding to the above the previously mentioned macros from Appendix D: > >     \def\setupverbatim{\tt\def\par{\leavevmode\endgraf} \catcode`\`=\active >        \obeylines\uncatcodespecials\obeyspaces} >     \def\uncatcodespecials{\def\do##1{\catcode`##1=12 }\dospecials} >   and trying it out (the ﬁ -character is the Unicode fi-ligature),               \verbatim ﬁ |\%_^foo{\it bar}     baz     ﬁ     \bye      gives me an error about `Missing $`, which means there is something not working with the `\verbatim` macro. I just can't figure out what.


title: Running new command only if it exists

text: How do I get LaTeX to run a command only if it exists? I need something like:               \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     % \newcommand{\mytitle}{Title Test}     \begin{document}     \if mytitle exists     \mytitle %true     \else     do not run the command     \fi     \end{document}      To prevent the error message appears: 'Undefined control sequence \mytitle' I need to decide this because I will use Boolean operation on multiple files.


title: The datatool package is not reading the csv file

text: I have the `csv` file as follows: ![enter image description here](http://i.stack.imgur.com/mg1JL.png) The `csv` file in sublime looks like this: ![enter image description here](http://i.stack.imgur.com/FZzLm.png) Now the code reads each quote and author in the `quote` environment at the footer in the center. But it doesn't print the text at all. What is the error? Here is the code:               %Template for Technical Document     \documentclass{book}     \usepackage{graphicx}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     %\renewcommand{\chaptername}{Article}     \usepackage{fancyhdr}     \usepackage{datatool}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     % Can also use centering, or hcentering     \DTLloaddb[noheader,keys={,quote,author}]{quotes}{quotes.csv}          \fancypagestyle{plain}{       \fancyhf{}       \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center]         \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple.jpg}};}%       \renewcommand{\footrulewidth}{0.4pt}       \renewcommand{\headrulewidth}{0.0pt}     }          \DTLforeach{quotes}{\q=quote,\a=author}{          \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center] \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%     \fancyfoot[cf]{\begin{quote}{\a}     \q     \end{quote}     }     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }     }          \usepackage{microtype}          \usepackage{afterpage}     \let\oldcleardoublepage\cleardoublepage     \renewcommand{\cleardoublepage}{\afterpage{\thispagestyle{empty}}\oldcleardoublepage}          \pagestyle{myfancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}               \begin{document}     \chapter{Install Backtrack on an Android Device}     \section{What is Backtrack?}     BackTrack is a distribution designed by Jason Dennis based on the Ubuntu Linux distribution aimed at digital forensics and penetration testing use. BackTrack provides users with easy access to a comprehensive and large collection of security-related tools ranging from port scanners to Security Audit. Support for Live CD and Live USB functionality allows users to boot BackTrack directly from portable media without requiring installation, though permanent installation to hard disk and network is also an option.\par     \section{Security Tools in Backtrack}     BackTrack includes many well known security tools including:     \begin{itemize}         \item Metasploit for integration         \item Wi-Fi drivers supporting monitor mode (rfmon mode) and packet injection         \item Aircrack-ng         \item Gerix Wifi Cracker         \item Kismet         \item Nmap         \item Ophcrack         \item Ettercap         \item Wireshark (formerly known as Ethereal)         \item BeEF (Browser Exploitation Framework)         \item Hydra         \item OWASP Mantra Security Framework, a collection of hacking tools, add-ons and scripts based on FirefoX.         \item Cisco OCS Mass Scanner, a very reliable and fast scanner for Cisco routers with telnet and enabling of a default password.     \end{itemize}          \section{Installing Backtrack on Android Device}     \subsection{Tools Required}     \begin{enumerate}     \item Backtrack 5 ARM.\\     Download Backtrack 5 ARM from Backtrack official site. Backtrack with ARM architecture only on Backtrack 5 version. ARM architecture not available for Backtrack 5 R1, Backtrack 5 R2, and Backtrack 5 R3.     \item Rooted android device \\     Why rooted android device ? Because we need install some application that need Android to be root     \item Busybox, Superuser, Terminal Emulator, and AndroidVNC. \\     You can download search and all of them on Google Play. BusyBox is installer and uninstaller Android program, Superuser is superuser rights manager for Android, Terminal Emulator is Android's built-in Linux command line shell program, and AndroidVNC is a VNC viewer for Android.     \end{enumerate}     \subsection{Installation}     \begin{enumerate}     \item Extract BT5-GNOME-ARM.7z to folder, for example "BT5" folder and then put on device root directory.     \item Open Terminal Emulator on device then go to BT5 folder using the command \verb+ cd sdcard/BT5 +     \item Then run this following command \verb+ su + and \verb+ sh bootbt + and you will see \verb+ root@localhost +     \item Now lets run Backtrack GUI with VNC viewer \verb+startvnc+     \item To connect wth VNC we must know the port where VNC listening. Run \verb+netstat -anpt+ and remember the port where VNC listening. In this case the port is 59016. Open AndroidVNC and fill the form like this: \\     Nickname : BT5\\     Password : toortoor\\     Address  : 127.0.0.1\\     Port     : 5901 \\     \item Connect it and you will see Backtrack 5 interface \par     \textit{Remember! Some of the Backtrack tools can't work properly and do it for your own risk. I hope you can Install Backtrack on Android device without any problems, tell me if you get problems.}     \end{enumerate}     \end{document}       The csv file:                  quote,author     I think everybody in this country should learn how to program a computer because it teaches you how to think,Steve Jobs      Computer Science is no more about computers than astronomy is about telescopes,Edsger W. Dijkstra     The computer was born to solve problems that did not exist before,Bill Gates     A computer would deserve to be called intelligent if it could deceive a human into believing that it was human,Alan Turing     UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity,Dennis Ritchie     Imagination is more important than knowledge.  For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution,Albert Einstein     The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge,Stephen Hawking     The more you know, the more you realize you know nothing,Socrates     Tell me and I forget.  Teach me and I remember.  Involve me and I learn.,Benjamin Franklin     Real knowledge is to know the extent of one’s ignorance.,Confucius     I do not fear computers. I fear lack of them.,Isaac Asimov      Here is the new updated code:               %Template for Technical Document     \documentclass{book}     \usepackage{graphicx}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usepackage{suffix}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     %\renewcommand{\chaptername}{Article}     \usepackage{fancyhdr}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     % Can also use centering, or hcentering     \usepackage{datatool}     \usepackage[printwatermark]{xwatermark}     \usepackage{xcolor}     \usepackage{transparent}     \DTLloaddb{quotes}{quotes.csv}          \usetikzlibrary{shapes.misc,arrows}     \newcommand\titlebar{%     \tikz[baseline,trim left=0.5cm,trim right=2.5cm] {%         \node [             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (a) at (2.5cm,0.6ex) {%         };        \path[fill=red!70!blue] (a.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (a.east) |- (\textwidth+3cm,-0.75ex);     }%     }          \newcommand\subtitlebar{%     \tikz[baseline,trim left=1cm,trim right=3.05cm] {%         \node[             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (b) at (3.05cm,0.6ex) {%         };        \path[fill=red!70!blue] (b.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (b.east) |- (\textwidth+2cm,-0.75ex);     }%     }          \titleformat{\subsection}{\normalfont\sf}{\subtitlebar}{0.2cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\subsection}{-2cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\subsection,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesubsection}{\arabic{subsection}}               \titleformat{\section}{\large\sf}{\titlebar}{0.25cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\section}{-2.15cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\section,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesection}{\arabic{section}}          \newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}     \WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}     \makeatletter     \newcommand{\printchapterauthor}[1]{%       {\parindent0pt\vspace*{-25pt}%       \linespread{1.5}\large\scshape\filcenter #1%       \par\nobreak\vspace*{35pt}}       \@afterheading%     }     \newcommand{\authortoc}[1]{%       \addtocontents{toc}{\vskip-10pt}%       \addtocontents{toc}{%         \protect\contentsline{chapter}%         {\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{}}       \addtocontents{toc}{\vskip5pt}%     }     \makeatother          \titleformat{\chapter}[display]       {\bfseries\Large}     %  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}       {}       {1ex}       {\titlerule\vspace{1ex}\filcenter #1}       [\vspace{1ex}\titlerule]          \DTLforeach{quotes}{     \q=quote, \a=author}{     \fancypagestyle{plain}{       \fancyhf{}       \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center]         \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%       \fancyfoot[cf]{\q}         \renewcommand{\footrulewidth}{0.4pt}       \renewcommand{\headrulewidth}{0.0pt}     }               \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center] \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%     \fancyfoot[cf]{\q}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }     }               \usepackage{microtype}          \usepackage{afterpage}     \let\oldcleardoublepage\cleardoublepage     \renewcommand{\cleardoublepage}{\afterpage{\thispagestyle{empty}}\oldcleardoublepage}          \pagestyle{myfancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}          \newwatermark[allpages,color=red!50,scale=3,xpos=0,ypos=0]{\transparent{0.4}\includegraphics[scale=.25]{logo}}          \begin{document}     \chapter{Install Backtrack on an Android Device}     \chapterauthor*{K.DINESH KUMAR \par II Year B.Tech CSE}     \section{What is Backtrack?}     BackTrack is a distribution designed by Jason Dennis based on the Ubuntu Linux distribution aimed at digital forensics and penetration testing use. BackTrack provides users with easy access to a comprehensive and large collection of security-related tools ranging from port scanners to Security Audit. Support for Live CD and Live USB functionality allows users to boot BackTrack directly from portable media without requiring installation, though permanent installation to hard disk and network is also an option.\par     \section{Security Tools in Backtrack}     BackTrack includes many well known security tools including:     \begin{itemize}         \item Metasploit for integration         \item Wi-Fi drivers supporting monitor mode (rfmon mode) and packet injection         \item Aircrack-ng         \item Gerix Wifi Cracker         \item Kismet         \item Nmap         \item Ophcrack         \item Ettercap         \item Wireshark (formerly known as Ethereal)         \item BeEF (Browser Exploitation Framework)         \item Hydra         \item OWASP Mantra Security Framework, a collection of hacking tools, add-ons and scripts based on FirefoX.         \item Cisco OCS Mass Scanner, a very reliable and fast scanner for Cisco routers with telnet and enabling of a default password.     \end{itemize}          \section{Installing Backtrack on Android Device}     \subsection{Tools Required}     \begin{enumerate}     \item Backtrack 5 ARM.\\     Download Backtrack 5 ARM from Backtrack official site. Backtrack with ARM architecture only on Backtrack 5 version. ARM architecture not available for Backtrack 5 R1, Backtrack 5 R2, and Backtrack 5 R3.     \item Rooted android device \\     Why rooted android device ? Because we need install some application that need Android to be root     \item Busybox, Superuser, Terminal Emulator, and AndroidVNC. \\     You can download search and all of them on Google Play. BusyBox is installer and uninstaller Android program, Superuser is superuser rights manager for Android, Terminal Emulator is Android's built-in Linux command line shell program, and AndroidVNC is a VNC viewer for Android.     \end{enumerate}     \subsection{Installation}     \begin{enumerate}     \item Extract BT5-GNOME-ARM.7z to folder, for example "BT5" folder and then put on device root directory.     \item Open Terminal Emulator on device then go to BT5 folder using the command \verb+ cd sdcard/BT5 +     \item Then run this following command \verb+ su + and \verb+ sh bootbt + and you will see \verb+ root@localhost +     \item Now lets run Backtrack GUI with VNC viewer \verb+startvnc+     \item To connect wth VNC we must know the port where VNC listening. Run \verb+netstat -anpt+ and remember the port where VNC listening. In this case the port is 59016. Open AndroidVNC and fill the form like this: \\     Nickname : BT5\\     Password : toortoor\\     Address  : 127.0.0.1\\     Port     : 5901 \\     \item Connect it and you will see Backtrack 5 interface \par     \textit{Remember! Some of the Backtrack tools can't work properly and do it for your own risk. I hope you can Install Backtrack on Android device without any problems, tell me if you get problems.}     \end{enumerate}     \end{document}       The apple: ![enter image description here](http://i.stack.imgur.com/LswbC.jpg)


title: How to set a document for use with the Bera fonts instead the default fonts?

text: I have a document created with `scrartcl` class and I want to use the three Bera fonts: Serif, Sans and Mono, but I don't find the right way to change it with the KOMA-Script commands. Could someone tell me how do it?               \documentclass[titlepage]{scrartcl}     \usepackage[utf8]{inputenx}     \usepackage[T1]{fontenc}     \usepackage[spanish,activeacute,mexico]{babel}     %\usepackage[defaultsans]{berasans}     \usepackage[intlimits]{amsmath}     \usepackage{amsthm,amssymb,empheq,bm}     \usepackage[dvipsnames,x11names]{xcolor}     \usepackage{verbatim}          \usepackage[per-mode=symbol]{siunitx}          \usepackage{url}          \pagestyle{headings}          \begin{document}          Lorem ipsum          \end{document}


title: How and whether to fine-tune the vertical placement of a fraction line

text: This is a question about the aesthetics of mathematical typesetting, as well as a technical question about LaTeX. I'm writing a lot of expressions like this: ![enter image description here](http://i.stack.imgur.com/BsKQl.png) (`\log\frac{p_{i\to j}}{p_{j\to i}}` in a display math environment.) This looks odd to me, because of the very large gap between the fraction line and the denominator, compared with quite a small gap between the line and the numerator. I realise that in some sense that gap needs to be there in order to accommodate taller characters like 'A' or 'b', but since there are no such letters in my expression it seems like it might look better if the spacing were different. So my questions are (with roughly equal priority):   1. Should I be messing with this? Am I right in thinking the expression looks unbalanced, or should I just trust the algorithm's designer (presumably Knuth) to have made the right decision about how to typeset this?   2. If I should change it, what should change exactly? Should the line be lower, or should the denominator and/or numerator be higher up?   3. If changing it isn't a terrible idea, what is the best way to affect such a change? I believe this is not a duplicate of How to vertically center the fraction line?, since that question is about how the spacing relates to the font, rather than to the actual characters used in the numerator and denominator.


title: Partial compile latex and bibtex for pandoc

text: I am working to convert a LaTeX document to word (because that's what the journal requires) and to avoid rewritting all of the equations and citations I want to use pandoc, but pandoc doesn't seem to handle the bibliography correctly. Is there a way to partially compile a latex file such that the bibliograpy is put at the bottom with bibitem labels? I would love it if I could easily get the dmath sections replaced with equation arrays as well.


title: Wrapping image with multiple theorem-like environments and displayed math

text: I'm struggling to put an image into a page with multiple theorem-like environments, some of which include displayed math, but I can't get the text to wrap correctly around the image and caption: either there is a lot of blank space below the image (which goes on even on the following page), or the text overlays the image. I have found lots of different solutions to this problem, but none seems to work in my case; the current best solution I'm using is a combination of minipage and parpic, which worked in other parts of the document but isn't working properly in this particular point. Here is an example (which I hope is working), though it isn't exactly minimal: seeing that solutions that worked in other cases don't work in this particular case, I think it's better to put the "real" code where I have the problem (the image GraficiBarre.png, which is a simple 600x512 png, is loaded via the \addsspic command defined in the preamble). Here is a link to the compiled result.               \documentclass [12pt]{article}     \usepackage {amsthm,amssymb}     \usepackage {amsmath,amsfonts}     \usepackage {graphicx}     \usepackage {lipsum}     \usepackage {fullpage}     \usepackage [utf8]{inputenc}          \DeclareMathOperator{\Var}{Var}          \DeclareGraphicsExtensions{.pdf,.png,.jpg}          \theoremstyle{plain}     \newtheorem{teorema}{Teorema}     \newtheorem{prop}{Proposizione}     \theoremstyle{definition}     \newtheorem{definizione}{Definizione}     \newtheorem{esempio}{Esempio}     \theoremstyle{remark}     \newtheorem{osservazione}{Osservazione}          \RequirePackage{xparse, graphicx, caption, picins}     \DeclareDocumentCommand \addsspic{O{0.4\textwidth} m g}{\parpic[r]{%     \begin{minipage}{#1}             \vspace{0.25cm}         \includegraphics[width=\textwidth]{#2}%         \IfNoValueTF{#3}{}{\captionof{figure}{\footnotesize #3}}     \end{minipage}     }}          \begin{document}     \begin{prop}                             Disuguaglianza di Chebyshev. Sia $X : \Omega \rightarrow \mathbb{R}$ una variabile aleatoria reale, con $X \in L^2$. Allora:                             $$\mathbb{P} \left ( \left \{ \omega \in \Omega : \left |X \left (\omega \right ) - \mathbb{E} \left [X \right] \right | \geq \varepsilon \right \} \right ) \leq \frac{\Var \left (X \right )}{\varepsilon^2} \ \forall \ \varepsilon > 0$$                         \end{prop}                         \begin{proof}                             Sia $\tilde{X} = X - \mathbb{E} \left [X \right ]$ e sia $Z = \left | \tilde{X}\right |^2 = \left |X -\mathbb{E}\left [X\right ] \right |^2 \Rightarrow \mathbb{E} \left [Z \right ] = \Var \left (Z\right)$. Ricordiamo che, se $Z$ è una variabile aleatoria, la disugualianza di Markov (Teorema 8, Osservazione 33) ci dice che $\varepsilon \mathbb{P} \left ( \left \{ \omega \in \Omega : Z \left (\omega \right ) \geq \varepsilon \right \} \right ) \leq \int_\Omega \! Z \ \mathrm{d}\mathbb{P} = \mathbb{E} \left [Z \right ]$, quindi abbiamo che:                             $$\varepsilon^2 \mathbb{P} \left ( \left \{ \omega \in \Omega : Z \left (\omega \right ) \geq \varepsilon^2 \right \} \right ) \leq \mathbb{E} \left [Z \right ] \Rightarrow \mathbb{P} \left ( \left \{ \omega \in \Omega : \left | X \left (\omega \right ) - \mathbb{E} \left [X \right ] \right |^2 \geq \varepsilon^2 \right \} \right ) \leq \frac{\Var \left(X\right )}{\varepsilon^2} \Rightarrow$$                             $$\Rightarrow \mathbb{P} \left ( \left \{ \omega \in \Omega : \left | X \left (\omega \right ) - \mathbb{E} \left [X \right ] \right |\geq \varepsilon \right \} \right ) \leq \frac{\Var \left(X\right )}{\varepsilon^2} \qedhere$$                         \end{proof}                         \addsspic[6cm]{GraficiBarre}{Grafico a barre. L'altezza delle barre rappresenta il valore atteso della variabile, la lunghezza delle stanghette rappresenta il doppio della deviazione standard}                         \begin{esempio}                             Grafici a barre. Riscriviamo Chebyshev prendendo $\varepsilon = \delta \sigma \left (X \right )$:                             $$\mathbb{P} \left ( \left \{ \omega \in \Omega : \left | X \left (\omega \right ) - \mathbb{E} \left [X \right ] \right |\geq \delta \sigma \left (X\right ) \right \} \right ) \leq \frac{1}{\delta^2}$$                             Questa disuguaglianza è molto stretta, perciò di solito se si hanno informazioni sul tipo di legge seguito dalla variabile aleatoria si preferisce usare le tavole.                         \end{esempio}                         \begin{definizione}                             \textbf{Convergenza in probabilità}. Sia $\left (X_n \right )_{n \in \mathbb{N}} : \Omega \rightarrow \mathbb{R}$ una successione di variabili aleatorie e sia $X : \Omega \rightarrow \mathbb{R}$ una variabile aleatoria. Allora:                             $$X_n \rightarrow X \textnormal{ in probabilità } \Leftrightarrow $$                             $$\Leftrightarrow \lim\limits_{n \rightarrow \infty} \mathbb{P} \left (\left \{ \omega \in \Omega : \left |X_n \left (\omega \right ) - X \left (\omega \right ) \right | > \varepsilon \right \} \right ) = 0 \ \forall \ \varepsilon \geq 0$$                             Sostanzialmente, quindi, $X_n \rightarrow X$ in probabilità se la misura dell'insieme su cui $X_n$ si discosta da $X$ va a zero.                         \end{definizione}                         \begin{osservazione}                             Questo è un criterio di convergenza piuttosto debole: infatti, è possibile che le $X_n$ assumano un valore diverso da $X$ in numerabili punti, pur tendendo a $X$ in probabilità.                         \end{osservazione}                         \begin{teorema} Legge debole dei grandi numeri. Sia $\left (X_n \right )_{n \in \mathbb{N}} : \Omega \rightarrow \mathbb{R}$ una successione di variabili aleatorie reali, con $X_n \in L^2$. Supponiamo inoltre che le variabili aleatorie siano scorrelate e che $\Var \left (X_n \right ) \leq c \in \left ]0, + \infty \right [ \wedge \mathbb{E} \left [X \right ] = m \in \mathbb{R} \ \forall \ n \in \mathbb{N}$; sia infine $S_n = \sum\limits_{k=1}^{n} X_k$. Allora, $\lim\limits_{n \rightarrow \infty} \frac{S_n}{n} = m$ in probabilità.                         \end{teorema}                         \begin{proof}                             Abbiamo innanzi tutto che $\mathbb{E} \left [\frac{S_n}{n} \right ] = \frac{1}{n} \sum\limits_{k=1}^{n} \mathbb{E} \left [X_k\right] = m \ \forall \ n$ e che $\Var \left (\frac{S_n}{n} \right ) = \frac{1}{n^2} \sum\limits_{k=1}^{n} \Var\left (X_k\right ) \leq \frac{c n}{n^2} = \frac{c}{n}$.                         \end{proof}                         \lipsum[1-4]     \end{document}


title: Customize the captions of tables

text: I'm a little disperse between packages `caption`, `floatrow`, I'd customize the captions of my tables, but at the same time, I would like the figures captions to remain unchanged.   * How can I left align the captions?   * How I can customize the space between caption and table? Here is my MWE:               \documentclass[a4paper,12pt]{article}      \usepackage[latin1]{inputenc}     \usepackage[english,french]{babel}      \usepackage[T1]{fontenc}     \usepackage[a4paper,twoside,left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}     \usepackage{booktabs}     \usepackage[font={it,footnotesize},labelfont={bf,sc,small},figurename=Fig.,tablename=Tab.]{caption}     \usepackage{graphicx}     \usepackage{dblfloatfix}     \usepackage{tabularx}     \usepackage{floatrow}     \floatsetup[table]{style=plaintop}   %\floatsetup[table]{capposition=top}     %\setlength\abovecaptionskip{0.5cm}     %\setlength\belowcaptionskip{0.5cm}          \begin{document}          \begin{table*}[!b]     \begin{center}     \small{     \begin{tabularx}{\linewidth}{@{}p{3cm}@{}*{6}{X@{}}}     \toprule      \multicolumn{1}{l}{} & \multicolumn{3}{@{}l}{couleur primaire} & \multicolumn{3}{@{}l}{couleur secondaire} \\     \cmidrule[.8pt](r{10pt}){2-4} \cmidrule[.8pt]{5-7}     \multicolumn{1}{c}{} & rouge & vert & bleu &  jaune & magenta & cyan \\     \midrule[1pt]      composition & R & V & B & RV & RB & VB \\      perméabilité& 1 & 2 & 3 & 4  & 7  & 3 \\     \bottomrule      \end{tabularx}}     \end{center}     \caption{thermal conductivity}     \label{tab-CT1}     \end{table*}          \end{document}


title: Indenting the first line of figure captions

text: I want to create a small indentation in the first line of figure captions, similar to the way LaTeX indents the first line of paragraphs. The `caption` package does not seem to support this. Is it doable?


I'm writing a Dutch / French document, so I defined               \usepackage[dutch,french,british]{babel}       in my headers, but my french é is being shown as a weird Ãl’. I tried changing the encoding in Texmaker from UTF-8 to UTF-16 and UTF-32BE but it doesn't do a whole lot. Can anyone tell me what to do?


title: Any idea about this Beamer theme?

text: Which Beamer theme is used in this presentation? How I can use this theme in LyX?


title: Oldstyle numbers in body, newstyle numbers in section headings

text: I'm using the `eco` package to get oldstyle numbers in my manuscript, but I'm trying to get the section numbers (in the mainmatter and the table of contents as well) to be "newstyle numbers" (ie. lining figures) and having a tough time with it. Can anyone shed some light on the matter please? PS: It would be nice to get lining figures in the table and figure numbers as well. Edit: posting a mwe below (regarding doncherry's suggestion).               \documentclass{book}          \usepackage{eco}          \setcounter{secnumdepth}{5}     \setcounter{tocdepth}{5}          \renewcommand{\thechapter}{{\fontfamily{cmr}\selectfont\arabic{chapter}}}     \renewcommand{\thesection}{{\fontfamily{cmr}\selectfont\arabic{section}}}     \renewcommand{\thesubsection}{{\fontfamily{cmr}\selectfont\arabic{subsection}}}     \renewcommand{\thesubsubsection}{{\fontfamily{cmr}\selectfont\arabic{subsubsection}}}     \renewcommand{\theparagraph}{{\fontfamily{cmr}\selectfont\arabic{paragraph}}}     \renewcommand{\thesubparagraph}{{\fontfamily{cmr}\selectfont\arabic{subparagraph}}}     \renewcommand{\thefigure}{{\fontfamily{cmr}\selectfont\arabic{figure}}}     \renewcommand{\thetable}{{\fontfamily{cmr}\selectfont\arabic{table}}}          \begin{document}            \tableofcontents{}            \part{One}         \chapter{One--One}           \section{One--One--One}             \subsection{One--One--One--One}               \subsubsection{One--One--One--One--One}                 \paragraph{One--One--One--One--One--One}                   \subparagraph{One--One--One--One--One--One--One}                   \subparagraph{One--One--One--One--One--One--Two}                   \subparagraph{One--One--One--One--One--One--Three}                 \paragraph{One--One--One--One--One--Two}                   \subparagraph{One--One--One--One--One--Two--One}                   \subparagraph{One--One--One--One--One--Two--Two}                   \subparagraph{One--One--One--One--One--Two--Three}          \end{document}      ![Output](http://i.stack.imgur.com/BsqKt.png)


title: Counting letters inside paragraph

text: I am trying to make a new command `\part` which is defined such that each time I type `\part` the output equals               \paragraph*(letter)      where **letter** is **bold**. So, with typing the letter manualy in, the working command is                \newcommand{\del}[1]{\paragraph*{#1}}      Now. I must not have this inside a paragraph, I just want the output, identical to the output given with the command above. Just not having to type in the letter each time. I am in no direct need to have very long number lists. So a-z should be fine. I also looked into counters and such, but could not produce anything close to working. Also I was looking into the `enumitem` package. But this does not give me things in **bold** , nor the correct spacing. Also there is often quite some space, between each time I need a letter. For an example.                   \part Some text, questions          ipsulum, ipsulum     ipsulum, ipsulum     ipsulum, ipsulum     ipsulum, ipsulum               part some text questions      So anyone got any solutions? =)


title: Problem \include-ing multiple .tex files

text: I am `\include`-ing multiple `.tex` files and I am using a package I found on the web for a one-column abstract in a two-column document (`long2.sty`):               %%     %% This is file `long2.sty'.     %%     %% Author: Tomas "tohecz" Hejda <tohecz@gmail.com>     %%     %% Licenced under LaTeX-Project Public License version 1.3 or newer.     %%      \NeedsTeXFormat{LaTeX2e}[1995/06/01]     \ProvidesPackage{long2}[2012/08/19 v0.1 long2: breakable one-column preamble in a two-column document]          \newlength\longtwo@top     \newlength\longtwo@bottom          \newsavebox\longtwo@box     \def\longtwo@repeat{%         \longtwo@column[{\@twocolumnfalse         \ifdim\ht\longtwo@box>1.00\textheight%1           \begingroup           \vbadness10000           \setbox0\vsplit\longtwo@box to 1.00\textheight%1           \setbox1\vbox{\unvbox\longtwo@box}           \global\setbox\longtwo@box\vbox{\unvbox1}           \setbox2\vbox to \textheight{%             \unvbox0           }           \ht2=0.9\textheight           \box2           \endgroup         \else           \ifdim\ht\longtwo@box>0.84\textheight             \global\let\longtwo@repeat\clearpage           \else             \global\let\longtwo@repeat\relax           \fi           \unvbox\longtwo@box           \vspace{15pt plus 15pt}         \fi         }]%       \longtwo@repeat     }          \long\def\longtwo@[#1]{%       \begingroup         \let\longtwo@column\twocolumn         \let\longtwo@mkttl\maketitle         \def\maketitle{           \begingroup           \let\newpage\relax           \longtwo@mkttl           \endgroup         }         \longtwo@column[{\@twocolumnfalse         \global\setbox\longtwo@box\vbox{#1}%         \ifdim\ht\longtwo@box>\textheight           \begingroup           \vbadness10000           \setbox0\vsplit\longtwo@box to 1.00\textheight%1           \setbox1\vbox{\unvbox\longtwo@box}%           \global\setbox\longtwo@box\vbox{\unvbox1}%           \setbox2\vbox to \textheight{%             \unvbox0           }           \ht2=0.9\textheight           \box2           \endgroup         \else           \ifdim\ht\longtwo@box>0.87\textheight             \global\let\longtwo@repeat\clearpage           \else             \global\let\longtwo@repeat\relax           \fi           \unvbox\longtwo@box         \fi         }]%         \longtwo@repeat       \endgroup     }          \def\longtwocolumn{\@ifnextchar[\longtwo@\twocolumn}          \endinput     %%     %% End of file `long2.sty'.     %%      The first `\include` works great, but the abstract of the others gets overlapped the text. Any idea? Is there a way to tell LaTeX to reset everything and start a new document inside another each time I `\include` a file? `long2.sty` is capable of splitting too long abstracts in two pages. That's why I use it. My code is not very complex, the part with the `\include` is:               [...]     \pagestyle{fancy}     \clearpage     \resetearcontadores     \include{file1}     \resetearcontadores     \include{file2}     \resetearcontadores     \include{file3}     \resetearcontadores     \include{file4}     \clearpage     \pagestyle{empty}     [...]      The `\resetearcontadores` command just resets figure, table, etc counters. If you need more code (preamble, body or something) ask me, I just don't know what to show you because the code is very simple. I know the `\twocolumn` command accepts an optional argument, but it doesn't split into pages and you can't use any environments.


title: Keep column height in Beamer when replacing content

text: I have a frame in Beamer that consists of two columns. The content of one column remains the same, the content of the other column is replaced on the second slide.               \begin{frame}       \begin{columns}         \begin{column}{.5\textwidth}           % some static content         \end{column}         \begin{column}{.5\textwidth}           \begin{onlyenv}<1>             % some tikz picture           \end{onlyenv}           \begin{onlyenv}<2>             % some other tikz picture           \end{onlyenv}         \end{column}       \end{columns}     \end{frame}      The problem with this configuration is that since the height of the second column changes, the position of the content of the first column also changes, and so the transition between the slides is not smooth - The first column "jumps" around. How can I keep the first column static, while changing the seconds?


title: Best way to have two kinds of formattings for my documents?

text: I would like to produce two kinds of formattings for my documents.   1. The 1st formatting will use colors. This is typically for reading on a screen.   2. The 2nd formatting will use gray colors for printing. Which method can I use to say to LaTeX which kind of formatting rules to use ? Here is a very small example of the commands that I'm building.               \documentclass[10pt,a4paper]{article}         \usepackage[utf8x]{inputenc}         \usepackage{ucs}         \usepackage{graphicx}         \usepackage{xparse}         \usepackage[x11names, svgnames]{xcolor}         \usepackage{fourier-orns}              \newcommand{\boldit}[1]{%             \mathversion{bold}\textbf{#1}\mathversion{normal} %         }              \newbox\FBox         \NewDocumentCommand\boxit{O{black}O{white}mO{0.5pt}O{0pt}O{0pt}}{%             \setlength\fboxsep{#4}\sbox\FBox{\fcolorbox{#1}{#2}{#3\rule[-#5]{0pt}{#6}}}\usebox\FBox}          % The colored version.         \newcommand{\warning}[1]{\textcolor{Red3}{\raisebox{\depth}{\danger}\boldit{\,#1}}}     % The gray version that must be used instead     % of \warning if the mode is black and white.         \newcommand{\warningBW}[1]{\boxit[black!80][black!30]{\raisebox{\depth}{\danger}\boldit{\,#1}}}               \begin{document}          Let's try one example... \warning{Danger !}          \end{document}