title: \newfont command not working; which fonts can I substitute?

text: I have to use a LaTeX style file that has the following:               % fonts for headings in Helvetica. Edit if you have no such fonts     \newfont{\helvix}{phvr at 9pt} % roman9     \newfont{\helvixb}{phvb at 9pt} % bold9     \newfont{\helvixo}{phvro at 9pt} % italic9     \newfont{\helvxviiib}{phvb at 18pt} % bold18      Unfortunately, on my setup (OS X + TeXShop), even after having copied the required TFM files to my working dir, I get the following errors:               mktexpk: don't know how to create bitmap font for phvr.     mktexpk: perhaps phvr is missing from the map file.      I'm assuming that getting the fonts installed properly etc. is going to be an involved process, so for now I'd like to just avoid that problem and get to writing. I tried replacing the "phvr" (and related) by the names given in the comments (roman9, etc.); this doesn't work either. What could I put instead to get it working as fast as possible, while still respecting the basic typesetting options (helvixb must be in bold, etc.)?


title: Embedding a complete rather than a partial font

text: Is it possible to make XELatex embed a full rather than a partial font? The reason I ask is that I am trying to induce a fillable form to use the body font (a question asked before by several participants without satisfactory answer - e.g. related questions here or here). Acrobat forms can apparently only use embedded fonts if they are fully embedded rather than partially embedded - see here). At the moment I can create a form that uses my body font in the fillable fields, but this only works if the font is installed on the users machine. Once I get a positive response to the above I'll extend my question to the actual use of this font in form. Below a rather trivial MWE (in this case using libertine) for anyone who wants a starting point to experiment.               \documentclass{article}     \usepackage{fontspec}     \usepackage{libertine}     \begin{document}     The quick brown fox jumps over the dog 0123456789.     \end{document}      The below provides an extended MWE using the eforms package (somewhat unrelated to the question of font embedding). Not specifying any font uses the default helvetica for the field (which looks horrible) as does the underlying hyperref field. Using TiRo as the font at least gives a reasonably decent looking serif font (albeit not libertine) which seems to work in Acrobat reader, PDF-XChange viewer and the inbuilt Windows 8 reader. Specifying LinLibertineO as the font gives libertine in the field (only if this is installed, and only in Acrobat Reader, but not PDF-XChange viewer and the inbuilt Windows 8 reader).               \documentclass{article}     \usepackage{fontspec}     \usepackage{libertine}     \usepackage{eforms}     \begin{document}          \everyTextField{     \BC{1 0 0} % border color     \BG{.941 1 .941} % background color     \textColor{0 0 1} % is black     \textFont{TiRo} % LinLibertineO/TiRo (options see commentary)     \textSize{10}     \Ff{\FfDoNotScroll}     }          Your name: \textField{myText}{1.5in}{12bp}          \end{document}


title: BibTex style database

text: There are a couple of great tutorials and tools in the internet for making your customized style for a given journal, for example there is bst generator website, dozen of examples for different journal tastes, and so on. However, having migrated from Endnote to BibTex and LaTex recently, I was wondering whether there is any convenient bst database for BibTex. For example, Endnote provides style database that you only need to know journal name and no further technical details.


How do I make the first page double sided in a single sided LaTeX document? Is there a way that I can tell LaTeX that I want something on both sides of the first page, but everything after it to be single sided only, without making the whole document double sided and inserting a blank page after every page?


title: KOMA script - widening text width

text: I have a longtable that is about 14cm wide and the text width of 12 cm. Therefore I would like to widen the text width on two pages for 2 cm, toward the outer edge of the page. I have "discovered" that there are `addmargin` and `addmargin*` environments, but I just don't have a clue how to use them. I tried various combinations of parameters with no success. Any idea how to do that? Thanks MWE:               \documentclass[11pt]{scrbook}     \usepackage{longtable}          \usepackage[paperwidth=210mm,paperheight=255mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}          \begin{document}          more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more text          \begin{addmargin*}[0cm]{-2cm}     \begin{longtable}{llll}     \hline     \hline     text & text & more and more and more text & more and and more and more text \\     \hline     \endhead          \hline     \hline     \endfoot          text & text & more and more and more text & more and and more and more text \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     & & a& \\     text & text & more and more and more text & more and and more and more text \\     \end{longtable}     \end{addmargin*}          more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more text          \end{document}enter code here


title: How to avoid including authors in second page for a document with two title pages using authblk package

text: I have a document with two title pages. In the first I need to include the authors with footnote for the corresponding author using `\thanks` but in the second one only include the title and abstract. However, I have not been able because in the second title page the same authors and footnote from the first page appears in the second one. I tried to include `\author{\emptythanks}` but the following error is displayed:                ! TeX capacity exceeded, sorry [grouping levels=255]. \@footnotetext     #1->\insert \footins      I have the following:               \documentclass[12pt,openbib]{article}     \usepackage{titling}     \usepackage{authblk}     \usepackage[T1]{fontenc}          \begin{document}     \title{Title}     \date{  }     \author[1]{Author 1}     \author[2]{Author 2\thanks{Corresponding author}}     \affil[1]{University 1}     \affil[2]{University 2}     \maketitle     \thispagestyle{empty}          \newpage     \setcounter{page}{1}          \title{Title}     \date{  }     \author{\emptythanks}     \maketitle               \begin{abstract}          The Abstract          \end{abstract}          \thispagestyle{empty}     \newpage          \end{document}


title: Visual feedback for broken hyperlinks and hypertargets

text: Is there a way to mark visually unused hypertargets and undefined hyperlinks. Of course I can check the log file, but I want to see critical links direct inside the pdf, e.g. by a different text colour. I started to redefine hyperlink and hypertarget. At each call of one of this commands I create a variable that can be checked at the opposite command. This of course only works if the target is defined before the link reference it. But for the target it means the variable created by the associated hyperlink was not yet created, so for this hypertarget call it looks like it is not used. How can I solve this dilemma?               \documentclass{article}          \usepackage{color}     \usepackage{hyperref}          \newcommand{\myHyperlink}[2]{     \csname link@#1 \endcsname%     \ifcsname target@#1 \endcsname%     \hyperlink{#1}{#2}%     \else%     \hyperlink{#1}{\textcolor{blue}{#2}}%     \fi     }          \newcommand{\myHypertarget}[2]{     \csname target@#1 \endcsname%     \ifcsname link@#1 \endcsname%     \hypertarget{#1}{#2}%     \else%     \hypertarget{#1}{\textcolor{blue}{#2}}%     \fi     }          \begin{document}     \myHyperlink{t1}{Here} are \myHyperlink{t2}{some} great \myHyperlink{t3}{links}.      The first one brings me to \myHypertarget{t1}{here}, the second one \myHypertarget{t2}{here},     but the last one does not exist, in exchange an unused hypertarget is defined     \myHypertarget{t4}{here}.\\     \myHypertarget{t5}{Here} I define a hypertarget before the hyperlink, which     is defined \myHyperlink{t5}{here}.     \end{document}


title: Run .tex files in batch in xeLaTex

text: I have 50 similar `.tex` files that need to be run in XeLaTeX, and would like to run them in batch mode. Does anyone know if this can be done in Windows? File names are:               file1.tex     file2.tex     file3.tex     ...


title: Switching an existing document to memoir. How much trouble is it?

text: I'm really growing fond of the `memoir` package. I have a large document in which I use the `report` `documentclass`. How much trouble would it be to switch to `memoir`; i.e. what would I 'probably' need to change based on common dissertation, or scientific writing? I understand that the question is a bit open, but all I'm asking for is general assumptions and solutions.


title: text figures (old style numbers) and mhchem

text: How do I achieve lining figures with `mhchem` while maintaining text figures in the text (lualatex). My MWE is:               \documentclass{minimal}          \RequirePackage[paperwidth=70mm, paperheight=20mm, left=10pt, top=20pt]{geometry}%          \RequirePackage{fontspec}     \setmainfont[Ligatures=TeX, Numbers=OldStyle]{Tex Gyre Pagella}%     %\setmainfont[Ligatures=TeX]{Tex Gyre Pagella}%          \usepackage{mhchem}          \begin{document}     Chemical formula: \ce{Al2O3}     \end{document}      which produces ![text figure example](http://i.stack.imgur.com/aIhQN.png) but the desired output is (and as far as I am concerned should be) ![desired chemical formula](http://i.stack.imgur.com/o5gCg.png)


title: why are math fonts (traditionally) italic/slant? and Greek non-italic?

text: why is it usually the case that mathfont = italic/slant? [in my post, I am not distinguishing between slant and italic. I believe the two can be different, but let's not distract from my real question, here.] what is this convention based on? did Knuth originate it, or does it have a longer history? what are the views about this today? we are struggling with this. should all/most numbers be typeset as math, then? "when you subtract 13 from $x$ you get $x-13$." here, the solo-number 13 should presumably also be in math-mode, too. (the same should then be for all percentages, dollar amounts, etc.) but then, we often have many cells of regression output in tabulars. should it all be set as math, too? worse, I have seen output in which math-mode digits were italic, too (font limitations?); and some in which the math-mode digits were non-italic. having all-italic is weird in a big tabular that displays regression output. but, then again, if I do not use italic in the tabular, then we get inconsistent treatment of numbers in text vs number in regressions. so, let's say I want to dispense with slant for math. I prefer to use mathastext.sty . (this is not available in mathjax, so we probably have to wrap \text{} around all symbols, which we can do with a program.) but what about mixing greek and latin characters? are greek characters in math themselves more "italic/slant", designed to look well with italic latin, are they neutral (the italic does not apply...but, then, there is a slant, e.g., in some tex-gyre), or how can I choose "non-slant-italic" greek in TeX. advice appreciated. /iaw


title: What is the difference between \dfrac and \frac?

text: The title says it all, both `\dfrac{a}{b}` and `\frac{a}{b}` make fractions, so what is the difference between the two?


title: \index command doesn't work in a simple newcommand

text: When I write the following code, it works.               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amssymb}     \usepackage{makeidx}     \makeindex     \newcommand{\p}{\raisebox{2pt}{$\mathfrak{p}$}}          \begin{document}          $\p(E)$\index{$\p(E)$}          \printindex     \end{document}      But what I need is this:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amssymb}     \usepackage{makeidx}     \makeindex     \newcommand{\p}{\raisebox{2pt}{$\mathfrak{p}$}}          \newcommand{\idxx}[1]{$#1$\index{$#1$}}          \begin{document}          \idxx{\p(E)}          \printindex     \end{document}      But it fails. Why? How can I fix it?


title: Hightlight specfic digits within siunix's \num

text: I would like to highlight specific digits in a number. Since the number is large I would like to use `\num{}` from the `siunitx` package. Of course I can do it manually as in the MWE below, but was hoping that there might be an easy way to use the commented out syntax to accomplish this: ![enter image description here](http://i.stack.imgur.com/oNRYE.png) ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{siunitx}          \newcommand*{\Color}[2][red]{\textcolor{#1}{#2}}%          \begin{document}          \num{99 976}          88\,9\Color{76} %\num{88 9\Color{76}}          77\,\Color{976} %\num{77 \Color{976}}          \end{document}


title: how use Adobe Times Roman SmallCaps with LaTeX

text: I'm running TeXLive 2011 under Mac OS X and have How do I go about installing and using the actual Adobe Type 1 (`.pfb`) Times Roman SC (small caps) and Times Roman Bold SC fonts? I have those Type 1 files. (Does `mathptmx` or some other package already include the needed .`tfm`'s? Where would I find the .map file to add? Anything else to do?) **Update: progress so far.** Following `fontinstallationguide.pdf`, I did the following: (1) Renamed the Adobe-distributed `tirsc___.*` to `ptmrc8a.*`, and `tibsc___.*` to `ptmbc8a.*`, where `*` is `pbf`, `pfa`, `pfm`, or `arm`. (2) Create `.fd`, `.pl`, and `.vpl` files by TeXing the driver file:               % ptm-drv.tex        \input fontinst.sty     \needsfontinstversion{1.926}     \recordtransforms{ptm-rec.tex}     \latinfamily{ptm}{}     \endrecordtransforms     \bye      (3) Compile the `.tmf` and `.vpl` files by using `pltoft` and `vptovf`. (4) Did _not_ yet copy the created files into my local texmf tree (`~/Library/texmf`). **Problem:** There are overlaps already between system versions of some of these files and the newly-generated versions that would go into the local tree. For example, consider `t1ptm.fd`:   * The local version includes entries `\DeclareFontShape{T1}{ptm}{m}{sc}{<-> ptmrc8t}{}` and `\DeclareFontShape{T1}{ptm}{b}{sc}{<-> ptmbc8t}{}` which already appear in the system version.   * The local version includes entry `\DeclareFontShape{T1}{ptm}{bx}{sc}{<->ssub * ptm/b/sc}{}` which does _not_ appear in the system version. So what will happen when a LaTeX document is processed that calls for the Times-Roman SC font? Will the local `.fd` override the system `.fd`? (If so, then the additional, essential, entries such as `\DeclareFontShape{T1}{ptm}{m}{n}{<-> ptmr8t}{}`in the system version won't be read!) Or, will the entries in both the local version and system version be processed? Will this create any conflicts? If so, how resolve?


title: Hyperlink's bad navigation of sub-figures on click

text: I am using `hyperref` package to have hyperlinks automatically generated for figures, equations, table of contents, etc... My problem is if I have a big figure consisting of sub-figures and then have a mark somewhere in the text citing one of the sub-figures (example shown below), if I click on the hyperlink generated in pdf, the file navigates to the top of the caption of the sub-figure and not to the top of the sub-figure itself. It only happens with sub-figures. For whole figures, equation and sections/chapters, the file navigates correctly to the top of the figure, equation, etc... It's not the picture type problem as well, I tried different ones. I don't know if it's meant to be so or there's something wrong that I did. This is the example code:               \begin{figure}         \begin{center}             \subfigure[Sub-figure 1]                 {\label{fig:subfig1}\includegraphics[width=0.45\textwidth]{subfig1}}             \subfigure[Sub-figure 2]                 {\label{fig:subfig2}\includegraphics[width=0.45\textwidth]{subfig2}}         \end{center}         \caption{Two sub-figures}         \label{fig:sub-figures}     \end{figure}          Lorem ipsum turum bulum \ref{fig:subfig2} culum      Just to make it clear. This is what I would like to see after I click the link from the top edge of the pdf.               ------------------------    ------------------------     |                      |    |                      |     |                      |    |                      |     |        PICTURE 1     |    |        PICTURE 2     |     |                      |    |                      |     |                      |    |                      |     ------------------------    ------------------------     Figure 1a: Sub-figure 1     Figure 1b: Sub-figure 2      But instead, I'm getting this:               Figure 1a: Sub-figure 1     Figure 1b: Sub-figure 2      Many thanks for help.


title: Unexpected tikz/counter behaviour

text: What I've been trying to do, futilely, is to use the `foreach[counter=\xi] x in {1,2,3}` statement in tikz/pgf with LaTeX. This fails, every time. Whatever. So I moved on to trying to use a counter, surely that would work. Here's a MWE that fails unexpectedly.               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \newcommand{\test}[1]{     \newcounter{i}     \setcounter{i}{0}     \foreach \x in #1     {     \draw (0,\i) -- (1,0);     \setcounter{i}{\i+1}     }     }          \begin{tikzpicture}     \test{{1,2,3}}     \end{tikzpicture}     \end{document}      This code, at least for me, produces ![alt text](http://i.stack.imgur.com/R0UZQ.png) Can anyone explain why? How I would fix this, or how I could actually get `foreach[counter=\xi]` to work without returning an `\inaccessible` exception upon compilation in pdfLaTeX


title: Correct libertine glyphs in math mode

text: When using the `libertine` package together with `newtxmath` and `pdflatex`, the equality and minus glyphs in math mode are not taken from the libertine font which results in too large symbols compared to other symbols like the "plus" operator, which is correctly taken from the libertine font. Furthermore, in math mode, the wrong glyphs are of a totally different shape (straight caps instead of round caps like the "plus" sign). **Minimal working example:**               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{libertine}     \usepackage[libertine]{newtxmath}          \begin{document}\noindent       Text: a = b + c \textminus{} d \\       Math: $a = b + c - d$     \end{document}      ![text vs. math mode](http://i.stack.imgur.com/GTWg7.png) Text mode uses (of course) correct glyphs, math mode does not. _Edit: Please note that in the above example I provide the formula in text mode only in order to demonstrate that the correct glyphs are available in the libertine font. Of course, I always use math mode for writing equations, etc._ Is this behavior a bug in the `newtxmath` package or is it supposed to work like that? Is there a possibility to change individual glyphs (like = and –)?


title: Drawing paths with TikZ from a DB with DataTool

text: I have written this code and it works:               ...     \DTLsetseparator{;}     \DTLloaddb[noheader]{DBcurva}{Curvas.csv}     \begin{tikzpicture}     \foreach \columna in {1,3,...,\DTLcolumncount{DBcurva}}{     \edef\listaPuntos{}         \pgfmathtruncatemacro{\columnasig}{1+\columna}          \foreach \fila in {1,2,...,\DTLrowcount{DBcurva}}         {           \DTLgetvalue{\cX}{DBcurva}{\fila}{\columna}           \DTLgetvalue{\cY}{DBcurva}{\fila}{\columnasig}           \xdef\listaPuntos{(\cX,\cY) -- \listaPuntos}         }         \draw \listaPuntos cycle;       }     \end{tikzpicture}     ...      This reads a CSV file called "Curvas.csv". The columns are coordinates of points on curves (X1,Y1,X2,Y2,X3,Y3,X4,Y4..). The code draws all the curves in the file (initially I don't know how many there are) without problems. Is there a better way (I can't separate each curve in different files)?


title: Alternative to \mathcal and \mathscr

text: Does anyone know of the font that will produce the capital letter "O" as follows?: ![wanted capital letter "O"](http://i.stack.imgur.com/QUrcV.png) It is just slightly different from the "O" made with `\mathcal` and `\mathscr`.


title: Linux Libertine O bold font combines characters

text: I'm typing Turkish text using Linux Libertine O boldface. Everything is OK in FreeSerif and Libertine non bold fonts, but it's messed up in Libertine when using `\textbf`. It seems similar to Problem with character placement (XeLaTeX, Linux Libertine and Unicode) Can somebody confirm if this is similar or that I am doing something wrong. Here is a MWE.               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8          \documentclass{scrbook}     \usepackage{fontspec}     \begin{document}          \setmainfont[Mapping=tex-text]{FreeSerif}     freeserif          n’ n' m’ m' sanʼatlarımızda çinʼde sanʼatı          \textbf{textbf n’ n' m’ m' sanʼatlarımızda çinʼde sanʼatı}          \setmainfont[Mapping=tex-text]{Linux Libertine O}     Linux Libertine O          n’ n' m’ m' sanʼatlarımızda çinʼde sanʼatı          \textbf{textbf n’ n' m’ m' sanʼatlarımızda çinʼde sanʼatı}     \end{document}


title: package arabxetex produces only blank pages

text: I've installed the arabxetex package, but whenever I run `xelatex example.tex` the resulting dvi is blank (i.e., `xdvi example.dvi` displays a blank page). The log file has lines:               Package fontspec Info: Could not resolve font Ouhod/B (it might not exist) on i     nput line 15.     Package fontspec Info: Could not resolve font Ouhod/I (it might not exist) on i     nput line 15.     Package fontspec Info: Could not resolve font Ouhod/BI (it might not exist) on      input line 15.      It doesn't matter what font I use, I get the same result. Any ideas? Thanks. Update: sample file (actually one of the examples that came with the arabxetex package):               \documentclass{article}          %\usepackage{fontspec}          \usepackage{arabxetex} % default options are "novoc" and "fdf2alif",           % other options are "voc", "fullvoc", "utf", "trans" and "fdf2noalif"     % arabxetex loads bidi.sty and fontspec.sty                      %\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Ouhud}     % you can also define \farsifont, \uighurfont, etc if you want     %\usepackage{arabxetex}     \begin{document}     This is some text in     English with Arabic insertion     \textarab{\`arabI}.          This is some text in English with     Arabic insertion \textarab[utf]{عربي}.          This is some text in English with     Arabic insertion     \textarab[voc]{\`arabI}.          \begin{arab} wa-ha_dihi fiqraT"uN     bi-al-\`arabiyaT ma\`a kalimaT     inklIziyaT (\textLR{English}).     \end{arab}          \begin{arab}[utf] وهذه فقرةٌ بالعربيةمع كلمة انكليزية (\textLR{English}).     \end{arab}          \begin{arab}[novoc] وَهَذِهِ فِقرَةٌ      بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة (\textLR{English}).     \end{arab}     \end{document}      If I uncomment the line `\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Ouhud}` it doesn't work. That line was uncommented in the original example file; commenting it out causes the package to complain and use a default font.


title: On Ubuntu 10.10 with texlive-full installed, xelatex is rotating my figures 90 degrees counterclockwise

text: I am using the latest ubuntu with the texlive-full package. When I do a simple `\includegraphics` like this:               \begin{figure}[h]       \centering         \rotatebox{-90}{\includegraphics[width=8cm]{problem1}}       \label{fig:prob1}     \end{figure}      if I don't include the `\rotatebox` command, my figures are rotated 90 deg. counterclockwise. Additionally, I get this warning:               ** WARNING ** << /Rotate 90 >> found. (Not supported yet)      when rendering using XeLaTeX. It seems like I have the same problem as this bloke: http://www.mail- archive.com/xetex@tug.org/msg01532.html Is there a fix? This does not happen on my other (older) Ubuntu.


title: How to put a margin in a page?

text: Today I am willing to know how to put a border in a page?               \documentclass[10pt, twoside]{book}     \usepackage{amsmath,amsfonts,amssymb}     \setlength{\topmargin}{-.3in}       \setlength{\headsep}{0in}          \setlength{\textheight}{10.2in}        \setlength{\textwidth}{7in}     \setlength{\oddsidemargin}{-.3in}         \setlength{\evensidemargin}{-.3in}       \setlength{\topskip}{.2in}                    \begin{document}     Text text text. Text text text text. Text text text text. Text text text. \\     Text text text text. Text text text text. Text text text. Text text text text. Text      text text text. Text text text. Text text text text. Text text text text. Text text      text. Text text text text. Text text text text. Text text text. Text text text text.      Text text text text. Text text text. Text text text text. Text text text text. Text      text text. Text text text text. Text text text text. Text text text. Text text text      text. Text text text text. Text text text. Text text text text. Text text text text.      Text text text. Text text text text. Text text text text. Text text text. Text text      text text. Text text text text. Text text text. Text text text text. Text text text           text. Text text text. Text text text text. Text text text text. Text text text. Text      text text text. Text text text text. Text text text. Text text text text. Text text      text text. Text text text. Text text text text. Text text text text. Text text text.      Text text text text. Text text text text. Text text text. Text text text text. Text      text text text. Text text text. Text text text text. Text text text text. Text text      text. Text text text text. Text text text text. Text text text. Text text text text.      Text text text text. Text text text. Text text text text. Text text text text. Text      text text. Text text text text. Text text text text. Text text text. Text text text                text. Text text text text. Text text text. Text text text text. Text text text text.      Text text text. Text text text text. Text text text text. Text text text. Text text       text text. Text text text text. Text text text. Text text text text. Text text text      text. Text text text. Text text text text. Text text text text. Text text text. Text      text text text. Text text text text. Text text text. Text text text text. Text text      text text. Text text text. Text text text text. Text text text text. Text text text.      Text text text text. Text text text text. Text text text. Text text text text. Text                text text text. Text text text. Text text text text. Text text text text. Text text      text. Text text text text. Text text text text. Text text text. Text text text text.      Text text text text.                \end{document}      How to put a border around the page? Also this should be in all other pages too. Kindly help me, Thank you in advance


title: How to add spellcheck dictionaries to Kile without being the root?

text: I am needing to add the spanish dictionary to spellcheck in Kile, but I am not the root, then the installation using synaptic is not an option. I am using ubuntu 12.04 and the Aspell program that is implemented by defeault in this distribution. I downloaded the spanish dictionary for aspell (aspell-es) from http://ftp.gnu.org/gnu/aspell/dict/es/ and I installed it in my home folder. But now, how I can link Kile with this aspell-es installed in my home folder?


title: How to use command \LaTeX{} in .bib like in .tex?

text: My .bib file contains this:               @article{shell2002use,           title={How to Use the IEEEtran LaTeX Class},           author={Shell, Michael},           journal={Journal of LATEX Class Files},           volume={1},           number={11},           pages={10--20},           year={2002}       }         and I get this:               [1] M. Shell, “How to use the ieeetran class,” Journal of LATEX Class Files, vol. 1, no. 11, pp. 10–20, 2002.       How to get the effect like use `\LaTeX{}` in `.tex` file?


title: Avoid line break between em-dash and the next word

text: I'm writing a text in spanish, and I have a phrase wrote between em-dashes (that work like parentheses). The problem is that if the "opening" em-dash is too near the end of the line, then it may happen that it remains in that line but the next word falls to the next:               Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam a leo quis      libero ---accumsan vulputate---. Praesent pretium dapibus est interdum      hendrerit.      ![bad result](http://i.stack.imgur.com/SK7i2.png) What I need to get in this example, is the opening em-dash and its next word to be in the same line, like this: ![good result](http://i.stack.imgur.com/uin0W.png) where I had to use               \mbox{---accumsan}      Is there a simple way to make LaTex not to break the opening em-dash with its next word, and also the ending em-dash with its previous word?


title: How to draw curved paths

text: I'm trying to do this picture : ![](http://i.stack.imgur.com/zHyDp.gif) I have a problem to draw the curved paths. **MWE**               \documentclass[scale=0.5,border=12pt]{standalone}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{tkz-euclide}     \usepackage{lmodern}     \usetkzobj{all}      \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,backgrounds}          \usepackage{hyperref}          \tikzset{        b/.style={            draw,            rectangle,            rounded corners=2ex,            minimum height=0.2cm,            minimum width=1in,            align=center,            font=\small},        c/.style={           draw,           rectangle,           rounded corners=2ex,           minimum height=0.5in,           minimum width=2in,           align=center,           rotate=-90,           font=\large},        ar/.style={           rounded corners=2ex,           ->,           >=latex},          myarrow/.style args={#1 colored by #2 and #3}{           -stealth,           line width=#1,           #2,           postaction={draw,-stealth,#3,line width=(#1)/3,           shorten <=(#1)/3,           shorten >=2*(#1)/3},            },        toptext/.style={    % <-- New           above,           text width=6cm,           align=center,           font=\large}     }          \begin{document}     \begin{tikzpicture}      \node (string) [b] {string};     \node (number) [b, below=0.3 cm of string] {number};     \node (object) [b, below=0.3 cm of number] {object};     \node (array) [b, below=0.3 cm of object] {array};     \node (true) [b, below=0.3 cm of array] {true};     \node (false) [b, below=0.3 cm of true] {false};     \node (null) [b, below=0.3 cm of false] {null};          \draw  (string.west) -- ++(-70pt,0pt);     \draw  (string.east) -- ++(70pt,0pt);          \end{tikzpicture}          \end{document}


title: Disable autofollow hyperlinks

text: EDIT: This topic is related to a bug in my pdf reader `Foxit 4.3.1`. So the Question should be more: "How to get this `MWE` working in Foxit?" How can solve that hyperlinks are not auto followed? Klicking on `\nameref{par:SotaOtrsitsmEvalCorrDep}` jumps to `\subsection*{Bla}` but it should link to `\paragraph{\nameref{subsec:sevice_depencies}}` MWE:               \documentclass[11pt,english,ngerman,numbers=noenddot, headsepline]{scrreprt}     \usepackage[colorlinks]{hyperref}          \begin{document}          \subsection*{Bla}     \label{subsec:sevice_depencies}     \newpage     \paragraph{\nameref{subsec:sevice_depencies}}     \label{par:SotaOtrsitsmEvalCorrDep}     \newpage     \nameref{par:SotaOtrsitsmEvalCorrDep}          \end{document}      Thanks for help


title: fixed point arithmetic is all wacky now

text: Prior to `Tikz 3.0`, the use of `\usepackage{fp}\usetikzlibrary{fixedpointarithmetic}` would increase the accuracy of calculations. I haven't used these packages since the update. However, I tried them out today and the results were nonsense. **Why is`fixed point arithmetic affecting` 3 sides of my box of mass M and under estimating the arc?** Also, the vectors off the box are based on the location of the box. How can the vectors remain unchanged when the box has moved? I used `fixed point arithmetic` on calculating angles in the `\draw let` syntax.                 \draw[-stealth, fixed point arithmetic] let         \p0 = (O),         \p1 = (P1),         \p2 = (P2),         \n1 = {atan2(\y1 - \y0, \x1 - \x0)},         \n2 = {atan2(\y2 - \y0, \x2 - \x0)},         \n3 = {1cm},         \n4 = {(\n1 + \n2)/2}       in \pgfextra{\xdef\myn{\n2}} (O) +(\n1:\n3) arc[radius = \n3,       start angle = \n1, end angle = \n2] node[right, font = \tiny] at (\n4:\n3)       {$\theta$};      Without `fixed point arithmetic`, the image is: ![enter image description here](http://i.stack.imgur.com/s9j4v.png) With: ![enter image description here](http://i.stack.imgur.com/q0d9U.png) Code:               \documentclass[tikz, convert = false]{standalone}%          \usepackage{fp}     \usetikzlibrary{fixedpointarithmetic}     \usetikzlibrary{calc}     \usetikzlibrary{intersections}     \usetikzlibrary{backgrounds}          \begin{document}     \begin{tikzpicture}[line join = round, line cap = round]       \coordinate (O) at (0, 0);            \draw (O) -- +(3, 0) coordinate (P1);       \draw[name path = sline] (O) -- (3, 2) coordinate (P2);            \draw[-stealth, fixed point arithmetic] let % remove fpa for it work         \p0 = (O),         \p1 = (P1),         \p2 = (P2),         \n1 = {atan2(\y1 - \y0, \x1 - \x0)},         \n2 = {atan2(\y2 - \y0, \x2 - \x0)},         \n3 = {1cm},         \n4 = {(\n1 + \n2)/2}       in \pgfextra{\xdef\myn{\n2}} (O) +(\n1:\n3) arc[radius = \n3,       start angle = \n1, end angle = \n2] node[right, font = \tiny] at (\n4:\n3)       {$\theta$};            \path[name path = line1] (1.5, 0) -- +(0, 1.25);       \path[name path = line2] (2, 0) -- +(0, 1.5);       \path[name intersections = {of = sline and line1, by = P3}];       \path[name intersections = {of = sline and line2, by = P4}];            \draw (P3) -- ($(P3)!.25cm!-90:(O)$) coordinate (P5);       \draw (P4) -- ($(P4)!.25cm!-90:(O)$) coordinate (P6);       \draw[name path = boxtop] (P5) -- (P6) node[pos = .5, below, font = \tiny,       rotate = \myn] {$M$};            \path[name path = grav] ($(P5)!.75!(P6)$) -- +(0, -1.25);       \path[name intersections = {of = grav and sline, by = P7}];            \begin{scope}[on background layer]         \draw[-latex, blue] (P7) -- ($(P7)!.75cm!-270:(O)$) coordinate (P8)         node[pos = 1.25, font = \tiny, color = black] {$F_2$};              \path[name path = perl1] (P8) -- ($(P8)!.75cm!-270:(P7)$);         \path[name intersections = {of = perl1 and grav, by = P9}];              \draw[-latex, blue] (P7) -- (P9) node[below, font = \tiny, inner sep = .3,         color = black] {$Mg$};         \draw[blue] (P9) -- (P8);              \path[name path = norm] (P7) -- ($(P7)!.75cm!-90:(O)$);         \path[name intersections = {of = norm and boxtop, by = P10}];              \draw[-latex,blue] (P10) -- ($(P10)!.5cm!-90:(P5)$) node[pos = 1.15,         font = \tiny, rotate = {\myn}, color = black] {$N$};              \coordinate (P11) at ($(P3)!.5!(P5)$);         \coordinate (P12) at ($(P4)!.5!(P6)$);              \draw[-latex, blue] (P12) -- ++(\myn:.5) node[pos = 1.25, font = \tiny,         rotate = {\myn}, color = black] {$F_f$};         \draw[-latex, blue] (P11) -- ++({\myn + 180}:.5) node[pos = 1.25,         font = \tiny, rotate = {\myn}, color = black] {$F_1$};       \end{scope}     \end{tikzpicture}     \end{document}


title: Parsing and programming in TikZ

text: Background: I'be been reading the PGF manual (keys section) and today the TeX Book just arrived in the mail and just started reading chapter 7 (How TeX reads what you type) -- feeling like Mickey Mouse in "The Sorcerers Apprentice". I want (but this is **not** the question) to do a routine that does something like that:                  input:   a,b ; c,d ; e,f.        output:  a\nodepart{b} && c\nodepart{d} && e\nodepart{f}\\      My idea was to use the PGF parser to read the input. If I were using the languages I know (old Basic, Python, Maple script) I would save intermediary results in a variable but for what I understood so far LaTeX/TeX/ and TikZ/PGF do not work in this way. There is no string manipulation routines. I know we can store stuff into pgf keys. Before you stop reading I better ask my questions:   1. Are there any examples of (LaTeX/TeX/ and TikZ/PGF) code that reads some input of **variable lenght** possibly more than ten and spits some other code?   2. With the example above in mind, which references should I read to be able to implement the routine in an efficient way? Post-script:   1. Reading the suggested tags, I just learn about the LaTeX parse package, will check it also.   2. @egreg: The ultimate goal will be to define a bimatrix environment in TikZ to display two-player games in normal form. The idea is to create outputs similar to this http://www.maths.lse.ac.uk/Personal/stengel/bimatrixgame/example.pdf but with the **intuitive and human-like language** we see in TikZ constructs.


title: Regarding fonts in various locations of book class

text: I am using the book class. I am not interested in using Memoir. I need to be able to change the font and size of the word "Contents" which appears at the beginning of the ToC. I can do this now (demonstrated below). I also need to be able to change the font and size of the word "CONTENTS" which appears on the second page header of the ToC. I also need to be able to change the font and size of the page numbers throughout the document. Any help would be great! The below demonstrates the ability to change the table of contents font and size, but not the header for the ToC on the 2nd page of the ToC. It also does not yet address changing the font and size for the page numbers.               \documentclass{book}          \usepackage{sectsty}          \begin{document}          \chapterfont{\normalsize}          \tableofcontents          \chapter{The First Book of Moses, Called Genesis}     In the beginning God created the heaven and the earth.           \end{document}


title: tikzpicture, scope and matrix

text: I am trying to highlight a particular column in a matrix. I therefore draw the matrix (with `easybmat`) in a node and I draw the shape of the column in a scope (on the background). However, the scope is shifted right, and I do not know why. The highlight should be from (second line, first column) to (last line, first column).               \documentclass{article}      \usepackage{etex}      \usepackage{easybmat}      \usepackage[T1]{fontenc}      \usepackage{lmodern}      \usepackage{tikz}      \usetikzlibrary{backgrounds,fit}           \tikzset{%        highlight/.style={rectangle,rounded corners,fill=orange!35,draw,thick,inner sep=2pt}      }      \newcommand{\tikzmark}[2]{\tikz[remember picture,baseline=(#1.base),inner sep=0,outer sep=0pt] \node (#1) {#2};}           \begin{document}           \begin{tikzpicture}[remember picture]        \node (){          $          \left( \begin{BMAT}(r){cccccccc}{cccccccc}              a_{1\,1}^{(k)} & a_{1\,2}^{(k)} & \cdots &   &  & & \cdots &              a_{1\,n}^{(k)}   \\              \tikzmark{left}{0} & a_{2\,2}^{(k)} &  &  &  & & &              a_{2\,n}^{(k)}  \\              \vdots &    & \ddots &  &  &   &&  \vdots \\              &   \vdots  &  & a_{k-1\, k-1}^{(k)} &    & & &  \\              &  &  &  & a_{k\, k}^{(k)}  &    & &  \\              &  &  \cdots &\vdots  &   &  a_{k+1\, k+1}^{(k)}  & &  \\              & &   &   & \vdots & \vdots &\ddots &  \vdots \\              \tikzmark{right}{0} & &  &   &  &  a_{n\, k+1}^{(k)}  & &              a_{n\,n}^{(k)}  \\            \end{BMAT} \right)          $        };        \begin{scope}[on background layer]          \node[highlight,overlay,fit=(left.north west) (right.south east)] {};        \end{scope}      \end{tikzpicture}      \end{document}      ![output](http://i.stack.imgur.com/MYA6N.png)


title: Table in landscape mode

text: I would to make the `table` in landscape mode. To do that, I used `pdflscape` package. But I couldn't get the desired result. How to do that? ![enter image description here](http://i.stack.imgur.com/uqqz2.png) Here is the MWE:               \documentclass[12pt]{article}     \usepackage{xtab,caption}     \usepackage{pdflscape}     \newcommand\Lenv{\textsf}     \begin{document}     \begin{landscape}     \topcaption{The principal xtab package commands} \label{tab:xtab}     \tablefirsthead{\hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tablehead{\multicolumn{2}{c}%     {{\captionsize\bfseries \tablename\ \thetable{} --     continued from previous page}} \\     \hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tablelasthead{\multicolumn{2}{c}%     {{\captionsize\bfseries \tablename\ \thetable{} --     concluded from previous page}} \\     \hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tabletail{\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline}     \tablelasttail{\hline \hline}     \begin{center}     \begin{xtabular}{|l|p{0.5\textwidth}|}     \verb|\begin{xtabular}{...}| & This is equivalent to the normal     \verb|\begin{tabular}{...}| environment.     You supply the specification of the columns     just as for the normal \Lenv{tabular} environment.     \\     &     All commands that can be used within a \Lenv{tabular}     environment can also be used within     the \Lenv{xtabular} environment.     \\     &     Unlike the \Lenv{tabular} environment which prevents page breaking     within the tabular, the \Lenv{xtabular} allows page breaking, so that     tabulars can extend automatically across several pages.     ... ... ...\\     \verb|\tablelasttail{...}| & The contents of this command are inserted before     the final (internal) \verb|\end{tabular}| of the table.     \\     &     For example, you might want to note that this is where     the table ends.     \\     \end{xtabular}     \end{center}     \end{landscape}     \end{document}


title: Draw a vertical flow chart

text: I would like to draw a Diagram like the one in the attached picture. ![enter image description here](http://i.stack.imgur.com/LoLfj.png)


title: Asymptote takes too long to render images

text: I need to include several 3d graphics in a LaTeX document, and decided to use asymptote. However, it seems that rendering takes too long. A document with 20 images takes more than 15 minutes to finish compiling. I wonder if there is a way to tall asymptote to only draw the mesh (I suppose that would be quicker) and switch to a nicer rendering when I compile a final version of the document. I have been compiling the document with these commands:               pdflatex text.tex     asy text-*.asy     pdflatex text.tex      As an example, the following takes a long time to finish, even though I have only told asymptote to just draw the mesh.               import graph3;     import contour3;     settings.render=4;          real f(real x, real y, real z) {return (x/2)^2 + y- (z/2)^2;}          draw(surface(contour3(f,(-3,-3,-3),(3,3,3),32)),surfacepen=nullpen,meshpen=black,render(compression=Low,merge=true));          defaultrender.merge=true;     defaultrender.tessellate=true;      I'd appreciate any ideas that will make asymptote run faster, but still give a minimally reasonable result (I only need to check if the surfaces are correct, if I need to change the camera, etc).


title: Free substitute for Word2Tex on Windows

text: I work with a lot of word documents. I want to make some of these look better with LaTex, but it's almost impossible to manually extract images/equations and put them into a `.tex` file and then convert them to LaTex. I know I might be asking for too much, but is there a nice, **free** way to do convert Word documents to `.tex`? I've tried Abiword and rtf2latex2e but neither worked too well. Word2TeX is the BEST option out there (gives extremely clean, almost-perfect `.tex` code), but sadly it is not free and it goes pretty deep in the pocket. Just to clarify, I'm not looking for a way to **store** word documents in LaTex format just to make them look pretty. I genuinely want to convert a bunch of existing `.docx` files into LaTex so that my colleagues and I can maintain them in `.tex` format for future edits. Any advice would be appreciated.


title: Format numbers as a fraction of pi with tikz \pgfmathprintnumber

text: I'd like to be able to output something like `\frac{\pi}{2}` for a input number like `.5*pi` automatically. I've played a bit with some of the `number printing` macros available with tikz (closely linked to the `fpu` library, available at least in the cvs version). The idea I had is to divide the number by `pi`, then use the `number format/frac` and then add a `\pi` to the result. But it does not work as expected as rounding errors occur. Here is the result for `2*pi`, `1.5*pi` and `0.5*pi`. ![trig labels](http://i.stack.imgur.com/VDqrw.png) Here is what I did so far.               \documentclass{standalone}     \usepackage{tikz,fp}     \usetikzlibrary{fpu}     \makeatletter          % Adapted from the file /generic/pgf/math/pgfmathfloat.code.tex     \pgfkeys{%       /pgf/number format/.cd,       pi/.code = \pgfmath@set@number@printer{pgfmathprintnumber@pi}}          \def\pgfmathprintnumber@pi#1{%       \pgfmathparse{#1/3.141592654}       \pgfmathfloatparsenumber{\pgfmathresult}%       \pgfmathfloatgetfrac{\pgfmathresult}%       \expandafter\pgfmathprintnumber@pi@formatresult\pgfmathresult}          % Nothing really new here, just a copy of     % \pgfmathprintnumber@frac@formatresult only altered to add     % \pi to the result     \def\pgfmathprintnumber@pi@formatresult#1#2#3{%       \begingroup         \pgfkeysgetvalue{/pgf/number format/frac TeX}\pgfmathresult         \toks0=\expandafter{\pgfmathresult}%         \def\pgfmathfloat@loc@TMPa{#1}%         \ifx\pgfmathfloat@loc@TMPa\pgfutil@empty           \ifpgfmathprintnumber@showpositive             \def\pgfmathfloat@loc@TMPa{+}%           \fi         \else           \ifx\pgfmathfloat@loc@TMPa-%           \else             \ifx\pgfmathfloat@loc@TMPa+%             \else               \ifpgfmathprintnumber@showpositive                 \edef\pgfmathfloat@loc@TMPa{+\pgfmathfloat@loc@TMPa}%               \fi               \def\pgfmathfloat@loc@TMPb{%                 \pgfkeysvalueof{/pgf/number format/frac whole format/.@cmd}}%               \expandafter\pgfmathfloat@loc@TMPb\pgfmathfloat@loc@TMPa\pgfeov               \let\pgfmathfloat@loc@TMPa=\pgfmathresult             \fi           \fi         \fi         \toks1=\expandafter{\pgfmathfloat@loc@TMPa}%         \edef\pgfmathresult{%           \the\toks1 \ifnum#2=0 \else\the\toks0 {#2}{#3}\fi \pi}%         \pgfmath@smuggleone\pgfmathresult       \endgroup     }          \begin{document}          \pgfkeys{/pgf/number format/pi}          \pgfmathprintnumber{2*pi}          \pgfmathprintnumber{1.5*pi}          \pgfmathprintnumber{0.25*pi}          \end{document}


title: biblatex: split bibliography at the begin of a document?

text: I'm trying to print partial bibliographies at the start of a document. One of the things I tried is this:               \documentclass{book}     \usepackage[utf8]{inputenc}     \usepackage[defernumbers]{biblatex}     \addbibresource{biblatex-examples.bib}     \begin{document}          \printbibliography[segment=1,sorting=none,resetnumbers]     \printbibliography[segment=2,sorting=none,resetnumbers]          \newrefsegment     \cite{angenendt} \cite{baez/article} \cite{doody}          \newrefsegment     \cite{gillies} \cite{doody} \cite{angenendt} \cite{baez/article}          \end{document}      But this gives errors:               ! Package biblatex Error: Segment '1' not found in section '0'.      refsection doesn't work either. Is this a bug or simply not meant to work?


title: Tikz - Drawing Shift Arrow

text: I am trying to draw a shift arrow from one point to the next, but it doesn't seem to work. Here is my code:               \begin{tikzpicture}     %Axis     \draw [<->] (0,5) node (yaxis) [left] {$P$} -- (0,0) node[below left] {(0,0)} -- (5,0) node (xaxis) [below] {$B$};     %Title     \draw (3,5) node[above, xshift=-10] {Corporate Bonds};     %Supply     \draw[->, red] (1,1) coordinate (s_1) -- (4,4) coordinate (s_2) node[above right] {$B^{s}$};     %Demand     \draw[->, blue] (1,4) coordinate (d_1) -- (4,1) coordinate (d_2) node[below right] {$B^{d}$};     %Save Intersection (equilibrium)     \coordinate (c) at (intersection of s_1--s_2 and d_1--d_2);     %Intersection (equilibrium)     \draw[dashed] (yaxis |- c) node[left] {$P^e$} -| (xaxis -| c) node[below] {$B^e$};     \fill[black] (c) circle (2pt);     %Demand After     \draw[->, blue, xshift=20, yshift=20] (1,4) coordinate (d_1) -- (4,1) coordinate (d_2) node[below right] {$B^{d'}$};     %Save Intersection (after equilibrium)     \coordinate (d) at (intersection of s_1--s_2 and d_1--d_2);     %Intersection (after equilibrium)     \draw[dashed] (yaxis |- d) node[left] {$P'$} -| (xaxis -| d) node[below] {$B'$};     \fill[black] (d) circle (2pt);     \draw[->, xshift=20, yshift=20] (c) -- (d); // <-- this is the arrow part I want to do     \end{tikzpicture}      Here is the picture: ![enter image description here](http://i.stack.imgur.com/JhP7n.jpg) I have the arrows pointing the right directions, but I want the arrows to shift away from the two intersection points so that the reader can see it better. However, when I use « xshift » or « yshift », it doesn't even shift the arrows at all; the arrows simply stay put where they are.


title: ConTeXt figure placement

text: For years I've used a LaTeX macro that allowed me to embed figures into my text with relatively little fuss. I could type something like:               A typological comparison (see Figure \Fig[Caption text]{file.png}) suggests that...      The output would render the figure number in situ and place the actual image somewhere nearby, depending on its size and available page space. I have been trying to create something similar in ConTeXt, but so far no luck. I assume I should be able to do this with some combination of \placefigure and \in. This command...               \def\Fig[#1]#2{%         %\startpostponing[+0]%         \startplacefigure[reference=fig:#2,title=#1]%             %\dontleavehmode%             \externalfigure[#2]%         \stopplacefigure%         %\stoppostponing%         \in{Figure}[fig:#2]%     }      ...is close, but it forces a linebreak that disrupts the paragraph. I've tried using \dontleavehmode, as per the suggestion in the FAQ, but that doesn't fix the problem. I've also tried wrapping the placefigure command in postpoining[+0] tags, as advised in this question, but that causes the parser to abort and wait for input. ConTeXt doesn't tell me why it aborts, but I would guess that it's not able to resolve the \in command when the figure placement is postponed. Any suggestions?


title: Table of contents: section titles ragged right

text: In the standard `book` class, if there are very long section titles, `\tableofcontents` tries to produce justified text. How can I produce a table of contents so that the section titles are typeset flush left, ragged right? That is, I would like to produce something like this (note that the page numbers should be aligned):               1.2.2  Short title  . . . . . 42     1.2.3  Long section title            can be wrapped . . . . 44     1.2.4  Another short title  . 45      (The default output is almost identical, except that Latex uses hyphenation and variable inter-word spacing to make sure that the right margins are aligned for all multi-line section titles.) I assumed that I could easily use the `titletoc` package—just re-define the toc entries and add `\raggedright` somewhere. However, none of my attempts were successful.


title: My glossary won't print

text: I'm having trouble for 2 days printing a glossary (using glossaries package). I tried on TexLive and TexMaker. I followed this documentation/tutorial to understand how to use glossaries package Here is my test source code to print a glossary:               \documentclass[a4paper]{report}     \usepackage{glossaries}     \makeglossaries     \begin{document}         \newglossaryentry{computer} {             name=computer,             description={is a programmable machine that receives input,                stores and manipulates data, and provides                output in a useful format}         }         \gls{computer}         \printglossaries     \end{document}      To make the glossary I read that I had to make a custom user command in TexMaker: > makeglossaries % ![enter image description here](http://i.stack.imgur.com/DEfds.png) Si I build with PDFLatex, it builds without any error, then run the custom command but I got this error: > Process started > > Process exited with error(s) Additionnal information: > The compilation created .aux, .glo, .glsdefs, .ist, .log, .pdf, .synctex, > .tex files > > Perl installed > > TexMaker 4.2 I'm kind of stuck here, I've no idea what to do. Thank you **Edit n°3:** when typing > makeglossaries testGlossaire In a prompt, I got this error message: > C:\texlive\2013\bin\win32\runscript.tlu:671: > C:\texlive\2013\bin\win32\runscript.tlu:641: program not found (not part of > TeX Live): cmd So I looked at runscript.tlu and found the function which returned this message:               -- checks if command exists on the path and returns its full path     local function check_command(cmdlist, PATH)       for cmd in string.gmatch(cmdlist, '%S+') do         local cmdext = cmd..(string.find(cmd, '%.[^\\/.]*$') and '' or '.exe')         local fullcmd = search_path(cmdext, PATH)         if fullcmd then            return fullcmd, cmd         end       end       return nil, 'program not found (not part of TeX Live): '..cmdlist     end      **Edit n°2:** added an image to show the custom command **Edit n°1:** the full log (content of the .log file): > ! This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX) > (format=pdflatex 2014.6.6) 10 JUN 2014 10:53 ! entering extended mode ! > restricted \write18 enabled. ! %&-line parsing enabled. ! > **testGlossaire.tex ! (./testGlossaire.tex ! LaTeX2e <2011/06/27> ! Babel > <3.9k> and hyphenation patterns for 78 languages loaded. ! > (c:/texlive/2013/texmf-dist/tex/latex/base/report.cls ! Document Class: > report 2007/10/19 v1.4h Standard LaTeX document class ! > (c:/texlive/2013/texmf-dist/tex/latex/base/size10.clo ! File: size10.clo > 2007/10/19 v1.4h Standard LaTeX file (size option) ! ) ! \c@part=\count79 ! > \c@chapter=\count80 ! \c@section=\count81 ! \c@subsection=\count82 ! > \c@subsubsection=\count83 ! \c@paragraph=\count84 ! \c@subparagraph=\count85 > ! \c@figure=\count86 ! \c@table=\count87 ! \abovecaptionskip=\skip41 ! > \belowcaptionskip=\skip42 ! \bibindent=\dimen102 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/glossaries/base/glossaries.sty ! > Package: glossaries 2014/04/04 v4.07 (NLCT) ! ! (c:/texlive/2013/texmf- > dist/tex/latex/base/ifthen.sty ! Package: ifthen 2001/05/26 v1.1c Standard > LaTeX ifthen package (DPC) ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/xkeyval/xkeyval.sty ! Package: xkeyval 2012/10/14 v2.6b > package option processing (HA) ! ! (c:/texlive/2013/texmf- > dist/tex/generic/xkeyval/xkeyval.tex ! \XKV@toks=\toks14 ! > \XKV@tempa@toks=\toks15 ! \XKV@depth=\count88 ! File: xkeyval.tex 2012/10/14 > v2.6b key=value parser (HA) ! ! (c:/texlive/2013/texmf- > dist/tex/generic/xkeyval/keyval.tex))) ! (c:/texlive/2013/texmf- > dist/tex/latex/glossaries/base/mfirstuc.sty ! Package: mfirstuc 2013/11/04 > v1.08 (NLCT) ! ! (c:/texlive/2013/texmf-dist/tex/latex/etoolbox/etoolbox.sty > ! Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX ! ! > (c:/texlive/2013/texmf-dist/tex/latex/etex-pkg/etex.sty ! Package: etex > 1998/03/26 v2.0 eTeX basic definition package (PEB) ! \et@xins=\count89 ! ) > ! \etb@tempcnta=\count90 ! ) ! \@glsmfirst=\toks16 ! \@glsmrest=\toks17 ! ) > ! (c:/texlive/2013/texmf-dist/tex/latex/textcase/textcase.sty ! Package: > textcase 2004/10/07 v0.07 Text only upper/lower case changing (DPC) ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/xfor/xfor.sty ! Package: xfor > 2009/02/05 v1.05 (NLCT) ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/datatool/datatool-base.sty ! Package: datatool-base > 2013/09/06 v2.18 (NLCT) ! ! (c:/texlive/2013/texmf- > dist/tex/latex/amsmath/amsmath.sty ! Package: amsmath 2013/01/14 v2.14 AMS > math features ! \@mathmargin=\skip43 ! ! For additional information on > amsmath, use the '?' option. ! (c:/texlive/2013/texmf- > dist/tex/latex/amsmath/amstext.sty ! Package: amstext 2000/06/29 v2.01 ! ! > (c:/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty ! File: amsgen.sty > 1999/11/30 v2.0 ! \@emptytoks=\toks18 ! \ex@=\dimen103 ! )) ! > (c:/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty ! Package: amsbsy > 1999/11/29 v1.2d ! \pmbraise@=\dimen104 ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/amsmath/amsopn.sty ! Package: amsopn 1999/12/14 v2.01 > operator names ! ) ! \inf@bad=\count91 ! LaTeX Info: Redefining \frac on > input line 210. ! \uproot@=\count92 ! \leftroot@=\count93 ! LaTeX Info: > Redefining \overline on input line 306. ! \classnum@=\count94 ! > \DOTSCASE@=\count95 ! LaTeX Info: Redefining \ldots on input line 378. ! > LaTeX Info: Redefining \dots on input line 381. ! LaTeX Info: Redefining > \cdots on input line 466. ! \Mathstrutbox@=\box26 ! \strutbox@=\box27 ! > \big@size=\dimen105 ! LaTeX Font Info: Redeclaring font encoding OML on > input line 566. ! LaTeX Font Info: Redeclaring font encoding OMS on input > line 567. ! \macc@depth=\count96 ! \c@MaxMatrixCols=\count97 ! > \dotsspace@=\muskip10 ! \c@parentequation=\count98 ! \dspbrk@lvl=\count99 ! > \tag@help=\toks19 ! \row@=\count100 ! \column@=\count101 ! > \maxfields@=\count102 ! \andhelp@=\toks20 ! \eqnshift@=\dimen106 ! > \alignsep@=\dimen107 ! \tagshift@=\dimen108 ! \tagwidth@=\dimen109 ! > \totwidth@=\dimen110 ! \lineht@=\dimen111 ! \@envbody=\toks21 ! > \multlinegap=\skip44 ! \multlinetaggap=\skip45 ! \mathdisplay@stack=\toks22 > ! LaTeX Info: Redefining [ on input line 2665. ! LaTeX Info: Redefining ] on > input line 2666. ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/substr/substr.sty ! Package: substr 2009/10/20 v1.2 Handle > substrings ! \c@su@anzahl=\count103 ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/datatool/datatool-fp.sty ! Package: datatool-fp 2013/08/29 > v2.17 (NLCT) ! ! (c:/texlive/2013/texmf-dist/tex/latex/fp/fp.sty ! Package: > fp 1995/04/02 ! ! 'Fixed Point Package', Version 0.8, April 2, 1995 (C) > Michael Mehlich ! (c:/texlive/2013/texmf-dist/tex/latex/fp/defpattern.sty ! > Package: defpattern 1994/10/12 ! \actioncount=\count104 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-basic.sty ! Package: fp-basic > 1996/05/13 ! \FP@xs=\count105 ! \FP@xia=\count106 ! \FP@xib=\count107 ! > \FP@xfa=\count108 ! \FP@xfb=\count109 ! \FP@rega=\count110 ! > \FP@regb=\count111 ! \FP@regs=\count112 ! \FP@times=\count113 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-addons.sty ! Package: fp-addons > 1995/03/15 ! ) ! (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-snap.sty ! > Package: fp-snap 1995/04/05 ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/fp/fp-exp.sty ! Package: fp-exp 1995/04/03 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-trigo.sty ! Package: fp-trigo > 1995/04/14 ! ) ! (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-pas.sty ! > Package: fp-pas 1994/08/29 ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/fp/fp-random.sty ! Package: fp-random 1995/02/23 ! > \FPseed=\count114 ! ) ! (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-eqn.sty > ! Package: fp-eqn 1995/04/03 ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/fp/fp-upn.sty ! Package: fp-upn 1996/10/21 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/fp/fp-eval.sty ! Package: fp-eval > 1995/04/03 ! ))) ! \@dtl@toks=\toks23 ! \@dtl@tmpcount=\count115 ! > \dtl@tmplength=\skip46 ! \dtl@sortresult=\count116 ! > \@dtl@numgrpsepcount=\count117 ! \@dtl@datatype=\count118 ! > \dtl@codeA=\count119 ! \dtl@codeB=\count120 ! \@dtl@foreach@level=\count121 > ! ) ! (c:/texlive/2013/texmf-dist/tex/latex/glossaries/base/glossaries- > compatible-307 ! .sty ! Package: glossaries-compatible-307 2013/11/14 v4.0 > (NLCT) ! ) ! \gls@level=\count122 ! \@gls@tmpb=\toks24 ! \gls@tmplen=\skip47 > ! \glskeylisttok=\toks25 ! \glslabeltok=\toks26 ! \glsshorttok=\toks27 ! > \glslongtok=\toks28 ! ! (c:/texlive/2013/texmf- > dist/tex/latex/glossaries/styles/glossary-hypernav.sty ! Package: glossary- > hypernav 2013/11/14 v4.0 (NLCT) ! ) ! (c:/texlive/2013/texmf- > dist/tex/latex/glossaries/styles/glossary-list.sty ! Package: glossary-list > 2013/11/14 v4.0 (NLCT) ! \glslistdottedwidth=\skip48 ! ) ! > (c:/texlive/2013/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty ! > Package: glossary-long 2013/11/14 v4.0 (NLCT) ! ! (c:/texlive/2013/texmf- > dist/tex/latex/tools/longtable.sty ! Package: longtable 2004/02/01 v4.11 > Multi-page Table package (DPC) ! \LTleft=\skip49 ! \LTright=\skip50 ! > \LTpre=\skip51 ! \LTpost=\skip52 ! \LTchunksize=\count123 ! > \LTcapwidth=\dimen112 ! \LT@head=\box28 ! \LT@firsthead=\box29 ! > \LT@foot=\box30 ! \LT@lastfoot=\box31 ! \LT@cols=\count124 ! > \LT@rows=\count125 ! \c@LT@tables=\count126 ! \c@LT@chunks=\count127 ! > \LT@p@ftn=\toks29 ! ) ! \glsdescwidth=\skip53 ! \glspagelistwidth=\skip54 ! > ) ! (c:/texlive/2013/texmf-dist/tex/latex/glossaries/styles/glossary- > super.sty ! Package: glossary-super 2013/11/14 v4.0 (NLCT) ! ! > (c:/texlive/2013/texmf-dist/tex/latex/supertabular/supertabular.sty ! > Package: supertabular 2004/02/20 v4.1e the supertabular environment ! > \c@tracingst=\count128 ! \ST@wd=\dimen113 ! \ST@rightskip=\skip55 ! > \ST@leftskip=\skip56 ! \ST@parfillskip=\skip57 ! \ST@pageleft=\dimen114 ! > \ST@headht=\dimen115 ! \ST@tailht=\dimen116 ! \ST@pagesofar=\dimen117 ! > \ST@pboxht=\dimen118 ! \ST@lineht=\dimen119 ! \ST@stretchht=\dimen120 ! > \ST@prevht=\dimen121 ! \ST@toadd=\dimen122 ! \ST@dimen=\dimen123 ! > \ST@pbox=\box32 ! )) ! (c:/texlive/2013/texmf- > dist/tex/latex/glossaries/styles/glossary-tree.sty ! Package: glossary-tree > 2014/03/06 v4.04 (NLCT) ! \glstreeindent=\skip58 ! )) ! \glswrite=\write3 ! > \glo@main@file=\write4 ! \openout4 = 'testGlossaire.glo'. ! ! Package > glossaries Info: Writing glossary file testGlossaire.glo on input line ! 9. > ! ! (./testGlossaire.aux) ! \openout1 = 'testGlossaire.aux'. ! ! LaTeX Font > Info: Checking defaults for OML/cmm/m/it on input line 11. ! LaTeX Font > Info: ... okay on input line 11. ! LaTeX Font Info: Checking defaults for > T1/cmr/m/n on input line 11. ! LaTeX Font Info: ... okay on input line 11. ! > LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11. ! LaTeX > Font Info: ... okay on input line 11. ! LaTeX Font Info: Checking defaults > for OMS/cmsy/m/n on input line 11. ! LaTeX Font Info: ... okay on input line > 11. ! LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11. > ! LaTeX Font Info: ... okay on input line 11. ! LaTeX Font Info: Checking > defaults for U/cmr/m/n on input line 11. ! LaTeX Font Info: ... okay on > input line 11. ! (./testGlossaire.glsdefs) ! No file testGlossaire.gls. ! [1 > ! ! \openout3 = 'testGlossaire.ist'. ! ! {c:/texlive/2013/texmf- > var/fonts/map/pdftex/updmap/pdftex.map}] ! (./testGlossaire.aux) ) ! Here is > how much of TeX's memory you used: ! 4637 strings out of 493308 ! 65418 > string characters out of 6141368 ! 172346 words of memory out of 5000000 ! > 8048 multiletter control sequences out of 15000+600000 ! 3640 words of font > info for 14 fonts, out of 8000000 for 9000 ! 957 hyphenation exceptions out > of 8191 ! 46i,4n,39p,1774b,111s stack positions out of > 5000i,500n,10000p,200000b,80000s ! ! Output written on testGlossaire.pdf (1 > page, 11913 bytes). ! PDF statistics: ! 12 PDF objects out of 1000 (max. > 8388607) ! 7 compressed objects within 1 object stream ! 0 named > destinations out of 1000 (max. 500000) ! 1 words of extra memory for PDF > output out of 10000 (max. 10000000)


title: References that start with "

text: I use BibTex to manage my references. Now I have a small problem. The title of one of my references starts with `"I don't ... "`. When I generate the bibliography it looks like this:               ""i don' ...      Why is the I here not in capital letters? All other of my references start with a capital letter.


title: Packages `fighting' for the value of a length

text: I've recently written some macros for typesetting certain constructs used in linguistics (Discourse Representation Structures). I hit an issue whereby the svmono class was changing the value of \arraycolsep and so messing up the typesetting. (Cf. svmono array padding .) The solution I adopted was to put `\setlength{\arraycolsep}{5pt}` at the start of the file containing my macros. However... presumably svmono had a reason for changing `\arraycolsep`, and so I'm interfering with it. (Based on some reading around, I'm assuming that macros utilise the value of `\arraycolsep` at that point they are evaluated, rather than the value at the point when they are defined.) In some sense, this is a very unsatisfactory situation -- my package and svmono are fighting for `\arraycolsep`, and whichever one loses will have a problem. Is there some way in which I can essentially say, "I want to use the following value of `\arraycolsep` for the macros defined in this package, without affecting other packages"?


I've found that `\mathbb{1}` works when using `mathpazo`:               \documentclass{article}     \usepackage{mathpazo}     \begin{document}         $\mathbb{1}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/sQSE4.png) But `\mathbb{0}` doesn't work (doesn't display anything at all), and my searches haven't led me to any solutions so far. Is it possible to get a blackboard-bold 0? Or other numbers?


title: Multiline comment

text: In tex there is a way to do a comment multiline like in C, C++ `/* comment */` or in HTML `<!-- comment -->`? I'm currently using `\ifx`               \ifx true false     My multiline comment     that will not be in the     output pdf     \fi      but this may create a problem if I put inside the comment something like `\someundefcommand`. I wish something like the standard `%` comment so I can put inside the comment I want.


title: \pagestyle{empty} not working for first page

text: > **Possible Duplicate:**   >  \pagestyle{empty} doesn’t seem to work for page with \maketitle I have a document. For the remaining pages, there are no page numbers, but only for the first one I want the number to be removed MWE is:               \documentclass[onecolumn,12pt]{IEEEtran}          \usepackage[left=1in,right=1in,bottom=0.95in,nohead,nofoot]{geometry}     \begin{document}     \title{ABCD}     \author{efg          %\vspace{3mm}     Electrical Engineering\\     University\\     address\\     email: $\{$email $\}$}     \markboth{}{}          \maketitle     \pagestyle{empty}     \end{document}


title: Overlay `onslide` across slides

text: At the moment, I have code as follows:               \documentclass{beamer}     \usetheme{Boadilla}     \usepackage[frenchb]{babel}          \begin{document}     \begin{frame}       \frametitle{1}     \end{frame}     \begin{frame}       \frametitle{2}     \end{frame}     \begin{frame}       \frametitle{Overlay}       \onslide<1->{After1\\}       \onslide<2->{After2}     \end{frame}     \end{document}      Actually, the code doesn't realize what I want: I would like to display `Overlay` with `After1` just after the first slide `1`, and display `Overlay` with `After1` and `After2` after the slide `2`. Does anyone know how to correct the code to do so?


title: Rapidly marking index entries

text: I need to create an index for a fully-written book. Going through the entire text and manually inserting `\index` commands would be extremely time- consuming, and would also be difficult in terms of RSI. It occurs to me that the following way of adding index entries would result in a huge speed up: in an editor, highlight some material and press a certain key (e.g. F2) to have that material copied into an `\index` entry. So, for example, if my text says               analogous to Geach's donkey sentences      I want to be able to highlight `donkey sentences', press the relevant key and have the text changed to               analogous to Geach's donkey sentences\index{donkey sentences}.      Does anyone know of a Windows TeX editor that would support this? (Not emacs, please! Something a little more accessible -- any TeX IDE would be fine.)


title: Whitespaces in tabularx added after \extracolsep

text: I'm quite new to Tex, but I did some tutorials and I'm stuck now, after googling didn't help anymore. My code:               \bgroup     \def\arraystretch{1.75}     \begin{tabularx}{\textwidth}{ | l | @{\extracolsep{\fill}} l | l | l | l | l |}         \hline          \textbf{col 1} &  & col 3 & col 4 & & col 6         \\         \hline         some stuff & & & & other stuff &          \\         \hline         text thats pretty & & & & important &          \\         \hline              \multicolumn{5}{r|}{combined } & \\ \cline{6-6}     \end{tabularx}     \egroup      My problem looks like this: ![enter image description here](http://i.stack.imgur.com/UGMV0.png) I don't know, how to fix it. I'm used to HTML's simplicity by using "width: 100%;" and then the columns auto-resize. How could I manage to get something similar in Tex?


title: \shortstack and vertical aligment in table?

text: \documentclass{report}     \usepackage{lipsum}     \begin{document}     \begin{tabular}{cp{4cm}}     \hline     \shortstack{A\\B\\C\\D} & \lipsum[1] \\     \hline     \end{tabular}     \end{document}      Results in :               ------------------------------------     A     B     C     D    Lorem ipsum dolor sit amet,          consectetuer adipiscing elit.          Ut purus elit, vestibulum          ut, placerat ac, adipiscing          vitae, felis. Curabitur          dictum gravida mauris. Nam     ------------------------------------      While I'd like to achieve:               ------------------------------------     A    Lorem ipsum dolor sit amet,     B    consectetuer adipiscing elit.     C    Ut purus elit, vestibulum     D    ut, placerat ac, adipiscing          vitae, felis. Curabitur          dictum gravida mauris. Nam     ------------------------------------      How to do this using `\shortstack` ? P.S. I've found solution using `\matrix` \ShortStack Align - I am curious if it's possible to do with `\shortstack` ?


title: Error "Illegal unit of measure" occuring when using PSTricks

text: Consider the following example:               \documentclass{article}          \usepackage{pstricks}          \newcommand*\sleep[3]{%       \psframe[fillstyle=crosshatch*](6 #1 mul 37 sub 0.5)(6 #1 mul 36 sub 0.5 5 #2 div add)       \psframe[fillstyle=solid](6 #1 mul 36 sub 0.5)(6 #1 mul 35 sub 5 0.5 #3 div add)     }          \begin{document}          \begin{pspicture}(2,0.5)(4,1.3)       \sleep{6.5}{4}{0}     \end{pspicture}          \end{document}      If the above code is compiled, the following error occurs:               ! Illegal unit of measure (pt inserted).     <to be read again>                         6     l.13   \sleep{6.5}{4}{0}      Why will the code not compile? (It is probably something trivial but I cannot see what the problem is.)


title: Babel option clash for multilingual document

text: I'm writing a report in french, which also contains references to spanish names, containing spanish accents. Including both the french and spanish babel options creates a babel package clash error. How do I use both languages in my document in a simple way? Thanks


title: Speed up LaTeX compilation on a document with lots of automatically created tables

text: I know that similar ground has been covered before (e.g. Speeding up LaTeX compilation), but this question is more specific. I want to create some reports programmatically, so I wrote a program that produces the necessary TeX file. The file contains hundreds of longtable tables (longtabu actually). The compilation time in not acceptable (more than a minute and the reports may get much bigger) and I am searching for ways of decreasing it. Overally there are 4 types of tables. Each type has the same header line, the same number of rows and the same number of columns. The only thing that changes is the data within the tables. Is it possible to speed up the compilation time? If it helps, I know the maximum width of each column (although obviously TeX doesn't) and the number of rows for each table type. Is this type of knowledge helpfull at all? I also thought of creating different *.tex files for each table type, spawning different processes for their compilation and combining them with pdfpages. Has anyone used this technique, or is it going to be a waste of time? I have already precompiled the preamble, but the gain was very small. The output has to be pdf. ## edit The reason why I do care about the performance is because the compilation is going to be done server-side. @Yiannis The following is a mwe of one of the tables' types. The preamble is common in all the tables. I don't use computer modern but I don't think that font selection is relevant in this context. I don't really need the headers to repeat themselves on each page, although it would be nice. On second thought neither alignment to the decimal point is truly necessary, but if I didn't want the output to look nice, I wouldn't have used LaTeX on the first place. In regard of plain TeX, could you provide some pointers? In the past I have only used LaTeX. @Bruno Thank you very much! Your solution is very fast, but it doesn't work with dcolumn and most importantly the spacing is very bad. Try duplicating the table you provided and you will see that the `\bottomrule` of the first one and the `\toprule` of the second one have no space between them at all.               \documentclass[a4paper,10pt,fleqn,final]{article}          \usepackage{xcolor}     \usepackage[a4paper,top=2cm,bottom=2cm,left=1.5cm,right=1.5cm]{geometry}     \usepackage{longtable, booktabs, multirow, tabu}     \usepackage{caption}     \usepackage{dcolumn}          \newcolumntype{d}[1]{D{.}{.}{#1}}        \newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}     \newcommand{\mr}[1]{\multirow{2}{*}{#1}}          \begin{document}          \begin{longtabu}{cd{3.2}cd{3.2}cd{3.2}cd{3.2}cd{3.2}l}     \caption*{Synopsis of P75 - 97-558} \\     \toprule         \mc{\mr{LoadCase}} &  \multicolumn{2}{c}{$N$} & \multicolumn{2}{c}{$V_{in}$} & \multicolumn{2}{c}{$V_{out}$} & \multicolumn{2}{c}{$M_{in}$} & \multicolumn{2}{c}{$M_{out}$} \\         \cmidrule(rl){2-3} \cmidrule(rl){4-5} \cmidrule(rl){6-7} \cmidrule(rl){8-9} \cmidrule(rl){10-11}         &\mc{UF} & State & \mc{UF} & State & \mc{UF} & State & \mc{UF} & State & \mc{UF} & State \\     \midrule     \endhead     \bottomrule     \endlastfoot     \midrule \multicolumn{11}{r}{{Continued on next page}} \\ \bottomrule     \endfoot     21 & 0.80 & Pass & 0.32 & Pass & 0.04 & Pass & 0.05 & Pass & 0.15 & Pass \\     22 & 0.76 & Pass & 0.02 & Pass & 0.03 & Pass & 0.09 & Pass & 0.11 & Pass \\     23 & 0.61 & Pass & 0.32 & Pass & 0.03 & Pass & 0.06 & Pass & 0.10 & Pass \\     24 & 0.56 & Pass & 0.02 & Pass & 0.02 & Pass & 0.06 & Pass & 0.07 & Pass \\     25 & 0.59 & Pass & 0.22 & Pass & 0.03 & Pass & 0.02 & Pass & 0.09 & Pass \\     26 & 0.56 & Pass & 0.02 & Pass & 0.02 & Pass & 0.06 & Pass & 0.07 & Pass \\     27 & 0.58 & Pass & 0.16 & Pass & 0.03 & Pass & 0.00 & Pass & 0.08 & Pass \\     28 & 0.56 & Pass & 0.02 & Pass & 0.02 & Pass & 0.06 & Pass & 0.07 & Pass \\     29 & 0.58 & Pass & 0.14 & Pass & 0.02 & Pass & 0.01 & Pass & 0.08 & Pass \\     30 & 0.56 & Pass & 0.02 & Pass & 0.02 & Pass & 0.06 & Pass & 0.07 & Pass \\     31 & 0.87 & Pass & 0.51 & Pass & 0.06 & Pass & 0.31 & Pass & 0.01 & Pass \\     32 & 0.64 & Pass & 0.31 & Pass & 0.07 & Pass & 0.13 & Pass & 0.03 & Pass \\     33 & 0.66 & Pass & 0.04 & Pass & 0.02 & Pass & 0.15 & Pass & 0.14 & Pass \\     34 & 0.85 & Pass & 0.78 & Pass & 0.01 & Pass & 0.29 & Pass & 0.15 & Pass \\     35 & 54.29 & \bfseries \color{red}Fail & 1.41 & \bfseries \color{red}Fail & 0.03 & Pass & 0.77 & Pass & 0.04 & Pass \\     36 & 6.89 & \bfseries \color{red}Fail & 1.21 & \bfseries \color{red}Fail & 0.00 & Pass & 0.72 & Pass & 0.08 & Pass \\     37 & 3.66 & \bfseries \color{red}Fail & 1.44 & \bfseries \color{red}Fail & 0.05 & Pass & 0.71 & Pass & 0.08 & Pass \\     38 & -1.00 & \bfseries \color{red}Fail & 1.62 & \bfseries \color{red}Fail & 0.02 & Pass & 0.75 & Pass & 0.12 & Pass     \end{longtabu}     \end{document}


title: Text on the left, picture on the right and other text follows

text: I use the following code to produce a picture on the right of the text               \documentclass[12pt,landscape]{article}     \usepackage[demo]{graphicx}     \usepackage{lipsum}     \usepackage{wrapfig}     \begin{document}          \begin{wrapfigure}[8]{r}{2.5in}     \centering     \includegraphics[width=2.4in]{governator.jpg}     \end{wrapfigure}     BOO          \begin{wrapfigure}[8]{r}{2.5in}     \centering     \includegraphics[width=2.4in]{governator.jpg}     \end{wrapfigure}     \lipsum[1]          \end{document}      The idea is to have text on the left, the picture on the right, and the new text in the bottom. The second paragraph is good, but the text in the first paragraph is shorter and this breaks the layout. Is there a way to correct this situation?


title: How to compare two times from datetime package

text: I have this code               \documentclass{article}     \usepackage{datetime}     \begin{document}     \currenttime     \par     \formattime{18}{0}{0}      \end{document}      and want to compare these times if the time is before or after 18 o clock.


title: Beamer and description environment text size

text: Is it possible to define a the description environment size like it its possible with itemize and enumerate?               \setbeamerfont{itemize/enumerate body}{size=\small}     \setbeamerfont{itemize/enumerate subbody}{size=\footnotesize}     \setbeamerfont{itemize/enumerate subsubbody}{size=\scriptsize}      I have been using:               \begingroup     \small     \begin{description}     \item[aaa] bbb     \item[ccc] ddd     \end{description}     \endgroup      But I don't know if it is the better approach. Also, sometimes I prefer to use the following construction:               \begingroup     \small     ...     \endgroup      For text, figures, tables or even itemize/enumerate to fit the contents in a frame, instead of using the `shrink` option:               \begin{frame}[shrink]{Frame title}     ...     \end{frame}      Which I also don't know the better approach.


title: Beamer - Shaded Background in Block environment

text: i would like to have a shaded coloured block title background in my beamer presentation. I could not figure out how to set the shading. Any solution?               \documentclass[]{beamer}      \usepackage{lmodern}      \usepackage{tikz}      \usepackage[utf8]{inputenc}      \usepackage[ngerman]{babel}      \usepackage[T1]{fontenc}           \setbeamertemplate{blocks}[rounded][shadow=true]      \setbeamercolor{block title}{fg=black,bg=black!70}      \setbeamercolor{block body}{fg=white,bg=black}                \begin{document}           \begin{frame}           \begin{block}{Title which background color i like to shade}      Block entry     \end{block}           \end{frame}           \end{document}


title: Installing Lua Modules for use in LuaLaTeX - the sequel

text: There is a question with the same title, Installing Lua Modules for use in LuaLaTeX, that apparently went unresolved. I'm having similar issues and at this point am out of ideas. I'm running Debian Testing and have installed lua's xmlrpc library through the package manager. The files are installed in               /usr/share/lua/5.1/xmlrpc     /usr/share/lua/5.1/xmlrpc/http.lua     /usr/share/lua/5.1/xmlrpc/init.lua     /usr/share/lua/5.1/xmlrpc/server.lua      and are found alright by the system's lua installation. I have determined that the `package.path` parameter differs between the system's lua installation and luatex. System:               mpalmer@holzkopf:~$ lua     Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio     > print(package.path)     ./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua     >       In luatex, `/usr/share/lua` and subdirectories are missing from the path. When I set the `LUA_PATH` environmental variable to the system's path, `/usr/share/lua` and subdirectories show up in luatex's `package.path` also, but the `xmlrpc` module still isn't found. I have also tried to make `/usr/local/share/lua` (which didn't actually exist) a symlink to `/usr/share/lua`, again without success. On the other hand, luatex does not give me an error, so presumably succeeds, with `require "socket.http"` That module lives in `/usr/share/lua/5.1/socket/http.lua` and is found even when `/usr/share/lua` is neither symlinked nor in `package.path`. So it almost seems as if `package.path` is completely ignored by luatex. Does anyone know what I'm missing here?


title: find and sort selected words

text: I am writing a book, where in i have to call back the selected words in different context. Here is my MWE               \documentclass[a4paper,10pt]{article}          %For multiple index     \usepackage{imakeidx}     \makeindex   % is this required?     \makeindex[name=pl,title=Index of plants]     \makeindex[name=ch,title=Index of chemicals]               \begin{document}          I have discussed 3 plants in chapter 1. Rose\index[pl]{Rose},  banana\index[pl]{Banana}          and mango\index[pl]{Mango}.           In chapter 2, i have discussed 2 plants guava\index[pl]{Guava} and coconut\index[pl]{Coconut}.           Totally, i have discussed  \ref{plants-number} plants in \ref{chemicals-number} chemicals in two chapters.           Rose has benzene\index[ch]{Benzene}, toluene\index[ch]{Toluene} and      methane\index[ch]{Methane}. Banana has toluene\index[ch]{Toluene},      ethane\index[ch]{Ethane} and ethyl alcohol\index[ch]{Ethyl alcohol}.      Mango has methanol\index[ch]{Methanol}, ethyl alcohol\index[ch]{Ethyl alcohol}      and benzene\index[ch]{Benzene}. Guava has ethane\index[ch]{Ethane},      acetic acid\index[ch]{Acetic acid}, formalin\index[ch]{Formalin}.      Coconut has acetic acid\index[ch]{Acetic acid}, formalin\index[ch]{Formalin}      and benzene\index[ch]{Benzene}.          Now i would like to have all the plants which has benzene, toluene etc.          \printindex     \indexprologue{\small In this index you’ll find only the plant names}     \printindex[pl]          \indexprologue{\small In this index you’ll find only the checicals}     \printindex[ch]               % We'll count the number of plants and of chemicals     \newcounter{items}     \makeatletter     \begingroup     % Define suitably \indexentry     \newcommand{\indexentry}[2]{%      \@ifundefined{#1}         {\refstepcounter{items}\expandafter\let\csname#1\endcsname\@empty}         {}}          % Let's count the plants     \begingroup     \setcounter{items}{0}     \input{pl.idx}\label{plants-number}     \endgroup          % Let's count the chemicals     \begingroup     \setcounter{items}{0}     \input{ch.idx}\label{chemicals-number}     \endgroup          \endgroup                \end{document}      The question: i would like to have all the plants which has benzene, toluene etc.


title: Custom verbatim commands writing into index

text: I have created a custom fancyvrb command via `\CustomVerbatimCommand{\afun}{Verb}{}` to use for writing programming language functions, say `\afun|object.method.blah|`, etc. I would like to automatically build an index of all mentions of function names. I know I could try to do that with ordinary LaTeX commands, e.g. with something like:               \newcommand{\afun}[1]{\texttt{#1}\index{#1@\texttt{#1}}}      That will create an index entry with a function name. Is there any way to achieve that, but with custom verbatim commands of fancyvrb?


title: Shading a bell shaped curve in TikZ

text: I have the following code:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[scale=1]          \def\normalt{\x,{4*1/exp(((\x-3)^2)/2)}}          \def\y{2}               \def\fy{4*1/exp(((\y-3)^2)/2)}               \fill [fill=orange!60] (2.0,0)--(2.0,2.5) plot[domain=2:4](\normalt) --(4,0)-- (4,2.5)-- cycle;               \draw[color=black,domain=0:6] plot (\normalt) node[right] {};               \node[below] at (3.0,0) {\tiny{51800}};     \draw[dashed] (2.0,2.5) -- (2.0 ,0) node[below] {\tiny{51300}};     \draw[dashed] (4.0,2.5) -- (4.0 ,0) node[below] {\tiny{52300}};               \draw[dashed] ({\y},{\fy}) -- ({\y},0) node[below] {$y$};     \draw[color=black,domain=0:6] plot[samples=1000] (\normalt) node[right] {};                    \draw[->] (-3,0) -- (9,0) node[right] {$\overline{x}$};               \end{tikzpicture}     \end{document}      I want to shade the area between the dotted lines as shown below, but I am stuck. Can somebody help me? Note: My problem is here               \fill [fill=orange!60] (2.0,0)--(2.0,2.5) plot[domain=2:4](\normalt) --(4,0)-- (4,2.5)-- cycle;      within the code. I am not very well familiar with `\fill` command. ![enter image description here](http://i.stack.imgur.com/Fsdzu.png)


title: Obeylines in letterhead

text: when I am writing a letter and using the class `scrlttr2`. I would like to use `\obeylines` for the address, so I can just paste an address into my latex source code, i.e. somewhat like this:               \begin{letter}{\obeylines     Peter Paul Porkins     Ponderosa Ranch      Philadelphia     }}      However, this does not work at all, there are no linebreaks in the compiled document. Is there a way to make this work? Thanks a lot in advance!


title: Electronic version of Knuth's "TeXbook"?

text: I have a printed copy of the TeXbook (from D.E. Knuth) at home. Now that I travel a lot, I don't want to take my library with me every time. Question: Is there a legal way to obtain (=purchase) a PDF version of the TeXbook? I know that there are non-official PDFs flying around in the internet, but I would really like to buy it.


title: What is an "implementation of TeX"

text: On MiKTex webpage, it is written: _MiKTeX (pronounced mick-tech) is an up-to-date **implementation of TeX/LaTeX** and related programs for Windows (all current variants)._ Also on this page Installing TeX, LaTeX, and REVTeX on your own computer : _TeX is the same everywhere, but the software that **implements TeX** is different for different systems, and the elements described above are packaged differently for different platforms._ And by google, one can find more, such as TeX++: An Object Oriented TeX Implementation . Github rep for TeX++ as suggested by Bruno Le Floch in comments I would like to know what is "an implementation of TEX". I know that PDF is a format (or a language) and PDF reader is an implementation in order to parse PDF files. Is "an implementation of TEX" similar to PDF and PDF readers? So nowadays, each distribution, such as `MikTeX`, `TeXlive` and `MacTeX` (and ...etc.), has its own "TeX engine"? Or I am wrong and they all use the same source code of TeX and just compile with different compiler and target to different platform?


title: ! LaTeX Error: Not in outer par mode

text: I am using an image within `minipage` and getting error message.                 ! LaTeX Error: Not in outer par mode.      Below is minimal working example.               \documentclass[11pt,table,a4paper]{article}     \usepackage{array,ragged2e}     \usepackage{graphicx}     \usepackage[top=2cm, bottom=3cm,right=1cm, left=1cm, headsep=26pt]{geometry}     \usepackage[T1]{fontenc}     \usepackage{sidecap}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \begin{document}                \begin{minipage}[t]{.98\linewidth}          \begin{minipage}[t]{0.33\linewidth}      ABC     \end{minipage}          \begin{minipage}[t]{0.05\linewidth}       \hspace{2cm}     \end{minipage}           \begin{minipage}[t]{0.4\linewidth}       \begin{minipage}[t]{0.5\linewidth} \textbf{Some text} \end{minipage}       \begin{minipage}[t]{0.25\linewidth} \begin{figure}[h!]   \includegraphics[width=1.0\textwidth]{risk2.png} \end{figure} \end{minipage}     \end{minipage}             % Error is due to using figure in minipage          \end{minipage}     \end{document}             % End of document.      ![enter image description here](http://i.stack.imgur.com/2hhlt.png) How can I fix this problem?


title: How to swap field entries in Bibliography (biblatex, bibtex8)?

text: I am currently modifying the layout of my thesis' bibliography and I still have to change three things. This is part of my preamble which includes the `biblatex` package. I already managed to render the volume bold, getting rid of ("pp.") as well as the "In:" (three lines underneath the package).               \usepackage[sorting=none, url=false, doi=false, style=numeric-comp, backend=bibtex8]{biblatex}       \bibliography{Bibliography}     \DeclareFieldFormat[article]{volume}{\textbf{#1}\space}     \DeclareFieldFormat{pages}{#1}     \renewbibmacro{in:}{}         Now I would like to swap the order of entries within each single bibliography entry. Right now it is: "author title journal volume pages year". I would like to swap year with pages: "author title journal volume year pages". How can I do that? Is there an easy hack like those below? Also I would like to put brackets round the year entry `@phdthesis` where they are missing right now. The last change in style concerns the author's names. Right now they are "E T Jaynes F W Cummings". I'd like to change that into "E. T. Jaynes, and F. W. Cummings".


title: Pleaseinsertintopreamble in ToC and header

text: I wanted to style chapter headings, found out about `titlesec` and wrote the document like this:               \documentclass[a4paper,12pt]{book}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage[serbianc]{babel}          \usepackage{titlesec}     \usepackage{xcolor}          \definecolor{crvena}{rgb}{.647,.129,.149}     \definecolor{plava}{rgb}{.204,.353,.541}          \titleformat     {\chapter} % command     [display] % shape     {\bfseries\flushright\Huge\color{crvena}} % format     {\ \thechapter} % label     {0.5ex} % sep     {     \vspace{1ex}     } % before-code     [     \vspace{-0.5ex}%     \color{plava}\rule{\textwidth}{2.3pt}     ] % after-code          \begin{document}     \tableofcontents     \chapter{Лавиринт}      After that I wrote some text and finished with:               \end{document}      The result is fine, as can be seen from the image: ![enter image description here](http://i.stack.imgur.com/lehtb.png) But the problem is now that there are errors in table of contents: ToC: ![enter image description here](http://i.stack.imgur.com/l52E9.png) What has caused `1 [Pleaseinsertintopreamble]` to be written instead of `1 Лавиринт` and how to fix it? EDIT 1: I tried to use fancyhdr, but got this: ToC is fine: ![enter image description here](http://i.stack.imgur.com/39vhq.png) but header is not: ![enter image description here](http://i.stack.imgur.com/wxza9.png)


title: Equation problems

text: So I am trying to insert an equation. The output seems to be correct, but I get some error messages.               \begin{equation}     \centering     \label{eg:homogeneity2}      \begin{align}        H(C) = - \sum\limits_{c=1}^{|C|} \left\frac{\sum\limits_{k=1}^{|K|} {a_c_k} }{n}\right log \left\frac{\sum\limits_{k=1}^{|K|} {a_c_k}}{n}\right      \end{align}     \end{equation}


title: How to re-position each chapter at the beginning of the page/

text: :-) With the following preamble how can I reposition where the chapters start? Meaning each section is defined to start at almost the 2/3 of the page. There is a small space and then goes the "Section 1: blah blah". Can I start each section at the beginning of the page like the other pages?               \documentclass[a4paper,12pt]{book}     \setcounter{secnumdepth}{-2}          \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{}{20pt}{\Huge}          \let\cleardoublepage\clearpage     \usepackage[english,greek]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{blindtext}     \usepackage[pdftex]{graphicx}     \usepackage[skip=2pt, font=small, labelformat = empty]{caption}          \newcommand{\gr}{\selectlanguage{greek}}     \newcommand{\en}{\selectlanguage{english}}     \usepackage{wrapfig}     \usepackage[paperwidth=17cm, paperheight=24cm]{geometry}     \usepackage[onehalfspacing]{setspace}     \usepackage{textcomp}     \useshorthands{;}     \defineshorthand{;}{?}     \usepackage{fancyhdr}     \fancyhf{}     \fancyhead[LE]{\nouppercase{\leftmark}}     \fancyhead[RO]{\nouppercase{\rightmark}}     \fancyfoot[LE,RO]{\thepage}     \pagestyle{fancy}          \renewcommand{\chaptermark}[1]{ \markboth{#1}{} }     \renewcommand{\sectionmark}[1]{ \markright{#1}{} }


title: All citations showing up as "?"; Display I cannot explain in bibliography

text: I have written a paper in MLA format, using XeLaTeX, and am now trying to make my citations work. After first compiling with XeLaTeX, then with BibTeX, then twice more with XeLaTeX, I end up with `(?)` as all of my citations. Additionally, all of the last names and year show up in brackets on the finished bibliography: > [BlaineBlaine2009] Blaine, David. ``How I held my breath for 17 minutes.'' > October 2009. This is the corresponding warning from the second execution of XeLaTeX:               [2] [3] (./diving.bbl     ! Undefined control sequence.     <argument> \protect \citeauthoryear                                      {Blaine}{Blaine}{2009}     l.8 ...teauthoryear{Blaine}{Blaine}{2009}]{blaine}      This is the corresponding portion of the `.bbl` file:               \bibitem[\protect\citeauthoryear{Blaine}{Blaine}{2009}]{blaine}     Blaine, David.     \newblock ``How I held my breath for 17 minutes.''     \newblock October 2009.      Minimum Working Example, as requested:               \documentclass{article}          \usepackage{harvard}          \citationstyle{mla}          \begin{document}          This is a citation\cite{blaine}.          \bibliographystyle{mla}     \bibliography{bibliography-file}          \end{document}      Where `bibliography-file.bib` contains:               @conference{blaine,         howpublished = {TED Talks},         month = {October},         author = {David Blaine},         title = {How I held my breath for 17 minutes},         year = {2009},     }


title: Hyperlinks to repeated & variant equations with \tag{} don't work

text: Suppose I have the following equation (42), a variant version of it (42ᵇⁱˢ), and then a repeated version of (42). Here is how I would express them in my document: Original equation:               \begin{equation}       \label{eq:42}       R=-4\pi E^2h.     \end{equation}      A variant of it:               \begin{equation}       \label{eq:42bis}       R=4\pi E^2h,\tag{\ref{eq:42}$^\mathrm{bis}$}     \end{equation}      A repetition of (42) later in the document:               \begin{equation}       \label{eq:42b}       R=-4\pi E^2h,\tag{\ref{eq:42}}     \end{equation}      Why does the `hyperref` package make the links of `\ref{eq:42bis}` and `\ref{eq:42b}` both point to the same equation with `\label{eq:42}`? Does a `\ref{}` inside a `\tag{}` override the `\label{}` of the `equation` environment? thanks


title: siunitx and vertical line

text: I used `siunitx` so numbers in a table can be aligned. However, a vertical line is lost between two columns. Also, numbers in the last column are not vertically aligned. How can this fixed? Thank you!               \documentclass{article}     \usepackage{array}     \usepackage{siunitx}          \newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}}     \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}               \begin{document}          \begin{table}     \makebox[\linewidth][c]{\begin{tabular}{| L{4.2cm} | C{2.6cm} | S[table-format=9.6] |  C{2.6cm} | C{2.6cm} | C{2.6cm} |}      \hline      & \bfseries 1988& {\centering} {\bfseries 1989} & \bfseries 1990 & \bfseries Change \\ [2ex]     \hline     Score & 249 & 234 & 266 & +17 \\ [1.8ex]     \hline     Percent High & 14 & 9 & 26 & +12 \\ [1.8ex]     \hline     \end{tabular}}     \end{table}          \end{document}      ![enter image description here](http://i.stack.imgur.com/g9Zia.png)