title: Creating "cylinder with bottom" node shape in TikZ/PGF

text: How to create custom TikZ node "cylinder with bottom", where hidden line in cylinder bottom is shown using dashed line. Something like the following creation, except node center should be in the middle of cylinder (as if it was in the middle of the center of 3D cylinder), not in center of the side -- it looks imbalanced https://www.writelatex.com/1149537sksqzs#/2737083/               \documentclass[tikz]{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes.geometric,calc}          \begin{document}     \begin{tikzpicture}       \node[cylinder,draw=black,thick,aspect=0.7,             minimum height=1.7cm,minimum width=1.5cm,             shape border rotate=90,             cylinder uses custom fill,             cylinder body fill=red!30,             cylinder end  fill=red!10]        (A) {A};       \draw[dashed]         let \p1 = ($ (A.after bottom) - (A.before bottom) $),             \n1 = {0.5*veclen(\x1,\y1)},             \p2 = ($ (A.bottom) - (A.after bottom)!.5!(A.before bottom) $),             \n2 = {veclen(\x2,\y2)}       in         (A.before bottom) arc [start angle=0, end angle=180,         x radius=\n1, y radius=\n2];     \end{tikzpicture}     \end{document}      ![3D cylinder with bottom](http://i.stack.imgur.com/MH0N3.jpg)


title: Delimited arguments and using a macro inside of itself

text: I wanted to play with delimiter sizing without using the `\delimiterfactor`, `-shortfall`, etc. and made the following:               \newdimen\bigdim  \bigdim  = 1.9743ex     \newdimen\Bigdim  \Bigdim  = 2.671ex     \newdimen\biggdim \biggdim = 3.3678ex     \newdimen\Biggdim \Biggdim = 4.0646ex          \def\fence#1#2#3{       \setbox0\hbox{$\displaystyle #3$}       \ifdim\ht0 < .9\bigdim #1\box0 #2\else       \ifdim\ht0 < .9\Bigdim \bigl#1\box0\bigr#2\else       \ifdim\ht0 < .9\biggdim \Bigl#1\box0\Bigr#2\else       \ifdim\ht0 < .9\Biggdim \biggl#1\box0\biggr#2\else       \ifdim\ht0 < .9\Biggdim \Biggl#1\box0\Biggr#2\else       \left#1\box0\right#2       \fi\fi\fi\fi\fi}          \def\args(#1){\fence(){#1}}          $$       \args(bar\args(baz))     $$          \bye      (before you push that comment-button, I know there should be `\mathsurround=0pt` and such in there, I just wanted to keep this simple) but this results in an error saying the argument of `\args` has an extra `}`. I thought it would have something to do with macro argument delimiters, so made a quick test:               \def\foo(#1){(#1)}     \foo(bar\foo(baz))     \bye      but that seemed to work just fine. Now I don't know what else could be the issue. Note that if there isn't an `\args` inside of `\args`, it works.


title: Using txfonts with Polish characters breaks tables

text: ## Restated Problem and a Solution The use of a times font using the package `txfonts` will cause tables to be improperly displayed (see below for an image) if a character such as ę,ą or a different character with an ogonek is used. This has something to do with the procedure involved not being local, that is, having unwanted side effects elsewhere. An effective way of keeping whatever is done local is by enclosing it in brackets `{ę}`. This can be generally invoked for any mention of the character in question by mapping `ę` to `{ę}`, `a` to `{ą}` and so on in the preamble by the following:               \DeclareUnicodeCharacter {281}{{ę}} % 281 is the decimal utf-8 code of ę     ...      This will solve the problem for the whole document _A more general solution still that fixes the error introduced in the source file of`txfonts` is described below under the heading WORKAROUND. However, if you do not want to fiddle with the way the package is called (possibly because it is called in a stylesheet you do not want to change) redefining the characters is a good solution_ ## Initial question I am typesetting a multilingual document with `pdflatex` (MikTeX, all packages up to date). I need to use Times font, and, for the time being, I cannot switch to LuaLatex or XeLatex since I am in the final phase of typesetting a book with a class provided by my publisher and I would need to adjust my code in order to use these above. Using Polish characters with `txfonts` causes the tables to crash:               \documentclass{article}      \usepackage{txfonts}     %\usepackage{mathptmx}     \usepackage[polish, english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}            \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}}     \newcommand{\pl}{\selectlanguage{polish}\fontencoding{T1}}     \begin{document}     \textbf{A minimal example using a times font}     As soon as I enter the Polish character \pl ę  \ee the tables crash      (the lines of the table get printed onto each other).     \begin{table}\begin{center}\begin{tabular}{|l||l|l|}     \hline     type&n    &rel        \\     \hline     \hline     One line in the table &260& many  \\     Another line in the table      &792&49  \\     A third line in the table       &288&1  \\     \hline     \end{tabular}\end{center}\caption{A test table.}\end{table}     \end{document}      The alternative package `mathptmx` does not cause this problem; however, it does not provide the Greek characters I need. This is demonstrated in the following minimal example:               \documentclass{article}      %\usepackage{mathptmx}     \usepackage{txfontsb}     \usepackage[polutonikogreek,polish, english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage[LGR,T1]{fontenc}            \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}}     \newcommand{\grrk}{\selectlanguage{polutonikogreek}\fontencoding{LGR}}     \begin{document}     \textbf{A minimal example using a times font}     I need to  print polytonic Greek (and other special characters) using a      times font (e.g. \grrk ἐᾶν \textbf{ἐᾶν})! \ee       I use the \emph{txfonts} (or   \emph{txfontsb}) package,     the alternative \emph{mathptmx} cannot find the metric files (``Couldn't find `grtm.cfg''').      \end{document}      How can I use `txfonts` and still prevent the tables from crashing? I have also tried out `txfontsb`! Update: I see now the has nothing to do with Polish, it's the diacritic in ę (the _ogonek_ ) that causes the problem. The same problem appears in the following code with an ogonek on an m:                   \documentclass{article}          \usepackage{txfonts}         \usepackage[T1]{fontenc}                \begin{document}         text with ogonek:        \k{m}           \begin{table}\begin{center}\begin{tabular}{|l||l|l|}         \hline         type&n    &rel        \\         \hline         \hline         One line in the table &260& many  \\         Another line &792&49  \\         A third line in the table       &288&1  \\         \hline         \end{tabular}\end{center}\caption{A test table.}\end{table}         \end{document}      If `\k{m}` is enclosed in brackets `{\k{m}}` the tables work fine. So it has something to do with locality and the way `txfonts` apply the ogonek.


title: How to count number of lines in PDF document?

text: I'm using the `lineno` package to print line numbers (each page starts with number one) in the draft of my document: `\usepackage[switch*, pagewise]{lineno}` Is there a way to read out the number of lines in the whole document (or even per chapter) from one of the aux files? I do only want to count the "real" text lines, not the headers and footers, so a sum of all the linenumbers would be quite useful. (Even if also floats are counted as one line each.)


title: Vertically center text across two rows

text: I'm using the "calc2latex" macro for OpenOffice Calc to easily create tables. However it doesn't always work perfectly. In this case, I created the following table, but the texts in the two multirows of the fifth column aren't vertically aligned. Do you have an idea how to fix that?               \documentclass{article}     \usepackage{multirow}           \begin{document}          \begin{table}[htbp]     \caption{}     \begin{tabular}{|c|c|c|c|c|c|}     \hline     \textbf{111} & \textbf{222} & \textbf{333} & \textbf{444} & \textbf{555} & \textbf{666} \\ \hline      &  &  &  &  &  \\ \hline     aaa & bbb & ccc & ddd & \multicolumn{ 1}{c|}{eee} & fff \\ \cline{ 1- 4}\cline{ 6- 6}     aaa & bbb & ccc & ddd & \multicolumn{ 1}{c|}{} & fff \\ \hline &  &  &  & &  \\ \hline     aaa & bbb & ccc & ddd & \multicolumn{ 1}{c|}{eee} & fff \\ \cline{ 1- 4}\cline{ 6- 6}     aaa & bbb & ccc & ddd & \multicolumn{ 1}{c|}{} & fff \\ \hline     \end{tabular}     \label{}     \end{table}          \end{document}


title: TikZ: How to extract part of a path for later usage

text: I want to know if there is a way to extract some part of a named path and use this part later on for e.g. stroking. In my example, I want to stroke the line in the middle (the path named mitte) from the picture's left side to the beginning of the text (intersection named (A)) and from the end of the text (intersection named (E)) to the picture's right side. It's important that nothing is drawn behind the text. ![picture with part of path not to be drawn](http://i.stack.imgur.com/uAua3.png) In the code I included two lines of pseudo code to show what I would like to do.               \documentclass[tikz, border=5mm]{standalone}     \usepackage[T1]{fontenc}     \usetikzlibrary{decorations.text,intersections,calc}          \begin{document}     \Huge \bfseries     \catcode`\|12     \begin{tikzpicture}[decoration={text along path, text={Blablablablablabla}, text align={left indent=10.0mm}}]       \draw[rounded corners] (9.0,2.25) -- (11.5,2.25) .. controls (13.0,2.25) and (13.0,4.25) .. (20.5,4.25);       \draw[name path=mitte, rounded corners] (9.0,1.25) -- (11.5,1.25) .. controls (13.0,1.25) and (13.0,3.25) .. (20.5,3.25);       \draw[rounded corners] (9.0,0.25) -- (11.5,0.25) .. controls (13.0,0.25) and (13.0,2.25) .. (20.5,2.25);       \draw[decorate, above=6mm] (11.5,0.25) .. controls (13.0,0.25) and (13.0,2.25) .. (20.5,2.25);       \draw[name path=anfang] (12.1,4.5) -- (12.1, 0.0);       \draw[name path=ende] (19.6,4.5) -- (19.6, 0.0);       \path[name intersections={of=mitte and anfang, by=A}];       \path[name intersections={of=mitte and ende, by=E}];       %--> \draw[along path=mitte] from beginning to (A);       %--> \draw[along path=mitte] from (E) to end;     \end{tikzpicture}     \end{document}      Any suggestions?


title: Moving a label along the path

text: Friends, consider the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{automata,positioning}          \begin{document}          \pagestyle{empty}          \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto,/tikz/initial text=]         \node[state,initial] (q_0) {$q_0$};        \node[state] (q_2) [above of=q_0] {$q_2$};        \node[state] (q_1) [left of=q_2] {$q_1$};        \node[state] (q_3) [right of=q_2] {$q_3$};        \node[state] (q_5) [right of=q_0] {$q_5$};        \node[state] (q_4) [left of=q_0] {$q_4$};           \node[state] (q_7) [below of=q_0] {$q_7$};        \node[state] (q_6) [left of=q_7] {$q_6$};        \node[state] (q_8) [right of=q_7] {$q_8$};             \path[->,every node/.style={font=\scriptsize}]         (q_0) edge [bend left=15] node {$a$} (q_2)         (q_2) edge [bend left=15] node {$b$} (q_0)         (q_0) edge [bend left=15] node {$c$} (q_5)         (q_5) edge [bend left=15] node {$d$} (q_0)         (q_0) edge [bend left=15] node {$e$} (q_7)         (q_7) edge [bend left=15] node {$f$} (q_0)         (q_0) edge [bend left=15] node {$g$} (q_4)         (q_4) edge [bend left=15] node {$h$} (q_0)         (q_0) edge [bend left=15] node {$i$} (q_1)         (q_1) edge [bend left=15] node {$j$} (q_0)         (q_0) edge [bend left=15] node {$k$} (q_3)         (q_3) edge [bend left=15] node {$l$} (q_0)         (q_0) edge [bend left=15] node {$m$} (q_8)         (q_8) edge [bend left=15] node {$n$} (q_0)         (q_0) edge [bend left=15] node {$o$} (q_6)         (q_6) edge [bend left=15] node {$p$} (q_0);       \end{tikzpicture}          \end{document}      which gives us the following output: ![Automaton 1](http://i.stack.imgur.com/Rh6wW.png) So far, so good (believe me, there are worse drawings). I was wondering if it's possible to move the labels to an arbitrary position along the path, that is: ![Path](http://i.stack.imgur.com/9PmDz.png) The workaround I found was to draw a path without a label and then `\draw` the texts in the proper absolute positions. I was trying to achieve something like this: ![Automaton 2](http://i.stack.imgur.com/wdw3o.png) I'm a TikZ newbie, so bear with me. I'm sure there are better approaches than the one I used. Any ideas? `:-)`


title: Curious effect with \newsavebox

text: The following code fails with the error               ! LaTeX Error: Command \mybox already defined.                    Or name \end... illegal, see p.192 of the manual.      despite the fact that `\mybox` has been relaxed.               \documentclass{minimal}     %     \newcommand{\repeatstuff}[1]{%     \newsavebox\mybox     \sbox\mybox{\ensuremath{\displaystyle #1}}     \usebox{\mybox}\usebox{\mybox}     \let\mybox\relax     }     %     \begin{document}     \[     \repeatstuff{\gamma} \repeatstuff{\alpha}     \]     \[     \repeatstuff{\gamma} \repeatstuff{\alpha}     \]     \end{document}      The problem only arises in the second equation, despite the fact that the first equation contains two instances of `\repeatstuff`. Can someone please explain this behaviour?


title: Removing the italicized parts from an APA bibliography

text: This journal guidelines requires that > References should follow the APA style, but without any use of italic type In the apa6 package some parts of the references are italicized. I'm wondering, is there a _simple_ way to change that? Thanks,


title: What is the RPN operator defined in PSTricks to convert an infix expression to the postfix one?

text: The following code does not compile as I failed to convert the abscissa from infix to postfix.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot}          % defining an RPN operator that converts Infix Cartesian to Postfix Polar     \pstVerb{/ICtoPP {tx@AlgToPs begin AlgToPs end exch cvx /x ED cvx /y ED y x RadtoDeg PtoC} def }               \begin{document}     \def\Infix#1{(2^(#1/10))}% needs outer parentheses (...)     \begin{pspicture}[showgrid](-3,-3)(3,3)       \psplot[algebraic,polarplot]{2 Pi mul neg}{2 Pi mul}{\Infix{x}}        \qdisk(! (3*Pi/2) \Infix{(3*Pi/2)} ICtoPP){2pt}     \end{pspicture}     \end{document}


title: Indent LaTeX code NOT in an environment using latexindent

text: I really like how `latexindent` does a good job indenting most parts of my code in a document. However, there are a few instances where `latexindent` doesn't do what I want it to do. These instances generally involve codes that I'd like to be indented, but are not wrapped within an environment/braces/brackets. So they end up being ignored due to lack of "identifiers", so to speak. The following examples illustrate my problem. In the first two, stuff in `<...>` are **not** indented by `latexindent`. In the third one, the content of the matrix as a whole will be indented (since they are wrapped by `{}`), but `&` and `\\` are not necessarily aligned (but they would be if this were in an `array` environment).   * LaTeX conditional statements              \if       <...>     \else       <...>     \fi        * TikZ path that spans several lines. For example, `latexindent` doesn't produce the following indentation:               \path        <some complicated operations>     ;        * Alignment of `&` and `\\` in TikZ `\matrix` command:              \matrix[matrix of nodes]{       looooong cell & looooong cell \\       short cell    & short cell    \\     };      So my question is: Is there a way to configure the `.yaml` file to deal with the above issues.


title: newenvironment using pgfplotstable

text: I want to have a `newenvironment` body as an inline input argument for `pgfplotstable`. Is it possible to do this without using braces in the body itself?               \documentclass{article}     \usepackage{pgfplotstable}          \newenvironment{customtabular}     {     \pgfplotstabletypeset[         col sep=tab,         row sep=\\,         string type,         ]     }     {}          \begin{document}          \begin{customtabular}     {foo    bar\\} %tab here     \end{customtabular}          \end{document}


title: Shortcuts for code in latex

text: I am tired of writing `\frac{\partial something}{\partial something_else}`. Can I automate it by defining some sort of shortcut to it, so that when I write `\p(x)(y)` it will transform to `\frac{\partial x}{\partial y}`?


title: Page Bordering with an image?

text: I want a custom border for my document. I was thinking of doing something like this, creating a border with a graphics tool(only the outer frame) and then placing it in the beginning of the document, so it cover the entire page as a border. When I type something now, would it be inside the frame or outside? I need help in creating my own borders for the page.


title: Proper way to refer to references in natbib?

text: I'm using the `natbib`package for managing my references in my latex document. Is it correct to refer to a reference in the following way:               A survey can be found in Ref.~\citep{Radke:2005ug}      Which is typeset as: A survey can be found in Ref. (Radke et al, 2005) Since my bibliography is not numbered I'm not sure if this is the correct way to do it. Or should I avoid the passive voice altogether?


title: How do I change "References" title in APA6?

text: I've a document that I have to write in spanish, therefore I've to change the title of "References" section to "Referencias I've used:               \renewcommand{\refname}{Referencias}     \renewcommand{\bibname}{Referencias}     \renewcommand{\mspart}{Referencias}      But none of them change it,               \renewcommand{\mspart}{Referencias}      Change the title to "ReferenciasReferences". How can I change this title? (I am using BibTeX.)


title: Compilation error with LuaLaTeX (luaotfload- database.lua)

text: This file does not compile after updating TeXLive 2013 :                \RequirePackage{ifluatex}      \documentclass[12pt]{standalone}      \ifluatex       \usepackage[no-math]{fontspec}      \usepackage[urw-garamond,uppercase=upright,greeklowercase=upright]{mathdesign}      \usepackage{garamondx}      \usepackage[frenchb]{babel}      \else      \usepackage[urw-garamond,uppercase=upright,greeklowercase=upright]{mathdesign}      \usepackage{garamondx}      \usepackage{pstricks-add}      \usepackage{mathrsfs}     \fi          \usepackage{auto-pst-pdf}     \begin{document}     \psset{xunit=1cm,yunit=1cm,algebraic=true,arrowscale=1.2}     \begin{pspicture}(-2,-3)(5,3)     \psaxes[linewidth=1pt,Dx=1,Dy=1,labels=none,ticksize=-0pt 0pt]{->}(0,0)(-2,-3)(5,3)     \psdots[dotstyle=*](-1,0)     \psdots[dotstyle=*](3,0)          \begin{psclip}     {\psframe[linestyle=none](-2,-3)(5,3)}     {\psplot[linewidth=1pt,plotpoints=2000]{-2}{4}{(1/2)*(x+1)*(x-3)}}%     \end{psclip}     \uput[dl](-1,0){$x_1$}     \uput[dr](3,0){$x_2$}     \uput[d](4.8,0){$x$}     \uput[l](0,2.8){$y$}     \uput[dl](0,0){$0$}     \uput[ur](-1.8,2){$\mathscr{P}$}      \end{pspicture}      \end{document}           ! LuaTeX error ...texmf-dist/tex/luatex/luaotfload/luaotfload-   database.lua:2121:       attempt to call upvalue 'utf8length' (a nil value).      <to be read again>       relax       l.100 \fontencoding\encodingdefault\selectfont


title: Compatibility with chessboard and xskak

text: When I try to use these pachages in my latex document (that has other packages as well) it throws me an error; do you know if I can solve this compatibility issues at all? A minimal working example follows (of course...):               \documentclass[10pt,a4paper]{article}          \usepackage[T1]{fontenc}     \usepackage[bitstream-charter]{mathdesign}     \usepackage{subfig}     \usepackage[latin1]{inputenc}                           % Input encoding     \usepackage{amsmath}                                    % Math     \usepackage{empheq}     \usepackage{tensor}     \usepackage{xcolor}     \usepackage[tikz]{bclogo}          \usetikzlibrary{backgrounds}     \usepackage{tkz-graph}     \renewcommand*{\EdgeLineWidth}{0.15pt}          \usepackage{chessboard}     \storechessboardstyle{6x6}{maxfield=d6}          % or xskak          \begin{document}          Tiny          \end{document}


title: How to set subfig options independently from caption options

text: My aim is to set the font style for **caption** labels as small caps and for **sub-caption** labels as normal. But apparently the option `sc` of the package `caption` also trickles down into sub-captions.. Please consider the following MWE               \documentclass[a4paper,12pt]{article}          \usepackage[labelfont=sc]{caption}     \usepackage[font={rm,md,up},margin=10pt,singlelinecheck=false]{subfig}          \begin{document}          \begin{figure*}       \caption{Subfigures}     \subfloat[Subfigure 1]     {     {     somepicture     }     }     \subfloat[Subfigure 2]     {     {     somepicture     }     }     \end{figure}                    \end{document}      Which outputs ![enter image description here](http://i.stack.imgur.com/7GoM2.png) where both (a) and (b) are in small caps.


title: Cannot find where I made a mistake

text: \documentclass{article}          \usepackage[T1]{fontenc}          \usepackage{amsmath}          \begin{document}          \newcommand{\tab}{\hspace*{2em}}          \center{\huge{\emph{Calcul théorique de la propulsion éléctromagnetique de     l'aimant}}}          \null\null\null          \raggedright{\LARGE Constantes ``modifiables''}          \null          {\emph Rayon des spires}\tab \tab \tab \tab \textbf{D}          {\emph Nombre de spire}\tab \tab \tab \tab \textbf{N}          {\emph Tension du générateur}\tab \tab \tab \textbf{$\mu$}          {\emph Capacité du condensateur}\tab \tab \textbf{C}          {\emph Arètes du tore}\tab \tab \tab \tab \tab \textbf{L}          {\emph Masse du tore}\tab \tab \tab \tab \tab \textbf{m}          \null          {\LARGE Variables}          \null          {\emph Vitesse de tore}\tab \tab \tab \tab \tab \textbf{v(t)}          {\emph Tension du condensateur}\tab \tab \tab \textbf{u(t)}          {\emph Intensité}\tab \tab \tab \tab \tab \tab \textbf{i(t)}          {\emph Champ magnétique}\tab \tab \tab \tab \textbf{$\vec{B}$}          {\emph Potentiel vecteur}\tab \tab \tab \tab \tab \textbf{$\vec{A}$}          {\emph Densité de courant dans le tore}\tab \tab \textbf{$\vec{j}$}          \null          {\LARGE Equations}          \null          {\fbox{\textbf{$m\frac{dv}{dt}=-mg+\iiint_{tore-en-mouvement}(\vec{j}\times\vec{B})\cdot\vec{e_z}d\tau$}}}          \null          \null          {\textbf{$i=-C\frac{du}{dt}$}}          \null          \null          {\textbf{$u=Ri+\iint_{N-spires}\vec{B}\cdot d\vec{S}$}}          \null          \null          {\textbf{$\vec{j}=\gamma(\vec{v}\times\vec{B}-\frac{\partial     \vec{A}}{\partial t})$}}          \null          \null          {\textbf{$\vec{A}=\frac{\mu_0}{4\pi}\iiint_{tore-en-mouvement}\frac{\vec{j}}{PM}\cdot     d\tau + \frac{\mu_0 Ni}{4\pi}\int\frac{d\vec{r}}{PM}$}}          \null          \null          {\textbf{$\vec{B}=rot\vec{A}$}}          \end{document}      I have tested the individual lines at: http://www.sciweavers.org/free-online-latex-equation-editor They are giving the desired results. However the entire code compiled together gives the following error on TeXlipse:               Emergency stop. \end{document} (followed by: )      Can't figure out the mistake I have made. Sorry I've just started off with LATEX hence my way of writing the document may seem to be bizarre.


title: Horizontal alignment of margin notes in nested enumitem list

text: I would like to be able to 'tag' certain list items in an `enumitem` list with a mark in the left margin. I would like the marks in the left margin to be horizontally aligned with respect to each other, and vertically aligned with respect to the tagged list item. I've tried Werner's answer here but it doesn't seem to work with `enumitem`. ![enter image description here](http://i.stack.imgur.com/6mcbd.png) In the image above (the frames are just for visualization) I would like the tags for the sub-items to be horizontally aligned with the tags for the main list items and the alignment should not change depending on the width of the the sub-item labels (i.e. (w) is wider than (c) but the tags should remain aligned). I don't imagine that my code or approach are very good, so a completely different way of doing this would be fine. An explanation would be nice as well as I have spent a fair amount of time trying to figure this out myself but it's beyond me.               \documentclass{article}     \usepackage{enumitem}     \usepackage{xparse}     \usepackage{showframe}          \newlist{mylist}{enumerate}{1}          \setlist[mylist]{         %align=left,      align=parleft,         label = {\protect\mytag\arabic*.},     }          \newlist{mysublist}{enumerate}{1}     \setlist[mysublist]{      %align=left,         align=parleft,         label={\protect\mytag{(\alph*)}},     }          \NewDocumentCommand{\myitem}{ o }{         \IfNoValueTF{#1}             {\let\mytag\relax\item}             {\tagit{#1}\item}     }          \makeatletter     \NewDocumentCommand{\tagit}{ m }{         \def\mytag{\leavevmode\llap{\fbox{\makebox[\marginparwidth][c]{#1}}}\hspace{\@totalleftmargin}}     }     \makeatother          \begin{document}          \begin{mylist}         \myitem First Item.         \myitem[x] Second Item.             \begin{mysublist}                 \myitem[x] First Sub-Item.                 \myitem Second Sub-Item.             \end{mysublist}         \myitem[x] Third Item.         \myitem Fourth Item.     \end{mylist}          \end{document}


title: table with blank caption but table label

text: If I don't put a caption on my table, I don't get the "Table 2.2" label underneath it. If I add a blank caption, I get "Table 2.2:". How do I get rid of the ":"? I am using `memoir` and `threeparttable`. Within the `threeparttable`, I am using a `tabular`, but I don't think that matters.


title: Lines Numbers with mdframed

text: Am looking for an elegant way to include line numbers in my `mdframed` documents. Unfortunately, the following produces a 85 page docuement with `\linenumbers` (either _before_ or _after_ the `\begin{mdframed}`. Document is only 4 pages without the `\linenumbers`. ## References:   * Am ok with a post processing solution, but was not able to get Jake's solution from Add page and line numbers to a pdf to work. And yes I know that saying "it doesn't work" does not help to figure out what the problem is -- might post a separate question, but thought that using `lineno` package would be easier. ## Code:               \documentclass{article}     \usepackage{lineno}     \usepackage{mdframed}     \usepackage{tikz}     \usepackage{lipsum}     \begin{document}     \begin{mdframed}\linenumbers         \lipsum         \begin{tikzpicture}             \draw [fill=yellow!25] (0,0) rectangle (3,4);         \end{tikzpicture}         \lipsum     \end{mdframed}     \end{document}


title: How to add paragraph line number in right margin

text: In passages, the line numbers are given on the right side of the paragraph. Like this: ![enter image description here](http://i.stack.imgur.com/TTkhD.png) How could this be implemented in LaTeX?


title: Is it possible to force LaTex to put fonts into the pdf output?

text: Sometimes when I make a document with Hungarian letters, the pdf is perfect on the screen, but my printer cannot handle the Hungarian letters. I don't know where is the source of the problem (in the pdf file, with the driver of my printer, or with the installed fonts) but I would like to ask the following: is it possible to force LaTeX compiler to put the fonts into the pdf file?


title: Tool to handle "precompiling the preamble" automatically

text: On Windows there is a nice little tool called latexdaemon that can handle "precompiling the preamble" (and thus speeding up compilation) automatically. It doesn't require any additional setup: one can simply run `latexdaemon --ini=pdflatex mytexfile.tex`, and from there on it'll recompile the tex file each time it changes with the custom format file optimization (which I don't completely understand). It also provides a console where one can force recompilation manually, or force full recompilation (without the custom format file). I am looking for similar tools that run on OS X. On this site I have found several questions about precompiling the preamble, but none of them automate the process: they all require splitting the preamble into a separate file manually. I am looking for a tool that will spare me this trouble, and will let me start working on a new tex file with a single command, without the necessity to manually create multiple files and set up things _each time_. **Update:** I tried to figure out how latexdaemon works, and the relevant bit for generating the format file is here. Looking at that code makes it clear that it's way above my level of (very basic) LaTeX knowledge though. I think the main question which I haven't been able to solve on my own was how to generate and use a format file without splitting off the preamble into a separate file.


title: AUCTeX – new commands recognized as such

text: Many non-base commands, quite used today, are not recognized as such by AUCTeX. This is understandable as not everyone will use them, and not every time. I'm thinking about commands like `\enquote{...}`. Is there a way of making recognizing them—that is, of introducing new commands into the AUCTeX database? I've tried following these instructions to introduce new commands, but they don't work for me.


title: Link to bibliography in the ToC fails

text: > **Possible Duplicate:**   >  Incorrect bookmarks and page number in table of contents I've created a table of contents with links to each chapter and section. I use this package               \usepackage[colorlinks=true,urlcolor=red,citecolor=blue,linkcolor=blue]{hyperref}      and I use this for bibliography               \addcontentsline{toc}{chapter}{\bibname}     \begin{thebibliography}{99}     \bibitem{} bla bla bla     \end{thebibliography}      If I click on the item in table of contents, the bibliography's link is wrong: it is linked to the previous page. How I can fix this problem?


title: Bibiliography included in ToC but wrong hyperref linking

text: I included my bibliography in the tableofcontents as follows (documentclass report):               \clearpage     \addcontentsline{toc}{chapter}{References}     \phantomsection     \bibliographystyle{IEEEtran}     \bibliography{report}      This generates the correct output, with the correct page number (41) in the toc. However, clicking References will take me to the page preceding (40) the page with the references (41). How can I modify this to take me straight to page 41? Thanks!


title: How can we draw a Hannukah Menorah with decorations, using TikZ?

text: In the spirit of the festive season and How can we draw a Christmas tree with decorations, using TikZ?, I would like to use TikZ for drawing a Hannukah Menorah. There are many different styles of Menorah including ![enter image description here](http://i.stack.imgur.com/WpltA.gif) and ![enter image description here](http://i.stack.imgur.com/SYdQ8.jpg) amongst others. Of course only the most greedy person would also ask for the number of candles to be an option within the TikZ code and it would be plain lunacy for one to expect the flames to actually flicker. Update. Here is another colourful example. ![enter image description here](http://i.stack.imgur.com/kMXVA.jpg)


title: \centering just a table instead of all text

text: I'm having problems with this my code because once I added the tables all the text following them was no longer justified. here is the code               \begin{document}       \chapter{1}     \centering\large     \begin{tabular}{>{$}l<{$}|r|r|r}     \toprule     \multicolumn{4}{c}{Tabella Circuito 1}\\     \midrule     & Teorico& Reale& Spice\\     \midrule     R_\mathrm{B}&\SI{2.2}{\mega\ohm}&\SI{2.24}{\mega\ohm}&\SI{2.2}{\mega\ohm}\\     R_\mathrm{C}&\SI{5.6}{\kilo\ohm}&\SI{5.56}{\kilo\ohm}&\SI{5.6}{\kilo\ohm}\\     \end{tabular}     \chapter{2}     blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      \end{document}      I tried removing                \centering\large      or just to move it after \begin{tabular}, or to put it after mid/top rule,but i got multiple errors. I also tried to add {} before               \centering       and after                \end{tabular}       and this time the text was justified but the table was no longer centered. How can this problem be solved


title: Modify Algorithm name in French

text: This is my code:               \usepackage[section]{algorithm}       \usepackage{algorithmic}      \begin{document}     \makeatletter\renewcommand{\ALG@name}{Algorithme}     \renewcommand{\listalgorithmname}{Liste des \ALG@name s} \makeatother     \begin{algorithm}[H]       \caption{My-algo}       \begin{algorithmic}[1]         \Debut         \LState instruction1         \Fin       \end{algorithmic}     \end{algorithm}     \end{document}      With this code I have Algorithme instead Algorithm. Please I ask if you have an idea, I have one algorithm that I'd like to change Algorithme --> Pseudo Algorithme ? How can I do it please? Just one algorithm, not all of them.


title: gnuplot, ubuntu 12.10, kile, texlive2012

text: How can I download and install gnuplot for ubuntu 12.10? I can't find it on the software center or in repositories. Maybe I am not calling it right.


title: How can I repeat the header but not the caption with longtable?

text: I am trying to set up a `longtable` where the header is repeated on every new page but the caption only appears once at the top of the page. The table is defined as follows:               \begin{longtable}{|l|l|l|}     \caption{the table caption} \label{tab:11swpkg}\\     \hline     \rowcolor{gray}     HeaderCol1 & HeaderCol2 & HeaderCol3\endhead         \hline\hline     Item11 & Item12 & Item13 \\     \hline     Item21 & Item22 & Item23 \\     \hline     Item31 & Item32 & Item33 \\     \hline     \end{longtable}      This nearly works because the header is indeed repeated after a page break but so is the caption. How can I get rid of the caption after a page break?


title: Define a colour enumeration

text: The following code is very interesting as it adds an asterisk beside an enumeration.               \documentclass{article}     \usepackage{enumitem}      %%%%%%%%%%%%%%%%%%%%%%%%     %% CODE thanks to egreg      %%%%%%%%%%%%%%%%%%%%%%%     \setlist[enumerate]{before=\setupmodenumerate}          \newif\ifmoditem     \newcommand{\setupmodenumerate}{%       \global\moditemfalse       \let\origmakelabel\makelabel       \def\moditem##1{\global\moditemtrue\def\mesymbol{##1}\item}%       \def\makelabel##1{%         \origmakelabel{\ifmoditem\llap{\mesymbol\enspace}\fi##1}%         \global\moditemfalse}%     }          \begin{document}     \begin{enumerate}     \moditem{*} test     \end{enumerate}     \end{document}      This yields: ![enter image description here](http://i.stack.imgur.com/EcyHD.png) My question is: "How can I create a similar modded item, say `\citem`, that colours the enumeration?" A similar code or using the idea as above would be great. Note that the colouring (what the user wishes to be) must be to selective items and not the entire set of enumeration. * * * UPDATE: So looking at the links above I thought I had the solution as the code;               \newcommand{\myitem}{\refstepcounter{enumi}\item[\color{red}{\theenumi.}]}      sheds some light, but it does not respect enumeration within enumeration. Hmmmmmm??? ![enter image description here](http://i.stack.imgur.com/WMKyj.png) This is given by               \begin{enumerate}     \myitem     \moditem{*} test     \myitem     \myitem Test test test         \begin{enumerate}         \item         \item          \item          \myitem          \end{enumerate}     \end{enumerate}


title: Print a message at the END of the log file

text: I there a way to print messages to the log file so that they appear in the last few line of the log file? Here is a MWE for my first attempt at doing this:               \documentclass{amsart}     \AtEndDocument{\typeout{*****************************************^^J     Here is my nice message^^J     *****************************************^^J}}     \begin{document}     Some important stuff.     \end{document}      At first sight this appears to do what I want because in this case the end of the logfile looks like:               ...     ***********************************************************************     Here is my nice message     ***********************************************************************          [1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./MWE.aux) )</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/c     mr10.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr     7.pfb>     Output written on MWE.pdf (1 page, 20364 bytes).     Transcript written on MWE.log.      Unfortunately, this is deceptive because the guff between my message and the `Output written...` line is quite short here. In a real use-case the end of the log file looks more like:               ...     *****************************************     Here is my nice message     *****************************************          [7] (./realexample.aux) )     (see the transcript file for additional information){/usr/local/texlive/2014/te     xmf-dist/fonts/enc/dvips/base/8r.enc}{/usr/local/texlive/2014/texmf-dist/fonts/     enc/dvips/tex-gyre/q-ec.enc}</usr/local/texlive/2014/texmf-dist/fonts/type1/pub     lic/tex-gyre/qhvr.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/ne     wtx/rntxmi.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/txfonts/r     txb.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/txfonts/rtxmi.pf     b></usr/local/texlive/2014/texmf-dist/fonts/type1/public/txfonts/rtxr.pfb></usr     /local/texlive/2014/texmf-dist/fonts/type1/public/txfonts/rtxsc.pfb></usr/local     /texlive/2014/texmf-dist/fonts/type1/public/newtx/txex-bar.pfb></usr/local/texl     ive/2014/texmf-dist/fonts/type1/public/txfonts/txex.pfb></usr/local/texlive/201     4/texmf-dist/fonts/type1/public/txfonts/txsy.pfb></usr/local/texlive/2014/texmf     -dist/fonts/type1/public/txfonts/txsyb.pfb></usr/local/texlive/2014/texmf-dist/     fonts/type1/public/txfonts/txsyc.pfb></usr/local/texlive/2014/texmf-dist/fonts/     type1/urw/times/utmb8a.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/urw/     times/utmr8a.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/urw/times/utmr     i8a.pfb>     Output written on realexample.pdf (7 pages, 124830 bytes).     SyncTeX written on realexample.synctex.gz.     Transcript written on realexample.log.      That is, in real-life there is a lot of space between my message and the end of the log file. It turns out that Heiko Oberdiek has written the atveryend package that provides various commands like: `\AtVeryEndDocument`, `AtEndAfterFileList`, `\AtVeryVeryEnd`. Unfortunately, all of these commands give exactly the same output in the log file as using `\AtEndDocument`. Similarly, the etoolbox command `\AfterEndDocument` doesn't help either... Does anyone know of a way to do this or if this is impossible? Given Heiko's package I suspect this can't be done. Finally, perhaps I should say that the reason that I want to do this is to remind myself (and others) of the list of options to an undocumented in-house class...


title: Is there an incompatibility between `eulervm` and `fourier` packages?

text: In the following minimal document               \documentclass{article}     \usepackage{fourier,eulervm}     \begin{document}     $1 < 2$     \end{document}      the output is missing the `<` symbol. On the other hand, if I load the two font packages in the opposite order               \documentclass{article}     \usepackage{eulervm,fourier}     \begin{document}     $1 < 2$     \end{document}      the output is as it should. **Why?** I could not find this documented anywhere. **Added** A less minimal example would also show that whereas in the latter case the `<` does appear, the math fonts being used are not the Euler fonts. Hence I do think that the two are incompatible. I'm starting to think that perhaps incompatibility between different font packages is the norm and not the exception?


title: Online discussion about general questions for scientific writing?

text: I'm searching a discussion group for asking questions about how layout, typography and etc. for scientific writing Especially concerning:   * Ph.D. thesis    * in engineering / materials science    * conventions for scientific writing / Ph.D. thesis German language and/or at German universities e. g.   * how to present / structure content?    * how to typeset mathematical symbols correctly?    * how to create good images / graphs / diagrams which are also unambigous and readable in greyscale?    * check list for the final version   etc ... _(accidentally those are topics which are extremely interesting for me at the moment ;-))_ -> Can anyone recommend me online discussion groups covering those topics?  I think here is not the place for such questions, as it more about "how to do it with (La)TeX" and not how to do it in general.


title: How to debug if Knitr quits unexpectedly when composing tikz figure

text: I have a `.Rnw` file that `Knitr` used to compile perfectly fine until my backend dataset changed. Probably then the size of the graph changed also. For reasons I don't understand `knitr` now stops abruptly compiling and `LaTex` kicks in compiling an uncompleted `.tex` produced by Knitr. I guess this is what happens since I see in my Activity Monitor (ESS buffer) the logs from `knitr` being replaced by the logs from `LaTex`. Following I paste the last part of the log, with the last few lines of the normal `knitr` process, which loaded an R script to produce a ggplot, being replace by `LaTex`...                 grid.arrange(gp2,gp1)             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      ##------ Thu Oct 10 18:39:42 2013 ------##          \documentclass[nohyper]{tufte-handout}          \nonstopmode          \usepackage{tikz}          ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.26 \usepackage                     {tikz}      Here is how much of TeX's memory you used:      15456 strings out of 493311      278701 string characters out of 6137850      379859 words of memory out of 5000000      18583 multiletter control sequences out of 15000+600000      4403 words of font info for 15 fonts, out of 8000000 for 9000      957 hyphenation exceptions out of 8191      56i,0n,92p,470b,151s stack positions out of 5000i,500n,10000p,200000b,80000s          !  ==> Fatal error occurred, no output PDF file produced!               Quitting from lines 1-81 (my/path/time_series.R)      Quitting from lines 84-NA (my/path/time_series.R)      Error in getMetricsFromLatex(TeXMetrics) (from #91) :      TeX was unable to calculate metrics for the following string     or character:              Label          Common reasons for failure include:       * The string contains a character which is special to LaTeX unless         escaped properly, such as % or $.       * The string makes use of LaTeX commands provided by a package and         the tikzDevice was not told to load the package.          The contents of the LaTeX log of the aborted run have been printed above,     it may contain additional details as to why the metric calculation failed.      I can't figure out what the problem is since I don't see any clue in the `knitr` log. Clearly what stops the compilation of `.Rnw` is a `tikzDevice` figure produced with these lines:               \begin{figure*}       \centering     <<child-time_series, child='figure/time_series.R',dev='tikz',fig.width=6,fig.height=3,out.width='.95\\textwidth',message=FALSE,echo=FALSE>>=     @                \label{fig:TimeSeries}     \end{figure*}      I guess that the key is the following `LaTex` error (also above)               Error in getMetricsFromLatex(TeXMetrics) (from #91) :          TeX was unable to calculate metrics for the following string         or character:                  Label      `Label` is the label of my plot.


title: Best way to typeset micrometers?

text: It seems to be generally well accepted that the correct way to typeset a value with units is to separate the number from the units by a space, and write the units in an upright font. For example,               One hellameter is \( 1.0\times10^{27} \) m.      The symbol for 'micro-' is the Greek letter mu, but if you compile               At the telecom wavelength of \( 1.55\ \mu \)m ...      then the spacing will be correct and the 'm' will be upright, but the 'mu' won't be. > How do you produce an upright lowercase mu? More generally, how do you make > any Greek letter appear upright?


title: What is the recommended way to assign a value to a variable and retrieve it for later use?

text: What is the recommended way to define a variable inside a document and retrieve its value later? I've googled several different solutions, usually about ~10 lines long. I was wondering, that there must be a shorter way of doing something like this (Pseudocode):               \setvalue(VARIABLE1){foo foo bar}      and later in the document               $\getvalue(VARIABLE1)$.      I've also seen solutions that include defining a new command, but what if that command is already used inside another package? That doesn't really seem like an independent solution.


title: Include table as a subfigure

text: Is it possible to include "table code" as a sub-figure (instead of an image) using the package `subfig`? If so, how?


title: How to get Wikipedia W from Linux Libertine?

text: How can I get the Wikipedia-looking crossing-w from Linux Libertine font? They talk about it on their homepage and in the wikipedia article, but I can't find an example of how to actually produce it. Fyi I'm using `xetex` with `fontspec`.


title: Easylist failure with utf8 characters

text: When trying to compile the following example document:               \documentclass[a4paper,12pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[swedish]{babel}     \usepackage[ampersand]{easylist}          \begin{document}          \begin{easylist}     & Förklara, diskutera och analysera trådlösa protokoll och nätvärkstyper.     & Förklara, diskutera och analysera prestandaproblem så som:     \end{easylist}          \end{document}      I get the following output:               pdflatex BG-1.tex     This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)          entering extended mode     (./BG-1.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, pinyin, 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/size12.clo))     (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty     (/usr/share/texmf-texlive/tex/latex/base/utf8.def     (/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)     (/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)     (/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))     (/var/lib/texmf/tex/generic/babel/babel.sty     (/usr/share/texmf-texlive/tex/generic/babel/swedish.ldf     (/usr/share/texmf-texlive/tex/generic/babel/babel.def)))     (/usr/share/texmf-texlive/tex/latex/easylist/easylist.sty) (./BG-1.aux)     ! Missing number, treated as zero.     <to be read again>                         \c@a      l.11 & Förklara, diskutera och analysera trå                                                   dlösa protokoll och nätvärk...      Seems like it tries to interpret 'å' as a number. Is there a way to solve this?


title: How to put a table at the head of a page of a two column academic paper?

text: I have a huge table that needs to be in the paper and I want to fit it at the top of a page. How can I align in such a way, at the top of the page?


title: Getting natbib to follow IEEE numeric citation format

text: I'm wondering if anyone can suggest a better way to tweak `natbib` to generate numeric references that follow IEEE's citation reference guide and style manual. Specifically, IEEE wants each of a group of citations in separate brackets (like this: **[1], [2]** ), but `natbib` seems to insist on grouping them (like so: **[1, 2]** ). The `cite` package handles this correctly, and I know the `natbib` IEEE templates are "not recommended" for IEEE submission, but I like being able to pull the name of the author(s) into the text sometimes, which `natbib` lets me do with `\citet`. Using `natbib` also lets me switch to author-year citations, if I end up having to change publications, without going through and changing every citation, which is also nice. I can get close in `natbib` by setting the separator punctuation to `], [` (using `\bibpunct`), but `natbib` appears to add a hard-coded space after the separator (looks like this: **[1], [ 2]** (note the space in front of the 2; it looks more prominent in my typeset copy)). My solution at this point is to override one of the macros in `natbib.sty` in my own document, to remove the space (which can be put onto the end of the separator string if it's needed):               \makeatletter     \def\NAT@def@citea{\def\@citea{\NAT@separator}}% removed \NAT@space     \makeatother      Is there a more elegant and robust solution, with either `cite` or `natbib`? Or should I start looking into `biblatex` (which I've just found out about) for future work?


title: italic acronym in \acro{PCB}{Printed Circuit Board}

text: > **Possible Duplicate:**   >  How to escape ampersand in \acro command? Hello i would like to insert something like this `\acro{\textit{PCB}}{Printed Circuit Board}` inside acronym environment, but i get an error. Is there any way in printing a **single italic acronym**?


title: Fit flowchart into one page

text: I am trying to create a flowchart using TikZ and i have few difficulties...   1. My flowchart doesn't fit into one A4 page   2. The text **Yes** \ **No** is on the line and not on the side of it.   3. The size of decision (diamond) is to big and the text is not spread over the all surface of the diamond. Is there a way to split the flowchart into to pages? My wish is to fit it into one page... **EDIT** I was able to place **Yes** \ **No** on top of the line or an the side of it using **_above_** , **_right_** , **_links_** instead of **_decision answer_**. Should i keep using matrix structure? i saw i could also give **_below of..._**. What is better in my case? Here is my flowchart:               \documentclass[ pdftex,         a4paper,         oneside,         10pt,         openright,         titlepage,         fleqn,         1headlines,         headinclude,         footinclude,         bibliography=totoc,         version=first     ]{scrbook}          \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}          \selectlanguage{english}     \usepackage{a4wide}     \parindent0pt          \usepackage[fleqn]{amsmath}     \usepackage[fleqn,intlimits]{empheq}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{dsfont}     \usepackage{mathtools}          %     %  9. Paket um Textteile drehen zu kï¿œnnen.     %     \usepackage[landscape,a4paper]{geometry}     \usepackage{graphicx}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows,matrix,decorations.pathreplacing,     shapes.geometric}          % Allowing formulas to be spreded over few pages     \allowdisplaybreaks[4]          \begin{document}     \tikzset{decision/.style={diamond, draw, fill=blue!20, text badly centered,  node distance=2.5cm, inner sep=0pt,align=center}}     \tikzset{block/.style={drectangle, draw, fill=blue!20, text centered, rounded corners, align=center}}     \tikzset{line/.style={draw, very thick, color=black!50, -latex'}}     \tikzset{start/.style={shape=circle,draw,minimum size=1.2cm,draw=blue!80,fill=blue!20,text centered, align=center}}     \tikzset{decision answer/.style={near start,color=black}}     \tikzset{datashape/.style={ trapezium, draw, trapezium left angle=60, trapezium right angle=-60}}          \begin{tikzpicture}[scale=2, auto, every node/.style={ midway, auto,     font=\footnotesize, anchor=center, >=stealth}]           \matrix [column sep=5mm,row sep=7mm]       {     % row 1     &&\node [start] (start){start};&&\\     % row 2     %&&\node [datashape,block,text width=3cm] (buff){Add new measurement, $y_k$ to %buffer};&&\\     &&\node [block,text width=3cm] (measurement){Add new measurement, \\ $y_k$ to     buffer};&&\\     % row 3     &     \node [decision] (reg status){Is \\ regression status \\ equel True};&%     \node [block]    (update goodness){update \\ Goodness of Fit \\ $\chi_\mathrm{red}^2$};&%     \node [decision] (line pass){Is \\ $\left|\delta \right| < \left( 3.5\cdot %         \sigma_{\varepsilon} +                 \sigma_{\hat{\beta}_k}\right)$\\ and \\ $\chi_\mathrm{red}^2 <               1.6$};&     \node [block]    (update beta_k){Update estimated values \\ $\chi_\mathrm{red}^2$, %                 $\hat{\beta}_k^i$ and $\operatorname{Cov}$};&\\     % row 4     &&&     \node [block,text width=3cm] (Reg False){Set regression status = %           False};     &\\     % row 5     &&&     \node [block,text width=3cm] (create replica){Create a replica of             current regression solution \\ $i \to i+1$};&     \node [block,text width=3cm] (Update replica){Clean buffer, \\ Update: \\     $\hat{\beta}_k^{i+1}$, $\operatorname{Cov}_k^{i+1}$ and $\chi_\mathrm{red}^2$}; \\     % row 6     \node [decision] (i > 0 1){Is \\ number of regression > 0 \\ $(i > 0)$};&     \node [block]    (update estimate){update estimated values \\ $^{i+1}\chi_\mathrm{red}^2$, %                 $\hat{\beta}_k^{i+1}$ and $\operatorname{Cov}_k^{i+1}$};&     &&\\     % row 7     &&     \node [decision] (sol val){Is \\ new Solution valid \\ $R^2 < 0.01$};&     \node [block]    (new estimation){Compute new estimation \\ $\hat{\beta}_k$, $R^2$ and %              $\operatorname{Cov}_k^{i+1}$};&     \node [decision] (if 2){Is \\ regression solution falsh \\ and \\ sufficent               number of measurements};&\\     % row 8     &&     \node [block]    (set reg true){Set regression status \\ to true};&     &\\     % row 9     &     \node [decision] (i>0 2){Is \\ \# of regression solutions > 0 \\ $(i> 0)$};&     \node [decision] (uniqueness){Does \\ the two samples, \\ $\hat{\beta}_k^i$,     $\hat{\beta}_k^n$ \\ independent};&     \node [block]    (new to i+1){Copy new solution \\ estimation in $i+1$ \\ solution               estimation};&\\     % row 10     &&&     \node [block]    (i to i+1){Delete solution $i$ \\ and instead place \\ solution               $i+1$ as $i$};&\\     % row 11     &&\node [start] (end){End};&&\\       };          \begin{scope}[every path/.style=line]       \path [line] (start)-- (measurement);       \path [line] (measurement) -| (reg status);       \path [line] (reg status) -- node[decision answer] {Yes} (update goodness);       \path [line] (update goodness) -- (line pass);       \path [line] (line pass) -- node[decision answer] {Yes} (update beta_k);       \path [line] (line pass) -- node[decision answer] {No}  (Reg False);       \path [line] (Reg False) -- (create replica);     \end{scope}     \end{tikzpicture}          \end{document}


title: Getting rid of blank page after figure and naming figures

text: The following is my code:               \documentclass[twoside, a4paper, 11pt]{article}     \title{}     \author{}     \usepackage{ragged2e}     \usepackage{booktabs,tabularx}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{verbatim}     \usepackage{amsmath, amssymb}     \usepackage{natbib}     %\def\pgfsysdriver{pgfsys-dvipdfm.def}     \usepackage{tikz}     \usepackage{enumerate}     \usetikzlibrary{matrix, arrows}     \usepackage{graphicx}     \usepackage{listings}     \usepackage{color}     %\usepackage{hyperref}     \usepackage{float}     \usepackage{multicol}     \usepackage{booktabs}     \usepackage{lscape}     \usepackage{cases}     \usepackage{multirow}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{lscape}     \usepackage{caption}     \usepackage[update,prepend]{epstopdf}     %\usepackage{mathpazo}     %\usepackage{eulervm}     %\usepackage{iwona}     \usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}          \setlength{\textwidth}{6.5in}     \setlength{\oddsidemargin}{0in}     \setlength{\evensidemargin}{0in}     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}          \linespread{1.5}          \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}          \raggedbottom          \everymath{\displaystyle}           \newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}          \renewcommand\textfraction{.1}          \begin{document}               \newpage     \section{Figures}                    \begin{figure}       \centering       \caption{\textbf{Bootstrapped Probability of Default for Banks} \\  \fontsize{10pt}{12pt}\selectfont This graph plots the mean and median bootstrapped probabilities of default ($PoD$) of 28 Euro Area (EA) banks. The banks used can be found in Table~\ref{tab:bankabbreviation}. All reported $PoD$s are annualized 5-year cumulative CDS-derived $PoD$s. All CDS contracts are Euro denominated. Period: 01/01/2008 to 28/02/2013.}       \label{bootstrapbank}          \vspace{1 cm}          \caption{Panel A}     \includegraphics[scale=0.8]{1.pdf}          \vspace{2 cm}          \caption{Panel B}     \includegraphics[scale=0.8]{2.pdf}          \end{figure}          \bibliographystyle{apa-good}     \bibliography{bibliography}     \end{document}      * * * The output is this: ![enter image description here](http://i.stack.imgur.com/ghtNg.jpg) ![enter image description here](http://i.stack.imgur.com/egBpL.jpg) I have two problems: 1) For some reason, the above code produces a blank page with title **A Figures** and then produces the figures on the next page, how do I make the figure start straight after the title **A Figures**? 2) For my figure how do I get rid of Figure 2 and Figure 3 next to the Panel A and Panel B? I would like to just name both graphs "Panel A" and "Panel B" Thanks!


title: Lost formating on last page

text: Recently I have updated coding to Bilingual dictionary in Latex (the minimal example published at the link) as part of Showcase of beautiful typography done in TeX & friends by adding declention and conjugation tables of irregular nouns, adjectives, pronouns and verbs. With those changes of code I have lost formating of the last page formated with dictstyle, namely fancyhead and top rule and rule that splits two column page. Even with the files without tables the formating on the last page is lost.


title: How to draw a QOC diagram maybe with TikZ

text: I would like to draw the following diagram in LaTeX. The image is: ![enter image description here](http://i.stack.imgur.com/EGNYj.png) I was looking at the TikZ package and it seems to be what I need. However, I need to automate somehow the task of drawing this diagram, because I need to draw hundreds of them. I was wondering if it is possible to create a LaTeX command, probably based on TikZ, doing something like:               \QOC{{How wide?}, {Narrow, Wide}, {Screen compactness, Ease of hiting with a mouse}, 2, {1}, {2}}      which corresponds to the first diagram of the figure. The first group contains the questions, the second one the options, the third one criteria, the first number (`2`) is the selected option, the group of numbers `{1}` indicates the positive assessments for option 1 (i.e., it has a positive assessment to the criterion number ONE) and the second group of numbers contains the positive assessments for the second option, which in this case is `2`, i.e., the second criteria. For the question How to display?, the command would be:               \QOC{{How to display?}, {Permanent, Appearing}, {Low user effort, Screen compactness, Continuous feedback to user}, 2, {1,3}, {2}}


title: How to expand source files when installing packages using MiKTeX

text: When installing packages using the MiKTeX Package Manager, there is usually a file placed in `texmf\source` whose name ends in `-src.tar.bz2` (or sometimes `-src.cab`). These compressed files generally contain source code for the installed packages, but there are some packages where the compressed file contains additional documentation, sample files, or test files that are not installed anywhere else. Is there some way to set the Package Manager to expand these files automatically? For example, the `ut-thesis` package's `README` file refers to a `ut-thesis.tex` template file, but the template file is nowhere to be found other than compressed inside `texmf\source\ut-thesis- src.tar.bz2`, and there is no instruction directing the user to look there. Similarly, the `hyperref` package contains lots of test files in `texmf\source\hyperref-src.tar.bz2` that are not installed anywhere else. It would be nice if there were some way to ensure that these files are all expanded whenever a package is installed. Is this possible?


title: Follow-up question: include entire command with emacs/auctex

text: This is a Follow-Up question to auctex does not parse own sty file I can use C-c C-m to use mytext from this MWE               \documentclass{article}     \newcommand{\mytext}{This is a simple text.}     \begin{document}     \mytext{}     \end{document}      However, I'm looking for a possibility to include the entire command on the current position, for instance to change something. Is it possible, without copy and paste from the command definition, but with a hotkey (I'm looking for such a solution for commands from style files)?


title: Avoiding pdfbookmark with amsbook

text: I am using the `amsbook` class. I want a subsection with a title different from the ToC entry as in the example below               \documentclass{amsbook}     \usepackage{hyperref}          \DeclareRobustCommand{\SkipTocEntry}[5]{} %modifica l'indice          \begin{document}          \tableofcontents          \addtocontents{toc}{\SkipTocEntry}     \subsection{title}     \addcontentsline{toc}{subsection}{\tocsubsection{}{\thesubsection}{toc entry}}          \end{document}      However, this produces two pdfbookmarks, since both `\subsection` and `\addcontentsline` produce a pdfbookmark. What can I do to get rid of one of them?


title: Problem Bibtex Texshop no references

text: I'm having a problem getting references in my document using Texshop. I searched for multiple solutions and already tried them but they didn't help me. At the end of my .tex file, I wrote the following lines:               \nocite{coronafe,finite}     \bibliographystyle{plain}     \bibliography{CoronaProject}     \end{document}      My .bib file looks like this:               @book{finite,     Author = {Anastasis C. Polycarpou},     Date-Added = {2013-03-29 15:55:05 +0100},     Date-Modified = {2013-03-29 16:00:04 +0100},     Publisher = {Morgan and Claypool},     Title = {Introduction to the Finite Element Method in Electromagnetics},     Year = {2006}}     @techreport{coronafe,     Author = {Ioannis D. Koufogiannis and Eden Sorolla and Juan R.Mosig and Michael Mattes},     Date-Added = {2013-03-29 15:45:59 +0100},     Date-Modified = {2013-03-29 22:48:31 +0100},     Institution = {Ecole Polytechnique F{\'e}d{\'e}rale de Lausanne},     Title = {Analyzing Corona Breakdown with a Finite Element-based Electromagnetic Solver},     Year = {2012}}     @phdthesis{these,     Author = {SOROLLA ROSARIO Francisco Ed{\'e}n},     Date-Modified = {2013-03-29 15:08:40 +0100},     School = {ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE},     Title = {Contribution to modeling multipactor and corona discharges in high power electromagnetic fields},     Year = {2012}}      I quoted the thesis a few times in my document using the \cite{} command. At this point, I compiled my .tex file first in latex, then in bibtex, then using latex twice. Despite this procedure I still get wonderful (?) instead of correct references to my documents.


title: Change color of institute in the footer of a Latex presentation

text: I have a presentation that uses the theme `Dresden` with color theme `beaver`. Everything works fine, except for the name of the institute in the footer of the slides, which appears white on a very light grey background, making it basically impossible to read.   1. How can I change its color?   2. Why isn't the color changed automatically like, for example, the color of the author name in the footer?


title: Beamer: problem showing description item

text: I'm trying to put a `description` environment with some data in my presentation. But `pdflatex` compiles it without showing the part in `[]` of `\item`. Minimal reproducing example:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usetheme{Bergen}     \usefonttheme[onlymath]{serif}     \usecolortheme{orchid}     \begin{document}     \begin{frame}         \begin{description}             \item[equ] lorem             \item[$p = -\left(1 + \left(\dfrac{k}{k_g}\right)^2\right)$] ipsum.         \end{description}     \end{frame}     \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/MB81h.png) I've found that this is a problem with the color theme: `orchid`. But I have no idea how to fix it.


title: Auto include specific part of source files

text: I'm creating a lot of code to our small projects (in computer science), and finding myself copy/pasting my comments into the document. Would it be possible to make a reference point in the code file to include that specific part to a `\listinputlisting` paragraph? * * * # example.java                    // #Identifyer1#     // This is our class [...]      // #Identifyer1#     public class Anyclass{               // #Identifyer2#     // the constructor is here...     // #Identifyer2#            public Anyclass(){         }     }


title: Using handwriting font in proofs

text: I read several posts but still could not figure out how to do the following. I want to use handwriting font, say, Augie font, within proof environment. I installed the package **emerald**. Then I read someone suggested to define a new environment like               \newenvironment{myfont}{\fontfamily{<familyname>}\selectfont}{\par}      I could not make it work since I could not find its font family in the first place. Could any one provide me with a concrete example, please? Thank you! Here is the codes I have at the moment.               \documentclass[english]{scrartcl}          \usepackage{bm}     \usepackage{graphics}     \usepackage{relsize}     \usepackage{color}     \usepackage{bigints}     \usepackage{graphicx}     \DeclareGraphicsExtensions{.eps, .pdf, .jpeg, .png}     \usepackage{epstopdf}     \usepackage{float}     \usepackage{hyperref}     \usepackage{environ}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{amsmath}     \setkomafont{disposition}{\normalfont}     \usepackage{graphicx}          \usepackage{emerald}          \usepackage{geometry}      \geometry{      a4paper,      left=20mm,      right=20mm,      top=10mm,      bottom=10mm      }          \usepackage{listings}     \usepackage{color}     \setcounter{tocdepth}{1}     \usepackage{tocloft}     \definecolor{blue}{rgb}{0,0,1}     \definecolor{red}{rgb}{1,0,0}          \newenvironment{myfont}{\fontfamily{<familyname>}\selectfont}{\par}          \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}     \newcommand*\ruleline[1]{\par\noindent\raisebox{.8ex}{\makebox[\linewidth]{\hrulefill\hspace{1ex}\raisebox{-.8ex}{#1}\hspace{1ex}\hrulefill}}}          \begin{document}          \section{Question One}          \begin{proof}     \begin{myfont}       Some text in the new font.     \end{myfont}     \end{proof}          \end{document}


title: \sections without numbers, but in ToC and in running heads

text: I'm doing a book-class doc which is a collection of problems offered through some years. So each chapter is a year, and it always has two sections: Problems, and Solutions. And I need them to NOT be numbered, BUT added to ToC (without number), and be present in the running head on the odd page. `secnumdepth` doesn't do it, because subsections (the problems) _are_ numbered I've tried using `\renewcommand{\thesection}{}` but this only makes the numbers disappear, while the space that was between the section number and the header is preserved, so the section titles appear off in the ToC. The same space is present in the running head, and additionally, a full stop appears before the space in the running head. I've also tried               \newcommand\problems{\section*{\addcontentsline{toc}{section}{Problems}Problems}      which makes for an ok-looking ToC, but doesn't give me the running heads. I understand that packages like `titlesec` and `titletoc` might help me, but I'd rather make it as standalone-ish as possible.


title: eemeir package fails to use correct gender by default

text: If there's a better package to handle this than `eemeir`, I haven't found it yet. I looked at `he-she`, but I don't really want to alternate, I just want to be able to quickly change the gender of pronouns for different people in a text (for example, a student, a parent, etc.). `eemeir`'s documentation seems to indicate that defining a new word pair will make the neutral form of the word a valid command with correct gender assignment, but it appears to use the default gender instead.               \documentclass{article}     \usepackage[female]{eemeir}          \begin{document}          \newwordpair{\child}{son}{daughter}     \male[child]          Why does \verb|\child| return \child (using the default gender),     but \verb|\child[child]| returns \child[child] (using the assigned gender)?          \end{document}      Any ideas? Or suggestions on adapting `he-she` to my use?


title: why pdf file is empty? Latex generates no output, no error

text: one of the auto-generated latex code, for some reason, generates no output in pdf. I made a MWE that has this latex code in it, all inside `\[....\]`, and then run pdflatex but the file is empty. Please do not complain about the latex code itself, or why I am trying to typeset this, I am just trying to find out why pdflatex and latex produces no output at all for this input, that is all, and if there something I need to do to make it generate output, even it is not typesetted right. (this code was generated by Maple latex command, fyi) I put the .tex file and the log file and the pdf file in this folder               >pdflatex no_output.tex     This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014)      (preloaded format=pdflatex)      restricted \write18 enabled.     entering extended mode     (./no_output.tex     LaTeX2e <2014/05/01>     ....     pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.p     Output written on no_output.pdf (1 page, 111713 bytes).     Transcript written on no_output.log.      But the pdf file is empty. I looked at the log file, but do not see something obvious, but I am no expert of what it is saying there really.


title: LaTeX generated website with TikZ diagrams

text: I am trying to generate my static website with LaTeX to avoid tedious/verbose HTML and underpowered markdown languages. I know of `latex2html` and `htlatex`/TeX4ht for generating documents in the HTML format from LaTeX but neither are working with TikZ. Does anyone here know how to get the TikZ diagrams working? Any tips on using LaTeX for static websites is also much appreciated. **EDIT:** I now generate SVGs from the TikZ diagrams by inserting this line into my latex source:               \def\pgfsysdriver{pgfsys-tex4ht.def}      I like the idea of using SVG because of the resolution independence but I worry about the browser support.


title: Url references in bibliography

text: I am using TexMaker. I would like to know how to include web site references in the .bib file. I am using bibliography style , alpha. How does the website reference appear in the bibliography


title: Abstract takes its own column, pushes first section to second column

text: I am using the `acm_proc_article-sp` class to prepare a conference paper. It should not exceed the length of 4 pages. Unfortunately, the abstract will push the first chapter to the second column, even if there's enough space for a few paragraphs to fit in the first. This essentially pushes my references to the fifth page. You can see the output here: ![enter image description here](http://i.stack.imgur.com/DPQ5a.png) All I'm using is:               \documentclass{acm_proc_article-sp}     \usepackage{url}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{color}     \usepackage{textcomp}     \usepackage{booktabs}     \begin{document}          \title{Title Title Yada Yada}     \numberofauthors{1}     \author{     \and     \alignauthor     Author \\            \affaddr{Institute}\\            \affaddr{University}     }     \maketitle     \begin{abstract}     \lipsum[1]     \end{abstract}     \category{H.1.2}{User/Machine Systems}{Human Factors}     \section{Introduction}         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.              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.              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.              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.              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.     \end{document}      Question: **How can I force the Introduction to begin in the left column?** If there are any changes to be made in the `acm_proc_article-sp` class, please suggest them, as I'm a beginner in TeX and therefore have no idea how to change the classes' behavior. It's okay if I modify the class file, the conference isn't too strict when it comes to that. It seems to work though if the text in the introduction has fewer paragraph breaks. So maybe the problem is just telling LaTeX to break up the introduction if necessary. **Update:** Using the `sig-alternate.cls` produces similar problems: ![enter image description here](http://i.stack.imgur.com/h8TSZ.png)


title: Fatter arrowheads in xy-pic

text: I am formatting some diagrams using arrows in xy-pic. The "standard" arrow head that xy-pic produces with the command `\ar` is quite different (much smaller, thinner) than that produced by using the command `\to` (outside of the xy-pic environment). I like the fatter arrowhead much better. How can I tell xy-pic that this is what I want?? The difference in output can be seen by compiling the following code:               \documentclass{article}     \usepackage{amsmath}     \usepackage[all]{xy}          \begin{document}          \[X\to Y\]          \[     \xymatrix{X\ar[r] & Y}     \]          \end{document}


title: Can anyone identify what package was used to create these simple math diagrams

text: Put simply: does anyone know what package is used to create the following diagrams from Stephen Boyd's book on Convex Optimization (p.24): ![enter image description here](http://i.stack.imgur.com/tEwYK.png)


title: poster latex problem

text: I am preparing a poster for my first conference. I am using a template from internet. I need to modify it and adapt the `\headerbox` for my work but i got a bad result. I use th example in graphtrack and I changed just the logos and the list of mails. When I run the poster.tex, I get the second logo in the bad place and also the mail of author did not appear. How Can I resize the \headerbox to get right result ![enter image description here](http://i.stack.imgur.com/itqex.png) file.tex               \documentclass[landscape,final,a0paper,fontscale=0.285]{baposter}     \usepackage{calc}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{relsize}     \usepackage{multirow}     \usepackage{rotating}     \usepackage{bm}     \usepackage{url}          \usepackage{graphicx}     \usepackage{multicol}          %\usepackage{times}     %\usepackage{helvet}     %\usepackage{bookman}     \usepackage{palatino}          \newcommand{\captionfont}{\footnotesize}          \graphicspath{{images/}{../images/}}     \usetikzlibrary{calc}          \newcommand{\SET}[1]  {\ensuremath{\mathcal{#1}}}     \newcommand{\MAT}[1]  {\ensuremath{\boldsymbol{#1}}}     \newcommand{\VEC}[1]  {\ensuremath{\boldsymbol{#1}}}     \newcommand{\Video}{\SET{V}}     \newcommand{\video}{\VEC{f}}     \newcommand{\track}{x}     \newcommand{\Track}{\SET T}     \newcommand{\LMs}{\SET L}     \newcommand{\lm}{l}     \newcommand{\PosE}{\SET P}     \newcommand{\posE}{\VEC p}     \newcommand{\negE}{\VEC n}     \newcommand{\NegE}{\SET N}     \newcommand{\Occluded}{\SET O}     \newcommand{\occluded}{o}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%% Some math symbols used in the text     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Multicol Settings     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setlength{\columnsep}{1.5em}     \setlength{\columnseprule}{0mm}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Save space in lists. Use this after the opening of the list     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newcommand{\compresslist}{%     \setlength{\itemsep}{1pt}%     \setlength{\parskip}{0pt}%     \setlength{\parsep}{0pt}%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% Begin of Document     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% Here starts the poster     %%%---------------------------------------------------------------------------     %%% Format it to your taste with the options     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Define some colors          %\definecolor{lightblue}{cmyk}{0.83,0.24,0,0.12}     \definecolor{lightblue}{rgb}{0.145,0.6666,1}          % Draw a video     \newlength{\FSZ}     \newcommand{\drawvideo}[3]{% [0 0.25 0.5 0.75 1 1.25 1.5]        \noindent\pgfmathsetlength{\FSZ}{\linewidth/#2}        \begin{tikzpicture}[outer sep=0pt,inner sep=0pt,x=\FSZ,y=\FSZ]        \draw[color=lightblue!50!black] (0,0) node[outer sep=0pt,inner sep=0pt,text width=\linewidth,minimum height=0] (video) {\noindent#3};        \path [fill=lightblue!50!black,line width=0pt]           (video.north west) rectangle ([yshift=\FSZ] video.north east)          \foreach \x in {1,2,...,#2} {           {[rounded corners=0.6] ($(video.north west)+(-0.7,0.8)+(\x,0)$) rectangle +(0.4,-0.6)}         }     ;        \path [fill=lightblue!50!black,line width=0pt]           ([yshift=-1\FSZ] video.south west) rectangle (video.south east)          \foreach \x in {1,2,...,#2} {           {[rounded corners=0.6] ($(video.south west)+(-0.7,-0.2)+(\x,0)$) rectangle +(0.4,-0.6)}         }     ;        \foreach \x in {1,...,#1} {          \draw[color=lightblue!50!black] ([xshift=\x\linewidth/#1] video.north west) -- ([xshift=\x\linewidth/#1] video.south west);        }        \foreach \x in {0,#1} {          \draw[color=lightblue!50!black] ([xshift=\x\linewidth/#1,yshift=1\FSZ] video.north west) -- ([xshift=\x\linewidth/#1,yshift=-1\FSZ] video.south west);        }        \end{tikzpicture}     }          \hyphenation{resolution occlusions}     %%     \begin{poster}%       % Poster Options       {       % Show grid to help with alignment       grid=false,       % Column spacing       colspacing=1em,       % Color style       bgColorOne=white,       bgColorTwo=white,       borderColor=lightblue,       headerColorOne=black,       headerColorTwo=lightblue,       headerFontColor=white,       boxColorOne=white,       boxColorTwo=lightblue,       % Format of textbox       textborder=roundedleft,       % Format of text header       eyecatcher=true,       headerborder=closed,       headerheight=0.1\textheight,     %  textfont=\sc, An example of changing the text font       headershape=roundedright,       headershade=shadelr,       headerfont=\Large\bf\textsc, %Sans Serif       textfont={\setlength{\parindent}{1.5em}},       boxshade=plain,     %  background=shade-tb,       background=plain,       linewidth=2pt       }       % Eye Catcher      {\includegraphics[height=2cm]{images/logolab.jpg}}        % Title       {\bf\textsc{3D reconstruction by fusioning shadow \\ \vspace{.3cm}and silhouette information}\vspace{0.5em}}       % Authors       {\text{\{author1 and author2 \}}}       {\text{\{author1@example.com\}}}        % University logo       {% The makebox allows the title to flow into the logo, this is a hack because of the L shaped logo.         \includegraphics[scale=.35]{images/logo2.jpg}       }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% Now define the boxes that make up the poster     %%%---------------------------------------------------------------------------     %%% Each box has a name and can be placed absolutely or relatively.     %%% The only inconvenience is that you can only specify a relative position      %%% towards an already declared box. So if you have a box attached to the      %%% bottom, one to the top and a third one which should be in between, you      %%% have to specify the top and bottom boxes before you specify the middle      %%% box.     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         %         % A coloured circle useful as a bullet with an adjustably strong filling         \newcommand{\colouredcircle}{%           \tikz{\useasboundingbox (-0.2em,-0.32em) rectangle(0.2em,0.32em); \draw[draw=black,fill=lightblue,line width=0.03em] (0,0) circle(0.18em);}}            \headerbox{Problem}{name=problem,column=0,row=0}{}            \headerbox{Contributions}{name=contribution,column=1,row=0,bottomaligned=problem}{}     \headerbox{Results}{name=results,column=2,span=2,row=0}{}          \headerbox{References}{name=references,column=0,above=bottom}{ }       \headerbox{A Future Direction} { name=questions,column=1,span=2,aligned=references,above=bottom}{     %  \begin{multicols}{2}     %         %  \end{multicols}     %   \vspace{0.3em}       }            \headerbox{Source Code}{name=references,column=3,aligned=references,above=bottom}{ }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \headerbox{Speed}{name=speed,column=2,span=2,row=0,below=results,above=references}{}       \headerbox{Method}{name=method,column=0,below=problem,bottomaligned=speed}{}       \headerbox{Background Model}{name=background model,column=1,below=problem,bottomaligned=speed}{ }          \end{poster}          \end{document}


title: Footnote in environment as parallel (2nd part)

text: I refer to this tread: Footnote in environment as parallel. If I build a little more complex environment to enlarge the text width in two columns quotation, there is a trouble with notes number. Please, consider the following code:               \documentclass[a4paper,12pt,twoside]{report}     \usepackage{fontspec}     \defaultfontfeatures{RawFeature=-clig,Ligatures=TeX,Numbers=OldStyle,Contextuals=NoAlternate}     \setmainfont{EB Garamond}     \newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}     \setmonofont[Scale=MatchLowercase]{Myriad Pro}     \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{italian}     \setotherlanguage[variant=polytonic]{greek}     \newfontfamily\greekfont[Scale=MatchLowercase]{GFS Didot}     \usepackage{microtype}     \usepackage[bindingoffset=1cm,heightrounded]{geometry}     \linespread{1.10}     \raggedbottom          \usepackage{verse}     \setlength{\vleftskip}{15pt}          \usepackage{parallel}     \newlength\leftwidth     \newlength\rightwidth     \newenvironment{verseparallel}[2]     {\begin{Parallel}{0.44\textwidth}{0.54\textwidth}\footnotesize\parindent=0pt     \ParallelLText{\leavevmode #1}\ParallelRText{#2}}     {\end{Parallel}}     \BeforeBeginEnvironment{verseparallel}{\medskip}     \AfterEndEnvironment{verseparallel}{\medskip}          \usepackage[perpage,bottom,hang,stable,norule]{footmisc}     \renewcommand{\hangfootparindent}{2em}     \renewcommand{\hangfootparskip}{3pt}     \renewcommand{\footnotemargin}{0.00001pt}     \renewcommand{\footnotelayout}{\hspace{1em}}          \begin{document}          \chapter{Costellazioni antiche}     La maggior parte delle ottantotto costellazioni è di origine greca. Gli antichi      in esse vedevano delle figure reali e, spesso, le associavano a personaggi      mitologici. Tra le più antiche vi sono quelle dello zodiaco.          \section{Costellazioni dello Zodiaco}     Le dodici costellazioni zodiacali sono quelle che fanno da sfondo al moto del      sole nel corso dell'anno, se parliamo in termini tolemaici, al moto apparente      del sole, se parliamo in termini copernicani. Le possiamo vedere prima      dell'alba, subito dopo il tramonto e in caso di eclissi.          L'Ariete è una delle costellazioni dello zodiaco; si trova tra i Pesci a ovest e      il Toro a est ed è una figura caratteristica dei cieli autunnali boreali. Si      tratta di una costellazione di dimensioni relativamente contenute. Le sue stelle      sono tuttavia abbastanza luminose. L'Ariete si individua con facilità poco a      ovest delle Pleiadi e a nord della grande costellazione della Balena. La      costellazione diventa visibile nel cielo serale alla fine dell'estate boreale      (settembre) e resta visibile per tutto l'autunno e l'inverno, fino al mese di      marzo; dall'emisfero australe invece la sua visibilità è più limitata, anche a      causa dell'incremento delle ore di luce nei mesi compresi fra ottobre e      dicembre, ossia in quei mesi di massima visibilità nel cielo serale\footnote{bla bla bla}.          In astronomia, l'Ariete ha molta importanza poiché ai tempi dei Greci conteneva      il punto cardinale noto come equinozio di primavera, il punto γ. È il punto in      cui vi è l'intersezione tra l'eclittica e l'Equatore e in cui il giorno      dell'equinozio di primavera si formano tre croci come scrive     Dante\footnote{D\textsc{ante}, \emph{Paradiso}, \textsc{i}, 37-42}:          \begin{verse}     Surge ai mortali per diverse foci\\     la lucerna del mondo; ma da quella\\     che quattro cerchi giugne con tre croci,          con miglior corso e con migliore stella\\     esce congiunta, e la mondana cera\\     più a suo modo tempera e suggella.     \end{verse}          Ma l'equinozio di primavera non è fisso, a causa della lenta oscillazione      dell'asse terrestre nota come precessione\footnote{bla bla bla}.          Quando, intorno al 130 a.C., il grande astronomo greco Ipparco definì la      posizione dell'equinozio di primavera, questo punto si trovava a sud della      stella Mesarthim (Gamma dell'Ariete). Fu allora fissato qui l'inizio dello      zodiaco, e quindi l'equinozio di primavera fu comunemente noto come il primo      punto dell'Ariete. A causa della precessione, l'equinozio di primavera si è      spostato di circa 30 gradi dai tempi di Ipparco e attualmente si trova nella      confinante costellazione dei Pesci. Ciò nonostante, esso viene ancora chiamato      il primo punto dell'Ariete\footnote{bla bla bla}.          La costellazione dell'Ariete è per lo più associata al mito del vello d'oro,      ripreso in parte da Apollonio Rodio nella saga delle \emph{Argonautiche}.          Secondo il mito l'Ariete comparve sulla Terra quando il Re Atamante di Beozia si      accinse a sacrificare suo figlio Frisso per allontanare una carestia incombente.      Il re Atamante, infatti, si era unito a Ino, figlia del Re Cadmo della vicina      Tebe. Ino, però aveva in odio i figliastri, Frisso ed Elle, avuti da Atamante      con la prima moglie Negale, e organizzò una cospirazione per farli uccidere.      Cominciò a bruciare il grano per evitare che ci fosse un raccolto. Quando      Atamante chiese aiuto all'Oracolo di Delo, Ino corruppe i messaggeri affinché      ritornassero con la risposta falsa che Frisso doveva essere sacrificato per      salvare il raccolto.          A malincuore, Atamante portò suo figlio in cima al Monte Lafisto, che sovrastava      il suo palazzo a Orcomeno. Era sul punto di sacrificare Frisso a Zeus quando      Nefele intervenne per salvare suo figlio, mandando giù dal cielo un ariete alato      dal vello d'oro. Frisso si arrampicò sul dorso dell'animale, dove fu raggiunto      da sua sorella Elle che temeva per la propria vita. Volarono via in direzione      est verso la Colchide, che si trovava sulla sponda orientale del Mar Nero, sotto      le Montagne del Caucaso. Lungo il percorso Elle non riuscì a mantenere la presa      e cadde nel canale fra l'Europa e l'Asia, i Dardanelli, che in suo ricordo i      Greci chiamarono Ellesponto. Una volta raggiunta la Colchide, Frisso sacrificò      l'ariete a Zeus in segno di gratitudine. Regalò il suo vello d'oro al terribile      Re della Colchide, Eeta, che, in cambio, gli concesse la mano di sua figlia      Calciope.          Dopo la morte di Frisso il suo fantasma ritornò in Grecia per perseguitare suo      cugino Pelia, che si era impadronito del trono di Iolco in Tessaglia. Il vero      successore a quel trono era Giasone. Pelia promise di lasciarglielo se gli      avesse portato dalla Colchide il vello d'oro. Fu questa la sfida che diede il      via all'epico viaggio di Giasone e degli Argonauti.%\footnote{bla bla}          Al suo arrivo in Colchide Giasone chiese al re Eeta di dargli il vello che      pendeva da una quercia in un bosco sacro, custodito da un enorme serpente sempre      sveglio.          \noindent\makebox[\textwidth]{%     \begin{minipage}{1.1\textwidth}     \begin{verseparallel}     {\begin{greek}%     τὸν δ᾽ Ἄργος προσέειπεν ἀμηχανέων κακότητι:\\     ‘Αἰολίδην Φρίξον τιν᾽ ἀφ᾽ Ἑλλάδος Αἶαν ἱκέσθαι\\     ἀτρεκέως δοκέω που ἀκούετε καὶ πάρος αὐτοί,\\     Φρίξον, ὅτις πτολίεθρον ἀνήλυθεν Αἰήταο,\\     κριοῦ ἐπεμβεβαώς, τόν ῥα χρύσειον ἔθηκεν\\     Ἑρμείας: κῶας δὲ καὶ εἰσέτι νῦν κεν ἴδοισθε.\\     τὸν μὲν ἔπειτ᾽ ἔρρεξεν ἑῇς ὑποθημοσύνῃσιν\\     Φυξίῳ ἐκ πάντων Κρονίδῃ Διί. καί μιν ἔδεκτο\end{greek}}     {Vi era già prima noto, credo, che Frisso, nipote di Eolo,\\     venne ad Eete della Grecia; Frisso che giunse alla città di Eete,\\     cavalcando un montone che fu mutato da Ermes in oro,\\     e il vello potete ancora oggi vederlo\\     disteso sui folti rami di una quercia; poi,\\     come il montone stesso chiese,\\     lo sacrificò a Zeus, il figlio di Cronos,\\     nella sua veste di protettore di esuli\footnotemark.}     \end{verseparallel}     \end{minipage}}\footnotetext{A\textsc{pollonio} R\textsc{odio}, \emph{Argonautiche},     \textsc{ii} 1140-1146.}          \end{document}      You'll realize that option `perpage` doesn't seem to work here (on page 3, the only footnote has number 4); on the contrary, if you put a `\footnote` in the third page before the note put "manually" with `\footnotemark` and `\footnotetext`, all works fine. I think there is something wrong or bad working because of minipage...


title: Formatting for dimensional analysis

text: I'd like to typeset a problem solution highlighting dimensional analysis in LaTeX. What is the best way to format the following in LaTeX?                 1.345 g | 0.5 L | 1000 cm^3      ---------|-------|----------- =  0.6725 g        cm^3   |       |   1 L      I could use a table I guess but that seems wrong. A set of `\frac` commands would also work but not give exactly the same visual affect. (It would be really nice to cancel the units in the expression as well). Aside from digging into pstricks is there a better way to do this?


title: When or why should I use %% as opposed to %?

text: I've noticed that many (all?) style and class files have "documentation blocks" with a double comment character at the beginning of the line,               %% like so      instead of the usual style of comments,               % like so      Why is this done? Do some kinds of comments need the `%%` for some preprocessing/automatic documentation generation/etc. - or is it just customary? Should I mix `%%` and `%` in the same file for different uses? (Specifically, an answer to Make your own .sty files suggests single-comment- char comments, which added to my confusion.)


title: Incorrect hypothesis counter

text: The hypotheses counter seems to work incorrectly. All hypotheses are numbered with a 1. What exactly am I doing wrong? I have the following code:               \documentclass[12pt]{article}          \usepackage{amsthm}          \newtheorem{uncertainty}{Hypothesis}     \newtheorem{svo}{Hypothesis}     \newtheorem{uncertaintytype}{Hypothesis}          \begin{document}               \begin{uncertainty}     Predictions are     \end{uncertainty}               Subjects with different social value orientations           \begin{svo}     Subjects       \end{svo}          Depending on          \begin{uncertaintytype}     Subjects predictions      \end{uncertaintytype}               \end{document}      I appreciate every comment!


title: Describing leaves of a tree with an underbrace using pstree/pstricks

text: I'd like to have a discription for some of the leaves. It doesn't need to be an underbace, if somebody has better graphical suggestions... :) Consider this example:               \pstree[levelsep=35pt]{\Tcircle{$\rho$}}       {         \Tf*         \Tf*         \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}         \Tf*         \Tf*         \Tf*         \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}         \Tf*            }      I'm thinking about something like this, which of won't work that way:               \pstree[levelsep=35pt]{\Tcircle{$\rho$}}       {         \underbrace{           \Tf*           \Tf*           \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}           \Tf*         }_{n \mbox{trees}}         \underbrace{           \Tf*           \Tf*           \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}           \Tf*         }_{n \mbox{trees}}       }


title: Using the command window to convert LaTeX to HTML

text: I am trying to convert a LaTeX file to HTML. I have tried to do this by typing `cmd` into the search bar of the START menu. When the black background box comes up, I type in `htlatex filename.tex` where instead of filename I write the name of the file. It then comes up,               I can't find file filename.     Please type another input file name.      I am using MiKTeX and Windows 7.


title: Save counter value inside command?

text: I'm trying to automatically generate commands based on the value of a counter:               \documentclass{article}          \newcounter{count}          \newcommand\generator[1]%     {%       \stepcounter{count}%       \expandafter\def\csname#1\endcsname{\thecount}%     }          \generator{one}     \generator{two}          \begin{document}       \one       \two     \end{document}      the expected output would be "12" instead of "22".


title: Writing a 6-term Exact Sequence

text: I am trying to use the `xymatrix` package to write the following exact sequence               $\xymatrix{     A \ar[r] & B \ar[r] &C \ar[d] & \\       \ar[u]& D \ar[l]& E \ar[l]& F      }$      When I write `\ar[r]` in the second line everything works perfectly; but when I write `\ar[l]` I get an error for some reason... Any idea how to fix it so that the two horizontal arrows in the second line go to the left?


title: Removing bounding box of text node (tikz)

text: When I added some text into my Tikz figure, it also hows the bounding box how can I get rid of it. (I took the example from: TikZ Adding Text) ![](http://i.stack.imgur.com/55lMn.png) Here is what I've got:               \begin{figure}     \begin{tikzpicture}[scale=.8]          \draw (0,1.3) node[below] {$B$} --     (3,1.3) node[below] {$C$} --     (1.5,4.3) node[above] {$A$} -- cycle;     \draw (1.5,4.3) -- (1.5,1.3) node[below] {$D$};     \draw (1.5,1.5) -- (1.7,1.5) -- (1.7,1.3);     \node[draw,text width=3cm] at (4.5,4) {some text spanning three lines with automatic line breaks};          \end{tikzpicture}     \end{figure}