title: Running BibTex from TextMate

text: I'm trying to run bibtex from TextMate, but it doesn't seem to be working. After I run `pdflatex` from Textmate, I click "Run BibTeX" to which I get the following               This is BibTeX, Version 0.99c (Web2C 7.5.7)          The style file: plain.bst          Found 0 errors, and 0 warnings in 0 runs          bibtex exited with status 2      After running latex several times, all that shows up in the PDF is "References" with nothing below it. I'm using latex version `pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)` on mac osx 10.6 **Update 1** when i try to run bibtex from the command line i get this               $ bibtex ME265_Paper     This is BibTeX, Version 0.99d (TeX Live 2010)     The top-level auxiliary file: ME265_Paper.aux     The style file: plain.bst     I couldn't open database file ME265_Paper.bib     ---line 31 of file ME265_Paper.aux      : \bibdata{ME265_Paper      :                     }     I'm skipping whatever remains of this command     I found no database files---while reading file ME265_Paper.aux      Thanks for the help.


title: Best script for automatically copying references from a centralised bib file based on aux file

text: In a previous question I asked about best practices when managing multiple bibtex files. One strategy involves having a single centralised bibtex file. Then, citations in a particular article are imported based on an aux file. While it is possible to do the importing manually using JabRef, I would like to be able to automate the process as part of a makefile. My question:   * Which of the various scripts that are available would be best for this purpose?   * Which of them work on Windows?   * Are there are any other general tips related to automating the extraction of citations for a particular article from a centralised bibtex database? The ones that I've seen mentioned:   * bibtools: particularly aux2bib and `subset`   * bibexport   * bibtool   * bibextract **Update (7/12/2010):** The reason that I want to do this is that I want to upload all files to a self-contained repository. I'd also like others to be able to re-use components of the repository (e.g., the bib file). For example someone might want to get a copy of all the references in my paper and add them to their bibtex database.


title: Override \centering to left justify an image

text: ## Background Dozens of source code snippets inserted into a document as images inside of Algorithm floats. Other images are screen captures, inserted as Graphics floats, to make a distinction. All Graphic floats should be centred, thus the preamble contains:               % Resize figures that are too wide for the page.     \let\oldincludegraphics\includegraphics     \renewcommand\includegraphics[2][]{%       \oldincludegraphics[width=\ScaleIfNeeded]{#2}       \centering     }      This works, as `ScaleIfNeeded` is defined elsewhere, resulting in all images being centred, including the Algorithm images. ## Problem The Algorithm floats also contain images, and these images are centred, which is undesirable. The code for each Algorithm resembles:               \begin{algorithm}[H]     \includegraphics{source/sql/query-formatted.sql.png}     \caption{\label{alg:Query-with-Formatting}Query with Formatting}     \end{algorithm}      ## Ideas Tried:               % Centre algorithms.     \let\oldalgorithm\algorithm     \let\endoldalgorithm\endalgorithm     \renewenvironment{algorithm}[1][ht]{%       \begin{flushleft}       \oldalgorithm[#1]       \end{flushleft}       }%       {\endoldalgorithm}      This results in a number of errors ("Missing `}` inserted", amongst others). ## Question How can images embedded exclusively within Algorithm floats be left-justified? ## Bonus Question How can a thick, left-hand vertical rule (or any stylistic change) be made to the Algorithm floats? For example, the left-hand border on the "batch source text" from this indirectly-related question. (Or any source code snippets on SuperUser.com, for that matter.) Thank you!


title: Wrap latex environment

text: I'm a beginning latex user. I have some programming code in my document which I format using the lstlisting environment from the package listings. However this still allows the code segments to be split into two pieces when placed near the end of a page. To fix this I also use a figure environment for code. This causes an often recurring pattern:               \begin{figure}[H]     \begin{lstlisting}     ..code..     \end{lstlisting}     \end{figure}      How can I define a new environment for this pattern? I tried:               \newenvironment{mylisting}     {     \begin{figure}[H]     \begin{lstlisting}     }     {     \end{lstlisting}     \end{figure}     }      However using this environment gave errors all over.


title: Horizontal Table spacing problems

text: I've created a horizontal table using the tabular package. The rotating package isn't playing nicely with one of my other packages, so I can't use `\sidewaystable`. However, my table still runs off the page. Is there any quick fix where I can get my columns to have a fixed width and fit on the page. Thanks               \documentclass[12pt]{article}     \usepackage{array,longtable,pdflscape}     \begin{document}          \begin{landscape}     \begin{table}     \begin{tabular}{lllllllllllllll}      & \multicolumn{11}{l}{\begin{tabular}[c]{@{}c@{}}Current\\   Affiliation\end{tabular}} &  &  &  \\     Affiliation at Age 16 & \multicolumn{1}{c}{Evangelical Protestant} & \multicolumn{1}{c}{Mainline Protestant} & \multicolumn{1}{c}{Historically Black Protestant} & \multicolumn{1}{c}{Catholic} & \multicolumn{1}{c}{Mormon} & \multicolumn{1}{c}{Orthodox} & \multicolumn{1}{c}{Jewish} & \multicolumn{1}{c}{Muslim} & \multicolumn{1}{c}{Buddhist} & \multicolumn{1}{c}{Hindu} & \multicolumn{1}{c}{Unaffiliated} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} \\     Evangelical Protestant & 50.4 & 17.1 & 3.7 & 8.7 & 0.3 & 0.0 & 0.0 & 1.0 & 0.1 & 0.0 & 16.1 &  &  &  \\     Mainline Protestant & 17.7 & 48.0 & 3.4 & 9.7 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 21.2 &  &  &  \\     Historically Black Protestant & 11.5 & 2.5 & 62.9 & 7.9 & 0.0 & 0.0 & 0.0 & 1.6 & 0.6 & 0.0 & 10.8 &  &  &  \\     Catholic & 10.5 & 4.2 & 1.3 & 68.5 & 0.3 & 0.1 & 0.3 & 0.0 & 0.7 & 0.1 & 12.1 &  &  &  \\     Mormon & 4.0 & 3.7 & 0.0 & 7.4 & 61.6 & 0.0 & 5.5 & 0.0 & 2.5 & 0.0 & 15.3 &  &  &  \\     Orthodox & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 100.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 &  &  &  \\     Jewish & 0.0 & 0.0 & 0.0 & 11.3 & 0.0 & 0.0 & 48.3 & 0.0 & 0.0 & 0.0 & 40.4 &  &  &  \\     Muslim & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 70.9 & 0.0 & 0.0 & 29.2 &  &  &  \\     Buddhist & 0.0 & 0.0 & 0.0 & 0.0 & 38.7 & 0.0 & 0.0 & 0.0 & 61.3 & 0.0 & 0.0 &  &  &  \\     Hindu & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 & 100.0 & 0.0 &  &  &  \\     Unaffiliated & 20.9 & 2.5 & 4.3 & 19.7 & 2.6 & 0.0 & 0.8 & 0.0 & 1.9 & 0.0 & 41.8 &  &  &  \\     Net Loss & 4.7 & 165.7 & 16.6 & -26.0 & -11.9 & 80.4 & -14.8 & 27.9 & 278.9 & 32.7 & 221.0 &  &  &  \\     Proportion of the Population & 18.1 & 7.7 & 4.2 & 47.6 & 1.4 & 0.1 & 0.9 & 0.5 & 0.7 & 0.2 & 15.6 &  &  &  \\      &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\      &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\      &  &  &  &  &  &  &  &  &  &  &  &  &  &     \end{tabular}     \end{table}     \end{landscape}          \end{document}


title: Fitting equation inside a column

text: I am using twocolumn revtex mode, and for my matrix to fit inside the column I used this 'trick'               \begin{equation}     \resizebox{1.\hsize}{!}{     \bordermatrix{~ & \tau & r & \theta & \varphi \cr                   & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) &\cr                   & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & \cr                   & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) \cr                   & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) & h_{\tau\tau}=\bigo(r^2) \cr}}     \end{equation}      Which is fine, since this fits my matrix inside the column, but I don't like what it does to the numbering: ![enter image description here](http://i.stack.imgur.com/Nq6za.png) Is there a way to have one line of space between the matrix and the numbering? Or do I need to load some dreaded code inside for it to work? I looked at some examples here, but I would like a minimal code adjustment (like `\resizebox` for example)...


title: How to make a new tex command in org-mode-latex?

text: In a general tex-file, one can easily define a new command, for my case, let me take this as an example: To put this code in header               \newcommand{\dd}{\,\mathrm{d}}      I can use the shorter command to make the longer command work; it's good to do this, I also can compile org-file into tex if this command is added in header. However the preview `C-c-x-l` fails to recognize `\dd` even if this new command have been defined in header. I think we can add some code in org package to make this work, right? how can I do this? I want to make preview `C-c-xl` recognize `\dd` as `\mathrm{d}`. ## Update Let me expound my question. I hope we can amend or add some codes in `~/org path/lisp/org-latex.el` to make `preview` recognize `\dd` as `\,\matherm{d}` in every org-file. The way @pmr posed works in each org-file which added that code by hand. I expect we can make this as default and needn't to add such code every time.


title: How do I create transition arrow labels with new lines?

text: I am using the TikZ package to draw pushdown definite automata. How do I add new lines into the labels of transition arrows? This does not work:               \begin{tikzpicture}[shorten >=1pt,node distance=3.5cm,on grid,auto]        \node[state, initial, initial where=left, accepting] (A) {A};          \path[->]          (A) edge [loop above] node {$a, b, c$ \\ $c, d, e$ \\ foo \\ bar} (A);     \end{tikzpicture}      Specifically, `{$a, b, c$ \\\ $c, d, e$ \\\ foo \\\ bar}` ignores the new lines.


title: Cannot export LyX file to html with Elyxer

text: When I attempt to convert any LyX file to html using the Elyxer converter included in my LyX installation, it fails with the following error messages:               10:43:13.702: Previewing ...     10:43:13.708: (buffer-view html)     10:43:13.735: elyxer.py --directory "C:/Users/Alex/Desktop/" "testfile.lyx" "testfile.html"      Error: Cannot view file     ----------------------------------------     File does not exist: C:/Users/Alex/AppData/Local/Temp/lyx_tmpdir.sHBCEHS11900/lyx_tmpbuf0/testfile.html     10:43:22.298: Error while previewing format: HTML      I've successfully used the Elyxer converter on this computer in the past, and I'm not aware of any changes I've made to the LyX installation that should have an effect on Elyxer. I've tried running as admin and reconfiguring LyX. The pdflatex and lyxhtml converters both work smoothly for all files I've tested.


title: A macro which is similiar to \prescript but it can be used in text mode

text: How to define a macro, say `\pretextsuperscript`, to get a presuperscript ahead a word in text mode? Just simply write `\textsuperscript{2}hormone` and `\textsuperscript{2}population` is incorrect. Why say that you can see from               \usepackage{mathtools}     \begin{document}     $\prescript{2}{}{h}$ $\prescript{2}{}{p}$     \end{document}      The prescript (in former sample is "2") should be vertically adjusted with the first letter of the argument of prescript. Also, the prescript should be upshape. I found the `\prescript` can only be used in math mode.


title: In a table how do I add vertical lines between each column?

text: I have this as my current table which is fine, but I would like there to be vertical lines too just to make it look that bit neater. I'd also like horizontal lines between each row but this would require resizing the rows to avoid the fractions on the right column clashing with the line?               \begin{center}     \begin{tabular}{cc}         \toprule         \bfseries $f(t)$ &          \bfseries $\Lap[f(t)]$\\         \midrule         $k$ & $\frac ks$ \\ $e^{at}$ & $\frac{1}{s-a}$ \\ $\sin{(at)}$ & $\frac{a}{s^2+a^2}$ \\ $\cos{(at)}$ & $\frac{s}{s^2+a^2}$ \\ $t^n$ & $\frac{n!}{s^{n+1}}$ \\ $\sinh{(at)}$ & $\frac{a}{s^2-a^2}$ \\ $\cosh{(at)}$ & $\frac{s}{s^2-a^2}$ \\         \bottomrule          \end{tabular}     \end{center}


title: How can we display fireworks?

text: Soon we can celebrate the New Year. How can we use TikZ for drawing fireworks? For example like this, photographed by Kurume-Shimin, found on Wikipedia: ![Fireworks Aug 5, 2011 in Kurume, Fukuoka, Japan](http://i.stack.imgur.com/ezcwz.png) Click on Image search for getting further impressions. On the Wikipedia page you can see further effects, just click the image. I would like to post a nice drawing on our blog for celebrating New Year, and as addition to the TikZ example gallery on this occasion.


title: creating implication and equivalence symbols of intermediate length

text: It is said that using the commands `\implies` and `\iff` is preferred over `\Rightarrow` and `\Leftrightarrow`, because they give wider spacing around and thus more prominence to the characters. (This other question discusses this.) Alas, I find these symbols a bit too long; this might or might not have to do with my "native" typographic tradition (German). **How can I define implication/equivalence arrow symbols of intermediate length (and I suppose also intermediate spacing)?** (Bonus if the solution is a unit that is selected as a single symbol and pastes with the right Unicode codepoints (U+21D2 and U+21D4; I _think_ there are no (longer or whatnot) alternatives), using `accsupp` I suppose.)


title: What does \s! do?

text: 1st example:               \starttypescript [\s!serif] [paratype]       \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default]       \definefontsynonym [ParatypeSerif-Italic] [\s!name:PTSerif-Italic] [\s!features=\s!default]       \definefontsynonym [ParatypeSerif-Bold] [\s!name:PTSerif-Bold] [\s!features=\s!default]       \definefontsynonym [ParatypeSerif-BoldItalic] [\s!name:PTSerif-BoldItalic] [\s!features=\s!default]     \stoptypescript      2nd example:               \definefont[SerifS][\s!file:GenBkBasR at \smallfontsize]      Is `\s!` only related to fonts? Should I use it in my typescript files?


title: supertabular and twocolumn blank column

text: We are using minipage supertabular with a twocolumn mode for our reports and were observing strange behaviour lately. There are some cases, when the subsubsection is at the top of the second column and the supertabular elements don't fit below it, though there is place for them, therefore they get skipped to the next page. This produces an ugly blank column with the section at the top. Here is an example, which reproduces this behaviour:               \documentclass[12pt,twocolumn]{report}     \usepackage{supertabular}     \usepackage[utf8x]{inputenc}     \setlength{\parindent}{0pt}     \usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}     \usepackage{forloop}          \begin{document}          \newcounter{counter}     \forloop{counter}{1}{\value{counter} < 44}{       placeholder\\     }          \mbox{}\newline     \subsubsection*{Research in Astrophysics}     \begin{mpsupertabular}{p{1,4cm} p{6,1cm}}     E1.1 & Accreting Neutron Stars\\ & MSO: Name of a scientist \\     \end{mpsupertabular}\\               \end{document}      There are several ways to fix it manually (insert `\newpage` before subsubsection, wrap the subsubsection and the next supertabular with `\vbox{}`). But the question is how to prevent it from happening for an automated output? For some reason ST thinks there is no page height left for the table (found through `\sttraceon`), so it inserts a pagebreak. Is it a bug?


title: How can I create this kind of flow chart?

text: I am creating a beamer presentation. I try to create a tikz flow chart. Here is my production. T_T ![enter image description here](http://i.stack.imgur.com/FvOws.png) Actually, what I want to do is ![enter image description here](http://i.stack.imgur.com/I8THJ.png) Be grateful with any help! So frustrated now.               \documentclass{article}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}     \pagestyle{empty}     % Define block styles     \tikzstyle{decision} = [diamond, draw, fill=blue!20,     text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]     \tikzstyle{block} = [rectangle, draw, fill=blue!20,     text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{line} = [draw, -latex']     \begin{tikzpicture}[node distance = 2cm, auto]     % Place nodes     \node [block] (begin) {begin};     \node [block, below of=begin] (input) {input};     \node [block, below of=input] (data) {initdata };     \node [decision, below of=data] (judge) {judge the data};     \node [block, right of=judge, node distance=4cm] (output) {update model};     \node [block, below of=judge] (sum) {s=s+(i-1)};     \node [block, below of=sum, node distance=3cm] (increase) {i=i+1};     % Draw edges     \path [line] (begin) -- (input);     \path [line] (input) -- (data);     \path [line] (data) -- (judge);     \path [line] (sum) -- (increase);     \path [line] (judge) -| node [near start] {no} (output);     \path [line] (judge) |- node [near start]{yes}(sum);     \path [line] (increase)--(judge);     \end{tikzpicture}     \end{document}


title: Error for nomenclature: Paragraph ended before \@@@nomenclature was complete

text: I am facing the same problem. I always get the the error:               ! Paragraph ended before \@@@nomenclature was complete.       I am using this nomenclature:               \usepackage{ifthen}      \usepackage{paralist}      \usepackage{makeidx}      \usepackage{nomentbl}      \toprule      \usepackage{booktabs}      \nomenclature      \newcommand{\abk}{\nomenclature}      \renewcommand{\nomname}{Abkuerzungsverzeichnis}      \setlength{\nomlabelwidth}{.20\hsize}      \renewcommand{\nomlabel}[1]{#1 \dotfill}      \setlength{\nomitemsep}{-\parsep}      \renewcommand\nomgroup[1]{%         \ifx#1L\relax           \large \bfseries Lateinische Formelzeichen         \fi         \ifx#1G\relax           \large \bfseries Griechische Formelzeichen         \fi         \ifx#1A\relax           \large \bfseries Abkürzungen         \fi         \ifx#1I\relax           \large \bfseries Indizes         \fi         \ifx#1K\relax           \large \bfseries Kennzahlen         \fi}           \makenomenclature       Any ideas? I am using ISO-8859-15.


title: Varying header by book part

text: I am trying to generate latex code that can be used to bring together minimally formatted chapters from many authors into a single report that has three parts. The section hierarchy that I am using is `/part /chapter /section /subsection /subsubsection`. Presently I have a single header throughout the document but I would like to have the partname in the header in parts 2 and 3 but not part 1 on every page except the part title page. I've tried with `/thepart` in the header and I think because I am using unnumbered parts it isn't working. I know I should be able to make this work from the examples that I've read here but no luck My code for the project is here with a built PDF: https://github.com/trosendal/report_template Thanks! Thomas Here is just the .tex code:               %%%%%%%%% The format of the report goes here %%%%%%%%%%%%%%%%%%%%%               %%A two sided book that has space for binding on the left side:     \documentclass[a4paper, twoside]{report}     \usepackage[top=4cm, bottom=2.5cm, left=2.5cm, right=2.5cm, bindingoffset=1cm]{geometry}     %use correct character encoding     \usepackage[utf8]{inputenc}          %Choose a font family:     %\usepackage{bookman}     %\usepackage{avant}     %\usepackage{chancery}     \usepackage{courier}     %\usepackage{newcent     %\usepackage{palatino}          \title{\textbf{\huge{Title of Report}}}     \author{The list of authors}          \usepackage{color}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage[hidelinks]{hyperref}     \usepackage{multicol}     \usepackage{url}          %%Separated the columns by a 6 mm     \setlength{\columnsep}{0.6cm}          %%Sort out the spacing a style of the paragraph, section, subsection, subsubsection and chapter titles          \usepackage[compact]{titlesec}          \titleformat*{\section}{\normalfont\scshape\color{red}}     \titlespacing*{\section}{0pt}{12pt}{0pt}          \titleformat*{\subsection}{\small\bf}     \titlespacing*{\subsection}{0pt}{12pt}{0pt}          \titleformat*{\subsubsection}{\small\bf}     \titlespacing*{\subsubsection}{12pt}{12pt}{0pt}          %%Add a header on eack page          \usepackage{fancyhdr}     \renewcommand\headrule{}     \pagestyle{fancy}     \fancyhead{} % clear all header fields     \fancyhead[LE,RO]{\textcolor{red}{\uppercase{HEADER TEXT}}}          %Even add the header on the plain pages like the first page of each chapter     \fancypagestyle{plain}{%     \fancyhead[LE, RO]{\textcolor{red}{\uppercase{HEADER TEXT}}}}          %%define the boxes around stuff:          \usepackage{tcolorbox}          \newtcolorbox{mybox}{colback=blue!5!white}          \newtcolorbox{mytitlebox}{colback=blue!5!white, valign=top, height=3.5cm,%     enlarge left by = -5cm, width=24cm}                    %%%%%%%%% The content in the report goes after this break %%%%%%%%%%%%%%%%%%%%%                         \begin{document}          %%The Title page     \maketitle          %%The table of contents     \begin{multicols}{2}       \tableofcontents     \end{multicols}          %%The Introduction (Part1)          \input{chapters/chapter1/input}          %The chapters in Part2          \newpage     \begin{mytitlebox}     \part*{PART2}     \addcontentsline{toc}{part}{\bf{PART2}}     \end{mytitlebox}          \input{chapters/chapter2/input}     \input{chapters/chapter3/input}          %The chapters in Part3          \newpage     \begin{mytitlebox}     \part*{PART3}     \addcontentsline{toc}{part}{\bf{PART3}}     \end{mytitlebox}          \input{chapters/chapter4/input}          \end{document}


title: blackletter1 and yfrak

text: A follow-up to my earlier question. I have implemented `\textfraktone` using the `blackletter1` fonts and the T1 encoding, but I get different results to that from using the `\textfrak` from the `yfonts` package: specifically the final "s". I think `\textfraktone` is correct (as one should not use a "medial s" at the end of a word), is this a bug in `\textfrak`? A minimal example:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{yfonts}     \newcommand{\textfraktone}[1]{{\fontfamily{yfrak}\selectfont #1}}     \begin{document}     With \verb|\textfrak|: \textfrak{Greis},       with \verb|\textfraktone|: \textfraktone{Greis}.     \end{document}


title: Change fontsize inside float in KOMA class

text: I need to change the fontsize to 11pt inside a table environment. The default setting of the document is 12pt using `scrartcl`, but I need to change this to exact 11pt in the float (the reason is that there are dozens of tables that have been created to fit exactly 11pt before). I use KOMA's `\changefontsizes{11pt}` to do this, but this generates dozens of warnings: > Using fallback calculation to setup font sizes for basic size '11pt' on > input line... This is a bit confusing, because if I change the whole document to 11pt these warnings go away, hence 11pt should exist. I thought the `changefontsizes` command was created for exactly this purpose. So if anyone could tell me how to do this properly I would be grateful.               \documentclass{scrartcl}[12pt]          \usepackage{lipsum}          \begin{document}          \lipsum[1]          \begin{table}\centering     \changefontsizes{11pt}\footnotesize     \begin{tabular}{|c|c|c|}       \hline       1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\       \hline     \end{tabular}     \end{table}          \end{document}


title: Importing LaTeX table code into LyX

text: I create tables in a spreadsheet program, convert them to LaTeX code and then use an ERT to import into my LyX document. When I paste the LaTeX code the entire thing turns out very ugly looking. The table, however, works fine but its impossible to edit within LyX due to the ugly formatting when pasted. Is there a way to import a LaTeX file into a table float instead of inserting an ERT in LyX?


title: cut an \insert too long and leave the next parts

text: My problem is in Plain TeX. I have made a minimal example to explain it:               \newinsert\example     \count\example=1000     \dimen\example=1ex     \insert\example{     "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum     }     \output={\shipout\box255\unvbox\example}          \end      As you can see, the insert is split and put in another page, but I would like the first part of the insert to be used, while the other parts (after the cut) be left, or more to be put in another insert. It's for answering this question: https://github.com/maieul/ledmac/issues/17. The problematic is this : - an insert is created on the left page. - it is too long, so it continues and right page. - but when (e)ledpar construct the //, it proceed with this method : -* Construct the left page -* If the right page is full, clear page to go to the right page. As you can see, the insert declare on the left page can't be continued on what user expected to be the right page : it continues on the right page, and after that, the "what user expected to be the right page" is built. So one solution should be : if the insert is too long, the next part is forgotten, and add to the insert of what user expected to be the right page, but after the skip to this page.


title: TeX - LaTeX in pop culture

text: I'm doing a research on free-software references in movies, TV series, etc. Things like: "in Dr. House they use KDE as DE" or "Sheldon from the The Big Bang Theory uses Ubuntu." And the like. I'd love to include some TeX/LaTeX facts, but I've not managed to find any reference. Can you help me? Only restriction is that the movie/TV series etc. must be English. I didn't know where to put this question so went for fun. Hope you don't mind this sort of questions, please forgive me if this is not allowed.


title: Something like \hfill with pstricks and XeTeX

text: I have a line of text in a `pspicture` environment and I need to distribute the words in a way like `\hfill` could do. Here is an image of what I want: ![enter image description here](http://i.stack.imgur.com/LkeMA.png) I currently have this minimal example               \documentclass[pstricks,border=2cm]{standalone}     \begin{document}     \begin{pspicture}(12,3)          \psline(1,1)(11,1)     \rput[Bl]{0}(1,1){Word LongWord Words MuchLongerWord}          % command which draws the grid and labels it     \psgrid[subgriddiv=0, griddots=10, gridlabels=12pt]     \end{pspicture}          \end{document}      Which compiles to this (using another font): ![enter image description here](http://i.stack.imgur.com/7DElj.png) How should I enhance it to get the desired result? **Condition** : I need it to compile with `xelatex` (which, as far as I have read, doesn't like the idea of putting text on a path) so I can't experiment with `pst-text` much. I don't necessarily need to place the text on any path. I essentially only need to equally **distribute the words in** a certain amount of **horizontal space**. Any ideas how to get there?


title: Putting pseudocode in a framed box

text: I added some pseudocode to my document in this style:               \usepackage{algpseudocode}          \begin{algorithmic}[1]     \If {$i\geq maxval$}     \State $i\gets 0$     \Else     \If {$i+k\leq maxval$}         \State $i\gets i+k$     \EndIf     \EndIf     \end{algorithmic}      I want my pseudocode to appear in a box, i.e. framed. I tried               \framebox{          \begin{algorithmic}[1] ...              \end{algorithmic}      }      but that gave me tons of errors and didn't divide the code on multiple lines. How can I frame my pseudocode?


title: Where can I find a manual for learning the fundamental background of LaTeX source?

text: I would like to know if there is some manual from which I can learn the bases of LaTeX programming language. I need something universal, not related to some specific package or class, that at the end allow me to have a look at various source files, to understand the code in them and even to modified some file or to create my own source files of packages or classes. I am not a beginner user of LaTeX. I have written a lot of documents using LaTeX with some standard classes and packages and with more exotic ones. What I want is not a manual that tells me how to write a document with LaTeX but how LaTeX works at its bases. For example what are macros and how to use them, how to use command like `\def`, `\if`, `\ifx`, `\fi`, `\global`, `\let`, `\relax`, the key `@`, `\DeclareOption`, `\begingroup`, etc... (I have only open the file `article.cls` and check for command that I don't know..)


title: 'Guttman yad-brush' font

text: I am familiar and kind of like this font, from (god forgive me) "Microsoft Word" program. It's actually a hebrew font. An example of the font is at this page I would like to know if it's possible to use it in LaTeX, and also if it's possible to use it with English letters as well (it looks kinda hand writing).


title: Node for arrowhead

text: I want to have one arrow point to another arrowhead. How do I roughly make a node surrounding an arrowhead?               \documentclass{memoir}          \usepackage{pgfcore}     \usepackage{pgfplots}     \usetikzlibrary{arrows}          \begin{document}          \begin{tikzpicture}       \path (0, 0) edge [-stealth'] (1, 0);       \path (1, 1) edge [-stealth'] (0.94, 0.1);     \end{tikzpicture}     \end{document}


title: How could glossaries' numberlabel use the manually defined number of Sections(or other Sectional Units)?

text: I am using 'glossaries' to make index after my book, I set the numberlist to section, so the number of the section will in the numberlabel. eg:                                              INDEX     Unix, a multitasking, multi-user computer operating system  1     Unix-like, operating system is one that behaves in a manner similar to a Unix system 2        It means that the word Unix is in the section 1, the word Unix-like is in section 2. But right now I have some sections whose names are not genarated by default, they are defined manually by the commands as follows:               \section*{2a Linux}      The meanest code is as follows:               \documentclass{book}     \renewcommand\thesection{\arabic{section}}     \usepackage[counter=section]{glossaries}     \makeglossaries               \newglossaryentry{Unix}{     name={Unix},     description={a multitasking, multi-user computer operating system}     }     \newglossaryentry{Unix-like}{     name={Unix-like},     description={operating system is one that behaves in a manner similar to a Unix system}     }     \newglossaryentry{Linux}{     name={Linux},     description={Linux was originally developed as a free operating system}     }     \newglossaryentry{FreeBSD}{     name={FreeBSD},     description={a free Unix-like operating system, an operating system}     }     \newglossaryentry{Windows}{     name={Windows},     description={a series of graphical interface operating systems}     }     \newglossaryentry{Mobile Operating System}{     name={Mobile Operating System},     description={the operating system that operates a smartphone...}     }               \begin{document}     \section{Unix}     Unix \glsadd{Unix} (officially trademarked as UNIX, sometimes also written as Unix) is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT\&T employees at Bell Labs.          \section{Unix-like}     A Unix-like \glsadd{Unix-like}(sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification.          \section*{2a \quad Linux}     Linux \glsadd{Linux}was originally developed as a free operating system for Intel x86-based personal computers. It has since been ported to more computer hardware platforms than any other operating system.          \section*{2alpha \quad FreeBSD}     FreeBSD \glsadd{FreeBSD} is a free Unix-like operating system descended from AT\&T UNIX via BSD UNIX.  Although for legal reasons FreeBSD cannot be called "UNIX".          \section{Windows}     Microsoft Windows \glsadd{Windows}is a series of graphical interface operating systems developed, marketed, and sold by Microsoft.          \section*{3delta \quad Mobile Operating System}     A mobile operating system \glsadd{Mobile Operating System}, also referred to as mobile OS, is the operating system that operates a smartphone, tablet, PDA, or other digital mobile devices.          \printglossary     \end{document}      So, if some entries are in these manually defined sections, the 'glossaries' can not read the number of setions then the numberlists of these entries don't work. Right now it looks like:                                           INDEX     Unix, a multitasking, multi-user computer operating system  1     Unix-like, operating system is one that behaves in a manner similar to a Unix system 2     Linux,Linux was originally developed as a free operating system 2     FreeBSD, a free Unix-like operating system, an operating system  2     Windows, a series of graphical interface operating systems 3     Mobile Operating System, the operating system that operates a smartphone... 3      Actually, It should like this:                                           INDEX     Unix, a multitasking, multi-user computer operating system  1     Unix-like, operating system is one that behaves in a manner similar to a Unix system 2     Linux,Linux was originally developed as a free operating system 2a     FreeBSD, a free Unix-like operating system, an operating system  2alpha     Windows, a series of graphical interface operating systems 3     Mobile Operating System, the operating system that operates a smartphone... 3delta      **How to resolve these problems? How to make 'glossaries' can read the number of sections which were defined manually correctly?**


title: Capitalization of Titles and Headers

text: I'm attempting to capitalize certain titles or headings in my LaTeX file. Specifically, if I want to use `\printindex`, `\listoffigures`, or `\listoftables` the title heading on each of these will be "Index", "List of Figures", or "List of Tables" respectively. Is there anyway to capitalize these to produce "INDEX", "LIST OF FIGURES", or "LIST OF TABLES"? Any input would be most appreciated.


title: macro: repeat a command if new page else do nothing

text: > QUESTION: How does one write a pair of macros that work in 1) beamer class > and 2) article class, respectively, such that if it, `\macroname{...}`, is > executed at a point in the code, that point repeats (run again at that point > in the code) a definite command ... if a page break (article class) or slide > break (beamer class) else `\relax` and continues to the next line of code > where it checks the condition, until the end of the document, in which case > `\fi`. This is the question. Thoughts\clarification: The `...` may be for example a `\begin{Y} X \end{Y}` type environment or another command. Or it loads an image with the graphics package at that place in the code. I presume it is doable in beamer. Making a new slide is itself an explicit command in the code, so the macro reads the next line and does nothing if this command is not present and moves on to next line if there is a next line of code else does nothing if there is no next line of code in the document. I suspect (but I may be wrong) that it is not possible in the article class, where page break is done automatically unless invoked by the typsetting explicitly and the paragraphs and images are already typeset by that time. On the other hand maybe the way to do this is to think about David Carlisle's answer in Break line only if it's too long, but breaking won't create a new page The difference here would be to set new conditions for pagebreak instead of line break (these can control it to be identical to ordinary page break, but not explicitly invoked by the macro). Then add a counter that checks if a pagebreak (invoked explicitly by the macro did occur). If it was found, then execute ... else relax and move on to the next line of code. This is done for every line within that environment, so the behavior ends when the environment ends and begins when the environment begins. I do not think it will take too long to compile, since the environment in my case would contain little text or code and will contain mostly images loaded by the graphics packages, and where they are broken to differentpages the ... would be executed right after the page break (with an expansion command?) hopefully. > SUBQUESTION: I will be working on this possible solution but does anyone > know of a better way, or has this been done before, or am I wrong entirely > in thinking it could be done with the article class? The motivation for this question: it's a step to making concise code for the topic of this question LaTeX Visual Novel Engine: Does it exist?


title: TikZ: Plane partitions with labeled faces

text: The example here gives the code for drawing plane partitions with TikZ. **I want to do two things at once:**   1. Label the top faces of the top cubes shown in any plane partition with a numeral that indicates the number of cubes in that stack. (The numeral should be slanted, of course.)   2. Change the angles in the plane partition so that the viewer seems to be looking down at the plane partition "from a higher vantage point" than what the code currently yields. (The angles for the axes could be adjusted from the current 210, -30, 90 angles to, say, 220, 40, 90.) I want to do this so that I can draw stacked cubes, like plane partitions, but with the possibility that some of the "inner" (closest) cubes are higher than those cubes stacked against the walls. Any help would be greatly appreciated. Here is a MWE (taken from the example above):               % Plane partition     % Author: Jang Soo Kim     \documentclass{minimal}     \usepackage{tikz}     % Three counters     \newcounter{x}     \newcounter{y}     \newcounter{z}          % The angles of x,y,z-axes     \newcommand\xaxis{210}     \newcommand\yaxis{-30}     \newcommand\zaxis{90}          % The top side of a cube     \newcommand\topside[3]{       \fill[fill=yellow, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (30:1) -- (0,1) --(150:1)--(0,0);     }          % The left side of a cube     \newcommand\leftside[3]{       \fill[fill=red, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (0,-1) -- (210:1) --(150:1)--(0,0);     }          % The right side of a cube     \newcommand\rightside[3]{       \fill[fill=blue, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (30:1) -- (-30:1) --(0,-1)--(0,0);     }          % The cube      \newcommand\cube[3]{       \topside{#1}{#2}{#3} \leftside{#1}{#2}{#3} \rightside{#1}{#2}{#3}     }          % Definition of \planepartition     % To draw the following plane partition, just write \planepartition{ {a, b, c}, {d,e} }.     %  a b c     %  d e     \newcommand\planepartition[1]{      \setcounter{x}{-1}       \foreach \a in {#1} {         \addtocounter{x}{1}         \setcounter{y}{-1}         \foreach \b in \a {           \addtocounter{y}{1}           \setcounter{z}{-1}           \foreach \c in {1,...,\b} {             \addtocounter{z}{1}             \cube{\value{x}}{\value{y}}{\value{z}}           }         }       }     }          \begin{document}           \begin{tikzpicture}     \planepartition{{5,3,2,2},{4,2,2,1},{2,1},{1}}     \end{tikzpicture}          \end{document}


title: pgfplots - How can I define one cycle list for all graphs (or the least amount possible)?

text: Due to all the maintenance after changing a color in a list, I tried to define just one cycle list so I do not have to update all my lists anymore. It is all in all an annoyingly huge amount of time, which I rather spend on something else. I already worked out a solved MWE and this is more of a question for reassurance. But if others are looking for a similar solution, this question might help them. I suppose there is one possible drawback to it: the font is also colored. So: is this aproper way to define one single cycle list for the use with pgfplots? ## Picture ![enter image description here](http://i.stack.imgur.com/R9RWg.png) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     amsmath,     tikz,     pgfplots,     pgfplotstable,     }          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepgfplotslibrary{groupplots}          \pgfplotstableread[col sep=comma]{     Process,ValueA,ValueB     1,66,70     2,66,40     3,24,20     4,52,60     5,64,30     6,37,30     }{\tableabcdef}          \pgfplotscreateplotcyclelist{mycolorlisttest}{%     blue!60!black,fill=blue!60!black,every mark/.append style={fill=blue!60!black},mark=*\\%1     red!70!black,fill=red!70!black,every mark/.append style={fill=red!70!black},mark=*\\%2     green!70!black,fill=green!70!black,every mark/.append style={fill=green!70!black},mark=*\\%3     gray,fill=gray,fill=gray,fill=gray,every mark/.append style={fill=gray},mark=*\\%4     orange,fill=orange,every mark/.append style={fill=orange},mark=*\\%5     brown!80!black,fill=brown!80!black,every mark/.append style={fill=brown!80!black},mark=*\\%6     green,fill=green,every mark/.append style={fill=green},mark=*\\%7     violet!80!black,fill=violet!80!black,every mark/.append style={fill=violet!80!black},mark=*\\%8     black,fill=black,every mark/.append style={fill=black},mark=*\\%9     teal,fill=teal,every mark/.append style={fill=teal},mark=*\\%10     magenta!70!black,fill=magenta!70!black,every mark/.append style={fill=magenta!70!black},mark=*\\%11     yellow!90!black,fill=yellow!90!black,every mark/.append style={fill=yellow!90!black},mark=*\\%12     }          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     \begin{axis}[     xlabel={Force in N},     ylabel={Process},     %     xbar,     %     xmin=0,     %     enlarge x limits={rel={0.2}, upper},     %     ytick=data,     nodes near coords,     nodes near coords align={right=3pt},     every node near coord/.append style={fill=white, font=\footnotesize, inner sep=1pt},     %     cycle list name=mycolorlisttest,     no markers     ]     \addplot+ table [x=ValueA, y=Process] {\tableabcdef};     \addplot+ table [x=ValueB, y=Process] {\tableabcdef};     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}      ## SOLUTION               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     amsmath,     tikz,     pgfplots,     pgfplotstable,     }          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepgfplotslibrary{groupplots}          \pgfplotstableread[col sep=comma]{     Process,ValueA,ValueB     1,66,70     2,66,40     3,24,20     4,52,60     5,64,30     6,37,30     }{\tableabcdef}          \tikzset{     meinemarkfarben/.style={     mark=*,     draw=#1,     fill=#1,     every mark/.append style={fill=#1}}     }          \pgfplotscreateplotcyclelist{aaaaaaa}{%     meinemarkfarben={yellow!60!black}\\%1     meinemarkfarben={red!70!black}\\%2     meinemarkfarben={green!70!black}\\%3     meinemarkfarben={gray}\\%4     meinemarkfarben={orange}\\%5     meinemarkfarben={brown!80!black}\\%6     meinemarkfarben={green}\\%7     meinemarkfarben={violet!80!black}\\%8     meinemarkfarben={black}\\%9     meinemarkfarben={teal}\\%10     meinemarkfarben={magenta!70!black}\\%11     meinemarkfarben={yellow!90!black}\\%12     }          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     \begin{axis}[     xlabel={Force in N},     ylabel={Process},     %     xbar,     %     xmin=0,     %     enlarge x limits={rel={0.2}, upper},     %     ytick=data,     nodes near coords,     nodes near coords align={right=3pt},     every node near coord/.append style={fill=white, font=\footnotesize, inner sep=1pt},     %     cycle list name=aaaaaaa,     no markers     ]     \addplot+ table [x=ValueA, y=Process] {\tableabcdef};     \addplot+ table [x=ValueB, y=Process] {\tableabcdef};     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}      ## Picture of Solution ![enter image description here](http://i.stack.imgur.com/I4d9Z.png)


title: Subsubsection in cleanthesis style

text: I am using the `cleanthesis.sty` and I would like to have numbered subsubsections, which are in style and format similar to the subsection, just a little bit smaller maybe. I tried editing the `*.sty` file directly, but had no success. Is there a simpler way?


title: pgfplots from file: search path, looking for \graphicspath equivalent

text: I have recently discovered the wonderful `pgfplots` package and I've started coding my `Python` code to output tabular data of whatever is plotted (at least for simple plots). In my LaTeX source code, I use `plot file {../datafiles/data.dat};` and similar commands extensively. All my external figures (yes, I still have some) are in a separate directory that I specify in my preamble using `\graphicspath{...}`. Is there any equivalent path that `TikZ` and `pgfplots` use to search for data files? I have difficulties searching for an answer to this question, because the word _path_ has such a specific meaning in a `TikZ` context. I'm using `PGF` 2.10 and `pgfplots` 1.5. I checked in the `PGF` manual (section 19.4, page 224) and in the `pgfplots` manual (section 4.2.2, page 25–26) but did not find anything relevant. **MWE** :               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot plot file {somedata.dat};     \end{axis}     \end{tikzpicture}     \end{document}      where `somedata.dat` contains:               1 2     3 4     5 6     7 8     9 10      Sorry for not adding a MWE earlier, I figured it wasn't needed because the question was obvious.


title: Prevent underful hbox in custom environment

text: I created an environment for a thesis about a framework, which formats documentation of some methods. The method(s) are at the top with one line per method, set with `\lstinline` from the `listings` package. Whenever a method signature is too long for one line and it is broken, I get "Underfull \hbox (badness 10000)". I searched for a while, but the recommendations for dealing with that warning are not suitable in this case:   * There are no manual line breaks, that cause the underful \hbox, it occurs only on automatic break.   * adding hyphenation is not suitable for program code, same for changing wording Here is an example document with my environment:               \documentclass{article}     \usepackage{amsmath,listings,changepage,pbox,ifthen,xparse}     \lstset{basicstyle=\ttfamily,breaklines=true}     \newcommand*{\code}[1]{\lstinline[breaklines]{#1}}          \NewDocumentEnvironment{methods}{oomooooo}{         \smallskip         \noindent\textit{\IfNoValueTF{#1}{Methode\IfValueTF{#4}{n:}{:\phantom{n}}}{#1}}%         \hspace{\IfNoValueTF{#2}{1em}{#2}}%         \pbox[t]{0.8\textwidth}{%             \noindent\code{#3}%             \IfValueTF{#4}{\\\code{#4}}{}%         }%         \begin{adjustwidth}{2.5em}{0pt}     }{         \end{adjustwidth}         \bigskip     }          \begin{document}          \begin{methods}{Matrix<T> submatrix()}              This method's signature is short, it does not break and no underful hbox         warning is issued.          \end{methods}          \begin{methods}{Matrix<T> submatrix(int startRow, int startCol, int endRow, int endCol)}              This method's signature is long. An automatic linebreak is inserted,         which results in underful hbox (badness 10000).          \end{methods}     \end{document}      The resulting document looks like I expected, but in the original document which is rather long, all the underful hbox warnings make it difficult to notice real problems. Is it possible to suppress the underful hbox warnings only when they occur in this specific environment? _Short explanation of the environment: I want to have a variable text "Method", "Methods", "Constructors" or similar on the left, and a left-aligned list of methods right of it. I'm open to suggestions how to acheive that in a different way._


title: Hide LaTeX commands for reviewing

text: Is there a way to hide LaTeX commands for distract-less reviewing? When I review and revise LaTeX documents, the commands are distracting. Is there a way to hide them or even make them as the same color as the background, so that they can not be seen? Any packages or editors?


title: graphing problems in metapost

text: I have some data as follows (first and second columns) in the file `mydata.d` that I want to graph:               8   98826   year 2008     9   104925  year 2009     10  140153  year 2010     11  178414  year 2011      As we have big numbers in the second numbers, I have used the macro `sarith`. Here's my metapost code for the plot:               input graph     input sarith     beginfig(1);     draw begingraph(8cm,5cm);     setrange(8,whatever,12,whatever);     gdraw "mydata.d" withpen pencircle scaled 1.5pt;;     gdraw "mydata.d" plot btex $\bullet$ etex;     autogrid(otick.bot,);     gdotlabel.lrt(btex $98\;826$ etex, 8,"98826");     gdotlabel.lrt(btex $104\;925$ etex, 9,"104925");     gdotlabel.lrt(btex $140\;153$ etex, 10,"140153");     gdotlabel.lrt(btex $178\;414$ etex, 11,"178414");     endgraph;     endfig;     end      So I am plotting the first two columns, taking away the y-axis tickmarks and labels and also writing the y-value at each coordinate in the plot. I have the following questions:   1. I wanted to show the year i.e. 2008 to 2010 but metapost just shows 2010 along the x-axis and this is why I have chosen the numbers 8 to 10 instead. Why is that?   2. If you plot the curve, you would see two dots at each coordinate where the corresponding y-value is written. Why is this happening? This occurs even if I take away the line gdraw `mydata.d" plot btex $\bullet$ etex`. In the `gdotlabel` lines, I have to include the numbers in the second column in quotes e.g. "98826". Is this causing a problem for metapost to be accurate at such a large numbers and hence the appearance of two dots?   3. If from 1 we can show the year 2008, 2009, 2010 and 2011 well, then how can we display them but rotated say 90 degree anticlockwise so that the labels do not take too much space horizontally?   4. If I ask metapost to display the y values on the y-axis, well it will write in exponential form instead of pure decimal form like 100000, 150000 etc. How to achieve this?   5. I understand that metapost ignores columns other than the two columns and this is useful to write comments pertaining to that line e.g. year 2008 on the first line. However if I would like to add a global comment to the whole file such as "Number of apples I ate in each year", then I cannot do this in the beginning of the file. I presume that we can do it at the end of the file, but how? I have tried leaving blank spaces and starting the comment line with a % sign but this doesn't work. I am using TeXLive 2010 under Win XP with MetaPost, version 1.211. I also tried TL 2011 with MetaPost 1.504. Thanks a lot for your kind help...


title: Difficulty finding the vertical distances between two lines of content

text: I'm trying to determine the vertical distance between boxes and a line of text in the immediately following paragraph. Depending on the content of the top box I'm getting a discrepancy of `\lineskip`. Here's my not so minimal MWE. I put a lot of colored lines in to help illustrate baselines (blue), struts (orange), depths (purple), and distances between lines (black).               \documentclass{article}     \usepackage{xcolor}     %% set `\parskip` to non-trivial value     \setlength{\parskip}{2ex}     %% --- CREATING A STRUT ---     %% strut to equalize line heights of the two boxes designed to be variable     %% if `\aestrutht` is set to `0.7\baselineskip` there's a `\lineskip` discrepency     %% if `\aestrutht` is set to `0.8\baselineskip` there's no apparent discrpency     \newlength{\aestrutht}     \setlength{\aestrutht}{0.7\baselineskip}     \newlength{\aestrutdp}     \setlength{\aestrutdp}{0.3\baselineskip}     %% first rule is to prevent `\color` from screwing things up!     \newcommand{\aestrut}{%%'       \rule{0pt}{0pt}%%'       {%%'         \color{orange}%%'         \rule[-\aestrutdp]{2pt}{\dimexpr\aestrutdp+\aestrutht\relax}%%'       }}     %% --- MAKING THE BASELINES VISIBLE ---     \newcommand{\aeshowbaseline}       {%%'         \bgroup           \color{blue}%%'           \raisebox{0pt}[0pt][0pt]{%%'             \makebox[0pt][l]{%%'               \rule{0.1pt}{\aestrutht}%%'               \rule{2in}{0.1pt}%%'             }%%'           }%%'         \egroup       }     %% --- CREATING BOX FOR TOP MATTER ---     %% placed in a box so I can measure its height and depth     \newsavebox{\aebox}     \newcommand{\aeTopMatter}[1]{%%'       \begin{lrbox}{\aebox}         \begin{minipage}[t]{1in}           \raggedright           \aestrut           \aeshowbaseline #1           %%\par\rule{0pt}{0pt}         \end{minipage}       \end{lrbox}\usebox{\aebox}}%%'     %%---------------------------------------------------------------------------------     %% --- CREATING BOTTOM MATTER ---     \newcommand{\aeBottomMatter}{%%'       \hspace*{0.95in}%%'       \aestrut       \aeshowbaseline       \hspace*{1em}%%'       More text}     %% --- MACRO TO SHOW DEPTH OF TOP BOX ---     \newcommand{\aeShowDepthOfTopMatter}{%%'       \llap{\color{purple}%%'         \rule[-\dp\aebox]{1in}{0.1pt}%%'         \rule[-\dp\aebox]{0.1pt}{\dp\aebox}}}     %% --- MACRO TO SHOW DISTANCE BETWEEN TWO LINES ---     \newcommand{\aeShowDistanceBetweenLines}{%%'       \raisebox{0pt}[0pt][0pt]{%%'         \rule{2pt}{\dimexpr\parskip+\dp\aebox+\lineskip+\aestrutht}}}     \begin{document}          \aeTopMatter{Hello World}\aeShowDepthOfTopMatter          \aeBottomMatter\aeShowDistanceBetweenLines          \vspace{0.25cm}          \aeTopMatter{Hello My World}\aeShowDepthOfTopMatter          \aeBottomMatter\aeShowDistanceBetweenLines          \vspace{0.25cm}          \aeTopMatter{Hello World to this hardy world}\aeShowDepthOfTopMatter          \aeBottomMatter\aeShowDistanceBetweenLines          \end{document}      ![enter image description here](http://i.stack.imgur.com/v0ZxW.png) I know two possible ways of fixing thing:   1. I could set the height of `\aestrutht` a bit bigger   2. I could uncomment the line `\par\rule{0pt}{0pt}` I don't understand why either of these work. In the case of the first, my difficulty revolves around the fact that, given how the height of my strut is already set, it is well above the height of any content on the line. So it seems to me I shouldn't need any more boost. What I would appreciate knowing is why these two _fixes_ work and why there's only a `\lineskip` in the third case but not the first two. For a while I thought this might be related to measuring `\prevdepth` such as using               \par\xdef\tpd{\theprevdepth}      But that gets convoluted with the depth of the top box and generally doesn't seem useful.


title: How to copy in an auxiliary file the arguments of a macro?

text: I have tried to do so with the nice package `newfile`. But, the following code does not compile :(               \documentclass{article}     \usepackage{newfile}          \newoutputstream{outstream}     \openoutputfile{out.aux}{outstream}          \newcommand{\test}[1]     {%     \begin{writeverbatim}{outstream}     #1     \end{writeverbatim}     #1     }               \begin{document}     \test{Does it work?}          \closeoutputstream{outstream}     \end{document}      PS : If possible, I would like a LaTeX-friendly answer :) **EDIT** I got nice answers, but they don't allow me to solve in a satisfying way my problem. So, let me expose you more precisely what I would like to do. Imagine my latex file is :                \documentclass{article}      \usepackage{my_macros}           \begin{document}      \Exercise{Bla Bla Bla}           \Solution{Bli Blu Bla}      \end{document}      I would like that the compilation of the latex file produce, as usual a .pdf file, **but also** two auxiliary files Exo.aux and Solu.aux that contain respectively `Bla Bla Bla` and `Bli Blu Bla` ! Thanks ! PS : If possible, I would like a LaTeX-friendly answer :) I would love to understand TeX, but although I got some answers to Online references for creating advanced macros?, I still find TeX very esoteric. I am looking for a user-friendly manual !


title: Show text exactly how it is displayed in the text document

text: I have the following bit of text that I want to show : > A = >   >   >      9    -8     7 >      6    -5    -4 >      3    -2     1 >   I want to show it exactly as it is, i.e. no formatting. Currently it shows : ![screen](http://i.stack.imgur.com/bRE1a.png) I assume there is an environment that avoids any formatting but I've been unable to find it. (I don't want to create a matrix in the math environment, because that's log that I want to show as it is.)


title: Color distortion using transparent images in non-beamer documents

text: I've been using transparant images in beamer presentations for some years now. Originally some combinations of pdfLaTeX and PDF viewer (in particular TeX Live 2009 with Acrobat Reader) produced quite unpleasant results on slides that included images with transparency. This showed in too saturated colors and too bold fonts. The problem could be fixed by including               \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}      in the LaTeX source file and everything was fine again. But now I am trying to include a transparent image into a basic LaTeX article and the trick from above does not work any more. A sample source code to reproduce the problem looks as follows:               \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}     \documentclass{article}     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}          \begin{document}     \begin{center}     \includegraphics[width=10cm]{image_with_transparency.pdf}     \end{center}          \end{document}      Compiling this document with pdfLaTeX (from TeX Live 2009) and viewing it with Acrobat Reader yields the same font and color problems as before in the beamer presentation. But in this case, using the fix does not work any more. It still looks as expected in most other viewers but since most readers will probably use Acrobat Reader and get an unpleasent result. I checked the beamer sources to see if there was something obvious that is different in the way `\includegraphics` or colors are handled but I couldn't find anything. So, my question is: Is there a way to get transparencies right in non-beamer LaTeX documents?


title: Repeating a previous figure in a beamer presentation

text: What I would like to achieve is, in a later frame, I would want a specific figure to reappear so that I can talk more about it, preferably keeping the original figure counter number. In both occurrences, there would be some text or other stuff accompanying the figure. This question is similar to this, this, or this. The solution in the first link seems to be too manual, the second seems nice but I couldn't get it to compile in a beamer document, and the third only touches the issue about figure counter. I tried to use a `lrbox` environment to save the contents of the figure, but this also does not seem to work:               \documentclass{beamer}     \usepackage{tikz}     \setbeamertemplate{caption}{{\small\bfseries\MakeUppercase{\insertcaptionname~\insertcaptionnumber}}\quad\insertcaption}     \newsavebox{\myfigurebox}          \begin{document}     \begin{frame}{First Frame}       \begin{lrbox}{\myfigurebox}         \begin{tikzpicture}           \draw (0,0) -- ++(75:1 cm) -- ++(-75:1 cm);         \end{tikzpicture}       \end{lrbox}            \begin{figure}         \centering         \usebox{\myfigurebox}         \caption{Description.}       \end{figure}       Some text.     \end{frame}     \begin{frame}{Other Frame}       \begin{figure}         \centering         \usebox{\myfigurebox}         \caption{Description (again).}       \end{figure}       More text.     \end{frame}     \end{document}      Other variations are also tried, e.g. surrounding the `figure` environment with `lrbox`, moving `lrbox` outside a `frame` etc, but these didn't work either. Right now, the only close solution I had is to use overlay specifications and an `\againframe`, but this messes up the equation numbers or other counters.               \documentclass{beamer}     \usepackage{tikz}     \setbeamertemplate{caption}{{\small\bfseries\MakeUppercase{\insertcaptionname~\insertcaptionnumber}}\quad\insertcaption}          \begin{document}     \begin{frame}<1>[label=myframe]     \frametitle<1>{First Frame}     \frametitle<2>{Other Frame}       \begin{figure}         \centering         \begin{tikzpicture}           \draw (0,0) -- ++(75:1 cm) -- ++(-75:1 cm);         \end{tikzpicture}         \caption{Description.}       \end{figure}     \begin{overprint}     \onslide<1>       Some text.      \onslide<2>       More text. % imagine there are some equations or other counters here; the equation numbering would be wrong     \end{overprint}     \end{frame}     % later...     \againframe<2>{myframe}     \end{document}      And this way of "hacking" might get out of control if the same figure is repeated a lot of different times...


title: Too small space when using \DeclareMathOperator

text: Currenlty I'm writing a math script (ring theory, PDF). When I need a new math operator I use `\DeclareMathOperator` from the amsopn-package. However I noticed some strange behaviour when using an operation with `\circ`. Example:               \listfiles     \documentclass[draft]{minimal}     \usepackage{amsopn}     \DeclareMathOperator*{\id}{id}     \begin{document}     $\id\circ g$          $h\circ g$     \end{document}      In the first version the `g` is very close at the `\circ` whereas the second version seems normal. This spacing issue only happens when I use `\DeclareMathOperator`. Is this problem known to you? What can I do to prevent it? The file list:               minimal.cls    2001/05/25 Standard LaTeX minimal class      amsopn.sty    1999/12/14 v2.01 operator names      amsgen.sty    1999/11/30 v2.0


title: How to disappear text or figures by printing?

text: As you know, the option `ocgcolorlinks` of the `hyperref` package disables **colors** of all links presented in a PDF file by printing it from Adobe Reader (and by compiling with e.g. **pdflatex** ); as a result, they are printed in a default color. My questions are:   1. Is it possible to disable not the color, but entire text (of the link), i.e. that it would be completely disappeared on the printed paper?   2. Is it possible to do the same with an arbitrary text (i.e. not with the text of the link) or with an arbitrary figure?


title: Increase Spacing in an algorithm

text: Please, how can i increase spacing in an algorithm, between instruction 1 et instruction 2 ?                \usepackage{algorithm}      \usepackage{algorithmic}      \begin{document}      \begin{algorithm}[H]      \caption{My algo}      \begin{algorithmic}[1]      \STATE instruction 1      \STATE instruction 2      \end{algorithmic}      \end{algorithm}      \end{document}      i'd like also to increase spacing between line and first instruction (see figure) ![enter image description here](http://i.stack.imgur.com/O0MF0.png) please just another question: is it possible to add the option [vlined] with               \usepackage{algorithm}      \usepackage{algorithmic} ?


title: Stylesheet changes and section alignment in beamer

text: I'm currently using `Berkeley` theme for my presentation using `LaTeX` beamer. Question1: I have multiple `sections` within the presentation but I do not want the `sections` to appear on the `title page`. I googled to see if can find something; no luck. Question2: How do I remove the list of authors from the pane in the left side? MWE:               \documentclass{beamer}     \usepackage[latin1]{inputenc}     \usepackage{hyperref}     \usepackage{appendixnumberbeamer}     \usepackage{color}     \usepackage{textpos}     \usepackage{framed}     \usepackage{times}     \usepackage{pgf}     \usetheme{Berkeley}     \usepackage[british,UKenglish,USenglish,english,american]{babel}     \title[]{foo bar baz}     \author{foo\\ bar \\ baz}     \begin{document}     %%%%%%%%%%%%%%%%     \begin{frame}     \titlepage     \end{frame}     %%%%%%%%%%%%%%%     \section{Introduction}     \begin{frame}{first}     first slide     \end{frame}     \end{document}      I am using Texmaker on Linux


title: Tex Live for Mac (MacTex) has font problems (reinstalled every time)

text: I have significant font problems with my MacLive Distibution: some packages I am using in a document seem to have special font demands, so there is nothing I can do about it. What is happening: - I am using pdflatex and at the end of the run it generates fonts that seem to be missing.   However, next run same thing. For several hours no chance to solve the problem. I tried to use all the information I could find, but either the solution did not work or it was not clear what to do from the description. So I removed my complete basic ! MacTex/TexLive distribution and reinstalled the Full version. As a result some of the fonts are now unproblematic, but new fonts make problems. below is the final dump from this new installation. I tried with the example of cm-super again for an extended period to solve the problem. To no available. - I tried to register it as a Map (it is already listed as MixedMap in the updmap.cfg file) manually, - I ran updmap-sys - I reinstalled the font from the platform (although it was there) - .. and several other things that were proposed.. none made any difference so far. Thanks in advance for your help Klaus MWE:               \documentclass{report}      %\usepackage[T1]{fontenc}      \usepackage{texnames}      \begin{document}      \textbf{\BibTeX-entry}      \end{document}      PS: the new installation was with the newest MacTex distribution 2012 and the whole thing happens on a MacBook 2010, running Mountain Lion. (see the transcript file for additional information){/usr/local/texlive/2012/te xmf-dist/fonts/enc/dvips/cm-super/cm- super-t1.enc}


title: Compare strings

text: I have some troubles by comparing strings in my beamer theme. I would like to compare the "techno" argument with a string (iOS, Android, Java,...) : if techno =="iOS" logo_path = "some_image" else if techno == "android" logo_path = "some_other_image" and so on I take an argument from the main .tex files and I would like to compare it do define an image to include :               \def\beamer@ALE@iOSLogo{ios.png}     \def\beamer@ALE@AndroidLogo{android_logo.jpeg}          \DeclareOptionBeamer{techno}{\def\beamer@ALE@Techno{#1}}     \ProcessOptionsBeamer          \IfStrEq{\def\beamer@ALE@Techno}{iOS}{{\def\beamer@ALE@TechnoLogo{\beamer@ALE@DiOSLogo}}{{\def\beamer@ALE@TechnoLogo{\beamer@ALE@DefaultLogo}}      Then I include a graphics :               \includegraphics[width=1cm]{\beamer@ALE@TechnoLogo}      When I compile it tolds me : image `ios' (back quote + value + quote) is not found. I have to declare a macro to solve the problem :               \def\beamer@ALE@iOS{iOS}      Do someone have some explanations ?


title: Labelling aligned equations with text

text: I have an align environment in which the equations are numbered on the left. Can I add notes on the right (e.g. to explain where each equation comes from)?


title: How to place and scale TikZ pictures in subfigure?

text: I have a problem with placing four TikZ pictures in one figure. I use subfigure to embedded TikZ pictures. Now I have the following problem: I do not know how to scale the TikZ figures. When I use `resizebox` or `scale`, it looks like the scaling from one TikZ picture is applied also to next TikZ figures (see the picture below). Here is my code:               \documentclass{article}          \usepackage{subfigure}     \usepackage{pgf}     \usepackage{tikz}     \usepackage{pgf}          %zusaetzlihce Symbole und Schriften (ams: american mathematical soc)     \usepackage{amssymb}     \usepackage{amstext}     \usepackage{amsfonts}     \usepackage{amsbsy}     \usepackage{amscd}     \usepackage{latexsym}               \begin{document}     \usetikzlibrary{arrows,automata}     \begin{figure}[htbp]          \begin{tabular}{cc}     %%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 1] {         \resizebox{0.4\textwidth}{!}{%         \begin{tikzpicture}[->,>=stealth',shorten >=2pt,node distance=2.0cm,                         semithick] %,scale=.5]         \tikzstyle{every state}=[fill=white,draw=black,text=black,font=\small]            \node[state] (A) [label=above:$N_{f1}$]                                            {$1$};       \node[state] (B) [below left  of = A,     label=above:$N_{a1}$]    {$\boldsymbol{2}$};       \node[state] (C) [below right of = A ,  label=above:$N_{b1}$]      {$\boldsymbol{3}$};         \node[state] (D) [below right of = D, style={dashed}, label=above:$N_{c1}$]      {$\boldsymbol{4}$};                     \path (B) edge []       node {} (A)             (C) edge []             node {} (A)             (D) edge []       node {} (C)                                                    ;              \end{tikzpicture}          }     } &      %%%%%%%%%%%%%%%%%%%%%% 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 2] {       %\resizebox{0.4\textwidth}{!}{%         \begin{tikzpicture}[->,>=stealth',shorten >=2pt,node distance=2.0cm,                         semithick] % ,scale=.5]         \tikzstyle{every state}=[fill=white,draw=black,text=black,font=\small]            \node[state] (A) [label=above:$N_{f\_1}$]                                          {$1$};       \node[state] (B) [below left  of = A,     label=above:$N_{a1}$]    {$\boldsymbol{2}$};       \node[state] (C) [below right of = A , style={dashed},  label=above:$N_{b1}$]      {$\boldsymbol{3}$};         \node[state] (D) [below right of = D,  label=above:$N_{c_1}$]    {$\boldsymbol{4}$};                     \path (B) edge []       node {} (A)             (C) edge []             node {} (A)             (D) edge []       node {} (C)                                                    ;                        \end{tikzpicture}          %}     } \\          %%%%%%%%%%%%%%%%%%%%%% 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 3] {      % \resizebox{0.4\textwidth}{!}{%         \begin{tikzpicture}[->,>=stealth',shorten >=2pt,node distance=2.0cm,                         semithick] %,scale=.5]         \tikzstyle{every state}=[fill=white,draw=black,text=black,font=\small]            \node[state] (A) [                     label=above:$N_{f\_1}$, , style={dashed}]                                           {$1$};       \node[state] (B) [below left  of = A,  label=above:$N_{a1}$]   {$\boldsymbol{2}$};       \node[state] (C) [below right of = A,  label=above:$N_{b1}$]   {$\boldsymbol{3}$};         \node[state] (D) [below right of = D,  label=above:$N_{c_1}$]    {$\boldsymbol{4}$};                     \path (B) edge []       node {} (A)             (C) edge []             node {} (A)             (D) edge []       node {} (C)                                                    ;              \end{tikzpicture}      %   }     } &           %%%%%%%%%%%%%%%%%%%%%% 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \subfigure [Subfigure 4] {      % \resizebox{0.4\textwidth}{!}{%         \begin{tikzpicture}[->,>=stealth',shorten >=2pt,node distance=2.0cm,                         semithick] % ,scale=.5]         \tikzstyle{every state}=[fill=white,draw=black,text=black,font=\small]            \node[state] (A) [                                            label=above:$N_{f\_1}$]                                          {$1$};       \node[state] (B) [below left  of = A,     label=above:$N_{a1}$, style={dashed}]    {$\boldsymbol{2}$};       \node[state] (C) [below right of = A ,  label=above:$N_{b1}$, style={dashed}]      {$\boldsymbol{3}$};         \node[state] (D) [below right of = D,   label=above:$N_{c_1}$]   {$\boldsymbol{4}$};                     \path (B) edge []       node {} (A)             (C) edge []             node {} (A)             (D) edge []       node {} (C)                                                    ;              \end{tikzpicture}          %}     } \\     \end{tabular}     \caption{Several options}     \end{figure}      \end{document} Here is the result: ![enter image description here](http://i.stack.imgur.com/QIP88.png)


title: Reference not found

text: When trying to reference to an appendix using `autoref` using the following code:               \documentclass[10pt,a4paper]{article}     \usepackage[titletoc]{appendix}          \usepackage{hyperref}          \begin{document}     \section{Title of Section}     See \autoref{sec:appendix}.          \begin{appendices}     \section{Title of Appendix}     \label{appendix}     Contents of Appendix.     \end{appendices}          \end{document}      The reference is not found, as shown here: ![enter image description here](http://i.stack.imgur.com/ac3ak.png) What am I doing wrong?


title: Optimised visualisation of top circles in beamer

text: I am making a presentation in `Beamer`. I am using `smoothbars` as an outer theme. However I am having a problem when a `section` has many frames, as indicated in the following image ![](http://i.imgur.com/LriUg.jpg)               \documentclass[slidestop,compress,11pt,xcolor=dvipsnames]{beamer}     \usefonttheme[onlymath]{serif}     \definecolor{LHCblue}{RGB}{4, 114, 255}     \usecolortheme[named=LHCblue]{structure}     \usepackage[bars]{beamerthemetree} % Beamer theme v 2.2     \usepackage{kerkis}     \mode<presentation>     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%       \oldmacro\hfill%       \insertframenumber\,}%/\,\inserttotalframenumber     \setbeamertemplate{footline}[frame number]     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \setbeamercovered{higly dynamic}     \usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0     \useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top          \useinnertheme{circles} %rectangle bullet points instead of circle ones     \usepackage{beamerthemebars}     \setbeamercolor{navigation symbols dimmed}{fg=red!80!black}     \setbeamercolor{navigation symbols}{fg=red!80!black}     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \title[SRS/APV readout with mmDAQ/Recomm\hspace{1.5cm} Stony Brook, NYC]{rd51 mm     tracker \& SRS/APV readout using mmDAQ/Recomm}     \author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]    {Stamatopoulos N. Athanasios}     \institute{NTUA/CERN}     \logo{%       \makebox[0.99\paperwidth]{%         \includegraphics[width=1cm,keepaspectratio]{cern_logo_white.jpg}%         \hfill%         \includegraphics[width=1cm,keepaspectratio]{ntua-logo.jpg}%       }%     }     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \usepackage{tikz}     \usepackage{multicol}     \usepackage{lmodern}     \usepackage{lipsum}     %\usepackage{graphicx}     \usepackage{marvosym}     %------------------tikz------------------------          \usetikzlibrary{%     calc,%     fadings,%     shadings%     }          \usetikzlibrary{arrows,snakes,shapes}          \begin{document}     \begin{frame}     \titlepage     \end{frame}     \end{document}      I only included the `titlepage` just to have an output. If you want me I can add some more plots as `sections` in order to achieve many circles. A way to fix this is to change `section`'s name so as to fit more circles, but I think it's not the best. Is there another way to do it, without changing inner theme's height?


title: blackboard italic font

text: I would like to make `\mathbb{E}` italic, i have tried `\mathit{\mathbb{E}}` and `\mathbb{\mathit{E}}`, both of them look like `\mathbb{E}`, I can not see the italic effect. Could anyone help? By the way, I do see some blackboard italic words in a paper, so it is realizable in LaTeX.


title: How do I use LaTeX to create a table of contents for a set of pdf files which I am merging into a single large pdf?

text: I have a set of pdf files which I want to merge into a larger pdf files. Each individual pdf file is an article with sections. I am hoping to make the merged pdf file into a book format with each article being a chapter, whose sections and subsections correspond to that of the individual chapter. What I need is a table of contents page which shows the chapters, the sections, and subsections and links to them with this table of contents page being displayed in the sidebar of a pdf reader such as evince (which calls it an index). What I have right now:               \documentclass{report}     \author{<somename>}     \title{<sometitle>}     \date{<somedate>}     \usepackage{pdfpages}     \usepackage[pdfauthor={<somename>},%             pdftitle={<sometitle>},%             pdftex]{hyperref}          \begin{document}          \tableofcontents          \clearpage\phantomsection     \addcontentsline{toc}{chapter}{<chaptername>}     \includepdf[pages=-,linktodoc=false]{file1.pdf}          \clearpage\phantomsection     \addcontentsline{toc}{chapter}{<chaptername>}     \includepdf[pages=-,linktodoc=false]{file2.pdf}          \clearpage\phantomsection     \addcontentsline{toc}{chapter}{<chaptername>}     \includepdf[pages=-,linktodoc=false]{file3.pdf}          \clearpage\phantomsection     \addcontentsline{toc}{chapter}{<chaptername>}     \includepdf[pages=-,linktodoc=false]{file4.pdf}          \end{document}      Now file3.pdf and file4.pdf have sections and subsections in them. How do I display these sections and subsections in the table of contents and link from there to the actual page? (And I also would like this info to be displayed in the sidebar of a pdf reader such as evince).


title: \documentclass[letterpaper]{article} produces A4

text: I'm trying to create an 8.5x11" document, but my system defaults to A4. Being in Canada where US letter is the norm, this is frustrating. I've tried adding               \documentclass[letterpaper]{article}      to the beginning of my document, but I still get A4. I'm on Slackware 14.1, and using `pdflatex` to generate my document. Even this small example creates an A4 sized document:               \documentclass[letterpaper]{article}          \title{Title}     \author{Your name!}     \date{\today}          \begin{document}     \maketitle     \section*{Fun times with paper sizes}     blah blah blah...     \end{document}      What am I doing wrong with respect to declaring my paper size, and how can I set US letter to be the default on my system? * * * ## Edit: Here is the command line output:               $ pdflatex swe.tex      This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)     entering extended mode     (./swe.tex     LaTeX2e <2003/12/01>     Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b     ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e     stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis     h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur     kish, ukrainian, nohyphenation, loaded.     (/usr/share/texmf/tex/latex/base/article.cls     Document Class: article 2004/02/16 v1.4f Standard LaTeX document class     (/usr/share/texmf/tex/latex/base/size10.clo)) (./swe.aux) [1{/usr/share/texmf-v     ar/fonts/map/pdftex/updmap/pdftex.map}] (./swe.aux) )</usr/share/texmf/fonts/ty     pe1/bluesky/cm/cmr10.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmbx12.pfb></     usr/share/texmf/fonts/type1/bluesky/cm/cmr12.pfb></usr/share/texmf/fonts/type1/     bluesky/cm/cmr17.pfb>     Output written on swe.pdf (1 page, 17745 bytes).     Transcript written on swe.log.


title: TeXLive2013: mdugm.sty not found

text: Suddenly my TeXLive installation with non-free fonts produces an error about the package `mdugm.sty`. Here is my source file:               \documentclass{scrartcl}          \usepackage[urw-garamond]{mathdesign}          \begin{document}          \title{Tentative schedule}     \date{\today}     \maketitle          \begin{center}     \begin{tabular}{c|c|c}     \textbf{Hour} & \textbf{Wednesday} & \textbf{Thursday}  \\ \hline      9:30 & Stuart & Valdinoci  \\ \hline     10:30 & Stuart & Valdinoci   \\ \hline     11:20 & Coffee break & Coffee break  \\ \hline     11:45 & Tilli & Lewin  \\ \hline     12:35 & Lunch & Lunch  \\ \hline     15:00 & Smets & Cingolani \\ \hline     16:00 & S\'er\'e &  Krieger \\ \hline     16:50 & Coffee break & Coffee break  \\ \hline     17:20 & Teta & Pisante  \\ \hline     18:10 &  \null & Schlein  \\ \hline     \end{tabular}     \end{center}          \end{document}      I compiled this source a few days ago without any warning, so I suspect that some packages were broken in an update. How can I use URW Garamond fonts as before? **Edit:** the package "mathdesign" was updated on Sept. 2 from version 24173 to version 31552. This is clearly the reason of my problem, but I can't find a solution.


title: PCA equation problem

text: I am trying to create the equation shown below but i couldn't, any help ? ![enter image description here](http://i.stack.imgur.com/AjDSD.png)


title: Space after closing double quotes in XeLaTeX

text: I'm writing some non-technical text that I'm trying to typeset using XeLaTeX. For simplicity, I'm keeping the actual text in plain text files which after certain modifications (e.g. escaping `%`, `\` and `$`, although I don't use these characters right now) become a subset of LaTeX. Something like this:               Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna      aliqua.           Ut enim ad minim veniam, quis nostrud exercitation ullamco      laboris nisi ut aliquip ex ea commodo consequat. Duis aute      irure dolor in reprehenderit in voluptate velit.      I'm using Unicode characters for things like quotes and dashes (`“`, `”`, `–`, `—`, etc.) When I used LaTeX, this worked fine. But when I switched to XeLaTeX, it no longer puts spaces after the quotes. I wrote a script that manually converts all the characters to their equivalents (two backticks, `''`, `\--`, `\---`, etc.) which worked as a workaround. For example, when I have the following code:               “It's a big problem,” he said.          ``What's the problem,'' I asked.      It's rendered as: > “It’s a big problem,”he said. > > “What’s the problem,” I asked. My question is, is there a way to make XeLaTeX work properly without replacing all those characters? The preamble of my `.tex` files follows (although it's merely temporary, as I'm still working on the content).               \documentclass[a5paper,10pt]{book}     \usepackage{fullpage}     \usepackage[serbian,english,french]{babel}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{xeCJK}     \setCJKmainfont{Sazanami Mincho}     \usepackage[a5paper]{geometry}


title: How can I make a PDF of the source of pdftex?

text: I got the files tex.web and pdftex.web from the texlive svn repo. I ran               weave tex.web     pdftex tex.tex      which produced a file `tex.pdf` with a nicely typeset, cross-referenced listing of the WEB source of TeX. However, if I do the same process pdftex.web, the resulting file `pdftex.pdf` only contains the pages corresponding to the index. Is there some other combination of commands I need to run, or do I need to edit part of pdftex.web? I tried weaving in the supplied `.ch` files, but it didn't seem to make a difference.


title: Can one replace bullet points with graphics?

text: Is it possible to replace bullet points in an itemize environment with graphics? I can find answers about replacing bullet points with other symbols, but in all the examples I can find, these symbols are given by LaTeX commands and are not separate graphics files. I am interested in finding out if this is possible both in Beamer and other standard document classes.


title: Book reviews entry in biblatex-chicago

text: I am using the `review` entry type in biblatex-chicago, and neither the `biblatex-chicago` nor the `biblatex` documentation have been helpful. The result I'd like to obtain is something at least close to the Chicago Manual of style, but I can't figure out which combination of entry fields I should use to get it right.               \documentclass{article}     \usepackage[authordate,backend=biber,indexing=cite,cmsdate=old,sorting=nyt]{biblatex-chicago}     \addbibresource{biblio.bib}          \begin{document}     \title{A Good Article}     \maketitle          Citing \textcite{Review1} for his great criticism of A Great Book.          \printbibliography     \end{document}      with `biblio.bib` set up as:               @review{Review1,     author={Doe, John},     title = {Me I. Myself's A Great Book},     journal = {The Review of Reviewing Review that Reviews},     volume = {99},     number = {12},     pages = {123-345},     year = {2013}}      Which obviously prints out something almost identical to what an `@article` entry would, _sans_ the quotation marks. I assume there are some ways of getting something at least a little bit closer to The Chicago Manual (i.e. would print the title as "Book review of" and then all in italics the `origauthor` followed by a "'s +booktitle+"). I haven't been able to get it working using any combination of entry fields including `byreviewer` and other. What am I missing? Is the `@review` entry entended to be identical to `@article` and all such formatting should be entered manually?


title: What measure in the text is it that is the font size?

text: In LaTeX, you can easily change the font size, using the `\fontsize` macro (described here) followed by the `\selectfont` macro. But what _is_ this font size? I changed the font size using the code               \fontsize{10cm}{1.2em}\selectfont      and wrote `Mx`, and then printed it on my laser printed. I then measured the width of the `M` and the height of the `x`; these measured turned out to be approximately 6.9 cm and 3.9 cm, respectively. So none of these turned out to be 10 cm. Not even the diagonal of the `M` measured 10 cm, even if it wasn't far from it; this measured 9.4 cm. I then printed the text `lql`, drew a straight line between the tops of the two `l`s, and measured the distance from the bottom of the `q` to the line I had just drawn, thinking that this distance might turn out to be 10 cm. Nope. Only 8.2 cm. So what measure _is_ it that is 10 cm, that is, where in the text do I find the font size? I want to know this because I need to adjust the vertical distance between the lowest descender and the highest ascender to 0.5 cm on a text I'm going to have at the spine of a book.


title: Omit hanging indent in bibtex

text: I use `\bibliographystyle{alpha}` with `bibtex` (not `biblatex`). The document class is `scrreprt`. The output looks like               [Abc07] Example Abc. The title and all other stuff.             dddd. 2007.     [Bcd08] Ex Bcd. The title, the journal and all other stuff.             cccc. 2008.      But I want something like               [Abc07] Example Abc. The title and all other stuff.     dddd. 2007.          [Bcd08] Ex Bcd. The title, the journal and all other stuff.     cccc. 2008.      where the labels `[Abc07]` and `[Bcd08]` should be **bold**. So I don't want the hanging indent. But with a small vertical space between the entries. Can someone help me?


title: How can I 'double-dip' environment contents to an external file with expl3?

text: I'd like to capture the contents of a particular environment and copy them, verbatim (`n`- type expansion), to an external file already set up as an `iow` output stream. My first thought was to simply create and use a token list variable like so:               \tl_new:N \l_resume_position_contents_tl     \NewDocumentEnvironment { position } { m } {       ...       \tl_set:Nn \l_resume_position_contents_tl       \group_begin:     } {       \group_end:       \resume_do_stuff_with:N \l_resume_position_contents_tl       \tl_use:N \l_resume_position_contents_tl     }      but I received the error               ! Missing } inserted.     <inserted text>                      }     l.71 \end{position}      which I presume stems from a complete misunderstanding of the `\group_?:` functions. Is there an easier way to go about this?


title: enlarge axes limits by fixed distance

text: According to pgfplots manual it is possible to enlarge axes limits using `enlarge x limits` and `enlarge y limits` properties. One can specify relative and absolute values, but they are in units of the axes. Is it possible, to enlarge limits by some fixed distance, e.g. `1cm`? If possible, I would need a solution, that could be defined in the `.style` property, as I would like **all** my plots to have axes extended by the same value.


title: How can I align some text with a logo?

text: I am trying to right-align some text with a logo, i.e. I would like to place some text to the left of a logo, and centre this text vertically with respect to the logo. I’ve attached a pdf to be more clear about what I’m trying to do. ![](http://i.stack.imgur.com/FFyfW.png) I would like to place the text “Faculty of Science” to the left of the black “logo” in the pdf above. In this example, the blue rectangular border is 1cm from the edge of the page, and the 2.5cm wide square logo is 1.25mm from the blue rectangular border. I think textpos is the solution to what I’m trying to do, and I came up with the code below.               \documentclass{article}          % ...          \usepackage[absolute]{textpos}     \setlength{\TPHorizModule}{1mm}     \setlength{\TPVertModule}{\TPHorizModule}     \textblockorigin{0mm}{0mm} % start everything at the top-left corner          \begin{document}          % ...          \begin{textblock}{100}[0,0](120, 23.75)          \large \textit{\textbf{Faculty of Science}}          \end{textblock}          % ...          \end{document}      However, I would like something that works whatever the text I wish to place (i.e the right most letter of the last word should always be at the same fixed distance from the logo, say 1cm, and should also be vertically centered with respect to the logo). Here, every time I change the text or its style, I have to fiddle around with the coordinates until I get something that looks right. Any ideas?


title: ttfamily usage (newline failing)

text: I'm unable to insert a new line while using `\ttfamily`. Is there any reason why `\ttfamily` prevents to do that? My problem (here's the code):               Let's consider an e-commerce web application whose address is:     \begin{ttfamily} https://website-test.com/scripts/GetEBook.aspx?file=ebook7.pdf \end{ttfamily}      I repeatedly tried to insert the `\newline` command after the word `is` in order to get the output:               Let's consider an e-commerce web application whose address is:          https://website-test.com/scripts/GetEBook.aspx?file=ebook7.pdf      But unfortunately it doesn't work...I get no new line. Also, how do I insert spaces in order to move the text forward? For example:               \begin{ttfamily} \verb https://website-test.com/scripts/GetEBook.aspx?file= \end{ttfamily}     \begin{ttfamily} \verb ..\..\windows\repair\sam \end{ttfamily}      I'd like the output to be:               https://website-test.com/scripts/GetEBook.aspx?file=                                 ..\..\windows\repair\sam      If `\ttfamily` doesn't allow to do what I need, is there any other way to solve the problem?


title: Missing $ inserted (multicolumn)

text: \multirow{2}{*}{Part}     & \multicolumn{2}{|c|}{\sigma_{I}} & \multicolumn{2}{|c|}{\sigma_{II}} \\ \cline{2-5}      I am compiling this code, I am getting the error `Missing $ inserted` and after that it is giving me the desired result. But still I dont wan't any errors in my code.


title: How can I get all TeX / LaTeX symbols?

text: I am currently writing the practical part of my bachelors thesis which will be about on-line recognition of handwritten mathematical symbols (and eventually also formuae). One problem I currently have with this is that I need to have the symbols in my database. I basically need   * The latex code for the symbol (e.g. `A`, `$\alpha$`, `$\rightarrow$`, `$\mathbb{R}$`, ...)   * The package name if I need one (e.g. `\usepackage{amsmath}`)   * SVG I can create the SVG with the other two pieces of information (although the SVGs I can create are far from optimal), but I currently don't see a better way than manually entering those symbols. This seems like a tremendous waste of time, hearing from the developer of detexify that he has about 2000 symbols (but he can't give me the database - I don't know why). So: **How can I get a list of all symbols LaTeX / TeX has?** (By the way, the site is http://write-math.com - but it still is a very early alpha release and I might truncate the database in the next few days, so please don't waste your time and generate data. The symbol recognition part doesn't exist at the moment.)


title: Overlapping label and text in description environment

text: I'm relatively new to LaTeX, and I am having this problem with the description environment:               \documentclass{article}     \usepackage{amsmath}     \usepackage{bm}     \usepackage{IEEEtrantools}     \usepackage{amsthm}     \usepackage{multicol}     \setlength\parindent{0pt}          \begin{document}     \begin{description}         \item[this:] this is a description that isn't messed up.         \item [sll kjsl kslkdfjl f:] but there really is a problem with this one, isn't there?     \end{description}     \end{document}      produces ![this output](http://i.stack.imgur.com/di3tn.png) As far as I can tell I have good syntax, but I have a hard time believing that this is the default behavior of the LaTeX renderer. Extra notes:   * If you'll notice, the description isn't bold, either.   * The fact that the sentence that follows is in math mode seems to be irrelevant.   * I'm using pdfLaTeX, but the behavior is the same regardless of the rendering method used.!


title: Sieve of Eratosthenes

text: I have look at the answer from @AlainMatthes at Sieve of Eratosthenes in tikz where I have added the suggested extra code: **Code**               \documentclass{article}     \usepackage{tikz}          \makeatletter     \tkzutil@ifundefined{pgfmath@function@isprime}{%     \newif\ifpgf@unknown     \newif\ifpgf@isaprime         \pgfmathdeclarefunction{isprime}{1}{%         \begingroup%     \pgf@unknowntrue     \c@pgfmath@counta#1\relax%       \ifcase#1\relax       % |#1| = 0       \pgf@isaprimefalse\pgf@unknownfalse      \or      % |#1| = 1       \pgf@isaprimefalse\pgf@unknownfalse       \or     % |#1| = 2       \pgf@isaprimetrue\pgf@unknownfalse      \or     % |#1| = 3       \pgf@isaprimetrue\pgf@unknownfalse        \else      % |#1| > 3        \ifodd#1\relax         \else         \pgf@isaprimefalse\pgf@unknownfalse        \fi      \fi       \ifpgf@unknown     \c@pgfmath@countd=\thr@@ \pgf@isaprimetrue      \loop      \c@pgfmath@countb=\c@pgfmath@counta        \divide\c@pgfmath@countb by\c@pgfmath@countd       \ifnum\c@pgfmath@countb>\c@pgfmath@countd \pgf@unknowntrue       \else\pgf@unknownfalse\fi         \multiply\c@pgfmath@countb by\c@pgfmath@countd       \ifnum\c@pgfmath@countb=\c@pgfmath@counta          \global\pgf@isaprimefalse\pgf@unknownfalse\fi       \ifpgf@unknown\advance\c@pgfmath@countd by 2\relax%       \repeat     \fi     \ifpgf@isaprime       \def\pgfmathresult{1}%     \else       \def\pgfmathresult{0}%     \fi      \pgfmath@smuggleone\pgfmathresult%     \endgroup     }}{}     \makeatother          \begin{document}          \begin{tikzpicture}[y=-1cm]       \foreach \x in {0,...,9}         \foreach \y in {1,...,10}         { \draw (\x,\y) +(-.5cm,-.5cm) rectangle ++(.5cm,.5cm);           \pgfmathtruncatemacro{\nb}{\x*10+\y}            \ifnum\nb=1 \def\pgfmathresult{1}            \else           \node[minimum size= 1cm](last) at (\y-1,\x+1) {\nb};           \pgfmathisprime{\nb}           \fi          \ifnum\pgfmathresult=0           \draw[red](last.north west)--(last.south east)                     (last.north east)--(last.south west);           \fi}     \end{tikzpicture}          \end{document}      When I compile, I get the following error:               ! Undefined control sequence.     l.5 \tkzutil@ifundefined                             {pgfmath@function@isprime}{%      What am I doing wrong?