title: Rolling bullet points in beamer

text: Often when I use beamer for slides I use an `itemize` environment with `\pause` to show off one bullet point at a time. Also, often all the points I want to show on a single slide does not fit and I need to start a new slide with a couple of more points. What I would like is instead an `itemize`-like environment that would give me (when the points do not fit on a single slide) rolling bullet points, something similar to what the following code does:               \documentclass{beamer}     \begin{document}         \begin{frame}             \begin{itemize}                 \only<-5>{\item one}                 \only<2-6>{\item two}                 \only<3-7>{\item three}                 \only<4-8>{\item four}                 \only<5-9>{\item five}                 \only<6-10>{\item six}                 \only<7-11>{\item seven}                 \only<8-12>{\item eight}                 \only<9->{\item nine}                 \only<10->{\item ten}                 \only<11->{\item eleven}                 \only<12->{\item twelve}             \end{itemize}         \end{frame}     \end{document}      However I don't want to keep track of how many slides I'm using. Is there such an environment out there somewhere? Also, some sort of animated rolling would be excellent, but that might be to ask for to much.


title: multilingual table content

text: I want to introduce table that has multilingual content which are (Arabic, English, Vietnamese and Armenian) as the following figure ![this](http://i.stack.imgur.com/QjTgI.png) Any idea how to produce that UPDATE: code used to produced table               \documentclass[12pt,journal,compsoc]{IEEEtran}     \usepackage{arabtex}     \usepackage{utf8}{inputenc}     \usepackage[english,vietnam]{babel}     \setcode{utf8}     \usepackage{float}     \usepackage[pdftex]{graphicx}     \usepackage{multirow}     \usepackage{array}     \usepackage{rotating}               \begin{document}                    % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{|c|c|c|c|c|c|}         \hline         Bigraph& Arabic & Vietnamese & Armenian & English & English\\                & CCA   & HC    & HC    & Brown& LOB \\         \hline         1     & \<ال>    & là    & ու    & th    & th \\         \hline         2     & \<لم>   &  ên   & ան    & he    & he \\         \hline         3     & \<ية>   & th    & եր    & in    & in \\         \hline         4     & \<لا>    & ch    & ար    & er    & er \\         \hline         \end{tabular}%       \label{tab:addlabel}%     \end{table}%               \end{document}


title: \Colorhref not getting affected by \Large

text: I'm trying to render the following prhase:               {\Huge \Colorhref{http://google.com}{Google} - This is a link}      the "This is a link" part renders with the **huge** modifier, however my **Google** link looks tiny. How could I fix this?


title: How can texdef be made to return indented definitions?

text: With `texdef` it is easy to find definitions for (La)TeX commands. It can show what a definition for a given command is. For instance if I issue `texdef -t latex \LaTeX` I get the following definitions:               \LaTeX:     macro:->\protect \LaTeX                 \LaTeX :     \long macro:->L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.15em\TeX      A problem is that the latter is very hard to read because it is just one long line. In the source it is easier to read because it is indented. It reads:               \DeclareRobustCommand{\LaTeX}{L\kern-.36em%             {\sbox\z@ T%              \vbox to\ht\z@{\hbox{\check@mathfonts                                   \fontsize\sf@size\z@                                   \math@fontsfalse\selectfont                                   A}%                             \vss}%             }%             \kern-.15em%             \TeX}      Is it possible to make `texdef` return indented definitions? Indented definitions are much easier to read. Also, indented definitions are preferable if you want to use them as a base for a redefinition because you do not have to indent them yourself to be able to efficiently work with them.


title: Threeparttable and longtabu with consistent topskip

text: I am trying to have a big table (break across pages) with footnotes and a column with adjustable width. The MWE is the following.               \documentclass{scrartcl}          \usepackage{blindtext}          \usepackage{tabu,longtable}     \usepackage{threeparttable} % <-- the package below already loads it     \usepackage[referable]{threeparttablex}     \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{hyperref}          \usepackage{etoolbox}     \makeatletter     \chardef\TPT@@@asteriskcatcode=\catcode`*     \catcode`*=11     \expandafter\patchcmd\csname\string\threeparttable\endcsname       {\TPT@hookin{tabular}}       {\TPT@hookin{tabular}\TPT@hookin{tabu}}       {}{}     \catcode`*=\TPT@@@asteriskcatcode     \makeatother          \begin{document}          \listoftables          \bigskip          \blindtext          \begin{ThreePartTable}      \begin{TableNotes}     \footnotesize     \item[a] \label{tn:aa} Footnote in long table 1 (not linked).     \item[b] \label{tn:bb} Footnote in long table 2.     \source Some general note     \end{TableNotes}     \captionof{table}{A long table} % <-- caption inside longtabu within ThreePartTable does not produce correct hyperlink in LOT     \vspace{-\abovecaptionskip} % <-- removes the extra space (correct value?)      \begin{longtabu}to\linewidth{llX}      %\caption{A long table} \\ % <-- see above why it is commented     \toprule     Column 1 & & Column 2 \\     \midrule     \endfirsthead     \caption[]{A long table} \\     \toprule     Column 1 & & Column 2 \\     \midrule     \endhead     \cmidrule{3-3}     \multicolumn{3}{r}{\small\textit{continued}}     \endfoot     \bottomrule     \insertTableNotes\\     \endlastfoot     AAAA\tnotex*{tn:aa} & & BBBB \\     \newpage % <-- just testing break page     CCCC & & DDDD\tnotex{tn:bb} \\     \end{longtabu}     \end{ThreePartTable}          \blindtext          \end{document}      The problem is that `\caption{}` inside longtabu within ThreePartTable does not produce correct hyperlink in LOT. So I am an alternative solution using `\captionof{}`. But this not good because it does not have a consistence skip between caption and the firs line in the table. I would like to use `\caption{}`, does anyone know a solution?


title: Making the font size smaller in this mdframed, and turning into a reusable environment

text: I am very close to getting the `mdframed` setting that I want:               \documentclass[a4paper,10pt]{book}          \usepackage[paper=a4paper,twoside=true,lmargin=4cm,     rmargin=4cm,bindingoffset=0cm]{geometry}          \usepackage{mdframed}          \begin{document}          \noindent Surrounding text.          \begin{mdframed}     \begin{tabbing}      some great \=code\\                 \>next line     \end{tabbing}     \end{mdframed}          \noindent Surrounding text.          \end{document}      Two questions:   1. How do I make the font size within the `mdframed` environment `\small`?   2. How can I turn this into a reusable environment, such that I won't have to begin and end both the `mdframed` and `tabbing` environments every time?


title: Making the y-axis range of a plot have more values in some parts

text: For the MWE below:               \documentclass{report}     \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage{pgfplots}               \begin{document}          \begin{figure}[H]     \begin{tikzpicture}     \begin{axis}[%     scaled y ticks = true,     width=1*\textwidth,     height=8cm,     xlabel={Query $\#$},     ylabel={Elapsed Time (in seconds)},     grid=both,     minor x tick num=5,     minor y tick num=5,     enlarge x limits=0,     legend entries={Original, byHalf, Random, Hybrid},     scaled x ticks = true     ]     \addplot [     color=blue,mark=x,     solid,     line width=1.0pt     ]     coordinates{     (0,39.0819) (1,2292) (2,4484.82) (3,6057.37) (4,38.3475) (5,15.4616) (6,38.5286) (7,15.411) (8,38.3627) (9,14.8773) (10,15.4079) (11,38.8762) (12,20.9027) (13,35.6657)      };          \addplot [     color=red,mark=x,     solid,     line width=1.0pt     ]     coordinates{     (0,38.9575) (1,2720.19) (2,1929.3) (3,1677.22) (4,111.165) (5,68.6833) (6,94.4457) (7,76.0591) (8,94.0201) (9,109.844) (10,78.6465) (11,91.7805) (12,12.9179) (13,78.6684)      };               \end{axis}     \end{tikzpicture}     \end{figure}          \end{document}      If you compile it, you will see that the last part of the plot looks as if the lines are touching each other and they look like they are the same but actually there is about 50 seconds between them. This happens since the y-axis ticks advance (automatically) with steps of 1000. How can I control this ? Is it possible to first make it go with steps of 100 then when it reaches 1000, switch to steps of 1000 ?


title: dvipdfm.def not found

text: Recently, I had to flash my hard drive and reinstall the operating systems. I chose to install Ubuntu 13.10. However, when I compile my latex document, I get the following error: "! LaTeX Error: File `dvipdfm.def' not found." My .tex document uses the following header: \documentclass[dvipdfm]{sig- alternate} The cls file comes from ACM website. I was wondering how I can fix this problem.


title: Margins as Subsections

text: Is there a way to have subsection titles show in the margin of the page? I'm never happy with subsections, I usually tend to avoid them. What I do like, is letting the readers know what's going on by using \marginpar. It would sometimes be useful if some of these (more important) margin notes were actual subsections of the document.


title: ConTeXt unicode fallback font

text: In case a font doesn't have some symbols, is there an easy way to just fall back to whatever font LuaTeX can find that supports that glyph, just for that symbol? Or is there a reasonably complete serif font? The default one doesn't even seem to have ○ (white circle) or α (alpha). I tried a few, but most fonts that show up in `mtxrun --script fonts --list --all --pattern=*` and even defaults like `cmr` (Computer Modern Roman) and `lbr` (Lucida Bright) don't seem to be loaded somehow (`times` and `palatino` work though with `\setupbodyfont[palatino]`). I also get the following warnings when compiling:               fonts           > typescripts > unknown library 'cmr'     fonts           > preloading latin modern fonts (third stage)      I'm on Mac OS X 10.8.4 with `context` version `2013.04.20 01:15`.


title: Problem with tikz plot in beamer

text: I'm trying to plot a function using this code               \begin{tikzpicture}          % Draw the log-normal distribution curve     \draw[blue,smooth,thick] plot[id=f1,domain=0.001:6,samples=50]     function {(1/(0.5*x*(2*pi)**0.5))*exp(-ln(x)*ln(x)/0.5)};     % Draw the x-axis     \draw[->,black] (0,0) -- (6.5,0);     % Draw the y-axis     \draw[->,black] (0,0) -- (0,5);          \end{tikzpicture}      The axis lines work fine but when I compile, I get strange errors and no pdf could be created. I followed the manual and many examples online and nothing works.


title: How can I change the side of all (or single) pages of a twoside book?

text: My book's first page is righthanded the second page is lefthanded the third righthanded and so on but I want it of the form: first page to be lefthanded the second page to be righthanded the third lefthanded ... Do you know how to do it? Thanks a lot in advance.


title: How to add background only to title frame and an other only to the last frame?

text: I just want to add a background only in the `beamer` title page. I can add it in the `.tex` as follows:               \setbeamertemplate{background canvas}{         \includegraphics[width=\paperwidth,height=\paperheight]{img/bg-first.pdf}     }      But I don't want the above command in the `.tex`, but in the `.sty` files. Thanks for pointing me out how I can add the above command in the `.sty` files. Please find the `.sty` and `.tex` files below (all of them are quite simple). * * * ## `main.sty`               \mode<presentation>          \DeclareOptionBeamer{titlepage}{\PassOptionsToPackage{titlepage=#1}{beamertheme-Inner}}     \ProcessOptionsBeamer          \usetheme{Inner}     \usetheme{Outer}          \setbeamertemplate{navigation symbols}{}          \mode     <all>      * * * ## `inner.sty`               \mode<presentation>               \DeclareOptionBeamer{titlepage}{\def\beamer@titlepage{#1}}          \defbeamertemplate*{titlepage}     {       \begin{center}         \usebeamerfont{title}\inserttitle         \ifx\insertsubtitle\@empty         \else           \vskip2ex           \usebeamerfont{subtitle}\insertsubtitle         \fi         \ifx\insertauthor\@empty         \else           \vskip2ex           \usebeamerfont{author}\insertauthor         \fi         \ifx\insertdate\@empty         \else           \vskip2ex           \usebeamerfont{date}\insertdate%         \fi       \end{center}       \vfill     }      * * * ## `.tex` file               \usetheme{Afnic}          \title{An example theme for \LaTeX{} Beamer}     \author{Sandoche}     \date{February 29, 2012}          \begin{document}          \begin{frame}[plain]       \maketitle     \end{frame}          \AtBeginSection[]     {        \begin{frame}            \frametitle{Outline}            \tableofcontents[currentsection]        \end{frame}     }


title: Hiding elements selectively or replacing them with empty boxes

text: Is there any package or environment that allows to substitute **whatever you want** in your output with empty boxes of the same size, like you do with `documentclass`' or some packages' `draft` option for images and some other things? One approach is to write inside `\textcolor{white}{}` but that only works "visually" and if you don't need to include commands as `\section{}` inside. If there is no built solution yet, maybe using `ifdraft` package? The idea is to hide parts selectively while keeping the appearance of the layout, and... maybe saving some time when compiling very large documents? The `\input{}` solution, for example, is not a solution: if you want to print only the middle paragraph in p3 it would appear in fist page's top.


title: Break theorem style in amsart

text: I want to make a theorem's header stands in a separated line like (as style `break` in `ntheorem`)               Examples 1       (1) GL(n)       (2) SL(n)      I copied the solution from Theorem formatting, but it doesn't work if I begin the theorem by `\begin{enumerate}`.               \documentclass[12pt, a4paper]{amsart} %a minimal example     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \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{exam}{Examples}          \begin{document}     \begin{exam}     \begin{enumerate} %If I begin with enumerate, the results are not good       \item $GL(n)$       \item $SL(n)$     \end{enumerate}     \end{exam}          \begin{exam}     Groups % if I begin with normal text, it works.     \begin{enumerate}       \item $GL(n)$       \item $SL(n)$     \end{enumerate}     \end{exam}          \end{document}


title: The modulo two sum sign in LaTeX

text: I would like to know how I can obtain the 'modulo two sum' sign (unicode 2A0A i.e., the letter sigma with a circle in its middle). ![enter image description here](http://i.stack.imgur.com/hnAKU.gif) I know I can obtain it by using the unicode-math package. But does anybody know an alternative method to obtain it? For information, I use TexMaker. Thanks for answering me. Best regards.


title: Environment for step by step modification of graphics

text: I would like to have one environment that produces the following two examples where the pictures are not animations. I would like that the environment takes care automatically of the numbers of figures. This for cases of figures showing step by step explications like for example the simplification of one finite Markov chain. From LaTeX point of view, I would like to only type :               \begin{stepByStep}         \step Fig.1         \step Fig.2         \step Fig.3         \step Fig.4     \end{stepByStep}          \begin{stepByStep}         \step Fig.1         \step Fig.2         \step Fig.3         \step Fig.4         \step Fig.5         \step Fig.6         \step Fig.7     \end{stepByStep}      ![enter image description here](http://i.stack.imgur.com/aOHwG.png)


title: Index and newcommand

text: I have a short question about indexing. Is it possible that latex automatically creates an entry in the index, when I first use a notation fixed by `\newcommand`?


title: draw realistic clouds with tikz

text: I've drawn the following image:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{shapes}     \tikzset{sunbody/.style={line width=1pt,draw=orange,fill=yellow,circle,minimum size=5cm}}          \begin{document}     \begin{tikzpicture}     % draw ground     \fill[brown] (-20,0) -- (-5,10) -- (15,10) -- (8,0) -- cycle;     % draw sun     \draw (13,16) node[sunbody] {};     % draw cloud     \node[cloud, cloud puffs = 10, draw, minimum width = 7cm, minimum height = 4cm, fill = gray!10] at (8,15){};     \end{tikzpicture}     \end{document}      which results in ![enter image description here](http://i.stack.imgur.com/Yrqvz.png) where the brown area is the earth surface. I would like to try and make this more realistic. I am quite happy with most of the drawing, apart from the cloud. Can anyone suggest a method for making the cloud look more realistic? Its kind of hard to put this into words but I would like it to cover a greater portion of the sky similar to what clouds actually look like in reality, with gaps and such. Hope this makes sense. Any advice would be appreciated.


title: Common bib file for several collaborators

text: I'm currently writing a few papers with several co-authors, and we are all using LaTeX. All of us have access to and use mendeley, so we have the same set of references in our respective local .bib files. Is there any other solutions than changing the path to the .bib file when compiling on our local computers? I'd be really interested in knowing how you have been dealing with similar problems in the past.


title: Variable Caption spacing for `tikzpicture` and `tabular`

text: The `\abovecaptionskip` option gives different results with `tikzpicture` and `tabular`. **MWE:**               \documentclass{report}             \usepackage{tikz}         %         \begin{document}           \setlength{\abovecaptionskip}{0pt}           \begin{figure}             \centering             \begin{tikzpicture}               \node[rectangle] {Some Figure};               \draw (current bounding box.south west) rectangle (current bounding box.north east);          \end{tikzpicture}         \caption{A Caption}       %            \vspace{1cm}     %            \begin{tabular}{|l|l|}           \hline           Nonlinear & 3.720894e-0\\ \hline         \end{tabular}          \caption{B Caption}       \end{figure}      \end{document}      ![enter image description here](http://i.stack.imgur.com/8CrAS.png) On an unrelated note, how do I include `figure` environment in `standalone` `documentclass`?


title: How can I efficiently draw multiple connections between nodes?

text: I believe the following figure has been drawn very inefficiently. I need help drawing the same figure using nodes and relative positioning (right=of, below=of, ...etc) instead of using the absolute positioning. This is my code:               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{times}     \usepackage{tikz}          \usetikzlibrary{calc,decorations.markings,arrows,positioning,shapes}          \begin{document}          \begin{tikzpicture}[line width=1pt,>=latex',scale=0.8]          \node (d) at (-6,0) [draw,shape=rectangle,minimum width=8ex,minimum      height=5ex,align=center]{Data\\source};          \draw (-4.5,2.5) rectangle node [align=center]{Partition \\ into blocks \\ and serial\\to parallel\\conversion} (-2,-2.5);          \draw (-1,2.5) rectangle node [align=center]{Division\\into\\subblocks} (1.5,-2.5);          \draw (2.5,1.5) rectangle node {IDFT} ++(1.5,1);     \draw (2.5,0) rectangle node {IDFT} ++(1.5,1);     \draw (2.5,-2.5) rectangle node {IDFT} ++(1.5,1);     \draw [->](d) -- (-4.5,0);     \draw [->](-2,0) -- node [above]{$D$}(-1,0);          \begin{scope}\fontsize{20}{19} \selectfont     \node at (2,-0.5) {$\vdots$};     \end{scope}          %% X-Circle 1     \begin{scope}     \node at (9.5,2) [above left]{$W_1$};     \draw [->] (6.4,2) -- (9.5,2);     \draw [->] (4,2) -- ++(1.6,0);     \node at (4.5,2) [above]{$b_1$};     \draw [fill] (4.5,2) circle (1.5pt);     \draw [->](4.5,2) --  (4.5,-3);     \draw [clip] (6,2) circle (0.4cm);     \draw (5.5,2.5) -- ++(1,-1);     \draw (5.5,1.5) -- ++(1,1);     \end{scope}          %% X-Circle 2          \begin{scope}     \node at (9.5,0.5) [above left]{$W_2$};     \draw [->] (4.0,0.5) -- ++(2.6,0);     \draw [->] (7.4,0.5) -- (9.5,0.5);     \node at (5.0,0.5) [above]{$b_2$};     \draw [fill] (5.0,0.5) circle (1.5pt);     \draw [->](5.0,0.5) -- (5,-3);     \draw [clip] (7,0.5) circle (0.4cm);     \draw (6.5,1) -- ++(1,-1);     \draw (6.5,0) -- ++(1,1);     \end{scope}          %% X-Circle 3     \begin{scope}     \node at (9.5,-2) [above left]{$W_{\! M}$};     \draw [->] (4,-2) -- ++(3.6,0);     \draw [->] (8.4,-2) -- (9.5,-2);     \node at (5.5,-2) [above]{$b_M$};     \draw [fill] (5.5,-2) circle (1.5pt);     \draw [->](5.5,-2) -- (5.5,-3);     \draw [clip] (8,-2) circle (0.4cm);     \draw (7.5,-1.5) -- ++(1,-1);     \draw (7.5,-2.5) -- ++(1,1);     \end{scope}          \draw (4,-3)rectangle node{Optimization for $W$} ++(4.5,-1);     \draw [->](6,-3) -- ++(0,4.6);     \draw [->](7,-3) -- ++(0,3.1);     \draw [->](8,-3) -- ++(0,0.6);     \draw (9.5,2.5)rectangle node{$+$} ++(1,-5);     \draw [->](10.5,0)-- node [above]{$S$}(11.2,0);          \begin{scope}\fontsize{20}{19} \selectfont     \node at (7.7,-0.5) {$\vdots$};     \end{scope}          \draw [->](1.5,2) -- ++(1,0);     \draw [->](1.5,0.5) -- ++(1,0);     \draw [->](1.5,-2.0) -- ++(1,0);          \end{tikzpicture}          \end{document}


title: Checkers board in TikZ.

text: What is the best way to draw checker board in tikz? I'm interested in what is the best way to draw many circular pieces on board. (the checker background is not important)


title: Making a homework template

text: Let's say I wanted to make a homework template (for math classes). Should I make a .cls file and use that as my document class, or use the standard article class and just make a .sty file to define some extra macros - say a macro for "problems" and "solutions". Is there a convention for this, or is it more a matter of preference?


title: Tikz: How to encapsulate shade in node?

text: I have this shaded circle:               \shade [ball color=black!80!white] (0,0) circle (1);      Is it possible to encapsulate it with node style? Including fixing circle radius?


title: Formatting a collection of .docx document to LaTeX document

text: I define a general format in a LaTeX document (title, name, etc.) and the space for the document paragraphs. To this, I want to process all the `.docx` files (Word Documents) and generate the formatted LaTeX document. Is it possible? How do we do that? I am providing a sample document. Now the title, author and other details must be read and processed in LaTeX format as specified by the LaTeX Document. The steps are like this:   1. Creating a predefined LaTeX template that generates a PDF with generic content.   2. Take the word document and pass it to the template.   3. Get the new LaTeX document:  ![enter image description here](http://i.stack.imgur.com/RTRW6.png)


title: Consistent macro for bold upright vectors in both latin and greek

text: I’m using pdfLaTeX, and I want _all_ vectors I typeset to be in bold, upright font. Unfortunately, based on whether the symbol is latin, lowercase greek, or uppercase greek, there are different commands necessary to make it bold and upright. I’d like to be able to define a single macro — say, `\vector` — such that it does what I want no matter the argument and I don’t have to think about it:               \vector{a}       =>  \mathbf{a}     \vector{\alpha}  =>  \boldsymbol{\upalpha}     \vector{\Omega}  =>  \boldsymbol{\Omega}      This popular question deals with _some_ of this issue, but the solutions there still have the lowercase greek vectors in bold italic, not bold upright. Plenty of other questions touch on this issue in various ways, but I haven't been able to find a definitive answer to this exact variant. Perhaps the answer is “you can’t” — but I haven't seen that definitively either. —   Edited `\Alpha`, which doesn't exist, to `\Omega`.


title: Using PythonTeX under windows

text: I have a real big Problem:   I try to run PythonTeX but it doesn't work. All I get are question marks when using `\pygment{latex}{\py}` in my text. I think the mistake is that PythonTeX is not linked with my latex - or with Python. But I do not know how and where I have do to this. What I have done: Installed Python 2.76, Pygments and then PythonTeX.   I use TeX Live 2013. Thanks for all help   Overlord


title: LaTeX (doubt in image inclusion)

text: When I run a LaTeX file.. I could see the diagram which I have drawn using LaTeX draw but in pdf mode it disappears.. how could I correct this..??? and in the same way If I use \includegraphics{file} command I could see my image while running but after closing of kile, if I see in dvi or pdf file it disappears.. here is the file..               {\centering          \scalebox{.6} % Change this value to rescale the drawing.          {          \begin{pspicture}(-10,-4.145)(10,4)          \definecolor{color43}{rgb}{0.8549019607843137,0.1607843137254902,0.1607843137254902}     \definecolor{color43b}{rgb}{0.8156862745098039,0.12156862745098039,0.12156862745098039}     \definecolor{color46}{rgb}{0.38823529411764707,0.8549019607843137,0.1607843137254902}     \definecolor{color46b}{rgb}{0.12156862745098039,0.8156862745098039,0.2627450980392157}     \definecolor{color49}{rgb}{0.07058823529411765,0.09803921568627451,0.058823529411764705}     \definecolor{color50b}{rgb}{0.06274509803921569,0.21176470588235294,0.09411764705882353}     \psline[linewidth=0.04cm](1.3,2.155)(1.34,-4.025)     \psline[linewidth=0.04cm](0.0,-3.285)(11.92,-3.265)     \pscustom[linewidth=0.04]     {     \newpath     \moveto(0.2,-4.005)     \lineto(0.96,-4.085)     \curveto(1.34,-4.125)(2.37,-4.005)(3.02,-3.845)     \curveto(3.67,-3.685)(4.895,-2.93)(5.47,-2.335)     \curveto(6.045,-1.74)(7.09,-0.395)(7.56,0.355)     \curveto(8.03,1.105)(8.725,2.37)(8.95,2.885)     \curveto(9.175,3.4)(9.43,4.0)(9.46,4.085)     }     \psline[linewidth=0.03cm,linecolor=color43,fillcolor=color43b](3.72,-3.965)(7.04,-0.965)     \psline[linewidth=0.04cm,linecolor=color46,fillcolor=color46b](5.2,-3.865)(9.3,3.255)     \psdots[dotsize=0.12,linecolor=color49](7.88,0.795) \psline[linewidth=0.04cm,linecolor=color49,fillcolor=color50b,linestyle=dashed,dash=0.16cm 0.16cm](7.86,0.795)(7.88,-3.225)     \psdots[dotsize=0.12,linecolor=color49](5.26,-2.525)   \psline[linewidth=0.04cm,linecolor=color49,fillcolor=color50b,linestyle=dashed,dash=0.16cm 0.16cm](5.26,-2.525)(5.26,-3.245)     \psdots[dotsize=0.12,linecolor=color49](4.5,-3.285)     \usefont{T1}{ptm}{m}{n}     \put(-1.514063,-4.1){$x_2$}     \usefont{T1}{ptm}{m}{n}     \put(-1.15,-4.02){$x_1$}     \usefont{T1}{ptm}{m}{n}     \put(.6014063,-4){$x_0$}     \usefont{T1}{ptm}{m}{n}     \put(-.9,-1.14){$Y=f(x)$}     \psline[linewidth=0.04cm,linecolor=color49,fillcolor=color50b,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{->}(7.4,-0.125)(10.96,-0.165)     \psline[linewidth=0.04cm,linecolor=color49,fillcolor=color50b,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{->}(6.16,-1.845)(11.02,-1.885)     \usefont{T1}{ptm}{m}{n}     \put(2.7,-1.8){tangent at $x_0$}     \usefont{T1}{ptm}{m}{n}     \put(2.7,-2.92){tangent at $x_1$}     \end{pspicture}      }}


title: Correct pronunciation of graphicx?

text: I know that this question may be not in the main stream, but it is the matter of communication. We have LaTeX graphic packages `graphics` (`s` as standard) and `graphicx` (`x` as extended). I am thinking that the former should be pronunciated `/ˈɡræfɪks/`, but what about the latter?


title: Define reusable content --- preferably in the body or else in the header

text: I am writing a document where name of a person A will appear at multiple places section A. Similarly, name of person B will appear at multiple places in section B, etc. Is there any way by which just before section A, I can define a variable, say, PersonName, assign a value relevant to Person A to it, and use it in section A. Then, redefine PersonName at the beginnig of section B, use it in section B, etc. If PersonName can not be defined in the body, can I declare it in the preamble and keep assigning different values to it in the body?


title: Can't find fig-files

text: We are writing a group report, until now I have been using Lyx, but switched to LateX/Texmaker to be able to gather the whole report at the end I have used Texmaker, which has been pretty straight forward and easy. Its all gone well until all of a sudden, it cannot run because it can't find any figures. I get this for all figures:               ! LaTeX Error: File `fig/c_mass' not found.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.      This was a bit weird as I have not changed anything in the files where it reports problems. When I tried to run it on my laptop it was fine (it had included all the changes I had made). Now, unfortunately, the same problem has occurred on my laptop. My groop members can run the tex- file, and it is up to date when they run it. I am using a Mac, with newest software, I have installed the right MacTex etc... We have a main document that we build the report from, which calls on added sections. Our files are in dropbox. The .tex file is in the same place as the figure-files. Thanx, Eva


title: \end{filecontents} and \input{} on the same line

text: This code generates output that shows contents of `excerpt1.tex`               \documentclass{article}     \usepackage{filecontents}          \begin{document}     Pragraph is starting.     \begin{filecontents}{excerpt1.tex}     Part that must be in two documents.     \end{filecontents}     \input{excerpt1.tex}     Paragraph ends.     \end{document}      This code does not generate output that shows contents of `excerpt1.tex`               \documentclass{article}     \usepackage{filecontents}          \begin{document}     Pragraph is starting.     \begin{filecontents}{excerpt1.tex}     Part that must be in two documents.     \end{filecontents}\input{excerpt1.tex}     Paragraph ends.     \end{document}      I wonder the reason behind this situation. I have encountered this anomaly in a very important document. Is there a list of such caveats that must be taken into account before any irrecoverable errors happen?


title: Leaving 2 blank pages upon compilation

text: I am trying to add a non numbered chapter. I have done so successfully for other chapters using the same code. The code I am using is:               \clearpage     \chapter*{Nomenclature}     \addcontentsline{toc}{chapter}{Nomenclature}     \include{Chapters/Nomenclature}      However, at the start of the chapter it is automatically leaving the blank pages. Does anybody know the reason. I am sorry for not adding the setup file.


title: PDF inverse search in acrobat revisited

text: I've found this question about impossibility of inverse search with acrobat, but it is from 2012 so I decided to post in case there is some update. Does anybody know if situation has changed in any way? Any hope for inverse search from acrobat?


title: Structural analysis best package

text: Which is the best package to draw up structural analysis problems. I need beam or truss, constraints, displacements, springs, loads, thermal actions and so on. Something like this picture: http://upload.wikimedia.org/wikipedia/commons/3/3c/Truss_Structure_Analysis%2C_Full_Figure2.jpg


title: In \DeclareDocumentCommand signaling first optional argument is missing

text: In `\DeclareDocumentCommand` if I have two successive optional arguments how can I signal the first one is missing? For example:               \documentclass{article}     \usepackage{xparse}     \begin{document}          \ExplSyntaxOn        \DeclareDocumentCommand{\test}{o o}     {     \IfValueTF{#1}         {#1}{#2}     }     \ExplSyntaxOff            \test[][1]     \end{document}      produces nothing and I would like it to produce 1.


title: Can \bibitem and BibTeX give the same output?

text: I am adding a slide to a beamer presentation containing some references and, since I only have three references, I was thinking about not creating an external `.bib` file this time. However I realized that the graphical output of               \begin{thebibliography}{1}     \bibitem ...     \bibitem ...     \end{thebibliography}      is a bit different than the one I am accustomed to using BibTeX. One example would be that, in place of the reference label, I get a small image. So my question is: would it be possible to get an output such at the one shown in Beamer bibliography color using `\bibitem` only?


title: Is there any harm using hyperref for a document destined for printing?

text: I am using the `hyperref` package in my LaTeX document, and then using `pdflatex` to generate the pdf file. Is there any harm in print quality, in using the `hyperref` package? Or should I have two versions of my document, one for viewing on the screen (with `hyperref`) and one for printing (without `hyperref`)? This is how I have set up the package.               \usepackage[colorlinks,                 bookmarksnumbered,                 citecolor=black,                 urlcolor=black,                 linkcolor=black                 ]{hyperref}     \usepackage[all]{hypcap} % Correct a problem with hyperref, don't know                               % what problem it is supposed to correct :)     \hypersetup{         unicode=false,          % non-Latin characters in Acrobat’s bookmarks         pdftoolbar=true,        % show Acrobat’s toolbar?         pdfmenubar=true,        % show Acrobat’s menu?         pdffitwindow=false,     % window fit to page when opened         pdfstartview={FitH},    % fits the width of the page to the window         pdftitle={My Title},    % title         pdfauthor={My Name},     % author         pdfsubject={Subject of Document},   % subject of the document         pdfcreator={My Name},   % creator of the document         pdfproducer={My Name}, % producer of the document         pdfkeywords={Test} {Document}, % list of keywords         pdfnewwindow=true,      % links in new window     }


title: Hyperref using the wrong language script for \url?

text: In a mixed language document, I try to use a URL. Here is minimal input demonstrating               \documentclass{article} % compile with xelatex     \usepackage{hyperref}     \usepackage{polyglossia}        \setmainlanguage{hebrew}        \setotherlanguage{english}       \newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}% or{SBL Hebrew}     \begin{document}       \begin{english}English separates Yankees and Brits?       \url{http://www.google.com}       \end{english}     \end{document}      Now, polyglosssia does not like this at all, complaining that:               ! Package polyglossia Error:      The current roman font does not contain the Hebrew script!     Please define \hebrewfont with \newfontfamily.          See the polyglossia package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 \url{http://www.google.com}      I am confused. Didn't I switch to English on line 8?


title: Surface plot with coordinates in pgf

text: Is it possible to draw a three dimensional surface using coordinates instead of formulas? MWE so far:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}           \begin{tikzpicture}       \begin{axis}         \addplot3 coordinates         {(23, 75, 13000) (23, 80, 14000) (23, 85, 15000) (23, 90, 16000) (23, 95, 17000) (28, 65, 7000) (28, 70, 8000) (28, 75, 9000) (28, 80, 10000) (28, 85, 11000) (28, 90, 12000) (28, 95, 13000)};       \end{axis}      \end{tikzpicture}          \end{document}


title: Xetex: use OTF font (MacPorts)

text: I have a problem using my own OTF fonts within a LaTeX document. I read I should compile the document with `xelatex` which I have installed on my Mac with MacPorts (package `texlive-xetex`) My minimal document looks like this:               \documentclass{article}          \usepackage{fontspec}     \setmainfont{Arial}          \begin{document}         Lorem ipsum     \end{document}       Compiling it via `xelatex test.tex` I get the following errors:               This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_5)      restricted \write18 enabled.     entering extended mode     (./test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.     (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo))     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/expl3.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3names.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3bootstrap.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/etex-pkg/etex.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/color.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/color.cfg)     (/opt/local/share/texmf-texlive-dist/tex/xelatex/xetex-def/xetex.def))     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphics.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/trig.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/graphics.cfg))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3basics.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3expan.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3tl.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3seq.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3int.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3quark.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3clist.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3token.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prop.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3msg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3file.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3skip.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3keys.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3fp.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3box.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3coffins.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3color.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3luatex.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3packages/xparse/xparse.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-patches.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fixltx2e.sty)     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************     ) (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-xetex.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1enc.def)     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmr.fd)kpathsea: Invalid fontname `[lmroman10-regular]', contains '['          ! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab     le: Metric (TFM) file or installed font not found.     <to be read again>                         relax      l.100 \fontencoding\encodingdefault\selectfont      What am I doing wrong? I also tried to specify the whole path to my font with `\setmainfont[Path=/Absolute/Path/To/My/OTF/Font/]{file.otf}` in the preamble. Although I would prefer using `pdftex` instead of `xelatex` because I read that `xelatex` comes with some disadvantages and I do not want to install it on every computer I use it. Is there a good solution for using OTF fonts with `pdftex`?


title: Standalone LaTeX editor/renderer for Windows?

text: Is there any **small** and **simple** program (or even library) that can render LaTeX locally as you type? I'm looking for something pretty much like this page, which auto-renders immediately as you type, except that it:   * Must not need any internet connection   * Should be as "lightweight" as possible (it shouldn't even depend on a browser, if that can be avoided... a standalone executable would be ideal) (The goal is to avoid going having to go through the pain of creating LaTeX documents every time you want to write a little expression to paste somewhere else, but _without_ needing an internet connection or another program to run it.) If there is even a C/C++-compatible _library_ that could convert a basic LaTeX equation to a PNG file (or SVG or whatever), that would be fine too; I could write a front-end for it pretty easily.


title: Remote TeX from Windows RT

text: I have picked up a Surface RT and while there are LaTeX editors in the Microsoft store, nothing exists in terms of compilation. Is there a way I can save a `.tex` file on my Surface but send it to a remote location for compilation? By remote, I was thinking of my old desktop with Ubuntu on it. **EDIT:** I've decided to stay on Windows 7 using Miktex and Skydrive. Is there a solution with these products?


title: Can I change the "range" punctuation in siunitx?

text: When using `siunitx`, by default, `\SIrange{0}{10}{\celsius}` will render `0 °C to 10 °C`. Is there any general way to change the default rendering of ranges to `0--10 °C` (i.e., using an en dash instead of "to").


title: How to automate the \label-ing of equations?

text: I'm not sure if the way `LaTex` works allows for automatically labeling of, for example, `align` environments. This would require that the environment has an internal counter. However, when placing an environment between two previously placed ones, the algorithm would give the last environment a different label that the one assigned in a previous compilation, which is not what we want. However, would it be possible to build an external solution? One idea is based on the editor. Perhaps it is possible to assign that a shortcut inserts not only the code for the environment but also a code for the label which outputs a successive number every time one uses the shortcut. I'm specially interested in a solution for this using `Kile` which is my main editor.


title: ComplexTable of Contents

text: Id like to create a table structure within my document based upon a `\newlesson` command for example.               \newcommand{\newlesson}[1]{         \newpage         \addtocounter{LessonNumber}{1}\subsubsection{{Lesson \theLessonNumber} #1}     }      Then using the lesson like this               \newlesson{Unit overview and Review of Statistics   (Ch 4,  SC1,2)}     ...      My goal is to create simple data structures within the lessons and then create a unit plan which is similar to creating a table of contents (but with more information than just a title and a section and page number) ie including some equations and possible even `tikz` elements. Does anyone know a way that I can achieve this result. I suppose I also have a couple of related questions,   1. How do I create a                   \begin{custom_command}         ...         \end{custom_command}      type of command and,   2. Is there a way that I can access this document structure and uniquely access internal structures in this structure, to achieve my previously stated goal. I don't care if you cant answer all of my question, bits would be ok, and maybe I can pieces things together, and post back a reply, when I am done. I am grateful for any help you can provide.


title: How to make leftmark/rightmark next to Page number?

text: The desired header style is like: page number is sans serif even in the first page of the chapter, because Using               \fancyhead[LE]{\sffamily \thepage  }     \fancyhead[RO]{\sffamily \thepage  }      could not change the font of the page number in the first page of each chapter. In even page: `Page number | Chapter title` > ![enter image description here](http://i.stack.imgur.com/goFtH.png) In odd page: `Section title | Page number` > ![enter image description here](http://i.stack.imgur.com/1n7ML.png) Using `\fancyheadoffset[RE,LO]{-0.5\textwidth}` could not get this effect, so how to achieve this style? Minimal page:               \documentclass{book}     \usepackage{kantlipsum}         \usepackage{libertine}     \usepackage[ ]{titlesec}      \usepackage[]{fancyhdr}     \pagestyle{fancy}     \makeatletter     \makeatother     \fancyhf{}          \fancyhead{}           \makeatletter     \renewcommand{\sectionmark}[1]{\markright{\thesection~~~#1}}     \renewcommand{\chaptermark}[1]{\markboth{\if@mainmatter \fi#1}{}}     \makeatother          % head setting     \fancyhead[LE]{ \sffamily \thepage $|$ }      \fancyhead[RE]{  \leftmark  }     \fancyhead[LO]{  \rightmark  }     \fancyhead[RO]{ $|$ \sffamily\thepage}   %odd page     \fancyheadoffset[RE,LO]{-0.5\textwidth}          \renewcommand{\headrulewidth}{ 0.5 pt}          \begin{document}     \tableofcontents     \chapter{Introduction}      \kant[1-5]     \section{This is a extremely  long ........... title}       \kant[6-10]     \section{Short title}       \kant[11-15]     \end{document}      In the MWE, you will find the font of the page number, is still `serif` in the first page of `Introduction`. Another style (see below) which is similar to the first one, the only difference is that the vertical line `|` up to the top edge. Even page: ![enter image description here](http://i.stack.imgur.com/Zrs5A.png) Odd page: ![enter image description here](http://i.stack.imgur.com/mItaY.png) Is it possible to make the second style?


title: Page numbers in different positions on different pages

text: I'm having problems with the page numbers in my document. I'm using a template that my lecturer has given us all and haven't touched the page numbers but they appear in different places as you go through the document. It's at the bottom, centre of the page on the first page, and the numbers carry on from then on to be in the right hand top corner. I've tried to fix this myself but I can't seem to, however this is my first time using LaTeX. Any suggestions would be appreciated. Here is what I've got at the top of the document currently:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}     \usepackage[cm]{fullpage}     \setlength{\headsep}{0.6 cm}     \pagestyle{myheadings}          \begin{document}      I also tried `\pagenumbering{gobble}` to get rid of them (which worked) and then `\pagestyle{arabic}` to bring them back- hoping they would all be in the same place but this didn't work. Preferably, I would like all of the numbers to be at the bottom of the page, in the centre. Thanks! Edit:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}     \usepackage[cm]{fullpage}     \setlength{\headsep}{0.6 cm}     \pagestyle{myheadings}          \begin{document}          \title{Modelling the Back End of a Bus}          \maketitle          \begin{abstract}     .....     \end{abstract}          \section{introduction}     ....     \end{document}


title: Tabular cells with exact same width and multicolumn

text: I tried to design a table with some very specific preferences:   * The table should span across the whole width   * Each cell can have a different alignment   * Each cell has exactly the same width   * Some cells are multicolumn cells, 2 combined cells should have exactly the same width as 2 single cells Here is a small sample of what I've tried:               \documentclass[]{article}          \usepackage[a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=5mm, footskip=10mm, headheight=25mm]{geometry}          \usepackage{tabularx}          \begin{document}     \noindent     \begin{table}[h!]         \begin{tabularx}{\textwidth}{|X|X|X|X|} \hline             \multicolumn{3}{|l|}{3 cells left}  & \multicolumn{1}{|r|}{1 cell right} \\ \hline             \multicolumn{1}{|r|}{1 cell right}  & \multicolumn{3}{|l|}{3 cells left} \\ \hline             \multicolumn{1}{|r|}{1 cell right}  & \multicolumn{1}{|r|}{1 cell right} & \multicolumn{2}{|r|}{2 cells right} \\ \hline             \multicolumn{1}{|r|}{1 cell right}  & \multicolumn{1}{|r|}{1 cell right} & \multicolumn{1}{|r|}{1 cell right}   & \multicolumn{1}{|r|}{1 cell right} \\ \hline          \end{tabularx}              \end{table}          \end{document}      The first column in this example is significantly smaller than the others. I really hope that somebody can help me.


title: Basic setup for LaTeX for Mac?

text: I have a professor who requires me to use Latex but he mainly speaks in terms of PC. I have a Mac so I have to find appropriate alternatives. So far I have purchased "Latexian" as an editor, and see that the MikTeX distribution is mainly for PC. It seems that the alternative for Mac is Mactex. Am I correct? Is there any other concern I should consider? Out of curiosity, why wouldn't Latexian have a built in installer, since it can obviously generate live PDF views anyway?


title: MacTex 2012Basic cannot find installed packages

text: In an attempt to save valuable space on a 128GB SSD drive, I endeavored to replace my full 2012 MacTex texlive install (>3.5GB) with 2012Basic (270MB!). I understand that packages are not installed by default. Using `tlmgr`, I installed several of the packages my .tex document calls for. They are installed by `tlmgr` in `/usr/local/texlive/2012basic/texmf-dist/tex`. This is very similar to where the full texlive installs packages. However, my GUI (LaTeXian) fails to complile the document (fails to locate packages...).   * I ran `texhash` (both as root and as my user)   * I tried playing around with paths in `texmf.cnf`   * I created a symbolic link from `~/Library/texmf` to `/usr/local/texlive/2012basic/texmf-dist/tex`   * I tried adding the package location to `$PATH` (seems like a messy hack...) No dice. The `texmf.cnf` file points to `~/Library/texmf`, but so does the `texmf.cnf` in the full install... And, I'd prefer to let `tlmgr` handle the packages rather than install manually in `~/Library/texmf` What am I missing?


title: Indenting with respect to another line

text: How can I indent several lines with respect to the position of some text? For example, this is the effect I'm looking for:               480-479: Battle of Thermopyle              Greek Victories at Salamis and Plataea end Persian war      Where the the second line is aligned with 'B' of Battle. Is there something similar to the align environment for text?


title: What is the best practice for arithmetic operations specially for package/class writing?

text: There are some possibilities to execute arithmetic operations inside a package or class. ## TeX TeX supports `\advance`, `\multiply` or `\divide` to execute arithmetic operations. However the syntax is more or less "needs getting used to". Example:               \@tempdima=35pt     \advance\@tempdima by 10pt     \divide\@tempdima by 5      ## eTeX eTeX supports the commands `\dimexpr` and `\numexpr`. This simplify the example above as follows:               \@tempdima=\dimexpr (35pt+10pt)/5 \relax      ## LaTeX3 LaTeX3 can be compared with eTeX.               \dim_set:Nn \l_tmpa_dim { (35pt+10pt) / 5 }      * * * ## Packages I know there are some packages which allow arithmetic operations, too. E.g. calc or pgf. Those packages can be compared with eTeX, too. * * * * * * **However what is the recommended way of doing arithmetic operations inside a package/class? What are the benefits/drawbacks of the different approaches?**


title: How to map optional arguments to functions?

text: What is the right way to map each optional argument to a function that applies a specific style to it? In the example below, optional arguments are typeset in bold face preceded by a colon. But I want users to be able to define what style `#2` is to be typeset in, what style `#3` is to be typeset in, and so on:               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \NewDocumentCommand {\mystyle} { m } {:\textbf{#1}}     \NewDocumentCommand {\mycs} { moooooooo }      {       #1       \tl_set:Nn \l_my_tl { {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }       \tl_map_inline:Nn \l_my_tl {\IfValueT{##1}{\mystyle{##1}}}      }     \ExplSyntaxOff          \begin{document}     \mycs{1}[2][3][4][5][6][7][8][9]     \end{document}


title: Automaton backedge arrows running into other states

text: I am trying to draw a finite-state automaton using the `automata` package in Ti _k_ Z and am having trouble getting an edge to "clear" the other states (that is, not run into them). Having read this answer, I used `bend` for the edge from `q1` to `q8`; while that edge "clears" `q5` and `q6`, when I tried the same for the backedge from `q7` to `q2`, it didn't work. I also tried `in` and `out` from this answer to no avail. It seems any combination of `bend`, `in`, and `out` parameters that I try still causes that edge to run into `q3` and `q4`. I know I'm missing something, but what? The documentation on the `automata` package is a bit thin in this regard. Here's my current MWE:               \documentclass{article}     \usepackage[utf8]{inputenc}          \usepackage{tikz}     \usetikzlibrary{automata,arrows,topaths}          \let\oldepsilon\epsilon     \renewcommand{\epsilon}{\varepsilon}          \begin{document}          \begin{tikzpicture}[>=stealth',node distance=1.5cm,semithick,auto]         \node                   (l)                             {$\cdots$};         \node[state]            (q1)    [right of=l]            {$1$};         \node[state]            (q2)    [right of=q1]           {$2$};         \node[state]            (q3)    [above right of=q2]     {$3$};         \node[state]            (q4)    [right of=q3]           {$4$};         \node[state]            (q5)    [below right of=q2]     {$5$};         \node[state]            (q6)    [right of=q5]           {$6$};         \node[state]            (q7)    [below right of=q4]     {$7$};         \node[state]            (q8)    [right of=q7]           {$8$};         \node                   (r)     [right of=q8]           {$\cdots$};              \path[->]   (l)     edge                        node        {}              (q1)                     (q1)    edge                        node        {$\epsilon$}    (q2)                             edge [bend right=60]        node[swap]  {$\epsilon$}    (q8)                     (q2)    edge                        node        {$\epsilon$}    (q3)                             edge                        node        {$\epsilon$}    (q5)                     (q3)    edge                        node        {a}             (q4)                     (q4)    edge                        node        {$\epsilon$}    (q7)                     (q5)    edge                        node        {b}             (q6)                     (q6)    edge                        node        {$\epsilon$}    (q7)                     (q7)    edge                        node        {$\epsilon$}    (q8)                             edge [in=90,out=90,above]   node        {$\epsilon$}    (q2)                     (q8)    edge                        node        {}              (r);     \end{tikzpicture}          \end{document}      ![MWE Compiled](http://i.stack.imgur.com/wv1UQ.png)


title: How to display mdframed title in header?

text: I have a series of `mdframed` frames in the document. Some frames are few pages long, and some pages have two frames within. How can I display the `frametitle` of the corresponding page in the header as we display `section`s in the header.               \begin{mdframed}[style=example,frametitle=Some Title]     ....     \end{mdframed}     \begin{mdframed}[style=example,frametitle=Some Title]     .....     \end{mdframed}


title: macro that defines a comment

text: The Wikibooks book on LaTeX mentions the following way of defining a macro for (possibly multi-line) comments:               \newcommand{\comment}[2]{#2}      with the argument that               \newcommand{\comment}[1]{}      can produce unwanted space. But is this really the best way? Does this macro work in all contexts, even at the very end of a file? **What is the best way of defining a comment macro that works in the largest number of circumstances?** (Of course there is no way to define a comment macro that works _everywhere_.)


title: How can I remedy a 'TeX capacity exceeded, sorry' error?

text: I'm trying to write a report that contains many `tikz` figures (originating from Matlab, if that matters). When I compile my document, I get the following error:               TeX capacity exceeded, sorry [input stack size=5000].      How can I get rid of that error?


title: How to link to a label using specific text

text: So I am writing a programming book and I have a code example in it that I have labeled `\label{ex11}`. How can I later in the document make a link to it using custom text? For example, I am writing somewhere later in the book, "As I mentioned in `the first one-liner`, ...". Here I want the text "`the first one-liner`" to be linked to `\label{ex11}`. So that when I click that text, the document jumps to the label. Any ideas how to do that? If this was HTML, I'd just do `<a href="ex11">the first one-liner</a>` (just to give you a better understanding about what I want to do).


title: \pagestyle{empty} on a specific number of pages

text: I would like to remove the style of my report on my table of contents. I formerly used `\thispagestyle{empty}` before `\tableofcontents` but it obviously works only for the first page of the table of contents. Since my table of contents is now 3 pages, is there a way/options to make a `\pagestyle{empty}` for an amount of 3 pages only, and then go back with my early own style for the rest of my repport? Please note that my created style includes headers/images/page number on top and on bottom of each page.


title: Expand command read from file

text: I have a file, that contains a list of latex commands each command per line. Now I want to read this file line per line and execute/expand the macros automatically. I tried the following but this only prints out the command instead of executing it.               \makeatletter     \newread\myread     \newcount\linecnt     \openin\myread=testfile.tex     \@whilesw\unless\ifeof\myread\fi{%       \advance\linecnt by \@ne       \readline\myread to \line       \line     }     \makeatother      How can I fix this? I don't think that there is something like `\forceexpand\line`. How can I make this to ignore comments in `testfile.tex`? **Edit** : As Joseph Wright pointed out in a comment, I should use `\read` instead of `\readline`. This also ignores comments but it doesn't solve my comment problem completely. To illustrate this, here is my original motivation for this question: I wanted to test multiple fonts in xelatex in different documents (which where put together via pdfpages in a later step, but this is too complicated and doesn't matter here). However for this situation I wanted to have a single file with the list of fonts I wanted to try, like this (`testfile.tex`):               \setmainfont{font1}     %\setmainfont{font2}     \setmainfont{font3}      Then I have a document file, something like this:               \documentclass{article}          \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}          \newcommand{\testtext}{Some Text}          \begin{document}         \makeatletter         \newread\myread         \newcount\linecnt         \openin\myread=testfile.tex         \@whilesw\unless\ifeof\myread\fi{%           \advance\linecnt by \@ne           \read\myread to \line           \line           \testtext           \newline %\newpage         }         \makeatother     \end{document}      This should output the content of `\testtext` twice, one time with font1 and one time with font3, the commented entry with font2 should be ignored completely (instead of printing the text with font1 twice). So I should detect somehow in the loop if the line was a comment and don't execute `\testtext` and `\newline` in this case.


title: URL field only for certain reference types with biblatex

text: I'm using `biblatex` for my references. My `bib` file includes many references which I have imported from different sources. Not all references have a `url` entry and some of them are bogus. I now like to suppress the `url` entries by default but use them for specific reference types, e.g. `@manual`, only. Currently I use:               \usepackage[         style=numeric-comp,         sorting=none,         doi=false,         isbn=false,         url=true,         eprint=false,         maxnames=99     ]{biblatex}      Is there a possibility to say `url=false` in general but something like `manual={url=true}`? I like to avoid going to my big `bib` file and comment out all other `url` entries.


title: How to change the page layout back and forth?

text: I'm trying to do some absolute placement on a page but because I use `pdflscape`, I can't use the `textpos` package for this. I tried around a bit with moving with `\hspace*` and `\vspace*` but this is very tedious and produces overfull boxes galore. So I tried to change the page layout for just one page which basically works but the _next_ page is broken in ways I cannot comprehend. Here is what I did; I store the old dimensions, set everything to zero or whatever (pdf)LaTeX needs to make it zero and then restore the old dimensions from the saved values:               \documentclass{article}          \usepackage[english]{babel}     \usepackage{blindtext}          \newlength{\oldtextheight}     \newlength{\oldtextwidth}     \newlength{\oldevensidemargin}     \newlength{\oldoddsidemargin}     \newlength{\oldcolumnsep}     \newlength{\oldtopmargin}     \newlength{\oldheadheight}     \newlength{\oldheadsep}     \newlength{\oldfootskip}          \begin{document}          \blindtext[5]          \newpage%     % save old page dimensions     \setlength{\oldtextheight}{\textheight}%     \setlength{\oldtextwidth}{\textwidth}%     \setlength{\oldevensidemargin}{\evensidemargin}%     \setlength{\oldoddsidemargin}{\oddsidemargin}%     \setlength{\oldcolumnsep}{\columnsep}%     \setlength{\oldtopmargin}{\topmargin}%     \setlength{\oldheadheight}{\headheight}%     \setlength{\oldheadsep}{\headsep}%     \setlength{\oldfootskip}{\footskip}%     % set all margins to 0     \setlength{\textheight}{\paperheight}%     \setlength{\textwidth}{\paperwidth}%     \setlength{\evensidemargin}{-1in}%     \setlength{\oddsidemargin}{-1in}%     \setlength{\columnsep}{0pt}%     \setlength{\topmargin}{-1in}%     \setlength{\headheight}{0pt}%     \setlength{\headsep}{0pt}%     \setlength{\footskip}{0pt}%     % do absolute placement stuff where textpos doesn't work:     \noindent\rule{5mm}{5mm}\newpage% the necessity for this \newpage is also strange     % reset page dimensions     \setlength{\textheight}{\oldtextheight}%     \setlength{\textwidth}{\oldtextwidth}%     \setlength{\evensidemargin}{\oldevensidemargin}%     \setlength{\oddsidemargin}{\oldoddsidemargin}%     \setlength{\columnsep}{\oldcolumnsep}%     \setlength{\topmargin}{\oldtopmargin}%     \setlength{\headheight}{\oldheadheight}%     \setlength{\headsep}{\oldheadsep}%     \setlength{\footskip}{\oldfootskip}%     %\newpage % this wouldn't help a bit          \blindtext[10]          \end{document}      While the margins seem more or less intact, the type area is larger than the actual page. As I reset `\textheight` along with everything else, this makes no sense to me. The following image shows page 3 from the above example (click to enlarge): ![](http://i.stack.imgur.com/IPs12.png) One page later, everything is back to normal. Any help on what is happening and how I can make a clean reset would be much appreciated. Maybe I should add that I've read that newer versions of the `geometry` package have `\newgeometry` and `\restoregeometry` commands that appear to do just what I'm trying to do manually but the TeXLive distribution on my current Beta Ubuntu (Precise) isn't new enough and I'd rather not mess with my package manager (it always pays me back one day) or my TeX trees in general (it's dark art and never works like it should). I did try the `gmeometric` package (`\geometry{textheight=\paperheight,textwidth=\paperwidth}` and `\geometry{textheight=\oldtextheight,textwidth=\oldtextwidth}`) but to no avail.


title: Undesired behaviour of \parbox within figure environment

text: I want to put a `\parbox` in a figure that is drawn by `pstricks`. The `pspicture` environment is inside of a `figure` environment. As an example:               \documentclass[singlecolumn, nofootinbib, notitlepage]{revtex4-1}          \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{pstricks}     \usepackage{pst-solides3d}     \usepackage{pst-poly}          \begin{document}          \begin{figure}[htb]          \begin{pspicture}[showgrid=true](-3,-3)(3,3)      \rput[tl](-2, 2){\parbox{4cm}{I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. }}     \end{pspicture}          \label{some label}     \end{figure}          \end{document}      ![example within figure-environment](http://i.stack.imgur.com/7X7mU.png) For some reason, the text within the `\parbox` is _not_ justified, as it should be the case in a `\parbox`, but it is centered. However, if I do not put the `pspicture` environment in a `figure` environment, then the text in the `\parbox` _is_ justified, as in the following example:               \documentclass[singlecolumn, nofootinbib, notitlepage]{revtex4-1}          \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{pstricks}     \usepackage{pst-solides3d}     \usepackage{pst-poly}          \begin{document}          \begin{pspicture}[showgrid=true](-3,-3)(3,3)      \rput[tl](-2, 2){\parbox{4cm}{I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. I want this text to be justified. }}     \end{pspicture}          \end{document}      ![example without figure-environment](http://i.stack.imgur.com/UHKPh.png) How can I put a justified text in a `pspicture` that is inside of a `figure` environment? In other words, how do I have to modify the first example such that the text in the `\parbox` is justified (instead of centered)? If there is an alternative to `\parbox` that works (i.e. which is justified in this situation), I'm fine with that as well.


title: Is there any figure tikz can't draw, theoretically?

text: I am just curious whether there is a boundary for the ability of tikz.


title: using subfig changes fonts in captions of figures

text: I used package subfig(for using \subfloat). This undoes the special font size for the captions in the figures. Now they are of same size as normal text. How to counter that? The Document class and packages included are:               documentclass[letterpaper, 10 pt, conference]{ieeeconf}                \IEEEoverridecommandlockouts                                   \overrideIEEEmargins     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{subfig, graphicx}     \DeclareGraphicsExtensions{.pdf, .jpeg, .png, .jpg}     \usepackage{cite}     \usepackage{amssymb,amsmath}     \floatname{algorithm}{Procedure}     \renewcommand{\algorithmicrequire}{\textbf{Input:}}     \renewcommand{\algorithmicensure}{\textbf{Output:}}      The figure I added is:               \centering     \includegraphics[width=0.4\textwidth,height=0.3\textwidth]     {images/framework.eps}     \caption{Block diagrammic representation of our framework}     \label{fig:framework}     \end{figure}        I am able to see small font if I remove subfig.


title: cleanest way to part answers from questions

text: I am still typesetting old exams, and I turn to you lads and lassies for help. At the moment I have most of the actual exams typed in, and is currently typing in answers for them. The problem I run into is that it is quite hard distinguishing the actual exam questions and notes from the solutions. Now I was thinking of ways to make them different enough, but not so different that it becomes a eyesore reading it. My thoughts was to either alter the text ever so slightly or, tint the background. Perhaps in a relaxing colour, perhaps beige. I guess another way is to add vertical lines or some other form of clear border. Or do nothing at all.               \documentclass{article}     \usepackage{mwe} % new package from Martin scharrer     \usepackage{lipsum,caption,mathtools}     \usepackage{comment}     \includecomment{Answer}     \setlength{\parindent}{0in}     \begin{document}          \section*{Problem 1}          \paragraph*{a) } Prove that donkeys can fly if and only if they have more arms than penguins. \medskip          \begin{Answer}     \lipsum[1]     %      \begin{figure}[!htbp]      \centering      \begin{minipage}[c]{\textwidth}      \centering             \includegraphics[width=3.0in]{example-image-a}             \caption{Caption for image}             \label{fig:some figure to accompany the answers}      \end{minipage}      \end{figure}     %      \lipsum[2]     Q.E.D     \end{Answer}          \newpage          \section*{Problem 2}          \paragraph*{a) } If $(x+y)^2=99$ and $x^2+y^2 = 11$ what is $x\cdot y$? \medskip          \begin{Answer}     \lipsum[2]      \begin{align*}     (x+y)^2 & = 99 \\     x^2 + y^2 + 2x\cdot y & = 99 \\     x\cdot y & = 44 \\     \end{align*}       \lipsum[3]     Q.E.D \medskip     \end{Answer}          Now is it posible finding $x-y$ from the information above? \medskip          \begin{Answer}     \lipsum[6]     Therefore it is not possible finding $x-y$ from the information given.     \end{Answer}          \end{document}      Here is an MWE, my actual code is more complicated but I guess this will do. **My question is** Is it preferable to distinguish the answers and questions further, and if yes; what is the best way to do so?


title: Problems Using AVM package for LFG structures

text: I am trying to draw LFG f-structure matrices using the avm package (https://www.essex.ac.uk/linguistics/external/clmt/latex4ling/avms/). For some reason my avm objects do not respect the \\ command, causing obvious problems. Some sample code that fails to produce multi-line matrices.               \documentclass[11pt]{scrartcl}          \usepackage{array}     \usepackage{avm}     \begin{document}          \begin{avm}       \[one\\ two\\ \]     \end{avm}               \end{document}      Which produces something like ![enter image description here](http://i.stack.imgur.com/mYHiC.png)


title: Trouble with the newtx package

text: I've just installed the newtx package using tlmgr. (I'm still on TexLive 2011, if that matters.) The installation did not result in any error messages -- but when I try to use the package, I do receive odd error messages. Here's a minimal (non-)working example:               \documentclass{minimal}     \usepackage[libertine]{newtxmath}     \begin{document}     Foo bar $x \phi$ baz.     \end{document}      And here are the messages that result:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./foo.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ba     sque, danish, dutch, ukenglish, usenglishmax, finnish, french, german, ngerman,      swissgerman, hungarian, italian, bokmal, nynorsk, polish, portuguese, spanish,      swedish, loaded.     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/minimal.cls     Document Class: minimal 2001/05/25 Standard LaTeX minimal class     ) (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/newtxmath.sty          LaTeX Warning: You have requested package `newtxmath',                    but the package provides `ntxmath'.     `ntxmath' v0.92, 2012/05/09 Math macros based on txfonts (msharpe)     (/usr/local/texlive/2011/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/xkeyval.tex     (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/keyval.tex))))     (./foo.aux) (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/omlnxlmi.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/omsntxsy.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/omxntxex.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/untxexa.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/untxmia.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/untxsya.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/untxsyb.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/newtx/untxsyc.fd) [1{/usr/local/t     exlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./foo.aux)     kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 nxlmi     mktexpk: don't know how to create bitmap font for nxlmi.     mktexpk: perhaps nxlmi is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.      )     !pdfTeX error: pdflatex (file nxlmi): Font nxlmi at 600 not found      ==> Fatal error occurred, no output PDF file produced!      Thoughts? **Edit:** After upgrading to TexLive 2012 and installing the current version of newtx, I instead get a sequence of error messages that begins like this:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)      restricted \write18 enabled.     entering extended mode     (./foo.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/minimal.cls     Document Class: minimal 2001/05/25 Standard LaTeX minimal class     ) (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/newtxmath.sty     `newtxmath' v0.95, 2012/05/26 Math macros based on txfonts (msharpe)     (/usr/local/texlive/2012/texmf-dist/tex/generic/kastrup/binhex.tex)     (/usr/local/texlive/2012/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2012/texmf-dist/tex/generic/xkeyval/xkeyval.tex     (/usr/local/texlive/2012/texmf-dist/tex/generic/xkeyval/keyval.tex))))     (./foo.aux) (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/omlnxlmi.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/omsntxsy.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/omxntxex.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/untxexa.fd)          LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <5.5> not available     (Font)              size <5> substituted on input line 4.          (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/untxmia.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/untxsya.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/untxsyb.fd)     (/usr/local/texlive/2012/texmf-dist/tex/latex/newtx/untxsyc.fd) [1{/usr/local/t     exlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}     kpathsea: Running mktextfm txmi     /usr/local/texlive/2012/texmf/web2c/mktexnam: Could not map source abbreviation  for txmi.     /usr/local/texlive/2012/texmf/web2c/mktexnam: Need to update ?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input txmi     This is METAFONT, Version 2.718281 (TeX Live 2012)               kpathsea: Running mktexmf txmi     ! I can't find file `txmi'.     <*> \mode:=ljfour; mag:=1; nonstopmode; input txmi          Please type another input file name     ! Emergency stop.     <*> \mode:=ljfour; mag:=1; nonstopmode; input txmi          Transcript written on mfput.log.     grep: txmi.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input txmi' failed to make txmi.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font \csname\endcsname=txmi at 10.0pt not loadable: Metric (TFM) file not fou     nd.     <to be read again>                         \endgroup \set@typeset@protect      l.5 \end{document}     ...


title: Compile Error: lualatex with PSTricks

text: I compile the file below with `lualatex --shell-escape` but I get the error :               ! Undefined control sequence.     l.14 \savedata                 {\data}[{0,0},{0.1,0.319802645},{0.2,0.6510256205},{0.3,0.993869...     ?      ! Emergency stop.     l.14 \savedata                 {\data}[{0,0},{0.1,0.319802645},{0.2,0.6510256205},{0.3,0.993869...      298 words of node memory still in use:        2 hlist, 1 rule, 1 kern, 6 attribute, 41 glue_spec, 6 attribute_list, 1 write     , 3 special, 1 dir, 1 pdf_colorstack nodes        avail lists: 2:16,3:1,4:4,5:1,6:7,7:1,9:2     !  ==> Fatal error occurred, no output PDF file produced!      * * *               \RequirePackage{ifluatex}     \documentclass{article}     \ifluatex     \usepackage{fontspec}     \setmainfont{TeX Gyre Pagella}     \else     \usepackage{tgpagella}     \usepackage{pst-plot}     \definecolor{CyanTikz40}{cmyk}{.4,0,0,0}     \fi     \usepackage{auto-pst-pdf}     \begin{document}      \savedata{\data}[{0,0},{0.1,0.319802645},{0.2,0.6510256205}, {0.3,0.993869283},{0.4,1.3485339894},{0.5,1.7152200962},{0.6,2.0941279602},{0.7,2.4854579379},{0.8,2.8894103862},{0.9,3.3061856616},{1,3.7359841208},{1.1,4.1790061205},{1.2,4.6354520174},{1.3,5.1055221682},{1.4,5.5894169295},{1.5,6.087336658},{1.6,6.5994817104},{1.7,7.1260524433},{1.8,7.6672492135},{1.9,8.2232723776},{2,8.7943222922},{2.1,9.3805993141},{2.2,9.9823037999},{2.3,10.5996361063},{2.4,11.23279659},{2.5,11.8819856076},{2.6,12.5474035159},{2.7,13.2292506714},{2.8,13.9277274309}]      \psset{yAxisLabel=Volume d'eau en L,xAxisLabel=Niveau d'eau en dm,linewidth=1pt,xAxisLabelPos={2.5,-2.5},xticksize=0 3.9375, yticksize=0 9,tickcolor=CyanTikz40,tickwidth=1pt,arrowscale=1.2}     \begin{psgraph}[Ox=0,Dy=2,Dx=0.5]{->}(0,0)(3,16){9.cm}{4.5cm}     \listplot[linewidth=1pt]{\data}     \end{psgraph}     \end{document}


title: Tikz vertical alignement text and shape

text: I want to vertically align sans serif font with a rectangle. The following code show the problem:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary[positioning]          \begin{document}          \begin{tikzpicture}     [mainbullet/.style={rectangle, minimum size=0.25cm,draw=orange, fill=orange,thick},      categoryssf/.style={font=\sffamily, orange!100, draw, thin, inner sep = 0, outer sep = 0.0},     category/.style={orange, draw, thin, inner sep = 0}]     \node[categoryssf] (experiencecat) at (0,0) {Experience};     \node[mainbullet] (experiencebullet) [below=1mm of experiencecat.south west, anchor=north west] {};     \node[category] (experiencecat) at (0,1) {Experience};     \node[mainbullet] (experiencebullet) [below=1mm of experiencecat.south west, anchor=north west] {};%     \end{tikzpicture}          \end{document}      ![latexExample](http://i.stack.imgur.com/q3aDq.png) The alignment is ok for serif font but not sans serif font as the bounding box is still positionned as if there was a serif in the font. Is there a way to correctly align sans serif font with the side of the rectangle ?


title: Determine width of verbatim characters

text: I would like to determine how many characters of the verbatim font that fits on a text line. Consider:               \documentclass{article}     \usepackage{fancyvrb}     \begin{document}     \noindent\hrulefill     \begin{Verbatim}[fontfamily=tt,fontsize=\small]     1234567890123456789012345678901234567890123456789012345678901234567890123456789012456789012345678901234567890123456789     \end{Verbatim}     \noindent\hrulefill\\     \end{document}      This gives me the following screenshot: ![enter image description here](http://i.stack.imgur.com/ZAQ7f.png) from which I can infer that there are approximately 73 characters on a line. How can I determine this number programmatically from within LaTeX?


title: Where can I find the TikZ spy package

text: Where can I find the TikZ `spy` package?   I found a great article here: How to create magnified subfigures and corresponding boxes for portions of a large image Even with Google and StackExchange search I can’t find a site to download the package. Can anyone help me?


title: Print mdframed footnotes at bottom of page instead of after frame

text: If there is a `\footnote` inside an `mdframed` environment, then I can control, via the `footnoteinside=false` flag, whether or not I want those footnotes included inside the frame or outside. But even when typeset outside the frame, they will immediately follow the frame. Is there a way, perhaps using a small hack, to print these footnotes at the end of the (last) page where the frame was included?


title: Subfig caption doesn't start at start of line

text: I have a situation where the subfigure caption doesn't start at the start of the line. `\captionsetup[table]{width=\textwidth}` is added to try to have the caption take up the whole line rather than wrap at the boundaries of the table as recommended in Prevent wrapping of subtable captions in lyx. ![enter image description here](http://i.stack.imgur.com/HNRg0.png)               %% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{caption}     \usepackage{subfig}     \captionsetup[table]{width=\textwidth}          \@ifundefined{showcaptionsetup}{}{%      \PassOptionsToPackage{caption=false}{subfig}}     \usepackage{subfig}     \makeatother          \usepackage{babel}          \begin{document}     %     \begin{table}     \caption{Valleys in promoters of genes correlated with overexpression by breast     cancer subtype}               \label{tab:vlyTallyUniqVlyMtchCntrlOvrExp}          \subfloat[Number of valleys in the promoter region marking overexpresses genes     in breast cancer by subtype]{\begin{raggedright}          \par\end{raggedright}          \begin{raggedright}     \label{tab:vlyTallyUniqCombinedVlyMtchCntrlOvrExp}     \par\end{raggedright}          \raggedright{}\begin{tabular}{|c|c|c|c|}     \cline{3-4}      \multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline     \cline{3-4}      \multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline     \hline      Marked & Basal  & 131  & 116\tabularnewline     \cline{2-4}      Cell line & Luminal  & 100  & 104\tabularnewline     \hline     \end{tabular}}          \subfloat[Directly overlapping valleys in promoters of genes correlated with     overexpression by breast cancer subtype]{\begin{raggedright}          \par\end{raggedright}          \begin{raggedright}     \label{tab:vlyTallyUniqOverlappingVlyMtchCntrlOvrExp}     \par\end{raggedright}          \raggedright{}\begin{tabular}{|c|c|c|c|}     \cline{3-4}      \multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline     \cline{3-4}      \multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline     \hline      Marked & Basal  & 26 & 18\tabularnewline     \cline{2-4}      Cell line & Luminal  & 20 & 10\tabularnewline     \hline     \end{tabular}}     \end{table}                         \end{document}


title: Change background image to a colour gradient with a0poster template

text: I am using the template from Elena Botoeva to create an A0 poster. How do I change the background to just a colour gradient, i have tried changing the style file but can't get it to work.


title: Avoid hyphenation in "2-D"

text: How can I avoid hyphenation in words such as "2-D"? `\hyphenation{}` is not working since the dash is not a letter.


title: References in bookmarks

text: The references does not appear in bookmarks. I am using the following environment.               \documentclass[12pt]{article}     \usepackage[bookmarks]{hyperref}     \begin{document}     \begin{thebibliography}{1}     \bibitem{someitem}     \end{document}      How can I add the References to the bookmarks?


title: How can I get documentation for the LaTeX letter class?

text: I am trying out TeX and writing some correspondence in it just to learn the basic commands. For the "letter" document class, I have found this reference site: http://en.wikibooks.org/wiki/LaTeX/Letters My question, put simply, is as follows:   * How do I get _documentation_ * on a particular document class, in this case: "letter"? (*) By documentation I mean: "list of all commands, their syntax and usage" Note: I can use               texdoc "packagename"      for packages but I don't know how to do the same for document classes? Bonus/optional complement to this question (feel free to disregard it if you dislike multiple questions in a single post): where do I get a list of document classes from? (I get my list of packages from: http://ctan.org/pkg)


title: DB diagram's (entity relationship) - tikz chamfered rectangle with split zones

text: I try to draw an association type for an entity-relationship diagram. How can I draw a chamfered rectangle with split parts=2 or 3 ? I found this ref : Horizontally enlarged hexagon with TikZ but it doesn't answer completly to my problem. I tried some variations with "chamfered rectangle" and "rectangle split" without success. How can I draw a figure like this: ![enter image description here](http://i.stack.imgur.com/8No5u.png)


title: biblatex symbol instead numbers

text: I am using `biblatex` and I want to use a symbol instead the numbers. Consider this example [1] Adimurthi, Jerome Jaffre, and G. D. Veerappa Gowda. Godunov-type methods for conservation laws with a flux function discontinuous in space. SIAM J. Numer. Anal., 42(1):179–208 (electronic), 2004. [2] Clarisse Alboin, Jerome Jaffre, Jean E. Roberts, Xuewen Wang, and Christophe Serres. Domain decomposition for some transmission problems in flow in porous media, volume 552 of Lecture Notes in Phys., pages 22–34. Springer, Berlin, 2000. Instead the number I want a symbol, common for all the entry. For example ● Adimurthi, Jerome Jaffre, and G. D. Veerappa Gowda. Godunov-type methods for conservation laws with a flux function discontinuous in space. SIAM J. Numer. Anal., 42(1):179–208 (electronic), 2004. ● Clarisse Alboin, Jerome Jaffre, Jean E. Roberts, Xuewen Wang, and Christophe Serres. Domain decomposition for some transmission problems in flow in porous media, volume 552 of Lecture Notes in Phys., pages 22–34. Springer, Berlin, 2000. There is an easy way to do it?


title: Command enclosing content of custom environment

text: I want to create an environment that wraps the content in a command so that I can write this:               \begin{mybox}       content     \end{mybox}      and get this:               \psshadowbox{content}      When doing it as a custom command it's no problem because everything is defined in the same block, but since custom environments are defined over two blocks I'd have to put the closing brace for the command in another block than the starting brace which obviously doesn't work:               \newenvironment{mybox}     { \psshadowbox{ }     { }             }      The reason I don't want to use a command for this is mainly readability, because the content can get quite long and a mere closing brace just isn't very expressive.


title: Issue with PGFPlots text

text: I'm trying to generate some plots using TikZ, with the following code: It's not about `babel`, `fontenc`, or `inputenc`; I've tried removing them to no avail.               \documentclass[a4paper]{article}     \usepackage{pgfplots}     \usepackage[spanish]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \parindent=40pt     \begin{document}          \begin{tikzpicture}         \begin{axis}[             xlabel=$x$,             ylabel=$y$]         \addplot[smooth,mark=*,blue] plot coordinates {             (0,2)             (2,3)             (3,1)         };         \addlegendentry{Case 1}              \addplot[smooth,color=red,mark=x]             plot coordinates {                 (0,0)                 (1,1)                 (2,1)                 (3,2)             };         \addlegendentry{Case 2}         \end{axis}         \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}         [             axis equal image,             width = 5cm,             height = 5cm,             xmin=-1.0,xmax=10,             ymin=-1.0,ymax=6,             xlabel = {$f$},             ylabel = {$I$},             xtick = {0},             xticklabels={},             ytick = {0},             yticklabels={},             grid = none,             axis x line=middle,             axis y line=middle,             clip=false,             small,         ]         \draw[-] (axis cs:0,0) to [in=180,out=0] (axis cs:4,4) to [in=180,out=0] (axis cs:8,0);         \draw[dashed] (axis cs:4,4) -- (axis cs:4,0) node [below] {$f_r$};         \draw[dashed] (axis cs:4,4) -- (axis cs:0,4) node [left] {$\frac{V_s}{R}$};         \end{axis}          \end{tikzpicture}               \end{document}      but my result puts all of the text in the same point for each plot. ![wrong](http://i.stack.imgur.com/rK3aO.png)


title: Quoting shell commands

text: My question is, how would you typographically approach quoting of shell commands? My current solution does not satisfy me completely. Current look: ![current look](http://i.stack.imgur.com/Un8Bg.png)


title: How to use ball shading on non-circle shapes?

text: If using ball shading on non-circle elements, it will well apply the shading effect, but it will use the default blue color. How to use ball shading with the element color.               \node[text width=3cm,fill=red,shading=ball] (test) at (1,1) {Text};      This will produce a rectangle with ball shading effect; however, in **blue** color instead of **red**.


title: APA-Biblatex Problem with amount of authors

text: I've got a problem with the biblatex-apa version. Here is the relevant part of my header:               \documentclass[     a4paper,     12pt,     headings=normal     bibtotoc,     pointlessnumbers     ]{scrartcl}          \usepackage[babel=true]{csquotes}     \usepackage[style=apa,backend=biber,minbibnames=5, maxbibnames=5]{biblatex}       \bibliography{literatur}     \DeclareLanguageMapping{ngerman}{ngerman-apa}     \DefineBibliographyStrings{ngerman}{andothers={et\ addabbrvspace al\adddot}}     \newcommand*{\mcite}[1]{\citeauthor{#1} (\citeyear{#1})}          \renewcommand\finalandcomma{\addcomma}          \begin{document}          \mcite{Brodbeck2000}     \printbibliography          \end{document}      with this journal article               @article{Brodbeck2000,     author = {Brodbeck, Felix C and Frese, Michael and Akerblom, S and Audia, G and      Bakacsi, G and Bendova, H and Bodega, D and Bodur, Muzaffer and Booth, S and Brenk, K      and Castel, P},     journal = {Journal of Occupational and Organizational Psychology},     pages = {1--29},     title = {{Cultural variation of leadership prototypes across 22 European countries}},     volume = {73},     year = {2000}     }      The problem is that biblatex has a problem with this amount of authors. Instead of stopping after six authors and putting "et al" after the last one biblatex writes: Brodbeck, F. C., Frese, M., Akerblom, S., Audia, G., Bakacsi, G., Bendova, H., . . . Castel, P. (2000). Cultural variation of leadership prototypes across 22 European countries. Journal of Occupational and Organizational Psychology, 73, 1–29. Does anybody know how do fix it, so that biblatex only puts 6 authors in the bibliography (apa-style) and then "et al."?


title: \today and internationalization

text: I am writing a LaTeX document with internationalization support as explained on Wikibooks. Here is my minimal file:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage[english,frenchb,spanish]{babel}          %% Required package.                                                                                \usepackage{ifthen}          %% TeX function that generates the language commands.                                                                                \def\localedef#1#2{     \ifthenelse{ \equal{\locale}{#1} }{       \selectlanguage{#2}       \expandafter\def\csname#1\endcsname ##1{##1}       }{       \expandafter\def\csname#1\endcsname ##1{}       }     }          %% Selected language. Can be placed anywhere before the language commands.                                                                                \providecommand\locale{fr}          %% Language commands.                                                                                \localedef{en}{english}     \localedef{fr}{frenchb}     \localedef{es}{spanish}          \usepackage{hyperref}          \begin{document}          \title{\en{Example of \LaTeX \ document with multi-language support}                                                                                \fr{Exemple de document \LaTeX \ avec support multi-langues}                                                                                \es{Ejemplo de documento con soporte multi-idioma}}     \author{\en{Author}\fr{Auteur}\es{Autor}}     \date{\today}     \maketitle          \en{Hello, this document was written based on explanations available here}     \fr{Bonjour, ce document a été écrit en suivant les explications disponibles ici}     \es{Buenos dias, este documento fue elaborado sobre la base de las explicaciones disponibles aquí}     :          \url{https://en.wikibooks.org/wiki/LaTeX/Internationalization}          \end{document}      As you can see, I can easily switch between languages and here I chose French (`\providecommand\locale{fr}`). When I compile with `pdflatex` and visualize with `evince`, everything works fine except that the date, given by `\today`, is in Spanish: ![enter image description here](http://i.stack.imgur.com/wV2FJ.png) What did I do wrong? ps: I'm on Xubuntu 14.04 and all my packages are up-to-date.


title: How to replace one table with another table in beamer?

text: In my slides i need such a way that on mouse click the table on the current frame has to replace with another table that i need..currently my code is:                \begin{table}[htb!]     \begin{center}     \onslide<2-2>\begin{tabular}{|c|c|c|c|c|c|}     \hline       %table 1 rdata\\      \hline     \end{tabular}     \end{center}     \caption{Results of RLC Circuits}     \label{tab:rlc}     \end{table}          \begin{table}[htb!]     \onslide<3-3>\begin{center}         %results of Digital     \begin{tabular}{|c|c|c|c|c|c|}     \hline     %table two rows        \hline     \end{tabular}     \end{center}     \caption{Results of Digital Circuits}     \label{tab:dig}     \end{table}     \end{frame}      But my output is not one over another on click, its one below another on mouse click. How can i correct it??


title: grayed box for enumerate

text: I am using a lyx article template . I want to put my all enumerate items in grayed box . How can I define the enumerate environment in preamble so that all my enumerated lists appear in a grey boxes. I do not want to use tex code inside lyx document and would like to define this style in preamble itself . Kindly help


title: mathabx package and Maya symbols problem

text: I'm desperately trying to use the Mayan math symbols I found listed in the Comprehensive LaTeX Symbols List. The document says that these symbols can be used this way (page 65):               Table 200:     mathabx     Mayan Digits     0  \maya{0}     1  \maya{1}     2  \maya{2}     3  \maya{3}     4  \maya{4}     5  \maya{5}      I've added `\usepackage{mathabx}` at the top of my document and tried using as a test `\maya{3}` and then `$\maya{3}$` in my document but get this error:               ! Undefined control sequence.     \maya ...mayacnter =#1 \setbox 0\hbox {\mathbfont                                                        0}\mayawidth =\wd 0 \left ...     l.91 $\maya{3}                   $     ?       Any suggestions on what I'm doing wrong here? I'm not able to find any example documents online showing how to use this correctly.