title: siunitx and Elsevier (EES)

text: This is the first and probably the last time I'll ever send a paper to an Elsevier journal. I'm having a problem with the siunitx package, a package that I'm very fond of and I use it very often. The problem is that EES has TeXLive2009 and the latest versions of the siunitx package has commands that are not compatible with the package that was bundled into TeXLive2009. I had a chat with Elsevier support about this issue and they offered no alternative, nor fix. What do you people recommend? Should I start retyping manually all measuring units that I've used so far (with standard LaTeX commands)? Is there a quick way to do it (some nice tool/script)? Thanks.


title: Baselineskip ignored in Beamer footline

text: I am using the following to define the footline element of my Beamer presentation:               \setbeamerfont{footline}{size=\large}          \defbeamertemplate*{footline}{Institute} %the fontsize changes the size of the footer     {            \center{\color{algrey}{\noindent\hspace{0cm}\rule[0cm]{\paperwidth}{1pt}}}\\          \leavevmode%      %   \vspace{0.4cm}         \begin{beamercolorbox}[sep=.5em,wd=\paperwidth,ht=4.90ex,dp=1ex,center]{innerbox}%             % FAU Logo             %\begin{picture}(100.0,0.0)      %           \put(290.7,-9.85){\includegraphics[height=0.7cm]{templates/logos/logo_dummy}}     %       \end{picture}             \begin{beamercolorbox}[wd=0.400\paperwidth,ht=2ex,dp=0ex,left]{innerbox}%                 {\setstretch{10.0}\fontsize{5}{10}\selectfont \inserttitle \\[4pt] \insertauthor \par}             \end{beamercolorbox}             \begin{beamercolorbox}[wd=1.1cm,ht=2ex,dp=0ex,center]{innerbox}%                 {\fontsize{3}{0}\selectfont\textcopyright~\the\year\\[3pt]                 %Page \insertframenumber{}/\inserttotalframenumber{}}                 Page \insertframenumber{}}             \end{beamercolorbox}             % Page Counter             \begin{beamercolorbox}[wd=0.425\paperwidth,ht=1ex,dp=0ex,right]{innerbox}%                 %{\large Institute}\\                 \vspace{-0.19cm}                 \includegraphics[height=0.7cm]{templates/logos/logo_dummy}                 %{\fontsize{4}{0}\selectfont\copyright~Institute, 2013\\[3pt]                 %Page \insertframenumber{}/\inserttotalframenumber{}}                 % \vspace{-0.5pt}             \end{beamercolorbox}         \end{beamercolorbox}     }      This results in a footer rendered as: ![Example Screenshot](http://i.stack.imgur.com/sbJXa.png) As you can see, the title lines have no whitespace (baselineskip) between them. I tried to   * set `\fontsize{x}{y}\selectfont` to different values   * manually set `\baselineskip`   * change `\setbeamerfont{footline}{size=\large}`   * change the size of the `beamercolorbox`es however nothing helped separating the two title lines.


title: Xindy not working with MiKTeX

text: I have just followed the method of Speravir (see How to use Xindy with MiKTeX?). My MiKTeX installation is `D:\MiKTeX 2.9`, and I already had a `D:\LocalTeXMF` for files that are not in the distribution. Unfortunately, trying to test with the example file (that I named `testxindy.tex`) and to use `xindy` on the resulting `.idx` file from the command line, it didn't work. One reason is that it is not quite clear for the novice which executable to use in which case. Schematically, there are two possibilities for the (simplest) command line: 1) `texindy.exe testxindy.idx` 2) `tex2xindy.exe testxindy.idx` In the 1st case, the answer was: `failed to find script`. The documentation mentions a `makeindex4` wrapper for `xindy`. Unfortunately, this wrapper can't be found in the distribution. Is it some obsolete wrapper? In the 2nd case, the answer was: `writing attribute names to file testxindy.idx`, the program seeming either to be waiting for some answer or to have an endless loop. Finally, it worked launching directly the `texindy.pl` script. However there were strange things in the `.ilg` file (strange to me, at least):               Loading module YcBEHsZUlK ........ Finished loading module YcBEHsZUlK      All other modules loaded have 'normal' names… So ? Could it be related to the fact that my editor uses `utf8` encoding? Anyway I can't understand how to make the `.exe` files work, which, I guess, is the normal way. Subsidiary question: in a `MiKTeX` installation, shouldn't the bin directory be in `\LocalTeXMF\miktex\bin` rather than in `\LocalTeXMF\bin`? If so, where should really be `texmf.cnf – \LocalTeXMF` or `\LocalTeXMF\MiKTeX`, or even `\LocalTeXMF\MiKTeX\config`? I would be very grateful for any help.


title: no '=' among input-comparators in `\num{...}`

text: I want to use `=` in the argument to the `siunitx` `\num{...}` macro. I'd like to be able to write something like:               This gives a total of \num{9x14=126} grid cells.      Currently, this produces               ! siunitx error: "invalid-token-in-number"     !       ! Invalid token '=' in numerical input.      Could `=` be added to the list of allowed tokens?


title: why sometimes the figure is too close to the text?

text: Here is the problem, you can see the figure is too close to the text, And it is even affecting the text. ![enter image description here](http://i.stack.imgur.com/hoRzV.png) the code I use is               \documentclass[ reprint,amsmath,amssymb,aps]{revtex4-1}     \usepackage{graphicx}% Include figure files     \usepackage{dcolumn}% Align table columns on decimal point     \usepackage{bm}% bold math     \usepackage{epstopdf}          \begin{document}     some text          \begin{figure}[htbp]     \includegraphics[width=\columnwidth]{FIG_3}     \end{figure}          some text     \end{document}      What is odd enough is that when I insert the same code between other paragraphs of my paper, the problem is not showing any more. after add \fbox{} to show the bounding box as follows ![enter image description here](http://i.stack.imgur.com/r7DQt.png) * * * **Edited** _**Here is the problematic tex file that I share on google drive_** problematic tex file * * * **here is the example show that two same figure code but different position have different space to the text.** ![enter image description here](http://i.stack.imgur.com/DECgU.png)


title: Conflict between tabu and tabularx, when using siunitx

text: I have many tables set with `{tabularx}` but for some of the it seems easier to use `{tabu}` which works. But if I use both packages and gave the last `X` column in `{longtabu}` an `S` and optional argument it crashes. So I can “unload” `tabularx` to make it work which is no option or use another tabular preamble but this isn’t so nice …               \documentclass{article}          \usepackage{tabu,longtable}     \usepackage{tabularx}% comment this out to make it work     \usepackage{siunitx}     \sisetup{locale=DE}          \begin{document}     %\begin{longtabu} to \textwidth{llX[-0.5,l]{S}X[-0.5,l]{S}X[-0.5,l]{S}}     % works with this preamble even when tabularx is loaded:     \begin{longtabu} to \textwidth{llX[-0.5,l]{S}X[-0.5,l]{S}X{S}}         2&  1400&   2,5 &   1,0 &2,3\\     \end{longtabu}     \end{document}      I found How to use siunitx and tabularx together? but it doesn’t help.


title: Turning Chinese line breaks on and off

text: I am typesetting a document in Chinese with spaces between words, for the purpose of making it easier for learners. Because of this, I am typesetting most of my document with no line-breaks between words. Because Chinese words are generally pretty short, this will generally not cause any big problems. However, in some parts of my document, I will need to use Chinese line breaks, as defined by \XeTeXlinebreaklocale "zh" (or similar) to avoid over-filled boxes. Basically, those are regular paragraphs of Chinese text, which will not break at all without this option turned on. However, this appears to be a document specific parameter that I can not easily change in only parts of the document. Any ideas for how I can deal with this problem? I added to my comment below that I would like to type Chinese text without spaces, as "我喜欢学中文", in which case line breaks would use a Chinese locale, as well as space delimited Chinese (non-standard) "我 喜欢 学 中文", in which case no line breaks are allowed in the middle of words (or possibly only allowed with very high tolerance). If I just turn on \XeTeXlinebreaklocale "zh" (or use a CJK package, I believe), all words will be broken according to Chinese rules, in which case I risk getting the "中文" in "我 喜欢 学 中文" broken over two lines.


title: Stretch y-axis in pgfplots

text: I'm using pgfplots for simple plotting 2-dimensional data from a plain datatable file. What i try is to "stretch" the y-axis by a factor (say currently i have stretched it by factor '1' which is the standard and i want to modify that factor (im my case increase it a bit)) Here is a minimal working example:               \documentclass{article}     \usepackage{pgfplots}     %\pgfplotsset{compat=1.7}     \begin{document}          \begin{center}          \begin{tikzpicture}     \begin{axis} [      xmode = log,      log basis x=2,      ytick={2,...,7},      xlabel={Input size $n$},      ylabel={time per input in $s$},      grid=major,      grid style={densely dotted},      legend style={at={(0.425,0.99)},      anchor=north,legend columns=2}      ]      ]           \addplot table[x = size, y expr= \thisrow{time}/(\thisrow{size}/1024)] {      size time       1048576   1024      8388608   2048      67108864  4096      536870912 8192      };     \end{axis}     \end{tikzpicture}          \end{center}          \end{document}      I'm looking for a as easy as possible solution which also works in the beamer environment.


title: Compile PDFLATEX document with and without track changes

text: Reviewers frequently request some clarifications which we add in the text. Journals frequently require to submit two versions of the revised manuscript, with changes highlighted (in red) and with changes but for production, so no highlighting. I wonder if I can somehow add a switch to the document so when I compile it, say with the switch to "on", I get the changes in red, and when the switch is off, the changes are there, but not highlighted red. Is it possible?


title: A question about <token2> in \expandafter<token1><token2>

text: I am getting confused about the `\expandafter` command in TeX. In TeXbook, Knuth said that > **`\expandafter` _token_.** TeX first reads the token that comes immediately > after `\expandafter`, without expanding it; let's call this token _t_. Then > TeX reads the token that comes after _t_ (and possibly more tokens, if that > token has an argument), replacing it by its expansion. Finally TeX puts _t_ > back in front of that expansion. Here is an example:               % \b\c->\c->A     \def\a#1{\ifx#1\c c\else not c\fi}     \def\b#1{#1}     \def\c{A}     \expandafter\a\b\c     \bye      the result is `c`, not `not c`, which is not what I expect! Since TeX replace (token that comes after _t_ ) by its expansion, why does `\c` not expand into letter `A`? How should I understand `\expandafter`?


title: LuaLaTeX: No error but no output files

text: I am trying to use LuaLaTeX in TeXnicCenter (or TeXworks as well), due to TeX capacity issues. However, no output files are produced (`.log`, `.pdf`), and I cannot see any error in the build output; ![See the image below](http://i.stack.imgur.com/0AUNz.png) I updated my MiKTeX packages, but nothing changed. I also know there should be no error withing my `*.tex` file, as it was compiled successfully by a friend. Does anyone have a suggestion?


title: Subcaption not in the centre in subfigure package

text: In LaTeX, everything works fine with `subfigure` package, only one trouble is coming; The subcaptions are placed a little towards left from the centre of two figures side by side, which doesnt loook good,,, I have tried everything using `nooneline`, `hang` , `centrelast` etc. but no desired result is coming . Kindly suggest me how could i move either the captions towards centre of figures or the figures such that subcaptions comes in centre.


title: How to change the spacing between the headline of bibliography and the first bib entry?

text: I use the `\printbibliography` command to generate the section of bibliography for my thesis. The spacing between the headline (e.g. Bibliography) and the first reference (e.g. [1] P. Alfeld, "XXX") seems not to easy to customize. The default spacing is not consistent with other parts (e.g. Abstract and Chapter) of my thesis. Is there a way to modify this spacing?


title: Problem installing subcaption package on texlive

text: I'm trying to install the subcaption package on TexLive installed on Ubuntu 11.10. When trying to build subcaption.sty, I found that I needed to first download or build several dependencies:               diagbox.sty     epic.sty     footmisc.sty     overpic.sty     pict2e.sty      After putting these files in the same directory as subcaption.dtx, I try to build subcaption.sty and here is the result:               $ latex subcaption.dtx      This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     (./subcaption.dtx     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, loaded.     (/usr/share/texmf-texlive/tex/latex/base/ltxdoc.cls     Document Class: ltxdoc 2007/11/11 v2.0u Standard LaTeX documentation class     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     (/usr/share/texmf-texlive/tex/latex/base/doc.sty     (/usr/share/texmf-texlive/tex/latex/tools/multicol.sty)))     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty) (./footmisc.sty)     (/usr/share/texmf-texlive/tex/latex/tools/array.sty)     (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty     (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)     (/etc/texmf/tex/latex/config/graphics.cfg)     (/usr/share/texmf-texlive/tex/latex/graphics/dvips.def))) (./overpic.sty     Package: overpic v0.53 <2010/09/13> (RN)     (./epic.sty     Enhancements to Picture Environment. Version 1.2 - Released June 1, 1986     )     overpic: relative positioning in percent     ) (./pict2e.sty (./p2e-dvips.def)) (./diagbox.sty     (/usr/share/texmf-texlive/tex/latex/fp/fp.sty     `Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich     (/usr/share/texmf-texlive/tex/latex/fp/defpattern.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-basic.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-addons.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-snap.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-exp.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-trigo.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-pas.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-random.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-eqn.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-upn.sty)     (/usr/share/texmf-texlive/tex/latex/fp/fp-eval.sty)))     (/usr/share/texmf-texlive/tex/latex/oberdiek/hypdoc.sty     (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty)     (/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)     (/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty     (/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty))     (/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)     (/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty))     (/etc/texmf/tex/latex/config/hyperref.cfg)     (/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty))     Implicit mode ON; LaTeX internals redefined     (/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty))))     (/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty))     *hyperref using default driver hdvips*     (/usr/share/texmf-texlive/tex/latex/hyperref/hdvips.def     (/usr/share/texmf-texlive/tex/latex/hyperref/pdfmark.def          Package hyperref Warning: You have enabled option `breaklinks'.     (hyperref)                But driver `hdvips.def' does not suppport this.     (hyperref)                Expect trouble with the link areas of broken links.          )) (/usr/share/texmf-texlive/tex/generic/thumbpdf/thumbpdf.sty          Package thumbpdf Warning: Missing driver name.          )) (/usr/share/texmf-texlive/tex/latex/caption/subcaption.sty          ! Package subcaption Error: `caption' package not loaded     (subcaption)                (which is needed by this package)          See the subcaption package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.38   \endinput}{}          ?       What am I doing wrong? How can I fix this? (I'm a novice... I don't know what dtx, ins, or sty files are. All I know is that I can usually run `latex file.ins` to produce `file.sty` and then put `file.sty` in an appropriate directory and use that package.) **[After installing the latest version of TexLive, I had problems... see link below]** Problems with TexLive 2012 on Ubuntu after network installation


title: How to change the layout of multicolumn index?

text: The default multicolumn index looks like this:               AA       d       a    BB       b      a       c      b      How could I change it into:               AA       a      c       b      d     BB       a      b      which breaks the multicolumn at every group?


title: Positioning \NewEntry elements in a CV

text: I need to write a CV that is attached to my thesis. Because I wrote my thesis in latex (classic thesis), I would like to set my CV in latex as well so it fits the layout of the thesis. I use this code so far to produce my CV:               %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[a4paper,ngerman]{scrartcl}          \reversemarginpar % Move the margin to the left of the page           \newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}} % New command defining the margin text style          \usepackage[nochapters]{classicthesis} % Use the classicthesis style for the style of the document     \usepackage[LabelsAligned]{currvita} % Use the currvita style for the layout of the document          \renewcommand{\cvheadingfont}{\LARGE\color{Maroon}} % Font color of your name at the top          \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]{}          \usepackage{hyperref} % Required for adding links   and customizing them     \hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon} % Set link colors          \newlength{\datebox}\settowidth{\datebox}{Spring 2011} % Set the width of the date box in each block          \newcommand{\NewEntry}[3]{\noindent\hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3 % Define a command for each new block - change spacing and font sizes here: #1 is the left margin, #2 is the italic date field and #3 is the position/employer/location field     \vspace{0.5em}} % Add some white space after each new entry          \newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}} % Define a command for descriptions of each entry - change spacing and font sizes here                    \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[ngerman]{babel}     \usepackage[LabelsAligned]{currvita}% nice cv style               %----------------------------------------------------------------------------------------          \begin{document}          \thispagestyle{empty} % Stop the page count at the bottom of the first page          %----------------------------------------------------------------------------------------     %   NAME AND CONTACT INFORMATION SECTION     %----------------------------------------------------------------------------------------          \begin{cv}{\spacedallcaps{Curriculum Vit\ae}}\vspace{1.5em} % Headline          \noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em} % Personal information heading          \NewEntry{}{Some Name} % Birthplace and date          \NewEntry{}{Geboren am 14. Januar 2050 in Village} % Birthplace and date          \NewEntry{Address}{Some Streetname 11\\* 12345 City} % Phone number(s)          \NewEntry{Phone}{+49 344 1234567} % Phone number(s)          \NewEntry{Email}{just@name.com} % Email address          \NewEntry{Website}{http://www.name.com} % Personal website          \vspace{1em} % Extra white space between the personal information section and goal          %----------------------------------------------------------------------------------------     %   EDUCATION     %----------------------------------------------------------------------------------------          \noindent\spacedlowsmallcaps{Education}\vspace{1em}          \NewEntry{2000-2005}{A very long University title with a lot of names an so on}          \Description{\MarginText{Masters in TeX}Masters in Life, Party Informatics and some other stuff}          \vspace{1em} % Extra space between major sections          %----------------------------------------------------------------------------------------     %   WORK EXPERIENCE     %----------------------------------------------------------------------------------------          \spacedlowsmallcaps{Work Experience}\vspace{1em}          \NewEntry{January 2010 - March 2012}{Some Company}          \Description{\MarginText{Researcher}Brief description of what I've done.}               %----------------------------------------------------------------------------------------     %   PUBLICATIONS     %----------------------------------------------------------------------------------------          \spacedlowsmallcaps{Publications}\vspace{1em}          \Description{Some, A., Other, B., Third, C. (2011). Title of the Article with some fancy subtitle. In: A famous journal. pages 123–133.}          \vspace{1em} % Extra space between major sections          \end{cv}          \end{document}      With this result: ![enter image description here](http://i.stack.imgur.com/63y2p.png) That works so far (I compile it with pdflatex in texmaker). The only warning I get is: `Underfull \hbox (badness 10000) in paragraph at lines 86--86` There are just a few things I cannot figure out:   1. The code `\NewEntry{Address}{Some Streetname 11\\\\* 12345 City}` produces the address with a line break. The problem is, that "12345 City" should be under "Some Streetname" and not under "Address"   2. Something similar happens with the line `\NewEntry{2000-2005}{A very long University title with a lot of names an so on}` Here the line break is not set manually but because the line is to long. But here also the break should also not be under the first "Date" element.   3. Is there also a way to set the University entry to the top, so that the first line of the date entry is in the same line with the university?   4. Right now, I put the publications manually in there. I tried to use `\printbibliography` with a `\nocite{*}` statement before, but this did not work. Is there a way to do this as well? I think the points 1-3 are the same problem but I can't figure it out how to solve it. Does someone has a solution for this? Thanks for your help.


title: Implementing \DeclareUnicodeCharacter in LuaLaTeX an XeLaTeX

text: In my code, I used to write               \DeclareUnicodeCharacter{27E6}{\begin{description}} % ⟦     \DeclareUnicodeCharacter{27E7}{\end{description}} % ⟧      \DeclareUnicodeCharacter{2022}{\item} %  •      which worked great with `pdflatex`. Moving to `lualatex` the command does not compile. Is there a way I can define my version of `\DeclareUnicodeCharacer` so that it still works?


title: How to compile Bulgarian in my Fedora 19 distribution?

text: I am completely new to TeX. LaTeX is already installed in my environment:               pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)      Saying               \usepackage[utf8]{inputenc}     \usepackage[bulgarian]{babel}      , as indicated in another answer. Byt upon processing, an error for missing .def file is indicated:               $ pdflatex Elementaris.tex     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./Elementaris.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 3 languages loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def     (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))     (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty     (/usr/share/texlive/texmf-dist/tex/generic/babel-bulgarian/bulgarian.ldf     (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def)          ! Package babel Error: No Cyrillic encoding definition files were found.          See the babel package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.90     lcyenc.def, lwnenc.def, ot2enc.def.}                                                  %     ? q     OK, entering \batchmode


title: Ligature suppression with proper hyphenation and comprehensive word list?

text: _[ **Update:** It's been pointed out that my question(s) here weren't clear (or were too hidden). So I inserted red stars at the points where the questions appear.]_ In _The TeX Book_ , D.E.K. gives "shelfful" as an example of a word in which automatic ligature creation should be suppressed. In the answer to Exercise 5.1, he suggests writing it as `{shelf}ful`, `shelf{}ful`, `shelf\/ful`, or `shelf{\kern0pt}ful`. I'm not actually satisfied with any of those solutions, and I'll explain why not below. ![star](http://i.stack.imgur.com/RvSOL.png) I'm looking for a more robust alternative. * * * ## Manual methods of ligature suppression? Four solutions are given in _The TeX Book_ :   * **`{shelf}ful`** and **`shelf{}ful`** — These two produce identical results, and — as Knuth points out — TeX will reinsert the ff ligature by itself after hyphenating the word, since it contains no explicit kerns. Words written this way are sometimes hyphenated, but not often enough to keep paragraphs properly justified without resorting to `\emergencykern`, and _never_ at the most logical place. Worse yet, a word like "cufflink" is _incorrectly hyphenated_ as "cuf-flink"!   * **`shelf\/ful`** — This also has two severe problems. First, words written this way can almost never be hyphenated (a word like "childproofing" is nicely hyphenated as "child-proofing", but a word like "elflike" has nowhere to be split because the italic correction does not allow it to be hyphenated as "elf-like". Second, there is far too much separation between the syllables, a point which Knuth acknoweldges.   * **`shelf{\kern0pt}ful`** — This produces just as poor results as the italic correction method. Very few words can be hyphenated this way, and again only at points other than the most logical place. The shortcomings of the above have led me to look for alternatives. Below are two different solutions that I feel are acceptable, yet ![star](http://i.stack.imgur.com/RvSOL.png) I wonder if these are considered best practice or if there is something still better:   * **`shelf\\-ful`** — This actually seems to work quite well. The discretionary hyphen allows all such words to be hyphenated and — most importantly — at the most logical location. In fact, an eyesore like "shelfful" almost looks better hyphenated at the end of a line than it does unhyphenated in the middle of a line.   * **`shelf\discretionary{-}{}{\kern.033333em}ful`** — This is a slight modification on the previous form, in order to insert ¹⁄₃₀ em space between the constituent characters of the suppressed ligature in cases where the word appears unhyphenated. This is currently my favorite solution. So those are the ways I know of. But actually, I prefer not to think about it all, and I'm frustrated that TeX doesn't have a built-in list of exceptions for English. Like hyphenation, this is something that I feel the computer should do automatically. (It could certainly be an external file updated periodically as part of popular TeX distributions.) I found the TeX.SX discussion **"Can one (more or less automatically) suppress ligatures for certain words?"** and was very happy to see that people are working on this very problem. * * * ## Comprehensive list of ligature exceptions for English? I thought I would be able to find a comprehensive list somewhere of exceptions like "shelfful." I probably spent a good half hour looking. I found a few places listing 10 or 20 words, but nothing with the hundreds of words I might expect to see. ![star](http://i.stack.imgur.com/RvSOL.png) Does anyone know of such a list? So last night I took a list of 500,000 English words and wrote a program to run an analysis and produce a list of words suspected to be problematic, based on relative frequencies of prefixes, suffixes, and subwords. This worked well, but produced a number of false positives such as "office" (which it suspected was a compound word formed from the words "off" and "ice") and "beeflower" (which it suspected was a compound word formed from the words "beef" and "lower"; it's actually a compound word based on the words "bee" and "flower"). Consequently, I pared down the resulting list of ~1,500 candidates manually to ~500 words, for example:               chaffinches     chaf-finches     cufflinks       cuff-links     dwarflike       dwarf-like     halflife        half-life     offline         off-line     selfish         self-ish     shelfful        shelf-ful     woofing         woof-ing      Depending on how one feels about suffixes like -ing, -ish, -ier, -iest, -iness, -ily, -ly, and so forth, the list could be pruned down further, probably to 200 words. Consideration of the suffix -ish is important to avoid words like "selfish" and "wolfish" from looking like "sel-fish" and "wol-fish" (the latter especially — since "wolffish" is also a word). Anyway, I would like to take the list I made and submit it to someone maintaining a comprehensive list (![star](http://i.stack.imgur.com/RvSOL.png) who?), and in return I'd like to get a copy of what they have. My list feels pretty good, but I'm sure it isn't complete. For instance, I just noticed that "shelflife" wasn't in it because it didn't appear in the dictionary file I used. * * * ## Other amusing words I wrote the program so that it could identify any suspicious letter sequences — not just ff, fi, ffi, fl, and fl — and I found it interesting to look at a few other letter combinations — just for fun. This is just a small sample of the thousands of other words identified: **ft**               halftime        half-time     offtrack        off-track     rooftop         roof-top      **fh**               halfhearted     half-hearted     offhand         off-hand     serfhood        serf-hood      **st**               crosstalk       cross-talk     dogstail        dogs-tail     duststorm       dust-storm     poststrike      post-strike      **ct**               arctangent      arc-tangent     arctic          arc-tic      **kn**               hawknosed       hawk-nosed     weeknight       week-night      **ph**               loophole        loop-hole     scrapheap       scrap-heap     stamphead       stamp-head      **th**               boathooks       boat-hooks     footholds       foot-holds     goatherd        goat-herd     porthole        port-hole     warthog         wart-hog      **sh**               gashouse        gas-house     horseshit       horse-shit     mishap          mis-hap     newshawk        news-hawk      **tr**               hatrack         hat-rack     outrace         out-race     postrace        post-race     postriot        post-riot      **wh**               knowhow         know-how     sparrowhawk     sparrow-hawk      **au**               ultraugly       ultra-ugly      **ea**               readmit         re-admit      **ie**               antieconomic    anti-economic     antielite       anti-elite     dielectric      di-electric      **oi**               coincide        co-incide     coinmate        co-inmate     coinsure        co-insure      **dd**               granddad        grand-dad     guarddog        guard-dog     headdress       head-dress      **ee**               paleethnology   pale-ethnology     preenable       pre-enable     preescape       pre-escape     reedit          re-edit     reelect         re-elect     reemit          re-emit     reenable        re-enable     reencounter     re-encounter     reentry         re-rentry      **gg**               doggone         dog-gone      **hh**               archhead        arch-head     bathhouse       bath-house     fishhold        fish-hold     methhead        meth-head     withhold        with-hold      **ll**               schoollike      school-like     soulless        soul-less     taillight       tail-light     wheelless       wheel-less      **mm**               bottommost      bottom-most     filmmaker       film-maker     teamman         team-man      **nn**               humanness       human-ness     nonnational     non-national     penname         pen-name     swannecked      swan-necked      **oo**               cooccur         co-occur     cooperate       co-operate     coopt           co-opt     proode          pro-ode     pseudoorganic   pseudo-organic      **pp**               dampproof       damp-proof     lamppost        lamp-post     slipproof       slip-proof      **rr**               interradial     inter-radial     overran         over-ran     overrich        over-rich     underripe       under-ripe      **ss**               newsstand       news-stand     hisself         his-self      **tt**               cattail         cat-tail     coattail        coat-tail     nighttime       night-time     ofttimes        oft-times     outtakes        out-takes     outthink        out-think     shirttail       shirt-tail     shitton         shit-ton      **ww**               glowworm        glow-worm     sawworker       saw-worker     showworthy      show-worthy     yellowwood      yellow-wood      I wouldn't go so far as to insert micro-spacing in these other cases, but I find these interesting because of the way the mind can be tricked momentarily while parsing the letters and phonemes. Words like "cooccur" and "coinmate" and "reemit" really make my brain hurt!


title: margin notes on both sides of a single-column document

text: I have to write a paper for a course work. We are supposed to use a given layout with a single column text and margin notes on both sides - references on one side and section notes on the other. I have been playing around for some time but I did not find any working solution yet. Trying to copy the definition of `\marginpar` let to a whole lot of compile errors but that’s not exactly what I was looking for ;) Also, having titles and graphs spanning the whole page width would be cool but I don't know if I will need it anyway. Just in case there is a class or package that can do both... Any suggestions?


title: TikZ/ERD: node (=Entity) label on the inside

text: I'm trying to draw an ERD diagram. I recycled code from a couple of posts around here and added my own spice, finally ending up with:                    \documentclass[border=0.5in]{article}          \usepackage{tikz}     \usetikzlibrary{shapes.multipart}     \usetikzlibrary{matrix}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}     \usepackage{scalefnt}     \usepackage{geometry}     \usepackage{pdflscape}          \makeatletter          \pgfarrowsdeclare{oone}{oone}     {       \pgfarrowsleftextend{+0pt}%       \pgfarrowsrightextend{+0pt}%     }     {       \pgfutil@tempdima=0.25pt%       \advance\pgfutil@tempdima by0.25\pgflinewidth%       \pgfsetdash{}{+0pt}%       \pgfsetmiterjoin%       \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{-8\pgfutil@tempdima}}%       \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfpathmoveto{\pgfqpoint{-12\pgfutil@tempdima}{-8\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-12\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfusepathqstroke%     }          \pgfarrowsdeclare{one}{one}     {       \pgfarrowsleftextend{+0pt}%       \pgfarrowsrightextend{+0pt}%     }     {       \pgfutil@tempdima=0.25pt%       \advance\pgfutil@tempdima by0.25\pgflinewidth%       \pgfsetdash{}{+0pt}%       \pgfsetmiterjoin%       \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{-8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfusepathqstroke%     }               \pgfarrowsdeclare{many}{many}     {       \pgfarrowsleftextend{+0pt}%       \pgfarrowsrightextend{+0pt}%     }     {       \pgfutil@tempdima=0.25pt%       \advance\pgfutil@tempdima by0.25\pgflinewidth%       \pgfsetdash{}{+0pt}%       \pgfsetmiterjoin%       \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{-8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfpathmoveto{\pgfqpoint{-6\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-14\pgfutil@tempdima}{-8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{-6\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-14\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfusepathqstroke%     }          \pgfarrowsdeclare{omany}{omany}     {       \pgfarrowsleftextend{+0pt}%       \pgfarrowsrightextend{+0pt}%     }     {       \pgfutil@tempdima=0.25pt%       \advance\pgfutil@tempdima by0.25\pgflinewidth%       \pgfsetdash{}{+0pt}%       \pgfsetmiterjoin%       \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{-8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-8\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfpathmoveto{\pgfqpoint{-6\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-14\pgfutil@tempdima}{-8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{-6\pgfutil@tempdima}{0\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-14\pgfutil@tempdima}{+8\pgfutil@tempdima}}%         \pgfpathmoveto{\pgfqpoint{-18\pgfutil@tempdima}{+8\pgfutil@tempdima}}%       \pgfpathlineto{\pgfqpoint{-18\pgfutil@tempdima}{-8\pgfutil@tempdima}}%       \pgfusepathqstroke%     }               \begin{document}               \tikzset{         entity/.code={             \tikzset{                 rounded corners,                              name=#1,                 inner sep=2pt,                 every entity/.try,                 label=below:#1             }%             \def\entityname{#1}%         },         entity anchor/.style={matrix anchor=#1},         every entity/.style={                 draw,         },         every property/.style={             inner xsep=0.20cm, inner ysep=0.075cm, anchor=west, text width=1in         },         zig zag to/.style={             to path={(\tikztostart) -| ($(\tikztostart)!#1!(\tikztotarget)$) |- (\tikztotarget)}         },         zig zag to/.default=0.5,         many to one/.style={             many-one, zig zag to         },         one to omany/.style={             one-omany, zig zag to         }     }     \def\property#1{\node[name=\entityname-#1, every property/.try]{#1};}     \def\properties{\begingroup\catcode`\_=11\relax\processproperties}     \def\processproperties#1{\endgroup%         \def\propertycode{}%         \foreach \p in {#1}{%             \expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter\propertycode%                 \expandafter\expandafter\expandafter{\expandafter\propertycode\expandafter\property\expandafter{\p}\\}%         }%         \propertycode%     }               \begin{landscape}          \scalefont{0.5}               \begin{tikzpicture}[every node/.style={font=\ttfamily}, node distance=0.5in]                         \matrix [entity=Rent] {         \properties{             ID : int(11),              StartDate :  datetime,             EndDate : datetime,             PickupDate : datetime,             ReturnDate : datetime,             PickupMiles : int(11),             ReturnMiles : int(11),             Missing :  bool,              VehicleVIN  :  varchar(255),             EmployeeUsername :  varchar(255),             CustomerID :  int(11),             DepartureGarage :  int(11),             ArrivalGarage : int(11),             OfferID : int(11),             Kasko : bool,             TPI :  bool,              CDW :  bool,             TW  :  bool,             DER :  bool,             RestrictAge :  bool,             ExtraMileageUnits :  int(11)               }     };          \matrix [entity=Employee, above=of Rent] {         \properties{             Username :  varchar(255),             Password :  varchar(255),                     Name :  varchar(255),             LastName :  varchar(255)         }     };          \matrix [entity=Vehicle, left= of Rent] {         \properties{         VIN : varchar(255),         Plate : varchar(255),         Seating : int(11),         Doors : int(11),         4WD : bool,         Year : int(11),         Diesel : bool,         Displacement : double,         Consumption : double,         LPG : bool,         ManualShift : bit,         Autonomy : double,         Discriminator : int(11),         ModelID : int(11),         HousedInGarage : int(11),         Retired : bool,         FullHybrid : bool,         Mileage : int(11)         }     };          \draw[one to omany] (Vehicle) to (Rent);     \draw[one-omany] (Employee) to (Rent);          \end{tikzpicture}     \end{landscape}          \end{document}           Now, I would like to have the label _inside_ the node, maybe with a separator or something. ATM I get: ![whatiget](http://i.stack.imgur.com/sv4co.gif) But I would rather have: ![enter image description here](http://i.stack.imgur.com/mygiZ.gif) Can anybody suggest a way to do so? Thank you a whole lot.


title: is it possible to span multiples pages in multicolumn?

text: I have documents generated like this:               \documentclass{article}     \usepackage{longtable}     \begin{document}     \begin{longtable}{|p{7cm}|p{7cm}|}       \multicolumn{2}{p{14cm}}{         Lorem ipsum dolor sit amet, consectetur         adipiscing elit. Ut scelerisque metus eget velit rhoncus         cursus. Aenean eleifend, lectus id venenatis pretium, sapien         ligula auctor mauris, at condimentum dui nulla quis nisi. Morbi ut         massa sapien, et tincidunt dolor. Ut vitae ante quam. Cum sociis         natoque penatibus et magnis dis parturient montes, nascetur         ridiculus mus. Maecenas ultrices lobortis nunc, sed porttitor         dolor dapibus in. Sed commodo auctor luctus. Duis at velit         fringilla sem ultricies aliquet. Morbi venenatis venenatis turpis,         et congue quam venenatis at. Cum sociis natoque penatibus et         magnis dis parturient montes, nascetur ridiculus mus. Etiam         elementum consequat nisi, sed venenatis dolor ultrices ac.              Sed nisi urna, sollicitudin sit amet hendrerit lacinia, porta at         tortor. Aliquam erat volutpat. Curabitur posuere felis at risus         feugiat at ultrices velit imperdiet. Phasellus vulputate porttitor         ipsum, in mattis odio dictum at. Pellentesque in sapien quis nisl         ultrices accumsan. Aliquam erat volutpat. Ut odio neque, tempor         sed semper ut, auctor in dolor. Praesent id tempus quam. Donec         viverra sodales nisi quis ultrices. Proin sit amet nulla vitae est         vehicula porta. Sed dignissim condimentum sagittis.              Integer eros nibh, consectetur id commodo luctus, tempus eu         magna. Duis vulputate ante egestas purus volutpat aliquet. Nunc         hendrerit commodo congue. Cras orci tellus, pretium in dapibus id,         pretium ac justo. Aenean a urna augue. Suspendisse         potenti. Vivamus molestie, odio non aliquet imperdiet, nulla         tellus adipiscing arcu, vitae malesuada turpis quam nec elit. Ut         et orci eu arcu pretium feugiat vitae vitae nunc. Suspendisse         ornare interdum rutrum. Nulla nec arcu a nunc tincidunt         hendrerit. Nullam diam massa, posuere vitae lacinia vitae, tempus         et odio.              Pellentesque dictum rutrum sem eu elementum. Suspendisse ultrices         dui a neque congue lobortis. Pellentesque vestibulum pretium         aliquet. Sed euismod iaculis tellus, ac posuere justo sollicitudin         vestibulum. Phasellus tincidunt semper euismod. Aenean id quam nec         augue viverra elementum quis a sapien. Cras porttitor arcu id arcu         cursus sed eleifend justo malesuada. Mauris diam lorem, tincidunt         vitae pulvinar non, luctus in orci. Donec lectus felis, lobortis         eget vulputate eget, eleifend nec leo. Integer vel tincidunt         augue. Duis tristique feugiat mauris, eu eleifend sem ultricies         sit amet. Sed bibendum turpis sed est faucibus gravida sagittis         magna vulputate. Vestibulum luctus laoreet velit, et euismod ante         vestibulum a.              Ut sit amet nibh at sapien pulvinar cursus id sed lorem. Phasellus         ultricies ornare facilisis. Fusce accumsan condimentum aliquam. Aenean         ac lectus at lorem mollis blandit ac at lorem. Integer bibendum, leo         in varius suscipit, massa dui lobortis ligula, in tincidunt augue         velit in nulla. Cras sit amet ipsum sem, at fermentum sem. Integer         neque nunc, tempus et tempor quis, ultricies nec nisl. Maecenas         pretium dolor ac elit cursus facilisis.              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut         scelerisque metus eget velit rhoncus cursus. Aenean eleifend,         lectus id venenatis pretium, sapien ligula auctor mauris, at         condimentum dui nulla quis nisi. Morbi ut massa sapien, et         tincidunt dolor. Ut vitae ante quam. Cum sociis natoque penatibus         et magnis dis parturient montes, nascetur ridiculus mus. Maecenas         ultrices lobortis nunc, sed porttitor dolor dapibus in. Sed         commodo auctor luctus. Duis at velit fringilla sem ultricies         aliquet. Morbi venenatis venenatis turpis, et congue quam         venenatis at. Cum sociis natoque penatibus et magnis dis         parturient montes, nascetur ridiculus mus. Etiam elementum         consequat nisi, sed venenatis dolor ultrices ac.              Sed nisi urna, sollicitudin sit amet hendrerit lacinia, porta at         tortor. Aliquam erat volutpat. Curabitur posuere felis at risus         feugiat at ultrices velit imperdiet. Phasellus vulputate porttitor         ipsum, in mattis odio dictum at. Pellentesque in sapien quis nisl         ultrices accumsan. Aliquam erat volutpat. Ut odio neque, tempor         sed semper ut, auctor in dolor. Praesent id tempus quam. Donec         viverra sodales nisi quis ultrices. Proin sit amet nulla vitae est         vehicula porta. Sed dignissim condimentum sagittis.              Integer eros nibh, consectetur id commodo luctus, tempus eu         magna. Duis vulputate ante egestas purus volutpat aliquet. Nunc         hendrerit commodo congue. Cras orci tellus, pretium in dapibus id,         pretium ac justo. Aenean a urna augue. Suspendisse         potenti. Vivamus molestie, odio non aliquet imperdiet, nulla         tellus adipiscing arcu, vitae malesuada turpis quam nec elit. Ut         et orci eu arcu pretium feugiat vitae vitae nunc. Suspendisse         ornare interdum rutrum. Nulla nec arcu a nunc tincidunt         hendrerit. Nullam diam massa, posuere vitae lacinia vitae, tempus         et odio.              Pellentesque dictum rutrum sem eu elementum. Suspendisse ultrices         dui a neque congue lobortis. Pellentesque vestibulum pretium         aliquet. Sed euismod iaculis tellus, ac posuere justo sollicitudin         vestibulum. Phasellus tincidunt semper euismod. Aenean id quam nec         augue viverra elementum quis a sapien. Cras porttitor arcu id arcu         cursus sed eleifend justo malesuada. Mauris diam lorem, tincidunt         vitae pulvinar non, luctus in orci. Donec lectus felis, lobortis         eget vulputate eget, eleifend nec leo. Integer vel tincidunt         augue. Duis tristique feugiat mauris, eu eleifend sem ultricies         sit amet. Sed bibendum turpis sed est faucibus gravida sagittis         magna vulputate. Vestibulum luctus laoreet velit, et euismod ante         vestibulum a.              Ut sit amet nibh at sapien pulvinar cursus id sed lorem. Phasellus         ultricies ornare facilisis. Fusce accumsan condimentum         aliquam. Aenean ac lectus at lorem mollis blandit ac at         lorem. Integer bibendum, leo in varius suscipit, massa dui         lobortis ligula, in tincidunt augue velit in nulla. Cras sit amet         ipsum sem, at fermentum sem. Integer neque nunc, tempus et tempor         quis, ultricies nec nisl. Maecenas pretium dolor ac elit cursus         facilisis.}          \end{longtable}     \end{document}      The output results in a single page, is it possible to make `multicolumn` span over the necessary pages? I am already using longtable, but given the text is inside a multicolumn, the result is only one page and missing text, any way of making it work using multicolumn or a workaround?


title: Merge two PDF files output by LaTeX?

text: I would like to (re)submit a paper with a short cover letter, explaining the changes I have made. However, the journal only allows me to upload one file. As the main article will use the journal style class, and so forth, it's not really practical to use the 1st page for the letter (or is it? Could I reset the page number etc. etc.??) Instead, could I create, say, two PDF files (one the letter, the other the article) and then somehow merge them together?


title: Feeding a macro with the expansion of an other defined "by" \csname

text: I have a macro `\mymacro@i` that I want to "feed" with the expansion of another `\test`. With `\expandafter\mymacro@i\test`, it works. Now, the `\test` macro can be defined by using `\csname`, say a `/test` macro. I can't find the combination of `\expandafter` to make it work the same way as with `\test`. How can I do?               \documentclass{standalone}     \makeatletter     \expandafter\def\csname /test\endcsname{%       \foo{bar}}     \def\mymacro#1{%       \expandafter\mymacro@i\csname/#1\endcsname}     \def\mymacro@i\foo#1{%       \def\temp{#1}%       \show\temp}     \mymacro{test}     % Error: Use of \mymacro@i doesn't match its definition.     %     \def\test{\foo{bar}}     \def\mymacro#1{%       \expandafter\mymacro@i\test}     \def\mymacro@i\foo#1{%       \def\temp{#1}%       \show\temp}     \mymacro{test}     \begin{document}     \end{document}


title: A working example of mdframed

text: I tried to make the basic examples of `mdframed` given in the corresponding documentation, but I get an error stating               ! You can't use a prefix with `\begingroup'.      The example is               \documentclass{article}     \usepackage[framemethod=default]{mdframed}     \usepackage{showexpl}          \global\mdfapptodefinestyle{exampledefault}{%     rightline=true,innerleftmargin=10,innerrightmargin=10,     frametitlerule=true,frametitlerulecolor=green,     frametitlebackgroundcolor=yellow,     frametitlerulewidth=2pt}          \begin{document}     \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]     \ExampleText     \end{mdframed}     \end{document}      Where did I do wrong?


title: Tikz: Smooth spline enlargment

text: Give that my previous idea may be too difficult TikZ Region bounded by points is it possible to draw a smooth(but "programmable") spline that intersects(or almost intersects) a group of ordered points then "enlarge" it. Here is what enlarge _may_ mean:   * Expand the curve to the "outside" by a certain certain distance.   * Draw the spline with a large line thickness BUT do not have sharp edges   * Draw the spline as a union of disks for each point on the spline but have the disk diameter depend on the curvature. Sharp peaks would produce larger circles which should "cover up" a the cusp. e.g., say we have an L curve. At the cusp the circles used would be larger than at the end points which would produce a more gradual change(here we would need to offset the disks position slightly too depending on the change in diameter)   * Anything that is smooth, regular, and "encloses" the line segments will work with preferably some way to control it's smoothness and size. The goal being to visually group the set of points to distinguish them from other groups of points(and I cannot change the properties of the points themselves)


title: Automate width determination for included graphics

text: For including graphics such as Matlab plots, I use `\includegraphics` from the graphicx package. Every time, I have to decide on some width and pass e.g. `[width=180mm]` to the inclusion command. This feels very arbitrary. How would I let LaTeX find the optimal width, assuming the graphic scales nicely without pixelation?


title: pdftex.def Error: 'pix/quadratic.pdf' not found : Beamer

text: I am using a beamer template to make a presentation. When I compile the code I am getting the following error which I have no idea about. `<Package pdftex.def Error: File 'pix/quadratic.pdf' not found` I am not able to figure it out because the preentation looks fine. However, I am not able to ignore these error messages. Should I ignore them or is it something serious? Please help. Thanks in advance. P.S. I am using the standard "famous" beamer template "warsaw".


title: How can I make a table like the type in this image in LaTeX?

text: I'm trying to make a table like the one in following image in LaTeX ![enter image description here](http://i.stack.imgur.com/lrKfT.png) but I'm unsure how to go about it. I've been using the tabular environment from the `booktabs` package, but the following code doesn't produce the table correctly. There are breaks in the lines, the lines extend too far, etc.               \documentclass[10pt]{article}     \usepackage{booktabs}     \begin{document}     \begin{tabular}{ccc|ccccccc}     &&&&&\multicolumn{5}{c}{Capacity j} \\     &&i&0&1&2&3&4&5&6\\     \midrule     &&0&0&0&0&0&0&0&0\\     $w_1 = 3$&$v_1 = 25$&1&0&0&0&25&25&25&25\\     $w_1 = 2$&$v_1 = 20$&2&0&0&20&25&25&45&45\\     \end{tabular}     \end{document}      This produces a table that looks like this: ![Result](http://i.stack.imgur.com/TXdSU.png) I know my MWE isn't complete, but I included the necessary code to demonstrate the problems with my current table.


title: Some questions about pgfkeys code

text: (1) In the expression               \def\pgfkeysgetvalue#1#2{\expandafter\let\expandafter#2\csname pgfk@#1\endcsname}      `#2` will be let to `\relax` whenever `pgfk@#1` is undefined. Is this harmless in pgf? Even if it was benign, why isn't a more formal coding style adopted. (2) In the expression               \def\pgfkeysvalueof#1{\csname pgfk@#1\endcsname}      `\pgfkeysvalueof{#1}` will be simply `\relax` if the name `pgfk@#1` was undefined. The arguments of `\csname pgfk@#1\endcsname` will then be unabsorbed (and, eg, will result in `\@nodocument` outside LaTeX document environment). Why isn't it necessary to first check for the existence of the name `pgfk@#1`? (3) Why wasn't the following expression made more compact by a simple abstraction?               \long\def\pgfkeysdefnargs@#1#2#3#4{%       \ifcase#2\relax           \pgfkeyssetvalue{#1/.@args}{}%       \or           \pgfkeyssetvalue{#1/.@args}{##1}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8}%       \or           \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8##9}%       \else           \pgfkeys@error{\string\pgfkeysdefnargs: expected  <= 9 arguments, got #2}%       \fi       ...     }      Here is a pseudocode for the abstraction I mean:               initialize \pgfkeys@temptoks, \pgfkeys@tempcnta     \loop     \advance\pgfkeys@tempcnta\@ne     \edef\x{%       \pgfkeys@temptoks{\the\pgfkeys@temptoks\ifnum\pgfkeys@tempcnta       <\numexpr#1+1\relax<parameter chars>\the\pgfkeys@tempcnta\fi}%     }\x     \ifnum\pgfkeys@tempcnta<#1\relax     \repeat       Here, you can avoid eTeX if you like.


title: How to set table size to \linewidth without using a package such as tabularx?

text: PLOS journals provide the following instructions for preparing a LaTeX manuscript: >   1. Do NOT use any other packages than those specified in the template. If > you use any other packages, your manuscript will be returned. >   2. Please limit the use of macros. The conversion software we use often > cannot handle even "simple" macros, which then increase the chance for > errors in the converted document. > The template only uses the packages: `amsmath`, `amssymb`, `graphicx`, `cite`, and `color`. Here is an example of the table that I would like to include in my document:               \documentclass[10pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{cite}     \usepackage{color}      \topmargin 0.0cm     \oddsidemargin 0.5cm     \evensidemargin 0.5cm     \textwidth 16cm      \textheight 21cm     \usepackage[labelfont=bf,labelsep=period,justification=raggedright]{caption}     \makeatletter     \makeatother     \date{}     \begin{document}     \begin{table}[!ht]     \caption{\bf{Test Table}}       \begin{tabular*}{1\linewidth}{@\extracolsep{\fill}}{rllllrrrlllll}         \hline         & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 & Column1 \\          \hline         & Rowname & something  & 1000000 & 200 & 3000 & 40 &   1.5 & 320000 & 5.8 & 80 &  $^\ast$   \\          \hline       \end{tabular*}     \begin{flushleft}     caption text caption text     \end{flushleft}     \label{tab:priors}     \end{table}     \end{document}      I have tried to adapt the answer to a previous question along the lines of: `\begin{tabular*}{.5\linewidth}{@{\extracolsep{\fill}}rllllrrrlllll}`, but this does not work.


title: usepgfplotslibrary - undefined control sequence

text: I have problem with following example code:               %& --shell-escape --enable-write-18     \documentclass[a4paper,10pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{polski}     \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{units}          \begin{document}          \begin{tikzpicture}             \begin{axis}[                 use units,                 x unit=m,x unit prefix=k,                 y unit=N,y unit prefix=m,                 xlabel=Distance,ylabel=Force]                      \addplot coordinates {                     (1,2.3)                     (2,2.7)                     (3,2.1)                     (4,1.8)                     (5,1.5)                     (6,1.1)                 };             \end{axis}         \end{tikzpicture}     \end{document}      A cannot use units in axis labels. A similar code was included in this documentation: http://www.iro.umontreal.ca/~simardr/pgfplots.pdf on page 227. Errors:               Missing \begin{document}. \usepgfplotslibrary{u (followed by: nits})     Package pgfkeys Error: I do not know the key '/pgfplots/use units' and I am going to ignore it. Perhaps you misspelled it.     Package pgfkeys Error: I do not know the key '/pgfplots/x unit' and I am going to ignore it. Perhaps you misspelled it.     Package pgfkeys Error: I do not know the key '/pgfplots/x unit prefix' and I am going to ignore it. Perhaps you misspelled it.     Package pgfkeys Error: I do not know the key '/pgfplots/y unit' and I am going to ignore it. Perhaps you misspelled it.     Package pgfkeys Error: I do not know the key '/pgfplots/y unit prefix' and I am going to ignore it. Perhaps you misspelled it.     Undefined control sequence:  \usepgfplotslibrary (followed by: {units})      What's more, the command \usepgfplotslibrary completely does not work with any other pgfplots library. I don't know what is wrong, but i have to get this working :/ Thank you in advance for your help. I'm running Debian Sid. Texlive (2009-11), pgf (2.10-1)


title: Can XeLaTeX | LuaTeX import movies?

text: It seems that XeLaTeX cannot handle movies. I imported movies into PDF produced with pdflatex compiler using the multimedia package that comes with beamer. My search over various boards revealed that currently there is no package that could import movies under XeLaTeX. Is that correct? And what about LuaLaTeX? **UPDATE:** This question became obsolete with the advent of `media9` package.


title: Bibliography with symbolic keys

text: I think I remember seeing some papers using symbolic names (i.e. `[AuthorXXX2006]`) instead of numeric indices (i.e. `[1]`), but obviously I'm too stupid to find a (more or less standard) biblatex-style that does this.


title: Using counter in definition of `\footnotemark`

text: Typesetting footnotes is fairly easy: one just has to use the `\footnote` command, and the numbering is done by TeX. Only in some cases (e.g. with notes in math mode, at times) the note vanishes. There is a way to fix that: the `\footnotemark` and `\footnotetext` command. The disadvantage is that every time I have to do that, I invariably had to fetch the value of the `footnote` counter and manually give it as the `\footnotemark`, as `\footnotemark[\arabic{thefootnote}]` did not work. So I came up with:               \ExplSyntaxOn     \NewDocumentCommand{\xfnm}{O{footnote}O{\arabic}}     {\ic{footnote}{+1}     \str_if_eq:nnTF{#2}{fn}         {\expandafter\fnm\expandafter[#2{footnote}]}         {\expandafter\fnm\expandafter[#2{#1}]}     }     \DeclareExpandableDocumentCommand{\xfnt}{O{footnote}O{\arabic}m}     {\str_if_eq:nnTF{#2}{fn}         {\expandafter\fnt\expandafter[#2{footnote}]{#3}}         {\expandafter\fnt\expandafter[#2{#1}]{#3}}     }     \ExplSyntaxOff      `\fnm`=`\footnotemark` and `\fnt`=`\footnotetext`, as defined via `\newcommand` elsewhere. Now there is a problem with this: `\xfnm` and `\xfnt` both invariably seem to fall into the second branch, even with `\xfnm[fn][\arabic]`: I get the error `Missing number, treated as zero […] \c@fn […]`, implying it's trying to find an `fn` counter, which is of course undefined, whereas it should be looking for the well-defined `footnote` counter. Now of course you will make the following remark: trying to insert a representation of a number different from `\arabic` will give `Missing number, treated as zero`, so why are you defining this command? Well, I only just found out, so I'll just remove this, but just for curiosity, why is the problem there? In any case, is there any reason to keep `\DeclareExpandableDocumentCommand` where the desired arg. spec. allows it (i.e. in `\xfnt`)?


title: LaTeX parser to perform operations on tags (commands) and its content?

text: Is there a LaTeX parser available that can be run from a (*nix) command line, and that allows operations on LaTeX tags/commands and its content? What I am trying to do is, for example:   * script-wise extracting certain text blocks, like all `\question{}` tags within the `\begin{document} ... \end{document}`,    * ~~or renaming certain tags (like`\newtext{blabla}` to `\oldtext{blabla}`)~~ _[hmm, bad example since very easy to do]_ ,    * or deleting specific tags and its content, like `\oldtext{}`   * or just deleting the tag but retaining the content. The main reason for not using find&replace from a LaTeX editor, or utilities like `grep` is problems with nested tags and closing braces on new lines.


title: Ensure whitespaces between footnote numbers, citation numbers, etc...

text: Is there a way to ensure that footnote numbers and similar don't stick together in the final document (because I forgot a manual space between them? Example: Instead of               asdf\footnote{a}\footnote{b}      which produces > asdf12 I want: > asdf 1 2 Is there a package that does this? (Or even some Grep-Magic?)


title: How to make a box with a height based on multiples of the current line height

text: How can I create (in XeLaTeX) a box that has a defined height in multiples of lines that keeps this size 100% without any additional spacings? Please see the following MWE:               \documentclass{article}          \usepackage{lipsum}      \usepackage{multicol}           \newcommand{\mybox}[2]{\parbox[t][#1\baselineskip]{\columnwidth}{#2}}          \begin{document}     \begin{multicols}{2}\raggedcolumns          \lipsum[1]     \mybox{3}{Some more text}     \lipsum[2-8]          \end{multicols}     \end{document}      The mybox should create a 3-line box. However, after that box, the base lines seem to be off `~1pt` if compared to the right column. I've tried a lot of different types of boxes, spacers, minipages and such, and have not yet a solution. Often the box has the correct height, but it does not properly fit into the surrounding, throwing baseline-alignment in the other column off. In the solution I look for, the first priority should be exact height, no matter what happens inside or right next to the box. The box might contain text, but also images or maybe small tables - it's purpose is to create a reliable "reserved space". Or, to be more precise, the base lines in both columns before and after the box should always stay aligned. If odd fonts are used with artistic overlength letters (both upwards and downwards, like in handwriting), the box should not make space for that. If more content is in the box than there is space, it's ok to either crop or to overflow into the surrounding, or if it looks odd what happens inside the box, but the specified hight in lines must be enforced. Also, the solution should not require hardcoded values (like point sizes for line heights, skips or spacing) but work with any text/font size that is currently in use.


title: how to use citenum without natbib

text: I was wondering if I can use the `\citenum{}` command of `natbib` without actually using it. I prefer using `\bibitem{}` instead of `.bib` file. Any idea?


title: MikTeX unable to find installed ytableau package

text: I want to use `ytableau` package. I was using MikTex 2.8 and after trying to compile I recieved a message that it would not be possible to download packages for MikTex 2.8 any more. So, I have installed MikTex 2.9 with the option of on-the-fly installation assigned and it did not work. MikTex still complains about not having found the package and it does not even try to download it from internet. So I opened the package manager, selected the package and clicked on install (inside task menu). Apparently, it installs the package, but guess what happens when I run LaTeX... It still does not find that package. What am I supposed to do?


title: Statement (\STATE) indentation in Algorithmic package

text: I have the following code,               \documentclass[]{memoir}     \usepackage[utf8x]{inputenc}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{algorithmic}          \newcommand{\algorithmname}{Algorithm}     \newcommand{\listalgorithmname}{List of Algorithms}     \newlistof{listofalgorithms}{loa}{\listalgorithmname}     \newfloat{algorithm}{loa}{\algorithmname}     \newfixedcaption{\falgcaption}{algorithm}     \newlistentry{algorithm}{loa}{0}            \usepackage{float}     \floatstyle{ruled}     \restylefloat{algorithm}               \begin{document}               \tableofcontents     \newpage     \listoffigures     \listoftables     \listofalgorithms          \newpage     \chapter{Example Chapter}     \section{Example Section}     \begin{algorithm}[htbp]     \caption{An example algorithm}     \label{alg1}     \begin{algorithmic}     \REQUIRE Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \ENSURE Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \STATE Statement 1: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus. \COMMENT{This is a comment}     \REPEAT     \STATE Statement 2: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \STATE Statement 3:  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \FOR{$i=0$ to $k$}     \STATE Statement 4:  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \STATE Statement 5: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \ENDFOR     \UNTIL{Lorem ipsum dolor sit amet}     \STATE Statement 6: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lobortis luctus tincidunt. Ut commodo, erat quis tempor cursus, felis lectus.      \end{algorithmic}     \end{algorithm}     \end{document}      This typeset as follows, ![Noindent](http://i.stack.imgur.com/T7Ne8.png) As my pseudo code statements are relatively long, I would like the `\STATE` section (Statement 1...Statement 6) to have a slight hanging indentation as the `\REQUIRE` sections.


title: How to align 'implies that' symbols neatly in equation array

text: The following is an equation array I have:               \begin{eqnarray}     \Rightarrow\eta_t &=& \eta_x(\omega \eta-(\varphi_x)_s) + (\varphi_y)_s\notag\\     \Rightarrow\eta_t\,(\varphi_y)_s &=& \eta_x(\omega \eta-(\varphi_x)_s)(\varphi_y)_s +      {(\varphi_y)_s}^2\notag\\     &=&\omega\, \eta\,(\varphi_y)_s\, \eta_x-(\varphi_x)_s\, \eta_x(\varphi_y)_s +     {(\varphi_y)_s}^2.     \end{eqnarray}      All I want to do is move the first 'implies that' symbol so that it is aligned with the second one and to not change anything else. I have tried several things but the end result is always that the equations are stretched out and I want to avoid that. (I know use of eqnarray is not recommended but I've done too much to go back and change everything!!)


title: Multiple split equations

text: I find myself again and again using a combination of the `gather` and `aligned` environments. So it would be nice to not have to write so much. In particular, it is often only clear after writing the formula, whether it needs splitting. So the new environment should act like `gather`, only that when lines are separated by a special symbol/macro (`\n` for example) they should be put together into an `aligned`-environment. I tried the following               \documentclass{article}     \usepackage[fleqn]{amsmath}          \newenvironment{multeq}{%         \let\n{\\}         \let\\{\end{aligned}\\\begin{aligned}}         \begin{aligned}     }{%         \end{aligned}         \let\\{\n}     }          \begin{document}              \begin{gather}             \begin{aligned}                 S(A) &= (I_{n-k, k}AI_{n-k,k})_{i,j} = (I_{n-k,k})_{i,i}A_{i,j}(I_{n-k,k})_{j,j}\\                 &= \begin{cases}A_{i,j}&\begin{aligned}&(i\leq n-k\wedge j\leq n-k)\\\vee&(i>n-k\wedge j>n-k)\end{aligned}\\-A_{i,j}&\text{otherwise}\end{cases}             \end{aligned}\\             \Rightarrow H = S(U(n-k)\times U(k))         \end{gather}              \begin{multeq}             S(A) &= (I_{n-k, k}AI_{n-k,k})_{i,j} = (I_{n-k,k})_{i,i}A_{i,j}(I_{n-k,k})_{j,j}\n             &= \begin{cases}A_{i,j}&\begin{aligned}&(i\leq n-k\wedge j\leq n-k)\n\vee&(i>n-k\wedge j>n-k)\end{aligned}\n-A_{i,j}&\text{otherwise}\end{cases}\\         \Rightarrow H = S(U(n-k)\times U(k))         \end{multeq}          \end{document}      where the output should be 2× ![example output](http://i.stack.imgur.com/fZPdb.png) but it gives the error:               ! LaTeX Error: There's no line here to end.     l.24    \begin{multeq}      How does this error come about and what is a good way to create such an environment? * * * So using David’s corrections, and adding `gather`:               \newenvironment{multeq}{\begin{gather}%         \def\n{\\}%         \def\\{\end{aligned}\\\begin{aligned}}%         \begin{aligned}%     }{%         \end{aligned}%         \end{gather}}      I got               ! Paragraph ended before \gather was complete.      So I tried using `\Collect@Body` from `environ`:               \def\savebody#1{\def\BODY{#1}}     \usepackage{environ}     \makeatletter          \newenvironment{multeq}{         \def\n{\\}%         \def\\{\end{aligned}\\\begin{aligned}}%         \Collect@Body\savebody     }{\begin{gather}%         \begin{aligned}%                 \BODY%         \end{aligned}%         \end{gather}}          \makeatother      But now the redefinition of `\\\` is ignored. What else could I do?


title: Formatting *** in a regression result table

text: I have a code as given below:               \documentclass[10pt]{article}          \usepackage{ltablex}          \begin{document}     \begin{tabularx}{\textwidth}{@{}rr@{}}      A & $0.11^{***}$\\   & (-12.112) \\    B & $0.15^{*}$\\   & (-8.452)\\     C & $0.76^{}$\\   & (12.452)\\          \end{tabularx}          \end{document}      This produces a result as given below: ![enter image description here](http://i.stack.imgur.com/wM1gc.png) However, I want "stars ( _*_ /*) etc. to be formatted differently as given in the picture below: ![enter image description here](http://i.stack.imgur.com/tVK4Q.png) Please let me know how to format the table. Thanks.


title: balanced longtables, multicol and page breaks

text: For a long time, I have been looking for a nice way to have balanced tables inside a multicol environment. Especially, I would like to have automatically balancing multicol-tables inside a `table` float. While I always thought that this is merely impossible with LaTeX in its current state, I have recently discovered an extraordinary useful answer on this topic: Balancing long table inside multicol in LaTeX However, when I apply this technique to the case I'm investigating, I encounter a somewhat odd behaviour. Please consider the following example:               \documentclass{article}          \usepackage{longtable}     \usepackage{multicol}     \usepackage{lipsum}          \title{Lorem ipsum}     \date{\today}     \author{\LaTeX}          \makeatletter     \newsavebox\ltmcbox     \newenvironment{multicolslongtable}[1]{       \setbox\ltmcbox\vbox\bgroup       \col@number\@ne       \begin{longtable}{#1}     }{       \end{longtable}       \unskip       \unpenalty       \unpenalty\egroup       \unvbox\ltmcbox     }       \makeatother          \begin{document}          \maketitle          \begin{multicols}{2}          \lipsum[1-3]          \begin{table*}[t]     \begin{multicols}{2}     \begin{multicolslongtable}{c l}     1 &Lorem\tabularnewline     2 &ipsum\tabularnewline     3 &dolor\tabularnewline     4 &si\tabularnewline     5 &amet\tabularnewline     6 &consectetuer\tabularnewline     7 &adipiscing\tabularnewline     8 &elit\tabularnewline     \end{multicolslongtable}     \end{multicols}     \caption{Words of the first sentence by index.}     \end{table*}          \lipsum[4-10]          \end{multicols}          \end{document}      ![page 1](http://i.stack.imgur.com/3B9ZQ.jpg) ![page2](http://i.stack.imgur.com/1c8le.jpg) Please note that:   * There is a large gap in the right column of the first page.   * The text of both columns overruns the boundary on the first page, but not on the subsequent page(s) I would be glad for any suggestions on how to fix this and improve my `multicolslongtable` environment.


title: Zero margins with memoir

text: I am trying to set up custom page size with zero margins. Here is the example               \documentclass[oneside,final,12pt]{memoir}     \usepackage{lipsum} % just for sample text     \usepackage[T1]{fontenc}          \pagestyle{empty}     \aliaspagestyle{chapter}{empty}     \aliaspagestyle{part}{empty}          \setstocksize{194.73mm}{132.76mm}     \settrimmedsize{\stockheight}{\stockwidth}{*}     \settrims{0pt}{0pt}     \setlrmarginsandblock{0.55mm}{*}{*}     \setulmarginsandblock{0mm}{*}{*}     \setlength{\parskip}{0pt}     \setheadfoot{0mm}{0mm}     \setheaderspaces{*}{0mm}{*}     \setmarginnotes{0mm}{0mm}{0mm}     \checkandfixthelayout          \begin{document}     \chapter*{First Chapter}     \lipsum     \end{document}      This does not compile (with pdflatex), the error is               ! Class memoir Error: \footskip (0.0pt) is too large for \lowermargin (-8.9395pt) by 8.9395pt.      I explicitly set header/footer to empty, how come it tries(?) to put something there and gets negative lowermargin? Thanks


title: How do I contribute to TikZ?

text: Stemming from this question and with due credits to @morbusg's answer, I was able to create a very fundamental symbol for the `circuits.ee.IEC` TikZ library, the AC voltage source. I call it the `ac source`. The code for it is here.   ![alt text](http://i.stack.imgur.com/JIt2x.png) I'd like it to be added to the abovementioned TikZ library, but I don't know how. I don't have a SourceForge account. I'm not familiar with SVN, or any source control system for that matter. My idea is to contact Till Tantau or Mark Wibrow so that they can refactor it to their coding style, but I don't see their e-mail addresses in the `pgfmanual`. Any ideas?


title: Horn accent in LaTeX

text: Sorry if the question is so trivial. I've just started using LaTeX couple of weeks ago and till now it's so new to me. I was trying to finish my name in a report where it's required to type a diacritic mark Horn in the document (something such as ư Ư or ơ Ơ). However, it seems not to be supported in LaTeX as I can find nearly all other accents such as grave, acute, circumflex here in Wiki but not this horn ư or Ơ, isn't it? I've also refer to some methods that support Unicode characters but it seems a way too far. I just need a horn on a character u and o and that's all. I'm using MiKTex 2.9 and Texmaker.


title: Newline in \multirow environment

text: One element of a multirow column is long. How can I split it so that it spans over multiple line. The following code               \documentclass{article}     \usepackage{multirow,array}     \usepackage{booktabs}     \begin{document}          \begin{tabular}{rcc}       \toprule       Name & Subject & Grade \\       \midrule       \multirow{3}*{John}           & Maths   & A \\                                     & Science & A \\                                     & Arts    & A \\[.5\normalbaselineskip]       \multirow{3}*{Very Long Name} & Maths   & A \\                                     & Science & A \\                                     & Arts    & A \\       \bottomrule     \end{tabular}          \end{document}      generates: ![enter image description here](http://i.stack.imgur.com/SMvOs.png) Is there a way to split the "Very Long Name" into multiple row?


I am writing a mathematics book that makes use of a huge number of PSTricks pictures. For the sake of re-usability and maintaining separation of concern, I always put the self-contained PSTricks code in a separate `.tex` file. The following code shows an example of self-contained PSTricks input file:               % gridon.tex     \documentclass{minimal}     \usepackage{pstricks}     \pagestyle{empty}          \begin{document}     \begin{pspicture}[showgrid=true](4,3)     \end{pspicture}     \end{document}      Then I compile the `gridon.tex` using the following batch file to produce `gridon.eps`.               latex %1.tex     dvips -R %1.dvi     ps2pdf -dCompatibilityLevel#1.5 -dPDFSETTINGS#/prepress %1.ps %1-temp.pdf     pdfcrop --restricted --hires %1-temp.pdf %1.pdf     pdftops -eps %1.pdf %1.eps      From my main `.tex` file, I will then import the `gridon.eps` as follows               % main.tex     \documentclass{minimal}     \usepackage[hiresbb]{graphicx}     \usepackage{pst-node}     \begin{document}          \includegraphics[scale=2]{gridon}     \vspace{5mm}          I am \rnode[tl]{A}{xport} not \rnode[tr]{B}{xpert}.     \ncarc[angle=90,linecolor=blue,arrows=<->]{A}{B}          \end{document}      Note that in the `main.tex` file I also have inline PSTricks codes in between the text so I cannot put them in separate files. The main input file is then compiled using `latex->dvips->ps2pdf`. How to manage a document with a huge number of PSTricks figures?


title: Why don't my images show up?

text: I am using LyX to create my documents. I then export them to plain LaTeX and use XeLaTeX to create a PDF output. My images show up in the LyX document but not in the PDF output. LyX generates this code to insert an image:               \includegraphics{\string"some file\string".png}      I get errors like these:               [1] <"some file".eps>     Overfull \hbox (209.98003pt too wide) in paragraph at lines 58--62      and               ** WARNING ** No filename specified for PSfile special.     ** WARNING ** Interpreting special command PSfile (ps:) failed.     ** WARNING ** >> at page="3" position="(158.675, 489.198)" (in PDF)     ** WARNING ** >> xxx "PSfile=""some file".eps" llx=-0 lly=-0 urx=528 ury..."     ** WARNING ** >> Reading special command stopped around >>""some file".eps" llx=-0 lly=-0 urx=528 ury=178 rw...<<


title: Spurious spaces in tabular environment with siunitx and percent symbol

text: I keep getting spurious spaces when I use the siunitx in a tabular environment in the presence of a percent (%) symbol. I am trying to align at the decimal point. My code is:               \begin{tabular}{lS}         One   & 0.1234\percent \tabularnewline         Two   & 1.234\percent  \tabularnewline         Three & 12.34\percent  \tabularnewline         Four  & 123.4\percent  \tabularnewline         Five  & 1234\percent   \tabularnewline         Six   & 1234.0\percent \tabularnewline     \end{tabular}      and the resulting output is: ![Result](http://i.stack.imgur.com/55j3S.png) The decimal-point alignment is working but the percent symbol has increasing number of spaces as the whole number part of the number increases. Is there a way of removing these spaces easily, so that the percent symbols appear right after the number? I can hack it by having the percent symbol appear as a unit in a separate column, i.e.               \begin{tabular}{lSs}         One & 0.1234 & \percent \tabularnewline      but is there a way of having the percent symbol right next to the number as it appears for One, Two and Three above, e.g.                  0.1234%     1234%      Thank you!


title: Rotating text in a table, and getting hlines in the right place.

text: I have a table where the first line includes quite some text, and then each of the other cells is fairly small (a symbol or two maximum). At the moment, my code looks like this:               \documentclass{standalone}     \usepackage{rotating}     \begin{document}       \begin{tabular}{lrrrrrrrr}       & \begin{rotate}{45}Better measurements\end{rotate} & \begin{rotate}{45}Theory\end{rotate} & \begin{rotate}{45}Intervals\end{rotate}        &\begin{rotate}{45} Ensembles\end{rotate} &\begin{rotate}{45}Training\end{rotate} & \begin{rotate}{45}Robustness\end{rotate}        & \begin{rotate}{45}Past Success\end{rotate} \\       Imprecision & x & y & z & a & b & c & x \\       Inaccuracy & x & y & z & a & b & c &x\\       Deeper & x & y & z & a & b & c &x\\       Parameter & x & y & z & a & b & c&x \\       Structure & x & y & z & a & b & c &x \\       Overfitting& x & y & z & a & b & c&x \\       Discretisation & x & y & z & a & b & c &x\\       Resolution & x & y & z & a & b & c &x\\       Implementation & x & y & z & a & b & c&x \\     \end{tabular}     \end{document}      This uses the `rotating` package for the `turn` environment. The problem is that the `turn` environment does not leave space for the rotated text. (which is good, because the labels "overlap" vertically, which is what I want. However, when I input it in a bigger document the labels overlap the text above. I can just add vspace manually but this is suboptimal. Also, when I try and put `hline`s at the top, they go through the text. (also, it's not great that I have to put the environment in each table cell in the top row) Are there package that do a better job of dealing with these sorts of tables?


title: Simple footers with only a page number

text: I'm using a memoir template with page header defined. In the appendix, I maximize the geometry to print a lot of tables with narrow margins. I currently disable the memoir header with `\pagestyle{empty}` or `\pagestyle{plain}` which both remove the header but print no page number in the footer, as is the default with `\documentclass{article}`. How can I enable a simple footer with the pagenumber in the middle on some pages, and on the right on some others (where the bottom table is in the middle)?


title: Customizing pdfLaTeX for a particular file with AUCTeX?

text: I'm trying to use the TikZ 'external' library, available as of PGF 2.10. This requires running pdfLaTeX with the option -shell-escape. I usually run pdfLaTeX from AUCTeX with the option               (TeX-PDF-mode t)      So C-c C-c runs pdfLaTeX. Can I add a line to my LaTeX file so that AUCTeX will know to run pdfLaTeX with the -shell-escape option for this file only, seeing as this is apparently a security issue, and only partially enabled by default? I don't know if this is possible, but similar things are possible. See for example the tex.sx question Force different TeX engine for specific files. If possible this would presumably use file variables. If not, I know it is possible to customize it globally for all files in .emacs. Currently, I'm not sure how to do that either. Preferably via M-x customize, but I find those menus quite confusing See for example http://thread.gmane.org/gmane.emacs.auctex.general/538 where David Kastrup seems to suggest that the per file approach is possible. Ie. "Anyway, you could use the file variable section to change the command just in those files where you want it." Also see http://thread.gmane.org/gmane.emacs.auctex.general/710 UPDATE: Based on input from the auctex mailing list, the answers suggested by people here should work. It is not clear why it doesn't, but the problem may be specific to the Debian package. Marcus Frings pointed me to his bug report in the thread above. The bottom line is there appears to be a problem with the Debian package, which is not present in vanilla auctex, and nobody knows why. The maintainer, who one would expect to look into this, shows no interest in doing so, unfortunately.


title: Continuous table numbering

text: I am listing a bunch of pages in an Appendix. If I do the appendix as `\appendixpage`, after a chapter 1 (for testing), I get all tables numbered 1.1, 1.2, ... 1.436. (Yes, I have 436 tables, and it's only warming up.) How can I place all of the tables in the appendix so that they are numbered A.1, A.2, ..., A.436? Alternatively, how do I make sure all of the tables in the whole memoir document are numbered continuously, 1, ..., 523 (I have more tables before the Appendix)?


title: Add an image on the top-left corner of a customized block in beamer

text: I would like to use some customized blocks in my beamer presentations, with a layout that is inspired by these examples found on a website : ![enter image description here](http://i.stack.imgur.com/1F8ib.png) ![enter image description here](http://i.stack.imgur.com/qPrxr.png) ![enter image description here](http://i.stack.imgur.com/c7g76.png) The idea is to build a specific block environments, like `\begin{carefullBlock}...` for the first one, `\begin{questionBlock}...`for the second one, and `\begin{informationBlock}... for the second one, in order to display a block with the same general layout as standard blocks, but without a title line, only text inside, and the corresponding image on the left corner. The best would be that the left border of these blocks should be aligned with standard blocks. So the image should exceed the left margin a little bit. Does anyone know how to do it?


title: Automatically checking for accidental spaces in macros?

text: It is easy to forget a `\relax` or `%` at the line end of commands in the body of macros. For example, in writing               \def\myMacro{       \invokeX       \invokeY{}       \invokeZ     }      You must add a space swallower at the end of the first and third line, but not at the end of the second, fourth and fifth lines. A simple global search/replace of `{$` by `{%` will fix omissions such as that of the first line, and is not likely to add redundant swallowers. But, a global search/replace of `}$` by `}%` will also add a percent after the fifth line. For the benefit of Google search visitors, let me write the `vi` commands for these searches:               :%s/{$/{%/     :%s/}$/}%/      But as I mention, these are not perfect, and may not take care of other tricky cases. So, my question is: **Can you do better?** Perhaps there is a clever redefinition of `\def` that would eliminate the need for these ugly additions, or perhaps there is some other automatic mechanism that would warn against such potential bugs?


title: Checking whether a file is empty?

text: Well, the obvious way to do that is with `\ifeof`, but for some reason, I cannot do this right. I wrote               \newread\reader     \openin\reader=empty \relax     \ifeof\reader\message{empty}\else\message{not empty}\fi     \closein\reader     \openin\reader=notempty \relax     \ifeof\reader\message{empty}\else\message{not empty}\fi     \closein\reader      where `empty` is an empty file (sized 0), and `notempty` is non-empty file. TeX seems to think that both files are not empty.


title: psfrag labeling gets url and color?

text: I am using psfrag command to replace labels in eps with text inside latex. The labels are generated correctly but the images behave like hyperlinked and as result the labels are produced in the color of blue which is defined as color of hyperlinking. Clicking on the axis label opens the images seperately. I do not want this and want the labels to appear in black color as the main text. How to fix this? I have used hyperref environment for linking the figures with their numbers. Below is the environment set up as used               \usepackage[ pdftex, plainpages = false, pdfpagelabels,                  pdfpagelayout = TwoPageRight,                   bookmarks,                  bookmarksopen = true,                  bookmarksnumbered = true,                  breaklinks = true,                  linktocpage,                  pagebackref,                  colorlinks = true,                  linkcolor = blue,                  urlcolor  = blue,                  citecolor = blue,                  anchorcolor = green,                  hyperindex = true,                  hyperfigures                  ]{hyperref}      Below is the figure environment using psfrag and an image generated.               \begin{figure}     \centering       {         \psfrag{xl}[c]{$z$ [mm]}         \psfrag{yl}[c]{velocity [m/s]}         \includegraphics[width=0.4\textwidth]{dns_vel}}\quad     \caption{caption1}     \label{fig:flow}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/iqayW.png)


title: Special characters in tikz label

text: I have this code :               \documentclass[tikz]{standalone}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[frenchb]{babel}     \usetikzlibrary{decorations.text,}     \begin{document}     \sffamily     \begin{tikzpicture}[         circle label/.style = {             postaction={                 decoration={                     text along path,                     text = {#1},                     text align=center,                     reverse path,                 },             decorate,         }         }     ]        \filldraw[white] (-5,-5) rectangle (5,5);        \path[circle label={Text with spécial character}] (0,-1.2) arc (-90:360-90:1.2);        \draw[dotted] (0,0) circle (1);     \end{tikzpicture}     \end{document}      I have a problem to print the text that conatins special character (é). Is it possible to have labels with special characters? If yes how?


title: Subsection destroys ToC in PDF

text: in my thesis I have an abstract, the toc and then the content. The content sections start again with 1. When I add a subsection at the content section, the toc of the PDF is destroyed and shows something like this:               Abstract     ----> Inhalt           ----> Einleitung                 ----> title      instead of               Abstract     Inhalt     Einleitung     title      This is the code I'm using:               \documentclass[12pt,a4paper,bibliography=totocnumbered,listof=totocnumbered]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage{hyperref}     \begin{document}     \renewcommand{\thesection}{\Roman{section}}     \pagenumbering{Roman}     \section{Abstract}     \renewcommand{\contentsname}{II Inhaltsverzeichnis}     \addcontentsline{toc}{section}{II Inhaltsverzeichnis}     \addtocounter{section}{1}     \tableofcontents     \renewcommand{\thesection}{\arabic{section}}     \setcounter{section}{0}     \pagenumbering{arabic}     \setcounter{page}{1}     \section{Einleitung}     % next line messes all up     \subsection{title}     \end{document}


title: latex-beamer: ambiguous highlighting with \setbeamercovered{transparent}

text: I am having problems with the following piece of code:               \documentclass{beamer}     \setbeamercovered{transparent}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \begin{document}     \begin{frame}     \begin{itemize}     \item<alert@4-> a     \pause     \item b     \pause     \item c     \pause     \end{itemize}     \end{frame}     \end{document}      I want to have a,b and c highlighted one after one, and in the end alert the first item. Unfortunately on page one of the generated document b is already highlighted, although only a should be. Here's an image of the first slide: ![](http://i.imgur.com/zRTAb.png) What did I do wrong?


title: Removing the borders from algorithm listings

text: I am relatively new to LaTeX. If I use standard `algorithm` and `algorithmic` environment for my algorithm listings I'm getting the borders displayed around the table with the pseudocode. How to remove them? I also want to have the caption of the algorithm below the pseudocode - it is currently above. I believe the problem is extremely easy but googling didn't give me any hints for that.


title: Centering text on a page

text: I'll try to illustrate what I want to accomplish. I want an enviroment/page style for poems that works like this -- the title (if present) is placed in the title placeholder (purple). The body of the poem is placed at the center of the page (gray). ![enter image description here](http://i.stack.imgur.com/rFodt.png) That should work independently of how the poem is wide or long, up until until the distance from the title to poem reaches some length (green). After that, the center is moved below so that the poem fills the page up to the lower margin (blue). For poems without title, I should be able to choose either filling them to the title placeholder bottom - greenlinelength or up to the title placeholder top. Basically I should be able to measure the widest line in the poem, and then how long will it be if placed in a box as wide as the widest line. The positioning calculations should are simple enough. I guess I could then position my boxes using `textpos`. Do you have any suggestions? ![enter image description here](http://i.stack.imgur.com/0NXhK.png)