title: Trying to create a shopping list template, need guidance adjusting line spacing

text: I'm trying to get in the habit of planning out my meals more, and was looking for a template I could use to do so in LaTeX, but I couldn't find anything. What I did find was an already-created pdf that looked like: ![enter image description here](http://i.stack.imgur.com/0TrlJ.png) Which worked alright, but made me wish that there was something like this I could customize (for one, this list seems to be from the UK). After looking around a little with some easier problems (turning bullet points into boxes), I was able to create the following image (I'll post my code at the bottom): ![enter image description here](http://i.stack.imgur.com/gkruZ.png) So far this seems to work alright, but two main problems I'm running into are: (1) getting the underline closer to the bottom of the box and (2) instead of just one column of lines where I can write in ingredients, it'd be nice to have two or three columns, since I generally found it was simpler to just write in what you needed, rather than hope it's on a pre-written list. On top of all of those issues, if anyone has any input on how to make the list more user-friendly or more appealing, I'd love to hear it. Right now mine seems a little bland! As for my code... (I'm toying around with this project in a template that I use for other work that I do, so I know I'm using a variety of packages that I don't really need!) * * *               \documentclass[12pt]{article}     \usepackage{amsmath, amsfonts, amssymb, array}     \usepackage{graphicx, fancyhdr, color}     \usepackage[bottom=1in, top=1in, left=.5in, right=.5in]{geometry}     \usepackage{paralist}     \usepackage{tabto}          \renewcommand{\familydefault}{\sfdefault}          \pagestyle{fancy}     \fancypagestyle{firststyle} % This ensures that the header is only on page one     {     \fancyhead{}     \fancyhead[L]{{\large Week of:\underline{\hspace{5cm}} \hspace{1cm} \textbf{B:} \hspace{1.5cm} \textbf{L:} \hspace{1.5cm} \textbf{D:} \hspace{1.5cm} \fbox{Cost: \hspace{2cm}}}}}     \renewcommand{\headrulewidth}{0pt} % Removes the horizontal bar across the header     \fancyfoot{}     \fancyfoot[C]{\thepage \\ \small{rev: \today}}          \newcommand\mydiv[2]{%     $\strut#1$\kern.25em\smash{\raise.3ex\hbox{$\big)$}}$\mkern-8mu      \overline{\enspace\strut#2}$}          \newenvironment{tabbedenum}[1]      {\NumTabs{#1}\inparaenum\let\latexitem\item       \def\item{\def\item{\tab\latexitem}\latexitem}}      {\endinparaenum}          \setlength{\parindent}{0mm}          \begin{document}     \thispagestyle{firststyle}          \setlength{\fboxrule}{1.5pt}          \framebox[2.5in][l]{ \parbox[t][1.5in]{1in}{} }     \framebox[2.5in][l]{ \parbox[t][1.5in]{1in}{     \begin{itemize} \itemsep-20pt      \renewcommand{\labelitemi}{$\Box$}       \item  \underline{\hspace{2cm}} \\      \item  \underline{\hspace{2cm}} \\      \item  \underline{\hspace{2cm}}      \end{itemize}          } }                    \end{document}


title: Leaked styling from my stackon

text: \documentclass[12pt]{article}     \usepackage{verbatimbox,stackengine,xcolor,hyperref}     \usepackage[left=2cm,right=2cm]{geometry}          \begin{document}          \title{}     \author{}          \maketitle          \section{Overview}     There are two major file types you need to know about when writing tests in Robot Framework and they are the Resource file and the Test Suite. Each test suite can contain multiple test cases, which are comprised of individual test scripts. You must designate the resource file for each test suite, to do so you must define your \textit{\textbf{Resource}} in the \textit{Settings} section eg.\\[1\baselineskip]          \begin{verbbox}     *** Settings ***     Documentation     A resource file with reusable keywords and variables.          Library           Selenium2Library     Library           FakerLibrary    WITH NAME    faker     Library           DateTime    WITH NAME    DateTime     \end{verbbox}     {\centering\stackon[12pt]{\footnotesize\parbox{\textwidth}{ The \textit{Library} keyword tells Robot that it needs to make sure that this is installed and available to use, otherwise it will tell you that importing the library failed. Selenium is needed in \textbf{all} of our resource files.}}{\theverbbox}\\[1\baselineskip]          In the above example I have imported two optional libraries (faker and DateTime). faker creates random data that can be used to populate fields, DateTime allows me to get the current date among other helpful functions. I have also used the \textit{WITH NAME} argument, I have done so because it will make it more obvious to anyone new to Robot Framework tests which functions are being called from these libraries. I did \textbf{not} do this for Selenium because Selenium is the base of most Robot Framework functionality and would not serve to clarify the function of our tests.\\[1\baselineskip]          Example of library keywords:\\[1\baselineskip]          \begin{verbbox}     ${DATE}=    | DateTime.Get Current Date | result_format=%Y-%m-%d     \end{verbbox}          {\centering\stackon[12pt]{\footnotesize\parbox{\textwidth}{ This variable uses the function \textit{Get Current Date} from the \textbf{DateTime} library, you can tell because it uses the prefix that I defined in my earlier example before calling the function.}}{\theverbbox}%       \par}\bigskip          \bigskip          To define a variable you must first define the \textbf{\textit{Variables}} section of the resource file     \begin{verbatim}     *** Variables ***     ${variable name}    variable definition     ${variable name} | variable definition     \end{verbatim}          \end{document}      In my code above the centering of text has leaked through to everything after this, I thought I had closed the "centering" and it wouldn't affect anything outside of it's tags? Why is the styling leaking through and how can I stop it? Thanks in advance.


title: Highlight only current subsection, hide subsections of other sections

text: The _table of contents_ command in my beamer .sty looks like this:               \newcommand{\MyToc}[1]     {         \AtBeginSubsection[]         {             \begin{frame}             \frametitle{#1}             \tableofcontents[currentsection,hideothersubsections,currentsubsection]             \end{frame}         }     }      It shows all sections and subsections with emphasis on the current section and subsection, but I want only the subsections of the current section to be shown, the current subsection be emphasized AND subsections of other sections not to be shown at all:   * section 1   * section 2      * subsection 1 <= inactive, shaded     * subsection 2 <= active subsection, strong colour     * subsection 3 <= inactive, shaded   * section 3 How can that be achieved?


title: Pgfplot barplot with cluster of stackedbars

text: How can I create a pgfplot that have two stacked ybar for each "point in x axis" ? I wan't something like this: ![enter image description here](http://i.stack.imgur.com/oln7l.png) I already have a graph that have one stacked bar for each x point. Some hint on how to extend it or a link for an example will be sufficient.


title: too much spacing in xymatrix

text: I am using xypic package and I wrote the following xymatrix                 \[        \xymatrix{        x       \ar@(ur,dr)[]|{a} \\       |         \\       y       \ar@(ur,dr)[]|{b}\\        |          \\         z        \ar@(ur,dr)[]|{c}          }        \]       but the spacing on the output pdf file is pretty bad (there is too much gap/spacing between the rows). I spent some time modifying as in 3.3 Spacing and rotation [page 9] from this link http://www- bcf.usc.edu/~cautis/tools/xypic.pdf but that link is not helping. Is there a way to make the gap between the rows smaller?


title: How do I close a busy synctex.gz file?

text: I tried to compile a file, and LaTeX didn't like something (I have no idea what). Now, when I try to compile, I am told that "The process cannot access the file because it is being used by another process." So apparently, TeX is still trying to compile the file or something. As best as I can tell, the problem is that a `synctex.gz` file is still (busy). How do I kill this process?


title: Remove the author from the footer of all slides except in the titlepage

text: I want to remove the `\author` from all the slides except the start slide. I have used Warsaw theme. I don't know how to go about this. Please help me Here is my code               \documentclass{beamer}     \setbeamercovered{transparent}     \usetheme{Warsaw}     \begin{document}     \title[\insertframenumber/     \inserttotalframenumber]{Database}     \author{Mark dain \\ \scriptsize{(Reg.No 12345)} }     \institute{Dept. of Information \& Communication Technology}     \date{October 21,2012}     \frame{\titlepage}          \begin{frame}     \frametitle{Table of Contents}     \begin{itemize}     \item Introduction     \item Algorithm for reducing finite automata     \item Reliability models     \item Reduction steps     \item References     \item Conclusion     \end{itemize}     \end{frame}     \end{document}      I dont want author to be displayed in the footer of the second frame.


title: Change section name twice (or make a section appear in TOC only, not in text)?

text: I am trying to have a document with TOC: 1 Introduction 2 blabla 3 Conclusion Bibliography Appendix 1 I want the Bibliography to start with title "Bibliography" but I do not want the Appendix 1 to start with title "Appendix 1". I just want to include some PDF pages without a title preceeding them. I, however, want both Bibliography and Appendix 1 to have headings specifying whether the page is a part of bibliography or Appendix 1. Test document is as follows:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[english,czech]{babel}     \usepackage[nottoc]{tocbibind}     \usepackage{fancyhdr}     \usepackage{pdfpages}     \usepackage{appendix}          \let\stdsection\section     \renewcommand\section{\newpage\stdsection}           \begin{document}     \tableofcontents     \clearpage          \pagestyle{fancy}     \fancyhead{}     \fancyhead[L]{\leftmark}     \section{Úvod}     blabla               \section{Závěr}     bleble          \newpage          \renewcommand{\refname}{Bibliography}     \begin{thebibliography}{9}     bli     \end{thebibliography}     \appendix     \renewcommand{\appendixtocname}{Appendix 1}     \renewcommand{\appendixpagename}{Appendix 1}     \noappendicestocpagenum     \addappheadtotoc     \renewcommand{\refname}{Appendix 1}     \newpage     bla     \includepdf[scale=0.85,pages={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},pagecommand={\thispagestyle{fancy},\fancyfoot{}}]{original.pdf}     \end{document}      The bibliography looks right: ![enter image description here](http://i.stack.imgur.com/ZZ8wn.png) I would like the heading of page 5 to be "Appendix 1" (see the command `\renewcommand{\refname}{Appendix}` before includepdf), but it is "Bibliography" like this: ![enter image description here](http://i.stack.imgur.com/ESYy2.png) I do not understand why `\renewcommand` works for the first time but not for the second. Alternative way to achieve what I want would be to start a section without it being printed in the actual document but only in the TOC - I have not managed to google how to do that.


title: eepic package fails compiling

text: I have some problems with `eepic` package. When I use the `eepic` package almost everything works fine, except circles. The circles were shown half (circle lines and filled circles). When I add the `eepic` package a large part of the lines are lost arrows are lost, circles are lost. Only text doesn't change. When I load both packages, the order of loading the packages changed the way the compiler works (or does not work). I have made a copy from: webpage with samples               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[]{epic,eepic}         \setlength{\unitlength}{1mm}         \begin{picture}(60,30)           \put(0,29){$A$} \put(5,30){\line(1,0){20}}            \put(28,30){\circle*{2}}            \put(28,30){\vector(0,-1){10}}           \put(30,29){Masse f\"allt aus}           \put(30,25){Ruhelage}           \put(0, 9){$B$}            \put(5,10){\line(1,0){20}}           \put(0,5){\line(1,0){40}}           \multiput(1,5)(1,0){40}{\line(-2,-5){2}}           \put(15,10){\line(0,1){20}} \put(16,19){$h$}         \end{picture}     \end{document}      and do this with my own laptop and with sharelatex. both give the same result see figure ![figure](http://i.stack.imgur.com/RD7nz.png) What goes wrong and what do I have to do?


title: tikz: setting up a spring

text: I am trying to set up a spring command but keep receiving the message:               ! Package pgfkeys Error: I do not know the key       '/pgf/decoration/\pgfkeyscurrentname ' and I am going to ignore it. Perhaps       you misspelled it.      The code I have is:               \documentclass[tikz]{standalone}     \usetikzlibrary{patterns}     \usetikzlibrary{decorations}          \begin{document}     \begin{tikzpicture}[decoration = coil,       spring/.style = {         decoration = {           pre length = #1,           post length = #1}       }]       \fill[pattern = north east lines] (-2cm, 0) coordinate (A) rectangle       (2cm, 0.25cm);       \draw (A) -- (2cm, 0);       \draw[decorate, spring = 0.15cm] (-1cm, 0) -- (-1cm, -1cm);     \end{tikzpicture}     \end{document}      Everything is spelled correctly so I am not sure what the issue is.


title: Hook into \input (or any underlying command) in order to allow transparent preprocessing

text: Which command would be most suitable to be hooked in order to _preprocess_ input before it is passed to TeX? Input file:               \begin{document}         \input{a}     \end{document}      Seen by TeX (after a file `a_pp.tex` has been created):               \begin{document}         \input{a_pp}     \end{document}      What about `\include`, `\bibliography`, or even other means of including files? Note that the preprocessing is to be applied only to files that are interpreted/compiled by TeX directly, not to files that are read and parsed by some macro. This is to move towards Forward-inverse search using SyncTeX with the precison of a single word.


title: A command which concatenates a string an arbitrary number of times

text: I'm trying to define a command `\repeatstring{#1}{#2}` which repeats the string `#2` `#1` times. Here is what I tried: (it is based on what I found in How to concatenate strings into a single command?)               \documentclass[11pt, a4paper]{article}     \usepackage{etoolbox}     \newcounter{countdown}     \newcommand\concathere{}     \newcommand\repeatstring[2]{         \setcounter{countdown}{#1}         \renewcommand\concathere{}         \whileboolexpr             {test {\ifnumcomp{\thecountdown}{>}{0}{true}{false}}}             {             \addtocounter{countdown}{-1}             \appto\concathere{#2}          % here the concatenation happens             }         \concathere         }     \begin{document}     \repeatstring{5}{abc}     \end{document}      `\concathere` is meant to contain the string the desired number of times. When I run `\repeatstring{5}{abc}` the output is simply "true". Nothing more, nothing less. Interestingly, when I replace the final line of my command by `aaa\concathere bbb` the result is "true aaabbb". This should indicate where things go wrong, but I can't figure it out. Probably it simply prints "true" because 5>0, and then stops for some reason.


title: Anchoring Table (Tabularx) from the Bottom of Table

text: Can you anchor a table at the bottom, inline with text? I have another question posted which I seemed to have solved myself - List Numbering Through Multiple Tables \- but I have since found my way around this original problem, into another. My goal, depicted in the image below, is to create a multicolumn math test. The problem I have is aligning the question # with the answer choices (See image below MWE for current result). In my MWE my #2 label is midway up the rectangle instead of by the answer choices below "Column A" and "Column B." Using automatic question numbering is essential. I do not want to have to input question numbers manually. ![Goal - Correct Question Number Alignment](http://i.stack.imgur.com/cKDaa.png) MWE:               \documentclass[letterpaper,twoside,openright]{memoir}     \usepackage[bmargin=1in]{geometry}     \setlength{\parindent}{0pt}          \usepackage{enumitem}         \newlist{ptestlist}{enumerate}{2}         \setlist[ptestlist]{label={\arabic*.},itemsep=5mm,labelsep=3mm,topsep=1cm}          \usepackage{multirow}     \usepackage{multicol}     \usepackage{tabularx}         \newcolumntype{Y}{>{\centering\arraybackslash}X}          \usepackage{tikz}          \begin{document}          \begin{center}     {\LARGE Part One --- Word Problems}     \end{center}          \textbf{Directions:} Choose the best answer from the four choices given.          \hrulefill     %-----------        Questions           --------------%      \setlength{\columnsep}{50pt}     \begin{multicols}{2}     \begin{ptestlist}[series=ptest,labelsep=0pt]     \item \begin{tabularx}{3in}{YY}           \underline{Column A}           &           \underline{Column B}           \\           $6 + 4 - 5 \times 6$           &           34           \\           \end{tabularx}          \item \begin{tabularx}{3in}{YY}           \multicolumn{2}{c}           {           \begin{tikzpicture}           \draw (-1.85,0) node [rectangle,draw,minimum size=1in,                                 label=below:$2x$,label=right:$x$] (rsquare) {};           \draw (1.75,0) node [rectangle,draw,minimum size=.8in,                                 label=below:$2y$,label=right:$y$] (lsquare) {};           \end{tikzpicture}           } \\           \underline{Column A}           &           \underline{Column B}           \\           34           &           34           \\           \end{tabularx}          \item \begin{tabularx}{3in}{YY}           \underline{Column A}           &           \underline{Column B}           \\           34           &           34           \\           \end{tabularx}          \item \begin{tabularx}{3in}{YY}           \underline{Column A}           &           \underline{Column B}           \\           34           &           34           \\           \end{tabularx}     \end{ptestlist}          \end{multicols}     \end{document}      This code gets me here: ![MWE Result - Incorrect](http://i.stack.imgur.com/C4p2f.png)


title: TikZ diagram is not rendered properly

text: I have a diagram that I want to include in my latex document. However, the diagram is not rendered properly. I am using `Texmaker 4.1.1` with `MiKTeX 2.9` on a Windows 7 32-bit machine. ![enter image description here](http://i.stack.imgur.com/2SFIx.jpg)               \documentclass[letterpaper, 10pt, conference]{ieeeconf}     \usepackage{times}     \usepackage{amsmath}     \usepackage{url}     \usepackage{cite}     \usepackage[dvips]{graphicx}     \usepackage{subfigure}     \usepackage{float}     \restylefloat{figure}     \usepackage{flafter}     \usepackage[section]{placeins}     \usepackage{pseudocode}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric, arrows}          \begin{document}     \tikzset{       box/.style    = {draw, rectangle, minimum height = 2.5em, minimum width = 2.5em},       circl/.style  = {draw, circle, minimum size = 8mm,label={[font=\small, inner sep=1pt]200:$+$}},       input/.style  = {coordinate},       output/.style = {coordinate},        to/.style    = {->,>=stealth', shorten >=1pt, semithick, font=\small}     }          \thispagestyle{empty}     \pagestyle{empty}          \section{How To Use}     \begin{figure}[H]     \centering     \begin{tikzpicture}[auto, node distance=2cm]     \node (in1) [input] {};     \node (cs) [box, right of=in1] {$C$};     \node (crc1) [circl, right of=cs]{};     \node (gs) [box, right of=crc1] {$G$};     \node (hs) [box, right of=gs] {$H$};     \node (ctl) [box, below of=hs] {Limiter};     \node (crc2) [circl, right of=hs]{};     \node (ze) [input, above of=crc2] {};     \node (ke) [box, right of=crc2] {$K$};     \node (fs) [output, right of=ke] {};          \draw [to] (in1) -- node {$f$}(cs);     \draw [to] (cs) -- (crc1);     \draw [to] (crc1) --(gs);     \draw [to] (gs) -- (hs);     \draw [to] (hs) -- node {$I_{max}$}(ctl);     \draw [to] (ctl) --node {$\theta$}(hs);     \draw [to] (hs) -- node {$z$}(crc2);     \draw [to] (ze) -- node {$C$}(crc2);     \draw [to] (crc2) --(ke);     \draw [to] (ke) -- node {$f(s)$}(fs);          \end{tikzpicture}     \caption{The above figure is control diagram}     \label{fig:force-control-scheme}     \end{figure}     \end{document}


title: smartref package conflicts with babel option frenchb

text: I've unsuccessfuly searched for an answer to this problem. I'd like to use the smartref package together with babel with option frenchb, but there seems to be a conflict : command `\chapterref` in the following MWE :               \documentclass{book}[11pt]     \usepackage{smartref}         %Pour \chapterref     \usepackage[frenchb]{babel}     \addtoreflist{chapter}          \begin{document}          \chapter{A chapter}          Here is some text, see \S\ \chapterref{sec:try}.          \section{tata}          \section{toto}     \label{sec:try}          \end{document}      produces the following error :               ! Missing \endcsname inserted.     <to be read again>                         \unskip      l.14 ...is some text, see \S\ \chapterref{sec:try}      If I replace `\usepackage[frenchb]{babel}` with `\usepackage[english]{babel}`, the document compiles correctly and produces the expected result. I tried swapping both usepackage's commands, but compiling fails all the same. I'm using Babel v3.8d with frenchb v2.6e (according to the log), and smartref version 1.9 (according to CTAN, 1.82 according to the readme file) just downloaded from CTAN. I guess a private hacked babel frenchb would solve the problem, but I know too little of TeX (csname's etc...) to dig into this by myself. Does somebody have a hint ? Thanks a lot in advance.


title: In ConTeXt: how to change the hsize locally?

text: In ConTeXt, I have text that is say 5cm wide. Once in a while I'd like to have a table or an image that sticks out of the right margin and is for example 10 cm wide. My idea is to have something like `\startnarrower`, just the opposite way. So what is the best approach to that? I have not specified my layout yet, so I am open to any clean solution.


title: Text between Index or Bibliography title and content

text: I want to write some text between Index title and content. (also between Bibliography title and content). I tried to redefine the title with the text, but I hope there is a better solution, because this is too ugly. Thanks.


title: preceding a command by an argument

text: Environment:LaTeX               \usepackage{amsmath,amssymb,amsopn}% read amsldoc.pdf for more details     %\genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator}     %\newcommand{\frac}[2]{\genfrac{}{}{}{}{#1}{#2}}     %\newcommand{\tfrac}[2]{\genfrac{}{}{}{1}{#1}{#2}}     %\newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}}     \newcommand[1]{\over}[1]{\genfrac{}{}{}{}{#1}{#2}}     \newcommand[1]{\tover}[1]{\genfrac{}{}{}{1}{#1}{#2}}     \newcommand[1]{\binomial}[1]{\genfrac{(}{)}{0pt}{}{#1}{#2}}      How do I precede a command by an argument? Preferably answer the question by fixing the last 3 lines of the example above. EDIT: the reason I need to do this is to reduce the time necessary to write notes, for quick note taking. for instance:               %macros to make quick note taking easier all escapes try to keep at 3 chars or less     \def\t{\text }     \def\o{\over }     \def\to{\tover }     \def\part{\partial }     \def\({\left( }     \def\){\right) }     \def\[{\left[ }     \def\]{\right] }     \def\l{\left. }     \def\r{\right. }      by adding this in addition to the desired abilities in the original question above it means I can type:               ${\part f \o \part x}$      as opposed to:               $\tfrac{\partial f}{\partial x}$


title: Set styles for numbers in listings package

text: I am using the listings package for Smalltalk programming language but since it does not come out of the box, I am trying to do it by hand. Now I have a problem with numbers. No matter if I change:                   numbersep=5pt,     numberstyle=\small\color{blue},      it is not taken into account, that is, they do not change. I know I can do:               \lstset{literate=%     {0}{{{\myNumberStyle{0}}}}1     {1}{{{\myNumberStyle{1}}}}1     {2}{{{\myNumberStyle{2}}}}1     {3}{{{\myNumberStyle{3}}}}1     {4}{{{\myNumberStyle{4}}}}1     {5}{{{\myNumberStyle{5}}}}1     {6}{{{\myNumberStyle{6}}}}1     {7}{{{\myNumberStyle{7}}}}1     {8}{{{\myNumberStyle{8}}}}1     {9}{{{\myNumberStyle{9}}}}1      } However, that affects ALL numbers, even if they are inside strings or comments. I only want to applyt the style to numbers when they are NOT in strings or comments or whatever..just when they are "alone" For the record, here is all my settings:                 \lstset{     language={},     % characters     tabsize=3,     escapechar={!},     keepspaces=true,     breaklines=true,     alsoletter={\#},     breakautoindent=true,     columns=fullflexible,     showstringspaces=false,     % background     frame=single,     aboveskip=1em, % automatic space before     framerule=0pt,     basicstyle=\small\ttfamily,     keywordstyle=\myKeywordStyle,% keyword style     commentstyle=\myCommentStyle,% comment style     frame=single,%     backgroundcolor=\color{source},     % numbering     numbersep=5pt,     numberstyle=\small\color{blue},     numberfirstline=true,     % caption     captionpos=b,     % formatting (html)     moredelim=[is][\textbf]{}{},     moredelim=[is][\textit]{}{},     moredelim=[is][\uline]{}{},     moredelim=[is][\color{red}\uwave]{<wave>}{</wave>},     moredelim=[is][\color{red}\sout]{}{},     moredelim=[is][\color{blue}\uline]{}{},     % smalltalk stuff         morecomment=[s][\myCommentStyle]{"}{"},%         morecomment=[s][\myvs]{|}{|},       morestring=[b][\myStringStyle]',      moredelim=[is][]{<sel>}{</sel>},     moredelim=[is][]{<rcv>}{</rcv>},     moredelim=[is][\itshape]{<symb>}{</symb>},     moredelim=[is][\scshape]{<class>}{</class>},     morekeywords={true,false,nil,self,super,thisContext},     identifierstyle=\idstyle,     }                    \makeatletter         \newcommand*\idstyle[1]{%          \expandafter\id@style\the\lst@token{#1}\relax%       }       \def\id@style#1#2\relax{%            \ifnum\pdfstrcmp{#1}{\#}=0%                 % this is a symbol                 \mySymbolStyle{\the\lst@token}%             \else%               \edef\tempa{\uccode`#1}%               \edef\tempb{`#1}%               \ifnum\tempa=\tempb%               % this is a global               \myGlobalStyle{\the\lst@token}%               \else%                   \the\lst@token%              \fi%             \fi%      }       \makeatother      Any ideas? thanks a lot in advance,


title: Any alternatives for longtable package? (produce tables can continue to the next page)

text: I have a program and I want to output the program results as PDF. I am considering to use LATEX to do the work. My results may contain many big tables, I just realized it is not so direct to output long tables in LATEX (for example, need longtable package). My question is, longtable is the best solution or most popular one? Any alternatives?


title: Spell checking package for Texlive

text: Is there any package for texlive to check spelling and replace the right spelling in an interactive way? I can use command line 'aspell' or 'ispell' checker but these do not modify the .tex file only correct for the instant compilation.


title: Controlling the size of tables produced from the R functions tabular() and latex()

text: I'll state up front that I'm not absolutely certain whether this question is more appropriate for CrossValidated or for this site. However, since I've seen several questions about the `latex()` command from `Hmisc` here, I think this question is suitable for this site. I'm a relatively experienced `R` user but pretty new to `LaTeX`. I am trying to automatically create a large number of pdfs from a set of results generated within `R`. I'd prefer to create these files entirely within `R`, if possible. After some searching, I decided to do this through a combination of the `tables` package and the `latex()` function from `Hmisc`. Some of the tables I'm creating are quite large, and so when I examine the pdfs that I've created, the tables tend to run off the page. What I'd like to do is use either the `latex()` command or the `tabular()` command within `R` to shrink the size of the tables that appear on my resulting pdfs. The `latex` function has a "`size`" argument, but specifying `size = "small"` doesn't appear to work with tables generated by calls to `tabular()`. Does anyone have any advice? Some sample code can be found below.               require(tables)     require(Hmisc)          # Create sample data     Condition <- factor(rep(c("Control", "Experimental"), 150))     Time <- factor(rep(c("Baseline", "Baseline", "Three days", "Three days",         "Three weeks", "Three weeks"), 50))     var1 <- rnorm(300)     var2 <- rnorm(300)     var3 <- rnorm(300)     var4 <- rnorm(300)     var5 <- rnorm(300)     var6 <- rnorm(300)          # Add to data frame, sprinkle in missing values     d <- data.frame(Condition, Time, var1, var2, var3, var4, var5, var6)     d[sample(1:300, 30), c("var1", "var2", "var3", "var4")] <- NA     d[sample(1:300, 20), c("var5", "var6")] <- NA          # Create helper functions     mean.narm <- function(x) mean(x, na.rm = TRUE)     sd.narm <- function(x) sd(x, na.rm = TRUE)     count.obs <- function(x) sum(!is.na(x))     # Use tabular() from tables     tab <- tabular((Heading("Variable 1") * var1 + Heading("Variable 2") * var2 +         Heading("Variable 3") * var3 + Heading("Variable 4") * var4 + Heading("Variable 5") * var5 +         Heading("Variable 6") * var6) * Time ~ Condition * ((N=count.obs) + (Mean=mean.narm) + (SD=sd.narm)),                data = d)          # Ensure that pdflatex is used when I call latex(), below     options(latexcmd = "pdflatex")     options(dviExtension = "pdf")     options(xdvicmd = "C:/PROGRA~1/R/R-215~1.3/bin/i386/open.exe")     # Use the latex() function     latex(tab, "table1.tex")      Edit: As requested, below is the code obtained from a call to `latex(tab, "")`. As I mentioned above, what I want to do is not just manually modify the LaTeX produced by the `latex()` function, but to ensure that the LaTeX code generated from the call to `latex()` produces a smaller table.               \begin{tabular}{llcccccc}     \hline     & & \multicolumn{6}{c}{Condition} \\      & & \multicolumn{3}{c}{Control} & \multicolumn{3}{c}{Experimental} \\       & Time & N & Mean & SD & N & Mean & \multicolumn{1}{c}{SD} \\      \hline     Variable 1 & Baseline  & $42$ & $\phantom{-}0.029831$ & $1.0657$ & $46$ & $\phantom{-}0.0067612$ & $1.0687$ \\      & Three days  & $44$ & $\phantom{-}0.109871$ & $1.0161$ & $43$ & $-0.1633312$ & $1.1552$ \\      & Three weeks  & $47$ & $\phantom{-}0.160282$ & $1.0613$ & $48$ & $\phantom{-}0.1055877$ & $0.9537$ \\     Variable 2 & Baseline  & $42$ & $-0.166005$ & $1.1078$ & $46$ & $\phantom{-}0.0012202$ & $0.9659$ \\      & Three days  & $44$ & $-0.205125$ & $0.9315$ & $43$ & $-0.2294237$ & $1.0693$ \\      & Three weeks  & $47$ & $-0.164718$ & $1.0122$ & $48$ & $-0.0769583$ & $1.0418$ \\     Variable 3 & Baseline  & $42$ & $\phantom{-}0.077019$ & $1.0643$ & $46$ & $\phantom{-}0.0798812$ & $1.0396$ \\      & Three days  & $44$ & $-0.282688$ & $0.9023$ & $43$ & $\phantom{-}0.1299074$ & $0.9916$ \\      & Three weeks  & $47$ & $-0.291495$ & $1.0138$ & $48$ & $-0.0240293$ & $1.0309$ \\     Variable 4 & Baseline  & $42$ & $-0.247300$ & $1.0963$ & $46$ & $-0.0409480$ & $1.0901$ \\      & Three days  & $44$ & $-0.158524$ & $1.0995$ & $43$ & $\phantom{-}0.1486800$ & $0.8722$ \\      & Three weeks  & $47$ & $-0.149038$ & $0.8798$ & $48$ & $-0.0002842$ & $0.9750$ \\     Variable 5 & Baseline  & $49$ & $\phantom{-}0.008081$ & $0.8102$ & $47$ & $-0.3131353$ & $1.0592$ \\      & Three days  & $45$ & $-0.241864$ & $1.0037$ & $45$ & $\phantom{-}0.1130470$ & $0.8106$ \\      & Three weeks  & $44$ & $-0.177473$ & $1.0706$ & $50$ & $-0.0264635$ & $0.7805$ \\     Variable 6 & Baseline  & $49$ & $\phantom{-}0.013659$ & $1.0833$ & $47$ & $-0.0967571$ & $1.0676$ \\      & Three days  & $45$ & $\phantom{-}0.098045$ & $0.9842$ & $45$ & $\phantom{-}0.0756736$ & $0.9613$ \\      & Three weeks  & $44$ & $-0.152400$ & $1.0654$ & $50$ & $-0.2145893$ & $1.0157$ \\     \hline      \end{tabular}


title: Always a space before embedded figures in table - how do I get rid of it?

text: I am placing figures in a tabularx and I am having trouble getting them to embed properly. I keep getting an annoying spacer before the figure... Now if only this space could be split evenly before and after the figure I wouldn't mind, but it's always on the LEFT - no matter what I try (>\centering didn't work >\raggedright either). Do you have any suggestions? Here is my code and a screenshot :               \begin{table*}[t!]     %make things in tabularx columns vertically centered     \renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}     \newcolumntype{y}{>{\small\centering\arraybackslash}X}     \centerline{     \begin{small}     \begin{tabularx}{7in}{>{\small\raggedright\arraybackslash}p{0.05\textwidth}|y|y|y|y|y|y|y|y|}     Symbol  &     \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&     \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}&      \includegraphics[width=0.70in]{../images/paper/charlie.jpg}\\ \hline     B   & & & test & is text centered &     \end{tabularx}     \end{small}}         \caption{RAAAAAAAAAGE}         \label{tab:rage}         \renewcommand{\tabularxcolumn}[1]{>{\small}p{#1}}     \end{table*}      ![Annoying spaces from hell.](http://i.stack.imgur.com/JoxR0.png) EDIT : After some more toying around, I think these spaces are margins, and it's because my table is too crowded that they were omitted on the right side... so reducing the sizes of my images fixed the whole thing. Over! However if you have anything to add go ahead, I'll be glad to hear what you have to say! Here it is once I removed one column to make space... ![no more rage](http://i.stack.imgur.com/DWy2p.png)


Is there a way to produce this division symbol? ÷ The term `\div` gives an error of `Missing $ inserted`. `\÷` is not working either.


title: Specifying font for a special glyph

text: Is it possible to set a font for a glyph without adding markup around each occurrence of the glyph? e.g. my current font does not support angle bracket (`〈 〉`).


title: How to use formattings of the caption-package within the hvfloat-package?

text: With the caption-package I'm declaring the style of my table- and figure- captions:               \RequirePackage[singlelinecheck=false,                     listof=true,                     tableposition=top]{caption}%     \DeclareCaptionFont{dgcapfont}{\small\sffamily\raggedright}     \DeclareCaptionFont{dgclbfont}{\bfseries}     \captionsetup[table]{labelsep=colon,                          labelfont=dgclbfont,                          font=dgcapfont,                          position=top,                          skip=8\p@}%     \captionsetup[figure]{labelsep=colon,                           labelfont=dgclbfont,                           font=dgcapfont,                           skip=4mm}%      But these declarements do not affect the captions within a hvfloat table or figure. Any ideas what to do?


title: Space between words tabular

text: ![enter image description here](http://i.stack.imgur.com/3xqcz.png)I'm working with booktabs package. My goal is to get the same space between each word. For example: LaTeX TikZ, tabular myframed titleps. \ **Not like this one** : LaTeX~~~~~TikZ,~~~~~tabular~~myframed~~~titleps . Code sample:               \documentclass[twoside]{article}     \usepackage[utf8]{inputenc}     \usepackage[MeX]{polski}          \usepackage{array}% http://ctan.org/pkg/array     \usepackage{booktabs}          \usepackage{tabularx}     \usepackage{longtable}          \usepackage{xcolor}          \usepackage[left=4.50cm, right=4.50cm, top=3.50cm, bottom=3.50cm]{geometry}     \frenchspacing          \makeatletter         \renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad}         \renewcommand\numberline[1]{#1.\hskip0.7em}         \renewcommand\quote{\list{}{\leftmargin=10pt\rightmargin=0pt}\item[]}  {\endlist}             \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}         \newcommand{\rr}{\raggedright}          \newcommand{\tn}{\tabularnewline}     \makeatother          \begin{document}           \begin{table}[!ht]      \ra{2}      \setlength\tabcolsep{3pt}      \ignorespaces      {\setlength{\extrarowheight}{5pt}%      \begin{tabular}{m{\dimexpr.25\textwidth-2\tabcolsep-0.8pt}                     m{\dimexpr.35\textwidth-2\tabcolsep-0.4pt}                     m{\dimexpr.35\textwidth-2\tabcolsep-0.4pt}}\toprule            \textbf{Item 1} &\textbf{Item2}& \textbf{Item3 someLongerWord}\\ \midrule      \textbf{SubItem1 some text someLongerWord}\rr  & Lorem Ipsum jest tekstem  stosowanym jako przykładowy wypełniacz w przemyśle poligraficznym. Został po raz    pierwszy użyty w XV w. przez nieznanego drukarza do wypełnienia tekstem próbnej książki. & Lorem Ipsum jest tekstem stosowanym jako przykładowy wypełniacz w przemyśle poligraficznym. Został po raz pierwszy użyty w XV w. przez nieznanego drukarza do wypełnienia tekstem próbnej książki. Pięć wieków później zaczął być używany przemyśle elektronicznym, pozostając praktycznie niezmienionym.              \\      \addlinespace[4pt] \midrule           \textbf{SubItem2 some text} & Przeciwstawne wyobrażenia i~pojęcia występują razem i~mogą wzajemnie siebie zastępować. & Pogardzany nauczyciel wychowania fizycznego reprezentuje w~pamięci uwielbianego nauczyciela sztuki.\\       \addlinespace[4pt] \midrule            \textbf{Reprezentacja przez analogię bądź aluzję}\rr& Części obiektu bądź pamięci reprezentują całość. Podobne wyobrażenia są~wzajemnie swobodnie wymienianie. & Wyobrażenie huśtawki reprezentuje czas spędzony w dzieciństwie na zabawie z~ojcem.      \\\addlinespace[14pt] \midrule       \textbf{Płynność form}\rr& Wyobrażenia wrażeń zmysłowych odpowiadają słowom czy pojęciom. & Uczucie dreszczy z zimna reprezentuje gniew mężczyzny, który umówił się na randkę w ciemno i~czeka w padającym śniegu na~kobietę, która nie przychodzi.      \\ \addlinespace[4pt]\midrule       \textbf{No Time At All someLongerWord}\rr& Brak logicznego czy czasowego następstwa. Przeszłość, teraźniejszość a~nawet przyszłość stanowią jedną całość. & Obecny mąż pojawia się we~śnie odnoszącym się do~wcześniejszego etapu życia żony.      \\      \bottomrule      \addlinespace[10pt]     %      \end{tabular}}      \small\caption{\small Charakterystyczne cechy poznawcze procesu pierwotnego}      \end{table}     \end{document}


title: How to change colors in Beamer theme?

text: I would like to change colors in Beamer theme like Amsterdam (downloaded from the side http://latex.simon04.net the first topic). How can I get on the top instead of dark blue for example red color and instead of light blue green color? I use the headline defined like this               \setbeamertemplate{headline}     {%       \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}       \end{beamercolorbox}       \begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%           leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}         \vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}       \end{beamercolorbox}%       \ifbeamer@theme@subsection%         \begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}         \end{beamercolorbox}         \begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%           leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}           \usebeamerfont{subsection in head/foot}\insertsubsectionhead         \end{beamercolorbox}%       \fi%       \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}       \end{beamercolorbox}     } \mode <all>          \makeatletter     \DeclareOptionBeamer{compress}{\beamer@compresstrue}     \ProcessOptionsBeamer


title: How to customise (e.g. make thicker) the end-proof symbol in Beamer?

text: I would like to change the symbol for the end of proofs (the square) used in Beamer. It is quite thin, not very visible in some colorthemes. How can I have a thicker border and still in the structure color?


title: scrlttr2: Position of the recipient's address

text: I have `scrlttr2` based letter with source code given below. The letter will be printed on a windowed enveloped and I need to specify the exact location of the recipient's address box. How can I do this (make the recipient's address box appear at a certain location on the paper) ?               % koma_env.tex     \documentclass[a4paper,backaddress=off,foldmarks=false,fromalign=right]{scrlttr2}     % \usepackage{lmodern}     \usepackage[utf8]{inputenc}     % \usepackage[T1]{fontenc}     % \usepackage[english]{babel}     % \usepackage{url}          \setkomavar{date}{\flushleft\vspace{-\baselineskip}\today\par}          \setkomavar{fromname}{\{\{Landlord Name\}\}}     \setkomavar{fromaddress}{\{\{Landlord Correspondence Address Line 1\} \\ \{\{Landlord Correspondence Line 2 (if applicable)\}\} \\ \{\{Town/City\}\} \\ \{\{County\}\} \\ \{\{Postcode\}\}}          \begin{document}          \begin{letter}{\{\{Tenant Names\}\} \\ \{\{Property Address Line 1\}\} \\ \{\{Property Address Line 2 (if applicable)\}\}     \\ \{\{Town/City\}\} \\ \{\{County\}\} \\ \{\{Postcode\}\}}          \KOMAoptions{fromphone=false,fromfax=false}     \setkomavar{subject}{Pre Check-Out Inspection at \{\{1st line of Property\}\}}          \opening{Dear \{\{Tenant Names\}\}}          Your tenancy is due to come to an end on \{\{date\}\}. I would like to arrange an inspection at the property before the tenancy ends to identify anything that may lead me to retain some of your deposit if not addressed by the time I retake possession.          Carrying out this inspection prior to the tenancy ending will give you the opportunity to tackle anything raised and ensure I can return the maximum amount of deposit to you when the tenancy ends          I would like to carry out the inspection on \{\{date\}\} at \{\{time\}\}. It would be best if you were present then if anything is identified we can discuss this and be clear on what would be required to rectify it. Please can you contact me as soon as possible to confirm whether or not this is convenient.          If you do not wish to be present I have a set of keys to access the property and will send you the results of the inspection. Please let me know either way at your earliest convenience.          \closing{Kind Regards}          \end{letter}          \end{document}


title: Words don't wrap inside redefined \marginpar{}

text: I have tried to play with a MWE from @cmhughes in this topic, and discovered that words inside `\marginpar` do not wrap like they should. Here is a MWE:               \documentclass[12pt,openany,oneside,a4paper]{report}     \usepackage{tikz}                            \usepackage{lipsum}          \let\oldmarginpar\marginpar     \renewcommand{\marginpar}[2][rectangle,draw,fill=black, text=white ,rounded corners]{         \oldmarginpar{         \scriptsize \tikz \node at (0,0) [#1]{#2};}         }          \begin{document}     \lipsum[1]     \marginpar{margin text here, but it doesnt wrap like it should!!!}          \lipsum[2]     \end{document}      I also discovered that if I put for example `$$m = 0$$` inside `\marginpar{}` it wont go into a new line like it should.


title: Reducing the size of footnote marks in text

text: I'm trying to change the size of footnote marker in the text, making it smaller, but no success. Here is what I have in preamble: (slightly changes example from memoir class which I'm using)               \renewcommand{\@makefnmark}{\hbox{\textsuperscript{\tiny{\@thefnmark}}}}      but at compilation time all I get is               l.16 \renewcommand{\@makefnmark}                                     {\hbox{\textsuperscript{\tiny{\@thefnmark}}}}     ?       and no effect. What am I doing wrong? Is there other way to explicitly change the size of footnote marker from normal text size to smaller?


title: String annotations to scatter plot coming from a different file

text: I am trying to adapt the setup to be found in this question. to the case where the names are in a different file. The main motivation is to have the same names for several plots and to be able to change them without altering the data files. I tried to use the method to add a column from this question and produces the code below. I get the following error:               ! Missing $ inserted.     <inserted text>                      $      which I fail to interpret. How can it be done?               \begin{tikzpicture}       \pgfplotstableset{         create on use/names/.style={             create col/copy column from table={names.dat}{names}           }       }         \begin{axis}[         visualization depends on={value \thisrow{names} \as \labela},         nodes near coords={\labela},             ]              \addplot[scatter,only marks] table [x expr=\thisrowno{0},y expr=\thisrowno{1}] {data.dat};                   \end{axis}     \end{tikzpicture}      data.dat:               1 1     2 4     3 7      names.dat:               Xyzzy     Plugh     Sheng


title: Modifying whitespace before and after list separately using enumitem package

text: I use the enumitem package to modify the amount of space related to lists. One of the options this package can easily modify is `topsep`. However, this variable controls the vertical space both before and after a list. I can manually add back some space after the list, but this is just a hack.               \documentclass{article}     \usepackage{enumitem}     \setlist{noitemsep}     \begin{document}     I like the lack of vertical space between the end of this paragraph and the beginning of the following list.          \begin{itemize}[topsep=0pt]      \item Item 1          \item Item 2         \end{itemize}          I don't like the lack of vertical space between the end of the previous list and the beginning of this paragraph.          I don't like the lack of vertical space between the end of this paragraph and the beginning of the following list.          \begin{itemize}      \item Item 1      \item Item 2         \end{itemize}          I like the vertical space between the end of the previous list and the beginning of this paragraph.          To get the best of both worlds,     I use a baseline skip after the list.          \begin{itemize}[topsep=0pt]      \item Item 1      \item Item 2     \end{itemize}     \vspace*{\baselineskip}          Now there is a good amount of space between the end of the previous list and the beginning of this paragraph,     but a bit too much and achieved via a ``hack''.     \end{document}      ![enter image description here](http://i.stack.imgur.com/vjwBv.png) ## Question How can I use this package to modify the amount of space before and after separately?


title: Using Times New Roman in eps images with psfrag

text: I'm using the `chemstyle` package to produce chemical reaction schemes. It uses the `psfrag` package to replace placeholders in eps graphics with numbers for molecules. I'm trying to use Times New Roman font in these eps files (not for the placeholders, but for other text), but LaTeX doesn't seem to like it:               ### /usr/texbin/dvips -R -Poutline  -o /tmp/altpdflatex.31054-1317561093/Thesis.ps Thesis.dvi This is dvips(k) 5.97 Copyright 2008 Radical Eye Software (www.radicaleye.com) ' TeX output 2011.10.03:0011' -> /tmp/altpdflatex.31054-1317561093/Thesis.ps /usr/texbin/dvips: ! Couldn't find header file times.pfb. Note that an absolute path or a relative path with .. are denied in -R2 mode.     ### FAILED to generate /tmp/altpdflatex.31054-1317561093/Thesis.ps () Is it possible to fix this, using LaTeX rather than pdfLaTeX? Where might I find such a header file? Edit: The Times New Roman text was added in ChemDraw. The eps in question is a chemical scheme, so I draw these in ChemDraw, sometimes with additional text. I'd like that text to match the font I'm using for LaTeX (TNR). Edit2: An example eps: http://www.2shared.com/file/upfvXkpS/Test.html


title: Arxiv.org: remove borders around hyperlinks

text: The answers to this question already explain how to remove the borders around hyperlinks. However, if I submit a manuscript to Arxiv.org, it seems that their system somehow manages to override the `\hypersetup` command. The end result is ugly: bright green, red, and cyan boxes all around the PDF file. However, it does not just _ignore_ all `\hypersetup` commands; for example, `\hypersetup{pdfauthor=...}` works as expected. Does anyone happen to know any workarounds? AFAIK, Arxiv.org uses a system that is based on Texlive 2009 and TeX::AutoTeX. I am defining `\pdfoutput=1`, i.e., the document is compiled using `pdflatex`.


title: Expanding only one author list when citing multiple papers with Natbib

text: I have a question about citing multiple authors, but only printing the full author list for one of the papers. I have a situation where I want to cite two papers in the same set of parenthesis, but I only want to expand the set of authors in one of the papers. I am using the Natbib and Bibtex packages. The set up is as follows: paper1: 4 authors; paper2: 3 authors (the standard in my field is to expand 3 author papers on the first citation)               \citep*[see][for review]{paper1,paper2}      The problem I am having is that this command expands both author lists into the long citation. I know I could use the option [longnamefirst] in my natbib package declaration, but I only want to expand 3 author papers on the first citation, not all papers. Any suggestions? Thanks in advance for your help!


title: Font cannot be found

text: I tried to generate a pdf file from the following document using pdfLaTeX and XeLaTeX on Windows 7 (MiKTex 2.9). pdfLaTeX responded that I need to use XeLaTeX. When I used XeLaTeX, it said the the font `sanskrit` cannot be found. I tried other fonts such as `samarkan`, `Bengali`,`Gurmukhi`, `Gujarati` from the `Devanagari` font set. Could someone please help me to resolve this issue as well as find the way to run it under pdfLaTeX?               \documentclass[10pt]{report}     \usepackage[letterpaper,top=2.0cm,bottom=2.0cm,left=0.5cm,right=1cm]{geometry}     \usepackage{booktabs}     \usepackage{array}     \usepackage{fancyhdr}     \usepackage[iso]{datetime}     \usepackage{lastpage}          \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguage{hindi}          \usepackage{fontspec}     \setmainfont{Times New Roman}     \newfontfamily\devanagarifont[Scale=MatchUppercase]{sanskrit}     \newfontfamily\devtransl[Mapping=DevRom]{Times New Roman}          \pagestyle{fancy}     \fancyhf{}     \setlength\headheight{0.5pt}     \chead{\textbf{\huge{Inform}}}     \lhead{\textbf{Test1}}     \rhead{\textbf{\normalsize{Sets}}}     \rfoot{\today \hspace{0.5pt} \currenttime}     \cfoot{Page \thepage\ of \pageref{LastPage}}\lfoot{Some}          \renewcommand{\headrulewidth}{1pt}          \usepackage{supertabular}     \begin{document}     \fontsize{8}{10}\selectfont     \tablehead     {     \toprule     & \multicolumn{1}{p{24.5mm}}{\textbf{\foreignlanguage{hindi}{ग्रोस वोलयूम}}}     & \multicolumn{1}{p{21mm}}{\textbf{नेट वाल्यूम}}     & \multicolumn{1}{p{16mm}}{\textbf{लेवल}}     & \multicolumn{1}{p{21mm}}{\textbf{तापमान}}     & \multicolumn{1}{p{16mm}}{\centering{\textbf{ऊलाज}}}     & \multicolumn{1}{p{42mm}}{\centering{\textbf{लास्ट अपडेटड}}}\\          & \multicolumn{1}{p{24.5mm}}{\centering{\textbf{गैलन}}}     & \multicolumn{1}{p{21mm}}{\centering{\textbf{गैलन}}}     & \multicolumn{1}{p{16mm}}{\textbf{सेन्टीमीटर}}     & \multicolumn{1}{p{21mm}}{\centering{\textbf{सेन्टीग्रेड}}}     & \multicolumn{1}{p{16mm}}{\centering{\textbf{गैलन}}} & \\     \toprule     }          \begin{supertabular}{p{35mm}*{6}{r}}     \\ \multicolumn{7}{l}{\textbf {3001}}\\\\     \textbf{टेंक  2} & \multicolumn{6}{l}{SET1}\\     PROD 2& \multicolumn{6}{l}{(4,011 अधिकतम)}\\     \multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,495.40 & 2,479.66 & 145.55 & 20.53 & 1,313.07 & 19/04/2012 15:00:23 \\     \multicolumn{1}{r}{\textbf{Water}} & 1.79 & & 1.00 & & & \\\\      \textbf{टेंक  3} & \multicolumn{6}{l}{SET2}\\     PROD 3& \multicolumn{6}{l}{(4,011 अधिकतम)}\\     \multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,593.08 & 2,578.51 & 150.40 & 20.01 & 1,213.86 & 19/04/2012 15:00:23 \\     \multicolumn{1}{r}{\textbf{SET3}} & 3.32 & & 1.51 & & & \\\\      \toprule[2pt]\\     \end{supertabular}     \end{document}


title: How can I get a page number on the last page of a chapter with the mwrep class?

text: \documentclass[12pt,a4paper]{mwrep}     \begin{document}     \chapter{Chapter 1}     Text \pagebreak          Text \pagebreak          Text     \chapter{Chapter 2}     Text     \end{document}      This does not generate page number on last page within chapter. How can I change that?


title: How to make colored swatches inside text?

text: The following is an image of a sub-section of the documentation of the package `xcolor`. ![Inline color swatch](http://i.stack.imgur.com/u8Njh.png) How to insert such a color swatch within text? I need it to explain the functionality of different parts of a schematic.


title: Enable searching in a pdflatex-generated document

text: I'm typesetting a book in French, and I noticed that diacritics broke the search function of Adobe reader. For example, if I write "Numérotation" in my latex document, then Adobe Reader won't find any matches for either "Numerotation" or "Numérotation", since the accent sign is written to the pdf document separately from the "e". Similarly, if I write "Affect", then Adobe reader won't find any matches for "Affect" : both "f"s are contracted into one character. How can I ensure that the pdfs generated by pdflatex are fully searchable? **EDIT: Some clarifications:** Thanks for the answers. I currently have two packages loaded :               \usepackage[T1]{fontenc}     \usepackage{ae,aecompl,aeguill}      Adding `\usepackage{cmap}` doesn't help. Removing `ae` does help, but the the fonts are bitmap ones, and look terrible. Final note: removing `ae` doesn't solve the double-f (ff) problem.


title: What is the purpose of putting \newenvironment, \newcounter in a document class?

text: In `exam.cls`, I saw the following codes which I don't understand how do they function in the document class (`exam`):               \newcounter{question}     \newcounter{partno}     \newcounter{subpart}     \newcounter{subsubpart}     \newcounter{choice}          \newenvironment{questions}{%          \newcounter{choice}     \renewcommand\thechoice{\Alph{choice}}     \newcommand\choicelabel{\thechoice.}          \newenvironment{choices}%       {\list{\choicelabel}%          {\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%            \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 2.5em}%            \def\choice{%              \item            } % choice            \labelwidth\leftmargin\advance\labelwidth-\labelsep            \topsep=0pt            \partopsep=0pt          }%       }%      What are their purposes, especially the `\newenvironment{questions}` and `\newcounter{question}`?


title: Translating LaTeX document to XeLaTeX or LuaLaTeX

text: I'm writing a Thesis on the ''use of history to teach mathematics''. The first four chapters are already typed and compiled in pdfTex, I used the `memoir` document class. Recently I read this Lua post and it really caught my attention. In order to finish the Thesis process (writing and compiling the three final chapters, also have to add graphs, tables and so) I am evaluating to move to XeLaTex (I'm not sure if LuaLaTeX would be an option but it excited me what I read). I know my LaTeX, and I feel confortable with LaTeX (pdfTeX) but I also want to "see other options". My question is: If I want to "port" the current document code and finish the three last chapters using XeLaTeX (or LuaLaTeX), What I need to achieve that successfully? NOTE Here I add a MWE of the ''preamble'' and the `estructure.tex` in order to you see the package I am using currently and you can tell if is feasible to translate the current document. Preamble               \documentclass[12pt,letterpaper,oneside]{memoir}     \settypeblocksize{279.4mm}{215.9mm}{*}     \setulmarginsandblock{3cm}{3cm}{*}     \setlrmarginsandblock{3.9cm}{2cm}{*}     \checkandfixthelayout     \parskip=0.25cm     \usepackage{apacite}     \usepackage[utf8]{inputenc}     \usepackage[spanish]{babel}     \usepackage{XCharter}     \DisemulatePackage{setspace}     \usepackage{setspace}     \makepagestyle{myheadings}     \makeevenhead{myheadings}{\thepage}{}{}     \makeoddhead{myheadings}{}{}{\thepage}          \pagestyle{myheadings}          \usepackage{titlesec}          \titleformat*{\section}{\centering\LARGE\bfseries}     \titleformat*{\subsection}{\large\bfseries}     \titleformat*{\subsubsection}{\large\bfseries}     \input{structure.tex}      Here is the `structure.tex` file.               \usepackage[round]{natbib}\citeindextrue      \usepackage{graphicx} % Required to include images     \graphicspath{{./Figures/}}     \usepackage{color} % Required for custom colors     \usepackage{amsmath,amssymb,theorem} % Math packages     \usepackage{listings} % Required for including snippets of code     \usepackage{booktabs} % Required for better horizontal rules in tables     \usepackage{xspace} %      \usepackage[printonlyused,withpage]{acronym} % Include a list of acronyms     \usepackage{rotating} % Allows tables and figures to be rotated     \usepackage{hyperref} % Required for links and changing link options     \usepackage{microtype} % Slightly tweak font spacing for aesthetics          \hypersetup{colorlinks, breaklinks,    linkcolor=black,citecolor=black,filecolor=black,urlcolor=black} % Set up hyperlinks including colors for references, urls and citations               \makeatletter     \renewcommand{\fnum@figure}{\textsc{\figurename~\thefigure}} % Make the "Figure 1.1" text in small caps     \makeatother


title: How to search a documentation about an tex-function in command-line way on linux?

text: How can I search things about some functions in LaTeX on Linux in the command- line? Tried `texdoc`, but `texdoc cite`, for example, don't works. I would like a tool to search about LaTeX functions in terminal like `pydoc if` to search about if statement of python.


title: Overlaying with beamer, combining blocks and graphics

text: I'm trying to combine graphics and blocks on a slide. Here is my code, i think it's quite simple to figure out what i want from it :               \begin{frame}     \frametitle{Outils}          \onslide<1->\begin{block}{Méthode de correction}         \begin{itemize}         \onslide<2->\item Mise à jour par simulation continue         \onslide<5->\item Assimilation naïve des sorties (post-traitement)           \end{itemize}     \end{block}          \begin{overprint}     \centerline{\includegraphics<3>[scale=0.4]{./plots/assim1_a.jpg}}     \centerline{\includegraphics<4>[scale=0.4]{./plots/assim1_b.jpg}}     \centerline{\includegraphics<6>[scale=0.4]{./plots/assim2.jpg}}     \end{overprint}          \onslide<7->\begin{block}{Scores}     \begin{itemize}         \item<8-> CRPS et MAE         \item<9-> Diagramme de Talagrand         \item<11-> Diagramme de fiabilité     \end{itemize}     \end{block}     \begin{overprint}     \centerline{\includegraphics<10>[scale=0.29]{./plots/demo_tal.pdf}}     \centerline{\includegraphics<10>[scale=0.29]{./plots/demo_fiab.pdf}}     \end{overprint}     \end{frame}           So what i try to do is to make a block which parts come up progressively, and sometimes to display a picture corresponding to one of the item in the block. The picture must be displayed right after the block. To make short, pictures must overlay each other while the blocks stay. Moreover, i want the second block (called "Scores"), to be situated right after the second block to take the position of the previous pictures. Is it clear ? Many thanks to the people who'll think about it !


title: How to wrap text with flalign*?

text: I am trying to left align some text as shown below: ![enter image description here](http://i.stack.imgur.com/IYcCE.jpg) But the problem here is that the line is almost exceeding the page (shown by red arrow).What I want is somewhat shown in the blue line which underlines the text. I want this text to be wrapped such that it starts below (m x n) and not under '=' sign. I tried `flushleft` environment but then '=' signs are not aligned and wrapped text started below '=' sign. Sample code is given below:                  \begin{flalign*}     \hat{x}_k &=(n\times 1)\hspace*{2pt} \text{state vector at time $k$}.&\\     A &=(n\times n)\hspace*{2pt} \text{matrix relating $x_k$ to $x^{}_{k+1}$}.&\\     w_k&=(n\times 1) \hspace*{2pt}\text{process noise vector}.&\\     y_k&=(m\times 1)\hspace*{2pt}\text{measurement vector}.&\\     z_k&=(m\times 1)\hspace*{2pt}\text{measurement noise vector}.&\\     H_k&=(m\times n)\hspace*{2pt} \text{matrix giving noiseless connection between measurement and the state vector at time $k$.}&\\     K_k&=(n\times m) \hspace*{2pt}\text{matrix giving Kalman gain}.&\\P_k&=(n\times n)\hspace*{2pt}\text{ matrix giving estimation error covariance.}     \end{flalign*}


title: Test if the first character of a string is 'a'

text: Is there an easy way to make a macro returning a string (e.g. 'true') if the string input begins by some fixed character, say 'a' ? I can't figure how to combine the different packages to do this. `\testchain{a}` will return the string 'true' and nothing otherwise.


title: What are other programming languages with APIs for drawing graphs?

text: My apologies if this is not the right place to ask this question. If so, I would appreciate it if it could be told to me where I should post it instead. Recently I came across a question which I thought could be answered quite easily if I were able to use a regular computer programming language (e.g. Java, Python) which supported writing graphics through an API. While I am aware that programming can be done in TeX, most notably TikZ supports this, I always get the feeling that things are much more complicated to program in TeX. Even though I know other programming languages (Java, Python, C) to program with TikZ or TeX still feels quite daunting. For example, to answer the above question, I could go through a `for` loop for each row, a second `for` loop for each column, then at each coordinate, draw a rectangle with the color which is returned by a function `ValueToColor(value)` where `value` is the value of that particular cell. However, I don't quite know how to do these things in TikZ or Tex! Are there other programming languages with APIs that support generating nice graphics? The `R` programming language with the `ggplot2` library comes to mind, as well as `D3.js`.


title: table with incomplete line

text: This is probably very simple question: I am trying to generate a table with multiple rows in the last two columns. I have tried the following:               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{multirow}     \begin{document}     \begin{table}     \begin{tabular}{|l|c|c|c|c|}     \hline     \multicolumn{5}{|c|}{Type} \\     \hline       & A  &    B & C & D \\         \hline         X & 53,2\%  &  51,6\%  &  \multirow{2}{*}{49\%} & \multirow{2}{*}{49\%} \\          Y  & 53,8\%  &  52,2\%  &  \\     \hline     \end{tabular}     \end{table}     \end{document}      But the table I get has an incomplete line down right: ![enter image description here](http://i.stack.imgur.com/QDTaO.png) How can I get a table with complete line? Is this the optimal way to generate such a table?


title: How to make this table?

text: I've been struggling to get the following result:               Table N°: Title(1--footnote)     ----------------------------     Category            Values     ----------------------------     One                    200     Two                    100     Three                  410     ----------------------------     Total                  710     ----------------------------     Source: Author, 2013. [aligned with table float]     (1): Footnote text. [here]      How can I add the "Source: Author..." text there (maybe a "Notes:..." paragraph too), within the table float, and the footnote text right below?


title: Add vertical space in aligned environment and explanation of the unequal space between two gather/align environments

text: I want to leave some space between the `aligned` environments and some below the texts in the environments so to have a nicer output. How can I do that?               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \setlength{\parindent}{0cm}          \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont[Mapping=tex-text]{GFSDidot.otf}     \setsansfont[Mapping=tex-text]{GFSDidot.otf}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \everymath{\displaystyle}          \setlength{\mathindent}{0cm}          \allowdisplaybreaks          \newcommand{\CustomGather}[1]     {\begin{gather*}#1\end{gather*}}          \newcommand{\CustomAligned}[1]     {\begin{aligned}#1\end{aligned}}          \newcommand{\CustomAlign}[1]     {\begin{align*}#1\end{align*}}          \newcommand{\3}{\vspace{0.3cm}}          \begin{document}               Άσκηση 4          \3               \CustomGather     {     \CustomAlign     {     &\text{Ερώτημα α.}\\     &\mathcal{E}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}=-\frac{d}{dt}\int\limits_{x-b/2}^{x+b/2}\int\limits_{-b/2}^{b/2}B_{0}(x/a)^{2}\hat{y}\cdot dxdz\hat{y}=-\frac{d}{dt}\left( \frac{B_{0}}{a^{2}}\int\limits_{-b/2}^{b/2}dz\int\limits_{x-b/2}^{x+b/2}x^{2}dx\right)=\\     &=-\frac{d}{dt}\left(\frac{B_{0}b}{a^{2}}\left[\frac{x^{3}}{3}\right]_{x-b/2}^{x+b/2}\right)=\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[\frac{(x+b/2)^{3}}{3}-\frac{(x-b/2)^{3}}{3}\right]=-\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[x^{2}b+\frac{b^{3}}{12}\right]=\\     &=-\frac{B_{0}b^{2}2x}{a^{2}}\frac{dx}{dt}=-\frac{2B_{0}b^{2}xu_{0}}{a^{2}}     }\\     \CustomAlign     {     &\text{Ερώτημα β.}\\     &I=\frac{dq}{dt}\Rightarrow dq=Idt\Rightarrow Q=\int\limits_{0}^{t}Idt\\     &dx=u_{0}dt\Rightarrow dt=\frac{dx}{u_{0}}\\     &Q=\int\limits_{0}^{x}\frac{Idx}{u_{0}}=\int\limits_{0}^{x}\frac{\mathcal{E}dx}{Ru_{0}}\Rightarrow Q=\frac{2B_{0}b^{2}x^{2}}{a^{2}R2}=\frac{B_{0}b^{2}x^{2}}{a^{2}R}     }\\     \CustomAlign     {     &\text{Ερώτημα γ.}\\     &dW=\mathcal{E}Idt\Rightarrow W=\int\limits_{0}^{t}\mathcal{E}Idt=\frac{4u_{0}B^{2}_{0}b^{4}x^{3}}{3Ra^{4}}     }     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/gzscT.png) Also why in `gather/align` environments with text in between the text isn't equally spaced in the middle but there is more space above it?               \CustomAlign     {&\text{Ερώτημα α.}\\     &\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\     &\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\     &\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}     }     Text     \CustomAlign     {&\text{Ερώτημα α.}\\     &\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\     &\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\     &\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}     }      ![enter image description here](http://i.stack.imgur.com/fbCNQ.png)               \CustomGather     {     \CustomAligned     {     &E=\vec{u}\times \vec{B}\\     &\vec{u}=\omega \rho \hat{\phi}\\     &\vec{B}=B_{0}\hat{z}\\     &\Rightarrow \vec{E}=B_{0}\omega\rho\hat{\rho} \Rightarrow \vec{J}=\sigma B_{0}\omega\rho\hat{\rho}\\     &d^{3}\vec{F}=\vec{J}\times\vec{B}dV=\vec{J}\times\vec{B}\rho d\rho d\phi dz\\     &d^{3}\vec{T}=\vec{R} \times d^{3}vec{F}= \rho \hat{\rho} \times (\vec{J}\times\vec{B})\rho d\rho d\phi dz\\     &d^{3}\vec{T}=(-\hat{z})B^{2}_{0} \sigma \omega \rho^{3}d\rho d\phi dz\\     }     }          Άσκηση 7          \CustomGather     {     \CustomAligned     {     &\text{Ερώτημα α.}\\     &\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\     &\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\     &\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}     }     }      ![enter image description here](http://i.stack.imgur.com/4wx5E.png)


title: media9: "l3kernel too old" (support outdated)

text: Well, I was trying to follow this answer "beamer, media9 - play multiple videos at once", in order to play two videos at the time in one frame. But the problem is that, after installing the packages movie9, l3kernel and l3packages I'm getting the following error:               ! media9 error: "support outdated"     !     ! Support package l3kernel too old.     !     ! See the media9 documentation for further information.      I tried to update those packages (`l3kernel` and `l3packages`) but the error is still the same. I don't know if it will help to the understanding of the problem, but I'm using the following code:               \begin{frame}     %(...)     \includemedia[         addresource=cosafea25.flv,         activate=pageopen,         width=500,         height=500,         flashvars={source=cosafea25.flv &autoPlay=true &loop=true}]{\fbox{Play}}{VPlayer.swf}     %(...)       \end{frame}      I'm compiling in pdflatex with MikTeX in Windows 7. Edited **8/Sep/13 1:24PM (GMT:-3)** The *.log file for the code:               \documentclass{article}          \usepackage{xparse}     \usepackage{media9}          \begin{document}          \end{document}      is:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.6.23)  8 SEP 2013 13:19     entering extended mode     **test.tex     (C:\Users\AlfonsoS\Desktop\test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3packages\xparse\xparse.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3names.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3bootstrap.sty"     Package: l3bootstrap 2013/01/08 v4420 L3 Experimental bootstrap code     )     Package: l3names 2012/12/07 v4346 L3 Namespace for primitives     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty"     Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)     \et@xins=\count87     )     Package: expl3 2013/03/14 v4469 L3 Experimental code bundle wrapper          ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3basics.sty"     Package: l3basics 2013/01/10 v4428 L3 Basic definitions     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3expan.sty"     Package: l3expan 2013/02/03 v4458 L3 Argument expansion     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3tl.sty"     Package: l3tl 2013/01/08 v4415 L3 Token lists     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3seq.sty"     Package: l3seq 2013/01/12 v4434 L3 Sequences and stacks     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3int.sty"     Package: l3int 2013/01/13 v4444 L3 Integers     \c_max_int=\count88     \l_tmpa_int=\count89     \l_tmpb_int=\count90     \g_tmpa_int=\count91     \g_tmpb_int=\count92     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3quark.sty"     Package: l3quark 2012/11/04 v4268 L3 Quarks     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3prg.sty"     Package: l3prg 2013/02/13 v4459 L3 Control structures     \g__prg_map_int=\count93     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3clist.sty"     Package: l3clist 2013/01/08 v4414 L3 Comma separated lists     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3token.sty"     Package: l3token 2013/01/10 v4428 L3 Experimental token manipulation     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3prop.sty"     Package: l3prop 2013/01/09 v4423 L3 Property lists     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3msg.sty"     Package: l3msg 2013/01/08 v4412 L3 Messages     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3file.sty"     Package: l3file 2013/01/14 v4446 L3 File and I/O operations     \l_iow_line_count_int=\count94     \l__iow_target_count_int=\count95     \l__iow_current_line_int=\count96     \l__iow_current_word_int=\count97     \l__iow_current_indentation_int=\count98     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3skip.sty"     Package: l3skip 2013/01/13 v4444 L3 Dimensions and skips     \c_zero_dim=\dimen103     \c_max_dim=\dimen104     \l_tmpa_dim=\dimen105     \l_tmpb_dim=\dimen106     \g_tmpa_dim=\dimen107     \g_tmpb_dim=\dimen108     \c_zero_skip=\skip43     \c_max_skip=\skip44     \l_tmpa_skip=\skip45     \l_tmpb_skip=\skip46     \g_tmpa_skip=\skip47     \g_tmpb_skip=\skip48     \c_zero_muskip=\muskip10     \c_max_muskip=\muskip11     \l_tmpa_muskip=\muskip12     \l_tmpb_muskip=\muskip13     \g_tmpa_muskip=\muskip14     \g_tmpb_muskip=\muskip15     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3keys.sty"     Package: l3keys 2013/02/24 v4461 L3 Experimental key-value interfaces     \g__keyval_level_int=\count99     \l_keys_choice_int=\count100     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3fp.sty"     Package: l3fp 2013/01/19 v4449 L3 Floating points     \c__fp_leading_shift_int=\count101     \c__fp_middle_shift_int=\count102     \c__fp_trailing_shift_int=\count103     \c__fp_big_leading_shift_int=\count104     \c__fp_big_middle_shift_int=\count105     \c__fp_big_trailing_shift_int=\count106     \c__fp_Bigg_leading_shift_int=\count107     \c__fp_Bigg_middle_shift_int=\count108     \c__fp_Bigg_trailing_shift_int=\count109     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3box.sty"     Package: l3box 2013/01/08 v4411 L3 Experimental boxes     \c_empty_box=\box26     \l_tmpa_box=\box27     \l_tmpb_box=\box28     \g_tmpa_box=\box29     \g_tmpb_box=\box30     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3coffins.sty"     Package: l3coffins 2012/09/09 v4212 L3 Coffin code layer     \l__coffin_internal_box=\box31     \l__coffin_internal_dim=\dimen109     \l__coffin_offset_x_dim=\dimen110     \l__coffin_offset_y_dim=\dimen111     \l__coffin_x_dim=\dimen112     \l__coffin_y_dim=\dimen113     \l__coffin_x_prime_dim=\dimen114     \l__coffin_y_prime_dim=\dimen115     \c_empty_coffin=\box32     \l__coffin_aligned_coffin=\box33     \l__coffin_aligned_internal_coffin=\box34     \l_tmpa_coffin=\box35     \l_tmpb_coffin=\box36     \l__coffin_display_coffin=\box37     \l__coffin_display_coord_coffin=\box38     \l__coffin_display_pole_coffin=\box39     \l__coffin_display_offset_dim=\dimen116     \l__coffin_display_x_dim=\dimen117     \l__coffin_display_y_dim=\dimen118     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3color.sty"     Package: l3color 2012/08/29 v4156 L3 Experimental color support     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3luatex.sty"     Package: l3luatex 2012/08/03 v4049 L3 Experimental LuaTeX-specific functions     \g__cctab_allocate_int=\count110     \g__cctab_stack_int=\count111     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3candidates.sty"     Package: l3candidates 2013/03/14 v4468 L3 Experimental additions to l3kernel     \l__box_top_dim=\dimen119     \l__box_bottom_dim=\dimen120     \l__box_left_dim=\dimen121     \l__box_right_dim=\dimen122     \l__box_top_new_dim=\dimen123     \l__box_bottom_new_dim=\dimen124     \l__box_left_new_dim=\dimen125     \l__box_right_new_dim=\dimen126     \l__box_internal_box=\box40     \l__coffin_bounding_shift_dim=\dimen127     \l__coffin_left_corner_dim=\dimen128     \l__coffin_right_corner_dim=\dimen129     \l__coffin_bottom_corner_dim=\dimen130     \l__coffin_top_corner_dim=\dimen131     \l__coffin_scaled_total_height_dim=\dimen132     \l__coffin_scaled_width_dim=\dimen133     )     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     ))     Package: xparse 2013/03/12 v4467 L3 Experimental document command parser     \l__xparse_current_arg_int=\count112     \l__xparse_m_args_int=\count113     \l__xparse_mandatory_args_int=\count114     \l__xparse_processor_int=\count115     \l__xparse_v_nesting_int=\count116     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\media9\media9.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3regex.sty"     Package: l3regex 2013/07/24 v4576 L3 Experimental regular expressions          ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3tl-build.sty"     Package: l3tl-build 2011/12/08 v3039 L3 Experimental token list construction     \l__tl_build_start_index_int=\count117     \l__tl_build_index_int=\count118     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3tl-analysis.sty"     Package: l3tl-analysis 2011/12/08 v3039 L3 Experimental token lists analysis     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3str.sty"     Package: l3str 2013/07/24 v4576 L3 Experimental strings     )     \l__tl_analysis_normal_int=\count119     \l__tl_analysis_index_int=\count120     \l__tl_analysis_nesting_int=\count121     \l__tl_analysis_type_int=\count122     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3flag.sty"     Package: l3flag 2011/12/08 v3039 L3 Experimental flags     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3str-convert.sty"     Package: l3str-convert 2013/01/08 v4339 L3 Experimental string encoding convers     ions     \l__str_internal_int=\count123     \c__str_replacement_char_int=\count124     )     \l__regex_internal_a_int=\count125     \l__regex_internal_b_int=\count126     \l__regex_internal_c_int=\count127     \l__regex_balance_int=\count128     \l__regex_group_level_int=\count129     \l__regex_mode_int=\count130     \l__regex_catcodes_int=\count131     \l__regex_default_catcodes_int=\count132     \c__regex_catcode_D_int=\count133     \c__regex_catcode_S_int=\count134     \c__regex_catcode_L_int=\count135     \c__regex_catcode_O_int=\count136     \c__regex_catcode_A_int=\count137     \c__regex_all_catcodes_int=\count138     \l__regex_show_lines_int=\count139     \l__regex_min_state_int=\count140     \l__regex_max_state_int=\count141     \l__regex_left_state_int=\count142     \l__regex_right_state_int=\count143     \l__regex_capturing_group_int=\count144     \l__regex_min_pos_int=\count145     \l__regex_max_pos_int=\count146     \l__regex_current_pos_int=\count147     \l__regex_start_pos_int=\count148     \l__regex_success_pos_int=\count149     \l__regex_current_char_int=\count150     \l__regex_current_catcode_int=\count151     \l__regex_last_char_int=\count152     \l__regex_case_changed_char_int=\count153     \l__regex_current_state_int=\count154     \l__regex_step_int=\count155     \l__regex_min_active_int=\count156     \l__regex_max_active_int=\count157     \l__regex_replacement_csnames_int=\count158     \l__regex_match_count_int=\count159     \l__regex_submatch_int=\count160     \l__regex_zeroth_submatch_int=\count161     ) ("C:\Program Files\MiKTeX 2.9\tex\latex\l3packages\l3keys2e\l3keys2e.sty"     Package: l3keys2e 2013/03/12 v4467 LaTeX2e option processing using LaTeX3 keys     )     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\atbegshi.sty"     Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO)          ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     ))     Package: media9 2013/08/26 v0.31 acrobat-9/X compatible media               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! media9 error: "support outdated"     !      ! Support package l3kernel too old.     !      ! See the media9 documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.73 }          |'''''''''''''''''''''''''''''''''''''''''''''''     | Please install an up to date version of l3kernel.     | Loading media9 will abort!     |...............................................          ) (C:\Users\AlfonsoS\Desktop\test.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"     File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive     )     Package graphics Info: Driver file: pdftex.def on input line 91.          ("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX     \Gread@gobject=\count162          ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count163     \scratchdimen=\dimen134     \scratchbox=\box41     \nofMPsegments=\count164     \nofMParguments=\count165     \everyMPshowfont=\toks14     \MPscratchCnt=\count166     \MPscratchDim=\dimen135     \MPnumerator=\count167     \makeMPintoPDFobject=\count168     \everyMPtoPDFconversion=\toks15     )))     \AtBeginShipoutBox=\box42      (C:\Users\AlfonsoS\Desktop\test.aux) )      Here is how much of TeX's memory you used:      7395 strings out of 493921      139355 string characters out of 3147273      170582 words of memory out of 3000000      10639 multiletter control sequences out of 15000+200000      3640 words of font info for 14 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      42i,1n,30p,244b,282s 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)      Thank you for your time.


title: For each node I want to draw arrow '->'

text: I want to draw '->' for each path. Actually I tried to add every node option and '->', but this doesn't work. I know that \draw[->] (t1)--(t2); \draw[->] (t2)--(t3); ... would be work. But I want to know simple solution. Is there any simple solution? ![enter image description here](http://i.stack.imgur.com/03wxa.png)               \begin{figure} \begin{tikzpicture}[auto, block/.style = {rectangle, draw}]     \matrix[every node/.style = block, column sep=4mm, row sep=6mm]{                 \node (t1) {host}; & & \node (t11) {host}; \\             \node (t2) {ICMP}; & & \node (t10) {ICMP}; \\             \node (t3) {ICMP}; & & \node (t9) {ICMP}; \\              \node (t4) {host}; & & \node (t8) {host}; \\              \node (t5) {ICMP}; & \node (t6) {dd}; & \node (t7) {ICMP}; \\          };          \path[draw, every node, ->] (t1)--(t2)--(t3)->(t4)->(t5)->(t6)->(t7)->(t8)->(t9)->(t10);         \end{tikzpicture} \end{figure}


title: How hard is it to use typo-dir.lua in LaTeX?

text: I tried to use `typo-dir.lua` from ConTeXt distribution in LaTeX but I could not. I searched all context sources and I added all missing functions but still it did not work. Is it possible to use this Lua file in LaTeX? I am only trying to see how that works in LaTeX.               \documentclass{article}     \usepackage{fontspec}     \directlua{     require("typo-dir")     commands.setdirection(1)     }     \luatexpardir TRT     \luatextextdir TRT     \begin{document}     1984     \end{document}      **Edit:** Using @phg's files, I get the following error:               ./test-typo-dir.tex:4: LuaTeX error ...al/texlive/2013/texmf-dist/tex/context/ba     se/typo-dir.lua:48: attempt to index local 'mathcodes' (a nil value)     stack traceback:         ...al/texlive/2013/texmf-dist/tex/context/base/typo-dir.lua:48: in main chunk         [C]: in function 'require'         ./import-typo-dir.lua:172: in main chunk         [C]: in function 'require'         ...xlive/2013/texmf-dist/tex/luatex/luatexbase/modutils.lua:57: in function 're     quire_module'         [string "\directlua "]:1: in main chunk.     \lltxb@requirelua ...xluaescapestring {#2}" \fi )}          l.4           ?


title: Level separation height in Forest seems to have no effect

text: How can I increase level separation to keep the tree nodes aligned when the node texts include the line breaks? `l sep` seems to have no effect.               \documentclass{article}     \usepackage{forest}          \begin{document}          \begin{forest}      for tree={         for tree={draw=black,align=center,l sep=6em},       edge path={         \noexpand\path[\forestoption{edge}]           (!u.parent anchor) -- +(0,-15pt) -|              (.child anchor)\forestoption{edge label};       },       l sep=10pt,     }     [P\\1\\2       [N1\\1\\2,name=_N1         [N1C1\\1\\2]         [N1C2,name=_N2]       ]       [N2         [N2C1]         [N2C2]       ]     ]     \end{forest}          \end{document}      ![enter image description here](http://i.stack.imgur.com/bxZOy.jpg)


title: Variables in TikZ

text: I use TikZ to draw graphics in LaTeX. I'd like to do arithmetic on variables. For example I haves nodes named after `N-1` and `N-2` and I'd like to create the `N-3` and `N-4` nodes as `+2` from the first nodes. Something like that:               \foreach \y in {1,2}     \node[right of=N-\y] (N-{2+\y}) {x};      is not working but is meaning what I want. * * * @jake OK, that works fine. Now say I want to use it on two variables:               \foreach \x / \y in {1/2,3/4}      and I want to know `\x+\y`


title: Where can I store custom documents of custom beamer themes?

text: I am using TeX Live 2012 in Ubuntu 12.04. I have downloaded some custom `beamer` themes and put them in `~/texmf`. But I have no idea where to put the manual of the `beamer`s. BTW, besides `texdoc`, is there other ways to check the document of a package? I tried `texdoc tikz` and `texdoc pgf` but the result is not the 700+ pages pgf manual.


title: siunitx table alignment

text: I want to align both the numbers and the text to the left using siunitx' S column type. I tried:               \documentclass[ngerman]{scrreprt}          \usepackage{babel}         \usepackage[locale=DE]{siunitx}         \sisetup{separate-uncertainty}     \sisetup{multi-part-units=single}          \usepackage{booktabs}          \begin{document}          \selectlanguage{ngerman}              \begin{tabular}{l*{2}{S[table-figures-decimal=1,                             table-text-alignment=left,                             table-number-alignment=left,                             table-figures-uncertainty=1]}}        \toprule        A & {Column1 symbol $\Delta$} & {Column2 symbol $\delta$} \\          & {Column1} & {Column2} \\        \midrule        B &  -5.0 \pm 1.0 & -10.0 \pm 2.0 \\        C &   0.0 \pm 1.0 &   5.0 \pm 2.0 \\        D & -20.0 \pm 1.0 & -100.0 \pm 2.0 \\     \bottomrule     \end{tabular}          \end{document}      Unfortunately the text and the minus' from the numbers are not in line. Aligning both to the right works fine.


title: Suppress line numbering for specific lines in listings package

text: I would like to suppress the line numbering for specific lines in `listings` package by identifying the specific lines using some kind of command.


title: Graph into graph with arrows

text: I'm using `tikzpicture` and I have some graphs, but I want some graphs with arrows. Is there any simple syntax change for that? My Graph:               \begin{tikzpicture}[thick]              \begin{scope}                \draw (4,0) node[label=below:5] {};     ...              \end{scope}              \draw      ...              (4,4) -- (6,0);     \end{tikzpicture}


title: Memoir with chapterstyle "veelo": black box also for unnumbered chapters

text: I'm using the memoir class with chapter style "veelo", which renders black boxes for numbered chapters: ![enter image description here](http://i.stack.imgur.com/RsYhJ.png) But not for unnumbered chapters: ![enter image description here](http://i.stack.imgur.com/ewK8l.png) Is there a way to get these boxes also for unnumbered chapters? (preferably in the same line as the caption)


title: Minimal work example for darray from breqn

text: I was trying to use the `darray` environment from the `breqn` package but hadn't success on it. As a mwe I would like to replace the `eqnarray` below by the `darray`.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{eqnarray*}       \max & & c^T x \\       \text{s.t.} & & x \in \left\{ 0, 1 \right\}^n     \end{eqnarray*}     \end{document}      I try               \documentclass{article}     \usepackage{amsmath}     \usepackage{breqn}     \begin{document}     \begin{darray}[cols={rl}]       \max & c^T x \\       \text{s.t.} & x \in \left\{ 0, 1 \right\}^n     \end{darray}     \end{document}      but got the error below               ! Undefined control sequence.     \@tempc ...let \@preamble \@empty \darray@mkpream                                                        #1\@percentchar      l.5 \begin{darray}[cols={rl}]          ?      ! Emergency stop.     \@tempc ...let \@preamble \@empty \darray@mkpream                                                        #1\@percentchar      l.5 \begin{darray}[cols={rl}]          End of file on the terminal!


title: Two column code listings in appendix in a one column report

text: How do I place a two column appendix in a single column report? I want it so that at the beginning of the appendix I'm in single column mode, then I want to place some source code listings in 2 column format within my appendix. Thanks


title: Make \leaders repeat a string at least a given number of times

text: Using the _glossaries_ and _glossary-longragged_ packages (In a memoir document) as well as a custom style I found by Googling:               \newglossarystyle{dottedlocations}{%         \glossarystyle{list}%         \renewcommand*{\glossaryentryfield}[5]{%         \item[\glsentryitem{##1}\glstarget{##1}{##2}]                  \emph{##3}\ignorespaces\unskip\leaders\hbox to 2.9mm{\hss.}\hfill##5}%                 \renewcommand*{\glsgroupskip}{}%          }         \glossarystyle{dottedlocations}      (Source) My problem is that several of my abbreviations are used rather often, which makes the \leaders sometimes repeat the \hss. zero times, as demonstrated below for polydopamine: ![enter image description here](http://i.stack.imgur.com/0rV8s.png) I tried to insert a few dots manually before the \leaders, which lead to the appearance of a gap between those dots and the leaders. So the question is: **Is there a way to force a \leaders to repeat a following \hbox a certain minimum of times?** i.e. is there a way to force the \leaders to repeat the \hbox at least three times before expanding if there is a need?


title: Shift table up after rotating

text: I am using `\rotatebox` to rotate a table 90 degrees counter-clockwise on a portrait page. I am able to center the table horizontally, but not vertically. It sits at the bottom of the page below the page number. I don't think I can use `\sidewaystable` because I don't want to create a new page; I am using `usepackage{endfloat}` to move all of my tables and figures to the end of the document. I've tried adding `\vspace*{\fill}` within the table, but this does not seem to work. I've also tried adding `[origin=c]` to get `\rotatebox[origin=c]{90}`, but no luck. Any ideas for how to center this table vertically while still using endfloat?               \documentclass[11pt,fullpage]{article}          \usepackage{graphicx}     \usepackage{float}     \usepackage{endfloat}     \usepackage{threeparttable}          \begin{document}          \begin{table}     \centering       \rotatebox{90}{         \begin{threeparttable}           \caption{Title}           \label{lbl}           \begin{tabular}{lllll}             1 & 2 & 3 & 4 & 5  \\             blahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh & blahhhhhhhhhhhhhhhh & blahhhhhhhhhh &                          blahhhhhhhhh & blahhhhhhhhh  \\           \end{tabular}           \begin{tablenotes}             \small             \item Note.           \end{tablenotes}          \end{threeparttable}       }     \end{table}          \end{document}