title: Preserving (and Controlling) Expandedness

text: In most cases, by the time output gets to your screen, arguments are fully expanded and my question is moot. But sometimes (verbatim being a common example), one wishes to operate on arguments with different levels of expandedness. My question concerns how to preserve a level of expandedness, or conversely, how to do a partial expansion. Here's an MWE which demonstrates how the level of expandedness of the argument affects the result:               \documentclass{article}     \usepackage[T1]{fontenc}     \newcommand\display[1]{\expandafter\string#1}     \begin{document}     \display{\large word}\par     \def\x{\large word}     \display{\x}     \end{document}      ![enter image description here](http://i.stack.imgur.com/6vyfG.jpg) In the first case, I pass actual text to my macro `\display` and get the top line. But if I stuff the same text into `\x` and pass it to the macro `\display`, it produces a different output, because the the two different invocations supplies the macro with an argument at different levels of expansion. To the MWE, how does one reconcile the output in either direction (i.e., if the first output was what I actually sought from the second instance and, alternately, if the second output was what I actually sought from the first instance)? Related to this MWE would be to know if there is something like a `\verbatim{\x}` which prints out the verbatim of the first level expansion of `\x`, for the example of the MWE, producing `\large word` (space included). More generally, what are the LaTeX techniques for controlling the expansion of an argument, when what your macro gets may be far removed from the original "plain" text.


title: heading breaks with twopage option for book class

text: I had to switch from oneside to twoside option for book class to get the binding right. Unfortunately this breaks the chapter headings if they land on even pages (on uneven pages the heading looks fine). ![enter image description here](http://i.stack.imgur.com/MjaaE.png) Any idea how I adjust the heading so it accounts for the dynamic nature of the twopage option?               % using fncychap style Bjarne...          % Adding a tiny robot     \let\oldDOCH\DOCH          \makeatletter     \renewcommand\DOCH{%         \mghrulefill{\RW}\par\nobreak         \begin{tikzpicture}[remember picture, overlay]             \node [xshift=1.05in, yshift=-1.43in] (robot) at (current page.north west)               {\includegraphics[width=89px,height=130px]{tiny_robot.png}};             \node[left] at ($(robot) + (5.71in,0.04in)$) {               \CNV\FmN{\@chapapp}\space \CNoV\thechapter\par\nobreak};             \draw[very thick] ($(robot) + (-0.10in,-0.20in)$) -- +(5.75in,0in);         \end{tikzpicture}         \par\nobreak         \vskip 30\p@     }     \makeatother


title: Command for this symbol looks like \mathcal{F}

text: ![latex command for this symbol](http://i.stack.imgur.com/ypM0S.png) I can't find the LaTeX command and symbol and its package of this symbol. Can any one suggest me the command. I tried `\mathcal{F}` but its not exactly the same.


title: Trouble with the sty file of a journal

text: This is about a trouble faced concerning a particle physics journal - Journal of Physics G. (It goes without saying that editing the sty file is hence, not an option). When we define the title, using `\title{whatever}`, it automatically shows the title on the first page in bold font, and on each and every page as a left aligned header. Now, the problem is with symbols. I need to type the title - `\title{\phi_s decays in context of ATLAS experiment}`. I type that and the headers appear fine, as they should. However, in the automatic bolding of the title, the words all appear in bold form, but the symbol `$\phi_s$` doesn't. This looks ugly and is extremely undesirable, so I modify this to `\title{{\bf \phi_s} decays in context of ATLAS experiment}`, and now the title appears fine. But in every header, now the symbol appears in bold font and everything else is in simple font! That's less undesirable, and that's how people have been going ahead with, but if anyone can suggest a work-around, that would be extremely valuable. I repeat that the sty file can't be edited


title: Use xstring to replace a macro with different macro

text: ## xstring staff... ### Target I want to create two labels at beginning and end of specific text respectively. I have sucessfully writen some code to do this, see the following code:               \usepackage{xstring}     \usepackage{lineno}     \linenumbers     \usepackage{hyperref}     \newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{\linelabel{line:#1}}}          \makeatother     \newcommand{\clab}[2]{%     \protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}#2\hlabel{#1end}}     \makeatother      I can use               \clab{lab1}{some text, some text, more text...}      to create two lables, which are pointing to the beginning and the end of the text "some text, some text, more text..." ### Some error The `\clab{lab}{text...}` function goes wrong if using it like this:                 \clab{lab1}{some text, some text, more text..., \clab{lab2}{other text, other text, more other text...}, even more text...}      ### My unsuccessful solution I found some code from a example of `xstring` package (page 18-19) which could replace the function with another function. My idea is to replace the inner `\clab{lab2}{text...}` by another empty function `\elab{lab2}{text...}` using the `xstring` package. First, define pattern and replace function name:               \expandarg     \def\pattern{\clab}     \def\replace{\elab}      Then, define the two functions `\clab` and `\elab`,                % define a empty function to replace the function \clab      \newcommand{\elab}[2]{#2}             % define a function \clab{label}{texts, texts, blabla}      \newcommand{\clab}[2]{%      \protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}#2\hlabel{#1end}}      Finally, I used the xstring package to replace the \clab function by \elab function: modify the `#2` -----> `\StrSubstitute[2]{#2}{\pattern}{\replace}`               \protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}#2\hlabel{#1end}}      It goes like this:               \protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}\StrSubstitute[2]{#2}{\pattern}{\replace}\hlabel{#1end}}      ## Still wrong, please help! The executable LaTeX code is here: ## LaTeX code Please read the following code and help me with the problem               \documentclass{article}     \usepackage{xstring}     \usepackage{lineno}     \linenumbers     \usepackage{hyperref}     \newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{\linelabel{line:#1}}}          % learn from a example of xstring package (page 18-19, xstring.pdf)     \expandarg     \def\pattern{\clab}     \def\replace{\elab}          \makeatletter       % define a empty function to replace the function \clab       \newcommand{\elab}[2]{#2}             % define a function \clab{label}{texts, texts, blabla}       % to create two labels, one is at the beginning of the texts       % the other is at the end of the texts       \newcommand{\clab}[2]{%         % I use the following line to do the job,         % it is fine to do          % \clab{lab1}{texts texts} texts, \clab{lab2}{texts texts} texts,          % but it goes wrong with         % \clab{lab1}{texts texts texts, \clab{lab2}{texts texts} texts},        %\protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}#2\hlabel{#1end}}         %so I tried to find the solution,         % the idea is using xstring function to replace the \clab{lab2}{texts texts texts} by a empty function         % \elab{lab2}{texts texts texts},         % I use the following code to do the job, but it still goes wrong!!         % \expandarg         % \def\pattern{\clab}         % \def\replace{\elab}         % \StrSubstitute[2]{#2}{\pattern}{\replace}       \protected@write \@auxout {}{\string \newlabel {r:#1}{{#2}{}}}\hlabel{#1}\StrSubstitute[2]{#2}{\pattern}{\replace}\hlabel{#1end}}     \makeatother               \begin{document}          THis one not work:     % please uncomment the following line to see the error messages           % \clab{lab1}{one two three four \clab{lab2}{five six seven eigth} nine ten}.          THis one works:          \clab{lab1}{one two three four}, \clab{lab2}{five six seven eigth} nine ten.          \end{document}     % end of file template.tex


title: LaTeX figure placement

text: I'm trying to place some figures within a document as well as some figures at the end of the document. Packages like `endfloat` seem to force all figures to the end, but I would like some flexibility. How can I make LaTeX put some figures in the text and some at the end?


title: unicode-math and various fonts fail at giving decent spacing in formula

text: I want to check if this problem is due to my configuration or if it is some kind of bug. This are the packages I load and the configuration for them (all very minimal in order to test the problem). I'm usin XeTeX 0.9998.               \documentclass[12pt,a4paper]{scrbook}     \usepackage{polyglossia}     \setmainlanguage{italian}     \usepackage{amsmath,amsthm,mathtools}      \usepackage{mathcomp,mathrsfs,xfrac,bbm}     \usepackage{unicode-math}     \usepackage{xunicode}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{Linux Libertine O}     \setsansfont[Scale=MatchLowercase]{Myriad Pro}     \setmonofont{Inconsolata}     \setmathfont{XITS Math}      When I was writing I kind of noticed that something was strange with spacing in mathematical formulas, then I wrote this ![XITS Math](http://i.stack.imgur.com/NrG0c.png) which is quite terrible. The spacing is not good at all, there are a lot of clashes. Then I tried with some other fonts, choosing among the one supported by unicode-math (found the list in the README), it turns out that I have the same effect with STIX Math and with Latin Modern Math, as you can see ![Latin Modern Math ](http://i.stack.imgur.com/ztAJB.png) Here the problem is less evident because, the font is lighter, but confront with the standard version of Latin Modern (without using opentype fonts and unicode-math) ![Latin Modern correct](http://i.stack.imgur.com/IrQ6d.png) This is correct, so I thought it was something related to unicode-math, but using Neo Euler and Asana Math it looks OK ![Neo Euler](http://i.stack.imgur.com/g1RjE.png) ![Asana Math](http://i.stack.imgur.com/Y1e5c.png) Does anybody have a clue of what might be the cause of this problem? Maybe the fonts? I hope not because I'd really like to use XITS or STIX... Can you reproduce the problem?


title: Difference between \mskip and \mkern

text: **What are the differences between`\mskip` and `\mkern`?** The TeXbook writes the following (ch. 18): > You can insert math glue into any formula just by giving the command > ‘`\mskip`⟨muglue⟩’. [...] Similarly, you can use the command ‘`\mkern`’ when > there is no stretching or shrinking; [...]. TeX insists that `\mskip` and > `\mkern` be used only with `mu`; conversely, `\hskip` and `\kern` (which are > also allowed in formulas) must never give units in `mu`. Is there anything else to know? Are there standard practices or minor syntactic usage differences to be aware of? For example, `\thickmuskip` is defined as `5mu plus 5mu`, but `\\(X X \mkern\thickmuskip X X\\)` (as opposed to `\\(X X \mskip\thickmuskip X X\\)`) compiles just fine, so it seems like `\mkern` disables stretching or shrinking but doesn't forbid such expressions for its argument.


title: Inline Mapping Bug?

text: The enclosed document creates a sequence variable and then uses inline mapping to attach a sequence number to each item. The inline map then outputs the result and places it into a token list variable for future use. That list variable is then printed. The sequence numbers are correct for the immediate output but fail to be duplicated in the list variable. Is this a bug in the inline map function or am I failing to understand my code?               \documentclass[12pt]{article}     \RequirePackage{expl3}     \RequirePackage{xparse}          \ExplSyntaxOn     \seq_new:N \l_my_seq     \int_new:N \l_my_count     \tl_new:N  \l_my_out     \ExplSyntaxOff          \begin{document}     \noindent     \ExplSyntaxOn          \seq_put_right:Nn \l_my_seq {A}     \seq_put_right:Nn \l_my_seq {B}     \seq_put_right:Nn \l_my_seq {C}     \seq_put_right:Nn \l_my_seq {D}          \int_zero:N \l_my_count                 % Initialize counter     \tl_clear:N \l_my_out                   % Initialize output string          Sequence~Input:~     \seq_map_inline:Nn { \l_my_seq } {      % Loop through items in sequence         \int_incr:N \l_my_count             % Increment counter         \int_use:N  \l_my_count -#1~        % Output result (count-item)         \tl_put_right:Nn \l_my_out {\int_use:N \l_my_count -#1~}  % store result         }     \\     List~Output:~ \l_my_out                  % Output stored result     \ExplSyntaxOff     \end{document}      The output produced by this document is:               Sequence Input: 1-A 2-B 3-C 4-D     List Output: 4-A 4-B 4-C 4-D      Both functions `\seq_map_inline:Nn` and `\tl_map_inline:Nn` exhibit similar behavior.


title: Measure and retain lengths between tabular rows

text: I need elements in a `tabular` environment to set some lengths and be able to access these lengths in another row of this same table. But it appears that adding `\global` in front of `\settoheight` and `\settowidth` is not sufficient. The the following MWE `MeasureFigureAndPlaceFigure` measures the height and width of the parameter passed to it, and attempts to globally set the lengths. This reports zero length and width after the `tabular`, but correct (ignoring the slight round off) lengths outside. ![enter image description here](http://i.stack.imgur.com/0g2xK.png)               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{printlen}     \uselengthunit{cm}          \newlength{\FigureHeight}     \newlength{\FigureWidth}     \newcommand{\MeasureFigureAndPlaceFigure}[1]{%         \global\settoheight{\FigureHeight}{#1}%         \global\settowidth{\FigureWidth}{#1}%         #1%     }%          \newcommand{\ReportHeightAndLength}{%         Height=\printlength{\FigureHeight}\quad%         Width=\printlength{\FigureHeight}%     }%          \def\FigA{\includegraphics[width=2.0cm,height=1.0cm]{myimage}}          \begin{document}     \noindent% This reports 0 lengths     \begin{tabular}{@{}l@{}}         \MeasureFigureAndPlaceFigure{\FigA}     \end{tabular}     \ReportHeightAndLength          \noindent % This works just fine     \MeasureFigureAndPlaceFigure{\FigA}     \ReportHeightAndLength     \end{document}


title: Print the number of pages in the document before this page

text: I'd like to print a sentence like this: "written upon this page and the _n_ preceding pages of paper" where _n_ is the number of pages _before_ this page. `\thepage` gives me the current page number, so really I just want `\thepage - 1`. I've been trying to look at performing some math in LaTeX, but I can't seem to find anything. I've also looked at the `lastpage` package (which could work, because this sentence is actually going on the last page of the document), but I'd still need to subtract 1 from it. **EDIT:** Thanks to kan/gekkostate, here's the result that does exactly what I wanted:               ...     \newcounter{precedingpages}     \setcounter{precedingpages}{\thepage}     \addtocounter{precedingpages}{-1}     written upon this page and the \theprecedingpages{} preceding pages of paper     ...


title: Double arrow for inline diagram

text: I want to make a diagram like `A--->B`, but there are two arrows, one written `f_1` and another with `f_2`. I tried `\stackrel`, but this gives arrows with different sizes. If using `\mathop{}_{under}^{over}`, then the vertical separation is too large. I also tried `tikz`, but the height position does not match the inline text. Edit: My tikz example code               \textbf{cokernel} of       \begin{tikzpicture}       \node (a) at (0,0){$A$};       \node (b) at (1.5,0){$X$};       \path[->]       ([yshift=2pt]a.east)edge node[above]{$f_1$}([yshift=2pt]b.west)       ([yshift=-2pt]a.east)edge node[below]{$f_2$}([yshift=-2pt]b.west);       \end{tikzpicture}      Effect: ![Effect:](http://i.stack.imgur.com/DQSY3.png) And no matter how I adjust the y-position of node (a),(b), it just does not move to the right place.


title: Putting a time-scale in a tikz diagram and aligning nodes with the time axis?

text: I'm looking to reproduce a diagram using the tikz package from a paper in JASA: Moodie et al 2009 104(485):155-65. This is the figure: ![enter image description here](http://i.stack.imgur.com/6t2vv.png) The nodes and arrows don't seem too difficult to generate. But I'm stumped on how to put a timescale axis, and space the nodes so that they align with it. So, to make this question relevant to a more general audience, how does one put an x-axis on the bottom of a tikz diagram, and align the nodes with elements on the axis? Here's a starting example for time-points 0 and 1:               \begin{tikzpicture}[line width=0.05cm]     \node [circle,draw] (h1) at (0,2) {$h$};     \node [circle,draw] (h2) at (2,2) {$h$};          \node [circle,draw] (b1) at (1.5,4) {$b$};          \begin{scope}[line width=.1cm,shorten >= 5pt, shorten <= 5pt]     \draw[->] (h1) -- (h2);     \draw[->] (h1) -- (b1);     \draw[->] (b1) -- (h2);          \end{scope}     \draw[help lines] (0,0) grid (5,5) ;     \end{tikzpicture}      I'm looking for what I can add to this code to get the time-axis (lines, tick marks, numbers, and title).


title: Using the nth package for Roman Numerals

text: \documentclass{book}     \usepackage{nth}     \begin{document}     \nth{3} is not the same as $\nth{3}$     \end{document}      This code works fine for numbers.Now , In the argument if I want to pass III , what should I do? I want the output as III(in slanting--> I achieved this using Math Mode)rd(in super script)


title: tikzpictures positioning

text: I am having trouble trying to position tikzpictures in their correct position... I want to place the 3 plots with the green filling in a single line above (with the alpha/2 right below), and the 3 plots with the yellow filling in a single line below (with the alpha/2 right below)... how could I specify here a new line?? I have tried using \nodes but for some reason it does not work. There is something I am missing here, since I specify the width of the minipages to be \linewidth, and the paperwidth of the document is slightly more than the width of 3 plots in line. The following MWE produces this figure: ![enter image description here](http://i.stack.imgur.com/5tNJG.png) However, I would like that it produced a picture similar to this one (which I have made manually): ![enter image description here](http://i.stack.imgur.com/L3d0K.png) The code I have so far is the following:               \documentclass{standalone}          \usepackage[paperwidth=32cm,paperheight=15cm]{geometry}               \usepackage{pgfplots}     \pgfmathdeclarefunction{gauss}{2}{%         \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%     }                    \begin{document}          {\large     \begin{minipage}{\linewidth}             \textcolor{green!70!black}{Tissue-specific expression}\\             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:12, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick={2,8}, ytick=\empty,                 xticklabels={{\footnotesize $\mu$1},{\footnotesize $\mu$2}},                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=green!70!black, draw=none, domain=2.75:3.65] {gauss(2,0.5)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=4.9:6.5] {gauss(8,1)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(2,0.5)};                 \addplot [cyan!50!black] {gauss(8,1)};                 \addplot[<->] coordinates {(1.25,0.2) (2.75,0.2)};                 \node at (axis cs: 2,0.2) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \addplot[<->] coordinates {(6.5,0.12) (9.5,0.12)};                 \node at (axis cs: 8,0.12) [font=\footnotesize, inner sep=1pt, above] {$\sigma 2$};                 \end{axis}             \end{tikzpicture}\quad%             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:25, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick={2,8,19}, ytick=\empty,                 xticklabels={{\footnotesize $\mu$1},{\footnotesize $\mu$2},{\footnotesize $\mu$3}},                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=green!70!black, draw=none, domain=2.75:3.65] {gauss(2,0.5)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=4.9:6.5] {gauss(8,1)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=9.5:11.1] {gauss(8,1)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=13:16] {gauss(19,2)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(2,0.5)};                 \addplot [cyan!50!black] {gauss(8,1)};                 \addplot [cyan!50!black] {gauss(19,2)};                 \addplot[<->] coordinates {(1.25,0.2) (2.75,0.2)};                 \node at (axis cs: 2,0.2) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \addplot[<->] coordinates {(6.5,0.12) (9.5,0.12)};                 \node at (axis cs: 8,0.12) [font=\footnotesize, inner sep=1pt, above] {$\sigma 2$};                 \addplot[<->] coordinates {(16,0.04) (22,0.04)};                 \node at (axis cs: 19,0.04) [font=\footnotesize, inner sep=1pt, above] {$\sigma 3$};                 \end{axis}             \end{tikzpicture}\quad%             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:25, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick={2,5,19}, ytick=\empty,                 xticklabels={{\footnotesize $\mu$1},{\footnotesize $\mu$2},{\footnotesize $\mu$3}},                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=green!70!black, draw=none, domain=2.75:3.65] {gauss(2,0.5)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=2:3.5] {gauss(5,1)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=6.5:8] {gauss(5,1)}                 \closedcycle;                 \addplot [fill=green!70!black, draw=none, domain=13:16] {gauss(19,2)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(2,0.5)};                 \addplot [cyan!50!black] {gauss(5,1)};                 \addplot [cyan!50!black] {gauss(19,2)};                 \addplot[<->] coordinates {(1.25,0.2) (2.75,0.2)};                 \node at (axis cs: 2,0.2) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \addplot[<->] coordinates {(3.5,0.12) (6.5,0.12)};                 \node at (axis cs: 5,0.12) [font=\footnotesize, inner sep=1pt, above] {$\sigma 2$};                 \addplot[<->] coordinates {(16,0.04) (22,0.04)};                 \node at (axis cs: 19,0.04) [font=\footnotesize, inner sep=1pt, above] {$\sigma 3$};                 \end{axis}             \end{tikzpicture}             {\small {$\alpha$}/2=0.025}     \end{minipage}\hfill     \begin{minipage}{\linewidth}             \textcolor{yellow!60!black}{Ubiquitous expression}\\             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:10, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick=5, xticklabels={\footnotesize $\mu$1},                 ytick=\empty,                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=yellow!60!black, draw=none, domain=1.5:3.5] {gauss(5,1)}                 \closedcycle;                 \addplot [fill=yellow!60!black, draw=none, domain=6.5:8.5] {gauss(5,1)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(5,1)};                 \addplot[<->] coordinates {(3.5,0.1) (6.5,0.1)};                 \node at (axis cs: 5,0.1) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \end{axis}             \end{tikzpicture}\quad%             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:10, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick={3,6}, ytick=\empty,                 xticklabels={{\footnotesize $\mu$1},{\footnotesize $\mu$2}},                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=yellow!60!black, draw=none, domain=3.75:4.65] {gauss(3,0.5)}                 \closedcycle;                 \addplot [fill=yellow!60!black, draw=none, domain=2.5:4.5] {gauss(6,1)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(3,0.5)};                 \addplot [cyan!50!black] {gauss(6,1)};                 \addplot[<->] coordinates {(2.25,0.2) (3.75,0.2)};                 \node at (axis cs: 3,0.2) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \addplot[<->] coordinates {(4.5,0.12) (7.5,0.12)};                 \node at (axis cs: 6,0.12) [font=\footnotesize, inner sep=1pt, above] {$\sigma 2$};                 \end{axis}             \end{tikzpicture}\quad%             \begin{tikzpicture}                 \begin{axis}[                 no markers, domain=0:15, samples=100,                 axis lines*=left, xlabel=\empty, ylabel=\empty,                 every axis y label/.style={at=(current axis.above origin),anchor=south},                 every axis x label/.style={at=(current axis.right of origin),anchor=west},                 height=5cm, width=9cm,                 xtick={2,5,10}, ytick=\empty,                 xticklabels={{\footnotesize $\mu$1},{\footnotesize $\mu$2},{\footnotesize $\mu$3}},                 enlargelimits=false, clip=false, axis on top]                 \addplot [fill=yellow!60!black, draw=none, domain=2.75:3.65] {gauss(2,0.5)}                 \closedcycle;                 \addplot [fill=yellow!60!black, draw=none, domain=2:3.5] {gauss(5,1)}                 \closedcycle;                 \addplot [fill=yellow!60!black, draw=none, domain=6.5:8] {gauss(5,1)}                 \closedcycle;                 \addplot [fill=yellow!60!black, draw=none, domain=4:6.9] {gauss(10,2)}                 \closedcycle;                 \addplot [cyan!50!black] {gauss(2,0.5)};                 \addplot [cyan!50!black] {gauss(5,1)};                 \addplot [cyan!50!black] {gauss(10,2)};                 \addplot[<->] coordinates {(1.25,0.2) (2.75,0.2)};                 \node at (axis cs: 2,0.2) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \addplot[<->] coordinates {(3.5,0.12) (6.5,0.12)};                 \node at (axis cs: 5,0.12) [font=\footnotesize, inner sep=1pt, above] {$\sigma 2$};                 \addplot[<->] coordinates {(7,0.04) (13,0.04)};                 \node at (axis cs: 10,0.04) [font=\footnotesize, inner sep=1pt, above] {$\sigma 1$};                 \end{axis}             \end{tikzpicture}             {\scriptsize {$\alpha$}/2=0.025}     \end{minipage}%     }        \end{document}      Once this issue is solved, I would like to convert the resulting pdf with a proper density setting, which I have no idea how... but this is secondary, as I can always print the screen or something... Thanks!


title: Drawbacks of redefining math accents with extra leading {}?

text: As I discovered through the non-bug `latex/4253`, TeX has a (mis)feature whereby it ignores braces around a `\mathaccent` construction: `${a_b}_c$` works, but `${\tilde a_b}_c$` fails with a "Double subscript" error. Braces in `{a_b}` turn that into an atom, which can receive a second subscript, but braces in `{\tilde a_b}` have no effect. See a question about why this happens for details. Since `${{}\tilde a_b}_c$` works fine (TeX keeps the surrounding braces), I am wondering whether defining `\tilde` as `{}\mathaccent...` rather than `\mathaccent...` would be better. Will such a leading brace group have any ill effect on spacing (or other things)? Is there a better definition that would not result in confusing double superscript errors? EDIT: Several commenters ask me incredulously why anyone would want this. I couldn't come up with a good case for double subscripts, only for double superscripts: the square of the derivative of `b` is typeset `{b'}^2` or `b'{}^2`. What about the square of the derivative of `\tilde{b}`? ![ways to typeset b tilde prime squared](http://i.stack.imgur.com/5aXSj.jpg) Here, it is possible to get a decent result with `\tilde{b}{{}'}^2` (line marked with a star), but I don't think the input is natural. For an example that makes things worse, say `\widetilde` denotes the Fourier transform, and that I want to take the Fourier transform of `b(t)/t`, then take its derivative squared. Naturally I would type `{\widetilde{\biggl[\frac{b}{t}\biggr]}'}^2`. Instead, I need to type `\widetilde{\biggl[\frac{b}{r}\biggr]}{\vphantom{\frac{b}{r}}'}^2` or something like that... That said, I am mostly interested in knowing if adding `{}` to the start of the definition of `\tilde` (and `\widetilde`) would mess up math spacing.


title: Modifying reference style

text: I'm preparing a document with references that should be set out as follows: http://www.i-cite.bham.ac.uk/harvard_reference_list.shtml http://www.i-cite.bham.ac.uk/harvard_citing.shtml The code I have so far is:               \documentclass[11pt, a4paper]{article}     \usepackage{natbib}     \begin{document}     As \citet{test2012} says.     \bibliographystyle{plain}     \bibliography{V1.bib}     \end{document}      with a .bib that looks like:               @article{test2012,     author  = "Surname, forename",     title   = "Title",     year    = "2012",     journal = "Journal",     volume  = "Volume 1",     number  = "4",     pages   = "342--351"      }      How might I go about modifying this so it fits the way I need the references laid out?


title: Document class for designing a book

text: **Introduction** I've been using LaTeX for 15 years, but one year ago I started to write for the first time in my life a real book for students. So I followed usual widespread conviction: **concentrate on the contents, the LaTeX will take care of the rest**. However, this conviction holds only if you are writing a thesis or an article, where styling is largely unimportant (who reads theses anyway?). Namely, after finishing my writing after one year of work I was into a real unpleasant surprise. I've received a modest lump of money to find a designer for a book. There is a big pool of good book designers out there, but not one has ever wrote a command in LaTeX. Which in fact means one year of intensive work shall be _retyped_ in some other LaTeX incompatible program, figures shall be rescaled together with fonts... and everything I was so damn careful for over a year will be messed up in a second... **Question** **Is it possible for a non-professional semi-experienced LaTeX user to implement design ideas to the document himself and save his precious work? Which document class should s/he start with?** To demonstrate poor performance of standard LaTeX classes for book design, I will show you part of the code written using KOMA-Script scrbook and approximate proposition from the designer. _Minimum working example_ :               \documentclass[12pt,parskip]{scrbook}     \usepackage[cp1250]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{amsmath}          \input{slike_1} % TikZ pictures          \begin{document}          \textit{Enakomerno večdimenzionalno gibanje} označuje gibanje, pri katerem je vektor hitrosti konstanten.  Gibanje tem primeru opisuje enačba, ki je posplošitev enačbe~(...)     %     \begin{equation}     \vec{r} = \vec{v} t + \vec{r}_0,\label{k-umm}     \end{equation}     %     kjer $\vec{r}$ označuje trenutni, $\vec{r}_0$ pa začetni položaj telesa.  Vektorju $\text{r}$, ki označuje položaj telesa, pravimo tudi \textit{krajevni vektor}.          \textit{Enakomerno pospešeno večdimenzionalno gibanje} označuje gibanje, pri katerem je vektor pospeška~$\vec{a}$ konstanten.  Gibanje v tem primeru opisujejo enačbe, ki so posplošitve enačb~(...)     %     \begin{align}     \vec{r} &= \tfrac{1}{2} \vec{a} t^2 + \vec{v}_0 t + \vec{r}_0\label{k-uamm1}\\     \vec{v} &= \vec{a} t + \vec{v}_0 \label{k-uamm2}\\     v^2 &= v_0^2 + 2 \vec{a} \cdot (\vec{r} - \vec{r}_0) \label{k-uamm3}     \end{align}     %     kjer so $\vec{r}$ trenutni in $\vec{r}_0$ začetni krajevni vektor telesa, ter $\vec{v}$ trenutni in $\vec{v}_0$ začetni vektor hitrosti telesa.  Pri tem je tretja enačba izpeljana iz prvih dveh.          \begin{figure}[!ht]     \centering     \Tpro     \caption{Poševni met}     \end{figure}          Če se telo nahaja v bližini Zemeljske površine, nanj deluje konstantni pospešek prostega pada $g = 10$~m/s$^2$ navpično navzdol.  Vsako tako gibanje telesa je dejansko \textit{dvo}-dimenzionalno, saj se telo giblje po navpični ravnini.  Po dogovoru $y$~os usmerimo navpično navzgor, torej nasproti smeri pospeška prostega pada ($\vec{a} = - g \vec{j}$), $x$~os pa tako, da začetna hitrost leži v $xy$ ravnini $\vec{v}_0 = v_{x0} \vec{i} + v_{y0} \vec{j}$.  Potem lahko vsako od enačb~(...) razstavimo na \textit{dve} skalarni enačbi in dobimo     %     \begin{align}     x(t) &= v_{x0} t + x_0, \label{k-prsx}\\     y(t) &= -\tfrac{1}{2} g t^2 + v_{y0} t + y_0, \label{k-prsy}\\     v_x(t) &= v_{x0}, \label{k-prvx}\\     v_y(t) &= -g t + v_{y0}. \label{k-prvy}     \end{align}           Pri tem smo upoštevali, da je pospešek v $x$~smeri enak $a_x = 0$, pospešek v $y$~smeri pa $a_y = -g$, kar pomeni, da imamo v $x$~smeri enakomerno gibanje, v $y$~smeri pa enakomerno pospešeno gibanje.          \end{document}      Result of MWE ![Result of MWE](http://i.stack.imgur.com/qC8Mp.png) I think you agree with me this is totally unacceptable for a real book. The text is just too crowded, it gives 80-90 characters (including spaces) or 70-80 characters per line, and cca. 44 lines per page. I must agree with designers, this is just too crowded and unattractive for a university-freshman learning book. Here is one of possible book designs: ![A possible design](http://i.stack.imgur.com/Ro9dL.png) EDIT: Since PGFTricks provided a bounty, I provide here the code for the picture, so you can test your ideas. It is scalable, \lmet provides the size of picture, \lms the lengths of vectors.               \tikzset{avec/.style = {->,green!75!black,line width=\wvec}}                 % acceleration vector style     \tikzset{vvec/.style = {->,red,line width=\wvec}}                            % velocity vec tor style     \tikzset{vlin/.style = {red}}                                                % velocity vector style          \newcommand{\rang}[3]{     \begin{scope}[shift={#1},rotate=#2]     \draw[#3] (5pt,0) -- (5pt,5pt) -- (0,5pt);     \end{scope}}           \newcommand\Tpro{     \begin{tikzpicture}[>=stealth,auto]     \def\lms{0.005cm}     \def\lmet{0.0007cm}          \draw[->,very thin] (-500*\lmet,0) -- (13000*\lmet,0) node[right] {$\scriptstyle x$};     \draw[->,very thin] (0,-500*\lmet) -- (0,5000*\lmet) node[above] {$\scriptstyle y$};     \draw[very thin] (500*\lmet,0) arc (0:60:500*\lmet);     \node at +(30:500*\lmet+8pt) {$\alpha$};          \draw[vvec] (0,0) -- +(60:360*\lms) node[midway] {$\vec{v}_0$};     \draw[vlin] (0,0) -- +(180*\lms,0) node[midway,swap] {$v_{x0}$} -- +(60:360*\lms) node[midway,swap] {$v_{y0}$};     \rang{(180*\lms,0)}{90}{vlin};      \draw[vvec] (2372*\lmet,3240*\lmet) -- +(180*\lms,180*\lms) node[midway] {$\vec{v}_1$};     \draw[vlin] (2372*\lmet,3240*\lmet) -- ++(180*\lms,0) node[midway,swap] {$v_{x1}$} -- ++(0,180*\lms) node[midway,swap] {$v_{y1}$};     \rang{(2372*\lmet+180*\lms,3240*\lmet)}{90}{vlin};     \draw[vvec] (5612*\lmet,4860*\lmet) -- +(180*\lms,0) node[midway] {$\vec{v}_2$};     \draw[vvec] (8852*\lmet,3240*\lmet) -- +(180*\lms,-180*\lms) node[midway,swap] {$\vec{v}_3$};     \draw[vlin] (8852*\lmet,3240*\lmet) -- ++(180*\lms,0) node[midway] {$v_{x3}$} -- ++(0,-180*\lms) node[midway] {$v_{y3}$};     \rang{(8852*\lmet+180*\lms,3240*\lmet)}{180}{vlin};     \draw[vvec] (11224*\lmet,0) -- +(-60:360*\lms) node[midway,swap] {$\vec{v}_4$};     \draw[vlin] (11224*\lmet,0) -- +(180*\lms,0) node[midway] {$v_{x4}$} -- +(-60:360*\lms) node[midway] {$v_{y4}$};     \rang{(11224*\lmet+180*\lms,0)}{180}{vlin};     \draw[avec] (5612*\lmet,2430*\lmet) -- +(0,-180*\lms) node[midway] {$\vec{a}$};          \draw[densely dashed] (0,0) parabola bend (5612*\lmet,4860*\lmet) (11224*\lmet,0);          \filldraw[thick,fill=white] (0,0) circle (100*\lmet);     \filldraw[thick,fill=white] (2372*\lmet,3240*\lmet) circle (100*\lmet);     \filldraw[thick,fill=white] (5612*\lmet,4860*\lmet) circle (100*\lmet);     \filldraw[thick,fill=white] (8852*\lmet,3240*\lmet) circle (100*\lmet);     \filldraw[thick,fill=white] (11224*\lmet,0) circle (100*\lmet);          \end{tikzpicture}}


title: variables within a new command

text: The integers modulo n, given by               \mathbb{Z}/n\mathbb{Z}      is cumbersome to write. Accordingly, I would like to set up a new command that allows me to specify an input 'n'. Something like               \newcommand{\Z[character]}{\mathbb{Z}/[character]\mathbb{Z}}      But the above code is not right. Does anyone have any idea how this might be done?


title: Line ends at wrong location in picture environment

text: I draw a yellow square inside a grey square, exactly in the middle. Unexpectedly, the yellow square is not aligned horizontally but instead moved to the right: ![enter image description here](http://i.stack.imgur.com/kIH6z.png) Why? If I understand correctly, the yellow square should end at x=37, and the grey at x=38.               \documentclass{article}     \usepackage{xcolor}     \begin{document}     \setlength{\unitlength}{1mm}     \hrule\noindent          \begin{picture}(40,40)     \linethickness{36mm}     \color{gray}     \put(2,20){\line(1,0){36}}          \linethickness{34mm}     \color{yellow}     \put(3,20){\line(1,0){34}}     \end{picture}          \hrule     \end{document}


title: Setting up biber as a default biblatex backend in the configuration file

text: The `biblatex` release notes recommend to setup `backend=biber` in `biblatex.cfg`, however LaTeX refuses to accept this text in `biblatex.cfg`:               \ProvidesFile{biblatex.cfg}     \usepackage[backend=biber]{biblatex}     \endinput      LaTeX says, "The package biblatex has already been loaded with options..." How to set up backend parameter in here properly?


title: Continuous subfigure numbering

text: I have a lot of files including images and I want them to be numbered continuously. I use many images next to each other, which looks like               \begin{figure}[H]         \begin{subfigure}[t]{0.45\textwidth}                 \includegraphics[bla]{bla1.jpg}                 \caption{bla}                 \label{fig:bla1}         \end{subfigure}         \begin{subfigure}[t]{0.45\textwidth}             \includegraphics[bla]{bla2.jpg}                 \caption{bla}                 \label{fig:bla2}         \end{subfigure}     \end{figure}      Their caption labels are (1) and (2). Then I have single images like:               \begin{figure}[H]     \begin{subfigure}{0.62\textwidth}         \includegraphics[bla]{bla3.jpg}         \caption{bla}         \label{fig:bla3}     \end{subfigure}     \end{figure}      Its label is (1) again, but I would like it to have (3). My attempt was to use:               \usepackage{chngcntr}     \counterwithout{subfigure}{figure}      so that it ignores the figure-environment. It does not work. The problem is that I am using memoir as `documentclass`, without using chapters. Originally, the pictures were numbered continuously like 0.1, 0.2, 0.3 etc., because they were in `minipages` instead of `subfigures`. But I wanted to remove the `0`, so that I replaced the `minipages` with `subfigures` and               \renewcommand{\thesubfigure}{\arabic{subfigure}}      I hope this is understandable and I appreciate your help!


title: How to center table caption that includes a newline

text: My table caption spans more than on line so I added a `\newline` to split the caption at an appropriate position. Now, the two lines are left aligned. How do I center the two lines of the caption?               \begin{table}[htb]     \begin{center}     \caption{my caption line one\newline my caption line two}     \begin{tabular}{|r|c|c|c|c|c|}     \end{tabular}     \end{center}     \end{table}


title: Replicate this chart using LaTeX

text: I need to replicate this chart using LaTeX, I understand that TikZ should come in handy: ![enter image description here](http://i.stack.imgur.com/ULToA.jpg) Can anyone please show me the best and easiest way to render the chart? Any ideas, tips, nudges in the right direction on how to do that are highly welcome.


title: Best way to print key-value pairs: table, array or matrix?

text: I have a series of values that need to be printed row-wise in multiple columns. (These values, held as `\def` variables, are generated programatically and some of them can be empty strings.) The problem is how to avoid the empty cells and have the next cell automatically take the previous cell place if its empty. For example, I have these non-empty values: `Author`, `Composer`, `Publisher`, `Year` to be arranged in 3 columns as:               Author    Composer    Publisher          Year      That is in two rows. If we add one more entry, it should go to next cell after `Year`. However, if the Publisher is empty then Year should automatically come to the first row as:               Author    Composer    Year      I have `\Author`, `\Composer`, `\Publisher`, `\Year` and so on list of variables that need to be arranged as this. I just would like to write something like:               \SomeEnvironment{\Author, \Composer, \Publisher, \Year, \something so on}      and let the environment figure out automatically to remove the empty ones and let the next ones flow. How to achieve this? PS: For those curios, this is part of CarMusTy: Carnatic Music Typesetting Environment project.


title: Align environment: take exact control of tab position

text: I was wondering if it is possible to take control of the exact position of the tab in an `align` environment. Like so:               \begin{align}[2cm]     A &= x^3 + 14789\\     B &= f^6     \end{align}      Which should then place both '=' signs at _exactly_ 2cm from the left margin. No matter how long the expressions before and after '=' are. Does anyone know how to do something like that?


title: I don't find the error

text: The code is here               \documentclass[12pt,a4paper,oneside]{scrbook}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{mathpazo}     \usepackage{amsmath,amsfonts,amssymb,latexsym,cancel}          % Referencias - Enlaces     \usepackage[hyphens]{url}     \usepackage[breaklinks,colorlinks=true,linkcolor=red,     citecolor=red, urlcolor=blue]{hyperref}          \usepackage{caption}     \captionsetup{font=small,format=plain,parskip=1pt,justification=centering}     \captionsetup[figure]{font=small,format=plain,parskip=1pt,justification=centering}     \renewcommand{\thefigure}{\arabic {figure}}     \setcounter{chapter}{0}          \usepackage{graphicx}     \usepackage{color,xcolor}     \usepackage{etex,tikz, pgf, pgfplots}     \usetikzlibrary{arrows,backgrounds}     \pgfplotsset{width=10cm,compat=1.5}          \usepackage[total={18cm,21cm},left=2cm,top=2cm]{geometry}     \parindent=0mm     \renewcommand{\baselinestretch }{1.2}     \usepackage{icomma}      \usepackage{fancyhdr} %activamos el paquete     \usepackage{endnotes}      \usepackage[superscript]{cite} %las citas          \renewcommand\citeform[1]{\textcolor{blue}{#1}}  % Ponemos las citas en azul          \let\footnote=\endnote     \def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}     \let\footnotemark\endnotemark           \pagestyle{fancy} %seleccionamos un estilo     \lhead{Formulario Cónicas} %texto izquierda de la cabecera     \rhead{\thepage }     \chead{Formulario} %texto centro de la cabecera     \rfoot{Cónicas} %texto izquierda del pie     \rhead{\thepage } %número de página a la derecha     \renewcommand{\footrulewidth}{0.4pt}      \renewcommand{\headrulewidth}{0.4pt}          \renewcommand{\bibname}{Bibliografía}          \definecolor{gris claro}{gray}{0.85}          \begin{document}     \title{Formulario De Cónicas}     \author{Cristobal López Silla - Licenciado En Matemáticas}     \date{}     \maketitle          \chapter*{Cónicas}     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{Una \textbf{cónica} o \textbf{sección cónica} es un lugar geométrico que se obtiene al intersectar un plano con un cono.}}}     \end{center}     Si el plano no pasa por el vértice se obtienen las \textbf{cónicas no degeneradas}: \emph{circunferencia, elipse, parábola e hipérbola}. \\          Si el plano corta el vértice se obtienen las \textbf{cónicas degeneradas}: un punto, una recta generatriz del cono, dos rectas que se cortan en el vértice del cono.\\          \begin{figure}[h]         \begin{center}             \includegraphics[scale=1]{conicas.svg}         \end{center}         \caption{Diferentes Cortes de un plano con un cono \\ \textbf{(1)} Parábola \textbf{(2)} Elipse \emph{(arriba)} y Circunferencia \emph{(abajo)} \textbf{(3)} Hipérbola \\ Fuente Wikipedia \cite{Con}}     \end{figure}          \section*{Circunferencia}     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{Lugar geométrico de los puntos de un plano que equidistan de otro punto fijo y coplanario llamado \textbf{Centro} en una cantidad constante llamada \textbf{Radio}.}}}     \end{center}          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}         \draw[thick] (0,0) circle (2cm);         \draw[red, thick] (0,-2) -- (0,2) node[right=-0.5cm, below=0.95cm, semithick, rotate=90] {diámetro}; %diámetro         \filldraw[fill=green!20!white,draw=green!50!black](0,0)--(2cm,0) arc (0:90:2cm)--cycle; %arco         \draw (1.25,1.55) -- (1.25,2.5) node {\small Long. Arco};         \draw[blue, thick] (0,0) -- (2,0) node[above=0.25cm, left=0.75cm, semithick] {radio}; %radio         \draw[green!45!black, thick] (-2,2) -- (1,-2) node[right=-0.5cm, above=0.85cm, semithick, rotate=-45] {secante}; %secante         \draw[gray!45!black, thick] (-1,1.732) -- (-1,-1.732) node[right=0.1cm, above=0.75cm, semithick, rotate=90] {cuerda}; %cuerda         \draw[orange, thick] (2,3) -- (2,-2) node[midway, right=0.15cm, semithick] {tangente}; %tangente     \end{tikzpicture}     \end{center}     \caption{Principales Elementos De La Circunferencia}     \end{figure}          \textbf{Longitud Circunferencia}: $L=2\cdot \pi \cdot r$\\          \textbf{Longitud Arco Circunferencia}: $L=\dfrac{2\cdot \pi \cdot r \cdot \alpha}{360^\circ}\quad / \alpha$ es el ángulo del arco.\\          \textbf{Área Circunferencia}: $A=\pi \cdot r^2$\\          \subsection*{Ecuaciones De La Circunferencia}     \textbf{\underline{Coordenadas Cartesianas}}: Sea $C=(a,b)$ el Centro de la circunferencia y $r$ su radio. Representamos la circunferencia de centro C y radio r en cartesianas como:     \[(x-a)^ 2+(y-b)^2=r^2\]     Si el centro es el origen de coordenadas se representa por:     \[x^2+y^2=r^2\]     Si además, el radio es $r=1$, se le denomina \textbf{Circunferencia Unidad} o \textbf{Circunferencia Goniométrica} $x^2+y^2=1$.\\ \\     Desarrollemos $(x-a)^ 2+(y-b)^2=r^2$ para obtener la Forma General de la Circunferencia:\\      \[(x-a)^ 2+(y-b)^2=r^2 \Rightarrow x^2-2ax+a^2+y^2-2by+b^2=r^2\Rightarrow x^2+y^2-2ax-2by+b^2-r^2=0\]     Definimos lo siguiente:     \[A=-2a,\quad B=-2b, \quad C=b^2-r^2\]     Lo sustituimos en la última expresión y obtenemos:     \[x^2+y^2+Ax+By+C=0\rightarrow\: Forma\: General\: De\: La\: Circunferencia\]     \textbf{\underline{Ecuación Vectorial}}: De centro $C=(a,b)$ y radio $R$, tal que $\theta\in\left[0,\, 2\pi\right[$     \[\overrightarrow{r}=\left(a+R\cdot \cos\left(\theta\right),\, b+R\cdot \sin\left(\theta\right)\right)\]     \textbf{\underline{Ecuación Paramétrica}}: De centro $C=(a,b)$ y radio $r$. Lo expresamos en forma de función:     \[f(t)=(a+r\cdot\cos(t),\: b+r\cdot\sin(t))\:\forall\: t\in[0,2\pi]\]     \newpage     \section*{Elipse}     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{Lugar geométrico de todos los puntos de un plano, tales que la suma de las distancias a otros dos puntos fijos llamados \emph{focos} es constante.}}}     \end{center}          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}         \draw[very thick] (0,0) ellipse (3cm and 2cm);         \draw (0,2.25) -- (0,-2.25);         \draw (3.0,0) -- (-3.25,0);         \draw[fill, color=blue!30!white] (0,0) -- (0,2) -- (2.236,0) -- cycle;         \draw[fill] (0,0) circle (0.1);         \node at (0.25,0.25) {\small C};         \draw[fill] (0,2.0) circle (0.1);         \node[color=blue] at (0.25,2.25) {\small b};         \draw[fill] (0,-2.0) circle (0.1);         \node[color=blue] at (-0.25,-2.25) {\small -b};             \node[color=blue] at (3.25,0.15) {\small a};             \node[color=blue] at (-3.25,0.15) {\small -a};             \node[color=red!75!black] at (-2.35,0.25) {\small F1};             \node[color=red!75!black] at (2.35,0.25) {\small F2};         \node[color=red!75!black] at (1.175,-0.25) {\small c};         \node[color=red!75!black] at (1.1,1.25) {\small a};         \node[color=red!75!black] at (-0.25,0.9) {\small b};         \node[color=green!75!black] at (1.1,2.15) {\small P};         \draw[color=green!75!black] (1.0,1.885618) -- (-2.236,0);         \draw[color=green!75!black] (1.0,1.885618) -- (2.236,0);         \draw[color=blue!75!black,dashed, very thick] (4.0249,2.5) -- (4.0249,-2.5);         \node[color=blue!75!black] at (4.75,1.0) {$x=\dfrac{a^2}{c}$};         \draw[color=blue!75!black,very thick] (1.0,1.885618) -- (4.0,1.885618);         \draw[fill, blue!75!black] (4.0,1.885618) circle (0.1);         \node[color=blue!75!black] at (4.25,1.88) {\small D};         \draw[color=blue!75!black] (3.0,0) -- (4.0,0);         \draw[fill, blue!75!black] (4.0,0) circle (0.1);         \node[color=blue!75!black] at (4.25,0) {\small d};         \draw[fill] (3.0,0) circle (0.1); %punto a         \draw[fill] (-3.0,0) circle (0.1); %punto -a         \draw[fill, red!75!black] (-2.236,0) circle (0.1); %punto F1         \draw[fill, red!75!black] (2.236,0) circle (0.1); %punto F2         \draw[fill, green!75!black] (1.0,1.885618) circle (0.1); %punto P     \end{tikzpicture}     \end{center}     \caption{Principales Elementos De La Elipse\\ \textbf{Área:} $A=2\cdot\pi\cdot a\cdot b$}     \end{figure}          \subsection*{Elementos de una Elipse}     La elipse es una curva plana y cerrada, simétrica respecto a 2 ejes perpendiculares entre sí, que son los semiejes: \\     \textbf{\underline{Semieje Mayor}}: En la figura es el que va de \textbf{-a} hasta \textbf{a}. Su valor es $2\cdot a$ \\[2.5pt]     \textbf{\underline{Semieje Menor}}: En la figura es el que va de \textbf{-b} hasta \textbf{b}. Su valor es $2\cdot b$ \\[2.5pt]     Si la elipse es vertical, entonces se tiene:\\     \textbf{\underline{Semieje Mayor}}: Va de \textbf{-b} a \textbf{b}. Su valor es $2\cdot b$\\     \textbf{\underline{Semieje Menor}}:Va de \textbf{-a} a \textbf{a}. Su valor es $2\cdot a$\\     Miden la mitad de los ejes mayor y menor, respectivamente. \\     \textbf{\underline{Focos}}: Son 2 puntos que están a la misma distancia del centro de la elipse.      \[d(F_1,\, C)=d(F_2,\, C)\Rightarrow\: Distancia\: Focal\]     Dado un punto cualquiera P de la elipse, se cumple:     \[d(P,\, F_1)+d(P,\, F_2)=2\cdot a\]     Si consideramos $F_1=(-c,0),\: F_2=(c,0)$, siendo $c=d(C,F_1)=d(C,F_2)$, la distancia de uno de los focos al centro de la elipse. Se define:\\     \textbf{\underline{Distancia Focal}}: Es el valor $2\cdot c$\\     Se cumple la siguiente ecuación fundamental (Ver el triángulo de la figura 2):     \[a^2=b^2+c^2\]     La fórmula cambia cuando la elipse es vertical a:     \[b^2=a^2+c^2\]     \emph{No hace falta que la memorices, sólo hace falta que recuerdes el Teorema de Pitágoras.}\\     \textbf{\underline{Excentricidad $(\epsilon)$}}: Indica la forma de la elipse, cuanto más cerca de cero más se parecerá a una circunferencia. O lo que es lo mismo, si $a=b\Rightarrow\epsilon=0\Rightarrow Circunferencia$ \\     $\epsilon=\frac{c}{a}\: ; \quad 0\, \leq\,\epsilon\, \leq\, 1$ \\     Como $c=\sqrt{a^2-b^2}\Rightarrow \epsilon=\sqrt{\frac{a^2-b^2}{a^2}}=\sqrt{1-(\frac{b}{a})^2}$ \\     \textbf{\underline{Directrices}}: $\epsilon=\dfrac{\overline{PF}}{\overline{PD}}$ \\     Si definimos $f=\overline{PF}\qquad d=\overline{PD}\Rightarrow \epsilon=\dfrac{f}{a}\quad \epsilon=\dfrac{a}{d}\Rightarrow d=\dfrac{a}{\epsilon}\Rightarrow d=\dfrac{a}{\frac{c}{a}}\Rightarrow d=\dfrac{a^2}{c}$\\     \emph{Luego la directriz para una elipse horizontal centrada en el origen es la recta vertical:} $x=\dfrac{a^2}{c}$\\     Si el centro elipse es $C(h,\: k)$ tenemos:\\     \textbf{\underline{Directriz Elipse Horizontal}}: $x=h+\dfrac{a^2}{c}$\\     \textbf{\underline{Directriz Elipse Vertical}}: $y=k+\dfrac{b^2}{c}$     \subsection*{Ecuaciones De La Elipse}     \textbf{\underline{Coordenadas Cartesianas}}: Consideremos el centro de la elipse por $C=(x_0,y_0)$, con a,b sus semiejes. Se puede expresar la ecuación de la elipse en Cartesianas de \emph{forma explícita} como:     \[\dfrac{(x-x_0)^2}{a^2}+\dfrac{(y-y_0)^2}{b^2}=1\]     \textbf{\underline{Paramétricas}}: Si $\theta\in [0,2\pi[$ Lo expresamos como función paramétrica: \\     \[f(\theta)=(x_0+a\cdot\cos(\theta),\, y_0+b\cdot\sin(\theta))\]          \newpage     \section*{Parábola}     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{Lugar geométrico de los puntos de un plano equidistantes a una recta dada, llamada \textbf{Directriz}, y a un punto exterior a ella llamado \textbf{Foco}.}}}     \end{center}          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}         \draw[very thick](0,-2) parabola (-2,2) (0,-2) parabola (2,2);         \node[color=red!75!black] at (0.6,-2.15) {\small vértice};         \draw[very thick,blue!75!black](0,-3.5) -- (0,2);         \node[color=blue!75!black] at (0.35,2.0) {\small eje};         \draw[very thick,red!75!black](-1.4142,0) -- (1.4142,0);         \node[color=red!75!black] at (-.5,0.35) {\small lado recto};         \node[color=blue!75!black] at (0.5,-0.25) {\small foco};         \draw[very thick,orange!75!black](-2,-3) -- (2,-3);         \node[color=orange!75!black] at (-1.25,-2.8) {\small directriz};         \draw[very thick,green!75!black](0,0) -- (1.75,1.0625);         \draw[very thick,green!75!black](1.75,1.0625) -- (1.75,-3);         \draw[fill] (0,-2) circle (0.1);         \draw[fill] (0,0) circle (0.1);     \end{tikzpicture}     \end{center}     \caption{Principales Elementos De La Parábola}     \end{figure}     Tomemos la siguiente nomenclatura:     \[V=(h,k)\: V\acute{e}rtice\quad F=Foco\quad p=d(F,V)\rightarrow Distancia\quad Focal\quad R=Longitud\quad Lado\quad Recto\]     \textbf{\underline{Lado Recto}:} Segmento de la parábola que pasa por el foco y es paralelo a la directriz.\\     \textbf{\underline{Foco Parábola Vertical}:} $F=(h,k+p)$\\     \textbf{\underline{Foco Parábola Horizontal}:} $F=(h+p,k)$\\     \textbf{\underline{Directriz Parábola Vertical}:} $y=k-p$\\     \textbf{\underline{Directriz Parábola Horizontal}:} $x=h-p$\\     \textbf{\underline{Propiedad Del Lado Recto}:} $R=4\cdot p$\\     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{La parábola es la única sección cónica que cumple que su excentricidad es 1, $e=1$. Luego \emph{todas las parábolas son semejantes}.}}}     \end{center}     \newpage     \subsection*{Ecuaciones De La Parábola}     Denotemos $V=(x_v,\: y_v)$ el \emph{Vértice de una parábola cualquiera}. \\     \begin{enumerate}     \item \textbf{\underline{Vértice En El Origen Y Eje Vertical}} $\Rightarrow y=a\cdot x^2$     \item \textbf{\underline{Vértice En El Origen Y Eje Horizontal}} $\Rightarrow x=a\cdot y^2$     \item \textbf{\underline{Vértice No En El Origen y Eje Vertical}} $\Rightarrow (y-y_v)=a\cdot (x-x_v)^2$     \item \textbf{\underline{Vértice No En El Origen y Eje Horizontal}} $\Rightarrow (x-x_v)=a\cdot (y-y_v)^2$     \item \textbf{\underline{Forma Explícita y Eje Vertical}} $\Rightarrow y=ax^2+bx+c$     \item \textbf{\underline{Forma Explícita y Eje Horizontal}} $\Rightarrow x=ay^2+by+c$     \item \textbf{\underline{Forma Respecto Distancia Focal (p)}} $\Rightarrow (x-x_v)^2=4p(y-y_v)$     \end{enumerate}     \subsection*{Características De La Parábola}     Consideremos la forma $y=ax^2+bx+c$\\     \textbf{Si} $\mathbf{a>0}\rightarrow$ Parábola hacia \emph{arriba}, el vértice es un \emph{Mínimo}.\\     \textbf{Si} $\mathbf{a<0}\rightarrow$ Parábola hacia \emph{abajo}, el vértice es un \emph{Máximo}.\\     \textbf{Calcular Vértice}: $x_v=\dfrac{-b}{2a}$. Para calcular $y_v$ basta sustituir $x$ por $x_v$ en $y=ax^2+bx+c$ \\     \newpage     \section*{Hipérbola}     \begin{center}     \fbox{\colorbox{gris claro}{\parbox{0.8\linewidth}{Lugar geométrico de los puntos de un plano tales que el valor absoluto de la diferencia a sus distancias a dos puntos fijos, llamados \textbf{focos}, es igual a la distancia entre los \textbf{vértices}, la cual es una constante positiva.}}}     \end{center}          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}[background rectangle/.style={fill=gray!10!white},                                         show background rectangle,                     information text/.style={font=\small,rectangle,rounded corners=3pt,fill=yellow!50!white,inner sep=1ex}]       \tikzset{             small dot/.style={fill=black,circle,scale=0.5},             }         \begin{axis}[             %grid=major,             legend entries={$x^2-y^2=1$, , , , ,$y=x$, $y=-x$},             minor tick num = 3,             scale only axis,             axis x line=middle,             axis y line=center,             domain=-5:5,             y domain = -5:5,             axis on top,xmin=-5,xmax=5,ymin=-5,ymax=5,             legend style={ at={(1.03,1)},             anchor=west,fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny},             title={\centering \underline{\textbf{Hipérbola $x^2-y^2=1$}}},             title style={font=\small, color=black}         ]              \addplot[smooth, color=red] ({cosh(x)}, {sinh(x)});             \addplot[smooth, color=red] ({-cosh(x)}, {sinh(x)});             \addplot[ultra thick, color=blue!80!black, domain=-1:1] {0};              \addplot[smooth,ultra thick, color=blue!60!black, domain=0:1] {1-x};              \addplot[smooth,ultra thick, color=blue!60!black, domain=0:1] ({0},{x});              \addplot[smooth, color=blue!60!black, dashed] {x};              \node[font=\small, color=blue!60!black,rotate=45] at (axis cs:3.5,4.0) {$y=x$};             \addplot[smooth, color=blue!60!black, dashed] {-x};              \node[font=\small, color=blue!60!black,rotate=-45] at (axis cs:-3.5,4.0) {$y=-x$};             \addplot[smooth, color=green!60!black, very thick] ({0.707},{x});             \node[font=\small, color=green!60!black] at (axis cs:1.45,3.6) {$x=\frac{1}{\sqrt{2}}$};             \addplot[smooth, color=green!60!black, very thick] ({-0.707},{x});             \node[font=\small, color=green!60!black] at (axis cs:-1.45,3.6) {$x=\frac{-1}{\sqrt{2}}$};             \node[small dot, color=blue!60!black] at (axis cs:1,0) {};             \node[font=\small, color=blue!60!black] at (axis cs:0.95,0.25) {a};             \node[small dot, color=blue!60!black] at (axis cs:-1,0) {};             \node[font=\small, color=blue!60!black] at (axis cs:-0.8,0.25) {-a};             \node[small dot] at (axis cs:0,0) {};             \node[font=\small] at (axis cs:0.25,0.25) {C};             \node[small dot, color=yellow!60!black] at (axis cs:1.4142,0) {};             \node[font=\small, color=yellow!60!black] at (axis cs:1.65,0.25) {$F_1$};             \node[small dot,color=yellow!60!black] at (axis cs:-1.4142,0) {};             \node[font=\small, color=yellow!60!black] at (axis cs:-1.65,0.25) {$F_2$};               \end{axis}         \draw[xshift=10.25cm,yshift=3cm]         node[right,text width=4cm,information text]         {         \textbf{Semiejes}\\         Es el segmento $[-a,\: a]=[-1,\: 1]$\\         El otro semieje es imaginario\\         \textbf{Vértices}\\         $(\pm a,0)=(\pm 1,0)$\\         \textbf{Focos}\\         $c^2=a^2+b^2\rightarrow c=\sqrt{2}$\\         $F_1(\sqrt{2},0)\quad F_2(-\sqrt{2},0)$\\         \textbf{Excentricidad}\\         $e=\frac{c}{a}\rightarrow e=\sqrt{2}$\\         \textbf{Asíntotas}\\         $y=\pm\frac{b}{a}x\rightarrow y=\pm x$\\         \textbf{Directrices}\\         $x=\pm\frac{a^2}{c}\rightarrow x=\pm\frac{1}{\sqrt{2}}$         };     \end{tikzpicture}     \end{center}     \caption{Hipérbola Canónica $x^2-y^2=1$}     \end{figure}     \newpage     \subsection*{Elementos De La Hipérbola}     Si consideramos una hipérbola centrada en $C=(h,\: k)$, tenemos lo siguiente:\\     \textbf{\underline{Hipérbola Horizontal}} $\Rightarrow \dfrac{(x-h)^2}{a^2}-\dfrac{(y-k)^2}{b^2}=1$\\     \textbf{\underline{Hipérbola Vertical}} $\Rightarrow \dfrac{(y-h)^2}{b^2}-\dfrac{(x-k)^2}{a^2}=1$\\     \begin{enumerate}     \item \textbf{\underline{Semieje Hipérbola Vertical}}: Segmento $[-b,\: b]$, el otro es imaginario.\\     \item \textbf{\underline{Semieje Hipérbola Horizontal}}: Segmento $[-a,\: a]$, el otro es imaginario.\\     \item \textbf{\underline{Vértices Hipérbola Vertical}}: Puntos $V(0,\:\pm b)$\\     \item \textbf{\underline{Vértices Hipérbola Horizontal}}: Puntos $V(\pm a,\: 0)$\\     \item \textbf{\underline{Distancia Focal Hipérbola}}: $c^2=a^2+b^2\rightarrow c=\sqrt{a^2+b^2}$\\     \item \textbf{\underline{Focos Hipérbola Horizontal}}: $F(h\pm c,\: k)$\\     \item \textbf{\underline{Focos Hipérbola Vertical}}: $F(h,\: k\pm c)$\\     \item \textbf{\underline{Excentricidad Hipérbola Horizontal}}: $\epsilon=\frac{c}{a}$\\     \item \textbf{\underline{Excentricidad Hipérbola Vertical}}: $\epsilon=\frac{c}{b}$\\     \item \textbf{\underline{Asíntotas Hipérbola Horizontal}}: $y=k\pm \frac{b}{a}\cdot x$\\     \item \textbf{\underline{Asíntotas Hipérbola Vertical}}: $x=h\pm \frac{a}{b}\cdot x$\\     \item \textbf{\underline{Directrices Hipérbola Horizontal}}: $x=h\pm \frac{a^2}{c}$\\     \item \textbf{\underline{Directrices Hipérbola Vertical}}: $y=k\pm \frac{b^2}{c}$\\     \end{enumerate}     \subsection*{Ecuaciones De La Hipérbola}     Denotemos el centro de una hipérbola por $C=(h,\: k)$. \\     \begin{enumerate}     \item \textbf{\underline{En Cartesianas Y Horizontal}} $\Rightarrow \dfrac{(x-h)^2}{a^2}-\dfrac{(y-k)^2}{b^2}=1$     \item \textbf{\underline{En Cartesianas Y Vertical}} $\Rightarrow \dfrac{(y-h)^2}{b^2}-\dfrac{(x-k)^2}{a^2}=1$     \item \textbf{\underline{Canónica Vertical}} $\Rightarrow \dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}=1$     \item \textbf{\underline{Canónica Horizontal}} $\Rightarrow \dfrac{y^2}{b^2}-\dfrac{x^2}{a^2}=1$     \item \textbf{\underline{Paramétricas}}:     \begin{enumerate}     \item \textbf{\underline{Tipo I}}: $f(t)=(h\pm a\cdot\cosh t,\: k+b\cdot\sinh t)\:\forall\: t\in \mathbb{R}$     \item \textbf{\underline{Tipo II}}: $f(t)=(h+a\cdot\sec t,\: k+b\cdot\tan t)\:\forall\: t$     \end{enumerate}     \item \textbf{\underline{Compleja}}: $\mid z-w_1 \mid - \mid z-w_2 \mid =2\cdot l$     \end{enumerate}          \begin{thebibliography}{5}       \bibitem{Con}\href{http://es.wikipedia.org/wiki/Secci%C3%B3n_c%C3%B3nica}{Wikipedia Cónicas.}       \bibitem{Cir}\href{http://es.wikipedia.org/wiki/Circunferencia}{Wikipedia Circunferencia.}       \bibitem{Eli}\href{http://es.wikipedia.org/wiki/Elipse}{Wikipedia Elipse.}       \bibitem{Par}\href{http://es.wikipedia.org/wiki/Par%C3%A1bola_(matem%C3%A1tica)}{Wikipedia Parábola.}       \bibitem{Hip}\href{http://es.wikipedia.org/wiki/Hip%C3%A9rbola}{Wikipedia Hipérbola.}     \end{thebibliography}          \end{document}      If I compile with Xelatex in texmaker all works good, but if I compile pressing F1 key I obtain an error about `$` message               ! Missing $ inserted.          ! Extra }, or forgotten $.     \maththreesuperior ->{^3}     l.57      I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$`. But perhaps the `}` is legitimate and you forgot something else, as in `\hbox{$x}`. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing `I$}`. Thanks


title: Overprint \hlines

text: How can I set `\hline\endhead` for `longtable`, that this line would overprint on `\hline` , when such present after `\\\` in row, which transmitted on next page? When I just type `\hline\endhead`, I receive two `\hlines` one under other, which not looks good. Thanks. This is code               \documentclass[a4paper,oneside]{book}     \usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true]{hyperref}     \usepackage[paper=a4paper, left=1.5cm, right=1cm, top=1.7cm, bottom=2.5cm]{geometry}     \usepackage{ltablex}     \usepackage{calc}     \usepackage[utf8]{inputenc}     \usepackage{multirow}     \usepackage{listings}     \usepackage{color}     \usepackage{tocloft}     \usepackage{colortbl}     \usepackage{everypage}     \usepackage{mylayout}          \arrayrulewidth=1pt          \begin{document}     \section{Section}     Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text          Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text           Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text          Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text          Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text       Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text      Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text     \vskip10pt          \setlength{\newtblsparewidth}{\linewidth-2\tabcolsep-2\tabcolsep-2\tabcolsep-2\tabcolsep-2\tabcolsep}     \setlength{\newtblstarfactor}{\newtblsparewidth / \real{4}}          \begin{tabularx}{\linewidth}{l|l|l|X|}          \hline\endhead     \noalign{\vskip-\arrayrulewidth}\hline\endfoot          \multicolumn{1}{|m{0.13\newtblsparewidth}}{\multirow{9}{0.13\newtblsparewidth}{\textbf{tt}}} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{eadi=<gale\_smrvue>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{zhim=<zpayw>[,<cckd>][,<ssr>]} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{kcep=<btgzqgb>[,<klmxacfq>]} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{Fit          FvlB          FbmH,hrr          FlvV,cnhg          FaoBH,llu          FjvBV,ijen     } & \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{uvemlwsx=<gmjy>,<lfd>,<wc>,<id>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} & \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{faxjuwoz=osuwwayo|xwgvd|zxnb} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{oarfeqjem=<gakx>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur11>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}           \multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur22>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}          \multicolumn{1}{|l}{} &      \multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur33>} &      \multicolumn{1}{|m{0.15\newtblsparewidth}}{} &      \multicolumn{1}{|m{0.37\newtblsparewidth}|}{     Id sqpvuv\{hdu\}, jvet aoi eadthy xvy skwlefrhyix tcsb ag nlbreq\{ajt, uqsr, mqjwn, vat, mi, ru,\} flx. ayn aemygedw aem qyadippy zm lvmehv(1/72 wcai).           Oayvflulp xitky sanghd fhpq cc vkxrnxzowvt ah a qexom qy limrqp aw 100\% zyen. Tagi leaayban yw ggmaldb xua Ajdma Aubxsag/Rlatnt. Ie rudt uaqs, qx ydicegx aepaqqus nanzz gm slempx, Ahgpxad oablrfarpj hp ax:          V(kt)=V\(lysk\_fed\)\(aqi{}\)72.0/(qggx\_mwvpl)          Twb dbtsla{hmys\_fjqyu} wacaxmlnt sl fpgv ac wddqaw ‘Pprdbpwhznf/Patj Dirwuaf/Rpmqvcwqcz’ ngdadcsu (gukd bj Aqhdaap auw PDF-XCjazmw Vqhymy).     } \\ \hline          \end{tabularx}          \end{document}      Here pdf of this example http://web-engineering.com.ua/Main2.pdf


title: Draw a box around a title on the title page

text: As part of a title page, I'd like to make a simple box around my Title. Nothing fancy, just a black lined box around it. But I don't want the box to be as narrow as usual but to have some space around it (up and below my title, as well as left and right). I googled this problem but sadly didn't find a similar problem - I don't care about the box, it is in no way fancy, I just want some space around my text, before the box is printed. The first thing I tried to do is a 1x1 tabular like this:               \begin{tabular}{|c|}     \hline     \textbf{\huge{The Problem}}\\     \hline     \end{tabular}      Now the lines are very close to the text, so I added new lines before and after the title               \begin{tabular}{|c|}     \hline     \\     \textbf{\huge{The Problem}}\\     \\     \hline     \end{tabular}      This does the trick vertically BUT it's not the same amount of space (below more than above) - so I've got my first problem here. Then, I also want to have some space on the left and right. I tried to do this with \quad , but the right one is ignored if i don't write \quad{} and a space after it. But then, I've got more space on the right then I do have on the left. So here's my problem: I've got the following and it looks pretty much like what I would like to have, but the spaces left/right and above/below are not equal.               \begin{tabular}{|c|}     \hline     \\     \textbf{\huge{ \quad{}The Problem\quad{} }}\\     \\     \hline     \end{tabular}      Can anyone help me to draw a box around my title? As requested, here's a complete minimal document:               \documentclass[UKenglish,12pt,twoside]{scrartcl}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}      \usepackage{amssymb,amsmath,amsfonts}      \usepackage{amsthm}     \usepackage{dsfont}      \usepackage{url}      \usepackage[a4paper,left=20mm,right=20mm,top=25mm,bottom=25mm,marginparwidth=3cm]{geometry}      \usepackage{color}      \usepackage{graphicx}     \usepackage{csquotes}      \usepackage{verbatim}      \usepackage{hyperref}      \usepackage{cleveref}          \begin{document}          % Front page          \thispagestyle{empty}     % a picture is inserted on the top left     %\includegraphics[width=7cm]{img/eth_logo.png}          \begin{center}          \vspace{20mm}          \LARGE{Here's some text}          \vspace{20mm}          \begin{tabular}{|c|}     \hline     \\     \textbf{\huge{ \quad{}The Problem\quad{} }}\\     \\     \hline     \end{tabular}               \vspace{20mm}          \LARGE{Manuel}\\     \medskip     \Large{Number}          \vfill          \LARGE{Some more text}          \vspace{20mm}          \LARGE{Zurich}\\     \LARGE{\today}\\          \end{center}          \end{document}


title: biblatex-ieee and supra note

text: I know this is sort of short notice (I'd posted a similar cry for help at LaTeX Community), but I have a thesis due Monday and the one thing standing between me and being ready (layout-wise) is this: I'm using `biblatex` with a slightly tweaked `biblatex-ieee` style (maybe not ideal but my thesis director had very specific directions and that was the closest) which I call with:               \usepackage[bibstyle=ieee,citestyle=authoryear,backref=false,hyperref=false]{biblatex}      But the problem is I need to replace already referenced items with "supra note". For example, if Belloni is referred to in footnote (`\footfullcite`) 17 as: > `17.` R. Belloni, « The tragedy of Darfur and the limits of the > ‘responsibility to protect’ », Ethnopolitics, vol. 5, no 4, nov. 2006, pp. > 327–346. I would like future references to the same author and article to look like (say in footnote 24, where I specify a page of the article): > `24.` R. Belloni, supra note 17, p. 336. Any idea? Thanks a lot in advance! PS: It actually seems like the "citestyle" can be removed or modified without any change. I guess that is itself isn't normal...


title: harvard-thesis template and error using bm package

text: I have a following problem. I use harvard-thesis package to write my thesis and I have a problem, when I want to use a package bm. Here is a minimal example. Using this code:               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass{harvard-thesis}          \usepackage{amssymb, amsthm}     \usepackage{graphicx,xspace}     \usepackage{bm}     \usepackage{epsfig}     \usepackage{enumitem}     \usepackage{xcolor}     \usepackage{gensymb}     \usepackage{todonotes}     \newcommand{\todoMaciej}[1]{\todo[color=red!40]{\textsc{Maciej} says: #1}}     \newcommand{\todoPiotr}[1]{\todo[color=blue!40]{\textsc{Piotr} says: #1}}               \usepackage{tikz}     \usetikzlibrary{decorations,calc,through}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.pathreplacing}                    \usepackage{hyperref}               \begin{document}          $\bm{\alpha}$          \end{document}      I obtain a following error:               ./thesis.tex:113 Undefined control sequence.     \Call@AtVeryEndDocument ...cumentHook \@undefined                                                       \global \let \Call@AtVeryE...     l.113 $\bm{\alpha}                       $     ?      This error occurs with both LaTeX and XeLaTeX. I use as an editor TeXShop. Template I use can be found here.


title: Remove chapter number from theorem number

text: Currently the document I'm facing has a few chapters which contain subchapters. Those sub/chapters are numbered as usual like 1.1, 1.2, 3.7, .... One specific type of those subchapters shall not follow the default numbering but have its own numbers over the whole document. So in chapter 1 the passage of e.g. a theorem shall have number 1 (nothing else). In chapter 3 it is continued and has the number 2. My current approach is using               \newcounter{mycounter}     \newtheorem{specialthm}{specialthm}[mycounter]      In general it works but if it comes to using it like               \begin{specialthm}Some very interesting text     ....      I get numberings like 0.1 and later on 0.2 - thus I'm more interested in the subsection number for this kind of `specialthm`. so i think my question boils down to: how can i remove the main (chapter) figure - in this case the zero - from `mycounter`?


title: Is it possible to remove length, counter, dim, etc that have been declared?

text: Let's see the following screenshot taken from an answer of Efficient ways to anonymize a document and the given comment. ![enter image description here](http://i.stack.imgur.com/UiACN.png) Is it possible to remove length, counter, dim, etc, that have been declared in a macro, before leaving the macro?


title: overpic absolute positioning for local figure only

text: I am trying to use `overpic` with absolute positioning for a single figure only. The `\usepackage[abs]{overpic}` sets absolute positioning for all figures. Is there a way to define it for the local `overpic` environment only? Or is there a way to load both absolute and relative versions of `overpic` and calling them differently?


title: Envlab and datatool: Error: missing number

text: Running the following through LaTeX gives me a "Missing number" error:               \documentclass[12pt]{letter}     \usepackage[c5envelope,noprintreturnaddress,capaddress]{envlab}     \usepackage[latin1]{inputenc}     \usepackage{datatool}     \makelabels     \begin{document}     \startlabels     \DTLloaddb{recipients}{recipients.csv}     \DTLforeach*{recipients}{\firstname=Vorname,%      \surname=Nachname,%      \address1=Adresszeile1,%      \address2=Adresszeile2,%      \city=Ort,%      \postcode=PLZ}{%     \mlabel{Dummy}{%      \firstname \surname\\      \address1\\      \address2\\      \city \postcode}}     \end{document}      This is my recipients.csv file:               Vorname,Nachname,Adresszeile1,Adresszeile2,PLZ,Ort     Wolfang,Ingeborg,Im Wiengert,Baumgartnerstrasse 11,8800,Biel      Do yo see what I'm doing wrong?


title: Too long vertical lines in table

text: Ok, I've looked at this code too long and need some fresh eyes and ideas. **Question:** Why do I get too long vertical lines on my LaTeX table? Please note that I've not experiencing any problems with the above code on online compilers such as http://docs.latexlab.org/docs I'm using the texi2pdf in order to compile my document on Mac OSX Snow Leopard. _Code:_               \begin{table}[h]         \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}          \hline             ContainsPrize & \multicolumn{3}{|c|}{A} & \multicolumn{3}{|c|}{B} & \multicolumn{3}{|c|}{C} \\ \hline             MyChoice      & A   & B & C & A & B   & C & A & B & C   \\ \hline             openA         & 0   & 0 & 0 & 0 & 0.5 & 1 & 0 & 1 & 0.5 \\             openB         & 0.5 & 0 & 1 & 0 & 0   & 0 & 1 & 0 & 0.5 \\             openC         & 0.5 & 1 & 0 & 1 & 0.5 & 0 & 0 & 0 & 0   \\         \hline         \end{tabular}         \caption{A nice caption text here...}      \end{table}      **Which generates:** ![table with oversized lines](http://i.stack.imgur.com/9assL.png) Any ideas? Buggy compiler? Alternatives?


title: Image centered on full slide with background color in beamer

text: Specifying both a background color and a background image for beamer slides is a bit tricky when notes are shown. I tried three approaches but none works perfectly (the idea is to avoid white borders above and below a full-screen image). The first solution was inspired by this answer :               \PassOptionsToPackage{demo}{graphicx}     \documentclass{beamer}          \begin{document}          {     \setbeamercolor{background canvas}{bg=red}     \setbeamertemplate{background canvas}{       \parbox[c][\paperheight][c]{\paperwidth}{         \centering\includegraphics[width=\paperwidth]{name}       }     }     \begin{frame}[plain]     \end{frame}     }          \end{document}      But setting the background color has no effect. I also tried to include the graphics inside the frame but the image is not centered anymore :               \PassOptionsToPackage{demo}{graphicx}     \documentclass{beamer}          \begin{document}          {     \setbeamercolor{background canvas}{bg=red}     \begin{frame}[plain]     \parbox[c][\paperheight][c]{\paperwidth}{       \centering\includegraphics[width=\paperwidth]{name}     }     \end{frame}     }          \end{document}      My last test is based on this answer :               \PassOptionsToPackage{demo}{graphicx}     \documentclass{beamer}          \usepackage{tikz}     \usepackage{pgfpages}          \setbeameroption{show notes on second screen=right}\nofiles          \begin{document}          \begin{frame}[plain]     \end{frame}          {     \setbeamercolor{background canvas}{bg=red}     \begin{frame}[plain]     \begin{tikzpicture}[remember picture,overlay]     \node[at=(current page.center)] {       \includegraphics[width=\paperwidth]{name}     };     \end{tikzpicture}     \note{Note}     \end{frame}     }          \end{document}      But the image is not positioned correctly when notes are shown (even with the nofiles trick). Each solution has a distinct problem. Any idea on one possible fix?


title: How can I make my dash work with microtype?

text: Consider the following definition:               \documentclass[a6paper]{article}     \usepackage[showframe]{geometry}     \usepackage{microtype}          \def\Dash{\unskip\thinspace\textemdash\thinspace\ignorespaces\allowbreak}          \begin{document}     Lorem ipsum doler sit amet. Here is some text that I don't know what     I'm typing but it's okay \Dash all I need is enough text for the line     break and then I can put in my custom dash at it \Dash because     \emph{I'm so clever}.  (This worked out surprisingly well.)     \end{document}      How can I define `\Dash` to properly protrude into the margin, as the hyphen character does? ![output](http://i.stack.imgur.com/YcYAk.png)


title: "supertabular" affects text that comes after the table finishes

text: After having searched on the internet for a few hours, I could finally make a longtable that spans over many, many pages. Besides, I was able to split this table into two columns (in order for my work to fill less pages). I was able to do this by using the `supertabular` package.   1. The problem is that the text in the next section, which comes after the table finishes, appears in one column instead of being displayed as usual.   2. Besides, there is too much space left before the table begins, and I want to get rid of that space. I tried the `needspace` package but it doesn't work. CODE:               \documentclass{amsart}          \usepackage{supertabular}          \begin{document}          \centering{     \twocolumn     \tablehead{{$A$} & $B$ &          $C$ \\}     \begin{supertabular}{|c|c|c|}     \hline        {\bf a} &          b &  {\bf c} \\     \hline        {\bf a} &          b & {\bf c} \\     \end{supertabular}     }          \end{document}


title: How to increase row height while using booktabs?

text: I'm making a table using booktabs. One of the columns contains a series of fractions.               \documentclass[12pt, letterpaper]{article}         \usepackage{nag}         \usepackage[margin=1.0in]{geometry}              \usepackage{amsmath}              \usepackage{booktabs}         \usepackage[tableposition=top]{caption}          \begin{document}          \begin{table}[htbp]     \centering     \caption{Test}     \begin{tabular}{llll}         \toprule         A & B & C & D \\         \midrule         A: $\frac{6}{16}$ B: $\frac{5}{16}$ C: $\frac{3}{16}$ D: $\frac{2}{16}$ & 1.9375919592 & 1.88285606369 & 0.0547358955059 \\         A: $\frac{6}{16}$ B: $\frac{5}{16}$ C: $\frac{4}{16}$ D: $\frac{1}{16}$ & 1.94014431443 & 1.80503653258 & 0.135107781856 \\         A: $\frac{6}{16}$ B: $\frac{6}{16}$ C: $\frac{2}{16}$ D: $\frac{2}{16}$ & 1.87649654966 & 1.81127812446 & 0.0652184251977 \\         A: $\frac{6}{16}$ B: $\frac{6}{16}$ C: $\frac{3}{16}$ D: $\frac{1}{16}$ & 1.87992559246 & 1.76409765557 & 0.115827936888 \\         A: $\frac{7}{16}$ B: $\frac{3}{16}$ C: $\frac{3}{16}$ D: $\frac{3}{16}$ & 1.93245604561 & 1.88024081494 & 0.0522152306624 \\         A: $\frac{7}{16}$ B: $\frac{4}{16}$ C: $\frac{3}{16}$ D: $\frac{2}{16}$ & 1.86806360636 & 1.84960175271 & 0.0184618536479 \\         A: $\frac{7}{16}$ B: $\frac{4}{16}$ C: $\frac{4}{16}$ D: $\frac{1}{16}$ & 1.87194209421 & 1.7717822216 & 0.100159872612 \\         A: $\frac{7}{16}$ B: $\frac{5}{16}$ C: $\frac{2}{16}$ D: $\frac{2}{16}$ & 1.81500630063 & 1.79617969195 & 0.0188266086843 \\         A: $\frac{7}{16}$ B: $\frac{5}{16}$ C: $\frac{3}{16}$ D: $\frac{1}{16}$ & 1.81178637864 & 1.74899922306 & 0.0627871555774 \\         \bottomrule     \end{tabular}     \end{table}          \end{document}      This is what is looks like: ![table](http://i.stack.imgur.com/YOrT7.png) The height of each row is just a tad too small -- the fractions are uncomfortably squished. Is there any way I can increase the row height so the fractions fit more comfortably? If possible, I'd also like to avoid making any changes to other tables that I might add to my document.


title: Nodes for arcs, which angles are calculated simultaneously

text: TikZ finally enables nodes for arcs since version 3.0.0. However, there is one problem I came across to. Sometimes angles of the arc are calculated simultaneously, as in `\draw (60:1) arc (30+30:0:1);` This works fine by itself, but when combined with node command, one gets error               ! Illegal unit of measure (pt inserted).     <to be read again>                          +      Is there any way round this problem? MWE:               \documentclass[12pt]{scrartcl}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[>=stealth,auto]     \draw (60:3) -- (0,0) -- (0:3);     \draw (60:1) arc (30+30:0:1);     \draw (60:1) arc (30+30:0:1) node[midway] {$\beta$};     \end{tikzpicture}     \end{document}


title: Making a shorter minus

text: I am doing some display typography with an equation in it using the `mathpazo` package. At one point I have this fraction:               $\sqrt{-\frac{1}{9}}$      To me, the minus looks too long. I would like to make it shorter, but use of `\textrm{-}` gives me something that is too thick. Is there a way to get something with the thickness of the minus above, but of a similar length to a hyphen? Edited to add: this is really for a special case of enormous type on a T-shirt design, and the standard minus sign looks strange. I would not do this for standard use of math in an article.


title: "Listing #" below listings without a caption

text: When not specifying a caption for a lstlisting nothing is shown below the listing while "Listing #: mycaption" is displayed as soon as I specify a caption. However, I'd like "Listing #" to be displayed for all listings; even those without a caption (those with a caption should keep their "Listing #: mycaption" of course). Is this possible? If yes, how?


title: Employing options of the figure or table environment via \newcommand

text: I am writing a large document in which I would like to employ the options of figure environments via               \newcommand{\figposa}{H}     \newcommand{\figposb}{T}     \newcommand{\figposc}{B}     \newcommand{\figposd}{P}      or some similar strategy. A minimal working example looks like this:               \documentclass{article}     \usepackage{graphicx}     \usepackage{float}     \newcommand{\figposa}{H}     \newcommand{\figposb}{T}     \newcommand{\figposc}{B}     \newcommand{\figposd}{P}     \begin{document}     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test    test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     \begin{figure}[\figposa]     \centering              figure figure figure figure figure     \end{figure}     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     \begin{figure}[\figposb]     \centering              figure figure figure figure figure     \end{figure}     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     \begin{figure}[\figposc]     \centering              figure figure figure figure figure     \end{figure}     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     test test test test test test test test test test test test test test test test test test     \begin{figure}[\figposd]     \centering              figure figure figure figure figure     \end{figure}     test test test test test test test test test test test test test test test test test test          \end{document}      It does not work because the commands `\figposa`, `\figposb`, `\figposc`, and `\figposd` are not interpreted as I would want them to be. The use of the command `\expandafter` does not seem to solve my problem, or perhaps I am using it in a wrong way.


title: Auto-populate the frame titles from subsection titles

text: Is there a way to make `\frametitle` automatically take the `\subsection` heading? Or maybe equivalently, is there a way to make the section\subsection titles in the header larger? I am afraid the audience may not follow the section\subsection title. Thanks! (FWIW, so far I've been using the Warsaw theme)


title: biblatex-chicago etoolbox error: Invalid boolean Expression

text: I am using bibtex as the backend for my biblatex bibliography but there seems to be some clash between it and the `etoolbox` package that I don't understand. This is on a fresh install of TeXlive 2014. The error only appears if the following conditions are met: 1: BibTeX is the backend   2: I am using biblatex-chicago (there's no tag for that - sorry!)   3: A bib entry is cited twice in the same paragraph A minimal example follows (in which I have embedded the bibliography in the file for the sake of keeping it simple - doing it this way didn't change the error).               \documentclass{article}          \usepackage{filecontents}       \begin{filecontents}{biblio.bib}       @book{smith_john_1970,           address = {City},           edition = {1st},           title = {Help},           publisher = {A. N. Other},           author = {Smith, John},           year = {1970},       }       \end{filecontents}            \usepackage[backend=bibtex]{biblatex-chicago}       \addbibresource{biblio.bib}          \begin{document}          \cite[732]{smith_john_1970} and \cite[732]{smith_john_1970}          \end{document}


title: Environments with thmtools => too much space if using itemize at the end (also problem with q.e.d. symbol)

text: I want to use the `thmtools` package, because it provides some awesome features for declaring environments (proofs, theorems, examples etc.) And I especially like the "qed" feature which places some nice symbols like the q.e.d. square at the end of the environments. For example, I am using different symbols for different environments. However, there are some issues, if I use special blocks (itemize, align) at the end of such an environment. The "qed" symbol is too low and much space is wasted. Test the following example:               \documentclass{book}          \usepackage{amsthm}     \usepackage{thmtools}          \declaretheoremstyle[headpunct=\\*,qed=\ensuremath{\triangle}]{myexstyle}      \declaretheorem[style=myexstyle]{myexample}           \begin{document}           \begin{myexample}[This is an example 1]     This is an example...          And the symbol is on the correct line!     \end{myexample}           \begin{myexample}[This is an example 2]     This is an another example...     \begin{itemize}       \item And the symbol is \emph{not} on the correct line!     \end{itemize}     \end{myexample}           \end{document}      I want that the `\triangle` is shown on the same line as the last `\item`. I already fixed that problem for `align` environments (I am using package `adjustbox` und `aligned` now), but I cannot solve the problem, if I want to use `itemize` the way shown. I think that I also know the reason for the problem. `\end{itemize}` ends the paragraph and a new paragraph must be started in order to place the "qed" symbol. Is there an option? A Workaround? Preferably without `\qedhere` or manual adjustments for each environment! I was also wondering if package `enumitem` (or another one) could be helpful with any kind of option?