title: Customized edge in forest tree

text: Following the examples in the documentation, it is not too difficult to customize the edge of trees using the `tikz-qtree` package. The following code illustrates it:               \documentclass{standalone}     \usepackage{tikz-qtree}          \begin{document}          \begin{tikzpicture}       \tikzset{         edge from parent/.style={           draw,           edge from parent path={             (\tikzparentnode.south) -- (\tikzparentnode.south |- 0,-10pt -| \tikzchildnode) -- (\tikzchildnode)           }         }       }       \Tree [.ZZ               [.Bax                 [.X                   [.Y [.A ] [.B ] ]                   [.Z [.C ] [.D ] ] ]                 [.F                   [.M [.E ] [.F ] ]                   [.G [.G ] [.H ] ] ] ]               [.A                 [.B                   [.S  [.I P R T V U ] [.J ] ]                   [.I  [.K ] [.L ] ] ]                 [.M                   [.L  [.M ] [.N ] ]                   [.A  [.O ] [.P ] ] ] ] ]     \end{tikzpicture}          \end{document}      Its output is: ![output of the example document](http://i.stack.imgur.com/9RbYU.png) How can the same style of edges used in this example be accomplished with the `forest` package?


title: Subsection is unevenly alligned

text: I'm working on an outline for my general psych class, but I came across this error. I'm new at LaTeX so I'm not sure how to go about fixing it. Thank you so much for your help! ![enter image description here](http://i.stack.imgur.com/bRNzp.png) ![](http://i.stack.imgur.com/oZ5Qp.png)


title: Cannot build .tex file

text: I am running `MikTex 2.9` and I'm facing a problem. When i try to edit a tex file it keeps building for ever. I've noticed that in Task Manager there is a process that's running, `miktex-maketfm.exe`. Also, the dialog box in Texmaker says that               Process started          pdflatex          : Unknown archive file size. pdflatex: Data: cbfonts-fd      My code is the following               \documentclass[a4paper,11pt]{book}          \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{kerkis}          \newcommand{\sw}{\selectlanguage{english}}     \newcommand{\sq}{\selectlanguage{greek}}     \newcommand{\eng}[1]{\latintext#1\greektext}     \newcommand{\gre}[1]{\greektext\latintext#1}     \begin{document}             \eng{This is the $1^{st}$ \LaTeX{} document!}\\             Το πρώτο κείμενο \LaTeX!             Φαίνεται πως δουλεύει!             υπομονή     \end{document}      I've also installed the following packages : `greek-inputenc`,`greek-fontenc`. What can I do to fix it?


title: Add text around the X label

text: Fig 1 is generated by Matlab, and the following code is created using Matlab `matlab2tikz` package. The different between Fig. 1 and Fig.2 is the position of `%` symbol. Fig.2 is produced by the converted code from Fig 1 using `matlab2tikz`.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{subfig}     \usepackage{float}     \pagestyle{empty}     \pgfplotsset{compat=newest}     \pgfplotsset{plot coordinates/math parser=false}     \newlength\figureheight     \newlength\figurewidth     \begin{document}          \definecolor{mycolor1}{rgb}{1,0,1}     \definecolor{mycolor2}{rgb}{0,0.498039215803146,0}     \definecolor{mycolor3}{rgb}{0.600000023841858,0.200000002980232,0}          \begin{tikzpicture}          \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=1,     xmax=7,     ymin=0,     ymax=1,     axis x line*=bottom,     axis y line*=left     ]     \addplot [     color=black,     solid,     line width=1.5pt,     mark size=2.8pt,     mark=square*,     mark options={solid,fill=black},     forget plot     ]     table[row sep=crcr]{     1 0.0596188675796392\\     2 0.167927145682257\\     3 0.471088374541939\\     4 0.500471624154843\\     5 0.681971904149063\\     6 0.712694471678914\\     7 0.978680649641159\\     };     \addplot [     color=red,     solid,     line width=1.5pt,     mark size=4.0pt,     mark=*,     mark options={solid,fill=red},     forget plot     ]     table[row sep=crcr]{     1 0.0424311375007417\\     2 0.0714454646006424\\     3 0.096730025780867\\     4 0.521649842464284\\     5 0.722439592366842\\     6 0.817547092079286\\     7 0.818148553859625\\     };     \addplot [     color=blue,     solid,     line width=1.5pt,     mark size=2.7pt,     mark=triangle*,     mark options={solid,fill=blue},     forget plot     ]     table[row sep=crcr]{     1 0.149865442477967\\     2 0.453797708726919\\     3 0.518594942510538\\     4 0.648991492712356\\     5 0.659605252908307\\     6 0.800330575352401\\     7 0.972974554763863\\     };     \addplot [     color=mycolor1,     solid,     line width=1.5pt,     mark size=2.7pt,     mark=triangle*,     mark options={solid,,rotate=180,fill=mycolor1},     forget plot     ]     table[row sep=crcr]{     1 0.083469814858914\\     2 0.133171007607162\\     3 0.173388613119006\\     4 0.390937802323736\\     5 0.432391503783462\\     6 0.825313795402046\\     7 0.83137974283907\\     };     \addplot [     color=mycolor2,     solid,     line width=1.5pt,     mark size=2.7pt,     mark=triangle*,     mark options={solid,,rotate=270,fill=mycolor2},     forget plot     ]     table[row sep=crcr]{     1 0.0604711791698936\\     2 0.399257770613576\\     3 0.416799467930787\\     4 0.526875830508296\\     5 0.627973359190104\\     6 0.656859890973707\\     7 0.80336439160244\\     };     \addplot [     color=mycolor3,     solid,     line width=1.5pt,     mark size=2.7pt,     mark=triangle*,     mark options={solid,,rotate=90,fill=mycolor3},     forget plot     ]     table[row sep=crcr]{     1 0.015487125636019\\     2 0.106216344928664\\     3 0.167168409914656\\     4 0.291984079961715\\     5 0.372409740055537\\     6 0.43165117024872\\     7 0.984063724379154\\     };     \node[right, inner sep=0mm, text=black] at (axis cs:6.7, 0.05) {(\%)};     \end{axis}     \end{tikzpicture}%               \end{document}       I want to place the `%` symbol in Fig.2 like in Fig.1. Any suggestion will be greatly appreciated! ![Fig.1](http://i.stack.imgur.com/z6Bpp.jpg) ![Fig.2](http://i.stack.imgur.com/Od2P2.png)


title: TexStudio gives 'Could not start command' with my custom build script

text: I have a custom build script `build.command` that runs through the build steps necessary to convert my LaTex scripts into a .pdf (e.g. makeglossaries and so on). The script works fine. However when I try and get it to run in TexStudio it complains, saying: `Error: Could not start the command: /Users/jackaidley/Documents/report/build.command "report"`. However, if I copy and paste from that to the Terminal and run the command then it works fine so I don't understand what the problem could be? I have set it to run by modifying the pdfLaTex run command to `?a)build.command %`. This on Mac OS X 10.8.4 with TexStudio 2.4.


title: \tableofcontents from \part commands in Beamer

text: I am not able to generate the table of contents made of all the parts (declared by `\part` command) of my Beamer presentation. While sections of each part are listed easily, there is no hint in the Beamer user guide how to use `\tableofcontents` to generate the list of parts. Anyone knows?


title: Can BibTeX ignore optional arguments?

text: Is it possible to get BibTeX to ignore certain optional arguments? For example, if the .bib file has many entries with `language = {English}`, and you wish for a certain file's bibliography to not say (English) after its entries, how would you do this?


title: Is fine-grained grid control possible?

text: I want to make a variety of checklists which are essentially based on a grid layout. I care about having fine-grained control over the exact placement of labels and boxes. I do not care about paragraphs, hypenation, equations, or anything like that which I know TeX is very good at. If TeX can do this, then I think it may be a good fit for my needs, but I do not know the whethers or hows. I know about Tikz but it doesn't give me enough fine-grained control. Maybe PGF would be suitable, but I never understood where Tikz ends and PGF begins. If I fail to find a way to solve my problem using TeX I will probably explore SVG and PostScript. Here are some examples of the kind of thing I would like to do that I pulled from an image search for "checklist"   * https://studenttechportfolio.wikispaces.com/file/view/checklist.png/34343465/checklist.png   * http://checklisttemplate911.com/wp-content/uploads/2012/02/checklist-template12.jpg   * http://img.docstoccdn.com/thumb/orig/72289360.png   * http://www.bimmerfest.com/forums/attachment.php?attachmentid=88940&stc=1   * http://theorganisedhousewife.com.au/shop/wp-content/uploads/2012/12/conference-checklist.jpg   * http://2.bp.blogspot.com/-piQobSY-8Mw/Tcihq580IgI/AAAAAAAAAgE/Fd0AQD1e69Y/s1600/Operator_Page_1.jpg   * http://www.dbh.govt.nz/UserFiles/Image/Publications/building/weathertightness/remediation-checklist-2.gif   * http://spxcooling.com/images/M92-1447C-s.jpg Can TeX give me this kind of fine-grained control of grid layout? If so, is PGF a good technology for it? If not, how would these kind of results best be obtained?


title: Subfigure with lstlisting: what am I doing wrong?

text: It keeps telling me: `\begin{document} ended by \end{figure}`, but I do not understand why. I tried to follow the guidelines for the subfigure package. Here is my MWE:               \documentclass[10pt,journal,a4paper]{IEEEtran}     \usepackage{listings}     \usepackage[pdftex]{graphicx}     \usepackage{subfig}     \usepackage{algorithmic}     \begin{document}          \begin{figure}%     \centering     \begin{subfigure}     nothing in it     \end{subfigure}     \qquad     \begin{subfigure}     \begin{lstlisting}     The code     With a line     \end{lstlisting}     \end{subfigure}     \caption{A program and its corresponding trace.\label{figuretrace}}     \end{figure}     \end{document}      I also tried the command `\subfigure` without success. I just would like to be able to embed a lstlisting environment inside a subfigure. What is wrong? **EDIT** Another environment, algorithm, does not work either:               \begin{subfigure}     \begin{algorithm}     The code     With a line     \end{algorithm}     \end{subfigure}      Nor does this work with a table, tabular... Why not?


title: Error with tablefootnote in newest version (1.1a) of package

text: With the newest version of the package tablefootnote (version 1.1a), something is broken when using `\tablefootnote` within a `table` environment, something I discovered when a paper I am writing refused to compile after updating packages. What can I do to circumvent this problem (until the packages is fixed?)? Below a MWE and the error thrown.               \documentclass{article}     \usepackage{tablefootnote}     \begin{document}     \begin{table}         \begin{tabular}{l l}             A & B\tablefootnote{C}\\         \end{tabular}     \end{table}     \end{document}      > ! Too many }'s. \tfn@footnotetext ...{tfn:\theHfootnote }{}}\fi } {\relax > }\thinspace #2}}{... l.8 \end{table}


title: Force latex to show a square matrix as square

text: How can i force latex to print out square matrix as a square matrix with equal width and height in math-mode? I also read amsmath documentation, but don't found any useful help on it. For example please for this matrix:               \documentclass{article}          \usepackage{amsmath}          \begin{document}     \[     \left[     \begin{matrix}     \times & \times & \times &&&&&&&\\     \times & \times &  & \times & \times & & & &\\     \times &  & \times & & \times & & & & \\      & \times & & \times & & \times &&& \\      & \times & \times & & \times & \times & \times & &&\\      &&& \times & \times & \times && \times & \times\\      &&&& \times && \times & \times & \\      &&&&& \times & \times & \times & \times \\      &&&&& \times && \times & \times      \end{matrix}     \right]     \]     \end{document}      result is: ![enter image description here](http://i.stack.imgur.com/92fAe.png) that is a rectangle not an square!


title: Line breaking with `and/or` + babel

text: I have continuously come up with the problem of overfull `hboxes` because sometimes I write `and/or` in my papers. For example, this phrase: > To design and implement a biofeedback system for alerting patients and/or > health care providers about their current fall risk index. I know you can set the word _providers_ to the correct hyphenation by using `\hyphenation{pro-vid-ers}` and carry on, but I wish this was done automatically by `babel` (as it does it with almost everything else). My guess is that the `and/or` part is messing with its capabilities of line breaking. So, just to be safe: What is the correct way to typeset `and/or`? Should it be `and or` or does LaTeX have any specific way to deal with this? **UPDATE** MWE:               \documentclass[a4paper,twoside,11pt,openright]{report}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}         \usepackage[english]{babel}     \usepackage{mathptmx}     \usepackage[outer=25mm,inner=35mm,vmargin=20mm,includehead,includefoot,headheight=15pt,showframe]{geometry}     \usepackage{enumitem}              \begin{document}          \begin{itemize}[itemsep=0pt,leftmargin=\parindent]         \item To design and implement a biofeedback system for alerting patients and/or health care providers about their current fall risk index.     \end{itemize}          \end{document}


title: Switch back to multi column after one column

text: I am using this multicol tex template for a paper. For a certain portion I have to switch to one column format. Then after that paragraph or text, I have to switch back to multi column format. How can I do it?


title: Nautilus Shell in TikZ or PSTricks

text: Any ideas on how to recreate the cross-section of a nautilus shell like in the diagram below: ![enter image description here](http://i.stack.imgur.com/gnfei.jpg)


title: Confusion related to this tex

text: I have this confusion about what this line in tex does               \begin{tabular}{|p{5cm}|p{5cm}|}     \hline     \textbf{Heading 1} & \tabularnewline     \hline     \end{tabular}      I am not sure what this `|p{5cm}|p{5cm}|` does?


title: vertical spacing of entire section changes when using sciptsize environment for table

text: I have the following script:               \documentclass{article}     \usepackage{longtable}     \linespread{1.5}     \begin{document}          %     \section{paragraph 1}     This is a paragraph lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al a\\          \section{paragraph 2}     This is a paragraph lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al a lala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al alala allala lalla alala alla alla alal ala la al al a.\\     %     \begin{scriptsize}     \LTcapwidth=\textwidth     \renewcommand*{\arraystretch}{1.5}     \begin{longtable}{l c c c c c}     \hline \hline     %     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     Name & Surname & val1 & val2 & val3 & val4 \\     \hline     \end{longtable}     \end{scriptsize}     \end{document}      which should generate a table that extends over two pages. The problem with this is that the vertical spacing for the section that the table is included is changed. If I remove begin and end script size, however, all is fine. How can I keep the table in scriptsize and also keep have the vertical spacing of the paragraph to be the same. ![enter image description here](http://i.stack.imgur.com/Qbun3.png)


title: Correct hyperlink to the index

text: I am writing a document using the book class, and the hyperlink to the index sends the pdf viewer a bit too far, i.e. when I click the top of the screen is at the start of the index instead of displaying the index title. Here is a MWE :               \documentclass{book}     \usepackage{hyperref}     \usepackage{makeidx}     \makeindex     \begin{document}               \cleardoublepage     \phantomsection     \addcontentsline{toc}{section}{Table of Contents}     \renewcommand{\contentsname}{Table of Contents}  % Original name = Contents     \tableofcontents     \index{foo}               \cleardoublepage     \phantomsection     \addcontentsline{toc}{chapter}{\indexname}     \printindex               \chapter{foo}     \end{document}      When I compile it and click on index, I get to that position : ![](http://i.stack.imgur.com/x5OKn.png) How can I have the hyperlink to index send exactly to the index page, with the index title clearly visible at the top ? Edit: Fixed the order of phantomsection and addcontentsline Edit 2 : The log with a verbose hyperref is the following :               Package hyperref Info: Anchor `Doc-Start' on input line 18.     Package hyperref Info: Anchor `chapter*.1' on input line 20.     (D:\Travail\Bugtex\bug.toc     Package hyperref Info: bookmark on input line 1:     (hyperref)             thecounter {0}     (hyperref)             text {\contentsname }     (hyperref)             reference {chapter*.1}     (hyperref)             toclevel {0}     (hyperref)             type {toc}.     Package hyperref Info: Reference (link) `chapter*.1' on input line 2.     Package hyperref Info: Reference (link) `section*.2' on input line 3.     Package hyperref Info: Reference (link) `chapter.1' on input line 4.     )     \tf@toc=\write4     Package hyperref Info: Anchor `page.1' on input line 23.      [1               {C:/Users/Arnaud/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}     Package `hyperref' Info: End of reference (link) `chapter*.1', line 2.     Package `hyperref' Info: End of reference (link) `section*.2', line 3.     Package `hyperref' Info: End of reference (link) `chapter.1', line 4.     ]      Package hyperref Info: Anchor `page.2' on input line 23.      [2          ]     Package hyperref Info: Anchor `section*.2' on input line 24.     Package hyperref Info: bookmark on input line 25:     (hyperref)             thecounter {0}     (hyperref)             text {\indexname }     (hyperref)             reference {section*.2}     (hyperref)             toclevel {0}     (hyperref)             type {toc}.      (D:\Travail\Bugtex\bug.ind     Package hyperref Info: Reference (link) `page.1' on input line 3.     Package hyperref Info: Anchor `page.3' on input line 5.      [3          Package `hyperref' Info: End of reference (link) `page.1', line 3.          ])     Package hyperref Info: Anchor `page.4' on input line 28.      [4               ]     Package hyperref Info: Anchor `chapter.1' on input line 28.          Chapter 1.     Package hyperref Info: bookmark on input line 28:     (hyperref)             thecounter {1}     (hyperref)             text {\protect \numberline {\thechapter }foo}     (hyperref)             reference {chapter.1}     (hyperref)             toclevel {0}     (hyperref)             type {toc}.     Package atveryend Info: Empty hook `BeforeClearDocument' on input line 29.     Package hyperref Info: Anchor `page.5' on input line 29.


title: TikZ node label is not being placed where I want it

text: Why is the following MWE not placing the label along the correct angle?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \begin{tikzpicture}[every path/.style={line width=1pt}]            \coordinate (X) at (2,4) {};            \foreach \x in { 100,107,114}             {            \node (tmp\x) at ($(X)+(\x:3)$) {};                 \draw[orange!30,fill=orange!30] (X) -- (tmp\x);         }            \node[circle,inner sep=2pt,draw,label=107:X] at (X) {};       \node[inner sep=0pt,fill=none] (label/A) at ($(X)+(107:1.0)$) {Y};          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/rgoWU.png) The `Y` has been placed where I expect and want the `X` to be.


title: Uniform appearance of tick marks in 3d pgfplot?

text: In the default configuration the tick marks in a 3d plot from `pgfplots` are looking nicely when using a box but in my opinion not really uniform when the axis lines are in the center. Is there any option to show uniform crosses, for example 3 lines in all directions at each minor tick mark? Here I have crosses along one axis and only lines along both other axes:               \documentclass[tikz,12pt]{standalone}     \usepackage{tikz,pgfplots,pgfplotstable}          \pgfplotsset{compat=1.10}          \begin{document}     \begin{tikzpicture}          \pgfplotsset{every axis/.append style={tick style={line width=0.7pt}}}          \pgfplotstableread{     a b     -0.1 0.2     0.1 0.5     }\testdata          \begin{axis}[axis lines=center, ymin=-0.22,ymax=0.22,   ]         \addplot3 [color=blue,] table[x expr=0,y=a,z=b] {\testdata};     \end{axis}          \end{tikzpicture}           \end{document}      ![enter image description here](http://i.stack.imgur.com/8liy4.png)


title: How to Format Text Automatically

text: In most scientific journals, articles that contain _foreign_ words or sentences, should be written in _italic_. In this case, I wrote an article in Indonesian, while the foreign word or phrase is the local language and English. The first example, a respondent who was interviewed answered in the local language.                "Nggak!"      _Nggak_ is the vocabulary of the Java language which means "not". The second example, a technical term like: unduh ( _download_ ). Based on a @gopalakrishna-palem answer to this question (How to create a pre- processing command that accepts plain text and generates formatted text (based on configurable options)), I tried to define:               \def\KeyWords{     % local language     nggak,      % English     File, download,      }      But this solution only format the first occurrence of each keyword and requires that the words or sentences are placed in **\def\MyText{}** , for example:               \def\MyText{     "File nggak bisa di-unduh (download)."     }      Which will produce: " _File nggak_ bisa di-unduh ( _download_ )." [that means "File can't be downloaded]. So, the problems are:   * How to write the word or sentence -that be formatted- as plain paragraphs?, and   * How to format the word are repeated?


title: Does writing LaTeX packages need moderation?

text: 30 years ago LaTeX was quite compact and observable being. Nowdays, CTAN repository counts more than 4k LaTeX packages and their number continues growing so that it is absolutely impossible to observe most packages within a sigle book. This makes difficult for newcomers to learn LaTeX. Many packages are not compatible, many are sensitive to the order of loading, many packages do almost the same things. For example, there are 4 incompatible packages on CTAN which provide bibtex/biblatex styles for GOST, a Russian state standard of bibliographic description. Note that there should be only one state standard at any instant of time, otherwise it is not a standard. I am afraid that my question will be voted down but I'll ask it: **Does writing LaTeX packages need more strict moderation than now?** Can someone propose a mechanism of such a moderation.


title: Autocalculate result in math-mode

text: Are there any available programs/software/etc. that allow you to autocalculate and then autocomplete TeX equations? It would be great if for example, I were doing really long messy equations like               120 000 \, inches \times \frac{1 \, mile}{63360 \, inches} =      and the program could just fill in the blank with               1.89 \, miles


title: ifetex always true

text: I am working on a document preamble that allows me to compile a document with `pdlatex` and with `xelatex`. I found that the `\ifetex` condition to check whether the document is going through e-tex is always true, independent of the engine that I use. Below is a minimal example. The `eTeX used ...` part is in all result documents independent of the engine that I use: `pdflatex`, x`elatex`, and `latex`. The "PDF used..." part is only in the document that ran through `pdflatex`. Any ideas? Is there a general mistake in my thoughts? The documentation of `\ifetex` says it simply tests for the `\eTeXversion`. Who sets this? I am on a Fedora 19 installation and also tried it on a Fedora 20 without the etex stuff installed at all -- same behavior. Can somebody test this at a different installation, i.e., whether the behavior is the same? Is there a 'best-practice' to do the engine selection in a document preamble if I want (need) to be able to run the document through any of the major engines? So I mean to construct a if(pdf)-elsif(etex)-elsif(latex)-fi chain.               \documentclass{article}          \usepackage{ifpdf}     \usepackage{ifetex}          \begin{document}          Hello World          \ifpdf         PDF used     \fi          \ifetex         eTeX used; version is \the\eTeXversion \the\eTeXversion     \fi          \end{document}


title: Extract from a token containing a list with math content

text: I have a token which contains a list consisting of:   1. a date in `YYYY-MM-DD` format,    2. followed by a colon, and    3. some text which may contain math. The text will consist of a sentence or two (i.e., no paragraphs).  I want to process this list and extract the date and content separately. Sadly, my current MWE _works_ perfectly fine and I am not able to reproduce the intermittent error that I am getting in my actual use case. The error occurs only where there is math content in the list (but other list elements with math are processed just fine). The MWE yields: ![enter image description here](http://i.stack.imgur.com/oqddX.png) The problems I am seeing in my actual use case are:   1. For the case where there is a curly brace group (i.e., text containing a comma) I am getting an empty string as the date with `\StrBefore{\ListMember}{:}[\Date]`.   2. For the case where there is `$\deg(e^x)$` in the text I am getting: > TeX capacity exceeded, sorry [input stack size=5000]. > > \reserved@a ->\def \reserved@a > > *{\let \@xs@assign \@xs@expand@and@detokenize... > > ==> Fatal error occurred, no output PDF file produced! So, my question is, is there inherent problems in the way I am processing this list? Is there a better way to do the list processing and extraction (but still using a token register). I will continue to attempt to reproduce a proper MWE, but was hoping that someone would have an "Aha!" moment and see the potential flaw in how I am doing things. ## Notes:   * In hindsight, for the case where the text contains a comma, I think it would have been better to place the brace group around the text only.  ## Code:               \documentclass{article}     \usepackage{xstring}     \usepackage{tikz}     \usepackage{xcolor}          \newtoks\MyTodoList          % Test cases:     %   1. only text     %   2. ends with math      %   3. Math, but not at the end.     %   4. Brace group required in case there is a comma in the content     %   5. Contains a comma and math.     \MyTodoList={         2014-03-10: Go to class.,         2014-03-11: Solve $\sin x + \cos x = 0.5$.,         2014-03-12: Figure out $\deg(e^x)$ again.,         {2014-03-13: Study for Math, Physics and Geometry.},         {2014-03-14: Prepare for $\pi$ day, and eat pie.},     }          \newcommand*{\Date}{}%     \newcommand*{\TodoItem}{}%     \newcommand*{\MyTodoListExpanded}{}%          \begin{document}          \edef\MyTodoListExpanded{\the\MyTodoList}%     \foreach \ListMember in \MyTodoListExpanded {%         \IfStrEq{\ListMember}{}{}{% Filter out any empty rows (case of trailing comma on last item.             \StrBefore{\ListMember}{:}[\Date]%             \StrBehind{\ListMember}{:}[\TodoItem]%             \par\textcolor{red}{\Date}: \textcolor{blue}{\TodoItem}%         }%     }          \end{document}


title: Bibliography as own bookmark

text: In my pdf the bibliography is shown as a section from appendix but I would like to have a own bookmark for it. The bookmark looks like following.               ...     Chapter D     Chapter E     Appendix         Appendix A         Appendix C         Appendix D         ...         Bibliography      How could use the bibliography in a own bookmark at the end? Like this:               ...     Chapter D     Chapter E     Appendix         Appendix A         Appendix C         Appendix D         ...     Bibliography      I use following in my TeX document.               % Appendix     \appendix     \addpart{\appendixname}     \input{Appendix/A_Requirements}     \input{Appendix/B_Analysis}     \input{Appendix/C_Feature}     \input{Appendix/D_Project}          % Bibliography     \printbibliography      **Edit**               \documentclass[paper=a4,twoside=false,DIV10,chapterprefix,headsepline=true,index=totoc,listof=totoc,bibliography=totoc,appendixprefix=true]{scrbook}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[hidelinks]{hyperref}     \usepackage[babel,german=quotes]{csquotes}     \usepackage[backend=biber,style=alphabetic]{biblatex}     \usepackage{chngcntr}      \usepackage{float}     \usepackage[german]{cleveref}     \usepackage[ngerman]{babel}     \usepackage[normalem]{ulem}     \usepackage[printonlyused]{acronym}     \usepackage{enumerate}     \usepackage{graphicx, epstopdf}     \usepackage{listingsutf8}     \usepackage{lmodern}     \usepackage{longtable}     \usepackage{microtype}     \usepackage[x11names]{xcolor}          \bibliography{Bibliography/Bibliography}          \counterwithout{footnote}{chapter}          \input{Component/Settings}          % Author informations          % Front     \begin{document}     \frontmatter          \input{Component/Titlepage}     \input{Component/Declaration-Of-Authorship}     \input{Component/Abstract}          \cleardoublepage     \pdfbookmark{\contentsname}{toc}     \tableofcontents     \listoffigures     \listoftables     \lstlistoflistings          \chapter{Acronym}      \begin{acronym}         \acro{...}{...}     \end{acronym}          % Content     \mainmatter     \input{...}               % Appendix     \appendix     \addpart{\appendixname}     \input{Appendix/...}     \input{Appendix/...}     \input{Appendix/...}     \input{Appendix/...}          % Bibliography     \backmatter     \printbibliography          \end{document}      Any idea?


title: special font has glyph but is xelatex reports "missing character"

text: I am using TeXLive 2011 on Linux with a font called `sasmono`. When I compile my LaTeX source with xelatex, it reports                (./myoutput.lst     Missing character: There is no ^^83 in font [/u/tiarno/tests/sasmono/sasmono.tt     f]/ICU:!      My LaTeX source:               \documentclass{book}     \usepackage{fontspec}     \begin{document}          some text          {         \fontspec[       Path = "/u/tiarno/tests/sasmono/",       Extension = .ttf]{sasmono}     \input{myoutput.lst}     }          \end{document}      The `sasmono.ttf` file is in the specified directory. When I open that file in FontBook on my Mac or in the font viewer on Windows, it shows a horizontal box-drawing character in slot 0x83 (131 decimal). The resulting PDF shows little boxes where the glyph would normally be. The external file `myoutput.lst` is generated from another program. Am I missing something in my xelatex set up or maybe there's a problem with the font?


title: Image scale won't work in ChemStyle

text: \documentclass{article}     \usepackage{chemstyle}          \begin{document}         \begin{scheme}[ht]             \includegraphics[scale=0.8]{schemes/lab1}             \caption{Experiment 1 reactions and mechanism}         \end{scheme}     \end{document}      When I don't use `scale`, this MWE works fine. However, when I use `scale`, I get the errors:               Runaway argument?     scale=0.8]{schemes/lab1} \caption {Experiment 1 reactions and mechanism} \end {scheme}      /Users/Zak/Documents/McGill/CHEM 222/TSWLatexianTemp_001549.tex:16: Paragraph ended before \Gin@iii was complete.      and               \begin{document} ended by \end{scheme}.      What am I missing?


title: To-do-notes in a separated TeX file

text: Is it possible to compile a file with the `extract` package that just includes the `\listoftodos` (`todonotes` package) of another file?


title: Switch beamer font families in general

text: A standard document (e.g. `scrreprt`) uses roman font family for text and Sansserif font family for titles etc. It is the other way round in `beamer`. How can I switch the two font families? Or why do `beamer` define the font families in this way? For the background: I think this is my problem when using formulas, because they use the Sansserif font instead of the roman version. Formulas using the `euler` package look really poor. P.S.: I compile with LuaLaTeX using TeXlive 2013.


title: Can \usepackage{color} and \input tikz work together in Plain TeX/eplain?

text: I use Plain TeX and Eplain. In my document I'm using both the `color` and `url` packages inside the `\beginpackages..\endpackages` block. Just now I tried adding `\input tikz.tex` (as the TikZ manual states) to the document and got the error:               Package pgfbase: Error! Unsupported color model `'. Sorry.      over and over. The document's colors were all wrong (indeed, they were gone) and the document looked terrible. I figured that the `color` package somehow conflicted so I removed that and disabled the hyperlinks I was using which automatically introduce color. Is there any way to get the `color` package with Eplain and TikZ to play nicely together? I'd rather not disable hyperlinks. Edited to add: Here's a sample input file, as requested.               \input eplain     \beginpackages       \usepackage{url}       \usepackage{color}     \endpackages     \enablehyperlinks     \hlopts{}          \input tikz               \definexref{anchor}{display}{type} Hi there. This refers to the \ref{anchor}.          \bye      This file will produce the warning above and also produce odd-looking PDF output. Without the `\input tikz` it should look normal.


title: Tufte-handout caption overlapping figure

text: I am attempting to display three figures, side by side in a table. I've placed the table inside the figure* environment to make the table the full width of the page, however the corresponding caption then overlaps the table. I can hackishly fix this by appending an empty row to the bottom of the table and making it sufficiently large, but I was wondering if there is a more elegant solution. Here is a model working example               \documentclass[nohyper,nofonts]{tufte-handout}     \usepackage{pgfplots}     \usepackage{lipsum}     \newcommand{\emptyfig}{\begin{tikzpicture}%         \begin{axis}[width=\textwidth/3,height=\textwidth/3]%                 %\addplot[black] coordinates { (0,0) (1,1) };         \end{axis}%     \end{tikzpicture}}     \begin{document}     \begin{figure*}         \begin{tabular}{ccc}                 \emptyfig & \emptyfig & \emptyfig \\                 Hi & Hi & Hi         \end{tabular}         \caption{This is an overlapping caption}     \end{figure*}     \end{document}      and the corresponding output. ![Model working example output](http://i.stack.imgur.com/z81w3.png)


title: Add prefix command(s) - counter of todos

text: I would like to see the number of `todos` I have left. Therefor I tried to redefine the `todo` command as follows:               \newcounter{todocounter}     \renewcommand{\todo}[2][]{\stepcounter{todocounter}\todo[#1]{#2}}      However this seems to cause an infinite loop (the todo inside the definition seems to use the todo in the declaration). Searching only yielded this which does not help in my case. Is there a trick to make this work? (etoolbox/ can I use some expansion time wizardry/would an alias help) I do not want to replace all `todo`s with `numberedTodo` or similar.


title: Behavior of xparse and "token"-type argument

text: Please consider the following example:               \documentclass{minimal}          \usepackage{xparse}     \NewDocumentCommand{\f}{tx}{\IfBooleanTF{#1}{true}{false}}          \begin{document}     \f{x}          \f[x]          \f x     \end{document}      The result looks like this:               falsex     false[x]     true      Which isn't what I expected. I expected that one of the first two would print "true", and the last one to print "false x". What is happening here? Is this the intended behavior? Follow-up question: is there a way to get the behavior, ie. an argument that gives False when absent, and True when present?


title: Adjusting font size for fake perspective

text: I'd like to add text on the paths on the left side with font size continuously adjusted from `\Huge` to `\tiny` to achieve a perspective like effect. The font size steps shouldn't be `\Huge`, `\huge`, `\LARGE`, … `\tiny`, but font size should take values between the listed sizes too. ![](http://i.stack.imgur.com/zXWBt.png) I'd like to achieve something like this: ![](http://i.stack.imgur.com/CNdm4.png) And put it on the paths on the first figure.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{decorations.text}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}          \begin{document}          \begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]     % BOTTOM_1     \path [decorate,%         decoration={text along path,%         text={|\tiny|~~Lorem ipsum dolor sit amet, dona abstulit meis~||},%         text align={fit to path stretching spaces}}]             (373.7500, 406.2500) -- (586.2500, 406.2500);          % BOTTOM_2     \path [decorate,%         decoration={text along path,%         text={|\scriptsize|~~commendet' permansit in. Adhibitis amor est~||},%         text align={fit to path stretching spaces}}]             (366.6667,413.3333) -- (593.3333,413.3333);          % BOTTOM_3     \path [decorate,%         decoration={text along path,%         text={|\footnotesize|~amet constanter determinatio debitis torporis~||},%         text align={fit to path stretching spaces}}]             (358.5714,421.4286) -- (601.4286,421.4286);          % BOTTOM_4     \path [decorate,%         decoration={text along path,%         text={|\small|~quin. Suam ad quia ei quoque sed dominum oculo~||},%         text align={fit to path stretching spaces}}]             (349.2308,430.7692) -- (610.7692,430.7692);          % BOTTOM_5     \path [decorate,%         decoration={text along path,%         text={|\normalsize|~capillos quam aniculae morsque nutricem valeas~||},%         text align={fit to path stretching spaces}}]             (338.3333,441.6667) -- (621.6667,441.6667);          % BOTTOM_6     \path [decorate,%         decoration={text along path,%         text={|\large|~Apollonium contigit cum. Taliarchum in modo~||},%         text align={fit to path stretching spaces}}]             (325.4545,454.5455) -- (634.5454,454.5455);          % BOTTOM_7     \path [decorate,%         decoration={text along path,%         text={|\Large|~invenit iuvenem patre ad quia illum ille~||},%         text align={fit to path stretching spaces}}]             (310.0000,470.0000) -- (650.0000,470.0000);          % BOTTOM_8     \path [decorate,%         decoration={text along path,%         text={|\LARGE|~illum decidat quam dicentes multa prima~||},%         text align={fit to path stretching spaces}}]             (291.1111,488.8889) -- (668.8889,488.8889);          % BOTTOM_9     \path [decorate,%         decoration={text along path,%         text={|\huge|~donatoris substantiae. Esse deprecor~||},%         text align={fit to path stretching spaces}}]             (267.5000,512.5000) -- (692.6609,512.5000);          % BOTTOM_10     \path [decorate,%         decoration={text along path,%         text={|\Huge|~cum magna Dianam Interposito eum.||},%         text align={fit to path stretching spaces}}]             (237.1429,542.8571) -- (722.8571,542.8571);          % LEFT_6     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,280.7209) -- (940.1713,332.1807);          % LEFT_5     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,368.2026) -- (940.1713,368.2026);          % LEFT_4     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,455.6843) -- (940.1713,404.2245);          % LEFT_3     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,543.1661) -- (940.1713,440.2464);          % LEFT_2     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,630.6478) -- (940.1713,476.2683);          % LEFT_1     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,718.1295) -- (940.1713,512.2902);          % BOTTOM_LEFT     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (682.8721,805.6112) -- (940.1713,548.3120);              % BOTTOM_RIGHT     \path[draw, cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}}]         (1300.3902,548.3120) -- (1557.6894,805.6112);          % path3109     \path[cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}},draw=black,line       join=miter,line cap=butt,line width=0.800pt] (682.8721,805.6112) --       (682.8721,280.7209);          % path3111     \path[cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}},draw=black,line       join=miter,line cap=butt,line width=0.800pt] (940.1713,332.1807) --       (940.1713,548.3120);          % path3113     \path[cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}},draw=black,line       join=miter,line cap=butt,line width=0.800pt] (940.1713,548.3120) --       (1300.3902,548.3120);          % path3126     \path[cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}},draw=black,line       join=miter,line cap=butt,line width=0.800pt] (940.1713,332.1807) --       (1300.3902,548.3120);          % path3902     \path[cm={{0.55521796,0.0,0.0,0.55521796,(-142.0,95.56731)}},draw=black,fill=black]       (940.9426,440.5375) -- (940.9426,333.5818) -- (941.8770,334.0818) .. controls       (943.1031,334.7380) and (1296.8461,547.1006) .. (1297.0831,547.3227) ..       controls (1297.1831,547.4165) and (1217.0924,547.4932) .. (1119.1038,547.4932)       -- (940.9426,547.4932) -- (940.9426,440.5375) -- cycle;          \end{tikzpicture}     \end{document}      * * * **Edit #1** Using `\foreach` in TikZ I've managed to get almost the desired effect for one character. ![](http://i.stack.imgur.com/nfqUH.png)               \newcommand\myfontsize[1]{\fontsize{#1}{10}\selectfont}          \begin{tikzpicture}         \foreach \x in {22.82086,...,6.80565}         {             \draw (-\x, 0) node {\myfontsize{\x}a};         }     \end{tikzpicture}      But still I don't know how to apply this for a series of characters (e.g. a sentence), and put the text on the path. * * * **Edit #2** Reading further the TikZ manual I found out that I can iterate through two variables simultaneously. This allows me to use different font sizes for each character in the iteration. ![](http://i.stack.imgur.com/YSiTc.png)               \begin{tikzpicture}         \foreach \i/\char in {22.82086/a,18.8170575/b,14.813255/c,10.8094525/d,6.80565/e}         {             \draw (-\i, 0) node {\myfontsize{\i}\char};         }     \end{tikzpicture}      However I have to specify the step size explicitly in the `\foreach` loop. So this raises the question that how can I calculate the step size depending on the number of characters I want to print.


title: Compare numbers with comma as decimal points

text: I want to check whether a number `\a` (read from a file) is smaller than zero using `ifthenelse`:               \ifthenelse{\a<5}{smaller}{not smaller}      This works fine when a is in the format `-1`. In the file commas (`,`) are used as decimal separators, so `\ifthenelse` fails. Any ideas on how to compare such a number of format `-1,23`? PS: I know `siunitx` could probably do it, but it seems to conflict with `csvsimple`, so it is not an option.


title: Problem in Latex2rtf

text: I installed LaTeX2rtf 2.1.1 GUI from SourceForge. I also installed MikTeX, Imagemagick and ghostscript, which is automatically detected in the environment tab. But when I run the program on a .tex file, it shows the following error. > (Not set):1 only a single file can be processed at a time. > > (Not set):1 Error! Type "latex2rtf -h" for help > > Press any key to continue Thanks in advance for any suggestion.


title: Amsmath error occurs

text: I have error > ! Missing } inserted. } l.9 { -1+2/[1+3\exp(-2|J|/k_BT)],& $T MWE               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \begin{eqnarray}  \label{eq:Cd}     \tilde C(T)=     \begin{cases}     { -1+2/[1+3\exp(-2|J|/k_BT)],& $T<T_e$;\cr\cr 0,& $T\ge T_e$.\cr}     \end{cases}     \end{eqnarray}          \end{document}      When i comment `\usepackage{amsmath}` there is no error. I can't understand how to fix it, without `\usepackage{amsmath}` commenting.


title: PGFPlots \addplot cannot read regression column

text: I am trying to plot a small dataset and a regression line for it. Here is my MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{filecontents}          \begin{filecontents}{dtat.dat}     X Y     1 9     2 8     3 4     4 2     \end{filecontents}          \begin{document}          \begin{tikzpicture}       \begin{axis}         \addplot table [x=X,y=Y] {dtat.dat};         \addplot table [x=X,y={create col/linear regression={y=Y}}] {dtat.dat};       \end{axis}     \end{tikzpicture}          \end{document}      Though I believe my file accurately reflects the examples in the manual and online, I get the following error: > Package pgfplots Error: Sorry, could not retrieve column 'create col/linear > r egression={y=Y}' from table 'dtat.dat'. Please check spelling (or > introduce nam e aliases).. The data plots accurately, but the regression line basically plots the x values (or line numbers?) against themselves and is clearly incorrect. Any help resolving this (probably simple user) error would be greatly appreciated. In case it makes a difference, I am using TeX Live on Ubuntu and Linux Mint, which are both fully up to date). The version of pgfplots.sty is 1.2.2 from 2009/02/14. (Woefully outdated I'm guessing...?)


title: How to use classicthesis?

text: Once I discovered classicthesis I fell in love with the layout and used it for study reports and so on. In the first step I downloaded the sources and customized the settings in various files as suggested in the documentation. The original project structure in this scenario is as follows.               ├── Bibliography.bib     ├── CHANGES     ├── Chapters     │   ├── Chapter01.tex     │   ├── Chapter02.tex     │   ├── Chapter03.tex     │   └── Chapter0A.tex     ├── classicthesis-config.tex     ├── ClassicThesis.pdf     ├── classicthesis.sty     ├── ClassicThesis.tcp     ├── ClassicThesis.tex     ├── ClassicThesis.tps     ├── COPYING     ├── Examples // Removed branch.     ├── FrontBackmatter     │   ├── Abstract.tex     │   ├── Acknowledgments.tex     │   ├── Bibliography.tex     │   ├── Colophon.tex     │   ├── Contents.tex     │   ├── Declaration.tex     │   ├── Dedication.tex     │   ├── DirtyTitlepage.tex     │   ├── Publication.tex     │   ├── Titleback.tex     │   └── Titlepage.tex     ├── gfx // Folded in.     ├── LISTOFFILES     └── README      In another project I realized that `classicthesis` is part of the LaTeX distribution and therefore I changed my setup. Basically, I loaded the package.               \documentclass[dottedtoc, headinclude, footinclude=true]{scrreprt}     \usepackage[pdfspacing]{classicthesis}      This dramatically reduced the overhead of files in the project. However, there are some components and settings where I still not understand how to configure them. Here is a list of particular problems.   1. Frontbackmatter (Titleback, Titlepage, acronyms, ..) are defined in separate files. How am I supposed to customized (title pages) or add values (acronyms list in Contents.tex) without including them to my project?   2. Should I add macros to the preamble of my main document such as `\newcommand{\myTime}{September 2012\xspace}` to provide the values for the title pages? As you can see I am not the experienced LaTeX user and I am still searching for best practice advices on how to create a project. Therefore, please do not hesitate correcting me if I totally misunderstood the supposed usage of the package.


title: Savebox with \bgroup/\egroup doesn't work in beamer (for environment)

text: This works:               \documentclass{article}     \newsavebox{\mybox}     \begin{document}     \savebox{\mybox}\bgroup This is a test.\egroup\usebox{\mybox}     \end{document}      But this fails (`Missing } inserted.` at the beginning of the environment and `Extra }, or forgotten \endgroup.` at the end):               \documentclass{beamer}     \newsavebox{\mybox}     \begin{document}     \begin{frame}     \savebox{\mybox}\bgroup This is a test.\egroup\usebox{\mybox}     \end{frame}     \end{document}      Note I want the `\bgroup` and `\egroup`, and not `{` and `}`, because I'm trying to create a savebox environment:               \documentclass{article}     \usepackage{graphicx}     \newsavebox{\mybox}     \newenvironment{foo}{%       \savebox{\mybox}\bgroup%     }{%       \egroup\fbox{\scalebox{0.1}{\usebox{\mybox}}}%     }     \begin{document}     \begin{foo}     This is a test.     \end{foo}     \end{document}        1. Why does it fail with beamer?   2. How can I make it work (note life's a whole lot easier for me if the `\begin{foo}`/`\end{foo}` can be within a `frame` environment, but currently it still fails wherever I move the `foo` environment, having removed the `usebox` of course)?


title: How to produce layers of running commentaries?

text: I am looking to make a quite common document for which I'm nevertheless having difficulty finding the right package/setup. I want to produce a Sanskrit document (using xelatex) of a base text with several commentaries. The look of it would be similar to what you find in the image here, except that there isn't an initial section for vocabulary. The tricky thing is that each commentary needs to be linked to the base text (similar to footnotes in ledmac) but they can be very long, stretching several pages for just a single verse in the base text, and they will have lots of other formatting: e.g., paragraph breaks, verse citations, etc. I've been trying to tweak ledmac (using memoir) but so far with not much luck. It's important, as in ledmac, that the commentaries all remain in the same position on each page (commentary 1 coming just below the base text; commentary 2 below that, etc.). Is there some simple solution I'm missing (as I suspect)? Thank you!


title: Two Captions for the table

text: I got tables working based on MWE. It was provided by @Yiannis Lazarides How to create new table environment How can I create two captions one on the top and one on the bottom.               \documentclass{article}     \makeatletter     \usepackage[figurename=Figure.,                       justification=RaggedRight,                        labelfont={bf, footnotesize},                        textfont={footnotesize},position=top]{caption}     \begin{document}     \listoftables     \def\starttable#1{%       \renewcommand{\arraystretch}{1.1}%       \minipage{0.45\textwidth}           \captionof{table}{#1}           \tabular{|c|c|c|c|}           \hline           Text-1  & Text-2 & Text-3 & Text-4 \\           \hline     }     \def\stoptable{%        \hline\endtabular        \endminipage\hspace{10pt}}     \def\R #1|#2|#3|#4{ #1&#2&#3&#4}          \newpage     \begin{table}[h]     \centering     \starttable{First table caption}      \R test|test|test|test\\      \R test|test|test|test\\      \R test|test|test|test\\     \stoptable     %     \starttable{This is the second caption}      \R test|test|test|test\\      \R test|test|test|test\\      \R test|test|test|test\\     \stoptable     \end{table}     \end{document}


title: center the listings title above the code

text: I can't manage to center the title "Listing:1" over the listing.               \documentclass[8pt,blue]{beamer}          \setbeamertemplate{navigation symbols}{}     \usepackage{subfigure}               \usepackage{fontspec}     \usepackage{xunicode}     \setsansfont{DejaVuSans}     \usepackage{polyglossia}     \setmainlanguage{greek}     \setotherlanguage{english}          \usepackage{url}     \usepackage{indentfirst}     \usepackage{float} % for images     \usepackage{color}     \usepackage{listings}      \usepackage{caption,subcaption}          \definecolor{darkgreen}{RGB}{0,163,82}     \definecolor{structure}{rgb}{0.2,0.2,0.7}     \usepackage{wrapfig}     \usepackage{listings}     \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{1,1,1}          \lstset{       backgroundcolor=\color{lbcolor},       tabsize=4,       rulecolor=,       language=c++,           basicstyle=\scriptsize,           upquote=true,           aboveskip={1.5\baselineskip},           columns=flexible,           showstringspaces=false,           extendedchars=true,           breaklines=true,           numbers=none,           prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},           %frame=false,           showtabs=false,           showspaces=false,           showstringspaces=false,           identifierstyle=\ttfamily,           keywordstyle=\color[rgb]{0,0,1},           commentstyle=\color[rgb]{0.133,0.545,0.133},           stringstyle=\color[rgb]{0.627,0.126,0.941},         }          \newcommand{\EN}[1]{\foreignlanguage{english}{#1}}     \mode<presentation>          \begin{document}               \begin{frame}[fragile]          \frametitle{intro}     \setbeamercovered{transparent}               \noindent\begin{minipage}{.5\textwidth}     \begin{lstlisting}[caption= code 1]     int main(void) {         printf("Left\n");         return 0;     }          \end{lstlisting}     \end{minipage}\hfill     \begin{minipage}{.5\textwidth}          \begin{lstlisting}[caption= code 2]     int main(void) {         printf("Right\n");         return 0;          }     \end{lstlisting}     \end{minipage}          \end{frame}               \end{document}      Here is a screenshot of what I receive: ![enter image description here](http://i.stack.imgur.com/G2Npm.png) I want the title to be centered above the code.


title: Latex - Beamer: Applies the \cancel command only a specified slides

text: In `beamer`, overlay specifications can be used to make certain text commands take effect at different times. For example, `\alert<2>` applies the alert command only on the second slide. Is there an equivalent for the `cancel` command instead on the `alert` command ?


title: Calculating checksum

text: I would like to calculate a checksum in LaTeX. My problem is that I don't know how to get the numeric value of a char. Here is the pseudo code of the algorithm:               var input = "123456789";     car output = "";     var checksum = 0;     var weight = 10;          foreach(Char c in input) {         checksum += Char.GetNumericValue(c) * weight;         weight--;     }          checksum = 11-(checksum mod 11);     if(checksum == 10)         output += "X";     else if (checksum == 11)         output += "0";     else         output += checksum;          print output;      Actually I tried this using the packages `forloop` and `xstring`:               \newcommand{\inputstr}{123456789}     \newcounter{i}     \newcounter{c}     \forloop{i}{1}{\value{i} < 10}{%         %\StrChar{\inputstr}{\value{i}} % returns one char         \setcounter{c}{\value{\StrChar{\inputstr}{\value{i}}}} % here is no convertion :(     }      Multiply and addition should be also no problem with `\multiply` and `\addcounter` but how to do the modulo operation?


title: siunitx overfull hbox dependent on table-format

text: There are a few similar questions (see here and here) regarding overfull `\hboxes` in `siunitx` tables but neither solves/explains the following. Consider this MWE:               \documentclass{article}          \usepackage{booktabs}     \usepackage{siunitx}          \begin{document}          \begin{table}[t!]%     \centering%     \sisetup{detect-none, mode=math, table-format=+1.1, table-auto-round}%     \begin{tabular}{ls[table-alignment=left]SSSS}%     \toprule%     A & \newton & 0.32 & 3.8 & -4.5 & -0.6 \\%     B & \newton & -0.12 & 1.1 & -1.6 & -1.0 \\%     C & \milli\metre & -2.45 & -7.0 & 2.3 & -4.3 \\%     \bottomrule%     \end{tabular}%     \end{table}%          \end{document}      When compiled with pdfLaTeX, overfull `\hbox` statements are present in the log file (these statements however are not picked up/flagged by `TeXniCenter` as warnings). When the `table-format` option is altered to `table-format=+2.1` the warnings are still present but when `table-format=+3.1` the warnings suddenly disappear from the log file. I have two questions:   1. Why does `table-format=+1.1` or `+2.1` produce overfull `\hbox` messages in the log file but not `table-format=+3.1`? Have I misunderstood something obvious in the `siunitx` documentation?   2. Why are the pdfLaTeX warnings not raised as LaTeX warnings? Is this something specific to TeXnicCenter or a more general behaviour?


title: Small font size for ampersand

text: I want **&** symbol in small font size. But `\small{\&}` produces italicized ampersand symbol like here. How can I get the small fontsize **&** symbol? **Edit** : figured out that, the italics was because of the theorem environment (from acm_proc_article-sp style). Is there any way to override italics only for & character?


title: Problem using \noopsort to sort on 'year' using natbib

text: In my efforts to familiarise myself with `BIBTeX` and `natbib`, I've been playing with the `xampl.bib` database which is shipped with the TeXLive 2011 distribution. I created a document (using the `plainnat.bst`style) which cited every entry in the database. Compiling the document produced console output as follows (after running PDFLaTeX for the third time):               (./xampl-citations.tex     ! Missing = inserted for \ifnum.     <to be read again>                        \def     l.15 {\citeref{book-full}                              }     ?      `\citeref` is a command I define so that I can change the citation style easily. It appears as follows in the document preamble:               \newcommand{\refcolor}{\color{Black}}     \newcommand{\citeref}{\refcolor \citep}      After a process of elimination (ie by changing entries in the `xampl.bib` database using `JabRef`), I've pinned the problem down to entries in the 'year' field of the following form:               {\noopsort{1973c}}1981      As far as I can tell `\noopsort` is correctly defined in the preamble of the `xampl.bib` file:               @PREAMBLE{ "\newcommand{\noopsort}[1]{} "     # "\newcommand{\printfirst}[2]{#1} "     # "\newcommand{\singleletter}[1]{#1} "     # "\newcommand{\switchargs}[2]{#2#1} " }      As you might imagine, I've done a fair amount of searching around to see if anyone else has reported a similar problem, and I've found a question on this resource which suggests that the problem might be an excess of curly brackets in the `.bib` file: natbib-error-when-citing-paper-with-similar-authors-and-same-year Indeed, an example section from my `xampl.bib` file does suggest that the entries contain a superfluous pair of curly brackets:               @BOOK{book-full,       title = {Seminumerical Algorithms},       publisher = {Addison-Wesley},       year = {{\noopsort{1973c}}1981},       author = {Donald E. Knuth},       volume = {2},       series = {The Art of Computer Programming},       address = {Reading, Massachusetts},       edition = {Second},       month = {10~} # jan,       note = {This is a full BOOK entry},       fileno = {91}     }      The problem is – what do I do about it? The way my set-up works is that I hold my master database in EndNote and then export entries (required fields only) into `JabRef` where I perform the necessary tweaks for `LaTeX`. This system works well for me, so I don't particularly want to change it. However, if surplus curly brackets is the cause of the problem, then how do I prevent them appearing in the `.bib` file? This is not a hypothetical question, because I will need occasionally to adjust the sort order of entries in my thesis bibliography – so I need to find a way to do it. If the `\noopsort` method cannot be made to work, are there any other options?


title: How to modify bst to abbreviate to et. al. after n authors

text: I have a bst file that shortens entries with more than 5 authors to et. al. but I would like to modify it to do so for more than 4 authors. I believe this is the relevant code snippet but how can I change it to get the modified behavior?   This question is similar to Changing BibTeX "format.names" function in .bst file to force "et al." citations for entries with more than 3 authors but since this bst file already successfully performs a similar function, perhaps the probability of this question getting an answer will be higher. This syntax really is a BeaST... If someone could even just explain to me what is going on here I'd greatly appreciate it.               FUNCTION {format.names}     { 'bibinfo :=       duplicate$ empty$ 'skip$ {       's :=       "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{vv~}{ll}{, f.}{, jj}"           format.name$           bibinfo bibinfo.check           't :=           nameptr #1 >             {               nameptr #1               #1 + =               numnames #5               > and                 { "others" 't :=                   #1 'namesleft := }                 'skip$               if$               namesleft #1 >                 { ", " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   t "others" =                     {                       " " * bbl.etal emphasize *                     }                     {                       "\&"                       space.word * t *                     }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$       } if$     }      Source: http://mirror.unl.edu/ctan/macros/latex/contrib/nature/naturemag.bst


title: Is it possible to define a `multicols{2}` preamble switch that works for \chapter?

text: With standard LaTeX, issuing `\twocolumn` in the preambe causes the document to be typeset in two columns -- except that `\chapter` will produce separate one-column chapter headings.               \documentclass{book}          \twocolumn% Note: this doesn't change page margins          \usepackage{lipsum}          \begin{document}          \chapter{foo}          \lipsum[1-2]          \end{document}      If one wants balanced columns at the end of last (chapter) pages, one may use the `multicol` package and its `multicols` environment. However, simply enclosing the whole document body in `\begin{multicols}{2}` ... `\end{multicols}` won't do because a) `\chapter` headings become part of the first column and b) the last pages of any but the last chapter won't feature balanced columns. Instead, one has to use separate `multicols` environments for every chapter and to issue `\chapter` within the optional argument of `multicols`.               \documentclass{book}          \usepackage{multicol}          \usepackage{lipsum}          \begin{document}          \begin{multicols}{2}          \chapter{First}          \lipsum[1-2]          \chapter{Second}          \lipsum[1-2]          \end{multicols}          \begin{multicols}{2}[\chapter{Third}]     \lipsum[1-2]     \end{multicols}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Vk6O1.jpg) Is it possible to define a `multicols{2}` switch similar to `\twocolumn` that may be issued in the document preamble and that produces separate one-column `\chapter` headings?


title: Where to find a list of packages at CTAN?

text: I am looking for something similar to http://www-sop.inria.fr/apics/latex/styles-eng.html (but more recent than 2001) i.e. a list of packages/styles on CTAN containing               package name - file name - version date - version - "provides" text      For example for `backref` this would be               hyperref - backref.sty - 2010/08/30 - v1.36 - Bibliographical back referencing      (possibly with linking to http:// ctan.org/tex-archive/macros/latex/contrib/ < package > and the corresponding < package >.tds.zip file, if this exists). Does such a list (or something similar) exist (and where, of course)?


title: In multiple tables, how to align columns again after variable-width columns?

text: There are multiple (e.g., 2) tables that contain similar information. Between them is one table row of white space. All tables have 3 columns. The first two columns belong together, which is why the second column has no heading. There should be a `\qquad` of white space between the longest text in the first column and the leftmost character of the second column. (It's ok to seek out the longest text manually and add the `\qquad` manually, like below.) Is there a nice way to align the third columns as illustrated below? It would be great if a solution existed without `\phantom` fiddling or breaking the table information totally apart in the source.               \documentclass{article}      \usepackage{tabularx}          \begin{document}     \begin{tabular}[t]{@{}l@{}}     \begin{tabular}[t]{@{}l@{}p{5cm}@{}|>{\raggedleft}p{1.5cm}@{}}     \textbf{Col1}            &                  & \textbf{Col3} \tabularnewline     Text1                    & Text1Description & 0.1  \tabularnewline     VerylongText2\qquad\null & Text2Description & 3    \tabularnewline     Text3                    & Text3Description & 2    \tabularnewline     \end{tabular}     \\     \\     \begin{tabular}[t]{@{}l@{}p{5cm}@{}|>{\raggedleft}p{1.5cm}@{}}     \textbf{Col1}            &                  & \textbf{Col3} \tabularnewline     Text4                    & Text4Description & 3    \tabularnewline     LongText5\qquad\null     & Text5Description & 0.2  \tabularnewline     Text6                    & Text6Description & 0.34 \tabularnewline     \end{tabular}     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/IeeIh.png)


title: Opposite command of "restrict y to domain"

text: How can I obtain the exact opposite of the command `restrict y to domain`? I have data in a table and I would like to color points inside [min:max] as black, and points outside [min,max] as red. I figured out how to place the black data by means of the `restrict y to domain` option, but I don't know how to do the opposite for the "red data".


title: Making a list with dates for labels, automatically skipping days

text: I'm making my first syllabus in LaTeX and would like to know if there is a LaTeX-y way to generate the course schedule. Something like: > 7/5 Friday: Read blah > > 7/8 Monday: Blah > > 7/10 Wednesday: Blah > > 7/12 Friday: Blah The course is Monday-Wednesday-Friday, so I'm looking for a way to generate a list that will skip Tuesday, Thursday, Saturday and Sunday. I realize that simply manually editing the labels to reflect the dates would be easy enough, there are only 40 or so class meetings, but is there a way (package or native commands I'm unfamiliar with) to do this in a more automated way? Especially because it would make using this syllabus as a template for future syllabi much easier.


title: PSTricks: What are the Learning Tutorials/Guides available for new users with hierarchical steps?

text: I am looking for materials for PSTricks learning in similar vein to Materials for learning TikZ I am always interested to learn PSTricks through our famous Just for fun PSTricks User animated answers. I know there is a lot of documentation on official site http://tug.org/PSTricks/main.cgi/ and `texdoc pst-user`. But could some TeX Graphic/PSTricks experts help new users like me for a good start point tutorial and build from there on. Is there any elaborate tutorial with examples and demos with hierarchical steps ? are there any valuable PSTricks document resources on net and examples/animations ?


title: Inserting nomenclature on a page without page number

text: I have followed this example and read nomencl package documentation and I can't find a solution. The problem is, that I want to insert nomenclature after TOC, where page numbers are turned off. That is why I get the following error written in .ilg file after makeindex command: > -- Illegal page number . All the entries are rejected, because it can't include nomenclature without value in nompageref. If I include it after the page numbering starts, than everything works as expected. Here is how the line in .nlo file looks like:               \nomenclatureentry{aCDI@[{CDI}]\begingroup Contexts and Dependency Injection\nomeqref {0}|nompageref}{}      As you can see the `nompageref` is missing value. Is there a way around to include nomenclature without the need for page number?


title: Avoid page range compression with biblatex

text: I am using `biblatex` for my bibliography and i would like it _not_ to compress page ranges at all. Can this by done with a simple argument?               \usepackage[url=false,sorting=none,firstinits=true,isbn=false,arxiv=abs,maxbibnames=99]{biblatex}     \usepackage{user}          \addbibresource[datatype=bibtex]{library.bib}     \addbibresource[datatype=bibtex]{mylibrary.bib}          \AtEveryBibitem{       \clearfield{day}       \clearfield{month}       \clearfield{endday}       \clearfield{endmonth}       \clearfield{issue}       \clearfield{number}     }          %i tried this, to avoid the execution of \mkcomprange but it doesn't help     \DeclareFieldFormat{postnote}{\mkpageprefix[pagination]{#1}}     \DeclareFieldFormat{pages}{\mkpageprefix[pagination]{#1}}          \begin{document}      here are two bibtex entries                   @article{Perdew1992,     annote = {PW91},     author = {Perdew, J.P. and Wang, Y.},     issn = {1550-235X},     journal = {Physical Review B},     number = {23},     pages = {13244--13249},     publisher = {APS},     title = {{Accurate and simple analytic representation of the electron-gas correlation energy}},     url = {http://link.aps.org/doi/10.1103/PhysRevB.45.13244},     volume = {45},     year = {1992}     }          @article{Delley2006,     author = {Delley, Bernard},     doi = {10.1021/jp0653611},     issn = {1089-5639},     journal = {The journal of physical chemistry. A},     month = dec,     number = {50},     pages = {13632--9},     pmid = {17165892},     title = {{Ground-state enthalpies: evaluation of electronic structure approaches with emphasis on the density functional method.}},     url = {http://www.ncbi.nlm.nih.gov/pubmed/17165892},     volume = {110},     year = {2006}     }      where the first one appears as > [23] J. P. Perdew and Y. Wang. “Accurate and simple analytic representation > of the electron-gas correlation energy”. In: Physical Review B 45 (1992), > pp. 13244–13249. doi: 10.1103/PhysRevB.45.13244. with full page range and the second one appears as > [26] B. Delley. “Ground-state enthalpies: evaluation of electronic structure > approaches with emphasis on the density functional method.” In: The journal > of physical chemistry. A 110 (2006), pp. 13632–9. doi: 10.1021/jp0653611. with the page range compression I want to avoid. Any help is greatly apreciated!


title: PGFplots: using the table feature

text: I have 4 sets of data that all have the same t values (x axis). Can all list be read in at once?               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.10}     \begin{document}     \begin{axis}     \addplot table{          t  actual  measured  est Q = 0.01  est Q = 0.1         .1  .1     .2107      .2107         .2107         .2  .2     .5954      .4122         .4671         .3  .3     .5940      .4820         .5464         .4  .4     .4758      .4800         .5027         .5  .5     .3183      .4207         .3661         .6  .6     .4060      .4131         .3833         }     \end{axis}     \end{document}      Can 4 lines be read in like this? If so, how can I differentiate them with 4 different markers?


title: Which typewriter font fits to Linux Libertine and supports bold letters?

text: I'm thinking about using the Linux Libertine font (`\usepackage{libertine}`) in my next TeX documents. For listings with syntax highlighting I will need a typewriter font that supports boldface. I used to use Courier (`\usepackage{courier}`), but a big disadvantage is, that the Courier font clashes with Linux Libertine. So my question is: Is there typewriter font, supporting boldface, that does not clash with the Linux Libertine font?


title: Defining a wrapper class for a set of document classes

text: Until now, I have been collecting my "frequently used packages", custom macros, and configurations in a personal style file. However, some of those configurations depend on the use of one of the `KOMA-Script` classes, and therefore (according to my own answer to Classes and packages – what's the difference?) good practice stipulates that I rewrite my personal file into a wrapper class. According to section A.4.8 of the _LaTeX Companion_ , a wrapper class file `myclass.cls` that builds on `article.cls` and passes class options specified by the user to the base class would look like, e.g.,               \ProvidesClass{myclass}     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions\relax     \LoadClass{article}     \RequirePackage{<package list>}      or, even easier,               \ProvidesClass{myclass}     \LoadClassWithOptions{article}     \RequirePackage{<package list>}      However, my base class may in fact be one of several document classes, namely `scrartcl`, `scrreprt`, or`scrbook`. I want to define some wrapper class options (named, say, `article`/`report`/`book`) that, by specifying one of them, load the corresponding `KOMA-Script` class. (If I don't specify any of them, `scrbook` shall be loaded by default.) How do I go on about this?


title: Replacing fonts in EPS/PDF files

text: I would like to have a vector graphic with the font I'm using for my captions in my PDF file. I normally create my graphics in DIA and save them as `.eps` files. In my `.tex` file I use following               \usepackage{ifpdf}     \usepackage{graphicx, epstopdf}     \ifpdf       \DeclareGraphicsExtensions{.pdf,.jpg,.png}     \else       \DeclareGraphicsExtensions{.eps}     \fi      and               \includegraphics[width=\linewidth]{my_image.eps}      to include images (and auto generate PDF files). I'm using Windows 7 (64-bit), miktex 2.9 and pdflatex


title: New options and loaded class options bug?

text: I found some odd behavior that I can't seem to get around. I'm writing a new version of a class file I did a while ago that is based on the memoir class. Now, the memoir class has two mutually exclusive options: oneside and twoside (twoside is the default). In my class, I want oneside to be the default. So the top of my class file is:               \NeedsTeXFormat{LaTeX2e}[1999/12/01]     \ProvidesClass{mythesis}[01/01/2011, v1.0, my own thesis class]     \RequirePackage{ifthen}     \RequirePackage{calc}     \AtEndOfClass{\RequirePackage{microtype}}     %     \newboolean{@myopti}     \setboolean{@myopti}{false}     \newboolean{@myoptii}     \setboolean{@myoptii}{false}     %     \DeclareOption{myopti}{\setboolean{@myopti}{true}}     \DeclareOption{myoptii}{\setboolean{@myoptii}{true}}     %     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}     \LoadClass[12pt,final]{memoir}     \ExecuteOptions{myopti,oneside}           % <remainder of class code>      Which fails to make oneside the default. If, I change it to:               \LoadClass[12pt,final,oneside]{memoir}     \ExecuteOptions{myopti}      then if, in the main file I do:               \documentclass[twoside]{mythesis}      it remains in oneside mode. The only way I can get it to work is to put               \LoadClass[12pt,final]{memoir}     \ExecuteOptions{myopti}      in the class file and then specify oneside if I want that (twoside is the default, remember, since I'm loading memoir). But I don't want to have the user need to specify oneside since I want:               \documentclass{mythesis}      to be oneside. I don't think this is a memoir problem, it's either a LaTeX2e problem, or an I-just-don't-know-the-right-way-to-do-it problem. Gracias


title: BibTeX with Plain TeX

text: The manpage of `bibtex` says that it can be used with both LaTeX and TeX. However, I did not find any resource how to do it and also no TeX book of mine explains it. Can someone provide a minimalistic example?


title: How to define and use the date format "1 Jan 2012 7.03am"

text: How can I define and use the date format "1 Jan 2012 7.03am"?


title: What fonts can I use for writing in Cyrillic in LaTeX

text: What other fonts are available to write in Cyrillic in LaTeX beside **T2A** , **T2B** , **T2C**?


title: \ExecuteMetaData command not properly 'executed' as argument of \addcontentsline

text: So, I'm creating a rather big project in LaTeX and we've got our own API defined, so my current job is to create MAN-like pages for each API function in LaTeX. The standard format we use for each function is:               \bmumansection{NAME}{%<*NAME>     %text here     %</NAME>     }     \bmumansection{SYNOPSIS}{%<*SYNOPSIS>     %text here     %</SYNOPSIS>     }     \bmumansection{DESCRIPTION}{%<*DESCRIPTION>     %text here     %</DESCRIPTION>     }     \bmumansection{RETURN VALUES}{%<*RETURN>     %text here     %</RETURN>     }     \bmumansection{POSSIBLE ERRORS}{%<*ERRORS>     %text here     %</ERRORS>     }     \bmumansection{SEE ALSO}{%<*SEE>     %text here     %</SEE>     }      `\bmumansection` is a function that handles creating the MAN like section headers and also handles labels etc. Now since API function code gets heavily re-used, we had to make our function text re-usable aswell. For this purpose we used the `catchfilebetweentags` library, which allows us to define tags and then to catch the portion of the file between those tags. (<*NAME> is an example of such a tag). Now, my problem: I want to create a contents entry for each of these functions, but without actually showing that section text. The text between the NAME tags beautifully suffices for this kind of stuff. I created my own \include command (called `\bmuinclude`), which is basically a wrapper for `\include` : define as such:               \newcommand{\bmuinclude}[1]{      \phantomsection      \addcontentsline{toc}{subsection}{ \ExecuteMetaData[functions/#1]{NAME}}       label{func:#1}      \include{functions/#1}     }      `\ExecuteMetaData` is a function that catches the file specified with `functions/#1` and then catches the text between the NAME tag. So my goal would be to get a contents line that says: Application.Connect however, due to a bug (?) or misuse of the function, what I get is this:               [functions/ApplicationConnect]NAME      It seems the actual command gets ignored and then the text that is supposed to be parameters of that command get read as text, while of course ignoring the curly braces. So, am I using this function wrong, or is it a bug in that specific function? Most importantly, is there another way of creating contents lines without the text actually showing in the document? EDIT: ## CatchFileBetweenTags.sty Source:               %%     %% This is file `catchfilebetweentags.sty',     %% generated with the docstrip utility.     %%     %% The original source files were:     %%     %% catchfilebetweentags.dtx  (with options: `package')     %%      %% This is a generated file.     %%      %% catchfilebetweentags : 2011/02/19 v1.1 - catchfilebetweentags : catch file between delimiters or tags     %%      %% This work may be distributed and/or modified under the     %% conditions of the LaTeX Project Public License, either     %% version 1.3 of this license or (at your option) any later     %% version. The latest version of this license is in     %%    http://www.latex-project.org/lppl.txt     %%      %% This work consists of the main source file catchfilebetweentags.dtx     %% and the derived files     %%    catchfilebetweentags.sty, catchfilebetweentags.pdf, catchfilebetweentags.ins,     %%      %% catchfilebetweentags : catchfilebetweentags : a new dimen corresponding to the remainder of the line     %% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>     %%      \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)        [2005/12/01]% LaTeX must be 2005/12/01 or younger     \ProvidesPackage{catchfilebetweentags}              [2011/02/19 v1.1 - Catch file between tags (FC)]     \RequirePackage{etex,etoolbox,ltxcmds}     \RequirePackage{catchfile}     \globtoks\CatchFBT@tok     \newrobustcmd*\CatchFileBetweenDelims[4]{%        \begingroup        \edef\CatchFileBetweenDelims{\endgroup           \noexpand\@testopt              {\CatchFBT@Work{\noexpand#1}{#2}{#3}{#4}}              {\noexpand\makeatletter}%        }\CatchFileBetweenDelims     }% \CatchFileBetweenDelims     \newcommand\CatchFileBetweenTags{}     \begingroup     \@makeother\<%     \@makeother\>%     \@makeother\*%     \catcode`\: 14%     \@makeother\%:     \gdef\CatchFileBetweenTags#1#2#3{:        \CatchFileBetweenDelims\CatchFBT@tok{#2}{%<*#3>}{%</#3>}[\CatchFBT@sanitize]:        \CatchFBT@Final{#1}:     }:% \CatchFileBetweenTags     \endgroup     \newrobustcmd*\ExecuteMetaData[2][\jobname]{%        \CatchFileBetweenTags\CatchFBT@tok{#1}{#2}%        \global\expandafter\CatchFBT@tok\expandafter{%                 \expandafter}\the\CatchFBT@tok     }% \ExecuteMetaData     \long\protected\def\CatchFBT@Work#1#2#3#4[#5]{%        \def\CatchFBT@setup{#5%           \long\def\CatchFile@Do####1#3{\CatchFBT@catchthepart}% discard before start-delim           \long\edef\CatchFBT@catchthepart####1#4{% capture until end-delim              \CatchFBT@tok{\endgroup                 \CatchFBT@IsAToken#1                    {\global\noexpand#1{####1}}                    {\xdef\noexpand#1{\noexpand\unexpanded{####1}}}}%                 \noexpand\CatchFBT@discardtherest}%           \long\expandafter\def                 \expandafter\CatchFBT@discardtherest                       \expandafter####\expandafter1\CatchFile@EOF{}%           \everyeof{#3#4}%           \everyeof\expandafter\expandafter\expandafter{%              \expandafter\the\expandafter\everyeof\CatchFile@EOF              \expandafter\the\expandafter\CatchFBT@tok\noexpand}}%        \CatchFileDef#1{#2}\CatchFBT@setup     }% \CatchFBT@Work     \def\CatchFBT@sanitize{%        \@sanitize        \@makeother\{%        \@makeother\}%        \endlinechar=`\^^J%     }% \CatchFBT@sanitize     \newrobustcmd*\CatchFBT@Final[1]{\@testopt        {\CatchFBT@Fin@l{#1}}{}%     }% \CatchFBT@Final     \def\CatchFBT@Fin@l#1[#2]{%        \begingroup           \endlinechar\m@ne \makeatletter #2%           \scantokens\expandafter{%              \expandafter\CatchFBT@tok\expandafter{\the\CatchFBT@tok}}%           \CatchFBT@IsAToken{#1}              {\global#1\expandafter{\the\CatchFBT@tok}}              {\xdef#1{\the\CatchFBT@tok}}%           \ifx\CatchFBT@tok#1\else\global\CatchFBT@tok{}\fi        \endgroup     }% \CatchFBT@Final     \def\CatchFBT@IsAToken#1{%        \expandafter\expandafter           \expandafter\CatchFBT@Is@Token              \expandafter\meaning\expandafter#1\string\toks                 \\\\{first}{second}\\\\%     }% \CatchFBT@IsAToken     \expandafter\def\expandafter\CatchFBT@Is@Token           \expandafter#\expandafter1\string\toks#2#3\\#4#5#6\\\\{%           \csname ltx@%              \if\relax\detokenize{#1}\relax#5%              \else second\fi oftwo%           \endcsname     }% \CatchFBT@Is@Token     \endinput     %%     %% End of file `catchfilebetweentags.sty'.      ## Example of File to be included:               \bmumansection{NAME}{%<*NAME>          Application.Connect           %</NAME>     }     \bmumansection{SYNOPSIS}{ %<*SYNOPSIS>          Application.Connect(string AuthenticationKey)           %</NAME>     }     \bmumansection{DESCRIPTION}{%<*DESCRIPTION>          This is a description of the Application.Connect function.           %</DESCRIPTION>     }     \bmumansection{RETURN VALUES}{%<*RETURN VALUES>          %unimportant text goes here      %</RETURN VALUES>     }     \bmumansection{POSSIBLE ERRORS}{%<*ERRORS>          %text here      %</ERRORS>     }     \bmumansection{SEE ALSO}{%<*SEE>           %unimportant text goes here           %</SEE>     }      ## My 'compile' file (I don't know the exact terms used for latex)               \documentclass[12pt]{article}     \usepackage{bmu}     \setcounter{secnumdepth}{-1} %This hides the number 'header' in the 'mansections'          \bmupreamble{BMU Document}          \begin{document}     \maketitle     \bmuinclude{ApplicationConnect}     \end{document}      ## And last but not least my bmu.sty package file, which I stripped off all non-related commands               \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{catchfilebetweentags}     \usepackage{verbatim}     \usepackage{hyperref}          %includes a standardized preamble for each document.     %Parameter 1 = title     \newcommand{\bmupreamble}[1]{         \title{{#1}}         \author{Me}         \date{26/01/2012}     }          \newcommand{\bmuref}[1]{        \hyperref[func:#1]{\ExecuteMetaData[functions/#1]{NAME}}     }          \newcommand{\bmuinclude}[1]{          \phantomsection      \addcontentsline{toc}{subsection}{ \ExecuteMetaData[functions/#1]{NAME}}      \label{func:#1}     \include{functions/#1}          }          \newenvironment{indentpar}[1]     {       \begin{list}{}       {\setlength{\leftmargin}{#1}}       \item[]     }     {\end{list}}          % Arguments:     % 1 - section name     % 2 - section indentation     % 3 - section contents     \newcommand{\mansection}[3]     {       % in case bookmarks are used            \subsection*{#1}       \begin{indentpar}{#2}         #3       \end{indentpar}     }          \newcommand{\bmumansection}[2]{         \mansection{#1}{1cm}{#2}     }           The functions folder is the folder where I put all the source files for my API function descriptions.


title: PNG: importing it with latex | pdflatex | xelatex

text: I never understood how `(pdf)latex` determines the size of imported bitmaps, but many years ago I experimentally elaborated simple rule that allowed me to get same output by running either `latex` or `pdflatex` compiler over same source. By this rule, natural height and width of a PNG graphics (number of pixels in height and width) should be indicated in optional argument of `\includegraphics` suffuxed with `bp` units, e.g.,               \includegraphics[natwidth=162bp,natheight=227bp]{Aston.png}      Imported graphics can then be scaled to desired size by adding the `scale` or `width` options. Most importantly is that that the result did not depend on the resolution of PNG graphics. That rule, however, appeared to not work with `xelatex`. Expected size (I mean the size of imported graphics produced by `latex` or `pdflatex`) is obtained only if DPI is 72. Here is my test source:               \documentclass{article}     \usepackage{graphicx}     \begin{document}     [natwidth=162bp, natheight=227bp, width=70bp]; DPI=72;\\     \fbox{\includegraphics[natwidth=162bp,natheight=227bp, width=70bp]{Aston.png}}          \medskip     [natwidth=200bp, natheight=287bp, width=70bp]; DPI=120; DPI=96; DPI=72;\\     \fbox{\includegraphics[natwidth=200bp,natheight=287bp, width=70bp]{200px-Hans_Bethe.png}}     \fbox{\includegraphics[natwidth=200bp,natheight=287bp, width=70bp]{Bethe-DPI96.png}}     \fbox{\includegraphics[natwidth=200bp,natheight=287bp, width=70bp]{Bethe-DPI72.png}}     \end{document}      Here is output produced by xelatex: ![output of xelatex](http://i.stack.imgur.com/m7oDN.png) So. I am in doubts now what to do with appendix to my book? It contains more than a hundred of bitmaps.


title: Tikz: drawing a line to the edge of a circle

text: If I wanted to draw a line to the edge of a circle, I could simple do the following               \pgfmathsetmacro{\a}{2}     \draw (0, 0) circle (\a cm);     \draw[-latex] (0, 0) -- ({\a * cos(angle)}, {\a * sin(angle)});      where angle is what ever I specified. So the problem I am facing is that I want to draw two sets of 3 lines. One set will correspond to the smaller circles and the other to the larger circles. The problem is the circles aren't define as above. Additionally, I want to specify different angles for each line. The code for the circles in question is               \documentclass[tikz,convert=false]{standalone}     \usetikzlibrary{through,calc,intersections}     \makeatletter     \tikzset{circle through extra radius/.code={% unorthodox addon for the through library                                                 % needs to be used after 'circle through'!                                                 % this can be avoided by slightly changing the source       \tikz@addoption{%         \pgfmathsetlengthmacro\pgf@tempa{\pgfkeysvalueof{/pgf/minimum width}+2*(#1)}%         \pgfset{/pgf/minimum width/.expanded=\pgf@tempa}%       }%     }}     \tikzset{       special style/.code={%         \if#1\tikz@nonactiveexlmark           \pgfkeysalso{@special style}%         \else           \pgfkeysalso{style/.expanded=#1}%         \fi       },       @special style/.style={draw=none,fill=none}     }     \makeatother      \begin{document}     \begin{tikzpicture}[scale = .7,         every label/.append style = {font = \small},         dot/.style = {fill, outer sep = +0pt, inner sep = +0pt,           shape = circle, draw = none, label = {#1}},         dot/.default =,         small dot/.style = {minimum size = 2.5pt, dot = {#1}},         small dot/.default =,         big dot/.style = {minimum size = 5pt, dot = {#1}},         big dot/.default =       ]         \begin{scope}[rotate around ={-23.9625:(.75, -1)}]           \begin{scope}             \clip(-1, -4) rectangle (.5, 4);             \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red, thick]             plot ({0.8 * (-1 - (\x)^2) / (1 - (\x)^2)},             {1.83 * (-2) * (\x) / (1 - (\x)^2)});           \end{scope}           \node[scale = .75, small dot = {below: \(P_1\)}] (P1) at (3, 0) {};           \node[scale = .75, small dot = {above, left = 3.5pt: \(P_2\)}] (P2) at           (-1, 0) {};           \node[scale = .75, small dot = {below, right = 5pt: \(F\)}] (F)           at (.75, -1) {};           \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);           \path ($(P1)!.7!(P2)$) coordinate (Fm) node[small dot =           {below = 10pt, right = 3pt: \(F_m^*\)}] {};           \foreach \cPoint in {1, 2}             \foreach \dDeltaRadius[count = \cRadius from 0] in             {.0cm, .4cm, .8cm}               \node[draw, red,               name path global/.expanded = \cPoint:\cRadius] at               (P\cPoint.center) (\cPoint:\cRadius) [circle through = (Fm),               circle through extra radius = \dDeltaRadius] {};           \foreach \cRadius in {1, 2} {             \tikzset{name intersections = {of/.expanded = {1:\cRadius} and                 2:\cRadius, name/.expanded = n'-\cRadius}}             \foreach \cSolution in {1, 2}               \node[black, scale = .5, big dot =               {right, below = 5pt: $\ifnum\cSolution = 1\expandafter\tilde F\else                        F\fi^*_\cRadius$}]               (n-\cRadius-\cSolution) at (n'-\cRadius-\cSolution){};             }         \end{scope}       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/NAOOZ.png) So for the bigger circles, I want to draw lines in decreasing order from `70`, `35`, and `0` degrees from the `P1`, and for the smaller circles, `-225`, `-180`, and `-145` degrees again in increasing line length order.


title: Installing LaTeX on Macbook Pro

text: I have recently bought Macbook Pro and want to install LaTeX. I am using TeXstudio, but I need to install MiKTeX which I was using earlier in Windows. Please suggest what to install as an alternative to MiKTeX for my Mac.


title: title page "sharpness" (for lack of a better word)

text: I've noticed a very small yet perceptible difference between the title pages I produce and some that I've stumbled across. Using the standard `\maketitle` command and filling in the standard author, date, abstract fields, I produce something that looks like this. However, I've come across many papers with titles that look more like this. You'll notice that in the latter case, the kerning is a bit smaller and the font seems a bit thicker. However, the font isn't bold (I tried that) and I've seen this often enough that I'm quite sure it's not a manual kerning or font weight edit, but rather just a command or package I'm not aware of.


title: Change font size in figure environment

text: I'm writing a thesis-like document and I have sketches/figures made in TikZ and plots/graph made in gnuplot with the epslatex terminal. In the gnuplot manual it says if the font is not specified it will inherit the font and size from the context in the document. I'm not sure how TikZ does it. I would like to reduce the font size of the text in the figures. How do I do that? In case it matters, I'm using the KOMA `scrreprt` class. I would very much like a way to do it so I don't have to modify the TikZ code or the tex- file produced by gnuplot. This question is _not_ about the figure captions but the text in the figures themselves, although I will change the caption font size as well, obviously :)


title: pdflatex-fmt-doesnt-match-pdftex-pool

text: Using Kile 2.1 beta 4, TeXlive2010 on Ubuntu 10.04 the call of pdflatex from kile fails with the error "pdflatex-fmt-doesnt-match-pdftex-pool" as it has been reported here. However, I can compile from the command line without any problems. Looking at the log-file I found this odd entry > _**_* This is pdfTeX, Version 3.1415926-1.40.10 (**TeX Live 2009** /Debian) > restricted \write18 enabled. > > kpathsea: Running mktexfmt pdflatex.fmt fmtutil: running `pdftex -ini > -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx > *pdflatex.ini' ... This is pdfTeX, Version 3.1415926-1.40.11 **(TeX Live > 2010) (INITEX)** restricted \write18 enabled. > (/usr/local/texlive/2010/texmf/web2c/cp227.tcx) It seems that Kile calls the old texlive 2009 (was never installed on the system). I installed Kile without recommended dependencies to overcome the texlive 2009/2010 problem and just after installation everything worked fine from the command line and using Kile. Deleting texmf-var folder and running `fmtutil --all` did not solve my problem. Did something change the configuration after system restart, if yes what and why? Is there a way to re-configure Kile or do I have to uninstall it, build the dummy package and reinstall Kile in oder to use it with TeXLive2010?


title: Remove chapter name or add appendix name to chapter

text: My document class               \documentclass[a4paper,openany,article]{memoir}      I want to add `Appendix` before the number so that `\chapter{An appendix}` displays `Appendix A An appendix` and not `A An appendix` Alternatively, if I change my document class to               \documentclass[a4paper,openany]{memoir}      and remove `chapter` so that when calling a `\chapter` it only numbers ex. `\chapter{Title 1}` results in in `1 Title 1` My doc:               \documentclass[a4paper,openany,article]{memoir}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}          \maxsecnumdepth{subsection}     \settocdepth{subsection}     %----------------------------------------------------------     \begin{document}     %-------------------------------         \frontmatter             \pagenumbering{Roman}                  \tableofcontents          %-------------------------------         \mainmatter                       \chapter{Introduction}                       \appendix                  \addappheadtotoc                  \chapter{Derivations}                  \section{Celerity at arbitrary depth}\label{sec:celerity_ar_dep}                  \includepdf[pages=59,scale=1,trim = 0mm 0mm 0mm 10cm,clip]{Litteratur/Hydrodynamics2012.pdf}          %-------------------------------         \backmatter          \end{document}