title: Titlepage with thanks to following page

text: ## Titlepage I wrote a titlepage like usual but I have supervisors from different universities. In order to provide the reader this information, I thought of writing the following possibilities:   1. Using standard footnotes              Prof. A\footnote{University A}, Prof. B\footnote{University B}      This worked perfectly, except for the fact that the footnote was on the titlepage. This looked strange to have a footnote on the titlepage.   1. After that thought of using `\thanks{University xy}` but with this no footnotes appear at all.   2. In the end, I found a similar question on stackexchange. It makes use of the commands `\textsuperscript{1}` and `\footnotetext[1]{University xy}`. This worked best as I can write the footnote text on the following page. The third version as a MWE:               \documentclass[10pt,a4paper,twoside,openright,final,onecolumn,titlepage]{book}     \usepackage{hyperref}     \newcommand{\mytitlepage}{%       \begin{titlepage}         {\large under the supervision of}\vskip 1mm%         {\large Dr. A\textsuperscript{1}}\vskip 1mm%         {\large Prof. B\textsuperscript{1}}\vskip 1mm%         {\large Prof. C\textsuperscript{2}}       \end{titlepage}     }          \begin{document}     \mytitlepage     \footnotetext[1]{University A}     \footnotetext[2]{University B}     \end{document}      ## Question How can I still provide hyperlinks to the footnotes? Or maybe more general what is the LaTeX-way to do it?


title: Using cleveref for named referencing

text: This is what I have so far               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{tikz}     \usepackage{tikz-cd}     \usetikzlibrary{matrix,arrows,decorations.pathmorphing,quotes,calc}     \usepackage{enumerate}          \theoremstyle{plain}     \newtheorem{theorem}{Theorem}[subsection]     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{algorithm}[theorem]{Algorithm}          \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{fact}[theorem]{Fact}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{example}[theorem]{Example}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}          \begin{document}          \begin{conjecture}     \emph{(Birch and Swinnerton-Dyer Conjecture)}     blah     \end{conjecture}          \begin{proposition}     \label{proptate}     \emph{(Tate)}     blah     \end{proposition}     \end{document}      How may I make changes so that I can do referencing that is similar to what it shown here: Cleveref and named theorems Solution by Andrew Swann Each time I make a minute change, it seems like I run into all sorts of errors, for instance problems with \emph within a conjecture or \label. What am I doing wrong?


title: tex4ht: how to make only non-inline math bigger?

text: I'm converting a document to html (or possibly xhtml) using htlatex. I find that the output is ok, but the equations are too small. I have tried making them bigger by adding the following to my configuration file:               \DeclareMathSizes{10}{24.88}{20.74}{17.28}      This successfully makes math bigger, but for both equaton environments and inline math expressions, which therefore no longer look good with the text. How can I make only non-inline math bigger in the output from htlatex? I also prefer this to be done using a method easily portable and not requiring local configuration changes to my tex installation, as I move from computer to computer and also expect multiple people to work on the document.


title: Fit frame to (flushright) text

text: I would like the frame to fit the text inside?               \documentclass[a4paper]{memoir}     \usepackage{mdframed}     \begin{document}     \begin{flushright}     \begin{framed}     $\textsc{casregner}$     $(f(x)=g(x),x)|x>0$     $x=32.5552$     \end{framed}     \end{flushright}     \end{document}


title: Can I make all section headings bigger?

text: I want to make all section headings in LaTeX document bigger by a given scale. For example, I want all of them have 150% of size that they have now. Can I do that somehow? (Ideally using `sectsty`)


title: Pgfplot won't compile more than 6 curves on the same plot

text: I want to plot with pgfplots 12 curves on the same plot. The curves are given by 12 csv tables named "curve_01","curve_02" etc., about 3000 points each. To reduce computational time I reduce the number of points giving the "each nth point" option. I used also externalization with shell escape command. Here my code:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}               \usepgfplotslibrary{external}     \tikzexternalize           \begin{document}          \begin{tikzpicture}     \begin{axis}[each nth point=1000, filter discard warning=false, unbounded coords=discard ,cycle list name=color list]     \foreach \x in {01,02,03,04,05,06,07,08,09,10,11,12}      \addplot table[col sep=comma, x index=2,y index=0] {../../Test_DCBII/curve_\x.txt};     \end{axis}                      \end{tikzpicture}                 \end{document}      The problem is that this code plots only 6 out of 12 curves needed, no matter if I reduce the points to calculate. How can I fix this?? The files can be found here (i uploaded just 9 files)


title: Why landscape move double-sided page number up in LaTeX?

text: I need a longtable in my appendix so I used the package `lscape` or `pdflscape`, but `landscape` environment seems to move up the page number of the page just before it. See code below.               \documentclass[twoside, openright]{report}     \usepackage{lscape}          \begin{document}          \chapter{ch1}         this is ch1          \begin{landscape}     \chapter{ch2 is a long table}         there is a long table     \end{landscape}          \end{document}


title: Pgfplot figure off-center

text: I create a tikzpicture in standalone mode (see code below). Then import the resultant .pdf file into my document via `\includegraphics` (see pic). However the axis labels are cut off and part of the ytick when using `[trim axis left, trim axis right]`. If I don't use that command it looks fine but is not centered any more. Any thoughts? PS this is a duplicate but perhaps more concise of this Pgfplot figure off- center because of axis label ![enter image description here](http://i.stack.imgur.com/MgiXe.png)               \documentclass[tikz,border=12pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{plotmarks}     \begin{document}     \definecolor{mycolor1}{rgb}{0.0416666666666667,0,0}          \begin{tikzpicture}[trim axis left, trim axis right]               \begin{axis}[%     width=6.17578125in,     height=2.23276041666667in,     area legend,     scale only axis,     xmin=0.5,     xmax=5.5,     xtick={1,2,3,4,5},     xticklabels={Equipment,Patient,{Hygiene products},Near-bed,Far-bed},     ymin=0,     ymax=0.35,     ytick={  0, 0.1, 0.2, 0.3, 0.4},     ylabel={Probability density},yticklabel style={/pgf/number format/fixed},     legend style={at={(0.143572984749455,0.733206590621038)},anchor=south west,draw=black,fill=white,legend cell align=left}     ]     \addplot[ybar,bar width=0.282321428571429in,bar shift=-0.176450892857143in,fill=mycolor1,draw=black] plot coordinates{(1,0.163793103)     (2,0.164367816)     (3,0.141954023)     (4,0.279310345)     (5,0.250574713)};          \addlegendentry{Smith et al.};          \addplot [     color=black,     solid,     forget plot     ]     table[row sep=crcr]{     0.5 0\\     5.5 0\\     };     \addplot[ybar,bar width=0.282321428571429in,bar shift=0.176450892857143in,fill=white,draw=black] plot coordinates{(1,0.165289256)     (2,0.185950413)     (3,0.157024793)     (4,0.285123967)     (5,0.20661157)};          \addlegendentry{Adjusted YAB};          \end{axis}     \end{tikzpicture}%     \end{document}


title: LaTeX 'Missing $' Cannot find the reason

text: So i am writing up some maths definitions for my exams and for some reason Texworks says that I have a 'missing $' in my line of work, however I cannot see anything wrong with it.               \subsection{Directional Derivative}     Let $\Omega \subset \mathbb{R}^n$ be open and let $f:\Omega \to \mathbb{R}$ be a continuosly differentiable scalar field on $\Omega$. Let $\vec{\hat{a}}$ be a unit vector in $\mathbb{R}^n$ Then:     $$D\hat{a}f(\vec{x_0})=\lim_{h \to 0}\frac{(f(\vec{x_0}+h\vec{\hat{a}}-f(\vec{x_0})}{h}$$     is the \bi{directional derivative} of fin the direction $\vec{\hat{a}}$          \subsection{ $\nabla$ Operator}     The \textit{\textbf{ $\nabla$ or del operator}} is written formally as     $$ \nabla = \frac{\partial}{\partial x_1}\vect{e_1} + \frac{\partial}{\partial x_2}\vect{e_2}+ \dots \frac{\partial}{\partial x_n}\vect{e_n}$$          \subsection{Gradient}     Let $f:\Omega \to \mathbb{R}$ be a continuously differentiable scalar field on an open set $\Omega \subset \mathbb{R}^n$ Then:     $$grad \, f\equiv \nabla f:=\frac{\partial f}{\partial x_1}\vect{e}_1+\dots+\frac{\partial f}{\partial x_n}\vec{e}_n$$ is the \bi{gradient} on $\Omega$ which is itself a vector field. And is obatained by applying the $\nabla$ Operator to the function.          \subsection{Divergence of F}      If I ignore the error and force it to finish I get a weird repitition of e_1 getting smaller and smaller and then one partial derivative at the end. When in fact it should be a sum of partial derivatives. Does anybody know what I am doing wrong?


title: Sporadic node overlapping in a Forest

text: There is a node whose children overlap with the neighbor node's children's edges in the MWE below (the children of nodes 10070070 and 10071027 with ZZZZ and YYYY for text). The node Y seems to be pushed slightly left towards the node Z. The node Z seems to be pushed slightly lower than it should be. ![enter image description here](http://i.stack.imgur.com/2zhFo.png) **The only difference between node Z and the rest seems to be that its 2nd line of text has a new line in the middle** , thus it has 4 lines whereas the rest have 3. The new line is unavoidable, as the whole Forest is machine- generated out of a hierarchical database and it is a business rule that certain strings have to have line breaks. I thought that `minimum height=10ex` should have taken care of that. Is there any method to ensure that regardless of how many lines of text is inside a Forest node, as long as text is not making a node to expand vertically, it will be rendered uniform with the rest?               \documentclass[border=10pt]{standalone}     \usepackage{forest}          \begin{document}          \begin{forest}      for tree={         draw=black, align=center, l sep=4ex, parent anchor=south, child anchor=north,         node options={font=\scriptsize, minimum width=14em, minimum height=10ex, rounded corners=1ex},         edge path={             \noexpand\path[\forestoption{edge}]             (!u.parent anchor) -- +(0,-2ex) -| (.child anchor)\forestoption{edge label};         },         where n children=0{             child anchor=west,             edge path={                 \noexpand\path[\forestoption{edge}]                 ([xshift=-6em]!u.parent anchor) |- (.child anchor)\forestoption{edge label};             },             draw=red,for parent={                 parent anchor=south, l sep=-12em, grow'=east, calign=child edge, draw=blue                       }         }{}     }     [\textbf{AAAAAAAA AAAAAAAAAAA}\\AAAAAAAAA AAAA AAAAAAAAA\\AAAAAAAAAAA ,name=10005246         [\textbf{AAAAA AAAAAAA}\\AAAAA AAAAAAA\\AAAAAAA ,name=10070085             [\textbf{AAAAAAAA AAAAAAAA}\\AAAAAAAAA AAAAAAA\\AAAAAAA ,name=10070058                 [,phantom, minimum height=0ex]                 [\textbf{AAAAA AAAAAAAAA}\\AAAAAAAAA AAAAAAAAAAA\\AAAAAAA ,name=10071084]             ]             [\textbf{AAA AAAAAAA}\\AAAAAAAAAAAAA AAAA AAAAAAA\\AAAAAAA ,name=10070066                 [,phantom, minimum height=0ex]                 [\textbf{AAAA AAAAA}\\AAAAAAA AAAAAAAA\\AAAAAAA ,name=10070063]                 [\textbf{AAAA AAAAAA}\\AAAAA AAAAAAAA\\AAAAAAA ,name=10070107]                 [\textbf{AAAAAAA AAA}\\AAAAA AAAAAAAA\\AAAAAAA ,name=10070109]                 [\textbf{AAAA AAAAAAAA}\\AAAAAAA AAAAAAAA\\AAAAAAA ,name=10070119]                 [\textbf{AAAA AAAAA}\\AAAAA AAAAAAAA\\AAAAAAA ,name=10070122]             ]             [\textbf{AAAAAA AAAAAAA}\\AA AAAAAAA AAAAAAA\\AAAAAAA ,name=10070076                 [,phantom, minimum height=0ex]                 [\textbf{AAAAAAA AAAAAA}\\AAAAAAA AAAAAAAAAA\\AAAAAAA ,name=10070116]                 [\textbf{AAAAA AAAAAA}\\AAAAAAA AAAAAAAAAA\\AAAAAAA ,name=10070118]             ]             [\textbf{AAAAAA AAAAAAA}\\AAAAAAAAAA AAAAAAA\\AAAAAAA ,name=10070081                 [\textbf{ZZZZZ ZZZZZZ}\\ZZZZZZZ\\ZZZZZZZ ZZZZZZZ\\ZZZZZZZ ,name=10070070                     [,phantom, minimum height=0ex]                     [\textbf{ZZZZZZZ ZZZZZ}\\ZZZZ ZZZZZZZZ\\ZZZZZZZ ,name=10070117]                     [\textbf{ZZZZZZZ ZZZZZ}\\ZZZZ ZZZZZZZZ\\ZZZZZZZ ,name=10070121]                     [\textbf{AAAAA AAAAAA}\\AAAA AAAAAAAA\\AAAAAAA ,name=10071097]                 ]                 % The children of the node below overlaps the children of the node above                 [\textbf{YYYYYY YYYYYYYY}\\YYYYYYYYYY YYYYYYY\\YYYYYYY ,name=10071027                     [,phantom, minimum height=0ex]                     [\textbf{YYYYY YYYYYYYY}\\YYYYYYYYYY YYYYYYYYYY\\YYYYYYY ,name=10070089]                     [\textbf{YYYYYYY Y YYYYYY}\\YYYYYYYYYY YYYYYYYYYY\\YYYYYYY ,name=10071317]                 ]                 [\textbf{AAAAAA AAAAAAAAAAAAAA}\\AAAAAAAAAA AAAAAAAAAA\\AAAAAAA ,name=10070059                     [,phantom]                 ]                 [\textbf{AAAA AAAAA}\\AAAA AAAAAAAA\\AAAAAAA ,name=10070061                     [,phantom]                 ]                 [\textbf{AAAAAAA AAAAAAAA}\\AAAA AAAAAAAA\\AAAAAAA ,name=10070078                     [,phantom]                 ]                 [\textbf{AAAAAAA AAAAAAAAA}\\AAAA AAAAAAAA\\AAAAAAA ,name=10070091                     [,phantom]                 ]                 [\textbf{AAAAAAA AAAAAA }\\AAAAAAAAAA AAAAAAAAAA\\AAAAAAA ,name=10070120                     [,phantom]                 ]             ]             [\textbf{AAAAAAA AAAAAAAAA}\\AA AAAAAAA\\AAAAAAA ,name=10070098                 [,phantom, minimum height=0ex]                 [\textbf{AAAA AAAA}\\AAAAAAA\\AAAA AAAAAAAAAA\\AAAAAAA ,name=10070105]                 [\textbf{AAAAA AAAAAAAA}\\AA AAAAA\\AAAAAAA ,name=10070111]                 [\textbf{AAAAAAA AAAAAAAA}\\AA AAAAAAAAAA\\AAAAAAA ,name=10070115]             ]             [\textbf{AAAA AAAAAAAAA}\\AAAAAAAA AAAA AAAAAAAAAA\\AAAAAAA ,name=10011825                 [,phantom]             ]             [\textbf{AAAAAAAA AAAAA}\\AAAAAAAAAA{,} AAA\\AAAAAAA,name=10070079                 [,phantom]             ]         ]     ]     \end{forest}     \end{document}


title: Finding a way to get mathscr and unicode without using xelatex, which is stymied

text: This really should be a comment to \mathscr (LaTeX or XeLaTeX) Which is about running XeLatex to get \mathscr fonts. The sample program provided in that post is               \documentclass[a4paper]{report}     \usepackage{unicode-math}     \setmathfont{XITS Math}     \setmathfont[version=setB,StylisticSet=1]{XITS Math}     \begin{document}     $\mathscr{abcdefghijklmnopqrstuvwxyz}$     $\mathscr{ABCDEFGHIJKLMNOPQRST}$     \mathversion{setB}%     $\mathscr{abcdefghijklmnopqrstuvwxyz}$     $\mathscr{ABCDEFGHIJKLMNOPQRST}$     \end{document}      To run this, it appears you have to use XeLatex, but when I do that I get the dreaded and unhelpful "Fatal format error I'm stymied." response. The program won't compile with lualatex, which directs me back to XeLatex. To get around the error I tried updating my latex package, by installing l3packages, l3kernel and xpatch, but this makes no difference, still the same error. (I'm running linux ubuntu 12.04) Is there any way to get mathscr, in particular the unicode-math package, without running XeLatex. Or alternatively, is there's something one can do to make XeLatex behave better. (it gives the same error on essentially an empty file). Thanks very much for any advise!


title: tcolorbox and figure: error when using a figure in a tcolorbox

text: I have figure in a `tcolorbox` but I keep getting the following error:               ./helix.tex:33: Missing \endcsname inserted.     <to be read again>                        \T1\i     l.33   \end{axis}      * * * Thanks to Gonzalo Medina, we now have a MWE, and he has identified the cause.                 \foreach \i/\angle in {1/60, 2/30 }{         \path[name path global=line\i] (O) -- (\angle:3.5);%  Comment out and the problem disappears       }      The above piece of code poses the problem. This comes from the `unituandn` file. unituandn.tex               \documentclass[tikz, convert = false]{standalone}     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc          \usepackage{mathtools}          \usetikzlibrary{intersections}     \usetikzlibrary{calc}          %  Used for both ellipses and circles     \tikzset{%       partial ellipse/.style args = {#1:#2:#3}{%         insert path = {+ (#1:#3) arc (#1:#2:#3)}       }     }          %  unit vectors     \newcommand{\unit}[1]{\hat{\mathbf{#1}}}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);            \draw[-latex] (O) -- (4, 0) node[pos = 1.1, font = \scriptsize] {\(x\)};       \draw[-latex] (O) -- (0, 4) node[pos = 1.1, font = \scriptsize] {\(y\)};       \draw[blue, name path = arc] (O) [partial ellipse = -15:75:3];            \foreach \i/\angle in {1/60, 2/30 }{         \path[name path global=line\i] (O) -- (\angle:3.5);%  Comment out and the problem disappears       }     \end{tikzpicture}     \end{document}      helix.tex               \documentclass[tikz, convert = false]{standalone}     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc          \usepackage{tikz-3dplot}     \usepackage{pgfplots}     \usetikzlibrary{intersections}     \pgfplotsset{compat = 1.8}          \begin{document}     \tdplotsetmaincoords{60}{130}     \begin{tikzpicture}[tdplot_main_coords]       \begin{axis}[         samples = 1000,         domain = -pi / 2:4 * pi,         samples y = 0,         view = {115}{20},         axis lines = none         ]         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 3, 0, 0);         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 0, 3, 0);         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 0, 0, 5);         \addplot3[name path global = helix, blue]         ({cos(deg(x))}, {sin(deg(x))}, {.5 * x});       \end{axis}     \end{tikzpicture}     \end{document}      main.tex               \documentclass{article}%     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc     \usepackage{standalone}%  http://ctan.org/pkg/standalone     \usepackage{tikz}%     \usepackage{tikz-3dplot}%     \usepackage{fp}     \usepackage{pgfplots}%  http://ctan.org/pkg/pgfplots     \usepackage{mathtools}%  http://ctan.org/pkg/amsthm     \usepackage{amssymb}%  http://ctan.org/pkg/amssymb          \pgfplotsset{compat = 1.8}%     %  unit vectors     \newcommand{\unit}[1]{\hat{\mathbf{#1}}}     %----------------------------------------------------     %  Tikz stuff     \usetikzlibrary{decorations.markings}     \usetikzlibrary{intersections}     \usetikzlibrary{calc}     \usetikzlibrary{backgrounds}     \usetikzlibrary{fixedpointarithmetic}     %  Used for both ellipses and circles     \tikzset{%       partial ellipse/.style args = {#1:#2:#3}{%         insert path = {+ (#1:#3) arc (#1:#2:#3)}       }     }     %          \begin{document}          \includestandalone{unituandn}          \includestandalone{helix}          \includestandalone{spherical}          \end{document}      * * * So now I am having this problem with another figure that isn't in a `tcolorbox` this time.               The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          [5]     LaTeX Font Info:    Font shape `T1/ppl/bx/n' in size <12> not available     (Font)              Font shape `T1/ppl/b/n' tried instead on input line 403.      [6] [7] [8] (./spherical.tex     ./spherical.tex:42: Missing \endcsname inserted.     <to be read again>                        \T1\i     l.42   \coordinate (O) at (0, 0, 0);          The control sequence marked <to be read again> should     not appear between \csname and \endcsname.      spherical.tex               \documentclass[tikz, convert = false]{standalone}     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc          \usepackage{tikz-3dplot}     \usepackage{mathtools}     \usepackage{fp}          \usetikzlibrary{backgrounds}     \usetikzlibrary{calc}     \usetikzlibrary{fixedpointarithmetic}          \newcommand{\unit}[1]{\hat{\mathbf{#1}}}          \begin{document}     \tdplotsetmaincoords{60}{130}          \begin{tikzpicture}[tdplot_main_coords,       dot/.style = {         outer sep = 0,         inner sep = 0,         shape = circle,         draw = black,         label = {#1}},       dot/.default =,       small dot/.style = {         minimum size = .045cm,         dot = {#1},         fill = black,         font = \scriptsize},       small dot/.default =,       ]       \coordinate (O) at (0, 0, 0);       \node[coordinate, small dot = {above left: \(P\)}] (P) at (3, 4, 5) {};            \draw[-latex] (O) -- +(4, 0, 0) node[font = \small, pos = 1.1] {\(x\)}       coordinate (X);       \draw[-latex] (O) -- +(0, 4, 0) node[font = \small, pos = 1.1] {\(y\)};       \draw[-latex] (O) -- +(0, 0, 4) node[font = \small, pos = 1.1] {\(z\)}       coordinate (Z);       \draw[-latex] (O) -- (P) node[pos = .7, font = \scriptsize,       inner sep = .03cm, fill = white] {\(\mathbf{r}\)};            \begin{scope}[on background layer]         \draw[dashed, gray] (P) -- +(0, 0, -5) coordinate (P1) -- (O);       \end{scope}            \draw[thick, -latex, blue] (O) -- +(1, 0, 0) node[above, font = \scriptsize]       {\(\unit{i}\)};       \draw[thick, -latex, blue] (O) -- +(0, 1, 0) node[above, font = \scriptsize]       {\(\unit{j}\)};       \draw[thick, -latex, blue] (O) -- +(0, 0, 1) node[left, font = \scriptsize]       {\(\unit{k}\)};            \begin{scope}[on background layer]         \draw[-stealth, red, fixed point arithmetic] let           \p0 = (O),           \p1 = (X),           \p2 = (P1),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {1cm},           \n4 = {(\n1 + \n2) / 2}         in (O) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]         node[below, font = \scriptsize] at (\n4:\n3) {\(\varphi\)};              \draw[-stealth, red, fixed point arithmetic] let           \p0 = (O),           \p1 = (Z),           \p2 = (P),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {1cm},           \n4 = {(\n1 + \n2) / 2}         in (O) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]         node[above, font = \scriptsize] at (\n4:\n3) {\(\theta\)};       \end{scope}            %\path (P) -- ($(P)!.75cm!-270:(O)$) coordinate (P2);       %\path (P) -- ($(P)!.75cm!-180:(O)$) coordinate (P3);       %\path (P) -- ($(P)!.7cm!-220:(O)$) coordinate (P4);            \draw[-latex] (P) -- ($(P)!.75cm!-270:(O)$) node[pos = 1.25,       font = \scriptsize] {\(\unit{e}_{\theta}\)};       \draw[-latex] (P) -- ($(P)!.75cm!-180:(O)$) node[pos = 1.25,       font = \scriptsize] {\(\unit{e}_r\)};       \draw[-latex] (P) -- ($(P)!.7cm!-220:(O)$) node[pos = 1.3,       font = \scriptsize] {\(\unit{e}_{\varphi}\)};     \end{tikzpicture}     \end{document}     %%% Local Variables:     %%% mode: pdflatex     %%% TeX-master: "301MathematicalPhysics"     %%% End:       I have numerous other standalone figures that don't cause in problems what so ever. * * * Below you will find the portion of `.log` file related to the graphics.               (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/mt-msb.cfg     File: mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)     ))     \tf@toc=\write5     \openout5 = `301MathematicalPhysics.toc'.           [2          ]     (./spacecurve.tex)     File: spacecurve.tex Graphic file (type tex)      (./planarcurve.tex)     File: planarcurve.tex Graphic file (type tex)      (./unituandn.tex)     File: unituandn.tex Graphic file (type tex)      [3] [4] (./helix.tex     ./helix.tex:52: Missing \endcsname inserted.     <to be read again>                         \T1\i      l.52   \end{axis}                      %     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          )     File: helix.tex Graphic file (type tex)      [5] [6]     LaTeX Font Info:    Font shape `T1/ppl/bx/n' in size <12> not available     (Font)              Font shape `T1/ppl/b/n' tried instead on input line 397.      [7] (./spherical.tex)     File: spherical.tex Graphic file (type tex)      (./ucurves.tex)     File: ucurves.tex Graphic file (type tex)      [8]     Package atveryend Info: Empty hook `BeforeClearDocument' on input line 643.      [9]     Package atveryend Info: Empty hook `AfterLastShipout' on input line 643.          (./301MathematicalPhysics.aux)     Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 643.     Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 643.


title: BibTeX entry for author with only one name

text: One of several authors on a paper I need to cite has only one name. How do I format the BibTeX entry? `author = {Smith, J and Jones, S and Singleton and Brown, A}`


title: Use latexmk to filter the log file

text: I am usually using latexmk in a split shell with my code on the left and latexmk in -pvc mode on the right. When using some packages which themselves load a lot of other packages (think beamer) the log file contains tens or even hundreds of lines of messages from the packages being loaded (also spelling files, fonts, etc.). I would like to prune the output to just the warnings, the errors, and latexmk’s own messages so these do not get lost. Any ideas?


title: LaTeX Error: File `knitting.sty' not found - cannot get knitting package to run

text: I am using LaTeX to typeset instructions for a knitting pattern that I designed. Additionally, I would like to include a knitting chart to visualize the motif. I found the knitting package on CTAN which looks very close to what I want to do. I followed the instructions in the package documentation in order to install it. Like the documentation said, this is where I put the files:   * `/usr/share/texmf/tex/latex/knitting/` (contains knitting.sty and uknit.fd)   * `/usr/share/texmf/fonts/afm/knitting/` (contains .afm files)   * `/usr/share/texmf/fonts/map/knitting/` (contains knitfont.map)   * `/usr/share/texmf/fonts/source/knitting/` (contains .mf files)   * `/usr/share/texmf/fonts/tfm/knitting/` (contains .tfm files)   * `/usr/share/texmf/fonts/type1/knitting/` (contains .pfb files) Then I tried to compile the sample file knitexamples.tex, but pdflatex tells me that it cannot find `knitting.sty`. However, if I manually enter the path to `knitting.sty`, pdflatex continues processing the .tex file, which I find very weird.               ! LaTeX Error: File `knitting.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name: /usr/share/texmf-texlive/tex/latex/knitting/knitting.sty      (The entire log file can be found at the end of my post.) pdflatex then complains that               No file Uknit.fd. on input line 140.      (which I find even weirder because the file is called `uknit.fd`, not `Uknit.fd.`, but maybe this is actually totally okay, I don't know). To make sure LaTeX isn't looking for the files in the wrong place, I also placed copies of the above-mentioned folders into `/usr/share/texmf-texlive/` and respective subfolders (where I usually deposit .sty and .cls files that I manually add to my TeX distribution, which so far has always worked out).   But the errors remain the same. I then resorted to the last suggestion in the docs: dumping all files of the `knitting` package into the folder where I try to compile knitexamples.tex. This actually does compile the file without any errors and produces the desired .pdf file. I would (perhaps understandably) prefer a different solution, but I am stumped as to how to do that. This is the complete log file where said errors show.               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2012.4.27)  6 AUG 2012 12:04     entering extended mode      %&-line parsing enabled.     **knitexamples.tex     (./knitexamples.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov     ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1     9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san     skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn     orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian     , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po     rtuguese, spanish, galician, catalan, swedish, ukenglish, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )          ! LaTeX Error: File `knitting.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name: /usr/share/texmf-texlive/tex/latex/knitting/knitting.sty     (/usr/share/texmf-texlive/tex/latex/knitting/knitting.sty     Package: knitting 2010/08/29          (/usr/share/texmf-texlive/tex/latex/graphics/color.sty     Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)          (/etc/texmf/tex/latex/config/color.cfg     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package color Info: Driver file: pdftex.def on input line 130.          (/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX     \Gread@gobject=\count87     ))     \leftgap@knit=\skip43     \bgshift@knit=\skip44     \chartwidth@knit=\skip45     \stitchcountwidth@knit=\skip46     \rnleftwd@knit=\skip47     \rnrightwd@knit=\skip48     \bgbox@knit=\box26     \fgbox@knit=\box27     \ggbox@knit=\box28     \c@rownumber=\count88     \c@tempcount@knit=\count89     \c@rownumberskip=\count90     \c@stitchcountin=\count91     \c@stitchcountinprev=\count92     \c@stitchcountout=\count93     LaTeX Font Info:    Try loading font information for U+knit on input line 140.     LaTeX Font Info:    No file Uknit.fd. on input line 140.               LaTeX Font Warning: Font shape `U/knit/g/n' undefined     (Font)              using `U/cmr/m/n' instead on input line 140.          ) (/usr/share/texmf-texlive/tex/latex/tools/calc.sty     Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     \calc@Acount=\count94     \calc@Bcount=\count95     \calc@Adimen=\dimen103     \calc@Bdimen=\dimen104     \calc@Askip=\skip49     \calc@Bskip=\skip50     LaTeX Info: Redefining \setlength on input line 76.     LaTeX Info: Redefining \addtolength on input line 77.     \calc@Ccount=\count96     \calc@Cskip=\skip51     ){/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}          pdfTeX warning: pdflatex (file knitfont.map): cannot open font map file     No file knitexamples.aux.     \openout1 = `knitexamples.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 42.     LaTeX Font Info:    ... okay on input line 42.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 42.     LaTeX Font Info:    ... okay on input line 42.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 42.     LaTeX Font Info:    ... okay on input line 42.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 42.     LaTeX Font Info:    ... okay on input line 42.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 42.     LaTeX Font Info:    ... okay on input line 42.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 42.     LaTeX Font Info:    ... okay on input line 42.     (/usr/share/texmf/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count97     \scratchdimen=\dimen105     \scratchbox=\box29     \nofMPsegments=\count98     \nofMParguments=\count99     \everyMPshowfont=\toks14     \MPscratchCnt=\count100     \MPscratchDim=\dimen106     \MPnumerator=\count101     \everyMPtoPDFconversion=\toks15     )     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <7> on input line 48.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 48.               LaTeX Font Warning: Font shape `U/knit/g/p' undefined     (Font)              using `U/knit/g/n' instead on input line 48.               LaTeX Font Warning: Font shape `U/knit/g/g' undefined     (Font)              using `U/knit/g/n' instead on input line 48.               Overfull \hbox (3.05557pt too wide) in paragraph at lines 51--60     [] |      []          [1               ]     ! Font \U/knit/g/g/10 has only 7 fontdimen parameters.     <recently read> \U/knit/g/n/10           l.82 }          ?      ! Emergency stop.     <recently read> \U/knit/g/n/10           l.82 }          End of file on the terminal!               Here is how much of TeX's memory you used:      1022 strings out of 493857      12999 string characters out of 1153305      64769 words of memory out of 3000000      4358 multiletter control sequences out of 15000+50000      3640 words of font info for 14 fonts, out of 3000000 for 9000      714 hyphenation exceptions out of 8191      24i,9n,21p,218b,173s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!


title: Changing length of an arrows from a vertex to itself

text: I'm working with **LyX**. I would like to change the length of an arrow from a vertex to itself. I would like to make the arrow stretch longer up before returning down to the encircled vertex. The code I have been using so far, inside the `\xymatrix` in the LyX Math-box, is:               *+[o][F-]{e}\ar@(ul,ur)      How should this code be modified in LyX in order to lengthen the arrow?


title: How to have the mdframed material flow in the top part of consecutive pages

text: Suppose you have the following layout: ![example of multi-page inserts](http://i.stack.imgur.com/G5GaN.png) The gray area represents normal text. The orange area consists of one or more text boxes (inserts) of given height. Some textbook layouts present advanced or secondary text material in such framed boxes, possibly spanning several pages. A couple of years ago I developed, in collaboration with Massimiliano Dominici, a package called longmedal to handle this need to have some text flow on the upper part of consecutive pages. The package is discussed in this article on ArsTeXnica, the Italian TeX User Group Journal (in Italian). An incomplete English translation of the manual is found here. Ever since the package mdframed came out I've been thinking to make this question: Is it possible to exploit the mdframed text splitting algorithm to achieve the layout presented above? In practice, the trick should be taking the boxes produced internally by mdframed and putting them into consecutive empty figures. The top-fraction of the page occupied by the single figure should be a configuration parameter the user can play with.


title: XeTeX is printing explicit space characters inside quoted strings

text: I'm using XeLaTeX with this:                 \usepackage{fontspec}       \usepackage{polyglossia}       \setdefaultlanguage{spanish}      But when I write this listing               \begin{lstlisting}[style=Pyshell]     >>> print "¿Cómo se llama?"     ¿Cómo se llama?      >>> nombre = input()     Pepe     >>> print "Me alegro de conocerle,", nombre     Me alegro de conocerle, Pepe     \end{lstlisting}      I got this as result:               >>> print "¿Cómo ␣se␣ llama ?"     ¿Cómo se llama ?     >>> nombre = input ()     Pepe     >>> print "Me␣ alegro ␣de␣conocerle ,", nombre     Me alegro de conocerle , Pepe      How does I avoid this "␣" printing? It only appears when quoted text are inside listings, my customized listing is based on Python like this:               \lstdefinestyle{Pyshell}     {language=Python,     keywordstyle=\color{blue},     basicstyle=\ttfamily\footnotesize,     morekeywords={>>>},     }


title: grouping enumerated list

text: I am trying to generate a numbered list with a bracket to the right of the list to group the list items into additional categories. I am trying to get something like: ![enter image description here](http://i.stack.imgur.com/dQMrE.jpg) I have fiddled around with \mbox and \frame, and even thought about using a table, but I would have to re-start the list numbering, and I want to make sure that the alignment is correct. Is this something that can be done? Glenn


title: Error when there are plotting macros before \pgfplotsinvokeforeach

text: Why does `\pgfplotsinvokeforeach` produce > ERROR: Undefined control sequence. when there are plotting macros before it inside a `groupplot`?               \documentclass{article}          \usepackage{pgfplots}          \usepgfplotslibrary{groupplots}          \begin{document}          \begin{figure}       \begin{tikzpicture}         \begin{groupplot}[group style={group size=3 by 1}]           \nextgroupplot        % When this and...           \addplot{x^1};        % this line is commented there is no error           \pgfplotsinvokeforeach{2,3}{%             \nextgroupplot             \addplot{x^#1};%           }        \end{groupplot}      \end{tikzpicture}      \end{figure}          \end{document}


title: Why does $\overbrace{\star\star}^{m}$ cause a double superscript error?

text: In part of my HW paper I have:               $\overbrace{\star\star}^{m}$      This causes the following error:               ! Double superscript.     \star ->^              *     l.153          $\overbrace{\star\star}                                           ^{m}$      If I change the line to `$\overbrace{\star}^{m}$` it works fine. Why does the double `\star\star` cause the double superscript error, and how to fix it?! FYI, This is what I'm trying to recreate: ![enter image description here](http://i.stack.imgur.com/pNGeu.png)


title: Change arrowhead in line style definition

text: I'm trying to define a size for the arrowhead of a style, like this:               \begin{tikzpicture} [line/.style={draw, ->, >=stealth, arrowhead=1cm}]         % define nodes         ...         % define links         \path[line] (node1) -- (node2)         ...     \end{tikzpicture}      However, tikz complains that it does not understand `arrowhead` inside style definition. What is the correct syntax for customizing the arrowhead of a style? P.S. I looked at the answers in Is it possible to change the size of an arrowhead in TikZ/PGF?, but none of them customizes the arrow head inside a style.


title: Image next to paragraph, start next paragraph below both

text: In LaTeX, I have a number of short paragraphs, each with a headline and an image on the right side.               % First section     \spacedlowsmallcaps{Some headline}     \begin{floatingfigure}[r]{4.5cm}         \vspace{-\topskip}\raggedleft\includegraphics[width=4cm]{someFileName}     \end{floatingfigure}     Some text, lorem ipsum dolor sit amet...          % Second section     % ...      This works as expected. Now suppose the height of the `floatingfigure` is greater than the height of the paragraph. The headline of the second section would now start immediately below the text of the first, but still to the left of the image. What I'd like to achieve is that the headline starts below text or image, whichever has a greater height. As a novice LaTeX user, but experienced CSS guy, the world 'clearfix' comes to mind, but I wasn't able to dig up anything or get it to work with `minipage`, `mbox`, `makebox`, ... Thanks in advance!


title: csquotes: Footnotes after Block Quotes with Quotation Marks

text: Pretty often, I come across a situation where I'd like to add a footnote to a block quote in order to comment on the passage quoted.               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage{lmodern,csquotes,lipsum}     \begin{document}     \lipsum*[1]     \blockquote{\lipsum*[1]...}\footnote{bla...}     \lipsum*[1]     \blockquote{\lipsum*[1]...\footnote{bla...}}     \lipsum*[1]     \end{document}      As expected, the first arrangement is not going to work. The footnote mark will end up at the beginning of the paragraph following the quote (as `\footnote` is invoked after the `\blockquote` is closed). This can be fixed by including `\footnote` within `\blockquote`. But this fix will stop working as soon as we apply certain changes to the appearance of our block quotes. Consider my modifications, which I find more pleasing than the LaTeX defaults. (I've disabled those parts of my modifications that aren't relevant to the problem.)               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage{lmodern,csquotes,lipsum}          \renewcommand{\mkblockquote}[4]{\enquote{#1}#2\ifterm{\relax}{#3}#4}          %     %\renewenvironment{quote}     %{\list{}{\itemindent=0em     %         \listparindent=\parindent     %         \leftmargin=\parindent     %         \rightmargin=0em     %         \partopsep=0em     %         \topsep=0em     %         }%     % \item\relax}     %{\endlist}          \begin{document}     \lipsum*[1]     \blockquote{\lipsum*[1]...}\footnote{bla...}     \lipsum*[1]     \end{document}      This style (among other things) retains the quotation marks even for the block quotes. That's what the `\mkblockquote` line is about. The problem is: how can we can have the footnote mark come _after_ the closing mark, but remain on the same line? I've experiment with things like `\nobreak`, but, being a layman when it comes to low-level things, to no avail. I've also tried working on the modified `\mkblockquote`: one might make the footnote an optional argument to `\blockquote`. But everything I tried still resulted in the footnote mark being pushed into the next paragraph. ![enter image description here](http://i.stack.imgur.com/44bcW.jpg) ## Update karlkoeller suggested using a re-defined `\mkcitation` for that purpose. This does indeed produce a footnote mark in the proper place, and provides a very elegant interface: `\blockquote[footnote text]{quote text}`. But it breaks as soon as there is a citation command somewhere in the footnote text -- which will happen quite often ...or, in my case, literally every time. For a simple block quote with no additional remarks in the footnote, I use `\blockc(!)quote[123]{xyz}{quote text}`, which generates the block quote, the footnote mark, and the citation in the footnote. What I'm after is a way to not only have a citation in the footnote, but additional text, which in turn may include more citations (see the picture, which I updated as well).               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage[style=authoryear]{biblatex}     \usepackage{lmodern,csquotes,lipsum}          \renewcommand{\mkblockquote}[4]{\enquote{#1}#2\ifterm{\relax}{#3}#4}     \renewcommand{\mkcitation}[1]{\footnote{#1}}          \begin{document}     \lipsum*[1]     \blockquote[Says \cite[123]{xyz}. See also \cite[123]{xyz}.]{\lipsum*[1]...}     \lipsum*[1]     \end{document}      NB: using the `postnote` of `\blockcquote`, as in   `\blockcquote[123... footnote text, more citations]{xyz}{quote text}`   is not an option. It'll break as well, complaining about nested citation commands.


title: "Two option" section command with associated formatting

text: I'm trying to work out the best way to create a section-like command that has two options associated to it with mixed formatting of the result. Specifically: `\alternativesection{Section title}{Subtitle}` should produce something like: **Section title** _[Subtitle]_ (i.e., there will be a mix of formatting on the section title line). [My real example will not actually be mixing boldface and italic, more likely different sizes of font, but these two illustrate hopefully clearly the principal and if they can be achieved then I can try the slightly more typographically reasonable thing that I'm really hoping for.] I couldn't see how to use `\@startsection` to achieve this and the `titlesec` package doesn't seem to permit this mixture of formatting. Is there some other package that does this sort of thing or is it necessary to do some lower-level hacking copying the original definition of `\@startsection`. [I'm using pdfLaTeX, not XeTeX nor LuaLaTeX.]


title: How to frame/shade a whole section?

text: Simple Question, but it seems to tricky for me. I don't know how to redefine the sectioning in a way, that the whole content (incl. subsections, ...) assigned to one `\section{...}` command would be framed and/or shaded by `framed`/`mdframed`. Even various tries and after hours of searching, I've honestly no clue how to handle that and would be very glad about some help. BTW: I'm looking for a solution with no dependencies on packages like titlesec or similars... just a clean redefinition if possible. =)


title: Detect a newline after dollar $ sign

text: I would like to be able to use `\ifnextchar` to check if the next character is a new line character. The reason is that I would like to redefine the $ sign to behave differently if it is followed by a new line. I don't know if it is possible but actually I want the `$x+y$` code to mean `$x+y$` if not followed by a new line character, and `$$x+y$$` if it is followed by a newline character. I hope anyone has any idea to accomplish this in Latex.


title: About mirroring a piece of text

text: I would like to produce a mirrored version of the Lorem ipsum text. How can I do this? If I use `\reflectbox` or `\scalebox`, everything ends up in a single line of text. This is my code:               \documentclass[12pt, a4paper, twoside]{amsart}     \usepackage{amsmath, amsthm, amsfonts, mathrsfs, amsfonts}     \usepackage{graphics}     \begin{document}     \reflectbox{     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\     }     \end{document}


title: Alignment and scaling of nested subfigures

text: **Update: Read this first** I originally asked this question to find out how I would show a large image with magnified portions of the same image next to it. I was doing this by manually cropping copies of said image and using the technique discussed here to align them nicely. If this is what you're trying to do, please see this post which discusses how to do this automatically using the `spy` library of `Tikz` so you only need to load the one large image. However, the technique here is still very useful, e.g. if you want to show a large image next to small images that are related but not actually just magnifications of the large image. **Original Post (updates below)** I am trying to place one large image on the left next to a group of four small images in a square arrangement on the right. I want it to "look good" where, admittedly, I'm not 100% sure what I'm looking for layout-wise. It seems to me that at least the top of top images and bottom of bottom images on the right hand side should align with the top and bottom of the large image on the left, and overall the whole thing should have a fairly "centered" look on the page. I've included an example to show what I'm trying to do. How do I achieve a good look with this layout of images, and one that will extend to graphics that are included with the `\includegraphics` command; the actual images I'm working with are scaled differently from the black boxes in the example and look even worse. If I were working in something like Powerpoint, I would resize the left image until it was the same height as the combined right images, then align their middles, so I'm curious if we can get a similar effect in Latex. I'm not 100% committed to the layout I've started with, so if someone has a really different idea, e.g. tabular environment, subfigs, etc, that's fine. Also, all the images I'm working with have the same aspect ratio, though not necessarily the same size. Thanks. Example:               \documentclass[11pt,a4paper,english]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \usepackage[includeheadfoot,margin=3cm]{geometry}     \usepackage[font=small,labelfont=bf,tableposition=top]{caption}     \usepackage{blindtext}     \usepackage{subcaption}          \begin{document}       \blindtext          \newcommand{\localImgScale}{.49}     \newcommand{\localMinipageScale}{.45}     \begin{figure}[!htbp]             \centering             \begin{minipage}[b]{\localImgScale\linewidth}                     \centering                     \setlength\fboxsep{0pt}                     \rule{6.4cm}{3.6cm}%                     \subcaption{}             \end{minipage}             \begin{minipage}[b]{.48\linewidth}                     \centering                     \begin{minipage}[b]{\localMinipageScale\linewidth}                                     \centering                                     \rule{3.2cm}{1.8cm}%                         \end{minipage}                         \begin{minipage}[b]{\localMinipageScale\linewidth}                                     \centering                                     \rule{3.2cm}{1.8cm}%                         \end{minipage}\\[0.2em]                         \begin{minipage}[b]{\localMinipageScale\linewidth}                                     \centering                                     \rule{3.2cm}{1.8cm}%                         \end{minipage}                         \begin{minipage}[b]{\localMinipageScale\linewidth}                                     \centering                                     \rule{3.2cm}{1.8cm}%                         \end{minipage}                 \subcaption{}       \end{minipage}      \caption{Test images. The top and of the top right hand images should align with the top of the left image and the bottom of the bottom right hand images with the bottom of the left image.}     \end{figure}               \blindtext     \end{document}      ![Example Output](http://i.stack.imgur.com/bO5X3.jpg) **Update 1** : egreg provided a nice answer, and I've just modified it slightly to get it working with subcaptions which I am using. Here is a MWE including hyper-referencing and a new aspectRatio variable that can be renewed in the document body as needed. Not sure how much re-jigging this needs to allow for different aspect ratios between the big and small images within a figure.               \documentclass[a4paper]{article}     \usepackage{graphicx}     \usepackage{caption,subcaption}     \usepackage[pdftex]{hyperref}     \hypersetup{colorlinks=true}          \newcommand{\aspectRatio}{2}          \begin{document}          \renewcommand{\aspectRatio}{4/3}          \begin{figure}     \centering     \subcaptionbox{\label{label1}}{\includegraphics[width=\dimexpr(\textwidth-15pt+3pt*\aspectRatio)/2\relax]{img1filename}}%     \hfill     \subcaptionbox{\label{label2}}{\vbox{\offinterlineskip\halign{#\hskip3pt&#\cr       \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*\aspectRatio)/4\relax]{img2filename}&       \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*\aspectRatio)/4\relax]{img3filename}\cr       \noalign{\vskip3pt}       \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*\aspectRatio)/4\relax]{img4filename}&       \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*\aspectRatio)/4\relax]{img5filename}\cr       }}}     \caption{Test images. \subref{label1} The Big image. \subref{label2} The Small Images.}     \end{figure}          \end{document}      **Update 2** I recently used this method again, this time for one large and two small images. Here's the code for that layout, where I've also made commands for the big separation widths and small separation widths so they're a bit easier to modify.               \documentclass[a4paper]{article}     \usepackage{graphicx}     \usepackage{caption,subcaption}     \usepackage[pdftex]{hyperref}     \hypersetup{colorlinks=true}          \newcommand{\aspectRatio}{2}     \newcommand\bigsep{12pt}     \newcommand\smallsep{5pt}          \begin{document}          % For each figure, set the aspect ratio of the input images (assumes they're all same AR), and desired separation widths     \renewcommand{\aspectRatio}{4/3}     \renewcommand\bigsep{12pt}     \renewcommand\smallsep{3pt}     \begin{figure}     \centering     \subcaptionbox{\label{label1}}{\includegraphics[width=\dimexpr(2\textwidth-\bigsep*2+\smallsep*\aspectRatio)/3\relax]{img1filename}}%     \hfill     \subcaptionbox{\label{label2}}{\vbox{\offinterlineskip\halign{#\hskip3pt&#\cr       \includegraphics[width=\dimexpr(\textwidth-\bigsep-\smallsep*\aspectRatio)/3\relax]{img2filename}\cr       \noalign{\vskip3pt}       \includegraphics[width=\dimexpr(\textwidth-\bigsep-\smallsep*\aspectRatio)/3\relax]{img3filename}\cr       }}}     \caption{Test images. \subref{label1} The Big image. \subref{label2} The Small Images.}     \end{figure}          \end{document}


title: How to hyperlink only the year part when using natbib and hyperref

text: I am using the `natbib` and `hyperref` packages:               \usepackage{natbib}          \usepackage[pagebackref=true, plainpages=false, bookmarks, bookmarksnumbered,     colorlinks, linktocpage=true, linkcolor=blue, citecolor=blue, filecolor=black,     urlcolor=blue]{hyperref}      With my current settings (above) both the name and the year are hyperlinked. My question is, whether there is a way to _hyperlink (or color) only the year_ -not the author(s). I have the impression reading this post hyperlink name with biblatex authoryear that biblatex does it by default. However changing to biblatex is not an option for me at this point. Any helpful comments will be greatly appreciated.


title: Is there an extensive library of arrow tips with a standardized naming convention?

text: I am drafting diagrams where I need a lot of different arrow tips to indicate different types of directionality. Currently I am using a mixed set of libraries, which I mainly found through detexify. The result is that I am using mathmode arrows like `\leftrightarrow`, or `\leftrightarrows` from the `amsmath` package. If I am not able to find an arrow tip, I make my own such as:               \newcommand{\dentedarrowicon}{     \begin{tikzpicture}[scale=0.50]         \draw [-] (1,1) -- (2,1);         \draw [-] (2,1) -- (1.7,0.7) -- (2.5,1) -- (1.7, 1.3) -- (2,1) ;         \fill (2,1) -- (1.7,0.7) -- (2.5,1) -- (1.7, 1.3) -- (2,1) ;      \end{tikzpicture}     }       This will draw ![enter image description here](http://i.stack.imgur.com/xSgWU.png) Instead of scrapping around for different arrow tips, I would like to have unified library which I could apply. More importantly I need a naming convention for arrow tips. The "dentedarrowicon" is a term I made up and still, in my opinion, is a bit descriptive. This changes however when I start describing ![enter image description here](http://i.stack.imgur.com/510uU.png) as `open arrow with tbar`               \newcommand{\openarrowwithtbaricon}{     \begin{tikzpicture}[scale=0.50]         \node (datanode2)[regular polygon,regular polygon sides=3, shape border rotate=270,scale=0.5]  at (2,1) [draw,thick, fill=white] {};         \draw [-] (1,1) -- (datanode2);         \draw [-] (1.7,0.7) -- (1.7,1.3);      \end{tikzpicture}     }      Is there an extensive library with arrowtips I could use, with a standardized and descriptive naming convention? I am aware of a related answer, where the TikZ library is mentioned. It is a great answer, but I still need a lot more types of arrowtips and I am not sure if an `open triangle 60` is a descriptive name. Anyone knowing either an extensive library of arrowtips or a standard naming convention I can use to draft my own?


title: What is the cleanest way to call a command on each new chapter?

text: I'm using KOMA-Script and a mix of `\chapter` and `\addchap` commands. I would like to have `\glsresetall` called for every chapter as I want my acronyms redefined once per chapter. What is the cleanest way using either pure LaTeX or a KOMA-Script specific method to have `\glsresetall` called at the beginning of each new chapter? Ideally the solution should work with the above chapter commands as well as `\chapter*`.


title: How can I add a footnote to a theorem header?

text: I would like to add a footnote to a theorem ("Korollar" in the minimal-not- working-examples below) that explains in simple words what the theorem states in exact (but more difficult) words. So the footnote should be after the number. Please note that I only need this for one or two theorems. For the rest (about 20) I don't need it. So a solution should not change the behaviour of those other theorems. # What I've tried ## Try 1 This one is from another question, but the footnote does not appear at all: ![enter image description here](http://i.stack.imgur.com/SbNkr.png)               \documentclass{scrbook}     \usepackage{etoolbox}     \usepackage{amsmath,amssymb}% math symbols / fonts     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}     \usepackage{framed}          \theoremstyle{break}     \setlength\theoremindent{0.7cm}     \theoremheaderfont{\kern-0.7cm\normalfont\bfseries}      \theorembodyfont{\normalfont} % nicht mehr kursiv          \newframedtheorem{satz}{Satz}[chapter]     \newframedtheorem{lemma}[satz]{Lemma}     \newtheorem{korollar}[satz]{Korollar}          \begin{document}         \begingroup         \apptocmd{\thetheorem}{\protect\footnote{Im Grunde wird die Äquivalenz von Stetigkeit im Sinne der Analysis und Topologie auf metrischen Räumen gezeigt.}}{}{}         \begin{korollar}             Seien $X, Y$ metrische Räume und $f: X \rightarrow Y$ eine Abbildung.                  Dann gilt: $f$ ist stetig $\Leftrightarrow$ zu jedem $x \in X$ und jedem             $\varepsilon > 0$ gibt es $\delta(x, \varepsilon) > 0$, sodass für             alle $y \in X$ mit $d(x,y) < \delta $ gilt              $d_Y(f(x), f(y)) < \varepsilon$.         \end{korollar}         \endgroup     \end{document}      ## Try 2 ![enter image description here](http://i.stack.imgur.com/AQb4k.png)               \documentclass[a6paper]{scrbook}     \usepackage[a6paper]{geometry}     \usepackage{etoolbox}     \usepackage{amsmath,amssymb}% math symbols / fonts     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}     \usepackage{framed}          \theoremstyle{break}     \setlength\theoremindent{0.7cm}     \theoremheaderfont{\kern-0.7cm\normalfont\bfseries}      \theorembodyfont{\normalfont} % nicht mehr kursiv          \newframedtheorem{satz}{Satz}[chapter]     \newframedtheorem{lemma}[satz]{Lemma}     \newtheorem{korollar}[satz]{Korollar}          \begin{document}         \begin{korollar}\footnote{Im Grunde wird die Äquivalenz von Stetigkeit im Sinne der Analysis und Topologie auf metrischen Räumen gezeigt.}             Seien $X, Y$ metrische Räume und $f: X \rightarrow Y$ eine Abbildung.                  Dann gilt: $f$ ist stetig $\Leftrightarrow$ zu jedem $x \in X$ und jedem             $\varepsilon > 0$ gibt es $\delta(x, \varepsilon) > 0$, sodass für             alle $y \in X$ mit $d(x,y) < \delta $ gilt              $d_Y(f(x), f(y)) < \varepsilon$.         \end{korollar}     \end{document}      ## Try 3 ![enter image description here](http://i.stack.imgur.com/6G7nI.png)               \documentclass[a6paper]{scrbook}     \usepackage[a6paper]{geometry}     \usepackage{etoolbox}     \usepackage{amsmath,amssymb}% math symbols / fonts     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}     \usepackage{framed}          \theoremstyle{break}     \setlength\theoremindent{0.7cm}     \theoremheaderfont{\kern-0.7cm\normalfont\bfseries}      \theorembodyfont{\normalfont} % nicht mehr kursiv          \newframedtheorem{satz}{Satz}[chapter]     \newframedtheorem{lemma}[satz]{Lemma}     \newtheorem{korollar}[satz]{Korollar}          \begin{document}         \begin{korollar}[\footnote{Im Grunde wird die Äquivalenz von Stetigkeit im Sinne der Analysis und Topologie auf metrischen Räumen gezeigt.}]             Seien $X, Y$ metrische Räume und $f: X \rightarrow Y$ eine Abbildung.                  Dann gilt: $f$ ist stetig $\Leftrightarrow$ zu jedem $x \in X$ und jedem             $\varepsilon > 0$ gibt es $\delta(x, \varepsilon) > 0$, sodass für             alle $y \in X$ mit $d(x,y) < \delta $ gilt              $d_Y(f(x), f(y)) < \varepsilon$.         \end{korollar}     \end{document}


title: memoir class: Why does MakeUppercase break my cftpartfont?

text: According to page 151 of the memoir class documentation, if one wishes to uppercase the PART entries in the ToC, then one should use e.g.               \renewcommand{\cftpartfont}{\MakeUppercase}       Yet when I try even this:               \documentclass{memoir}     \renewcommand{\cftpartfont}{\MakeUppercase}     \begin{document}     \tableofcontents     \part{This is a part.}     \end{document}      LaTeX complains, "./.toc.1: Argument of \partnumberline has an extra }." Huh??


title: How can I create a list with arguments passed to a macro?

text: Straight forward question:               \newcommand{\optaxis}[1][]{        \ifemptyarg{#1}         {\begin{axis} [xtick={0},   xmin=-1,  xmax =1,  xticklabels={#2},   box plot width=5mm]}         {\begin{axis} [xtick={0,1}, xmin=-1,  xmax =2,  xticklabels={{#1},{#2}},    box plot width=5mm]}%          }      How can I get the part here to work correctly - `{{#1},{#2}}` - I am getting a variety of errors which I cannot seem to resolve. If I change that to `{test,test2}` it works and compiles fine. The specific error message is: > You meant to type ## instead of #, right? * * * edit: I am trying to use from here:               \makeatletter               \def\ifemptyarg#1{%       \if\relax\detokenize{#1}\relax % H. Oberdiek         \expandafter\@firstoftwo       \else         \expandafter\@secondoftwo       \fi}          \makeatother          \newcommand{\optaxis}[1][]{        \ifemptyarg{#2}         {\begin{axis} [xtick={0},   xmin=-1,  xmax =1,  xticklabels={#1},   box plot width=5mm]}         {\begin{axis} [xtick={0,1}, xmin=-1,  xmax =2,  xticklabels={{#1},{#2}},    box plot width=5mm]}     }      I want to be able to call this like:               \optaxis{test1}     \optaxis{test1, test2}      and have each called respectively.


title: What does the output of TeX/LaTeX depend on (in the sense of version and distribution)

text: I knew in advance that the output of `tex`, `pdftex`, `latex`, `pdflatex` and so on, depends on the version of that given program. This, of course, makes a lot of sense. Until now, I have not given it a lot of thought because I suspect that the difference in how the output looks does not change that much from version to version. But, lately I am in a situation where it does matters and I am faced with the question: _On what does the output depend?_ I feel that it must necessarily depend on the version of the program, let's say `pdflatex` from now on since this is the one I use in this case. But what about the choice of distribution, that is, TeX Live versus MacTeX versus MiKTeX versus any other possibility, and what about the version of that distribution. Does the output depend on these factors? Obviously the output might depend on the version of a package I am using, and the packages I install myself (in `~/texmf`) I can easily keep track of the version on. Most of the files loaded by `pdflatex` though (I have realised that _there are a lot_ ) must depend in some way of factors as the ones mentioned above. When I look at my log files, they have have a header like               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2013.4.4)  13 MAY 2014 13:59      or               This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010/Arch Linux) (format=pdflatex 2011.4.11)  17 DEC 2013 01:28      _How do I decipher these headers?_ There are several number systems in work here, as far as I can see, and as I said, I do not know which ones the output depend on. In the specific case that I am in, we are three people who need to compile the document, but one uses Windows and the other two uses Linux. _Is it even possible to ensure that two persons produce the same output?_ The answer to this question is of course yes if the two persons both use Linux, because then a portable TeX Live installation would do that (I believe), but is always possible, that is the question.


title: Half Brackets Not Showing in XeLaTeX

text: I have a XeLaTeX document with lower half brackets `⸤⸥` (U+2E24,U+2E25) and upper half brackets `⸢⸣` (U+2E22,U+2E23). In the log file I get the complaint like `Missing character: There is no ⸤ in font...` when I use Gentium or FreeSerif. However, in other contexts (Gnome Terminal, LibreOffice) these characters show up in those fonts. How can I get these characters to appear in my document?               \documentclass[12pt,letterpaper]{article}     \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{FreeSerif}     \begin{document}     \paragraph{} These are ⸤lower half-brackets⸥. These are ⸢upper half-brackets⸣.     It seems that other symbols work—such as ê.     \end{document}      ![Result](http://i.stack.imgur.com/HJwxa.png) Relevant portion of the log file:               Missing character: There is no ⸤ in font Free Serif/ICU:mapping=tex-text,!     Missing character: There is no ⸥ in font Free Serif/ICU:mapping=tex-text,!     Missing character: There is no ⸢ in font Free Serif/ICU:mapping=tex-text,!     Missing character: There is no ⸣ in font Free Serif/ICU:mapping=tex-text,!


title: how to make a line between two rows in table? (when no space between strings)

text: I use longtabu package to build table, when I use \\ to separate every line, it is ok, see below               \begin{center}          \begin{longtabu} to \textwidth {|X[1 , p ] |X[1 , p ] | X[2 , p ]| X[2 , p ]|X[1 , p ]|X[1 , p ]|}          \caption{A simple longtabu example}\\          \hline          \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} & \textbf{E} & \textbf{F}  \\          \hline          \endfirsthead          \multicolumn{6}{c}%          {\tablename\ \thetable\ -- \textit{Continued from previous page}} \\          \hline          \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} & \textbf{E} & \textbf{F}  \\          \hline          \endhead          \hline \multicolumn{6}{r}{\textit{Continued on next page}} \\          \endfoot          \hline          \endlastfoot                    ab&cd&ef&gh&ij&kq\\ab&cd&ef&gh&ij&kq\\ab&cd&ef&gh&ij&kq\\\end{longtabu}\end{center}\end{document}      ![enter image description here](http://i.stack.imgur.com/RJ1DQ.jpg) But if i use \hline or \hline\, like below, the complie always show error               ab&cd&ef&gh&ij&kq\hline\ab&cd&ef&gh&ij&kq\hline\ab&cd&ef&gh&ij&kq\hline\\end{longtabu}\end{center}\end{document}         OR               ab&cd&ef&gh&ij&kq\hlineab&cd&ef&gh&ij&kq\hlineab&cd&ef&gh&ij&kq\hline\end{longtabu}\end{center}\end{document}          OR \\\hline               ab&cd&ef&gh&ij&kq\\\hlineab&cd&ef&gh&ij&kq\\\hlineab&cd&ef&gh&ij&kq\\\hline\end{longtabu}\end{center}\end{document}          looks like this ![enter image description here](http://i.stack.imgur.com/EDMVP.jpg) The reason I write them together without any space is, I have a program to create table, the program use strings to create table. I want to have a line between each row in the table, how to do it? either \hline or \hline\ doesnot work, for example \hline maybe read as \hlineab...


title: What does \@let@token do?

text: In `source2e.pdf` I've seen `\@let@token` used in several places, for example in the definition of `\@ifnextchar`:               \long\def\@ifnextchar#1#2#3{%       \let\reserved@d=#1%       \def\reserved@a{#2}%       \def\reserved@b{#3}%       \futurelet\@let@token\@ifnch}      However, I couldn't find a description of `\@let@token`, so my question is what exactly does `\@let@token` do?


title: \overline and \widehat with subscript

text: I would like to create commands to produce overlines (respectively wide hats or arrows) with a subscript at the end. The commands               \overline{X}^{1}   \widehat{X}^{2}  \overrightarrow{X}^{3}      do not suit my needs since the subscripts should be controlled by the overline (respectively wide hat, right arrow). Ideally I would like to have a command like               \myoverline_{1}{X}   \mywidehat_{2}{X}  \myoverrightarrow_{3}{X}      What would be the cleanest way to do so? P.S. The closest thing I was able to find is this question. **Update** Here is a picture of what I wish to obtain: ![](http://www.liafa.univ-paris- diderot.fr/~jep/StackExchange/Images/Example.gif)


title: Change Biblatex Citation Style After Preamble

text: Is it possible to change the citation style after the preamble? My document requires "numeric" citation in the document, but then I would like to use "authoryear" as the headings for my appendices. Any ideas? MWE follows:               \listfiles     \documentclass{article}     \usepackage[backend=biber,style=numeric]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}          Some text \autocite{A01}.          \printbibliography     \clearpage          \appendix     \newpage     \vspace*{2in}     \begin{center}     \section{\Cite{A01}} % I want this to be the authoryear citation     \end{center}     \end{document}


In the following figure, the equations are well aligned in displayed mode but not in enumerated environment. I have done many permutations but I give up. ![enter image description here](http://i.stack.imgur.com/K98Lk.png)               \documentclass{article}     \usepackage[a4paper,margin=1cm]{geometry}     \usepackage{mathtools}          \def\inner{%     \begin{multlined}[b][7cm]     \framebox[5cm]{Top LHS}\\     \framebox[5cm]{Middle LHS}\\     \framebox[5cm]{Bottom LHS}     \end{multlined}         &= \begin{multlined}[t][7cm]                 \framebox[5cm]{Top RHS 1}\\                 \framebox[5cm]{Middle RHS 1}\\                 \framebox[5cm]{Bottom RHS 1}             \end{multlined}\\         &= \begin{multlined}[t][7cm]                 \framebox[5cm]{Top RHS 2}\\                 \framebox[5cm]{Middle RHS 2}\\                 \framebox[5cm]{Bottom RHS 2}             \end{multlined}}          \begin{document}     \section*{displayed}     \begin{align*}     \inner     \end{align*}          \section*{enumerated}     \begin{enumerate}         \item         $\!         \begin{aligned}[t]           \inner         \end{aligned}         $     \end{enumerate}     \end{document}      How to move a block of equations inside an enumeration down?


title: tikz center node below 2 other nodes

text: I want to create a node below 2 other node but place it exactly in the middle of the two nodes. Here's what I have so far...                    \documentclass[12pt]{article}          \thispagestyle{empty}          \usepackage{tikz}          \usepackage{amsfonts}               \begin{document}          \begin{center}          \begin{tikzpicture}[node distance=3cm]           \node (top)          {$\top$};           \node (node1)   [below left of=top]       {\{node1\}};           \node (node2)      [left of=node1] {\{node2\}};           \node (node3) [below right of=top] {\{node3\}};           \node (node4)[right of=node3]         {\{node4\}};           \node (node1node2) [below right of=node2]        {\{node2 , node1\}};           \node (node4node3) [below right of=node3]        {\{node3, node4\}};           \node (bot)   [below left of = node4node3]  {$\bot$};           \draw (top)    -- (node1);           \draw (top)    -- (node2);           \draw (top)    -- (node3);           \draw (top)    -- (node4);           \draw (node4)    -- (node4node3);           \draw (node3)    -- (node4node3);           \draw (node2)    -- (node1node2);           \draw (node1)    -- (node1node2);           \draw (node1node2)    -- (bot);           \draw (node4node3)    -- (bot);               \end{tikzpicture}          \end{center}          \end{document}      The node "bot" is almost but not exactly in the middle of nodes "node1node2" and "node3node4". It should be at the bottom of the picture at the center


title: arrow length in flowchart with tikz

text: I ma using tikz to draw a flowchart.Some of the arrows connecting the decision diamonds to the blocks are shorter than other arrows and I do not know how to make all of the arrows with same length. here is the code:               \begin{tikzpicture}[node distance = 2cm, auto][t]     \node [block] (init) {Perform load forecast} ++(-3.4,+.1);     \node [block, below of=init] (evaluate) {Execute optimization};     \node [block, below of=evaluate] (SOC) {Read SOC of BESS from SCADA};     \node [block, right of=SOC, node distance=3cm] (constraint) {Modify optimization constraint};     \node [decision, below of=SOC] (decide) {Is next BESS active power command violate      SOC constraint?};     \node [block, below of=decide, node distance=3.5cm] (stop) {Send BESS active power command};     \node [block, below of=decide, node distance=3.5cm] (active) {Send BESS active power command};     \node [block, below of=active, node distance=2cm] (rscada) {Read reactive power load from SCADA};          \node [decision, below of=rscada,node distance=2.6cm] (decide1) {$Q_{res}>Q_L$?};           \node [block, below of=decide1, node distance=2.6cm] (injq) {Inject $Q_l$};          \node [block, right of=injq, node distance=3cm] (qres) {Inject $Q_{res}$};          % Draw edges     \path [line] (init) -- (evaluate);     \path [line] (evaluate) -- (SOC);     \path [line] (SOC) -- (decide);     \path [line] (decide) -- node[near start] {N}(active);     \path [line] (decide) -| node [very near start]{Y}(constraint);     \path [line] (active) -- (rscada);     \path [line] (rscada) -- (decide1);     \path [line] (decide1) --  node [near start] {Y}(injq);     \path [line] (decide1) -| node [very near start] {N}(qres);           \path [line] (constraint) |- (evaluate);          \path [line] (qres.east) -- ++(.53,0) node(lowerright){} |- (init.east);     \draw (0,-18.9) -- (0,-19.5);     \draw (3,-18.9) -- (3,-19.5);     \draw (0,-18.9) -- (0,-19.5);     \draw (0,-19.5) -- (4.71,-19.5);     \draw (4.71,-19.5) -- (4.71,-18.1);     \end{tikzpicture}      ![flowchart](http://i.stack.imgur.com/jPUoy.png)


title: TikZ: Text blocks with minimum spacing AND "preferred" anchor

text: I'm new to TikZ, and I'm trying to solve a problem which should be easy, I found many related examples but none helped me. Given the following MWE:               \documentclass{article}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage[paperwidth=99mm,paperheight=71mm,margin=0mm,showframe]{geometry}     \usepackage{tikz}     \usepackage[graphics,tightpage,active]{preview}     \PreviewEnvironment{tikzpicture}     \thispagestyle{empty}     \tikzstyle{every node}=[font=\small]     \begin{document}     \begin{tikzpicture}     \draw plot[only marks, mark=+] coordinates{(-23.3mm,  18.6mm) (-23.3mm,  10.8mm) (-23.3mm,  2.3mm ) (-23.3mm, -5.9mm ) (-23.3mm, -14.2mm) (-23.3mm, -14.2mm) (-23.3mm, -22.2mm)};     \draw (-23.3mm,  18.6mm) node[anchor=west, text width=60.3mm ]{A. This is quite short.};     \draw (-23.3mm,  10.8mm) node[anchor=west, text width=60.3mm ]{B. This is already a bit longer, it should be on two lines.};     \draw (-23.3mm,  2.3mm) node[anchor=west, text width=60.3mm ]{C. This is really the longest of all blocks and it will span a whole number of three lines!!!};     \draw (-23.3mm,  -5.9mm) node[anchor=west, text width=60.3mm ]{D. This is short};     \draw (-23.3mm,  -14.2mm) node[anchor=west, text width=60.3mm ]{E. This is long but not too much but should again span two lines.};     \draw (-23.3mm,  -22.2mm) node[anchor=west, text width=60.3mm ]{F. This is short.};     \end{tikzpicture}     \end{document}      I would like   1. the text blocks to be as aligned as possible to the `+` anchors, using `anchor=west`.    2. a **minimum vertical space** between blocks, which overrides the previous condition: if necessary, adjacent blocks should be displaced vertically to make room for three-lines blocks. The preferred anchors positions, text width, image size and font are all fixed. In the example, B should be moved up a bit, to make room for C. The issue is that I want to automate this over several images, with different sets of text blocks, and I do not know in advance whether/where the three-line blocks will be (however I can make sure I do not have neighboring three-line blocks). Note that if all blocks had three lines I would get out of the margins, so I cannot simply set a minimum height for all blocks. However I'm sure I have 6 blocks per image, only 1 or 2 are long, and they're not adjacent. Note: I'm using XeLaTeX Feel free to guess what I'm trying to do :)


title: TikZ - Callout position relative to the text

text: Given this minimum compilable example:               % !TEX program = lualatex     % arara: lualatex: {synctex: yes}     % arara: lualatex: {synctex: yes}     \documentclass[a4paper,11pt,openany]{memoir}          \usepackage[dvipsnames,x11names]{xcolor}          \usepackage{tikz}         \usetikzlibrary{automata}         \usetikzlibrary{arrows}         \usetikzlibrary{backgrounds}         \usetikzlibrary{calc}         \usetikzlibrary{hobby}         \usetikzlibrary{intersections}         \usetikzlibrary{mindmap}         \usetikzlibrary{ocgx}         \usetikzlibrary{patterns}         \usetikzlibrary{positioning}         \usetikzlibrary{shadings}         \usetikzlibrary{shadows}         \usetikzlibrary{shapes}         \usetikzlibrary{shapes.callouts}         \usetikzlibrary{through}         \usetikzlibrary{trees}              \usepackage{tkz-euclide}         \usetkzobj{all}          \newcommand{\tikzmark}[1]{\tikz[overlay, remember picture, baseline=.5ex] \node (#1) {};}          \usepackage{url}     \usepackage{hyperref}     \usepackage{xparse}     \usepackage{xpatch}          \newcounter{contatoreRiquadri}     \setcounter{contatoreRiquadri}{1}          \tikzset{stileCallout/.style={         draw=gray,         thick,         rectangle callout,         anchor=pointer,         align=justify,         fill=gray!17}         }          \NewDocumentCommand{\parolaLinkRiquadro}{r[] m}{%         \switchocg{#1}{\textsf{\textcolor{gray}{#2}}}\tikzmark{#1}%     }          \NewDocumentCommand{\riquadroEsplicativo}{O{opacity=1,text opacity=1} m O{270:1cm} m O{5cm} m m}{%     \begin{tikzpicture}[remember picture,overlay]     \begin{scope}[ocg={ref=#2,status=invisible,name={#4}}]     \node[stileCallout,text width=#5,callout relative pointer={(#3)},#1] at (#2) {\textcolor{black}{\textbf{``}\,#4\,\textbf{''.}}\par\centering\href{#6}{#7}\par};     \end{scope}     \end{tikzpicture}%     }          \NewDocumentCommand{\riquadro}{m O{opacity=1,text opacity=1} m O{270:1cm} m O{5cm}}{%         \parolaLinkRiquadro[riquadro\thecontatoreRiquadri]{\textsf{\textcolor{gray}{#1}}}%         \riquadroEsplicativo[#2]{riquadro\thecontatoreRiquadri}[#4]{#3}[#6]{#5}{#1}%         \addtocounter{contatoreRiquadri}{1}%         }                    \begin{document}          Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. \riquadro{\textbf{CLICK HERE!}}{Testo di prova. Testo di prova.}[90:1cm]{Terzo argomento.} Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.     Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.     Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.     Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.     Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.     Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova. Testo di prova.          \end{document}      If I put as the second optional argument of `\riquadro` `[270:1cm]` the callout is written above the text, if I put `[90:1cm]` is drawn below. How can I do that is _always_ drawn _above?_


title: Image on full slide in beamer package

text: I would like to make a slide of only one image without any borders or any other beamer specific element. I tried :               \begin{frame}[plain]     \includegraphics[keepaspectratio=true,width=1\paperwidth]{kernel-panic.png}     \end{frame}      But I still get a border on the left, top and bottom. Later edit: `width=1.2\paperwidth` seems to remove top and bottom borders. I still have a left border and some navigation elements on bottom right.


title: Implement functionality equivalent to many thousand \savebox

text: I have a large (approx 600 pages) index of files, and for each file entry significant computation is required so that additional links can be added. The computation of these links takes quite a bit of time, and as each file name appears in multiple places in the index these links are repeatedly generated many times during indexing. My current approach caches the data associated with each link in a `def`, but even with that it takes about 6 hours to run, and this will increase over time. My thought was to cache this output in a `\savebox`, but based on Savebox equivalent of \csname?, it appears that this is not a good approach. ### Main Question: If I should not be using `\savebox`s, how else can I achieve similar functionality where I cache the output (at least for a few thousand different cases)? For instance, suppose that the macro `\MyComplicatedCode` was much more complicated in the MWE below. What can I do outside of adjusting `\MyComplicatedCode` and be able to reuse the output without recomputing it?   * Even if I fully understood expansion, I think it would be a lot of work to attempt to expand the code so that I store only the final links to be added.   * Typesetting the code into a .pdf won't work either as that code generated links to other files. ### Sub Questions:   * What is the limit on the number of `\savebox`s allowed?   * Can these be increased by changing some parameter? ## Notes:   * I would currently need about 1,500 `\savebox`s and probably will increase to about 5,000 over time. ## References:   * Savebox equivalent of \csname? ## Code: Since using a `\savebox` is not a good idea, this MWE is not that important. In the _cooked_ up example below I am caching the name of the file extracted from a given hierarchical file name. The example works fine if I create a `\def`, but I can't seem to be able to achieve the same functionality with a `\savebox`. This currently yields: ![enter image description here](http://i.stack.imgur.com/823yq.png)               \documentclass{article}     \usepackage{pgffor}     \usepackage{xstring}          \newcommand*{\MyFileNames}{%         ../../DirNameA/FileA1.tex,%         ../../DirNameA/FileA2.tex,%         ../../DirNameB/FileB1.tex,%         ../../DirNameB/FileB2.tex%     }%          \newcommand*{\MyComplicatedCode}[4][1]{%         \StrBehind[#1]{#2}{#3}[#4]%     }%               \begin{document}     %% Create \newcommands     \foreach \X in \MyFileNames {%         \MyComplicatedCode[3]{\X}{/}{\ExtractedFileName}%         \expandafter\xdef\csname MyCommand\X\endcsname{File Name = \ExtractedFileName}%         %\par\string\MyCommand\X: \expandafter\csname MyCommand\X\endcsname     }%          %% Now use the \newcommands     Command ../../DirNameB/FileB1.tex:     \expandafter\csname MyCommand../../DirNameB/FileB1.tex\endcsname               \bigskip     \foreach \X in \MyFileNames {%         \MyComplicatedCode[3]{\X}{/}{\ExtractedFileName}%         \expandafter\newsavebox\csname MySaveBox\X\endcsname%         \expandafter\savebox\csname MySaveBox\X\endcsname{Savebox Value = \ExtractedFileName}%     }%          %% Now use the \savebox     Savebox ../../DirNameB/FileB1.tex:     \expandafter\usebox\csname MySaveBox../../DirNameB/FileB1.tex\endcsname%          \end{document}


title: How to plot scatter points using pgfplots with color defined from table rgb values?

text: I am trying to plot a set of data points (`scatter` points not linked to each other), where each point has a different color. The color definition is given by predefined `rgb` values written in the same file that contains the data. The following file serves as example:               \usepackage{filecontents}     \begin{filecontents}{test.dat}         x   y   RED   GREEN   BLUE         1   11  0.2    0.3    0.5         2   14  0.3    0.3    0.4         4   26  0.1    0.8    0.1         3   39  0.0    0.1    0.9     \end{filecontents}      The `x` and `y` columns represent the position of the points I want to plot. The next three columns `RED`, `GREEN` and `BLUE` correspond to the associated color values in `rgb` format. What I was trying so far, was to do:               \begin{document}          \pgfplotstableread{test.dat}\test     %number of points to be plotted     \pgfplotstablegetrowsof{\test}     \pgfmathsetmacro{\N}{\pgfplotsretval-1}            \begin{tikzpicture}     \begin{axis}[%         xmin=0, xmax=5,         ymin=0, ymax=45,         width=8cm,         height=6cm,         grid=both,         xlabel=Xtest,          ylabel=Ytest,            ]         \foreach \i in {0,...,\N}         {         \definecolor{testcolor}{rgb}{\thisrow{3}, \thisrow{4}, \thisrow{5}}            \addplot[scatter,              only marks,                  scatter/use mapped color={draw=none,fill=testcolor},         ]          table [x index = 0,y index = 1]{\test};         }     \end{axis}     \end{tikzpicture}          \end{document}      But I am unable to fetch a single row value for the color definition. How can I do this ? I also looked at `meta` options, but the color is defined with a single value (linearly) and I need the three components in the color definition.


title: 2 images in a row. Subcaption package give me errors, Subfig too , ¿solution?

text: I have a big .tex that runs well without errors I´m trying to put 2 images in a row, I tried subcaption packaes and only adding to my code               \usepackage{subcaption} gives me this errors      ![enter image description here](http://i.stack.imgur.com/hQkDc.png) and then readin this post subcaption: `caption' package not loaded I use this               \usepackage[caption=false]{subfig}      and.... ERROR too. so,... how can I put 2 images in a row?


title: More on "Cylinder shading with pgf TiKZ"

text: In his answer to Cylinder shading with PGF/TikZ, Jake provides a code to draw a shaded cylinder with a not shaded top. This code draws a cylinder node (from `shapes.geometric` library) and after that, with a second draw command, an ellipse is drawn over it. I've tried to join both steps within a `mycylinder/.style` with an `append after command` option without any success. I still don't completely understand what `\pgfinterruptpath`, `\pgfextra` do, so may be my code is not correct. I imagine that covering ellipse must be drawn after shading the cylinder but I don't know how to do it. Could you explain what's wrong?               \documentclass[tikz,border=1mm]{standalone}          \usetikzlibrary{calc,fit,backgrounds,positioning,arrows,shapes.geometric}          \begin{document}          \begin{tikzpicture}[font=\sffamily\small,        >=stealth',        mycylinder/.style={     draw,       shape=cylinder,       alias=cyl, % Will be used by the ellipse to reference the cylinder       aspect=1.5,       minimum height=3cm,       minimum width=2cm,       left color=blue!30,       right color=blue!60,       middle color=blue!10, % Has to be called after left color and middle color       outer sep=-0.5\pgflinewidth, % to make sure the ellipse does not draw over the lines       shape border rotate=90,       append after command={%         \pgfextra{%            \pgfinterruptpath     %          \begin{pgfonlayer}{foreground layer}               \fill [blue!10] let                  \p1 = ($(\tikzlastnode.before top)!0.5! (\tikzlastnode.after top)$),                  \p2 = (\tikzlastnode.top),                  \p3 = (\tikzlastnode.before top),                  \n1={veclen(\x3-\x1,\y3-\y1)},                  \n2={veclen(\x2-\x1,\y2-\y1)},                  \n3={atan2((\y2-\y1),(\x2-\x1))}               in                   (\p1) ellipse [x radius=\n1, y radius = \n2, rotate=\n3];     %          \end{pgfonlayer}            \endpgfinterruptpath%         }       }      }     ]          % Left cylinder. Wrong one.     % I would like to draw right cylinder with only one command.     \path node [mycylinder, label=below:Wrong] (disc) {};          % Right cylinder. Correct one but with two commands.     \path node [mycylinder, right=1cm of disc, label=below:Good] (disc2) {};     \fill [blue!10] let       \p1 = ($(cyl.before top)!0.5!(cyl.after top)$),       \p2 = (cyl.top),       \p3 = (cyl.before top),       \n1={veclen(\x3-\x1,\y3-\y1)},       \n2={veclen(\x2-\x1,\y2-\y1)},       \n3={atan2((\y2-\y1),(\x2-\x1))}      in        (\p1) ellipse [x radius=\n1, y radius = \n2, rotate=\n3];          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tEzbJ.png)


title: Weird tikz/pgfkeys error while trying example from the tikz manual.

text: I am still learning to use tikz from the manual. I got an error for this code:               \documentclass[twocolumn,english]{article}     \usepackage{tikz}     \begin{document}     \begin{figure}       \centering       \begin{tikzpicture}         \node[fill=yellow,text width=3cm,align=center]{This is a           demonstration text for showing how line breaking works.};       \end{tikzpicture}       \caption{Dim}       \label{fig:dim}     \end{figure}     \end{document}      Here is the error in `pgfkeys` (is this package related to pgf/tikz?):               ! Package pgfkeys Error: I do not know the key '/tikz/align' and I am going to      ignore it. Perhaps you misspelled it.      What am I doing wrong?


title: change font color in a lstset

text: Hi I need put java code to latex. I use `\lstset` and `\begin{lstlisting}`. I need change color of font in SOME part of code. How I can do this? Help pls


title: How to adapt Contents header to match other chapter headers

text: I am using               \documentclass[a4paper,11pt,twoside,openright]{book}      and customized my headers using               \usepackage{titlesec, blindtext, color}     \definecolor{gray75}{gray}{0.75}     \newcommand{\hsp}{\hspace{20pt}}     \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}      The result is the chapter number, a vertical line and the chapter name. However, the "Contents" header remains untouched. I would like it to look the same as other headers (optionally with a leading 0 (zero)). The titlesec doc references the package titletoc, which apparently can modify the chapter listings in the contents, but not the content header itself. How can I accomplish a consistent layout?


title: Footnote to an item in a description environment

text: It seems like it's not possible to put footnote inside a description list item. For example in the following code first footnote appears at the bottom of the page, but the second - doesn't:               \documentclass[a4paper,12pt]{article}          \begin{document}         Text text text.\footnote{This footnote is working}         \begin{description}             \item[Label\footnote{This footnote is not working}] Some description         \end{description}     \end{document}      Why it's not working this way? And is there any way to put footnote to a list item?


title: Get reference to "current" section

text: I'd like to write a command to get a reference to the "current" section provided (the term is all wrong, but the example will clarify). The idea is something along the lines of:               \getcurrentref{chapter}      or               \getcurrentref{subsubsection}      and so on. A section is considered "current" at a given point if said point is within the "scope" of said section. Example:               \chapter{A}       % point (1)       \section{A.A}         % point (2)       \section{A.B}         % point (3)         \subsection{A.B.A}           % point (4)      the only "living" section at point `(1)` is `chapter`, the only "living" sections at points `(2)` and `(3)` are `chapter` and `section`, and the only "living" sections at point `(4)` are `chapter`, `section` and `subsection`. I hope I could explain myself (it's tricky). PS: in case of trying to get the reference to a non-"living" section, the command should return `??` (this is just to have a standard graceful way of saying _"no such section alive"_ ).


title: Without using minipage, can we resize both input and output boxes of LTXexample?

text: ![alt text](http://i.stack.imgur.com/2QrMg.png)               \documentclass[dvipsnames]{article}     \usepackage{xcolor}     \usepackage[margin=50mm]{geometry}     \usepackage{showexpl}     \usepackage{etoolbox}     \makeatletter     \patchcmd{\SX@codeInput}{xleftmargin=0pt,xrightmargin=0pt}{}       {\typeout{***Successfully patched \protect\SX@codeInput***}}       {\typeout{***ERROR! Failed to patch \protect\SX@codeInput***}}     \makeatother     \lstset{%       literate={ï}{}0              {»}{}0              {¿}{}0,         breaklines=true,         breakindent=0pt,             basicstyle=\ttfamily\scriptsize,         keywordstyle=\color{blue}\sffamily\bfseries,         commentstyle=\color{Green}\itshape,                                          stringstyle=\rmfamily,                                   showstringspaces=false,         backgroundcolor=\color{Yellow!30},         frame=single,         framerule=0.4pt,         rulecolor=\color{red},         framesep=3pt,         xleftmargin=3.4pt,         xrightmargin=3.4pt,         tabsize=2,%         explpreset={pos=b,language={[LaTeX]TeX}}%     }     \begin{document}          \section{with minipage}     \noindent%     \begin{minipage}{0.5\linewidth}     \begin{LTXexample}[pos=b]     \begin{enumerate}     \item $\displaystyle \lim_{x\to 8}\frac{1}{(x-8)^2}=+\;\rotatebox{90}{$8$}$     \item $\displaystyle \lim_{x\to 7}\frac{1}{(x-7)^2}=+\;\rotatebox{90}{$7$}$     \item $\displaystyle \lim_{x\to 6}\frac{1}{(x-6)^2}=+\;\rotatebox{90}{$6$}$     \end{enumerate}     \end{LTXexample}     \end{minipage}               \section{without minipage}     \noindent%     \begin{LTXexample}[width=0.5\linewidth,pos=b]     \begin{enumerate}     \item $\displaystyle \lim_{x\to 8}\frac{1}{(x-8)^2}=+\;\rotatebox{90}{$8$}$     \item $\displaystyle \lim_{x\to 7}\frac{1}{(x-7)^2}=+\;\rotatebox{90}{$7$}$     \item $\displaystyle \lim_{x\to 6}\frac{1}{(x-6)^2}=+\;\rotatebox{90}{$6$}$     \end{enumerate}     \end{LTXexample}               \end{document}


title: How can I add a URL and a source/citation to a glossary entry?

text: Two questions (apologies!), but they're related. I'm using the `glossaries` package, and I want to add external information to my glossary entries. My questions are:   1. How can I add a URL hyperlink to a glossary entry? The `glossaries` documentation (link) has a list of keys to supply relevant information, but it doesn't have a URL key. I'd want it to look something like, "See relevant Wikipedia article here."   2. Most of my glossary entries should be cited. I have a decent-sized BibTeX file I could use, but I don't know how to use it in a glossary entry. Again, there's no key in `\newglossaryentry` to do this.  Thoughts? Thanks!