title: biblatex with APA problem

text: Hi I basically want to use `biblatex` instead of `apacite`. When I try run the following code, it just doesn't run:               \begin{filecontents}{myref.bib}     @ARTICLE{ref1,        author    = "A. E. Gill",        title     = "Some Simple Solutions for Heat-Induced Tropical Circulation",        journal   = "Quart. J. R. Met. Soc.",        volume    = 106,        year      = 1980,        pages     = "447-462",     }     @BOOK{TeX,        author    = "D. E. Knuth",        title     = "The \tex/book",        publisher = "Addison-Wesley",        year      = 1984,        note      = "Describes \tex/ in detail",     }     \end{filecontents}          \documentclass{article}          \usepackage[style=apa, backend=bibtex]{biblatex}     %\usepackage[american]{babel}     %\DeclareLanguageMapping{american}{american-apa}     \bibliography{myref}          \title{Example Title}     \author{Author Name}          \begin{document}     \maketitle     First line.           Reference is \textcite{ref1} and \cite{TeX}.          \printbibliography     \end{document}      When I delete `backend=bibtex`, it gives an output but instead of `"Reference is Gill (1980) ..."` it writes: `"Reference is ref1 ..."`. What can be possibly wrong here? UPDATE: After fiddling around, I discovered that (with the help of comments of course) the problem is with my system and I guess biber is still buggy. Here is what I did to solve my problem:   1. Previously I had Miktex 2.9 64 bit version. It turns out that biber is not included in that version (Source). I reinstall Miktex 32 bit version and it worked.    2. I had to change default bibliography engine in TexStudio from `bibtex` to `biber`.   3. Also, running TexStudio in administrator mode helped. Check here.    4. `biber` has problems with special characters, i.e. `%` sign (Check here). It is buggy even though they claim to solve it (Check here). Check the URL's and abstracts whether there is a special character. Delete them (what a bummer)..


title: Longtable: wrapped text and justification of columns

text: I'm setting a manual line break in a `longtable` with `endfloat`. I have created a landscape environment called `lgtable` and registered it with `endfloat` so that when the table is sent to the end of the document, it will be landscaped. When I used a standard table, I surrounded the table with a `resizebox` and set it equal to `\resizebox{1.00\linewidth}{!}{}` which ensured that both the wrapped lipsum text at the top of the table went all the way out to the margins, but also that the table itself expanded all the column nicely to fit the page. However, when I use `longtable`, I believe I can't surround a `longtable` with a box, so am stuck about how to incorporate the wrapped text and justified table. If I omit the wrapped text, the table does justify itself properly, but doesn't extend to the edge of the page. If I include the wrapped text, the columns are not equally spaced out and the wrapped text does not strictly go out to the margins of the page either. What can I do to ensure the following: the table itself expands to fit the page, the wrapped text expands to fit the page and the columns are spaced out evenly?               \documentclass[11pt]{article}     \usepackage[nolists]{endfloat}     \usepackage{comment}     \usepackage[margin=2.5cm]{geometry}     \usepackage{natbib,amssymb}     \setlength{\bibsep}{0pt plus 0.3ex}          \usepackage[affil-it]{authblk}     \usepackage{booktabs}     \usepackage{longtable}     \usepackage{siunitx}      \usepackage{lipsum}     \usepackage[FIGBOTCAP]{subfigure}     \usepackage{float}       \usepackage{catchfile,tikz}     \usepackage{filecontents}     \usepackage{silence}     \usepackage{tikz}     \usepackage{amsmath}     \usetikzlibrary{shapes,trees}     \usepackage{pdflscape }     \usepackage{eurosym}     %\usepackage[T1]{fontenc}     \usepackage{mathtools}              \usepackage{graphicx}          \usepackage{setspace}     \usepackage{lipsum}               \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}%Need for STATA tables          \newenvironment{lgtable}     {\begin{landscape}\begin{longtable}}     {\end{longtable}\end{landscape}}     % make it known to endfloat     \DeclareDelayedFloatFlavor{lgtable}{table}               \begin{document}               \begin{lgtable}{@{\extracolsep{\fill}}l*{8}{c}}     \caption{Regression Estimation: Blank, S(1)}      \label{table:first}\\     \multicolumn{9}{l}{     \begin{minipage}{1.34\textwidth}     \footnotesize     \lipsum[3-4]\\     \end{minipage}} \\     \toprule     \multicolumn{9}{c}{Some text}\\     \midrule     &Blank& \multicolumn{3}{c}{Some title}&\multicolumn{3}{c}{Some title}& Pooled\\     \midrule     &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         &\multicolumn{1}{c}{(5)}         &\multicolumn{1}{c}{(6)}         &\multicolumn{1}{c}{(7)}         &\multicolumn{1}{c}{(8)}         \\     &      Blank         &Blank, abcs         &Blank, abcs         &Blank, abcs         & Blank, Abc         & Blank, Abc         & Blank, Abc         &Blank, Pooled         \\     \midrule     S(1)                &       0.900\sym{***}&       0.887\sym{***}&       0.876\sym{***}&       0.239\sym{***}&       0.988\sym{***}&       0.952\sym{***}&       0.330         &       0.258\sym{***}\\     \bottomrule     \newpage     \multicolumn{9}{c}{Table \ref{table:first}: (continued)}\\     \toprule     \multicolumn{9}{c}{Panel B: Seom text}\\     \midrule     &Blank& \multicolumn{3}{c}{Some title}&\multicolumn{3}{c}{Some title}& Pooled\\     \midrule     &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         &\multicolumn{1}{c}{(5)}         &\multicolumn{1}{c}{(6)}         &\multicolumn{1}{c}{(7)}         &\multicolumn{1}{c}{(8)}         \\     &      Blank         &Blank, abcs         &Blank, abcs         &Blank, abcs         & Blank, Abc         & Blank, Abc         & Blank, Abc         &Blank, Pooled         \\     \midrule     S(1)                &       0.900\sym{***}&       0.887\sym{***}&       0.876\sym{***}&       0.239\sym{***}&       0.988\sym{***}&       0.952\sym{***}&       0.330         &       0.258\sym{***}\\     \bottomrule     \end{lgtable}                         \end{document}


title: Problem in revtex4-1 when a footnote ends with an equation

text: RevTeX4-1 automatically ensures that a period appears at the end of each footnote (or endnote). In most circumstances this causes no difficulty. But when an endnote ends with an equation, RevTeX misses the period I put in at the end of the equation, and it adds one of it's own on the line below the equation. The result is _ugly_ and _wrong_! Here's my MWE.               \documentclass[aps,prl,12pt,amsmath]{revtex4-1}     % I'm using the options aps, prl, and 12pt just to suppress     % some warnings; they do not affect the problem illustrated.          \begin{document}          This text includes an endnote that ends with an equation.%     ~\footnote{Einstein derived the equation       \[         E = m c^2.       \]     }          \end{document}      Help!


title: Two questions: Math mode and tree diagrams for probability in LaTeX

text: I am trying to print a worksheet for the math class I'm teaching and I was wondering if anyone can specifically help me out in two areas. a) How do I get the output BAL1L2 without the slant?                    $BAL_{1}L_{2}$       b) And is there is an easier code out there to create tree diagrams for probability?


title: pdflatex stuck compiling, gives no error

text: My case is: I have been typesetting tests with the exam class, I used to have problems with multiply defined labels for questions (but that is another problem). Recently I managed to change a few lines in the `exam.cls` so that it no longer gives me a multiply defined label warning and solved the problem I had. The problem I have now is that sometimes when I compile with pdflatex it gets stuck, gives no error and doesn't compile the document. Thinking there was a problem with Textmate (which is what I use to compile) I tried compiling from the command line and still gets stuck. These are the lines I changed in `exam.cls`: line2566               \edef\@queslabel{question@\arabic{question}}%      to               \edef\@queslabel{question@\arabic{section}@\arabic{subsection}@\arabic{question}}%      and line2893               \edef\@partlabel{part@\arabic{question}@\arabic{partno}}%      to               \edef\@partlabel{part@\arabic{section}@\arabic{subsection}\arabic{question}@\arabic{partno}}%      So here are two `.tex` files. One works and the other doesn't compile and I can't find what is wrong. Working `.tex`:               \documentclass[a4paper,11pt,spanish,answers]{exam}               %% synctex, para cambiar entre editor y pdf     \synctex=1          %% ampliar margenes      \usepackage[top=1.5cm, bottom=2cm, left=1cm, right=1.5cm]{geometry}               %% parskip en las minipages     \usepackage[parfill]{parskip}     \newlength{\currentparskip}          %cambiar espaciado en cajas     \setlength{\fboxsep}{5pt}               %%editar listas numeradas     \usepackage{enumitem}     \setlist[enumerate,1]{leftmargin=0cm}          %insertar figuras     \usepackage{graphicx}     \usepackage{float}     \usepackage{rotating}     \usepackage{rotfloat}               %%MULTIPLES COLUMNAS y filas     \usepackage{multirow}     \usepackage{tabularx}               %matematicas     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage[version=3]{mhchem}     \usepackage{mathtools}     \usepackage{mathabx}      \everymath{\displaystyle}          \DeclareMathOperator{\sgn}{sgn}          %%%cambiar los iconos de las listas de items     \usepackage{pifont}     \usepackage{textcomp}     %\usepackage{MnSymbol}          %% codigo . idioma     \usepackage[utf8]{inputenc}     \usepackage{babel}          %%%%%eurosymbol     %\usepackage{marvosym}     \usepackage{eurosym}     \DeclareUnicodeCharacter{20AC}{\euro}               %%paquetes para el siunitx     \usepackage[locale = FR]{siunitx}     \usepackage{booktabs}     \usepackage{cancel}     \usepackage{colortbl}     \usepackage{csquotes}     \usepackage{helvet}     \usepackage{mathpazo}     \usepackage[svgnames]{xcolor}     \usepackage{listings}     \usepackage{pgfplots}     \usepackage{translator}     \sisetup{%     per-mode = symbol-or-fraction,%     list-final-separator = { \translate{and} },%     list-pair-separator = { \translate{and} },%     range-phrase = { -- },%     group-digits = integer     }               %%% unidades extra     \DeclareSIUnit\inch{in}     \DeclareSIUnit\foot{ft}     \DeclareSIUnit\kgf{kgf}     \DeclareSIUnit\pound{lb}     \DeclareSIUnit\defs{$\epsilon$}     \DeclareSIUnit\rev{rev}     \DeclareSIUnit\rpm{rpm}     \DeclareSIUnit\pkt{PKT}          %%%%% dineros     \DeclareSIUnit\usd{USD}     \DeclareSIUnit\eur{EUR}     \DeclareSIUnit\euro{\euro}     \DeclareSIUnit\dollar{\$}     \DeclareSIUnit\cent{\textcent}          %%cambiar formato titulos     \usepackage{titlesec}     \titlespacing*{\chapter}{0pt}{-30pt}{10pt}     \titlespacing*{\section} {0pt}{3ex plus 1ex minus .2ex}{1.8ex plus .2ex}     \titlespacing*{\subsection} {0pt}{2.75ex plus 1ex minus .2ex}{1ex plus .2ex}     \titlespacing*{\subsubsection}{0pt}{2.75ex plus 1ex minus .2ex}{1ex plus .2ex}     \titlespacing*{\paragraph} {0pt}{2.75ex plus 1ex minus .2ex}{1em}     \titlespacing*{\subparagraph} {30pt}{1.5ex plus 1ex minus .2ex}{1em}               \titleformat{\section}{\color{Red}\normalfont\Large\bfseries}{\color{Red}\thesection.}{0.5em}{}     \titleformat{\subsection}{\color{NavyBlue}\normalfont\large\bfseries}{\color{NavyBlue}\thesubsection.}{0.5em}{}     \titleformat{\subsubsection}{\color{Green}\normalfont\normalsize\bfseries}{\color{Green}\thesubsubsection.}{0.5em}{}     \titleformat{\paragraph}[runin]{\color{BlueViolet}\normalfont\normalsize\bfseries}{\color{BlueViolet}\theparagraph}{1em}{}     \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}                    %cambiar el nombre de las figuras     \usepackage{caption}     %\captionsetup[figure]{labelformat=empty}     \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}     \renewcommand{\figurename}{Fig.}               %%%% cambiar la numeración de las figuras por seccion     \usepackage{chngcntr}     \counterwithin{figure}{section}               % %% TABLAS. AJUSTAR EL TEXTO A LA CELDA      \usepackage{tabularx}     \newcolumntype{L}{>{\raggedright\arraybackslash}X}%     \newcolumntype{R}{>{\raggedleft\arraybackslash}X}%     \newcolumntype{C}{>{\centering\arraybackslash}X}%          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \author{piLi}     \title{Transporte Aéreo.\\ Exámenes}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               %% puntos a la derecha     \pointsdroppedatright     \pointsinrightmargin     \bracketedpoints     \marginpointname{pt}                    \renewcommand{\thechoice}{\alph{choice}}               %%formato de la solucion     \unframedsolutions     \CorrectChoiceEmphasis{}          %%%%%%%%%%%% solucion sin titulo en cursiva y gris :)     \renewcommand{\solutiontitle}{}     \SolutionEmphasis{\color{Gray}}                    %%%% solución multiple %%%%%%%%%%%%%%%%%%%%%%%     \checkboxchar{$\Box$}     \checkedchar{\color{Green}{\ding{52}}}     %\checkedchar{$\boxtimes$}          \newcommand\cosa{%     \hfill\mbox{\begin{oneparcheckboxes}     \choice      \end{oneparcheckboxes}}}          \newcommand\bien{%     \hfill\mbox{\begin{oneparcheckboxes}     \CorrectChoice      \end{oneparcheckboxes}}}               %% hyperliks     \usepackage{hyperref}           %%beter referencing     \usepackage{cleveref}                    \begin{document}          %%hacemos el titulo     \maketitle               %% indice     \tableofcontents          \section{One} % (fold)     %%\label{sec:one}          \subsection{FEBRERO 2011} % (fold)     %%\label{sub:febrero_2011}          \begin{questions}         \question ¿Puede considerarse el sistema de manejo de equipajes de un aeropuerto como Gran Sistema? Exponer razones:         \begin{solution}              Si. Cumple las tres condiciones de gran sistema:              \begin{itemize}                 \item Gran número de partes complejas (vehículos, cintas, ordenadores)                 \item Relaciones complejas (carga/descarga, aduana, facturación)                 \item Fines concretos (entregar todo, sano y a tiempo)              \end{itemize}         \end{solution}                   \question Explicar el proceso requerido para incorporar un nuevo Capítulo al Anexo 16 al Convenio de Chicago.         \begin{solution}              El consejo encarga la tarea al comité de Aeronavegabilidad. La propuesta de éste vuelve al consejo, pasa a la Secretaría General, retorna al consejo y es aprobada por la Asamblea.         \end{solution}                   \question ¿Son aceptables hoy en día los acuerdos \emph{pool} en Europa? ¿Por qué?         \begin{solution}             No. Contravienen las normas de la competencia en la UE, particularmente las de acuerdos restrictivas (Art. 8 del Tratado de Roma)         \end{solution}                   \question Explicar las diferencias más importantes de funcionamiento entre una compañía aérea de red \emph{Hub\&Spoke} y otra de las conocidas como de \emph{bajo coste (BC)}         \begin{solution}              \begin{description}                 \item[RED] H\&B maneja oleadas de vuelos interconectados en uno o más puntos                 \item[BC] opera red en malla, sin centros fijos               \end{description}                 \begin{tabular}{| c | c c |}                     \hline                     & H\&B & BC \\ \hline                     Conexiones & las fomenta & no ofrece \\                     Alcance & largo, medio, corto & medio y corto\\                     Producto & diferentes productos & sólo uno, simple, cobrado servicios adicionales\\                     Ventas & múltiples canales & internet y call center\\                     Flota & variedad de aviones & uno o dos tipos\\ \hline                 \end{tabular}         \end{solution}                   \question Discutir las posibilidades legales y las acciones necesarias para que una empresa privada diseñe, construya y explote un aeropuerto para vuelos comerciales nacionales e internacionales en España.         \begin{solution}              Ningún problema, con dos condiciones:              \begin{itemize}                 \item El aeropuerto debe ser certificado por la Dirección General de Aviación Civil.                 \item No debe ser de interés general. Si lo fuera, sería competencia del Estado, salvo su traspaso mediante Ley orgánica.              \end{itemize}         \end{solution}          \end{questions}     % subsection febrero_2011 (end)     % section one (end)               \end{document}      Non working `.tex`:               \documentclass[a4paper,11pt,spanish,answers]{exam}               %% synctex, para cambiar entre editor y pdf     \synctex=1          %% ampliar margenes      \usepackage[top=1.5cm, bottom=2cm, left=1cm, right=1.5cm]{geometry}               %% parskip en las minipages     \usepackage[parfill]{parskip}     \newlength{\currentparskip}          %cambiar espaciado en cajas     \setlength{\fboxsep}{5pt}               %%editar listas numeradas     \usepackage{enumitem}     \setlist[enumerate,1]{leftmargin=0cm}          %insertar figuras     \usepackage{graphicx}     \usepackage{float}     \usepackage{rotating}     \usepackage{rotfloat}               %%MULTIPLES COLUMNAS y filas     \usepackage{multirow}     \usepackage{tabularx}               %matematicas     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage[version=3]{mhchem}     \usepackage{mathtools}     \usepackage{mathabx}      \everymath{\displaystyle}          \DeclareMathOperator{\sgn}{sgn}          %%%cambiar los iconos de las listas de items     \usepackage{pifont}     \usepackage{textcomp}     %\usepackage{MnSymbol}          %% codigo . idioma     \usepackage[utf8]{inputenc}     \usepackage{babel}          %%%%%eurosymbol     %\usepackage{marvosym}     \usepackage{eurosym}     \DeclareUnicodeCharacter{20AC}{\euro}               %%paquetes para el siunitx     \usepackage[locale = FR]{siunitx}     \usepackage{booktabs}     \usepackage{cancel}     \usepackage{colortbl}     \usepackage{csquotes}     \usepackage{helvet}     \usepackage{mathpazo}     \usepackage[svgnames]{xcolor}     \usepackage{listings}     \usepackage{pgfplots}     \usepackage{translator}     \sisetup{%     per-mode = symbol-or-fraction,%     list-final-separator = { \translate{and} },%     list-pair-separator = { \translate{and} },%     range-phrase = { -- },%     group-digits = integer     }               %%% unidades extra     \DeclareSIUnit\inch{in}     \DeclareSIUnit\foot{ft}     \DeclareSIUnit\kgf{kgf}     \DeclareSIUnit\pound{lb}     \DeclareSIUnit\defs{$\epsilon$}     \DeclareSIUnit\rev{rev}     \DeclareSIUnit\rpm{rpm}     \DeclareSIUnit\pkt{PKT}          %%%%% dineros     \DeclareSIUnit\usd{USD}     \DeclareSIUnit\eur{EUR}     \DeclareSIUnit\euro{\euro}     \DeclareSIUnit\dollar{\$}     \DeclareSIUnit\cent{\textcent}          %%cambiar formato titulos     \usepackage{titlesec}     \titlespacing*{\chapter}{0pt}{-30pt}{10pt}     \titlespacing*{\section} {0pt}{3ex plus 1ex minus .2ex}{1.8ex plus .2ex}     \titlespacing*{\subsection} {0pt}{2.75ex plus 1ex minus .2ex}{1ex plus .2ex}     \titlespacing*{\subsubsection}{0pt}{2.75ex plus 1ex minus .2ex}{1ex plus .2ex}     \titlespacing*{\paragraph} {0pt}{2.75ex plus 1ex minus .2ex}{1em}     \titlespacing*{\subparagraph} {30pt}{1.5ex plus 1ex minus .2ex}{1em}               \titleformat{\section}{\color{Red}\normalfont\Large\bfseries}{\color{Red}\thesection.}{0.5em}{}     \titleformat{\subsection}{\color{NavyBlue}\normalfont\large\bfseries}{\color{NavyBlue}\thesubsection.}{0.5em}{}     \titleformat{\subsubsection}{\color{Green}\normalfont\normalsize\bfseries}{\color{Green}\thesubsubsection.}{0.5em}{}     \titleformat{\paragraph}[runin]{\color{BlueViolet}\normalfont\normalsize\bfseries}{\color{BlueViolet}\theparagraph}{1em}{}     \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}                    %cambiar el nombre de las figuras     \usepackage{caption}     %\captionsetup[figure]{labelformat=empty}     \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}     \renewcommand{\figurename}{Fig.}               %%%% cambiar la numeración de las figuras por seccion     \usepackage{chngcntr}     \counterwithin{figure}{section}               % %% TABLAS. AJUSTAR EL TEXTO A LA CELDA      \usepackage{tabularx}     \newcolumntype{L}{>{\raggedright\arraybackslash}X}%     \newcolumntype{R}{>{\raggedleft\arraybackslash}X}%     \newcolumntype{C}{>{\centering\arraybackslash}X}%          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \author{piLi}     \title{Transporte Aéreo.\\ Exámenes}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               %% puntos a la derecha     \pointsdroppedatright     \pointsinrightmargin     \bracketedpoints     \marginpointname{pt}                    \renewcommand{\thechoice}{\alph{choice}}               %%formato de la solucion     \unframedsolutions     \CorrectChoiceEmphasis{}          %%%%%%%%%%%% solucion sin titulo en cursiva y gris :)     \renewcommand{\solutiontitle}{}     \SolutionEmphasis{\color{Gray}}                    %%%% solución multiple %%%%%%%%%%%%%%%%%%%%%%%     \checkboxchar{$\Box$}     \checkedchar{\color{Green}{\ding{52}}}     %\checkedchar{$\boxtimes$}          \newcommand\cosa{%     \hfill\mbox{\begin{oneparcheckboxes}     \choice      \end{oneparcheckboxes}}}          \newcommand\bien{%     \hfill\mbox{\begin{oneparcheckboxes}     \CorrectChoice      \end{oneparcheckboxes}}}               %% hyperliks     \usepackage{hyperref}           %%beter referencing     \usepackage{cleveref}               \begin{document}          %%hacemos el titulo     \maketitle               %% indice     \tableofcontents          \section{One} % (fold)     %%\label{sec:one}     \subsection{FEBRERO 2010} % (fold)     %%\label{sub:febrero_2010}          \begin{questions}         \question Una compañía aérea opera 3 aviones, cada uno en una ruta diferente, con las siguientes características:              \begin{tabular}{c | c c c c}             & Distancia (\si{\kilo\metre}) & Asientos & Coste por vuelo (\si{\euro}) & Ingreso/PKT (\si{\euro}) \\ \hline              Ruta 1 & \num{2600} & \num{200} & \num{30000} & \num{0,10} \\             Ruta 2 & \num{1800} & \num{162} & \num{25000} & \num{0,12} \\             Ruta 3 & \num{1200} & \num{132} & \num{20000} & \num{0,14} \\         \end{tabular}              Calcular el factor de ocupación crítico (cuando los ingresos cubren exactamente los costes) de cada una de las rutas. Calcular el factor de ocupación crítico de la red.         \begin{solution}             \begin{align*}      \text{Ingresos} &= \text{Costes} = PKT\,\times \frac{\text{ingreso}}{PKT } && FOC_1 &= 57,69\% \\      AKO &= \,\text{distancia}\,\times\,\text{asientos} && FOC_2 &= 71,44\%\\      FOC & = \frac{PKT}{AKO} && FOC_3 &= 90,19\% \\      \text{Ingresos (red)} &= \text{costes (red)} && FOC_{red}= 67,13\%\\      PKT(\text{red}) &= \sum (FOC_i\,\times\,AKO_i)  \\      FOC(\text{red}) &= \frac{PKT(\text{red})}{AKO(\text{red})} \\             \end{align*}         \end{solution}                   \question El presupuesto anual de ayudas a la navegación aérea de un país de la UE es de \SI{400}{\mega\euro}. A lo largo del año se atienden a \num{950000} vuelos, que recorren una distancia media de \SI{500}{\kilo\metre} en su espacio aéreo. Calcular el valor medio del MTOW de los aviones si el coeficiente de coste $t=\SI{80}{\euro}$ y se acaba el año con un deficit de \SI{20}{\mega\euro}.         \begin{solution}              \begin{minipage}[c]{.5\textwidth}                 \begin{align*}                     N & = d \times p && p = \sqrt{\frac{MTOW \si{\tonne}}{50}}\\                     r &= t \times N                 \end{align*}              \end{minipage} \begin{minipage}[c]{.4\textwidth}                 \begin{itemize}                     \item[$d$] coeficiente de distancia. Vale 1 para cada \SI{100}{\kilo\metre}                     \item[$p$] coeficiente de peso                        \item[$r$] es lo que paga cada vuelo                   \end{itemize}              \end{minipage}         \end{solution}                   \question ¿Cuales son las principales diferencias entre Doble código, Código compartido y Bloqueo de espacio?         \begin{solution}              \begin{description}                 \item[Doble código] es la comercialización paralela de todos los asientos de un vuelo de un mismo avión por dos compañías distintas (ejemplo: IB3400/BA7800)                 \item[Código compartido] es la comercialización de partes diferenciadas de un mismo avión por dos compañías distintas (ejemplo: IB/BA 5100, con el 60\% de asientos para IB y el 40\% para BA)                 \item[Bloqueo de espacio] es la compra por una compañía de un número fijo de asientos de un vuelo de otra empresa, comercializándolos de manera independiente.              \end{description}         \end{solution}                   \question Una compañía aérea abre un hub en Zaragoza, ofreciendo un vuelo diario de ida y vuelta a La Coruña, Santiago de Compostela, Bilbao, Gerona, Barcelona, Alicante y Sevilla. Razonar cuántos puntos a puntos comercializables ofrece.         \begin{solution}              El sistema de Hub\&Spoke ofrecería $7$ vuelos de ida y vuelta sin escala y otros $21$ punto a punto con escala en Zaragoza. Sin embargo, la excesiva proximidad de La Coruña y Santiago, y de Barcelona y Gerona hace imposible vender esos punto a punto con escala en Zaragoza, por lo que habría $7+19 = 26$ punto a punto comercializables.         \end{solution}                   \question ¿Cuál ha sido el periódico histórico de mayor crecimiento del transporte aéreo español después de la Guerra Civil? ¿A qué se debió principalmente ese crecimiento?         \begin{solution}              El período de expansión (1960-1979) por el cambio de política económica (lanzamiento de los Planes de Desarrollo) y el fomento del tráfico turístico con el norte de Europa, ayudado por la liberalización de los vuelos chárter por la ECAC en 1956         \end{solution}     \end{questions}     % subsection febrero_2010 (end)          % section one (end)               \end{document}


title: Where does whitespace between two consecutive lines come from?

text: I'm trying to get a "contact sheet" where identically sized boxes are laid out next to each other without any whitespace. As my goal is to use this in a generated document, and as the number of items is unknown in advance, I'd like to avoid tabular-like approaches and rely on native line breaking and page breaking machinery. This is also an experiment to learn more about the internals of tex/latex, so along the way I also played a lot with keywords like _badness_ , _emergencystretch_ , _sloppy_ etc. But in the end, my quest can be summed up in the code below. My first try below obviously produces some "interword" whitespace between boxes, so it is not desirable. In my second try (page 2) I explicitely remove this whitespace but this also removes line breaks. I don't really understand what's going on. In my third try (page 3) I explicitely tell (la)tex that it's ok to break lines, and I get the result I want w.r.t. horizontal whitespace. But still, there is some amount of vertical whitespace between lines, and this whitespace occupies room. As a result, the blue box ends up on page four, when I want it to be on on page three. This is my question: how do I get rid of that small vertical whitespace between two consecutive lines of text ?               \documentclass[a4paper]{article}          \usepackage[     text={15cm,21cm},     showframe,     ]     {geometry}          \usepackage{xcolor}          \setlength{\parindent}{0pt}          \begin{document}               % page 1     \textcolor{red}{\rule{5cm}{7cm}}     \textcolor{green}{\rule{5cm}{7cm}}     \textcolor{red}{\rule{5cm}{7cm}}     \textcolor{green}{\rule{5cm}{7cm}}     \textcolor{red}{\rule{5cm}{7cm}}     \textcolor{green}{\rule{5cm}{7cm}}          \newpage          % page 2          \textcolor{green}{\rule{5cm}{7cm}}%     \textcolor{red}{\rule{5cm}{7cm}}%     \textcolor{green}{\rule{5cm}{7cm}}%     \textcolor{red}{\rule{5cm}{7cm}}%          \newpage          % page 3          \textcolor{green}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{red}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{green}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{red}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{green}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{red}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{blue}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{red}{\rule{5cm}{7cm}}\linebreak[0]%     \textcolor{green}{\rule{5cm}{7cm}}\linebreak[0]%          \end{document}


title: Overview of Margins in KOMA Script/TypeArea

text: I am looking for some dimensions associated to page layout using the KOMA Script classes. However, I find it very difficult to find the individual commands. Does there exist something like such an overview (source: Wikipedia)? ![enter image description here](http://i.stack.imgur.com/pGCyM.png) Specifically, I am looking for the command for dimension that goes from the text-area to the margin. In the figure above this would be (3) + (1).


title: How to insert these unicode symbols u2400 to u2421?

text: Please how can I insert these unicode symbols in the range u2400 to u2421. They are names of control characters. You can see them here: http://unicode.org/charts/PDF/U2400.pdf I could find the package `keystroke` which has very nice keys, but that is not what I want. Thanks! \-- Edited: Quoting Marco: "The problem is to find a font that contains these characters."


title: How to type dots whose slope is 1?

text: We know how to typeset the commonly used diagonal dots, i.e., `\ddots`, whose slope is -1. Now I want to produce dots with slope 1, which is perpendicular to `\ddots`. Does anyone know how to do it?


title: Lua techniques and libraries for LuaTeX

text: With LuaTeX, it is possible to use many libraries and functions that can simplify various aspects of Lua programming. As Lua as language is quite new for the majority of TeX users, I think it would be good if we could share experiences in searching for useful libraries and techniques, that appeared to us while learning this language. Maybe we can collect a list of them. Each answer should contain a description and a small example of usage. Welcomed are examples using both LuaTeX (for typesetting) or TeXLua (for shell scripting). **Example:** String interpolation: As simple templating engine one can use a technique called "string interpolation". Various attempts are described at lua wiki. A simple example is following:               #!/usr/bin/env texlua     function interp(s, tab)       return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))     end     print( interp("${name} is ${value}", {name = "foo", value = "bar"}) )      Which prints on the terminal:               foo is bar      We can make it more simple to use:               getmetatable("").__mod = interp     print( "${name} is ${value}" % {name = "foo", value = "bar"} )      In this example, we set the `mod` operator for string to call our interpolation function, so one can use `"format ${val}" % {val="hello"}`.


title: pst-solides3d and hidden lines

text: I am trying to draw figures with `pstricks` for the first time. Unfortunately, I am struggling with it. I was trying to draw a pentagon-cone and an octahedron using `pst-solides3d`, but it draws some lines dashed which actually are not hidden. I used this code:               \begin{pspicture}(-2,-1)(3,4)      \psset{viewpoint=25 8 5,Decran=50}      \psSolid[object=new,      action=draw,      sommets=      0 0 0     0.343561 1.05737 1     -0.899454 0.653491 1     -0.899454 -0.653491 1     0.343561 -1.05737 1     1.11179 0 1,      faces={       [0 1 2]     [0 2 3]     [0 3 4]     [0 4 5]     [0 5 1]     [ 1 2 3 4 5]}]%      \end{pspicture}          \begin{pspicture}(-2,-1)(3,4)      \psset{viewpoint=25 8 5,Decran=100}     \psSolid[object=new,      action=draw,      sommets=      %n=4     0 0 0 %0     0.420448 0.420448 0.5 %e1     -0.420448 0.420448 0.5 %e2     -0.420448 -0.420448 0.5 %e3     0.420448 -0.420448 0.5 %e4     0 0 1, %u      faces={     [0 1 4]     [0 1 2]     [0 2 3]     [0 3 4]     [2 3 5]     [3 4 5]     [1 2 5]     [1 4 5]}]%      \end{pspicture}       The result, however, looks like this: ![http://i.stack.imgur.com/2HTNa.jpg](http://i.stack.imgur.com/2HTNa.jpg) Obiously, lines which should be dashed (because they are hidden) are not and some lines which should be continuous are dashed. Does anyone know how to fix this problem? * * * Thanks for your answers. There is still something strange. If I set `num=all`, like in the code               \begin{pspicture}(-2,-1)(3,4)      \psset{viewpoint=25 12 5,Decran=100}     %\axesIIID[showOrigin=false](1,1,1)(3,2,2.5)     \psSolid[object=new,      action=draw*,     fillcolor=red,     opacity=.6,     fcol=8 (Blue),     num=all,     sommets=      %n=4     0 0 0 %0     0.420448 0.420448 0.5 %e1     -0.420448 0.420448 0.5 %e2     -0.420448 -0.420448 0.5 %e3     0.420448 -0.420448 0.5 %e4     0 0 1 %u     0 1.18921 1 %w1     -1.18921 0 1 %w2     0 -1.18921 1 %w3     1.18921 0 1, %w4     faces={     [0 1 4]     [0 2 1]     [0 3 2]     [0 4 3]     [2 3 5]     [3 4 5]     [1 2 5]     [1 5 4]     [6 7 8 9]}]%      \end{pspicture}      then I get the following result: ![wrong numbering](http://i.stack.imgur.com/GGn3f.jpg) which is obviously not as intended. How can I fix this?


title: Understanding the Log file

text: I'm getting some cryptic (for me) errors and warnings when I compile. On the advice of darn near every internet resource I could find, I dug into the .log file. The trouble is, I don't know how to interpret what I see. I don't want to take up people's time so, where can I find a Reading LaTex .log Files for Beginners document?


title: multirow in tikz matrix

text: I am trying to insert a multirow in a tikz matrix with a grid, so:               \documentclass{amsart}      \usepackage{tikz}     \usetikzlibrary{matrix,fit}          \begin{document}      \begin{tikzpicture}     \matrix (table) [%       matrix of nodes,       nodes in empty cells,       draw,       inner sep=0mm,       minimum size=7mm       ] {%       \node[draw] {A}; & \node[draw] {B}; & \node[draw] {C}; & \node[draw] {D}; \\       \node[draw] {E}; &   &   & \node[draw] {G}; \\   };     \node[draw,fit=(table-2-2)(table-2-3)]{F};     \end{tikzpicture}     \end{document}      With ugly results. Is there a way to fix this? A better way to implement it? Thanks.


title: dvips produces improperly-trimmed output for non-standard papersize

text: ## Note: Rather than creating a new question that has almost the same code base, I rewrote my previous question. Because this issue is not specific to PSTricks, I changed the code so everybody can play with it. * * * I want to avoid using `pdfcrop` so I set the paper size to tightly suit my need in advance as follows.               % sample.tex     \documentclass{minimal}     \usepackage     [     paperwidth=144bp,%2in = 2x72bp = 144bp     paperheight=108bp,%1.5in = 1.5x72bp = 108bp     margin=0bp     ]     {geometry}     \usepackage{xcolor,calc}     \fboxsep=0bp     \fboxrule=2bp     \begin{document}     \noindent\fbox{\color{yellow}\rule{\paperwidth-2\fboxrule}{\paperheight-2\fboxrule}}%     \end{document}      or without using geometry.sty:               % sample.tex     \documentclass{minimal}     \paperwidth=144bp%2in = 2x72bp = 144bp     \paperheight=108bp%1.5in = 1.5x72bp = 108bp     \voffset=-72bp     \hoffset=-72bp     \special{papersize=144bp,108bp}     \usepackage{xcolor,calc}     \fboxsep=0bp     \fboxrule=2bp     \begin{document}     \noindent\fbox{\color{yellow}\rule{\paperwidth-2\fboxrule}{\paperheight-2\fboxrule}}%     \end{document}      Then I compiled it with `latex->dvips->ps2pdf` and I got a strange result as follows: ![enter image description here](http://i.stack.imgur.com/TWCEU.png) I also got EPS with strange bounding box as follows:               %!PS-Adobe-3.0 EPSF-3.0     % Produced by xpdf/pdftops 3.02pl4     %%Creator: TeX     %%LanguageLevel: 2     %%DocumentSuppliedResources: (atend)     %%BoundingBox: 0 0 105 145     %%HiResBoundingBox: 0 0 104.994 144.018     %%EndComments     %%BeginProlog     %%BeginResource: procset xpdf 3.02pl4 0     %%Copyright: Copyright 1996-2007 Glyph & Cog, LLC      ## Summary I tested this using `pdflatex` with no problem. Herbert tested it using `xelatex` with no problem too. According to Herbert, there is a problem in `dvips`.


title: How to add vertical and horizontal lines to ybar figure and defining colors for bars?

text: I'm trying to reproduce a figure from a paper so it would be in line with the visual style of my paper. The figure I'm trying to reproduce is ![enter image description here](http://i.stack.imgur.com/QIncj.png) Since originally posting I've found a way to define the colors of the ybars and to draw the vertical lines. I was able to do that thanks to this great example example. However, I'm having some difficulties with the horizontal lines. I do not know how I should refer to the x-axis coordinates. I have used the Label names for the x-axis but this doesn't allow me to draw the horizontal line so that it starts from the y-axis and goes all the way to the end. Currently my code is the following:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \definecolor{RYB1}{RGB}{128, 177, 211}     \definecolor{RYB2}{RGB}{251, 128, 114}     \definecolor{RYB3}{RGB}{253, 180, 98}          \begin{document}          \begin{tikzpicture}     \pgfplotsset{width=10 cm}     \begin{axis} [     symbolic x coords={Label 1,Label 2, Label 3, Label 4, Label 5, Label 6, Label 7},     xtick={Label 1, Label 2, Label 3, Label 4, Label 5, Label 6, Label 7},     x tick label style={rotate=45, anchor=east, align=center},     axis lines*=left,     ymajorgrids = true,     y label style={rotate=-90},     ylabel=\Large{\textbf{\%}},     legend style={at={(0.5,-0.10)},         anchor=north,legend columns=1},         ymin=0,         ymax=175,         bar width=5mm,         ybar=-0.5cm,         enlarge x limits={abs=0.6cm},         nodes near coords,                 every node near coord/.append style={color=black},     ]     \addplot [RYB1,fill=RYB1]     coordinates{ (Label 1,164) } ;     \addplot [RYB1,fill=RYB1]     coordinates{ (Label 2,156) } ;     \addplot [RYB1,fill=RYB1]     coordinates{ (Label 3,124) } ;     \addplot [RYB2,fill=RYB2]     coordinates{ (Label 4,100) } ;     \addplot [RYB3,fill=RYB3]     coordinates{ (Label 5,5) } ;     \addplot [RYB2,fill=RYB2]     coordinates{ (Label 6,111) } ;     \addplot [RYB2,fill=RYB2]     coordinates{ (Label 7,95) } ;     \draw [RYB3] (axis cs:Label 1,164) -- (axis cs:Label 7,164) ;     \draw [RYB3,->] (axis cs:Label 3,164) node [above] {-24 \%} -- (axis cs:Label 3,139) ;     \draw [RYB3,->] (axis cs:Label 4,164) node [above] {-39 \%} -- (axis cs:Label 4,115) ;     \draw [RYB3,->] (axis cs:Label 5,164) node [above] {-97 \%} -- (axis cs:Label 5,20) ;     \end{axis}     \end{tikzpicture}          \end{document}      This results in to a Figure that looks like this. ![enter image description here](http://i.stack.imgur.com/P8fd8.png) There are two issues with the picture. 1) I would like the horizontal line to start from the left end of the first bar and end at same point as the x-axis does. 2) The horizontal line goes over the second bar node (156). Both of these issues could be resolved if I knew how to refer to the x-coordinates.


title: Disable hyphenation in apa6e's footnotes

text: I would like to disable hyphenation in apa6e's footnotes, to match APA's 6th edition guidelines. apa6e uses ragged2e, and the ragged2e documentation (pdf) claims that certain commands can make hyphenation "almost impossible":               \setlength{\RaggedLeftRightskip}{0pt plus 1fil}     \setlength{\RaggedRightRightskip}{0pt plus 1fil}      These commands disable hyphenation in the body, but not in the (endnotes) footnotes. How can I either (1) disable ragged2e's hyphenation in apa6e, or (2) edit apa6e.cls to stop using ragged2e altogether? Example:               \documentclass[endnotes]{apa6e}     \title{}     \author{}     \shorttitle{}     \authornote{}          \setlength{\RaggedLeftRightskip}{0pt plus 1fil}     \setlength{\RaggedRightRightskip}{0pt plus 1fil}          \begin{document}          The body does not have any hyphenation. Good. Even     reallyreallyreallyreallyreallyreallyreallyreallylongwords remain     unhyphenated.\      %     \footnote{However, the footnotes become hyphenated. The     reallyreallyreallyreallyreallyreallyreallyreallylongwords become     hyphenatated.}          \end{document}


title: Problem related to "hpdftex.pdf"

text: I am trying to use the following template for the CV.               \documentclass[11pt,a4paper]{moderncv}          \moderncvtheme[black]{classic}          \usepackage[utf8]{inputenc}          % personal data     \firstname{Yu,}     \familyname{Yue}     \title{University of Illinois at Chicago \newline \small{\texttt{\textbf{Homepage: {\color{web}\weblink{http://imyy.net}}}}}}     %\address{Office 719 SEO\\ 851 S. Morgan St.}{Chicago, IL}     \extrainfo{Office 719 SEO\\ 851 S. Morgan St.\\ Chicago, IL 60606}     \phone{540--yy--yueyu}     \email{yyu9 at uic.edu}     %\photo[64pt]{Yue_Yu}          \newcommand{\up}[1]{\ensuremath{^\textrm{\scriptsize#1}}}          % the ConTeXt symbol     \def\ConTeXt{%       C%       \kern-.0333emo%       \kern-.0333emn%       \kern-.0667em\TeX%       \kern-.0333emt}     \definecolor{web}{rgb}{0.2,0.2,0.2}     %\definecolor{web}{rgb}{0.5,0.5,0.5}     %----------------------------------------------------------------------------------     %            content     %----------------------------------------------------------------------------------     \begin{document}     \maketitle     \section{\textbf{Education}}     \cventry{2007--Present}{\textbf{Master of Science in     Mathematics}}{University of Illinois at Chicago}{USA}{}{ - Expected     in SUMMER 2009.\newline - Concentrate in Probability and Statistics,     over all GPA: 4.0/4.0.}     \cventry{2003--2007}{\textbf{Bachelor of Science}}{Fudan     University}{China}{}{ - Major in Mathematics and Applied     Mathematics, last two years GPA: 3.4/4.0.}     \cvitem{---}{\textsc{Undergraduate Thesis}}     \cvitem{title}{\textit{Nonstatistical Methods for Credit Scoring and     Its Applications}} \cvitem{description}{Develop three strategies for     credit scoring: linear programming, genetic algorithm and     back--propagating neural network and three model is built in MATLAB     for real data in order to evaluate their performances.}               \end{document}      When I compile it, the following error windows appeared: ![enter image description here](http://i.stack.imgur.com/j6Bb4.png) How can I solve this problem? **Edit:**   The ~~compiler~~ editor I used is WinEdt. The compiler the latex. **Edit:** `.log` file               (D:\Application\hpdftex.def     File: hpdftex.def 2011/04/17 v6.82g Hyperref driver for pdfTeX               ! Package hyperref Error: Version mismatch!     (hyperref)                * 2010/11/26 v6.81v: hyperref.sty     (hyperref)                * 2011/04/17 v6.82g: hpdftex.def.          See the hyperref package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.34 \Hy@VersionCheck{hpdftex.def}          ? x          Here is how much of TeX's memory you used:      5079 strings out of 495362      70906 string characters out of 3183239      143237 words of memory out of 3000000      8184 multiletter control sequences out of 15000+200000      5126 words of font info for 17 fonts, out of 3000000 for 9000      14 hyphenation exceptions out of 8191      32i,1n,45p,768b,86s stack positions out of 5000i,500n,10000p,200000b,50000s     No pages of output.     PDF statistics:      0 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Removing spurious pagebreak in index?

text: EDIT: To clarify my question: I am not looking for an index that will start without a page break; I, rather, want an index where I manually would take care of the page break. Say you've inserted a ton of `\clearpage`s, to make sure that the "next" page starts on pg 37. Now you want to insert the index "here", at page 37 - so you type `\printindex[names]` there - and, surprise - the index now starts at page 38, because the index decided to enter one more `\clearpage` `:/` And that means now you have to go back, and re-enter ammount of `\clearpage`s, so they match to page N-1; so that along with the extra pagebreak, the index will start where at page N. This I'd see as an unnecessary complication. Second, let's say you don't want to use the default section title of `\printindex`; you'd rather use `\section*`. The easiest thing to think of (without knowing any better), is to suppress the default index heading ( _in this case, since the example is for`\printindex` from `index` package, that would be in `\newindex` command_):               \newindex{names}{ndx}{nnd}{}  % instead of: {names}{ndx}{nnd}{Name Index}      ... (which does indeed suppress the default index heading) - and then, instead of that heading, one would type `\section*{Name Index}` followed by a `\printindex[names]`. Obviously, if `\printindex` inserts its own pagebreak, then this approach won't work, since the section title and the first page of the index will be on different pages - which is precisely what the MWE in this question demonstrates.... * * * ~~Damn it, I'm really starting to hate Latex`:/` ~~ naah... `:)` Take a look at the following MWE:               \documentclass[a4paper,twoside,11pt]{book}               % must load index before hyperref, else no hyperlinks!     \usepackage{index}     \usepackage{hyperref}     \usepackage{trace}          % declare new index files     \newindex{names}{ndx}{nnd}{Name Index}     \newindex{titles}{tdx}{tnd}{Title Index}          \usepackage{forloop}     \usepackage{trace}          % expandable modulo operation     \def\truncdiv#1#2{((#1-(#2-1)/2)/#2)}     \def\moduloop#1#2{(#1-\truncdiv{#1}{#2}*#2)}     \def\modulo#1#2{\number\numexpr\moduloop{#1}{#2}\relax}               % needed to generate index files     \newcounter{ct}     \def\modme{10}          % generate names (.nnd) index file     \newwrite\tempnnd     \immediate\openout\tempnnd=\jobname.nnd     \immediate\write\tempnnd{\protect\noexpand\begin{theindex}}          \forLoop[1]{0}{255}{ct}{         \immediate\write\tempnnd{%           \protect\noexpand\item Surname\thect, Name\thect, %           %\protect\noexpand\hyperpage{\thect}           % hyperlink all to page 1,            % to avoid Latex complaining:           \protect\noexpand\hyperpage{1} %         }         \ifnum\modulo\thect\modme=0           \immediate\write\tempnnd{}           \immediate\write\tempnnd{\protect\noexpand\indexspace}           \immediate\write\tempnnd{}         \else         \fi     }     \immediate\write\tempnnd{\protect\noexpand\end{theindex}}     \immediate\closeout\tempnnd          % generate titles (.tnd) index file     \newwrite\temptnd     \immediate\openout\temptnd=\jobname.tnd     \immediate\write\temptnd{\protect\noexpand\begin{theindex}}          \forLoop{0}{255}{ct}{         \immediate\write\temptnd{%           \protect\noexpand\item \noexpand\emph {Title of Work\thect}, %           %\protect\noexpand\hyperpage{\thect}           % hyperlink all to page 1,            % to avoid Latex complaining:           \protect\noexpand\hyperpage{1} %         }         \ifnum\modulo\thect\modme=0           \immediate\write\temptnd{}           \immediate\write\temptnd{\protect\noexpand\indexspace}           \immediate\write\temptnd{}         \else         \fi     }     \immediate\write\temptnd{\protect\noexpand\end{theindex}}     \immediate\closeout\temptnd               \begin{document}          \clearpage          \section*{Test 1}     \addcontentsline{toc}{section}{Test 1}          \phantomsection % NOTE NO PAGEBREAK PRESENT AROUND HERE!     \addcontentsline{toc}{chapter}{Name Index} \traceon     \printindex[names] \traceoff          \phantomsection     \addcontentsline{toc}{chapter}{Title Index} % master TOC and PDF bookmark     \printindex[titles] % the title index          \end{document}      The first two pages of the output are: ![test.png](http://i.stack.imgur.com/uMaMa.png) Generated with:               montage \     -bordercolor LimeGreen -border 1 \     -density 100 \     test.pdf[0] test.pdf[1] \     -geometry +2+2 -tile 2x1 \     test.png My question is: Can someone explain to me why there a pagebreak before the Name Index section - and how do I remove it? As seen in the MWE, I even tried tracing for it:               $ grep -C10 'Surname0' b.log     {into \Hy@temp=macro:->}     {\ifx}     {true}     {\else}     {blank space  }     {\relax}          \item ->\par \hangindent 40\p@                 <= \item     {\par}                                         <= \par (?)     @firstpass     []\OT1/cmr/m/n/10.95 Surname0, Name0, []0[]    <= typeset Surname0     @\par via @@0 b=0 p=-10000 d=100     @@1: line 1.2- t=100 -> @@0          {changing \hangindent=40.0pt}     {into \hangindent=0.0pt}     %% goal height=476.5225, max depth=5.5         <= pagebreak?!     % t=0.0 g=476.5225 b=10000 p=0 c=100000#       <=    WHERE FROM??     {vertical mode: \hangindent}     {changing \hangindent=0.0pt}     {into \hangindent=40.0pt}      ... but I simply don't understand which command would cause a new page **after** the first name is typeset ?! And if the pagebreak happened after `Surname0` got typeset, why isn't `Surname0` on first page ??!


title: How to set fixed (8mm) linespacing?

text: My university wants me to have in my report line spacing of not less than 8mm. ( Font size must be 11pt or larger. ) How can I specify this other than using \lineskip which is discouraged? I'd like to use memoir but even with setspace I could not find how to get this done.


title: Use of overlay command in a graph

text: I have a diagram of part of a circle centered at the origin, an angle marked "alpha," a radius, and two line segments having an endpoint on the x-axis. It should have the following two modifications. (The first modification involves use of the `overlay` command.) As displayed in the diagram, the label (or node) "P = (r\cos\alpha, \, r\sin\alpha)" interferes with the dashed line segment between the x-axis and Q. It should be in a rectangular node over this line segment. (If the label is put in the north west position with respect to P, it should be in a rectangular node over the circle.) The angle \alpha should be midway along the arc.               \documentclass[border=10pt]{standalone}%     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{calc,positioning,intersections}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \def\ang{50} % 0< \ang<90          \begin{document}               \begin{center}     \begin{tikzpicture}[     dot/.style={     fill,     circle,     inner sep=1.5pt     }     ]     \clip (-1,-1) rectangle (7,7);     \draw[dashed,fill=white,name path=curve] (0,0) coordinate(O){} circle [radius=4];     \draw[<->] (-5,0) -- (5,0) node[below] {$x$};     \draw[<->] (0,-5) node (yaxis) {} -- (0,5) node[right] {$y$};          \path[name path=lineb] (0,0) -- (\ang:5);     \path[dashed] (0,0) -- (\ang:7);     \draw[dashed] (0,0) -- (4,4.76701437);     \draw[dashed] (4,0) -- (4,4.76701437);     \draw[dashed] (2.5711504,0) -- (2.5711504,3.06417777);     \node[dot,label={right:$P=(r\cos\alpha, \, r\sin\alpha)$}] at (2.5711504,3.06417777) {};     \node[dot,label={right:$Q=(r, \, r\tan\alpha)$}] at (4,4.76701437) {};     \draw[->] (0,0) --node[pos=1.25,above]{$\alpha$} (0.8,0) arc (0:\ang:0.8cm) ;               \path[name path=linec] (2,0) -- (2,3);      \draw[name intersections={of=lineb and linec, by={c}},thick]{};     \end{tikzpicture}     \end{center}          \end{document}


title: Numbering subsubsections in beamer

text: I tried using `\setbeamertemplate{subsubsection in toc}[subsubsections numbered]` but this does not seem to work. Here is a full example:               \documentclass{beamer}          \setbeamertemplate{section in toc}[sections numbered]     \setbeamertemplate{subsection in toc}[subsections numbered]     \setbeamertemplate{subsubsection in toc}[subsubsections numbered]          \begin{document}          \section{Section 1}       \subsection{Subsection 1.1}         \subsubsection{Subsubsection 1.1.1}         \subsubsection{Subsubsection 1.1.2}       \subsection{Subsection 1.2}         \subsubsection{Subsubsection 1.2.1}         \subsubsection{Subsubsection 1.2.2}          \section{Section 2}       \subsection{Subsection 2.1}         \subsubsection{Subsubsection 2.1.1}         \subsubsection{Subsubsection 2.1.2}       \subsection{Subsection 2.2}         \subsubsection{Subsubsection 2.2.1}         \subsubsection{Subsubsection 2.2.2}          \begin{frame}\frametitle{Table of Contents}       \tableofcontents     \end{frame}     \end{document}      With the output being ![Output of the above simple example](http://i.stack.imgur.com/mMT8F.jpg)


title: Skim 1.4.8 with Aquamacs : not opening Skim

text: I just started using Aquamacs and Skim but I cannot even launch Skim from Aquamacs when I compiled latex. I can use Adobe Acrobat Pro but I think I will get sync in Skim. I am using this .emacs file. Could any one share working .emacs file? I look through all over the Internet but nothing is working so far. Thanks,


title: How to create my own list of things

text: I’m writing a document in the latex and it contains some BNF grammar noations in several places of the documents. (I used verbatim package in order to write these BNF grammar notations) Now I want to add a new section to the document that shows name of all grammar notation and their page numbers. This should be similar to “ **List of Figures** ” page. I’m new to Latex and your help will be very helpful for me. Thanks


title: biblatex-examples.bib is incorrectly being used as a bibliography source

text: I have just made the transition to Biblatex and Biber and something strange is happening. I load the `biblatex` package and it's working normally:               \usepackage[%     backend=biber,     sorting=nyt,     style=apa,     natbib=true]{biblatex}      Then I add the `bib` file: `\addbibresource{./biblist.bib}` However, when I compile, I get warnings that an article/bookt etc.. is missing a required field. Here's an example: `article aksin is missing required field year` There are many more of them and all of them are not in my bibliography file. They are actually in a file called `biblatex-examples.bib` which is stored in: `/usr/local/texlive/2011/texmf-dist/bibtex/bib/biblatex/biblatex-examples.bib` The file can be obtained from here as well. These errors **do not** appear in the log file but only in Eclipse (TeXlipse). Also, the items in that file do not appear in the compiled pdf file! I want to know why is this file being used and how can I stop that. I've got enough warnings to deal with! * * * **Edit:** 1- The warnings do not disappear after loading the file using `\addbibresource{biblatex-examples.bib}`. In fact, the `bib` file isn't compiled or included at all. 2- This is strange, there is nothing about `biber` in the log file. However, everything about the bibliography is in the `.blg` file. Here is what's in that file:               [1] Config.pm:300> INFO - This is Biber 0.9.9     [1] Config.pm:303> INFO - Logfile is 'phdthesis.blg'     [2] biber:145> INFO - === Mon Jun 25, 2012, 21:09:08     [3] Biber.pm:271> INFO - Reading 'phdthesis.bcf'     [38] Biber.pm:586> INFO - Found 52 citekeys in bib section 0     [56] Biber.pm:2585> INFO - Processing bib section 0     [94] Biber.pm:2677> INFO - Looking for bibtex format file './biblist.bib' for section 0     [101] bibtex.pm:833> INFO - Decoding LaTeX character macros into UTF-8     [131] bibtex.pm:837> INFO - Finished Decoding LaTeX character macros into UTF-8     [132] bibtex.pm:708> INFO - Found BibTeX data source './biblist.bib'     [478] Biber.pm:2480> INFO - Sorting list 'MAIN' keys     [479] Biber.pm:2484> INFO - No sort tailoring available for locale 'en_GB.UTF-8'     [746] Biber.pm:2480> INFO - Sorting list 'SHORTHANDS' keys     [747] Biber.pm:2484> INFO - No sort tailoring available for locale 'en_GB.UTF-8'     [869] bbl.pm:427> INFO - Writing 'phdthesis.bbl' with encoding 'UTF-8'     [882] bbl.pm:498> INFO - Output to phdthesis.bbl      3- I deleted all the `aux` files and tried again. The warnings still appear. I have a feeling it's a TeXlipse issue, I went and checked for the arguments passed when compiling documents, there was nothing other than `%input` for bother Biber and BibTex. Just in case a package related to Biblatex is causing this issue. This is what I load:               \usepackage[UKenglish]{babel}     \usepackage{csquotes}     \usepackage[%     backend=biber,     sorting=nyt,     style=apa,     natbib=true]{biblatex}     \DeclareLanguageMapping{british}{british-apa}


title: Is there a way to set the tab length in any other unit than pixels in TeXworks?

text: OK, this might be more for http://superuser.com, but I guess I should give it a try here: So, I use TeXworks from the TeXLive repo. Or at least, I started to, since I need to have a LaTeX suite installed on Windows. I used TeXLive for Windows, it comes with TeXworks. The only editor I'm used to, is Vim. TeXworks seems to be a good editor, though. Now, the way it treats indentation, is really _weird_. I can set the `Tab` length in pixel. In other words, I can assign a width in pixel for every tab character: ![enter image description here](http://i.stack.imgur.com/PZkZS.png) What I would like, though, is a tab size in characters. And most importantly: I need the tab key to produce spaces. I am one of those people, that use two or four (depending on the language) spaces, instead of tabs. Is that possible with TeXworks? In case it's not possible, I'm going to have to ditch TeXworks for Notepad++.


title: 19 simple tables giving "TeX capacity exceeded" / "Too many unprocessed floats"?

text: When I added a couple of rather unremarkable tables to my document, it stopped compiling (using `pdflatex`): _"TeX capacity exceeded (main memory)"_ I searched the web a bit (well, actually, mostly tex.SE), and found mention that using `lualatex` should avoid memory issues. So I tried running the code with `lualatex`, and got _"Too many unprocessed floats"_ So, I tried to come up with a minimal working example, and was surprised to find that this little bit of code was sufficient to trigger the problem:               \documentclass{scrbook}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}          \begin{document}          \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}     \begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}          \end{document}      Apparently, I am missing something essential here, as 19 "simple" tables shouldn't be bringing LaTeX down...?!?


title: My figures end up outside the document

text: > **Possible Duplicate:**   >  19 simple tables giving "TeX capacity exceeded" / "Too many unprocessed > floats"? I have 11 tables and 10 figures that I have put in an appendix to my paper. The figures showed nicely in a pdf at first and then I started adding one table at the time. When I came to the sum of 18 items the three last figures were no longer in the document. I see the y-axis of two of them in the right margin of my paper. What has happened? My figures are from Matlab (one from excel) all in png format. They are put in the doument with the following command:               \begin{figure}[!h]     \begin{center}     \caption{Type combinations over income}     \label{ibin5}     \includegraphics[width=0.5\textwidth]{ibintype}     \end{center}     \end{figure}      Regarding the tables, most are constructed in Matlab with the print function and some directly in latex. Command for the ones from Matlab:               \begin{table}[!h]     \begin{center}     \caption{Parameter estimates}     \label{param}     \input{param}     \end{center}     \end{table}      I use article as document class and the following packages:               \usepackage{graphicx}     \usepackage{multirow}     \usepackage{color}     \usepackage{threeparttable}


title: Looking for specific lower-case script "r" symbol/font

text: I'm looking for the lowercase script r shown below (used here to denote the rank of a matrix). Does anyone know how to reproduce it? ![enter image description here](http://i.stack.imgur.com/6G4t9.png)


title: Writing thesis using fancyhdr - problems with section title

text: I am writing my thesis using LaTeX with a provided thesis document class, which uses `fancyhdr`. My problem is that both the chapter and section titles appear automatically in the header, writing over each other. Ideally i would like to remove the section titles from the header and leave the chapter headers, but I can't find how to do this. How can this be done?


title: Create a math matrix in TikZ partition lines

text: I want to draw a math matrix in TikZ, where I can draw helping partition lines. So far I found it pretty simple to just draw a matrix with brackets.               \begin{tikzpicture}       \matrix [matrix of math nodes,left delimiter={[},right delimiter={]}]       {         1  & 2   & 1 & 0 & 0 & 10 \\         3  & 2   & 0 & 1 & 0 & 20 \\         -2 & -10 & 0 & 0 & 1 & 0  \\       };     \end{tikzpicture}      However, I would like to partition the matrix with a vertical line between columns 5 and 6, and a horizontal line between rows 2 and 3. Furthermore it could nice to have "identification variables" outside the brackets (top). ![Matrix with formatting](http://i.stack.imgur.com/RWLAV.jpg)


title: TikZ: Line with large dots

text: Is there a simple way to draw a line like with `\draw[dotted] (0,0) -- (1,0);` but with larger (radius about 1mm) and more distant (about 4mm) dots? I've looked in the TikZ & PGF manual, section "15.3.2 Graphic Parameters: Dash Pattern" but found nothing useful. My workaround is using a `\foreach` and drawing `circle` nodes.


title: Get certified in TeX/LaTeX

text: I was wondering if there are any ways to get certified in TeX/LaTeX? This would be useful, e.g., for providing a way of quantifying the expertise someone has with TeX, LaTeX or other TeX flavors.


title: How to change spaces between items in Table of Contents

text: Is it possible to get it without using package `titletoc`? I'm using special chapter style which doesn't work with this package.


title: Typesetting long poetry side by side across multiple pages

text: I've been trying to typeset a long poem (The Lady of Shalott) and putting the translated text besides it, as it is shown in this question: How to typeset two verse environments side by side However, the poem in question is quite long and using the `minipage` envinronment is not feasible since it doesn't let the poem span across multiple pages. The fact is that, for example, I need to keep the line-to-line correspondence (if a verse bar goes to a new line because it's too long, the other one should reflect that change).


title: How to make part titles visible in ConTeXt?

text: ConTeXt has `\part`, `\chapter`, and `\section` titles, however, it seems that `\part` is disabled by default. If I used `\part` in my document, it is visible in the table of contents, but not in the document. I have tried setting it up myself, but this does not work:               \setuphead[part][number=no, align=middle]        * What is the basic code needed to display and begin setting up and customizing `\part` titles?


title: Is it possible to draw a nonprinting box around text, as in the hyperref package?

text: I would like to be able to draw a box that shows up on in the PDF but does not print, just like the boxes around links that are made using the `hyperref` package. I would like to put a `minipage` environment with multiple paragraphs inside the box.


title: How can I sort references by chapter?

text: I'm writing a report and I'd like to have one bibliography at the end of the document, where the references are sorted by chapter like that : Chapter 1's title ref 1 ref 2 Chapter 2's title ref 4 ref5 Does anyone have an idea of how I could do it?


title: Enumerate pattern: 1, 1, 2, 2, 3, 3, ... , etc

text: This is a follow-up question to \include on every other page?. I went with what the best answer suggested and surrounded each question and answer by `\begin{filecontents}{some title}` and `\end{filecontents}`, giving a code similar to this here:               \documentclass[12pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{enumitem}          \begin{document}     \begin{center}     \textbf{Mock Exam}     \end{center}          \usepackage{filecontents}     \begin{filecontents}{question-01}     \begin{enumerate}[resume]     \item Here's a question. \par     \begin{enumerate}[label=(\Alph*)]     \item Option A     \item Option B     \item Option C     \item Option D     \item Option E     \end{enumerate}     \end{filecontents}          \begin{filecontents}{question-02}     \pagebreak     \begin{enumerate}[resume]     \item Here's another question.\par     \begin{enumerate}[label=(\Alph*)]     \item Option A     \item Option B     \item Option C     \item Option D     \item Option E     \end{enumerate}     \end{filecontents}          \input{question-01}     \input{question-02}     \end{document}      This works for **question numbering** (i.e, it assigns the questions the correct numbers), but what will happen once I bring in the solutions? If I add this code in:               \begin{filecontents}{solution-01}     \begin{enumerate}[resume]     \item (A)\par          \vspace{0.2cm}     -Some stuff telling you why the answer is (A)-\par     \end{enumerate}     \end{filecontents}          \begin{filecontents}{solution-02}     \begin{enumerate}[resume]     \item (C)\par          \vspace{0.2cm}     -Some stuff telling you why the answer is (C)-\par     \end{enumerate}     \end{filecontents}      and then insert where the solutions need to go, then I'll get               \documentclass[12pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{enumitem}          \begin{document}     \begin{center}     \textbf{Mock Exam}     \end{center}          \usepackage{filecontents}     \begin{filecontents}{question-01}     \begin{enumerate}[resume]     \item Here's a question. \par     \begin{enumerate}[label=(\Alph*)]     \item Option A     \item Option B     \item Option C     \item Option D     \item Option E     \end{enumerate}     \end{filecontents}          \begin{filecontents}{question-02}     \pagebreak     \begin{enumerate}[resume]     \item Here's another question.\par     \begin{enumerate}[label=(\Alph*)]     \item Option A     \item Option B     \item Option C     \item Option D     \item Option E     \end{enumerate}     \end{filecontents}          \begin{filecontents}{solution-01}     \begin{enumerate}[resume]     \item (A)\par          \vspace{0.2cm}     -Some stuff telling you why the answer is (A)-\par     \end{enumerate}     \end{filecontents}          \begin{filecontents}{solution-02}     \begin{enumerate}[resume]     \item (C)\par          \vspace{0.2cm}     -Some stuff telling you why the answer is (C)-\par     \end{enumerate}     \end{filecontents}          \input{question-01}     \input{solution-01}     \input{question-02}     \input{solution-02}     \end{document}      which is unfortunately going to give the following numbering: 1\. Question 1   2\. Solution 1   3\. Question 2   4\. Solution 2 I need the numbering to be 1\. Question 1   1\. Solution 1   2\. Question 2   2\. Solution 2 Any ideas? FYI: I do not want to assign these questions and solutions hard values - they may need to be moved around.


title: Producing LaTeX Table

text: Im relatively new to LaTeX and trying to create the table below, but so far I'm unsuccessful. Any help will be appreciated. ![enter image description here](http://i.stack.imgur.com/g6kfJ.png)


title: TeX live 2012 full installation on gentoo linux

text: What is the "gentoo-way" to install the latest full TeX live collection? I know the tex live installer script to install the complete collection manually, but I would prefer to "emerge" a gentoo package. I could not find a meta package like `virtual/texlive-full` yet. Some gentoo packages contain plenty LaTeX packages other contain some only one package (like ucs).


title: Add vertical space only if no vertical space was added previously

text: Perhaps this is the silliest of all the questions, but, let’s suppose that there are two custom commands:               \newcommand{\cmdA}[1]{         #1         \vspace{1cm}     }          \newcommand{\cmdB}[1]{         \vspace{1cm}     % should be some sort of intelligent space         #1     }      Now, in the real latex world, if I use:               \cmdA{Test text A}          \cmdB{Test text B}      The output will be: Test text A \-------------- 2cm in here Test text B With 2cm in between. Instead, I want 1cm in between, yet, in the case of:               \cmdA{Test text A}          In the middle text          \cmdB{Test text B}      The output should be: Test text A \-------------- 1cm in here In the middle text \-------------- 1cm in here Test text B Separated by 1cm each. This is the trivial example, using silly custom commands. But I wonder if there is some sort of a generic solution.


title: Weird problem with pgfsys-xetex.def and fadings (xelatex)

text: [...]     Your graphic driver pgfsys-xetex.def does not support fadings     [...]      That's what the following MWE returns:               \documentclass{beamer}     \usecolortheme{rose}     \usecolortheme{seahorse}     \useoutertheme{infolines}     \setbeamertemplate{blocks}[rounded][shadow=true]          \begin{document}     \begin{frame}{}     \begin{block}{}     Some text     \end{block}     \end{frame}     \end{document}      I extracted this from my presentation which compiles fine on OSX with MacTeX 2011 (and xelatex). Now on Debian with a fresh net-installed TeXLive 2011, I run into this error.


title: A \typeout (or expandable command) that can expand once - or with variable levels of expansion?

text: Consider the following MWE:               \documentclass[12pt]{article}          \begin{document}          \def\aaa{something}     \typeout{=1==\aaa==}     \typeout{=1==\meaning\aaa==}     \typeout{}          \def\bbb{else \aaa, else}     \typeout{=2==\bbb==}     \typeout{=2==\meaning\bbb==}     \typeout{}          \def\ccc{third \bbb, level}     \typeout{=3==\ccc==}     \typeout{=3==\meaning\ccc==}     \typeout{}          \end{document}      It outputs the following to terminal:               =1==something==     =1==macro:->something==          =2==else something, else==     =2==macro:->else \aaa , else==          =3==third else something, else, level==     =3==macro:->third \bbb , level==      Thus, I'd consider (in this case) `\meaning` to provide unexpanded contents of a macro (that would be "null" level of expansion); while `\typeout` does "infinite" expansion (until no more tokens to be expanded). I've noted that `\typeout` calls `\write`:               $ texdef -t latex -c book -p titletoc typeout -f     \typeout is defined by (La)TeX.          \typeout:     macro:#1->\begingroup \set@display@protect \immediate \write \@unused {#1}\endgroup       ... so this "infinite" expansion behavior may be due to `\write`. What I'd like, eventually, is an expandable function, which will accepts a numeric "level of expansion", and could be called like this:               # just a fake interface definition for testing     \def\expandlevel#1\nil#2\nil{     ---#1---#2--     }          \edef\yyy{\expandlevel0\nil\ccc\nil}     \typeout{\yyy}      ... such that:   * When I call for level null expansion - what I get when I typeout are unexpanded contents (like `\meaning`); pseudo:               * \typeout{==\expandlevel0\nil\ccc\nil==}     ==third \bbb , level==   * When I call for a single expansion - what I get is (pseudo):               * \typeout{==\expandlevel1\nil\ccc\nil==}     ==third else \aaa , else , level==   * When I call for infinite expansion - that would be 99 levels `:)` \- what I get is the same as `\typeout` would perform; pseudo:               * \typeout{==\expandlevel99\nil\ccc\nil==}     ==third else something, else, level== Unexpandable/protected tokens would remain (or be shown with `\inaccessible`), as `\typeout` performs currently.. In lack of a "real" expandable macro like that, are there any tricks to coax `\typeout` to behave in similar fashion (if possible)?


title: "reverse-engineering" a certain pdf

text: I am trying to figure out how to create a latex amble that would lead to a PDF similar to the following: http://arxiv.org/abs/0811.4413 I am talking about margins, font size (of various headers, etc.), location of the title, authors, etc. Anyone has an idea how to "reverse-engineer" the PDF in this specific case?


title: Hebrew sections with cjhebrew (and hyprref)

text: I sometimes write hebrew words in english or german texts. For this I use cjhebrew. It works fine unless I try to write a section or subsection in hebrew. With               \subsection{\cjRL{kwl}}      I get               aTeX Font Warning: Font shape `U/cjheb/bx/n' undefined     (Font)              using `U/cjheb/m/n' instead on input line 27.          ! Argument of \@sect has an extra }.     <inserted text>                  \par      l.27   \subsection{\cjRL{kwl}}      (I tried \<...> before, same result). The problem turned out to be an interference with hyperref. Which I use to link sections and the toc in the pdf-document. Is there an alternative either for hyperref or the section?


title: Link to index in TOC points does not point to index, but to whatever is right before index

text: My LaTeX document contains an index which is also referenced in the table of contents via `\addcontentsline`. The page number displayed in the TOC is correct. The link, however, is not. (If I view the document structure in my PDF viewer, Evince, the page number also appears to be wrong.) I found out that the link always seems to point to whatever is right before the index in the document structure (for example a `section`, `subsection` or `paragraph`). In my example, the link generated by Pdflatex points to the paragraph "Und so weiter" which is right before the index. If I remove "Und so weiter" and compile again, the link will point to the subsection "Hallo". ## Minimal working example               \documentclass[11pt, titlepage]{article}     \usepackage[ngerman]{babel}     \usepackage{blindtext}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{makeidx}     \usepackage{hyperref}          \pagestyle{plain}     \makeindex          \title{Stichwortverzeichnis bei \LaTeX\ korrekt verlinken}     \author{Kunigunde Knitterkleid}          %%%%% DOCUMENT %%%%%          \begin{document}     \maketitle          \setcounter{tocdepth}{3}     \tableofcontents     \thispagestyle{empty}     \clearpage          \section{Abschnitt 1}     \subsection{Blabla}     Lorem\index{Lorem|see{Lorem ipsum}} ipsum\index{Lorem ipsum} dolor sit amet, consectetuer adipiscing elit.     Donec ullamcorper, felis non sodales\index{sodales} commodo, lectus\index{lectus} velit ultrices augue, a dignissim nibh lectus placerat pede.     \clearpage          \section{Abschnitt 2}     \subsection{Hallo}     \paragraph{Und so weiter}     \blindtext     \clearpage          %%%%% INDEX %%%%%          \renewcommand{\indexname}{Stichwortverzeichnis}     \addcontentsline{toc}{section}{Stichwortverzeichnis}     \printindex          \end{document}      **Oddly enough, it works perfectly when using a KOMA script class.** The only changes I made was changing the document class to `scrartcl` with the option `index=totoc` and removing the unnecessary `\addcontentsline` line. ## Minimal working example using KOMA script               \documentclass[11pt, titlepage, index=totoc]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage{blindtext}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{makeidx}     \usepackage{hyperref}          \pagestyle{plain}     \makeindex          \title{Stichwortverzeichnis bei \LaTeX\ korrekt verlinken}     \author{Kunigunde Knitterkleid}          %%%%% DOCUMENT %%%%%          \begin{document}     \maketitle          \setcounter{tocdepth}{3}     \tableofcontents     \thispagestyle{empty}     \clearpage          \section{Abschnitt 1}     \subsection{Blabla}     Lorem\index{Lorem|see{Lorem ipsum}} ipsum\index{Lorem ipsum} dolor sit amet, consectetuer adipiscing elit.     Donec ullamcorper, felis non sodales\index{sodales} commodo, lectus\index{lectus} velit ultrices augue, a dignissim nibh lectus placerat pede.     \clearpage          \section{Abschnitt 2}     \subsection{Hallo}     \paragraph{Und so weiter}     \blindtext     \clearpage          %%%%% INDEX %%%%%          \renewcommand{\indexname}{Stichwortverzeichnis}     \printindex          \end{document}      Does anybody have any idea how I can make the link point to the correct location (apart from using KOMA script instead)? I am using Tex Live 2009 on Linux.


title: How to change the maths symbols in preamble?

text: I have already finished writing my work and now I decided to change notation. How can I do it in preamble? More precisely I use `$\mathcal{R}([a,b])$` in all my work and I would prefer to get `$\mathcal{R}[a,b]$`.


title: ProvidesPackage and usepackage

text: I have seen papers containing a command `\ProvidesPackage`. Is it different than `\usepackage`? What is the difference between `\ProvidesPackage` and `\usepackage`?


title: Unwanted separation in an equation

text: I have an equation with an intersection which has multiple limit levels, like this,               \[     \langle H, H'\rangle = \bigcap_{\substack{     L \leq G, \\     H \cup H' \subseteq L.     }}L     \]      ![enter image description here](http://i.stack.imgur.com/EKj0Z.png) It compiles nicely, but that code prints _L_ and the equal sign too far apart from the intersection. Is there a way to eliminate those spaces in order to make the equation look better?


title: Changing in-text cite

text: \documentclass[twoside, a4paper, 10pt]{article}     \usepackage{natbib}     \begin{document}          we follow the selection criteria proposed by \cite{feem}          \bibliographystyle{apa-good}     \bibliography{bibliography}          \end{document}      In my bibliography bibtex file I have this entry:               @misc{feem,         author  = "{Monitor Group-Fondazione Eni Enrico Mattei (FEEM)}",         title   = "{``Weathering the Storm: Sovereign Wealth Funds in the Global Economic Crisis of 2008''}",         year    = "2009",         howpublished = "William F. Miracky and Bernardo Bortolotti, eds. (Monitor Group)",}      Which results in the following output: ![enter image description here](http://i.stack.imgur.com/tr6yd.jpg) However, I would like to change the output to: ![enter image description here](http://i.stack.imgur.com/H1nH9.jpg) That is, I want to keep the author details in the bibliography entry as Monitor 'Group-Fondazione Eni Enrico Mattei (FEEM)' however I just want to change how it's cited in-text. How can I achieve that?


title: vbox overflow when using TitleGM causing a blank page to preceed the title page

text: I'm getting a blank page that precedes my title page, and I suspect that it is due to the vbox overflow warning that I'm getting. The problem is that I don't know how to properly adjust the vbox setting! Can anyone help? Here an example document that shows the problem:               \documentclass[10pt,ebook,oneside,openright]{memoir}     \usepackage{color}     \usepackage{graphicx}     \usepackage{rotfloat}     \usepackage[scaled]{berasans}     \usepackage[T1]{fontenc}     \usepackage{type1cm}     \usepackage{eso-pic}     \usepackage{setspace}     \usepackage{listings}     \usepackage{lmodern}     \usepackage{tikz}     \usepackage{framed}     \ifpdf       \usepackage{pdfcolmk}     \fi          \chapterstyle{madsen}     \pagestyle{ruled}     \setsecnumdepth{subsection}     \renewcommand*\familydefault{\sfdefault}     \floatstyle{boxed}     \linespread{1.2}     \restylefloat{figure}          \newlength{\drop}     \newcommand*{\titleGM}{     \thispagestyle{empty}     \begingroup       \drop = 0.1\textheight       \vspace*{\baselineskip}       \vfill       \hbox{          \hspace*{0.2\textwidth}          \rule{1pt}{\dimexpr\textheight-28pt\relax} % Vertical line         \hspace*{0.05\textwidth}          \parbox[b]{0.75\textwidth}{            \vbox{             \vspace{\drop}         {\noindent\HUGE\bfseries Growing The\\[0.5\baselineskip]Money Tree}\\[2    \baselineskip]         {\Large\itshape Cultivating Financial Freedom One Leaf At A Time}\\[.37    \baselineskip]              {\Large \textsc{John Svazic}}\par              \vspace{0.5\textheight}              {\noindent ARM Trading Press}\\[\baselineskip]           }% end of vbox         }         }     \endgroup}          \begin{document}     \titleGM     \frontmatter     \mainmatter     It was a dark and stormy night...     \backmatter     \end{document}


title: Multilevel bullets

text: I want to write something that I could use for multilevel bullets, for example: I. Title   1. Subtitle a. sub-subtitle ... In LaTex I got                \def\startitems      {       \begingroup       \parindent\z@       \@itemdepth\@ne       \@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname       \leftskip\@totalleftmargin       \everypar       {         \llap{           \makebox[\labelsep][l]           {             \csname labelitem\romannumeral\the\@itemdepth\endcsname           }         }       }       \obeylines     }          \def\stopitems     {       \bottom       \par     \endgroup     }     \def\up     {       \par       \begingroup     \advance\@itemdepth\@ne     \advance\@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname     \leftskip\@totalleftmargin     }          \def\down     {         \par         \endgroup     }          \def\bottom     {       \ifnum\@itemdepth>\@ne         \down\bottom       \fi     }      and it's working fine, but I need it in plain TeX, in which I have no idea how to do that. Could anyone help me, please?


title: Apalike Bibliographystyle

text: I am currently working no my Masterthesis. I import it the packages...:               \usepackage{natbib}     \usepackage{apalike}      And then add the references section in this way:               \bibliographystyle{apalike}     \bibliography{bib}      The resulting bibliography is: XXX, D. M., XXX, A., and XXX, P. (2012). title of article. international journal XY, 49:479–487. XXX, A. and XXX, D. (2004). Title of inproceeding. In Booktitle, pages 327–330. IEEE. ....In Bibtex, the first entry is an "article", the second an "inproceeding". It seems strange to me that in the second one the word "pages" is written, in the first entry not. From my point of view this seems to be inconsistent. Do I anything wrong? Is it possible to fix this "issue" somehow?


title: How to fix the beamer and amsthm conflict?

text: I want to have a style of `Theorem 1`, and the next one is `Theorem 1'` with the help of Amsthm package. The following code seems alright, but can't be compiled:               \documentclass{beamer}          \newtheorem{mthm}{Theorem}     \newtheorem{thm}{Theorem}     \renewcommand{\themthm}{\ref{thm:1}'}          \begin{document}     \begin{frame}       \begin{thm}\label{thm:1}       test       \end{thm}       \begin{mthm}         test       \end{mthm}     \end{frame}     \end{document}       The err. log is :               ! Missing \endcsname inserted.     <to be read again>                         \csname\endcsname     l.16 \end{frame}          ?      ! Emergency stop.     <to be read again>                         \csname\endcsname     l.16 \end{frame}      I find the err cased by the `\renewcommand{\themthm}{\ref{thm:1}'}` line but how to fix this?


title: Biblatex urldate set to today

text: When writing a document I want the `urldate` (the date of visit) of online bibliographical entries set to the day of compilation. Consider the following MWE:               \documentclass{article}     \usepackage[backend=biber]{biblatex}     \begin{filecontents}{references.bib}     @online{abc,     title = {This is a Title},     author = {Author, Some},     url = {http://www.somesite.com},     date = {2013-10-10},     urldate = {\year-\month-\day} % this does not work. Also urldate = {\today} doesn't.     }     \end{filecontents}          \addbibresource{references.bib}     \begin{document}     \cite{abc}.     \printbibliography     \end{document}      Unfortunately this does not work. The hypthens are in the text because `biblatex` expect dates to be in the form of `yyyy-mm-dd`. Any ideas on how to resolve this issue?


title: Why does titlesec cause bizarre line breaks within \paragraph?

text: Consider the following example:               \documentclass[12pt,a6paper]{article}     %\usepackage{titlesec}     \usepackage[textwidth=79mm]{geometry}          \begin{document}          \paragraph{I guess we'll have to make a few trade-offs.} That's really the     truth of the matter, isn't it? It's just a reality we'll have to face.          \paragraph{I have to say, that's a very twentieth-century mindset.} Frankly,     you need to update your way of thinking and stop living in the past.          \paragraph{We hold these truths to be self-evident.} That all men are     created equal, that they are endowed by their creator with certain     unalienable rights, that among these are life, liberty, and the pursuit of     happiness.          \end{document}      Compiling this yields what you would expect: ![Document with reasonable line breaks](http://www.cs.cmu.edu/~jmbarnes/titlesec0.png) But uncomment `\usepackage{titlesec}`, and all kinds of weirdness happens: ![Document with weird line breaks](http://www.cs.cmu.edu/~jmbarnes/titlesec1.png) In the first paragraph, there is now an overfull hbox, because _trade-offs_ now refuses to be split at the hyphen. In the second paragraph, the hyphen is replaced by an en dash! And in the third, the line is broken at a point that would normally be illegal in LaTeX, because LaTeX normally won't insert an additional break point in an already hyphenated word. What's going on here? What's causing the automatic hyphenation to behave so strangely? This may simply be a bug in titlesec that needs to be fixed, and I'll e-mail the package creator to notify him of this behavior. But even if it is a bug, is there a way I can work around it until it's fixed?


title: TikZ: How to draw an arrow in the middle of the line?

text: Like this:               .------<------.     |             |     v             ^     |             |     '------>------'      I am currently using               \begin{scope}[very thick,->]       \draw (-4,1)--(-4,0)--(0.1,0);       \draw (0,0)--(4,0)--(4,1.1);       \draw (4,1)--(4,2)--(-0.1,2);       \draw (0,2)--(-4,2)--(-4,0.9);     \end{scope}      but this is rather inelegant. I prefer something more like               \begin{scope}[very thick,middle decoration=>]                   %           ^^^^^^^^^^^^^^^^^ a hypothetical option       \draw (-4,0)--(4,0);       \draw (4,0)--(4,2);       \draw (4,2)--(-4,2);       \draw (-4,2)--(-4,0);     \end{scope}


title: Arrow decoration in TIKZ

text: > **Possible Duplicate:**   >  TikZ: How to draw an arrow in the middle of the line? I'd like to use Tikz for drawing Feynman diagrams. I found an example in TeXample, but it looks inefficient. One of the things I would appreciate is that the decoration `>` would appear midway of each part of the path, say               \draw[mypath] (0,0) -- (1,1) -- (2,1) -- (3,0);      to produce a path formed by three arrows. **Questions**   * Is this possible?   * How should the style by defined?


title: why did i only use sudo open emacs C-c C-c can work with AUCTeX?

text: two question: 1.use sudo open emacs the AUCTeX can work with C-c C-c and C-c C-v 2.sudo open emacs C-c C-c show Latex erros system mac OS X Mavericks, auctex11.87.2， emacs24, zsh.


title: Change in \lstdefinelanguage the font?

text: Im using `\lstdefinelanguage` to add some new languages. Now everything is fine, I just would like to add another font to my language. I would like to use **inconsolata**. I have now this:               %...     \usepackage{inconsolata}     \lstdefinelanguage{Scala}     {       %...       basicstyle=\small %what else do i have to add to use inconsolata?     }      Any ideas? Thanks


title: Too long equation without splitting

text: I am writing an equaition which is too long-wide. I don't want it to split. I tried to change the fontsize within the equation enviroment but it didn't work. I am using               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \begin{document}     \begin{equation}     {\footnotesize G=centroid\cdot \frac{range[V]}{\#\,channels}\cdot\frac{W_{pair}[eV]}    {E_{particle}[keV]}\cdot \frac{1}{(coarse\,gain)\cdot(fine\,gain)}\cdot \frac{10^6}   {X[mV]\cdot E_{cg}[eV]}}     \label{eq:Gain}     \end{equation}     \end{document}      Is there a way to achieve that? My output is ![](http://i.imgur.com/KsJmK.jpg) Any ideas?


title: How to ensure that 2 couples of figures are on 2 facing pages?

text: I would like to reproduce the following layout with two figures on one page and two others on the facing pages. ![enter image description here](http://i.stack.imgur.com/hk8mD.png) I would like the first couple to be on an even-numbered page and the second on an odd-numbered page so that all four figures can be seen together when the manuscript is printed and bound.


title: Overlapping colour filling with PSTricks

text: Consider the following diagram:               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[margin = 2cm]{geometry}     \usepackage{pstricks}     \usepackage{rotating}     \usepackage{microtype}          \DisableLigatures[f]{encoding = T1}          \pagestyle{empty}               \begin{document}          \begin{center}       \textbf{\Huge Venn Diagram of Irrational Nonsense}     \end{center}     \vspace{5ex}          \begin{center}     \psset{unit = 2.4}     \begin{pspicture}(-3.5,-1.75)(3.5,4.25)     \psellipse[rot = -50](1.5,0.5)(1.5,3)     \psellipse[rot = 50](-1.5,0.5)(1.5,3)     \psellipse[rot = -50](0,1.8)(1.5,3)     \psellipse[rot = 50](0,1.8)(1.5,3)     \rput(-3.57,1.93){       \begin{rotate}{45}         \shortstack[c]{%           Religious\strut\\[-0.75ex]           Bollocks\strut}       \end{rotate}     }     \rput(-2.1,3.2){       \begin{rotate}{45}         \shortstack[c]{%           Quackery\strut\\[-0.75ex]           Bollocks\strut}       \end{rotate}     }     \rput(3.07,2.33){       \begin{rotate}{315}         \shortstack[c]{%           Paranormal\strut\\[-0.75ex]           Bollocks\strut}       \end{rotate}     }     \rput(1.52,3.78){       \begin{rotate}{315}         \shortstack[c]{%           Pseudoscientific\strut\\[-0.75ex]           Bollocks\strut}       \end{rotate}     }     \rput(0,0.5){Scientology}     {\footnotesize     \rput(0.5,0){\shortstack[c]{%       Psychic\strut\\[-0.75ex]       Surgery\strut}}     \rput(1.5,0.1){Aura Therapy}     \rput(1.7,0.5){Reiki}     \rput(1.9,0.9){Chakra}     \rput(0.6,1){Qi}     \rput(0.9,1.3){Feng Shui}     \rput(1.2,1.6){Past Life Regression}     {\tiny     \rput(2.1,2.43){Ley Lines}     \rput(1.95,2.32){Orgone Energy}     \rput(1.97,2.21){Palmistry}     \rput(1.98,2.1){Orbs}}     \rput(2.9,1.8){Crop Circles}     \rput(3.1,1.5){Ectoplasm}     \rput(3.1,1.2){Telepathy}     \rput(3,0.9){Tarot}     \rput(3,0.6){\shortstack[c]{%       Crystal\strut\\[-0.75ex]       Power\strut}}     \rput(2.9,0.3){\shortstack[c]{%       Automaric\strut\\[-0.75ex]       Writing\strut}}     \rput(2.75,0){Geomancy}     \rput(2.55,-0.25){Levitation}     \rput(2.1,-0.5){Remote Writing}     \rput(2,-0.7){Ghosts}     \rput(1.4,-0.7){Psychics}     \rput(1.5,-1){Poltergeist}     \rput(1.2,-1.2){Seances}     \rput(-0.5,-0.5){Exorcism}     \rput(-0.5,-0.8){Ouija Boards}     \rput(-0.5,-1.1){Spiritualism}     \rput(0,-1.4){Stigmata}     \rput(0.5,-0.5){Akashic Record}     \rput(0.5,-0.8){Occult}     \rput(0.5,-1.1){Voodoo}     \rput(-0.5,0){\shortstack[c]{%       Bible\strut\\[-0.75ex]       Code\strut}}     \rput(-1.9,0.95){\shortstack[c]{%       Apocalyptic\strut\\[-0.75ex]       Prophecies\strut}}     \rput(-1.7,0.6){Intelligent Design}     \rput(-1.6,0.3){Out of Body Experience}     \rput(-1.5,0){Turin Shroud}     \rput(-1.2,1.6){Antrophosophy}     \rput(-0.8,1.1){Alphabiotics}     \rput(0,3.2){Anti Vaccination}     \rput(-0.4,2.9){Cupping}     \rput(0.4,2.9){Chiropratic}     \rput(0,2.6){Bioharmonics}     \rput(-0.4,2.3){Reflexology}     \rput(0.4,2.3){Rolfing}     \rput(0,2){Applied Kinesiology}     \rput(0,1.75){Ear Candles}     \rput(0,1.5){Detox}     {\scriptsize     \rput(0.7,3.7){Chemtrails}     \rput(1,3.525){Astrology}     \rput(1.3,3.35){Numerology}     \rput(1.6,3.175){Hollow Earth}     \rput(1.8,3){Moon Landing Denial}     \rput(1.8,2.825){Dowsing}     \rput(1.8,2.65){Bigfoot}}     \rput(-0.7,3.6){Shiatsu}     \rput(-1,3.4){Acupuncture}     \rput(-1.3,3.2){Homeopathy}     \rput(-1.6,3){Aromatherapy}     \rput(-1.8,2.8){Ayurvedic Medicine}     {\tiny     \rput(-2.1,2.4){\shortstack[c]{%       Angel\strut\\[-0.75ex]       Therapy\strut}}     \rput(-1.98,2.15){\shortstack[c]{%       Faith\strut\\[-0.75ex]       Healing\strut}}}     \rput(-2.8,1.9){Miracles}     \rput(-3,1.6){\shortstack[c]{%       Religious\strut\\[-0.75ex]       Fundamentalism\strut}}     \rput(-3.1,1.3){Reincarnation}     \rput(-3.1,1.05){Creationism}     \rput(-3,0.8){Prayer}     \rput(-2.97,0.5){\shortstack[c]{%       Trans-\strut\\[-0.75ex]       substantiation\strut}}     \rput(-2.85,0.2){Holy Relics}     \rput(-2.65,-0.1){Angels}     \rput(-2.35,-0.4){The Trinity}     \rput(-1.9,-0.7){Karma}}     \end{pspicture}     \end{center}          \end{document}      ![output](http://i.stack.imgur.com/Qu1EZ.jpg) How do I colour the diagram in order to get the following output? ![wanted](http://i.stack.imgur.com/NAUjE.png) Note that the specific colours are not important; it's how I get the overlapping colours.