title: tikz, positioning library: node distances in scaled pictures

text: I do find it arkward that numbers without dimension in the shifting part of the keys from the positioning library are not scaled. I can retrieve the unit vector and use it in the values but I do find the syntax user unfriendly. Is there some good way to tell tikz to interpret "below right=3 and 3" as 3*scaled xvector instead of 3*xvector?               \documentclass[]{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{backgrounds}          \begin{document}               \begin{tikzpicture}[show background rectangle]     \pgfpointtransformed{\pgfpointxy{1}{1}};     \pgfgetlastxy{\xvec}{\yvec}     \tikzset{node distance=\xvec*1 and \yvec*1}               \coordinate (C) at (1,1);     \draw[red,fill] (C) circle (5pt);     \node[below=of C] {no shifting part};     \node[below right=3 and 3,anchor=base west] (A) at (C) {no cm};     \node[below right=3cm and 3cm,anchor=base east] (D) at (C) {cm};     \node[below right=\xvec*3 and \yvec*3,anchor=south] (B) at (C) {scaled};     \draw[red](C)--(A.base west);     \end{tikzpicture}                    \begin{tikzpicture}[scale=0.3,show background rectangle]     \pgfpointtransformed{\pgfpointxy{1}{1}};     \pgfgetlastxy{\xvec}{\yvec}     \tikzset{node distance=\xvec*1 and \yvec*1}               \coordinate (C) at (1,1);     \draw[red,fill] (C) circle (5pt);     \node[below=of C] {no shifting part}; %ok     %This should work like in the last node:     \node[below right=3 and 3,anchor=base west] (A) at (C) {no cm}; %not ok     \node[below right=3cm and 3cm,anchor=base east] (D) at (C) {cm}; %ok     \node[below right=\xvec*3 and \yvec*3,anchor=south] (B) at (C) {scaled}; %ok      \draw[red](C)--(A.base west);     \end{tikzpicture}          \end{document}


title: esopic and repeating part of document

text: This answer nicely illustrate the use of eso-pic to repeat part of document. Repeating part of document on every page But when the text entered is large, it is cut-off from the page. It possibly converts it to image and put it in foreground. But this solution fails to work when the length off user input is variable. Is there any other solution?


title: Computing value using pgfmath for use in coordinates?

text: Why can't I use the outcome of using pgfmath in a TikZ coordinate? Here is a (minimal) example that does not work:               \documentclass[11pt]{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}          \newcommand{\leftBoundary}{\pgfmathparse{0.255in*3/2}\pgfmathresult}          % This is fine:     \node at (0,0) {\leftBoundary};          % This does not work:     \draw[thick] (\leftBoundary,2) rectangle +(1,1);          \end{tikzpicture}     \end{document}      What I'm trying to achieve is to compute a number of dimensions that I then use for arranging things in a figure. While I know that I could also use code like `($(point1)+(3,4)$)` during drawing stuff in TikZ, for better overview, it would be great if the dimensions can be computed upfront.


title: How to set two title(main title and subtitle)

text: Recently,I have been translating a foreign paper that has main title and subtitle. My trial:               \documentclass[UTF8]{ctexart}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{inputenc}     \usepackage{geometry}      \geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}     \begin{document}     \title{      Simulatin Modelling Practice and Theoty \\      \begin{large}        Common Simulation of a SCARA robot with PD and learning controller     \end{large} }          \end{document}      However,it failed to achieve that effect. And the main title is "Simulatin Modelling Practice and Theoty " ,subtitle is "Simulation of a SCARA robot with PD and learning controller".So my question is how to alter it.


title: How can I get proper paragraph handling in itemize environments?

text: I'm using the `itemize` environment to answer a list of questions, because the output is compact and neat. However, when I need more than one paragraph in one item, the second one is not indented, as it would have been outside of `itemize`.               \begin{itemize}              \item[1.]              This is the first paragraph of this item.              This the second paragraph of this item, and it is not indented.          \end{itemize}      How do I fix this? Or am I just treating `itemize` and `\item` wrong, and should really try to redefine `\section` to this effect to make my document semantically more correct?


title: DOI link with special characters

text: I use the bibtexstyle statto which gives a hyperlink of the DOI to the respective site. For the title it seems to take preferentially the url provided in the bibtex file. I have few DOIs of the form `10.1002/(SICI)1096-9918(199804)26:4<235::AID-SIA360>3.0.CO;2-A` In this case the hyperlink is not valid. The hyperlink in the PDF shows well `http://dx.doi.org/10.1002/(SICI)1096-9918(199804)26:4<235::AID- SIA360>3.0.CO;2-A` but when I click on it I get an error (The Web Capture operation you have requested has failed because of an error). Copying the link from the journal webpage gives a link where the special characters are replaced `http://onlinelibrary.wiley.com/doi/10.1002/%28SICI%291096-9918%28199804%2926:4%3C235::AID- SIA360%3E3.0.CO;2-A/abstract` which works fine (hyperlinked in the titel). How can I modify the DOI to produce a correct hyperlink? Eventually there is a possibility to modify the statto file to exchange the special characters in the link? I think the `doi` package does something like this. However, loading the `doi` package does not help. Loading the `doi` package and using `\bibliographystyle{plainnat}` gives a working link. However I would like to have the titles hyperlinked, as statto.bst provides. Comment: The link in the PDF seems to work fine when viewed with AcrobatReader 10, but not in Adobe Acrobat Pro 10 (give the error stated above). So the link might work in most cases, however a solution avoiding the special characters would still be appreciated.               \begin{filecontents}{mytestbib2.bib}          @ARTICLE{Lopez-Carreno_SurfaceandInterfaceAnalysis_1998,       author = {L\'opez-Carre\~no, L. D. and Ben\'itez, G. and Viscido, L. and Heras,         J. M. and Yubero, F. and Espin\'os, J. P. and Gonz\'alez-Elipe, A.         R.},       title = {Oxidation of molybdenum surfaces by reactive oxygen plasma and {O}$_2^+$         bombardment: an auger and {XPS} study},       journal = {Surface and Interface Analysis},       year = {1998},       volume = {26},       pages = {235--241},       number = {4},       doi = {10.1002/(SICI)1096-9918(199804)26:4<235::AID-SIA360>3.0.CO;2-A},       issn = {1096-9918},       keywords = {ballistic effects, molybdenum oxides, oxygen plasma, {XPS}},       language = {en},       shorttitle = {Oxidation of molybdenum surfaces by reactive oxygen plasma and O2+         bombardment},       url = {http://onlinelibrary.wiley.com/doi/10.1002/%28SICI%291096-9918%28199804%2926:4%3C235::AID-SIA360%3E3.0.CO;2-A/abstract},     }                    \end{filecontents}     \documentclass{article}     \usepackage{filecontents}     \usepackage[square, sort&compress, numbers]{natbib}     \usepackage[T1]{fontenc}     \usepackage[pdftex]{hyperref}                    \begin{document}          A citation \cite{Lopez-Carreno_SurfaceandInterfaceAnalysis_1998}          \bibliographystyle{statto}     \bibliography{mytestbib2}          \end{document}


title: Placing math environments inside math environments

text: I have a macro which appears throughout my document in various places:               \newcommand{\placefraction}[2]{         $\frac{#1}{#2}$     }      Sometimes it is placed with regular text. Sometimes it is placed within other math modes. However, the document won't compile if it is placed inside another math mode. None of my math ever appears in displayed formulas, it is always part of the paragraph.   * How can I have a macro which sometimes appears inside math mode, sometimes outside, but itself contains math mode?


title: How to make the numbering of subsections independent from the numbering of sections?

text: I am writing a constitution for a society. I would like to have the subsections numbered independently of the way that the sections are numbered, i.e:               Section 1         Subsection 1         Subsection 2     Section 2         Subsection 3      How can this be done?


title: Where does TeXShop stores the console output?

text: I'm using pdflatexmk with TeXShop and I would like to search in the console output. TeXShop itself does not allow this (I even can't select the output), but I can not find a log file containing a copy of the console output. There's only a log file that gets overwritten by the pdflatexmk script. Can I generate a file containing the console output?


title: How do extra braces impact the placement of items in the document?

text: I am placing some of my document through some outside BASH scripts, but want to protect some information such that the scripts will not change them. The simplest option for me is to put `{` and `}` around important areas and let the BASH script know it should ignore these parts.   * The `{` and `}` always appear within the same sentence and never span two or more sentences.   * Sometimes `{` and `}` must be placed within math mode environments or surround macros. As best as I can tell, when `{` and `}` are placed within parts of a sentence or within math mode, they are invisible when compiled. Is this really so? Could this change things, such as the spacing between words, the line-breaking of sentences, or the appearance of text?   * Do extra `{` and `}`'s really have no effect?   * Are there any characters I could put in the document which `xelatex` will completely ignore?


title: Set fonts in graphs equal to tex document

text: > **Possible Duplicate:**   >  Set fonts in matplotlib graphs equal to tex document I am writing my phd in LaTeX and I am generating all my graphical content in Python with the matplotlibpackage. For my TeX document, I am using a math- supported font -- e.g. Kurier Light Condensed \-- and I would like to use the same font in my plots. What is the easiest way to use the same font in my matplotlib figures and my corpus text in LaTeX?   * e.g. can I save my figures (vectorized ?) such that it takes the tex font when importing in tex?   * e.g. can I import the font in matplotlib and use it there?


title: can (pdf)LaTeX change the font in a figure at compilation time

text: > **Possible Duplicate:**   >  Set fonts in matplotlib graphs equal to tex document I create figures using _Python / Matplotlib_ and saved them in _.pdf_ and _.eps_ format. I'm writing a (long and complex) .tex document in which I include these figures. I compile the .tex file with _pdflatex_. **I'd like to know if it is possible that, when I compile, (pdf)LaTeX automatically "reads" the text in the figure (labels, title, etc.) and "update" their font to the one I use in the .tex document?** I know _psfrag_ can do it, but you have to precise what to change exactly and it doesn't work with pdflatex. I know _pdfrag_ can do it, but you have to precise what to change exactly and it doesn't work for large and complicated files. **What I'm looking for is a way to automatically and systematically change the font for all text in the .pdf or .eps figures.** (Because I can't afford the time to re-run the code that generated the figures, but I would really like to have nice and uniform font in my document, including the figures). Remark 1: I generated some figures already using LaTeX fonts thanks to Matplotlib, however, some (if not most) of my figures use the basic (by default) Python/Matplotlib font. Remark 2: My preamble includes (among others):               \usepackage{pslatex}        % used     \usepackage{amsmath}        % used     % \usepackage[T1]{fontenc}  % not used     % \usepackage{amsfonts}     % not used


title: How to decrease the font size of a table in an \input file

text: I have:               \documentclass[11pt]{article}     \begin{document}     This is the main tex document.     \input{tables}     \end{document}      In the `tables.tex` file, I only have numerical tables. I want to decrease the size of fonts used in the table, without modifying `tables.tex`. Is there proper commands that I can enter right before `\input{tables}`? FYI, `tables.tex` looks like:               \begin{table}[htbp]     \caption{table caption}     \begin{tabular}{rr}     $u$   & 0.00       \end{tabular}     \end{table}


title: How to modify the label output in cleveref and varioref?

text: EDIT: The mentioned solution on the bottom of this page works perfectly for the label output. But now I am struggling with the distance of the \crefname and the counter. Instead of a space I would like to have a smaller distance between fig. and the number. Instead of fig.~1 I'd like to have fig\,1 but it appears that I am losing myself in the code of the cref manual. I am using a combination of `varioref`, `cleveref` and `hyperref` to use a - I would say - more "sophisticated" referencing behaviour. It enables me to simply use `\vref{labelname}` to get the output > Table 1 on page 1 My MWE looks like this:               \documentclass{scrreprt}          \usepackage[T1]{fontenc}%Kodierung     \usepackage[utf8]{inputenc}%%Kodierung     \usepackage[english,ngerman]{babel}%language     \usepackage[format=plain,indention=1em,labelfont=bf,font=footnotesize,justification=justified,position=bottom]{caption}  %schönere Captions durch den \caption-Befehl          %%%%%%%%%%     %REFERENCES     %%%%%%%%%%     \usepackage[ngerman]{varioref}       \usepackage[linktocpage=true,bookmarksopen,hidelinks,ngerman,hyperfootnotes=false]{hyperref}%Hyperrefpaket         \usepackage[ngerman,nameinlink,sort]{cleveref}          \renewcommand*babel\reftextfaraway[1]{auf S.\,\pageref{#1}}%     \addto\extrasngerman{\renewcommand{\reftextfaraway}[1]{auf S.\,\pageref{#1}}} %Short page labels               \begin{document}          \chapter{Chapter 1}          \begin{table}     \caption{Text}     \label{text}     \end{table}          \newpage          \vref{text}          \end{document}      Now, what I want is: I would like to change the way the Table or Figure or whatever is named in the text, when I use a 'ref' command. Instead of > Figure 1 on page 1 I would like to get (preferably in German but I guess this is reached by a general trigger or babel) > Fig. 1 on p. 1 Through research I already figured out how to modify the label in the float itself by adding this code (since I am using the babel package this is needed):               \addto\captionsngerman{\renewcommand{\figurename}{Abb.}}     \addto\captionsngerman{\renewcommand{\tablename}{Tab.}}      Also, in a forum I found a way to modify the pagelabel output but I failed at changing the text output of my referencing command. I tried               \addto\captionsngerman{\renewcommand{\crefname}{Abb.}}      But, this simply gives me an error of a missing control sequence.


title: Calculate prices

text: I want to calculate prices in a LaTex file. This means I want to add two numbers with exactly 2 decimal places and I want to multiply these values by an integer. An other thing is the output format. The numbers should be printed like this: 1.234.567,89 (I want to use this in Germany, and there we write numbers like that). I know there are many packages for calculation in LaTeX, but I assume/hope there is one especially for money values.


title: Bug in the mdframed package (workaround?)

text: I've discovered what appears to be a bug in the `mdframed` package. My goal was to use a package which allows me to create shaded theorem environments which span multiple pages (`thmtools` does not allow this). Run this minimal example:               \documentclass{memoir}     \usepackage[english]{babel}     \usepackage{amsthm}     \usepackage{mdframed}     \usepackage{blindtext}          \newmdtheoremenv{theorem}{Theorem}          \begin{document}     \chapter{Hello}     \marginpar{\vspace*{9pt}\chapnumfont\thechapter}  % COMMENT IN/OUT          \begin{theorem}     \blindtext[2]     \end{theorem}          \begin{theorem}     \blindtext[3]     \end{theorem}     \end{document}      When the marked line is commented out, then the theorems render as expected -- that is, the second theorem spans the first and second page. However, when the marked line is commented in, then the two theorems are generated on separate pages. The marked line simply adds in the chapter number on the side. ![Bad](http://i.stack.imgur.com/Pyf9F.png)![Good](http://i.stack.imgur.com/1zh7S.png) Does anybody know the source of the bug? Moreover, is there a way to work around this? I want the theorems to span the pages, as the package was designed!


title: Using texliveonfly in TeXLive 2011

text: I test texliveonfly using the tikzpagenodes package.               %fly.tex     \documentclass{standalone}     \usepackage{tikz,tikzpagenodes}     \begin{document}     \begin{tikzpicture}[remember picture,overlay]       \draw[blue] (current page text area.south west)         rectangle         (current page text area.north east)     \end{tikzpicture}     \end{document}      I typed               sudo python texliveonfly.py --texlive_bin=/usr/local/texlive/2011/texmf-dist/ fly.tex      But error message:               /usr/local/texlive/2011/texmf-dist/tlmgr is not installed      What do I do? In short, as its use `texliveonfly` in `/usr/local/texlive/2011/`


How to remove the white space on the top of the following table? ![enter image description here](http://i.stack.imgur.com/yzSjo.png)               \documentclass[preview,border=0pt,varwidth]{standalone}     \usepackage[table]{xcolor}     \usepackage{array}     \usepackage{longtable}               \newcolumntype{A}[2]{%         >{\minipage{\dimexpr#1\linewidth-2\tabcolsep-#2\arrayrulewidth}\vspace\tabcolsep}%         c%         <{\vspace\tabcolsep\endminipage}%     }          \newcommand\correction[1]{%         \abovedisplayshortskip=#1\baselineskip\relax         \belowdisplayshortskip=#1\baselineskip\relax         \abovedisplayskip=#1\baselineskip\relax         \belowdisplayskip=#1\baselineskip\relax     }          \rowcolors{1}{cyan!20}{white}%     \arrayrulewidth=1pt\relax     %\topskip=0pt\relax          \begin{document}     \begin{longtable}{|*2{>{\arraybackslash\correction{-1}\strut\[}A{0.4}{1.5}<{\]\strut}|}}\hline     f(x) & f'(x)\\\hline     c & 0\\\hline     x^n & nx^{n-1}\\\hline     \ln x & \frac{1}{x}\\\hline     e^x & e^x\\\hline     a(x)b(x) & a'(x)b(x)+a(x)b'(x)\\\hline     \frac{a(x)}{b(x)} & \frac{a'(x)b(x)-a(x)b'(x)}{b^2(x)}\\     \hline     \end{longtable}     \end{document}      ## Bonus: As I want to be a best practitioner, please kindly try to optimize, simplify, improve my code above.


title: A couple of questions about Japanese in Title and Chapter; CJK parameters; best fonts, installing; memoir

text: I'm trying to produce a report using memoir and CJK and seem to keep running into a wall. I was hoping someone on here uses CJK and can point me in the right direction. First, if I want the entire document to be in Japanese, I can use the `\begin{CJK}` and `\end{CJK}` tags immediately after and before the `\begin{document}` and `\end{document}` tags respectively, right? The problem is that while I can get Japanese text into the body this way, pdfLaTeX throws an error if I put it in the chapter or title fields. Any ideas why? Secondly, according to CJK.txt there are three parameters, `[<fontencoding>]`, `{<encoding>}`, and `{<family>}`. I'm on Mac OS X and just want to type the Japanese characters directly into my .tex document using the built-in Japanese support (I believe it's called Kotoeri). What encoding and fontencoding settings should I use? The only one I'm having any luck with is UTF-8. Also, "fontencoding" is wrapped in square brackets in the `CJK.txt` document, but shouldn't they be curly braces? Or do the square brackets indicate it's an optional parameter? Thirdly, what's a good font family to use, and where should I put the files once I've downloaded them? This example uses the "min" family, but the characters look really sloppy – I'd prefer something that looks more like MS Mincho or Hiragino Mincho Pro. If I have these fonts on my computer (i.e., in Font Book), is that enough for LaTeX to use them, or do I need to download separate font packages for use with LaTeX? If those fonts are accessible, is it enough to enter "Hiragino", for instance, in the "family" parameter of the `\begin{CJK}` tag, or do I need to do something special? Finally, have you heard of any incompatibility between the memoir package and CJK? I had no idea using Japanese in LaTeX was so much work. I guess I'm used to the luxury of a word processor. Thank you very much for taking the time to look.


title: Stanza breaks with verse package

text: I am trying to enforce stanza breaks via a blank line as explained in the verse package documentation. Stanza breaks do not seem to eventuate with this MWE:               \documentclass{memoir}     \usepackage{verse}     \begin{document}     \settowidth{\versewidth}{Not the least obeisance made he; not a minute stopped or stayed he;}     \begin{verse}[\versewidth]     Open here I flung the shutter, when, with many a flirt and flutter,\\     In there stepped a stately Raven of the saintly days of yore.\\     Not the least obeisance made he; not a minute stopped or stayed he;\\     But, with mien of lord or lady, perched above my chamber door\textemdash\\     Perched upon a bust of Pallas just above my chamber door\textemdash\\     \vin Perched, and sat, and nothing more.\\          Then this ebony bird beguiling my sad fancy into smiling,\\     By the grave and stern decorum of the countenance it wore,\\     ``Though thy crest be shorn and shaven, thou,'' I said, ``art sure no craven,\\     Ghastly grim and ancient Raven wandering from the Nightly shore\textemdash\\     Tell me what thy lordly name is on the Night's Plutonian shore!''\\     \vin Quoth the Raven, ``Nevermore.''\\     \end{verse}     \end{document}      If instead I insert a `\medskip` in place of a blank line, I get a stanza break. I think the verse package authors intended a break with a plain blank line. Can someone tell me what I am doing wrong please?


title: \setbox containing maths interferes with surrounding math mode in XeTeX

text: I encountered what might be a bug in XeTeX (but I would be glad to be proven wrong) while chasing a strange interaction between bytefield, unicode-math, and mathtools. In general, I do not expect a construction of the form `\setbox\mybox\hbox{...}` to affect the surrounding code, as long as the box `\mybox` is not used anywhere else, and the `...` do not perform global assignments. I would thus expect the macro `\ignore` in the example to typeset its argument and do nothing with it. Given what I feed it (simple characters, `\mathchar`), no assignment should be performed: `\everymath` and `\everhbox` are empty; besides, `\tracingall` confirms this absence of assignments. Despite this, the spacing of the surrounding math mode (which contains no character... this might be a clue) is affected, as can be seen by inspecting the boxes on the terminal.               \global\font\xxx"[latinmodern-math.otf]"\relax     \global\textfont 0\xxx     \newbox\mybox     \def\ignore#1{\setbox\mybox\hbox{#1}}     \def\showhbox#1{\setbox0\hbox{#1}\showbox0\relax}     \tracingall     \showhbox{${\ \over\ }\ignore{a}$}     \showhbox{${\ \over\ }\ignore{$\mathchar`a$}$}     \showhbox{${\ \over\ }\ignore{a}$}     \bye      Odder still, the boxes have sizes               \hbox(3.93732+3.44841)x5.73332     \hbox(3.94+3.45)x5.73332     \hbox(3.94+3.45)x5.73332      The third box, which has the exact same contents as the first, should have the same size, but it does not. I haven't checked whether this problem is specific to the font. I guess my question is in two parts: (1) am I interpreting correctly what I see when thinking it is a bug? (2) (How) can I perform box assignments safely in XeTeX without affecting the surrounding maths?


title: New sectioning level above section

text: I would like to create a newcounter (`lectcount`) which will be one level above the "section" in article class, and use its name in the headings (I am using `fancyhdr`). I don't know how to set the hierarchy level above section, and also I don't know how to refer to its name in order to write it in the page headings. I have come out with the following code. The end of `\lecture` definition was supposed to capture the lecture's name argument, which doesn't work. Any help will be appreciated.               \newcounter{lectcount}     \newcommand{\lecture}[1]{\refstepcounter{lectcount}%         \noindent\textbf{\LARGE Lecture \thelectcount: #1}\par\bigskip%         \let\lectname\#1}          \fancyhead[L]{Lecture \thelectcount: \lectname}          \begin{document}     \lecture{My First Lecture}     ...     \end{document}


title: More section headings?

text: I am a novice in LaTeX and I have one question. Can someone tell me what if you want more heading's in LaTeX. Like 5 or 10 or even 15. Is there a package for that?


title: How do I change the color of the 'pages' text in the bibliography when using hyperref with pagebackref enabled?

text: I'm using `hyperref` to add pdf hyperlinks to all references in my document. I am using the `pagebackref` option, so in the bibliography I get a nice list of links to the pages the reference appeared. The page numbers are preceded by "-> pages" but this text is a light shade of grey. I disabled colour boxes but I don't seem to be able to modify the colour of this text. Any ideas? It is too light right now. Here's the code I'm using:               \usepackage[bookmarks,bookmarksnumbered, colorlinks=true, allcolors=black,citecolor=black,     filecolor=black, linkcolor=black, pagecolor=black, urlcolor=black,     pagebackref,linktocpage     ]{hyperref}


title: error while using amsmath package

text: I try to run this:                  \documentclass{article}         \usepackage{amsmath}         \renewcommand\thesection{\arabic{section}.}         \makeatletter         \renewcommand{\section}{             \@startsection                 {section}{1}{0mm}             {\baselineskip}%             {\baselineskip}              {\fontsize{14}{14}\centering\bfseries\MakeUppercase}                    }%            \makeatother          \begin{document}         \tableofcontents         \section{A}         \end{document}      and I get a message that something's wrong with '.toc' file, so what's wrong? Why does this not like `amsmath` package?


title: inparaenum in figure captions

text: Is there a reason why I find it hard to put inline lists in figure captions? I've defined this:               \newcommand{\inlinelist}[1]{\begin{inparaenum}[(a)] #1 \end{inparaenum}}      But I can't see anything wrong with it. It only seems to be a problem in captions.


title: vim LateX-Suite indentation and line breaking

text: I'm now setting up Vim for use with LaTeX. This is about setting up the indentation. In the picture below, there are many things that need tweaking. Everything between `\vskip .5cm` and `\vskip 1in` is just one hard line (as opposed to 3 soft-wrapped lines). ![enter image description here](http://i.stack.imgur.com/Uhx5G.png)   1. I want the soft-wrapped lines to follow the original indentation, in this case, the indentation of `Once upon a time...`   2. At the right side of the screenshot, `computer` and `called` are badly broken. If they don't fit the line width, they might as well move to the next (soft) line altogether. **UPDATE:** Now I have this fixed with `set linebreak`. **Current settings**   My pertinent settings in `~/.vim/ftplugin/tex_latexSuite.vim` are               set ts=4     set sw=4     set autoindent     set linebreak      **Solutions I've tried**   Upon reading `:help autoindent`, I find that I can use `gqgq` to format the current hard line, like so: ![enter image description here](http://i.stack.imgur.com/Ymtnx.png) The single hard line now becomes 4 hard lines. However, that's not what I want. I believe that what I'm looking for is **soft wrapping with proper indentation**. Can I do that in Vim? How?


title: Overbrace in amsmath align environment

text: I have the following rather large equation.               \begin{alignat*}{16}     1 &= &&b_m     &&          &c_n + &b_m     &&          &c_{n-1} &&R_L + &b_m     &&          &c_{n-2} &R_L^2 + &\cdots + &b_m     &&          &&c_1 &R_L^{n-1} \\       &+ &&b_{m-1} &&R_S^1     &c_n + &b_{m-1} &&R_S^1     &c_{n-1} &&R_L + &b_{m-1} &&R_S^1     &c_{n-2} &R_L^2 + &\cdots + &b_{m-1} &&R_S^1     &&c_1 &R_L^{n-1} \\       &+ &&b_{m-2} &&R_S^2     &c_n + &b_{m-2} &&R_S^2     &c_{n-1} &&R_L + &b_{m-2} &&R_S^2     &c_{n-2} &R_L^2 + &\cdots + &b_{m-2} &&R_S^2     &&c_1 &R_L^{n-1} \\       &  &&        &&          &      &        &&          &        &&      & \vdots \\       &+ &&b_1     &&R_S^{m-1} &c_n + &b_1     &&R_S^{m-1} &c_{n-1} &&R_L + &b_1     &&R_S^{m-1} &c_{n-2} &R_L^2 + &\cdots + &b_1     &&R_S^{m-1} &&c_1 &R_L^{n-1}     \end{alignat*}      I would like to use overbraces and underbraces to break things down, such as by using:               &+ &&b_1     &&R_S^{m-1} &c_n + &b_1     &&R_S^{m-1} &c_{n-1} &&R_L + &b_1     &&R_S^{m-1} &c_{n-2} &R_L^2 + &\cdots + \underbrace{&b_1     &&R_S^{m-1} &&c_1 &R_L^{n-1}}_{Explanation}      However, the align environment doesn't seem to like this; perhaps because alignment symbols get tucked inside of the underbrace call. Is it possible to both align and over/underbrace my equation?


title: Package for Service Value Networks (or something close)

text: I would like to draw several Service Value Networks and I am looking for a package to help me do so. Does anybody have an idea what package I could use? ![Service Value Network Example 1](http://i.stack.imgur.com/swsRO.png) ![Service Value Netwokr Example 2](http://i.stack.imgur.com/SCcxm.png)


title: Itemize without bullets

text: I want to use the `itemize` environment exactly as it works by default, but hide the bullets that would otherwise appear. Is there an easy way to do this?


title: How to avoid longtable caption repetition in list of tables?

text: In the below MWE, the caption was repeated twice in the list of tables. How to make appear only once?               \documentclass[oneside,toc=graduated]{scrbook}      \usepackage{longtable}     \usepackage{booktabs}     \begin{document}     \listoftables     \newpage     \begin{longtable}{r r r r r r}     \caption[List of tables caption.]{Here is the caption beside the table with long text.}\label{tab:addlabel} \\     \toprule     Time & MAD & Group & Par1 & Par2 & Par3 \\     \hline     \endhead     \hline \multicolumn{6}{c}{\textit{Continued on next page}} \\     \endfoot     \hline     \endlastfoot     0     & 10.839 & 0     & 111.5 & 109.6 & 89.3  \\     200   & 10.854 & 0     & 111.6 & 109.6 & 89.3  \\     400   & 10.869 & 0     & 111.7 & 109.8 & 89.3  \\     600   & 10.898 & 0     & 111.8 & 109.9 & 89.3  \\     799   & 10.903 & 0     & 111.9 & 109.9 & 89.3  \\     0     & 10.916 & 0     & 112.1 & 110.1 & 89.5  \\     200   & 10.901 & 0     & 112.2 & 110.2 & 89.5  \\     400   & 10.569 & 0     & 112.4 & 110.4 & 89.5  \\     600   & 7.6   & 0     & 112.4 & 110.4 & 89.7  \\     799   & 4.861 & 0     & 112.5 & 110.4 & 90.6  \\     0     & 2.984 & 0     & 112.4 & 110.5 & 91.3  \\     200   & 0.74  & 0     & 112.3 & 110.3 & 91.1  \\     400   & 0.378 & 0     & 111.5 & 109.6 & 90.7  \\     600   & 0.391 & 0     & 111.7 & 109.6 & 90.9  \\     799   & 0.344 & 0     & 111.6 & 109.9 & 91.1  \\     0     & 0.388 & 0     & 111.9 & 110   & 91.6  \\     200   & 0.381 & 0     & 112.5 & 110.2 & 92    \\     400   & 0.366 & 0     & 112.6 & 110.4 & 92.6  \\     600   & 0.336 & 0     & 112.9 & 110.7 & 93    \\     799   & 0.328 & 0     & 113.1 & 110.9 & 93.6  \\     0     & 0.329 & 0     & 113.2 & 111.2 & 94.1  \\     200   & 0.393 & 0     & 113.4 & 111.4 & 95    \\     400   & 0.362 & 0     & 113.6 & 111.6 & 95.6  \\     600   & 0.345 & 0     & 113.8 & 111.9 & 96.3  \\     799   & 0.343 & 0     & 113.9 & 112.1 & 80    \\     0     & 0.335 & 0     & 113.9 & 112.4 & 97.6  \\     200   & 0.374 & 0     & 113.2 & 112.6 & 98.3  \\     400   & 0.403 & 0     & 114.6 & 112.9 & 98.9  \\     600   & 0.381 & 0     & 114.4 & 113.3 & 99.4  \\     799   & 0.388 & 0     & 115   & 113.7 & 100.1 \\     0     & 0.387 & 0     & 114.7 & 114.2 & 100.8 \\     200   & 0.41  & 0     & 115.3 & 115   & 101.9 \\     400   & 0.41  & 0     & 116.5 & 116.3 & 101.8 \\     600   & 0.421 & 0     & 117.5 & 118.6 & 102.3 \\     799   & 0.431 & 0     & 119.9 & 123.6 & 102.7 \\     0     & 0.442 & 0     & 125.3 & 132   & 103.3 \\     200   & 0.448 & 0     & 135.8 & 141.5 & 103.8 \\     400   & 0.465 & 0     & 151.1 & 147.4 & 104.4 \\     600   & 0.485 & 0     & 164.4 & 155.3 & 105.3 \\     799   & 0.495 & 0     & 181.1 & 175.6 & 106.4 \\     0     & 0.55  & 0     & 216.6 & 196.5 & 107.8 \\     200   & 0.561 & 0     & 246.8 & 215.1 & 108.1 \\     400   & 0.604 & 0     & 278   & 244   & 174.5 \\     600   & 0.646 & 0     & 304.2 & 273.1 & 174.1 \\     799   & 0.725 & 0     & 326.1 & 284.4 & 173.4 \\     0     & 0.759 & 0     & 337.3 & 293.5 & 172.5 \\     200   & 0.837 & 0     & 340.7 & 301.8 & 171.8 \\     400   & 0.864 & 0     & 342.3 & 306.3 & 170.6 \\     600   & 0.701 & 0     & 345.4 & 309.7 & 169.7 \\     799   & 0.876 & 0     & 346.2 & 307.6 & 169.1 \\     0     & 0.886 & 0     & 343.7 & 306.2 & 168.6 \\     200   & 0.876 & 0     & 340.9 & 305.4 & 168   \\     \end{longtable}     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/B7PWh.png) **Update:**   The below lines of code now works based on Mico answer:               \documentclass[oneside,toc=graduated]{scrbook}      \usepackage{longtable}     \usepackage{booktabs}     \begin{document}     \listoftables     \newpage     \begin{longtable}{r r r r r r}     \caption[List of tables caption.]{Here is the caption beside the table with long text.\label{tab:addlabel}} \\     \toprule     Time & MAD\footnote{a} & Group\footnote{b} & Par1 & Par2 & Par3 \\     \hline     \endfirsthead     \toprule     Time & MAD\footnote{a} & Group\footnote{b} & Par1 & Par2 & Par3 \\     \hline     \endhead     \hline \multicolumn{6}{c}{\textit{Continued on next page}} \\     \endfoot     \hline     \endlastfoot     \footnotetext{Median Absolute Deviation}     \footnotetext{Second footnote}     0     & 10.839 & 0     & 111.5 & 109.6 & 89.3  \\     200   & 10.854 & 0     & 111.6 & 109.6 & 89.3  \\     400   & 10.869 & 0     & 111.7 & 109.8 & 89.3  \\     <...truncated...>     600   & 0.701 & 0     & 345.4 & 309.7 & 169.7 \\     799   & 0.876 & 0     & 346.2 & 307.6 & 169.1 \\     0     & 0.886 & 0     & 343.7 & 306.2 & 168.6 \\     200   & 0.876 & 0     & 340.9 & 305.4 & 168   \\     \end{longtable}     \end{document}      Output:   ![enter image description here](http://i.stack.imgur.com/JTII3.png)


title: TikZ not drawing some lines in grid

text: When I use \draw to create a grid, several lines are missing. See the attached code and images, where, for example, the dashed red grid is missing the bottom and left boundaries. Actually the solid green and solid red gird are missing it as well. I'm not sure if I am getting graphical bugs or if this is intended behavior: ![Missing lines](http://i.stack.imgur.com/nSFJ5.png)               \documentclass{article}     \usepackage{tikz}     \pagestyle{empty}          \pgfdeclarelayer{level0}     \pgfdeclarelayer{level1}     \pgfdeclarelayer{level2}     \pgfsetlayers{main,level0,level1,level2}          \begin{document}          \begin{figure}[h]       \centering         \begin{tikzpicture}[scale=2]           \begin{pgfonlayer}{level0} % Level 0             \draw[help lines] (0,0) grid (5,5); % Base grid             \draw[very thick, scale=5] (0,0) grid (1,1); % Darker lines to mark e.g. box boundaries           \end{pgfonlayer}                \begin{pgfonlayer}{level1} % Level 1             \draw[green, dashed] (.5,.5) grid[step=.5] (4.5,4.5); % Ghost cells             \draw[green] (1,1) grid[step=.5] (4,4);           \end{pgfonlayer}                \begin{pgfonlayer}{level2} % Level 2             \draw[red, dashed] (1.75,1.75) grid[step=.25] (3.25,3.25); % Ghost cells             \draw[red] (2,2) grid[step=.25] (3,3);           \end{pgfonlayer}              \end{tikzpicture}         \caption{Standard isotropic refinement.}     \end{figure}          \end{document}      Thank you!


I put a figure in a new page and I got the following message:               Overfull \vbox (7.96234pt too high) has occurred while \output is active      The log file shows the following:               Overfull \vbox (7.96234pt too high) has occurred while \output is active     \vbox(0.0+0.0)x469.47046     .\glue 0.0 plus 1.0fil     .\hbox(7.96234+0.0)x469.47046     ..\pdfcolorstack 0 push {0 g 0 G}     ..\hbox(7.96234+0.0)x469.47046, glue set 466.20738fil     ...\glue 0.0 plus 1.0fil     ...\T1/cmr/m/n/12 i     ..\pdfcolorstack 0 pop               [1          ]     Overfull \vbox (7.96234pt too high) has occurred while \output is active     \vbox(0.0+0.0)x469.47046     .\glue 0.0 plus 1.0fil     .\hbox(7.96234+0.0)x469.47046     ..\pdfcolorstack 0 push {0 g 0 G}     ..\hbox(7.96234+0.0)x469.47046, glue set 462.9443fil     ...\glue 0.0 plus 1.0fil     ...\T1/cmr/m/n/12 i     ...\T1/cmr/m/n/12 i     ..\pdfcolorstack 0 pop               [2          ]     Package epstopdf Info: Source file: <figures/logo.eps>     (epstopdf)                    date: 2011-03-10 17:02:38     (epstopdf)                    size: 106887 bytes     (epstopdf)             Output file: <figures/logo-eps-converted-to.pdf>     (epstopdf)                    date: 2012-11-06 11:26:23     (epstopdf)                    size: 11686 bytes     (epstopdf)             Command: <repstopdf --outfile=figures/logo-eps-converted     -to.pdf figures/logo.eps>     (epstopdf)             \includegraphics on input line 152.     Package epstopdf Info: Output file is already uptodate.     <figures/logo-eps-converted-to.pdf, id=167, 113.42375pt x 127.47626pt>     File: figures/logo-eps-converted-to.pdf Graphic file (type pdf)          <use figures/logo-eps-converted-to.pdf>     Package pdftex.def Info: figures/logo-eps-converted-to.pdf used on input line 152.     (pdftex.def)             Requested size: 85.35826pt x 95.93373pt.          Overfull \vbox (7.96234pt too high) has occurred while \output is active     \vbox(0.0+0.0)x469.47046     .\glue 0.0 plus 1.0fil     .\hbox(7.96234+0.0)x469.47046     ..\pdfcolorstack 0 push {0 g 0 G}     ..\hbox(7.96234+0.0)x469.47046, glue set 459.68123fil     ...\glue 0.0 plus 1.0fil     ...\T1/cmr/m/n/12 i     ...\T1/cmr/m/n/12 i     ...\T1/cmr/m/n/12 i     ..\pdfcolorstack 0 pop               There are many such messages! which I am trying to get rid of.          \clearpage     \addcontentsline{toc}{chapter}{Examination}     \setlength{\topmargin}{0.01cm}     \begin{figure}     \includegraphics[width = 3cm]{figures/logo.eps}     \end{figure}


title: Biblatex or Biber bug?

text: Yesterday I updated my MikTex 2.9 distribution (Win XP SP3 32 bit) to `biblatex` 2.1 along with `biber` 1.1 and some more. (Following packages were updated:               biblatex.tar.lzma...     hyperref.tar.lzma...miktex-biber-bin.tar.lzma... miktex-misc.tar.lzma...miktex-texinfo-base.tar.lzma...todonotes.tar.lzma..)      And, suddenly, I was not able to compile my document anymore. Here is what do and what I get:   1. delete `.aux` files.   2. run `pdflatex -synctex=1 -interaction=nonstopmode %.tex` -> This works fine. No errors   3. Run `biber`. Works, but with a bunch of warnings like:              WARN - BibTeX subsystem: C:\DOKUME~1\jelzow01\LOKALE~1\Temp\scsg79gtPA\Lit.bib_320.utf8, line 18, warning: 1 characters of junk seen at toplevel      Still the final message is "Process exited normally".   4. As at this stage the references are not resolved in the PDF file I run `pdftex` again:              pdflatex -synctex=1 -interaction=nonstopmode %.tex      But this time I receive lots of errors (here is an excerpt):               line 1034: Paragraph ended before \name was complete     line 136: Undefined control sequence ...csname newcount\endcsname \scratchcounter     line 136: Missing number, treated as zero ...csname newcount\endcsname \scratchcounter     line 136: Missing = inserted for \ifnum ...csname newcount\endcsname \scratchcounter     line 136: Missing number, treated as zero ...csname newcount\endcsname \scratchcounter     line 136: Undefined control sequence ...csname newcount\endcsname \scratchcounter     line 136: Undefined control sequence ...csname newcount\endcsname \scratchcounter     line 136: Missing number, treated as zero ...csname newcount\endcsname \scratchcounter     line 136: Undefined control sequence ...csname newcount\endcsname \scratchcounter     line 136: You can't use `\xdef' after \advance ...csname newcount\endcsname \scratchcounter      The first one is related to the `*.bbl` file, the others to the `supp- pdf.mkii`. They are linked to following lines in log file:               Package biblatex Info: Reference section=2 on input line 10.     Package biblatex Info: Reference section/segment=2/0 on input line 10.     ("C:\Programme\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"     [Loading MPS to PDF converter (version 2006.09.02).]     ! Undefined control sequence.     <argument> \blx@bbl@data       Then I found this topic: Biblatex 2.1 bug There Ulrike Fischer mentioned that the problem might be connected to `biblatex` 2.1 and should not be present in 2.0. So, I did a downgrade to 2.0. But with no success. The same problem again. I notice the following warning:               Package biblatex Warning: File 'main_diss.bbl' created by wrong version.          Package biblatex Info: ... file 'main_diss.bbl' found.     ('path to my bbl file'.bbl     Runaway argument?     {{{hash=3b25bddedd00854b83d926f7f0f709e9}{Tuchin}{T\bibinitperiod }{V\ETC.     ! Paragraph ended before \name was complete.     <to be read again>                         \par      l.1034       Obviously, `biber` 1.1 created a `bbl` file for `biblatex` 2.1. I then wanted to downgrade to `biber` 1.0. But on the repository               http://www.ctan.org/tex-archive/biblio/biber/binaries/Windows      I found only the up to file version uploaded on 2012-Jul-30. Has anybody an idea what the problem is and how to solve it? Where can I get `biber` 1.0? Might other packages have influence on this problem? Any help highly is welcome. [UPDATE] I also tried to update `biblatex` to 2.2. Again, with no success. * * * ## [UDPATE] SOLUTION of the problem I guess, I was wrong in blaming biblatex or biber. The problem was located in the *.bib file which I use as my bibliography database. This file is automatically exported from Zotero. Yesterday, I added a short citation but I did not compile (because the update of Miktex was running at that moment). Today, after the update, I noticed the problem described above. Shame on me. Here is the entry which caused the trouble:               @book{tuchin_tissue_2007,     address = {Bellingham, Wash.},     title = {Tissue optics light scattering methods and instruments for medical diagnosis},     isbn = {9780819464330 0819464333 9780819481061  0819481068  9781615837311  1615837310},     url = {http://link.aip.org/link/doi/10.1117/3.684093},     abstract = {This second edition covers the intensive growth in tissue optics--in particular, the field of tissue diagnostics and imaging--that has occurred since 2000. As in the original edition, Part I describes fundamentals and basic research, and Part {II} presents instrumentation and medical applications. The extensive new material includes results on tissue optical property measurements, including polarized light interaction with turbid tissues; an overview of new polarization imaging and spectroscopy techniques, optical computed tomography {(OCT)} developments and applications; updates on controlling tissue optical properties, and the optothermal and optoacoustic interaction of light with tissues; and descriptions of fluorescence, nonlinear spectroscopies, and inelastic light scattering.},     publisher = {{SPIE/International} Society for Optical Engineering},     author = {Tuchin, V. V and {{Society} of Photo-optical Instrumentation Engineers}},     year = {2007},     file = {Tissue Optics | Press Monographs - eBooks:D:\aj\zotero\storage\SXWHA9T7\pm166.html:text/html;Tissue Optics | Press Monographs - eBooks:D:\aj\zotero\storage\Z2A22V52\pm166.html:text/html}     },      More precisely the trouble is caused by the author field. If I replace               author = {Tuchin, V. V and {{Society} of Photo-optical Instrumentation Engineers}},      with               author = {Tuchin, V. V},        everything works fine. As you can see there are some additional brackets {} around the second "author" (the society) which are presumably the reason for the trouble. If I remove the second author everything works. I suppose that biber parses the author field till it finds the the first closing } and then stops. In this case there is an unbalance in opened and closed brackets. And this makes the trouble. Thanks to Ulrike Fischer and PLK for the comments. Next time I'll try a minimal example first.


title: Compressing an equation

text: The equation below seems fine to me but when I insert this into a TeX file, it gives me back an error. Is anything wrong? The scope was to compressed the equation.               \begin{align*}     U & = -\frac{S \epsilon ^2 \Big(-108 S \lambda ^2-108 S \lambda ^2 \cos2 \tau \Big)}{432 \lambda ^3} \\       & -\frac{S \epsilon ^3 \left(72 \text{g2} S^2 \lambda ^{3/2} \cos\tau -72 g_2 S^2 \lambda ^{3/2} \cos3 \tau \right)}\\       & {432 \lambda ^3}-\frac{1}{432 \lambda ^3}S \epsilon ^4 \Bigl( -280 g_2^4 Z+378 g_2 g_4 Z-135 g_5 Z+128 g_2^2 S \lambda  \\       & +64 g_2^2 S^3 \lambda +36 g_2^2 Z \lambda+54 S^3 \lambda ^2-9 Z \lambda ^2-280 g_2^4 Z \cos 2 \tau ]+378g_2 g_4 Z \cos 2 \tau  \\       & -135 g_5 Z \cos2 \tau+4 g_2^2 \left(32 S+28 S^3+9 Z\right) \lambda \cos2 \tau +81 S^3 \lambda ^2 \cos2 \tau \\       & -9 Z \lambda ^2 \cos2 \tau  -48 g_2^2 S^3 \lambda  \cos4 \tau +27 S^3 \lambda ^2 \cos 4 \tau \Bigr).     \end{align*}


title: Creating sub-algorithms in latex using the algorithm package

text: I want to do something like this (see image below) where I can describe my algorithm in smaller steps or "phases" as this person calls them. I've used the algorithm and algorithmic package before but I can't figure out how to do these "sub-algorithms" and i cant seem to find it in any tutorial. ![enter image description here](http://i.stack.imgur.com/Eb4yv.png)


title: moderncv - how to adjust the personal info

text: How to adjust my long email address in the personal info in the moderncv? I use:               \documentclass[11pt,a4paper,sans]{moderncv}          \moderncvstyle{casual}     \moderncvcolor{blue}      \usepackage[utf8]{inputenx}     \usepackage[russian]{babel}     \usepackage[T1]{fontenc}     \usepackage[scale=0.75]{geometry}     \setlength{\hintscolumnwidth}{2.6cm}      \firstname{Aaaa}     \familyname{bbbb}     \title{ccc}                 \address{ddd. dddddd-4, d.33. dd.145}{dddddd, dddddd}     \mobile{+e~(eee)~555~eeee}     \phone{+f~(fff)~fff~ffff}     \email{johndoeeeeeee@gmail.com}      Update: Sorry, my mistake. Now, I have put the full length of the personal info. With this full length my email address is not visible. ![email address](http://i.stack.imgur.com/uAk7f.jpg)


title: Big table with cells spanning more than one page

text: I have a huge table that spans across multiple pages. I am using the \longtable to create these tables. Not only is the table huge, there are cells in the table that are more than one page long. For such cells, instead of continuing the content in the next page the cell fills the entire page and shows only content that fits in that page and jumps to the next row in the next page. Any help fixing this problem is greatly appreciated. Thanks. I am posting only one cell in my table. The table itself consists of many cells like these. Hope this helps. Minimal Working Example:               \documentclass[12pt]{article}          \usepackage{longtable}          \usepackage{array}          \begin{document}          \section{Minimal Working Example}          { \footnotesize {      { \renewcommand{\arraystretch}{1.5}      \begin{longtable}{ | >{\raggedright\arraybackslash}p{1cm} | >{\raggedright\arraybackslash}p{12cm} | }      \hline      30, 2  &    7.3071997e-09(1,0,c) + 0.050425039(2,0,c) - 0.0007346614(2,2,c) + 0.025531209(2,2,s) + 4.1082023e-10(3,0,c) + 0.05700949(4,0,c) + 2.0770709e-09(4,1,c) + 1.5124542e-09(4,1,s) - 0.028782175(4,2,c) + 0.013138827(4,2,s) + 0.10535731(4,4,c) + 0.030134448(4,4,s) - 0.021009745(6,0,c) + 0.077647547(6,2,c) - 0.045755621(6,2,s) + 9.2404255e-10(6,3,c) - 0.088258279(6,4,c) - 0.074616189(6,4,s) - 0.061815854(6,6,c) + 0.058090377(6,6,s) + 1.1485948e-08(7,0,c) + 0.026709616(8,0,c) + 0.061860038(8,2,c) - 0.11029433(8,2,s) - 9.5954232e-09(8,3,s) - 0.0068431304(8,4,c) - 0.050887506(8,4,s) + 0.075285659(8,6,c) + 0.067521705(8,6,s) + 0.070639847(8,8,c) - 0.065777628(8,8,s) - 5.2500077e-09(9,3,c) + 5.5210608e-09(9,6,c) + 5.8752925e-09(9,7,s) + 0.16024928(10,0,c) + 0.029579557(10,2,c) - 0.024436465(10,2,s) - 0.014635492(10,4,c) + 0.010115573(10,4,s) + 0.068202983(10,6,c) - 0.17353204(10,6,s) + 0.044859754(10,8,c) + 0.0029382622(10,8,s) - 0.034371315(10,10,c) + 0.032428599(10,10,s) + 0.050398873(12,0,c) + 0.042071392(12,2,c) + 0.06659721(12,2,s) + 0.031320872(12,4,c) + 0.049151718(12,4,s) - 7.2550689e-09(12,5,c) + 0.014370739(12,6,c) + 0.05026134(12,6,s) + 5.5004229e-09(12,7,c) + 0.015273785(12,8,c) + 0.083233106(12,8,s) - 0.13274971(12,10,c) + 0.055838355(12,10,s) - 0.027904676(12,12,c) - 0.053948409(12,12,s) - 5.8639928e-10(13,4,c) - 0.063572871(14,0,c) - 0.0091655048(14,2,c) - 0.019331851(14,2,s) + 0.01646178(14,4,c) + 0.068634141(14,4,s) - 0.013970866(14,6,c) - 0.037277016(14,6,s) - 0.1030854(14,8,c) + 0.045489314(14,8,s) + 0.021372293(14,10,c) - 0.073559961(14,10,s) + 0.045624337(14,12,c) + 0.074966927(14,12,s) + 0.097892082(14,14,c) + 0.0057169708(14,14,s) + 9.7795967e-10(15,1,c) + 3.5447635e-10(15,1,s) - 8.9917498e-09(15,3,s) - 0.080143199(16,0,c) + 0.08177001(16,2,c) - 0.020717143(16,2,s) - 6.2864595e-09(16,3,s) - 0.14016948(16,4,c) + 0.064700192(16,4,s) - 0.054473028(16,6,c) - 0.1095053(16,6,s) - 0.021318109(16,8,c) + 0.0071850353(16,8,s) - 0.099567329(16,10,c) - 0.07620251(16,10,s) + 0.065127966(16,12,c) - 0.052821433(16,12,s) + 0.011885013(16,14,c) - 0.072352164(16,14,s) - 0.07836611(16,16,c) + 0.031465557(16,16,s) - 0.094226752(18,0,c) + 0.054347989(18,2,c) - 0.035157864(18,2,s) + 3.4554553e-10(18,3,c) - 0.053891135(18,4,c) + 0.0075232492(18,4,s) - 0.10553402(18,6,c) + 0.17422312(18,6,s) + 0.051354537(18,8,c) - 0.024581266(18,8,s) + 0.014479917(18,10,c) - 0.094779257(18,10,s) - 0.060059459(18,12,c) + 0.025420109(18,12,s) + 0.033749767(18,14,c) + 0.081688841(18,14,s) - 0.00058820534(18,16,c) - 0.075110208(18,16,s) - 0.025438701(18,18,c) - 0.065070013(18,18,s) + 2.6625119e-09(19,4,c) + 0.12246211(20,0,c) + 0.054722097(20,2,c) - 0.067851072(20,2,s) - 0.068904395(20,4,c) - 0.055593685(20,4,s) + 3.6059311e-09(20,5,c) - 0.054784508(20,6,c) - 0.080323483(20,6,s) - 0.064725037(20,8,c) - 0.078047681(20,8,s) + 0.14088247(20,10,c) - 0.094721211(20,10,s) - 0.037935728(20,12,c) + 0.028587188(20,12,s) - 0.068835399(20,14,c) - 0.031688748(20,14,s) + 0.0088283678(20,16,c) - 0.0084234893(20,16,s) - 0.016477903(20,18,c) - 0.044251807(20,18,s) - 0.063523376(20,20,c) - 0.10695428(20,20,s) - 0.046139928(22,0,c) - 0.067700252(22,2,c) + 0.088377478(22,2,s) - 0.074853235(22,4,c) - 0.038618401(22,4,s) + 0.036443079(22,6,c) + 0.034137396(22,6,s) + 0.025494768(22,8,c) - 0.064019969(22,8,s) - 0.094563603(22,10,c) + 0.012952108(22,10,s) + 0.060746465(22,12,c) - 0.033791834(22,12,s) - 0.066521445(22,14,c) - 0.055787309(22,14,s) + 0.0050392453(22,16,c) + 0.0021764389(22,16,s) + 0.060963752(22,18,c) + 0.13460652(22,18,s) + 0.019277576(22,20,c) - 0.086139701(22,20,s) - 0.056567579(22,22,c) + 0.0093068286(22,22,s) - 4.7364357e-10(23,3,c) - 3.2308077e-10(23,5,s) + 1.8922421e-09(23,6,c) - 0.12809933(24,0,c) - 0.043809869(24,2,c) + 0.0206685(24,2,s) - 0.17130851(24,4,c) - 0.013138036(24,4,s) + 0.069899425(24,6,c) - 0.059502885(24,6,s) + 0.028368299(24,8,c) - 0.094453165(24,8,s) + 0.0011214921(24,10,c) + 0.033920184(24,10,s) - 0.049893904(24,12,c) + 0.069888302(24,12,s) + 0.072003815(24,14,c) + 0.087329497(24,14,s) + 0.0023388558(24,16,c) - 0.0024357313(24,16,s) + 0.027070931(24,18,c) + 0.060326034(24,18,s) + 0.028310875(24,20,c) - 0.063858916(24,20,s) - 0.034123725(24,22,c) - 0.055558351(24,22,s) + 0.050543199(24,24,c) + 0.0054402414(24,24,s) - 2.7657768e-09(25,0,c) + 6.306705e-09(25,6,c) + 0.0020309041(26,0,c) - 0.023130929(26,2,c) - 0.044662401(26,2,s) + 0.027302329(26,4,c) + 0.1346307(26,4,s) + 0.11256621(26,6,c) + 0.016202643(26,6,s) + 9.0269449e-09(26,7,c) - 0.069246876(26,8,c) + 0.0032189559(26,8,s) - 0.043630398(26,10,c) + 0.15225255(26,10,s) - 0.03752363(26,12,c) - 0.04679948(26,12,s) + 0.026823544(26,14,c) - 0.060029468(26,14,s) + 0.0065055816(26,16,c) + 0.025496031(26,16,s) - 0.062336717(26,18,c) - 0.13997956(26,18,s) + 0.030013125(26,20,c) - 0.059894202(26,20,s) - 0.0056162312(26,22,c) - 0.01009677(26,22,s) - 0.012220943(26,24,c) + 0.059450203(26,24,s) + 0.011043153(26,26,c) - 0.045339866(26,26,s) + 0.071197922(28,0,c) - 0.096297674(28,2,c) + 0.082894113(28,2,s) - 0.079194524(28,4,c) - 0.013951735(28,4,s) - 0.087454652(28,6,c) + 0.090934086(28,6,s) - 0.032602226(28,8,c) + 0.090758214(28,8,s) + 0.090981632(28,10,c) + 0.052548147(28,10,s) + 0.0615542(28,12,c) + 0.052131725(28,12,s) + 0.010867133(28,14,c) + 0.030762029(28,14,s) + 0.019237819(28,16,c) - 0.076251274(28,16,s) - 0.0096941542(28,18,c) - 0.015568389(28,18,s) + 0.035003807(28,20,c) - 0.086866276(28,20,s) + 0.02830121(28,22,c) + 0.056244029(28,22,s) - 0.017383602(28,24,c) + 0.065758475(28,24,s) + 0.00047508251(28,26,c) - 0.0019505451(28,26,s) + 0.0016195006(28,28,c) + 0.045013381(28,28,s) + 1.1995445e-09(29,0,c) - 5.6839587e-10(29,2,c) - 4.7575109e-09(29,5,s) - 4.4387946e-09(29,6,c) + 2.4200163e-09(29,9,s) + 0.070394557(30,0,c) - 0.030788348(30,2,c) + 0.013466887(30,2,s) + 0.04325475(30,4,c) - 0.016821186(30,4,s) + 0.0089502434(30,6,c) - 0.045927396(30,6,s) + 0.077232006(30,8,c) - 0.043392105(30,8,s) + 0.076068997(30,10,c) - 0.035986402(30,10,s) - 0.0098324779(30,12,c) - 0.034318148(30,12,s) - 0.098709036(30,14,c) + 0.0073843186(30,14,s) - 0.076417372(30,16,c) + 0.01538092(30,16,s) + 0.026097433(30,18,c) + 0.067694747(30,18,s) - 0.059937153(30,20,c) - 0.11843277(30,20,s) + 0.059720235(30,22,c) - 0.0036605267(30,22,s) + 0.049496625(30,24,c) + 0.0098567934(30,24,s) - 0.01104352(30,26,c) + 0.045341292(30,26,s) + 0.0016471945(30,28,c) + 0.045782912(30,28,s)  \\ \hline           \end{longtable} }      }           \end{document}      As you can see, I am new to this forum. Please let me know if I need to add anything.


title: Labelling commands for quick use

text: I have a certain command in LaTeX that I have used a lot in my current work:               {\bf y} # this creates a bold letter y      I want to create a shortcut e.g.               \by      that will automatically create a bold letter y. I have similar expressions I would like to simplify as my equations are getting pretty long. Any advice would be appreciated.


title: itemize bullet not appearing in beamer

text: I'm trying to make a `beamer` with TeXMaker and when I want to put `itemize` environment in a frame, the bullet does not appear. I compile with PDFLatex and I look at the PDF. My code is: ![enter image description here](http://i.stack.imgur.com/ncmAv.png)               \documentclass{beamer}          \usepackage{enumitem}          \begin{document}     \begin{frame}         \frametitle{Introduction}              \begin{itemize}             \item BlaBla             \item re BlaBla             \item No bullet !         \end{itemize}              \end{frame}     \end{document}      If you have any idea why there is no bullet!


title: XeLaTeX and Microtype

text: > **Possible Duplicate:**   >  Margin kerning in Xe(La)TeX for TeXlive 2010: how to enable? Is it possible to get `microtype` to work with XeLaTeX? Is there any other alternatives to that kind of tweaking? I really think that documents which have gone through `microtype`tweaking have superior aesthetics. Update: After going here, which seems to have a beta version of `microtype` that works with XeTeX, and unzipping it to `TEXMFLOCAL`:               unzip -d `kpsewhich --var-value TEXMFLOCAL` Microtype.zip      I still get the following error:               /usr/local/texlive/2010/texmf-dist/tex/latex/microtype/microtype.sty          Package microtype Warning: You don't seem to be using pdftex.     (microtype)                `microtype' only works with pdftex.     (microtype)                Try running `pdflatex' instead of `xelatex'.


title: Kile: How to spell check all files in a project? (recursive spell-checker?)

text: When I write a paper using Kile, I typically create a project for the paper, have each section of the paper in a separate file in the project, and use the `\include` command to order them in the document. I usually have automatic spell checking turned off because the wiggly lines annoy me. Instead, I simply manually run the spell checker periodically. However, whenever I do this, I have to open every file I want to spell check and run the spell checker in each one. This can get a bit annoying as I sometimes have dozens of files to spell check. **Is there a way to do either of the following:**   1. Spell check all files in a Kile project   2. "Recursively" spell check files by opening and spell checking files listed in `\include` commands?


title: ! Package inputenc Error: Unicode char \u8:äöü not set up for use with Latex -- is my latex broken

text: When trying to compile the following document with xelatex:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[german]{babel}          \begin{document}          äöüÄÖÜ          \end{document}      I get this error (sorry for the long paste):               This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)      restricted \write18 enabled.     entering extended mode     (./umlauts.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, et     hiopic, farsi, arabic, pinyin, croatian, bulgarian, ukrainian, russian, slovak,      czech, danish, dutch, usenglishmax, ukenglish, finnish, french, basque, ngerma     n, german, swissgerman, ngerman-x-2012-05-30, german-x-2012-05-30, monogreek, g     reek, ibycus, ancientgreek, hungarian, bengali, tamil, hindi, telugu, gujarati,      sanskrit, malayalam, kannada, assamese, marathi, oriya, panjabi, italian, lati     n, latvian, lithuanian, mongolian, mongolianlmc, nynorsk, bokmal, indonesian, e     speranto, coptic, welsh, irish, interlingua, serbian, serbianc, slovenian, friu     lan, romansh, estonian, romanian, armenian, uppersorbian, turkish, afrikaans, i     celandic, kurmanji, polish, portuguese, galician, catalan, spanish, swedish, th     ai, loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def     (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))     (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))     (/var/lib/texmf/tex/generic/babel/babel.sty     (/usr/share/texlive/texmf-dist/tex/generic/babel/germanb.ldf     (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def))) (./umlauts.aux)          ! Package inputenc Error: Unicode char \u8:äöü not set up for use with LaTeX     .          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 äöü               ÄÖÜ     ?           ! Package inputenc Error: Unicode char \u8:ÄÖ not set up for use with LaTeX.          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 äöüÄÖ                   Ü     ?      Runaway argument?     ! Paragraph ended before \UTFviii@two@octets was complete.     <to be read again>                         \par      l.10           ?      (./umlauts.aux) )     No pages of output.     Transcript written on umlauts.log.      But the file is in utf-8 encoded:               $ file -i umlauts.tex     umlauts.tex: text/x-tex; charset=utf-8      I cannot understand what I am doing wrong. Is my latex broken? I am using Texlive from the Ubuntu 12.10 repos.


title: How to compute rotated bounding boxes?

text: **Edit:** As suggested by percusse's answer, I can use `transform shape` option. My first question is now solved. But although the second bounding box is now locally aligned, it is not correct. In fact, `local bounding box` always computes a _globally_ aligned bounding box (green points) and `fit` encloses `north`, `east`,`south`, and `west` anchors of this bounding box. My question is now: how to compute a `local bounding box` **locally** aligned? New example (the blue rectangle on the right does not fit the red path):               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{fit}     \tikzset{       pt/.style={circle,minimum size=3pt,fill=#1,inner sep=0},       red pt/.style={pt=red},       green pt/.style={pt=green},       every picture/.style={line width=1pt,inner sep=0pt},     }     \begin{document}     \begin{tikzpicture}[rotate=20]       \draw[gray,line width=.4pt] (0,0) grid (6.5,2.5);       % first case: fitting some nodes       \node[red pt] (a) at (.5,.5){};       \node[red pt] (b) at (.5,2){};       \node[red pt] (c) at (3,.5){};       \node[red pt] (d) at (2,2.2){};       \begin{scope}[transform shape]         \node[fit=(a)(b)(c)(d),draw=blue]{};       \end{scope}            % second case: fitting arbitrary path       \begin{scope}[local bounding box=bb]         \draw[red] (4,1) to[bend right] (6,1) -- (5,2);       \end{scope}       \node[green pt] at (bb.north west){};       \node[green pt] at (bb.north east){};       \node[green pt] at (bb.south west){};       \node[green pt] at (bb.south east){};       % how to find correct bounding box locally aligned ?       \begin{scope}[transform shape]         \node[fit=(bb),draw=blue]{};       \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/fU6u1.png) **Original question:** I want to compute some bounding boxes. Here is my two cases:   1. to fit some nodes (or coordinates), I can use `fit` library.   2. to fit arbitrary paths, I can use a scope with `local bounding box=bb`. The following code shows this two cases:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{fit}     \tikzset{       red pt/.style={circle,minimum size=3pt,fill=red,inner sep=0},       every picture/.style={line width=1pt,inner sep=0pt},     }     \begin{document}     \begin{tikzpicture}       \draw[gray,line width=.4pt] (0,0) grid (6.5,2.5);       % first case: fitting some nodes       \node[red pt] (a) at (.5,.5){};       \node[red pt] (b) at (.5,2){};       \node[red pt] (c) at (3,.5){};       \node[red pt] (d) at (2,2.2){};       \node[fit=(a)(b)(c)(d),draw=blue]{};            % second case: fitting arbitrary path       \begin{scope}[local bounding box=bb]         \draw[red] (4,1) to[bend right] (6,1) -- (5,2);       \end{scope}       \node[fit=(bb),draw=blue]{};     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/xMDdK.png) Now, I want to make the same things **within a rotated picture**! My two questions:   1. In my first case (some nodes), I have to add `rotate` option to my fitting node (as `rotate` option does not rotate nodes). **How to find automatically the correct value for this option (eg: the angle between current coordinate system and canvas coordinate system)?**   2. In my second case (arbitrary paths), I can compute local bounding box but globally aligned. **How to compute local bounding box locally aligned of an arbitrary path ?** Here is my attempt:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{fit}     \tikzset{       red pt/.style={circle,minimum size=3pt,fill=red,inner sep=0},       every picture/.style={line width=1pt,inner sep=0pt},     }     \begin{document}     \begin{tikzpicture}[rotate=20]       \draw[gray,line width=.4pt] (0,0) grid (6.5,2.5);       % first case: fitting some nodes       \node[red pt] (a) at (.5,.5){};       \node[red pt] (b) at (.5,2){};       \node[red pt] (c) at (3,.5){};       \node[red pt] (d) at (2,2.2){};       % how to find the good value for rotate (here 20)?       \node[rotate=20,fit=(a)(b)(c)(d),draw=blue]{};            % second case: fitting arbitrary path       \begin{scope}[local bounding box=bb]         \draw[red] (4,1) to[bend right] (6,1) -- (5,2);       \end{scope}       % how to find bounding box locally aligned ?       \node[rotate=20,rotate fit=-20,fit=(bb),draw=blue]{};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/76Sy4.png)


title: How to scale a Gantt figure?

text: **Sketch:** I was trying to scale a Gantt chart in order to fit in to a Beamer presentation. Suppose I have some gantt chart bigger than the presentation rectangle:                \begin{figure}        \begin{gantt}{20}{20}          \begin{ganttitle}            \numtitle{2012}{1}{2016}{4}          \end{ganttitle}               %% lots of activities          \ganttbar{1}{0}{3}          ...          ...          \ganttbar{1}{0}{19}          %% lots of activities        \end{gantt}      \end{figure}      **Question:** How can I scale this figure to fix in a beamer frame? **Example:** If I was using some PNG image, surely I will make this:               \begin{figure}       \includegraphic[scale=0.5]{mypngpic.png}     \end{figure}      But in gantt environment there is no _(at least I don't know yet)_ a way to scale.


title: Nomenclature per chapter

text: I would like add a nomenclature at the end of each chapter of my dissertation, including the parameters of that chapter.               \documentclass{report}     \usepackage[intoc]{nomencl}     \makenomenclature          \begin{document}          \chapter{First Chapter}     \section{Introduction 1}     Only $a$ will be discussed in this chapter. So, i do not need $N$ in the nomenclature. Besides I would like to have the nomenclature as a non numbered section (not a chapter).     \nomenclature{$a$}{The number of angels per unit area}%     \printnomenclature          \chapter{Second chapter}     \section{Introduction 2}     Only $N$ will be discussed in this chapter. So, i do not need $a$ in the nomenclature. Besides I would like to have the nomenclature as a non numbered section (not a chapter).     \nomenclature{$N$}{The number of angels per needle point}%     \printnomenclature          \end{document}      Thank you all for your help.


title: Enumeration with xlop

text: I am creating problems for elementary level math, and I wish to enumerate the problems. When I use the _xlop_ package and enumerate, the enumeration occurs at the bottom left of the problem instead of the top left where I want it. For example, when I write:               \item \opadd[resultstyle=\color{white},carrystyle=\color{white}]{563}{278}      the enumeration occurs on the on the bottom left. Any solutions?


title: Natbib package error? Bibliography not compatible with author-year citations

text: I'm trying to write an article for a journal using it's LaTeX class and there seems to be an issue with the bibliography. I'm getting the following error message: > Package natbib Error: Bibliography not compatible with author-year > citations. I think that the LaTeX class loads the `natbib` package by default. I know that `natbib` is a special package for bibliography, but that's all I know about it, and I don't even know how to use it. All I want to do is just be able to compile my LaTeX code without getting any errors. I've been searching for quick solutions on the internet, but I'm being unable to solve the problem. I tried a couple of things such as replacing the new `natbib` style file with an older version (as suggested somewhere on the internet), but nothing seems to work. Also, I'm pretty sure I'm formating the references according to the journal's instructions, so I don't know what the problem might be. If I enter return when the errors occurs, the MikTeX application continues compiling the code and the PDF file is generated without any problems. Anyway, I don't want the `natbib` error to appear because I don't know if the journal will accept the code with this error. Here's some code I'm using:               \begin{thebibliography}{0}     \bibitem{author's last name:year}     author's last name, author's first name initial.     ``Author's article.''      \textit{journal} (year)          \bibitem{author's last name:year}     author's last name, author's first name initial.     \textit{book title}, edition, p. page number.     place of publication: publisher, year.          \end{thebibliography}      Extra information: In the text, I'm able to cite references without any problems by using `\citep`. If I use `\cite`, some text disappears when the code is compiled, and `\citet` won't work.


title: Phantom and Align Environment

text: Is there any way to 'phantom' text within the align environment? I have the following code:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     \phantom     {     a & = b \\     & = c     }     \end{align*}     \end{document}      Apparently, if there a tab alignment character in the argument of the phantom command, compilation will stop. I was trying to make the text within the align environment appear as blank text. Curiously, if I have a cases environment with the tab alignment character inside it, phantom will work when it surrounds the cases environment. Thanks.


title: subimport and verbatim packages

text: The `subimport` in the `import` package does not seem to work with the importing commands in the `verbatim` package such as `VerbatimInput`. Is there a workaround or another package that works better? -js


title: Spacing around brackets in slanted or italics

text: From time to time I use brackets as an equivalent of _respectively_ , like in the following sentence:               A semigroup [monoid, group] $S$ is commutative if, for all $x, y \in S$, $xy = yx$.      Now, I would like to be able to write the same sentence in _italics_ or _slanted_ , while keeping the brackets in roman (or in math mode). I tried something like               \textit{$[$test$]$}      but it does not produce a nice result, because the second bracket is to close from the words in italics. Next I tried               \begin{proposition}           Let $M$ be a semigroup $[$monoid, group$\\,]$...       \end{proposition}      which produces a better result, but is still far from being optimal. So, is there a way to get the appropriate spacing around the brackets?


title: Glossaries acronyms two languages

text: I'm using glossaries package to make my list of acronyms. I'm writing in Spanish but some of my acronyms are in English. I want them to be displayed like: Spanish description - English long (Short) - I was thinking on using the description label in glossaries to include the Spanish description. However I don't know how to modify the \acX macros in order to display the acronym correctly (first time all, next just the short, etc.) Any help or hint is more than welcome. CU Edit: After having Using the glossaries package for English acronyms in German documents I need it to be modified to a format like: OtherLanguage_long (Short, Long) Long (Short) ie. --> Calidad de Servicio (QoS, Quality of Service) Internet Protocol (IP) **Edit 2:** Problem solved... At least I think so. I've created to tokens, one for plural and another for singular.               \documentclass{article}          \usepackage[acronym, toc, shortcuts]{glossaries}     \usepackage{etoolbox}          \newtoks\customtoksingular     \newtoks\customtokplural          \renewcommand*{\newacronymhook}{%      \edef\dosetkeys{\noexpand\setkeys{glossentry}{user1={},\the\glskeylisttok}}%      \dosetkeys      \ifcsempty{@glo@useri}%      {%        %\expandafter\customtoksingular\expandafter{\the\glsshorttok\space(\the\glslongtok)}%        \expandafter\customtoksingular\expandafter{\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}}%      }%      {%        \edef\custom{\csexpandonce{@glo@useri}\space(\the\glsshorttok, \the\glslongtok)}%        \expandafter\customtoksingular\expandafter{\custom}%      }%      \ifcsempty{@glo@userii}%      {%        %\expandafter\customtoksingular\expandafter{\the\glsshorttok\space(\the\glslongtok)}%        \expandafter\customtokplural\expandafter{\noexpand\acrfullformat                {\noexpand\glsentrylongpl{\the\glslabeltok}}%                {\noexpand\glsentryshortpl{\the\glslabeltok}}}      }%      {%        \edef\custom{\csexpandonce{@glo@userii}\space(\the\glsshorttok, \the\glslongtok\noexpand\acrpluralsuffix)}%        \expandafter\customtokplural\expandafter{\custom}%      }%     }          \newcommand*{\custompostdesc}[1]{%       \ifcsempty{glo@#1@useri}{}{ (\glsentryuseri{#1})}%     }          \renewcommand*{\CustomAcronymFields}{%       user1={},%       name={\the\glsshorttok},%       description={\the\glslongtok\noexpand\custompostdesc{\the\glslabeltok}},%       first={\the\customtoksingular},%       firstplural={\the\customtokplural},%       % first={\the\glslongtok\space(\the\customtoksingular)},%       %firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space (the\customtoksingular},%       text={\the\glsshorttok},%       plural={\the\glsshorttok\noexpand\acrpluralsuffix}%     }          \SetCustomStyle          \makeglossaries          \newacronym[user1=interfaz de programaci\'{o}n de la aplicaci\'{o}n, user2=interfaces de programaci\'{o}n de la aplicaci\'{o}n]{api}{API}{Application Programming Interface}     \newacronym{aa}{AA}{Another Acronym}          \begin{document}          First use: Las \acp{api} ....  Subsequent use: \acp{api}          \glsresetall{}          First use: Las \ac{api} ....  Subsequent use: \ac{api}          First use: \gls{aa}. Subsequent use: \gls{aa}.          \printglossary[type=\acronymtype]          \end{document}


title: Xelatex issue when using Xelatex template

text: I'm experiencing a problem when using a cover letter template I downloaded from http://www.latextemplates.com/cat/cover-letters. Here's my preamble:               \documentclass{scrlttr2}          \usepackage{fontspec} % Allows font customization     \usepackage{marvosym} % Allows the use of symbols     \usepackage{xltxtra}     \usepackage[danish, english]{polyglossia}               \setlength\parindent{0pt} % Removes all indentation from paragraphs          \defaultfontfeatures{Mapping=tex-text}     \setmainfont {Adobe Garamond Pro} % Main document font     \setsansfont{Gill Sans MT}     %\setsansfont {Gill Sans} % Used in the from address line above the to address          \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont} % Sets the font size and leading          %----------------------------------------------------------------------------------------     % ÊPERSONAL INFORMATION     %----------------------------------------------------------------------------------------          \setkomavar{fromname}{Joakim Blach Andersen} % Your name     \setkomavar{fromaddress}{Sankt Peders Stræde 14\\City\\Country} % Your address     \setkomavar{fromphone}{(000) 111-1111} % Your phone number     \setkomavar{fromemail}{john@smith.com} % Your email address     \setkomavar{place}{} % City written before the date, put your city here if you want this     \setkomavar{signature}{John Smith} % Your name as you want it to appear in the signature          % These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}     %\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number     %\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website     %\setkomavar{frombank}{Postbank 9307157}          %----------------------------------------------------------------------------------------     % ÊHEADER SECTION     %----------------------------------------------------------------------------------------          \firsthead{     \centering     {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]     \fontsize{21}{21}\selectfont\scshape Programmer at Initech } % Your current job title          %----------------------------------------------------------------------------------------     % ÊFOOTER SECTION     %----------------------------------------------------------------------------------------          \firstfoot{     \centering     \addfontfeature{LetterSpace=20.0}\scshape     {     \renewcommand{\\}{\ {\large\textperiodcentered}\ }     \usekomavar{fromaddress}     }\\     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing     }"               And here's me messages:          "\documentclass{scrlttr2}          \usepackage{fontspec} % Allows font customization     \usepackage{marvosym} % Allows the use of symbols     \usepackage{xltxtra}     \usepackage[danish, english]{polyglossia}               \setlength\parindent{0pt} % Removes all indentation from paragraphs          \defaultfontfeatures{Mapping=tex-text}     \setmainfont {Adobe Garamond Pro} % Main document font     \setsansfont{Gill Sans MT}     %\setsansfont {Gill Sans} % Used in the from address line above the to address          \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont} % Sets the font size and leading          %----------------------------------------------------------------------------------------     % ÊPERSONAL INFORMATION     %----------------------------------------------------------------------------------------          \setkomavar{fromname}{Joakim Blach Andersen} % Your name     \setkomavar{fromaddress}{Sankt Peders Stræde 14\\City\\Country} % Your address     \setkomavar{fromphone}{(000) 111-1111} % Your phone number     \setkomavar{fromemail}{john@smith.com} % Your email address     \setkomavar{place}{} % City written before the date, put your city here if you want this     \setkomavar{signature}{John Smith} % Your name as you want it to appear in the signature          % These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}     %\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number     %\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website     %\setkomavar{frombank}{Postbank 9307157}          %----------------------------------------------------------------------------------------     % ÊHEADER SECTION     %----------------------------------------------------------------------------------------          \firsthead{     \centering     {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]     \fontsize{21}{21}\selectfont\scshape Programmer at Initech } % Your current job title          %----------------------------------------------------------------------------------------     % ÊFOOTER SECTION     %----------------------------------------------------------------------------------------          \firstfoot{     \centering     \addfontfeature{LetterSpace=20.0}\scshape     {     \renewcommand{\\}{\ {\large\textperiodcentered}\ }     \usekomavar{fromaddress}     }\\     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing     }"      I'm fairly new in Latex and Xelatex, so I really hope you guys can point out the issue here. I tried deleting the package "danish" but then it is the same issue with "english". As I understood "polyglossia" is used in stead of "babel" so that's what I did. Hope you guys can figure it out. * * * Here's what I have now.               \documentclass{scrlttr2}          \usepackage{fontspec} % Allows font customization     \usepackage{marvosym} % Allows the use of symbols     \usepackage{xltxtra}     \usepackage{polyglossia}     \setmainlanguage{danish}          \setlength\parindent{0pt} % Removes all indentation from paragraphs          \defaultfontfeatures{Mapping=tex-text}     %\setmainfont {Adobe Garamond Pro} % Main document font     \setmainfont {times} % Main document font          %\setsansfont{Gill Sans MT}     \setsansfont{times}          %\setsansfont {Gill Sans} % Used in the from address line above the to address          \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont} % Sets the font size and leading          %----------------------------------------------------------------------------------------     % ÊPERSONAL INFORMATION     %----------------------------------------------------------------------------------------          \setkomavar{fromname}{Joakim Blach Andersen} % Your name     \setkomavar{fromaddress}{Sankt Peders Stræde 14\\City\\Country} % Your address     \setkomavar{fromphone}{(000) 111-1111} % Your phone number     \setkomavar{fromemail}{john@smith.com} % Your email address     \setkomavar{place}{} % City written before the date, put your city here if you want this     \setkomavar{signature}{John Smith} % Your name as you want it to appear in the signature          % These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}     %\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number     %\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website     %\setkomavar{frombank}{Postbank 9307157}          %----------------------------------------------------------------------------------------     % ÊHEADER SECTION     %----------------------------------------------------------------------------------------          \firsthead{     \centering     {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]     \fontsize{21}{21}\selectfont\scshape Programmer at Initech } % Your current job title          %----------------------------------------------------------------------------------------     % ÊFOOTER SECTION     %----------------------------------------------------------------------------------------          \firstfoot{     \centering     \addfontfeature{LetterSpace=20.0}\scshape     {     \renewcommand{\\}{\ {\large\textperiodcentered}\ }     \usekomavar{fromaddress}     }\\     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing     }          %----------------------------------------------------------------------------------------          \begin{document}          %----------------------------------------------------------------------------------------     % COVER LETTER CONTENTS     %----------------------------------------------------------------------------------------          \begin{letter}{ % Address of the company you are applying to     HR Dept. --- Corporation\\     123 Pleasant Lane\\     12345 City, State     }          \setkomavar{subject}{Cover Letter} % This is the bold text saying 'Cover Letter', remove it if you don't like it          \opening{Dear Recruiter,}          PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening.\\          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications. Try not to repeat the same information the reader will find in the resume. The purpose of this section is to strengthen your resume by providing details which bring your experiences to life.\\          PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter. End the letter by thanking the employer for taking the time to consider your credentials.\\          Sincerely yours, \\ \\ \\     \usekomavar{signature}          %----------------------------------------------------------------------------------------          \end{letter}     \end{document}      And my error:               \documentclass{scrlttr2}          \usepackage{fontspec} % Allows font customization     \usepackage{marvosym} % Allows the use of symbols     \usepackage{xltxtra}     \usepackage{polyglossia}     \setmainlanguage{danish}          \setlength\parindent{0pt} % Removes all indentation from paragraphs          \defaultfontfeatures{Mapping=tex-text}     %\setmainfont {Adobe Garamond Pro} % Main document font     \setmainfont {times} % Main document font          %\setsansfont{Gill Sans MT}     \setsansfont{times}          %\setsansfont {Gill Sans} % Used in the from address line above the to address          \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont} % Sets the font size and leading          %----------------------------------------------------------------------------------------     % ÊPERSONAL INFORMATION     %----------------------------------------------------------------------------------------          \setkomavar{fromname}{Joakim Blach Andersen} % Your name     \setkomavar{fromaddress}{Sankt Peders Stræde 14\\City\\Country} % Your address     \setkomavar{fromphone}{(000) 111-1111} % Your phone number     \setkomavar{fromemail}{john@smith.com} % Your email address     \setkomavar{place}{} % City written before the date, put your city here if you want this     \setkomavar{signature}{John Smith} % Your name as you want it to appear in the signature          % These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}     %\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number     %\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website     %\setkomavar{frombank}{Postbank 9307157}          %----------------------------------------------------------------------------------------     % ÊHEADER SECTION     %----------------------------------------------------------------------------------------          \firsthead{     \centering     {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]     \fontsize{21}{21}\selectfont\scshape Programmer at Initech } % Your current job title          %----------------------------------------------------------------------------------------     % ÊFOOTER SECTION     %----------------------------------------------------------------------------------------          \firstfoot{     \centering     \addfontfeature{LetterSpace=20.0}\scshape     {     \renewcommand{\\}{\ {\large\textperiodcentered}\ }     \usekomavar{fromaddress}     }\\     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing     }          %----------------------------------------------------------------------------------------          \begin{document}          %----------------------------------------------------------------------------------------     % COVER LETTER CONTENTS     %----------------------------------------------------------------------------------------          \begin{letter}{ % Address of the company you are applying to     HR Dept. --- Corporation\\     123 Pleasant Lane\\     12345 City, State     }          \setkomavar{subject}{Cover Letter} % This is the bold text saying 'Cover Letter', remove it if you don't like it          \opening{Dear Recruiter,}          PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening.\\          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications. Try not to repeat the same information the reader will find in the resume. The purpose of this section is to strengthen your resume by providing details which bring your experiences to life.\\          PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter. End the letter by thanking the employer for taking the time to consider your credentials.\\          Sincerely yours, \\ \\ \\     \usekomavar{signature}          %----------------------------------------------------------------------------------------          \end{letter}     \end{document}


title: "Undefined control sequence" errors with moderncv (official template)

text: When simply trying to compile the CTAN _template.tex_ available here http://www.ctan.org/tex-archive/macros/latex/contrib/moderncv/examples I receive the following errors after compiling:                ! Undefined control sequence. \name      ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help.       etc ...      **EDIT** Same problem with `\social`; `\cvcolomn` As you can see on the website, the last update of the templates date back to 2013-04-23 08:14:47 . Since it is barely recent, I doubt that it is because of old content. Please note that I checked that package textlive-latex-extra was updated. I have no idea why I got so much errors using some official templates. Thank you in advance for your help.


title: Change the numbering of equations with floating equation

text: I an trying to change the numbering of the equations in my document. The reason is that I have a 'floating' equation that always needs to be on top of the page, but I want it to be numbered according to how it logically appears in the text. Because it floats, I have to put it earlier on in the text, but that makes that the number is lower than it logically should be. This is what I mean:               \documentclass{article}     \begin{document}          \begin{figure*}[!t]     % This is an equation that floats on top of the page.     % I want it to be numbered '2'.     \begin{equation}\label{eq:Eq2}         4 + 5 = 9.     \end{equation}     \hrulefill     \end{figure*}          \noindent Here comes some text, then the first equation.     \begin{equation}\label{eq:Eq1}         1 + 2 = 3.     \end{equation}     Here comes text that refers to the second equation, which should float on top of this page. The number should still be `2', but it is \ref{eq:Eq2}.     \begin{equation}\label{eq:Eq3}         6 + 7 = 13.     \end{equation}     How do I adjust it such that the following gives ``1, 2, 3''? With {\verb \ref }: \ref{eq:Eq1}, \ref{eq:Eq2}, \ref{eq:Eq3}          \end{document}      This produces the following:![enter image description here](http://i.stack.imgur.com/0VOMH.png) So as mentioned in the text, I would like that the numbering of equations runs (2), (1), (3). Can this be done?