title: complaints of glue length "mu"; amsart; list of definitions

text: So I have the following MWE:               \documentclass{amsart}          \usepackage{etoolbox}          % Modifications to amsart ToC-related macros...     \makeatletter     \let\old@tocline\@tocline     \let\section@tocline\@tocline          % Insert a dotted ToC-line for \subsection and \subsubsection only     \newcommand{\subsection@dotsep}{4.5}     \newcommand{\subsubsection@dotsep}{4.5}     \patchcmd{\@tocline}       {\hfil}       {\nobreak          \leaders\hbox{$\m@th             \mkern \subsection@dotsep mu\hbox{.}\mkern \subsection@dotsep mu$}\hfill          \nobreak}{}{}     \let\subsection@tocline\@tocline     \let\@tocline\old@tocline          \patchcmd{\@tocline}       {\hfil}       {\nobreak          \leaders\hbox{$\m@th             \mkern \subsubsection@dotsep mu\hbox{.}\mkern \subsubsection@dotsep mu$}\hfill          \nobreak}{}{}     \let\subsubsection@tocline\@tocline     \let\@tocline\old@tocline          \let\old@l@subsection\l@subsection     \let\old@l@subsubsection\l@subsubsection          \def\@tocwriteb#1#2#3{%       \begingroup         \@xp\def\csname #2@tocline\endcsname##1##2##3##4##5##6{%           \ifnum##1>\c@tocdepth           \else \sbox\z@{##5\let\indentlabel\@tochangmeasure##6}\fi}%         \csname l@#2\endcsname{#1{\csname#2name\endcsname}{\@secnumber}{}}%       \endgroup       \addcontentsline{toc}{#2}%         {\protect#1{\csname#2name\endcsname}{\@secnumber}{#3}}}%          % Handle section-specific indentation and number width of ToC-related entries     \newlength{\@tocsectionindent}     \newlength{\@tocsubsectionindent}     \newlength{\@tocsubsubsectionindent}     \newlength{\@tocsectionnumwidth}     \newlength{\@tocsubsectionnumwidth}     \newlength{\@tocsubsubsectionnumwidth}     \newcommand{\settocsectionnumwidth}[1]{\setlength{\@tocsectionnumwidth}{#1}}     \newcommand{\settocsubsectionnumwidth}[1]{\setlength{\@tocsubsectionnumwidth}{#1}}     \newcommand{\settocsubsubsectionnumwidth}[1]{\setlength{\@tocsubsubsectionnumwidth}{#1}}     \newcommand{\settocsectionindent}[1]{\setlength{\@tocsectionindent}{#1}}     \newcommand{\settocsubsectionindent}[1]{\setlength{\@tocsubsectionindent}{#1}}     \newcommand{\settocsubsubsectionindent}[1]{\setlength{\@tocsubsubsectionindent}{#1}}          % Handle section-specific formatting and vertical skip of ToC-related entries     % \@tocline{<level>}{<vspace>}{<indent>}{<numberwidth>}{<extra>}{<text>}{<pagenum>}     \renewcommand{\l@section}{\section@tocline{1}{\@tocsectionvskip}{\@tocsectionindent}{\@tocsectionnumwidth}{\@tocsectionformat}}%     \renewcommand{\l@subsection}{\subsection@tocline{1}{\@tocsubsectionvskip}{\@tocsubsectionindent}{\@tocsubsectionnumwidth}{\@tocsubsectionformat}}%     \renewcommand{\l@subsubsection}{\subsubsection@tocline{1}{\@tocsubsubsectionvskip}{\@tocsubsubsectionindent}{\@tocsubsubsectionnumwidth}{\@tocsubsubsectionformat}}%     \newcommand{\@tocsectionformat}{}     \newcommand{\@tocsubsectionformat}{}     \newcommand{\@tocsubsubsectionformat}{}     \expandafter\def\csname toc@1format\endcsname{\@tocsectionformat}     \expandafter\def\csname toc@2format\endcsname{\@tocsubsectionformat}     \expandafter\def\csname toc@3format\endcsname{\@tocsubsubsectionformat}     \newcommand{\settocsectionformat}[1]{\renewcommand{\@tocsectionformat}{#1}}     \newcommand{\settocsubsectionformat}[1]{\renewcommand{\@tocsubsectionformat}{#1}}     \newcommand{\settocsubsubsectionformat}[1]{\renewcommand{\@tocsubsubsectionformat}{#1}}     \newlength{\@tocsectionvskip}     \newcommand{\settocsectionvskip}[1]{\setlength{\@tocsectionvskip}{#1}}     \newlength{\@tocsubsectionvskip}     \newcommand{\settocsubsectionvskip}[1]{\setlength{\@tocsubsectionvskip}{#1}}     \newlength{\@tocsubsubsectionvskip}     \newcommand{\settocsubsubsectionvskip}[1]{\setlength{\@tocsubsubsectionvskip}{#1}}          % Adjust section-specific ToC-related macros to have a fixed-width numbering framework     \patchcmd{\tocsection}{\indentlabel}{\makebox[\@tocsectionnumwidth][l]}{}{}     \patchcmd{\tocsubsection}{\indentlabel}{\makebox[\@tocsubsectionnumwidth][l]}{}{}     \patchcmd{\tocsubsubsection}{\indentlabel}{\makebox[\@tocsubsubsectionnumwidth][l]}{}{}          % Allow for section-specific page numbering format of ToC-related entries     \newcommand{\@sectypepnumformat}{}     \renewcommand{\contentsline}[1]{%       \expandafter\let\expandafter\@sectypepnumformat\csname @toc#1pnumformat\endcsname%       \csname l@#1\endcsname}     \newcommand{\@tocsectionpnumformat}{}     \newcommand{\@tocsubsectionpnumformat}{}     \newcommand{\@tocsubsubsectionpnumformat}{}     \newcommand{\setsectionpnumformat}[1]{\renewcommand{\@tocsectionpnumformat}{#1}}     \newcommand{\setsubsectionpnumformat}[1]{\renewcommand{\@tocsubsectionpnumformat}{#1}}     \newcommand{\setsubsubsectionpnumformat}[1]{\renewcommand{\@tocsubsubsectionpnumformat}{#1}}     \renewcommand{\@tocpagenum}[1]{%       \hfill {\mdseries\@sectypepnumformat #1}}          % Small correction to Appendix, since it's still a \section which should be handled differently     \let\oldappendix\appendix     \renewcommand{\appendix}{%       \leavevmode\oldappendix%       \addtocontents{toc}{%         \protect\settowidth{\protect\@tocsectionnumwidth}{\protect\@tocsectionformat\sectionname\space}%         \protect\addtolength{\protect\@tocsectionnumwidth}{2em}}%     }     \makeatother          % #1 (default is as required)          % #2          % #3     \makeatletter     \settocsectionnumwidth{2em}     \settocsubsectionnumwidth{2.5em}     \settocsubsubsectionnumwidth{3em}     \settocsectionindent{1pc}%     \settocsubsectionindent{\dimexpr\@tocsectionindent+\@tocsectionnumwidth}%     \settocsubsubsectionindent{\dimexpr\@tocsubsectionindent+\@tocsubsectionnumwidth}%     \makeatother          % #4 & #5     \settocsectionvskip{10pt}     \settocsubsectionvskip{0pt}     \settocsubsubsectionvskip{0pt}          % #6 & #7     % See #3          % #8     \renewcommand{\contentsnamefont}{\bfseries\Large}          % #9     \settocsectionformat{\bfseries}     \settocsubsectionformat{\mdseries}     \settocsubsubsectionformat{\mdseries}     \setsectionpnumformat{\bfseries}     \setsubsectionpnumformat{\mdseries}     \setsubsubsectionpnumformat{\mdseries}          % #10     % Insert the following command inside your text where you want the ToC to have a page break     \newcommand{\tocpagebreak}{\leavevmode\addtocontents{toc}{\protect\clearpage}}          % #11     \let\oldtableofcontents\tableofcontents     \renewcommand{\tableofcontents}{%       \vspace*{-\linespacing}% Default gap to top of CONTENTS is \linespacing.       \oldtableofcontents}          \setcounter{tocdepth}{3}          %%%%%%%%%%%%%%%%%%%     %  PROBLEM AREA   %     %%%%%%%%%%%%%%%%%%%          \usepackage{amsthm}     \usepackage{thmtools}      %AMSART STUFF          \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}          \theoremstyle{definition}          \newtheorem{definition}[theorem]{Definition}          \newtheorem{example}[theorem]{Example}     \newtheorem{xca}[theorem]{Exercise}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}          \numberwithin{equation}{section}          \usepackage[explicit]{titlesec}     \usepackage{hyperref}     \hypersetup{         colorlinks,%         citecolor=black,%         filecolor=black,%         linkcolor=black,%         urlcolor=black     }          % renew \contentsline for toc to include hypertarget     \let\oldcontentsline\contentsline%     \renewcommand\contentsline[4]{%     \hypertarget{toc#4}{}%     \oldcontentsline{#1}{#2}{#3}{#4}}          % renew \section to link to the toc     \titleformat{\section}     {\normalfont\Large\bf}     {{\thesection} \hyperlink{tocsection.\thesection}{#1}}     {1pc}     {}          % renew \subsection to link to the toc     \titleformat{\subsection}     {\normalfont\bf}     {{\thesection} \hyperlink{tocsubsection.\thesubsection}{#1}}     {1pc}     {}          \begin{document}          \title{Report fom}          %    Information for first author     \author{Brn}     %    Address of record for the research reported here     \address{6G1}     %    Current address          \email{safds@fds.ca}     %    \thanks will become a 1st page footnote.     \thanks{The author was supported bnd the Department.}          %    General info     %\subjclass[2000]{Primary 54C40, 14E20; Secondary 46E25, 20C20}          \date{\today.}          %\dedicatory{This paper is dedicated to my advisor.}          \keywords{Differ??}          \begin{abstract}     This paper is      \end{abstract}          \maketitle               \tableofcontents          %\listoftheorems          \section{This is a numbered first-level section head}     This is an example of a numbered first-level heading.          \begin{theorem}     stuff     \end{theorem}          \subsection{This is a numbered second-level section head}     This is an example of a numbered second-level heading.          \section{This fasfdasfdsais a numbered first-level section head}     This is an example of a numbered first-level heading.          \subsection*{This is an unnumbered second-level section head}     This is an example of an unnumbered second-level heading.          \end{document}      and whenever I try to write out a list of theorems, or definitions it complains of a glue length "mu"... I've traced it to maybe the               % Insert a dotted ToC-line for \subsection and \subsubsection only      at the 4th item down, but I don't know why theorems would be treated as either sub or subsubsections. The definitions and theorems etc show up fine in the body but when I implement their printing, _i.e._               \listtheorems (or is it \listoftheorems ?)      I get this glue length error. As an aside note, when is it proper to use `ntheorem`, `amsthm`, etc ?


title: positioning nodes according to their sizes in tikz?

text: I produced the following output using the `tikz` code shown below. What I want is for the arrow on the right to have a fixed length relative to the rightmost symbol, not relative to the center of the node. How do I accomplish this? I'm new to `tikz`, and could not figure out how to do it using mechanisms like `xshift` or `+(x,y)` coordinates. Basically I want to be able to specify the position of the right-hand node (tip of the arrow) as something like               n0.east+(1em,0)      ![enter image description here](http://i.stack.imgur.com/lBdri.jpg)               \documentclass{article}     \RequirePackage{tikz}     \begin{document}          \pgfdeclarelayer{nodelayer}     \pgfdeclarelayer{edgelayer}     \pgfsetlayers{edgelayer,nodelayer,main}     \tikzstyle{arrow}=[draw=black,arrows=-latex]          \newcommand{\foo}[1]{%       \begin{tikzpicture}[baseline=(n1.base),thick]         \begin{pgfonlayer}{nodelayer}           \node (n0) at (0, 0) {$#1$};                      \node (n1) at +(2em, 0) {};                           \end{pgfonlayer}         \begin{pgfonlayer}{edgelayer}           \draw [style=arrow] (n0) to (n1);         \end{pgfonlayer}       \end{tikzpicture}     }          \foo{x}          \foo{xy}          \end{document}


title: I have miktex but it can not recognize the xepersian package

text: I downloaded Miktex2.9 but when I try to type Farsi(persian) it does not recognize the xepersian package and give an error instead. I need to add the xepersian or other packages to my Miktex please tell me how to do it. TNX


title: Controlling the exact positioning and size of individual glyphs

text: I'm typesetting a book using the _memoir_ document class. The overall layout comes with a background image. This image incorporates space for the page numbers in the footer which looks like a slot machine. This means that there exists an individual space for each number (up to three) with a fixed width and height. I've already customized the `\footskip` and the overall size of header and footer to match the design. However, it is hard to get the numbers to fit exactly in the different "slots" of the slot machine background. Is there a way to tell LaTeX how much space it should use for a glyph so that the page number fits the background image exactly?


title: Landscape caption for a rotated figure in a portrait page

text: I've managed to rotate an image 90 degrees to be as if in landscape mode, but I still need to change location and rotation of the caption to match the image's orientation, while keeping the page in portrait mode (headers, pagination...etc). I use `memoir` AND `caption` package (yes I know it emulates `caption` functionality). The `caption` options:               \usepackage{caption}     \captionsetup{font=small,labelfont=bf}      The `figure` environment:               \begin{figure}[htbp]     \centering     \includegraphics[width=17cm,angle=90]{./Images/1-PsychrometricChart}     \caption[The Psychrometiric Chart]{The Psychrometric Chart \cite{szokolay08} \label{PsychroChart}}     \end{figure}      **Addendum:** An option that defines two cases of the image being placed on either the recto or verso pages would be a major plus, after all the image could be placed on either for many reasons. Let's say if it's on the recto page it faces the right margin, and if on the verso page faces the left margin.


title: Combining leftskip, rightskip and raggedright

text: For some text (`\blindtext` below), I would like to add 20pt to the left and right page margin, and I would like the text to be raggedright (no hyphenation). The first try below does not add 20pt to the right margin. The second try below does not apply raggedright.               \documentclass{article}     \usepackage{blindtext}          \begin{document}     \setlength{\parindent}{0pt}     TEXT LEFT \hfill TEXT RIGHT          \begingroup\raggedright\leftskip=20pt \blindtext \par\endgroup     \par\vspace{20pt}          \begingroup\raggedright\leftskip=20pt\rightskip=20pt \blindtext \par\endgroup     \end{document}      ![enter image description here](http://i.stack.imgur.com/QDCNp.png)


title: Getting TeXnicCenter to see Asymptote

text: I am re-installing my LaTeX system onto a new computer, and am having trouble forcing Asymptote to output PDF files. As always, I've been following the instructions on the Art of Problem Solving website. When I try to compile my asymptote, I get the message "cannot find module '%tc-*.asy'". Can somebody help me resolve this issue?


title: Caption of an image doesn't follow flushleft

text: Hello I want to place a photograph in a page so i write:               \begin{figure}[h]     \caption{H Feistel Function }     \begin{flushleft}     \includegraphics[scale=0.7]{func}     \end{flushleft}     \end{figure}      I face 2 problems: a) The caption is not flashed to the left. How is that possible? b) There is enough space for a second picture if it is flashed to the right but a mirror code like the above sends the next picture to the next page as it should. How can I fix that?


title: Problem with spanish and babelbib

text: I'm not an English native speaker. All the documents I write are in Spanish. To handle this I use some packages like `babel` and `babelbib` for bibliographies. However, this can cause some troubles of incompatibility with for example TikZ, `hyperref`, etc. It's interesting that if we change the `spanish` option, when we call the `babel` package, by any other language, we get a better support. For example this thread is about some error messages that appear when we use `[spanish]{babel}` + `babelbib`. The only known solution (provided in the same page) is to comment the line 171 in the `babelbib.sty` package file. My problem is that many documents I write must be compiled by other people, and, unfortunately, people that can't understand what they must do in order to fix the problem with the `babelbib package`. And I don't want to go to everybody's house to fix that. So, I'm wondering if there is some code that I can put in all my documents to comment line 171 of `babelbib.sty` at every compilation. If no, what can I do?


title: How to expand values stored in a token defined by newtoks

text: In this project, the directory structure and file names are based on three parameters, with there being one exception to both. ## Directory Path: `\GetTexFilePath{}{}{}` The directory path is based on the top level directory (`#1`), the first parameter passed to the macro. Normally the path is of form `../#1/xxx#2/#3/`, except when `#1=\SpecialCase` in which case, the **`xxx`** is _not_ part of the path. ## File Names: `\GetTexFileName{}{}{}` The file name is dependent on the _current_ value of the token: `\the\CurrentTokenValue`. The files names are of the form `#1-#2-#3`, except for one special case when `\the\CurrentTokenValue=\SpecialCase`, in which case, the file name is just `#3`. * * * Below I am using the `expl3` solution adapted from Text being output when none should be. As requested by @egreg, I have added a section at the beginning to test the various cases and have added the expected output in the comments. Have also added red color to the failing output, and blue color to the correct output. The first two sections following the above list, work just fine, but the third case where the file name depends on the value of `\the\CurrentTokenValue` fails. Also note that in section 3, `#1=\the\CurrentTokenValue` and the directory name correctly does _not_ have the **`xxx`** in it (which is correct). But the file name did not get shortened. Section 3 yields: > ../special/02/z/special-02-z but the correct value for Case 3 should be > ../special/02/z/z ## Questions:   1. How do I adjust `\GetTexFileName` so that the file name depends on the token?   2. Why did this expansion issue of tokens not have a problem when used in the file path, just the file name? I need to use the concatenated output of the path and file name macros (with a `/` in between) to be able to to check `\IfFileExists`. ## Answer:   * I have confirmed that changing the `\def\SpecialValue{special}` to `\protected\def\SpecialValue{special}` as per @egreg's answer works for all these cases. My concern with that is I don't know if that will have any other effect on the usage of `\SpecialValue`, and hence a solution local to `\GetTexFilePath` and `\GetTexFileName` would be preferable.    * Bruno's suggestion to add `\expandafter\empty` before the first parameter to `\str_if_eq:xxTF` works for this test cast, but fails in my actual usage for some reason. ## Notes:   * The complaint about the file not being found is not the problem.    * All working cases are in blue.   * All failing cases are in red. ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{xparse}          \def\SpecialValue{special}     \newtoks{\CurrentTokenValue}          \ExplSyntaxOn     % Determine path: Always #1/xxx#2/#3 unless #1=\SpecialValue     \NewDocumentCommand{\GetTexFilePath}{m m m}{%         \str_if_eq:xxTF{#1}{\SpecialValue}{../#1/#2/#3}{../#1/xxx#2/#3}%     }%          % Determine file name: Always #1-#2-#3 unless \the\CurrentTokenValue=\SpecialValue.     \NewDocumentCommand{\GetTexFileName}{m m m}{%         \str_if_eq:xxTF{\the\CurrentTokenValue}{\SpecialValue}{#3}{#1-#2-#3}%     }%     \ExplSyntaxOff          \newcommand*{\GetFileNameWithPath}[3]{%         \GetTexFilePath{#1}{#2}{#3}/%         \GetTexFileName{#1}{#2}{#3}%     }%          \newcommand*{\TestFile}[2][red]{%         \noindent%         Token Value = \the\CurrentTokenValue%         \par\noindent%         \IfFileExists{#2}{%             \textcolor{#1}{File \FileWithPath\ found.}%         }{%             \textcolor{#1}{File \FileWithPath\ not found.}%         }%     }%     \begin{document}     \CurrentTokenValue={NonSpecial}%          \color{blue}% These work (up until the change to red color)     1a. \GetTexFilePath{A}{B}{C}             \par%          ../A/xxxB/C           Note: xxx     2a. \GetTexFilePath{\SpecialValue}{B}{C} \par%          ../special/B/C        Note: no xxx     3a. \GetTexFilePath{\the\CurrentTokenValue}{B}{C} \par% ../NonSpecial/xxxB/C  Note: xxx     %   ----------------     4a. \GetTexFileName{A}{B}{C}             \par%          A-B-C     5a. \GetTexFileName{\SpecialValue}{B}{C} \par%          special-B-C     6a. \GetTexFileName{\the\CurrentTokenValue}{B}{C} \par% NonSpecial-B-C          \smallskip\hrule\smallskip          % Changing the value of \CurrentTokenValue to this one special value,      % should only change the file name, and should not effect the      % file path.  Absolutely no reason why the first two here should be      % any different than above, but included here for completeness.     \CurrentTokenValue={\SpecialValue}%           1b. \GetTexFilePath{A}{B}{C}             \par%          ../A/xxxB/C           Note: xxx     2b. \GetTexFilePath{\SpecialValue}{B}{C} \par%          ../special/B/C        Note: no xxx     \color{red}% These next 4 fail     3b. \GetTexFilePath{\the\CurrentTokenValue}{B}{C} \par% ../special/B/C        ** FAILS **     %   ---------------     4b. \GetTexFileName{A}{B}{C}             \par%          C                     ** FAILS **     5b. \GetTexFileName{\SpecialValue}{B}{C} \par%          C                     ** FAILS **     6b. \GetTexFileName{\the\CurrentTokenValue}{B}{C} \par% C                     ** FAILS **     \color{black}          \bigskip\hrule\hrule\bigskip          \CurrentTokenValue={NonSpecial}          \section{Normal Case: Works}     Neither the first parameter, nor the \verb|\the\CurrentTokenValue| is  \verb|\SpecialValue| so should have \verb|xxx| in the path, and a file name with two dashes:          \edef\FileWithPath{\GetFileNameWithPath{NonSpecial}{02}{z}}%     \TestFile[blue]{\FileWithPath}          \section{Top directory is special case: Works}     The first parameter is \verb|\SpecialValue|, but not \verb|\the\CurrentTokenValue| so should \textbf{not} have \verb|xxx| in the path, and a file name with two dashes:          \edef\FileWithPath{\GetFileNameWithPath{\SpecialValue}{02}{z}}%     \TestFile[blue]{\FileWithPath}          \section{Both Top directory and TokenValue are special cases}     Since both the first parameter is \verb|\SpecialValue| and \verb|\the\CurrentTokenValue| are a special case, we should \textbf{not} have \verb|xxx| in the path, and a file name should be short:          \CurrentTokenValue={\SpecialValue}     \edef\FileWithPath{\GetFileNameWithPath{\the\CurrentTokenValue}{02}{z}}%     \TestFile{\FileWithPath}          \bigskip     \noindent     Correct result for the above case is     \def\FileWithPath{../special/02/z/z}%          \TestFile[blue]{\FileWithPath}     \end{document}


title: Table caption in uppercase. I don't know why

text: \documentclass{IEEEtran}              \begin{document}              \begin{table}[ht]              \centering              \begin{tabular}{|l|c|}              \hline           \multicolumn{2}{|c|}{Default Parameters} \\           \hline         Disk Purchase cost & $\$100$ \\         Disk Operating Cost & $\$66$ \\         Flash Purchase Cost & $\$500$\\         Flash Operating cost & $\$20$\\         Duration & 100 years\\         $K_r$& .15\\         \hline         \end{tabular}              \label{tab:default}         \caption{Default parameters used for Monte Carlo Model.}         \end{table}         \end{document}      Can someone tell me why I am getting caption like this TABLE 1 DEFAULT PARAMETERS...


title: Easier way to make permutation diagrams?

text: I prefer using figures created inside TeX, but I only know very labor- intensive methods. The following creates a permutation diagram for (6,3,2,4,1,5) with some colors and additional symbols. I'm considering a project that would call for lots of these sorts of figures. Would it work to write a macro to create things like this? Any other advice for making this less painful?               \[ \begin{matrix}[cc|cccccc|c]       & & & & & & {\color{blue}\downarrow} & {\color{blue}\downarrow} & S \\ \hline       & 6 & {\color{red}\newmoon} & & & & & & {\color{red}\leftarrow} \\        {\color{blue}*} &5 & & & & & &  {\color{blue}\newmoon} &  \\        & 4 & & & & {\color{red}\newmoon} & & & {\color{red}\leftarrow} \\        & 3 & & {\color{red}\newmoon} & & & & & {\color{red}\leftarrow} \\       & 2 & & & \fullmoon & & & &  \\      {\color{blue}*} & 1 & & & & & {\color{blue}\newmoon}  & & \\ \hline     & & 1 & 2 & 3 & 4 & 5 & 6 & \\     &  & {\color{red}*} & {\color{red}*} & & {\color{red}*} & & &     \end{matrix} \]      ![enter image description here](http://i.stack.imgur.com/6BOXL.jpg)


title: Defining the size of a graphic based on the number of rows it should span in ConTeXt

text: I am using ConTeXt to make a document containing many illustrations. Some will appear placed like this (the area in brackets is where the illustration will appear:               This is some text. This is some text.     [                       ] X This is some     [                       ] text. This     [                       ] is some text.     [                       ] This is some     [                       ] text. This     [                       ] is some text.     [                       ] This is some     text. This is some text. This is some     text.      In this example, the graphic is exactly 7 rows high, the width is adjusted to match a 1:1 ratio. The top of the graphic aligns with the top of the text in the 2nd row and the bottom of the graphic aligns with the bottom of the text in the 8th row.   * How can I place a graphic in my document in this way, by defining the number of rows the graphic must span?


title: graphe with tikz or pstricks?

text: I've a second question about TikZ or Pstricks. How can I type the code to obtain like this ? thank you ![enter image description here](http://i.stack.imgur.com/oGrJB.png)


title: I can not modify the chapter in latex

text: Sorry for my English. Hello, I want to get something like this: ![http://img110.xooimage.com/files/5/7/6/lpic-1-linux- prof...gina_059-4751149.jpg](http://i.stack.imgur.com/ShBPs.jpg) Latex My level is not so high to do so. I tried to do it with the following code, but not sure it will help some. He had thought titlesec modify the chapter and table of contents with minitoc, but are incompatible.               \documentclass[a4paper]{book}     \usepackage[a4paper]{geometry}     %\usepackage{minitoc}     \usepackage{titlesec}     \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter}{50pt}{\Huge\bfseries}     %\titlespacing*{\chapter}{0pt}{0pt}{30pt}          \begin{document}     %\dominitoc[n]\nomtcrule     \tableofcontents          \chapter{Prueba}     \rule{\linewidth}{1mm}     %\minitoc     \section{otra prueba}     \subsection{probando subseccion}     \end{document}


title: vertical text orientation (multiple rows) in tabular environment

text: I would like to create a table that is labelled like the axis of a plot, i.e. a vertical orientation of the y-axis' label. This is what I have               \begin{tabular}{rc|c|c|c|}     &&\multicolumn{3}{|c|}{Category A}\\     &&little&some&a lot\\     &little&&&\\     Category B&some&&\\     &a lot&&&\\\hline     \end{tabular}      But I would like the text 'Category B', to be vertical spanning from row 3-5 instead of being horizontal in row 4. How do I achieve that?


title: Installing Texlive on Debian x86-64 Platform

text: I had previously worked with the texlive distribution provided in the Debian repository, but I came across many inconveniences as a result of it being outdated (no tlmgr; forced to manually update and install packages, etc.) So I decided to remove the package and reinstall texlive using the installer provided by the CTAN website. After waiting several hours for it install all the packages, `latex` does not seem to recognize any of the new packages that should have come with the 2011 texlive distribution (e.g. `adforn`). Furthermore, `tlmgr` did not show up as a recognized command. So I try               cd /usr/local/texlive/2011/bin/x86_64-linux/     sudo ./tlmgr --self --update all      But the operation fails, with the following output.               tlmgr: package repository http://mirrors.ibiblio.org/pub/mirrors/CTAN/systems/texlive/tlnet     Fundamental package texlive.infra not present, uh oh, goodbyeSerious error, texlive.infra not found at ./tlmgr line 4949.      I have not been able to find much useful information online regarding the error message. Do you have any ideas as to how I can fix `tlmgr` and get `latex` to recognize the newly-installed packages? Thanks for the help!


title: better spellchecker for lyx

text: I am using LyX 2.0.5.1 and the spell checker here does not seem to have a well developed dictionary - a lot of words that are marked as wrong are actual words. Is there a way to install another spellchecker to work with LyX? I saw the documentation online but it does not provide step by step directions. Could someone do this? I am on Windows machine.


title: How to set font size "e" in ConTeXt?

text: According to the ConTeXt manuals, there is a font size "e", the largest available font size. Whenever I try to use this, however, the command fails. What is the proper way to enable this font size?


title: Multiline item indent

text: I am currently writing a set of steps for my lecture notes on circles but when the description of the step is too long, becomes multiline, the enumerated environment does not left indents properly as I would like it to be. See my example below at the third step, the word "sides" should be directly below the word "Take":               \documentclass[letterpaper]{article}     \usepackage{fullpage}     \usepackage{amsmath,amssymb,amsthm,enumitem}          \begin{document}     To convert from general form to standard form, we will follow these steps:     \begin{enumerate}[itemindent=1cm,label=\bfseries Step \arabic*.]       \item Ensure the coefficient of the terms in $x^2$ and $y^2$ are 1 respectively.       \item Group the terms containing $x$ and $y$ respectively. Move the constant to the RHS.       \item Take half of the coefficient of the linear terms in both $x$ and $y$, square it and add it to both sides.       \item Rewrite the result in factored form.     \end{enumerate}     \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/LzAky.png) I am currently reading How to indent second line of an item in list environment? and Leftalign labels with enumitem but I do not quite get how to achieve it with my example in a simple and precise manner. Any help would be highly appreciated.


title: Maxima exported file in LaTeX

text: I exported this document from Maxima.               \documentclass{article}          %% Created with wxMaxima 12.01.0          \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{color}     \usepackage{amsmath}               \definecolor{labelcolor}{RGB}{100,0,0}          \begin{document}               \noindent     %%%%%%%%%%%%%%%     %%% INPUT:     \begin{minipage}[t]{8ex}{\color{red}\bf     \begin{verbatim}     (%i6)      \end{verbatim}}     \end{minipage}     \begin{minipage}[t]{\textwidth}{\color{blue}     \begin{verbatim}     VA4: matrix(      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,V,0,0,0,0,0,0,0,0,0,V,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,V,0,0,0,0,0,0,0,0,0,V,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]     );     \end{verbatim}}     \end{minipage}     %%% OUTPUT:     \begin{math}\displaystyle     \parbox{8ex}{\color{labelcolor}(\%o6) }     \begin{pmatrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & V & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & V & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & V & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & V & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{pmatrix}     \end{math}     %%%%%%%%%%%%%%%          \end{document}      The above code gives me this output. You can see that after 10-th column it starts new row. I wonder how to fix this problem. Thanks in advance for your help.![enter image description here](http://i.stack.imgur.com/2FlQC.png)


title: Undefined control sequence error for sum expression in equation

text: The below sum expression inside the equation throws an undefined control sequence error.               \begin{equation}         \left\|x\left[t\right]-\textbf{1} F(X)\right\|^2 = \sum_{i = 1}^{n} \lambda_i^2t     \lvert x \left[ 0 \right] \rvert^2     \end{equation}      Error: Undefined control sequence.               |^2 = \sum_{i = 1}^{n} \lambda_i^2t \lvert                                              x \left[ 0 \right] \rvert^2      My guess is I am doing something wrong with the `\lvert` or `\lambda`. Don't know exactly. Any suggestion on how to solve this issue will be very helpful.


title: A Tunisian flag on Tikz using a macro "m-grams"

text: I tried to represent the flag of my country. I typed this code. But I believe that the position of stars, circles, ... is not so respected. In addition I have a left margin "white band" I want to eliminate it, but without result. Please can you help me get the correct code.               %A tunisian flag     %Author: Fethi GHARIANI     %using Tom Bombadil code in http://tex.stackexchange.com/questions/58903/how-to-draw-star-in-tikz-background who uses a macro for drawing stars as well as "n-grams"     \documentclass[fontsize=14pt]{scrartcl}     \usepackage[norsk,francais]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[dvips=false,pdftex=false,vtex=false,paperwidth=24cm,paperheight=16cm,margin=0cm,bottom=0cm,top=0cm,nohead]{geometry}     \usepackage{graphicx}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric}                         % inner radius, outer radius, tips, rot angle, options étoile     \newcommand{\tstar}[5]{     \pgfmathsetmacro{\starangle}{360/#3}     \draw[#5] (#4:#1)     \foreach \x in {1,...,#3}     { -- (#4+\x*\starangle-\starangle/2:#2) -- (#4+\x*\starangle:#1)     }     -- cycle;     }          \newcommand{\ngram}[4]{% outer radius, tips, rot angle, options     \pgfmathsetmacro{\starangle}{360/#2}     \pgfmathsetmacro{\innerradius}{#1*sin(90-\starangle)/sin(90+\starangle/2)}     \tstar{\innerradius}{#1}{#2}{#3}{#4}     }          \definecolor{rec}{rgb}{1,0,0}     \definecolor{cir}{rgb}{1,1,1}     \definecolor{hon}{rgb}{1,0,0}     \definecolor{sta}{rgb}{1,1,1}          \begin{document}     \begin{tikzpicture}       \fill[rec] rectangle (24cm,16cm);       \fill[cir] (12,8) circle (4cm);       \fill[hon] (12,8) circle (3cm);       \fill[sta] (12.8,8) circle (2.4cm);       \ngram{1.5}{5}{72}{red,thick,fill=red,xshift=13.2cm,yshift=8cm};     \end{tikzpicture}     \end{document}


title: Xelatex hyperref problem

text: > **Possible Duplicate:**   >  Hyperlinking a drawing I need a drawn line hyperlinked a specific page in the document. In the following MWE when I comment out polyglossia package and use PDFLatex, it works fine. However, if I use polyglossia package with XeLaTex it doesn't. For my document I have to use Polyglossia/XeLaTeX. Need your help. Thank you!               \documentclass[a4paper]{article}     \usepackage{hyperref}     \usepackage{polyglossia}          \usepackage{geometry}     \geometry{hmargin={0.2in,0.2in},vmargin={0in,0in},     paperwidth=3.56in, paperheight=5.95in}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }     \pagenumbering{gobble}          \begin{document}     \phantomsection\label{PP1}     First page. \newpage          \phantomsection\label{PP2}     Second page. \newpage          \hyperref[PP1]{\line(1,0){200}}          \end{document}


title: Is there an easy way to make bifurcating/converging edges in TikZ?

text: > **Possible Duplicate:**   >  Using relative coordinates in TikZ to draw joined curves ## The problem This problem is thematically related to this question, in fact, I was going to ask roughly the same thing before I discovered it in the similar questions list. Now my problem is setting up a **bifurcating curved edge** such as seen in the **lower loop** of the following diagram (which I have now revised so that it isn't upside down): ![a chemical reaction scheme](http://i.stack.imgur.com/zsOKR.png) You will notice from the code that I am using a secret hidden node between C_ox. and C_red. This is to set up a node with an `inner sep =0pt` to act as the starting point for an edge to the 4e- node, allowing the C_red. to C_ox. loop to visually bifurcate. ## Code This was achieved with the code:               \documentclass[a4paper]{minimal}     \usepackage[version=3]{ mhchem   }     \usepackage{ tikz     }     \usetikzlibrary{arrows,positioning}     \begin{document}     \begin{tikzpicture}[]     \def\vdil{-0.0cm};     \def\hdil{0.25cm};             \node (c0) [] {$C_{ox.}$};             \node (mid)       [right =of c0,        xshift=-\hdil] {};             \node (c1)        [right =of mid,       xshift=-\hdil] {$C_{red.}$};             \draw[<-] (c0) to [bend right =50] (c1);             \draw[<-] (c1) to [bend right =50] (c0);             \node (R)         [above =of c0,        yshift=-\vdil] {\ce{2H_{2}O}};             \node (P)         [above =of c1,        yshift=-\vdil] {\ce{O_{2} + 4H^{+}}};             \draw[->] (R) to  [bend right  =50] (P);             \node (upmid)     [below =of mid,       yshift=\vdil+0.375cm,inner sep=0pt] {};             \node (electrons) [below =of c0,        yshift=\vdil] {\ce{4e^{-}}};             \node (sink)      [below =of electrons, yshift=\vdil] {sink};             \draw[->] (upmid)     to [bend right =25] (electrons);             \draw[->] (electrons) to (sink);     \end{tikzpicture}     \end{document}      Obviously, there's a lot of _fine-tuning_ here and the code is somewhat brittle to changes in the node contents and even the typeface. Moreover the bifurcation doesn't appear 100% horizontally symmetric as the bend angle is just a guess, whereas the touching edges of the upper loop are horizontally symmetric by definition. Is there an easier way to set up a bifurcation like this?


title: PDF bookmarks for sections and subsections with the llncs class

text: The following code is in the preamble of my LaTeX document:               \documentclass{llncs}     \usepackage{amsmath,amssymb}     \usepackage{url}     \usepackage[algoruled,vlined]{algorithm2e}     \usepackage{graphicx,subfigure}               \usepackage{hyperref}      \hypersetup{colorlinks=true,citecolor=blue}               \numberwithin{equation}{section} % numbering according to the section     \bibliographystyle{plain}  %Choose a bibliograhpic style     \begin{document}          \title{The Title}     \maketitle     \section{A}     \label{sect:A}     \subsection{a}     \subsection{b}     % ...     \section{B}     \label{sect:B}     \subsection{a}     \subsection{b}     % ...     \section{C}     \label{sect:C}     \subsection{a}     \subsection{b}     % ...     \end{document}      Note that the text is organized into sections and subsection. However, after compiling the code, the Adobe PDF preview does not show the "tree" branching on the left. Instead, it just shows "The Title", and that option has no branching with the "+/-" sings. How could I achieve this?


title: How to create protocol flows inside a centred box?

text: Could you please give some directions how to create the following figure in latex? It is the situation of describing a two parties protocol centered in a box. It is like a 3X4 table but i have difficulties with the alignment. Tikz is the only way for drawing this? ![figure 3](http://i.stack.imgur.com/Wo0X6.jpg)


title: Custom list of hypotheses in table of contents format

text: **The Context:** I am writing a multi-chapter scientific report with many numbered hypotheses. I have created a custom hypothesis environment in the preamble: `\newtheorem{hypothesis}{Hypothesis}[chapter]` An example of a hypothesis in the body of the document is:               \begin{hypothesis}     \label{HXonY}     There is a positive relationship between X and Y.     \end{hypothesis}      **My Question:** How can I create a custom List of Hypotheses like a Table of Contents that lists:   * the hypothesis number (e.g.,1.1, 1.2, 2.1, etc.)    * the text of each hypothesis in the document   * the page number where it is recorded E.g.,                List of Hypotheses      1.1 There is a positive relationship between X and Y .................. 32      1.2 There is a negative relationship between something and Z........... 43      etc.


title: a "... doesn't match its definition" problem, that I don't understand

text: I managed to extract from my code the following MnWE which shows the problem i encounter : **Example 1**               \begin{document}     \newcommand{\createDATA}[1]{       \xdef\DATA{}       \newcommand{\test}[2][]{         \xdef\DATA{\DATA args=##1 , ##2 }       }       \test[x]{\macom[x]{blabla}}     }     \newcommand{\macom}[2][q]{AAA}     \createDATA     \DATA     \end{document}      The compilation gives an error : `! Use of \\\test doesn't match its definition.` which I can't understand. On the other hand, notice that if in the definition of `\createDATA` I replace `\macom` by a command without optional argument, then it works : **Example 2**               \begin{document}     \newcommand{\createDATA}[1]{       \xdef\DATA{}       \newcommand{\test}[2][]{         \xdef\DATA{\DATA args=##1 , ##2 }       }       \test[x]{\macomm{blabla}}     }     \newcommand{\macomm}[1]{BBB}     \createDATA     \DATA     \end{document}      It is very mysterious to me...


title: Unnumbered section in article class

text: I am trying to include an "Acknowledgments" section in my thesis, I want this to be before the abstract and also not numbered. It doesn't need to appear in the ToC. I'm using the `article` class and read the               \section*{}      should do the trick. Sadly, it doesn't. The section is still numbered and appears in the ToC ...               \documentclass[a4paper, 12pt, final]{article}          \usepackage{fancyhdr}     \usepackage{geometry}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{sectsty}     \usepackage{setspace}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{caption}     \usepackage{abstract}     \usepackage{subfig}     \usepackage{url}     \usepackage[final]{pdfpages}     \usepackage{todonotes}     \usepackage{amsmath}     \usepackage{float}          \geometry{a4paper,left=25mm,right=20mm,top=32mm,bottom=26mm}     \pagestyle{fancy}     \lhead{\changefont{12pt}{ptm}{m}{sl}\leftmark}     \rhead{\changefont{12pt}{ptm}{m}{sl}\thepage}     \cfoot{}     \linespread{1.08}     \captionsetup{labelsep=none, figurename= , tablename= }     \allsectionsfont{\fontfamily{phv}\selectfont}     \subsubsectionfont{\fontfamily{phv}\fontsize{14pt}{14pt}\selectfont}     \renewcommand{\thefigure}{\thesection.\arabic{figure}}     \newcommand{\changefont}[4]{\fontsize{#1}{#1}\fontfamily{#2} \fontseries{#3} \fontshape{#4} \selectfont}     \newcommand{\standard}{\changefont{12pt}{ptm}{m}{n}}     \newcommand{\fussnote}[1]{\footnote{\it #1}}     \newcommand{\abbildung}{\changefont{10pt}{ptm}{m}{it}}     \let\origitemize\itemize     \def\itemize{\origitemize\itemsep0pt}     \renewcommand{\abstractnamefont}{\normalfont\huge\bfseries}     \graphicspath{{./images/}}     \renewcommand{\figurename}{Fig.}      \renewcommand{\tablename}{Table:}      \parindent=0pt      \widowpenalty=1000     \clubpenalty=1000     \renewcommand{\baselinestretch}{1.6 }           %Start of the actual document     \begin{document}          \author{Me}     \title{My Verry Interesting Project}     \date{\today}     \addtocounter{page}{-1}          \maketitle          \thispagestyle{empty}          \newpage          \pagenumbering{roman}     \input{Letter}     \newpage     \input{Acknowledgments}     \newpage     \input{Abstract}     \newpage     \tableofcontents     \newpage     \listoffigures     \listoftables     \newpage     \pagenumbering{arabic}     \setcounter{page}{1}     \input{Introduction}     \end{document}      In the `Acknowledgments.tex` file all I use is               \Section*{Acknowledgments}


title: Remove indent from table environment, and center-set the resulting table

text: How can I center my table if I'd like it to be ´1.5\textwidth´?               \documentclass{amsart}     \usepackage{graphicx}     \usepackage{booktabs}     \usepackage{ctable}     \usepackage{tabularx}     \usepackage{rotating}     \usepackage{multirow}     \begin{document}           \begin{table}[p]     %\centering      \resizebox{1.5\textwidth}{!}{%      \noindent\begin{tabular}{llllll}      \toprule      \multicolumn{6}{c}{Care Type} \\      \textbf{Direct care} & \textbf{Housekeeping} & \textbf{Mealtimes} & \textbf{Medication rounds  } & \textbf{Miscellaneous} & \textbf{Personal care} \\      \midrule      Blood pressure measurement & Equipment cleaning& Dispensing meals& Distributing medication&Call requests&Toiletting\\      & &&&&\\      Weights & Cleaning patient surfaces& &Injections&Bed making &Changing\\      & &&&&\\      SATs~\footnote{Blood sugar saturation}  & &&&&\\       \bottomrule      \end{tabular}}      \caption{Activity type and examples of each}      \label{tab:activities}\end{table}           \end{document}      Looks like this: ![enter image description here](http://i.stack.imgur.com/DPQsM.png) EDIT: Using `\centerline{\resizebox{\textwidth}{!}{...}` I get: ![enter image description here](http://i.stack.imgur.com/lLnNY.png) Using `\centering\makebox{\textwidth}{}` I get: ![enter image description here](http://i.stack.imgur.com/BqRrr.png) Using `\begin{tabularx}{1.5\textwidth}{*6X}`               \begin{table}[p]      \centering\makebox[\textwidth]      % \centerline       {\resizebox{1.1\textwidth}{!}{%     \begin{tabularx}{1.5\textwidth}{*6X} % \begin{tabularx}{llllll}      \toprule      \multicolumn{6}{c}{Care Type} \\      \textbf{Direct care} & \textbf{Housekeeping} & \textbf{Mealtimes} & \textbf{Medication rounds  } & \textbf{Miscellaneous} & \textbf{Personal care} \\      \midrule      Blood pressure measurement & Equipment cleaning& Dispensing meals& Distributing medication&Call requests&Toiletting\\      & &&&&\\      Weights & Cleaning patient surfaces& &Injections&Bed making &Changing\\      & &&&&\\      SATs~\footnote{Blood sugar saturation}  & &&&&\\       \bottomrule      \end{tabularx}}}     \smallskip      \caption{Activity type and examples of each}      \label{tab:activities}\end{table}


title: Unable to load picture or PDF file

text: XeLaTeX has stopped including `.eps` files in my document. I get errors such as:               ! Unable to load picture or PDF file './images/deBuitleir.fig4.eps'.      The image file is there, I double-checked. **History:** Inclusion of `.eps` images worked fine until I did a "safe- upgrade" on Debian. Based on this and this, it seems to be a regression of an old Debian bug. Since I couldn't find a patch that fixed the problem, I removed all TeX and XeTeX packages on my Debian system and installed TeX Live from source. I then updated my path. Unfortunately, the error is still occurring, even though I have a "plain vanilla" TeX Live installation. I really really don't want to convert all of my `.eps` files to another format. Does anyone know how to fix this? Thank you in advance. Here's the MWE:               \documentclass[letter,10pt]{article}          \usepackage{graphicx}          \begin{document}          Figure 1          \includegraphics[scale=0.5,keepaspectratio=true]{./images/deBuitleir.fig1.eps}          \end{document}


title: Lower case first character

text: How do you make a macro that takes 1 argument and forces the very first character to low? So you could write the following:               \firstToLow{SOME TEXT INPUT OF VARIATING LENGTH}      And then get this output: > sOME TEXT INPUT OF VARIATING LENGTH It should be supporting hyperref sou I will be able to write this:               \firstToLow{\textit{\nameref{label}}}


title: Why do colours defined using CMYK give inconsistent results in TikZ mindmaps?

text: # Background I was trying to draw a mindmap using the `tikz` `mindmap` library for possible use in a `beamer` presentation. # The Problem Depending on my choice of colours, the colour of nodes does not match the colours of the connectors linking them to other nodes. This is true whether the connections are automatically created using the mindmap's hierarchy or whether the connections are added manually afterwards in a `\path` operation. # MWE This code demonstrates the problem. The first map is straight from page 662 of the manual and works fine. The second map is just like the first except that the colours used are different.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{mindmap}          \begin{document}            \tikz[mindmap,concept color=blue!80]         \node [concept] {Root concept}         child[concept color=red,grow=30] {node[concept] {Child concept}}         child[concept color=orange,grow=0] {node[concept] {Child concept}};            \tikz[mindmap,concept color=magenta]         \node [concept] {Root concept}         child[concept color=cyan,grow=30] {node[concept] {Child concept}}         child[concept color=yellow,grow=0] {node[concept] {Child concept}};          \end{document}      ![Mindmap colouring oddities](http://i.stack.imgur.com/sI7Dg.png) There are two problems:   1. The node colours are not as expected. This is less obvious in the case of yellow but very obvious in the case of cyan and magenta.   2. The colours are not _consistent_. That is, the connectors seem to use colours like those I would expect, even though the nodes do not. So the connectors do not flow smoothly to/from the nodes. # Investigation The colours which work consistently are all defined using the RGB model. The colours which produce inconsistent results are all defined using the CMYK model. A work around is to define alternative colours in the RGB model. For example, to define a new colour, `rgbmagenta` just like `magenta` but in terms of `rgb` rather than `cmyk`.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{mindmap}     \definecolor{rgbmagenta}{rgb}{1,0,1}     \definecolor{rgbcyan}{rgb}{0,1,1}     \definecolor{rgbyellow}{rgb}{1,1,0}     \begin{document}            \tikz[mindmap,concept color=rgbmagenta]         \node [concept] {Root concept}         child[concept color=rgbcyan,grow=30] {node[concept] {Child concept}}         child[concept color=rgbyellow,grow=0] {node[concept] {Child concept}};          \end{document}      ![Mindmap with alternative colour definitions](http://i.stack.imgur.com/ErL6L.png) # Question Why exactly does this happen? Can it be avoided without redefining colours as I did in the workaround? I fear this question is surely a duplicate but searching has so far turned up nothing especially enlightening. I have found threads suggesting that TikZ may be converting colours from the CMYK model to RGB but while that might explain the colours not being quite as expected, it doesn't explain the inconsistencies.


title: What would be your minimalistic wish list for new TeX programming primitives?

text: I have written a lot of 'weird' TeX over the years and have never encountered a situation where TeX's programming environment was completely inadequate. I have, however, often wished for just _a little_ more help when writing complicated macros. Discovering juggling braces, conditionals and `\string`, as well as the `\romannumeral-1...` trick was fun but felt a bit too idiosyncratic. Now (only a month ago if one can believe this! and I have been using TeX for over twenty years!) that I have looked at LaTeX3 code (`expl3` to be more precise, I still cannot make myself use LaTeX), I have found a number of the same tricks that I have almost been ashamed to use (I have even picked up a couple of slightly shorter ways of achieving some effects). **So, after this long introduction, what would be your wish list for a TeX extension that addresses original TeX's programming inefficiencies, and why, if possible?** Ideally, this will be a **short list** (5 items or less). Only the **programming** environment should be addressed (i.e. nothing involving TeX's handling of, say, fonts, other typographic issues, etc. Frank Mittelbach's paper on the topic treats that area quite well). Note that I enjoy TeX's minimalist philosophy and macro programming in general (although it feels like I have got wings when I switch to writing embedded code in C), so I am looking for an answer more in TeX's spirit rather than 'just use LuaTeX' (I have nothing agains LuaTeX _per se_ it just feels a bit _ad hoc_ ; I also feel that making programming _too easy_ is not a great idea). If the answer is ' _e-TeX (or some other extension) already does all of this and here is why e-TeX's choices are better_ ', please elaborate. I will start with my own wish list: `\xxpandafter{tokens}` -- expands the token following the group `\iftoks{token list}{token list}` -- compares two token lists (same as `\def\listone{...}\def\listtwo{...}\ifx\listone\listtwo ...` but expandable) `\unlet token` -- expands to a category code, character code token or nothing if the token is not an active character/control sequence let to such a character `\numexpr` -- same as e-TeX (only wish it was paired with `\endnumexpr` instead of `\relax`) `\batchxmode{...}` allows for automatic recovery from errors for the code expanded inside the braces, itself expands to nothing (i.e. same as `\batchmode ... \errorstopmode` but expands to nothing)


title: I cannot create the table in latex, why?

text: I am trying to create a table in LaTeX. I have a file with few tables, and when I try to create one more, it yields the following errors: There are several problems at this line:   * Missing number, treated as zero.`\begin{table}[hbt]` (followed by: )   * Undefined control sequence: `\begin{table}[hbt]` (followed by: )   * Too many unprocessed floats. `\begin{table}[hbt]` (followed by: ) If I create this table without the `table` environment, it works. But when I surround it with `\begin{table}[hbt] ... \end{table}`, I get the mentioned errors. I have no idea what is wrong, because all previous table are identical (copy/paste).


title: LaTeX Verbatim Source Code Beside the Typeset Output

text: I am a beginner to LaTeX, and I am reading Leslie Lamport's A Document Preparation System. In various places of his book, he puts the LaTeX source code beside the output obtained by running latex on the source. Even more interestingly, in order to keep the same height for both the source codes and the output on the page, some source codes are omitted by ellipsis. I am wondering how he has made it possible to omit the right portion of the source snippets such that the verbatim source codes occupy the same height as the output. I have googled about the various verbatim packages. But it seems that none of them can be smart enough to keep the verbatim source codes occupy the same vertical distance as the output. I am now skeptical about if there exists such packages or you have to do it manually. **EDIT** I have screen-shot an example. I wonder if the author manually did the verbatim part or there is a package that can substitute the text with ellipsis when you require the height of the verbatim text (on the right of the example) to be the same as the real output (on the left of the example). ![enter image description here](http://i.stack.imgur.com/CdL2b.png)


title: Drawing angles greater than 360º inTikZ

text: When teaching trigonometry, sometimes it is useful to represent angles greater than 360º with some kind of "spiral arc". For example: ![angles](http://i.stack.imgur.com/dZnEA.png) the angle of -440º in the figure. My question is: > How can I do this in nicely TikZ? I can do it by using several consecutive `arcs`, but I wish to know if is there a more elegant solution to this.


title: natbib bibliography/references section SPLIT into sections

text: I have a Bibliography section which I'd like to split into sections, like this:   * References      * Conference and workshop proceedings        * Reference 1       * Reference 2     * Journal articles        * Reference 3       * Reference 4     * Internet Engineering Task Force Request For Comments (IETF RFCs)        * Reference 5     * Application Programming Interfaces (APIs)        * Reference 6 I use commands such as these to build my references:               \usepackage[round]{natbib}     \renewcommand*{\refname}{}     \nocite{*}     \bibliographystyle{plainnat}     \bibliography{myReferences}      end then:               /home/robottinosino$ latex f && bibex f && latex f && latex f


title: Modifying \everydisplay causes the align* environment to stop working

text: I want all displayed mathematics in my document to be typeset in the style of inline mathematics. In his answer to this question, Matthew Leingang explains how to do the opposite (typeset all inline mathematics in the style of displayed mathematics) by carefully modifying the `\everymath` token list. Reasoning by analogy I figured that the following test document ought to work:               \documentclass[a4paper,reqno]{amsart}          \usepackage{amssymb,amsmath,amsthm,fullpage}          \everydisplay=\expandafter{\the\everydisplay\textstyle}          \begin{document}          \begin{align*}x     &=\sum_{i=1}^{10}i^2\\     &=t^3+\int_3^9y^a\,\mathrm{d}y\end{align*}          \end{document}      But it does not. When trying to compile this document, TeXWorks gives the following error:               ! Improper \halign inside $$'s.     <recently read> \halign      The code it displays, as though to draw my attention to a mistake, is the code in the vicinity of `\end{align*}`. This error does not appear if the line in the preamble modifying `\everydisplay` is commented out. Why doesn't this work?


title: Difference between a nomenclature section and a glossary

text: This is not a technical question. I'm writing a thesis and I have found out about MakeIndex, which allows building a glossary and the nominal package, which helps making a nomenclature section. So, what's the difference between the two? What kind of definitions fit into one or the other? No difference?


title: Adjusting spacing on chapter heading for all sections of a thesis

text: My university recently changed the formatting standards for thesis/dissertations, and I'm working with a LaTeX style file that has been hacked on by several others. It more or less works, but every time I have to change something, I have to manually override formatting. The main problem is the spacing from the top of the page to the chapter (or "List of...") heading. The standard requires that these be 2" from the top of the page, centered, in 12pt roman type with two single-space blank lines following. As requested, here is a 'minimal' example. Unfortunately, there's a lot of stuff going on in these files, and I'm having trouble making sense of it. In the utcthesis.cls file, I have the following:               \NeedsTeXFormat{LaTeX2e}%     \def\filename{utcthesis.cls}%     \def\fileversion{ver 1.0.0}%     \def\filedate{March 30, 2010}%     \def\contributors{Tony Saad}%     \ProvidesClass{utcthesis}     % some internal variables     \def\thesisID{1}%     \def\dissertationID{2}%     \def\theDocumentType#1{\gdef\@theDocumentType{#1}}%     \def\documentID#1{\gdef\@documentID{#1}}% documentID is either 1 (for thesis) or 2 (for dissertation)     % declare package options     \DeclareOption{thesis}{%         \def\@theDocumentType{thesis}%         \def\@documentID{\thesisID}}%     \DeclareOption{dissertation}{%         \def\@theDocumentType{dissertation}%         \def\@documentID{\dissertationID}}%     \DeclareOption{linespacing}{\@lnspacing}     \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{color}}%     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}%     \ExecuteOptions{dissertation,letterpaper,12pt}% execute default options     \ProcessOptions%     \LoadClass{report} % single-sided     \RequirePackage{amsmath,amsthm,amssymb}     % AMS math, AMS theorem, AMS fonts     \RequirePackage{setspace}                   % line spacing     \RequirePackage[vcentering,dvips]{geometry} % help with margins     \RequirePackage[pdftex,plainpages=false,pdfpagelabels=true,breaklinks=true]{hyperref} % for pdf bookmarks     \RequirePackage{color}     \RequirePackage{multicol}     \let\origdoublepage\cleardoublepage     \newcommand{\clearemptydoublepage}{%       \clearpage       {\pagestyle{empty}\origdoublepage}%     }     \let\cleardoublepage\clearemptydoublepage     \hypersetup{%         bookmarksnumbered = true,         pdfpagelayout=SinglePage,         bookmarksopen=False,         pdfborder=0 0 0,        % make all links invisible, so the pdf looks good when printed           pdffitwindow=true,      % window fit to page when opened         pdfnewwindow=true,      % links in new window         colorlinks=true,        % false: boxed links; true: colored links         linkcolor=blue,         % color of internal links         citecolor=magenta,      % color of links to bibliography         filecolor=magenta,      % color of file links         urlcolor=cyan           % color of external links     }     \geometry{         letterpaper,         left = 1.0in,         right = 1.0in,         top = 1.0in,         bottom = 1.2in     }     \hyphenpenalty=5000 % reduce hyphenation as much as possible     \tolerance=1000     % goes with the previous command     \clubpenalty=10000    % Minimize orphans orphans(eliminate 10000)     \widowpenalty=10000   % Minimize widows     \brokenpenalty=10000  % Do not allow hyphen across pages     \renewcommand{\thefootnote}{\fnsymbol{footnote}}     \raggedbottom     \pagestyle{plain}     \renewcommand{\@makeschapterhead}[1]{%       \vspace*{0.5in }%         \begin{center}         \uppercase{#1}         \mbox{} \\         \end{center}     }     \renewcommand{\@makechapterhead}[1]{%       \vspace*{0.5in }%         \begin{center}         CHAPTER \thechapter          \mbox{} \\         \uppercase{#1}         \mbox{} \\         \end{center}     }     \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne         \refstepcounter{chapter}%         \typeout{\@chapapp\space\thechapter.}%         \addcontentsline{toc}{chapter}%         {\protect\numberline{\thechapter}\uppercase{#2}}%         \else         \addcontentsline{toc}{chapter}{#2}%         \fi         \chaptermark{#1}%         \if@twocolumn         \@topnewpage[\@makechapterhead{#2}]%         \else         \@makechapterhead{#2}%         \@afterheading         \fi     }          \renewcommand\section{\@startsection {section}{1}{\z@}%         {-3.5ex \@plus -1ex \@minus -.2ex}%         {2.3ex \@plus.2ex}%         {\normalsize}}          \renewcommand\subsection{\@startsection {section}{1}{\z@}%         {-3.5ex \@plus -1ex \@minus -.2ex}%         {2.3ex \@plus.2ex}%         {\normalsize\centering}}          \newcommand {\addToTOC}[1] {         \cleardoublepage         \phantomsection         \addcontentsline{toc}{part}{#1}     }     \newcommand {\addToPDFBookmarks}[3] {         \cleardoublepage         \phantomsection         \pdfbookmark[#1]{#2}{#3}     }     \endinput       In thesis.tex:               \documentclass[thesis,monochrome,letterpaper,12pt]{utcthesis} %thesis, one side, monochrome text     \renewcommand{\baselinestretch}{2.0}      \usepackage{indentfirst}     \usepackage{verbatim}      \usepackage{float}         \usepackage[numbers]{natbib}        \usepackage{graphicx}     \usepackage{fancyhdr}               \usepackage{url}                    \usepackage[inactive]{srcltx}        \usepackage{relsize}                   \usepackage{booktabs}                  \usepackage{mathrsfs}                  \usepackage{setspace}     \usepackage{subfigure}     \usepackage[subfigure]{tocloft}     \usepackage{titlesec}     \usepackage[format=hang,labelsep=space,skip=20pt]{caption}     \usepackage{algpseudocode}     \usepackage{algorithm}     \usepackage{longtable}     \usepackage[acronym,nonumberlist,nopostdot]{glossaries}     \usepackage{setspace}     \usepackage[english]{babel}     \usepackage{blindtext}     \setcounter{secnumdepth}{0} %turn off numbering for all but chapters in the table of contents     \renewcommand{\cftchapnumwidth}{2em}     \setlength{\cftchapindent}{0.5in}     \setlength{\cftsecindent}{6em}     \setlength{\cftsubsecindent}{1.5in}     \setlength{\cftsubsubsecindent}{2.0in}     \renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}}     \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     %TOC formatting     \setcounter{secnumdepth}{0} %turn off numbering for all but chapters in the table of contents     \renewcommand{\cftchapnumwidth}{2em}     \setlength{\cftchapindent}{.5in}     \renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}}     \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     \renewcommand{\cftsecindent}{6em }     \setcounter{tocdepth}{1}     %Set proper spacing after lot, lof, toc, headings     \setlength{\cftbeforetoctitleskip}{0.45in}     \setlength{\cftaftertoctitleskip}{1em}     \setlength{\cftafterloftitleskip}{1em}     \setlength{\cftafterlottitleskip}{1em}     \setcounter{tocdepth}{3}     \setlength{\cftbeforepartskip}{1.5em}     \renewcommand{\cftchappagefont}{\fontsize{11}{13}}     \renewcommand{\cftchapfont}{\fontsize{11}{13}}     \renewcommand{\cftpartpagefont}{\fontsize{11}{13}}     \renewcommand{\cftpartfont}{\fontsize{11}{13}}     \renewcommand{\cftsecfont}{\fontsize{11}{13}}     \setlength{\cftbeforefigskip}{1em}     \setlength{\cftbeforetabskip}{1em}     \raggedbottom     \begin{document}     \renewcommand{\contentsname}{\begin{center}\textmd {\normalsize TABLE OF CONTENTS}\end{center}\vspace*{-0.18in}}      \renewcommand{\listfigurename}{\begin{center}\textmd{ \normalsize LIST OF FIGURES}\end{center}\vspace*{-0.18in}}      \renewcommand{\listtablename}{\begin{center}\textmd{ \normalsize LIST OF TABLES}\end{center}\vspace*{-0.18in}}      \renewcommand{\bibname}{\begin{center}\textmd{\normalsize REFERENCES}\end{center}\vspace*{-0.18in}}      \pagenumbering{alph} % this is needed to clear certain issues with the hyperref package     \newacronym{aip}{$\mathrm{AIP}$}{Aerodynamic Interface Plane}     \newacronym{cfd}{$\mathrm{CFD}$}{Computational Fluid Dynamics}     \makeglossaries     \singlespacing     \addToPDFBookmarks{0}{Table of Contents}{f}     \tableofcontents % generate a table of contents     \addToTOC{LIST OF TABLES} % this will add the list of tables to the Table of Contents (TOC)     {\singlespacing         \vspace*{-2em}         \listoftables % generate a list of tables     }     \doublespacing     \glsaddall     \addToTOC{LIST OF ABBREVIATIONS}     \printglossary[style=long,type=\acronymtype,title=LIST OF ABBREVIATIONS]     \addToTOC{CHAPTER}     \newpage     \pagenumbering{arabic}     \setcounter{page}{1}     \chapter{First Chapter}     \blindtext     \begin{table}[htb]         \centering         \renewcommand{\arraystretch}{1.25}         \caption{Just some data}         \begin{tabular}{lcc}             \toprule             Column A           & Col B  & Col C \\             \midrule             Row 1   & 0.9558 & 0.6531 \\             Row 2         & 0.9572 & 0.6508 \\             \bottomrule         \end{tabular}     \end{table}     \end{document}      If you compile the thesis.tex file, you should be able to see that the size and spacing of the Chapter 1 and List of Abbreviations headings match, but the Table of Contents and the List of Tables headings do not match. My goal is to get this fixed in a way that is easy to maintain, then share it with everyone else at the school. If it helps, the style guide is here: http://www.utc.edu/graduate- school/pdfs/thesis-dissertation-standards-3-25-13.pdf The LaTeX files are on Bitbucket: https://bitbucket.org/tonymcdaniel/utc_thesis


title: vertical align and color in table with multirow

text: I have the following table:               \documentclass[a4paper]{report}          \usepackage{booktabs}     \usepackage{multirow}     \usepackage[table]{xcolor}          \begin{document}          \begin{table}[htbp]       \centering         \begin{tabular}{l c c c}         \toprule     Group & Par. & Measure & Metric\\         \midrule     \rowcolor{gray!25} \cellcolor{white} Group 1 & & 1 &  \(Formula_1=\displaystyle\frac{A}{B}\cdot 2 \)\\ \addlinespace[3pt]     \rowcolor{gray!25} \cellcolor{white} & F &  2 &  \(Formula_2=\displaystyle\frac{C}{D}\cdot 3.1 \) \\ \addlinespace[3pt]       \rowcolor{gray!25} \cellcolor{white} & & 3 & \(Formula_3=\displaystyle\frac{E}{F}\cdot 2 \)\\  \addlinespace[3pt]          & & 3a &\\ \addlinespace[3pt]     & E & 3b &\\      &  & 4 & \(Formula_4=\displaystyle\frac{G}{H}\)\\ \addlinespace[12 pt]               \rowcolor{gray!25} \cellcolor{white} Group 2 & & 5 & \(Formula_5=\displaystyle\frac{I}{J}\)\\ \addlinespace[3pt]     \rowcolor{gray!25} \cellcolor{white} & P & 6 & \(Formula_6=\displaystyle\frac{K}{L}\)\\ \addlinespace[3pt]     \rowcolor{gray!25} \cellcolor{white} & & 7 & \(Formula_7=M-N \)\\ \addlinespace[3pt]          & & 7a &\\ \addlinespace[3pt]     & N & 7b &\\      & & 8 & \(Formula_8=\displaystyle\frac{O}{P}\)\\ \addlinespace[3 pt]              \bottomrule         \end{tabular}%       \caption{Hi, I am the caption.}       \label{measures}%     \end{table}%     \end{document}      That produce the following result: ![The table of the code presented above](http://i.stack.imgur.com/O0BuF.png) The are two clear problems that I cannot overcome:   1. The _ugly_ white space between the gray rows, due to "\addlinespace[3pt]", that in turns I have put to improve the fractions readability   2. The vertical space in the gray lines with equations: I wish they were not so close to the cell top and down borders (very clear in the first row: "A/B") What I have tried so far:   * To solve the first problem nothing serious... I tried to play with "rowcolor" and "cellcolor", with no sensible effects...   * I tried to add "\vphantom{\Huge{A}}" before `\\(Formula_1` but it solves only half of the problem, as can be see in the following image: ![With "Huge"](http://i.stack.imgur.com/F15fd.png)   * I have also tried this solution, but it doesn't solve the problem, and it colors all the table in my document (while I wish to have only this one colored). Hope everything is clear


title: Difference between (split, align) and (gather, aligned)?

text: Here is an MWE which shows that they seem to do the same thing. Is there any reason to prefer one over the other for typesetting groups of equations? I would prefer the `align` syntax because it allows `intertext`. In the other case, the alignment is limited to `aligned` environments within the larger `gather` environment. Any thoughts are welcome.               \documentclass{article}     \usepackage{amsmath}     \begin{document}          %==================     % gather+aligned     \begin{gather}     \begin{aligned}     x &= a + b\\     y &= c+ d     \end{aligned}     \end{gather}               %==================     % align+split     \begin{align}     \begin{split}     x &= a + b\\     y &= c+ d     \end{split}     \end{align}          \end{document}


title: Combining subfloat and newfloat packages for sublistings environment

text: I am using the `subfloat` package to group related figures; they show up like 1a, 1b, etc. in the List of Figures. Now, I want to define a new `listing` float using the `newfloat` package, which generates its own List of Listings. Alas, I am lacking something like a `sublistings` environment, which causes the listings to be labelled 1a, 1b, etc. as well:               \documentclass{article}     \usepackage[countmax]{subfloat}     \usepackage{newfloat}     \DeclareFloatingEnvironment{listing}          \begin{document}     \listoflistings          \begin{sublistings}     \begin{listing}     \caption{First listing}     \end{listing}     \begin{listing}     \caption{Second listing}     \end{listing}     \end{sublistings}          \end{document}      As far as I can see, the `subfloat` package has support for `subfigures` and `subtables` only. I wasn't able to copy & modify its code to produce a `sublistings` environment that works with the float defined by `newfloat`. Can anyone help me out?


title: Paragraphs are in bold

text: You can see it: http://wstaw.org/m/2011/02/22/plasma-desktopRe1862.jpg Page source:               \section{Esimese astme pealkiri}     \subsection{Alampealkiri}     \subsubsection{Veel madalam pealkiri}     \paragraph{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque mattis vestibulum mauris at tempor. Etiam sed dolor tortor, quis tristique erat. Aliquam et luctus lectus. Quisque ut nunc tempor velit ultrices vestibulum ut ut tortor. Curabitur ullamcorper metus nisl. Sed sem orci, vulputate ac placerat et, scelerisque non metus. Curabitur feugiat, dolor et tincidunt dictum, risus ante pretium nisl, sit amet consequat eros sapien tristique orci. Etiam nunc diam, tempor eget dictum id, tempor in ipsum. Mauris fringilla lacinia urna, id aliquet odio tristique a. Nulla viverra pellentesque libero, sed laoreet tortor tempus lacinia. Pellentesque tempor dictum tempus. Donec sed velit purus, quis pellentesque turpis. Vivamus non neque nisl, ac mattis dolor. Aliquam dictum fringilla tortor quis tempus. Aenean imperdiet, nulla eu laoreet porttitor, lectus elit semper dui, quis convallis lacus massa id eros. Cras convallis enim nec sapien ultrices vitae blandit diam rutrum. Praesent egestas felis non mi suscipit at molestie orci tristique. Ut hendrerit, libero sit amet commodo fermentum, odio nunc mattis magna, eu tempor nisl ligula non lorem.}     \paragraph{Morbi non egestas nisl. Maecenas eu ipsum justo, accumsan auctor ipsum. Vestibulum nec tortor justo. Morbi arcu nulla, luctus et aliquam a, fringilla ut diam. Nam suscipit, justo vel vulputate pretium, velit mauris adipiscing purus, eget molestie dolor nulla eu nunc. Nunc imperdiet lectus ac massa lacinia commodo. Duis sed dolor mauris, sed elementum ipsum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed id interdum massa. Integer condimentum justo in orci scelerisque accumsan. Aenean nibh ante, imperdiet in pretium ut, rutrum non diam. Aenean pellentesque elementum leo eget viverra. Proin pharetra elit id eros rhoncus facilisis.}      Main file code:               \documentclass[12pt,a4paper,titlepage]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          % Use Times New Roman font     \usepackage{txfonts}          % Make sections to uppercase     \usepackage{titlesec}     \titleformat{\section}     {\normalfont\Large\bfseries\uppercase}{\thesection}{12pt}{}     \titlespacing*{\section}     {0pt}{0pt}{24pt}     \titlespacing*{\subsection}     {0pt}{0pt}{24pt}     \titlespacing*{\subsubsection}{0pt}{0pt}{24pt}          % set some margins     \usepackage[top=2.5cm, bottom=2.5cm, left=3cm, right=2.5cm]{geometry}     \usepackage{setspace}     \onehalfspacing          \begin{document}     \input{mk_titlepage.tex}     \input{mk_contents.tex}     \input{mk_page_1.tex}     \end{document}      How can I set font to be lighter?


title: biblatex: How to manage "p." and "pp." marks in footnotes and in the bibliography

text: I'm making the first steps in Xelatex. Now I'm trying to make my bachelor in this program. I have TexLive 2010 (with updates 22.02.2011) installed on Kubuntu 10.04 . My text includes five languages (French, English, German, Greek (modern and ancient) Russian and Polish). The main language is French. The file that I've made is compiling well enough except two problems:   1. In footnotes and in the bibliography after compilation the period of pages is always has "p." even if pages in .bib file is done like `pages = {2--8}` (`@Book`, `@Article`, `@Misc`, `@Booklet` etc). How to make it shown like "pp."? I've read the manual and tried `\nop` and `\nopp` - it doesn't help.   2. How to make the small caps in footnotes and in the bibliography for the surnames of authors in Greek and Russian? (With the surnames in latin alphabet everything is ok.) Here is my file.               \documentclass[12pt]{report}     \usepackage{unifrmr}%%This is the package for the title page and the geometry of the body of the text          \usepackage[cm-default]{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{csquotes}          \usepackage{polyglossia}     \setdefaultlanguage{french}     \setotherlanguages{german,english,greek,polish,russian}     \setmainfont[Mapping=tex-text]{Linux Libertine}     \usepackage{setspace}          \usepackage[style=verbose-ibid,citepages=suppress]{biblatex}          \bibliography{master}     \frenchspacing          \begin{document}          \onehalfspacing     \input{introduction.tex}     \input{chapter1.tex}     \printbibliography          \end{document}      In the text I use the `\footcite`, `\autocite` and `\cite` tags. Would you help me, please? What I'm doing wrong?


title: How do I replace url text with a symbol in the bibliography of a CV (moderncv class)?

text: I want to include a link to my publication, using biblatex in a CV. But instead of the whole url, I just want a symbol which can be clicked. My MWE is as follows:               \documentclass[11pt,a4paper]{moderncv}          % moderncv themes     \moderncvtheme[blue]{classic}           % character encoding     \usepackage[utf8]{inputenc}                        \usepackage{bbding}          % personal data     \firstname{John}     \familyname{Doe}     \title{}                    \address{somewhere}              \email{some.thing@gmail.com}                           \definecolor{linkcolour}{rgb}{0,0.2,0.6}            % hyperlinks setup     \AfterPreamble{\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}}          \usepackage{filecontents}     \begin{filecontents}{pubs.bib}     @article{cazier_whole-genome_2014,         title = {My publication},         volume = {5},         url = {http://Somewebsite.html},        journal = {Nature},         author = {Doe, John. and Smith, John},         month = apr,         year = {2014},     }     \end{filecontents}          \AfterPreamble{     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}     }          \usepackage[backend=biber, doi=false, isbn=false, style=nature, maxbibnames=20, defernumbers=true]{biblatex}          \addbibresource{pubs.bib}                    \begin{document}     \maketitle     \nocite{*}     \printbibliography[title={Publications}, type=article, resetnumbers=true]          \end{document}      What I have tried:               \AfterPreamble{     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}     \let\orighref\href     \renewcommand{\href}[2]{\orighref{#1}{\ArrowBoldUpRight}} %I found this code on tex.SE     }      What I get: ![result](http://i.stack.imgur.com/7BVUz.jpg) As you can see, I get the little arrow replacing the email link. Whereas I want the url in the bibliography replaced with the arrow, without affecting the email link.


title: How could I find a LaTeX hourglass?

text: I look for a nice `LaTeX hourglass` unicode (U+231B) ⌛. G**gle gives some nice things but nothing typeseting compatible.


title: Unicode-math does not render the Gamma letter

text: (updated) I wonder why `unicode-math` does not render the letter Latin Gamma!?               \documentclass{article}     \usepackage{unicode-math}     \setmathfont{Tahoma}     \begin{document}     $ɣ γ$     \end{document}      This only render the Greek Gamma.


title: How does one remove material from a token list?

text: This is a follow-up question to How does one append material to a token list? The macros `\prependto` and `\appendto` work nicely to _add_ content to token lists. How would one go about creating macros like `\gobblefirst` and `\gobblelast` that removes the first/last token from the list? Assume the following cases:   1. The tokens are separated by some fixed token (like `\relax`); or   2. The tokens are _not_ separated by any fixed token. I assume a solution to 1 would be (far) easier than a solution to 2.


title: Equation numbering problem, `alignat`

text: When using the `alignat` environment I encounter a strange equation numbering problem. It's rather hard to describe, but here is an MWE. I describe the output below.               \documentclass[]{memoir}     \usepackage{amsmath}     \listfiles          \begin{document}          \frontmatter          \mainmatter          \begin{alignat}{2}     1 & = 2 \\ \nonumber     1 & = 2      \label{eqn1}     \end{alignat}          This calls equation~\eqref{eqn1}.          \begin{alignat}{2}     2 & = 3 \\ \nonumber     2 & = 3     \label{eqn2}     \end{alignat}          This calls equation~\eqref{eqn2}.          \begin{equation}     3 = 4     \label{eqn3}     \end{equation}          This calls equation~\eqref{eqn3}.          \end{document}      The output from that correctly numbers the equations. However, the first sentence reads "This calls equation (2)." The second reads "This calls equation (??)." The third correctly reads "This calls equation (3)." The log notes the following when compiling:               LaTeX Warning: Reference `eqn2' on page 1 undefined on input line 25.      I checked the list of style file versions that are being accessed and they're all from the latest TeX distribution (which I updated a few weeks ago). In other words everything's coming from the main tex distribution tree: `/usr/local/texlive/2012/texmf-dist/tex/latex/...` Even so, here's the file list from the log file:                *File List*       memoir.cls    2011/03/06 v3.6j configurable book, report, article document cl     ass        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       ifetex.sty    2011/12/15 v1.2 ifetex      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)        mem10.clo    2008/01/30 v0.3 memoir class 10pt size option     mempatch.sty    2009/07/24 v6.0f Patches for memoir class v1.6180339      amsmath.sty    2000/07/18 v2.13 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names      ***********      I'm running on Mac OS X 10.6.8 via TexShop. Any assistance would be greatly appreciated. (Note: I do not have the reputation points to create a new tag for `alignat` but it might be useful to have.)


title: How to tweak the font of page number in the whole document?

text: First `fancyhdr` is loaded to change the font of page number. The following commands are used to change the font to `sans serif`:               \fancyhead[LO]{ \sffamily \thepage }     \fancyhead[RE]{ \sffamily \thepage }      However, in the first page of TOC, LOT, LOF and Chapter, the font is still `serif`. Moreover, how to change the font of the page numbers (for chapters, sections, subsection, figures and tables) in TOC, LOT, LOF, including the Roman/roman number style for frontmatters as well? Is the a simple command to change this font for the whole document (book, report or article)? MWE:               \documentclass[12pt]{book}     \usepackage{kantlipsum}        \usepackage{libertine}          \usepackage[]{fancyhdr}     \pagestyle{fancy}     \fancyhf{} % remove everything          \fancyhead{} % clear all header fields            \makeatletter     \renewcommand{\sectionmark}[1]{\markright{\thesection~~~#1}}     \renewcommand{\chaptermark}[1]{\markboth{\if@mainmatter\chaptername\     \thechapter~~~\fi#1}{}}     \makeatother          \newcommand{\vertline} {\smash{\rule[-.5ex]{1pt}{5in}}}  % head line     \fancyhead[LO]{ \sffamily  \thepage {} {} {}      {   \vertline   {} {}       \nouppercase \leftmark}  }     \fancyhead[RE]{ \sffamily { {  \nouppercase \rightmark {} {}   \vertline   {} {} {}  }\thepage } }  %     \renewcommand{\headrulewidth}{ 0.0 pt}          \newcommand{\myfig}{\begin{figure}\caption{A figure caption}\end{figure}}     \newcommand{\mytab}{\begin{table}\caption{A table caption}\end{table}}          \begin{document}      \tableofcontents      \listoffigures      \listoftables     \chapter{Coo1}      \kant[1]     \myfig\mytab\myfig\mytab\myfig\mytab     \section{Soo1}      \kant[2-5]     \section{Soo2}      \kant[6-9]          \chapter{Coo2}     \section{Soo3}      \kant[11-6]      \myfig\mytab\myfig\mytab\myfig\mytab     \section{Soo4}      \kant[22-25]          \end{document}


title: Using Greek Letters

text: For the following example I'm getting `Missing $ inserted...` with regard to the `\rho` command:               a tangible benefit from acquiring positive reputation that is not captured within      \citet{d05a}, in particular, it implies that in this setting \rho rises over time.      I tried `$rho$`, as it seemed to be suggesting, but that just put the word rho in italics.


title: Optional argument to \item in enumitem list

text: I'm trying to set up a list environment for typesetting a problem set. I'd like to be able to input something like the following:               \begin{pset}     \item First solution.     \item[2.2] Second solution.     \end{pset}      and have it come out as:               Problem 1. First solution.     Problem 2 (2.2). Second solution      with the optional argument to `\item` being typeset in parentheses if it's present. I assume I should be able to `\renewcommand{\makelabel}` somehow, but I can't figure out how to do it. I can't get anything like the following to work:               \newcommand{\makepsetlabel}[1]{some if/then involving #1, checking if empty}     \newlist{pset}{enumerate}{1}     \setlist[pset]{        before={\renewcommand\makelabel[1]{\makepsetlabel{##1}}     }      What's the right way?


title: Changing the font size with \emph

text: In the `.tex` document I created, the emphasis command `\emph{text}` is frequently used (note that I use `\documentclass{llncs}` ). However, the `.pdf` preview shows the emphasized text as smaller that the plain text. What would be the way to change the font size for the text in `\emph{text}`. I would be good if one is able to set the option at the beginning, and not change every occurrence of `\emph{}`.


title: Recommendation: tex editor, word and windows user.

text: I know this question might appear a lot on this site, but I didn't find the asnwer I was looking for.   * I'm a Windows user (Ultimate 7 64-bit).   * Using Microsoft Word since forever.   * I want the final document to be in PDF.   * I do not have much time to try many software to decide which to use. So, any recommendation on what to install? I know I must learn about tex and stuff through time, but meanwhile I need a specific software recommendation. PS: I KNOW I need to drop my WYSIWYG habits on this.


title: Question about spacing \hspace and \vspace

text: I have been using `\hspace` and `\vspace` in my latex documents lately. I was surprised when `\hspace{1em}` didn't work and found out that I needed to use `\hspace*{1em}` to force latex to put the space requested.   My question is why does latex sometimes ignores `\hspace{1em}`


I have submitted a PDF manuscript to a conference and I get the feedback that my fonts in the verbatim environment either look hideous or they are not rendered at all. The manuscript looks nice on my machine. I guess this is caused by the Type 3 fonts. Using Computer Modern Type 1 Fonts with Dvips And indeed, I get the following warnings when generating the pdf file from the dvi:               dvips: warning: no config file for `amz'     dvips: warning: no config file for `cmz'      I am using Ubuntu 12.04 LTS. **What should I do now? How can I get rid of the Type 3 fonts?** * * * As for a minimal example: since I cannot reproduce this issue on my machine I have no chance to give you a reproducable example. My attempt would be to put some text into the verbatim environment. This is the relevant line from the bash script generating the PDF file: `exec dvips -Ppdf -Pamz -Pcmz -j0 -q -f $infile | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile -sPAPERSIZE=a4 $OPTIONS -c save pop` You can see the flags passed to dvips.


title: Affiliation of author in achemso class

text: I use the achemso class in order to write a scientific article. I have to set author and their affiliation with `affiliation` or `altaffiliation` commands. Here is a short example :               \documentclass{achemso}          \title{Title}          \author{Author 1}     \affiliation{lab 1}     \author{Author 2}     \email{author@lab}     \author{Author 3}     \author{Author 4}     \affiliation{lab 2}          \date{\today}          \begin{document}          \end{document}      output : ![enter image description here](http://i.stack.imgur.com/O3s71.png) I would like `author 1` to belong to `lab 1` and `lab 2` and other author to belong only to `lab 2`. But it does not work. With the above example `author 1` belongs only to `lab 1`. If I add an `\altaffiliation` command for `lab 2` just after `author 1` it works but `lab 2` appears two times at the bottom of the page. ![enter image description here](http://i.stack.imgur.com/QF6fu.png) How can I avoid that achemso write two times the same affiliation ?


title: Create a bold enumerated list with parenthesized lower case letters

text: I can create an enumerated list with parenthesized lower case letters by using the `enumitem` package (with the `[shortlabels]` option) in the preamble and then using `\begin{enumerate}[(a)]`. I can also create a bold enumerated list by using the `enumitem` package and then using `\begin{enumerate}[label=\textbf{\arabic*}]`. I guess I should be able to exchange `\arabic*` in the last example to something that gives me paranthesized lower case letters, but I don't know what that command would be.


title: width=\textwidth resulting in overfull hbox?

text: > **Possible Duplicate:**   >  Why isn't \textwidth the width of the text? After some gruelling work, I reduced my problem to this MWE:               \documentclass{article}          \usepackage{rotating}          \begin{document}     \includegraphics[width=\textwidth]{Rolemaster.pdf}     \end{document}      The PDF included by this snippet is actually a `potrace` of a bitmap, and according to TeX of ~470pt width:               <Rolemaster.pdf, id=1, 469.755pt x 91.34125pt>      That's why am using the `width=\textwidth` parameter to `includegraphics`, to scale the included PDF down to fit. However, I am getting this warning:               Overfull \hbox (15.0pt too wide) in paragraph at lines 6--7      **Why does this happen, and what would be the correct parameter to`width` to result in max-width fit without a warning?** I did some trial & error, with (for me) surprising results. Going from the above warning ("15.0pt too wide") I tried:               \includegraphics[width=\textwidth - 15pt]{Rolemaster.pdf}      Getting:               Overfull \hbox (65.00009pt too wide) in paragraph at lines 6--7      So obviously there's something non-trivial going on behind the scenes, screwing with my numbers. Using _fixed_ numbers, I figured that               \includegraphics[width=330pt]{Rolemaster.pdf}      does what I want, but quite obviously this isn't acceptable since I am not in a mind of peppering my document with "magic numbers" like that. There has to be some constant (or sum of constants) that would result in the proper max width. But I have no idea which one that would be...?


title: breqn does not automatically break lines

text: I am writing a two column journal in which I am listing the components of a vector. The vector is too long to fit in one column, and I am using the `\left` and `\right` around the brackets that enclose the vector. However the `dmath` environment does not automatically break the vector into two lines. The code is listed below                \begin{dmath}      \left(\frac{-(n-1)}{2}h_{12}l,\ldots,\frac{-3}{2}h_{12}l,\frac{-1}{2}h_{12}l, \frac{1}{2}h_{12}l,\frac{3}{2}h_{12}l,       \ldots,\frac{n-1}{2}h_{12}l\right). \label{eq:x2}      \end{dmath}      The output looks like this ![Output from code above](http://i.stack.imgur.com/Ska4A.png) Any one has an idea how to correct this? **EDIT:** The preamble of my document is listed below               \documentclass[journal]{IEEEtran}          \usepackage{cite}     \ifCLASSINFOpdf     \usepackage[pdftex]{graphicx}     % declare the path(s) where your graphic files are     \graphicspath{{../figs/}}     \else     \usepackage[dvips]{graphicx}     % declare the path(s) where your graphic files are     \graphicspath{{../figs/}}     \fi     % *** MATH PACKAGES ***     \usepackage[cmex10]{amsmath}     \interdisplaylinepenalty=2500     \usepackage[caption=false,font=footnotesize]{subfig}     \usepackage{url}     \usepackage{breqn}     \hyphenation{op-tical net-works semi-conduc-tor}     \begin{document}     \section{Some Random Section}     \begin{dmath}      \left(\frac{-(n-1)}{2}h_{12}l,\ldots,\frac{-3}{2}h_{12}l,\frac{-1}{2}h_{12}l, \frac{1}{2}h_{12}l,\frac{3}{2}h_{12}l,       \ldots,\frac{n-1}{2}h_{12}l\right). \label{eq:x2}      \end{dmath}     \end{document}      Hopefully this helps!


title: Signature line with dots and name below

text: ![enter image description here](http://i.stack.imgur.com/2Fdwx.jpg) In my LaTeX report I want to include a dotted signature line and my name below that line. As in the image. Can someone help me with the LaTeX code for that?


title: How to avoid gap in the bibliography when there is a number but no volume

text: I'm trying to customize my bts to match the requirements of my institute. My problem is followingoutput when citing articles that have a number but no volume: > Amable, Bruno (2010): Morals and politics in the ideology of neo-liberalism. > In: Socio Economic Review, , 9, S. 3-30. I'm using the natbib package plus my own bst. created by custombib. The code in the .bts looks thus:               FUNCTION {format.vol.num.pages}     { volume field.or.null       duplicate$ empty$ 'skip$         {           "volume" bibinfo.check         }       if$       number "number" bibinfo.check duplicate$ empty$ 'skip$         {           swap$ duplicate$ empty$             { "there's a number but no volume in " cite$ * warning$ }             'skip$           if$           swap$           ", " swap$ *         }       if$ *     }      I'd like bibtex simply to omit the field for the missing volume and directly continue with the number like this: > Amable, Bruno (2010): Morals and politics in the ideology of neo-liberalism. > In: Socio Economic Review, 9, S. 3-30. At the same time, I need the style to continue to print the other entries that have a volume like this: > Amable, Bruno (2010): Morals and politics in the ideology of neo-liberalism. > In: Socio Economic Review, 52, 9, S. 3{30.


title: pgfplots two linear regressions

text: There are many existing questions about using the pgfplots linear regression. You can imagine using code such as:               \addplot table [draw = none, dash pattern=on, x=x_data, y={create col/linear regression={y=y_data}}, col sep=comma] {data.dat};     \addlegendentry{line A $\pgfmathprintnumber{\pgfplotstableregressiona}$}      But suppose you have two linear regressions, how do you get both values of `\pgfplotstableregressiona` ?


title: How to set the row height to equal to the column width of X in the tabularx environment?

text: Within the `tabularx` environment, `X` is a particular width which allows the table to fit the width of the specified horizontal space. I want to create a table which has square cells.   * How can I set the height of a particular row within a table to be the same length as the value of `X`?


title: How can I automatically center an image?

text: I use:               \documentclss{mwrep}     ...     \begin{figure}       \includegraphics{a.jpg}     \caption[Long caption]{Caption}     \label{pic-a}     \end{figure}      How can I make images to be always visible on the center of page? (To be more specific: the center of the image should be between the left and right margin - I use different left and right margins). I don't want to put anything after every `\begin{figure}` in my document. Important: I don't want to waste an entire page on a single image at the very center of the page. I want only horizontal alignment. (left <-> right)


title: Why do math operators not behave like normal control sequences?

text: From my experience, most control sequences function as an implicit group, for example `g^\textrm{th}`. However, if we look at the example below, the first line throws an error while the second line does not.               \documentclass{article}     \usepackage{amsmath}          \begin{document}          $g^\mod$     $g^{\mod}$          \end{document}      I first noticed this because I used `DeclareMathOperator` to declare my own operators, based on the answer to Define additional math operators to be typeset in roman. I then tried with `\mod` which is defined in `amsmath` What is the reason that math operators do not play well with `^`, unlike other control sequences, and is there an option to make them do so without explicit `{}`?


title: Display math and tabular

text: I'm pretty new to latex and having some trouble. I have multiple math formulas which I'd like to organize on the page. i used:               \begin{tabular}{p{6cm}p{6cm}}     \[...\] & \[...\]\\     \end{tabular}      for this. The problem is the following one: the first formula has diffrent indent depending on its own length (the second one is always on the same place).I geuss it's the centering of the displaymath? Is there a way to have the display mode and always the same indent, or should I use another environment?