title: Exam layout: lhead and rhead stop working after page 2

text: In exam documents where there are index pages and the page numbering restarts, I'm having trouble with getting the lhead and rhead to work correctly. Reference this example:               \documentclass[letterpaper, 12pt, twoside]{exam}     \printanswers          \usepackage{abbrevs}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{multirow}     \usepackage[table]{xcolor}     \usepackage{hyperref}     \usepackage[letterpaper, headheight=80px, top=.5in, bottom=.5in, left=1in, right=.5in, includeheadfoot]{geometry}     \usepackage{lipsum}          \definecolor{SolutionColor}{rgb}{0.8,0.9,1}     \shadedsolutions     \renewcommand{\solutiontitle}{\noindent}          \rhead[\thepage]{logo goes here}     \chead{Project Name}     \lhead[logo goes here]{\thepage}          \begin{document}          \title{Sample Number Errors}     \maketitle     \thispagestyle{empty}     \newpage          Copyright     \thispagestyle{empty}     \newpage          \setcounter{page}{1}     \pagenumbering{roman} %use lowercase Roman numerals for page numbers          Revision history page goes here.     \newpage          \setcounter{tocdepth}{1}     \tableofcontents     \newpage          %reset the page counter for the regular pages     \setcounter{page}{1}     \pagenumbering{arabic} %use standard numbers for the page number          \lipsum[1-50]          \end{document}      Here, everything looks fine until you get to the third page of content (IE: title page is good, copyright page is good, revision history page is good, table of contents is good, then the first two pages of content are good). On the third page of content, the header stops switching between lhead and rhead. The page numbering is on the inside spine instead of the outside. In fact, for every subsequent page after page 2, the header is always using the rhead definition only, regardless of which page I'm on. How can I fix this for my document? Note that I left all the \usepackage and preamble in the example, just in case something odd is interfering/conflicting with what I'm trying to do.


title: mdframed digressionarrows style with custom header

text: Using the `mdframed` package, I've been trying to figure out how to add an option for changing the header in their digression-environment (example 6 here: http://cloud.github.com/downloads/marcodaniel/mdframed/mdframed-example- texsx.pdf). I imagine using the package like this               \begin{mdframed}[style=digressionarrows]{Header of the environment}      Does anyone know how customize the digressionarrows style to allow that?


title: "Call out box" in a two-column document

text: I suppose "call out box" probably doesn't have much of a meaning in the TeX world, but a (framed) "box" probably isn't specific enough for what I mean. Anyway, I am compiling the following with `pdftex`:               \documentclass[twocolumn, 11pt]{article}          \usepackage[framemethod=TikZ]{mdframed}     \usepackage{multicol}     \usepackage{newfloat}          \DeclareFloatingEnvironment[         fileext=los,         listname=List of Schemes,         name=MyFloat,         placement=t,         within=section     ]{MyFloat}          \usepackage{lipsum}          % page formating     \setlength{\parindent}{0cm}     \setlength{\parskip}{6pt plus1pt minus1pt}     \setlength{\columnsep}{12pt}     \raggedright          \begin{document}          \lipsum[1-5]          \begin{MyFloat*}       \begin{mdframed}           \begin{multicols}{2}                     \lipsum[6-7]                   \end{multicols}         \end{mdframed}     \end{MyFloat*}               \lipsum[8-9]          \end{document}      The main thing I would like to achieve is to have finer control over the paragraph formatting inside the framed box (specially, make it `\raggedright` and set paragraph spacing as in the rest of document). But I also have the feeling (just a feeling) that there are unnecessary (and bad) lines of code here, so any suggestions on this are much appreciated as well. For example:   * note that I initally chose the whole document to be in twocolumn mode (I didn't find it necessary to `\usepackage{multicol}` at first, only when I decided to include this "call out box".).    * do I really need a float environment here? (I just guessed it could work and it kind of did, but am not sure what the benefits are, what kind of annoyances it could bring me, and if it is needed at all.)    * I tried a `minipage` myself (I guess these packages build on `minipage`) but didn't get very far. In other words, I'd like to learn a bit of LaTeX as well.


title: Open included files in emacs+AUCTeX

text: When working with emacs+AUCTeX I would like to consider a project with one `main.tex` in which you have many `include`'s. Is it possible somehow to open the included files from within the buffer where `main.tex` is loaded? Somehow make emacs understand that               \include{./path/to/foo}      in `main.tex` is a filename (with relative path) and open it either by clicking on it or hitting some keybinding when the courser is within the curly brackets? A "bonus" question is probably the next step, that is to have some integrated "project manager" in emacs, where the included files are listed and one can browse the projects components. Does it sound reasonable? feasible? Any ideas?


title: topline of fancyhdr disappears when I use tocloft

text: I have the problem that when I use package `tocloft` the line under the `fancyheader` disappears. It only disappears on pages with lists, like table of contents or list of figures. I would like to have this line on all pages. I guess the problem is somewhere within `tocloft` and `fancyhdr`. Because if I comment `tocloft` out, the line appears on top of the table of contents.               \documentclass[a4paper,fontsize=12pt]{scrartcl}          \usepackage[utf8x]{inputenc}          \usepackage[ngerman]{babel}     \usepackage{marvosym}     \usepackage{tabularx}     \usepackage{graphicx}     \usepackage{pdfpages}     \usepackage{url}     \usepackage{longtable}     \usepackage{enumitem}     \usepackage{pifont}     \usepackage{hyperref}     \usepackage[authoryear]{natbib}     \setlength{\parskip}\bigskipamount          \usepackage{tocloft}     \newcommand{\listappendicesname}{Appendices}     \newlistof{appendices}{apc}{\listappendicesname}     \newcommand{\appendices}[1]{\addcontentsline{apc}{appendices}{#1}}          \newcommand{\newappendix}[1]{\section*{#1}\appendices{#1}}          \pdfinfo{       /Title    ()       /Author   ()       /Creator  ()       /Producer ()       /Subject  ()       /Keywords ()     }          \usepackage{fancyhdr}     \usepackage[head=36pt]{geometry}           \fancyhf{}       \renewcommand{\headrulewidth}{0.4pt}     \pagestyle{fancyplain}            %\fancyhead[L]{\includegraphics[scale=0.1]{picture}}     \fancyhead[R]{\nouppercase{\leftmark}}     \fancyfoot[L]{Name}     \fancyfoot[R]{\thepage}     \begin{document}     \tableofcontents     \section{bla1}     \section{bla2}     \section{bla3}          some text some text some text some text some text \\          \appendix     \listofappendices     \newpage          \newappendix{Appendix one} appendix  appendix appendix appendix appendix appendix     \newappendix{Appendix two} appendix  appendix appendix appendix appendix appendix     \newappendix{Appendix three} appendix  appendix appendix appendix appendix appendix     \newappendix{Appendix four} appendix  appendix appendix appendix appendix appendix          \end{document}


title: How can I make XeLaTeX use "display", "subhead", and "caption" varieties of a font when appropriate?

text: I am using Adobe's Garamond Premier Pro and it has various varities for use with larger and smaller forms of text (see http://www.adobe.com/type/topics/opticalsize.html). Is there a good way to make XeLaTeX use the proper face at the proper time (e.g., footnotes should be in caption, etc). Of course, some care must be taken that things like `\emph` properly work in the context.


title: tikz: Distribute evenly and randomly circles

text: I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape. The density should be like what you see on this page http://zoada.com/html5/brute.html with values 80-100. (But I do not need so many circles, 30 should be enough, I could repeat the pattern). I cannot use a grid and "wobble" the circles a bit: The circles are too large and it simply does not look randomly. Currently I am thinking about a random attempt: Get some random point, measure its distance to existing circles, either paint or throw the point away. Try 100 times and hope that you get the right number of circles (and that it does not take too long). But perhaps someone has a better idea. The example draws the circles simply manually:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds}     \begin{document}           \begin{tikzpicture}[framed,gridded,radius=0.5cm]      \draw[red](0,0) rectangle (5,5);       \draw (1,1) circle;       \draw (2.3,1.1) circle ;       \draw (4.5,0.8) circle ;       \draw (5.1,1.8) circle ;       \draw (0.4,3.3) circle ;       \draw (2.1,2.8) circle ;       \draw (3.8,3.5) circle ;       \draw (4.8,4.2) circle ;       \draw (0.8,4.9) circle ;       \draw (2.1,4.1) circle ;       \draw (3.8,2.0) circle ;       \draw (3.5,0.6) circle ;       \draw (3.0,5.0) circle ;          \draw (4.1,5.1) circle ;                 \draw (0.9,2.1) circle ;      \end{tikzpicture}      \end{document}


title: Want a big table in top-center of a two-column article page

text: \documentclass[11pt, twocolumn]{article}          \usepackage{fontspec} %%Should compile with XeLatex     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[SmallCapsFont = Delicious SmallCaps]{Delicious-Roman} %%Want to use this FONT          \usepackage{multicol}          \title{\textsc{My Title}}     \author{         Author Details }     \date{\today}          \begin{document}     ...          \begin{table}[!h]     \setlength{\extrarowheight}{1.5pt}     \begin{center}     \begin{tabular}{|l|l|l|l|l|}     \hline     Ename & \underline{Eid} & Salary & Dno & Supervisor\_eid \\     \hline     \end{tabular}     \end{center}     \caption {\textbf{EMP} Database Schema}     \end{table}          ...          \end{document}      The {XeLatex} Compilation fails when I use `table*` environment. What is the solution? Error: `[4] ! Extra }, or forgotten \endgroup. \@endfloatbox ...pagefalse \outer@nobreak \egroup \color@endbox l.317 \end{table*}`


title: How to align 'parts' of these equations?

text: I have a set of equations given by the following code:               \begin{equation}     \label{eqn:eraserStart}         \max \, d     \end{equation}          \begin{equation}         a_t \in \{0,1\} \, \forall t \in T     \end{equation}          \begin{equation}         \sum_{\forall t \in T} a_t = 1     \end{equation}          \begin{equation}         a_t \in [0,1] \, \forall t \in T     \end{equation}          \begin{equation}         \sum_{\forall t \in T} c_t \leq m     \end{equation}          \begin{equation}         d - U_d(t, C) \leq (1-a_t) \cdot Z \, \forall t \in T     \end{equation}          \begin{equation}     \label{eqn:eraserEnd}         0 \leq k - U_a(t, C) \leq (1-a_t) \cdot Z \, \forall t \in T     \end{equation}      The output looks like this: ![enter image description here](http://i.stack.imgur.com/ZlRJ3.jpg) Whereas I wish it to look like this: ![enter image description here](http://i.stack.imgur.com/hhPOj.jpg) How can I achieve this?


title: Global scaling of images in html output (only) of htlatex

text: I have the following MWE with some images:               \documentclass{book}     \usepackage{graphicx}     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisici elit:          \begin{centering}     \includegraphics[width=0.5\textwidth]{myimage.jpg}     \includegraphics[width=1.0\textwidth]{myimage.jpg}     \end{centering}     \end{document}      which compile as expected with `pdflatex myfile.tex` to `pdf` output, with one image half of the text width and the other same width as text. Then, using the following config file (needed to obtain images with correct relative sizes):               \Preamble{xhtml}     \Configure{graphics*}         {jpg}         {\Picture[pict]{\csname Gin@base\endcsname .jpg             \space width="\expandafter\the\csname Gin@req@width\endcsname"}}     \begin{document}     \EndPreamble      I compile the same source with `htlatex myfile myconfig`, in order to obtain an `html` version of my document. Image sizes are correct among themselves, but they are too small compared to text size. I guess this has something to do with the fact that `html` has not a fixed page width, so `tex4ht` has to choose a value to be used has 'page width', and such value is too small, at least for me. Is there a 'TeX way' to scale all images in `html` output by a factor? Of course I could increase the width of images in my `latex` source, but that would be time consuming and would affect `pdf` too, which is undesiderable. Or I could write some external script to parse `html` output and manipulate image sizes in `html` source, but I'd prefer a TeX-confined solution. Someone might like to be informed that the present question arised from this other question. **UPDATE** Given that many days have passed with no answers, I'll open the question to answers which are not TeX-confined. See below for a possible solution.


title: Is it possible to get a diagonal subset symbol?

text: I'm asking if I can get the subset symbol, or any symbol really for that matter if possible, for LaTeX, namely the subset symbol would have symmetry about the line y=x. If you know what I mean.


title: Customization of the total page number

text: How to customize the total page number for all of the frames from the beginning, please?


title: Forcing linebreaks in \url

text: I wish to typeset some relatively long URLs in a piece of text, and when I use `\url{..}`, the resulting text does not respect the margin boundaries that govern the main text body, instead going all the way to the edge of the paper before wrapping around. For reference, my preamble looks like this:               \documentclass[12pt]{article}     \usepackage{mathptmx}     \usepackage{fullpage}     \usepackage[pdftex]{hyperref}      and example of the url I'm including is:               \begin{itemize}     \item Some text          \url{very-long-url}     ...     \end{itemize}      I'm compiling using pdflatex, although I doubt this makes a difference.


title: Footnote horizontal spacing of text within footnotes

text: I'm having a problem with some of my footnotes. Many of them which span multiple lines have this odd spacing between words. I've attached a screenshot of a PDF for a better explanation. In this you can see the footnotes 7 and 10 (also shown in 8) with large gaps between words. Any ideas on how I can get rid of this? ![enter image description here](http://i.stack.imgur.com/lgwEz.png) The LaTeX for footnote 10 is as follows:               \footnote{\label{velocityandbottomline}Velocity and the Bottom Line, \url{http://programming.oreilly.com/2009/07/velocity-making-your-site-fast.html}, last accessed: 28/6/2013}


title: Background color for the caption of a listing

text: I'm considering this piece of code               \lstinputlisting[       language=C,       breaklines=true,       basicstyle=\scriptsize\ttfamily,       numbers=none,       caption=\colorbox{mylightgray}\parbox{\textwidth}{\texttt{\detokenize{#1}}},       %title=\small\texttt\lstname,       frame=none]{#1}      why this use of parbox gives me an error? How I can have a caption in a box with a specific background color that spans for the entire `\textwidth`?


title: Observation (not a question): the commands \guillemotleft and \guillemotright appear to be misspellings

text: The traditional French double quotation marks, « and », are called _guillemets_. They are used in the scripts of many modern languages, including some forms of Chinese (as 《 and 》 in restricted contexts). The standard LaTeX commands to produce them, however, are `\guillemotleft` and `\guillemotright`; substituting `e` for the `o` leads to a compiler error. It seems that a non-standard spelling of _guillemet_ influence the choice of the LaTeX command. My _Petit Robert_ (vintage 1991) defines _guillemot_ : "Oiseau palmipède voisin du pingouin, habitant les régions arctiques [Web-footed bird related to the penguin, inhabiting arctic regions]". Perhaps this is all a plot to plant Linux imagery in people's LaTeX code. I originally posted this comment here: http://wp.me/p1OF2a-cU .


title: Mac vs Ubuntu LaTeX error

text: I'm getting a very strange error. I have a LaTeX document that I compile with a Makefile (below), when I compile it on my Ubuntu machine everything is fine, but when I compile it on my mac the first page of my pdf displays an error, the second page is the title page and the rest compiled just fine. The error on the first page I get is:               Latex error: missing document see the latex manual or latex     companion for explanation.     You're in trouble here. Try typing 'return' to proceed.      if that doesn't work type X return to quit.1111111      Any ideas what is going on? My Makefile executes `latex`; `bibtex`; `latex`; `latex`; `dvips`; `ps2pdf`;


title: Shaded theorems (thmtools) spanning pages

text: When the `thmtools` package is used to create theorem environments with a shaded background, it does not allow separate theorems to span more than one page. This is a rather severe problem if the document contains many long theorems, one after the other. Here is a minimal example.               \documentclass{minimal}     \usepackage{amsthm}     \usepackage{thmtools}     \usepackage[english]{babel}     \usepackage{blindtext}          \declaretheoremstyle[         shaded={bgcolor=\color{rgb}{0.9,0.9,0.9}}  % comment this line in/out     ]{theorem}     \declaretheorem[style=theorem]{theorem}          \begin{document}          \begin{theorem}     \blindtext[5]     \end{theorem}          \begin{theorem}     \blindtext[5]     \end{theorem}          \end{document}      Here is what it looks like including and not including shading: ![Bad](http://i.stack.imgur.com/SnGBr.png)![Good](http://i.stack.imgur.com/gF6hr.png) How does one include shading, but allow the theorems to span between pages?


title: Change language of caption in lstlisting

text: When I define a caption in `lstlisting`, LaTeX writes, for example, "Listing 1.1: ..." but I want to change the "Listing" to another language. How can I do this?


title: How do you peer into the definition of a robust command?

text: I know that, whenever I want to see how some control sequence, say `\mycontrolsequence`, is defined, I can use               \show\mycontrolsequence      then compile my code and look up the .log file. However, robust commands seem impervious to `\show`. For instance, if I compile the following code,               \documentclass{article}          \newcommand\mycommand{foo}     \show\mycommand          \DeclareRobustCommand{\myrobustcommand}{bar}     \show\myrobustcommand          \begin{document}     hello     \end{document}      my log file contains > >     \mycommand=\long macro: >     ->foo. >     l.4 \show\mycommand >   >     \myrobustcommand=macro: >     ->\protect \myrobustcommand  . >     l.7 \show\myrobustcommand >   Note that, whereas the definition of `\mycommand` is exposed (`foo`), nothing transpires of `\myrobustcommand`'s definition. Of course, in practice, I could always identify in which file a given robust command is defined and look up its definition there. However, finding the file in question may not be obvious. Hence my question: **Is there an alternative way of peering into the definition of a robust command?**


title: Newline in table cell possible?

text: I am trying to add linebreaks in my table cell but found that Lyx doesnt allow me to. How can I do that?


title: Xelatex Calibri without serif math

text: I have to write a document in Calibri. Please find my minimal example thereafter. The issue is when I include some math, the design looks "ugly". **Is there a way to change the serif math font and number to some SANS-SERIF which looks close to Calibri?**                 \documentclass[11pt]{article}         \usepackage{fontspec}         \usepackage{xltxtra}         \usepackage{lipsum}         \setmainfont[Mapping=tex-text]{Calibri}         \begin{document}                \begin{table}     \begin{center}     \begin{tabular}{l c }     \hline                 & Model 1 \\     \hline     (Intercept) & $10.9983^{***}$ \\                 & $(0.0420)$      \\     a  & $0.0040^{**}$   \\                 & $(0.0016)$      \\     b         & $0.0053^{***}$  \\                 & $(0.0012)$      \\     c & $0.0052^{***}$  \\                 & $(0.0001)$      \\     \hline     R$^2$       & 0.9317          \\     Adj. R$^2$  & 0.9309          \\     Num. obs.   & 243             \\     \hline     \multicolumn{2}{l}{\scriptsize{\textsuperscript{***}$p<0.01$,        \textsuperscript{**}$p<0.05$,        \textsuperscript{*}$p<0.1$}}     \end{tabular}     \caption{Statistical models}     \label{table:coefficients}     \end{center}     \end{table}          Loremipsumdolorsitamet,consectetueradipiscingelit. Utpuruselit,ves?bu-     lum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam     arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula     augueeuneque.             \[      \bar{x} = \frac{x_1+x_2+\cdots +x_n}{n}      \]          \end{document}      ![enter image description here](http://i.stack.imgur.com/zll5o.png)


title: Structuring a Large Document

text: I just started to write my thesis and i want to organize my document in Latex using the `\input` command, so for example, the main file `main.tex` is like this:                   \begin{document}            \input{chapter1}         \end{document}      and `chapter1` have also nasted calls like this:               this chapter is devided into two main sections         \input{firstsection}         \input{secondsection}      besides, these sections have references to each others with `\ref` command and `Latex` could not resolve these references. I have read this here. Is there a solution to solve this problem?


title: Add a list of appendices to classicthesis

text: I'm using `classicthesis` for my dissertation. By default the TOC begins with "List of Figures", "List of Tables", and "Listings", as can be seen in the `Contents.tex` source file. As per university style requirements, I need to add a "List of Appendices" section. Modeled on the sections above it in `Contents.tex`, I've added the following code to produce a "List of Appendices".               %----------------------------------------------------------------------------------------     %   List of Appendices     %----------------------------------------------------------------------------------------          \refstepcounter{dummy}     \addcontentsline{toc}{chapter}{List of Appendices}     \pdfbookmark[1]{List of Appendices}{List of Appendices}          \chapter*{List of Appendicies}     Appendix \ref{app:1} Foo \pageref{app:1}\\     Appendix \ref{app:2} Bar \pageref{app:2}\\     Appendix \ref{app:3} Baz \pageref{app:3}\\          \vspace*{8ex}     \newpage      But this is inelegant. Is there a way to do this so appendices are automatically picked up and listed, the way figures, tables, and code listings are? Currently, I declare my appendices in `main.tex` as:               \include{Chapters/Chapter0A}     \include{Chapters/Chapter0B}     \include{Chapters/Chapter0C}     ...      so they are already listed individually in the TOC. According to the style requirements, the TOC should include a separate "List of Appendices" entry, and below, only display an entry for the beginning of the set of appendices, called "Appendices". In other words: > ## TOC > > Dedication   >  Acknowledgements   >  Foreword   >  Abstract   >  List of Figures   >  List of Tables   >  List of Appendices   >  Introduction   >  Chapter 1   >  ...   >  Chapter N   >  Conclusion   >  Appendices   >  Bibliography And the "List of Appendices" section should appear as: > ## List of Appendices > > Appendix A Foo X   >  Appendix B Bar Y   >  Appendix C Baz Z   >  ... analogously to "List of Figures" say.


title: Citation/bib style with biblatex

text: I start diving into `biblatex` to handle my sources. At the moment I am using the `style=alphabetic`. But for the `cite` command inside the text, I would like to have an output like `[Smith 2005]`. The bibliography should also show this key `[Smith 2005]`, like it happens with the alphabetic style. Is there already something appropriate style or do I need to do some tweaks? \--- EDIT 1 --- Additionally to the customizations already made for the `authoryear` style, I would like to added the following   1. For better reading, the entries in the bibliography should have a small indent after the first line (EDIT: Please ignore it, it is caused by the option `parskip=half` of the used document class `scrbook`)   2. Editors should also be listed with last name, first name. For authors this I do with `\DeclareNameAlias{sortname}{last-first}`   3. Repeating authors should not be replaced by a --- in the bibliography. My present configuration for biblatex is as follow:                   \RequirePackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @book{smith1,     author={John Smith and Mike Someone},     title={The book with a very very very very very long title},     year={2005},     location={New York},     publisher={Publisher},     }          @book{smith2,     author={John Smith and Mike Someone},     title={The book2},     year={2006},     location={New York},     publisher={Publisher},     }          @incollection{Grasso2010,         location = {New York},         Author = {Grasso, D. and Burkins, M. D.},         Booktitle = {Holistic Engineering Education -- Beyond Technology},         Editor = {Grasso, D. and Burkins, M. D.},         Pages = {1-10},         Publisher = {Springer},         Title = {Beyond Technology: The Holistic Advantage},         Year = {2010},     }     \end{filecontents*}     \documentclass[12pt]{article}          \usepackage[style=authoryear,%         backend=biber,%         language=english,%         backref=true,%         maxcitenames=1,%         maxbibnames=99,         doi=true         ]{biblatex}     \addbibresource{\jobname}     \DeclareNameAlias{sortname}{last-first}     \DeclareCiteCommand{\cite}[\mkbibbrackets]         {\usebibmacro{prenote}}         {\usebibmacro{citeindex}\usebibmacro{cite}}         {\multicitedelim}         {\usebibmacro{postnote}}     \setlength\bibitemsep{1em}     \renewcommand{\bibfont}{\small}          \begin{document}     \cite{smith1} \cite{smith2} \cite{Grasso2010}     \printbibliography     \end{document}      Thanks in advance for your support. Christian


title: Subfigure referencing, wrong order

text: I have problems with subfigure referencing. When I reference the main figure, the labeling in the reference is correct, but when I try to reference the subfigure, I get figure X+1, which is kind of weird:               \documentclass[12pt]{article}     \pagestyle{plain}     \usepackage[english]{babel}     \usepackage{graphicx, hyperref, caption, float}     \usepackage{afterpage}     \usepackage{subfigure}     \usepackage{array}          \begin{document}          \begin{figure}[!htp]          \centering          \caption{Impulse responses to policy shocks}\label{fig:impulses to policy shocks}          \vspace{.05in}          \parbox{\linewidth}{\footnotesize%         This figure displays.....}            \subfigure[Something $\rightarrow$ Something.]{\label{fig:some_output}               \includegraphics[width=.45\textwidth]{slope_output.eps}}            \subfigure[Something else $\rightarrow$ something.]{\label{fig:something_output}               \includegraphics[width=.45\textwidth]{lvl_output.eps}}\\     \end{figure}     \end{document}      Then when i reference `\hyperref[]{Figure \ref{fig:some_output}}` I get the wrong figure number compared to what the simple reference \hyperref[]{Figure\ref{fig:impulses to policy shocks}}.. I tried a previous solution given here, but that did mess it up even more:               \makeatletter     \let\X@old@caption\caption     \def\X@caption@minusone{\expandafter\advance\csname c@\@captype\endcsname-1 }     \def\X@caption@br[#1]#2{\X@old@caption[#1]{#2}\X@caption@minusone}     \def\X@caption@nobr#1{\X@old@caption{#1}\X@caption@minusone}     \def\caption{\@ifnextchar[\X@caption@br\X@caption@nobr}     \makeatother      Any help is highly appreciated.


title: Image does not crop

text: When I do the following:                 \includegraphics[width=1.0\textwidth]{image.jpg}      The space where the image should be, is correctly scaled to the size of the scaled image, but the image itself doesn't scale. So i still have a HUGE image, with the correct starting coordinate in the left bottom corner. Any ideas why the image doesn't scale, but the space where the image should be does? EDIT: not cropping, but scaling


title: Install MyriadPro on MacOS/Texlive 2013

text: I tried to install MyriadPro using FontPro (FontPro). Everytime I try to compile a latex document with pdflatex I get the following error:               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+597/600 --dpi 597 MyriadPro-Bold-tosf-t1--base     mktexpk: don't know how to create bitmap font for MyriadPro-Bold-tosf-t1--base.     mktexpk: perhaps MyriadPro-Bold-tosf-t1--base is missing from the map file.      I had no problems installing MinioPro the same way. Any ideas? I used the following commmands:               $ git clone https://github.com/sebschub/FontPro.git     $ cd FontPro     $ mkdir otf     $ cp /Applications/Adobe\ Reader.app/Contents/Resources/Resource/Font/*.otf otf     $ ./scripts/makeall MyriadPro        There were a lot of message of the following form: tlf-ly1,warning: kpathsea: configuration file texmf.cnf not found in these directories: /opt/local/etc/texmf. But those messages also appeard when I successfully installed MinionPro               $ sudo ./scripts/install /usr/local/texlive/texmf-local/     $ sudo updmap-sys --enable Map=MyriadPro.map      Resulting in the following output (same with MinionPro):               updmap: resetting $HOME value (was /Users/chris) to root's actual home (/var/root).     updmap is using the following updmap.cfg files (in precedence order):       /usr/local/texlive/2013/texmf-dist/web2c/updmap.cfg     updmap is using the following updmap.cfg file for writing changes:       /usr/local/texlive/2013/texmf-config/web2c/updmap.cfg     updmap: top config file /usr/local/texlive/2013/texmf-config/web2c/updmap.cfg has not been read. at /usr/texbin/updmap line 1334.      EDIT: I just found out that MinionPro is not installed properly. The compiled PDFs look "pixelated".


title: How to remove undesired lines in table

text: I want to remove the red marked line in the below picture, does anyone know how to do it? The Latex script I use is:               \begin{tabular}{|c|c||c|c|c|}\hline     \multicolumn{2}{|c||}{\backslashbox{Challenges~}{Input~~}}     & 2D & 3D & 2.5D \\\hline \hline     \multirow{4}{*}{Changes}     &viewpoint & 1 & 2 & 3\\\hline     &illumination & 1 & 2 & 3\\\hline     &scale & 1 & 2 & 3\\\hline     &deformation & 1 & 2 & 3\\\hline          \multirow{2}{*}{\specialcell{Content \\ Changes}}     &occlusion & 1 & 2 & 3\\\hline     &\specialcell{background \\ cluster} & 1 & 2 & 3\\\hline     \end{tabular}      ![enter image description here](http://i.stack.imgur.com/XmHAl.png)


title: alignment and numbering of math formulas

text: I have 3 formulas which should be aligned at the = sign and numbered (1) to (3). Seems a simple task but trying both \being{equation} with \begin{split} and \being{align} did not work out. I alwasy struggled with the numbering or wit the alignment. Never got it right. For example my simple equations good look like:               a = x  + y     (1)          b = z - k      (2)          c = j x (z-k)  (3)       = j x b


title: How to use icon fonts properly?

text: I have downloaded the icon font "Font Awesome" to use unicode icons to illustrate my documents. Using XeTeX, I was able to declare a new font family like this:               \newfontfamily\fontawesome[         Path=fonts/iconic/FontAwesome/     ]{FontAwesome.otf}      This works. Now, if I want to use an icon from the font, for example the floppy disk icon, I do the following:               \fontawesome{}\normalfont      I would however like to have a shorter way to use this icon. I would much prefer something like `... Some text \floppy more text...` to avoid to manually have to reset the font after using the icon. I came across `\DeclareUnicodeCharacter{f0c7}{\floppy}`, but it seems like this wouldn't work with XeTeX. Any ideas on how to "shortcut" this icon in a similar way?


title: Lyx edit source code otherwise, How to insert diagrams

text: Is it possible to edit source code in Lyx? Otherwise, how might I draw diagrams like venn diagrams or graphs


title: Using \cdots in Table - error: Missing $ inserted

text: Am getting countless error messages for 'Missing `$`' and Extra `}`, or 'forgotten `$`'. I am building a table and trying to fill some cells with dots (`\cdots`, `\vdots` etc). The first line in the table with errors is this one - I have defined 7 columns.               \begin{table}[h]     \begin{center}     \caption[Matrix of Demand projections]{Matrix of demandssss.}     \begin{large}     \begin{tabular}{|c|c||c c c c c|}      \hline     %First row - with errors below     & States \emph{G} & $\ g_{1}$ & \cdots & $\ g_{z}$ & \cdots & $\ g_{Z}$\\      The table constructs correctly, however I am getting loads of error messages. If anyone could help me understand why that'd be appreciated! Error messages are as follows:               Missing $ inserted     Extra }, or forgotten $.     Missing $ inserted     Missing } inserted      .. and so on... repeating itself as it tries to work it out.


title: How to align text corresponds to text within the above line?

text: My attempt was to use `tabular`:               \begin{tabular}{cccc}        Let & $M_1$ recognize $A_1$, where $M_1 = (Q_1, \Sigma, \delta_1, q_1, F_1)$, & \\        & $M_2$ recognize $A_2$, where $M_1 = (Q_2, \Sigma, \delta_2, q_2, F_2)$. &     \end{tabular}      However, there are several spaces between `Let` and `M_1`, how could I get rid of these spaces? Furthermore, is this a standard way to align text? If I want to be the most flexible, i.e. editing on the fly, which approach should I use?


title: Should spaces be placed after every special character input command in ConTeXT?

text: I am using several special character commands, such as those described at Which symbols need to be escaped in ConTeXt?. I noticed that some, such as `\textdollar` will not work if they are immediately followed by some other word, e.g.:               \textbraceleftThis is some text.\textbraceright      To fix this, I have added some spaces after the command:               \textbraceleft This is some text.\textbraceright        * Is it correct to always place spaces after these commands? Are there any cases where this will create problems, such as a line break when the two items should be placed together?   * Are the `\#` and `\&` treated differently?


title: About shorthand \frac

text: It is possible to write `\frac 2 4` or `\frac \pi 4` to get `2/4` and `\pi/4`, respectively. However, it is not possible to write `\frac \sqrt{2} 2` to get `\sqrt{2}/2`. Are there consistent rules on how to write shorthand `\frac`?


title: Continue interrupted tlmgr update

text: I used               tlmgr update --all      today, and it froze when running mktexlsr, so I aborted it. When I ran it again, it said no updates available. But clearly there remains something to do after updating files. So what commands other than mktexlsr should I invoke to keep TeXLive in order?


title: List of figures empty?

text: My list of figures is empty. I have in the preamble (I don't know if it's relevant):               \newfloat{figure}{thp}{lop}     \floatname{figure}{Figure}          \begin{document}          ...          \listoffigures{figure}{List of Figures}          ...          \begin{figure}         \begin{center}            \includegraphics[scale=0.25]{../north_coast.eps}            \caption{Map of the North Coast Region.\label{fig:North Coast Region}}         \end{center}     \end{figure}          \end{document}


title: \dot not available on XeLaTeX with package eulervm

text: When compiling this document:               \documentclass{scrartcl}          \usepackage[biolinum]{libertine}     \usepackage[euler-digits,small]{eulervm}          \begin{document}          \[     U=-\dot\Phi=-\frac d{dx}\int_A B\;dA     \]          \end{document}      I get the error:               ! Undefined control sequence.     l.10 U=-\dot                 \Phi=-\frac d{dx}\int_A B\;dA      Why is `\dot` undefined?


title: How to make an indexed word reference another indexed word in LyX?

text: The LyX-Wiki tells me that it is possible for an index to reference an other one. A possible output could be               Index          B     Bar, see Foo          F     Foo, 9      which is invoked by `Bar|see{Foo}`, so the wiki states. But this simply does not work for me. Just to make sure I didn't miss anything:   1. I hit INSERT then selected INDEX near the word _Foo_.   2. Then I typed _Foo_ into the small "area".   3. I did the same with _Bar_ but here I typed `Bar|see{Foo}` into that area. The result I get is               Index          F     Foo      _Bar_ is completely missing in the index. What do I miss?


title: Tombstone symbol in LaTeX

text: Unicode offers a thin rectangular symbol ▮ instead of the usual square to indicate the end of a proof (See http://en.wikipedia.org/wiki/End_of_proof). Is this by any chance available in LaTeX?


title: What is the right way to place a box at a specific location?

text: I have a box `\mybox` that contains a letterhead. The dimensions of the box are 7" by 1" (and depth 0pt). The box is going to be used only inside my letterhead macro:               \DeclareRobustCommand\letterhead{%             \cleardoublepage % letterhead only belongs at the top of a page             % something             \copy\mybox             % something     }      Thus, the letterhead can only appear at the top of the page. My requirements are that `\mybox` needs to be .75" from the left and right margin, .5" from the top margin and at least .5" from the text of the page on which the letterhead appears. Further, (since I cannot convince people to upgrade their TeX distributions) it needs to work with a fairly old version of teTeX. The teTeX requirement rules out `wallpaper` and `textpos`. The requirement that the text of the page be at least some distance would also rule those out in addition to `eso-pic`. Thus, my situation is different from this one. Right now, I'm forcing the margins to be 1" via `\RequirePackage[margin=1in]{geometry}`, but I'd like not to have to do that. I'd prefer that any margins could be set and the letterhead stay in exactly the same place and that the minimum of .5" between the letterhead and the text of the page be maintained. (Actually, a way to set that via a package option would be handy and it'd encourage me to learn how to use `xkeyval`. For a default, .5" seems pretty good, and it falls out nicely from my current solution.) Since the margin is currently forced to be 1", my solution is the following.               \newbox\mybox     \setbox\mybox\vbox to1in{             \vss             % TeX to generate the letterhead             \vskip.5in     }          \DeclareRobustCommand\letterhead{%             \cleardoublepage             \hb@xt@\z@{%                     \skip\z@\oddsidemargin                     \advance\skip\z@.25in                     \hskip-\skip\z@                     \copy\mybox                     \hss             }     }      (Using `\moveleft` also works nicely. I'm not sure which way is better.) I should be able to remove the `\vss` and `\vskip.5in` from `\mybox` and position the box appropriately. What is the correct way to do this?


title: Fontspec: Palatino with small caps and old-style figures

text: For various reasons, I’m using the `fontspec` package. However, I’d also like to use Palatino as the document’s main font, and I want to use it with small caps and old-style figures. So I’ve got four requirements:   1. `fontspec`,   2. Palatino,   3. Small caps,   4. Old-style figures (everywhere, not only selected via `\oldstylenums`). Any three out of these four features work fine together. But I can’t get all four working in the same document. In fact, using `\usepackage[osf]{mathpazo}`, I get nice small caps and lowercase figures. But as soon as I `\usepackage{fontspec}`, old-style figures no longer work, even if I don’t select a font. Now, I could be tempted to say `\usemainfont[Numbers=OldStyle]{Palatino}`, but this doesn’t work: figures remain as they are. Furthermore, small caps now cease to work (presumably because I don’t have the expensive, shiny version of Palatino that includes old-style figure glyphs – with `mathpazo` this only works because the package “cheats” and selects the typeface family `pplj` instead). How can I get this to work? Is there a way to explicitly select `pplj` for the main text (`\rmfamily`) even when using `fontspec` for other fonts? ## MWE:               \documentclass{article}          \usepackage[osf]{mathpazo}     \usepackage{fontspec}          %\setmainfont[Numbers=OldStyle]{Palatino}          \begin{document}     \textsc{This is a test} 0123     \end{document}


title: Removing page number from ToC

text: How to remove the page number from the table of contents page?


title: Changing the kpfonts \sum symbol

text: I like the kpfonts package. It's a nice font and some of the extra symbols it defines are sometimes useful. But I do not like the `\sum` symbol either in displaystyle or inline. It's too thin and too tall. I tried looking at how kpfonts defines `\sum` in the hope of just being able to `\renewcommand` but it does something weird with the maths operators, in order to have package options like `fullsumlimits`. How can I get the `\sum` symbol looking more like the cm sum, for example, without breaking kpfonts package options?


title: How can I use the full page width (\textwidth) while importing a table with \includegraphics?

text: I'm in a 2-column environment. I need to use the entire pagewidth (`\textwidth`) while importing a table with `\includegraphics`.               \begin{table}     \centering     \includegraphics[width=\textwidth]{./myfile.pdf}     \caption{Beautiful stuff here}     \label{tab:myfile}     \end{table}      (I have tried tabular* without success.)


title: Missing <sub> tags in tex4ht output

text: When processing a LaTeX source with tex4ht, I can't seem to reliably convert subscripts in text mode to `<sub>` tags in the HTML output. My only solution so far is to switch to math mode. But for some reason, if I define the same math code as a macro with `\newcommand` (to avoid typos when typing long math expressions), the `<sub>` tags are gone again! Example source:               \documentclass[10pt]{article}     \usepackage{subscript}     \newcommand{\tsub}{$a_b$}     \begin{document}     x\textsuperscript{n}     y\textsubscript{1}     $a_b$     \tsub{}     \end{document}      ... which I process using:               htlatex example.tex 'html, charset=utf-8' ' -cunihtf -utf8'      Is there an easy way to make tex4ht honor `\textsubscript` or `$_{}$` commands in `\newcommand` macros? Thanks for any suggestion, \--Mathieu


title: Pgfplot : change the distance between 2 adjacent boxes in box plot

text: Hi I want to change the distance between 2 adjacent boxes in boxplot. I am using following code. What should I change in code to get it similar to as desirable diagram               \begin{filecontents}{lmpqd.dat}     %index median box_top box_bottom whisker_top whisker_bottom       0.35 56 393.5 14 1374 2       0.36 35.5 158 6 2693 2       0.37 10 60.5 3 2014 2       0.38 10 36 3 2187 2       0.39 8.5 43.75 3 2131 2       0.40 6 19 2 2295 2       0.41 6 26 3 2322 2       0.42 6 26 2 2621 1       0.43 3 10 2 1669 2       0.44 4 14 2 1817 2       0.45 3 5 2 52 2          \end{filecontents}               \pgfplotsset{     box plot width/.initial=5em,     box plot/.style={     /pgfplots/.cd,     black,     only marks,     mark=-,     mark size=\pgfkeysvalueof{/pgfplots/box plot width},     /pgfplots/error bars/.cd,     y dir=plus,     y explicit,     },     box plot box/.style={     /pgfplots/error bars/draw error bar/.code 2 args={%         \draw  ##1 -- ++(\pgfkeysvalueof{/pgfplots/box plot width},0pt) |- ##2 -- ++(-\pgfkeysvalueof{/pgfplots/box plot width},0pt) |- ##1 -- cycle;     },     /pgfplots/table/.cd,     y index=2,     y error expr={\thisrowno{3}-\thisrowno{2}},     /pgfplots/box plot     },     box plot top whisker/.style={     /pgfplots/error bars/draw error bar/.code 2 args={%         \pgfkeysgetvalue{/pgfplots/error bars/error mark}%         {\pgfplotserrorbarsmark}%         \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%         {\pgfplotserrorbarsmarkopts}%         \path ##1 -- ##2;     },     /pgfplots/table/.cd,     y index=4,     y error expr={\thisrowno{2}-\thisrowno{4}},     /pgfplots/box plot     },     box plot bottom whisker/.style={     /pgfplots/error bars/draw error bar/.code 2 args={%         \pgfkeysgetvalue{/pgfplots/error bars/error mark}%         {\pgfplotserrorbarsmark}%         \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%         {\pgfplotserrorbarsmarkopts}%         \path ##1 -- ##2;     },     /pgfplots/table/.cd,     y index=5,     y error expr={\thisrowno{3}-\thisrowno{5}},     /pgfplots/box plot     },     box plot median/.style={     /pgfplots/box plot     }     }     \begin{document}     \begin{tikzpicture}     \begin{axis} [enlargelimits=false,xmin=0.33,xmax=0.47,xtick=data, box plot width=0.5em]       \addplot [box plot median] table {lmpqd.dat};       \addplot [box plot box] table {lmpqd.dat};       \addplot [box plot top whisker] table {lmpqd.dat};       \addplot [box plot bottom whisker] table {lmpqd.dat};     \end{axis}     \end{tikzpicture}     %     \captionof{figure}{Boxplot for total number of keys examined by MSB+LSB reconstruction algorithm for $2048-bit$ N, varying $\delta$.}     \label{lmpqd}     \end{document}      But I am getting following box plot ![Result of above code](http://i.stack.imgur.com/hNnBE.png) While I need it to be as below ![Desired ](http://i.stack.imgur.com/DAu4Z.png)


title: How to assign values with foreach?

text: I have trouble to assign values with `\foreach`. Can somebody help me? The following code is wrong. The purpose is to asing the values: `\lx1=1`, `\ly1=2`, `\lz1=3`, for example.               \foreach \x/\y in {\lx1/1,\ly1/2,\lz1/3}     {%     \def\x{\y}     \x{\y}     {


title: How to position a beamer box in a slide?

text: How can I position a `beamercolorbox` in arbitrary position in a slide? I want to be able to give coordinates, and that is where the box will be positioned.


title: What is the difference between italics and slanted text?

text: As I understand, LaTeX supports both via `\textit` and `\textsl` respectively, but what is the difference between the two?


title: Where are the .bbl files located?

text: I'm trying to follow advice at natbib authoryear error , I don't know where .bbl is. It's not in the working directory.


title: What should be the right width of an image for each document-classes?

text: I would like to print good images in A4 document (300 or 600 dpi). Using an external software,I have to merge differents big images to create a bigger one so I have to resize it with the same software (e.g. Gimp). I would like to know the best width (for example, for use them in a A4 report or a book class) so I can directly resize this big image to the proper size with the external software.


title: Maintainance of boites in CTAN

text: I have done some fixes and enhancements to the `boites` LaTeX package and I would like to have them integrated to the version in CTAN. In the last time I have contacted the current maintainer (on Apr 19 2012), he answered that he no longer maintains this package, but since it is free software, I can modify it. So I want to know how to update the package in CTAN with my changes. **More information about the package:** At the beginning of the boites.dtx file there is the following text:               %% Copyright (c) Markus Kohm <komascript at gmx.info>, 2009      %%               (boites.dtx only)     %% Copyright (c) Susan Dittmar <Susan.Dittmar@gmx.de>, 2009      %%               (english translation)     %% Copyright (c) Vincent Zoonekynd <zoonek@math.jussieu.fr>, 1998-1999      %%               (boites.sty)     %%     %% This work was derived from Susan Dittmar's translated version of     %% Vincent Zoonekynd's boites.sty.     %%     %% This file is distributed unter the same license like the orignal     %% boites.sty from March 1999: The GNU Public Licence.     %%     %% This file is not maintained!


title: Korean font inside style file

text: I'm starting in my thesis which, while written primarily in English, needs a few lines of Korean font for things like professor names. Following this I figured out how to typeset Korean characters which works well in the main body of the text. However, when I try to pass Korean in as the argument to one of the macros defined in the style file the generated output is gibberish. What do I have to do to be able to pass Korean in as an argument? Here are the commands I'm using. `\makesigpageB` is a macro defined in the style file and produces gibberish (ìİťëęĎ) for the 5th name. I also tried moving the `\inKorean` command inside the style file but that didn't help. I even tried hardcoding some Korean in the style file (after including the same packages) but still got the same gibberish. The later call to `\inKorean`, though, produces the correct output.               \usepackage[T1]{fontenc}     \usepackage{CJK}     \usepackage[english]{babel}     \usepackage{utepcsthesis} % thesis style file          \newenvironment{Korean}{%       \CJKfamily{mj}}{}     \newcommand{\inKorean}[1]{\begin{CJK}{UTF8}{}\begin{Korean}#1\end{Korean}\end{CJK}}          \begin{document}          \makesigpageB{Chair, Prof 1}{Prof 2}{Prof 3}{Prof 4}{\inKorean{교수님 5}}          \inKorean{본문}          \end{document}      In the sytle file ...               \newcommand{\makesigpageB}[5]{     \thispagestyle{empty}     \begin{center}     % title     {\large\bf\@title}\\[0.4in]     % author     {\large\@author}\\[0.4in]     % department     {\large\@deptnm}     \end{center}     \vfill     \hspace{3.5in}APPROVED:\\[0.1in]          \noindent     \hspace{3.5in}\underline{\hspace{2.9in}}          \noindent     \hspace{3.5in}#1\\[0.05in]          \noindent     \hspace{3.5in}\underline{\hspace{2.9in}}          \noindent     \hspace{3.5in}#2\\[0.05in]          \noindent     \hspace{3.5in}\underline{\hspace{2.9in}}          \noindent     \hspace{3.5in}#3\\[0.05in]          \noindent     \hspace{3.5in}\underline{\hspace{2.9in}}          \noindent     \hspace{3.5in}#4\\[0.05in]          \noindent     \hspace{3.5in}\underline{\hspace{2.9in}}          \noindent     \hspace{3.5in}#5 %     \noindent          \newpage}


title: Currivita - horizontal distance between bullet and content in cvlist

text: I am using `cvlist` to itemize my content as follows:               \begin{cvlist}{HEADING}     \item[1] blah     \item[2] blah blah     .     .     .     \end{cvlist}       However, the gap between the numbers (such as 1,2 etc) and the content (such blah) is very large. How can I change it?


title: Ubuntu 12.04 biblatex mla style

text: I've had a good search of internet and unable to find answer. I have Ubuntu 12.04 with all updates, and using LyX for work/study. I need to use `mla` style for some papers. There is no `biblatex-mla` style folder installed even though what I've found suggests that `mla` is part of the TeXLive install. I've downloaded the package and installed in `/usr/share/texmf/tex/latex/biblatex-mla`. In preample, I have:               \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[style=mla]{biblatex}       When I try to view pdf output get:               \RequireBibliographyStyle{\blx@bbxfile}          The bibliography style 'mla' could not be found.      I would appreciate any help please.


title: Space between floats and text after special declaration of font size for scrbook

text: Our designer suggested a font size of 10.5. We passed this as an option to the `srcbook` class and everything seems to work fine except the space between main text and floats. With `fontsize=10.5` much more space than usual is inserted. Is there a way to fix this?               \documentclass[fontsize=10.5pt]{scrbook}               %\documentclass[fontsize=10pt]{scrbook}               %\documentclass[fontsize=11pt]{scrbook}                    \usepackage{lipsum}            \usepackage{float}          \begin{document}                         \lipsum      \lipsum[3-8]            \begin{table}[H]     \centerline{%     \begin{tabular}{|c|c|c|c|c|c|}\hline       & Prefield & T/C & \multicolumn{3}{c|}{Sentence Field}\\ \hline       & & & & Verbal Field & \\ \hline\hline     (han siger) &   & & han ikke & har & lyst \\     (`he says') & & & (`he not') & (`has') & (`desire') \\ \hline     \end{tabular}     }     \end{table}     \lipsum[3-10]            \end{document}


title: Multicolumn within a newcommand error

text: I am new to writing packages and am coming across an error that I can't unravel, I would appreciate any help that you can provide. I am writing a few macros which are meant to be used within a tabular environment:               \newcommand{\topics}{\@ifstar{\topicsStar}{\topicsNoStar}}     \newcommand{\topicsNoStar}[1]{\multicolumn{2}{|p{2in}|}{test}}     \newcommand{\topicsStar}{&&}      When I call               \topicsNoStar{stuff}       the output is correct. When I call               \topics{stuff}       I get the error message: `!Misplaced \omit. \multispan ->\omit \@multispan` What is confusing me is the difference between the two calls - in my mind, they should be doing the same thing, but the output is not the same. Now, I do plan to include `@`'s in the commands above in the final version, but, to debug, I wanted to be able to call them outside the style file. Also, the argument to NoStar is not used, it will be placed into the multicolumn once this is working correctly.


title: Insert text into a fixed size box

text: Is there a way to create a box which has fixed width and height? I tried `\parbox` and some similar things, but sometimes the text overflows. If the text inserted would overflow: it should be resized to fit or it should be clipped (with a warning). Is any of these possible? We can assume, that the inserted text is one continous paragraph. Related: Package for game/playing cards (not only poker)


title: What is the interface between LaTeX and BibTeX?

text: Precisely what is the "protocol" between LaTeX and BibTeX? That is, if I run `latex foo`, `bibtex foo`, and `latex foo`, exactly how does information flow from LaTeX to BibTeX and back? * * * My current _guess_ is that the data flows are as follows:   1. LaTeX generates the file `foo.aux`.   2. BibTeX reads the file `foo.aux`. It only pays attention to lines of the form `\citation{...}`, `\bibstyle{...}`, and `\bibdata{...}`.   3. BibTeX generates the file `foo.bbl`.   4. When LaTeX notices that `foo.bbl` exists, the `\bibliography` command behaves like `\input{foo.bbl}`. Is this accurate or is there more to it? For example, is `\citation{...}` always precisely one line of text? Are there some commonly used document classes and packages that affect the protocol somehow? Obviously with `biblatex` things will be different, but is there anything less obvious to be aware of? * * * Background: I am interested in writing a script that I could use as a drop-in replacement for BibTeX (in the sense that from the LaTeX side, nothing would change, but the generation of the `foo.bbl` file would be different).


title: TikZ scripting upper triangular elements only

text: I would like to do something along the lines of the following snippet but I instead get many errors:               \foreach \x in {0,...,8} {          \foreach \y [evaluate=\y as \z using int(4-\y)] in {0,...,4} {           \ifthenelse{\less{x}{y} \OR \equal{x}{y}}                    { \node at (\x cm,\y cm) (g-\x-\y) {$a_{\x,\z}$}; }                    { }          }     }      meaning show a node only if it belongs to the upper triangular.


title: Expanding a variable within a protected label

text: I have some trouble with expanding variables within a protected label. I need a automatisated caption with a label all inside a command. Within the caption I want to have a two digit number (padzeroes). For this I have to use a temporary variable.               \newcommand{\Spezifikation}[5]{ %     \setcounter{tmpa}{#2}     %     \begin{minipage}{0.85\linewidth}     \captionof{spezifikation}{S\textunderscore#1             \hspace{-1.5ex}             \textunderscore\hspace{-0.85ex}\padzeroes[2]{\decimal{tmpa}}}     \protect\label{spec: #5}     \end{minipage}     }      That is the part in the .aux file:               test.aux:\@writefile{lspec}{\defcounter {refsection}{0}\relax }\@writefile{lspec}{\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore SYS \hspace  {-1.5ex} \textunderscore \hspace  {-0.85ex}\padzeroes [2]{\@decimal {1}}\relax }}{11}{spezifikation.1}}     test.aux:\newlabel{spec: SYS-Modularisierung}{{1}{11}{S\textunderscore SYS \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\decimal {tmpa}}\relax \relax }{spezifikation.1}{}}      And the .lspec file               test.lspec:\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore SYS \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\@decimal {1}}\relax }}{11}{spezifikation.1}      I think, the problem is the expanding of `tmpa` at `test.aux:\newlabel{...` At the other lines it was well expanded to the number behind. How can I fix it? * * * Addition 1: If I change               \padzeroes [2]{\decimal {tmpa}}      to               \padzeroes[2]{\decimalnum{#2}}      I got this error:               Missing \endcsname inserted      Normally it goes. But ot in this case (in a caption). I don't understand why. * * * Addition 2 Here comes a short executable:               \documentclass[,12pt,a4paper,twoside,onecolumn,notitlepage]{article}      \usepackage[onehalfspacing]{setspace}     \usepackage[a4paper,                 inner=40mm, outer=20mm,                 top=25mm, bottom=25mm,                 headheight=15mm, headsep=7mm                 ]{geometry}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{textcomp} % Load the TS1-encoding e.g. through textcomp      \usepackage{verbatim, environ}     \setlength{\parindent}{0mm}          \usepackage{newfloat,tocloft,caption,multicol,suffix,fmtcount,nameref}     \newcounter{tmpa}               \newcommand{\Spezifikation}[5]{ %     \setcounter{tmpa}{#2}     %     \begin{center}     \begin{minipage}{0.85\linewidth}     \vspace*{0.7ex}     \captionof{spezifikation}{S\textunderscore#1             \hspace{-1.5ex}             \textunderscore\hspace{-0.85ex}\padzeroes[2]{\decimal{tmpa}}}     \protect\label{spec: #5}     \textit{Inhalt:} #3\\[0.5ex]     \textit{Referenz:} #4\\[0.5ex]     \textit{EOS}     \vspace{0.7ex}     \end{minipage}     \end{center}     }     %     % float-Object einer Spezifikation     %     %    Listenendung: lspec     %     \DeclareFloatingEnvironment[fileext   = lspec, %                                 placement = h] %                                 {spezifikation}     \DeclareCaptionFormat{DCFs}{\raggedright \textit{Spec.-Nr.:} #3}     \captionsetup[spezifikation]{format = DCFs,                                  font = bf,                                  listformat = empty,                                  position = above}            \begin{document}     \Spezifikation{hallo}{1}{Text}{Text}{Label1}      \Spezifikation{hallo}{2}{Text}{Text}{Label2}      \Spezifikation{hallo}{3}{Text}{Text}{Label3}      \Spezifikation{hallo}{4}{Text}{Text}{Label4}      \nameref{spec: Label1}      \end{document}      You will see I reference to the first spec but it gives me the last. I think this is because of tmpa. This shows the aux:               \@writefile{lspec}{\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore hallo \hspace  {-1.5ex} \textunderscore \hspace  {-0.85ex}\padzeroes [2]{\@decimal {1}}\relax }}{1}}     \newlabel{spec: Label1}{{1}{1}{S\textunderscore hallo \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\decimal {tmpa}}\relax \relax }{}{}}     \@writefile{lspec}{\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore hallo \hspace  {-1.5ex} \textunderscore \hspace  {-0.85ex}\padzeroes [2]{\@decimal {2}}\relax }}{1}}     \newlabel{spec: Label2}{{2}{1}{S\textunderscore hallo \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\decimal {tmpa}}\relax \relax }{}{}}     \@writefile{lspec}{\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore hallo \hspace  {-1.5ex} \textunderscore \hspace  {-0.85ex}\padzeroes [2]{\@decimal {3}}\relax }}{1}}     \newlabel{spec: Label3}{{3}{1}{S\textunderscore hallo \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\decimal {tmpa}}\relax \relax }{}{}}     \@writefile{lspec}{\contentsline {spezifikation}{\numberline {}{\ignorespaces S\textunderscore hallo \hspace  {-1.5ex} \textunderscore \hspace  {-0.85ex}\padzeroes [2]{\@decimal {4}}\relax }}{1}}     \newlabel{spec: Label4}{{4}{1}{S\textunderscore hallo \hspace {-1.5ex} \textunderscore \hspace {-0.85ex}\padzeroes [2]{\decimal {tmpa}}\relax \relax }{}{}}      The reference are right but it shows me the caption-text wrong. Because of the not expanding `tmpa` it gives me the last entry of `tmpa`.


title: Exclude \fullcite{...} citation from bibliography

text: Is there a way to excluded a citation specified in the text by `\fullcite{Doe2013}` from the bibliography? (I'm using biblatex+biber.)


title: fancyhdr - Only show sections, not subsections

text: Is there a way for the header to only print the title of the parent section? So in the example below, the subsection{LOL} page will have "1.1 LOL" written in the header. I just want it to say "Introduction" which is the parent section.               \documentclass[a4paper,12pt]{scrartcl}          \usepackage{fancyhdr}          \begin{document}     \pagestyle{fancy}     \renewcommand{\sectionmark}[1]{\markright{#1}}          \fancyhf{}          \rhead{\fancyplain{}{MyName}} % predefined ()     \lhead{\fancyplain{}{\rightmark }} % 1. sectionname     \cfoot{\fancyplain{}{\thepage}}          \section{Introduction}     \newpage     \subsection{LOL}          \end{document}


title: NIH class tweaks

text: I need to change a few settings from the NIH document-class to make my document more similar to NIH's most recent sample (ugly, I know). Having been told to leave the .cls file well alone, I'm going to incorporate the changes into my document. Here's what I need to do:   1. Put the header and footer outside the 0.5-inch margin, as in the sample. This I accomplished by adding the following line:               \geometry{ignoreheadfoot}        2. That command unfortunately puts the header and footer right up against the paper's edges, possibly outside the printable area. How do I add a small margin in case I have to bring the two within printable area without affecting the body's 0.5-inch margin.   3. Unlike the script-size central header, the right header (PI name) currently has a normal size, which bleeds off the paper when `ignoreheadfoot` is set. If I copy the entire `\rhead` chunk from the .cls file to the document in order to modify it, I get an error. Why is that? (This is not the case with the `\chead` chunk, which copied and pasted and edited without incident.)   4. What does the `\fancyplain` and `\ifthenelse` in the .cls file do anyway (example below)? Question 3 would be trivial if I could just set my own `\rhead` without regard to what the class file is trying to do.               \rhead{\fancyplain{}{%     \ifthenelse{\boolean{nih@blank}}%         {\ \ \ {\nih@PIname}\ \ \ \ \ }% fi         {%             \underline{\ \ \ {\nih@PIname}\ \ \ \ \ }%         }% esle      }      }      And here's a minimal representation of my document. Many thanks.               \documentclass[11pt]{nih}     \usepackage{lipsum}          \geometry{ignoreheadfoot}     \piname{Holmes, Sherlock}          \begin{document}     \section*{Specific Aims}     \lipsum     \end{document}


title: Typesetting the square of a mathematical operator

text: Assume I want to typeset the square of some mathematical operator A. Using `\operatorname` (`amsmath` package), there are basically two ways to do that:   1. `\(\operatorname{A^{2}}\)` (i.e., the exponent is considered part of the operator name)   2. `\(\operatorname{A}^{2}\)` (i.e., the exponent is not considered part of the operator name) According to my tests, the above two formulae are not equivalent, though. In fact, the first formula has a smaller height than the second one. Minimal example:               \documentclass{article}          \usepackage{amsmath}          \newlength{\len}          \begin{document}          \begin{enumerate}     \item       \settoheight{\len}{\(\operatorname{A^{2}}\)}       \(\operatorname{A^{2}}\): height = \the\len     \item       \settoheight{\len}{\(\operatorname{A}^{2}\)}       \(\operatorname{A}^{2}\): height = \the\len     \end{enumerate}          \end{document}      Can anybody explain what is at the bottom of my observation?


title: How to properly install two parallel version of the same package in TeX Live?

text: How does one properly install two (parallel) versions of the SAME LaTeX package inside TeX Live ? Take for example, `biblatex` 2.8 and 2.9. I currently have one installed inside TL 2013 and another in TL 2014, and can go back and forth to compared produced files, etc. ... but that is not optimal, and I now need both inside TL 2014!


title: How to process a list and ignore spaces?

text: > **This question is part of a new package:**   >  `metrix`. Typeset metric/prosodic symbols standalone and above syllables. I’m wrinting a new package and I need to process a list (using `etoolbox` at the moment but that can change …). Everything works but I want the list to do two things that don’t work:   1. Ignore spaces, because `xstring` doesn’t get the right strings otherwise.   2. Process an empty list element. It is ignored at the moment.               \documentclass{article}          \usepackage{etoolbox}     \usepackage{xstring}          \setlength{\fboxsep}{0pt}     \DeclareListParser{\dolist}{-}     \newcommand{\mylist}[1]{%         \renewcommand{\do}[1]{%             \IfStrEqCase{##1}{%                 {}{0}%                 {a}{1}%                 {b}{2}%                 {c}{3}%             }[?]%         }%         \dolist{#1}%     }          \begin{document}         1. \mylist{a-b-c--a}              2. \mylist{ a- b- c- - a}              3. \mylist{ a - b  - c  -  - a }     \end{document}      The output is >   1. 1231 >   2. 1231 >   3. ???? > but it should be the following in all three cases > 12301 * * * ## What I really wan’t to know ;-) I’m implementing a package to typeset the metrics of (latin) verses, and I’d like to have a macro like               \metrics{_    u  u  _   }             {quid co-me-dent}      that renders as ![quid comedent](http://i.stack.imgur.com/IMBse.png) What I’ve got so far is a macro that works with this syntax               \metrics{_-\ -u-u-_}             {quid-\ -co-me-dent}      Obviously there are two differences the space between two words must be separated with hyphen as if it is a syllable and it must be escaped with `\`. It would be great if the first list (the symbols) can be a space separated list and the second on a combination of hyphen and space separated. You may download my full code from my web site: http://tweh.de/texsx/metrics.tex


title: How to change font size of \ref

text: How can I change the fontsize of a reference mark? My reference is something like:               this is a text \ref{figure1}      When compiled I get > this is a text 1 The "1" is in normal font size. How can I change the look of "1" to a smaller font size?


title: Title sub-sections for a \documentclass{article}

text: > **Possible Duplicate:**   >  Adding more items on tex article title section   >  Subtitle with the \maketitle page? How can I specify a specify a "sub-title" in my title (\maketitle) page? By sub-title I mean something like a hierarchical child of a title, think "relationship between \section and \subsection", obviously smaller in font size but still looking as part of the title (e.g. "Bananas in the Savanna" "Cropping crap changes the genome of the biome"). Crap = natural fertiliser.


title: Adding more items on tex article title section

text: This is what I have at the head of my tex document (article):               \title{Some Article}     \author{John Doe}          \date{\today}          \documentclass[pdftex,12pt,a4paper]{article}     \usepackage{setspace}     \usepackage[textwidth=16cm,textheight=24cm]{geometry}     \begin{document}     \maketitle     . . .      I want to add a subtext below the title. As shown in the practical example given here I want to have the author's name on the left side, and supervisor's name on the right side. How can I do it? I tried the example from the above link, but, while compiling, it shows the error: `document begin is not specified`.


title: How can I compile a beamer presentation with pauses in same page?

text: I want to compile my presentation, but as I have the pauses codes, \begin{itemize} \item <1- | alert@1> \item <2- | alert@2> \end{itemize} I wanted to do it in the same page. I was looking for a way to compile it and I found this solution: \documentclass[handout]{beamer} But after doing it, I lost all my pause in the presentation. So, there is any way to compile the presentation page in one page and still have a pause mode? Thank you.


title: Possible bug in minted package

text: (just now while typing the topic title I found possible related but my post is too long to discard it now :-) ) (the `minipage`s is only to show side by side. I'll not use it) I'm using `minted` package to type code blocks. The basic environment is `minted` which produces the code block with nice vertical spaces above/below the code (see example below: left side). We can change the style of the code block making use of `\newminted`. But the problem is that if we use a background color for the block those vertical spaces are affected (see example below: right side). ![enter image description here](http://i.stack.imgur.com/in1no.png) Reading the `minted` documentation (section 8.4) we find the code (commented 2nd line in original form)               \newenvironment{minted@colorbg}[1]{     %\setlength{\fboxsep}{-\fboxrule}     \def\minted@bgcol{#1}     \noindent     \begin{lrbox}{\minted@bgbox}     \begin{minipage}{\linewidth-2\fboxsep}}      {\end{minipage}     \end{lrbox}%     \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}      So I noticed that there is no vertical space around the box and then I edited that code and inserted `\vspace{\abovedisplayskip}` and `\vspace{\belowdisplayskip}` before and after `lrbox`, as shown below.               % from texdoc minted     \makeatletter     \renewenvironment{minted@colorbg}[1]{     %\setlength{\fboxsep}{-\fboxrule}     \def\minted@bgcol{#1}     \vspace{\abovedisplayskip} %%             my code     \noindent%     \begin{lrbox}{\minted@bgbox}     \begin{minipage}{\linewidth-2\fboxsep}}      {\end{minipage}     \end{lrbox}%     \vspace{\belowdisplayskip} %%             my code     \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}     \makeatother      The result was almost satisfactory since the space after the code is not the same. ![enter image description here](http://i.stack.imgur.com/bqETy.png) **Question 1:** is this the better way to correct the problem? **Question 2:** What is the correct space to be inserted in this case? **Question 3:** Could it be a bug in the package code? ## MWE               \documentclass{report}     \usepackage{lipsum}     \usepackage{minted}     \usepackage[margin=0cm,paperheight=13cm,paperwidth=21cm]{geometry}          \usepackage{tikz,eso-pic}       \usetikzlibrary{shapes.misc}       \AtBeginDocument{%         \AddToShipoutPictureFG{%           \begin{tikzpicture}[overlay,remember picture]             \draw[red!30!white]               (current page.south west) grid[step=5mm]               (current page.north east);             \draw[red!50!white]               (current page.south west) grid[step=10mm]               (current page.north east);           \end{tikzpicture}         }%       }               \definecolor{bg}{rgb}{0.95,0.95,0.95}     \newminted{tex}{%         bgcolor=bg,%     %    gobble=0,%     %    linenos=true,%     %    firstline=1,%     %    firstnumber=1,%     %    fontfamily=courier,%     %    fontsize=\footnotesize,%     %    numberblanklines=false,%     %    numbersep=3mm,%     %    xleftmargin=6mm,%     %    xrightmargin=5mm%     }          % from texdoc minted     \makeatletter     \renewenvironment{minted@colorbg}[1]{     %\setlength{\fboxsep}{-\fboxrule}     \def\minted@bgcol{#1}     \vspace{\abovedisplayskip}     \noindent%     \begin{lrbox}{\minted@bgbox}     \begin{minipage}{\linewidth-2\fboxsep}}      {\end{minipage}     \end{lrbox}%     \vspace{\belowdisplayskip}%     \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}     \makeatother          \begin{document}\pagestyle{empty}     \noindent     \begin{minipage}[t]{10cm}     \lipsum[2]%     \begin{minted}{tex}       \begin{equation}        \frac{3}{2}=\frac{a}{b}       \end{equation}     \end{minted}     \lipsum[2]     \end{minipage}%     \hfill%     \begin{minipage}[t]{10cm}     \lipsum[2]%     \begin{texcode}       \begin{equation}        \frac{3}{2}=\frac{a}{b}       \end{equation}     \end{texcode}     \lipsum[2]     \end{minipage}          \end{document}


title: Using GNUPlot inside Latex (TexStudio) for IEEE Tran

text: I am trying to insert gnuplot inside my IEEE Tran paper (Platform is Windows). I am unable to do it correctly. Here is the code. The below give code is not working. No output is obtained. I am writing all the packages just in case they are required. **Code 1**               \documentclass[conference]{IEEEtran}          \ifCLASSINFOpdf          \else     \fi     \usepackage[usenames,dvipsnames]{color}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usetikzlibrary{positioning,calc}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.multipart}     \usepackage[caption=false]{subfig}     \usepackage{tabularx,tikz}     \usepackage{ifthen}          \usepackage[shell]{gnuplottex}     \hyphenation{op-tical net-works semi-conduc-tor}               \begin{document}          \title{Bare Demo of IEEEtran.cls for Conferences}          \maketitle          \IEEEpeerreviewmaketitle          \section{Introduction}     I wish you the best of success.          \begin{gnuplot}[terminal=pdf,terminaloptions={font ",10" linewidth 3}]     plot sin(x), cos(x)     \end{gnuplot}     \end{document}      I also used the below given code but the margins are way too wide for a conference. Please suggest solutions for it. I would be happy to get some feedback on how to use epslatex inside the latex. Kindly, advice me for IEEE Tran. **Code 2**               gnuplot> set terminal latex     Terminal type set to 'latex'     Options are '(document specific font) norotate'     gnuplot> set output 'plot.tex'     gnuplot> plot x**2     gnuplot> unset output      Below given I wrote in a latex file :               \documentclass[conference]{IEEEtran}     \ifCLASSINFOpdf          \else     \fi     \usepackage[usenames,dvipsnames]{color}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usetikzlibrary{positioning,calc}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.multipart}     \usepackage[caption=false]{subfig}     \usepackage{tabularx,tikz}     \usepackage{ifthen}          \usepackage[shell]{gnuplottex}     \hyphenation{op-tical net-works semi-conduc-tor}               \begin{document}          \title{Bare Demo of IEEEtran.cls for Conferences}          \maketitle          \IEEEpeerreviewmaketitle          \section{Introduction}     I wish you the best of success.     \input{plot.tex}     \end{document}


title: exsheets reorder questions

text: I'm using the excellent exsheets package, and I'd like to have different orders of questions in the different variants of my test. That is, I'd like `\variant{1}` to print one order of questions, `\variant{2}` to print another, etc. So given a document like:               \documentclass[12pt]{article}     \usepackage{exsheets}          \SetVariations{2}     \variant{1}          \begin{document}          \begin{question}     foo     \end{question}          \begin{question}     bar     \end{question}          \begin{question}     baz     \end{question}          \end{document}      For `\variant{1}` I'd like it to render something like:               Exercise 1.     foo     Exercise 2.     bar     Exercise 3.     baz      And for `\variant{2}` I'd like it to render in some other order, say:               Exercise 1.     baz     Exercise 2.     bar     Exercise 3.     foo      I've managed to achieve something like this by defining commands like `\varyreversethree` which work like the following:               \documentclass[12pt]{article}     \usepackage{exsheets}          \SetVariations{2}     \variant{2}          \newcommand{\varyreversethree}[3]{\vary{#1#2#3}{#3#2#1}}          \begin{document}          \varyreversethree{     \begin{question}     foo     \end{question}     }{     \begin{question}     bar     \end{question}     }{     \begin{question}     baz     \end{question}     }          \end{document}      Some things I don't like about this solution are that I have to define a new version of it for each possible number of things that might be reversed, and I can't leave any blank lines between the arguments (e.g. between questions) or later arguments are lost. Is there a better way to do this in exsheets?


title: How do I include a separate custom cover page onto my LaTeX document?

text: I've created a nice looking cover page in LaTeX as a pdf on its own. How do I add this onto an already existing LaTeX document instead of the default title page?


title: Editing the package

text: I didn't find anything about this issue, but if I missed something, please point me to it. The documentation on the ctan.org site is usually about how to use the packages in a LaTeX document, but what if I want to edit the package itself? Is there documentation available? And on a related note: is it advisable/OK to edit the package or rather try _first_ tweaking the document and only _later_ edit the package? Editing the package certainly would affect all documents that use it in the future, so I suppose that it would be better to try changing the document options first, rather than go straight to edit the package.


title: Text wrapping in checklist items

text: I am having some difficulty with text wrapping for items in a checklist I'm writing. Here is an image that illustrates the difficulty (see the second last checklist item): ![checklist1](http://i.imgur.com/mNa9Kt4.png) Would you have any suggestions for how to address this problem? It may be that the thing to look at first is the creation of the new command checklistAStart. Example code follows:               \documentclass[american]{article}          % set page size and page margin         \usepackage[a5paper, margin=1.5 mm]{geometry}     % tables         % set table width             \usepackage{tabularx}         % tabularx alignment             \newcolumntype{R}{>{\raggedleft\arraybackslash}X}             \newcolumntype{C}{>{\centering\arraybackslash}X}         % multi-spanned columns and rows in tables             \usepackage{multirow}     % date         \usepackage{babel}         \usepackage[iso, inputamerican]{isodate}     % lists         % description itemized list format             \usepackage{enumitem}     % border around pages         \usepackage{pgf}         \usepackage{pgfpages}         \pgfpagesdeclarelayout{boxed}{              \edef\pgfpageoptionborder{0pt}         }{             \pgfpagesphysicalpageoptions{%                 logical pages=1,%             }             \pgfpageslogicalpageoptions{1}{                 border code=\pgfsetlinewidth{2pt}\pgfstroke,%                 border shrink=\pgfpageoptionborder,%                 resized width=.98\pgfphysicalwidth,%                 resized height=.98\pgfphysicalheight,%                 center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%             }%         }         \pgfpagesuselayout{boxed}          \begin{document}          \isodate          % tab         \newcommand{\tab}{\hspace*{2em}}          % commands for description itemised lists         % commands for dimensions in description itemised lists             % left position of item                 \newcommand{\leftMarginDistance}{8.5 cm}             % #?                 \newcommand{\itemIndentDistance}{2 cm}             % vertical separation                 \newcommand{\itemSeparationDistance}{-4 pt}             % leftmost position of item denoter                 \newcommand{\labelIndentDistance}{0.2 cm}         % commands for starting and ending description itemised lists             \newcommand{                     \checklistAStart                 }                 {                     \begin{description}[                         style=multiline,                         itemsep=\itemSeparationDistance,                         leftmargin=\leftMarginDistance,                         itemindent=\itemIndentDistance,                         labelindent=\labelIndentDistance,                         font=\normalfont]                 }             \newcommand{                     \checklistAEnd                 }                 {                     \end{description}                 }         % commands for description itemised list items             \newcommand{\checklistAitem}[2]{\item[#1 \dotfill]#2}             \newcommand{\checklistAitemEmph}[2]{\item[\emph{#1}\dotfill]\emph{#2}}             \newcommand{\checklistAtitle}[1]{\item[#1]}             \newcommand{\checklistAsubitem}[2]{\item[\hspace{\labelIndentDistance}#1 \dotfill]#2}          % commands for titles         % command for main titles             \newcommand{\titleA}[1]{\noindent\large\textbf{#1}\normalsize\\}         % command for subtitles             \newcommand{\titleB}[1]{\noindent\textbf{#1}\normalsize}          % commands for headings         % command for main headings             \newcommand{\headingA}{                 \begin{center}                     \begin{tabularx}{145 mm}{|lR|}                         \hline                         &\\                         NORMAL AND EMERGENCY PROCEDURES CHECKLIST & MODEL \today-1\\                         FOR CESSNA 172S INCLUDING G1000 AVIONICS&\\                         &\\                         \hline                     \end{tabularx}                 \end{center}}          \headingA          % left position of item         \renewcommand{\leftMarginDistance}{6.5 cm}          \titleA{PRE-FLIGHT INSPECTION: INTERNAL}          \titleB{COCKPIT}          \checklistAStart         \checklistAitem{aircraft position}{check obstructions}         \checklistAitem{parking break}{set}         \checklistAitem{control wheel lock}{remove and stow}         \checklistAitem{ignition switch}{off, key removed}         \checklistAitem{avionics switch (BUS 1 and BUS 2)}{off}         \checklistAitem{static pressure alternate source value}{off}         \checklistAitem{fuel selector}{both}         \checklistAitem{fuel shutoff valve}{on (push fully in)}         \checklistAitem{elevator trim}{check, set neutral (check full movement up and down)}         \checklistAitem{master switch}{on}     \checklistAEnd          \end{document}


title: How to set up TeX software to begin making existing Greek and Hebrew texts into custom interlinear pdfs?

text: **Starting Point** I have a W32TeX package with latex, pdftex, xetex installed on a win7 box and am interested in getting started creating interlinear Greek-Hebrew (2 line, no English) texts of Biblical passages (sourced from Hebrew OT, Septuagint, Greek NT, and Delitzsch's Hebrew NT translation in public domain). I have bookmarked a good question on doing an interlinear text and have perused and bookmarked some of the getting-started information. For example, tex.stackexchange.com/questions/12668/where-do-i-start-latex-programming appears to cover some of the necessary faq pre-req.s for my question. **What I need to know**   * What software package(s) is best suited for the purpose of arranging both Greek-to-Hebrew and Hebrew-to-Greek interlinear texts? (Hope this is not a purely subjective question). _An answer might be that XeTeX will work fine, or that "SomeOther"TeX is especially suited to RTL, LTR alterations within a line._   * Additionally, what reading is essential to learn skills needed for preparing multi-line/language texts from existing written sources? _An answer would include some direction toward specific documentation available, or include a hyperlink to a multi-line tutorial that features working examples of methods specific to multi-line text._   * Lastly, any tips on finding source texts from the public domain which may be easy for the beginner to set into multi-line texts? [To be honest, I am also trolling just for the source text files in my question on the hermeneutics SE Site] **EDIT: the texts tips are in my comment below** _The source text basis may help to inform the rest of this question._ **Purpose** I use both Hebrew and Greek texts for regular reading, and do not like to read on the computer, or print poor copies. There are some good reading tools that just treat Hebrew or Greek with English, but I want to make publisher quality prints that pair 1) OT Hebrew with LXX, and 2) NT Greek with Delitzsch's Hebrew Translation. (If someone has a files set up for this and is willing to share that would be super awesome).


title: "Show Console" keyboard shortcut in TeXShop

text: I am switching over from TeXworks to TeXShop on the Mac and I am finding myself missing the good ol' `cmd`+`\` to open the Console. While I can use `cmd`+``` to cycle around windows to get to the Console, this is only feasible if I only have one document open -- if I have more than one document then I can't really use this to switch between the consoles since I would have multiple open, whereas in TeXworks I could just find the `.tex` file window and hit `cmd`+`\`. However, no keyboard shortcut exists in TeXShop to open the Console. I tried #4 from this guide for keyboard shortcut bindings on TeXShop, and it works for, for example, Bold and Italic but it does not work for Show Console. Is there a way of doing this or am I just stuck cycling around using `cmd`+```?


title: Scaling numbers taken from a different font?

text: I wonder if i can re-scale numbers from different font. For example i took times numbers using `txr`. Can i re-scale these numbers.               \documentclass[11pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \DeclareSymbolFont{txnumbers}{T1}{txr}{m}{n}     \SetSymbolFont{txnumbers}{bold}{T1}{txr}{b}{n}     \DeclareMathSymbol{0}\mathalpha{txnumbers}{"30}     \DeclareMathSymbol{1}\mathalpha{txnumbers}{"31}     \DeclareMathSymbol{2}\mathalpha{txnumbers}{"32}     \DeclareMathSymbol{3}\mathalpha{txnumbers}{"33}     \DeclareMathSymbol{4}\mathalpha{txnumbers}{"34}     \DeclareMathSymbol{5}\mathalpha{txnumbers}{"35}     \DeclareMathSymbol{6}\mathalpha{txnumbers}{"36}     \DeclareMathSymbol{7}\mathalpha{txnumbers}{"37}     \DeclareMathSymbol{8}\mathalpha{txnumbers}{"38}     \DeclareMathSymbol{9}\mathalpha{txnumbers}{"39}     \begin{document}     I want to scale this numbers: $1234567890$     \end{document}


title: TiKz dash dash plus plus

text: Unfortunately due to the way search engines work, this information isn't that easy to find. Sometimes examples draw using `--`, sometimes `-- +`, sometimes `-- ++`. I don't get the meaning! For example, for this command:               \draw[fill=gray!50] (1,1) -- + (0:.5) arc (0:60:1) -- cycle;      What is the `-- +` there? What does it mean if I change that to `--` ?


title: Wrong and ugly output of an arrow

text: I have a weird output regarding `xrightarrow{}`. Why is that happening? How can I fix it?               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \setlength{\parindent}{0cm}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \everymath{\displaystyle}          \allowdisplaybreaks          \setlength{\mathindent}{0cm}          \newcommand{\CCMG}[1]     {\begin{gather*}#1\end{gather*}}          \newcommand{\CCMAD}[1]     {\begin{aligned}#1\end{aligned}}          \newcommand{\CCMA}[1]     {\begin{align*}#1\end{align*}}               \begin{document}     \raggedcolumns          \CCMG     {     \CCMAD     {     &g'(\xi_{n})=\frac{g(x_{n})-g(\rho)}{x_{n}-\rho}\Rightarrow\\     &\Rightarrow g(x_{n})=g(\rho)+g'(\xi_{n})\epsilon_{n}\xrightarrow{g(\rho)=\rho,g(x_{n})=x_{n+1}}     }     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/ZeVc9.png)


title: conditionally emit one table or another

text: I would like to specify a table and if it has any multiline cells then it should be output as a single pair of columns and otherwise as two pairs of columns. For example, if it looks like the First Table in the code below then it should be output as is. If it looks like the Second Table in the code below then it should be output as the Third Table. Firstly, how can I accomplish this? I tried to put the code in an `\sbox` but kept getting errors; however, even if I do that I don't know what the next step would be. **ADDED** Note that its ok to specify the data in the table twice in the latex code since I am generating this from a program. Secondly, the code below gives rise to a ton of messages such as `(\end occurred when \ifhmode on line 35 was incomplete)` although it still runs. What do these messages mean? What do I do about them?               \documentclass{article}     \usepackage[top=1in,bottom=1in,left=0.5in,textwidth=7.5in]{geometry}     \usepackage{lipsum}     \usepackage{multicol}     \usepackage{tabu}     \usepackage{xcolor}     \begin{document}          First table.          \setlength{\columnseprule}{.4pt}      \renewcommand\columnseprulecolor{\color{blue}}     \begin{multicols}{2}     \tabulinesep=4pt     \noindent     \begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}      \everyrow{\tabucline[blue]-}     Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      \end{tabu}      \tabulinesep=4pt     \noindent     \begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}      \everyrow{\tabucline[blue]-}     Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & more / words \\      Some words & and some more \\      \end{tabu}      \end{multicols}           Second table.          \setlength{\columnseprule}{.4pt}      \renewcommand\columnseprulecolor{\color{blue}}     \begin{multicols}{2}     \tabulinesep=4pt     \noindent     \begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}      \everyrow{\tabucline[blue]-}     Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      \end{tabu}      \tabulinesep=4pt     \noindent     \begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}      \everyrow{\tabucline[blue]-}     Some words & and some more \\      Some words &  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu- lum ut, placerat ac, adipiscing vitae, felis. \\     Some words & and some more \\      Some words & more / words \\      Some words & and some more \\      \end{tabu}      \end{multicols}           Third table.          \begin{center}     \tabulinesep=4pt     \noindent     \begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}      \everyrow{\tabucline[blue]-}     Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words & and some more \\      Some words &  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu- lum ut, placerat ac, adipiscing vitae, felis. \\     Some words & and some more \\      Some words & more / words \\      Some words & and some more \\      \end{tabu}      \end{center}          \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/34otw.png) **ADDED** Note that there are some relationships to these posts: Hide an entire table (but still generate it) Vertical alignment in multicol


title: Suppressing figure numbers in KOMA-Script captions

text: I am in the process of replacing the `caption` package with KOMA-Script in a long document. Where `caption` allows me to suppress the figure-number at the start of any caption by using `\caption*{text}`, I see nothing comparable in the KOMA-Script documentation. Can someone enlighten me? **Edit** : I would like to suppress the whole "Figure x.y:" marker before the actual caption text, just as `caption*` does.


title: Animation in PDF presentations, without Adobe Reader?

text: I sometimes have to present on other people's equipment, such as machines running stripped down Linux distributions, presentation servers with a bare- bones PDF viewer running in a virtual machine, or a Windows box with a heavily locked-down Adobe Reader (e.g. with JavaScript disabled). So far I've tried to avoid doing anything fancy with `beamer`. But for some concepts, animations seem necessary. > How can one create PDF presentations in LaTeX, preferably with `beamer`, > which include animations that work on most PDF viewers? Ideally, if the animations don't work then they should degrade gracefully. For instance, the first and last frame could still be shown. `Beamer` has `\animate` but this requires the PDF viewer to support showing several slides in succession, without manual intervention. Jens Nöckel suggests using external movies, which seems even less likely to work; this relies on a viewer being available for the movie format, and that the movie viewer can be called by the PDF viewer. Older documents suggest MetaPost or animated GIF files, which seem hacky (though I will consider them if no other alternatives exist). Please discuss only one main approach per answer.


title: Recursive Stern-Brocot tree definition

text: I am trying to build a Stern-Brocot tree (enumeration of rationals). The result is nearly acceptable, but I am still dissatisfied with the following points.   1. The edge from the parents goes to the middle of the child node, not the upper border.   2. The command does not (re)evaluate it's arguments at each iteration (we keep `1+1+1` instead of `3`)   3. I cannot use `\bt@n` and `\bt@d` in the recursive calls, as they are somehow messed up (why ?).   4. I have to give a name to my nodes, which is useless, but LaTeX won't compile without. Here is the code :               \documentclass{standalone}     \usepackage{tikz}     \usepackage{etoolbox}          \newcommand{\eval}[1]{\pgfmathparse{int(#1)}\pgfmathresult}          \makeatletter  % We can use the `@` symbol in macro names     \def\mybtree#1#2#3#4#5{%            \pgfextra{ % Allows us to use non-drawing commands         \pgfmathtruncatemacro\bt@depth{#5}    % Current depth         \pgfmathtruncatemacro\bt@ndepth{\bt@depth - 1}  % Next depth              \pgfmathtruncatemacro\bt@n{#1+#3}         \pgfmathtruncatemacro\bt@d{#2+#4}              %% Calculate the sibling distance         %  distance = 2^{remaining depth}         \pgfmathsetmacro\bt@sdistance{pow( 2, \bt@depth)}       }            node (\bt@n/\bt@d) {$\frac{\eval{#1+#3}}{ \eval{#2+#4}}$}            \ifnumgreater{\bt@depth}{0}{% if( depth > 0 ) then:         child [sibling distance=\bt@sdistance*2em] {           \mybtree{#1}{#2}{#1+#3}{#2+#4}{\bt@ndepth}         }          child [sibling distance=\bt@sdistance*2em] {            \mybtree{#1+#3}{#2+#4}{#3}{#4}{\bt@ndepth}          }        }{% else:         %% Do nothing       }     }     \newcommand*{\btree}[1]{\mybtree{0}{1}{1}{0}{#1}}     \makeatother           \begin{document}     %% Now we can draw our tree     \begin{tikzpicture}        \draw \btree{3};     \end{tikzpicture}          \end{document}      It should give something like this ![Stern-Brocot tree](http://img685.imageshack.us/img685/487/testkd.png) So any help is welcome.


title: Writing the shahada with arabtex

text: I'm not familiar with the Arabic alphabet, but would like to write the shahada in the two ways displayed below using `pdflatex`, for inclusion in a paper. ![enter image description here](http://i.stack.imgur.com/SuPHt.jpg) How can I do it? Is `arabtex` the way to go?               \documentclass{article}     \usepackage{arabtex}          \begin{document}          \setarab          \begin{arabtext}     % ...     \end{arabtext}          \end{document}