title: footnote \index

text: Dear all I think I have a problem with the collation of `makeidx`. following some suggestions found here I have got in the text something like this               \index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|qt}          \index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00868 @868f-869b|nn{\thefootnote}}      the first is an `\index` entry in the text, the second in a footnote. My problem is that even if I put the sort also on the second level of indexing it keeps keeping them separated. I use this package information               \usepackage[splitindex]{imakeidx}     \makeindex[name=n, title=Nomi di persone e luoghi]      \makeindex[name=p, title=Passi citati nel testo]     \makeindex[name=t, title=Altri testi citati]     \makeindex[name=pap, title=Papiri e manoscritti citati nel testo]          \newcommand{\nn}[2]{#2 \textit{n}#1}     \newcommand{\qt}[1]{\textbf{#1}}      in the `.idx` file I get this               \indexentry{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|hyperindexformat{\qt}}{8}          \indexentry{Plutarco!demalignitate@\textit  {De Malignitate Herodoti}!00868 @868 b-c|hyperindexformat{\nn{33}}}{10}      can somebody advise me on what I am doing wrong here, please? I have tried to use `\string` after the first sort with no effect. * * * sure, sorry: this is the file I'm using               \documentclass[12pt,a4paper]{book}     \usepackage[utf8x]{inputenx}      \usepackage{palatino}            \usepackage[LGR,T1]{fontenc}     \usepackage[english,german,polutonikogreek,italian]{babel}          \usepackage[splitindex]{imakeidx}     \makeindex[name=p, title=Passi citati nel testo,columns=1]     \newcommand{\nn}[2]{#2 \textit{n}#1}     \newcommand{\qt}[1]{\textbf{#1}}     \usepackage[hidelinks]{hyperref}     \begin{document}      (855A\index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|qt})%     \footnote{DHM 868 B-C\index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00868 @868 b-c|nn{\thefootnote}}}     \printindex[p]     \end{document}


title: Hyperref does not place anchor at the right place

text: The following modification of the report class definitions of the `makechapterhead` and `makeschapterhead` does not play well with the hyperref package. In particular, clicking on the bookmarks does not get to the right place.               \documentclass{report}     \usepackage{lipsum}      \usepackage{hyperref}     \makeatletter           \renewcommand{\@makechapterhead}[1]     {\vspace*{-40\p@}      {\parindent \z@ \raggedright \normalfont      \hrule                                       \vspace{5pt}                                 \ifnum \c@secnumdepth >\m@ne      \LARGE\scshape {{\bfseries\@chapapp\space \thechapter}              \par\nobreak              \vskip 5\p@              \fi                  \interlinepenalty\@M             \Large\scshape #1\par                        }       \vspace{5pt}                                 \hrule                                       \nobreak      \vskip 40\p@      }     }               \renewcommand{\@makeschapterhead}[1]     {\vspace*{-40\p@}      {\parindent \z@ \raggedright\normalfont      \hrule       \vspace{5pt}      \interlinepenalty\@M      \Large\scshape{#1\par}      \vspace{5pt}      \hrule      \nobreak      \vskip 40\p@      }     }     \makeatother     \begin{document}     \tableofcontents          \cleardoublepage     \phantomsection     \addcontentsline{toc}{chapter}{\protect\numberline{}Preamble}     \chapter*{Preamble}     \lipsum[1]          \cleardoublepage     \phantomsection     \addcontentsline{toc}{chapter}{\protect\numberline{}Preface}     \chapter*{Preface}     \lipsum[2]          \chapter{Introduction}      \end{document}      Any help would be appreciated.


title: I need an hrule, but not when at the top of the page

text: I have a multi-page document that has many small sections split with \hrule lines. Occasionally a section will end immediately before a page break, and so the next section will begin right at the top of the next page. The \hrule above the new section on the new empty page then ends up looking silly. Is it possible to define a macro like \hruleButOnlyIfNotAtTopOfPage? Note that I'm using Plain TeX.


title: Lua calculation fails with a negative number

text: The macro runs except when the real b is negative. Why ?               \documentclass[a4paper,12pt]{article}     \usepackage[upright]{fourier}     \usepackage[no-math]{fontspec}     \usepackage{luacode,luatextra,luaotfload}     \begin{document}     \newcommand\racine[3]{%     \luaexec{     local d=math.pow(#2,2)-4*#1*#3     local r_1     local r_2     local r     if d>0 then     r_1=(-#2-math.sqrt(d))/2*#1     r_2=(-#2+math.sqrt(d))/2*#1     tex.print("The discriminant is\\ " .. d .. ".\\par")     tex.print("The first root is\\ " .. r_1 .. ".\\par")     tex.print("The second root is\\ " .. r_2 .. ".\\par")     elseif d==0 then     r=-#2/2*#1     tex.print("The discriminant is\\ " .. d .. ".\\par")     tex.print("The double root is\\ " .. r .. ".\\par")     elseif d < 0 then     tex.print("The discriminant is\\ " .. d .. ".\\par")     tex.print("There are no real solutions.")      end     }}          \racine{10}{-3}{5}     \end{document}      The error message is :               ! LuaTeX error [string "\directlua "]:1: unexpected symbol near <eof>.     \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 }          l.28 \racine{10}{-3}{5}          ?      I would like the solutions, when possible, be written as a fraction.


title: Improper symbol mark of footnote in minipage environment

text: I think that the `footmisc` package has predefined the `sympol` mark series, but in minipage environment they become invalid. See below               \documentclass{book}          \usepackage[symbol*,stable]{footmisc}          \usepackage[paperheight=5cm,showframe]{geometry}          \begin{document}          \begin{minipage}{3in}          Here the text in environment\footnote{the footnote in minipage}          \end{minipage}          \vfil          \parbox{3in}{Here the text in parbox\footnotemark}          \footnotetext{the footnote in parbox}          \end{document}      ![enter image description here](http://i.stack.imgur.com/UBDlp.png) How could I get the symbolical footnotemark in `minipage`?


title: How to draw a circle with a triangle in TikZ?

text: Be sorry that I cannot provide the coordinates of all points, or I can draw the picture. How can I make this figure? Thanks for any help! ![enter image description here](http://i.stack.imgur.com/asJVM.jpg)


title: Cramped style again. Working simple code

text: Some time ago Taco Hoekwater proposed an approach for getting a cramped style for math expressions.               \newdimen\savedrulethickness          \def\docramped#1#2{         \savedrulethickness=\fontdimen8\textfont3         \hbox{$\fontdimen8\textfont3=0pt#1\overline{#2}$}         \fontdimen8\textfont3\savedrulethickness     }          \def\cramped{\mathpalette\docramped}      It works nice               $$     x' \cramped{a'}     $$      so that prime in `a'` is positioned slightly lower then in the regular case `x'`. However there is one bug here. The macros does not work for a `\scriptscriptstyle`:               $$     \scriptscriptstyle     x' \cramped{a'}     $$      An excessive bar is displayed over symbols (`\textstyle` is processed well). I find the code to be useful so I wonder could someone to fix the bug and explain me what the first `#1` and second `#2` arguments in `\docramped` do? Their meaning? Also, I would not like to use some external packages for these purposes because the code above is elegant and very simple. Thanks beforehand.


title: Texniccenter asking for Proxy Authentification for every compilation

text: Up to yesterday, Texniccenter was working perfectly until I installed a couple of packages using `Miktex 2.9->Maintenance(Admin)->Package Manager(Admin)` and now, texniccetner is asking for Proxy authentification for every compilation. It is normal that he does that once when a new package is needed (because I activated the install on the fly option), but once the required package is installed, Miktex does not need to download anything, isn't it?


title: fibonacci numbers

text: Hi I am trying to do Fibonacci below is the code but I am getting some error               \newcount\n \newcount\np \newcount\npp \newcount\m \newcount\f     \def\fibonacci#1{{\ifnum #1<3 1\else     \np=1\npp=1\m=3     \loop\ifnum\m<#1\f=\npp\npp=\np\advance\np by\f\advance\m by 1\repeat     \f=0\advance\f by\np\advance\f by\npp     \number\f\fi}}     \def\printfibonacci#1{\m=#1\advance\m by 1     \n=1     \loop\ifnum\n<\m\fibonacci{\n}, \advance\n by 1\repeat...}     \printfibonacci{16}     \bye      error:               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.11 \printfibonacci{16}          ?


title: Avoid addition of spaces when using colorbox in equations

text: Colorbox adds some spaces when I use it in equations. E.g. in               \documentclass[12pt]{article}     \usepackage{xcolor}          \begin{document}          \colorbox{yellow}{${a^2}+b^2=c^2$}     \colorbox{yellow}{$\colorbox{blue}{$a^2$}+b^2=c^2$}          \end{document}      the second equation is longer than the first (just taking into account the mathematical symbols). Is there a way to prevent this? Note that I do not mind that the size of the boxes is larger than the enclosed symbols and that the boxes could overlap symbols which are not enclosed if no spaces are added. Note also that I would like to avoid adding negative spaces by hand.


title: Left-aligning all text in itemized list (beamer)

text: I'm trying to make an itemized list in beamer (using the `beamerposter` package). By default, the text of first-level bullet points is left-aligned at the same point as non-list text, and the bullet actually comes before that. I want the bullet point to be aligned with or even further right from the non- itemized text, so I added a line to indent it (`\setlength` etc.):               \begin{block}{Evaluation}         Compare seasonality estimated by our method with that in:         \begin{itemize}             \setlength{\itemindent}{1.5em}             \item ``Agricultural" grid cells ($p_a > 0.8$)              \item ``Non-agricultural" grid cells ($p_a < 0.2$)             \item 80\% threshold based on the land cover classification scheme for cropland discussed by \citep{Hansen:2000wm}.         \end{itemize}     \end{block}      Here is a picture of the result: ![picture of the result](http://i.stack.imgur.com/xUEny.png) Unfortunately, this solves one problem and creates another. The third item has to have a line break, and the text on the second line is not left-aligned with the rest of the itemized list text. How do I make it align?


title: Creating user defined snippet in TikzEdt

text: Is it possible to create user defined snippet in `TikzEdt`? http://www.tikzedt.org/ If it is possible, how to do that?


title: Using \newcommand works fine in LaTeX, but when I use htlatex the line of text that \newcommand was supposed to insert gets moved to the next line?

text: So, I'm trying to write lines of code explaining to new students where to find different files and directories. Because the classname changes on a yearly basis I set up a `\newcommand` to make changing every class-name in the document at the same time possible. This is what my document looks like:               \documentclass[11pt]{paper}          \usepackage[formats]{listings}     \usepackage{hyperref, xcolor, graphicx}          \lstnewenvironment{lst}                             %Code-environment     {\lstset{basicstyle=\ttfamily\color{magenta},escapechar={§}}}{}          \newcommand{\class}{g2014048}                       %Classname          \begin{document}          \begin{lst}     $ cd /proj/§\class§     \end{lst}          \end{document}      When rendered into a `.pdf` it looks good, everything on one line: > $ cd /proj/g2014048 But when I later use the `htlatex`-command in terminal to create a `.html` every "`\class`" gets a linebreak ahead if it: > $ cd /proj/ > > g2014048 Because it is a single line of code, I would like it to be that in the `.html` as well. How can I do this?


title: Nice size of image of graph by staying the table at the same page

text: If I make the height of the image more than 3cm, the table will automatically go to newpage which I don't want to. How can I make the table stay while having a nice image at the top-right of the paper?                  \documentclass{article}        \usepackage{tikz}        \usepackage{graphicx}        \begin{document}         \thispagestyle{empty}         \noindent \noindent\begin{minipage}{.6\textwidth}          \textbf{Standard Normal Cumulative Probability Table}         \end{minipage}         \begin{minipage}{\textwidth}          \centering          \includegraphics[height=3cm]{ztable.png}           \end{minipage}                    \begin{center}                   \begin{tabular}{c|c c c c c c c c c c c}               \multicolumn{11}{c}{\textbf{Cumulative probabilities for POSITIVE z-values are                            shown in the following table}} \\ \hline         $\textbf{z}$&\textbf{0.00}&\textbf{0.01}&\textbf{0.02}&\textbf{0.03}&\textbf{0.04}&\textbf{0.05}&\textbf{0.06}&\textbf{0.07}&\textbf{0.08}&\textbf{0.09}\\          \hline \hline          \textbf{0.0}&0.5000&0.5040&0.5080&0.5120&0.5160&0.5199&0.5239&0.5279&0.5319&0.5359\\         \textbf{0.1}&0.5398&0.5438&0.5478&0.5517&0.5557&0.5596&0.5636&0.5675&0.5714&0.5753\\         \textbf{0.2}&0.5793&0.5832&0.5871&0.5910&0.5948&0.5987&0.6026&0.6064&0.6103&0.6141\\             \textbf{0.3}&0.6179&0.6217&0.6255&0.6293&0.6331&0.6368&0.6406&0.6443&0.6480&0.6517\\             \textbf{0.4}&0.6554&0.6591&0.6628&0.6664&0.6700&0.6736&0.6772&0.6808&0.6844&0.6879\\            \textbf{0.5}&0.6915&0.6950&0.6985&0.7019&0.7054&0.7088&0.7123&0.7157&0.7190&0.7224\\              \textbf{0.6}&0.7257&0.7291&0.7324&0.7357&0.7389&0.7422&0.7454&0.7486&0.7517&0.7549\\              \textbf{0.7}&0.7580&0.7611&0.7642&0.7673&0.7703&0.7734&0.7764&0.7794&0.7823&0.7852\\              \textbf{0.8}&0.7881&0.7910&0.7939&0.7967&0.7995&0.8023&0.8051&0.8078&0.8106&0.8133\\             \textbf{0.9}&0.8159&0.8186&0.8212&0.8238&0.8264&0.8289&0.8315&0.8340&0.8365&0.8389\\              \textbf{1.0}&0.8413&0.8438&0.8461&0.8485&0.8508&0.8531&0.8554&0.8577&0.8599&0.8621\\                     \end{tabular}           \end{center}           \end{document}      ![enter image description here](http://i.stack.imgur.com/8j0DF.png)


title: Passing two or more dimensional arrays to lua

text: I can write:                \def\myarray{{Nrs,1,2,3}}      then I can call lua:                 \luadirect{myfunc(\myarray)}      and access the values in the array/table. How would one do it for multidimensional ones? I initially thought to define a multidimensional array in Tex, but I googled and search through all the pdf docs and did not even find the definition of an array. So now I decided my only option would be:                \def\myarray_a{{name,1,2,3}}      \def\myarray_b{{name_b,1,4,5}}      \luadirect{myfunct(\myarra_a,\myarray_b)      That should work fine, but I still would like to know if there is another way. * * * I wanted to pass a n X m array from lualatex to lua. I google and found somewhere to define an array in latex you do:                  \def\myarr{{1,2,3}}      that I used before, but I could not figure out how to pass a n x m array. So I asked and then also experimented. This is a MWE:               \documentclass{article}     \usepackage{luacode,luatextra}          \begin{luacode*}      function atest(arrs)        tex.print('type of parameter received: '..type(arrs)..'; containing: \\par')        for i,v in ipairs(arrs) do          tex.print('i='..i..', type='..type(v)..', name='..v.name..', v[1]'..v[1]..'\\par')          v[1]=v[1]*2;        end      end     \end{luacode*}          \begin{document}     \def\flowa{{         {name="Arr1",1,2,3},         {name="Arr2",4,5,6}         }}     \hrulefill          \textbf{\underline{The values:}}\\          \flowa\\          \textbf{\underline{As seen by lua:}}\\          \luadirect{atest(\flowa)}          \hrulefill          \textbf{\underline{Passing by reference (no changes):}}\\          \flowa     \end{document}      This produces: ![the result](http://i.stack.imgur.com/dxjTu.png) but it is, as shown, passing by value.


title: Lualatex: Font table with examples

text: I wanted to create a table of the fonts on my machine with short examples of each. So I got the function below and tried to modify to print the font in its typeface. (LuaLatex)               \documentclass[10pt,a4paper]{article}     \usepackage{fontspec}     \usepackage{luacode,luaotfload,luatextra}     \usepackage[margin=18mm]{geometry}          \begin{document}     \begin{luacode}     myfonts=dofile(fonts.names.path.localdir..'/otfl-names.lua')     --tex.print('\\begin{verbatim}\\par')     for i,v in ipairs(myfonts.mappings) do       --tex.print('\\fontspec{' .. v.fontname .. '}')   % most recent attempt       --tex.print('\\setmainfont{' .. v.fontname .. '}') % first attempt     tex.print(v.familyname..', '..v.fontname..'\\par')     end     --tex.print('\\end{verbatim}\\par')     \end{luacode}          \end{document}      Both of the commented lines does not work (fontspec or setmainfont). How should go about doing this with lua?


title: Lots of tables, no go

text: I have a file with +30 tables that I would really like LaTex to parse but of course it gets all floaty and can't decide where to place them and so goes belly up. Any suggestions on on how to get this done?


title: Enlarge list of listings

text: I'm using               \cleardoublepage     \renewcommand{\lstlistlistingname}{Quellcodeverzeichnis}     \enlargethispage{\baselineskip} %EITHER     \lstlistoflistings     \enlargethispage{\baselineskip} %OR THIS     \addcontentsline{toc}{chapter}{Quellcodeverzeichnis}     \cleardoublepage      but this doesn't work: I get ONE listing-reference on the new page. It has a new chapter number, thus there's probably one empty line inbetween. That's why I also tried to increase by `\enlargethispage{3\baselineskip}`: Doesn't work either. Any idea? Thanks!


title: \subsubsection command and xcolor package

text: I am using `xcolor` package to draw some colored tables. But I am having trouble with the `\subsubsection` command. When I block comment the colored tables and `xcolor` package, it works. When I do not use any `subsubsection`, it works. But when I use both at the same time, I get the errors below. Any one knows the solution? Thank you.               ! Missing number, treated as zero.          <<to be read again>to be read again>          }          1.545 \subsubsection{Improved Bounds} I          n this part,          ! Color stack action is missing.          <<to be read again>to be read again>          }          1.545 \subsubsection{Improved Bounds} I          n this part,


title: Changing the location of an element in the header using scrlayer-scrpage

text: In fancyhr               \fancyheadoffset[LO]{\marginparsep+\marginparwidth}      moves odd page left element in the header. _Do we have any facility like this in **scrlayer-scrpage**?_ MWE               \documentclass[12pt, twoside=semi]{scrbook}          \usepackage[paperwidth=170mm, paperheight=240mm, left=142pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt     %,bindingoffset=30pt     ,asymmetric     ,reversemarginpar     ,showframe]{geometry}          \usepackage[headsepline]{scrlayer-scrpage}     \setheadwidth[0pt]{textwithmarginpar}          \clearscrheadfoot     \ihead{\headmark}     \ohead{\pagemark}          \usepackage{blindtext}          \begin{document}     \pagestyle{scrheadings}          \blinddocument          \end{document}


title: On pitfalls of robust commands

text: These days, I’m more and more defining _robust_ commands, e.g., using `\newrobustcmd` (`etoolbox` package) or `\NewDocumentCommand` (`xparse` package). Robust commands seem advantageous to me in many respects and, in fact, other people do think the same. To quote from the section of the `xparse` package documentation dedicated to the tools supporting the definition of non-robust (i.e. fully expandable) commands: > There are _very rare_ occasion[s] when it may be useful to create functions > using a fully-expandable argument grabber. To support this, `xparse` can > create expandable functions as well as the usual robust ones. […] This > facility should only be used when _absolutely necessary_ ; if you do not > understand when this might be, _do not use these functions_! Yet I’ve made the experience that robust commands have their pitfalls. Consider, for instance, the following minimal example:               \documentclass{article}          \usepackage{etoolbox}          \newrobustcmd*{\test}[1]{%       \ifblank{#1}{blank}{not blank}%     }          \begin{document}          \tableofcontents          \section{\test{\empty}}          \end{document}      The output is rather unsatisfying since the decision of `\test` on the nature of its argument is context-dependent: ![](http://i.stack.imgur.com/tExYx.png) What shall I do in this and similar situations? Resort to `\newcommand`?


title: using grid from Tikz in Texmaker

text: I use Tikz for creating figures. But there is a problem. If I use for example               \begin{tikzpicture}     \draw[->] (0,0)--(10,0);     \draw[->] (0,0)--(0,10);     \draw[help lines] (-0.1,-0.1) grid (9.9,9.9);      \draw[thick] (0,0) -- (4,4) -- (5,9) -- (0,0);     \end{tikzpicture}      in TikzEdt then the lines from the grid are grey. But If I use the code in Texmaker then the grid lines are all black and looks like the lines from the axes. ![enter image description here](http://i.stack.imgur.com/m3PY1.png) ![enter image description here](http://i.stack.imgur.com/TVyAL.png) Both programs use pdflatex. I can't find out why they gave me different results. I also copy the preamble from tikzedt to texmaker.


title: eqref in captions with mathtools

text: I've now tried `mathtools` for the first time, for the sake of `showonlyrefs`. It works fine, except if I put an `\eqref` command into a figure caption, in which case I get:               ! Argument of \@caption has an extra }.     ! Paragraph ended before \@caption was complete.      Here is the MWE:               \documentclass{article}     \usepackage{amsmath}     \usepackage{mathtools}     \mathtoolsset{showonlyrefs=true,showmanualtags=true} % do not number unreferenced equations     \begin{document}       \begin{equation}\label{eq:EVE-HEH}         x       \end{equation}       \begin{figure}         \caption{See eigenvalue equation \eqref{eq:EVE-HEH}.}       \end{figure}     \end{document}      What do I do wrong? **Update:** Found here that `\protect` before `\eqref` in caption helps, and indeed it does. However this is not mentioned in the `mathtools`. Is it the right solution?


title: Demoting/Promoting sections, chapters, etc

text: Consider following structure:               .     |_s     |_s      |_ss      |_ss+       |_sss      |_ss     |_s     |_s      How can I demote a subsection to subsubsection without changing markups ?               .     |_s     |_s      |_ss       |_sss+        |_p      |_ss     |_s     |_s      How can I promote a subsection to section without changing markups ?               .     |_s     |_s      |_ss     |_s+      |_ss      |_ss     |_s     |_s      A wrapper command would be excellent               \begin[+1]{level}     \section{}     \end{level}


title: Academic information

text: Is there any package that extends article class, so formating paper title can became a little easier and cleaner? In particular email, role, university name ,.... I mean a clean preamble like following:               \documentclass{article}           \title{Easy LaTeX}     \begin[columns=3]{authors}        \author[email=s@aut.ac.ir, university=Amirkabir,city=Tehran,country=Iran]{B. Baxci }        \author[email=ss@aut.ac.ir,university=Amirkabir,department=IT and computer,city=Tehran,country=Iran]{A. Naseri }        \author[email=far@aut.ac.ir,afeliation=Nano Research Center,city=Tehran,country=Iran]{F. Farhadi }     \end{authors}          \begin{document}     % all good stuff      \end{document}      If there is no package, what is best practice for outputting common academic information.


title: Creating Large Math Boundaries

text: I was wanting to know of a useful way to create large `\left\langle` and `\right\rangle` commands. I have tried all up-sizing commands but get a message that they cannot be used in math mode. Such as:               \large     \Large     \LARGE     \huge      Also I have tried, `\left\left\langle...\right\right\rangle` to no working either. MWE:               \documentclass[11pt,a5paper]{article}          \usepackage{amsmath}          \def\P{\mathbf{P}}     \def\Q{\mathbf{Q}}     \def\la{\left\langle}     \def\ra{\right\rangle}          \begin{document}          \begin{align*}           \P-\Q \;&=\; \large\la (1-(-2)), (2-1), (-1-3) \large\ra \\          \;&=\; \la 3, 1, -4 \ra. \\          \\                                                        |\P-\Q| \;&=\; \sqrt{x^2+y^2+z^2} \\          \;&=\; \sqrt{(3)^2 + (1)^2 + (-4)^2} \\          \;&=\; \sqrt{9+1+16} \\          \;&=\; \sqrt{26}          \end{align*}          \end{document}


title: What's the benefit of loading babel when writing in English?

text: When writing in English what is the benefit of loading `babel`, by `\usepackage[english]{babel}`, except for the possibility of setting it to use specific English dialects as described in babel: english, american, USenglish? For example I know that `biblatex`, `csquotes` and `microtype` can work together with `babel` but their features seems to only make sense when writing in other languages than in English.


title: Appendix headers in Bookmarks contain spurious string

text: I am writing a book using the Cambridge 6A class of Cambridge University Press. The headers of the appendixes in the bookmarks hierarchy contain a spurious string. The TOC at the beginning of the book reports the correct headers though. Example: In the TOC it appears correctly as: _Appendix A_ Thermodynamic properties of substances In the Bookmarks it appears as: to 1.25Appendix AThermodynamic properties of substances The string "to 1.25" appears in all the headers of the Appendixes, and in all of them a space is missing between the letter and the title. I looked around extensively but I have no clue. Thank you very much


title: Convert my CV to LaTeX: how to stretch text blocks vertically to fill page and color the headings

text: I am trying to convert my CV below to latex. Currently I have manually created it in Inkscape. I have already managed to get the headings and footers right: Code:               \usepackage{xcolor}     \usepackage{fancyhdr}     \usepackage{fontspec}          \definecolor{ihorange}{RGB}{241,98,55}          \setmainfont{Ubuntu Light}     \newfontface\footerfnt[LetterSpace=2.1]{Sansation}     \newfontface\headerfnt{Sansation Bold}          \newcommand\contactinfo{\fontsize{8pt}{8}\selectfont\headerfnt My address \\ postal code and city \\ telephonenr }          \newcommand\footertext{\fontsize{10pt}{15}\selectfont\footerfnt e: email@address /// w: www.ebsi.te /// skype: skyphandle /// twitter: @twitterhandle}          \newcommand\ColTopRule{%     {\noindent\color{ihorange}\rule{\textwidth}{1pt}}}          \newcommand\ColBotRule{%     {\noindent\color{ihorange}\rule{\textwidth}{1pt}}}          \newcommand\Header{%     \noindent\makebox[\textwidth][l]{%     \parbox{0.5\textwidth}{\contactinfo}%     \parbox{0.5\textwidth}{%     \hfill\includegraphics[height=25.409pt]{ihlogo}}}\par\vskip1ex%     \par\ColTopRule\par}          \newcommand\Footer[1]{%     \ColBotRule\par     \noindent     \hbox{\footertext}     }          \fancyhf{}     \fancyhead[C]{\Header}     \fancyfoot[C]{\Footer}     \renewcommand{\headrulewidth}{0pt}     \setlength\headheight{70pt}     \pagestyle{fancy}      But I'm struggling howto do the content. A typical cv-entry looks like this: **position**   **@ company/organisation**   _period of time_   description of the job What I want to achieve is that:   1) It all stays on 1 page   2) Space between textblocks are evenly distributed in each column from top to bottom of page   3) textblocks fill each columns vertically   4) I can control the color of each heading   5) If possible make use of a CV package that can be modified to look like this ![My CV made with Inkscape and pixelated](http://i.stack.imgur.com/VdZzt.jpg)


title: Deleting new line when beginning new theorem in a list

text: I am using the package `amsthm` to type my assignments and I have encountered the following problem. Here's the code I use:               \newtheorem{claim}{Claim}     :     :     \begin{enumerate}           \item     \begin{claim}         $lefthalf(L) := \{w_1 :  \exists w_2 \in \Sigma^*.w_1w_2 \in L.|w_1| = |w_2|\}$.     \end{claim}          \item      {\textbf{Claim 1.}} $lefthalf(L) := \{w_1 :  \exists w_2 \in \Sigma^*.w_1w_2 \in L.|w_1| = |w_2|\}$.          \end{enumerate}      This gives the following result: ![New line problem while using newthm in lists](http://i.stack.imgur.com/N4rDD.png) As you can see in (a), the claim begins on the second line. I would like my claim to be as in (b) where I simulate the style I want. Is there any way I could get rid of this extra newline occuring when I use `newthm` in a list? I have tried to change `theoremstyle` but couldn't get it to work. Any ideas on how to solve this problem? Thanks a lot.


title: How can I put colon in a abstract and justify it?

text: I need something like this (with colon, justify it and capital letter):               ABSTRACT:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx      Now I just have something like this:                                       Abstract     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx      I am using:               \documentclass[11pt, twoside, a4paper, twocolumn]{article}


title: Dec sep align & string type cell incompatibility?

text: I would like to use the `dec sep align` feature of `pgfplotstable` while having certain cells containing text. I tried this:               \documentclass{article}          \usepackage{pgfplotstable}     \usepackage{booktabs}          \begin{document}          \pgfplotstabletypeset[%     col sep=&, row sep=\\,header=false,     every head row/.style={before row={\toprule}, after row={\midrule}},     every last row/.style={after row=\bottomrule},     display columns/0/.style={column name={A}, string type, column type={l}},     display columns/1/.style={column name={B}, dec sep align={l}},     display columns/2/.style={column name={C}, dec sep align={l}},     every row 2  column 1/.style={string type},     every row 3  column 1/.style={string type},     ]     {%       Xyzzy ! &     208.5  &   42.01  \\       Nothing &    7.91  &   42.1  \\       Happens &     --   &   200.2 \\       \ldots  &      z   &  4.54 \\     }     \end{document}      But the result turned out to be this : ![Buggy table](http://i.stack.imgur.com/jA4ak.png) Do you know why the separations between the text cell and the next get swallowed? How could I correct this behaviour? I would welcome any suggestion that allows to produce a correctly spaced tables (with alignment on the decimal separator), even if I must part with `pgfplotable` for that particular one. I would rather stick to it though so that I can keep most of my tables as is. _I exised my previous edit to make another question (see here) for fear it would be too confusing to have them together_


title: Footnote in block statement

text: I have a presentation to make, and in this I present a quote in a block, like this:               \begin{block}{Quote headline}      Some truly great words some man made before me.     \end{block}\footnote{And this is where the man made his words}      Unfortunately, Latex destroys the layout in such a way, that the footnote index is shown in a new line, not right after the block. My first try was to put the footnote into the block. In that case, the footnote itself was shown in the block, but I'd like to have it at the bottom of the page.


title: \rule doesn't work inside an \xdef command

text: This code:                \documentclass{article}        \begin{document}        \def\a{}        \newcounter{mycounter}        \def\b#1{        \def\p{#1}          \ifnum\value{mycounter}=0              \long\xdef\a{\a\rule{3mm}{3mm}\par #1}          \else              \long\xdef\a{\a #1\ }         \fi        }        \b{A}\b{B}\b{C}\b{D}\b{E}\b{F}        \setcounter{mycounter}{1}        \b{G}\b{H}\b{I}\b{J}\b{K}        \a        \end{document}        throws the ERROR:                "!Paragraph ended before \@newctr was complete.<to be read again>\par b{A}"        What's happening?


title: underline the doi entry with natbib and abbrvnat style

text: is it possible to modify the `abbrvnat.bst` style from the `natbib` package so it underlines automatically the `doi` number in the generated bibliography?


title: How to define a macro with parameters inside a beamer frame

text: To ease the typesetting of nontrivial beamer frames I often employ local helper macros. This is not too easy in beamer, as defining a macro with parameters (e.g., `\def\myfmt#1{\emph{#1}}`) between `\begin{frame}` and `\end{frame}` fails with:               ! Illegal parameter number in definition of \beamer@doifinframe.     <to be read again>                     1     l.11 \end{frame}      The commonly mentioned workaround for this is to define the macro outside of the frame together with the latter inside a group:               \bgroup     \def\myfmt#1{\emph{#1}}     \begin{frame}[label=problem]{A frame that uses a ,,local'' macro}       \myfmt{Slide content}     \end{frame}     \egroup      This, however, does not work if one wants to use the frame with `\againframe` later (complete MWE):               \documentclass{beamer}     \begin{document}          \bgroup     \def\myfmt#1{\emph{#1}}     \begin{frame}[label=problem]{A frame that uses a ,,local'' macro}       \myfmt{Slide content}     \end{frame}     \egroup          \bgroup     \def\myfmt#1{\color{red} #1}     \begin{frame}{Another frame that uses a ,,local'' macro}       \myfmt{Slide content}     \end{frame}     \egroup          % fails with "Undefined control sequence \myfmt"     \againframe{problem}          \end{document}      Apparently, `\againframe` does insert only the content that was defined between `\begin{frame}` and `\end{frame}` - which makes sense, of course. So how can I define "frame-local" helper macros that work with `\againframe`?


title: marking statistically significant results in bar graph using pgfplots

text: I'm making a bar chart with pgfplots and would like to put an asterisk above some bars to show statistical significance (p < 0.05). Any ideas? Here's an example graph:               \begin{tikzpicture}     \begin{axis}[         symbolic x coords={(a),(b),(c),(d),(e)},         xtick=data]         \addplot[ybar] coordinates {             ((a),51365) % I'd like to put an asterisk above some of these             ((b),74531)             ((c),52862)             ((d),78999)             ((e),71825)         };     \end{axis}     \end{tikzpicture}


title: Package Algorithmic in French

text: I use               \usepackage[section]{algorithm}       \usepackage{algorithmic}      to create an algorithm, I'd like to change "`algorithm`, `begin`, `end while` ..." to French. Is that possible? This is my example with the package `\usepackage{algorithmic}`:               \newcommand{\algorithmicfor}{\textbf{Pour}}     \begin{algorithm}[H]      \Begin{ \For{$x\in X$}{ $NbSuccInS(x)      \longleftarrow 0$\; $NbPredInMin(x)      \longleftarrow 0$\; $NbPredNotInMin(x)      \longleftarrow |ImPred(x)|$\;      } }      \caption{My Algorithm} \label{alg:test}       \end{algorithm}       I have these errors: `undefined control sequence \Begin \for, \newcommand` ....


title: Nicer wavy line with TikZ

text: My question is inspired by Feynman Diagrams with tikz. The photon line (TikZ snake) in the answer does not look like it usually looks on a Feynman diagram: in the "reference" look, which may be obtained using the `feynmp` package, waves start and finish in the middle of the "wave" (one may check the difference compiling the answer given). Inside the `metapost` code this is realized in a dumb but effective way: it takes a line and adds "waves" based on the line length. First it computes the (integer) number of waves to put on a line to make length of one as close as possible to some given number, then it computes the length of one wave and finally draws them. The Metapost code is rather short and simple. Is there a way to fully reproduce this `feynmp` behaviour in TikZ?


title: Making a LaTeX text R logo. How maintain the proportions?

text: I tried to mimic the R logo in jpg format from R site only with LaTeX in order to make it scalable with the context without external files. This is the result at tiny, normal and huge size, compared with the jpg at scale 25%, 50 and 100%: ![MWE](http://i.stack.imgur.com/8191O.png) Evidently, the LaTeX logotype is far from perfect in many areas even at normal size, but the worst is that the **proportion between character R and the background circles (`\bircirc`) is not constant**, although everything is defined in em units. Why? Could be a better way to construct a pretty inline R logo? Of course, it should be not the jpg file nor a scalable vector graphics (SVG) converted to pdf, nor a simple format of the R character, like `\newcommand{\R}{\textbf{\textup{R}}}` This is the MWE code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{xspace}     \usepackage{xcolor}     \usepackage{graphicx}     \definecolor{Rcolor}{RGB}{150,160,190}          \newcommand{\R}{%     \raisebox{.3em}{\hspace{1.2em}%     \llap{\resizebox{1.09em}{.5em}{\color{black}$\bigcirc$}}%     \llap{\resizebox{1.199em}{.55em}{\color{darkgray}$\bigcirc$}}%     \llap{\resizebox{1.19em}{.52em}{\color{gray!50}$\bigcirc$}}%     \llap{\resizebox{1.1em}{.5em}{\color{gray}$\bigcirc$}}%     \llap{\resizebox{1.25em}{.55em}{\color{gray}$\bigcirc$}}%     }%     \hspace{-.85em}%     \textbf{%     %\resizebox{.55em}{1.5ex}{\textcolor{black!80}{\textsf{R}}}%     \textcolor{black}{\textsf{R}}%     \hspace{-.025em}\raisebox{.01em}{\llap{\textcolor{Rcolor}{\textsf{R}}}}%     }%     \xspace}          \begin{document}          Bitmap logo:      \includegraphics[scale=.25]{Rlogo.jpg}     \includegraphics[scale=.5]{Rlogo.jpg}     \includegraphics[scale=1]{Rlogo.jpg}          \LaTeX\ logo:~~      \tiny{\R}  \normalsize{ \R}  \Huge{\R}               \end{document}


title: Why do Beamer action specifications for TikZ nodes not behave like \uncover?

text: **NB.** I have completely rewritten this question to hopefully clarify things. # Executive Summary When creating TikZ diagrams in Beamer, one can add overlay specifications to paths and nodes, as in `\node<+-> {X};`. Surprisingly, these overlay specifications behave differently than do pure Beamer overlay specifications! Instead of behaving like `\uncover<+->{\node {X};}` (as one would expect from pure Beamer `\item`s), it behaves like `\only<+->{\node {X};}`. Why is this, and is it possible to have `\node` treat its specification like pure Beamer? See the end of this post for detailed questions. # Background ## Action Specifications in "Pure" Beamer In the Beamer manual, the description of the `actionenv` environment states: > An `⟨overlay specification⟩` without an action is promoted to > `uncover@⟨overlay specification⟩`. Here's an example using `itemize` lists that shows the promotion of `+-` to `uncover@+-`--when the rendering of covered material is set to `invisible` (default) and `transparent`, respectively--and compares its behavior to that of `only@+-`.               \documentclass{beamer}          \begin{document}     \begin{frame}{Action Specifications with \texttt{\textbackslash item}}       \begin{columns}       \column{0.35\textwidth}         Below uses spec \texttt{<+->}         \begin{itemize}         \item<+-> X         \item<+-> Y         \item<+-> Z         \end{itemize}         Above uses spec \texttt{<+->}              \vspace{\baselineskip}              \setbeamercovered{transparent}         Below uses spec \texttt{<+->}         with \texttt{transparent}         \begin{itemize}         \item<+-> X         \item<+-> Y         \item<+-> Z         \end{itemize}         Above uses spec \texttt{<+->}         with \texttt{transparent}            \column{0.45\textwidth}         Below uses spec \texttt{<only@+->}         \begin{itemize}         \item<only@+-> X         \item<only@+-> Y         \item<only@+-> Z         \end{itemize}         Above uses spec \texttt{<only@+->}       \end{columns}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/72mbr.gif) ## Action Specifications for TikZ `\node`s However, this same behavior is _not_ exhibited by overlay specifications given to TikZ `\path`s and `\node`s:               \documentclass{beamer}     \usepackage{tikz}          \begin{document}     \begin{frame}{Action Specifications with \texttt{\textbackslash node}}       \begin{columns}       \column{0.35\textwidth}         Below uses spec \texttt{<+->}\\         \begin{tikzpicture}           \node<+-> at (0, 0)   {X};           \node<+-> at (0,-0.5) {Y};           \node<+-> at (0,-1)   {Z};         \end{tikzpicture}\\         Above uses spec \texttt{<+->}              \vspace{\baselineskip}              \setbeamercovered{transparent}         Below uses spec \texttt{<+->}         with \texttt{transparent}\\         \begin{tikzpicture}           \node<+-> at (0, 0)   {X};           \node<+-> at (0,-0.5) {Y};           \node<+-> at (0,-1)   {Z};         \end{tikzpicture}\\         Above uses spec \texttt{<+->}         with \texttt{transparent}            \column{0.55\textwidth}         Below uses spec \texttt{<only@+->}\\         \begin{tikzpicture}           \node<only@+-> at (0, 0)   {X};           \node<only@+-> at (0,-0.5) {Y};           \node<only@+-> at (0,-1)   {Z};         \end{tikzpicture}\\         Above uses spec \texttt{<only@+->}              \vspace{\baselineskip}              Below uses spec \texttt{<uncover@+->}\\         \begin{tikzpicture}           \node<uncover@+-> at (0, 0)   {X};           \node<uncover@+-> at (0,-0.5) {Y};           \node<uncover@+-> at (0,-1)   {Z};         \end{tikzpicture}\\         Above uses spec \texttt{<uncover@+->}       \end{columns}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Rxq8g.gif) Unlike when it is used with `\item`s, the action specification `<+->` (with or without setting `transparent`) does not allocate space for the `\node`s. In other words, the nodes are used in a `\only` manner, not in the `\uncover` manner that I expected. Moreover, adding an explicit `only@` or `uncover@` causes those `\node`s to appear on all slides, as if they were given no action specification at all! # Questions   * Is there a way to recover full action specifications for paths and nodes? Yes, using `\uncover<+>{\node at (0,0) {X};}` etc. is a reasonable workaround, but is there another way to give the action specification to `\node` directly?   * If not, where is the code for action-specification-aware `\node`s within the Beamer source? I'd like to try my hand at modifying the code to fix this inconsistency, but I haven't been able to locate the relevant macros.


title: How to define acronyms being part of another acronym? (using acro.sty)

text: For a while now I have been using the acro.sty package by Clemens Niederberger. I really enjoy using this package and its many options. There is just one little thing I could not figure out yet. How do I define acronyms that are part of another acronym? For instance, there are many different types of RAM, should I always define the full version on its own, or reuse previous definitions? Let's have a look at: DRAM, SRAM, BRAM, and RAM.               \DeclareAcronym{ram}{       short = RAM ,       long = Random Access Memory ,       class = abbrev     }      Of course, I can declare all the other acronyms on their own, such as:               \DeclareAcronym{sram}{       short = SRAM ,       long  = Static Random-Acess Memory ,       class = abbrev     }      Or shall I use something like:               \DeclareAcronym{bram}{       short = BRAM ,       long  = Block \ac*{ram},       class = abbrev     }      When using the latter for the first time, the result is:               Block Random Access Memory (RAM) (BRAM)       What I would like to have instead is:               Block Random Access Memory (BRAM)      The index is correct, and would look like:               BRAM Block Random Access Memory (RAM)      How do I get first appearance right but keep the index as it is?


title: check order of references to floats

text: I want to make sure that the references are in in the order of the appearance of floats. I.e. I do not want to change the order of the floats but I want to avoid the situation: > ... shown in figure 2. ...displayed in figure 1. How can I issue a warning if a figure or table is referenced for the first time that has a higher number than than the following? Of course one would need to veto the case > ...displayed in figure 1. ... shown in figure 2. ...displayed in figure 1.


title: How to have latexdiff ignore specific line of text?

text: I have a certain piece of latex code that is giving me problems with compilation after I did a `latexdiff`.               ...     \LTcapwidth=\textwidth     \begin{landscape}     \begin{table}     ...      Gives me a diff file containing:               \DIFaddbegin \LTcapwidth\DIFadd{=\textwidth     }\DIFaddend \begin{landscape}      ...      But upon compilation I get the errors: `! Missing number, treated as zero` and `! Illegal unit of measure (pt inserted)` on that line. **Question:** Is there a way to have latexdiff ignore a certain piece of text?   (in this case I assume I would like to ignore `\LTcapwidth=\textwidth`.) I played around with the latexdiff option `\--exclude- safecmd="LTcapwidth,textwidth"` but that didn't really help as the equal sign between both commands is still diff'ed (i.e., I get `\DIFaddbegin \LTcapwidth\DIFadd{=}\textwidth\DIFaddend \begin{landscape}`)


title: How to use subcaption with standalone

text: I tried to `\input` in my main document file a `standalone` section, which uses the `subcaption` package. The `standalone` file compiles just fine. But when I try to compile the main document I get an               Undefined control sequence      error in `caption3.sty`. The error is caused by the `\usepackage{subcaption}` alone, so it even occurs when `subcaption` is not actually used. Here is a minimal working example: `main.tex`:               \documentclass{scrartcl}     \usepackage[subpreambles]{standalone}     \begin{document}       \input{subcaption_with_standalone}     \end{document}      `subcaption_with_standalone.tex`:               \documentclass{standalone}     \usepackage{subcaption}     \begin{document}       This does not even use a subfigure.     \end{document}      How can I make `subcaption` (or something similar, preferrably not deprecated) work with standalone?


title: Alignment of list environments

text: I am seeming to have troubles with two environments dealing with lists. The two are               \begin{description}           \begin{problemlist}       .....                         ......     \end{description}              \end{problemlist}      The trouble is that the text with the body of the document will not align properly, as it will with other list environments such as               \begin{enumerate}           \begin{itemize}       .....                         ......     \end{enumerate}              \end{itemize}      A mwe is provided below:               \documentclass[12pt]{article}     \usepackage{enumerate}          \oddsidemargin=0pt     \topmargin=1pt     \evensidemargin=0pt     \headheight=15pt     \headsep=15pt     \textwidth=6.2truein     \marginparsep=0pt     \textheight=8.75truein          \pagestyle{empty}          \begin{document}          \begin{description}     \item[Problem 1.] The sky is a very nice blue color. The sky is a very nice     blue color. The sky is a very nice blue color. The sky is a very nice blue color. The      sky is a very nice blue color. The sky is a very nice blue color. The sky is a very       nice blue color. The sky is a very nice blue color. The sky is a very nice blue color.      The sky is a very nice blue color. The sky is a very nice blue color. The sky is a very      nice blue color. The sky is a very nice blue color. The sky is a very nice blue color.      The sky is a very nice blue color.          \bigskip          \hspace{1.4cm} \textbf{\underline{Solution:}}          \vspace{0.15in}          \hspace{1.42cm}      The sky is a very nice blue color. The sky is a very nice blue color. The sky is a very       nice blue color. The sky is a very nice blue color. The sky is a very nice blue color.      The sky is a very nice blue color. The sky is a very nice blue color. The sky is a very      nice blue color. The sky is a very nice blue color. The sky is a very nice blue color.      The sky is a very nice blue color. The sky is a very nice blue color. The sky is a very      nice blue color. The sky is a very nice blue color. The sky is a very nice blue color.     \end{description}          \end{document}      You will see that the sentences after the very first sentence in each paragraph does not stay aligned with the with the first one. When changing the environment to `enumerate` or `itemize` you will see the automatic alignment. Is there a fix for this of some kind?


title: Filecontents and newenvironment issue

text: I need to write some inlined code on an external file, then load it with `listings`. I would like to define a new environment, but if I do, `filecontents` does not save the first line of code (see MWE):               \documentclass[]{article}     \usepackage{listings}     \usepackage{filecontents}          \newenvironment{MyNewEnvironment}[2]{%       \def\temp{#1}%       \csname filecontents*\endcsname{\temp}%       #2%     }%     {\csname endfilecontents*\endcsname%      \lstinputlisting{\temp}%     }%               \begin{document}          \begin{MyNewEnvironment}{foo.txt}%     one     two     three     four     five          \end{MyNewEnvironment}          \end{document}      The resulting foo.txt contains:               two     three     four     five      Any advice here? Thanks in advance


title: How to insert a special math alphabet

text: I am trying to insert a special math alphabet in an equation for a physics quantity called "cavity finesse". It is basically represented by a fancy letter F, which looks like what's shown in the picture. (ref: http://mirror.unl.edu/ctan/macros/latex/contrib/mathalfa/mathalfa.pdf). After doing some research, it seems that I need to download a math package in order to use it, but most of which is not free. All I need is this only one letter from the package, and will probably use it for a couple of times only. Is there any easy way to insert it? ![enter image description here](http://i.stack.imgur.com/MPilF.jpg) ![enter image description here](http://i.stack.imgur.com/sbDLO.jpg) I am using /mathcal{F} right now (shown in the bottom picture), but it does not look as great.


title: What's a simple way to migrate a TeXWorks (Windows) configuration from TexLive 2010 to 2011?

text: Following advice from the question How to upgrade TeXLive 2009 to TeXLive 2010, I'm installing TeXLive 2011 (on Windows Vista) in a new directory. Overall, this seems fine, after copying my texmf-local tree and running `mktexlsr`, but all of my TeXWorks settings are reset to the default. This includes both editor options (like editor font settings) and typesetting options (e.g. I added a menu item for glossary processing with `makeindex`) Is there an easy but safe way of:   1. Finding where they are?; and    2. Merging them?; or   3. Safely copying my (old) settings over the new ones?   4. Altering my Windows file associations at the moment I'm ready for the definitive move from 2010 to 2011?


title: tex upgrade 2014 md5 issues

text: I am following this document to create my upgrade - http://www.tug.org/texlive/upgrade.html In the last step where I               # tlmgr update --self --all     Reading from filehandle failed at /usr/local/texlive/2014/tlpkg/TeXLive/TLUtils.pm line 3753.      I opened up the file and it failed at the md5 check. What does this mean? How can I finish my upgrade?


title: create bar chart from select table row(s) for select column

text: The code below creates a bar chart but does not use the included data table. I would like to create the chart for an arbitrary year by specifying the year and using the table. Possible?               \documentclass{article}     \usepackage{tikz,pgfplots,pgfplotstable}     \begin{document}          \begin{tikzpicture}     \pgfplotstableread[col sep=comma]{     Year,A,B,C,D,E     2011,14.80,9.50,2.27,1.13,-0.15     2012,15.80,10.50,2.57,2.13,-0.25     2013,16.80,11.50,2.67,3.13,-0.50     }\datatable     \begin{axis}[         every axis plot post/.style={/pgf/number format/fixed},         ybar,         ylabel=2013, %wanted: take from specified Year         y label style={at={(axis description cs:0.1,.5)},anchor=south}, %odd but needed         x=1.5cm,         ymin=-0.1,         ymax=16.8,  %wanted: take from column A for specified Year         tick pos=left,         enlarge x limits=0.2,         bar width=25pt,         symbolic x coords={B,C,D,E}, %wanted: specify subset of header row         xtick={B,C,D,E}, %wanted: take from symbolic x coords         nodes near coords,         %axis lines*=left,         ]     \addplot[bar shift=0pt,fill=blue!50] coordinates {(B,11.50) (C,2.67) (D,3.13)};     \addplot[bar shift=0pt,fill=red!50]  coordinates {(E,0.50)}; %note change of sign and color     \end{axis}     \end{tikzpicture}     \end{document}


title: Is there a simpler way to do arithmetic in PSTricks?

text: I want to animate PSTricks diagram, so looping is intensively used. I have 3 global variables `\START`, `\STOP`, `\DELTA` that should be declared in the preamble. The remaining variables in the body will make use of these 3 global variables. The looping macro `\multido` needs an integer that represents how many times it must repeat the given job. Unfortunately, this value is not given explicitly but It can be obtained from a simple formula `\STOP-\START` divided by `\DELTA`. I need a simple way to find this number in integer rather than in floating point number. Finding `\INITIAL` variable by taking advantage of `\dimexpr` and `\strip@pt` is also not so natural I think. The following coding flow looks too complicated, I need more fluid approach.               \documentclass{minimal}     \parindent=0pt     \usepackage{multido}          \newcommand\START{-1}     \newcommand\STOP{1}     \newcommand\DELTA{0.01}               % to do division only, but the result in floating point     \pstFPdiv\TempTimes     {             \the             \dimexpr             \STOP pt             -\START pt             \relax     }     {\DELTA}          \makeatletter     \newcommand\INITIAL     {             \strip@pt             \dimexpr             \START pt             +\DELTA pt             \relax     }          % to make it an integer     \newcommand\TIMES     {             \strip@pt             \dimexpr             \TempTimes pt             \relax     }     \makeatother          \begin{document}     \multido     {             \nx=\START+\DELTA,             \ny=\INITIAL+\DELTA     }     {\TIMES}     {         (\nx,\ny)\endgraf     }     \end{document}


title: Equation is being shrunk to fit sentence, how can I prevent that?

text: I should preface that I discovered LaTeX a few hours ago but I've googled and searched the documentation and haven't found an answer. Here is the line I've written               Question 1: $\int \frac{x-3}{x^2-6x+5} \mathrm{d}x$      When I compile and view as a pdf, the equation has shrunk to fit the sentence and it's difficult to make out because it's so small. Is there a way I can have the equation and text on the same line while having an equation that's the same size as if I used:               \begin{equation}     \int \frac{x-3}{x^2-6x+5} \mathrm{d}x     \end{equation}      ?


title: How to use mplib directly from lua?

text: I am trying to plot some graphics calling mplib from lualatex. The 'standard' way is the use of luamplib package and `mplibcode` environment. I was wandering, is there a way to call mplib from lua directly? As long as mplibcode is just an 'easy' and 'LaTeX' way to do so, it should be possible. However, I could not find any documentation or examples on this topic. Unfortunately, the explanations in the luamplib manual stops at line 54, before I am really able to get an idea of the machinery behind it. It seems that there are few people who knows how to do this, they just had no time to provide others with any documentation. This thread proposes the solution which seems unnatural: there is lua code which generates tex code inside `Tikz` environment which is then in turn calls mplib via lua. ## Example The minimal example is: example.tex:               \documentclass{article}     \usepackage{luamplib}          \begin{document}     \directlua{ dofile('testmplibmin.lua') }     \directlua{ StartMP() }          \end{document}      testmplibmin.lua:               local mpkpse = kpse.new("luatex", "mpost")          local function finder(name, mode, ftype)       if mode == "w" then         return name       else       return mpkpse:find_file(name,ftype)       end     end          function StartMP()       local mplib = require('mplib')       local mpx=mplib.new({find_file=finder,ini_version=true})       local result = mpx:execute('input plain;')       result=mpx:execute('beginfig(1); draw fullcircle scaled 20 withcolor red; endfig;')       local t,e,l = result.term,result.error,result.log       if result.status>0 then         tex.print([[Result of mplib execute is unsuccessfull.]])       else         if result.fig then           tex.sprint('Converted something: \\vrule\\vbox{\\hrule')           local converted=luamplib.convert(result)           tex.sprint('\\hrule}\\vrule')         else           tex.print([[No figure output.]])           tex.print([[Log:]])           tex.print(l)         end       end       mpx:finish()     end      I will try to improve (=shorten) it more. E.g., I believe that there is a way to use finder function from **luamplib**. Any comments are welcome.


title: Problem and question tocloft

text: I tried to create my own "List of things" with help of this post: Define your own list of Now my questions:   1. I don't want to use the command `\algorithm {Text}`. Instead I want to use a container like `\begin{algorithm}`...`\end{algorithm}`. How can I do this? (optional)   2. The List of Algorithms is empty even I use the first command. How can I fill it?   3. The headline looks different to the headlines of the "normal" lists. Here is my example:               \documentclass[a4paper, oneside, 12pt, listof=totoc, bibliography=totoc, titlepage, headinclude = false, footinclude = false, mpinclude = false, BCOR = 0mm, DIV = calc]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{graphicx}     \makeatletter          \def\ScaleIfNeeded{%     \ifdim\Gin@nat@width>\linewidth     \linewidth     \else     \Gin@nat@width     \fi     }\makeatother          \usepackage{setspace}     \onehalfspacing            \usepackage[a4paper, left=3 cm, right=4 cm, top=3 cm, bottom=1.5 cm]{geometry}     \usepackage{fancyhdr}      \usepackage{longtable}     \usepackage{bibgerm}     \usepackage{eurosym}     \usepackage{booktabs}     \usepackage{array}     \usepackage{color}      \usepackage{tabularx}     \usepackage{pdflscape}     \usepackage[justification=RaggedRight, singlelinecheck=false]{caption}     \usepackage[pageanchor=false]{hyperref}      \usepackage{listings}      \usepackage{algorithm}     \usepackage{etoolbox}      \usepackage{pdfpages}      \usepackage[scaled]{uarial}     \usepackage[printonlyused]{acronym}     \usepackage{bigstrut}     \usepackage{multirow}     \usepackage{acronym}     \usepackage{ulem}     \usepackage{tocloft}     \fancypagestyle{plain}{}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[C]{- \thepage \ -}     \addtolength{\headwidth}{\marginparsep}     \addtolength{\headwidth}{0.5\marginparwidth}     \renewcommand{\headrulewidth}{1pt}     \setcounter{secnumdepth}{5}     \setlength{\parindent}{0pt}          \newcommand{\listalgorithm}{Algorithmenverzeichnis}     \newlistof{Algorithmen}{algo}{\listalgorithm}     \newcommand{\Algorithmen}[1]{%     \refstepcounter{Algorithmen}     \par\noindent\textbf{Algorithmen \theAlgorithmen. #1:}     \addcontentsline{algo}{Algorithmen}     {\protect\numberline{\thechapter.\theAlgorithmen}#1}\par}          \begin{document}         listalgorithm         \newpage         \Algorithmen{My Algorithm}          \includegraphics[width=\ScaleIfNeeded]{../Bilder/node_init.png}      The last two lines should look like (this is optional)               \begin{Algorithm}         \caption{My Algorithm}         \includegraphics[width=\ScaleIfNeeded]{../Bilder/node_init.png}     \end{Algorithm}      And the heading of this algorithm list looks like: > List of Algorithm But it should look like: > **List of Algorithm** I hope I could explain my problem well enough ;) P.S.: I searched for some posts but they did not fit to my problem :/         Edit: Okay I have tried both answers now and both are working.   My code looks nearly the same like the solutions, so I won't post it again. But I explain what my problem was.      cgnieder:   Everything works fine and looks how it should. My first problem was that I used the "algorithm" package and named the new toc algorithms too. So the package overwrote my commands. After I deleted it everything was fine.      Gonzalo:   Your solution nearly works fine too. The list looks like it should (bold headline and entries) but my other lists are not linked (anchored) in the pdf's menu. That seemes to be a problem with the "hyperref" package. After I commented and compiled nothing worked. But when I recommended it the list was created fine (except the anchors).      Because of the remaining problem and that the "tobasic" package is a class implemented package I chose cgnieders answer as my accepted one.      I thank you very much. You both helped me a lot!! Thank you!


title: REVTeX bibliography author initals

text: I am trying to get my bibliography in a REVTeX4.1 document to print out: > Smith, PJ as the author instead of > Peter John Smith (which of course is horrible if you're searching for alphabetically sorted surnames. My MWE is as follows:               \documentclass[a4paper,twocolumn,       %   A4 paper, two columns       nofootinbib,superscriptaddress,       %              aps,prb,citeautoscript, 10pt,         %   The prb style of RevTex uses superscript cross-references for citations       eqsecnum,notitlepage,showkeys]{revtex4-1}       % Either of the following 2 lines (from other similar questions) don't seem to work/compile     %\usepackage[style=authoryear,firstinits,url=false]{biblatex}     %\usepackage[round, sort&compress, authoryear]{natbib}     \usepackage{hyperref}   % Hyperref likes to be the last package included but putting it last breaks figure references!     \begin{document}     The manuscript elements have been formatted for you with LaTeX.      References can be included such as \cite{Ehrlich2006} or \cite{Kindig2009}.     Multiple references are also handled \cite{Staal2007, Iwamoto2002,CDCgirlGrowthCharts}.     \bibliographystyle{plain}     \bibliography{PAPER_JSAE_template_BIBLIOGRAPHY}     \end{document}      With `PAPER_JSAE_template_BIBLIOGRAPHY.bib` containing:               @Article{Staal2007,        Author="Staal, J.  and van Ginneken, B.  and Viergever, M. A. ",        Title="{{A}utomatic rib segmentation and labeling in computed tomography scans using a general framework for detection, recognition and segmentation of objects in volumetric data}",        Journal="Med Image Anal",        Year="2007",        Volume="11",        Number="1",        Pages="35--46",        Month="Feb"     }     @mastersthesis{Kindig2009,         author    = "Matthew W. Kindig",         title     = "Tolerance to failure and geometric influences on the stiffness of human ribs under anterior-posterior loading",         school    = "University of Virginia",         type     = "Master''s thesis",         address  = "",         year      = "2007",         month    = "",         note     = "",     }     @online{CDCgirlGrowthCharts,       author = {National Center for Health Statistics},       title = {{CDC} Clinical Growth Charts},       year = 2000,       url = {http://www.cdc.gov/growthcharts/clinical_charts.htm},       urldate = {30/09/2010}       howpublished = {\url{http://www.cdc.gov/growthcharts/clinical_charts.htm}}      }     @article{Ehrlich2006,        author = {Ehrlich, Peter F  and Brown, J Kristine and Sochor, Mark R  and Wang, Stewart C and Eichelberger, Martin E},        title = {Factors influencing pediatric injury severity score and Glasgow coma scale in pediatric automobile crashes: results from the Crash Injury Research Engineering Network},        journal = {Journal of Pediatric Surgery},        volume = {41},        number = {11},        pages = {1854-1858},        year = {2006}     }     @inproceedings{Iwamoto2002,        author = {Iwamoto, M. and Kisanuki, Y. and Watanabe, I. and Furusu, K. and Miki, K. and Hasegawa, J.},        title = {Development of a finite element model of the total human model for safety (THUMS) and application to injury reconstruction},        booktitle = {Proceedings of the International IRCOBI Conference},        year = {2002}     }      ![enter image description here](http://i.stack.imgur.com/TzwSL.png) How can I make my bibliography authors get labeled consistently as above, without, of course, going through the `.bib` file and renaming everyone?


title: How to produce a list of authors for a long BibTeX file?

text: I have over 500 entries in a single BibTeX file, and although this may sound like a general question, is there a way of seeing all the authors or references at a glance? Ie can I create a list of all entries by author? Regards,


title: Titlesec and Babel incompatibility?

text: I cannot find a way to change chapter style with babel included (for hungarian language). Here is the example:               \documentclass[a4paper]{report}     \usepackage[magyar]{babel}     \usepackage{titlesec}          \titleformat{\chapter}[hang]     {\normalfont}     {\LARGE\thechapter.}     {10pt}     {\LARGE\MakeUppercase}     [\normalfont]     \titlespacing{\chapter}{0pt}{0pt}{30pt}[0pt]          \begin{document}     \chapter{First chapter}     \end{document}      If I comment out the `\usepackage[magyar]{babel}` line, everything works as expected, however, with babel it does not work. Is it possible to style chapters (and sections, etc.) while using babel?


title: My .eps images appear to lack resolution, but turn out crisp after compiling my document, what's going on?

text: I have produced some .eps images of graphs (using the Python matplotlib module) and they look very shoddy, e.g. the crosshatching looks like a very rough plaid, but when I compile my document with xetex, all of my images are crisp and clean again. Can anyone explain why my .eps images look poor by themselves, but (magically) look like they're supposed to in my document? (I tried posting images, but I lacked two reputation points.)


title: How to make a "condition" in a macro?

text: I would like to make a macro with two parameters which return a text. For instance, I want `\M{1}{5}` to return `[1,5]`, and `\M{2}{2}` to return `[2]` (because the two arguments are the same). So I need to have a "check" or condition in my macro to see if the two parameters are the same and perform different executions... How do I implement this "if" in a macro?


title: varioref: \vref or \vpageref at page boundary (may loop)

text: Sometimes a have situations, where I'm not able to compile a document, because the varioref package result in a loop. Here is a MWE, which result not in an endless loop, but it demonstrate the issue (tested with TeX Live 2012)               \documentclass[12pt]{article}     \usepackage{blindtext,varioref}     \begin{document}     \blindtext[3]          These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for demonstration purposes. These words are only for ... See table \vref{tab:example}          \begin{table}[htbp]     \centering     \begin{tabular}{l}     Test\\     \end{tabular}     \caption{Example Table}     \label{tab:example}     \end{table}     \blindtext     \end{document}      Is there a rock solid solution for this issue? I known, removing a word or replace `\vref` with `\ref` helps, but this is not a solution (for my opinion).


title: Problems with captions in the environment  wrapfigure

text: I'm dealing with a rather weird issue. Using the enviroment `\wrapfigure`, I receive an error message               undefined control sequence \float@caption ... oxrestore ...      \normalize @fs@capt ...       let alone the caption doesn't show up the .pdf; while `caption` is working in any other environments (`figure`, `subfigure`, `tabular`). What is wrong?


title: Two title pages, one with author names and one without?

text: I need to submit a report with two title pages - the first with paper title and authors, and the second with just the title, no author names. I used the `titling` package which lets me have two title pages, but the second title page is the same as the first. Is there a package or something that'll let me do what I need? Thanks!


title: backreferencing in classicthesis package does not work

text: I am using `classicthesis` package version 4.1. The following is an example of the problem that I have with back-referencing. The resulted document does not have back-referencing in the bibliography although I enabled it by setting: `\setboolean{enable-backrefs}{true}`. ![enter image description here](http://i.stack.imgur.com/AEGYT.png) I used the bibliography style, `abbrvunsrtnat.bst`, that has been posted in here.               \documentclass[                     openright,                     titlepage, numbers=noenddot, headinclude,%1headlines,                     footinclude=true, cleardoublepage=empty,                     BCOR=30mm, paper=letter, fontsize=11pt, % Binding correction, paper type and font size                     ngerman, american, % Languages                     ]{scrreprt}               \PassOptionsToPackage{%                         eulerchapternumbers,                         listings,                         pdfspacing,                         subfig,                         beramono,                         parts}{classicthesis}               \PassOptionsToPackage{square,numbers,sort&compress}{natbib}      \usepackage{natbib}               \usepackage[position=t,singlelinecheck=off,font={it}]{subfig}          \usepackage{ifthen} % Allows the user of the \ifthenelse command     \newboolean{enable-backrefs} % Variable to enable backrefs in the bibliography     \setboolean{enable-backrefs}{true} % Variable value: true or false          % ---------------------------------------------------------------------------------------     \newcommand{\backrefnotcitedstring}{\relax} % (Not cited.)     \newcommand{\backrefcitedsinglestring}[1]{(Cited on page~#1.)}     \newcommand{\backrefcitedmultistring}[1]{(Cited on pages~#1.)}     \ifthenelse{\boolean{enable-backrefs}} % If backrefs were enabled     {             \PassOptionsToPackage{hyperpageref}{backref}             \usepackage{backref} % to be loaded after hyperref package                      \renewcommand{\backreftwosep}{ and~} % separate 2 pages                     \renewcommand{\backreflastsep}{, and~} % separate last of longer list                     \renewcommand*{\backref}[1]{}  % disable standard                     \renewcommand*{\backrefalt}[4]{% detailed backref                     \ifcase #1                          \backrefnotcitedstring                     \or                         \backrefcitedsinglestring{#2}                     \else                         \backrefcitedmultistring{#2}                     \fi}     }{\relax}           \PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}{hyperref}     \usepackage{hyperref}  % backref linktocpage pagebackref     \pdfcompresslevel=9     \pdfadjustspacing=1          \hypersetup{                 colorlinks=true, linktocpage=true, pdfstartpage=1, pdfstartview=FitV,                 breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,                 plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,                 hypertexnames=true, pdfhighlight=/O, %     }             \usepackage{classicthesis}          \begin{document}     This is test for back-referencing. \citep{knuth:1976}.                \bibliographystyle{abbrvunsrtnat}          \bibliography{Bibliography}          \end{document}


title: Why does leftidx not work in a figure caption?

text: I use the leftidx package to get left subscripts typeset acceptably, however, when I tried to use the \leftidx command within a figure caption (\caption) command I get errors compiling. Here is a MWE:               \documentclass[12pt,letterpaper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage{leftidx}     \usepackage{mathrsfs}     \usepackage{bm}     \usepackage{graphicx}          \begin{document}          I want $\leftidx{^i}{c}{_{l,m}^{n}}$ in a caption.          \begin{figure}     \caption{$\leftidx{^i}{c}{_{l,m}^{n}}$}     %\caption{$2+2=4$}     \end{figure}          \end{document}      If you comment out the \caption line with \leftidx, and uncomment the line below it you'll see that it compiles fine, including the call to \leftidx that is outside of the caption. The error I get with \leftidx inside of the caption is:               ! Incomplete \iffalse; all text was ignored after line 17.     <inserted text>                      \fi      <*> MWE.tex          The file ended while I was skipping conditional text.     This kind of error happens when you say `\if...' and forget     the matching `\fi'. I've inserted a `\fi'; this might work.          ! Emergency stop.     <*> MWE.tex          *** (job aborted, no legal \end found)


title: Creating PDF (resume) suitable for automated text extraction

text: I have created a nice LaTeX resume. However, having uploaded it to an online job search I am worried the automated extraction does not perform well. Are there any specific packages or other tips to improve the machine- readability of a PDF file (particularly with a view to producing resumes)? I am using multicols which messes up extraction. Disabling multicols is easy but then I cannot get the content onto 2 sides. Is there anyway to make multicols output easy to extract for an automated system? Does anyone have any strategies for maintaining two versions of the resume, one machine readable and one typeset for printing? Is there anyway to have some kind of 'alt-text' attached to the PDF that these systems would pick up? The problem is when submitting an application there is no way to know if they will use an automated feature extraction. The biggest problem is that the extracted text seemed to have no spaces (allthewordscomeouttogether). Is there any way to force LaTeX to include a space character in the text?


title: full-width tables in multicolumnar text

text: If I create a `table` in `twocolumn`, the text on the second column overlaps the right half of the table. If I use a `table*`, whether with `twocolumn` or `multicols`, it instead is moved to the next page. `table`s in `multicols` simply disappear. I'd like to have a top-aligned table with two-column text below it. How can this be done sanely?


title: Mixing "check" and "hat" leads to odd output (using MnSymbol)

text: I'm trying to typeset a formula that contains the expression `$\check{x} g_1$` underneath a widehat. However, when I typeset the expression `$\widehat{\check{x} g_1}$`, I get odd results -- the "check" and the `g_1` are in the right places, but the `x` is shifted to the right so that it overlaps with the `g_1` (thus leaving the `check` resting over a blank space). What am I doing wrong? EDIT : My one theory is that this has something to do with using the MnSymbol package. Here's a minimal document that has the problem.               \documentclass[11 pt]{article}     \usepackage{MnSymbol}          \begin{document}          $$\widehat{\check{x} g_1}$$          \end{document}      If I omit the MnSymbol package, the problem goes away.


title: How can I replace a character (zero)?

text: Is it possible to replace characters in pdflatex? I use the Minion Pro and Myriad Pro font and the zero looks like a small 'O'. I want to replace the zero by a zero with a dot or slash in the middle (Inserting slashed zero in non-OpenType supporting LaTeX). Is it possible to replace the character globally (I just want to write 0 instead of something like \zero)? Is it possible in pdflatex or should I switch to lualatex (I have no experience in Lualatex but I have heard it has better font handling)?


title: Alignment of nodes and scopes in tikz matrix?

text: I am trying to fix the positions of the arrows of the following diagram without much success. I would like the arrows to be centered (both horizontally and vertically) in the matrix cell no matter which way they are pointing. The arrows are defined by macros of LARROW RARROW and DARROW. ![Arrows with bounding boxes of the parent node](http://i.stack.imgur.com/ULSNF.png) MWE:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.multipart,shapes.gates.logic.IEC,shapes.arrows,positioning,decorations.markings}               \begin{document}          \begin{tikzpicture}[use IEC style logic gates, LFSR/.style={     rectangle split, rectangle split horizontal=true, rectangle split parts=#1, draw, anchor=center}, ARROW/.style={draw,thick,single arrow,single arrow head extend=3pt,transform shape}]     \def\Byte(#1,#2,#3,#4){%     \node[LFSR=3,name=#1] {\nodepart{one}#2\nodepart{two}#3\nodepart{three}#4};     }     \def\LFSR(#1,#2,#3,#4){%     \begin{scope}[decoration={         markings,         mark=at position 0.6 with {\arrow{latex}}}]         \Byte(LFSR0,#1,#2,#3)         \node[xor gate, draw, logic gate inputs=nn, logic gate input sep=0.3cm, rotate = 180, below = 1.4cm of LFSR0.one, xshift=2mm, xor gate symbol ={\scalebox{-1}{\small=1}}, logic gate symbol align = {bottom}] (Xor) {\parbox[t][0.75cm]{0.7cm}{\scalebox{-1}{\small XOR}}};         \draw (LFSR0.two south) |- (Xor.input 2);         \draw (LFSR0.three south) |- (Xor.input 1);         \draw (Xor.output) -- ++(left:3mm) node[anchor=north,inner sep=0pt] (hook1) {};         \draw[postaction={decorate}] (hook1) |- node [near start, left] {#4} (hook1|-LFSR0.west);         \draw (hook1|-LFSR0.west) -- (LFSR0.west) {};         \draw[-latex] (LFSR0.one north) ++(up:1mm) node[anchor=center,inner sep=0pt] (hook2) {} -- (LFSR0.three south |-hook2);     \end{scope}     }     \def\RARROW{\node[rectangle,draw] {         \parbox[b][1cm]{0pt}{\begin{tikzpicture}             \node[ARROW] {};         \end{tikzpicture}}         };     }     \def\LARROW{\node[rectangle,draw,rotate=180] {         \parbox[t][1cm]{0pt}{\begin{tikzpicture}             \node[ARROW] {};         \end{tikzpicture}}         };     }     \def\DARROW{\node[rectangle,draw,align=center] {         \begin{tikzpicture}             \node[ARROW,rotate=-90] {};         \end{tikzpicture}         };     }     \matrix[row sep=0, column sep=2.5mm]{         \LFSR(1,1,1,0) &\RARROW& \LFSR(0,1,1,0) & \RARROW & \LFSR(0,0,1,1) & \RARROW & \LFSR(1,0,0,0)\\         \node[anchor=east,minimum height=9mm]{$t=0$};   & &         \node[anchor=east,minimum height=9mm]{$t=1$};   & &         \node[anchor=east,minimum height=9mm]{$t=2$};   & &         \node[anchor=east,minimum height=9mm]{$t=3$};   \\         & & & & & & \DARROW\\         \LFSR(1,1,1,0) &\LARROW& \LFSR(1,1,0,1) &\LARROW& \LFSR(1,0,1,1) &\LARROW& \LFSR(0,1,0,1)\\         \node[anchor=east,minimum height=9mm]{$t=7$};   & &         \node[anchor=east,minimum height=9mm]{$t=6$};   & &         \node[anchor=east,minimum height=9mm]{$t=5$};   & &         \node[anchor=east,minimum height=9mm]{$t=4$};   \\     };     \end{tikzpicture}          \end{document}


title: Why would two apparently identical TeX installations produce different results?

text: I have XeLaTeX with TeXShop installed on two different machines. One compiles documents without a problem. The other throws weird errors. As far as I can tell they're set up identically, so I don't even know where I should be looking. An example:               %preamble     \documentclass{tufte-handout}     \usepackage[LY1]{fontenc}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{lettrine}     \usepackage{booktabs}     \defaultfontfeatures{Mapping=tex-text}          \setromanfont{Linux Libertine O}     \setsansfont{Gill Sans}     \setmonofont{Monaco}                    \title{Blah blah}          \author{blah}          \date{}          \begin{document}          \maketitle          750 words of blah-di-blah          \end{document}      yields this error:               \maketextlowercase has an extra }      So I run the code on the other machine. It works fine. What could be causing this situation, and how might I fix it?


title: UTF-8 encoding and Notepad with LaTeX

text: I have written some LaTeX commands in a separate file, say `foo.tex` and include them in my LaTeX document. Only after I edit `foo.tex` with Notepad (default editor in Windows), I get the following error message when compiling :               Unicode char \u8: not set up for use with LaTeX      I suspect that Notepad alters my text file, which is saved as previously with the UTF-8 encoding. How can I prevent it ?


title: How can I write these chemical reaction equations?

text: Trying to write a thesis, and I need some reaction equations. How can I write this in LaTeX? ![enter image description here](http://i.stack.imgur.com/fBw09.png)


title: How to crop background from image automatically?

text: I have a Google Docs drawing that is a small scheme. However, this small scheme is surrounded by a lot of background that occupies a lot of useless space. ![enter image description here](http://i.stack.imgur.com/5wMPw.png) I do not want to remove the background manually because I may need the extra space in the future. I know Latex has a lot of image packages, so I was wondering if there is some package that I can use to automatically detect that useless background and crop my image so I do not have all that white space around it. I know some of you will suggest the external tool pdfcrop. I have experimented with it, but it does not crop the image at all. Here is the png image file and here is the pdf version downloaded with Gdocs.


title: Assign special semantics to a character

text: When looking for a Command that gobbles all following empty lines, I wondered if it is possible to define a shortcut for this command consisting of one single character. Is ist possible to assign to, say, the character `§` the special semantics that a certain command (say, `\fancystuff`) is executed?               \documentclass{article}     \newcommand\fancystuff{\do\some\fancy\stuff\here}     % How to assign to § the semantics of \fancystuff ?          \begin{document}         This is text. But the following character §         gets fancy stuff done.     \end{document}


title: Table wrapper breaks when using svn-multi and booktabs

text: I have a bizarre problem with a customised table wrapper in conjunction with `booktabs` and `svn-multi`. The MWE below illustrates the issue. The wrapper `myTable` works fine if:   * either `booktabs` is not used (comment `\bottomrule`)   * or the options `table,subgroups,groups` of svn-multi are not activated But if both are used, I get the error:               Misplaced \noalign.     \bottomrule ->\noalign                             {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...     \myTable{\input{tabletest.tex}}{4}{c}      To add to the confusion, if you just include all the information from the `\myTable` wrapper into the document and include the table content manually (and not via `\input`) **everything** works fine, with both `booktabs` and the `svn-multi` options. Is something wrong with the `\myTable` command, or is that a bug in `booktabs`/`svn-multi`?               \documentclass{article}     \usepackage{booktabs}     \usepackage[%         table,subgroups,groups% Either one this together with booktabs breaks my custom-table command         ]{svn-multi}          \begin{filecontents}{tabletest.tex}     label 1 & label 2 & label 3 & label 4 \\     item 1  & item 2  & item 3  & item 4  \\      \end{filecontents}          \DeclareRobustCommand{\myTable}[3]{%     \begin{tabular}{l*{#2}{#3}}     #1%     \bottomrule%     \end{tabular}}%          \begin{document}          %This breaks if something from booktabs is included together with either one of the svn-multi options "table", "subgroups" or "groups"      \myTable{\input{tabletest.tex}}{4}{c}          %This compiles fine although the content is identical to the one above.     \begin{tabular*}{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{4}{c}}%     label 1 & label 2 & label 3 & label 4 \\     item 1  & item 2  & item 3  & item 4  \\      \bottomrule%     \end{tabular*}%          \end{document}


title: biblatex name format that recedes to 'et al.' immediately

text: I am having my `biblatex` defaults to switch to 'et al.' rather late (past three authors). Now I have occasions where the repeated mention of an author asks for a short form 'Author et al.', irrespective of the number of co- authors. I already use a custom name format like this:               \DeclareNameFormat{idem}{%       \usebibmacro{name:last}{#1}{#3}{#5}{#7}%       \usebibmacro{name:andothers}}      How would I create another name format, say with `\DeclareNameFormat{short}` that always resorts to 'et al.' if there is more than one author; without changing my global `biblatex` style settings (`maxnames` -- don't want to touch it!). Is there any other macro than `name:andothers` that I can use? * * * The answer of @lockstep gets close. But I want to have `\citeauthor{A01}` behave normally, except for cases where I repeat the authors multiple times. I can of course add a duplicate entry with this technique; still I wonder if I can get the following 'naive' idea taken from that answer to work:               \newcommand{\personshort}[1]{\defcounter{maxnames}{1}\citeauthor{#1}}      This 'works' but seems to overwrite `maxnames` for the rest of the document. how would I encapsulate the defcounter to be effective only inside this `\newcommand`?


title: book title abbreviation in references

text: I'm writing my PhD in philosophy with LaTeX (using TeXshop and Bibdesk on a Mac) and I have a question: I use the work of one philosopher frequently, so I introduce a list of abbreviations in the beginning (for example: Being and Time would be BT). I have been using `\citetext` now for this (e.g. `\citetext{BT, 27}`), but I am not sure if this will be printed in the bibliography of the pdf file (BT is also the bibtex key). Can anyone help me with this?


title: Section text (without heading) following section number on same line in Memoir

text: For my purposes I would like to have (free-standing) section numbers in the margins and no section headings---just the section text---immediately following (i.e., on the same line as) the section number. The following gets me close to what I would like               \hangsecnum     \counterwithout{section}{chapter}     \setaftersecskip{-1em}      but it leaves about an inch of horizontal space after the sec number/margin before my text begins. Larger and smaller values of the third command increase the space horizontally or vertically. Is there a way to have the section body immediately follow the section number on the same line using `memoir`?


title: Tweaking numeral height (and baseline)

text: I am using the Computer Modern Unicode Bright font, in the OpenType version (see http://cm-unicode.sourceforge.net or http://www.ctan.org/tex- archive/fonts/cm-unicode) in a XeLaTeX-compiled document. I am loading the font by means of the `fontspec` package. I am generally pleased with the results, except for one thing, there seems to be a slight unevenness in the height of the numerals: ![CM-unicode Bright OpenType \(numerals\)](http://i.stack.imgur.com/x7tbF.png) (Heigher resolution image: http://brussense.be/temp/CMBrightNumbers.png) Notice that the 4, 5 and 7 do not reach the same height as the other numerals. Also, the 1, 2, 4 and 7 are floating slightly above the baseline. Especially the lower height of the 5's and 7's is noticeble in my document, or at least it is in the pdf on my screen (without much zooming in), I have yet to test if it is really visible when printed. So my question is, can the height of specific glyphs/numerals be slightly stretched somehow? And is there some way to "pull down" certain glyphs towards the baseline? Preferably with some `fontspec` or XeTeX magic and without editing the actual font. Or should I just ignore this and move on with my thesis? :-)


title: How can I make mdframed boxes break at the bottom of the page?

text: I'm trying to get `mdframed` to split at the bottom of my page, such that there is no white space between the bottom of the frame and the footer. At the moment I have this: ![](http://i.stack.imgur.com/kM7cM.png) I'd like to have mdframed split right at the bottom of the white space, instead of leaving a gap between it and the bottom border. Is there a way to do this?


title: Bringing the (square) brackets to the same height

text: Consider the .tex extract from below:               \begin{equation*}     A=U\Lambda U^T=\left[\begin{array}{ccc}     &   &  \\     u_1 & \cdots  & u_n \\     &  &      \end{array}\right]\left[\begin{array}{ccc}      \lambda_1 &  &  \\      & \ddots  &  \\     &  & \lambda_n     \end{array}\right]\left[\begin{array}{ccc}     & u_1^T  &  \\     & \vdots  &  \\     & u_n^T &      \end{array}\right],     \end{equation*}      As you may notice, the surrounding square brackets are not of the same height. How could one achieve the above expression with the same bracket height? (the expression within should be intact)


title: End Mark for Examples, Definitions and Theorems in LyX

text: I'm using LyX and want to have an end mark for examples, definitions and theorems within chapters like this:               Theorem 1.1   Statement......      Definition 1.1   Statement......      Example 1.1   Statement......      Example 1.2   Statement......      Definition 1.2   Statement......       My LaTex preamble in LyX is:               \documentclass[12pt,oneside,english]{book}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=4cm,bmargin=4cm,lmargin=4cm,rmargin=2cm}     \pagestyle{plain}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \setlength{\parindent}{40bp}     \usepackage{color}     \usepackage{babel}     \usepackage{array}     \usepackage{bm}     \usepackage{multirow}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{setspace}     \usepackage[authoryear]{natbib}     \doublespacing     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]      {hyperref}     \hypersetup{      linkcolor=black,citecolor=black,urlcolor=blue,filecolor=blue,pdfpagelayout=OneColumn,pdfnewwindow=true,pdfstartview=XYZ,plainpages=false,pdfpagelabels,citecolor=blue,linkcolor=blue}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.       \theoremstyle{definition}       \ifx\thechapter\undefined         \newtheorem{example}{\protect\examplename}       \else         \newtheorem{example}{\protect\examplename}[chapter]       \fi       \theoremstyle{plain}       \ifx\thechapter\undefined         \newtheorem{fact}{\protect\factname}       \else         \newtheorem{fact}{\protect\factname}[chapter]       \fi       \theoremstyle{definition}       \ifx\thechapter\undefined         \newtheorem{defn}{\protect\definitionname}       \else         \newtheorem{defn}{\protect\definitionname}[chapter]       \fi       \theoremstyle{plain}       \ifx\thechapter\undefined         \newtheorem{thm}{\protect\theoremname}       \else         \newtheorem{thm}{\protect\theoremname}[chapter]       \fi          \@ifundefined{date}{}{\date{}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage[T1]{fontenc}     \usepackage{geometry}     \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=3cm,rmargin=3cm}     \usepackage{babel}          \usepackage{hyperref}     \hypersetup{colorlinks=true,citecolor=blue, linkcolor=blue}     \usepackage{graphicx,epstopdf}     \usepackage{amsmath}     \usepackage[toc,page]{appendix}     \usepackage{bm}          \usepackage{tocloft,calc}     \renewcommand{\cftchappresnum}{Chapter } \AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}                \setlength{\cftafterloftitleskip}{12pt}  % list of figures     \setlength{\cftafterlottitleskip}{12pt}  % list of tables     \setlength{\cftaftertoctitleskip}{12pt}  % table of contents          \usepackage{titlesec}     \titlespacing*{\chapter}{0pt}{-50pt}{20pt}     \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}               \usepackage{tikz}      \usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning}          \usepackage{enumerate}          \usepackage[format=plain,labelfont=bf,up,textfont=it,up]{caption}          \usepackage{amssymb}     \usepackage{thmtools}     \declaretheorem[style=definition,qed=$\blacksquare$,numberwithin=chapter]{definition}          \makeatother            \providecommand{\definitionname}{Definition}       \providecommand{\examplename}{Example}       \providecommand{\factname}{Fact}     \providecommand{\theoremname}{Theorem}          \begin{document}     Text          \end{document}      I would highly appreciate your help to figure out this problem. Thanks


title: \mathrm and \Omega in XeLaTeX

text: When I write `$\mathrm{\Omega}$` and compile it with LaTeX, I get capital omega symbol normally. But when I do the same with XeLaTeX, I get empty symbol. I don't use any special packages or fonts. Could someone explain me why is this? And how could I achieve the same behavior in XeLaTeX as in LaTeX? Example of LaTeX file:               \documentclass[10pt]{article}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}          \title{Article}     \author{Name}     \date{}     \begin{document}        $\text{nothing:} \Omega +  \text{rm} \mathrm{\Omega} + \text{normal} \mathnormal{\Omega}$     \end{document}      Example of XeLaTeX file:               \documentclass[10pt]{article}     \usepackage{xunicode}     \usepackage{fontspec}          \title{Article}     \author{Name}     \date{}     \begin{document}        $\text{nothing:} \Omega +  \text{rm} \mathrm{\Omega} + \text{normal} \mathnormal{\Omega}$     \end{document}


title: Font becomes bold after use of \citep or \citet

text: After the use of `\citep`, `\citet` (`biblatex` with `natbib=true`) or `\autoref` commands, all text until the end of the page becomes bold/thick. The problem is fixed in the next page and starts again when one of those command is used again. Here's an image showing the problem: ![image](http://i.stack.imgur.com/0VR9Z.jpg) NOTE:This is not the same problem other people have reported where text become bold after the use of graphics or figures as this also happens with citations which is not part of the graphics package.


title: Italic/slanted math font and kerning

text: I'd like to write a macro for typesetting slanted letters in bold for highlighting vectors. I've used this implemenation:               \newcommand\vect[1]{\text{\bfseries\sffamily\slshape#1\/}}      But I've run into problems with kerning -- when I want subscripted vector (like `\vect{F}_g`), the italic correction (`\/`) causes there's to wide space but when I omit `\/`, the space between vector and `|` is too narrow. It's the same when I tried it with `\mathit` macro. So I wonder whether there is any possibility how to handle this in general (not to have `\/` written after each vector without subscript.