title: marginpar and orphans

text: How can I avoid orphan lines if I use `\marginpar`? For example, here is a two-page document that does not have any orphans:               \documentclass[letterpaper]{article}     \usepackage{lipsum}     \clubpenalty=10000     \widowpenalty=10000     \begin{document}         \lipsum[1-5]         Foo. \lipsum[6-7]     \end{document}      However, if I add a marginpar, the layout is changed and there is an orphan line:               \documentclass[letterpaper]{article}     \usepackage{lipsum}     \clubpenalty=10000     \widowpenalty=10000     \begin{document}         \lipsum[1-5]         Foo.\marginpar{Test} \lipsum[6-7]     \end{document}      (It seems that `\marginnote` from the `marginnote` package does not have the same problem.)


title: Is pgf-umlsd incompatible with pgfplots?

text: The following document renders a nice sequence diagram for me:               \documentclass[12pt,english]{scrartcl}          \usepackage{babel}     %\usepackage{pgfplots}               % Sequence diagrams:     \usepackage{tikz}     \usetikzlibrary{arrows,shadows} % for pgf-umlsd     \usepackage[underline=true,rounded corners=false]{pgf-umlsd}          \begin{document}          \begin{sequencediagram}     \newthread{a}{Client}     \newthread{b}{Server}     \mess{a}{X}{b}     \mess{a}{Y}{b}     \begin{call}{a}{$Z_a$}{b}{$Z_b$}\end{call}     \end{sequencediagram}          \end{document}      ![Good sequence diagram](http://i.stack.imgur.com/4oLWZ.png) But when I uncomment the line `\usepackage{pgfplots}`, the vertical lines and bars vanish: ![Bad sequence diagram](http://i.stack.imgur.com/oJuQE.png) In my _real_ document I need the `pgfplots` package. So how can I make the two compatible? * * * I'm using MiKTeX 2.9 and TeXworks 0.4.4 r1003 on Windows XP SP2; pgf-umlsd 0.5 and pgfplots 1.6.1. I will also need it to work on an FC11 Linux system that's stuck at TeXLive 2007. * * * ## Update Although I can't find an _exact match_ in the `pgf-umlsd` issues list, issue 15 seems to describe the same conflict between `pgf-umlsd` and `pgf-umlcd`, and this was fixed in `pgf-umlsd` 0.7. I locally updated the package to 0.7 in my Windows environment, but the problem persisted.


title: Fancytooltips causes "Please fill out the following form" dialogue

text: I observed this strange behaviour of fancytooltips: If more than 101 tooltips are defined, the Adobe Reader 11.0 or Adobe Acrobat 9.5.2/11.0.0 asks to " _Please fill out the following form. You can save data type into this form._ ". With up to 101 tooltips everything is normal. This really puzzles me! Although it is not a big issue, I would prefer to get rid or hide this message before I send the document to someone else. Probably this is more an Adobe issue than a TeX problem, but maybe someone knows of a workaround. ![enter image description here](http://i.stack.imgur.com/ASyc9.jpg) **MWE**               % --- tooltip document     \begin{filecontents*}{fancytipmark.tex}     \documentclass{article}     \usepackage[createtips]{fancytooltips}     \usepackage{ifthen}     \newcounter{x}     \setcounter{x}{1}     \begin{document}     \whiledo{\value{x}<102}% 101 works fine     {%     \keytip{\thex} \thex \stepcounter{x} \newpage%     }%     \end{document}     \end{filecontents*}          % --- main document     \documentclass{article}     \usepackage[filename=fancytipmark, mouseover, movetips]{fancytooltips}     \begin{document}     abc     \end{document}


title: Changing the default series of the sans serif family only

text: I'm using pdfLaTeX and a sans serif family that supports a light (`l`) face. I'd like to substitute the default medium (`m`) face by `l` only when `\sffamily` (or `\textsf`) is called. In the next example, egreg's solution is only successfull in changing the `\mddefault` for the roman family, but not for sans serif.               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage{lmodern}          \makeatletter     \renewcommand{\mddefault}{\ifx\f@family\sfdefault sbc\else bx\fi}     \makeatother          \setlength\parskip{\baselineskip}\setlength\parindent{0pt}          \begin{document}          \textrm{The brown fox jumps over the lazy dog}                 \\     {\usefont{T1}{lmr}{m}{n}The brown fox jumps over the lazy dog} \\ % medium     {\usefont{T1}{lmr}{b}{n}The brown fox jumps over the lazy dog} \\ % bold     {\usefont{T1}{lmr}{bx}{n}The brown fox jumps over the lazy dog}   % bold expanded          \textsf{The brown fox jumps over the lazy dog}                   \\     {\usefont{T1}{lmss}{sbc}{n}The brown fox jumps over the lazy dog}\\ % semi bold condensed     {\usefont{T1}{lmss}{m}{n}The brown fox jumps over the lazy dog}  \\ % medium     {\usefont{T1}{lmss}{bx}{n}The brown fox jumps over the lazy dog}    % bold expanded          \end{document}      ![enter image description here](http://i.stack.imgur.com/qyx3T.png) Then I tried to use `\DeclareFontShape`, but I always get the same type of error. For instance, using an example of pg 425 of _The LaTeX Companion_ :               \documentclass{article}          \DeclareFontShape{0T1}{cmss}{m}{it}{ <-> sub * cmss/m/sl }{}           \begin{document}     text     \end{document}      I get the error: ![enter image description here](http://i.stack.imgur.com/JHNYs.png)


title: Glossaries creates wrong link when using titlepage

text: I experienced that glossaries generates a wrong link when my document contains a titlepage... Here is my code:               \documentclass{article}     \usepackage{hyperref}     \usepackage[acronym]{glossaries}     \makeglossaries          \newglossaryentry{api}{type=\acronymtype, name={API}, description={Application     Programming Interface}, first={Application     Programming Interface (API)}, see=[Glossary:]{apig}}          \newglossaryentry{apig}{name={API},     description={An Application Programming Interface (API) is a particular set     of rules and specifications that a software program can follow to access and     make use of the services and resources provided by another particular     software     program that implements that API},nonumberlist}          \begin{document}     \begin{titlepage}     \center{title}     \end{titlepage}     \newpage     \noindent     First use \gls{api}\\     subsequent \gls{api}     \newpage     a page between     \newpage     Another use: \gls{api}\\     \newpage          \glsadd{apig}     \printglossary[type=\acronymtype]     \newpage     \printglossary[type=main]          \end{document}      I took the code from here: How to combine Acronym and Glossary I want to have acronyms and a glossary. And the acronyms should link to the glossary... I won't mind to remove the page number behind the acronym, but using the "nonumberlist" option also removes the link to my glossary :-/ Using the code without the titlepage works fine... Thanks for help!


title: Large pages with minimum page-breaking

text: > **Possible Duplicate:**   >  What’s the absolute largest paper size permissible with pdflatex? I want a long document to fit in a single page. That would make proofreading easier for me. The most I got so far were a few `1500 mm` pages. It seems that `5000 mm` pages can have at most `1500 mm` of text before pagebreaks are inserted. In other words, the same number of pages is created by either:               \usepackage[margin=1in, paperheight=1500mm]{geometry}      or               \usepackage[margin=1in, paperheight=5000mm]{geometry}      How can I make pages not to break at `1500 mm` in a `5000 mm` page?


Is it possible to create a calligraphic first letter for a chapter AND have a header or a footer? Each time I try to have a calligraphic initial and a header, the header won't show up.


title: Generate consecutive page numbers + ToC from 28 .tex files?

text: I've completed half a semester of Discrete Mathematics. I have written up all 28 lectures into individual .tex files, labelled Lecture1.tex Lecture 2.tex ... Lecture28.tex. The beginning of each one (give or take a few packages) is:               \documentclass[a4paper,11pt]{article}     \usepackage[english]{babel}     \usepackage{amsmath,amssymb}     \usepackage{cancel}          \title{Discrete Mathematics -- Lecture 28}     \author{Alec Taylor}     \date{September 16, 2011}          \begin{document}     \maketitle      How can I automatically generate a single PDF with the contents of all 28 .tex files with:   * Consecutive numbering of all pages   * Table of Contents   * Cover page


title: Changing \mode in beamer makes a new paragraph. Is it possible to avoid it?

text: I want to write different text in the middle of a sentence in a `beamer` presentation and its corresponding `beamerarticle`. But it seems that `\mode<...>{...}` introduces a new paragraph and breaks the sentence. Please look at the code and results:               \documentclass[ignorenonframetext]{beamer}     %\documentclass{article}     %\usepackage{beamerarticle}     \begin{document}     \begin{frame}{This is a frame}          This is some text in \texttt{beamer} and \texttt{article} modes.           This is some text in \mode<article>{\texttt{article}}\mode<beamer>{\texttt{beamer}} mode.     \end{frame}     \end{document}      This is the result in `beamer` mode. It looks like `\mode<beamer>{text}` introduces `\par` (or something similar) before and after `text`. ![](http://i.stack.imgur.com/KQ1yj.png) while `\mode<article>{text}` just introduces `\par` after `text`. ![enter image description here](http://i.stack.imgur.com/yPuEi.png) In any case I would like t have some mechanism to alternate text without introducing paragraph breaks. Is it possible?


title: Examples of list macros in plain TeX

text: I'm writing macros to typeset lists in plain TeX. Please can you suggest some examples of macros for numbered lists? I'd prefer examples from "living code", from CTAN packages and so on. But any kind of help would be appreciated. I wrote working code, but a bit cumbersome, so I'm looking for examples of elegance and functionality. * * * [edit] Joseph Wright said that it might be handy to show what I've done and outline what the issues I have are. Well, I got no real issues, but concerns about the expandability and maintainability of the code. As I said the code works but it is complicated and the macros are too long and devoid of elegance. Well, the goal is to typeset a numbered list like this.               1. gjkjhg     2. jhlujh sch       2.1. fhwoiuhf       2.2. eryqwo uhf u       2.3. sdiuahx iuhd         2.3.1. xph  p         2.3.2. erofhx efh     3. owhd xpqwo      the interface will be like this               \beginenumerate       \item gjkjhg       \item jhlujh sch       \beginenumerate         \item fhwoiuh         \item eryqwo uhf u         \item sdiuahx iuhd         \beginenumerate           \item xph  p           \item erofhx efh         \endenumerate       \endenumerate       \item owhd xpqwo     \endenumerate      so I will use the following variables:               \newcount\c@listlevel \c@listlevel\z@     \newcount\c@item     \newcount\countlev@i % number of last item in every nesting level     \newcount\countlev@ii     \newcount\countlev@iii % max three levels of nesting     \def\init@str{} % the label of every item      Now follow the macros.               \def\beginenumerate{\begingroup       \ifnum\c@listlevel=3\relax\else\advance\c@listlevel\@ne\fi            \ifnum\c@listlevel=\@ne         \vskip.5\baselineskip         \toks0=\everypar\fi % \everypar will change later, so I save it.            \ifnum\c@listlevel>\@ne         \edef\init@str{\init@str\number\c@item.}\else         \edef\init@str{}\fi            \c@item\z@            \def\item{%         \edef\@countlevstr{\romannumeral\c@listlevel}% may be i, ii or iii         \c@item\csname countlev@\@countlevstr\endcsname% \c@item is loaded from the right \countlev@...         \advance\c@item\@ne         \csname countlev@\@countlevstr\endcsname\c@item% so \countlev@... records the number of last item in every nesting level              \dimen0\parindent         \multiply\dimen0\c@listlevel              \ifvmode\else\par\fi          % if an \item has more than one paragraph only the first one have to be preceded by a label;     % so \@itemlabel redefine itself the first time is expanded.         \def\@itemlabel{%           \llap{\init@str\number\c@item.\quad}%           \gdef\@itemlabel{}}%              \everypar{\setbox0\lastbox           \hangindent\dimen0 \hangafter\z@           \@itemlabel}}}% end of \beginenumerate          \def\endenumerate{%       \ifnum\c@listlevel=\z@\else         \advance\c@listlevel\m@ne       \fi     % if \init@str is 3.5.4. has to become 3.5.       \def\next@str##1.##2.;{##1}%       \ifnum\c@listlevel>\@ne         \edef\init@str{\expandafter\next@str\init@str;.}%         \else\edef\init@str{}\fi            \ifnum\c@listlevel=\z@         \vskip.5\baselineskip         \everypar=\toks0       \fi       \endgroup}      Mr. Wright, have you some idea on how to make the code a bit better than it is? Many Thanks.


title: Remember coordinate in nested tikzpicture points to a weird place

text: I have problems with remembering the coordinates of names defined in nested tikz pictures. Look at the following minimal working example:               \documentclass{article}     \usepackage{tikz-qtree}     \newcommand{\inlinenode}[2]{     There are\\     several line\\     breaks\\     #2\tikz[remember picture]\coordinate (#1);\\     and #1 is not\\     in the center}     \begin{document}     \tikzset{every tree node/.style={align=center,anchor=north}}     \begin{tikzpicture}     \Tree [.{Root}             [.\node{\inlinenode{x1}{$x_1$}}; ]             [.\node (x2) {$x_2$}; ]           ]     \path[thick,color=red] (x1) edge (x2);     \end{tikzpicture}     \end{document}      ![output of my minimal working example](http://i.stack.imgur.com/SswUM.png) I want to connect x1 with x2 using the red line, which works fine for x2, but the other end is pointing in a weird place instead of to x1. I have tried running pdflatex multiple times, but then the position of x1 gets even weirder. What I want to achieve should be visible in the picture above, I want a multiline node with a special word/graphic inside the text and then connecting this word to another node (or even another special word inside another multiline text of a node). Feel free to modify my approach. I also tried replacing the `#2\tikz...\coordinate(#1)` with `\subnode{#1}{#2}` (as in this similar question), but this has the same result.


title: Relative paths for \input and building from different directories

text: ## The minimal example If I have a directory containing my main LaTeX source file and it uses `\input` to incorporate some data in another file, I can use a relative pathname. E.g., with these files: ### ~/tmp/relative-paths-mwe/mwe.tex               \documentclass{article}     \begin{document}     \input{./src/ex.tex}     \end{document}      ### ~/tmp/relative-paths-mwe/src/ex.tex               some input      Now, from the command line, if I'm in `~/tmp/relative-paths-mwe`, I can build as expected:               ~/tmp/relative-paths-mwe$ pdflatex mwe.tex      This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)     ...     Output written on mwe.pdf (1 page, 12192 bytes).     Transcript written on mwe.log.      However, if I'm in the parent directory, `~/tmp/`, I can't build because the relative paths (as I understand it, and based on the symptoms) are resolved with respect to the current working directory rather than the file where the `\input` appears:               ~/tmp$ pdflatex relative-paths-mwe/mwe.tex      ...! LaTeX Error: File `./src/ex.tex' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: tex)          Enter file name:       Is there a way to specify the paths in such a way that I can refer to other content using relative paths, but still be able to call `pdflatex` from arbitrary directories? ## The non-minimal example I think that the above is a complete minimal working example for which if I get an answer, I can solve my actual problem. In case there's a difference that someone can predict in advance, or anyone is wondering _why_ I'm trying to do something unusual, a bit of explanation is in order. I've got a source repository for a project, and it has a subdirectory for a LaTeX document, and a subdirectory for an Apache Maven project. The document had been using the listings environment to include source code from the Maven project using relative paths along the lines of               ../mavenproject/src/more-path/code.extension      There's a LaTeX Maven Mojo that's supposed to be able to compile LaTeX documents, so I decided to try moving the document directory to `mavenproject/src/latex/mydoc`. Now, I can build the document manually from `mavenproject/src/latex/mydoc` if I change the relative paths to               ../../more-path/code.extension      but I can't build with those paths using the LaTeX Mojo, because it's run from the `mavenproject` directory, which is several directories up from the document root. I can obviously adjust to handle that, but then I can't build from `mydoc` anymore. I'm hoping that there's a way to specify the pathnames relative to the including document, or to specify the a document root, and write paths relative to that. I _hope_ that a solution to the minimal example above will transfer over to my actual situation.


title: Multiple books under one reference in bibliography

text: I am translator and right now I am trying to make exact (but translated) copy of publication. But I have a problem: in the endnotes I see list which looks like this:   1. `J. K. Rowling, Harry Potter and the Philosopher's Stone (New York: Scholastic, 1997); Somerville, R. C. J. . How much should the public know about climate science? (Climatic Change, 2011);` Author refers to 3-5 books under one cite. There number of cites in this article is about 50, but he uses about 70 books. Well, still, I have to translate his books and save this strange feature. I will be really glad to hear advice about what I should do with bibliography. Thanks


title: Aligning text columns

text: I am using the following code to try to obtain something to the effect of               Author:                      Laboratory Partners:     Amos NG                      Rebecca ROYCROFT                                  Nora BRACKBILL     Professor:     Huan HUANG      The code:               \begin{minipage}{0.4\textwidth}     \begin{flushleft} \small     \emph{Author:}\\     Amos \textsc{Ng}\\[0.4cm]     \emph{Professor:} \\     Huan \textsc{Huang}     \end{flushleft}     \end{minipage}     \begin{minipage}{0.4\textwidth}     \begin{flushright} \small     \emph{Laboratory Partners:} \\     Rebecca \textsc{Roycroft}\\     Nora \textsc{Brackbill}     \end{flushright}     \end{minipage}      The resulting output: ![enter image description here](http://i.stack.imgur.com/lZxUg.png) How can I achieve the layout I want here?


title: ! LaTeX Error: Command \textcurrency unavailable in encoding T1

text: \documentclass[a4paper,12pt,twoside,]{scrartcl}     \usepackage[T1]{fontenc}          \usepackage{lmodern}      \usepackage{graphicx}     \usepackage{cite}     \usepackage{multirow}     \usepackage[ansinew]{inputenc}     \begin{document}          \title{Der Name Ihrer Arbeit}     \author{Ivan Arov}          \maketitle       \pagestyle{empty}     \newpage                     \listoffigures     \listoftables     \newpage          by road, are as short as possible."\cite{UIRR}           this problem ~\cite{intermodal}:           \cite{container repositioning}. This significantly decreases the level of efficiency of railways. This problem can be  solved                 deployed on other services, would stand idle.  \cite{production systems}          \bibliographystyle{plain}     \bibliography{literature}               \end{document}      I am sorry for asking the same question, but I am using latex for 2-3 days now... I also have problems with citing - some of the sources are not included in the output file. I`ll be grateful if somene helps.


title: Editing-like style in Lyx

text: Is it possible to achieve the below in Lyx (words above/under sentences)? ![](http://i62.tinypic.com/2sazdig.png)


title: XeTeX Arabic vowels

text: I would like to demonstrate declension in the Arabic language by coloring a single vowel or letter. I found some solutions to color a single letter, however the connections would break. So again I'm looking for a solution that can color a vowel individually and a letter individually. I am currently using XeTeX and the `polyglossia` package. And input arabic text using: `\textarabic`. I don't mind switching to another package, since I'm still just a beginner using this package anyway. Any help would be appreciated. Thanks in advance. * * * @KhaledHosny I indeed tried to create a hack myself, unfortunately I was only able to do it for the last letter and also made use of the ZWJ. I didn't know how to enforce the final form of the letter though. Also for vowels I got stuck in how to do that. Here is the macro I created:               \newcommand{\mymacro}[1]{%     \StrRight{#1}{1}[\lastletter]%     \StrBefore{#1}{\lastletter}[\rest]%     \rest\char"200D{\color{red}\lastletter\char"200D}     }      I use it like this:`\textarabic{\mymacro{اَلْمَدِينَة}}` But at the end I get a colored ة When trying to color a single vowel, it just doesn't appear.


title: Why the \mleft and \mright commands inhibits the breaking between delimiters inside dmath?

text: Consider the following code:               \documentclass[twocolumn]{article}     \usepackage[margin=1in]{geometry}     \usepackage{lipsum}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage{breqn}          \usepackage{amsmath} \delimitershortfall=-1pt          \usepackage{mleftright}     \usepackage{color}          \begin{document}            \lipsum[3-4]            \textcolor{red}{{\ttfamily \textbackslash mleft} and {\ttfamily \textbackslash mright} inhibits the breaking between delimiters inside {\ttfamily dmath}:}            \begin{dmath*}         \mathcal{O}(f) = \mleft\{ t \hiderel{:} \mathbb{N} \hiderel{\rightarrow} \mathbb{R}^+_0 \hiderel{\mid} \exists c \hiderel{\in} \mathbb{R}^+ \wedge \exists n_0 \hiderel{\in} \mathbb{N} \wedge \forall n \hiderel{\geq} n_0 \wedge t(n) \hiderel{\leq} c \, f(n) \mright\}       \end{dmath*}            \textcolor{blue}{{\ttfamily \textbackslash left} and {\ttfamily \textbackslash right} produce a good results but {\bf is preferable in many equations always use} the {\ttfamily \textbackslash mleft} and {\ttfamily \textbackslash mright} commands:}            \begin{dmath*}         \mathcal{O}(f) = \left\{ t \hiderel{:} \mathbb{N} \hiderel{\rightarrow} \mathbb{R}^+_0 \hiderel{\mid} \exists c \hiderel{\in} \mathbb{R}^+ \wedge \exists n_0 \hiderel{\in} \mathbb{N} \wedge \forall n \hiderel{\geq} n_0 \wedge t(n) \hiderel{\leq} c \, f(n) \right\}       \end{dmath*}            \lipsum[1-5]          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/OpsF3.png) **Are there any solution or modification that allowed to use \mleft and \mright correctly inside \dmath?**


title: How to show the structure of a pdf document with LaTeX?

text: How to show the document structure with Latex?. I was doing some article and i would like to know once it was been compiled and saved in a pdf file how to show the sections or the strcuture of the text in order to facilitate the reading?


title: MiKTeX 2.9 doesn't find the includegraphics package

text: I am using MiKTeX 2.9 and when I include the package{Includegraphics} to use graphics, doesn't recognize. So I need help.


title: Switching from scrartcl to article

text: I help run a (science) summer camp where participants write up their reports in LaTeX. We have a custom class file that's used to format the reports and make it easier for us to produce a book, ready for printing. It fixes things like layout, footers/headers and some custom commands for project titles and so on. Most of the major layout options are controlled using `fancyhdr`. Currently we're using the `scrartcl` class for layout. As we can't make people install LaTeX prior to the camp, let alone enforce which packages they have installed, we find that we have to provide hardcopies of this (and its dependencies). We don't have reliable access to the internet (and part of the camp is encouraging disconnection from it!) so we can't just grab it using a package manager. This is largely legacy and nobody's bothered to sift through the class to update it. It's irritating having to provide people with multiple files (`scrartcl, scrfile, typearea, etc`) instead of one. We've tried assuming they're already installed and every now and again someone can't compile their report which is a pain. I understand that KOMA-script has some lean towards European standards for typesetting - we are based in Europe so this makes sense. Are there any significant differences to using plain old `article`? I've tried exporting documents using each style, but I can't see anything obvious aside from slightly different heading size and spacing. Participants don't usually have time to learn anything particularly complicated about LaTeX so use of esoteric environments or commands rarely comes up. 99% of the time it's simple things: equations, sections, figures and a bibliography. I also had a look at the documentation for KOMA-Script and there seems to be plenty of tweaks mentioned for optimal page layout, but there wasn't any difference at all when I tried on some sample files. Cheers!


title: Strange error after upgrading to MacTeX 2011 (TeXLive)

text: I have my own personal style file that I use for exams. It keeps track of points each question is worth and prints a grading table on the front page, automatically adding all points for the total. It works slightly different than the point table in `exam.sty`, or I would use that. Anyway, when I upgraded to MacTeX 2011, I started getting the following error:               ./M113F10E1.tex:25: Undefined control sequence.     \rc@set ...safe@activestrue\endcsname \rc@refused                                                        {#4}\expandafter \rc@@set ...     l.25 \PointTable{1}                        \nextpage      `\PointTable` is my command to create the grade table. The system indicates it is hanging at `rc@refused`. The control sequence above is not in my style file, so I assume it must be in one of the style files that I require. My style file uses `calc`, `comment`, `ifthen`, `refcount` and `tabls`. Has anyone seen this? Can anyone point where to look? I'd rather not post my style file as its pretty long. It's also been years since I've messed with it (the code originally came from somewhere else before I tweaked it). I've been meaning to update the package, but for now, I'd like to get it working again. Hoping this isn't a stupid question.


title: How to place a path by its center point?

text: Suppose I have a closed path that looks like:                _     | |_     |___|      I want to draw, within that path, a scaled version of it so that the centers of the two figures are the same. That is, wherever this path is located, I wan't to be able to draw a similar path _within_ this path. A possible solution would be to move a path by its center point. Any suggestion? Thanks!


title: Negation of nleftrightarrow?

text: If I use `$\nleftrightarrow$` from the `amssymb` package, I get a negated double-headed arrow. So far, so good. Unfortunately, the `$\nleftrightarrow$` seems to have smaller arrow heads then the `$\leftrightarrow$`, which does not look nice if I want to use one symbol for the negation of the other. What is the non-negated equivalent of the `$\nleftrightarrow$`?


title: fmtcount problems with french & newcommand

text: I built & used a complex command `\qd` this spring who requires `datetime` package and therefore `fmtcount`. I start again to use my command these days, but occurred some changes. I suspect updates of `fmtcount` package. Problems :   1. Though I put `frenchb` option in `babel` package, results of `numberstringnum`& `ordinalnum` commands are in english…   2. Now, I can't use this form for my command : `\numberstringnum{{#1}0}`, & it's very troublesome. I put here a minimal exemple :               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = arara     \documentclass{scrbook}     \usepackage[frenchb]{babel}      \usepackage[quiet]{fontspec}                         \usepackage[automark,headsepline]{scrpage2}              \usepackage[babel,french=guillemets*]{csquotes}     \usepackage[dayofweek]{datetime}          \setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}     \addtokomafont{disposition}{\normalfont}     \newcommand{\qd}[1]{années~\numberstringnum{{#1}0}}          \begin{document}     \numberstringnum{300}, \ordinalnum{3}[m], \formatdate{1}{1}{2000}…     %\qd{8}.     \end{document}     % arara: xelatex      And the result :s ![enter image description here](http://i.stack.imgur.com/aPaTc.png) I put above the second problem in grey (`%\qd{8}.`), but if I active the `\qd` command, error messages in the console are :               ! Missing number     …     ! Missing = inserted for \ifnum     …     ! Package fmtcount error: Out of range      I have the 3.00 version of `fmtcount` package manual. Thank you for your help.


title: PSTricks will not compile

text: \documentclass[12pt]{article}     \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry}     \usepackage{pstricks}     \usepackage{graphicx}     \begin{document}     \thispagestyle{empty}     \psset{unit=1in}     \begin{pspicture}(13.24in,9in)     \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)          \end{pspicture}          \end{document}      I am following a tutorial outlined here: How can I design a book cover? I am following the Robbers book. Everything seems fine until I paste the `\psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)` What could be the problem?


title: Relative node positioning with calc library

text: Hi I'm trying to place same nodes relative to each other. I'm trying to place a node in the middle between two other nodes, but also half a cm to the right.               \usepackage{tikz}     \usetikzlibrary{calc}          \begin{tikzpicture}     \node (p4) {$\hat{4}$} ;     \node[below=1cm of p4] (p3) {$3$} ;     \node[right=3cm of p4] (p1) {$\hat{1}$} ;     \node[below=1cm of p1] (p2) {$2$} ;     \node[below right={1/sqrt(2)}cm of p4] (v1) {$v_1$} ;     \end{tikzpicture}      I don't get why this isn't working... I get the following error > Package PGF Math Error: Unknown operator `c' or`cm' (in '{1/sqrt(2)}cm ').


title: Automatic insertion of (Cont'd) when footnote splits across pages

text: Occasionally, I write long footnotes that get split across consecutive pages. Is there a way of automatically inserting _[continues on next page]_ and _[continued from previous page]_ when such splits happen? This same question was already asked some time age, but people refused to provide an answer on the grounds that the OP didn't provide a MWE. So here is mine: a short paragraph with a long footnote.               \noindent Both \citet{nykiel-sag11} and \citet{barros14} take this kind of data as      evidence for generalization (\ref{ex:case-matching-20}) below. We will see in section      \ref{sec:cleft-sluic} below that this morphological case identity requirement also blocks      a cleft source for certain sluices. As a consequence, while this requirement is compatible      with the presence of a regular syntax in the sluicing site, it doesn't provide direct      evidence in its favor (contrary to \citeauthor{ross69}'s and \citeauthor{merchant99}'s     claims).\footnote{\citeauthor{barros14} treats (\ref{ex:case-matching-20}) as a      descriptive generalization in need of a more principled explanation.      \citeauthor{nykiel-sag11}  make the stronger claim that (\ref{ex:case-matching-20})      constitutes an argument against the presence of an articulate syntax in the sluicing site.      Specifically, they claim that, if (\ref{ex:case-matching-20}) is viewed as an overarching      form requirement on sluicing remnants, it becomes superfluous (and therefore unnecessary)      to postulate a silent syntax to derive the observed case of the remnant. This line of      attack is arguably too strong, in that it fails to cover a number of environments where      case identity doesn't hold. Section \ref{sec:copul-sluic-island} below illustrates this      effect in the context of LBE sluices in languages with adjectival inflection. Similarly,      \citet{ince12} points out that, while the subjects of Turkish embedded clauses are      invariably genitive, remnants of sluicing in the same position are assigned nominative.          \begin{exe}       \exi{(i)}{\gll Ahmet [\{ $*$ biri-$\varnothing$ / $\checkmark$ biri-nin \} Ankara-ya {git-ti\v g-i}]-ni s\"oyle-di, ama [\{ $\checkmark$ kim-$\varnothing$ / $*$ kim-nin \} \gap] bil-mi-yor-um.\\        Ahmet {} {} one-{\sc nom} {} {} one-{\sc gen} {} Ankara-{\sc dat} go-{\sc comp -poss.3sg-acc} tell-{\sc pst.3sg} but {} {} who-{\sc nom} {} {} who-{\sc gen} {} {} know-{\sc neg-pres-1sg}\\       ``Ahmet said that someone went to Ankara, but I don't know who''}     \end{exe}          \noindent Japanese is sometimes reported to exhibit case mismatches too. For example,      \citet{kizu97} and \citet{merchant98} claim that remnants cannot be case marked (ii),      although other authors (e.g., \citealt{fukaya12,nakamura12}) provide comparable examples      where the presence of the case marker is not claimed to induce ungrammaticality      (this seems to be a point of idiolectal variation; see \citealt{inoue76} and      \citealt{iseda07}). Similarly, \citet{gribanova13} provides Uzbek examples where a      case-marked correlate licenses a bare remnant (iii).          \begin{exe}       \exi{(ii)}{\gll Dareka-ga sono hon-o yon-da ga, watashi-wa [dare($*$-ga) {\gap} ka] wakaranai.\\       someone-{\sc nom} this book-{\sc acc} read-{\sc pst} but I-{\sc top} {{ }who-{\sc nom}} {} Q know.not\\       ``Someone read this book, but I don't know who''}     \end{exe}          \begin{exe}       \exi{(iii)}{\gll Siz kim-ga-dir pul ber-di-ngiz, lekin [kim(-ga) {\gap} lig-i-ni ] bil-ma-y-man.\\       you some-{\sc dat}-one money give-{\sc pst-2sg} but {{ }who-{\sc dat}} {} {\sc comp-3sg.poss-acc} {} know-{\sc neg-prs-1sg}\\       ``You gave money to someone, but I don't know who''}     \end{exe}          \noindent Note that, in all of these classes of examples, the remnant is not overtly      case marked (depending on one's base assumptions, one could say either that it bears a      phonetically null case marker or that it is not case marked at all). As far as I know,      there are no exceptions to (\ref{ex:case-matching-20}) where the remnant bears a      different overt case marker from the one the correlate does, or where the remnant is      overtly case-marked and the correlate is bare. At present, I do not know if this is      a relevant fact or an artifact of the sample I am working with.}          \begin{exe}       \ex\label{ex:case-matching-20}\emph{Case matching under sluicing}\\*       In sluicing, given a correlate $C$ and a remnant $R$, if $C$ is a case-bearing category,        $R$ and $C$ must have the same case morphology.     \end{exe}      Screenshots of compiled .pdf showing footnote split across pages 12 and 13 but without _[continues]_ ... _[continued]_ markers ![page 12](http://i.stack.imgur.com/K28Wk.png) ![page 13](http://i.stack.imgur.com/Pqspd.png)


title: Trouble Indenting Portion of document

text: This is my first time giving LaTeX a try, and I decided to have my go at it with my week's math homework. Though most of the document could probably be done in a more efficient manner, I've gone about 30 lines without too much of a hitch. My problem arises in line 30, where I wanted to format a line so that I had text flushed left and right on the same line, which I was able to do after some googling. However, the paragraphs following my \raggedleft text will not indent, no matter what I try. Here is the code, can somebody help me out?                   \documentclass[11pt]{article}        \usepackage{framed}        \usepackage{fullpage}        \usepackage{amsmath}        \author{Author Name Here}        \title{Quiz 7 Makeup}        \date{March 11, 2014}             \begin{document}        % generates the title        \maketitle       Instructions: Find general solutions of the differential equations for the following problems found in section 1.6:\\       2) $xy^2+3y^2 -x^2y'=0$            \underline{Solution:} $xy^2+3y^2 -x^2y'=0 \Rightarrow xy^2+3y^2=x^2y' \equiv y^2(3+x)=x^2y'$            $LHS=\dfrac{x+3}{x^2}=\dfrac{y'}{y^2}=RHS$            $LHS= \displaystyle{\int \frac{x+3}{x^2}}\,dx\ = \int \displaystyle{\frac{1}{x}+\frac{3}{x^2} \,dx} = \ln(x) +-3x^{-1} $            $RHS= \displaystyle{\int \frac{y'}{y^2} \,dx = -y^{-1}}$            Since $LHS=RHS$, we find the general solution to be $$y=\dfrac{1}{3x^{-1}-\ln{x}} .$$      \\       8) $x^{2}y'=xy+x^{2}e^{y/x}$                                    \underline{Solution:}  $x^{2}y'=xy+x^{2}e^{y/x} \equiv y'= \dfrac{y}{x}+e^{y/x} \Rightarrow y'-\dfrac{y}{x}=e^{y/x}$            \indent\indent Integrating Factor: $e^{\int \frac{-1}{x}\,dx} = e^{-\ln{x}}=e^{\ln{x^{-1}}}=\dfrac{1}{x}$            \indent$\frac{d}{dy}[y(x)]=e^{y/x}(\dfrac{1}{x}) \Rightarrow yx = \int \dfrac{1}{x}e^{y/x}\,dy = $  \hfill\raggedleft\framebox{Let $u =\dfrac{y}{x}$ so that $du= \dfrac{1}{x} \,dy$} \raggedright \flushleft       \indent What works?            What works?\\       \indent What works?!            \indent What works?        \end{document}      As a side question, I would appreciate any tips if ya'll see some inefficiencies in my document. I'm particularly wondering about the sections below the math problems where I would like to have them indented; my solution was to make each new line a new paragraph, giving it another indentation. Is there a command I could use to to just indent a whole block of text? Thank you! I greatly appreciate any help and advice.


title: How do I get section headings to extend into the margin (using the Memoir class)?

text: I’m writing a document that uses a rather small text block (`\textwidth`), with the margin holding footnotes, figures and various other material. Because of the narrow text block, section headings frequently span two lines. However, they can often **physically** fit on one line – if they are allowed to extend into the marginal area. So, how do I get the headings to extend into the margins (while still being broken if they extend too much, i.e., more than `\marginparsep + \marginparwidth`)? I’m using the `Memoir` class. Here’s a simple example:               \documentclass[11pt,oneside,article]{memoir}          \setlrmarginsandblock{3cm}{9cm}{*}     \setmarginnotes{1.5em}{5.5cm}{\onelineskip}     \checkandfixthelayout[nearest]          \usepackage{lipsum}          \begin{document}          \chapter{Chapter heading}          \section{This heading is too long to fit on one line}          Foo. \marginpar{\lipsum[4]}\lipsum[1-3]          \end{document}


title: Underlined journal names in bibliographystyle of apacite with natbibapa option

text: I am using these commands:               \usepackage[natbibapa]{apacite}      and later:               \bibliographystyle{apacite}      I would like to keep the natbib option because my text already uses citep and citet a lot. The reason why I am using apacite is because I need ampersand ('&') between author names (instead of 'and'). So the citiations in text and paranthesis are correct, but the References section has a strange format: 1) Journal names are underlined, 2) Pulications with several authors uses "..." to abbreviate names. I would like the bibliographystyle not to underline Journal names but rather follow "normal" conventions. Any ideas?


title: Symbol for Set of Integer

text: I can use `\mathbb{Z}` to represent an integer type but what symbol I should denote a set of integer?


title: How do I make my bibliography according to harvard-style (author-year, alphabetical by sourcetype...) in Lyx?

text: I am writing my master thesis using Lyx and I don't know how it would be the best way to set up my bibliography due to the requirements by the university. The Bibliography has to be arranged alphabetically making subsections for each source type and has to use the Harvard Referencing System including the citation style (author,year). As I advance writing I have tried out to find the best way, but I have struggled to find out how it would be the best way. How would you guys do it and what would I have to do to be able to implement it. I am building up my .bib file and try to use natbib but it does not work. I appreciate any suggestions, as it is my first time using Lyx and I wrote my Diploma thesis in physics about 8 years ago.


title: How to put a hat on a binary operator and maintain spacing

text: This is maybe easy question. How is the right/good way to put a hat on a binary operator like `\otimes`? For example `a\otimes b` vs `a\hat\otimes b` In the second case it is not typeset as a binary operator anymore, i.e. missing spaces.


title: how do I quote a numbered list

text: I want to make a document which replies to a list of points made in an article as follows:               "     Topic     point 1     text          point 2     text          Topic     point 3     text"      I tried to achieve this by writing:               \section*{\color{magenta}topic1}     \begin{quotation}     \section{point1}     text     \end{quotation}          \begin{quote}     \section{point2}     text     \end{quote}     ...      This does not work, so I wish to learn how I should code to achieve this goal. I am using the `\section` to get the points numbered throughout the document.


title: LaTeX to XeLaTeX

text: I am swtiching from LaTeX to XeLaTeX. Almost 10 years i didnt find any problem with PDF produced from LaTeX with resepect to Press. Will XeLaTeX result the same. I am seeing the below information are not clear with XeLaTeX which made me to ask this question.   * PDF font encoding from Indentity H to Ansi (Ansi encoding is must for some press)   * Image loading as eps converted to PDF on the fly (will quality be the same for line art, halftone, color images etc.)


title: Background coloring with overlay specification in algorithm2e + beamer package

text: I want to highlight some portion of my pseudo codes in my slides during the course of presentation. It's easy in powerpoint and I've made a sample slide: ![enter image description here](http://i.stack.imgur.com/6J6nY.png) However, I couldn't manage to get a similar effect with `beamer`, `tikz` and `algorithm2e` package. So far, I've defined the following command.               \newcommand<>{\myspot}[1]     {     \begin{tikzpicture}             \node[draw=none,inner sep=0cm] (n1)             {                 #1             };         \uncover#2{             \draw (n1) node[rectangle,inner sep=0cm, fill=yellow] (n2)             {                 #1             };         }         \end{tikzpicture}     }      It is very useful, but can only highlight a single line in my code.               \myspot<2>{     $pseudo_code here$     }      How can I make a similar effect shown in the sample slide by using `beamer`?


title: Make bold header in moderncv

text: I'm getting some problems to modify `moderncv` to get the header **bold**. I would like to get **bold** address, phone number and email. Can you please tell me how can I do?


title: Matrix vertical alignment in combination with double spacing

text: Why does the following code mess up the vertical alignment in the matrices?               \documentclass{article}          \usepackage{amsmath}     \usepackage{setspace}          \doublespacing          \begin{document}          The first case is     $\left[\begin{matrix} 1 & 2 & 3 \end{matrix}\right]$.          The second case is     $\renewcommand\arraystretch{0.5}\left[\begin{matrix} 1 & 2 & 3 \end{matrix}\right]$.          \end{document}      ![](http://i.imgur.com/EfE6I.png) In the first case, the numbers are clearly too low, and the brackets are too long. This is due to the value of `baselinestretch`, which I cancel out by taking `arraystretch` = `1/baselinestretch` in the second case. But here, the numbers come out just too high, and moreover the brackets are too long. How to deal with this?


title: newlfm date annoyance

text: I have been using newlfm a part of TeXLive since 2007 for my official correspondence. I noticed that newlfm broke backward compatibility since TeXLive 2009. I read documentation (which is very long) several times over arguably not too carefully but I have never found a solution for the following annoying problem with the date. This is what I am talking about.![enter image description here](http://i.stack.imgur.com/s8A5u.png) Date should be aligned with the first letter of my first name "Predrag". This is the source code               \documentclass[12pt,stdletter,sigleft]{newlfm}     \usepackage{charter}          \widowpenalty=1000     \clubpenalty=1000          \newsavebox{\Luiuc}     \sbox{\Luiuc}{%             \parbox[b]{1.75in}{%                     \vspace{0.5in}%                     \includegraphics[scale=1.0,ext=.eps]                     {figures/UILogoLG3L}%             }%     }%     \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}          \newlfmP{headermarginskip=20pt}     \newlfmP{sigsize=50pt}     \newlfmP{dateskipafter=20pt}     \newlfmP{addrfromphone}     \newlfmP{addrfromemail}     \PhrPhone{Phone}     \PhrEmail{Email}          \lthUiuc          \namefrom{Predrag Puno\v{s}evac}     \addrfrom{%             Predrag Puno\v{s}evac\\             Science Laboratory\\             Some University\\             Urbana, IL 61801     }     \phonefrom{000-000-0000}     \emailfrom{xxx@hotmail.edu}          \addrto{%     Faculty Search Committee\\     Department of Science\\     Some University\\     Somewhere, SC 29634-0974}          \greetto{To Whom It May Concern,}     \closeline{Sincerely,}     \begin{document}     \begin{newlfm}          I am writing to apply for the position of bla bla          Thank you for your consideration.  I look forward to     hearing from you.          \end{newlfm}     \end{document}      I have avoided putting date on my letters due to the above behavior for several years. However, I decided that if I can not fix the above package I will switch either to plain TeX or ConTeXt for letters at least. By the way the more I play with ConTeXt the more I like it. I can not wait for Mark IV to mature little bit more.


title: Write new package with LaTeX2e or LaTeX3

text: I’m planning to create a package and I wonder if it’s better do do this with LaTeX3 syntax or the „old“ LaTeX2e, which is the one I know. Will LaTeX2e packages be supported by LaTeX3? I can give more information if it is necessary …


title: nath and biblatex incompatibility

text: I try to use nath and couldn't get it to work within my document. So I started to track down the error with a minimal and adding all packages that I use after and after. I saw that I can load every package without errors (if I load nath at the very end) except the biblatex package. I get lots of errors when I load the biblatex package. Is there a workaround? Here's the minimal I compile:               \documentclass[       paper=A4,       pagesize,       fontsize=10pt,       draft=false     ]{scrartcl}     \usepackage{nath}     \usepackage[         style=numeric-comp,         bibstyle=numeric,         sorting=none,         url=false     ]{biblatex}     % \addbibresource{bibliography.bib}          \begin{document}          \begin{equation}     (\sum_{i=1}^n x_i^p)^{\displayed{\frac 1p}}     \end{equation}               \end{document}


title: Open \part in PDF table of contents automatically

text: > **Possible Duplicate:**   >  How can I make the content list of a PDF expanded by default? I am writing a thesis using LaTeX and everything is just fine. However, as my project includes three different parts for which I use the command `\part{}`. I notice that when I open the PDF file and check the contents on the left, I need to click to open the part and see the contents inside. Is there a way of telling the PDF file to open with all the menu opened by itself?


title: Design a multiple columns environment to arrange exercises

text: I want write the code like:               ...         \item         \textbf{Differentiation}.              Differentiate with respect to $x$:         \begin{exercises}{3}             \item$x^{2} - 3x$.             \item$x^{5} - \dfrac{x^3}{3}$.             \item$x + \dfrac{1}{x}$.             ...         \end{exercises}              \item         Differentiate with respect to $x$:             \begin{exercises}{2}             \item$y = x\cos\frac{1}{2}x$.             \item$y = \sin\left(\dfrac{\pi x}{180}\right)$.             \item$y = \frac{x^2}{1+x}$.             ...             \end{exercises}         ...     ...      ![sample pic](http://i.stack.imgur.com/afkqn.png) But if I use `shortlst` package as an advice from An environment which be used to arrange exercises mostly similiar with common enumerate list, the content after second `\item Differentiate with respect to $x$` in pic above will typeset in three columns. \----EDIT---- The proposal that use a `minipage` environment is restricted with the minipage's width defined in advance, that say, it is not suit for different page width. change               \documentclass{article}     \usepackage{shortlst}     \usepackage[width=10cm]{geometry}     \usepackage{lipsum}     \begin{document}     \lipsum[1]     \newenvironment{exercises}[1]         {#1:\\ \begin{minipage}[t]{0.9\textwidth}\begin{shortenumerate}}         {\end{shortenumerate}\end{minipage}}     \begin{enumerate}     \item     \begin{exercises}{\textbf{Differentiation}\\ Differentiate with respect to $x$}          \item $x^3-3x$          \item $x^5-\frac{x^3}{3}$          \item $x+\frac{1}{x}$          \item $(x+1)^2(x-1)^2$          \item $x\sin x$     \end{exercises}     \item     \begin{exercises}{Differentiate with respect to $x$}          \item $y=x\cos \frac{1}{2}x$          \item $y=\sin\left(\frac{\pi x}{180}\right)$          \item $y=\frac{x^2}{1+x}$      \end{exercises}     \end{enumerate}     \end{document}      to               \documentclass{article}     \usepackage{shortlst}     \usepackage[width=9cm]{geometry}     \usepackage{lipsum}     \begin{document}     \lipsum[1]     \newenvironment{exercises}[1]         {#1:\\ \begin{minipage}[t]{0.9\textwidth}\begin{shortenumerate}}         {\end{shortenumerate}\end{minipage}}     \begin{enumerate}     \item     \begin{exercises}{\textbf{Differentiation}\\ Differentiate with respect to $x$}          \item $x^3-3x$          \item $x^5-\frac{x^3}{3}$          \item $x+\frac{1}{x}$          \item $(x+1)^2(x-1)^2$          \item $x\sin x$     \end{exercises}     \item     \begin{exercises}{Differentiate with respect to $x$}          \item $y=x\cos \frac{1}{2}x$          \item $y=\sin\left(\frac{\pi x}{180}\right)$          \item $y=\frac{x^2}{1+x}$      \end{exercises}     \end{enumerate}     \end{document}      will get ![sample2](http://i.stack.imgur.com/Uc0Cc.png) so is the code given by Schweinebacke unless I changed the width individually               \documentclass{article}      \usepackage{shortlst}% http://ctan.org/pkg/shortlst      \usepackage{scrextend}      \usepackage{lipsum}      \usepackage[width=10cm]{geometry} %added     \begin{document}           \lipsum[1]      \begin{enumerate}      \item {Differentiate with respect to $x$:        \begin{addmargin}[0pt]{0.1\linewidth}          \begin{shortenumerate}            \item $x^3-3x$             \item $x^5-\frac{x^3}{3}$            \item $x+\frac{1}{x}$            \item $(x+1)^2(x-1)^2$            \item $x\sin x$          \end{shortenumerate}        \end{addmargin}      }      \item {Differentiate with respect to $x$:        \begin{addmargin}[0pt]{.4\linewidth}          \begin{shortenumerate}            \item $y=x\cos \frac{1}{2}x$            \item $y=\sin\left(\frac{\pi x}{180}\right)$            \item $y=\frac{x^2}{1+x}$            \item $y=x\cos \frac{1}{2}x$            \item $y=\sin\left(\frac{\pi x}{180}\right)$            \item $y=\frac{x^2}{1+x}$            \item $y=x\cos \frac{1}{2}x$            \item $y=\sin\left(\frac{\pi x}{180}\right)$            \item $y=\frac{x^2}{1+x}$            \item $y=x\cos \frac{1}{2}x$            \item $y=\sin\left(\frac{\pi x}{180}\right)$            \item $y=\frac{x^2}{1+x}$          \end{shortenumerate}        \end{addmargin}      }      \end{enumerate}      \end{document}      ![sample3](http://i.stack.imgur.com/VXi0T.png)


title: Figure width problem

text: I have a problem in a figure which i draw, the figure doesn't fit in one column of two column paper as shown in the fig below, any help? ![enter image description here](http://i.stack.imgur.com/zqTmm.png)               \begin{figure}{H}     \centering     \begin{tikzpicture}[       simple/.style={draw,text width=1.5cm,align=center,minimum size=1.5em},       node distance=11mm     ]     \node (xn) {$x[n]$};     \node[simple,right = of xn] (dft) {DFT};     \node[simple,right = of dft] (log) {log};     \node[simple,right = of log] (idf) {IDFT};     \node[,right = of idf] (cn) {$c[n]$};     \draw[dashed] ([xshift=-10pt,yshift=10pt]dft.north west) rectangle ([xshift=10pt,yshift=-10pt]idf.south east) ;     \draw[->] (xn) -- (dft);     \draw[->] (dft) -- node[auto] {$X[k]$} (log);     \draw[->] (log) -- node[auto] {$\hat{X}[k]$} (idf);     \draw[->] (idf) -- (cn);     \end{tikzpicture}     \caption{Cepstrum representation.}      \end{figure}


title: Problem in increasing the distance between labels in contour plot in a TikZ picture

text: I am having problem in increasing the distance between the labels in a contour plot in a TikZ picture. I tried a value from `10` to `10000` for the key `contour/label distanc` just to have only one label on each contour level. All I tried didn't give me the result I want. Is there something that I am missing? Here is the code I used:               \documentclass[crop=true,border=0mm]{standalone}     \usepackage{pgfplots}          \begin{document}              \begin{tikzpicture}             \begin{axis}[                 axis on top,                 title = {$\omega_\phi\left(x, \sigma\right) = \frac{\Gamma}{\pi{R_c}^2}\exp\left[-\frac{\left(x-x_0\right)^2+\left(\sigma-R_0\right)^2}{{R_c}^2}\right]$},                 xmin=2, xmax=3,                 ymin=2, ymax=3,                 view={0}{90},                 xlabel = {$x$},                 ylabel = {$\sigma$},                 ]                 \addplot3[                         contour gnuplot = {contour label style={                                     nodes={text=black},                                     /pgf/number format/fixed,                                     /pgf/number format/fixed zerofill=true,                                     /pgf/number format/precision=1,}},                         samples=2000,                         contour/draw color={black},                         contour/label distance=1000,                 ]                 {1/3.1415927/0.25^2*exp(-((x-2.5)^2+(y-2.5)^2)/0.25^2)};             \end{axis}         \end{tikzpicture}          \end{document}      I couldn't get `contour/label distance=1000,` to work for my case. The following is the picture of the above code with `samples=2000` and `contour/label distance=1000,`. I would like to have only one label on each contour. ![enter image description here](http://i.stack.imgur.com/CcwoN.png) Could someone help me?


title: Is it allowed to use Cambria and Cambria Math fonts in a book?

text: What about commercial use of Cambria and Cambria Math OTF fonts? I mean whether a publishing house could take these fonts to print my book? As far as I know, the Cambria fonts are included with Windows 7.


title: Problem installing mathabx-type1 font on Ubuntu-Linux

text: I've been trying to install the mathabx-type1 font with no sucess on my Ubuntu-Linux distribution. I downloaded the .pfb and .map files from here. What I did was the following:   1. First, I had to find where my local `texmf` folder was. In my case, it is located at `/usr/share/texmf`.   2. I created a folder named `mathabx-type1` on `/usr/share/texmf/fonts/type1/public/`, and copied the .pfb files there.   3. I created a folder named `mathabx-type1` on `/usr/share/texmf/fonts/map/dvips/`, and copied the .map file there.   4. I ran the command `mktexlsr` on terminal.   5. I ran the command `updmap-sys` on terminal. The thing is that the update at step 5 doesn't touch the `mathabx-type1` folder, but it does update the other folders on the same folder! (that is, it "sees" all the .map files in every folder at `/usr/share/texmf/fonts/map/dvips/` **except for mathabx-type1** ). Can anyone tell me what I'm missing here?


title: How to use @STRING variables in the note field of a .bib file?

text: I defined a `@STRING` in my **.bib** file as follows:               @STRING{mytext = {Last accessed: }}      This is an entry in the bibliography.               @ARTICLE{knuth:1974,       author = {Knuth, Donald E.},       title = {{C}omputer {P}rogramming as an {A}rt},       journal = {Communications of the ACM},       year = {1974},       volume = {17},       pages = {667--673},       number = {12},       month = {December },       address = {New York, NY, USA},       publisher = {ACM Press},       note = {Last accessed: 09/20/12}     }      I want to use `mytext` as a template so I can easily change it. The `note` field however contains more then the template text.   How can I use the `mytext` variable in the `note` field?


title: tikz-uml nest self call issue

text: When I try to use tikz-uml to draw s sequence diagram, I found it's not possible to nest a self call. for example, below code work fine since it's not a nest self call:               \documentclass{standalone}     \usepackage{tikz-uml}          \begin{document}          \begin{tikzpicture}     \begin{umlseqdiag}     \umlobject[class=A.java]{A}          \begin{umlcallself}[op=funA(),return=0]{A}     \end{umlcallself}          \begin{umlcallself}[op=funB(),return=1]{A}     \end{umlcallself}          \end{umlseqdiag}     \end{tikzpicture}      \end{document}      The output is: ![enter image description here](http://i.stack.imgur.com/B7R37.png) But if I nest it as below, then compile will failure:               \documentclass{standalone}     \usepackage{tikz-uml}          \begin{document}          \begin{tikzpicture}     \begin{umlseqdiag}     \umlobject[class=A.java]{A}          \begin{umlcallself}[op=funA(),return=0]{A}          \begin{umlcallself}[op=funB(),return=1]{A}     \end{umlcallself}          \end{umlcallself}          \end{umlseqdiag}     \end{tikzpicture}      \end{document}


title: left alignment of formulas

text: I am going to write some equation in an appendix for my report. I just want to set my equation in this part to the left. I used the following code, but it doesn't work.                   \begin{flalign*}         \nonumber \text{$for$}\quad k=1:n-1 \quad \text{$do$}&\\         \nonumber \beta &= (1-\alpha^2)\beta &         \end{flalign*}      what is wrong with it? How can i do this?


title: Vertical alignment of decorated numbers

text: I have a set of numbers with some decorations (circled or rounded) using tikz or pifont package. The issue is they look ugly because they don't look like aligned. Is there way to align (or move) them vertically to look better?               \documentclass{article}          \usepackage{tikz}     \usepackage{pifont}          \newcommand{\round}[1]{%       \tikz[baseline=(char.base)]\node[anchor=south west, draw,rectangle, rounded corners, inner sep=1pt, minimum size=3mm,         text height=2mm](char){\ensuremath{#1}} ;}          \let\oldding\ding% Store old \ding in \oldding     \renewcommand{\ding}[2][1]{\scalebox{#1}{\oldding{#2}}}     \newcommand{\circled}[1]{\ding[1.2]{\numexpr171 + #1}}          \begin{document}          1\round{2,4}\circled{3}5\circled{6}\circled{7}\circled{8}          \end{document}      ![enter image description here](http://i.stack.imgur.com/FYQrA.png)


title: Using calc-like (calc Package) Commands within LaTeX3/expl3

text: In my pursue to switch as much as possible from `LaTeX2e` code to `LaTeX3/expl3`, I got stuck with the usage of some of the `calc` package facilities. I've read of the `l3calc` package, but it seems it is currently deprecated. In particular, I'm running into trouble with the `calc` pkg command `\widthof`. What's the `LaTeX3/expl3` way to proceed in this regard without declaring a box? I mean, something like `\widthof{This text}` chez `LaTeX3/expl3`. To be more precise, I run into trouble with:               \documentclass{memoir}          % Loading explicitly the calc pkg doesn't help     %\usepackage{calc}          \usepackage{xparse}          \ExplSyntaxOn          \dim_new:N \g_tmp_dim     \dim_set:Nn \g_tmp_dim { \widthof{This ~ text} } % { 3pt } It works with this          \NewDocumentCommand \ShowWidth { }      { \dim_use:N \g_tmp_dim }          \ExplSyntaxOff          \begin{document}     \ShowWidth     \end{document}      Maybe my trouble has something to do with the expansion of the `n` argument here and I should define a variant for the function `\dim_set:Nn` that manages the expansion in a different way? Just pondering over it...


title: how to add {author}, {tableofcontents} and {date} for each {chapter} or {section}

text: I was composing a book (using xelatex) that each chapter comes from different author, is there any environments/packages that can put these message _near_ each chapter/section instead of the heading pages of the book?


title: Combining unicode-math fonts: Problems with \underbrace

text: I switched to XeLaTeX and unicode-math a while ago. I really like the possibility to combine different fonts for mathematical symbols. But now I run into trouble by combining the `\underbrace` command with content from different fonts. I actually use Asana as my main math font, but don't like its `\underbrace`, as these are too wide and with too much space between itself and the content. Therfore I wanted to use some from another font, which gave some grapy output:               \documentclass[]{scrartcl}          \usepackage{amsmath}          \usepackage{polyglossia}     \setmainlanguage[]{english}     \setotherlanguage[spelling=new,babelshorthands=true]{german}          \usepackage{unicode-math}       \setmathfont{Asana-Math.otf}          \begin{document}       Asana math Blubb       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[]{xits-math.otf}       XITS math       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[]{Cambria Math}       Cambria Math       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[]{latinmodern-math.otf}       Latin modern       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[]{texgyrepagella-math.otf}       Neo Euler       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       Asana as math font, change font for underbrace only:       \setmathfont[]{Asana-Math.otf}       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[range=\mathunder]{xits-math.otf}       XITS math       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[range=\mathunder]{Cambria Math}       Cambria Math       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[range=\mathunder]{latinmodern-math.otf}       Latin modern       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]       \setmathfont[range=\mathunder]{texgyrepagella-math.otf}       Neo Euler       \[         \underbrace{1} \quad \underbrace{1+1} \quad \underbrace{1+1+1} \quad \underbrace{1+1+1+1} \quad \underbrace{1+1+1+1+1}       \]     \end{document}      Is there any workaround for this? Or is it in general no good idea to combine different math fonts? I'm in general not so sure if to stay with unicode-math, as the compilation speed slows down, and for example the XITS font has much too narrow spacing sometimes (using XeTeX, Version 3.1415926-2.4-0.9998, MiKTeX 2.9) **Annotation** According to the first comment I just tried the `TeX Gyre Pagella Math` which also seems to be a nice font with better underbraces than Asana-math. But this brought me just to another behavior of unicode-math with XeLaTeX I have noticed before already but forgotten about. If I run the following code:               \documentclass{article}          \usepackage{amsmath}     \usepackage{unicode-math}     \setmathfont{texgyrepagella-math.otf}               \begin{document}     Test.     \begin{align*}       \frac{1}{x^2} \quad \underbrace{1+1+1+1+1}_F \underbrace{1+1}_F \underbrace{i}_F     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xf46g.png) Some minor changes that do not directly affect the math environment can change this behavior:               \documentclass{article}          \usepackage{amsmath}     \usepackage{unicode-math}     \setmathfont{texgyrepagella-math.otf}               \begin{document}     \begin{align*}       \frac{1}{x^2} \quad \underbrace{1+1+1+1+1}_F \underbrace{1+1}_F \underbrace{i}_F     \end{align*}     Some text.     \end{document}      ![enter image description here](http://i.stack.imgur.com/E2WqQ.png) I once got a similar behavior when I did a beamer presentation (using Asana- math, if I remember correctly) where changes anywhere in the TeX code could affect the braces in the shown way. I thought that this would maybe depend on the special circumstances of using beamer, but apparently hopping underbraces can appear anytime. Did anybody else see such a behavior of the `\underbrace` command before?


title: Questions about algpseudocode

text: I'm using the following packages:               \usepackage{algpseudocode}     \usepackage{algorithm}      but I don't understand what package is `algpseudocode`, since I can't find the documentation. I have followed this page. What's the difference between it and `algorithmicx`?      Also, how do I make calls inside a function (e.g. a recursion?) without using `\text{...}` (the font will be different and it does not look like a function). Here is an example:               \begin{algorithm}     \begin{algorithmic}[1]     \Function {foo}{$a$}     ...     \State \Return \text{foo($a-1$}}     \EndFunction     \end{algorithmic}     \end{algorithm}         And how do I make a new line (for instance if a `\text{...}` is too long)?      Finally, how do I define a `\TRUE` macro (like the `algorithmic` package)?      Thanks in advance.


title: Nopagebreak nopagebreak nopagebreak - why won't LaTeX listen to me?

text: Fun times, I'm making a (manual) index of the lecture slides for class (which are nowhere near latex, ppt files yay) and of course Latex insists on placing pagebreaks willie nillie through my items. Why isn't there a "keep (paragraph) with next (paragraph)" option like there is in Word 2007 (and all others I think). Is Word really more powerful than Latex [when it comes to this specific attribute of paragraph flow]?               *full page before here*     Knowledge in the \nopagebreak\\     \nopagebreak     \nopagebreak - Head      Results in               *full page*     Knowledge in the      ---8<--- Next page     - Head ...       Yes, I know I can place a `\newpage` before the line to push it to the next page, but there has to [HAS TO] be a way to make Latex understand that this isn't what I want, these two lines are supposed to stick together! Edit: Full context:               *empty line*     Knowledge in the \\     - Head \slid{44, 69}     - World \slid{5, \textbf{44}, 66, 69, 84}     *empty line*      With slid being:               \newcommand{\slid}[1]{\dotfill #1 \nopagebreak\\}      It seems to be to be that the -World line is pulling down the -Head line, if I add an empty line between them, both Knowledge.. and -Head stay on the same page, with -World on the next one. But when I combine the two, only -Head gets pulled to a new page, and Knowledge... stays on the previous page.


title: \star printing as \ast

text: I would like to use both `\star` and `\ast` in my document, but they produce the same character (*), whether or not `\star` is in math mode. I am using pdflatex in MikTeX 2.9 with the `times` package. What package do I need to get the `\star` character?


title: Latex character with no width

text: I would like to insert a character such that it has _no_ width. As a toy example consider `\rightarrow\leftarrow` In the middle i would like to insert a (say) `\bullet`, but with _no_ horizontal space. I know that `\rightarrow\!\!\!\bullet\!\!\!\leftarrow` roughly does the job, but only for this particular character. How do you do this construction in the general case?


title: Cannot set lining numbers in footnotes with realscripts and Times New Roman font

text: Whereas loading the package `realscripts` will change the footnote markers to lining numbers in some fonts (cf. How to change footnote number style), it does not work with Times New Roman:               \documentclass{article}     \usepackage{fontspec}     \setmainfont[Numbers=OldStyle]{Times New Roman}     \newfontfamily\TNR[Numbers=Lining]{Times New Roman}     \usepackage{realscripts}     \begin{document}     0123456789\footnote{Word}     {\TNR{0123456789\footnote{Word}}}     \end{document}      ![enter image description here](http://i.stack.imgur.com/NZDjR.png) I'm wondering, therefore, if there is some alternative way of setting the footnote marks to be lining numbers with fonts where `realscripts` has no effect. By renewing the macro `\footnotemark` or something ...


title: Get this error when I run my pgfplots

text: I got a problem with my pgfcodes. I get this error: > ! Package pgfplots Error: Sorry, pgfplots expects stacked plots to have > exactly the same number of coordinates. Unfortunately, I encountered at plot > with DIFF ERENT NUMBERS OF COORDINATES. Please verify that 1. no point has > been dropped b y coordinate filters (for example log(0) or so) and 2. all > plots have the same number of coordinates.. I can't find out what I'm doing wrong. The code is generated from matlab2tikz and it is a stacked barplot.               \documentclass[11pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{fourier}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage{tikz,pgfplots}          \begin{document}     \begin{tikzpicture}          \begin{axis}[%     view={0}{90},     width=6cm,     height=4cm,     scale only axis,     xmin=0, xmax=7,     xtick={1,2,3,4,5,6},     xticklabels={Volsted,Sønderholm,Lundby Bakker,Hals Nørreskov,Vester Aslund,Branths},     x tick label style={         rotate=60,anchor=east},     ymin=0, ymax=12,     ylabel={Antal data},     ymajorgrids,     title={Antal data},     axis lines*=left,     legend style={align=left},     ybar stacked,     bar width=0.342857142857143cm,     area legend]     \addplot[fill=green,draw=black] plot coordinates{ (1,8) (2,5) (3,7) (4,2) (5,0) (6,7) };          \addlegendentry{Boringer};          \addplot [     color=black,     solid,     forget plot     ]     coordinates{     (0,0)(7,0)      };     \addplot[fill=blue,draw=black] plot coordinates{ (1,3) (2,3) (3,3) (4,0) (5,3) (6,3) };          \addlegendentry{Vandværk};          \end{axis}     \end{tikzpicture}%     \end{document}      My document is in danish writing and I am a danish myself, so don't bother if you can't understand :)


title: Latex: Tabbing environment not working within fancyhdr footer and usage of longtabu

text: I have problems when I try to use the tabbing environment within a fancyhdr footer and using a longtabu table within the document. The error message is: `! LaTeX Error: Undefined tab position.` I tried to use `\linebreak`, `\newline` and `\let\ORInewline\\` but without success. What should I do? Here is my code example:               \documentclass[a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{ngerman}     \usepackage{longtable}     \usepackage{tabu}     \usepackage{fancyhdr}          \begin{document}     \pagestyle{fancyplain}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[L]{         \begin{tabbing}             aaaaaaaaaaaaaaaaa\=bbbbbbbbb\\             ccccc\>dddddddddddddddddd\\         \end{tabbing}     }          \begin{longtabu} to 3cm {|X|X|}         A\vspace{40cm} & B \\ % vspace needed to create table bigger than one page     \end{longtabu}     \end{document}      Thanks for your help.


title: Embedding sound files into beamer presentation with media9

text: I'm trying to embed a sound file inline into a beamer so i don't need to carry the sound file around with the pdf. Currently I place sound files into my beamer with the multimedia package and this command:               \movie[inlinesound]{\fbox{Play}}{igottafever.wav}      For some reason the `\sound` command gives scrambled static. But the `inlinesound` option apparently doesn't work with `\movie`. QUESTION 1: Is there some inline option for `\movie`? All the examples I see with media9 are of audio streams from online. QUESTION 2: How do I place a local file into a pdf with media9? This is not working:               \includemedia[flashvars={source=igottafever.wav}]{\fbox{Play}}{APlayer.swf      Throws an Error #2032: Stream Error. URL: file://PDFMedia022077/invalid in Acrobat X


title: Lost labels using intertext with varioref and hyperref

text: I have a problem using `\intertext` together with `\vref` when hyperref is also used. Consider the following minimal example:               \documentclass{article}       \usepackage{amsmath, varioref}       \usepackage{hyperref}     \begin{document}       \begin{equation}         \label{kinetic-energy}         E = MC^2       \end{equation}       \begin{gather}           A \\       \intertext{ and therefore due to \vref{kinetic-energy}: }           B       \end{gather}     \end{document}      which yields an error message of the pattern:               ! Package amsmath Error: Multiple \label's: label '1@xvr' will be lost.      at the end of the gather environment. If I either comment out hyperref, _OR_ use `\ref` instead of `\vref` the example works fine. I am using TeXLive 2011. Have I encountered a package bug/conflict, or is there some remedial I have missed? * * * **UPDATE:** I tried the solution of Mico, and it works except for a slight incompatibility between cleveref and refstyle (sic); it misses a space between the equation number and the page reference. Adding this to the preamble after including cleveref seems to fix the problem:               \makeatletter     \let\withoutspacecref@@vpageref\cref@@vpageref     \renewcommand\cref@@vpageref{\space\withoutspacecref@@vpageref}     \makeatother


title: How to divide the first row of a table into two rows

text: I want to divide the text in the first row into two rows so my table will be on the A4 sheet. How I can do that? I want to use a command other than p{dimen}               \begin{tabular}{|l|l|l|l|}     \hline     \multicolumn{1}{|c|}{the speeding rate} & \multicolumn{1}{c|}{speed by applying the algorithm} & \multicolumn{1}{c|}{speed without applying the algorithm} & \multicolumn{1}   {c|}{Improvement of the speed} \\     \hline     \multicolumn{1}{|c|}{57} & \multicolumn{1}{c|}{777} & \multicolumn{1}{c|}{8777} &     \multicolumn{1}{c|}{1} \\     \hline     \multicolumn{1}{|c|}{10} & \multicolumn{1}{c|}{86} & \multicolumn{1}{c|}{80} &   \multicolumn{1}{c|}{5} \\     \hline     \multicolumn{1}{|c|}{7} & \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{12} &   \multicolumn{1}{c|}{9} \\     \hline     \end{tabular}


title: Spreadtab related error, "File ended while scanning use of \ST@get@body"

text: # Question Here is the code:               \documentclass[a4paper, 12pt]{report}     \usepackage{graphicx}     \usepackage{color}      \usepackage[a4paper,landscape]{geometry}          \usepackage{spreadtab}               \title{ Dalhousie World Vision Society Budget}     \date{October 14, 2013}     \author{Joseph Harrietha\\ Treasurer, Dalhousie World Vision Society}          \begin{document}     \maketitle     \begin{spreadtab}{{tabular}{l|l|l|l|l|l}}          @ Project       &@Item               &@Quantity   &@Expense &@Notes                         &@Total (Tax Included) (\$)   \\ \midrule     @ Awareness     &@                   &@           &@        &@                              &@                             \\ \cline{2-6}     @               &@Big Posters        &@20         &@27      &@9\$ per sq ft. 3sq ft.        &\STcopy{v}{!c3*!d3*1.15}     \\ \cline{2-6}     @               &@Small Posters      &@50         &@1       &@                              &                             \\ \cline{2-6}     @               &@Brochures          &@200        &@1.50    &@                              &                             \\ \cline{2-6}     @               &@Handouts           &@100        &@1       &@                              &                             \\ \cline{2-6}     @               &@Misc Supplies      &@1          &@50      &@                              &                             \\ \midrule     @30 Hour Famine &@People Attending:  &@20         &@        &@                              &                             \\ \cline{2-6}     @               &@Food               &c8          &@20      &@                              &                             \\ \cline{2-6}     @               &@Activities         &@5          &@25      &@                              &                             \\ \cline{2-6}     @               &@Supplies           &@1          &@100     &@                              &                             \\ \midrule     @Water Run      &@People Attending:  &@No Count   &@        &@Assuming same number as 30HF  &                             \\ \cline{2-6}     @               &@Supplies           &c8          &@10      &@                              &                             \\ \cline{2-6}     @               &@Base Setup         &@1          &@100     &@                              &                             \\ \cline{2-6}     @               &@Shirts             &c8          &@10      &@                              &                             \\ \midrule     @Total          &@                   &@           &         &@                              &@Total Here     \end{spreadtab}     \end{document}      Most of the errors say: "Misplaced alignment tab character &" # UPDATE I removed the @ on all cells containing numbers, and now I have the following code:               \documentclass[a4paper, 12pt]{report}     \usepackage{graphicx}     \usepackage{color}      \usepackage[a4paper,landscape]{geometry}          \usepackage{spreadtab}               \title{ Dalhousie World Vision Society Budget}     \date{October 14, 2013}     \author{Joseph Harrietha\\ Treasurer, Dalhousie World Vision Society}          \begin{document}     \maketitle     \begin{spreadtab}{{tabular}{l|l|l|l|l|l}}          @ Project       &@Item               &@Quantity   &@Expense &@Notes                         &@Total (Tax Included) (\$)   \\ \midrule     @ Awareness     &@                   &@           &@        &@                              &@                             \\ \cline{2-6}     @               &@Big Posters        &20         &27      &@9\$ per sq ft. 3sq ft.        &\STcopy{v}{!c3*!d3*1.15}     \\ \cline{2-6}     @               &@Small Posters      &50         &1       &@                              &                             \\ \cline{2-6}     @               &@Brochures          &200        &1.50    &@                              &                             \\ \cline{2-6}     @               &@Handouts           &100        &1       &@                              &                             \\ \cline{2-6}     @               &@Misc Supplies      &1          &50      &@                              &                             \\ \midrule     @30 Hour Famine &@People Attending:  &20         &        &@                              &                             \\ \cline{2-6}     @               &@Food               &c8         &20      &@                              &                             \\ \cline{2-6}     @               &@Activities         &5          &25      &@                              &                             \\ \cline{2-6}     @               &@Supplies           &1          &100     &@                              &                             \\ \midrule     @Water Run      &@People Attending:  &@No Count  &@       &@Assuming same number as 30HF  &                             \\ \cline{2-6     @               &@Supplies           &c8         &10      &@                              &                             \\ \cline{2-6}     @               &@Base Setup         &@1         &@100    &                               &                             \\ \cline{2-6}     @               &@Shirts             &c8         &10      &@                               &                             \\ \midrule     @Total          &@                   &@          &        &@                              & \\     \end{spreadtab}     \end{document}      That only generates the errors: "File ended while scanning use of \ST@get@body"


title: Biber writes incorrect unicode encoding of \'\i

text: Biber seems to be writing some strange unicode characters when reading bib entries where the accented character `í` has been entered as `\'\i`. This causes compilation to break when using pdflatex (and utf8 input), and produce strange characters or random errors with some fonts in xelatex. How can I get biber to produce the correct character? Minimal example bellow               \documentclass{article}          \begin{filecontents}{test.bib}     @article{sample,         Author = {Ver{\'o}nica Mac{\'\i}as},         Title = {My Sample Paper},         Journal = {Journal of Sample Documents},         Year = {2011}}     \end{filecontents}          \usepackage{iftex}     \ifXeTeX       \usepackage{fontspec}       \setromanfont[Mapping=tex-text]{Minion Pro}     \else       \usepackage[utf8]{inputenc}     \fi          \usepackage[backend=biber]{biblatex}     \addbibresource{test.bib}          \begin{document}     Verónica Macías \cite{sample}     \printbibliography     \end{document}      If I run               pdflatex test     biber test     pdflatex test      I get the error               ! Package inputenc Error: Unicode char \u8:́ not set up for use with LaTeX.      If instead (after cleaning auxiliary files) I run:               xelatex test     biber test     xelatex test     xelatex test      Then I would randomly get either               ** ERROR ** Charstring too long: gid=1679      Or compilation succeeds, but the output looks like ![enter image description here](http://i.stack.imgur.com/XHlcK.png) How can I convince biber to produce the correct unicode character for `í`? P.S. Yes, I _know_ that I could solve the problem by changing the encoding of the bib file, but assume that I don't want to do this because that file is being automatically generated elsewhere, and that's what I get.


title: Is there a (standard) font with a literal end-of-line character in it?

text: For ... complicated ... reasons (which I'll explain in a moment), I want to be able to put a literal end-of-line character in my document. Simply putting `^^J` results in an Ω. Looking at the font tables in _TeX by Topic_ , that seems quite reasonable as the slot occupied by character 10 - corresponding to the inputted eol - is, indeed, Ω. Looking further at the font tables, I can't see an eol symbol in the standard TeX fonts (why would it be there?). So I went searching in other fonts and of course they have the symbol, but I can't figure how to get it in to the document. So: How do I get a literal end-of-line character in to a document? ( _The rest isn't necessary to understand the question, just the background_ ) My reason for wanting this is strange, but hopefully comprehensible. I'm coercing TeX into being a _pre-processor_. A step in this is to use `pdftotext` to convert the output from TeX into an ordinary text file (suitable for feeding back into another system). Now for my desired next step, line endings seem to be significant. So I want to control where they end up. However, unless I have a sheet of (virtual) paper 20m wide, I also need to let TeX break lines where it will (since either TeX or PDF or `pdftotext` truncate long lines). I thought that I could get around this by using the fact that there are different systems for line-breaks on different computers, and `pdftotext` is nice enough to work with all of them. So I can tell `pdftotext` to _convert_ the linebreaks in the PDF to, say, character 13 whilst putting character 10 where I actually want them. But that strategy hinges on being able to put some sort of actual eol character in the output, which I don't seem to be able to do.


title: Confusion: \onehalfspacing vs. \spacing vs. Word vs. the world?

text: I have to write a paper with the requirement to use "1.5 line spacing" 12pt Times New Roman. Naturally I used               \usepackage{setspace}     \begin{document}     \onehalfspacing     Lorem ipsum…      So far so good. But I'm a litte paranoid so I checked it with Word and was suprised to get something completely different, so I made this comparison: ![http://i.imgur.com/8LZgR.png](http://i.imgur.com/8LZgR.png) you may have to open that in a new tab. But seriously? Am I missing something? Everyone recommends using `\onehalfspacing` but that can't be right? I checked the text with a bare minimum and the results are the same:               \documentclass[12pt]{article}          \usepackage[utf8]{inputenc}     \usepackage{mathptmx}     \usepackage{setspace}          \begin{document}     \onehalfspacing     Lorem ipsum...      I guess my question is: what setting should I use?


title: how to put a node below another in a chain

text: I have the following chain:                  \begin{tikzpicture}[start chain=going right,>=latex,node distance=0pt]          \node[draw,rectangle,on chain,minimum size=1cm] (rr) {$I$};          \node[draw,rectangle,on chain,draw=white,minimum width=0.8cm]{};          % the rectangular shape with vertical lines          \node[rectangle split, rectangle split parts=3,          draw, rectangle split horizontal,text height=0.5cm,text depth=0.5cm,on chain,inner ysep=0pt] (wa) {};          \fill[white] ([xshift=-\pgflinewidth,yshift=-\pgflinewidth]wa.north west)             rectangle ([xshift=-15pt,yshift=\pgflinewidth]wa.south);          % the circle          \node[draw,circle,on chain,minimum size=1cm] (se) {$U_1$};          \node[draw,diamond,on chain,minimum size=0.2cm,xshift=0.7cm] (see) {};          { [start branch=numbers going below] } % just a declaration,          \node[draw,rectangle,on chain,draw=white,minimum width=0.7cm]{};          % rect2          \node[rectangle split, rectangle split parts=3,          draw, rectangle split horizontal,text height=0.5cm,text depth=0.5cm,on chain,inner ysep=0pt] (wa2) {};          \fill[white] ([xshift=-\pgflinewidth,yshift=-\pgflinewidth]wa2.north west)             rectangle ([xshift=-15pt,yshift=\pgflinewidth]wa2.south);          % the circle 2          \node[draw,circle,on chain,minimum size=1cm] (se2) {$U_2$};          % the arrows and labels          \draw[->] (se.east) -- +(20pt,0) node[midway,above] {$\mu_1$};          \draw[->] (see.east) -- +(20pt,0) node[midway,above] {$\mu_1$};          \draw[->] (se2.east) -- +(20pt,0) node[midway,above] {$\mu_2$};          \draw[<-] (wa.west) -- +(-20pt,0) node[midway,above] {$\lambda$};        \end{tikzpicture}      Which is a connection between two queues as shown in the picture: However I would like to add another node below the diamond with an arrow. How to do this? I searched some solutions but they do not really fit my code... ![enter image description here](http://i.stack.imgur.com/8do0q.png)


title: Defining and passing arguments

text: I would like to pass the arguments               ->,line width=1.2pt      to command               \draw [] ...      However, this does not work               \newcommand\newstyle{->,line width=1.2pt}     \draw[\newstyle]      Is there any way to do that?


title: Images in LaTeX – what's the solution?

text: I've faced so many problems using images in LaTeX. See for example, another question at http://stackoverflow.com/questions/382590/latex-using-eps-images- builds-slowly What tools do you use to make figures for inclusion into LaTeX? Is there a simple solution to this? Some scenarios described below:   * I want to add a screenshot into LaTeX;   * I want to include a figure from visio into LaTeX;   * I plot a graph, export into png, and the image does not seem to have a bounding box.  How to handle these scenarios?


title: Skim and Aquamacs: backward search does not work anymore

text: I've set up pdf syncing between Aquamacs and Skim,                   (setq server-use-tcp t)     (server-start)          (custom-set-variables      '(LaTeX-command "latex -synctex=1")      '(TeX-view-program-list (quote (("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %n %o %b") ("Preview" "open -a Preview.app %o"))))     )          (setq TeX-source-correlate-method 'synctex)     (add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)      Forward search and pdf syncing work fine, and backward searching was working yesterday. However, today, when I clicked `CMD`+`SHIFT`+`ClICK` in Skim, it does not do backward searching anymore. Does anyone know how to fix it?


title: pgfplots and figure centering

text: I'm wondering about a way to exclude the axis labels and axis graduation from how latex will center the figure with respect to the caption. Labels and graduation along the y-axis (assuming it lies on the left of the figure) will tend to move the rest of the content to the right. I feel like it looks better when only the "main" content serves for centering purposes. Is such feature available?


title: How to allow more lines in specific colums of simple tables respecting the page margins

text: A simple table is needed. The issue is that there is much text in the 2nd column, and it should respect the text margins. Example:               \documentclass[11pt]{article}     \usepackage{booktabs}          \begin{document}                    \begin{tabular}{@{}llr@{}} \toprule      Animal & Description \\ \midrule          During & the period while Major Henry Lee and his famous Light Dragoons were serving in New Jersey, intelligence came of the marauding operations of a band of Tory robbers \\     Located & in the extensive pine woods toward Barnegat, in Monmouth county, whose head-quarters were at a secret cave in that region. Lee dispatched a select party of fearless men \\      who & approached the dangerous region in a farmer’s wagon, concealed under a covering of straw \\     Fagans & the robber leader, with some followers, stopped the wagon to plunder it, when the concealed dragoons immediately put a ball through Fagans’s head \\\bottomrule     \end{tabular}\\               Source: Modified Text fragments Forman (2014) Down the Ohio and Mississippi \texttt{http://www.gutenberg.org/files/44823/44823-h/44823-h.htm}          \end{document}