title: Change the spacing between lines of section title

text: I changed the fontsize of my section title using the following code:               \renewcommand\section{\@startsection{section}{1}{\z@}%                                       {-2ex \@plus -1ex \@minus -2ex}%                                       {1ex \@plus.2ex}%                                       {\normalfont\fontsize{10}{20}\bfseries}}      which does the work. However it keeps the spacing (between the lines of the section title, I used two columns article) that I had with the default fontsize. Does anyone know how I can adapt the code to change the spacing?


title: All table cells need to have two lines

text: I found this answer with search: http://tex.stackexchange.com/a/19678/53832 Is there some way to make all cells in the table to work like this? Some of the cells in the table are multirow cells if that makes any difference. MWE               \documentclass{article}     \usepackage[landscape]{geometry}     \usepackage{multirow}     \begin{document}     \begin{table}[ht]     \begin{tabular}{c|c|c|c}     \hline     \multirow{8}{*}{\begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular}} & \multirow{4}{*}{\begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular}} & \multirow{2}{*}{\begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular}} & \begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular} \\ [30pt] \cline{4-4}          & & & This cell should have also two lines \\ [30pt] \cline{3-4}          & & \multirow{2}{*}{This cell should have also two lines} & This cell should have also two lines \\ [30pt] \cline{4-4}          & & & \begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular} \\ [30pt] \cline{2-4}          & This cell should have also two lines & \multirow{2}{*}{\begin{tabular}[x]{@{}c@{}}This is first line\\This is second line\end{tabular}} & This cell should have also two lines \\ [30pt] \cline{4-4}          & & & This cell should have also two lines \\ [30pt]     \hline     \end{tabular}     \end{table}     \end{document}


title: Some formatting questions in moderncv

text: I have a few questions for my resume that I'm making with `moderncv`. Firstly here's my code :               \documentclass[11pt,a4paper]{moderncv}          % moderncv themes     \moderncvtheme[orange]{casual}                          % character encoding     \usepackage[utf8]{inputenc}                             \usepackage{lipsum} % Just for dummy text          % adjust the page margins     \usepackage[scale=0.8]{geometry}          % personal data     \firstname{John}     \familyname{Doe}     \title{Software Developer}      \address{Earth}{Universe}     \mobile{+123456789}     \email{aaa@bbb.com}          \definecolor{dark-gray}{gray}{0.20}          \quote{{\raggedright\color{dark-gray}\lipsum[2]}}          % to show numerical labels in the bibliography; only useful if you make citations in your resume     \makeatletter     \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     \makeatother          %----------------------------------------------------------------------------------     %            content     %----------------------------------------------------------------------------------     \begin{document}     \maketitle          \section{Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}     \cvline{\fontsize{9}{12}\selectfont{Skill1}}{Skills, Skills, Skills}          \section{Experience}     \cventry{Nov 2009 Nov 2011}{Software Developer}{Microsoft}{Earth, Universe}{}{\lipsum[6]     \begin{itemize}     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \item Designed and developed features     \end{itemize}}          \end{document}      So:   1. How do increase the coverage area (width wise) of the quote section so that it starts at the absolute left and span to maximum right of page (in the allowed maximum A4 margin)?   2. How do I reduce the gap between the Quote section and Skills?   3. In the first position in Experience, I wanted a line after the designation etc. However, when I add `\newline` (after Universe), it results in two problems : a. There is a fullstop in an empty line b. The whole block shifts to the second page (leaving most of page 1 blank) and I need it to continue to the next. Would really appreciate some help since I've tried some syntax on my own, but just can't get it right. Thank you.


title: itemize without line feed

text: When I write a document with `\usepackage[french]{babel}` my `\begin{itemize} \end{itemize}` list begin with '-' before each item and no extra line feed before each item. But when I don't use this package (when I want to write an english document), my lists are transformed with a bullet before each item AND an extra line feed between each item (as if a new line was inserted). I can deactivate the bullets with `\renewcommand{\labelitemi}{}` but how to suppress the extra line feed ?


title: LaTeX: is it possible to create a macro to add words to index (using TexMaker)?

text: I'm just finishing my first document (a book), and I have to create an index (`\makeindex`, `\printindex`, `\index{WORD}`, ...). I am using TexMaker on Linux. I was wondering if it's possible to define something like a "macro", to be able to avoid adding `\index{WORD}` before each word to be indexed (my document will have _very_ many words to be indexed... :-). I mean, I'd like to be able to define a command which would allow me - clicking a keyboard short-cut, for example `[Ctrl][F9]` - to insert `\index{WORD}` just before the WORD the cursor is on... Skimming through _TexMaker_ docs, I couldn't find anything useful to that intent... **UPDATE** I am following the suggestions in the comments, but I can't yet fully understand how to solve my problem... Feel quite dumb right now... :-( So: I add the command `\iindex` in my book heading, as Sigur suggested:               \newcommand\iindex[1]{#1\index{#1}}      So far so good. Now I would like to associate a keyboard shortcut to it. As suggested (always by Sigur) I look for a _macros_ menu, but I can't find it (I use Texmaker 4.0.3).   As suggested by Aradnix, I open the User menu, and find these sub-menus:   * User Tags   * User Commands   * Customize Completion Both Tags, Commands can be customized, but I suppose:   - Commands are for external commands (not my case).   - Tags are more promising, but what do I write in tag's LaTeX content? I mean, how do I refer to the word under cursor, which I want to index?   - Customize completion lists items already defined (which include for example `\index{•}`), and I can add new commands; but, I can't understand how to associate it with a shortcut... :-).  Any more _literal_ suggestion for a LaTeX newbe...?   If anybody solves and answers, I _will_ accept the answer, of course... :-)


title: How to place a center aligned rule on the left of a section title?

text: ![The proposed effect](http://i.stack.imgur.com/70SHP.png) How can I achieve this effect? I have tried the following code:               \parbox[c]{3.5cm}{\color{NavyBlue}{\rule{90px}{7px}}} \parbox[c]{6cm}{\section*{Section Title}}      But the rule is not center aligned with the title because `\section` command contain some extra space below the text. And I had tried a alternative:               \parbox[c]{3.5cm}{\color{NavyBlue}{\rule{90px}{7px}}} \parbox[c]{6cm}{\Large{Section Title}}      Although this time the rule is center aligned, but if I add text below the title, the line space would be too small. Can anyone help me with this?


title: xepersian's error: mapping=tex-text at 10.0pt not loadab

text: I use `xpersian` package to produce farsi document in ubuntu 12.04               \documentclass[12pt]{article}     \usepackage{xepersian}     \settextfont[Scale=1]{XB Niloofar}     \setlatintextfont[Scale=0.9]{Junicode}     \begin{document}     سلام     \end{document}      but unfortunately, I get this error               (/usr/share/texmf-texlive/tex/generic/xkeyval/keyval.tex)))     (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty     Package: fontenc 2005/09/27 v1.99g Standard LaTeX package          (/usr/share/texmf-texlive/tex/xelatex/euenc/eu1enc.def     File: eu1enc.def 2008/03/08 v0.1d Experimental unicode font encoding     )     LaTeX Font Info:    Try loading font information for EU1+lmr on input line 100.          (/usr/share/texmf-texlive/tex/xelatex/euenc/eu1lmr.fd     File: eu1lmr.fd 2007/01/14 v1.3 Font defs for Latin Modern     )     ! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab     le: Metric (TFM) file not found.     <to be read again>                         relax      l.100 \fontencoding\encodingdefault\selectfont          I wasn't able to read the size data for this font,     so I will ignore the font specification.      I changed the font to `Tahoma` but nothing else happened. Thaks to Herbert, this is my file list, which is different from his.                *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     xepersian.sty    2009/08/09 v1.0.3 <revision 93> Persian typesetting in LeLaTeX     bidi.sty    2009/08/09 v1.0.3 <revision 82> Bidirectional typesetting in Xe LaTeX     amsmath.sty    2000/07/18 v2.13 AMS math features     amstext.sty    2000/06/29 v2.01     amsgen.sty    1999/11/30 v2.0     amsbsy.sty    1999/11/29 v1.2d     amsopn.sty    1999/12/14 v2.01 operator names     footnote-bidi.def     article-bidi.def     fontspec.sty    2008/08/09 v1.18 Advanced font selection for XeLaTeX     ifxetex.sty    2009/01/23 v0.5 Provides ifxetex conditional     calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     xkeyval.sty    2008/08/13 v2.6a package option processing (HA)     xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)     fontenc.sty     eu1enc.def    2008/03/08 v0.1d Experimental unicode font encoding     eu1lmr.fd    2007/01/14 v1.3 Font defs for Latin Modern     fontspec.cfg     xepersian-persiancal.sty         xepersian-mathsdigitspec.sty    2009/04/22 v1.0.1 Unicode Persian maths digits      in XeLaTeX (Author: Vafa Khalighi)     etoolbox.sty    2009/08/06 v1.8 e-TeX tools for LaTeX     etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     footnote-bidi-xepersian.def     article-xepersian.def      ***********      every suggestion whould be appreciated.


title: Figure + table wider than textwidth

text: I have a figure and a table placed next to one another, but they are wider than the textwidth. Now I want to center them so they exceed the textwidth margins. Can this be done? Edit: currently I have something like this, but I can't seem to get this wider than the textwidth.               \begin{figure}     \begin{floatrow}     \ffigbox{%      \includegraphics[height=5cm]{figure}     }{%       \caption{figure caption}%       \label{figure}     }     \capbtabbox{%     \begin{tabular}{ |c|}       HERE COMES THE TABLE     \end{tabular}     }{%       \caption{table}%     }     \end{floatrow}     %\vspace{-1cm}     \end{figure}


title: Can not use float placement options with algorithm2e

text: I am using `algorihtm2e` and I am formatting a new command to align comments in the algorithms like in the answer of Align comments in algorithm with package algorithm2e. Now when I try to use positions options like this               \documentclass[11pt,a4paper,twoside,openright]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[algochapter,linesnumbered,ruled,lined,boxed]{algorithm2e}     \usepackage{etoolbox}          \makeatletter     \newdimen\commentwd     \let\oldtcp\tcp     \def\mytcp*[#1]#2{% only support one style for simplicity     \setbox0\hbox{#2}%     \ifdim\wd\z@>\commentwd\global\commentwd\wd\z@\fi     \oldtcp*[r]{\leavevmode\hbox to \commentwd{#2\hfill}}}          \let\oldalgorithm\algorithm     \def\algorithm{\oldalgorithm     \global\commentwd\z@     \expandafter\ifx\csname commentwd@\romannumeral\csname c@\algocf@float      \endcsname\endcsname\relax\else     \global\commentwd\csname commentwd@\romannumeral\csname c@\algocf@float     \endcsname\endcsname     \fi     }     \let\oldendalgorithm\endalgorithm     \def\endalgorithm{\oldendalgorithm     \immediate\write\@auxout{\gdef\expandafter\string\csname      commentwd@\romannumeral\csname c@\algocf@float\endcsname\endcsname{%     \the\commentwd}}}          \begin{document}        \begin{algorithm}[ht]           bla        \end{algorithm}     \end{document}      The result is that `[ht]` is written in the first line of the algorithm. When I don't use that, it works. Does anyone have an idea how I can align the comments and use positioning?


title: Possible to create bullets for \subitems using \itemize without a nested list?

text: I have made a list of questions and subquestions using nested `\itemize` commands, like this:               \documentclass[11pt]{report}     \usepackage[british]{babel}     \usepackage{enumitem}          \begin{document}          \begin{itemize}     \item{First item}     \begin{itemize}     \item{First subitem}     \item{Second subitem}     \item{Third subitem}     \end{itemize}     \item{Second item}     \item{Third item}     \end{itemize}          \end{document}      Now this works fine for me, but I am just wondering, can you also create bullets when using `\subitem` instead of a nested list, like below? I do get an indentation at my subquestions, but no bullets. I have not found anything on this topic, but maybe it is just me.               \begin{itemize}     \item{First item}     \subitem{First subitem}     \subitem{Second subitem}     \subitem{Third subitem}     \item{Second item}     \item{Third item}     \end{itemize}


title: Tree with more levels

text: I'm working with the package `qtree` and I'd loved to make more levels. My code is:               \begin{frame}[t]{\secname}         \Tree [.{L} [.{L1} {\textit{Lag}: \\ ${\textstyle x=y$ \\ \small{C}}  ]                     [.{L2} {\textit{Lag}: \\  ${\textstyle x=z$} ] ]                                                                                \end{frame}       I would like to have that `\small{C}` is on e new level under `{\textit{Lag}: \\\ ${\textstyle x=y$` but here it is in the same level (I've worked with `\\\` to put it on a new line) I would also want more vspace between the levels, but I can't find how I must do that. Can somebody help me?


title: Referring to tikzpicture center

text: How I can refer to the current or some other `tikzpicture`'s center? Is there anything like `(current picture.center)` or `(previous picture.center)`? I'm asking about straight solutions, not requiring to embed `tikzpicture` within node of other `tikzpicture`, like it was shown in Transforming coordinates, so (0,0) from tikzpicture is put in the desired place of the page.


title: How to include interactive java-based web pages inside LaTeX generated PDF documents

text: Is it possible to open an interactive web page, such as this, inside a latex generated pdf page?


title: Hyperref to external file in LyX

text: I have two separated folders, each includes LyX files with the needed attachments (pictures...etc.) , I found that I need to to use zref-xr package to make hyper cross references between those files (non of them included in the other), what i can't understand (or find an answer) is what I should write in \zexternaldocument{????} should It be the full path to the second folder? or something else? some people speaks about .aux files that I don't understand where to find. Another small question in the context: What is better (or should) use, xr package with hyperref package, or the above mentioned zref-xr ?


title: interference of package names

text: Some accompanying question to where to put .sty and .cls file for project What if there are, say two, the same name sty-files located in one texmf-tree but belonging to different packages   * `\texmf(local)...\packageOld\XXX.sty`   * `\texmf(local)...\packageNew\XXX.sty`   * `\texmf(global)...\InstalledPackage\XXX.sty` and then do               \usepackage{XXX} % ???????? what gets here?      When scanning the tree which one will be chosen by TeX-system, say MiKTeX? According to the order of the folders above? But this would be non- satisfactory. I may want to use `XXX.sty` form global but other time from `local\packageOld...` then from ...New etc. Should I change the structure of the paths above each time or to have a headache about possible coinciding my package name with some one from a huge TeX-system tree?


title: Book layout Contents, Chapter, Section,

text: my goal is to get new style of Table of Contents, new style of Chapter and new style of section. I there is one more: how to change itemize native symbol for a black square? Table of Contents: text on the left side in the middle of two lines. And there is a big white space non normal one. ![enter image description here](http://i.stack.imgur.com/7zfNS.png) Chapter: number of chapter in a roman in a black box on the line above the chapter name, Name of chapter on right side, another line under name of Chapter ![enter image description here](http://i.stack.imgur.com/n2CK0.png) Section: I want to add a black square at the begining of each section name. ![enter image description here](http://i.stack.imgur.com/utpvW.png) I appreciate that thank You


title: Wrap figure moves all the following text

text: Eventhough I have found few similar question I still cannot handle my problem. Need help. I want simply to place couple of lines on the right from my picture and begin new page with new section afterwards. Somehow I get as the result all the following text shifted.               \subsection{Estimation of gradient}     \begin{equation}         L'(\theta) = \lim\limits_{h \to 0} \dfrac{L(\theta + h) - L(\theta)}{h} \hspace{4mm} \text{ or}  \hspace{4mm}L'(\theta) = \lim\limits_{h \to 0} \dfrac{L(\theta + h/2) - L(\theta - h/2)}{h}     \end{equation}      Multivariate function          \begin{wrapfigure}{L}{0.35\textwidth}         \vspace{-10pt}         \includegraphics[width=0.33\textwidth]{olcar_L8-51}     \end{wrapfigure}          \begin{align}         \nabla L (\theta_1, \theta_2, \cdots , \theta_p ) = \left [ \frac{\partial L}{\partial \theta_1} , \frac{\partial L}{\partial \theta_2} , \cdots , \frac{\partial L}{\partial \theta_p} \right ]^T     \end{align}          Leads to \emph{Finite Difference Method}.          \newpage     \section{Finite Difference (FD) Method}     \begin{itemize}     \item Perturb the parameter vector along each axes individually and estimate the cost gradient in that direction     \begin{align}     & \theta^{i+} =  [\theta^1, \cdots , \theta^{i-1} , \theta^i , \theta^{i+1} + c, \cdots , \theta^p] \notag \\     & \theta^{i-} =  [\theta^1, \cdots , \theta^{i-1} , \theta^i , \theta^{i+1} - c, \cdots , \theta^p]      \end{align}     \begin{align*}     [\nabla J (\theta)]_i = \frac{J(\theta^{i+}) - J(\theta^{i-})}{2c}     \end{align*}     \item This is Kiefer-Wolfowitz (KW) Method     \item Needs $p+1$ or $2p$ measurements for computing gradient vector in one point     \end{itemize}      I get this: ![enter image description here](http://i.stack.imgur.com/OQel6.png)


title: Removing blank line in tabulary

text: I use tabulary package for automatic width adjustment, but I have a blank line in the first row. ![enter image description here](http://i.stack.imgur.com/Qcmxx.png)               \documentclass{article}     \usepackage{tabulary}     \begin{document}          \begin{table}[htbp]     \begin{tabulary}{1.0\textwidth}{L|L|L|L|L}     \hline     & \hbox{Name} & \hbox{Function} & \hbox{Properties} & \hbox{Relationships} \\\hline\hline     7 & \hbox{System Maintenance Database} & Stores all kinds of errors occurred during operation from all components in a specified way        & Only error related information is stored & \\     9 & Main Database & & \\     \hline     \end{tabulary}     \caption{Data elements}      \label{data}     \end{table}     \end{document}      What's wrong? How do I remove it?


title: How to typeset subscript in usual text mode?

text: It's easy to make subscripts in math mode: `$a_i$`. How do I make a subscript outside math environment, likethis?


title: \raisebox command for subscript

text: I was wondering if anyone know make a command for raisebox subscript? This question asks how to make the subscript part...here I want to make the command shorter by having a macro do the work rather than having to type out the whole command each time.               some\raisebox{-.4ex}{\scriptsize thing}      comes out as > something I thought something like               \newcommand{\mysubscript}[1]{\raisebox{-.4ex}{\scriptsize #1}}      would work, but unfortunately it only prints the first letter of the argument               some\mysubscript[thing]{}      > something Any thoughts?


title: Using amsthm: changing Theorem options and break line

text: Using `amsthm`, is it possible to change the settings as follows ? ![enter image description here](http://i.stack.imgur.com/P4nt3.jpg) Theorem/number/Name/cite : body I tried to write:               \documentclass{article}     \usepackage{amsthm}          \newtheoremstyle{mystyle}% name       {3pt}%Space above       {3pt}%Space below       {\normalfont}%Body font       {0pt}%Indent amount       {\itshape}% Theorem head font       {:}%Punctuation after theorem head       {\newline}%Space after theorem head 2       {}%Theorem head spec (can be left empty, meaning ‘normal’)          \theoremstyle{mystyle}     \newtheorem{teorem}{Theorem}          \begin{document}          \begin{theorem}[Ordinary differential][\cite{1}]     Test      \end{theorem}          \end{document}


title: Comma in macro parameters

text: I have a macro accepting several optional arguments in a comma separated list. I would like to assign a value containing a comma to a particular argument. Is there a way to "escape" this particular comma so that it will not be interpreted as the beginning of a new argument. Here is an except of what I would like to achieve:               \begin{mymacro}[arg1=a,b,arg2=c]     % ...     \end{mymacro}      I would like to set `arg1` to `a,b` and not, of course, seeing this interpreted as "`arg1=a` and `b`". Thanks!


title: Is it possible to search for bibtex citations in Lyx

text: In LyX, is it possible to search for a citation I've already inserted by BibTex key? I'm inserting references from a BibTex file using Insert -> Citation. For example, I would like to find all the locations in the text where I've already added "Smith 2012". Thanks.


title: Table width is not wide enough

text: I have a problem in the table width, it is very small as shown below and I need it to fit in two column paper. Any help please? ![enter image description here](http://i.stack.imgur.com/eJTMS.png)               \begin{table}[H]     \centering     \begin{tabular}{|r|r|r|r|}     \hline         &    Class 1 &    Class 2 &    Class 3 \\     \hline        Class 1 &         0 &         0 &        262 \\     \hline        Class 2 &         0 &         0 &        295 \\     \hline        Class 3 &        0 &         0 &        320 \\     \hline     \end{tabular}     \caption{Confusion Matrix}     \label{tab:template}     \end{table}


title: How to include program listings in C# with custom font and syntax highlighting in LyX?

text: I'm rather new to LaTeX and use LyX editor to create my documents. There are similar questions but none of them answer how to do that in LyX. I am wondering, how to include a program listing in C/C++/C# which would satisfy these conditions:   * Syntax highlighting, example: ![Highlighting example](http://i.stack.imgur.com/WnfqS.jpg)   * Custom font (I've set a non-TeX Consolas font to be used as "Typewriter" font but nothing happens in program listing even though it works when used inline i.e. \mathtt{Foo}   * It would be a bonus, if I could include the code as a file, like I did now (Insert -> File -> Child Document -> Program Listing)   * Line numbers are also a bonus. So far, what I could come up with was: ![TeX example](http://i.stack.imgur.com/kfn0Z.jpg) Thank you for any advice!


title: Can't compile tikz pictures when packages mdwtab and syntax are included

text: I have a strange dilemma that I cannot resolve. I am including three additional packages than what I typically would include:   1. `tikz` -- for state diagrams   2. `mdwtab` and `syntax` for Context-Free-Grammars When I include these three packages together, LaTex will not let me compile and I do not know why. If I simply remove one or the other, everything is ok. Here is the error message I get when I have both packages included:               ERROR: Argument of \XC@definec@lor has an extra }.          --- TeX said ---     <inserted text>                     \par     l.32    \node[state,initial,accepting] (q_0)                                                    {$q_0$};     --- HELP ---     From the .log file...          I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.      The following shows a simple example including both packages. As soon as I comment out the packages `mdwtab` and `syntax` everything compiles.               \documentclass[10pt]{article}          \usepackage[margin=1in]{geometry}     \usepackage{amsmath,amsthm,amssymb}     \usepackage{graphicx,ctable,booktabs}     \usepackage{verbatim}     \usepackage{tikz}     \usetikzlibrary{automata,positioning}     \usepackage{mdwtab}     \usepackage{syntax}     % ----------------------------------------------------------------------------------------------------------------------------------------------                                  % Commands                                                                                %-----------------------------------------------------------------------------------------------------------------------------------------------                                  \newcommand{\justif}[2]{&{#1}&\text{#2}}     \newcommand{\N}{\mathbb{N}}     \newcommand{\Z}{\mathbb{Z}}     \newcommand{\R}{\mathbb{R}}          \begin{document}     \section*{Pushdown Automata}           \begin{grammar}\centering          <S> $\rightarrow$ 0S1 | $\epsilon$      \end{grammar}          \begin{center}     \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]        \node[state,initial,accepting] (q_0)   {$q_0$};        \node[state] (q_1) [right=of q_0] {$q_1$};        \node[state] (q_2) [below=of q_1] {$q_2$};        \node[state,accepting] (q_3) [left=of q_2] {$q_3$};        \path[->]         (q_0) edge node {$\epsilon,\epsilon \to \$$} (q_1)         (q_1) edge [loop above] node {$0,\epsilon\to 0$} ()               edge node {$1,0\to\epsilon$} (q_2)         (q_2) edge [loop right] node {$1,0\to\epsilon$} ()               edge node {$\epsilon,\$\to\epsilon$} (q_3);     \end{tikzpicture}     \end{center}          \end{document}        * What is the issue here and how can I get this to compile so that I can get my pdf? Thanks for all the help!


title: How to Blend Fcolorbox with Surrounding Text

text: Based on `\usepackage{xcolor}` you can box text using the commmand `\fcolorbox{declared-color-frame}{declared-color-background}{text}`. Colored boxes with colored frames and linebreaks can be created by the following code of Gonzalo Medinas answer to Draw box with colored background and linebreaks which adjusts to the text width? (Note: I changed the original `\colorbox` to `\fcolorbox`, added a color to the frame and added another box `MyDBox`.)               \usepackage{varwidth}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{lipsum}          \newcommand\MyCBox[1]{%       \fcolorbox{blue}{SkyBlue}{\begin{varwidth}{\dimexpr\linewidth-2\fboxsep}#1\end{varwidth}}}          \newcommand\MyDBox[1]{%       \fcolorbox{red}{RedOrange}{\begin{varwidth}{\dimexpr\linewidth-2\fboxsep}#1\end{varwidth}}}      **My Question** : How to create a colored box around text with a colored frame that fits in the "normal" text without breaks regardless of whether it is one word, a number of words or a few lines of words. As this question doesnt seem very clear to myself, I hope the difference between the two examples will show what I mean. Example1 ![enter image description here](http://i.stack.imgur.com/a31SR.png) Ideally, the colored box with a colored frame would blend in as smooth as colored text (`\textcolor{}{}`) does. It wouldnt exceed the default textwidth, it could start with any word of a line, it could be directly followed by neutral text or another `\MyDBox` etc. Example2 ![enter image description here](http://i.stack.imgur.com/jZT3h.png)


title: Moderncv: Extra vertical space after cvitem

text: Extra vertical space is produced after `\cvitem` and before the next `\section`. Is there a better way to fix this than to use `\vspace*{-6mm}`? The problem is shown below, between the "Skills" and "Language" sections. ![MWE](http://i.stack.imgur.com/xv6Vr.png) MWE:               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{classic} % banking, casual, classic, empty, oldstyle options       \moderncvcolor{blue}   % black, blue, green, grey, orange, purple, red options       \usepackage[scale=0.85]{geometry} % default scale=0.7. height= scale * layoutheight          \firstname{John}     \familyname{Doe}     \title{R\'esum\'e}     % optional          \begin{document}     \makecvtitle     \section{Professional Experience}         \cventry{Year--Year}{Intern}{Company}{Nowhere}{State}{             \begin{itemize}                 \item Did something important here.             \end{itemize}}          % problem with vertical space-------------------------------------------------     \section{Education}         \cventry{06/11}{Bachelor of Arts \LaTeX}{University of \LaTeX}{}{\textit{4.0/4.0}}{}     %\vspace*{-6mm} %this will fix vertical spacing for \moderncvstyle{classic}, but create vertical spacing issues for other \moderncvstyle{xyz}.          % problem with vertical space -------------------------------------------------     \section{Skills}         \cvitem[-1.2em]{}{             \begin{itemize}                 \item \LaTeX             \end{itemize}}     %\vspace*{-6mm} %this will fix vertical spacing for \moderncvstyle{classic}, but create vertical spacing issues for other \moderncvstyle{xyz}.          \section{Languages}         \cvitem{}{             \begin{itemize}                 \item TeX-speak             \end{itemize}}     % \cvitem{}{job description text here}          \end{document}      My problem is similar to this: Vertical space before section title in moderncv I couldn't successfully implement the solution found there though. And similar to this: How can I remove extra space after `itemize` in moderncv? But the answer didn't work for me.


title: Tables extending into the right/outer margin

text: I have some wide tables (might be figures, too) that don’t fit into `\textwidth`. If the `draft` document option is active, there’s a black border on the right indicating that it’s wider than allowed. How can I calculate the maximum width, i.e. the distance from text start at the left to margin paragraph end at the right? How can I tell LaTeX to respect this maximum width for tables and figures?               \documentclass[draft]{scrartcl}     \usepackage[showframe]{geometry}     \usepackage{blindtext}          \begin{document}     \blindtext     \marginpar{This is a \texttt{marginpar} with multiple lines}     \blindtext          \begin{table}     \begin{tabular}{p{1.16\textwidth}}    % <-- trial-and-error value     \blindtext     \end{tabular}     \caption{A wide table that shall extend into the right margin,              but no wider than margin notes or margin paragraphs do.}     \end{table}     \end{document}


title: How to move the images in \includegraphics to different location

text: \documentclass[12pt]{article}     \usepackage{lipsum}     \usepackage{graphicx}     \begin{document}     \includegraphics[scale=.25]{testimage.jpg}     \lipsum[4]     \end{document}      How to shift the location of the image "testimage.jpg" (you can use any image for the demo) in the document?Because the document is shifted down after inserting the image. Rather how do I insert images into free spaces in the document?


title: Miss the bottom line of the frame header of the cals table on the first page?

text: If the first page first line no nullcell, then the header bottom line no miss. If nullcell, then miss, but only on the first page, the others do not. I don't understand why. Sorry, for my poor english. ![enter image description here](http://i.stack.imgur.com/8Oa3I.png) Full source code:               \documentclass[12pt]{article}          \usepackage{cals}          \makeatletter          \begin{document}          \begin{calstable}     \colwidths{     {100pt}     {100pt}     }     \thead{     \def\cals@borderT{0.4pt}     \def\cals@borderB{0.4pt}     \def\cals@borderL{0.4pt}     \def\cals@borderR{0.4pt}     \brow     \alignC     \cell{head1}     \cell{head2}     \def\cals@borderT{0pt}     \def\cals@borderB{0pt}     \def\cals@borderL{0pt}     \def\cals@borderR{0pt}     \erow     }     \tfoot{     \hrule width 200pt height 0.4pt depth 0pt\relax     }          %\brow     %\def\cals@borderT{0pt}     %\def\cals@borderB{0pt}     %\def\cals@borderL{0.4pt}     %\def\cals@borderR{0.4pt}     %\cell{1}     %\def\cals@borderL{0pt}     %\def\cals@borderR{0.4pt}     %\cell{text 1}     %\def\cals@borderR{0pt}     %\erow          \brow     \def\cals@borderT{0pt}     \def\cals@borderB{0pt}     \def\cals@borderL{0.4pt}     \def\cals@borderR{0.4pt}     \nullcell{ltr}     \def\cals@borderL{0pt}     \def\cals@borderR{0.4pt}     \cell{text 2}     \def\cals@borderR{0pt}     \erow          \brow     \def\cals@borderT{0pt}     \def\cals@borderB{0pt}     \def\cals@borderL{0.4pt}     \def\cals@borderR{0.4pt}     \nullcell{blr}     \spancontent{2}     \def\cals@borderL{0pt}     \def\cals@borderR{0.4pt}     \cell{text 2}     \def\cals@borderR{0pt}     \erow          \tbreak{\vfill\break}          \brow     \def\cals@borderT{0pt}     \def\cals@borderB{0pt}     \def\cals@borderL{0.4pt}     \def\cals@borderR{0.4pt}     \nullcell{ltr}     \def\cals@borderL{0pt}     \def\cals@borderR{0.4pt}     \cell{text 3}     \def\cals@borderR{0pt}     \erow          \brow     \def\cals@borderT{0pt}     \def\cals@borderB{0pt}     \def\cals@borderL{0.4pt}     \def\cals@borderR{0.4pt}     \nullcell{blr}     \spancontent{3}     \def\cals@borderL{0pt}     \def\cals@borderR{0.4pt}     \cell{text 3}     \def\cals@borderR{0pt}     \erow          \end{calstable}          \end{document}


title: Ugly two ordinates plot

text: For some reason the plot generated from this code looks extremely ugly. The two series look like they were hand-painted. I thought the `smooth` property would help but still the same ugly plot.               \documentclass[8pt]{beamer}     \usepackage{pgfplots}          \begin{document}     \begin{frame}     \begin{tikzpicture}     \begin{axis}[domain=-0.015:1.15,         width=10cm,         scale only axis,         xmin=-0.015,         xmax=1.15,         height=8cm,         axis y line=left,         xlabel=$x_{\alpha}$,         ylabel=$y_{j}$]         \addplot [id=logit,color=blue,thick,smooth,mark=x] coordinates   {(-0.0148,-1.56862) (0.02902,-3.28582)(0.06382,-3.28582)(0.12780,-2.56495)(1.13767,-3.33220)};     \end{axis}     \begin{axis}[domain=-0.015:1.15,         width=10cm,         scale only axis,         xmin=-0.015,         xmax=1.15,         height=8cm,         axis y line=right,         axis x line=none,         ylabel=$\tau_{j}$]         \addplot [id=txdef,color=green,thick,smooth,mark=*] coordinates   {(-0.0148,0.17241) (0.02902,0.03571)(0.06382,0.03571)(0.12780,0.07143)(1.13767,0.03448)};     \end{axis}     \end{tikzpicture}               \end{frame}          \end{document}      ![result](http://i.stack.imgur.com/cFkNz.png)


title: Arabic comma in polyglossia

text: I'm writing a book of probability in arabic, and was using for this arabtex, which is now obsolete for my use. I've done my migration to polyglossia arabic, by the way,               \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}     \newfontfamily\arabicfont[Script=Arabic]{Traditional Arabic}      I've a problem now. The comma was automatically changed in arabic comma (،) by arabtex, but this is not done by my new packages. How can I obtain this. Precisely, how to obtain the arabic comma (،) in compilation when I write (,) in my .tex file ? Thank you for reply. * * * I have the reflex to write , instead of ، even when I write arabic text, and a chance is that it is transformed in arabtex in arabic comma... I can replace the character , by the character ، with the editor (here texmaker) but not automatically because in mathematics mode (between $) it's not taken in account and, if $f(x,y)$ is replaced by $f(x،y)$ is compiled $f(x y)$, which is clearly a problem... The mapping what you are talking about must solve this problem, of comma in text, and comma in mathematics. Thanks


title: How to simplify vector graphics containing a huge number of data points

text: In the genomics field people often produce something called Manhattan plot which consists of points standing for millions of p-values: ![enter image description here](http://i.stack.imgur.com/ZCjUv.png) It's very slow for display in vector format, some viewers simply cannot deal with it, but a raster image is much easier to open in this case, but of course we love vector graphics infinitely better ;) . At the bottom of the plot we can see the density of points are so high that we can join them into a filled area, which should reduce the calculation burden immensely. How can this be done in TeX? As suggested by one of the answers, it should be possible to get a union of nearby points in a vector graphic editor, but it will take a lot of work. Ideally, one would like to see each point as a path, and during the ploting process, the union operation to be executed point by point, thus in the end the whole plot will be simplified to the largest degree.


title: Swedish characters, but english captions

text: I am writing thesis in english but I want to be able to use swedish letters. I use               \usepackage[swedish]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}      This works fine, I thought, but I now noticed that all the captions (table, fig etc) use the swedish form "Figur" instead of "Figure" and "Tabell" instead of "Table". Any ideas on how to achieve the english form of captions and still be able to use swedish letters in the text?


title: Two sets of margins for a single page

text: Does anyone know how to change the marins of a document midpage? IE a header has .5 inch margins but the text itself has only 1 inch margins?


title: Get rid of extra boxes in cgloss4e

text: I notice that glosses using the `\twosent` macro in `cgloss4e` have an extra, phantom "word" at the end. I use the following code to add a small rule indicating where each word box starts:               \documentclass{article}     \usepackage{linguex}     \usepackage{cgloss4e} % (loaded by linguex but added for clarity)     \begin{document}     \renewcommand*\eachwordone{\rule[-2pt]{2pt}{6pt}}     \renewcommand*\eachwordtwo{\rule[-2pt]{2pt}{6pt}}     \ex.     \gll    con heo \\         animal  pig \\     \glt    `pig'   \par     \end{document}      ![enter image description here](http://i.stack.imgur.com/uwA46.png) A third word box appears although there are only two words in the arguments to `\gll`. This phantom word box is undesirable because if it appears by itself on a line, it causes unnecessary vertical space between the gloss line and the free translation. The effect can be appreciated by inserting the following line into the preamble of the above code:               \usepackage[showframe,textwidth=1.2in]{geometry}      ![enter image description here](http://i.stack.imgur.com/TOLOD.png) Any ideas on how to get `cgloss4e` to make one word box less?


title: Bibtex and Beamer

text: So I'm working on a presentation that will be given to a very small group of people (3-5 people) that has a lot of citations (100-200), any one of which could be interesting to the audience at a given time. I was thinking that it would be nice to create a separate page (well, multiple pages) of references that the audience could refer to during my presentation. Can beamer do this? Can I use bibtex at all with beamer? The citations _must_ be numbered in order that they are used, since sometimes I will reference 20 or 30 articles at once, and I need to be able to use the dash notation (i.e. 35-56 to cite all references from 35 to 56 at once). Obviously, putting references on a slide at the end or at the bottom of the slides is not an option. I'd like to be able to apply a citation style file to the bibliography if possible. Also, numbering by hand isn't really an option, since I would have to renumber every time I added a citation.


title: Why does \marginpar sometimes add an unnecessary newline?

text: In the following example, the main paragraph gets typeset as 3 lines of text, with the paragraph ending on the third line before it reaches the margin. However, when un-commenting the line with the `\marginpar` command, the paragraph is reformatted so that the third line extends all the way to the margin, and a blank fourth line is inserted. What is the `\marginpar` inserting into the main text that doesn't "fit" into the third line, and why?               \documentclass{amsart}     \begin{document}          \noindent     Suppose furthermore that abcde is a regular cardinal such thati abcdefghiji     The collection abcdefg is called a      nice collection of elementary submodels of $H(\theta)$ indexed by $T$ if,     in addition to being a nice collection of sets as above, we have:  Bake     %\marginpar{Bake a cake.}          Next paragraph.     \end{document}      (Note: The `\noindent` and the choice of document class are probably not essential to the problem, but I couldn't quite get the spacing right when trying to reproduce the problem without them.) I realize that the practical workaround is to remove the inter-word space before the `\marginpar` command. However, it is not clear to me why this should be necessary. Furthermore, I discovered this problem when using the `\todo` command of the `todonotes` package, which relies on `\marginpar`. It seems that `\todo` intentionally gobbles the space following its argument, meaning that it is designed so that one should (in general) leave a space before it, but this case then becomes an exception.


title: Hiding the references in a letter

text: I have written a letter and I want to cite the references of my paper. However, I don't want the reference section to appear at the end of my letter. How can I hide this section? I have used the `\begin{thebibliography}` and `\bibitem` for the references and I am citing them by `\cite{marcam2(alfa)}`.               \begin{thebibliography}{1}          \bibitem{marcam2(alfa)}     M. Abramowitz and I. A. Stegun, {\it Handbook of mathematical functions with formulas, graphs, and mathematical tables}. U. S. Department of Commerce, 1972.     \bibitem{choi(2u)}     H. Bolcskei, R. U. Nabar, O. Oyman and A. J. Paulraj, `` Capacity scaling laws in MIMO relay networks, " {\it IEEE Trans. Wireless Commun}., vol. 5, no. 6, pp. 1433-1444, June 2006.     \end{thebibliography}


title: Why does \maketitle break my document?

text: I have a paper to submit in an hour, and have an issue with the `\maketitle` command. The template provided to me _does not work_ , and the instructor has told me to figure it out on my own. Here is a simplified example:               \documentclass{bioinfo}     \copyrightyear{2014}     \pubyear{2014}          \begin{document}     \firstpage{1}          \title[QTL Analysis]{Evaluation of a QTL Dataset}     \author[Robert R. Gotwals]{Robert R. Gotwals\,\footnote{to whom correspondence should be addressed}}     \address{$^{1}$Department of XXXXXXX, Address XXXX etc.}          \history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}          \maketitle          \begin{abstract}          Here's the abstract.           \section{Keywords:} first, second, third, fourth          \section{Contact:} \href{cowbell@ncssm.edu}{gotwals@ncssm.edu}     \end{abstract}          \section{Introduction}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.                \end{document}      The `.log` file:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.12.9)  28 MAY 2014 20:50          entering extended mode          **document.tex                    ("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume          nt\document.tex"          LaTeX2e <2011/06/27>          Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar          abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,           croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga          lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland          ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,           lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n          german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman          ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm          an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl          ishmax, welsh, loaded.                    ("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume          nt\bioinfo.cls"          Document Class: bioinfo 2003/02/08 0.1          ("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"          Package: inputenc 2008/03/30 v1.1d Input encoding file          \inpenc@prehook=\toks14          \inpenc@posthook=\toks15          )          ("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume          nt\crop.sty"          Package: crop 2001/11/16 v1.6 cropmarks (mf)          \CROP@width=\dimen102          \CROP@height=\dimen103          \CROP@index=\count79           ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"          Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)                    ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"          Package: trig 1999/03/16 v1.09 sin cos tan (DPC)          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"          File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive          )          Package graphics Info: Driver file: pdftex.def on input line 91.                    ("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"          File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX                    ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"          Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)          )          ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"          Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)          )          \Gread@gobject=\count80          ))          \CROP@offset=\count81          Package crop Info: Local config file crop.cfg used on input line 344.                    ("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetexconfig\crop.cfg"))          Package crop Info: using pdf(la)tex graphics driver on input line 33.                    ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"          Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)                    ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"          Package: keyval 1999/03/16 v1.13 key=value parser (DPC)          \KV@toks@=\toks16          )          \Gin@req@height=\dimen104          \Gin@req@width=\dimen105          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"          Package: amsmath 2013/01/14 v2.14 AMS math features          \@mathmargin=\skip41                    For additional information on amsmath, use the `?' option.          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"          Package: amstext 2000/06/29 v2.01                    ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"          File: amsgen.sty 1999/11/30 v2.0          \@emptytoks=\toks17          \ex@=\dimen106          ))          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty"          Package: amsbsy 1999/11/29 v1.2d          \pmbraise@=\dimen107          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"          Package: amsopn 1999/12/14 v2.01 operator names          )          \inf@bad=\count82          LaTeX Info: Redefining \frac on input line 210.          \uproot@=\count83          \leftroot@=\count84          LaTeX Info: Redefining \overline on input line 306.          \classnum@=\count85          \DOTSCASE@=\count86          LaTeX Info: Redefining \ldots on input line 378.          LaTeX Info: Redefining \dots on input line 381.          LaTeX Info: Redefining \cdots on input line 466.          \Mathstrutbox@=\box26          \strutbox@=\box27          \big@size=\dimen108          LaTeX Font Info:    Redeclaring font encoding OML on input line 566.          LaTeX Font Info:    Redeclaring font encoding OMS on input line 567.          \macc@depth=\count87          \c@MaxMatrixCols=\count88          \dotsspace@=\muskip10          \c@parentequation=\count89          \dspbrk@lvl=\count90          \tag@help=\toks18          \row@=\count91          \column@=\count92          \maxfields@=\count93          \andhelp@=\toks19          \eqnshift@=\dimen109          \alignsep@=\dimen110          \tagshift@=\dimen111          \tagwidth@=\dimen112          \totwidth@=\dimen113          \lineht@=\dimen114          \@envbody=\toks20          \multlinegap=\skip42          \multlinetaggap=\skip43          \mathdisplay@stack=\toks21          LaTeX Info: Redefining \[ on input line 2665.          LaTeX Info: Redefining \] on input line 2666.          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\array.sty"          Package: array 2008/09/09 v2.4c Tabular extension package (FMi)          \col@sep=\dimen115          \extrarowheight=\dimen116          \NC@list=\toks22          \extratabsurround=\skip44          \backup@length=\skip45          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"          Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)                    ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"          File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive          )          Package color Info: Driver file: pdftex.def on input line 130.          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"          Package: amssymb 2013/01/14 v3.01 AMS font symbols                    ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"          Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support          \symAMSa=\mathgroup4          \symAMSb=\mathgroup5          LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'          (Font)                  U/euf/m/n --> U/euf/b/n on input line 106.          ))          (C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\sttools\flushend.sty          Package: flushend 2014/04/24 v2.2 Balancing columns in twocolumn mode          \flushend@@lastskip@a=\skip46          \flushend@@lastskip@b=\skip47          \flushend@@lastskip@c=\skip48          \flushend@@penalty@a=\count94          \flushend@@lastkern@a=\dimen117          \var@@temp@spread=\dimen118          \var@@temp@a=\dimen119          \flushend@@page@rule=\dimen120          \flushend@@varbox@a=\box28          \flushend@@varbox@c=\box29          \flushend@@tempbox@a=\box30          \flushend@@tempbox@c=\box31          \@viper=\box32          \hold@viper=\box33          \atColsBreak=\toks23          \atColsEnd=\toks24                    (C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty          Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX                    ("C:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty"          Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)          \et@xins=\count95          )          \etb@tempcnta=\count96          ))          (C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\sttools\stfloats.sty          Package: stfloats 2012/05/29 v1.1 Improve float mechanism and baselineskip sett          ings          \@dblbotnum=\count97          \c@dblbotnumber=\count98          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\amscls\amsthm.sty"          Package: amsthm 2004/08/06 v2.20          \thm@style=\toks25          \thm@bodyfont=\toks26          \thm@headfont=\toks27          \thm@notefont=\toks28          \thm@headpunct=\toks29          \thm@preskip=\skip49          \thm@postskip=\skip50          \thm@headsep=\skip51          \dth@everypar=\toks30          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\chngpage.sty"          Package: chngpage 2003/08/10 v1.2 change page layout          \c@cp@cnt=\count99          \c@cp@tempcnt=\count100          )          ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\times.sty"          Package: times 2005/04/12 PSNFSS-v9.2a (SPQR)           )          \c@section=\count101          \c@subsection=\count102          \c@subsubsection=\count103          \c@paragraph=\count104          \c@subparagraph=\count105          \c@figure=\count106          \c@table=\count107          \dropfromtop=\skip52          \extraspace=\skip53          \aboveskipchk=\skip54          \abovecaptionskip=\skip55          \belowcaptionskip=\skip56          \rotdimen=\dimen121          \tempdime=\dimen122          \temptbox=\box34                    (C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\natbib\natbib.sty          Package: natbib 2010/09/13 8.31b (PWD, AO)          \bibhang=\skip57          \bibsep=\skip58          LaTeX Info: Redefining \cite on input line 694.          \c@NAT@ctr=\count108          ))          ("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume          nt\document.aux")          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.          LaTeX Font Info:    ... okay on input line 5.          LaTeX Font Info:    Try loading font information for OT1+ptm on input line 5.           ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd"          File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.          )          (C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii          [Loading MPS to PDF converter (version 2006.09.02).]          \scratchcounter=\count109          \scratchdimen=\dimen123          \scratchbox=\box35          \nofMPsegments=\count110          \nofMParguments=\count111          \everyMPshowfont=\toks31          \MPscratchCnt=\count112          \MPscratchDim=\dimen124          \MPnumerator=\count113          \makeMPintoPDFobject=\count114          \everyMPtoPDFconversion=\toks32          )          LaTeX Font Info:    Try loading font information for OT1+phv on input line 14.           ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1phv.fd"          File: ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.          )          LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <9> not available          (Font)              Font shape `OT1/phv/m/sl' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/bx/it' in size <9> not available          (Font)              Font shape `OT1/phv/b/it' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/b/it' in size <9> not available          (Font)              Font shape `OT1/phv/b/sl' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/bx/it' in size <19> not available          (Font)              Font shape `OT1/phv/b/it' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/b/it' in size <19> not available          (Font)              Font shape `OT1/phv/b/sl' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <8> not available          (Font)              Font shape `OT1/phv/m/sl' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <9> not available          (Font)              Font shape `OT1/phv/b/n' tried instead on input line 14.          LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <16> not available          (Font)              Font shape `OT1/phv/b/n' tried instead on input line 14.          LaTeX Font Info:    Calculating math sizes for size <13> on input line 14.                              LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <13> not available          (Font)              size <12> substituted on input line 14.                              LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <6.5> not available          (Font)              size <6> substituted on input line 14.                              LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <13> not available          (Font)              size <12> substituted on input line 14.                              LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <6.5> not available          (Font)              size <6> substituted on input line 14.                              LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <13> not available          (Font)              size <12> substituted on input line 14.                              LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <6.5> not available          (Font)              size <6> substituted on input line 14.                    LaTeX Font Info:    Try loading font information for U+msa on input line 14.          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd"          File: umsa.fd 2013/01/14 v3.01 AMS symbols A          )          LaTeX Font Info:    Try loading font information for U+msb on input line 14.                    ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd"          File: umsb.fd 2013/01/14 v3.01 AMS symbols B          )          LaTeX Font Info:    Calculating math sizes for size <9.09996> on input line 14.                                        LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <4.54997> not available          (Font)              size <5> substituted on input line 14.                              LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <4.54997> not available          (Font)              size <5> substituted on input line 14.                              LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <4.54997> not available          (Font)              size <5> substituted on input line 14.                              LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <7.5> not available          (Font)              size <7> substituted on input line 14.                              LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <7.5> not available          (Font)              size <7> substituted on input line 14.                              LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <7.5> not available          (Font)              size <7> substituted on input line 14.                    ! Undefined control sequence.          <argument> ...2}\selectfont \raggedright \@editor                                                             \par } \@@par           l.14 \maketitle                    The control sequence at the end of the top line          of your error message was never \def'ed. If you have          misspelled it (e.g., `\hobx'), type `I' and the correct          spelling (e.g., `I\hbox'). Otherwise just continue,          and I'll forget about whatever was undefined.                              Underfull \hbox (badness 10000) detected at line 14          []           []                    LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <8> not available          (Font)              Font shape `OT1/phv/b/n' tried instead on input line 20.          LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <10> not available          (Font)              Font shape `OT1/phv/b/n' tried instead on input line 25.          - LAST -          Extra skip:28.55157pt          Left:87.0pt/1.77998pt          Right:58.44843pt/3.00003pt          Output:87.0pt          LaTeX Font Info:    Try loading font information for OMS+phv on input line 29.          ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omsphv.fd"          File: omsphv.fd           )          LaTeX Font Info:    Font shape `OMS/phv/m/n' in size <7> not available          (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 29.           [1                    {C:/Users/chire001/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}                              ]          ("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume          nt\document.aux")                    LaTeX Font Warning: Size substitutions with differences          (Font)              up to 1.0pt have occurred.                     )           Here is how much of TeX's memory you used:           3376 strings out of 493921           42650 string characters out of 3147273           105221 words of memory out of 3000000           6603 multiletter control sequences out of 15000+200000           36737 words of font info for 84 fonts, out of 3000000 for 9000           845 hyphenation exceptions out of 8191           37i,11n,28p,856b,294s stack positions out of 5000i,500n,10000p,200000b,50000s          {C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Program File          s/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/Program Files/MiKTeX 2          .9/fonts/type1/public/amsfonts/cm/cmsy6.pfb><C:/Program Files/MiKTeX 2.9/fonts/          type1/public/amsfonts/cm/cmsy7.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/pub          lic/amsfonts/cm/cmsy9.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic          /uhvb8a.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvbo8a.pfb><          C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvr8a.pfb><C:/Program Fil          es/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvro8a.pfb><C:/Program Files/MiKTeX 2.9          /fonts/type1/urw/times/utmr8a.pfb>          Output written on document.pdf (1 page, 75748 bytes).          PDF statistics:           43 PDF objects out of 1000 (max. 8388607)           0 named destinations out of 1000 (max. 500000)           1 words of extra memory for PDF output out of 10000 (max. 10000000)      The bioinfo document class can be downloaded from http://www.oxfordjournals.org. Does anyone have any idea of what is going wrong? System is Texmaker (compiler is Miktex) on 64-bit Windows 7. Code also refuses to compile on ShareLaTeX. Thanks!


title: Fill rectangular area with PDF pattern like graph paper

text: # Short version I want to fill one or more rectangular areas on a page using a regular pattern. The area should span the page width and stretch vertically to fill remaining space. The pattern should be included in the generated PDF only once, using the PDF pattern facilities, as opposed to repeatedly emitting the same drawing instructions for each copy of the basic cell. Using specials that only work for `pdflatex`is acceptable. # Long version My aim is to create sheets with alternating problem statements and answer areas. The answer areas (and only these) should be patterned using a grid of 5mm squares. (In Germany this is usually called “Karopapier”, and judging from Wikipedia, the US term probably would be “graph paper” or more specifically “quadrille paper”.) Black lines for the squares are too small, and gray lines won't reproduce correctly in the final result from an offset printing press. So the squares have to be made up by tiny dots, 10 per edge. I currently have code to do this, adapted from some other code I don't fully understand. It creates a single suqare by saving the result of a `picture`environment to a box. That box is then repeated using `\cleaders` to fill one row, and repeated again to fill a block. It works, but the result has many drawbacks. Apparently the PDF will contain separate drawing instructions for each and every dot. This makes the files very large, causes my PDF viewer to become very slwo when scrolling through these documents, and will cost considerable time to print as well. I know that it is possible to define patterns in PDF, and to fill shapes using these patterns. I want to leverage this from within the LaTeX document. I'd hope to write some macros so that I can simply invoke one macro like `\graphpaper{\textwidth}{fill}` or similar to create such a box. Everything else should be hidden behind the scenes. # Sketch of a possible solution I have a rough idea of how I'd go about solving this, using features provided by the pdfTeX engine resp. the `pdflatex` command.   1. Use `\pdfsavepos` to mark the start position   2. Use `\pdflastxpos` and `\pdflastypos` to write that position to some helper file   3. Create space for the box, using the dimensions provided   4. Mark and write the end position like 1. and 2.   5. Reserve an object number using `\pdfobj reserveobjnum`   6. Write the object number to the output file as well   7. Insert some `\special` as a placeholder for the box, referencing the above object   8. Replace `\output` with something that calls the original `\output` up front   9. Before doing the actual output, open the helper file for output   10. After the output, read the file back in to obtain positions and object numbers   11. For each region to be patterned, compute the required dimensions by subtracting marked positions and rounding down to a multiple of the square size.   12. Create the corresponding object using `\pdfobj useobjnum`   13. For the first page which needs it, create an object to represent the pattern itself I'm not completely sure this would work as intended. In particular, I still have some doubts about whether I'd be able to include more than one region per page, and I'm also somewhat fuzzy whether the above single-pass approach would actually work. # Questions My core question is this: **Do you know of any easier way to achieve what I'm trying to do?** I'll be happy about references to a package which already provides what I need. Lacking that, I'll also value references to code which does something similar, upon which I might build my stuff. If anyone has particular comments about the approach I outlined above, and whether it would work, that would be useful too.


title: Center and yet align figures on opposite pages

text: This is an extension of the question "How to ensure that 2 couples of figures are on 2 facing pages?". I not only want to ensure that the figures are on facing pages but also that the one with the smaller height is aligned to the one with the larger height. The latter should be centered on the page. The following example should explain the problem:               \documentclass{book}     \usepackage{dpfloat}     \usepackage[demo]{graphicx}          \begin{document}          Some Text          \begin{figure}       \begin{leftfullpage}         \centering         \includegraphics[width=5cm,height=3cm]{inserthere}         \caption{This is the short caption.}       \end{leftfullpage}     \end{figure}          \begin{figure}       \begin{fullpage}         \centering         \includegraphics[width=5cm,height=3cm]{inserthere}         \caption{This second caption does not only look larger, it actually is,           by one line.}       \end{fullpage}     \end{figure}          \end{document}      results in![not aligned figures](http://i.stack.imgur.com/EZ0vc.png) I would like that figures 2 stays at the same place (centered on the page) but figure 1 moves up a bit so that the top of the two figures are aligned as well as the beginning of the captions.


title: Behavior of \\ in Plain TeX

text: According to `\show`, the pre-defined control sequence `\\\` is supposed expand to its argument without the suffix "pt":               This is TeX, Version 3.1415926 (TeX Live 2012/Debian)     **\show\\     > \\=macro:     #1pt->#1.     <*> \show\\      However, using it fails:               *\message{\\5pt}     ! Argument of \\ has an extra }.     <inserted text>                      \par      <to be read again>       When defining a macro that has the same definition as `\\\`, everything works as expected:               *\def\mymacro #1pt{#1}          \show\mymacro     > \mymacro=macro:     #1pt->#1.          *\message{\mymacro5pt}     5      How can this be explained?


title: Remove top and bottom margins around listings

text: When using the `lstlisting` environment, or similar ones from the `listings` package, there are paragraph-like margins above and below the actual text. This makes sense in a paper, but gets in the way if you try to put code inside a Tikz node (e.g., for a Beamer presentation):                \node[inner sep=1mm, text width=6cm, draw=green, line width=2pt, rounded corners]       {%         \lstinputlisting[basicstyle=\tiny\ttfamily, columns=fullflexible]{alt1.java}        };         ![listing with margins](http://i.stack.imgur.com/Wjvbt.png) (Do ignore the question of why I put this jumbled code in a node...) As you can see there are top and bottom margins that add extra redundant space to the node. How can I remove these margins? I suppose it is some `lstset` option, but I couldn't find it.


title: Why does 'every node' not work inside a scope environment?

text: I just tried the following and was suprised it didn't work:               \begin{tikzpicture}       ... some commands            \begin{scope}[very thick,         every node=./style={circle, fill=white, minimum size=1.2mm, inner sep=0pt}         ]              \node {};       \end{scope}            ... other commands          \end{tikzpicture}      results in               ! Package pgfkeys Error: I do not know the key '/tikz/every node./style'      and I am going to ignore it. Perhaps you misspelled it.      How can I make `every node` available in a `scope` environment?


title: Line ending with e.g. \\ \\* or \\[10 mm]

text: I am looking at some LaTeX source, trying to find out what different things mean. I am also reading the memoir manual. I have stumbled upon two backslashes being used at the end of lines, optionally with an extra "argument". I have found out that in the verse environment, `\\\\*` prevents following page breaks. However I have also seen `\\\` and `\\\\[8 mm]` being used in a redefinition of the `\renewcommand{\maketitle}`. What does `\\\` have a general meaning in LaTeX?


title: How to export odt into latex?

text: > **Possible Duplicate:**   >  How do I convert Open Office documents into LaTeX? Good morning Somebody give me old document in doc or odt format and I would like to include them with mine which are latex documents. I see that some extension to openoffice or libreoffice exist in order to do that. I am working under ubuntu 12.04 with libreoffice and the following package are available :   * libreoffice-writer2latex   * writer2latex   * openoffice.org-writer2latex   * libwriter2latex-java The description of above package is the same, only the title change. Do you know which is the good one ? Thanks


title: Neural Network representation

text: I would like to translate to Spanish a diagram that **represents a neural network** , the diagrama is something like this: ![Step 1](http://i.stack.imgur.com/ypnOC.gif) ![Step 2](http://i.stack.imgur.com/uHpj5.gif) I would like to clone the design and effects, so I need some examples to do this,also I think that this image is something harder: ![Step3](http://i.stack.imgur.com/nfYac.gif)


title: Meaningful error messages when using latex instead of pdflatex

text: When I have TikZ images or I include .png graphics, I need to use pdflatex instead of plain vanilla latex. (That is, I need to use pdflatex all the time, rather than just when I want to produce the final pdf). Sometimes I forget that my current document (or one `\include`d in it) contains one of these things. The compilation using latex doesn't work. The errors I get out when this happens don't seem to be meaningful: they don't just say "No such file image.eps" or "latex can't work TikZ" or the like. Is there anyway I can make these kinds of errors more transparent? I've often spent ages fiddling with insignificant other bits of code, because I haven't realised it's the image that is messing up the compilation... Beamer also sometimes messes up in latex, but I normally spot that one...


title: Draw comparison lines between two listings

text: I have a LaTeX code set up as so:               \documentclass[a4paper,10pt]{report}          \usepackage[utf8]{inputenc}     \usepackage{fullpage}     \usepackage{listings}     \usepackage{graphicx}     \usepackage{float}     \usepackage{parcolumns}     \usepackage{qtree}     \usepackage{url}          \usepackage{color}     \usepackage{xcolor}     \usepackage{caption}     \usepackage{textcomp}     \usepackage{todonotes}          \lstset{         language=C,         keywordstyle=\bfseries\ttfamily\color[rgb]{0,0,1},         identifierstyle=\ttfamily,         commentstyle=\color[rgb]{0.133,0.545,0.133},         stringstyle=\ttfamily\color[rgb]{0.627,0.126,0.941},         showstringspaces=false,         basicstyle=\small,         numberstyle=\footnotesize,         stepnumber=1,         numbersep=10pt,         tabsize=2,         breaklines=true,         prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},         breakatwhitespace=false,         aboveskip={1.5\baselineskip},         columns=fixed,         upquote=true,         extendedchars=true,         frame=single     }          \begin{document}          \begin{parcolumns}[nofirstindent]{2}      \colchunk{       \noindent\begin{minipage}{.45\textwidth}          \begin{lstlisting}[language={[x86masm]Assembler},caption={Original code},label={lst:OrigCode}]       1       2       3       4       5       ..       12     \end{lstlisting}            \end{minipage}      }      \colchunk{       \begin{minipage}{.45\textwidth}          \begin{lstlisting}[language={[x86masm]Assembler},caption={Code after insertion of detour},label={lst:AfterDetour}]       86       4       5       ..       12     \end{lstlisting}            \end{minipage}      }      \colplacechunks     \end{parcolumns}          \end{document}      This produces two side-by-side code listings as follows: ![Before](http://i.stack.imgur.com/4UZiB.png) I want to more clearly illustrate the changes by drawing lines between changed parts of the code to produce something like this: ![After](http://i.stack.imgur.com/MHoGd.png) Is this possible? My alternative is to alter the image then attach it to the document as an image but this is undesirable for if I decide to modify the listing.


title: error related to amsmath with latex but not pdflatex

text: > **Possible Duplicate:**   >  How can I see why a file isn't compiling somewhere else, if it does in my > machine? I am getting a bunch of               ! Incompatible list cannot be unboxed      resulting from the `align` environment of amsmath if I compile with `latex`. However if I use `pdflatex` my output is produced without any problems. I would like to use psfrag for some figures, so I need to compile with `latex`. Is there an easy workaround for this problem? Or more importantly what is the reason of this problem?


title: Is it OK to use \tt etc. in latex2e if you don't want the text to inherit the font of the containing text?

text: I want some words to always be in upright teletype (they are defined to be something specific). If the sentence is emphasised and this word appears I do not want the text to be italic teletype, but remain upright teletype. In this case is it OK to use {\tt word} to achieve this effect or is there some better way?               \emph{A sentence that contains the {\tt word} yet it remains upright teletype.}


title: Normal font in theorem when typesetting algorithms

text: I'm using `amsthm` and `clrscode` to typeset algorithms. I'd like to have my algorithms numbered, so I do this:               \theoremstyle{plain}     \newtheorem{algorithm}[equation]{Algorithm}          \begin{algorithm}     The folowing algorithm does something. This text should stay in italics.          \begin{codebox}     \Procname{$\proc{Do-Something}(x,y)$}     \li \Return $0$ \Comment{here italics should be disabled}     \end{codebox}          \end{algorithm}      The plain theorem style has theorem name and number in bold, which I like, and the theorem statement in italic, which I also like. Unfortunately, in the case of an algorithm, the whole algorithm is typeset in italics and that looks very bad. So, for algorithms I'd like to turn off italics. How do I do that? Is there any environment that I could use to temporarily disable italics only in `codebox`? If possible, I'd like to not create any new theorem style.


title: Strange dvi output from `latex`

text: I've just compiled a `.tex` file from the shell using the `latex` command, and it looks as if the entire text of the file has been passed through some strange substitution cipher. Part of the `.dvi` output is below: ![The strange DVI output](http://i.stack.imgur.com/Qf2Bi.png) As you can see, the math-mode is basically fine, but the text has been garbled. What am I doing wrong? **Update:** The following code produces the figure above when compiled with `latex`.               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{times}     \usepackage{url}     \usepackage{amsmath}     \usepackage{alltt}     \usepackage[final]{graphicx}         \begin{document}          \subsubsection{Tandem mismatches effect}              The tandem mismatches (two adjacent mismatches) are taken into account but      the two first and positions cannot         be mismatched. Moreover the thermodynamic parameters are still not      available for every possible cases.         In such a case, the program, unable to compute any relevant result, will      quit with a warning.          For DNA duplexes, this program computes the hybridisation enthalpy and entropy from the elementary      parameters of each Crick's pair containing the mismatch(es).      \begin{multline*}     \Delta{}h_\mathrm{tandem-mismatch} =     \delta{}h_\mathrm{Crick's-pair-containing-tandem-mismatch} \\ +      \sum \delta{}h_\mathrm{Crick's-pair-containing-single-mismatch}     \end{multline*}          \end{document}      **Update:** Loading the `times` package causes the problem. The document               \documentclass{article}          \usepackage{times}          \begin{document}          hello          \end{document}      produces ![Not hello](http://i.stack.imgur.com/ZQ9ga.png) Leaving out the `\usepackage{times}` line gives the output you would expect.


title: TeX as the basis for data driven document generation system?

text: I am in the early stages of trying to replace an existing document generation system based on Microsoft Office apps (Word and Excel). The system runs once a year to generate over 300,000 individual documents of three different types (the new system may be an "on demand" for an individual document instead of batch processing all at once). Two of the types are mostly standard text with value place-holders, and some conditional logic for inclusion/exclusion of certain elements (standard paragraphs and/or values). One of the types includes a bar chart based on individual calculations. All of the values for replacement and conditional logic are sourced from an ASCII file, but some of the values are calculated from the data. The current system is very slow and error prone (at run time) and requires a complex system of machines, threads and message queues to scale the processing resources to a level that will get the job done within two weeks or so. Basically, there are three Word Document templates that include the value place-holders and conditional logic and text. The templates are processed with Office interop libraries to create an instance document. In the case of one of the types, Excel is used to create a bar chart that is injected (OLE embedded) into the instance document. The Word instance documents are then converted to (saved as) PDF. I only know a little about TeX (brushed up against it during my many years of Emacs use), but it seems that it might serve as a good basis to replace the behemoth described above. The problem is that I need some guidance as to whether or not TeX would be a good route to persue (performance being a key factor), and some pointers to resources that can accomplish the more obscure needed tasks (I know PDF generation is no issue). The final system would execute on Windows machine(s), and programmatic processing would be done with .NET or Java most likely.


title: Xetex compiling not working

text: I am running Opensuse 12.4, with kde 4.8.5. I try to compile a tex file using xelatex, but it always give me this output:               restricted \write18 enabled.     (Fatal format file error; I'm stymied)      I don't know what to do, Thank you,


title: How to grey out edges in a tikz graph?

text: I'm trying to grey out edges of a graph to high a region of interest. For instance, I would like to make every edge expect for that labeled "interest" grey in the following MWE.               \usefonttheme{serif}     \usepackage{tikz}     \usetikzlibrary{arrows}     \definecolor{burntorange}{cmyk}{0,0.52,1,0}          \begin{document}          \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,      thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]            \node[main node, scale=1.4] (interest) {$i$};       \node[main node, fill=blue!10] (j) [below left of=interest] {$j$};       \node[main node, fill=blue!10] (k) [below right of=j] {$k$};       \node[main node, fill=burntorange, below right of=interest, distance = 6cm ] (input)          [below right of=interest] {input $u$};          \path[every node/.style={font=\sffamily\small}]     (interest)             edge [bend right] node[left] {$\mathbf{M}_{ji}$} (j)             edge [loop above] node {$\mathbf{M}_{ii}$} (interest)             edge [bend left] node {$\mathbf{M}_{ki}$} (k)     (j)     edge node [right] {$\mathbf{M}_{ij}$} (interest)             edge [loop left] node {$\mathbf{M}_{jj}$} (j)             edge [bend right] node[left] {$\mathbf{M}_{jk}$} (k)     (k)     edge node [right] {$\mathbf{M}_{kj}$} (j)             edge node [bend right] {$\mathbf{M}_{ik}$} (interest)             edge [loop below] node {$\mathbf{M}_{kk}$} (k)     (input) edge [bend right] node {$\mathbf{W}_i$} (interest)             edge [bend left] node {$\mathbf{W}_k$} (k);     \end{tikzpicture}     \end{document}


title: Typesetting genealogical trees

text: I looking for a simple way to typeset a genealogical tree in LaTeX. In particular, I'm interested in typesetting a so-called "Ahnentafel", that is a tree that shows me, my parents, my grandparents, my great-grandparents etc. In other words, it is a hierarchical tree in which the number of branches doubles at each level. Is there a package that can help me? Sadly, http://www.ctan.org/topic/genealogy is empty. I've noted a few posts recommending TikZ for drawing trees. I've never used TikZ, and I'm reluctant to dive into it just for this purpose. But if I must, I must. **EDIT:** Here's an example of what I want to create: This is a 3-generation Ahnentafel. ![This is a 3-generation Ahnentafel](http://i.stack.imgur.com/m91fg.png)


title: A weird trigonometry identity applied to get the same result

text: The following two input files produce the same output. ## Method 1: ![enter image description here](http://i.stack.imgur.com/Fcz2J.png)               \documentclass[pstricks,border=15pt]{standalone}     \usepackage{pst-eucl}     \psset{PosAngle={-135,90},CurveType=polyline}          \begin{document}          \begin{pspicture}[showgrid=false](4,4)     \pstGeonode         (1,1){O}         (4,3){A}     \uput{1}%         [!3 1 sub 4 1 sub atan]         {!3 1 sub 4 1 sub atan}(O){$\pi-\theta$}     \end{pspicture}          \end{document}      ## Method 2: ![enter image description here](http://i.stack.imgur.com/lmU9u.png)               \documentclass[pstricks,border=15pt]{standalone}     \usepackage{pst-eucl}     \psset{PosAngle={-135,90},CurveType=polyline}          \begin{document}          \begin{pspicture}[showgrid=false](4,4)     \psset{linecolor=red}     \pstGeonode         (1,1){O}         (4,3){A}     \uput{1}%         [!\psGetNodeCenter{A}\psGetNodeCenter{O} A.y O.y sub A.x O.x sub atan]         {!\psGetNodeCenter{A}\psGetNodeCenter{O} A.y O.y sub neg A.x O.x sub atan}(O){$\pi-\theta$}     \end{pspicture}              \end{document}      The question is why do I have to express `3 1 sub 4 1 sub atan` in the first method as `A.y O.y sub neg A.x O.x sub atan` in the second method while `A.y` equals to 3 `O.y` equals to 1 `A.x` equals to 4 `O.x` equals to 1 ? In other words, why do I need to add `neg` for the first argument of `atan` in the second method?


title: How can I add space between two separate plots, using pgfplots?

text: I currently have the following: ![plots](http://i.stack.imgur.com/09uua.png) Now as you can probably imagine I do not want this. I want the upper right plot to be aligned with the lower right plot. However when I do this, using the at and anchor statements, the plot slightly drops and is not aligned anymore with the upper left plot. My question is how do I fix this? To be clear I want the upper right plot to be aligned with the upper left plot and the lower right plot. I have the following code, note I removed the data from the plots because it are pretty many points.               \documentclass[a4paper,11pt,twoside]{article}     \usepackage{tikz,pgfplots}     \begin{document}     \begin{tikzpicture}[scale=0.7]          \begin{semilogxaxis}[%     view={0}{90},     width=10cm,     height=5cm,     scale only axis,     every outer x axis line/.append style={gray!80!black},     every x tick label/.append style={font=\color{gray!80!black}},     xmin=0.1, xmax=1000,     xlabel={Frequency (rad/s)},     xminorticks=true,     xmajorgrids,     xminorgrids,     every outer y axis line/.append style={gray!80!black},     every y tick label/.append style={font=\color{gray!80!black}},     ymin=-200, ymax=200,     ylabel={Phase (deg)},     ymajorgrids,     name=plot1]          \addplot [     color=blue,     solid,     line width=1.5pt,     forget plot     ]     coordinates{      (0,0)     };          \end{semilogxaxis}          \begin{semilogxaxis}[%     view={0}{90},     width=10cm,     height=5cm,     scale only axis,     every outer x axis line/.append style={gray!80!black},     every x tick label/.append style={font=\color{gray!80!black}},     xmin=0.1, xmax=1000,     xticklabels={\empty}     xminorticks=true,     xmajorgrids,     xminorgrids,     every outer y axis line/.append style={gray!80!black},     every y tick label/.append style={font=\color{gray!80!black}},     ymin=-350, ymax=50,     ylabel={Magnitude (dB)},     ymajorgrids,     at=(plot1.above north west),      anchor=below south west,     name=plot2]          \addplot [     color=blue,     solid,     line width=1.5pt,     forget plot     ]     coordinates{      (0,-76.9482975559457)     };          \end{semilogxaxis}          \begin{semilogxaxis}[%     view={0}{90},     width=10cm,     height=5cm,     scale only axis,     every outer x axis line/.append style={gray!80!black},     every x tick label/.append style={font=\color{gray!80!black}},     xmin=0.1, xmax=1000,     xlabel={Frequency (rad/s)},     xminorticks=true,     xmajorgrids,     xminorgrids,     every outer y axis line/.append style={gray!80!black},     every y tick label/.append style={font=\color{gray!80!black}},     ymin=-200, ymax=200,     yticklabels={\empty},     ymajorgrids,     at=(plot1.right of south east),      anchor=left of south west,     name=plot3]          \addplot [     color=blue,     solid,     line width=1.5pt,     forget plot     ]     coordinates{      (0,0)     };          \end{semilogxaxis}          \begin{semilogxaxis}[%     view={0}{90},     width=10cm,     height=5cm,     scale only axis,     every outer x axis line/.append style={gray!80!black},     every x tick label/.append style={font=\color{gray!80!black}},     xmin=0.1, xmax=1000,     xticklabels={\empty}     xminorticks=true,     xmajorgrids,     xminorgrids,     every outer y axis line/.append style={gray!80!black},     every y tick label/.append style={font=\color{gray!80!black}},     yticklabels={\empty},     ymin=-350, ymax=50,     ymajorgrids,     at={(plot2.right of south east)},      anchor={left of south west},     name=plot4]          \addplot [     color=blue,     solid,     line width=1.5pt,     forget plot     ]     coordinates{      (0,-47.4053700922616)     };          \end{semilogxaxis}     \end{tikzpicture}     \end{document}


title: relation symbols as arrows in xymatrix

text: Is there a way to put a relation symbol (appropriately oriented) as the arrow in an xymatrix diagram? For example, a lattice of sets with the subset relation symbol pointing from the subset to the superset.


title: Using unicode Roman numerals in XeTeX

text: As mentioned in How can I get Roman numerals in text?, there are several ways in which one can add Roman numerals to text in TeX. However, these solutions all seem to use three I's to make a roman numeral 3, rather than combining using the "Number forms" symbols found in many fonts such as "Ⅲ". Is there a way to get XeTeX to render all of the Roman numerals in a document using the special Roman numeral symbols found in many fonts?


title: How to write infix macro/newcommand?

text: Is it possible to write a new command/macro in infix syntax instead of prefix syntax; especially I'd like to have this for `$\frac{a}{b}$`. I use LuaLaTeX and with `\newunicodechar{‾}{\overline}` I can write `‾{blah}` and this is expanded to `\overline{blah}`. Analogously I'd like to have `$\frac{a}{b}$` to be something like `{a}➗{b}` or `a÷b` which would be much more readable.


title: TikZ semi transparent contiguous shapes with no gaps

text: **Short Question** : The short question can be stated as follows: Is there a way to perfectly align filled (but possibly not drawn) shapes that completely cover contiguous areas? Consider the MWE:               \documentclass[tikz,crop=true,border=1pt]{standalone}     \definecolor[named]{Back}{cmyk}{0,.3,.94,0}     \definecolor[named]{Front}{cmyk}{0,1.0,.64,.34}     \tikzset{mmaF/.style={fill=Front!#1,draw=Front!#1,         line width=.04pt,opacity=1}}     \tikzset{mmaB/.style={line width=0.01pt,fill=Back!#1,            draw=Back!#1,opacity=.5}}     %     \begin{document}     \begin{tikzpicture}         \begin{scope}[transparency group]         \draw[mmaF=50] (0,0) rectangle ++(2,2);         \draw[mmaB=90] (1,1) rectangle ++(2,2);         \draw[mmaB=90] (-1,-1) rectangle ++(2,2);         \draw[mmaB=90] (-1,1) rectangle ++(2,2);         \draw[mmaF=88] (2,-1) rectangle ++(2,2);         \draw[mmaB=90] (1,-1) rectangle ++(2,2);                     \end{scope}     \end{tikzpicture}     \end{document}      Which produces: ![Sample tikz polygons](http://i.stack.imgur.com/mqbh3.png) If you look closely, there are little doubly drawn lines over the center reddish polygon. If you change `draw=Back!#1` for `draw=none` in style `mmaB`, then you get little gaps instead of doubly drawn lines. What makes this question hard is the fact that the _order of the polygons is important_. I can't simply group the mmaB style polygons into a `scope` with `opacity=.5,transparency group`. The reason is explained below, in the background story. **Background Story** Using Mathematica to compute polygons, I can draw things like this: ![A drawing in tikz, produced with mathematica](http://i.stack.imgur.com/gVu9E.png) For the curious, this is just some 10.000+ lines of simple tikz. Mathematica computes the 3D->2D conversion, and gives an ordered collection of plane tikz shapes to be filled with either style `mmaF`-for front facing polygon- or `mmaB`-for back facing polygon. However, I am having trouble when mixing with opacity: ![This time, with some semi transparent parts](http://i.stack.imgur.com/OfS6i.png) Where you can see the grid lines. Problem: how to remove the grid lines in the semi-transparent part?


title: Use text font or math font for subscripts, diff operator etc.?

text: I have a typographical question concerning the use of text in math mode, for example for subscripts or the diff operator. Consider the following example, where I use XeLaTeX with Palatino as main font and Neo Euler as math font:               \documentclass{scrartcl}       \usepackage{amsmath}         \usepackage{fontspec}     \setmainfont{TeX Gyre Pagella}         \usepackage{unicode-math}     \setmathfont[Scale={MatchLowercase},math-style=upright]{Neo Euler}          \begin{document}     $E_{max}$ or $E_\text{max}$?          $m_e + m_x$ or $m_\text{e} + m_\text{x}$?          $\text{d}x$ or $dx$?      \end{document}      ![Math font](http://i.stack.imgur.com/1a7Zj.png) What is typographically the correct option? Using the main text font for "max", "e", "x" or "d" or using the Math font?


title: How can I save auxiliary-files into an other folder with arara?

text: I tried to do the following:               % arara: lualatex: {options: -output-directory=.\output\ -aux-directory=.\auxiliary}      I did not succeed. I also tried starting the command with `\--` as well as absolute path with `/` or `\`. A nice to have extra would be, that the folders become created if not already existing. A second question: Will LuaLaTeX know where the auxiliaries are stored in a second run? * * * I am working on Win XP 64 with MikTeX 2.9


title: latexmk / imakeidx interoperational efficiency

text: `imakeidx` and `latexmk` are two of my favorite utilities of all TeX-time, especially in the face of book-size compilations (super thanks @egreg and @John Collins!). Apart from ease of producing multiple indices, one of the most useful properties of `imakeidx` is in-document compilation index sub- compilation (how I wish `glossaries` and `biblatex` could be extended to behave the same way!) Given MWE:               \documentclass{article}     \usepackage{imakeidx}     \makeindex          \begin{document}          This.\index{this}          \printindex          \end{document}      `makeindex` is invoked once midway during straightforward `latex` compilation. However, when using `latexmk -recorder (etc.)`, `latexmk` ignores the new `.ind` file that `imakeidx` produces half-way through and invokes `makeindex` on the `.idx` file all over again. Of course, this inefficiency is hardly noticeable with this toy MWE. But given many-filed book-size documents with multiple large indices, `biblatex`/`biber`, multiple `glossaries` and several tocs necessitating several passes before reaching completion, the extra work that `latexmk` creates (rather than eliminates) tests my sense of elegance (and sometimes my patience) greatly. How, then, can I improve `latexmk`'s over-eagerness to invoke `makeindex` in documents using `imakeidx`? I'm hoping for some simple rules to add to my `.latexmkrc`. I am particularly interested in keeping the number of `makeindex` invocations to a minimum across multiple passes (not shown with this MWE) -- say, to a maximum of two invocations per any index file. [[ Bonus points for extending `glossaries` and/or `biblatex` capability for in-document compilation a la `imakeidx`'s brand of `\write18` magic. ; ) ]]


title: Beamer - frametitle - How to add '\'?

text: How to add '\' in frametitle ?               \documentclass{beamer}     \usepackage{color}          \begin{document}          \begin{frame}[fragile]%     \frametitle{$find \ldots -exec \ldots \ ;$} %How to make "\;" in title ?     \begin{semiverbatim}     $ find -name '*.pdf' -exec cp -v '\{\}' ../pdfs \\;     \end{semiverbatim}     \end{frame}          \end{document}


title: figure with program, caption prefix and dedicated list

text: I am using the `program` package for illustrating algorithms in my document, which I currently put into a `figure` environment. Now I want to have a dedicated list of algorithms in my document and not mix them with the rest of figures. Also, I would like to change the caption title from _Figure X: ..._ to _Algorithm X: ..._ Do you have any hints how to achieve this?               \documentclass[ngerman]{scrbook}     \usepackage{program}     \begin{document}     \begin{figure}         \begin{program}             a=a+1;         \end{program}         \caption{Example code}         \label{alg:exampleCode}     \end{figure}     \end{document}