title: Special line breaking problem in my bibliography

text: The following is how my bibliography entry looks:               Lagrange, Joseph-Louis (1773/1775). “Recherchesd’arithmétique”. In: Œvres.Vol.3.     Hildesheim: Georg Olms Verlag, 695–795      The problem is: vertically, my documents ends after the "Vol.", and the 3 is not put on the next line. What can I do against that, I can't seem to figure out how to manually make it break there, since the "Vol." is not something I wrote, but placed automatically. The corresponding `biblatex` entry is               @book{lagrangeoevres,       author = {Joseph-Louis Lagrange},       title = {\OE{}vres},       year = 1973,       publisher = {Georg Olms Verlag},       volume = 3,       address = {Hildesheim}     }          @inbook{lagrange,       author = {Joseph-Louis Lagrange},       title = {Recherches d'arithm\'etique},       year = {1773/1775},       crossref = {lagrangeoevres},       pages = "695-795"     }      Given these two entries in a file called ref.bib, a minimal working example should be the following, hopefully.               \documentclass[11pt,a4paper,bibliography=totoc]{scrartcl}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{mathpazo}     \usepackage{geometry}     \usepackage[backend=biber,style=authoryear,url=false,doi=true,dashed=false,natbib=true]{biblatex}          \geometry{a4paper,vmargin=1.3in,left=1.6in,right=1.3in,includefoot}          \addbibresource{ref.bib}          \renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}     \DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}     \DeclareFieldFormat{pages}{#1}     \setlength\bibitemsep{1.5\itemsep}     \nocite{*}          \begin{document}     \printbibliography     \end{document}


title: How do I draw a little red square to label my right triangle?

text: The sample code:               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw  ( 0 , 0 ) coordinate (A)          -- ( 4 , 0 ) coordinate (C)          -- ( 0 , 3 ) coordinate (B)          -- (0,    0);     \end{tikzpicture}     \end{document}      The figure: ![Right Triangle](http://i.stack.imgur.com/2eo7x.png) I would like to use a box in the lower left angle of the triangle to indicate a right angle.


title: latex draw- mathematical letters and symbols

text: When I am using Linux mint 17 i found this mistake rather not in windows. That is, in this Linux i have put Latex Draw 2.0 it is not giving the mathematical symbols. that is, Suppose i wish to name a corner of a rectangle as $\beta$ it is giving as it in the commands. ![note down the left top corner](http://i.stack.imgur.com/DiVDA.jpg) Kindly help me to do the correction.. Or suggest me some other drawing software like latexDraw which will generate the latex command by its own.. I am adding one more pic for ur assistance... ![my working on latex Draw.. ](http://i.stack.imgur.com/5mOur.png)


title: How to seed \FPseed with a value that is unique for every compilation?

text: How to seed `\FPseed` with a value that is unique for every compilation? Is there a LaTeX macro to get the CPU tick so I can use it to seed?               \documentclass{article}     \usepackage{fp}     \begin{document}     \FPseed\macroinquestiontoseed     \FPrandom\x     % x must produce different result for each compilation     \x%output     \end{document}


title: Empty line does not yield a new paragraph

text: While most people want to want to remove the default "the-empty-line- generating-a-new-paragraph"-function, I myself do not even have it working on my system to begin with. I recently installed the latest MiKTeX distribution and I am able to seamlessly generate my LaTeX PDF-documents (I have Texmaker on my machine but use it scarcely; I much more preferably and frequently use Sublime Text 2 together the LaTeXTools package instead). I tried compiling the follow piece of code:                   \documentclass{article}         \begin{document}         Hello this is the first paragraph.              Hello again, this now is the second paragraph.         \end{document}      I was hoping that the generated PDF would have two different paragraphs but what I instead found is simply a "Hello again, this now is the second paragraph." landing right below the first sentence, as a line break. See picture: ![enter image description here](http://i.stack.imgur.com/sZo7t.png) Why does this happen? I thought it was supposed to be a default setting.


title: Bouncing ball over time

text: I have this clumsy code to plot the height of a bouncing ball over time. Is there a possibility for optimization? Perhaps writing the functions directly with the tikz math library? Also at the moment negative time input can't be handled. And how can macros with more then one input argument call lua code?               \documentclass[tikz]{standalone}     \usepackage{fontspec}     \usepackage{pgfplots}     \usepackage{luatextra}          \begin{luacode}       function height(h0, idx)         return h0*(3/4)^(math.abs(idx))       end       function time(h0, idx)         t = math.sqrt(2*height(h0, 0)/9.81)         for i=1,idx,1 do           t = t+2*math.sqrt(2*height(h0, i)/9.81)         end         return t       end        function offset(h0, idx)         o = 0         if idx > 0 then           o = time(h0, idx-1)+(time(h0, idx)-time(h0, idx-1))/2         end         return o       end     \end{luacode}          \makeatletter     \pgfmathdeclarefunction{luaheight}{1}{%       \begingroup         \pgfkeys{/pgf/fpu,/pgf/fpu/output format=sci}%         \pgfmathparse{#1}%         \edef\pgfmathresult{\directlua{tex.print("" .. height(10,\pgfmathresult))}}%         \pgfmathsmuggle\pgfmathresult%       \endgroup     }%     \pgfmathdeclarefunction{luatime}{1}{%       \begingroup         \pgfkeys{/pgf/fpu,/pgf/fpu/output format=sci}%         \pgfmathparse{#1}%         \edef\pgfmathresult{\directlua{tex.print("" .. time(10,\pgfmathresult))}}%         \pgfmathsmuggle\pgfmathresult%       \endgroup     }%     \pgfmathdeclarefunction{luaoffset}{1}{%       \begingroup         \pgfkeys{/pgf/fpu,/pgf/fpu/output format=sci}%         \pgfmathparse{#1}%         \edef\pgfmathresult{\directlua{tex.print("" .. offset(10,\pgfmathresult))}}%         \pgfmathsmuggle\pgfmathresult%       \endgroup     }%     \makeatother          \begin{document}     \begin{tikzpicture}     \begin{axis}       \addplot[domain=0:luatime(0)] {luaheight(0)-9.81/2*x^2};       \foreach \p in {1,...,5} {         \addplot[domain=luatime(\p-1):luatime(\p)] {luaheight(\p)-9.81/2*(x-luaoffset(\p))^2};        }         \end{axis}     \end{tikzpicture}     \end{document}      And it looks like this: ![enter image description here](http://i.stack.imgur.com/qhBrJ.png)


title: Problems customizing listings captions

text: I'm trying to "decorate" source code with `listings`, but I'm getting some warnings and bad boxes when I compile my document. However the document compiles and looks like I want. I noticed the warning is due to some `}` and `{` symbols in the code. > Overfull `\hbox` (6.0pt too wide) in paragraph at lines 31--31 > [][][][][][][] [] > > LaTeX Font Info: Try loading font information for OMS+cmss on input line 32. > > LaTeX Font Info: No file OMScmss.fd. on input line 32. > > LaTeX Font Warning: Font shape `OMS/cmss/m/n' undefined (Font)   >  using`OMS/cmsy/m/n' instead (Font) for symbol `textbraceleft' on input line > 32.               \documentclass[a4paper]{article}          \usepackage[spanish,activeacute]{babel}     \usepackage{amsmath}     \usepackage{listings}     \usepackage{color}     \usepackage{xcolor}     \usepackage{caption}          \lstset{     basicstyle=\footnotesize,     numbers=left,     numberstyle=\tiny,     frame=tb,     columns=fullflexible,     showstringspaces=false     }               \renewcommand{\familydefault}{\sfdefault}  %this is because default font looks blurry          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox{black}{\parbox{\textwidth}{#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}          \begin{document}          Some Code:     \begin{lstlisting}[caption=some code, label=source, language=java]     public void hello() {         aaaa();     }     \end{lstlisting}          \end{document}


title: How can I automatically change the font qualities of the first few words of a chapter?

text: First off, TeX knows about words (since it does different spacing for inter- letter, inter-word, and inter-sentence. There must be a way to tap into this. As for the Q, what I mean is emulating the common practice of many maths books (for example) of changing the font family, shape, size, or _some transformation_ to the first few words of each chapter (or section, or ...). How can this be automated with TeX? * * * I have a way that works (below), but it has its own funkiness and I'm interested in seeing others' solutions.


title: Numbering exceeding the 26 letter alphabet

text: After reading this answer http://tex.stackexchange.com/a/52604/10898 I am unable to employ the `alphalph` package to replace the counter in either levels. See the code below:               \documentclass[letterpaper]{article}     \usepackage{alphalph} % unable to use this package based on the answer given.     \usepackage{enumitem}     \setlist[enumerate,1]{label=(\roman*)}     \setlist[enumerate,2]{label=(\alph*)}     \begin{document}     \begin{enumerate}     \item          \begin{enumerate}         \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item          \item         \item          \item          \item          \item         \item          \item          \item          \end{enumerate}     \end{enumerate}     \end{document}      I have made the proper replacement but get no results:               \makeatletter     \newalphalph{\alphmult}[mult]{\@alph}{26}     \makeatother     \renewcommand{\theenumi}{\alphmult{\value{enumi}}}


title: How to include graphics in minimal code?

text: [UPDATE] I'm sorry, if my question is less clear. I mean is how to simplify the writing of syntax in main.tex to display images with the same settings,                   \begin{figure}[ht]         \centering         \includegraphics{Pictures/pic1.png}         \caption{Picture 1}         \label{fig:pic1}         \end{figure}      with just write, maybe,                   \includegraphics[caption,label]{pic1.png}      [ORIGINAL QUESTION] I am writing an ebook that contains some of graphics. Some of them generated by code (using TikZ), for example `pic1.tex`. I think it will be easier to edit if they save in a separated file. I drop all graphics in a folder named Pictures. I named all graphics with the same prefix `pic`, for example pic2.png, pic3.jpg, etc. How to include them with a minimal code, say:                   \include{pic1.tex}      Than                   \begin{figure}[h]         \centering         \includegraphics{Pictures/pic1.tex}         \caption{Picture 1}         \label{fig:pic1}         \end{figure}


title: Tabular: define label and caption manually

text: I'm trying to define the label of my table to match with the numbering of the section. Note that I also numbered my chapters and sections manually. So instead of _Tabelle 1_ I need _Tabelle 2.1_ Any one can help?               \chapter*{Kapitel 2}      \section*{bla bla bla}      \subsection*{bla blu bli}                    \begin{table}[htbp]      \centering      \caption{Zusammensetzungen einiger SX-Nickelbasislegierungen in wt\%.}      \label{tbl:1}       \begin{tabular}{c d{2.1} d{2.1} d{2.1} d{1.1} d{1.1} d{1.2} d{1.1} d{1.1} d{1.1} d{1.1} d{1.0} d{1.2}}        \toprule         Alloy & \mc{Ni} & \mc{Cr} & \mc{Co} & \mc{Mo} & \mc{W} & \mc{Al} & \mc{Ti} & \mc{Ta} & \mc{Re} & \mc{Nb} & \mc{V} & \mc{Hf} \\        \midrule         \mcTwo{First generation} & & & & & & & & & & & \\        \midrule         PWA~1480    & 62.5 & 10   &  5   & \mc{---} & 4        & 5    & 1.5      & 12   & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]         Ren{\'e}~N4 & 62.6 &  9   &  8   & 2        & 6        & 3.7  & 4.2      &  4   & \mc{---} & 0.5 & \mc{---} & \mc{---}      \\[1ex]         CMSX-2      & 66.6 &  8   &  4.6 & 0.6      & 7.9      & 5.6  & 0.9      &  5.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]         SRR~99      & 66.5 &  8.5 &  5   & \mc{---} & 9.5      & 5.5  & 2.2      &  2.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\        \midrule         \mcTwo{Second generation} & & & & & & & & & & & \\        \midrule         PWA~1484    & 59.4 &  5   & 10   & 2        & 6        & 5.6  & \mc{---} &  9   & 3        & \mc{---} & \mc{---} & \mc{---} \\[1ex]         Ren{\'e}~N5 & 61.8 &  7   &  8   & 2        & 5        & 6.2  & \mc{---} &  7   & 3        & 0.5      & \mc{---} & 0.2      \\[1ex]         CMSX~4      & 61.8 &  6.5 &  9   & 0.6      & 6        & 5.6  & 1        &  6.5 & 3        & \mc{---} & \mc{---} & 0.1      \\[1ex]         CMSX~6      & 70.4 & 10   &  5   & 3        & \mc{---} & 4.8  & 4.7      &  2   & \mc{---} & \mc{---} & \mc{---} & 0.1      \\[1ex]        \midrule         \mcTwo{Third generation} & & & & & & & & & & & \\        \midrule         CMSX-10     & 69.6 &  2   &  3   & 0.4      & 5        & 5.7  & 0.2      &  8   & 6        & 0.1      & \mc{---} & 0.03     \\[1ex]         Ren{\'e}~N6 & 57.4 &  4.2 & 12.5 & 1.4      & 6        & 5.75 & 0        &  7.2 & 5.4      & 0        & 0        & 0.15     \\        \bottomrule       \end{tabular}     \end{table}      ![enter image description here](http://i.stack.imgur.com/nR3nD.png)


title: How do I suppress the counter for figures?

text: I am including some illustrations in the figure environment so that they float properly and so I can caption them, but I don't want the counter. Is there a way to suppress this?               \documentclass{memoir}          \usepackage[demo]{graphicx}     \usepackage{float}          \newfloat{illustration}{thp}{lop}          \begin{document}          \begin{illustration}     \begin{center}     \includegraphics[width=3.5in,height=5in]{image001}     \caption{{\large \textbf{Caption}}}     \end{center}     \end{illustration}          \end{document}


title: Video from Beamer Plays Only One Second

text: Sorry about the title...it was hard to word my problem. I am using LaTeX, and more specifically Beamer, to create a presentation that plays a video file. The code I use is:               \documentclass{beamer}     \usepackage{multimedia}          \begin{document}     ...     \begin{frame}       \movie[width=6cm,height=4cm,showcontrols]{}{Movie.avi}     \end{frame}     ...     \end{document}      This compiles with pdfLaTeX all dandy, but whenever I try to view the video file in Adobe Reader on Windows 7, the video plays about one second, stops, then returns to the start ready to be played again. It's like either LaTeX or Adobe Reader thinks the video is only one second long. I tried adding the duration tag to \movie. I also tried changing around all the security configurations within Reader. The video files are in the same directory as the pdf and the tex files from compilation to viewing. Anyone have any advice as to what I might check next?


title: Use "layered layout" with user-specified node ordering (i.e., without crossing minimization)

text: **If and when someone answers this question in a way that demonstrates lua programming for TikZ graph algorithms, I will guarantee a 500-point bounty to that person.** * * * According to the PGF 3.0 manual, Chapter 30, one of the key steps in the `layered layout` graph-drawing routine is to re-order the nodes within each layer so as to minimize edge crossing. I find that the order in which I specify the nodes is better, for my purposes, than the order created by the default algorithm. How can I force TikZ not to employ this algorithm but instead do the "stupid" thing, just using the nodes in the same order I give them? I'm aware that this is likely to require some amount of Lua programming, but given the simplicity of the algorithm I'm asking for, it might be feasible to do as an answer to a stack-exchange question. Note that this question differs from Why does PGF/TikZ 3.0 draw my simple layered graph as non-planar by default? primarily in that I am requesting a specific solution (implement the alternate, naive algorithm). A "minimal" working example:               % !TEX TS-program = lualatex     \documentclass[tikz,convert,margin=10pt]{standalone}     \usetikzlibrary{graphs,graphdrawing}     \usegdlibrary{layered}     \begin{document}     \tikz[rounded corners] \graph [layered layout]     {         {[same layer] \foreach \i in {1, 2, ..., 16} {             pt\i/$P^0_{\i}$,         }};         {[same layer] \foreach \i in {1, 2, ..., 17} {             l\i/$P^1_{\i}$,         }};         \foreach \i [evaluate=\i as \j using int(\i+1)] in {1,2,...,16} {             pt\i -- l\i,             pt\i -- l\j,         };                   Q/$P^1 \times P^1$ [gray];              \foreach \i [evaluate=\i using int(2*\i)] in {1,2,...,7} {             l\i -- [gray, edge node = {node [fill=white] {h}}] Q,         };              pt1 -- [gray] Q;     };     \end{document}      The result: ![enter image description here](http://i.stack.imgur.com/w9knc.png) I would like the nodes in each layer to be numbered in order, regardless of what TikZ thinks would minimize crossings. Note that making the first two layers into a subgraph is not an acceptable solution here, because then the edge from the first layer to the third layer will not avoid the nodes in between.


title: Configure Minted Color XML

text: I'm using minted package for code listing, however I don't like some of the colors too much. Is it possible to configure these colors? For example, When I display the colors to view XML color, the keyword appear green which I don't want. Can somebody explain of this is possible? I'm including the package and including the XML code:               \usepackage{minted}     \inputminted{xml}{codeListings/test.xml.tex}


title: Line in algorithm2e environment wrapping late

text: I am having a small issue where where the line               Let $s$ be the highest-ranked student in $h$'s preference list which $h$ has not yet requested to be a resident\\      in my algorithm is wrapping a little too late. The boundary should be the same as the line under "Homework 1" provided by fancyhdr I believe. Below is that complete portion of me tex file. Could anyone assist me in getting that line to wrap earlier? If I force it with a newline then it will also give an incorrect line numbering for the algorithm environment so that quick fix isn't an option I am willing to settle with.               \begin{enumerate}     ...     \item[\textbf{4.}]          Below is an algorithm to find a stable assignment of students to hospitals:              \begin{algorithm}[H]             \SetKwData{List}{list}             \SetKwFunction{Remove}{Remove}             \SetKwFunction{Insert}{Insert}             \SetKwInOut{Input}{input}                  \Input{A set of hospitals $H$ where each $h \in H$ has a list of students $h.\List$ with a capacity equivalent to number of positions available \\ A set of students $S$}             Initially $s$ is free for all $s \in S$ and $h.\List$ is empty for all $h \in H$. \\             \While{there exists $h \in H$ such that $h.\List$ is not full}             {                 Choose such a hospital $h$\\                 \While{$h.\List$ is not full}                 {                     Let $s$ be the highest-ranked student in $h$'s preference list which $h$ has not yet requested to be a resident\\                 }             }         \end{algorithm}     ...     \end{enumerate}      ![](http://i.stack.imgur.com/WwDvu.png)


title: Defining a new command name in the correct way

text: I'd like to define a short command name `\gm{a,b}` that would mean in LaTeX               \overset{a\to b}\longrightarrow       I tried on my own. The below code only works for `\gm{a}` (or `\gm{b}` if changing a into b)               \newcommand{\gm}[1]{\overset{#1\to b}\longrightarrow}      but I can't make it work for both a and b, such that `\gm{a,b}` would work.


title: Selectively de-activate links with hyperref

text: Is there a way to selectively de-activate desired links in `hyperref`? For example, I would like to remove the footnotes from being linked and maybe also the citations. Imho it's fine if the _TOC_ and the other lists (list of tables etc.) are linked, as well as the equations. I have just read the documentation and other threads. But in my case I would like to do this globally and not just for one `ref`. ## Edit: Another possibility would be to make the undesired parts links, but not visible (e.g. black)


title: Using letterspacing for better justification

text: According to R. Bringhurst's " _The Elements of Typographic Style_ " (version 3.1, 2004, pp. 190-192), the best justification is achieved by a combination of three methods:   1. flexibly altering the space between words (wordspacing)   2. flexibly altering the space between letters within words (letterspacing)   3. flexibly altering the width of characters (glyph reshaping) As far as I know, LaTeX uses only wordspacing by default. As for glyph reshaping, there is the `microtype` package with the feature _font expansion_. However, this works only in certain scenarios, e.g. not with XeTeX (which I am using). It also has the disadvantage of distorting the actual letter shape. My question is regarding letterspacing: Is there any way in LaTeX to make use of elastic letterspacing (altering interletter space) in order to improve justification? I am aware that the `microtype` package supports so-called _tracking_ , i.e. adjusting the letterspacing by a certain amount. However, this appears to be a fixed amount and can therefore not be used for justification purposes. **Update** : It seems that opinions are very much divided on whether letterspacing and glyph reshaping are acceptable means for improving justification, see e.g. here for a compilation of differing opinions and here (in Norwegian) for some critical remarks.


title: Gap between line and point in pgfplots, like pointintervalbox in gnuplot

text: I wondered if it is possible to create a scatter plot in pgfplots with a similar style as the "pointintervalbox" option in gnuplot, i.e. a plot with points and lines, but there is a gap between the lines and the points. Here is an example: ![](http://i.stack.imgur.com/XGWpp.png) Maybe something like this already exists but I couldn't find it because I don't really know how to describe it. Thank you


title: How to use \shortstack together with \arraystretch to achieve the same row separation?

text: When I use `\shortstack` to create newline in a table cell, the row separation is not the same as defined by the value of `\arraystretch`. The following MWE shows the problem:               \documentclass[a4paper]{article}     \usepackage{siunitx}     \usepackage{booktabs}          \begin{document}          \renewcommand{\arraystretch}{3}     \begin{tabular}{cc} \toprule     Metal & \shortstack{Temperature \\ m.p.(\si{\celsius}) \\ b.p(\si{\celsius}) } \\ \midrule     Mg & \shortstack[c]{650 \\ 1090} \\     Al & \shortstack[c]{660 \\ 2467} \\     \bottomrule     \end{tabular}          \par\bigskip          \renewcommand{\arraystretch}{1}     \begin{tabular}{cc} \toprule     Metal & \shortstack{Temperature \\ m.p.(\si{\celsius}) \\ b.p(\si{\celsius}) } \\ \midrule     Mg & \shortstack[c]{650 \\ 1090} \\     Al & \shortstack[c]{660 \\ 2467} \\     \bottomrule     \end{tabular}          \end{document}      How I can make the row separation of `\shortstack` the same as the table defined by `\arraystretch`? Or how can I control the row separation of `\shortstack`?


title: Multline & Splitfrac

text: \documentclass{article}     \usepackage{amsmath}     \usepackage{mathtools}          \begin{document}     \begin{multline*}     -\dfrac{1}{64\pi^2}     \left[                \dfrac{             \splitfrac{                 (m_2-m_3)(2y_e^2-y_\mu^2-y_\tau^2                   }{                   + (y_\mu^2-y_\tau^2 )\cos2{\theta_{23})\sin\delta^2\sin\theta_{12}^2\sin2\theta_{13}}                   }             }{               m_2+m_3              }\\         + \dfrac{           \splitfrac{                   (m_2 + m_3)\cos\delta\sin\theta_{12}(\cos\delta(2y_e^2-y_\mu^2-y_\tau^2 + (y_\mu^2-y_\tau^2 )\cos2\theta_{23})\sin\theta_{12}\sin2\theta_{13}                 }{                 + 2(y_\mu^2-y_\tau^2)\cos\theta_{12}\cos\theta_{13}\sin2\theta_{23})                 }             }{               m_2-m_3              }\\         + \dfrac{              \splitfrac{                2(m_1+m_3)\cos\delta\cos\theta_{12}\cos\theta_{13}(\cos\delta\cos\theta_{12}               }{             (2y_e^2-y_\mu^2-y_\tau^2 + (y_\mu^2-y_\tau^2 )\cos2\theta_{23})\sin\theta_{13}+(-y_\mu^2+y_\tau^2)\sin\theta_{12}\sin2\theta_{23}                }              }{                  m_1-m_3               }\\         +\dfrac{1}                  {                   \splitfrac{                              (m_1+m_3)2(m_1+m_3)\cos\theta_{12}\cos\theta_{13}\sin\delta(y_\mu^2                             }{                               -y_\tau^2 )\cos\delta\sin\delta\sin\theta_{12}\sin2\theta_{23}                              }{                                +\sin\delta(\cos\theta_{12}(2y_e^2-y_\mu^2-y_\tau^2+(y_\mu^2                              }{                                 -y_\tau^2)\cos2\theta_{23}\sin\theta_{13}+(-y_\mu^2 + y_\tau^2)\cos\delta\sin\theta_{12}\sin2\theta_{23}                              }                   }      \right]                  \end{multline*}               \end{document}      On compiling this code in KILE it gives the following error               Missing \right.inserted \end{multline*}          Extra \right \end{multline*}      How can I fix this error?


title: How to add an academic title before the author name with \citeauthor?

text: In French legal citation, one is supposed to refer to "professor X" or "Dean Y" when referring to an author in a sentence. Using `biblatex` and Biber, this would mean that `\citeauthor{key}` should prepend the right academic title (if any) before each author. The idea would be to have a separate database (in whatever form) specifying an author name and the title to prepend, and to have `biblatex` look in the database whenever `\citeauthor` is called. Ideally, one could add names to the database by using a latex command such as `\addauthor{X}{Professor}`. I am not interested in having a macro for "professor" and another one for "dean". Thus, I would like to know if such a system could be implemented (i.e. whether it would be reasonably simple and efficient, given that `\citeauthor` is not the most widely used command), and how to implement it. **Edit** Following Daniel E. Shub's idea of using the `nameaddon` field, I figured out a Biber solution that seems to work properly, although it requires having two `\citeauthor` commands for capitalisation purposes. In the `biber.conf` file, I wrote the following (with actual last names instead of X, Y, Z):               <map>         <map_step map_field_source="AUTHOR" map_match="X|Y" map_final="1"/>         <map_step map_field_set="NAMEADDON" map_field_value="le professeur"/>     </map>     <map>         <map_step map_field_source="AUTHOR" map_match="Z" map_final="1"/>         <map_step map_field_set="NAMEADDON" map_field_value="le doyen"/>     </map>      And I modified the `\citeauthor` macro as described by Daniel, with a `\CiteAuthor` variant that applies the `\MakeCapital` formatting (for start of sentence citations). Not sure this is the most aesthetic way of doing it, though… and, as mentioned, it only works for single author references.


title: Inline purified PostScript (MPS)

text: I just learned how to inline PDF code using the `\pdfliteral` command and that purified Encapsulated PostScript generated by METAPOST or `purifyeps` can be converted to PDF code by pdfLaTeX. However, I have been unable to find the actual conversion code I need for embedding the transformed EPS via `\pdfliteral`. I would like to have something like this:               \documentclass{minimal}     \begin{document}         \begin{purifiedeps}             %!PS-Adobe-3.0 EPSF-3.0             %%BoundingBox: 0 0 33 31              %%HiResBoundingBox: 0 0 32.0781 30.9844              %%Creator: MetaPost 1.803             %%CreationDate: 2014.04.30:1514             %%Pages: 1             %%BeginProlog             %%EndProlog             %%Page: 1 1              0 0 0 setrgbcolor             newpath 28.9375 30.1875 moveto             16.0312 7.76563 lineto             3.14063 30.1875 lineto             2.82813 30.6406 2.23438 30.9844 1.64063 30.9844 curveto             0.84375 30.9844 0 30.3906 0 29.5312 curveto             0 1.5 lineto             0 0.64063 0.73438 0 1.64063 0 curveto             2.57813 0 3.28125 0.64063 3.28125 1.5 curveto             3.28125 23.3594 lineto             7.0625 16.8281 10.7969 10.3125 14.5469 3.78125 curveto             14.7969 3.28125 15.3906 2.98438 16.0312 2.98438 curveto             16.7344 2.98438 17.125 3.39063 17.5312 3.78125 curveto             21.2656 10.3125 25 16.8281 28.7812 23.3594 curveto             28.7812 1.5 lineto             28.7812 0.64063 29.4844 0 30.4375 0 curveto             31.3281 0 32.0781 0.64063 32.0781 1.5 curveto             32.0781 29.4844 lineto             32.0781 30.3281 31.2344 30.9844 30.4375 30.9844 curveto             29.8281 30.9844 29.2344 30.7344 28.9375 30.1875 curveto              closepath fill             showpage             %%EOF         \end{purifiedeps}     \end{document}      where the `purifiedeps` environment still has to be defined. The EPS code yields the METAPOST-`M`: ![enter image description here](http://i.stack.imgur.com/hm8ed.png) NOTE: I know that it's possible to `\includegraphics{somepurifiedeps.mps}` but I am searching for an inline solution not requiring an external file. **EDIT:** I think I gathered the relavant pieces from the ConTeXt package `supp-pdf`:               \def\convertMPtoPDF % #1#2#3%       {\bgroup        \defineMPtoPDFfallbacks        \ifx\pdfdecimaldigits\undefined\else \pdfdecimaldigits=5 \fi % new        \setbox\scratchbox\vbox\bgroup          \xdef\MPheight{0pt}%          \xdef\MPwidth {0pt}%          \forgetall          \offinterlineskip          \startMPresources          \doprocessMPtoPDFfile} %          \def\doprocessMPtoPDFfile#1#2#3% file xscale yscale       {\setMPspecials        \setMPextensions        \the\everyMPtoPDFconversion        \catcode`\^^M=\@@endofline        \startMPscanning        \let\do\empty        \xdef\MPxscale{#2}%        \xdef\MPyscale{#3}%        \xdef\MPxoffset{0}%        \xdef\MPyoffset{0}%        \xdef\MPyshift{0pt}%        \donefalse        \let\handleMPsequence\dohandleMPsequence        \message{[MP to PDF]}% was: [MP to PDF #1] but there is a (#1) anyway        \input#1\relax}      `\convertMPtoPDF{test.mps}{0.5}{0.5}` will include the purified EPS file `test.mps` scaled by a factor of 0.5. To build an inline version of this command, I would need to replace `\input#1` in `\doprocessMPtoPDFfile` with a macro containing the definition of the EPS code. Unfortunatly, I don't know how to define such a macro since I need to preserve EPS comments (`%`) as well as line breaks. Hence, the macro definition needs to contain the verbatim (unprocessed) EPS code. How could I do that?


title: Error output using \ifdefempty

text: I'm using TeX 3.1415926 (TeX Live 2013) and when I execute               \documentclass{article}         \usepackage{etoolbox}          % contents      \newcommand{\contentdesc}[2]{\item \ifdefempty{#2}{\textbf{#1}}{\textbf{#1}: #2}}          \begin{document}         \begin{enumerate}        \contentdesc{test}{description}      \end{enumerate}             \end{document}      I got the following output ![enter image description here](http://i.stack.imgur.com/smhAc.jpg) However, I was expecting a >   1. test: description > What did I do wrong? Moreover, note that the               \contentdesc{test}{}% this gives an weird error      > ! Extra \else. \ifundef ... \expandafter \@secondoftwo \fi \else > \expandafter \@firstoftwo ...


title: TeX and Hyper text links

text: I am a TeX (not LaTeX) user (and a member of UK TeX user group) of many years and produce macros for maths and complex tables. I include some hyper text links within a document using the Y&Y `dvipsone` and their `\special{button:` ... and `\special{mark:`. ... `dvipsone` is no longer supported, so when we move to 64-bit computing, which DVI ... package supports these same hyperlink options? Are there any macro packages for TeX like the LaTeX package `hyperref?` Are there any good examples / manuals so that I can easily get control of how produce my own links, etc.? I am interested in being able to insert various 'pdf' type features into our publications and almanacs going into the future.


title: How to indent a \halign?

text: I have a weird problem. I want to indent a `\halign`, but it seems no matter what I try, it just does not like to be indented! Things I've tried:               text     \indent\halign{&#\hfil\cr       foo& bar\cr       baz\cr}     \bye      and               text     \hbox to\parindent{\hfil}\halign{...      and               text          \indent\halign{...      and               text     \hskip\parindent\halign{...      and               text     \hglue\parindent\halign{...      And variations of these. How can this command be so stubborn? **Note** that I know a way to make it indented:               text     \tabskip\parindent\halign{...      but I don't want to use that because it will affect `\noalign`ed `\hrule`s and such.


title: Could I insert the elements of a mdb or csv base in Latex?

text: I want to insert some information from a csv text file or from a mdb (MS data base) base into a latex document. For example I have a document with math exercises and I would like to insert the first and the second element (i.e. exercise) of the base into `\begin{enumerate} \end{enumerate}`. How could this achieved in LaTeX?


title: Showing pi bonding through chemfig

text: I've tried to make a diagram which shows pi bonding through chemfig, but I was not successful. Here is what I want. ![pi bonding in google images1](http://www.chem1.com/acad/webtext/chembond/CB-images/dblbond-PH.gif) or ![pi bonding in google images2](http://www.science.uwaterloo.ca/~cchieh/cact/fig/ethene.gif) Since I was unable to do it with chemfig I decided to do it with tikz. This is the best I could do:               \documentclass{article}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (0,1) and         (.5,0.5) .. (.5,0)     .. controls (.5,-.5) and (0,-1) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (.5,1) and     (-.5,0.5) .. (-.5,0)     .. controls (-.5,-.5) and (.5,-1) .. (2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-3.5,2.5)     and (-3,3) .. (-2.5,3)     .. controls (-2,3) and (-1.5,2.5) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-3.5,-2.5)     and (-3,-3) .. (-2.5,-3)     .. controls (-2,-3) and (-1.5,-2.5) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,0.5) and     (-5,0.83) .. (-4.5,1.5)     .. controls (-4,2.17) and (-3.5,1.31) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,-0.5)     and (-5,-0.83) .. (-4.5,-1.5)     .. controls (-4,-2.17) and (-3.5,-1.31) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (-3.5+5,2.5)     and (-3+5,3) .. (2.5,3)     .. controls (-2+5,3) and (-1.5+5,2.5) .. (2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (-3.5+5,-2.5)     and (-3+5,-3) .. (2.5,-3)     .. controls (-2+5,-3) and (-1.5+5,-2.5) .. (2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,0.5) and     (5,0.83) .. (4.5,1.5)     .. controls (4,2.17) and (3.5,1.31) .. (2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,-0.5) and     (5,-0.83) .. (4.5,-1.5)     .. controls (4,-2.17) and (3.5,-1.31) .. (2.5,0);          \shade[shading=ball, ball color=blue,opacity=0.6] (4.5,1.5) circle (0.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (4.5,-1.5) circle (.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,-1.5) circle (.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,1.5) circle (.5);          \end{tikzpicture}          \begin{tikzpicture}          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (0,1) and     (.5,0.5) .. (.5,0)     .. controls (.5,-.5) and (0,-1) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (.5,1) and     (-.5,0.5) .. (-.5,0)     .. controls (-.5,-.5) and (.5,-1) .. (2.5,0);               \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,0.5) and     (-5,0.83) .. (-4.5,1.5)     .. controls (-4,2.17) and (-3.5,1.31) .. (-2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,-0.5)     and (-5,-0.83) .. (-4.5,-1.5)     .. controls (-4,-2.17) and (-3.5,-1.31) .. (-2.5,0);               \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,0.5) and     (5,0.83) .. (4.5,1.5)     .. controls (4,2.17) and (3.5,1.31) .. (2.5,0);          \shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,-0.5) and     (5,-0.83) .. (4.5,-1.5)     .. controls (4,-2.17) and (3.5,-1.31) .. (2.5,0);          \shade[shading=ball, ball color=blue,opacity=0.6] (4.5,1.5) circle (0.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (4.5,-1.5) circle (.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,-1.5) circle (.5);          \shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,1.5) circle (.5);               \shade[shading=ball, ball color=black,draw,opacity=.7] (-2.5,0) .. controls (-3.5,2.5)     and (-3,3) .. (-2.5,3)     .. controls (0,2) .. (2.5,3)     .. controls (3,3) and (3.5,2.5) .. (2.5,0)     .. controls (1.5,1) .. (0,1)     .. controls (-2,1) .. (-2.5,0);               \shade[shading=ball, ball color=black,draw,opacity=.7] (-2.5,0) .. controls (-3.5,-2.5)     and (-3,-3) .. (-2.5,-3)     .. controls (0,-2) .. (2.5,-3)     .. controls (3,-3) and (3.5,-2.5) .. (2.5,-0)     .. controls (1.5,-1) .. (0,-1)     .. controls (-2,-1) .. (-2.5,-0);     \end{tikzpicture}          \end{document}      ![my Diagram](http://i1020.photobucket.com/albums/af321/Uzair_Aziz_Suria/pibonding_zpscfce08d5.jpg) The end result is quite satisfactory, but   1. A shorter code would be nice   2. I am not sure how to use node and label pi bond and sigma bond(usage of quoate box would also look good), and label the atoms as well


title: LaTeX motto/slogan

text: I'm not sure if this is the right place to ask this, I mean, it's not specifically related to LaTeX typesetting. But here it goes. I'm making a presentation to introduce LaTeX to university students, and I'm looking for a "catchy", or motivating slogan/motto, to use as a title for the presentation. I tried to google it, but I had no success. I thought something like _"LaTeX: program your documents"_ , but I think _"program"_ may be misunderstood with _"schedule"_. Do you have any ideas?


title: \citeform depending on value of counter

text: I have inherited a LaTeX style which distinguishes between two types of references (selected own work, other work). The former are supposed to appear in the form "[R1]", the latter in the format "[4]". The way this is achieved is by defining different bibliography types. If an entry is part of the first category, its counter value is increased by 1000. This is actually working. There is also a `\citeform` command in the stylefile which is supposed to replace citation keys > 1000 by "R" and the original counter value, that is num-1000. For some reason, the second part is not working, and the citations keep their numbers 1001, 1002, etc. Here is a minimal example:               \documentclass[11pt,DIV11,BCOR10mm,twoside]{scrartcl}          \input{style.sty}          \begin{document}            Citation test \cite{P5:test}.            Does this work? \cite{test}                 \section{References}            \begin{projectbibliography}         \Bibitem{P5:test}  own paper number 1       \end{projectbibliography}                 \begin{otherbibliography}         \Bibitem{test}  other paper number 1       \end{otherbibliography}          \end{document}      And here is the content of style.sty:               \makeatletter          \newif\if@SFB     \@SFBfalse     \newbox\@SFB     \newbox\@BULLET     \newcount\my@bibcount     \newcount\my@bibcountP     \newcount\my@bibtempcount          \newenvironment{subbibliography}[2]%          {             \global\setbox\@SFB=\hbox{#1}\ifdim \wd\@SFB>0pt%            \global\@SFBtrue \else \global\@SFBfalse %%%%%%%%%%\subsubsection*{#1\@mkboth{\MakeUppercase#1}{\MakeUppercase#1}}            \fi%            \global\setbox\@BULLET=\hbox{#2}%           \list{%% DEFINE HOW THE ITEM APPEARS             %% save list position             \my@bibtempcount=\c@enumiv%             %% add bibcounter             \if@SFB%             \advance\my@bibtempcount by \my@bibcountP%             \else%             \advance\my@bibtempcount by \my@bibcount%             \fi%             %% make label             \@biblabel{%%%%%%%%%%%%%%%%%%\unhcopy\@BULLET% for bullet in brackets               \unhcopy\@SFB\@arabic\my@bibtempcount}}%     %      \list{\@biblabel{\unhcopy\@SFB\@arabic\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{%%%%%%%%%%%%%%%%%%\unhcopy\@BULLET% for bullet in brackets                      \unhcopy\@SFB99}}%                 \leftmargin\labelwidth%                 \advance\leftmargin\labelsep%                 \@openbib@code%                 \usecounter{enumiv}%                 \let\p@enumiv\@empty%                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%           \sloppy%           \clubpenalty4000%           \@clubpenalty \clubpenalty%           \widowpenalty4000%           \sfcode`\.\@m%         }          {\def\@noitemerr%            {\@latex@warning{Empty `subbibliography' environment}}%            %% save bibcounter            \if@SFB%            \global\advance\my@bibcountP by \c@enumiv%            \else%            \global\advance\my@bibcount  by \c@enumiv%            \fi%            \endlist}     \newenvironment{otherbibliography}{\begin{subbibliography}{}{}}{\end{subbibliography}}     \newenvironment{projectbibliography}{\begin{subbibliography}{R}{}}{\end{subbibliography}}     %%%%%% Neues token fuer bibitem     \def\Bibitem{\@ifnextchar[\@lbibitem\@Bibitem}     \def\@Bibitem#1{\count255=\the\value{\@listctr}%                     \if@SFB%                     \advance\count255 by \my@bibcountP%                     \advance\count255 by 1001%                     \else%                     \advance\count255 by \my@bibcount%                     \advance\count255 by 1%                     \fi%                     \item\if@filesw %                     \immediate\write\@auxout{\string\bibcite{#1}{\the\count255}}\fi%                     \unhcopy\@BULLET% bullet comes AFTER bibitem                     \ignorespaces%                                  }     %                   \providecommand\citeform[1]{{\def\@b@b{#1}\if ?\@b@b \@b@b \else  \count255=#1 \ifnum #1>1000\count255=#1     \loop\ifnum\count255>1000\advance\count255 by -1000     \repeat P\the\count255\else\the\count255\fi\fi}}     \makeatother          \endinput


title: Maintain display of arguments for certain folded environments with AUCTeX

text: When working with some environments (`function` and friends from `l3doc` prompted this), it is desirable to have the environment's arguments visible at all times:               Some text that, in reality, shouldn't be here in an l3doc     \begin{function}{\tl_new:N}       Some documentation...     \end{function}     more inappropriate text      When folding this using `C-c` `C-o` `C-e`, everything goes away (which is useful for environments like `minipage`, etc.):               Some text that, in reality, shouldn't be here in an l3doc       [function]     more inappropriate text      Is there any way to turn this into the following for _certain_ environments?               Some text that, in reality, shouldn't be here in an l3doc       [function]{\tl_new:N}     more inappropriate text      (If only a solution for _all_ environments exists easily, I can manage with turning on/off the mode.) * * * If the solution would be similar, it would be _really_ cool if you could have some sort of marker, say `%!!`, that would always stay visible in folded environments.


title: Calling beamertemplate frametitle even for empty frametitle

text: Can I force the latex beamer frametitle template to be called even if the `frametitle` is empty? So in my case I want the black box with "Frametitle: " to appear not only for frames with frametitle, but on every slide. **MWE:**               \documentclass{beamer}          %% redefine frametitle template     \setbeamercolor{frametitle}{fg = white, bg = black}     \setbeamertemplate{frametitle}{%       \vskip-3pt       \begin{beamercolorbox}[sep=0.6em,wd=\paperwidth,leftskip=0cm,rightskip=0cm]{frametitle}%         \vspace{-2pt}\par         \hspace{.4cm}Frametitle: \insertframetitle\strut       \end{beamercolorbox}%     }          %% mwe document:     \begin{document}       \begin{frame}{Heading}         beamer template ``frametitle'' is called       \end{frame}            \begin{frame}         beamer template ``frametitle'' is not called       \end{frame}       \end{document}


title: geometry package doesn't change textheight?

text: When I compile this MWE, I get a box that takes up about 80% of a vertical page. Since I have specified `max height=0.4\textheight` in `adjustbox`, I'd expect a box half the size... is `geometry` not changing `\textheight`?               \documentclass[a4paper,10pt]{article}     \usepackage[landscape,hmargin={1.2cm,1cm},vmargin=1cm,footskip=7mm]{geometry}     \usepackage{adjustbox}     \usepackage{boxedminipage}          \begin{document}     \begin{adjustbox}{max width=\textwidth,max height=0.4\textheight,keepaspectratio}     \begin{boxedminipage}{70cm}     \ \vspace{70cm}\      \end{boxedminipage}     \end{adjustbox}     \end{document}


title: Problem while using bibtex reference of a url

text: @online{senfus,     title={article name},      url= {https://m**.s*/U****d/Om%20MPB/F****g/Kxyzy.pdf},      }      While citing this reference, I am getting following error because of the term "%" in the url. > Paragraph ended before \BR@@bibitem was complete.\par Is using tinyurl/google url shortener a good idea for citing the article's url.


title: Difference between options and mandatory arguments with pgfkeys

text: I try to use the pgfkeys package. Hereafter there is a short example of a simple command which use pgfkeys. I would like to know why the containts of a variable is not considered in a same way in the case of it is a mandatory argument of the command and in the case it is a option. As you can see below, if I use `#2` or `\prop` I do not obtain the same output.               \documentclass[a4paper]{article}     \setlength{\parindent}{0em}          \usepackage{pgfkeys}     \usepackage{pgffor}          \pgfkeys{         /nom/.code=\def\nom{#1},         /prenom/.code=\def\prenom{#1},         /prop/.code=\def\prop{#1},         /prop/.default = {age,ville,couleur}     }          \newcommand{\qui}[2][]{         \pgfkeys{#1}         I am \prenom{} \nom{} !              \medskip              \#2 contains : #2              \medskip              prop contains : \prop              \medskip              If I use \#2 I get :\\         \foreach \item in {#2} {             \item \\         }              \medskip              If I use prop option I get :\\         \foreach \item in {\prop} {             \item \\         }     }          \begin{document}     \qui[prenom = toto, nom = titi, prop = {29,perpignan,bleu}]{29,perpignan,bleu}     \end{document}      ![enter image description here](http://i.stack.imgur.com/fIEQr.png)


title: Fix column width with tabularx

text: I want to create a table with 100% width? The first two columns should have a minimum width and the last column should have the rest width. The text in the last column (except the first cell) should be left aligned.               \documentclass[draft=on]{scrbook}     \usepackage{blindtext}     \usepackage{tabularx}          \begin{document}     \begin{tabularx}{\textwidth}{ccX}       A & B & \multicolumn{1}{c}{C} \\       A & B & \blindtext     \end{tabularx}     \end{document}


title: Enable --shell-escape in TexMaker

text: I am trying to use `dot2texi` package with Texmaker on a Mac, and I am aware that I need to enable shell escape in order to let TeX Live process using external packages. So I edit the commands in Texmaker to the following:               "/usr/texbin/latex" -interaction=nonstopmode --shell-escape %.tex (for LaTeX)          "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode --shell-escape %.tex (for PdfLaTeX)      However, when I try outputting the following TeX file, I keep getting warning that says "shell escape not enabled", and consequently the `dot2texi` doesn't work.               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          % dot graphs     \usepackage{dot2texi}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}          \author{Anonymous}     \title{Dot graphs in \LaTeX}          \begin{document}          \maketitle          \begin{dot2tex}[dot,options=-tmath --autosize --cache]     digraph G      {        node [shape="circle"];         a_1 -> a_2 -> a_3 -> a_4 -> a_1;     }     \end{dot2tex}}          \end{document}      Not sure what else I need to do here. Any suggestion would be extremely welcome.


title: \newpage stays in right column

text: I am using RevTEX 4.1 with the following parameters:               \documentclass[aps,prb,reprint]{revtex4-1}      This gives a two-column layout with a balanced two-column bibliography at the end. I would like to add an appendix with code listings and figures after the bibliography. After trying out several ways of using `\pagebreak`, `\newpage` and `\clearpage` and some odd combinations of switching to `\onecolumngrid` and back, I found this neat macro to actually get the page break without messing with the balanced bibliography. However, whichever way I use for the page break, the new page starts in the right column. It's as if the page break would not reset the column in which to typeset. Is this a known behavior/problem that I am just unable to google? Am I totally misunderstanding something about LaTeX's two-page concept? PS: Oddly enough, if I add a `figure` of a certain size after the `section` heading on the new page, it seems to push things back into the left column. But this only happens if I choose the size of the figure such that it fits in one column, but it's caption does not (and place it with `h!`). MWE:               \documentclass[aps,prb,reprint]{revtex4-1}     \usepackage{lipsum}          \makeatletter     \newcommand*{\balancecolsandclearpage}{%       \close@column@grid       \clearpage       \twocolumngrid     }     \makeatother          \begin{document}          \lipsum[1-4]          \balancecolsandclearpage          This text is in the right column.          %\begin{figure}[h!]%     %test     %\caption{test}%     %\label{}%     %\end{figure}          \end{document}      Any other way of breaking the page while keeping the balanced columns (like `\onecolumngrid\newpage\twocolumngrid`) leads to the same behavior. Now if you uncomment that float, the `This text is in the right column` will move to the left column and the float will appear in the right column. This behavior is slightly different from my actual project, because there this only happens for a certain height of the float. But I think if I just could find out why the normal text continues in the right column in the first place that should solve my problem anyway.


title: LaTeX3 and pauper's coffins

text: Frank Mittelbach in this answer said: "I would be interested who would attempt to do that in the plain TeX box model approach. In the MWE below is my approach which I will from now onwards call it for simplicity, the _pauper's coffins approach_ ". ![enter image description here](http://i.stack.imgur.com/u6Uur.png)![enter image description here](http://i.stack.imgur.com/GaFNu.png) On the left image above, is the finished page (scaled down, using a scalebox) and with `\debug` set to false. On the right you can view the boxes with a border to visualize what is happening, by setting `\@debugtrue`. The shaded rectangle on the top left of the second image is a strut, which I used to position the first box. There is also a rule at the bottom left. I used various methods to move the boxes around to illustrate the different ways one can skin the cat. If one removes all the `fbox`, the `scalebox` and the first `vbox` that is used in order to make the `scalebox` work, properly, I am sure that the code can be reduced to a one line statement and here is my question: **Can you produce this layout with a one line statement? or alternatively how can this code be minimized using the same number of boxes.** I have used images rather than typesetting the text, as this is trivial and did not want this question to grow to be too long. Also is XeLaTeX based in order to allow experimenting with fonts, if anyone would like to try using text rather than images.               % !TEX TS-program = xelatex     % !TEX encoding = UTF-8          \documentclass[11pt]{article}      \usepackage[top=0pt,left=1.5cm,right=1.5cm,bottom=1.5cm,showframe=flse]{geometry}     \usepackage{fontspec}      \defaultfontfeatures{Mapping=tex-text}      \usepackage{xunicode}      \usepackage{xltxtra}      \usepackage{geometry}     \usepackage{xcolor}     \usepackage{graphicx}      \makeatletter     \newif\if@debug     \@debugfalse     \if@debug\def\rulecolor{gray}\else\def\rulecolor{white}\fboxsep0pt \fboxrule0pt\fi     \makeatother     \begin{document}          \scalebox{0.5}{\vbox{\hbox{{\color{\rulecolor}\rule{2cm}{3cm}} \fbox{\includegraphics{img-01}}}          \hbox{{\color{\rulecolor}\rule{3.8cm}{1pt}} \fbox{\includegraphics{img-02}}\hskip0.8cm \raise7cm\vbox{\fbox{\includegraphics{img-03}}}}          \vspace*{-5cm}\vbox to 0cm{\hbox to 0pt{\hskip 11cm\fbox{\includegraphics{img-04}}}}          \vspace*{-11.7cm}\vbox to 0cm{\hbox to 0pt{\hskip 14.2cm\fbox{\includegraphics{img-05}}}}     }}          \end{document}      For the avoidance of doubt, I think the LaTeX3 approach in solving this type of problem is very good, but as Frank mentioned the user commands need a bit of a thought. The block images can be downloaded at img-01, img-02, img-03, img-04 and img-05 (click view raw links).


title: Link enumerate item to subsection

text: I have an `enumerate` like this               \begin{enumerate}     \item this is item 1 in \ref{SectionName1}     \item this is item 2 in \ref{SectionName2}     \end{enumerate}          \section{AAA}     \label{SectionName1}     text     \section{BBB}     \label{SectionName2}     text      This generates something like this: > 1 this is item 1 in 1.2   >  2 this is item 2 in 1.3 > > AAA   >  text   >  BBB   >  text The links in the enumerate are 1.2 and 1.3. But what I want to do is something different. I want to make the entire item into a link to a section instead of just the section's number. For example: > 1 this is item 1   >  2 this is item 2 > > AAA   >  text   >  BBB   >  text I want that whenever I click on the item's text ("this is item 1" and "this is item 2") to redirect me to the section. Does anyone know how to do that?


title: glossary / acronym ; list of pages / locations : ignore the actual list of acronyms

text: I use the `glossaries` package with the `acronym` option. When I create the list of acronyms, I have a list of locations (per entry): pages, and/or subsections. The problem is that each (used) entry has the page of the list of acronyms in its list of locations... which I don't want. How to ignore it? * * * # * MWE: I'd like to have exactly the same but with no page numbers "1" in the list of acronyms (only "2"s or subsection references).               % If file save under 'mwe.tex', then compile it:          % pdflatex mwe     % makeglossarie mwe     % pdflatex mwe     % makeglossarie mwe     % pdflatex mwe     % pdflatex mwe          \documentclass[pdftex, letterpaper, 12pt, ]{article}          \usepackage[pdftex, breaklinks=true, ]{hyperref}     \usepackage[acronym, style=super3colheader, counter=page, hyperfirst=true, ]{glossaries}      \makeglossaries          \renewcommand*{\pagelistname}{Location \\ }     \renewcommand*{\glsnumberformat}[1]{\textit{#1}}          \newacronym{rhs}{rhs}{right hand side}     \newacronym{lhs}{lhs}{left hand side}     \newacronym{RMS}{RMS}{Root-Mean-Square}     \newacronym{ESA}{ESA}{European Space Agency}          \begin{document}          \glsaddall          \printglossary[type=\acronymtype, style=long3colheader, numberedsection=false, nonumberlist=false, ]          \section{Test}          \subsection{Blah}     here on the \gls{rhs} of this equation is the definition of the \gls[format=hyperbf, counter=subsection]{RMS}) that is given by the \gls*{ESA}.          \subsection{One more time}     here on the \gls{rhs} of this equation is the definition of the \gls[format=hyperbf, counter=subsection]{RMS}) that is given by the \gls*{ESA}.          \end{document}      * * * # * PDF File produced: ![PDF File produced](http://i.stack.imgur.com/OiAfV.png)


title: How would I make a colored alert box in LaTeX?

text: I would like to make something similar to the following green alert box http://twitter.github.com/bootstrap/components.html#alerts I have tried various combinations of verbatim without success


title: Edit a user written .bst file

text: I use a user written .bst file. It produces the following reference. > O’Quigley, J., Pepe, M., and Fisher, L. (1990). Continual reassessment > method: A practical design for phase I clinical trials in cancer. Biometrics > 46, 33–48. However, want the one below (it is the accepted (Harvard) style), > O'Quigley, J., Pepe, M. and Fisher, L. (1990), `Continual reassessment > method: A practical design for phase i clinical trials in cancer', Bio- > metrics 46, 33-48. That is, 1) How can I delete the comma after the second last author (Pepe, M.,)? 2) How can I change the period after the year to a comma? 3) How can I add an inverted comma for the article title? 4) How can I change the period after the title to a comma? It may sounds simple, but I don't have previous latex experience. Please help!


I installed MiKTeK 2.9.4321 in a locked down environment. I don't believe that we can directly download the entire thing from outside, and the aforementioned version is the one that we have on a CD, and it is also the one for which I got permission to install. Since I am the sole user of the computer, I installed it as non-administrator. If I rely on an administrator to install MiKTeK, I won't be able to update the packages that were included with his installation. I ran into a problem updating the packages. The Select All button is grayed out. There are countless packages (I installed every one of them), so going through to check off individual packages is infeasible. All of the packages are "updateable", as the list is titled "Updateable Packages". For context, some of the packages should be up-to-date already, and some should not be. All the ones that were installed with the installation of MiKTeK are not up to date because they came from the CD. All the packages installed afterward are up to date, but that still means there are countless packages that are not up to date. Wy would the Select All button be grayed out? Is there any other way to update all packages without having to check off millions of checkboxes? This question has been posted at:   * http://latex-community.org/forum/viewtopic.php?f=9&t=25145#add-tags   * MiKTeX package update: Select All grayed out


title: TikZ: is there a better way to represent the following node content

text: Consider the code below:               \documentclass[convert = false, border = 1cm]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \node[font = \scriptsize] at (-3.5, 4) {Position of $S_2$ when};       \node[font = \scriptsize] at (-3.5, 3.7) {$S_1$ reaches $C$};     \end{tikzpicture}     \end{document}      I used two nodes to write short explanation of a point in a figure I am constructing. However, I had to play around with the set up so they weren't spaced vertically too far a part and the second node was centered on the content of the first node. Is there a better way to this? ![enter image description here](http://i.stack.imgur.com/kTT3G.png)


title: Custom title and author position

text: I'm trying to reproduce http://faculty.kfupm.edu.sa/ME/mqahtani/Publications/21rib.J.Turbo.pdf. I was able to get something similar, but I couldn't use \maketitle, so I had to manually input the title and the authors. Here is my minimum working example:               \documentclass[10pt,english]{article}%{asme2e}          \usepackage{tabu}     \usepackage{multicol}     \usepackage{lipsum}     \usepackage{ragged2e}     \usepackage{geometry}     \geometry{verbose,letterpaper,tmargin=0.6in,bmargin=0.6in,lmargin=0.6in,rmargin=0.6in}               \begin{document}          \noindent     \begin{tabu} to \linewidth{X[2,r,m]@{\hspace{10pt}}|[6pt]@{\hspace{10pt}}X[5,l,m]}     \begin{flushright}     {\Large     Author     }\linebreak     {\small     Address \linebreak     Tel     }     \linebreak               {\Large     Author     }\linebreak     {\small     Address \linebreak     Tel     }\linebreak          {\Large     Author     }\linebreak     {\small     Address \linebreak     Tel     }\linebreak          {\Large     Author     }\linebreak     {\small     Address \linebreak     Tel     }     \end{flushright}     &     \begin{flushleft}     \huge     Test with a  long long long long long long long long long long long long long long long long long long long title     \end{flushleft}     \justify     {\it     \lipsum[1-2]     }     \end{tabu}     \begin{multicols}{2}          \lipsum[1-10]          \end{multicols}     \end{document}      Is it possible to separate the authors from the title, and still use \author and \title?


title: Babel in Basque

text: I am new to this and I would like to get what's needed to use Babel in basque. I've tried `sudo apt-get install texlive-lang-basque`, emulating an answer in this site but it doesn't work. Any help would be appreciated. the code I am trying is this               \documentclass{article}          \usepackage[Basque]{babel}          \begin{document}          euskeraz ari naiz idazten          \end{document}      and this is what the terminal shows:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)           restricted \write18 enabled.          entering extended mode          (./exponential.tex          LaTeX2e <2011/06/27>          Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.          (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls          Document Class: article 2007/10/19 v1.4h Standard LaTeX document class          (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))          (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty          ! Package babel Error: Language definition file Basque.ldf not found.          See the babel package documentation for explanation.          Type  H <return>  for immediate help.           ...                                                        l.141 \ProcessOptions*          ?


title: How can the contents of a TeX \mark be viewed?

text: The purpose of marks in TeX is to generate running heads. One inserts material to a mark, simply by:                 \mark{A running head}      If we write a short TeX program, we can see that the contents of `\mark` are not available to the `\meaning` or `\show` commands (they are displayed as `\mark`).               \mark{A running head}     \tt     \meaning\mark     \show\mark     \show\mark     \bye      How can one view the contents of a `\mark`?


title: Caption text wrapping bad way

text: I'm having some strange behavior. My captions are wrapped as at the picture. This is probably cased by .sty and .cls files provided by an academic scholar, which are quite a mess. Someone has an idea, how to try to fix this? -- I know it would be good to provide whole code from .sty and .cls but they are big. The code for the part at the picture look like this. (Generated with LyX)               \begin{minipage}[c][1\totalheight][t]{0.43\columnwidth}%     \begin{center}     \begin{figure}[H]     \centering{}\includegraphics{exemple3}\caption{A circular list of 1's}     \end{figure}          \par\end{center}%     \end{minipage}\qquad{}%     \begin{minipage}[c][1\totalheight][t]{0.43\columnwidth}%     \begin{center}     \begin{figure}[H]     \centering{}\includegraphics{exemple9}\caption{The same list unfolded to infinity}     \end{figure}          \par\end{center}%     \end{minipage}      And captions in the .sty file are set like this.               \captionsetup{font=small,labelfont={sf,bf}}      ![enter image description here](http://i.stack.imgur.com/wR7Fj.jpg) **edit** The following is an effect of this code.               \captionsetup{font=small,labelfont={sf,bf},justification=raggedright}      ![enter image description here](http://i.stack.imgur.com/2zSD2.jpg) * * * This is everything what touch packages requests (or at least I hope so). .sty               \ProvidesPackage{dcslib}[2012/03/01 v2.2 DCS Group library package]          \RequirePackage{listings}     \RequirePackage{longtable}     \RequirePackage{ifthen}     \RequirePackage{array}     \RequirePackage{graphicx}     \RequirePackage{xcolor}     \RequirePackage{url}     \RequirePackage{soul}     \RequirePackage{prettyref}     \RequirePackage{setspace}     \RequirePackage{translator}     \RequirePackage{subfig}     \RequirePackage{iftex}     \RequirePackage{amsmath}     \RequirePackage{amssymb}               % support for XeTeX and LuaTeX     \newif\ifunicodeengine     \ifXeTeX       \unicodeenginetrue     \else       \ifLuaTeX         \unicodeenginetrue       \else         \RequirePackage[utf8]{inputenc}         \RequirePackage[T1]{fontenc}       \fi     \fi     \ifunicodeengine       \RequirePackage{mathspec}       \defaultfontfeatures{Ligatures=TeX}     \fi          % patch for compatibility between listings and XeTeX based on     % http://tex.stackexchange.com/questions/25391/the-listings-package-and-utf-8     \ifunicodeengine       \input{listings-xetex-pl.tex}     \else       \RequirePackage{listingsutf8}       \lstset{inputencoding=utf8/latin2}     \fi      .cls               \ProvidesClass{dcsbook}[2012/03/01 v2.2 DCS Group book class]          \LoadClass[onecolumn,fontsize=10pt]{scrbook}          \RequirePackage[a4paper,onecolumn]{geometry}     \RequirePackage[pagestyles,clearempty,psfloats]{titlesec}     \RequirePackage{titletoc}     \RequirePackage{dcslib}[2012/03/01]     \RequirePackage[nottoc,notlot,notlof]{tocbibind}     \RequirePackage{calc}     \RequirePackage{translator}     \RequirePackage{flafter}     \RequirePackage{enumitem}     \RequirePackage{multicol}               % default monospace font     \ifunicodeengine       % can be obtained from http://www.fontsquirrel.com/fonts/DejaVu-Sans-Mono       \setallmonofonts[Scale=MatchLowercase]{DejaVu Sans Mono}     \else       \RequirePackage{lmodern}       \RequirePackage[scaled=0.82]{beramono}     \fi      .tex (generated by LyX)               \documentclass[oneside,twocolumn,english,british,thesis]{dcsbook}     \usepackage{fourier}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \pagestyle{plain}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{babel}     \usepackage{refstyle}     \usepackage{float}     \usepackage{amsthm}     \usepackage{amstext}          \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}          \usepackage{enumitem}       % customizable list environments          \usepackage{braket}     \usepackage{marvosym}     \usepackage{verbatim}     \usepackage{MnSymbol}     \usepackage{relsize}      **Solution** given by Axel Sommerfeldt in a comment _When using KOMA-Script the setting_ `format=hang` _is the default one. So it seems to me you are searching for_ `\captionsetup{format=plain}` _. See also:_ `caption` _package documentation, section "KOMA-Script"._


title: Specify which picture variant to show

text: Inside a frame I am including a `.tex` file containing a TikZ picture with several overlay specifications such that they result in 9 variants of the same picture, that is, that frame has 9 slides. Later, if I want one of those picture variants in another frame how can I get it? Is there something like this `\getoverlay{1}{\input{mytikzpicture}}` ?


title: How to produce a list of frames with Beamer if frame titles have LaTeX tags in them?

text: Related to: Is there any way to produce List of frames with beamer? The above method works if frame titles don't have tags such as `\emph{}` in them. However, if a frame title has such a tag, the error message is :               "Undefined control sequence: \end{frame}"      How can this be fixed? Here's a minimum example:               \documentclass{beamer}     \usepackage[utf8]{inputenc}          \mode<presentation>     {     \usetheme{Boadilla}     \useoutertheme{tree}     \useinnertheme{circles}     \usecolortheme{rose}     \usefonttheme{structurebold}     \setbeamercovered{transparent}     \setbeamertemplate{footline}     }          \makeatletter     \newcommand\listofframes{\@starttoc{lbf}}     \makeatother     \addtobeamertemplate{frametitle}{}{%       \addcontentsline{lbf}{section}{\protect\makebox[2em][l]{%         \protect\usebeamercolor[fg]{structure}\insertframenumber\hfill}%        \insertframetitle\par}%     }          \begin{document}          \begin{frame}     \listofframes     \end{frame}          \begin{frame}[fragile]     % error location      \frametitle{\emph{emph in frametitle}}     \end{frame}          \end{document}      Thanks.


title: Parsing some buzzwords in the Latex document and replacing them by link possible?

text: Is it possible to parse teh whole document automatically, looking for buzzwords, which I will maintain in a special list, and replacing the buzzwords by links to a predefined page e.g. a glossary?


title: scope/yscale not transforming coordinates?

text: To my understanding of the documentation, the `scope` block should transform all coordinates. However, in the following example, only circles themselves are scaled, but not their centers: black circles are without `yscale`, red ones are with `yscale=.5`, and are centered at the same points `(a)`, `(b)`: ![rendering of the pdf](http://i.stack.imgur.com/84S5H.png) What is the problem? Am I misunderstanding the docs?               \documentclass{minimal}     \usepackage{tikz}     \begin{document}         \tikz{             \coordinate (a) at (0,0);             \coordinate (b) at (0,1);             \draw (a) circle (.5);             \draw (b) circle (.5);             \begin{scope}[red,yscale=.5]                 \draw (a) circle (.5);                 \draw (b) circle (.5);             \end{scope}         }     \end{document}


title: place footnote under table above caption

text: I would like to place a `footnote` under a `table` and above the `caption`. Since I am using the `floatrow` package I went with `\floatfoot`, however there is no option to position `floatfoot` below the table and above the caption. MWE:               \documentclass[12pt]{article}     \usepackage{floatrow}     \usepackage{caption}          \floatsetup[table]{footposition=bottom}     \captionsetup[table]{labelfont=bf}          \begin{document}            \begin{table}              \begin{tabular}{lr}           Yellow & 3 \\           Green & $k-3$ \\         \end{tabular}              \caption{Apples}         \floatfoot{$k$ number of apples}            \end{table}          \end{document}


title: How to have a wrapfigure not always be below section heading

text: I have noticed that wrapfigs always place themselves under a section heading, with quite a bit of white space. This often leads to my wrapfig captions being below the bottom margin and the white space is ugly. How can I have the wrapfigure appear next to the section heading?               \section*{Type IV Secretion System}     \begin{wrapfigure}[23]{r}[-10pt]{0.35\textwidth}     \begin{center}     \includegraphics[width=0.33\textwidth]{cagy_figure_mechanism_paper.png}     \caption{The structure of the \textit{H.~pylori} T4SS. Note that the linker between cagY's type 2 repeat domains (shown in light blue) to the B10 domain is not shown~\cite{Backert2011}.}     \label{fig:pylori_t4ss}     \end{center}     \end{wrapfigure}     The C terminal domain of cagY has homology to a core complex member of the \textit{A.~tumefaciens} T4SS, VirB10~~(Figure \ref{fig:virb10_alignment_2bhv}). The T4SS has been widely studied and is ancestral....      The document the above code is snipped from looks like this compiled http://imgur.com/SM6CbtH edit: Ideally figure 3 would be on the previous page, but I was having trouble forcing that to happen as well (even with [H])


title: Pattern in \addplot inherits dashed option from previous \draw

text: I want to fill the area between two curves with a pattern, let's say horizontal line. Since I want some other dashed lines below these curves, I use `\draw[dashed]` and then `\addplot[pattern=horizontal lines]` (twice). I notice that the area is filled with two different pattern options, dashed and solid and the cause is the previous `\draw`. In fact, if I remove the `\draw` line or if I put it later in the code, the area is filled right. To solve this, I can put an "invisible" line before using `\addplot`, but I'd like to know if is there any "more elegant" solution and why `\addplot` inherits the options, what is the cause. Here's an example of the code               \documentclass{article}          \usepackage{pgf,pgfsys,pgffor}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{tikz}     \usetikzlibrary{intersections,arrows,positioning,patterns}          \begin{document}          \begin{tikzpicture}     \pgfplotstablesort\coordinates{     0 0     1 0     1 1     }     \pgfplotstablesort\coordinatesTwo{     0 0     0 1     1 1     }         \begin{axis}[ xmin=0, xmax=1, ymin=0, ymax=1]             \draw[gray,loosely dashed,line width=.8pt] (axis description cs:0,0) -- (axis description cs:1,1);             %NOTICE THE DIFFERENCE WITH AND WITHOUT THE FOLLOWING LINE UNCOMMENTED             %\draw[line width=1pt, solid] (axis description cs:0,0) -- (axis description cs:0,0.01);              \addplot[line width=1pt,no markers,solid,  pattern=horizontal lines, draw=blue] table \coordinates;             \addplot[line width=1pt,no markers,solid,  pattern=horizontal lines, draw=blue] table \coordinatesTwo;         \end{axis}     \end{tikzpicture}          \end{document}      * * * EDIT: the question can be reduced as follows, with the same effects:               \documentclass{article}          \usepackage{pgf,pgfsys,pgffor}     \usepackage{tikz}     \usetikzlibrary{intersections,arrows,positioning,patterns}          \begin{document}          \begin{tikzpicture}[x=8cm,y=8cm]         \draw[gray,loosely dashed,line width=.8pt] (0,0) -- (1,1);         %NOTICE THE DIFFERENCE WITH AND WITHOUT THE FOLLOWING LINE UNCOMMENTED         %\draw[line width=1pt, solid] (0,0) -- (0,0.01);          \draw[line width=1pt,no markers,solid,  pattern=horizontal lines, draw=blue] plot coordinates {(0,0) (1,0) (1,1)};         \draw[line width=1pt,no markers,solid,  pattern=horizontal lines, draw=blue] plot coordinates {(0,0) (0,1) (1,1)};     \end{tikzpicture}          \end{document}


title: How to get started using biblatex?

text: I just spent an hour trying to understand Bibtex, but I find it very hard to find simple instructions. I even read half of the manual. I put this in my LaTeX file `report.ex`:               % preamble          \usepackage[backend=biber]{biblatex}     \addbibresource{refs.bib}          % ...     % document          blaha \cite{guyton-hall}          \printbibliography      In `refs.bib`, I put:               @book{guyton-hall,         author = {Guyton, Arthur C. and Hall, John E.},         day = {01},         edition = {11},         howpublished = {Hardcover},         isbn = {0721602401},         keywords = {physiology},         month = sep,         publisher = {Elsevier Saunders},         title = {Textbook of medical physiology},         year = {2006}     }      What now? The manual talked about running `bibtex` on my AUX file, but then bibtex complains:               $ bibtex report     This is BibTeX, Version 0.99c (TeX Live 2009/Debian)     The top-level auxiliary file: report.aux     I found no \citation commands---while reading file report.aux     I found no \bibdata command---while reading file report.aux     I found no \bibstyle command---while reading file report.aux     (There were 3 error messages)      That happens after running `pdflatex report.tex` a couple of times. What am I doing wrong? And why is it so hard? (And why should I even run `bibtex` when I'm using `biblatex` and `biber`?)


title: How do I include and scale on-image-TikZ-drawings made by the standalone class?

text: I am building several on image TikZ drawings. In detail: I am having PDFs of technical drawings, I crop the white margins, overlay nodes and some arrows and compile them. The result should give me a nice PDF and PNG for further using and the TEX file shall be included in various bigger TeX documents. I wonder, what is the best way for doing this especially for the scaling. The labels (nodes) should always have the current document font size, the vectors (arrows) should have the same line-width all over the document. When and where should I scale? In my MWE I am letting the PDF on original size, put the nodes with relative coordinates and insert it with `\includestandalone` which results in down scaled labels. I would like to get some advice how to do this for several pictures and a big bandwidth of results for different uses.               \documentclass[]{scrreprt}     \usepackage{standalone}     \begin{document}     \begin{figure}     \includestandalone[width=0.9\linewidth]{subfiles/TopView}     \caption{Top view}\label{fig:topView}     \end{figure}     \end{document}      The file I want to insert could look e. g. like this:               \documentclass[tikz,convert=false]{standalone}     \usepackage{tikz, fp, tikz-3dplot}     \usetikzlibrary{calc, intersections, arrows, fixedpointarithmetic, decorations.markings}     \graphicspath{../images/}          \begin{document}     \begin{tikzpicture}[>=latex,line cap=round]     \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics{./images/3fan_AUTOCAD_0009.pdf}};         \begin{scope}[x={(image.south east)},y={(image.north west)}]             \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);             \foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }             \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }                 \node at (0.854,0.855) [rotate=-40]{$\vartheta^\prime$};                 \node at (0.19,0.27) [rotate=40]{$f$};                 \node at (0.055,0.605) [rotate=30]{$\delta$};                 \node at (0.53,0.63) [rotate=40]{$R$};                 \node at (0.15,0.2) [rotate=-40]{$l_\mathrm{c}$};                 \draw[-latex, black] (0.8,0.1) -- (0.8,0.3) node[pos = .5, above, rotate = 90]{$\vec{u}$};                 \draw[-latex, blue] (0.1,0.8) -- (0.3,0.8) node[pos = .5, above, rotate = 0]{$\vec{c}_\mathrm{m}$};         \end{scope}      \end{tikzpicture}     \end{document}      * * * Here you can find the PDF: PDF-Upload


title: How to complete the algorithm using algorithm2e

text: I wanted to write this flowchart using               \usepackage[linesnumbered,ruled,vlined]{algorithm2e}      ![enter image description here](http://i.stack.imgur.com/c6io6.png) However, I couldn't get what I want, please refer to my code in below               \begin{algorithm}     \DontPrintSemicolon     \KwIn{Data 1,2 to n }     \KwOut{Optimal $\alpha$ and $\beta$}     \If{ Condtion 1} {pass $\alpha_{0},\beta_{0}$}     \ElseIf {Condtion 2}{pass $\alpha_{1},\beta_{1}$}     \ElseIf {Condtion 3}{pass $\alpha_{2},\beta_{2}$}     \ElseIf {Condtion 4}{pass $\alpha_{3},\beta_{3}$}     \Else     {pass $\alpha_{4},\beta_{4}$}     \caption{Algorithm to obtain optimal $\alpha$}     \label{algo1}     \end{algorithm}      ![enter image description here](http://i.stack.imgur.com/JLjkW.png) So how I can edit this according to the picture I have attached?


title: How to implement this table in LaTeX

text: I really tried hard to do this on my own, but I keep failing ... Using multi- column and multi-row commands confused me. I know some of you might frown upon such a request but I really need help getting this table implemented .. So I'm sorry if I upset anyone. My preamble has :               \documentclass[12pt,a4paper]{report}     \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}     \linespread{1.5}      ![enter image description here](http://i.stack.imgur.com/oo5nI.png) Is there a way I can convert this from excel to LaTeX form ? I tried an add-in before but it didn't work for me. Also online generators cannot combine cells the way I want them (unless I didn't find a better table generator ? )


title: Multiple index keywords in a row

text: Is there a way to declare multiple `\index{}`keywords with a single command, instead of declaring them separately? More precisely, instead of doing `\index{keyword1}, \index{keyword2}, \index{keyword3}, \index{keyword4}`, I would like to do something like `\multipleIndex{keyword1, keyword2, keyword3, keyword4}`. Is there a way to do that?


title: How can I enter Unicode bold Fraktur math characters with LuaTeX?

text: I want to write a paper with Old/Biblical-Hebrew (Tiro) and Old-Greek words in it. Now I have made my first experience with LuaTeX and it worked well. But I also want to use this symbol http://codepoints.net/U+1D578 \- and I totally fail. Which way would you recommend? Only type it into the editor doesn't work. There is no error, but in the PDF is an empty space and no "MATHEMATICAL BOLD FRAKTUR CAPITAL M". I need exactly this one, because it stands for an old source.               \documentclass{scrartcl}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \newfontfamily\hebfont[Script=Hebrew, Scale=MatchUppercase, Ligatures=TeX]{Ezra SIL}     \newcommand{\textheb}[1]{\bgroup\luatextextdir TRT\hebfont #1\egroup}          \begin{document}             which is U+1D578 MATHEMATICAL BOLD FRAKTUR CAPITAL M          some Hebrew: \textheb{ יִשְׁאַג }          \end{document}


title: How to prevent justification in the header?

text: I am trying to prevent justification in my header. I have tried `\raggedright` so far suggested here How to prevent automatic justification of references? but no luck with this               \makeatletter     \renewcommand{\@oddhead}     {\raggedright\fontsize{10}{12}\selectfont OpenGl ES 3.0 and WebGl 1.0.2 on Android platform}     \makeatother


title: Setting the right distance to "="

text: Consider this expression: ![enter image description here](http://i.stack.imgur.com/eqlF1.jpg) How can I code this in LaTeX such that everything is aligned at the "=" sign _such that_ the distance to the left and the right of the "=" sign at each line is the same as the distance to the other "=" which aren't in some separate column to which everything has to align to. (Using for example `eqnarray` doesn't help, since in this case I can align everything at "=", but the distance to the left and the right is way off.)


title: \DeclareRobustCommand + argument of argument

text: Is impossible make somthing like this?               \documentclass[a4paper]{memoir}          \usepackage{microtype}          \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}%          \microtypesetup{expansion=false}%          \DeclareRobustCommand{\spacedallcaps}[1]{\textls[160]{\MakeTextUppercase{#1}}}%          \DeclareRobustCommand{\spacedallcapsB}{\spacedallcaps{\Large}}%          \begin{document}     {\spacedallcapsB Hallo}     \end{document}


title: How to determine page size and orientation

text: I try make a macro that has to work differently depending upon page size and orientation. What are the commands to determine page size (a4, a5, a6) and orientation (portrait or lanscape) ?


title: how to create a contents page containing speaker names and their titles for an abstracts book of a conference?

text: I have been creating a latex template for an abstract book of our workshop. I have defined new commands such as `titleoftalk`, `speaker`, `speakeaddress`, `email`, ...               \newcommand{\titleoftalk}[1]{\begin{center}{\large \bf #1}\\\end{center}}      \newcommand{\speaker}[1]{\begin{center}{\large #1}\end{center}}     \newcommand{\speakeraddress}[1]{\vspace{-0.75cm}\begin{center}{\it #1}\\ \vspace{1cm} ABSTRACT \end{center}}     \newcommand{\email}[1]{\textit{email:} \url{#1}}      and wrote my abstracts for each speaker using these new commands. I need a help to write `\addtocontents{toc}` command. Suppose we have 2 abstracts:               \speaker{Speaker 1}     \titleoftalk{Title 1}     %abstract of the first speaker is here     \speaker{Speaker 2}     \titleoftalk{Title 2}     %abstract of the second speaker is here      I want to recreate the toc page as               Title of Talks     1. Speaker 1   Title 1   ................................... the page number        2. Speaker 2   Title 2   ................................... the page number      Where and how should I write my `\addtocontents{toc}` command?


title: A command to replace \middle| when it's missing?

text: I'm using this LaTeX plugin for a Wiki (Confluence, blech), and it doesn't support the `\middle|` command. I'm guessing it doesn't have eTex primitives or some such backwardness. Anyway, I guess I can write things like               \newcommand{\fakemiddlebar}[2]{{\kern-\nulldelimiterspace\left.\vphantom{{#1}{#2}}\right|}}     \newcommand{\condset}[2]{\left\{ #1 \mathrel{\fakemiddlebar{#1}{#2}} #} \right\}}      (improved as per @egreg's suggestion). **Edit:** But I want to do better! I want to have an argument-less command with the same effect is `\middle|`. Also, I can't `\include` or `\usepackage`. Is that possible?


title: Using end-of-line delimiter in plain Tex macro

text: How is it possible to use the end-of-line character as a macro parameter ? I would like something along the lines of :               \def\mymacro#1\endlinechar{Content:#1}     \mymacro First content     \mymacro Second content      Giving the following output :               Content: First content     Content: Second content      I have tried `\endlinechar` and `\^^M` but it does not work that easily.


title: Fixate document length to n pages

text: I often find myself squeezing documents to meet ensure the final document is below some set length. I often do this by cutting whitespace, enlarging pages by a line height, etc., and of course by trying to write succinctly. Out of curiosity, is there some way to force LaTeX to compile a document to a fixed number of pages? I understand that this will most likely make the document look absolutely horrible, but I hope it will give an idea of how many darlings to kill before the document fits the length requirement.


title: Is there a semantic way to typeset table headers in LaTeX?

text: Usually, when I add tables I use `\usepackage{booktabs}` and code that looks like this:               \begin{table}[ht]         \centering         \begin{tabular}{l|rrr}         \toprule         Country / Property & Population       & Area     & HDI \\\midrule         France             & $66 \cdot 10^6$  & $\SI{668763}{\km\squared}$  & 0.89 \\         Germany            & $81 \cdot 10^6$  & $\SI{357167}{\km\squared}$  & 0.92 \\         United States      & $317 \cdot 10^6$ & $\SI{9629091}{\km\squared}$ & 0.94 \\\bottomrule         \end{tabular}         \caption{Information about countries}         \label{table:countries}     \end{table}      But is there any semantic way to mark the table header row? Or a way to change the style of a complete row / column? ![enter image description here](http://i.stack.imgur.com/ES8vl.png) ## MWE               \documentclass[a4paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[margin=2.5cm]{geometry} %layout          \usepackage{siunitx}     \usepackage{booktabs}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Begin document                                                    %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}              \newcolumntype{+}{>{\global\let\currentrowstyle\relax}}         \newcolumntype{^}{>{\currentrowstyle}}         \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%         #1\ignorespaces         }              \begin{table}[ht]             \centering             \begin{tabular}{+l|^r^r^r}             \toprule             \rowstyle{\bfseries}%             Country / Property & Population       & Area     & HDI \\\midrule             France             & $66 \cdot 10^6$  & $\SI{668763}{\km\squared}$  & 0.89 \\             Germany            & $81 \cdot 10^6$  & $\SI{357167}{\km\squared}$  & 0.92 \\             United States      & $317 \cdot 10^6$ & $\SI{9629091}{\km\squared}$ & 0.94 \\\bottomrule             \end{tabular}             \caption{Information about countries}             \label{table:countries}         \end{table}     \end{document}      ## What I've seen so far On www.latex-community.org I have seen this:               \newcolumntype{+}{>{\global\let\currentrowstyle\relax}}     \newcolumntype{^}{>{\currentrowstyle}}     \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%     #1\ignorespaces     }          \begin{table}[ht]         \centering         \begin{tabular}{+l|^r^r^r}         \toprule         \rowstyle{\bfseries}%         Country / Property & Population       & Area     & HDI \\\midrule         France             & $66 \cdot 10^6$  & $\SI{668763}{\km\squared}$  & 0.89 \\         Germany            & $81 \cdot 10^6$  & $\SI{357167}{\km\squared}$  & 0.92 \\         United States      & $317 \cdot 10^6$ & $\SI{9629091}{\km\squared}$ & 0.94 \\\bottomrule         \end{tabular}         \caption{Information about countries}         \label{table:countries}     \end{table}


title: Broken pgfornaments with eso-pic

text: I really like the ornaments that this block of code makes for me:               \usepackage{eso-pic}     \makeatletter     \AddToShipoutPicture{%     \begingroup     \setlength{\@tempdima}{2mm}%     \setlength{\@tempdimb}{\paperwidth-\@tempdima-2cm}%     \setlength{\@tempdimc}{\paperheight-\@tempdima}%     \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimc}){%     \pgfornament[anchor=north west,width=2cm]{63}}     \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%     \pgfornament[anchor=south west,width=2cm,symmetry=h]{63}}     \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdimc}){%     \pgfornament[anchor=north east,width=2cm,symmetry=v]{63}}     \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima}){%     \pgfornament[anchor=south east,width=2cm,symmetry=c]{63}}     \endgroup     }     \makeatother      It comes from page 11 of pgfornament and it makes all four corners have these pretty ornaments that you see in the linked PDF. Last year I used it myself for several of my documents and achieved identical results as what you see in the linked PDF, but this year it seems to be breaking with no informative error message. Instead of all four corners getting these nice ornaments, now only the two left corners get the ornaments and the typesetting process halts with this error message for every decorated page:               Missing number, treated as zero.     <to be read again>     \relax      I think I must have upgraded one or more packages since I last used this code successfully and that's probably why it's breaking, but I'm mystified by the error message and clueless as to how to fix the problem. I've confirmed (by commenting out the block of code) that this code is definitely what is throwing the error message, and even though I can continue compiling with "s", the PDF output no longer has all 4 corners decorated, so I'd like to fix it. Any suggestions on how to fix this?


title: Arrange subfigure according to the text

text: I have a little issue. I have a figure made by 5 subifgures. They fill perfectly a page. The problem is that, when I have some lines of text before the image, the figure goes to the next page without "splitting", so I have a page with only a few lines and, in the other page, my figure, and it's not so pleasant to see. So I would like to have, for example, a few lines then two subfigures and the other 3 subfigures in the other page and so on. According to the white space. I searched a bit for similar questions, but I didn't find a similar problem. Thanks in adivce.