title: Split lines, keep a table/aligned text within textwidth and span several pages

text: I have a very long table that I use to align some text, therefore I don't need it to be (specifically) a table (please consider that in the answers). I am using `supertabular` for the table to span several pages. The problem is that I have some cells that contain some long text (enough to be split into two lines), which increases the width of the table and it overflows the margins. I have seen in similar questions that I could use `tabularx` with the `X` option for the column with so much text, this would split the column into several lines, but the problem is that `tabularx` cannot span several pages. I would prefer not to use `p{width}` for the column, because it's going to be impossible (or extremely hard) to set the proper width for this column to make the best use of the text width in total, the width of the other columns may change in different pages (that's not a problem, that's good) and I would prefer to use the full width as much as possible (the table is huge). Please remember I could use something rather than a table, although I don't know about anything that would be useful in this context. Related questions:   * How to force a table into page width?   * LaTeX split long table in multiple pages and resize the width   * table overflows the page


title: How to avoid bad boxes in the index?

text: I'm currently writing a larger document, which will also contain an index. Unfortunetely, the index produces a lot of bad boxes. Plase find a small example at the bottom. My simple (but hopefully not too stupid) question is whether there is a way to avoid this. Rephrasing the index entries is not really an option as there are several long words. Another possibility would be to just 'filter out' warning messages that appear in the index. Is there a way to do this?               \documentclass[paper=A4, fontsize=11pt, draft]{scrbook}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{microtype}     \usepackage[onehalfspacing]{setspace}     \usepackage{makeidx}     \usepackage[fleqn]{amsmath}     \usepackage{amsthm,amssymb}     \usepackage{tikz}     \usepackage{xspace}     \usepackage{booktabs}          \clubpenalty=9999     \widowpenalty=9999     \displaywidowpenalty=9999          \makeindex          \begin{document}          \emph{automata learning}\index{Automata learning|see{Algorithmic learning}}          \printindex          \end{document}


title: Glossaries in List of Figures overflow

text: Given a figure with a caption, in this caption a glossary term in used as in `\gls{wysiwyg}` At the document beginning, after the contents, the `\listoffigures` command is given. As the caption contains a glossary reference and the list of Figures is the first to be printed before any other contents LaTeX outputs: ...What you see is what you get.... In my specific case, this results in an overflow of the list of figures. For this reason, I would like the gls package to put the short (wysiwyg) in this list. How to get this done?


title: custom word-wrapping in tablecolumns with fixed width

text: I have a somewhat special problem. I want to create a fixed-width table column (for example by using the `p{0.2\textwidth}` column-type). But in the column are really (!) long words, containing mostly numbers, brackets, and plus- signs. I want LaTeX to perform linebreaks at the `+` signs and the `(` signs, and the `)` signs, if any linebreaks needed. The intended behavior is, to use the `+`, `(`, and `)` as if it is a `-`. It should _not_ insert a hyphen `-`, if it hyphenate a word, just use the `+`, `(`, and `)` as new hyphenation signs (or only one of them, if it is to difficult to hyphenate at everyone). The words are automatically created, and cannot be controlled to wrap by the insert of manual spaces, and the list of the words is really long, so doing all this word wrap by hand would last the rest of the year... To make this problem not too easy (/irony off), of course it has to be in a special, self-defined column-type (which should center the column on a fixed width... hopefully i did this right... if this is absolutely not possible, it can also be a fixed-width left-aligned column-type) Hopefully, someone can help me out of this mess. Thanks in advance.               \documentclass{article}     \usepackage{array}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \begin{document}     \begin{tabular}{C{0.8\textwidth}C{0.2\textwidth}}     here is some stuff & itp(itp(itp(itp(itp(15+16)+23)+27)+itp(123+5))+itp(itp(itp(itp(98+3)+6)+27)+89)) \\     \end{tabular}     \end{document}


title: Microtype package with Libertine font

text: In the microtype documentation it advices one to use settings that complement one's choice of font. I use libertine font. Does anyone know of any options or settings that specifically suit this font?


title: How to control the caption of algorithm2e by captionsetup?

text: I want to change the appearance of the caption for algorithms written by `algorithm2e` package using the `caption` package. In `captionsetup` one can easily customize the caption depending on the float type, whether a table, a figure, or a longtable even, but when I specified a captionsetup for algorrithms it didn't work, is there any way to change the `Algorithm 1:` to `Algorithm 1.`? **MWE Code:**               \documentclass{scrartcl}     \usepackage{caption}     \captionsetup[longtable]{justification=justified} % works fine     \captionsetup[figure]{labelsep=period,format=plain, font={small}} % works fine     \captionsetup[algorithm]{labelsep=period,format=plain} % didn't work!     \usepackage{algorithm2e}     \begin{document}     \begin{algorithm}     \SetAlgoLined     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }     initialization\;     \While{not at end of this document}{     read current\;     \eIf{understand}{     go to next section\;     current section becomes this one\;     }{     go back to the beginning of current section\;     }     }     \caption{How to write algorithms}     \end{algorithm}     \end{document}      **Output:**   ![enter image description here](http://i.stack.imgur.com/YPWqL.png)


title: TeX-function for writing R-functions

text: I'm working on an introductory course for the R-language in Latex, so I'm trying to write a Latex function that displays the R-function. This is what I've got:               \makeatletter       \newcommand{\fun}[3]{           \begin{tcolorbox}[top = 0mm, bottom = 0mm, left = 0mm, right = 0mm, colback=green!5,colframe=vubgreen,title=#3]           \begin{tabular}{p{.2\textwidth}p{.04\textwidth}p{.68\textwidth}}           {\tt#1(}\\\@for\x:=#2\do{\x\\}{\tt$\quad$)}           \end{tabular}         \end{tcolorbox}}       \makeatother      So, this function accepts three parameters: the name of the R-function, a list of R-parameters, and a description, with each R-parameter:               \renewcommand{\arg}[3][]{         {\tt$\quad$#2}&&#3}      So you can write for example:               \fun{hist}         {           \arg{x}{Vector.},           \arg{freq = TRUE}{Use absolute frequencies.}         }         {Draw a histogram.}      Now I'm having a few small problems to get it completely right: \- The opening round bracket has to be on the same line as the first parameter (so the line under the first function. \- The closing round bracket has to be right behind the last parameter (NOT behind the description of the parameter). \- Behind each parameter there has to be a comma, except after the last one. \- However: if a function has no parameters, opening and closing round bracket have to be on the same line as the name of the function. Packages used (not all relevant for this example):               \usepackage{array}       \usepackage{amsmath}       \usepackage{enumerate}             \usepackage{answers}           \usepackage{graphicx}       \usepackage{tcolorbox}       \usepackage{color}       \usepackage{xcolor}       \usepackage{epstopdf}       \usepackage[dutch]{babel}       \usepackage{anysize}       \usepackage[parfill]{parskip}       \usepackage{hyperref}       \usepackage{longtable}      I think this seems like a challenge, even for the TeXperts over here. All help is really appreciated!


title: While installing LaTeX I'm getting an error: permission denied for cefpdflatex.exe

text: An error occurred:       source file: Libraries\MiKTeX\Core\win\winFile.cpp       source line: 686       message: Permission denied: C:\Program Files\MiKTeX 2.9\miktex/bin/x64/cefpdflatex.exe       info: C:\Program Files\MiKTeX 2.9\miktex/bin/x64/cefpdflatex.exe


title: 2 minipages side by side don't respect the width of an article

text: In one of my `.tex` file, I have the following code which puts 2 `minipage`s side by side, the whole width cover two minipages:               \documentclass[11pt, a4paper]{article}     \setlength{\topmargin}{-.5in}     \setlength{\textheight}{9in}     \setlength{\oddsidemargin}{.125in}     \setlength{\textwidth}{6.25in}          % \documentclass[runningheads,orivec]{llncs}          \input{fonts.tex}     \input{macros.tex}     \usepackage{caption}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{bbm}     \usepackage{bm}     \usepackage{empheq}     \usepackage{framed}     \usepackage{mathbbol}     \usepackage{color}     \usepackage{float}     \usepackage{caption,subcaption}%     \usepackage{calc}% http://ctan.org/pkg/calc     \usepackage{hyperref}     \usepackage{mathtools}     \usepackage{algpseudocode}     \usepackage{multicol}     \usepackage{longtable}     \usepackage{listings,xcolor,lipsum}          \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}          \begin{document}     bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla\\     \noindent\begin{minipage}[t]{0.48\linewidth}%       \centering         \begin{minipage}[t]{\linewidth-2\fboxsep-2\fboxrule}%           \hspace*{0em}{\begin{tikzpicture}[thick, scale=0.6]               \filldraw[fill=white!20] (2,0) rectangle (10,2);               \filldraw[fill=white!20] (2,5) rectangle (6,12);               \filldraw[fill=white!20] (6,5) rectangle (10,12);             \end{tikzpicture}}         \end{minipage}     \end{minipage}\hfill     \begin{minipage}[t]{0.48\linewidth}%       \centering         \begin{minipage}[t]{\linewidth-2\fboxsep-2\fboxrule}%           \raisebox{0em}{\begin{tikzpicture}[thick, scale=0.6]               \filldraw[fill=white!20] (2,0) rectangle (6,7);               \filldraw[fill=white!20] (8,0) rectangle (12,7);               \filldraw[fill=white!20] (2,-5) rectangle (12,-3);             \end{tikzpicture}}         \end{minipage}     \end{minipage}\\     bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla     \end{document}      In a new `.tex` file, I need to use `\documentclass[runningheads,orivec]{llncs}`, so I remove all the `\setlength`, with the same code, the `minipage`s are a little bit too large, and do not respect the border on the right... Does anyone know which parameter I need to change so that the 2 `minipage`s respect the width of the article? **Edit1:** Sorry guys, you could finally try the code above and switch between `article` and `llncs`. You will see that for `llncs`, the minipages exceed a little bit the border on the right... Could we amend that?


title: Smooth option sometimes produces incorrect arrow tips in PGFplots

text: It seems that the `smooth` option applied to lines sometimes effects the arrow tips and produces incorrect results. No problem with vertical lines, but any other seems to have a problem. Is this a known bug, or is there a reason why the `smooth` should not be applied to straight lines? **Updated:** to show problem does NOT occur with TikZ, and problem also occurs with curves if `smooth` option is applied.               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \tikzstyle{MyStyle}      =[->, black, ultra thick,       ]     \tikzstyle{MyStyleSmooth}=[->, black, ultra thick, smooth]          \begin{tikzpicture}     \begin{axis}         % 'smooth' option seems to have no effect on lines '1' and '2'         \addplot [MyStyle      , green ] coordinates{(0,0) (0,1)} node [above] {1};         \addplot [MyStyleSmooth, blue  ] coordinates{(1,0) (1,1)} node [below] {2};         %         % But, can't seem to have the 'smooth' on lines, '4', '5' and '6'         \addplot [MyStyle      , orange] coordinates{(2,0)   (3,0)   } node [right] {3};         \addplot [MyStyleSmooth, red   ] coordinates{(4,0)   (2,0.5) } node [below] {4};         \addplot [MyStyleSmooth, red   ] coordinates{(2,1)   (3,1)   } node [left ] {5};         \addplot [MyStyleSmooth, red   ] coordinates{(3,0.8) (2,0.8) } node [right] {6};              % Similar problem with curves: "non-smooth" is ok, "smooth" is not         \addplot[MyStyle,       mark=none, domain=0:1,samples=50, blue] (x,x*x+1);         \addplot[MyStyleSmooth, mark=none, domain=0:1,samples=50, red ] (x,x*x+2);          \end{axis}     \end{tikzpicture}          \begin{tikzpicture} % These are all fine         \draw [MyStyle      , green ] (0,0)   -- (0,1)    node [above] {1};         \draw [MyStyleSmooth, blue  ] (1,0)   -- (1,1)    node [above] {2};         %         \draw [MyStyle      , orange] (2,0)   -- (3,0)    node [right] {3};         \draw [MyStyleSmooth, red   ] (4,0)   -- (2,0.5)  node [below] {4};         \draw [MyStyleSmooth, red   ] (2,1)   -- (3,1)    node [right] {5};         \draw [MyStyleSmooth, red   ] (3,0.8) -- (2,0.8)  node [left ] {6};     \end{tikzpicture}     \end{document}


title: pgfplots: mark max/min value of a function

text: How can I mark the maximum or minimum value of a function like x^2 in pgfplots?               \begin{tikzpicture}        \begin{axis}           \addplot+[mark=none] plot {x^2};        \end{axis}     \end{tikzpicture}


title: TeXnicCenter keyboard shortcut to move outside math environment?

text: Suppose in TeXnicCenter I use keyboard shortcut to get some environment like this (or any other):               \begin{equation}      \end{equation}      After finishing with equation cursor stays inside and one need to type a few additional keyboard buttons (usually arrows) to move outside and continue writing. Things are worse if cursor is somewhere in the middle (because of, for example, changing some text). Is there some keyboard shortcut which moves cursor automatically outside environment, ready for continuation?


title: Revtex4-1 with prl option doesn't show email address

text: I have a strange problem. I'm running latest MacTeX on Mountain Lion 10.8.2. When I compose an article using `revtex4-1` with `prl` as document class option, it doesn't display my email address while if I change `prl` to `pre`, it shows my email address. Does anyone has any idea, why this strange behaviour is occurring and how can I fix this. I'm pasting a snippet of the document preamble below               \documentclass[aps,prl,preprint,showpacs,amsmath]{revtex4-1}     \usepackage{graphicx}     \usepackage{bm}     \usepackage{multibib}     \usepackage{hyperref}           \begin{document}          \author{xyz}\email{xyz@xyz.com}     \title{Test}          \maketitle          \end{document}


title: text not justified

text: I am new to LaTeX and in my first article I am facing the following problem. Although I set the margins to 1 in all around the A4 page, the text does not justify till the end of the right margin. It justifies almost one 1 in before the margin. Header and footer follow the margins but the texts isn't.               \documentclass[12pt,a4paper]{article}     \usepackage{lipsum}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[lmargin=2.5cm, rmargin=2.5cm,tmargin=2.50cm,bmargin=2.50cm]{geometry}     \usepackage{lastpage}     \usepackage{setspace}     \singlespace     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \renewcommand{\headrulewidth}{0.5pt}     \fancyhead[l]{MSc Lift Engineering\\LIFM005DL-Assignment LCK}     \fancyhead[r]{Christoforos Milionis}     \renewcommand{\footrulewidth}{0.5pt}     \fancyfoot[l]{30/05/2013}     \fancyfoot[r]{Page \thepage\ of \pageref{LastPage}}     \usepackage{graphicx}     \usepackage{caption}     \author{Christoforos Milionis}     \title{2nd Assignment}     \begin{titlepage}     \begin{document}     \begin{minipage}{0.10\textwidth}\begin{flushleft}     \end{flushleft}     \end{minipage}     \begin{minipage}{1.1\textwidth}\begin{center}     \LARGE\textbf\\ Oadsdadsn \\     \Large dassdasdas     \end{center}\end{minipage}     \begin{center}     \vskip2.5cm     \LARGE \textbf{dhdjdj uygkygk}\\     \large Student No. jyfgkugy     \end{center}     \vskip6cm     \large \ \ \ \ \ \ \textbf{Supervisor}     \par  \ \  hgfhdfj hgkhg     \end{titlepage}     \doublespace     \tableofcontents     \newpage     \section{Assignment Brief}     \doublespace     \lipsum[23]     \end{document}      This is the preamble.


title: .svg included incorrectly in two-column IEEE conference template

text: Unlike other figures, my `.svg` figure is never in the middle of the column and its right part is out of the page. Here is my **MWE** :               \documentclass[conference]{IEEEtran}          \usepackage{natbib} % for the bibliography     \usepackage{graphicx}     \usepackage[cmex10]{amsmath} % http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/     \usepackage{amsfonts}     \usepackage{bm}     \usepackage{algorithm} % http://ctan.org/pkg/algorithms     \usepackage{algpseudocode} % http://ctan.org/pkg/algorithmicx     \usepackage{array} % http://www.ctan.org/tex-archive/macros/latex/required/tools/     \usepackage{mdwmath}     \usepackage{mdwtab} % http://www.ctan.org/tex-archive/macros/latex/contrib/mdwtools/     \usepackage{eqparbox} % http://www.ctan.org/tex-archive/macros/latex/contrib/eqparbox/     \usepackage[T1]{fontenc}     \usepackage[caption=false]{subfig} % http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/     \usepackage{fixltx2e} % http://www.ctan.org/tex-archive/macros/latex/base/     \usepackage{stfloats} % http://www.ctan.org/tex-archive/macros/latex/contrib/sttools/     \usepackage{url} % http://www.ctan.org/tex-archive/macros/latex/contrib/misc/     % for TikZ drawing     \usepackage{tikz}     \usetikzlibrary{backgrounds, calc, positioning, fit}     \usepackage{color}     % for .svg inclusion     \usepackage{svg}     \usepackage{transparent}     \usepackage{xcolor}     \usepackage{relsize}               \begin{document}          % INCORRECT: left aligned with a column and right side out of page     \section{section Heading Here}     Section goes here.     \begin{figure}         \centering         \def\svgwidth{0.2\columnwidth}           \includesvg{239}         \caption{svg image}     \end{figure}          % CORRECT: right in the middle of one column     \begin{figure}[!h]         \centering         \includegraphics[width=0.9\columnwidth]{fig}         \caption{Simulation Results}         \label{fig}     \end{figure}\\          \end{document}      How may I fix it?


title: \refsegment in biblatex broken since update to TL2012

text: I'm writing my thesis and I'm using `biblatex` with a `biber` back-end to create a per-chapter bibliography. I recently updated to TL2012 and since then the references to the `refsegments` have broken down and I've been getting a Latex warning: `undefined 'refsegment:1'warning` ever since. Here's a MWE:               \documentclass[a4paper,11pt,twoside]{book}          \usepackage[sorting = none, style=numeric]{biblatex}               \defbibheading{bibintoc}{%       \section*{References for Chapter \ref{refsegment:\therefsegment}}}          \addbibresource{biblio.bib}          \begin{document}     \mainmatter     \chapter{Chapter One}     \begin{refsegment}     \cite{Crabtree:2007vn},\cite{Nault:2005ys}     \cite{Alexeev:1996dq}     \end{refsegment}     \chapter{Chapter Two}     \begin{refsegment}     \cite{Sze:2007vn},\cite{Nault:2005ys}     \end{refsegment}          \backmatter          \printbibheading     \bibbysegment[heading=bibintoc]          \end{document}      Changing `refsegment` to `refsection` does fix the problem, but I want to stick with the `refsgement` environment, as it should, and previously did, work; also I'm using the `refsection` environment independently to add the bibliography for an unnumbered introduction. Here are the contents of the `biblio.bib` file used in the MWE:               @techreport{Nault:2005ys,         Author = {Nault, R. M.},         Date-Added = {2012-07-18 14:44:40 +0000},         Date-Modified = {2012-07-18 14:45:21 +0000},         Institution = {Argon National Laboratory},         Title = {Report on the basic energy sciences workshop on solar energy utilization},         Year = {2005}}          @article{Crabtree:2007vn,         Author = {Crabtree, G. W. and Lewis, N. S.},         Date-Added = {2012-07-18 14:36:51 +0000},         Date-Modified = {2012-07-19 15:42:49 +0000},         Journal = {Physics Today},         Number = {3},         Pages = {37},         Title = {Solar energy conversion},         Volume = {60},         Year = {2007}         }          @article{Alexeev:1996dq,         Abstract = {{The thermodynamic boundary of excess liquid phase formation during        molecular beam epitaxy of ternary InGaAs and AlGaAs compounds is        calculated. The critical As, flux corresponding to the liquid phase        appearance exhibits a non-monotonic behavior with temperature. The        strain arising from the mismatch between the lattice constants of the        substrate and the epitaxial layer significantly influences the boundary        of the excess liquid formation. For the AlGaAs ternary compounds, the        temperature gap where the liquid phase is not formed even at the        absence of the incident As, flux is predicted.}},         Address = {{PO BOX 211, 1000 AE AMSTERDAM, NETHERLANDS}},         Affiliation = {{CTR ADV TECHNOL,ST PETERSBURG 198103,RUSSIA.}},         Author = {Alexeev, AN and Karpov, SY},         Date-Added = {2011-05-24 16:20:07 +0200},         Date-Modified = {2012-07-23 08:40:57 +0000},         Doc-Delivery-Number = {{UL940}},         Issn = {{0022-0248}},         Journal = {{JOURNAL OF CRYSTAL GROWTH}},         Journal-Iso = {{J. Cryst. Growth}},         Keywords-Plus = {{THERMODYNAMIC ANALYSIS; SEGREGATION; GA1-XALXAS}},         Language = {{English}},         Number = {{1-2}},         Number-Of-Cited-References = {{15}},         Pages = {15},         Publisher = {{ELSEVIER SCIENCE BV}},         Subject-Category = {{Crystallography}},         Times-Cited = {{7}},         Title = {{Conditions of excess liquid phase formation during molecular beam epitaxy of III-V ternary compounds}},         Type = {{Article}},         Unique-Id = {{ISI:A1996UL94000003}},         Volume = {{162}},         Year = {{1996}}}          @book{Sze:2007vn,         Author = {Sze, S.M. and Ng, K.K.},         Date-Added = {2012-07-04 15:06:57 +0000},         Date-Modified = {2012-07-05 13:12:17 +0000},         Publisher = {Wiley-Interscience},         Title = {Physics of Semiconductor Devices},         Year = {2007}}


title: How to repeat a block of code and increment a variable by one each time?

text: I have many images which I would like to include in a latex document.               \begin{figure}[h]     \centering     \includegraphics[scale=0.15]{DSC_0001.jpg}     \end{figure}      This block of code only differs in the image number 0002 or 0003 etc. Is there an easy way to loop through, repeating this block of code but increasing the variable number by 1 each time. But I would also like a different bit of text between each image. So giving something like,               \begin{figure}[h]     \centering     \includegraphics[scale=0.15]{DSC_0002.jpg}     \end{figure}     This is a pic of blah.     \begin{figure}[h]     \centering     \includegraphics[scale=0.15]{DSC_0003.jpg}     \end{figure}     And this pic is about ...     \begin{figure}[h]     \centering     \includegraphics[scale=0.15]{DSC_0004.jpg}     \end{figure}


title: How can I position the letterhead at the top of the page?

text: > **Possible Duplicate:**   >  Reducing white space above date in Letter Class I am using the following cover letter template: http://www.rpi.edu/dept/arc/training/latex/resumes/let9b.tex On line 33, this template uses the `\vfill` command to push the letter head to the top of the page. But this also yields a large blank space between the letterhead and the start of the letter (presumably so that the bottom of the letter is at the bottom of the page). (Build this and you'll see what I mean) What is the simplest way to have the letterhead be flush with the top and have the letter start no more than a few lines below?


title: Make the `\ddots` looks well in a transformed matrix

text: I want to typeset a large matrix: ![enter image description here](http://i.stack.imgur.com/bsR5J.gif)               \addtocounter{MaxMatrixCols}{8}     \begin{pmatrix}     1\\      &\ddots\\      &      &1\\      &      & &0& &      & &1& &      &\\      &      & & &1&      & & & &      &\\      &      & & & &\ddots& & & &      &\\      &      & & & &      &1& & &      &\\      &      & &1& &      & &0& &      &\\      &      & & & &      & & &1&      &\\      &      & & & &      & & & &\ddots&\\      &      & & & &      & & & &      &1     \end{pmatrix}      I had to change the `\arraycolsep` so as to fit for paper width:               \setlength\arraycolsep{3pt}      and then the `\ddots` in the matrix look a bit ugly: ![enter image description here](http://i.stack.imgur.com/Ag88S.gif) So I changed the `\arraystretch`               \renewcommand\arraystretch{0.8}      the dots all are too low and has not a conspicuous improvement: ![enter image description here](http://i.stack.imgur.com/KBRtn.gif)


title: program package ! Extra }, or forgotten \endgroup

text: I took the STY files(elsarticle.zip) from the following link - http://www.elsevier.com/wps/find/authorsview.authors/elsarticle#models I am using program package and I want to include the keywords in my paper. However, whenever I include the program package, I get an error.               ! Extra }, or forgotten \endgroup.     \endkeyword ->\par \egroup                                 l.34 \end{keyword}      Here is my latex code, which I have stripped down to see if there was any error. If I remove the program package, it works perfectly fine. Or otherwise if I remove the Keywords part, then also it compiles just fine. However, I need both of them. Could anyone please help?               \documentclass[preprint,1p]{elsarticle}     \usepackage{etex}     \usepackage{amssymb,amsmath}     \usepackage{cite}     \usepackage{array}     \usepackage{url}     \usepackage{multirow}     \usepackage{listings}     \usepackage{epstopdf}     \usepackage{color}     \usepackage{tikz}     \usepackage{program}     \usepackage{pgfplots}     \usepackage[tight,footnotesize]{subfigure}     \usepackage{comment}     \usepackage{soul}     \graphicspath{{./Figures/}}     \journal{Microprocessors and Microsystems}     \begin{document}     \begin{frontmatter}          \title{Title of my report}          \begin{keyword}      keyword1 \sep keyword2 \sep keyword3 \sep keyword4     \end{keyword}          \end{frontmatter}     \end{document}


title: Vertical labeled markers

text: I have a plot with four curves, and I wish to add vertical marker to pinpint the exact moment the curve drops below a certain threshold, much like this: ![enter image description here](http://i.stack.imgur.com/uV21E.png) I'd like to be able to control the width of the horizontal bar, as well as the label above it, and it should work on a logarithmic scale on the horizontal axis. How exactly do I do that?


title: Does anyone have suggestions on a workflow for correcting bugs in Mendeley's automatically generated citations?

text: Mendeley's automatic BiBTeX file generation is a godsend in terms of avoiding the mindless and potentially error-prone work of copying citation information from PDFs of research papers to to BiBTeX. However, its automatic bibliographic information extraction algorithm is a little error-prone, and sometimes, even with proper bibliographic information, the export to BiBTeX file process tends to mess up accented characters (such as å, ø, é, etc.). Does anyone have any suggestions on a workflow for correcting the .bib files automatically generated by Mendeley? I'm particularly interested in workflows that back-propagate the corrections back to the Mendeley database so that I don't have to keep correcting .bib files repeatedly. Right now, I work on a Mac, so I currently edit the automatically generated .bib file with BibDesk; something reasonably close to equivalent on Linux would be editing the .bib file with JabRef, or even going through the .bib file with a text editor and BiBTeX-specific package (like emacs and AUCTeX).


title: How can I fit my table of contents into a single page? Revisited

text: This question is essentially the same as How can I fit my table of contents into a single page? "When I use `\tableofcontents` I get all my contents in a single page except for a line that goes on the other page, how can I make all in the same page?" However, the solution given there does not help me, for the following reason. The page next to the ToC is text only (plus one line of ToC), the page after that starts with a section title. The last line of ToC seems to be forced here by LaTeX in order to avoid getting the section title at the bottom: it prefers to put a space between the ToC and the text rather than between paragraphs. Is there an elegant solution to this?


title: Beamer poster citations at wrong place due to use of minipage

text: I want to add a couple citations to my poster but I face a problem regarding the place where the citations appear. In the code that follows (minimum example which for some reason I cannot understand to be honest gives an error but outputs a pdf file nevertheless) what I want is to make the citations appear in the end of the page. On the contrary they appear right after the next tabular environment (or after the next tikzpicture in my full poster) as you can see in the following picture. ![enter image description here](http://i.stack.imgur.com/Zju90.png) I have to mention that I'm using the `beamerthemeI6pd2` style. I would love to know why this happens and how to solve it since I do not have much experience in latex, yet I love it.               \documentclass{beamer}     \usepackage{lipsum}     \mode<presentation>{\usetheme{I6pd2}}     \usepackage[orientation=portrait,size=a4,scale=1.4,debug]{beamerposter}     \usepackage{biblatex}     \usepackage{algpseudocode}               \newlength{\columnheight}     \setlength{\columnheight}{25cm}     \fontsize{9}{10}     \selectfont     \bibliography{test3}     \graphicspath{{pix/}}               \begin{document}          \begin{frame}[fragile]     \begin{columns}         % ---------------------------------------------------------%         % Set up a column          \begin{column}{.49\textwidth}             \begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}                 \begin{minipage}[T]{.95\textwidth}                     \parbox[t][\columnheight]{\textwidth}{                         \begin{block}{Test}                             this is some test text \footfullcite{osborne-rubinstein}                         \end{block}                         \begin{block}{Test}                             this is some test text                         \end{block}                         \begin{block}{Test}                             this is some test text                         \end{block}                         \begin{block}{Test}                             this is some test text                         \end{block}                         \begin{block}{Test}                             \begin{tabular}{lc}                                         \begin{minipage}{.6\textwidth}                                             \begin{algorithmic}[0]                                                 \ForAll{attacker distributions}                                                 \ForAll{combinations of $z$,$t$,$F_z$ and $\sigma^2_z$}                                                 \State calculate payoff                                                 \State locate saddle points                                                 \EndFor                                                 \EndFor                                             \end{algorithmic}                                          \end{minipage}&                                         \begin{minipage}{.4\textwidth}                                 \textbf{Why simulations?}                             \begin{itemize}                                 \item cheap                                 \item fast                                 \item flexible                             \end{itemize}                             \end{minipage} \\                                 \end{tabular}                 \end{block}                 \begin{block}{Test}                     this is some test text                 \end{block}                 \begin{block}{Test}                     this is some test text                 \end{block}                 \begin{block}{Test}                     this is some test text                 \end{block}             }         \end{minipage}             \end{beamercolorbox}         \end{column}         % Second Column %         \begin{column}{.49\textwidth}             \begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}                 \begin{minipage}[T]{.95\textwidth}                     \parbox[t][\columnheight]{\textwidth}{                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                         \begin{block}{Test}                           this is some test text                         \end{block}                     }                 \end{minipage}             \end{beamercolorbox}         \end{column}     \end{columns}     \end{frame}          \end{document}      **EDIT** After a few test I narrowed down the problem. It seems that using the `minipage` tag confuses the `cite` command when it comes to the location of the citing. Anyone has a clue why this happen and how to avoid it?


title: How can I force a period at the end of a note in a tufte-book citation?

text: In tufte-book, citations are rendered as sidenotes, which is great. However, the note field of a bibtex citation is not processed correctly in the sidenote: .tex file:               \documentclass{tufte-book}          \begin{document}     Some text, with a citation~\cite{testcite}.          \bibliographystyle{plain}     \bibliography{tmpdoc}     \end{document}      .bib file:               @book{testcite,       title={The},       author={Book},       year={1998},       publisher={Pub},       edition={second},       note={Part 2.}     }      Truncated output with tufte-book as the document class: ![enter image description here](http://i.stack.imgur.com/36HEG.png) Output with article as the document class: ![enter image description here](http://i.stack.imgur.com/XsWUQ.png)


title: Use of " in verbatim mode

text: I would like to use the symbol `"` inside `\verb`. Is that possible? For example, in               \verb"abc"defg"      the second `"` will be interpreted as the end of the verbatim environment though my intention is that the whole string `abc"defg` is in verbatim.


title: Specify which of multiple citations is preceded by a prefix in BibTex/natbib/BibLaTeX

text: I'm trying to add a prefix to a particular citation in LaTeX using BibTex/natbib/BibLaTeX in the context of multiple citations. Here's what I want to appear:               Claim made by several authors (citation01, citation02; but see citation03).      Here's my attempt in LaTeX:               Claim made by several authors \citep[but see][]{citation01,citation02,citation03}.      The problem is that it adds the prefix ("but see") before all of the citations, and I don't know how to specify which citation is preceded by the prefix. Is there a way to specify where the prefix is inserted?


title: LaTeX 3D PDF with U3D file and media9: add a view at runtime

text: I am wondering if I could hack media9 package to achieve such a feature: end- users should be able to add a new view of an animated U3D file at runtime. So I'll be editing the VIEWS FILE from a Javascript callback. Do you think it is feasible for a person with intermediate knowledge level of TeX? Thanks


title: Unwanted extra vertical spacing with tikz: is it a bug?

text: I am writing an environment to format its content in a box with a background and that can be split across pages. I am using a splitting algorithm similar to the one used in the `boites` package. I want to fill the background (and also do other things, like draw a frame with rounded corners) using `tikz`. But some unwanted vertical spacing are being inserted between some lines. This spacing does not appear when I use `\colorbox` to fill the background. Here is a minimal working example that shows the problem:               \documentclass{article}     \usepackage[paperwidth=140mm,paperheight=55mm,margin=5mm]{geometry}     \usepackage{tikz}     \usepackage{multicol}     \pagestyle{plain}          \makeatletter          % The purpose of the `brbox` environment below is to typeset a box with     % a given background colour. The box may be split by page breaks.     %      % The algorithm used is similar to the one found in the `boites`     % package:     %      % - first the text is formatted in a vbox     %     % - then each line of the vbox is extracted from the vbox and output in     %   a colorbox.          \newbox\boxhead     \newbox\boxtail     \newbox\boxtemp     \newdimen\dimtemp     \newif\ifbrbox@continue          % split \boxtail between the first line (to be stored in \boxhead) and     % the rest (to be stored in \boxtail);     \def\@boxsplit{%       % total height (height + depth) of original box       \dimtemp\ht\boxtail       \advance\dimtemp\dp\boxtail       % split original box in order to retrieve its first line       \setbox\boxhead\vsplit\boxtail to \z@       % the height and depth of the first box are zero: fix them       \setbox\boxhead\vbox{\unvbox\boxhead}%       \wd\boxhead\linewidth%?????????????????????????????????????????????????       \ifvoid\boxtail       \else         % the gap (interline space) between first line and the rest has been         % lost; restore original size: the difference of the original total         % height and the total height of each box         \setbox\boxtemp\vbox{\copy\boxhead\copy\boxtail}%         \advance\dimtemp-\ht\boxtemp         \advance\dimtemp-\dp\boxtemp         \advance\dimtemp\dp\boxhead         \dp\boxhead\dimtemp       \fi     }          % add \fboxsep to the last line     \def\brbox@addfsepdp{%       \dimtemp\dp\boxhead       \advance\dimtemp\fboxsep       \dp\boxhead\dimtemp     }          \newenvironment{brbox}{%       \setbox\boxtail\vbox\bgroup     }{%       \egroup       {%         \noindent         \splittopskip\z@ % glue inserted at the top of a box resulting from a \vsplit         \baselineskip\z@         \lineskiplimit\z@         \lineskip\z@         \vfuzz\maxdimen         \@boxsplit         \setbox\boxhead\vbox{\vskip\fboxsep\box\boxhead}% add \fboxsep to the first line         \leavevmode         \ifvoid\boxtail           \brbox@addfsepdp % add \fboxsep to the last line           \brbox@singleline         \else           \brbox@firstline           \hfil           \brbox@continuetrue           \loop             \@boxsplit             \leavevmode             \ifvoid\boxtail               \brbox@addfsepdp % add \fboxsep to the last line               \brbox@lastline               \brbox@continuefalse             \else               \brbox@middleline               \hfil             \fi             \ifbrbox@continue\repeat         \fi       }%     }               \def\brbox@tikzline{\tikz\node[inner xsep=0pt,inner ysep=0pt,fill=yellow!30](p){\copy\boxhead};}     \def\tikzlines{%       \let\brbox@singleline \brbox@tikzline       \let\brbox@firstline  \brbox@tikzline       \let\brbox@middleline \brbox@tikzline       \let\brbox@lastline   \brbox@tikzline     }     \tikzlines          % alternative: use colorbox to fill the background of the box     \def\brbox@bgline{{\fboxsep\z@ \colorbox{yellow!35}{\box\boxhead}}}          \def\bglines{%       \let\brbox@singleline \brbox@bgline       \let\brbox@firstline  \brbox@bgline       \let\brbox@middleline \brbox@bgline       \let\brbox@lastline   \brbox@bgline     }          \makeatother               \newcommand{\mytext}{%       \LaTeX\ is a high-quality typesetting system; it includes features       designed for the production of technical and scientific       documentation.       \LaTeX\ is the de facto standard for the communication and publication       of scientific documents.     }          \begin{document}          \begin{multicols}{3}       \mytext            \columnbreak       \begin{brbox} \mytext \end{brbox}            \columnbreak       \bglines       \begin{brbox} \mytext \end{brbox}     \end{multicols}          \end{document}      ![enter image description here](http://i.stack.imgur.com/pFQCN.png) How can I eliminate the extra vertical spacing that appears only when `tikz` is used? This looks like a `tikz` bug.


title: Setting math font size

text: MATLAB has the ability to "publish" code as an html document. It can include math by taking equations keyed in LaTeX notation, processing it with `latex` and embedding a bitmap image into the html. An example MATLAB file would be               %%     % With this equation, $x(t) = y(t)$, MATLAB only processes the math with LaTeX     %      running the MATLAB `publish` function would essentially internally convert this to               \documentclass{article}     \begin{document}     $x(t) = y(t)$     \end{document}      although everything may be enclosed in an `\hbox`. I can't really follow all the details of the MATLAB code as some of it is closed source. `\begin{edit}` One potentially important piece of information I just found is that the MATLAB version of the `article` class has `\input{size1\@ptsize.clo}` commented out with the following comment > %% The following line causes the HG text to offset vertically and > horizontally. Apparently the good people at the Mathworks don't understand how to deal with LaTeX margins. Needless to say, this is why commands like `\large` don't work even when stuck in an `\hbox`. `\end{edit}` The problem appears to be that MATLAB only processes the math with LaTeX. In how to scale math font only, you appear to need to be outside the math environment to change the font size. Is it possible to change the math font size from within the math environment? I think the MATLAB parser decides when to start and stop processing with `latex` based on `$`'s. Maybe there is some other way to exit mathmode.


title: Title page with the author name on the top left corner

text: I'm having difficulties to create a page title for my research paper which require this format: The first page (the top left corner) should contain the full name of the author(s). In the center of the page the title of the paper should be printed in capital letters (double-spaced if more than one line). An abstract and a list of key words in English should be printed below the title. A footnote with the address of the institution of each author as well as the e-mail address should be printed below. The article class produce the author name below the title. Can anyone assist me on this?


title: LaTeX letter with addresses fields are in the right place - one under another

text: Perhaps, this question is stupid for some users, who has more experience, but I can't find any correct option (though I re-read KOMA-Script guide section about pseudo-lengths) therefore, please, accept my apologies. I use the class scrlttr2 for letter writing, and I want to change standard placement of addressee and sender for the following reasons: the rules of business correspondence in Russia and Ukraine prescribe the following arrangement of addresses —                                                                       ToName                                                             ToAddress                                                                  FromName                                                             FromAddress                                     Dear Sir or Madam!          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor      incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud     exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.      According to this topic I changed the variables `toaddrvpos` and `toaddrhpos`. And that has allowed to receive this (output of LaTeX source shown below) ![enter image description here](http://i.stack.imgur.com/pwXqo.jpg) The source:               \documentclass[backaddress=off]{scrlttr2}     \usepackage{cmap}     \usepackage{lipsum}     \usepackage[utf8]{inputenc}     \usepackage[T2A]{fontenc}     \usepackage[ukrainian]{babel}          \makeatletter     \@setplength{toaddrvpos}{10mm}     \@setplength{toaddrhpos}{130mm}     \@setplength{backaddrheight}{0pt}     \let\@texttop\relax     \makeatother          \setkomavar*{enclseparator}{Додатки}          \setkomavar{fromname}{John Doe}     \setkomavar{fromaddress}{Somestreet St., \\     Sometown, 12345}          \setkomavar{date}{\today}               \begin{document}     \begin{letter}{Addressee \\     Road \\     Town}          \opening{Dear Recipient,}          \lipsum[1]          \closing{Best Regards,}     \end{letter}     \end{document}      However, i'm stuck here and can't continue. Thanks in advance for help.


title: Redefine \arraycolsep for particular environments

text: How do I change `\arraycolsep` for a single environment? E.g., I have `\arraycolsep` set so that the white spacing on either side of "=" in the equation array environment is not excessive. However, this brings the columns of matrices in the `bmatrix` environment closer together as well. I would like to redefine the matrix (`bmatrix`) environment so that it calls upon a local definition of `\arraycolsep` that is different than the one used globally (for equation arrays).


title: bibliography doesn' t appear, even though I have the .bbl

text: I am using TeXworks and have a problem with BibTeX. I compiled the `.bbl` file however I can't see the bibliography in the output.               \usepackage[super]{natbib}     \begin{document}      bu bir denemedir.\cite{Sripirom20112402}.          \bibliographystyle{plane}     \thebibliography{tryin}     \end{document}      If I type in like above `.tex`, I can see only the title of bibliography and when I type `\bibliography{tryin}`, I get nothing.


title: What goes wrong with combining multicolumn and tabular

text: When I try the following code I get some errors about misplaced `\noalign`, however I almost entirely copied the code from the wikipage. What is going wrong?               \begin{table}[hbt]     \centering     \begin{tabular}{|>{\centering}m{2cm}<{\centering}|>{\centering}m{2cm}<{\centering}|>{\centering}m{2cm}<{\centering}|>{\centering}m{2cm}<{\centering}|>{\centering}m{2cm}<{\centering}|}     \hline     A&I&J&K&L\\\hline     B&\verb/--/&\verb/++/&\verb/++/&\verb/++/\\\hline     C&\verb/++/&\verb/+/&\verb/-/&\verb/--/\\\hline     D&\verb/--/&\verb/-/&\verb/++/&\verb/+/\\\hline     E&\multicolumn{2}{c}{F}&G&H\hline     \end{tabular}     \end{table}


title: Start text on second page (without \chapter) at same position as on first page (with \chapter)

text: This MWE shows what I am trying:               % arara: pdflatex     \documentclass[oneside]{book}     \usepackage{color}     \begin{document}%     \chapter*{A}%     Some text%     \clearpage%     \vspace*{-1pt}%     \noindent\begin{minipage}{\textwidth}%     \chapter*{A}%     Some text without heading, starting at the same position as above.%     \end{minipage}%     \end{document}%      I need the minipage in order to prevent page-breaking of its contents. I have two questions:   1. Why do I need -1pt before the minipage? Is there some minipage spacing I need to adapt? In a different document, I even need -9.75 (I am using \titleformat from the titlesec package there).   2. What can I do to hide \chapter*? I know \phantom, but this does not seem to work (does not compile). \textcolor{white} would work, but is not very nice when copying text from the pdf. **Edit:** The answer to `1` is `\begin{minipage}[t]{\textwidth}`. God knows why the default (when omitting `[t]`) looks like top alignment, but yields a different result. @Herbert's answer to `2` is perfect, I had tried `\phantom{\chapter*{A}}`. Thanks!


title: Beautiful text - typography

text: Can anyone show me how to draw something like this. I am thinking of having a quote with similar font but have no idea where to start. ![enter image description here](http://i.stack.imgur.com/6FvVX.jpg)


title: Update in Biblatex MLA citation style?

text: I complied an essay for my English Composition class. After receiving the review, the grader marked my Works Cited as 'incorrect'. I use lualatex -> biber -> lualatex -> lualatex to compile my `.tex`. I use `biblatex.sty,v 1.7` and `mla.bbx v0.9` My `.bib` file:               @InBook{sample,         author="Some Author",         title="Some Title",         booktitle="Some Book Title",         publisher="Some Publisher",         address="Some Address",         editor="Some Editor",         year="1988",     }      According to the grader's website, the 'correct' citation should be: > Author, Some. "Some Title". _Some Book Title_. Ed. Some Editor. Some > Address: Some Publisher, 1988. My citation (automatically generated) > Author, Some. “Some Title”. In: _Some Book Title_. Ed. by Some Editor. Some > Address: Some Publisher, 1988. The main difference are: in the second citation, there is a 'In:' before the book title, and a 'by' after 'Ed.' So, is `biblatex-mla` out-of-date, or my grader's citation out-of-date (which is more likely, imo)? If it is the latter, could you post the standard mla citation website (I searched, and came up with the mla citation same as my grader's (at least from Cornell University's website).


title: How to add footnotes in htlatex via fn-in?

text: In the html code that is generated by htlatex I want to have footnotes appear on the same page instead of a new one (just like in the .pdf that is generated by pdflatex). So I read about the `fn-in` option that I should pass to htlatex. Now I am absolutely clueless about how to do this. If I type               htlatex main.tex "-fn-in"      (or just `"fn_in"` htlatex complains:               ! I can't find file `-fn-in.cfg'.     <to be read again>                        \relax     l.12 \begin{document}          Please type another input file name:      So what am I supposed to do instead?


title: How do I properly center subtables?

text: I have three similar tables, one within its own figure and two as two subfigures within a second figure. The two subtables are off-center, despite being within the \centering environment. How can I center all the tables? (I'm new to tables, and my construction is probably less than elegant, but I've taken out all the extraneous lines that don't cause the error. It must be something in the multirow/multicolumn part.)               \documentclass[]{article}      \usepackage{multirow, array, hhline}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}           \begin{table}[!ht]     \centering     \begin{tabular}{|r|c|c|c|}     \multirow{2}{*}{\parbox[p][2.5em][b]{2.5cm}{\centering Rows}} & \multicolumn{3}{ >{\centering\arraybackslash}p{3.5cm}|}{\parbox[p][2.5em][c]{3.5cm}{\centering Columns}} \\     \multicolumn{1}{|c|}{} & 0 & 0.0 & 0.0 \\     \end{tabular}     \caption{Caption 1}      \end{table}          \begin{table}[!ht]     \centering     \begin{subtable}[h]{2in}     \begin{tabular}{|r|c|c|c|}     \multirow{2}{*}{\parbox[p][2.75em][b]{2.5cm}{\centering Rows}} & \multicolumn{3}{ >{\centering\arraybackslash}p{3.5cm}|}{\parbox[p][2.5em][c]{3.5cm}{\centering Columns}} \\     \multicolumn{1}{|c|}{} & 0\% & 00\% & 00\% \\     \end{tabular}     \caption{2a}     \end{subtable}          \begin{subtable}[h]{2in}     \begin{tabular}{|r|c|c|c|}     \multirow{2}{*}{\parbox[p][2.75em][b]{2.5cm}{\centering Rows}} & \multicolumn{3}{ >{\centering\arraybackslash}p{3.5cm}|}{\parbox[p][2.5em][c]{3.5cm}{\centering Columns}} \\     \multicolumn{1}{|c|}{} & 0\% & 00\% & 00\% \\     \end{tabular}     \caption{2b}     \end{subtable}     \end{table}          \end{document}


title: Tables as commands

text: I have to do a little work but I have to use frequently the same settings for a table and I put the following code               \newcommand{\tab41}[4]{\begin{center}     \begin{tabular}{|c|l||c|l||c|l||c|l|}     \hline     (A) & #1 & (B) & #2 (C) #3 & (D) & #4\\     \hline     \end{tabular}     \end{center}}      and it fails. What am I doing wrong?


title: How can LaTeX code in a data file be read by pgfplotstable?

text: I would like to place some LaTeX math code in the columns of a file to be read by `pgfplotstable`. Unlike How to use underscores with pgfplotstable?, I would like the columns to be formatted so LaTeX will interpret the subscripts and symbols that it contains. For example, I have a data file that looks like:               {Time}   {$\theta$}   {Fit to $C_a \tan 3\theta$}     0        0.2          0.195     ...      Every time I try to read a file like this with `pgfplotstable`, I get an error: > >     ! Missing \endcsname inserted. >     <to be read again> >                        \mathop >     l.101       } >                  ^^M >   Is it possible to have the formatting embedded in the column headings of a data file? If so, how?


title: Does anyone know what a cmap file has to look like

text: This may be an off-topic fringe case, but I need it for `pdftex`... I made an encoding QS7 for ASCII+Greek and now the only thing missing is a CMAP file to enable copying text from `acroread`. I made the following file `qs7.cmap` by trying to mimic the other ones in the cmap package but as this has to be proper PostScript (which I know nothing about), there are probably a million things I can have done wrong without even noticing.               %!PS-Adobe-3.0 Resource-CMap     %%DocumentNeededResources: ProcSet (CIDInit)     %%IncludeResource: ProcSet (CIDInit)     %%BeginResource: CMap (TeX-QS7-0)     %%Title: (TeX-QS7-0 TeX QS7 0)     %%Version: 1.000     %%EndComments     /CIDInit /ProcSet findresource begin     12 dict begin     begincmap     /CIDSystemInfo     << /Registry (TeX)     /Ordering (QS7)     /Supplement 0     >> def     /CMapName /TeX-QS7-0 def     /CMapType 2 def     1 begincodespacerange     <00> <FF>     endcodespacerange     64 beginbfchar     <00> <0060>     <01> <00B4>     <02> <02C6>     <03> <02DC>     <04> <00A8>     <05> <02DD>     <06> <02DA>     <07> <02C7>     <08> <02D8>     <09> <00AF>     <0A> <02D9>     <0B> <00B8>     <0C> <02DB>     <0D> <201A>     <0E> <2039>     <0F> <203A>     <10> <201C>     <11> <201D>     <12> <201E>     <13> <00AB>     <14> <00BB>     <15> <2013>     <16> <2014>     <17> <200B>     <19> <0131>     <1A> <0237>     <1B> <FB00>     <1C> <FB01>     <1D> <FB02>     <1E> <FB03>     <1F> <FB04>     <20> <2423>     <21> <0021>     <22> <0022>     <23> <0023>     <24> <0024>     <25> <0025>     <26> <0026>     <27> <2019>     <28> <0028>     <29> <0029>     <2A> <002A>     <2B> <002B>     <2C> <002C>     <2D> <002D>     <2E> <002E>     <2F> <002F>     <30> <0030>     <31> <0031>     <32> <0032>     <33> <0033>     <34> <0034>     <35> <0035>     <36> <0036>     <37> <0037>     <38> <0038>     <39> <0039>     <3A> <003A>     <3B> <003B>     <3C> <003C>     <3D> <003D>     <3E> <003E>     <3F> <003F>     <40> <0040>     endbfchar     64 beginbfchar     <41> <0041>     <42> <0042>     <43> <0043>     <44> <0044>     <45> <0045>     <46> <0046>     <47> <0047>     <48> <0048>     <49> <0049>     <4A> <004A>     <4B> <004B>     <4C> <004C>     <4D> <004D>     <4E> <004E>     <4F> <004F>     <50> <0050>     <51> <0051>     <52> <0052>     <53> <0053>     <54> <0054>     <55> <0055>     <56> <0056>     <57> <0057>     <58> <0058>     <59> <0059>     <5A> <005A>     <5B> <005B>     <5C> <005C>     <5D> <005D>     <5E> <005E>     <5F> <005F>     <60> <2018>     <61> <0061>     <62> <0062>     <63> <0063>     <64> <0064>     <65> <0065>     <66> <0066>     <67> <0067>     <68> <0068>     <69> <0069>     <6A> <006A>     <6B> <006B>     <6C> <006C>     <6D> <006D>     <6E> <006E>     <6F> <006F>     <70> <0070>     <71> <0071>     <72> <0072>     <73> <0073>     <74> <0074>     <75> <0075>     <76> <0076>     <77> <0077>     <78> <0078>     <79> <0079>     <7A> <007A>     <7B> <007B>     <7C> <007C>     <7D> <007D>     <7E> <007E>     <7F> <002D>     <80> <00A1>     endbfchar     64 beginbfchar     <81> <00BF>     <82> <20AC>     <83> <20AF>     <84> <00A6>     <85> <00A7>     <86> <037E>     <87> <00A9>     <88> <037A>     <89> <0387>     <8A> <00AC>     <8B> <00AD>     <8C> <2015>     <8D> <00B0>     <8E> <00B1>     <8F> <00B2>     <90> <00B3>     <91> <0384>     <92> <0385>     <93> <0374>     <94> <0375>     <95> <0386>     <96> <00B7>     <97> <0388>     <98> <0389>     <9E> <03AD>     <9F> <038C>     <A0> <03AE>     <A1> <03AF>     <A2> <0390>     <BD> <00BD>     <BE> <038E>     <BF> <038F>     <C0> <038A>     <C1> <0391>     <C2> <0392>     <C3> <0393>     <C4> <0394>     <C5> <0395>     <C6> <0396>     <C7> <0397>     <C8> <0398>     <C9> <0399>     <CA> <039A>     <CB> <039B>     <CC> <039C>     <CD> <039D>     <CE> <039E>     <CF> <039F>     <D0> <03A0>     <D1> <03A1>     <D3> <03A3>     <D4> <03A4>     <D5> <03A5>     <D6> <03A6>     <D7> <03A7>     <D8> <03A8>     <D9> <03A9>     <DA> <03AA>     <DB> <03AB>     <E0> <03B0>     <E1> <03B1>     <E2> <03B2>     <E3> <03B3>     <E4> <03B4>     endbfchar     27 beginbfchar     <E5> <03B5>     <E6> <03B6>     <E7> <03B7>     <E8> <03B8>     <E9> <03B9>     <EA> <03BA>     <EB> <03BB>     <EC> <03BC>     <ED> <03BD>     <EE> <03BE>     <EF> <03BF>     <F0> <03C0>     <F1> <03C1>     <F2> <03C2>     <F3> <03C3>     <F4> <03C4>     <F5> <03C5>     <F6> <03C6>     <F7> <03C7>     <F8> <03C8>     <F9> <03C9>     <FA> <03CA>     <FB> <03CB>     <FC> <03CC>     <FD> <03CD>     <FE> <03CE>     <FF> <03AC>     endbfchar     endcmap     CMapName currentdict /CMap defineresource pop     end     end     %%EndResource     %%EOF      The only indication I have that it didn't work is that when copying greek text it comes out as rubbish. The file _is_ loaded               [3<<t1.cmap>><<t2a.cmap>><<qs7.cmap>>]      together with T2A, and copying russian text works like a charm. So I suspect the problem lies in the file. Is there any way of debugging this? Can I get a spelled-out error message? Is there anything (apart from putting the file in the right place) I need to configure? Obviously, I'm using the cmap package for this. If there is any other .SX site where this would be more appropriate, please advise.


title: Extend a language with additional keywords?

text: I'm using `listings` and I want to extend a language with additional keywords for highlightning. I know there is an option `morekeywords` available, but that only works for a particular `lstset` declaration and I don't want to have to copy-paste all keywords into all listings. I've tried declaring the keywords as part of a command but that doesn't work (probably because the command is not expanded and I don't know how to fix that). So is there any way of declaring a new language by copying an existing one and just adding more keywords?


title: Changing the font size of a bibliography using BibTeX with the amsrefs package

text: I am using BibTeX with the `amsrefs` package to create a bibliography. The output of the bibliography looks to be of a slightly smaller font size that that of the ambient document, and it's imperative that these font sizes be equal. I have already tried               {\normalsize\bibliography{mybib}}      to no avail. Can anyone please steer me in the right direction? Thanks!


title: Acronyms with an arrow in front of them

text: I'm using the `acronyms` package and I wonder if there's an easy way of marking acronyms as such by putting an arrow in front of them?


title: Problem in sorting the index?

text: > **Possible Duplicate:**   >  Layouting the index-page I am writing my master thesis using Latex and I have a problem in sorting the index. The problem is that I am not able to divide the index into letter groups, and symbol groups. I want the groups to be separated by a capital letter that describes the group. My system is win.7 64 bit, my distributor is MikTeX 2.9, and my text editor is TeXmaker Thanks in Advance


title: References on the same slide on beamer

text: I would like to put references on the same slide which is being referenced. The best place in my opinion will be above the short name of presentation and date row. How can I achieve this?   Mwe:               \documentclass{beamer}     \usepackage{biblatex}     \addbibresource{biblatex-examples.bib}     \begin{document}      \begin{frame}      Here is text \footfullcite{westfahl:space}.      % this writes ref01 in footnote Here is text          \fullcite{westfahl:space}.       % this writes ref01 in place      \end{frame}      \end{document}


title: When author field is empty, do not put colon after prenote in authortitle-comp

text: Preemptive note: This is not a duplicate of Empty author field in BibTeX. * * * I am experiencing a weird thing with the _authortitle-comp_ citation style where, if the _author_ field is empty in a bibliographic record, a colon will still be set between the _prenote_ field and the _title_ field, like in footnote 2, where I'd expect the same behavior as in footnote 1: ![Both footnote 1 and 2 should have "Vgl." without the colon in footnote 2](http://i.stack.imgur.com/NNNqA.png) Here's a minimum working example (never mind the umlauts and such):               \documentclass[12pt,paper=a4]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage[style=authortitle-comp,backend=biber]{biblatex}          \begin{filecontents*}{bibliography.bib}     @Incollection{poppe,         Title = {Die Verwandlung},         Author = {Sandra Poppe},         Booktitle = {Kafka-Handbuch},         Booksubtitle = {Leben -- Werk -- Wirkung},         Editor = {Manfred Engel and Bernd Auerochs},         Address = {Stuttgart},         Publisher = {Metzler},         Year = {2010},         Pages = {164--174}     }          @Incollection{kindlerbio,         Title = {Kafka, Franz -- Biogramm},         Booktitle = {Kindlers Literatur Lexikon in 18 Bänden},         Publisher = {Metzler},         Year = {2009},         Address = {Stuttgart},         Edition = {3., völlig neu bearb. Aufl.},         Url = {http://www.munzinger.de/document/22000340100},         Urldate = {2014-07-11}     }     \end{filecontents*}          \bibliography{bibliography.bib}          \begin{document}     Some text,\footfullcite[Vgl.][]{poppe} and some other text as well.\footfullcite[Vgl.][]{kindlerbio}     \end{document}      I've been using some additional specifications in a biblatex.cfg file to tweak things according to how my department likes us to format bibliographies, cf. http://pastebin.com/1uZs4vtw (based on these modifications of authortitle- icomp for German studies by J. 'Mach' Wust). Without that file, things are generated as expected except there's a full stop after the author name instead of a colon, and further testing reveals that the following line is the culprit (this is a change that is suggested e.g. in Colon (:) instead of period (.) after author with biblatex, alphabetic, maybe the original author copied it from there, I don't know):               \renewcommand{\labelnamepunct}{\addcolon\addspace}      If it's that, how would this line have to be changed to not result in the problem I have? Changing this line to               \renewcommand{\nametitledelim}{\addcolon\addspace}      does not seem to have any effect.


title: Make hyperref take pdfinfo from \title and \author

text: I once read about an option for `hyperref` that automatically takes the info provided via the standard `\author` and `\title`, and puts it into the `pdfinfo`. Now I want to implement it in my template and can't find it anywhere in the `hyperref` manual nor anywhere else. Did I dream about this or can someone help me out here? (A similar, but more general question: Is hyperref really the best way to add metadata to a TeX file?)


title: Specifying bbl in Latex2rtf using Lyx

text: I'm trying to export a Lyx-file (lyx) to a RTF-file with Latex2rtf using Lyx. I've already generated a bbl-file by writing following commands in the Terminal:               latex file.tex     bibtex file.aux      I've tried to edit the "Extra flag"-setting to '-b' in Preferences>File handling>Converters menu (highlighting LaTeX (plain) -> Rich Text Format). But also the converter field itself:               latex2rtf -b $$i      My desired output is to display the citations correctly in my RTF file. To use the latex2rtf command is beyond the scope of this question.


title: XeLaTeX warning - objects still allocated in memory

text: I'm typesetting a document in `XeLaTeX` and keep getting this message:               ** WARNING ** 1735 memory objects still allocated     You may want to report this to tex-k@tug.org      What does it mean? Am I to worry about it?


title: Nested ifnum conditional groupplots with pgfplots?

text: I want to use `groupplots`, and set a variable to conditionally plot the plots. Here is the minimal non-working example:               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{calc}     \usepgfplotslibrary{groupplots}     \def\a{1}     \begin{document}     \begin{tikzpicture       \begin{groupplot}[group style={group size=1 by \a},height=3cm,width=6cm]         \ifnum\a>0{ %         \nextgroupplot[title=One]         \addplot coordinates {(0,0) (1,1) (2,2)};         \ifnum\a>1{ %         \nextgroupplot[title=Two]         \addplot coordinates {(0,2) (1,1) (2,0)};         \ifnum\a>2{ %         \nextgroupplot[title=Three]         \addplot coordinates {(0,2) (1,1) (2,1)};         \ifnum\a>3{ %         \nextgroupplot[title=Four]         \addplot coordinates {(0,2) (1,1) (1,0)};         }\fi         }\fi         }\fi         }\fi       \end{groupplot}     \node (title) at (0,0) {THE Title};     \end{tikzpicture}     \end{document}      This fails with:               ! Extra }, or forgotten \endgroup.     l.24     }               \fi      Not sure if it's because of the nested `\ifnum`s, or because of `\nextgroupplot`; if the first `\nextgroupplot` is commented, error is now:               ! Undefined control sequence.     l.11     \addplot                       coordinates {(0,0) (1,1) (2,2)};      Can such a conditional plotting of group plots be done?


title: Separate book into parts and chapters

text: I am working with the `book` document class and want to create something like this. Moreover, in the Table of Contents I want the "Part" to be under- and over-lined and not to be numbered. I think of using the `\part` command but don't know how to do this. Any help will be highly appreciated. ## Part I   1. Introduction.......... 1   2. Main results ......... 15


title: Figure overlaps Table

text: When placing a table then a figure, the figure overlaps half the table.. Here is what the tex looks like:               \begin{table}[h]     \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \begin{tabular}{lR{2cm}R{2cm}R{2cm}R{2cm}R{1.5cm}R{2cm}l}     Name & Value1 & Value2 & Value3 & Value4 & Value5 & Value6 \\     \hline\\     \hspace{5mm}Name1 & 100 & 900 & 6 & 2 & 1 & 47 \\     \end{tabular}     \end{table}          \pagebreak     wew          \begin{figure}[h]     \centering         \captionsetup{justification=centering,margin=2cm}         \includegraphics[width=1.0\textwidth]{chart.png}         \caption{label1}         \label{chart}     \end{figure}      I am using a two-column style in `\documentclass{sig-alternate}` (academic paper). The actual overlapping is odd, it seems like the figure starts halfway through the table **and** in the second column... So it runs of the page as well. Any ideas? Thanks.


title: How can I solve "Float(s) lost" when using afterpage / minted packages?

text: I'm writing a document where I have a lot of long listings. I use the package minted to typeset the listings, which I always embed in a float. Since the listings are quite long, and LaTeX usually does not place the floats correctly, I also use the package afterpage to force a `\clearpage` after each long listing. Unfortunately I sometimes get a message from LaTeX saying that               ... Float(s) lost     ... This may be a LaTeX bug.      It seems that this occurs if the float / afterpage command is located right after the first paragraph on a page. Below is a minimum working example that should trigger the error message (compile with `latex -shell-escape example.tex`):               \documentclass[a4paper,11pt]{report}     \usepackage{afterpage}     \usepackage{minted}     \begin{document}     a          a           % ...     % Insert as many paragraphs 'a' such that 'begin' below appears     % as the first line on 2nd page (in my case I need 44 x 'a').     %          a          begin          \afterpage{\clearpage}     \begin{figure}[p]     abracadabra     \end{figure}          end          % Even adding more text below won't help          \end{document}      Note that problem disappears if package _minted_ is not included, even though _minted_ is not used. My question is how can I work around this? What am I doing wrong? I found a way, which is simply to relocate the float in the text, like one paragraph above or below. But this is not handy since editing further the text might again require to change the float location. Note that I'm ok to replace `\afterpage` as long as the new package provides similar functionality. EDIT: The code above is just for triggering the problem. My actual "use case" is to replace the `figure` float with a `listing` float:               \begin{listing}[p]     \begin{minted}[gobble=2]{python}       print "Hello, World!"       #       # Typically much       # ... much       # ... longer listing (like 3/4 of a page)       #     \end{minted}     \end{listing}      EDIT2: I updated the float placement option to tell LaTeX we want the float on a separate page (i.e. `[p]`). Actually the problem occurs whatever the options I use. Also, I would happily use `[p]` without `\afterpage{\clearpage}` if LaTeX would not insist on postponing all my floats 10 pages away.


title: Using one font type for text, and other type for Math

text: Can I make in my document so that I use one font for the text part, but other font for formulas? I'd like to use Garamond for text, and Utopia for math.


title: Hyperbola? conics?

text: I use Geogebra to draw by five knowing points on a plane an hyperbol. Then I used the intern command to translate into tikz code my figure. I create a file source code latex/tikz, but after compilation (pdfLaTeX), points are drawing, but not the correct hyperbola trough the fives points. Question : Someone know how to draw a simplest conic by five points directly in TikZ source? I can I draw an hyperbol if I know only the f(x,y)=0 equation? Thank for this studies ! D. Collin ![figure crée avec Geogebra](http://i.stack.imgur.com/WPrl5.png) ![Figure crée en Latex/Tikz](http://i.stack.imgur.com/gFBft.png) % % % % The code generate by export pgf/TikZ is :                   % ---------     \documentclass[10pt]{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \pagestyle{empty}     \begin{document}     \definecolor{xdxdff}{rgb}{0.4902,0.4902,1}     \definecolor{zzqqzz}{rgb}{0.6,0,0.6}     \definecolor{qqzzqq}{rgb}{0,0.6,0}     \definecolor{uququq}{rgb}{0.25098,0.25098,0.25098}     \definecolor{ffqqtt}{rgb}{1,0,0.2}     \definecolor{qqqqff}{rgb}{0,0,1}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]     \clip(-6,-6) rectangle (6,6);     \draw[line width=0.4pt] (-3.24171,-0.87914) -- (-3.16257,-0.72086) -- (-3.32086,-0.64171) -- (-3.4,-0.8) -- cycle;      \draw[line width=0.4pt] (-2.70156,-2.99384) -- (-2.67081,-2.81957) -- (-2.84508,-2.78881) -- (-2.87584,-2.96309) -- cycle;      \draw[line width=0.4pt] (0.37519,-4.37497) -- (0.35016,-4.19978) -- (0.17497,-4.22481) -- (0.2,-4.4) -- cycle;      \draw[line width=0.4pt] (2.71507,-4.46302) -- (2.56435,-4.37027) -- (2.4716,-4.52098) -- (2.62232,-4.61373) -- cycle;      \draw [samples=50,domain=-0.99:0.99,rotate around={-157.68231:(-4.98202,-2.15901)},xshift=-4.98202cm,yshift=-2.15901cm,line width=2pt,color=ffqqtt] plot ({2.47764*(1+\x^2)/(1-\x^2)},{1.88916*2*\x/(1-\x^2)});     \draw [samples=50,domain=-0.99:0.99,rotate around={-157.68231:(-4.98202,-2.15901)},xshift=-4.98202cm,yshift=-2.15901cm,line width=2pt,color=ffqqtt] plot ({2.47764*(-1-\x^2)/(1-\x^2)},{1.88916*(-2)*\x/(1-\x^2)});     \draw [line width=1.2pt,color=qqqqff] (-1,4)-- (-2,2);     \draw [line width=1.2pt,color=qqqqff] (-2,2)-- (-2.6,-1.4);     \draw [line width=1.2pt,color=qqqqff] (-2.6,-1.4)-- (0,-3);     \draw [line width=1.2pt,color=qqqqff] (0,-3)-- (-1,4);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=qqzzqq] (3,-4)-- (-3.4,-0.8);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=qqzzqq] (3,-4)-- (2.62232,-4.61373);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=zzqqzz] (3,-4)-- (0.2,-4.4);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=zzqqzz] (3,-4)-- (-2.87584,-2.96309);     \draw [dash pattern=on 2pt off 2pt,color=qqqqff] (-2,2)-- (-3.71193,-1.42386);     \draw [dash pattern=on 2pt off 2pt,color=qqqqff] (-2.6,-1.4)-- (-3.11831,-4.33711);     \draw [dash pattern=on 2pt off 2pt,color=qqqqff] (0,-3)-- (0.27455,-4.92186);     \draw [dash pattern=on 2pt off 2pt,color=qqqqff] (0,-3)-- (3.39975,-5.09215);     \fill [color=qqqqff] (-1,4) circle (1.5pt);     \draw[color=qqqqff] (-1.14371,4.25851) node {$M_1$};     \fill [color=qqqqff] (-2,2) circle (1.5pt);     \draw[color=qqqqff] (-2.07806,2.2897) node {$M_2$};     \fill [color=qqqqff] (-2.6,-1.4) circle (1.5pt);     \draw[color=qqqqff] (-2.77882,-1.36427) node {$M_3$};     \fill [color=qqqqff] (0,-3) circle (1.5pt);     \draw[color=qqqqff] (0.30787,-2.78248) node {$M_4$};     \fill [color=qqqqff] (3,-4) circle (1.5pt);     \draw[color=qqqqff] (3.27776,-3.70015) node {$M_5$};     \fill [color=uququq] (0.2,-4.4) circle (1.5pt);     \draw[color=uququq] (-0.02583,-4.35086) node {$H_{14}$};     \fill [color=uququq] (-2.87584,-2.96309) circle (1.5pt);     \draw[color=uququq] (-3.0291,-2.83254) node {$H_{23}$};     \fill [color=uququq] (2.62232,-4.61373) circle (1.5pt);     \draw[color=uququq] (2.56032,-4.70124) node {$H_{34}$};     \fill [color=uququq] (-3.4,-0.8) circle (1.5pt);     \draw[color=uququq] (-3.49627,-0.46329) node {$H_{12}$};     \fill [color=xdxdff] (4.0018,-4.30299) circle (1.5pt);     \draw[color=xdxdff] (4.11201,-4.0839) node {$E$};     \fill [color=xdxdff] (-0.46313,5.00435) circle (1.5pt);     \draw[color=xdxdff] (-0.64317,5.19286) node {$F$};     \end{tikzpicture}     \end{document}     %----------


title: How to delete borders (rules) in a table defined with the cals package?

text: I recently discovered the less known cals package for defining tables HTML- style. Here is all documentation I found:   * http://www.ctan.org/tex-archive/macros/latex/contrib/cals (demo & doc)   * http://tug.org/TUGboat/tb32-2/tb101parashchenko.pdf (user's manual) I can create nice tables but following the directions to delete vertical cell borders does not work. Can anybody help? Here is a working example:               \documentclass{report}     \listfiles          %tables in CALS markup     \usepackage{cals}          %calculate with \textwidth etc.     \usepackage{calc}     \newlength{\lengthw}          \begin{document}         \setlength{\lengthw}{\textwidth-5cm}     \begin{table}[ht]     \caption{Aantal uitgangen}     \begin{calstable}     \colwidths{{\lengthw}{5cm}}          \def\cals@cs@width{0pt} %this should delete column borders but is does not!          \thead{     \brow      \alignL\cell{} \alignC\cell{\vfil Aantal uitgangen}\erow         }        \brow         \alignL\cell{\vfil$aantal\ gebruikers < 50$}         \alignC\cell{\vfil 1 of 2 uitgangen (cfr. 7.1.2)}     \erow     \brow         \alignL\cell{\vfil$50 \leq aantal\ gebruikers < 500$}         \alignC\cell{\vfil 2}     \erow     \brow         \alignL\cell{\vfil$500 \leq aantal\ gebruikers < 1000$}         \alignC\cell{\vfil 3}     \erow     \brow         \alignL\cell{\vfil $1000 \times n \leq aantal\ gebruikers < 1000 \times (n+1)$         \\met $n = 1, 2, 3, \dots$}         \alignC\cell{\vfil$n+3$}     \erow     \end{calstable}     \end{table}      \end{document}


title: For figures in PDF format, what version and standard is ideal?

text: What PDF version and standard is ideally suited for the current version of pdflatex? Primarily for press, but online distribution will follow (large scientific publication). Bonus: Include some of the pros-cons for requiring figures meet these standards? _Context: I am working with a design firm to reproduce a number of figures (mostly plots) which were originally submitted by contributing authors in bitmap form. I'm trying to determine what I should expect from them (as professionals)._


title: Simple tabulary table overflows columns

text: I want to create a simple table with tabulary:               \documentclass{article}     \usepackage[english]{babel}     \usepackage{tabulary}          \begin{document}          \begin{tabulary}{\linewidth}{|L|L|L|}     A & B & C     \\     Blablab & Blablablabl & Blabl bl bla blabl blablabl blabl blabl bl blab blab bla blabla bl blablabla bla blabla     \\     \end{tabulary}          \end{document}      But the generated columns are a mess. The first two columns are not big enough. The words overflow into the next columns.               Overfull \hbox (10.59239pt too wide) in paragraph at lines 12--12     []\OT1/cmr/m/n/10 Blablab|          Overfull \hbox (16.04956pt too wide) in paragraph at lines 12--12     []\OT1/cmr/m/n/10 Blablablabl|          Overfull \hbox (15.00195pt too wide) in paragraph at lines 12--13     [][]      What is the best way to fix this?


title: Upright Greek letters in text mode (not upgreek)

text: How do I type upright Greek letters? I have tried `upgreek` but it uses specific fonts (Euler or Adobe Symbol). I want to use the upright Greek letters in the actual font being used. I'm thinking of the following solutions:   1. XeTeX   2. Direct ASCII code input   3. `\alpha`, `beta`, `\mu`, etc. but in text mode I am inclined to #3. Hopefully it doesn't require `inputenc` modifications. But of course any solution is welcome.


title: Polaroid photo effect in tikz

text: Is there any way to make a polaroid photo effect in TikZ? I am thinking of something like this ![enter image description here](http://i.stack.imgur.com/PGwln.jpg) A computer font as the caption might be better in fact but I couldn't find a suitable example online. I think what is needed is a nice shadow effect outer box, the image placed inside it, a way to do the caption suitably and then for the whole thing to be rotated. I found a few related looking answer but I have no idea how to put them together or if they are suitable. For example, Translate and rotate an object in TikZ (2D) and Faded drop-shadow using tikz-based rounded rectangle? . My beginning attempt doesn't use TikZ at all and is               \documentclass{beamer}     \usepackage{adjustbox}     \usepackage[utf8]{inputenc}     \usepackage{default}     \usepackage[font=small,skip=0pt]{caption}     \usepackage{lmodern}          \begin{document}     \begin{frame}     \begin{figure}[ht]       \begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption*{%           \tiny{Hello world!}           }\end{minipage}},rotate=-5,center}           \includegraphics[width=2cm]{face}%       \end{adjustbox}     \end{figure}     \end{frame}     \end{document}      This gives ![enter image description here](http://i.stack.imgur.com/AY71u.png)


title: Kile error compiling .bib not appearing in .blg

text: I keep having trouble while compiling the bibliography with Kile. I get the following error message:               File ended while scanning the use of \thebibliography \bibliography{HKR}          \begin{thebibliography} on input line 1 ended by \end{document}.\end{document}      My .blg file says:               This is BibTeX, Version 0.99d (TeX Live 2012/Debian)     Capacity: max_strings=35307, hash_size=35307, hash_prime=30011     The top-level auxiliary file: 20140805HKR.aux     The style file: alpha.bst     Database file #1: HKR.bib     Warning--I didn't find a database entry for "Domingo"     Warning--I didn't find a database entry for "HO"     Warning--I didn't find a database entry for "Rubio"     Warning--I didn't find a database entry for "vEst"     Warning--I didn't find a database entry for "Leclerc"     Warning--there's a number but no volume in BGGMaximalRepr     Warning--empty year in GItalia     Warning--empty year in GOV     Warning--can't use both author and editor fields in WolfSymplectic     You've used 28 entries,                 2543 wiz_defined-function locations,                 771 strings with 8472 characters,     and the built_in function-call counts, 10165 in all, are:     = -- 1036     > -- 392     < -- 24     + -- 122     - -- 122     * -- 716     := -- 1671     add.period$ -- 93     call.type$ -- 28     change.case$ -- 147     chr.to.int$ -- 28     cite$ -- 32     duplicate$ -- 423     empty$ -- 775     format.name$ -- 166     if$ -- 2061     int.to.chr$ -- 1     int.to.str$ -- 0     missing$ -- 30     newline$ -- 148     num.names$ -- 84     pop$ -- 157     preamble$ -- 1     purify$ -- 186     quote$ -- 0     skip$ -- 326     stack$ -- 0     substring$ -- 598     swap$ -- 57     text.length$ -- 24     text.prefix$ -- 16     top$ -- 0     type$ -- 192     warning$ -- 4     while$ -- 102     width$ -- 31     write$ -- 372     (There were 9 warnings)      I see no error...But for example, when I try and solve the warnings, the .blg is not modified (eg, I don't cite "Rubio" anymore, but another reference with an entry). Thanks!


title: Using LaTeX commands inside pgfplotsset

text: Is there any way to use LaTeX commands inside `\pgfplotsset`? For instance, the following code produces an error indicated in the `\pgfplotsset` line, whereas if one replaced `\contents` in the `\pgfplotsset` command with `axis x line=bottom` then all would be well.               \documentclass{article}               \usepackage{pgfplots}     \newcommand{\contents}{axis x line=bottom}          \begin{document}     \begin{tikzpicture}          \pgfplotsset{\contents}  % <----- fails with ! Package pgfkeys Error: I do not know the key '/pgfplots/axis x line=bottom'          \begin{axis}     \addplot[domain=-3e-3:3e-3,samples=201]{exp(-x^2 / (2e-3^2)) / (1e-3 * sqrt(2*pi))};     \end{axis}     \end{tikzpicture}          \end{document}


title: Bold and italic in subsection

text: In the following documentclass               \documentclass[prb,twocolumn,showpacs]{revtex4}      how to have italic and bold in a subsection title? The italic command removes the boldness when inside a subsection, so I tried the following :               \subsection{Short-range {\bf {\it vs}} long-range scattering}      It does not work. Any idea how to solve this? Maybe the documentclass has nothing to do with it, I did not check it.


title: ConTeXt parsing xml file

text: I am having some problems when I try parse an .xml file exported from from OmniOutliner. When I parse this lines               <context:item>It's a form of advocacy: I'm happy with the various tools that I've found, and I want to introduce people to them. If Mac users are in the least inclined towards typesetting, XML, or &tex;, then they should give &context; a look; neither &latex; nor XSL-FO is the last word in its respective space. Conversely, &context; users should take a look at the Mac: it runs familiar and powerful UNIX-based tools very well, but also has a first rate GUI and applications like OmniOutliner Pro that combine power with real elegance in design.</context:item>      I get this .pdf ![export](http://i.stack.imgur.com/JlXUr.png) This is what is supposed to be from the original pdf. ![original](http://i.stack.imgur.com/fskRe.png) As you can note the LaTex word instead of being converted with the right font is framed. This is not the case of the words TeX and ConTeXt. Even fonts are different. For parsing the file I am giving the command:               texexec --pdf main.xml


title: Asymptote generated 3D raster image

text: Consider the following minimal Asymptote 3D example:               \documentclass{article}     \usepackage{filecontents}     \usepackage{asymptote}     \begin{filecontents*}{testfile.asy}     import three;     currentprojection=perspective(3,-4,4,center=true);         draw((0,0,0)--(0,2,0));         draw((0,0,0)--(2,0,0));         draw((2,2,0)--(0,2,0));         draw((2,2,0)--(2,0,0));          draw((0,0,0)--(0,0,2));         draw((0,2,0)--(0,2,2));         draw((2,0,0)--(2,0,2));         draw((2,2,0)--(2,2,2));         draw((0,0,2)--(0,2,2));         draw((0,0,2)--(2,0,2));         draw((2,2,2)--(0,2,2));         draw((2,2,2)--(2,0,2));     \end{filecontents*}     \begin{document}         \asyinclude[height=25mm,inline=true,attach=false,viewportwidth=4cm,viewportheight=25mm]{testfile.asy}     \end{document}      It generated a 3D figure which is rotatable in Adobe Reader after the user clicks on it. However, the 'poster' image displayed first (which is also used for printing) is rendered as a raster image. Is there any way to render it vectorized?


title: Are there any packages for creating charts?

text: I'm looking for a package in which you can create nice bar and/or line charts in LaTeX. Currently I'm plotting the charts in Calc (OpenOffice), export it to a PDF document, crop it and then including it as graphics. I reckon there should be some more efficient way of doing this, preferably entirely in LaTeX.


title: How to add an image before section title

text: I want to modify the section command to make it look like this: ![enter image description here](http://i.stack.imgur.com/VIjbi.png) I wrote a tikz code for the decorated section number but I still don't know how to integrate my code in the `\section` command:               \newcommand*\numb{%     \begin{tikzpicture}     \node [rectangle,rounded corners,top color=black!80!gray!20, bottom color=black!80,text=white]{ \huge 1};     \end{tikzpicture}     }


title: What is the difference between TEXMFHOME and TEXINPUTS?

text: A question was asked: Where do I place my own .sty files, to make them available to all my .tex files? The accepted answer basically says the following:   1. Create a local texmf tree, say at the folder `~/localtexmf`,   2. Add the folder to the search path, e.g. on a Mac running TeXLive              tlmgr conf texmf TEXMFHOME "~/Library/texmf:~/localtexmf"      Another answer suggests to edit the `.bashrc` file and to add a line               TEXINPUTS="~/localtexmf:"      **Question:** What is the difference between `TEXMFHOME` and `TEXINPUTS`? Are the two solutions basically the same?


title: Test if a command has been defined by another package

text: I normally use the LaTeX `\newcommand` to define macros. However, when using delimited macros I use `\def`. Is there a way that I can get LaTeX to trigger an error if the command defined by `\def` is being re-defined by another package, i.e, if someone tries to re-define the command a LaTeX error message is triggered.


title: XeLaTeX Quiet Output and Halt on Error

text: I find the output of XeLaTeX excessively verbose. I am really just interested in errors (not warnings), and the offending line number. I also would like xelatex to halt (exit) on error. Is there a magic incantation that can produce this?


title: No indentation after theorem environment with amsthm

text: I use the amsthm package and dont want lines which start right after the theorem environment to be indented. I consulted the manual of the package and it said to define a new theorem style. I expected the following MWE to accomplish this task.               \documentclass[12pt,a4paper]{scrreprt}          \usepackage{amsthm}     \newtheoremstyle{abcd}% name       {}%      Space above, empty = `usual value'       {}%      Space below       {\itshape}% Body font       {}%         Indent amount (empty = no indent, \parindent = para indent)       {\bfseries}% Thm head font       {.}%        Punctuation after thm head       {.5em}% Space after thm head: \newline = linebreak       {}%         Thm head spec     \theoremstyle{abcd}          \newtheorem{defn}{Definition}     \begin{document}     \begin{defn}     Some defintion     \end{defn}     This sentence shouldn't be indented.     \end{document}      However, I end up with this ![non indented next line](http://i.stack.imgur.com/P7HGo.png) That is what I would expect (obtained using a noindent right after the theorem environment ends) ![enter image description here](http://i.stack.imgur.com/8iI1c.png)


title: Customize \ref command

text: Is there anyway to customize the number which appear in a `\ref{}` command? More precisely, I want to reduce the size of such number but without affecting the number font (style). If I use a command like `\small` before a `\ref{}`, the number font does not still the same (see for instance the two photos). ![result with the \\small command](http://i.stack.imgur.com/Hf8V3.png) ![result without the \\small command](http://i.stack.imgur.com/xx4fI.png) A minimal working example:               \documentclass[11pt, pagesize=auto, version=last, chapterprefix=true]{scrbook}          \usepackage[latin1]{inputenc}          \usepackage[T1]{fontenc}          \usepackage{charter}          \usepackage[expert]{mathdesign}          \usepackage[frenchb]{babel}          \usepackage[babel=true]{csquotes}          \usepackage{amsmath}          \usepackage{amsthm}          \newtheorem{theorem}{Th\'eor\`eme}[section]          \begin{document}          \begin{theorem}\label{thm} blablabla. \end{theorem}          {\small theorem~\ref{thm}}\\          theorem~\ref{thm}.          \end{document}


title: How to display too broad table? Not fit to one page as a normal-sized

text: ![enter image description here](http://i.stack.imgur.com/l1vkt.png) I use the KOMA-script (`sudo apt-get install koma-script` \-- suggests you the thing in Ubuntu). I think options:   1. make font even smaller (eg with KOMA -script)   2. make it on two pages, perhaps here   3. make it vertical?   4. other? **My code**               \documentclass[fontsize=7pt]{scrreprt}     \begin{document}     <<echo=False>>=     library(xtable)     ...     xtable(maDat)     @     \end{document}


title: Compile LaTeX to HTML/CSS with kept typography

text: I have put lots of effort in the past to align, set and layout LaTeX documents as PDFs. Is there any reasonable converter, which uses CSS3, HTML, and so on to create a beautiful website from LaTeX. From what I see the well-known converters only keep the HTML very bare, and throw away the design. If I cannot directly compile TeX to HTML, can you recommend some PDF converters, or other ways to publish LaTeX in a browser-centric way (not using PDFs)?


title: Diagonal separator in table corner in ConTeXt

text: How can one create a diagonal separator in a table corner in ConTeXt (like the package slashbox for LaTeX)?


title: Bibtex, what's behind the design decision for captial letters?

text: I recently found myself citing a particular paper: Google Scholar gives the automatic bibtex reference as:               @ARTICLE{siu2010survey,       author = {Siu, Elaine and Tam, Eric and Sin, Dorene and Ng, Cecilia and Lam,         Emily and Chui, Mandy and Fong, Anita and Lam, Lorinda and Lam, Catherine},       title = {A survey of augmentative and alternative communication service provision         in Hong Kong},       journal = {Augmentative and Alternative Communication},       year = {2010},       volume = {26},       pages = {289--298},       number = {4},       publisher = {Informa Healthcare Stockholm}     }      And later on I had to go back and change the title to 'in {H}ong {K}ong' so that the captials displayed correctly. This set me wondering. Is there some documentation or source within Bibtex that explains why this is a nesscessary step? Instead of, for example, some sort of `Smart Case' setup where things that are uppercase stay uppercase and everything else is variable? I'm looking for sources in the documentation or supporting materials. But well developed answers giving a bit of context would, of course, be lovely.


title: What exactly do \EndP and \IgnorePar do?

text: What exactly do `\IgnorePar` and `\EndPar` do? Many configurations start like this:               \Configure{foo}{%     \ifvmode \IgnorePar\fi \EndP     ...      I'm trying to learn `TeX4ht` to improve conversion to OpenDocument Text, and kind of slogging through the sparse documentation available. Most people just copy-paste the literary sources here:                 \EndP       \IgnorePar     Asks to ignore the next paragraph       \ShowPar       Asks to take into account the following paragraphs       \SaveEndP      Saves the content of EndP, and sets it to empty content       \RecallEndP       \SaveHtmlPar       \RecallHtmlPar      which doesn't help much.