title: Separating a decimal in any format into integer and fractional parts in basic LaTeX

text: **Note** : I've separated this question from what was becoming a very tangled discussion. I know egreg already has a solution, so I'll just wait until he posts it here. **Question** : The solution has to take a decimal number in any form, that is, a dimen/length variable, a plain `\def`, a number string, whatever and use only basic LaTeX to separate out the integer part and only the digits of the fractional part without preceding "." or "0." leaving the user of said solution to then format these results any way they like. The related question using `pgfmath` is here. The `pgfmath` routines chop off the `pt` for you. In that case you only need a macro that either reads `\pgfmathresult` or similar. ![Answer code output](http://i.stack.imgur.com/GvHUk.jpg) My MWE presents a limited solution that I came up with using help from E.Ellett and egreg before they knew just how general I wanted this. It provides two routines that read a length variable, that is, one declared with `\newlength{\thelength}`, but as pointed out by egreg, it still has only limited expanding ability. **MWE Code**               \documentclass[border=5mm]{standalone}          \makeatletter          \def\my@get@length#1{\edef\pure@length{\strip@pt#1}}          \def\printplainbefore#1{\my@get@length#1\expandafter\@printint\pure@length..\@nil}     \def\@printint#1.#2.#3\@nil{#1}     \def\printplainafter#1{\my@get@length#1\expandafter\@printfrac\pure@length..\@nil}     \def\@printfrac#1.#2.#3\@nil{#2}          \makeatother          \newlength{\thislength}     \setlength{\thislength}{123.456pt}     \tracingmacros=1          \begin{document}     The: \the\thislength\quad     Split: \printplainbefore{\thislength} -- \printplainafter{\thislength}     \end{document}


title: Missing paragraphs in glossary

text: After each abbreviation there is a paragraph in my glossary except in one row. (see screenshot). There is no separation between the "W3C" and "WHATWG" abbreviation. ![enter image description here](http://i.stack.imgur.com/oqU9e.png) Does anyone know what I can do? This is my code:               % Glossary package     \usepackage{datatool}     \usepackage[ngerman]{translator}     \usepackage[nopostdot,nonumberlist,acronym,toc,section]{glossaries}          \makeglossaries          % Abbreviations     \newacronym{html}{HTML}{Hypertext Markup Language}     \newacronym{cern}{CERN}{Conseil Européen pour la Recherche Nucléaire}     \newacronym{w3c}{W3C}{World Wide Web Consortium}     \newacronym{sgml}{SGML}{Standard Generalized Markup Language}     \newacronym{xml}{XML}{Extensible Markup Language}     \newacronym{ie9}{IE9}{Internet Explorer 9}     \newacronym{xhtml}{XHTML}{Extensible HyperText Markup Language}     \newacronym{dtd}{DTD}{Dokumenttypdefinition}     \newacronym[longplural=Rich Internet Applications]{ria}{RIA}{Rich Internet Application}     \newacronym{ajax}{AJAX}{Asynchronous JavaScript and XML}     \newacronym{whatwg}{WHATWG}{Web Hypertext Application Technology Working Group}     \newacronym{swf}{SWF}{Small Web Format}          % Output     \cleardoublepage{}          \printglossary[style=altlist,title=Glossar]          \deftranslation[to=German]{Acronyms}{Abkürzungsverzeichnis}     \printglossary[type=\acronymtype,style=long]


title: Options for building multiple documents from the same content with different layouts

text: I need to produce two document layouts using the same content. I'm going to be making heavy use of the `input{}` command to do this, but it is more complex than just this. I'm looking for suggestions how to best build the document. I have 10 instruments, and each instrument has an **intro** , **calibration** , **operation** , **post processing** , and **maintenance** documentation section. So there are 50+ segments to this document. One version needs to be arranged by instrument, like so:   * Doc Intro   * Instrument 1      * Intro     * Calib     * Ops...   * Instrument 2      * Intro     * Calib etc. I need a second version of the document that is arranged by order of operations, so:   * Doc Intro   * Calibration      * In 1     * In 2     * ...     * In 10   * Operations      * In 1     * In 2 etc. As you can see, just writing a shell script to build a wrapper `.tex` document full of `\input{}` isn't enough, as each of the input-ed tex documents needs different headers, both depth and title, for example. What is a `\subsection{Instrument 1}` in one document becomes a `\subsubsection{Calibration}` in another document, although the exact same text is in the paragraphs below that. I could have the shell script decide what is a `subsection` and what is a `subsubsection` too, but now I'm writing more `bash` then `LaTeX`. Is there something for `sections` like the `itemize` environment? For `itemize`, I don't need to tell it how deep it is with `itemitemitemize` similar to `subsubsubsection`, it just handles it automagically. Any other suggestions on how to best write once and compile twice will be much appreciated.


title: Macro for promoting sections to chapters

text: I have a document where I would like to "promote" all sections to chapters, all subsections to sections, etc. That should affect not only the table of contents, but the documents as a whole. For example:               \section{Title A}     \subsection{Title B}     \subsubsection{Title C}      Should actually be treated as if the document was like this:               \chapter{Title A}     \section{Title B}     \subsection{Title C}      I searched in this website how to do it, but most of the answers seem to focus on the table of contents. I tried to do it myself by adding the following to my document:               \renewcommand{\section}[1]{\chapter{#1}}     \renewcommand{\subsection}[1]{\section{#1}}     \renewcommand{\subsubsection}[1]{\subsection{#1}}      However what I get with that is that everything becomes a chapter, as if it is applied recursively. So the result is as if the document was like this:               \chapter{Title A}     \chapter{Title B}     \chapter{Title C}      Does anyone have an idea of how I can get what I need with minimal changes to the original tex files (possibly none, since it is a huge document with many sections)? Thank you!


title: Format Inline source code like Stack Exchange

text: Stack Exchange formats code nicely with backticks using Markdown. Example: `int foo = bar++` I've seen other posts that recommend using listings, specifically `\lstinline` to do inline source code. Using `listings` or any other packages, how could the Stack Exchange code formatting be emulated in LaTeX?


title: Fontspec causes long underscores

text: My collaborator added `\usepackage[no-math]{fontspec}` to a document we're working on. The result is that `\\_` underscores become v. long: cf. pictures below.               \documentclass{article}     \usepackage[no-math]{fontspec}     \pagestyle{empty}          \begin{document}     \textrm{metric\_space}     \end{document}      With fontspec: ![enter image description here](http://i.stack.imgur.com/pFz5g.png) Without fontspec: ![enter image description here](http://i.stack.imgur.com/0tYub.png) The underscores are about twice as long with fontspec, and also much thinner. My question is, how do I get back to the original width? (Ideally I would like to preserve the thinness -- it looks much nicer than the original.) In case someone asks, "why are you using `\\_`?", the short answer is that I need to typeset identifiers involving an underscore. See http://i.stack.imgur.com/XynbT.png for an example in context. I'd be happy with using something other than `\textrm`, if it looks decent in the context of that example.


title: Table works for one page, but not for multiple

text: I have a `longtable`, that is inputted to the main-file using `LTXTable`, but it does not work, when the `longtable` is more than one page long.   The latex-code for the table can be found here: http://latex.lsm- consult.dk/longtable.tex   The main latex-code can be found here http://latex.lsm-consult.dk/timereg.tex   The other latex-files can be found at http://latex.lsm-consult.dk/auto1.tex and http://latex.lsm-consult.dk/payinfo.tex   And the payinfo.tex refered to in the error-output can be replaced by an empty file.   And the errors are               LaTeX Warning: Reference `LastPage' on page 1 undefined on input line 49.          (./includes/latex/payinfo.tex (includes/latex/inv8578445//auto0.tex     ! Extra alignment tab has been changed to \cr.     <template> \endtemplate           l.3 \footnotesize                       NR. \rule{0pt}{15pt}\rule[-10pt]{0pt}{0pt}        & \footnotesize...          ?     ! Emergency stop.     <template> \endtemplate           l.3 \footnotesize                       NR. \rule{0pt}{15pt}\rule[-10pt]{0pt}{0pt}        & \footnotesize...          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on includes/latex/inv8578445//timereg.log.      Can anybody in here give me a clue of what I am doing wrong?   I can of course also put the main file on my page, if you need it


title: "\end\end" causes "TeX capacity exceeded"

text: I know this is invalid LaTeX code, but the code `\end\end` results in the following error:               ! TeX capacity exceeded, sorry [input stack size=5000].     \end #1->\csname end#1                           \endcsname \@checkend {#1}\expandafter \endgroup \if@e...     l.1 \end\end      Why does this result in "TeX capacity exceeded" when this is simply invalid syntax?


title: How can I align numerical and angle values in a table using siunitx?

text: As described in DIN 461, units such as "Degree", "Minute" or "Second" should stay with their numerical value when labeling the tics of a coordinate system. I have no proof, but I think that this rule also makes sense for tables. Normally, I always write the unit apart of the values but for angles, I would like to keep the unit in place. My MWE shoes that case for the unit `\degree`.               \documentclass[]{scrreprt}     \usepackage{xltxtra}     \usepackage[     per-mode=symbol-or-fraction,     locale=DE,     sticky-per     ]{siunitx}           \begin{document}     \begin{table}        \centering     \sisetup{table-number-alignment = center, }             \begin{tabular}{|r|S|S|}             \hline              \textbf{Test:} & {Test1} & {Test2}\\              \hline              \hline              $\alpha_1$&\ang{17.0}&\ang{18.0}\\              \hline             $\alpha_2$&\ang{17.00}&\ang{18.00}\\              \hline             $\alpha_3$&\ang{17} & \ang{18}\\              \hline               $T_{\text{t},0}/\si{\kelvin}$& 293.15 & 393.15\\              \hline             $p_{\text{t},0}/\si{\pascal}$& 80000,00 & 90000,00\\              \hline                           \end{tabular}            \caption{Test table}\label{tab:tt}     \end{table}     \end{document}      For such tables, I can't get the numbers aligned properly. As you can see, the first three rows differ in their decimal alignment and non is equal to the last two rows (which work well). ![Table with ill aligned angle values](http://i.stack.imgur.com/sFLHg.jpg) * * * It should be a second question, but if anybody has an idea on getting the cell width automatically adjusted to big numbers, that would be great, too.


title: global vertical space of items & subitems in beamer

text: > **Possible Duplicate:**   >  length between nested lists > **Possible duplicate:** > > length between nested lists In order to better distinguish groups of notions, I'd like to be able to control the vertical space between items of `itemize` when subitems are also used as follows:               \begin{itemize}     \item level 1 a     \begin{itemize}     \item level 2 a      \item level 2 b      \end{itemize}\vspace*{2mm}     \item level 1 b     \end{itemize}      How to automatically set-up a 2mm vertical space when subitems are used and nothing otherwise?


title: make command undefined

text: > **Possible Duplicate:**   >  How to undo a \def (i.e., Need a \undef capability) In my template I test for chapter defined to prevent that code section only valid for a chapter class are executed. However if I load `titlesec` chapter is always defined regardless of the class in use. So how can I make `\chapter` undefined after the execution of titlesec? So far I tried this which did not work:                \ifcsdef{chapter}{%        \usepackage{titlesec}%        % make chapter undefined again        \let\chapter\relax%      }{        \usepackage{titlesec}%      }


title: undefining custom commands

text: > **Possible Duplicate:**   >  How to undo a \def (i.e., Need a \undef capability) After you define a command using `\newcommand`, is it possible to undefine it? My motivation is that I'm writing a thesis, where each chapter is in a separate source file. Some chapters define their own commands that are used nowhere else, so I'd like them to be visible only within that chapter. I'd therefore like to be able to do something like:               \chapter{Some Chapter}     \newcommand{foo}{...}     ... % chapter body     \forgetcommand{foo}     % end of chapter      Is there anything like the fictitious `\forgetcommand` macro above?


title: Negative phantom

text: I noticed that `\cos` is somewhat larger then `\sin`, and I thought of using something like `\hphantom{\cos}\neghphantom{\sin}` to add the difference after one of my expressions. However it turns out there is no such command. Anyone know of an alternative? Or perhaps a way of defining such a negative phantom myself? *edit *   Additional information   I was trying to add the space difference at the end of the expression, so after the `\alpha`. Something like `\sin \alpha ABC+additional spacing`   Using Hendrik's example I could do something like `\mathop{\rlap{$\sin\alpha ABC$}}\hphantom{$\cos\alpha ABC$}` but then the line ABC needs to be present twice, so I am hoping for an alternative.


title: Passing image path to \includegraphics using a macro

text: I'm trying to use a single environment for a number of different cases. For each case, I need the environment to have a different image associated with it. When I try this, I get               ! LaTeX Error: File `image1.png' not found.      An example illustrates what I'm trying to do:               \documentclass{memoir}          \usepackage{graphicx}          \newcommand{\ImageOne}{image1.png}     \newcommand{\ImageTwo}{image2.png}     \newcommand{\currentimage}{}          \newcommand{\MyFigure}{%     \begin{figure}     \centering     \includegraphics[width=0.5\linewidth]{\currentimage}     \end{figure}}          \begin{document}          \renewcommand{\currentimage}{\ImageOne}     \MyFigure          \renewcommand{\currentimage}{\ImageTwo}     \MyFigure          \end{document}


title: Break Hyper Link not working

text: Below is my code,               \documentclass{article}          \usepackage[breaklinks]{hyperref}     \hypersetup{     pdfpagemode=none,%     colorlinks,%     citecolor=blue,%     filecolor=blue,%     linkcolor=blue,%     urlcolor=blue     }     \begin{document}          This a Sample, This a Sample, This a Sample, This a Sample, This i\href{http://dx.doi.org/10.1007/BF0000000}{\textbf{32}, 396 (1964)}          \end{document}      I am using dvi2ps and ps2pdf to create PDF output, my problem is hyperlink not working when the link text is broken, please guide me, As shown in the below image, first line link doesn't show the link as second line of text ![enter image description here](http://i.stack.imgur.com/zeRps.jpg) Thanks in Advance Thanks for the help Below code is working fine               \documentclass{article}     \usepackage[breaklinks]{hyperref}     \usepackage{breakurl}     \usepackage{url}     \hypersetup{     pdfpagemode=none,%     colorlinks,%     citecolor=blue,%     filecolor=blue,%     linkcolor=blue,%     urlcolor=blue     }          \begin{document}          If you have any questions, at \burlalt{www.goooooggggggle.comssss}{32, 396, (1964)}          If you have any questions, at have any questions, at have have \burlalt{www.goooooggggggle.comssss}{32, 396, (1964)}          \end{document}      But now my minor issue is i can't able to use \textbf{} in \burlalt{www.goooooggggggle.comssss}{\textbf{32}, 396, (1964)} actually i am new to latex, so kindly guide me,


title: How can I align array elements to the left in an equation?

text: I have an equation that goes as follows:               \left\{ {\begin{array}{*{20}{c}}     {u{'_0} = {u_0} + u_1^Tt + {\textstyle{1 \over 2}}{t^T}{U_2}t}\\     {u{'_1} = {u_1} + {U_2}t}\\     {U{'_2} = {U_2}}     \end{array}} \right.      ![enter image description here](http://i.stack.imgur.com/SsrVr.png) I want to have the elements of the array aligned to the left, as it is not very elegant as it is now. Still i dont want the whole equation to be on the left of the page, but on the centre, as usual. How can I achieve this?


title: How to keep fixed height of mdframed in latex?

text: I am designing one page in which i need to write 3 mdframed side by side. but all three must be having same height.                 <mdframed1>   <mdframed2>  <mdframed3>      How can i implement this?


title: emacs+auctex: prevent region filling when inserting itemize

text: When inserting an `itemize` environment around some text (using C-c C-e) AucTeX insists on doing paragraph-filling on said text, which messes up my layout. Is there a simple way to prevent that ? Context is, I'm turning plain-text notes into a latex document. When the plain-text draft contains:               - first item     - second item      I want to select the two lines, type C-c C-e itemize RET, and obtain:               \begin{itemize}     \item - first item     - second item     \end{itemize}      Then it would be easy to add the missing `\item` commands where required. But instead, AucTeX calls `LaTeX-fill-region` on the content of the environment (cf `latex.el` line 686) and I end up with:               \begin{itemize}     \item - first item - second item     \end{itemize}      Obviously this is no big deal for such a short list. But for some longer text it is, because the structure of my list is lost.


title: Drawing a tree with bottom-aligned leaves

text: I'd like to align all leaves of a tree at the bottom, so what I'd like to achieve should look like:                   p        / \       /  /\      c  d  e      What I've tried so far (using tikz-qtree) results in:                   p        / \       c  /\         d  e      I'm currently using tikz-qtree, but if there's an alternative better suited to the task, feel free to suggest one ;) Sidenote: I'm actually not labeling nodes, but edges. Code:               \documentclass[12pt]{article}     \usepackage[active,pdftex,tightpage]{preview}     \usepackage{tikz-qtree}     \PreviewEnvironment[]{tikzpicture}     \begin{document}     \begin{tikzpicture}[every tree node/.style={draw,circle},sibling distance=10pt,     edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}]     \tikzstyle{every node}=[font=\tiny, sloped,anchor=south,auto=false,inner sep=1pt]     \Tree     [.{}         \edge node[]{C};         [.{}         ]         \edge node[]{A};         [.{}             \edge node[]{D};             [.{}             ]             \edge node[]{E};             [.{}             ]         ]     ]     \end{tikzpicture}     \end{document}


title: How to manipulate a multi-line string in luatex?

text: I want to write a Lua function that processes some multi-line string. Thus, I created a new file `test.lua` which contains               userdata = userdata or {}     function userdata.surroundwithdashes(str)       str = str:gsub("\n", " (linebreak)\\\\ ")       tex.print("--" .. str .. "--")     end      and added `\directlua{dofile('test.lua')}` to my latex preamble. To call that function, I created a macro `\newcommand{\dash}[1]{\directlua{userdata.surroundwithdashes([[#1]])}}`. This works well for regular text like               \dash{This is some test text}      However, It does not recognize line breaks               \dash{This is some test text           with more than one line}      And throws errors (undefined control sequence) if I insert them manually               \dash{This is some test text \\           with more than one line}      Also, this produces an additional "m" after the "TeX" for               \dash{This is some \TeX text}      How can I parse the input string reliably and detect newlines in it?


title: Caption in the outer margin using longtable within a tufte-latex document

text: The `tufte-latex` class has a page layout with a wide margin on the side; the class redefines the figure and table environments so that the captions are put in the margin, side to side with the floating environment. Here's an excerpt from the `sample-book.pdf` file:![Example of table and its caption in the tufte-latex class](http://i.stack.imgur.com/dzwoo.png) However, there's a problem when using the longtable environment. Since it cannot be put inside a table environment, it loses the caption in the margin. Longtable in fact has a `\caption{}` command, but it allows the caption to be placed only on top on the table, not on the side (that is, in the margin): ![Longtable environment with wrong caption placement](http://i.stack.imgur.com/paLPN.png) How can I have a longtable with the caption in the margin? `tufte-latex` places the caption in the margin, aligned with the top of the floating environment, and it can be serif (default) or sans-serif (`\sffamily`). I'm aware of this answer, but it does not solve the problem completely, as the longtable caption does not inherit the format of the other captions. A MWE as requested (`longtable` with the wrong caption):               \documentclass{tufte-book}          \usepackage{booktabs}     \usepackage{longtable}          \begin{document}          \begin{table}[h]       \centering         \begin{tabular}{lcr}           \toprule           Heading & Style & Size \\           \midrule           Part & roman & {40} \\           Chapter & italic & {40} \\           Section & italic & {26} \\           Subsection & italic & {26} \\           Paragraph & italic & 10/14 \\           \bottomrule         \end{tabular}       \caption{Heading styles used in.}     \end{table}          \begin{longtable}{lcccc}     \caption{Verification methods.}\\     \toprule     Requirement id & Review of design & Analysis & Inspection & Test \\     \toprule     \endfirsthead     \toprule     Requirement id & Review of design & Analysis & Inspection & Test \\     %\otoprule     \endhead     \bottomrule     \endfoot     One & * & & & \\     \midrule     Two & * & & & \\     \midrule     Three & * & & & \\     \midrule     Four & * & & & \\     \end{longtable}          \end{document}


title: Chemnum: Chapter-related numbering?

text: First of all, I just started with LaTeX. So far, I got everything working, including `chemnum`. However, I want to split my thesis into chapters. Numbering of the compounds is supposed to be 1.1, 1.2, 1.3 etc. Next chapter, it starts with 2.1, 2.2, 2.3. Is there a way to do this with `chemnum`? Could not find anything.


title: using \cancel within a mhchem command italicizes text (how to prevent?)

text: The text being cancelled is italicized when the following code is printed. How do I prevent this? Here is a minimum working example:               \documentclass[11pt, oneside]{article}            \usepackage[version=3]{mhchem} % insert chem equations     \usepackage{cancel} %strike out text          \begin{document}     \begin{align*}     \cee{     \cancel{Mg_{(s)}} + 1/2O_{(g)} + &-> MgO_{(s)} \\     MgO_{(s)} + 2HCl_{(aq)} &-> MgCl2_{(aq)} + H2O_{(l)} \\     }     \end{align*}     \end{document}        Any help is appreciated.


title: LaTeX beamer hide text in footline

text: is there any possibility to modify a footline in \documentclass{beamer} on a **specific** frame so that the color(s) is (are) still there, but not the text inside? All other frames should contain text in footline!               \documentclass{beamer}      \usepackage[utf8]{inputenc}      \usepackage[ngerman]{babel}      \usepackage[T1]{fontenc}      \usepackage{lmodern}      \usepackage{graphicx}      \usepackage[version=3]{mhchem}      \usepackage{chemfig}      \usepackage{amsmath}      \usepackage{amstext}      \usepackage{amssymb}      \usepackage{chemmacros}      \usepackage{hyperref}      \usepackage{array}      \usepackage[absolute,overlay]{textpos}                \useinnertheme{default}           \useoutertheme{infolines}      \useoutertheme[right]{sidebar}           \usecolortheme[RGB={200,70,5}]{structure}      \usecolortheme{sidebartab}           \usecolortheme{spruce}                \usecolortheme{dolphin}           \setbeamercolor{background canvas}{bg=gray!5}      \setbeamercolor{alerted text}{fg=red}                \beamertemplatenavigationsymbolsempty                \title{Title yeah}      \subtitle{Le Subtitle}      \author{Autor}      \date{\today}                \begin{document}           \setbeamertemplate{sidebar right}{}           \begin{frame}      \titlepage      \end{frame}               \begin{frame}      \frametitle{Parts}      \tableofcontents      \end{frame}           \end{document}      Thanks!


title: BibTeX error in TexMaker {I couldn't open file name `test_bb.aux'}

text: I am using Mikitex + Texmaker for writing a IEEETrans paper and i am a novice in all this. I have a test file which I am using for understanding how to insert bibliography. Thus, I have two files namely test_bb.tex and bb.bib. I have made all the settings as mentioned in this link on the same forum Configuring TexMaker and BibTex Here is the code snippet of settings after using wizard               pdflatex -synctex=1 -interaction=nonstopmode %.tex|bibtex %|pdflatex -synctex=1 - interaction=nonstopmode %.tex|pdflatex -synctex=1 -interaction=nonstopmode %.tex      so when I compile the test_bb file manually one by one (PDFLaTeX -> BibTex -> PDFLaTeX -> PDFLaTeX) or by quick build (as set in wizard of Texmaker) I get following stupid error while doing BibTex. Both bib and tex files are at the same location. I can't see the references and citation at all. even I have tried it after deleting log and aux files in build folder but no success. This is the error               Process started          I couldn't open file name `test_bb.aux'          Process exited normally      The code snippet is as under for both files tex file               \documentclass[conference]{IEEEtran}     \usepackage{cite}     \begin{document}     \title{Sample IEEE paper style using Latex}     \author{\IEEEauthorblockN{Author first, Author Second, and Author Third}     \IEEEauthorblockA{Department \\      University\\      City - State - Zip \\      Email: xxxx@xx.com}      }      \maketitle      \begin{abstract}        This is an abstract.      \end{abstract}      \section{Introduction}      \label{sec:intro}        Here is a modified text sample for intro section using latex. This is a citation   \cite{author1} This is how you refer a section in another section Section~\ref{sec:meth}     .....        \section{Methodologies}        \label{sec:meth}        This is the other section that you can use.       \bibliographystyle{IEEEtran}       \bibliography{bb}       \end{document}      and bib file is as under:               @ARTICLE{author1,      author = {John Frederik Camelot Smith and Jason Bourne},      title = {{The Pain of Having a Foolish Name}},      journal = {Journal of Modern Fiction},      year = {2009},      volume = {52},      pages = {114},      number = {1},      issn = {0010-4620},      publisher = {Grendel Publishing}     }      Please help...


title: Run Bibtex on aux files in subfolders, multiple OS

text: I have a complete framework for my PhD thesis based on classicthesis/arsclassica. Single chapters are located in Subfolders like this.   * main.tex   * Chapters/project1/project1.tex   * Chapters/project2/project2.tex   * ... I am using `chapterbib` to have a references section after each chapter. The chapter files are included in the main document via `\include`, so that I get separate `.aux` files in each subfolder. I need to run bibtex on the `.aux` files in the subfolders so that the `.bbl` files necessary for the chapter references are created. All my machines both at work and at home are running Linux, I am using Vim as an editor and have written a simple shell script to do this.               #!/bin/bash     pdflatex main.tex     for auxfile in $(find * -name "*.aux"); do bibtex $auxfile; done     pdflatex main.tex     pdflatex main.tex      Now, I have given the template to a friend, she is using both Windows and OS X. Her editor is Texmaker. The given compile profiles all do not work for this, since they do not run `bibtex` on the other files. Manually opening the subchapters and executing `bibtex` works on my machine, oddly enough even this was not really working for her either, but I need to check it again. Anyways, an automatic routine would be preferred. If I add something like this               for auxfile in $(find * -name "*.aux"); do bibtex $auxfile; done       as a user specified command in Texmaker on the Mac, I am getting the Message `"Error: Could not start the command"`, even though it works when I execute it from the command line. So, I am looking for a solution (or two) to add a profile that does the usual compilation routine plus also runs bibtex on the .aux files of the \included chapters. Needs to work in OS X and in Windows, so probably the solutions are going to be distinct. If necessary, I can upload a minimal working example which I have prepared.


title: hyperref bad references

text: After cleaning up my project and compiling a tex file 10 times in a row:               rm temp.toc temp.pdf temp.out temp.html temp.aux     xelatex temp.tex # executed 10 times!      I still get bad references with hyperref. In the table of contents, I see the hyperlinks. The page number in the TOC is good. But the reference points to a different page. I cannot provide a minimal working example, because the problem only occurs with long documents. (There is no point in making a table of contents for a two page article at all.) Upon request, I can upload the whole document, but that might not be necessary. UPDATE: The problem is still there. I have uploaded the complete example here: https://rapidshare.com/files/1197222879/output.zip - contains all tex files, aux files and the generated final pdf file. Engine is xelatex. I have executed the compilation 10 times but the hyperrefs are still wrong. In the table of contents, when you click on a link that says "page 25" then you are directed to page 23. In other words, the page numbers in the TOC are correct, but the hyperref references are incorrect. UPDATE: This is a bug. If I use `\usepackage[hungarian]{babel}` and `\usepackage{hyperref}` together, them the references are wrong. If I remove hungarian babel, then references become good (but then hypenation is wrong, and paragraphs look awful)


title: How do I stop certain words turning into Russian

text: I am using the `[utf8]{inputenc}` and `[russian]{babel}` and this allows me to input certain Cyrillic characters easily, but it is also turning certain titles where I have used commands like `\tableofcontents`, `\abstract` and `\date{\today}` into Cyrillic form too. I can, for instance, change the `\today` command to read `\date{01/11/2012}`, which does fix the problem, but it still stops me from using certain useful commands, like the ones mentioned above. I have set out in a table two alphabets: the Latin version, with the corresponding Cyrillic equivalents. E.g. (Latin on the left, Cyrillic on the right) A a - A a B b - Б б C c - Ц ц ... Z z - З з


title: Latex stopped creating a bibliography after updating the system

text: I use vim with with vim-latexsuite and TexLive. I use the .sty and .cls files, respectively the whole package date 2012-05-10 from the university of Hagenberg Link to zip package. Till yesterday everything works like a charm which means that the document including the bibliography was build as intended. Today I updated my notebook to vim 7.3, vim-latexsuite 20121118-1 and texlive 2012.28273-1. I tried to compile my main file but the document doesn't either show a bibliography nor references in the text. I have no idea why the bibliography cannot be resolved. I devided the information I have into two sections. In section 1 I try to show the relevant parts of my main, [sty] and cls document. In section 2 I try to show the relevant parts of the log files. // Section 1 / main-file               \documentclass[bachelor,german]{hgbthesis}     \AddBibFile{literatur.bib}  % Angabe der BibTeX-Datei; is a wrapper for \addbibresource defined in .cls          \begin{document}          \include{cha1}     \include{cha2}          \MakeBibliography{Quellenverzeichnis}  %defined in .cls          \end{document}      / .cls-file (hgbthesis.cls) - extract               \usepackage{csquotes}   % recommended for biblatex     \usepackage[style=numeric-comp]{biblatex}[2011/05/12]     \ExecuteBibliographyOptions{sortcites=true,defernumbers=true,isbn=false,doi=false}     \newcommand{\MakeBibliography}[2][]{     % opt. arg (#1): optional argument "nosplit" to get a 1-piece bibliography     % req. arg (#2): main title of bibliography     \clearpage     \ifthenelse{\equal{#1}{nosplit}}%         {% create a single bibliography with all entries:             \printbibheading[heading=bibintoc,title={#2}]             \begin{bibhyphenation}               \printbibliography[heading=noheader]             \end{bibhyphenation}         }         {% split the bibliography using the predefined categories:             \printbibheading[heading=bibintoc,title={#2}]             \begin{bibhyphenation}             \printbibliography[filter=literature,heading=subbibintoc,title={\@bibtitleLiteratur}]             \printbibliography[filter=avmedia,heading=subbibintoc,title={\@bibtitleAvmedia}]             \printbibliography[filter=online,heading=subbibintoc,title={\@bibtitleOnline}]             \end{bibhyphenation}         }%      // Section 2 I did a backup of the whole directory thus I compared the aux file and had a look in to the .log and .blg file. // .aux files / old - correct .aux file               \@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}     {\select@language{ngerman}}     \@input{cha1einleitung.aux}     \@input{cha1performanceMgt.aux}     \citation{MarStraPerfMgt}     \citation{MarStraPerfMgt}     \citation{ReiMktPerfMgt}     \citation{SchEntImpPerfMgt}     [...]     \abx@aux@number{140}{SchStratProjMgt}{0}{1}     \abx@aux@number{141}{ArmPerfMgt}{0}{2}     \abx@aux@number{142}{BarBSC}{0}{3}      / new .aux file               \@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}        {\select@language{ngerman}}     \@input{cha1einleitung.aux}     \HyPL@Entry{4<</S/D>>}     \abx@aux@cite{DilUntFuehrung}     \@input{cha1performanceMgt.aux}     \abx@aux@cite{MarStraPerfMgt}     \abx@aux@cite{ReiMktPerfMgt}     [...]      // new .log file shows the following message               LaTeX Warning: Citation 'MarStraPerfMgt' on page 4 undefined on input line 29.      // new .blg file shows this message               I found no \citation commands---while reading file cb_MainFile.aux     I found no \bibdata command---while reading file cb_MainFile.aux     I found no \bibstyle command---while reading file cb_MainFile.aux      Citations in my document look like this:               \autocite[some text]{book1}


title: Good tools for LaTeX maintenance tasks?

text: I have a big bunch of old to new LaTeX documents written by several independent people. I have to bring them up to date, modern and consistent, standardized LaTeX code. In these documents there are a lot of common "mistakes" or quirks. For example:               \begin{equation}       a = b     \nonumber     \end{equation}      instead of just               \[       a = b     \]      and similar cases (`eqnarray` instead of `align` and so on). Or completly random code linebreaks in text ( _no_ output changing breaks, like paragraphs) that could be joined. What tools are recommended to automate such kind of tasks? Mainly to change code snippets to other code snippets without changing the raw content of the snippet. A find-and-replace that takes care of LaTeX syntax/semantic, so to speak. Are there such tools? I'm working on Windows.


title: Capitalising the first letter of an acronym?

text: I'm using the `acronym` package in my document and in several instances I want to start a sentence with the expanded acronym. Is there any way of telling the package to capitalise the first letter? For example:               \acrodef{TLA}{three-letter acronym}     \acrodefplural{TLA}{three-letter acronyms}     ...end of one sentence. \aclp{TLA} are acronyms with three letters...      This will yield: > ...end of one sentence. three-letter acronyms are acronyms with three > letters...


title: Instant Preview on Lyx for package symbols?

text: I'm using LyX, and i've noticed that when I'm using the symbols from `stmaryrd` (`\llbracket` and `\rrbracket`), eventhough they appear on Preview (Ctrl+R), they do not appear on the editor. Is there a way to make LyX render them on the editor just like every other symbol (`\vee`,`\wedge`,`\top`,`\bottom`, etc)?


title: How do I prevent TeX from hyphenating acronyms?

text: Upper-case words look awkward when hyphenated. How do I suppress this behavior?


title: LyX: Export Warning! about BibTeX

text: I'm trying to export a LyX file to LaTeX format and getting the following warning. > LyX: Export Warning! There are spaces in the paths of your BibTeX databases. > BibTeX will be unable to find them. Any suggestion to handle this warning. Thanks


title: Issues with Kile live preview while running on windows

text: I recently downloaded Kile 2.1 via the KDEwin installer. The editor runs flawlessly, except for the live preview. In the log and messages I get an error message saying: > [Kile] Unknown tool LivePreviewPDFLaTeX. I get this several times in a row, so I suppose Kile tries to run the live preview each time but does not find the tool. I did a system check on Kile (`Settings` -> `System Check...`) and no critical failures were found, Okular is installed and working. Anybody knows of this issue and has a possible solution?


title: How do I prevent "Contents" from appearing twice in the header when I use \leftmark and \rightmark with fancyhdr?

text: I would like to use `\leftmark` and `\rightmark`, but have "Contents" appear only once (on the left) in the header. Instead, it appears as both the `\leftmark` and the `\rightmark`. The following MWE illustrates the problem:               \documentclass[12pt]{article}     \usepackage{fancyhdr}     \pagestyle{fancy}          \lhead{\leftmark}     \rhead{\rightmark}          \begin{document}     \tableofcontents     \end{document}


title: How to type \sim above another symbol x?

text: I want to put a "~" above x, just like `\hat x` but replacing `\hat` with `\sim`. How to do that?


title: How to cite full title in footnote with alphabetic citation style

text: I'm writing my thesis and I'm struggling with the correct choice of citation style. I'm leaning towards alphabetic style, since I find that it's easy to read and makes it easy to recall what reference the citation refers to if it's a repeat, without checking the footnote (which, I think, is quite a distraction), or even worse the end of the paper (which is not so bad when reading a PDF where you can just click a hyperlink and then use a backref to go back, but it's a lot more of hassle when reading a printed document). However, I would like it to be possible to add a footnote with a more verbose reference. So that when I have, say,               \autocite{AB12}      the output is [AB12] where cited, and in addition, something like > [AB12] Abelard and Baginsky, _Bogus paper_ (2012) appears in footnote. How can I accomplish that?


title: Why does \dimexpr swallow \relax?

text: Following the comments at Doing maths with distance values in LaTeX source code: > +1 for teaching me that `\dimexpr` can optionally swallow a `\relax`. > Yesterday I tried to use `\relax` as a delimiter for `\numexpr`, and I just > couldn't understand why the `\relax` is gone although it's not expandable. – > Hendrik Vogt Feb 18 at 9:32 > > @Hendrik: Yeah, I think you need two `\relax` then. I find the `\relax` > swallowing extremely useful. Its friends like `\numexpr` do the same. – > Martin Scharrer♦ Feb 18 at 9:36 and with this issue being touched on again by the answers of Joseph and Martin at Which is better: a dimension or a macro?, I ask myself why does Etex do things this way? I find it unintuitive and I don't see how it can be useful to avoid carrying out a no-operation command.


title: Typesetting the Identity Operator for txfonts

text: I use the `txfonts` package in my document for fonts. However, I am at a loss as to how to produce the identity operator, which looks like a blackboard bold 1. Now,               \documentclass{article}          \usepackage{bbold}          \begin{document}      \[     \mathbb{1}     \]     \end{document}      produces basically what I am looking for. However, this also replaces all of the other `\mathbb` characters with those from the bbold package. Is there a better way to obtain the identity operator symbol?


title: answers using exercise.sty, beginning each chapter on new page

text: I have a multi-chapter tex document containing lecture notes, problem sets, and solution keys. I'm using `exercise.sty` to deliver the exercises and their solutions. Everything works great with the counters. No problems there. However, when the document prints the answers, the list of answers continues without any page breaks. This is tough because I have a dozen chapters each with about a dozen exercises. I would like to add a `\clearpage` at the chapter breaks in the answer key. For example, right now the answers to Chapter 2 exercises immediately follow the answers to Chapter 1 exercises. I would like the Chapter 2 exercises to begin on a fresh page. The problem is confusing because it's not directly an issue with `exercise.sty` but rather it is an issue due to using several chapters. If this were a programming environment I understood better, I would do something like: `answers_i = \shipoutAnswer;` after each chapter indexed by 'i', then suppress the output until the end of the document. In principle I could add a loop printing the `\clearpage` and then the solutions to each chapter `i`. The problem is that I don't know how to store variables in latex. It seems as though I'm allowed to only execute `\shipoutAnswer` once, at the very end of the document. By then it's too late; there doesn't seem to be a way to add the `\clearpage` by that point. Thank you for any advice. Much appreciated. [EDIT: below I (try my best to) insert a minimum working example]               \documentclass[12pt,twoside,letterpaper,onecolumn,titlepage,openright]{report}     \usepackage[answerdelayed]{exercise}          % for making pretty exercises     \setlength{\ExerciseSkipBefore}{1em}     \setlength{\ExerciseSkipAfter}{1em}     \renewcommand{\ExerciseHeader}{\textbf{\textsf{\normalsize  \ExerciseName \space \thechapter.\ExerciseHeaderNB \quad}}}     \renewcommand{\AnswerHeader}{\textbf{\textsf{\normalsize  \ExerciseName \space \thechapter.\ExerciseHeaderNB \quad}}}               \begin{document}     %% Chapter 1: time in QM     \setcounter{Exercise}{0}     \setcounter{Answer}{0}     \chapter{Time in quantum mechanics}     \label{chap:time}     Most chemistry undergraduate students are familiar with quantum mechanics in the context of simple systems like particle-in-a-box, harmonic oscillator, and the hydrogen atom.  While those systems are important, \emph{time} is not included in typical undergraduate physical chemistry courses. This is unfortunate because quantum mechanics comes to life when time is introduced.          \begin{Exercise}[label={ex:wavefunctions}] \textsf{     A very important exercise about wavefunctions.}     \end{Exercise}          \begin{Answer}[ref={ex:wavefunctions}] \textsf{     The solution to that important exercise about wavefunctions.     }     \end{Answer}           \begin{Exercise}[label={ex:wavefunctions2}] \textsf{     Another very important exercise about wavefunctions.}     \end{Exercise}          \begin{Answer}[ref={ex:wavefunctions2}] \textsf{     The solution to that other important exercise about wavefunctions.     }     \end{Answer}          %% Chapter 2: Hilbert space, matrix mechanics     \setcounter{Exercise}{0}     \setcounter{Answer}{0}     \chapter{Quantum, sure. But why \emph{mechanics}?}     \label{chap:matrix_mechanics}     In sports, a novice needs to learn certain skills and rules---the mechanics of the game---before playing with any proficiency.  Shakespeare needed to learn spelling and grammar---the mechanics of writing---before he penned his timeless works. In a similar vein, the novice spectroscopist must also hone certain skills before performing research.          \begin{Exercise}[label={ex:matrices}] \textsf{     A very important exercise about matrix mechanics.}     \end{Exercise}          \begin{Answer}[ref={ex:matrices}] \textsf{     The solution to that important exercise about matrix mechanics. I want to start the solutions to Chapter 2 exercises on a new page.     }     \end{Answer}          \begin{Exercise}[label={ex:matrices2}] \textsf{     Another very important exercise about matrix mechanics.}     \end{Exercise}          \begin{Answer}[ref={ex:matrices2}] \textsf{     The solution to that other important exercise about matrix mechanics.     }     \end{Answer}               %% Chapter 3: Solutions to exercises     \chapter{Solutions}     \label{chap:solutions}     \shipoutAnswer          \end{document}


title: Babel keeps complaining: "british not defined, using English instead."

text: after having found nothing on google or here I have now resorted to my last hope: Asking myself. Whenever I run a latex file (using pdflatex from MikTeX under Windows 7 x64) with `\usepackage[british]{babel}` I keep getting warnings from babel:               british not defined, using English instead.      This even happens in an absolute minimal file:               \documentclass{scrreprt}          \usepackage[british]{babel}          \usepackage{blindtext}          \begin{document}          \title{Testtext}     \author{Me}          \maketitle          \tableofcontents          \chapter{foo}          \blindtext          \chapter{bar}          \blindtext          \end{document}      I don't understand it. Can anyone give me some insight on this?


title: Capitalizing "forthcoming" in bibliography but not in citation

text: I'm citing a couple of forthcoming articles without a known publication date, so I want to have "forthcoming" instead of the year in both in-text citations and the bibliography. However, I want to have the word capitalized in the bibliography, but not in the citations. I've included a mwe below. What I want is for the in-text citation to read "Author (forthcoming)", but for the bibliography entry to read "Author, A. (Forthcoming). _Beta_ "               \documentclass{article}          \usepackage[         backend=biber,         style=authoryear-comp,     ]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}         @misc{A01,             author = {Author, A.},             year = {2001},             title = {Alpha},         }              @misc{A02,             author = {Author, A.},             year = {forthcoming},             title = {Beta},         }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \textcite{A01}. \textcite{A02}          \printbibliography          \end{document}


title: Wrapping text in Sidewaystables

text: I'm trying to make a rotated table using the `sidewaystable` package, and I cannot get the text to wrap. It compiles, but it I haven't been able to wrap the text within the columns or define the width of the columns. The code is rather messy but here is an extract:               \begin{sidewaystable}[htbp]         \centering         \caption{bla bla bla}          \begin{threeparttable}[b]           \begin{tabular}{rrr}           \toprule                 Awesome intro\\           \midrule           \multicolumn{1}{l}{bla bla} & \multicolumn{1}{l}{more bla} & \multicolumn{1}{l}{final bla} \\       \bottomrule           \end{tabular}%           \begin{tablenotes}\footnotesize               \item Source: bla bla                \end{tablenotes}           \end{threeparttable}         \label{tab:xx}%       \end{sidewaystable}%        Edit:   * It is also going on a seperate page in the appendix, if that makes a difference..   * I am using the `threeparttable` to be add "footnotes" to the tables.


title: moderncv: pagebreak in cvitem

text: I am using moderncv and would like to implement pagebreaks in \cvitem. This post (Page breaks within moderncv) is similar, but the cvitem environment appears to be more tricky than the cventry one, which was discussed there. As in the other link I would like to add a long list:               \cvitem{here is a longer caption that does not fit into one tab}{         \begin{itemize}             \item Item 1;             % Lots of items here             \item Item n.         \end{itemize}     }      Because of the title being long, it is not an option to do this:               \cvitem{caption}{item1}     \cvitem{}{item2}     \cvitem{}{item3}      I tried to manually define a \cvitemlong environment (by defining longtables) that would allow for pagebreaks, but didn't find a working solution. Does anyone have an idea how to solve this in an easy way? Cheers, Mil


title: How to convert LaTeX to RTF when using sffms extension?

text: I'm just starting out using LaTeX. I've successfully installed MiKTeX and the sffms package for formatting fiction. This is all working OK (converting to PDF). I need to convert my tex files to RTF as well. I've tried latex2rtf, but it doesn't understand the custom tags defined in the sffms package. Pandoc ignores all the author/word count/header definitions in the tex file, resulting in a document with only the (unformatted) content. How can I get latex2rtf, Pandoc or some other to-RTF tool to understand the tex file? (If any editors feel so inclined: I was going to tag this with `sffms` and `latex2rtf` as well, but don't have the rep...)


title: Nested itemize with large lines in ConTeXt

text: When I try to nest lists like this:               \starttext     \startitemize[n]       \item bla       \item \startitemize[a]         \item bla $\displaystyle\int$         \item bla       \stopitemize     \stopitemize     \stoptext      I get this result, where the _2_ and the _a_ are not aligned: ![Misaligned items](http://i.stack.imgur.com/1VGFZ.png) This problem is caused by the large line `$\displaystyle\int$`. I can somewhat work around this using some `\vskip` manually, but this is far from ideal. The equivalent code in LaTeX works well. I use ConText MkIV (2013.05.28) from the standalone installation.


title: Strange color in PSTricks

text: I draw a figure in `pstricks`, the code is here:               \documentclass{minimal}          \usepackage[dvipsnames]{pstricks}     \definecolor{bg}{cmyk}{0,0,0.1,0}          \begin{document}          \begin{pspicture}[linewidth=1.5pt](-2,-1.5)(10,4)          \psclip{\psellipse(2.2,1)(2,1.5)}       \psellipse[fillcolor=blue!20,fillstyle=solid](4.3,1)(2,1.5)     \endpsclip     \psellipse[linecolor=Green](4.3,1)(2,1.5)     \psellipse[linecolor=yellow](2.2,1)(2,1.5)          \psframe[linecolor=blue](-1.5,-1.5)(8,4)     \psframe[linecolor=Maroon,fillstyle=solid](2.8,0.3)(3.8,1.2)               \end{pspicture}          \end{document}      But the yellow ellipse is with not pure yellow, but with some black inside. I tried to change to other color, but it is always there. Why is it like this? ![enter image description here](http://i.stack.imgur.com/QxLj4.png)


title: Titlesec numberless section numbering

text: I've run into a problem where with using `titlesec` where my numberless sections are numbered. I took a look at a few other questions here, and the `titlesec` package help, where I saw the numberless option. However, with the suggestion that I noticed elsewhere here, i.e., to use `\sectioning` as the label it still produces a (wrong) number before the section name. Can anyone give me a pointer here? The present lines in my code read as:               \documentclass[12pt]{article}          \usepackage[a4paper,headheight=72pt,bottom=3cm]{geometry}     \usepackage[onehalfspacing]{setspace}          \usepackage[T1]{fontenc}     \usepackage{charter}     \usepackage[expert]{mathdesign}          \usepackage{amssymb,amsmath,array,floatflt,graphicx,marvosym,multirow,subcaption,siunitx,tabu,titlesec,tocbibind,tocloft}     \usepackage[font=small,hypcap]{caption}     \usepackage[authoryear,round,sort,nonamebreak]{natbib}     \usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}     \usepackage{fancyhdr}          \pagestyle{fancy}          % keep this as last usepackage%     \usepackage[plainpages=false,pagebackref=true,colorlinks=true,linkcolor=blue,breaklinks]{hyperref}               \titleformat{\section}[hang]{\usefont{T1}{qhv}{b}{n}\selectfont}{}{0em}{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}          \titleformat{name=\section,numberless}[hang]{\usefont{T1}{qhv}{b}{n}\selectfont}{}{0em}{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}      And the endresult here is that all sections manage to change their font, size, and spacing, but that the ones that go by `\section*{}` are erroneously numbered. I have my suspicion that I could do something by the optional `titlesec` commands, but I a not entirely confident in how they work. Cheers


title: Is it possible to get the location of individual components of a LaTeX image?

text: I'm writing an android app and I want to render math expressions in LaTeX then react to touches to individual parts of the rendered expression. I'm planning on using a library like jlatexmath. I know almost nothing about LaTeX, but as far as I can tell, it renders to a single image. Is there any way for me to figure out which parts of the image belong to which symbols? (for example, knowing that the left 17% is an integral sign)


title: change the font size of \part (depth -1) to LARGE or Large in tocstyle

text: I am using `tocstyle` package to format my TOC. It works nicely. However, I just want to increase a little bit the title of the `\part` in the TOC. It seems that `tocstyle` uses `\large` font as default for the `\part`. Is there anyway to increase the size of `\part` title to `\Large` or `\LARGE` in `tocstyle`? I can of course have a larger font for `\part` without using `tocstyle`. But my question really is to achieve the larger font for `\part` and use `tocstyle` at the same time since it provides me a nice format of TOC.


title: How to vertically center content in ConTeXt?

text: I would like to vertically center my title page. I have tried code like this, but it does not work:               \vfill     \startalignment[center]         Title     \stopalignment     \vfill        * I am using ConTeXt, so the solutions at Vertically center text on a page did not work, however, solutions in plain TeX will be fine too.   * The documentation on \setupalign at the ConTeXt wiki suggests there might be the option `lohi`, but it seems only to center content vertically when placed inside a frame. How can I vertically center content on a page?


title: How to check if a value is not equal using TeX conditionals?

text: I have a value defined in a macro, e.g.:               \mymacro{apple}      I need to check if a value does not equal a string, e.g.:               IF #1 NOT EQUAL TO "apple" THEN         PRINT "It is not a apple, it is #1."     FI      I have tried using this, but it does not work:               \ifx#1="apple"     \else         It is not a apple, it is #1.     \fi      I have also tried using this, but it also does not work:               \startlua         if #1 ~= "apple" then             context("It is not a apple, it is #1.")         end     \stoplua        * The macro might be set to any value.   * If anything other than "apple" appears inside, including TeX commands which do not create output, it should still be considered a negative result. How can I create a plain TeX or Lua conditional which checks if the value is not equal?


title: How do I customize Beamer template?

text: I need to create a custom Beamer presentation theme for my company. I need to do the following:   * Include company logo in the header of each slide   * Include large company logo in the center of the `titlepage` background   * Modify the font colors How do I do each of these tasks? I'd appreciate some details.


title: How to make specific items only appear in recto pages in ConTeXt?

text: I would like for some items in my book to begin only on recto, or right-hand pages, such as, e.g.:   * The first page.   * The table of contents.   * The beginning of a `\part`. I believe such a configuration is a default in most LaTeX document classes. How can I ensure that all of these items are placed on recto pages in ConTeXt?


title: A good METAPOST alternative for plotting 3d surfaces

text: I find METAPOST to be a wonderful software to create 2d charts and figures. Can you name me a few good alternatives to METAPOST for drawing 3d surfaces? The crucial feature I'm looking for is the ability to have all the fonts (the axis labels and all the numbers) in the LaTeX font, just like METAPOST so gracefully allows me to do.


title: Encoding error when changing from LaTeX to XeTeX engine in Emacs AucTeX

text: The following MWE works fine when compiling with the LaTeX engine (AUCTeX 11.86)               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \begin{document}     áéíóúñ     \end{document}      However, with the XeTeX engine I get the following error:               ERROR: Package inputenc Error: Unicode char \u8:áéí not set up for use with LaTeX          --- TeX said ---     .          See the inputenc package documentation for explanation.      If I change the input encoding to Latin-1 the document compiles correctly. Why is XeTeX rejecting the UTF-8 encoding? I tried the suggestions given in Typeset directly in Spanish and in AUCTeX and Xetex but neither help.


title: Reduce vertical space after list of algorithms' title

text: I would like to control the spacing after and before the list of algorithms title to fit all the algorithms in one page.               \documentclass[12pt,headsepline,a4paper,BCOR=10mm,twoside,titlepage,pdftex,cleardoubleplain]{scrbook}     \usepackage[english,ruled,vlined,linesnumbered]{algorithm2e}     \usepackage{tocloft}     \usepackage[nottoc,notlot,notlof]{tocbibind}     \cleardoublepage     \pagenumbering{gobble}     \tableofcontents     \cleardoublepage               \pagenumbering{arabic}     \setcounter{page}{1}     \newpage          \input{chapters/chapter1}     \input{chapters/chapter2}     \appendix     \input{chapters/Appendix}     \listofalgorithms     \backmatter     \bibliographystyle{alpha}     \bibliography{library}     \end{document}


title: Biblatex/biber does not work

text: I am so sure it is just a minor problem, yet I try to solve it since days without any progress, so I would be glad for any help: I recently switched to biblatex - and my document fails to produce a bibliography and proper citations (it just gives the key in bold and brackets). I reinstalled everything several times but stll assume somehow biber does not run properly. I use Biber 1.8, Miktex 2.9 (32 bit) and Texniccenter. So what I do:               \documentclass[12pt,a4paper]{scrreprt}      \usepackage[style=authoryear-comp,natbib=false,mcite=false,backend=biber]{biblatex}     \addbibresource{refs.bib}          \begin{document}     blabla \cite{key}     \printbibliography     \end{document}      My refs file does exist and is found, still I get the warnings: > Citation 'key' on page 1 undefined on input line 7. Biber tells me: This is Biber 1.8 - Logile is 'xy.blg' - Reading 'xy.bcf' - Found 42 citekeys in bib section o - Processing 0 - Looking for bibtex format file 'refs.bib' - Than a number of warnings (not parse correctly, Duplicate entry key...) - and then: BibTex subsystem: C\User... \AppData\LocalTemp\NJf6qjXqel\refs.bib_57752.utf8, line 1, warning: 9 characters of junk seen at toplevel and then an Error (all former = warnings) C\User... \AppData\LocalTemp\NJf6qjXqel\refs.bib_57752.utf8, line 5187, syntax error: found"(", expected"," So what do I do wrong?? Update: Problem was with the .bib file - imported automatically from Citavi.


title: Set chapter header to small caps and bold in scrbook

text: This is my first question here, I did search but uhmm haven't found the answer. I have a document that must follow the next rules: The chapter header in uppercase and bold and arial 13 pt; section header in lowercase and arial 13 pt; subsection header in lowercase and slanted font and arial 13 pt; and finally the main font for the document is arial 12 pt. Following enter link description here Along with the scrbook guide (p. 55) I can almost get it, except for the chapter header that I am not sure how to make at the same time bold and in small caps.               \documentclass[12pt,spanish]{scrbook}     \usepackage[spanish]{babel}     \usepackage[scaled]{uarial}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{kpfonts}     \setkomafont{chapter}{\normalfont\increase\rmfamily\scshape}     \setkomafont{section}{\normalfont\increase}     \setkomafont{subsection}{\normalfont\increase\rmfamily\slshape}          \begin{document}     \chapter{Un título bastante largo para probar}     Algo de texto ¿Por qué no?     \section{Un título bastante largo para probar}     Algo de texto ¿Por qué no?     \subsection{Un título un poquitillo más largo}     Algo de texto ¿Por qué no?, así es.     \end{document}      Any help is extremely appreciated.


title: How to plot barplot horizontally in LaTeX

text: I want to plot a barplot horizontally. I have tried using the following code, but it prints a vertical plot:               \documentclass[varwidth=true, border=2pt]{standalone}          \usepackage{pgfplots}     \usepackage{tikz}     \usetikzlibrary{arrows, positioning, calc}          \begin{document}         \newcommand\shift{1.5}              \begin{tikzpicture}[scale=1]             \begin{axis}[                 ybar,                 ylabel={vaule},                 ylabel style={at={(0.02,0.5)}, color=red},                 xlabel={items},                 legend style={at={(0.5,-0.15)},                 anchor=north,legend columns=-1},                 width=0.8*\textwidth,                 height=9cm,                 bar width=7pt,                 symbolic x coords={                     $x_1$,$x_2$,$x_3$,$x_4$,$x_5$,$x_6$, $x_7$, $x_8$,                     $x_9$, $x_{10}$, $x_{11}$, $x_{12}$, $x_{13}$,                     $x_{14}$, $x_{15}$                 },                 xtick=data,                 scaled y ticks=base 10:-3,                 axis y line*=left,                 %nodes near coords,                 %nodes near coords align={vertical},                        ]                 \addplot[red, fill=red!15, shift={(-\shift,0)}] coordinates {                     ($x_1$,96000) ($x_2$,126000) ($x_3$,115000)                     ($x_4$,125000) ($x_5$,123000) ($x_6$, 123000)                     ($x_7$, 112000) ($x_8$, 111000) ($x_9$, 110000)                     ($x_{10}$, 110000) ($x_{11}$, 120000)                     ($x_{12}$, 98000) ($x_{13}$, 130000)                     ($x_{14}$, 87000) ($x_{15}$, 97000)};               \end{axis}             \begin{axis}[                 ybar,                 ylabel={weight},                 ylabel style={at={(1.25,0.5)}, color=blue},                 legend style={at={(0.7,-0.15)},                 anchor=north,legend columns=-1},                 width=0.8*\textwidth,                 height=9cm,                 bar width=7pt,                  symbolic x coords={                     $x_1$,$x_2$,$x_3$,$x_4$,$x_5$,$x_6$, $x_7$, $x_8$,                     $x_9$, $x_{10}$, $x_{11}$, $x_{12}$, $x_{13}$,                      $x_{14}$, $x_{15}$                 },                 xtick=data,                 %nodes near coords,                 %nodes near coords align={vertical},                 axis y line*=right,                  axis x line=none,              ]                  \addplot +[shift={(\shift,0)}] coordinates {($x_1$,27)                      ($x_2$,21) ($x_3$,27) ($x_4$,15) ($x_5$,19)                      ($x_6$, 46) ($x_7$, 47) ($x_8$, 32) ($x_9$, 14)                      ($x_{10}$, 20) ($x_{11}$, 50) ($x_{12}$, 19)                      ($x_{13}$, 22) ($x_{14}$, 50) ($x_{15}$, 46)};             \end{axis}          \end{tikzpicture}         \end{document}      Thank you.


title: automatically add additional space for annotations while keeping layout the same

text: Consider, I've got a document I am asked to review in a way, that I add todonotes/marginnotes with comments. Therefore the usual document margin might be to small. Is there a way to just add additional space for todonotes while keeping the documents layout unchanged? I know that there are ways of changing margins, page geometry etc. but is there a neat way, where I just would need to add one line of code in the header, to have wider margins during the reviewing process? That is also important since I do not always overlook all the layout settings the author has made to his tex document, so I am likely to change something when setting the wider margins by hand. Furthermore ideally I would like to not mess up with marginnotes. So basically consider a layouted letter page document. I just want to add additional space, so have additional space on the right of the letter document. Is there a neat way? Here is a minimal working example:               \documentclass{article}     % loads of unknown author specific packages, settings, layouting     \usepackage{todonotes}     \begin{document}     This is some text to review.     \todo{This would be my comment on some extra wide margin just for todonotes.}     \end{document}


title: Moving arguments inside group

text: I have a setup similar to the MWE below in which I have a macro that needs to be called in the document, and also regularly becomes a moving argument (in this case, inserted into the index, though it could really be anything). This macro (`\arobustcmd` in the example) simply performs some operation on another macro that's hidden away from the end user (making `\someothercmd` capital or lowercase in this example). It occasionally needs to be changed in a scoped fashion (eg. inside the `\begin{@empty}`). This scoping works as expected when printing the command (inside the environment it's the new text, outside the environment it's the old text), however, since `\arobustcmd` gets passed to the index and expanded later, the index entry is always the old text. I'd like to have two index entries, one for the old text, and one for the text set inside the `\begin{@empty}`. Is there a way to force the `\arobustcmd` to expand before being written to the index file? I can always rework it to declare two commands (eg. `\arobustcmd` and `\anotherrobustcmd` and redefine both of them with `\protected@edef` inside the `\setthetext` command instead of the way I've done it here, but I'm curious if there's a way to make my setup work.               \documentclass{article}          \usepackage[splitindex]{imakeidx}     \makeindex[name=anidx]          \def\someothercmd{Some text}     \newcommand*{\arobustcmdStar}{\expandafter\MakeUppercase\someothercmd}     \newcommand*{\arobustcmdNoStar}{\expandafter\MakeLowercase\someothercmd}     \makeatletter     \DeclareRobustCommand*{\arobustcmd}{\@ifstar\arobustcmdStar\arobustcmdNoStar}     \makeatother     \newcommand*{\setthetext}[1]{\def\someothercmd{#1}}          \begin{document}          \begin{@empty}     \setthetext{new text}     \makeatletter\imki@wrindexentry{anidx}{\arobustcmd}{3}\makeatother     Some output: \arobustcmd     \end{@empty}          \makeatletter\imki@wrindexentry{anidx}{\arobustcmd}{3}\makeatother     Some output: \arobustcmd          \printindex[anidx]          \end{document}


title: How to avoid using \sloppy document-wide to fix overfull \hbox problems?

text: How to avoid using `\sloppy` document-wide to fix overfull `\hbox` problems? ![overfull \\hbox](http://i.stack.imgur.com/f3eiJ.png) This is my minimal working example.               \documentclass[12pt]{report}      \usepackage[english,ngerman]{babel}      \usepackage[a4paper,inner=25mm,outer=25mm,top=30mm,bottom=30mm]{geometry}      \usepackage{lipsum}           \begin{document}       \lipsum[2]       Have a look at this URL ignoring the page margin within the text flow \textit{example.com/donc\_oe/longurl} lorem ipsum.\par       The very strange plugin Java-JDT (\textit{en. Java Development Toolkit}) "`Plugin-Entwicklungsumgebung"' -- what's wrong with this german word?\par       \lipsum[2]      \end{document}      With `\sloppy` it looks better. ![enter image description here](http://i.stack.imgur.com/miCVQ.png) But I got told it's (obviously) better to avoid using it document-wide. What else can I do?


title: Multiplicator caption position in tikz plot

text: I am trying to create a plot with two separate y-axes. The right y-axis is units * 10^5. However, the multiplication caption is not positioned correctly. I use the following code:               \begin{tikzpicture}       \begin{axis}[         axis y line* = left,         xlabel = grid size $l$,         ylabel = \textcolor{blue}{\footnotesize$\blacksquare$}     indices per $\mathcal{T}$,         ymode = log,         log origin=infty]         \addplot[color=blue,mark=x] coordinates {               (15000,317.631)               (20000,182.318)               (40000,49.3089)               (80000,14.4933)               (160000,5.02436)               (320000,2.37795)               (500000,1.81145)               (640000,1.62701)               (1280000,1.29392)               (2560000,1.18447)           };       \end{axis}            \begin{axis}[             hide x axis,             ylabel near ticks,             axis y line*=right,             ylabel={\textcolor{red}{\footnotesize$\blacksquare$}  number of $\mathcal{T}_{pot}$}]                 \addplot[color=red,mark=x] coordinates {               (15000,40819)               (20000,41179)               (40000,41179)               (80000,42720)               (160000,44312)               (320000,44866)               (640000,98610)               (1280000,168980)               (2560000,184202)           };           \draw[black,dashed] (axis cs:500000,0) -- (axis cs:500000,200000);           \draw (axis cs:500000,200000) node[below right] {$l_r$};       \end{axis}     \end{tikzpicture}      which produces this result: ![enter image description here](http://i.stack.imgur.com/lHIXK.png) However, I want the *10^5 in the upper right corner to be aligned right of the y-axis, not left of it. It should be aligned just like the tick labels for the right y-axis. Any help is highly appreciated!


title: Expand macro at float typesetting (not at definition) time

text: To my knowledge, the contents of a float environment are put into a box when the float is defined. Is it possible to proccess a user defined command/macro when the float is actually typeset, e.g. to put a watermark on that specific page (which isn't necessarily the page the float is defined on)? Is it necessary to add something to the definition of the float enviroment or can I use some command within its body?


title: Gaussian elimination with several steps in one line

text: I would like to have a macro for gaussian elimination, but I don't like the notation of the gauss package. I've found a great macro here, but I would like to have several steps in one line. When I just remove \\ it doesn't look good, the spaces between matrices and row operations are not equal and the line doesn't wrap: ![matrix](http://i.stack.imgur.com/pli90.png) Also, I would like to decrease spaces between matrices and row operations. How to do that? Source:               \documentclass{article}     \usepackage{amsmath}     \usepackage{array}     \allowdisplaybreaks          \makeatletter     \newcounter{elimination@steps}     \newcolumntype{R}[1]{>{\raggedleft\arraybackslash$}p{#1}<{$}}     \def\elimination@num@rights{}     \def\elimination@num@variables{}     \def\elimination@col@width{}     \newenvironment{elimination}[4][0]     {         \setcounter{elimination@steps}{0}         \def\elimination@num@rights{#1}         \def\elimination@num@variables{#2}         \def\elimination@col@width{#3}         \renewcommand{\arraystretch}{#4}         \start@align\@ne\st@rredtrue\m@ne     }     {         \endalign         \ignorespacesafterend     }     \newcommand{\eliminationstep}[2]     {         \ifnum\value{elimination@steps}>0\sim\quad\fi         \left[             \ifnum\elimination@num@rights>0                 \begin{array}                 {@{}*{\elimination@num@variables}{R{\elimination@col@width}}                 |@{}*{\elimination@num@rights}{R{\elimination@col@width}}}             \else                 \begin{array}                 {@{}*{\elimination@num@variables}{R{\elimination@col@width}}}             \fi                 #1             \end{array}         \right]         &          \begin{array}{l}             #2         \end{array}         \addtocounter{elimination@steps}{1}     }     \makeatother          \begin{document}          \begin{elimination}[3]{3}{1.75em}{1.1}         \eliminationstep         {             4 & -8 & 5 & 1 & 0 & 0 \\             4 & -7 & 4 & 0 & 1 & 0 \\             3 & -4 & 2 & 0 & 0 & 1         }         {             \\             -R_{1} \\             -\frac{3}{4} R_{1}         }         \eliminationstep         {             4 & -8 & 5 & 1 & 0 & 0 \\             0 &  1 & -1 & -1 & 1 & 0 \\             0 &  2 & -\frac{7}{4} & -\frac{3}{4} & 0 & 1         }         {             \\             \\             -2R_{2} \\         }         \eliminationstep         {             4 & -8 & 5 & 1 & 0 & 0 \\             0 &  1 & -1 & -1 & 1 & 0 \\             0 &  0 & \frac{1}{4} & \frac{5}{4} & -2 & 1         }         {             \\             \\             +2R_{2} \\         }     \end{elimination}          \end{document}


title: Transmission grating in pst-optexp

text: It seems that transmission gratings have not been implemented yet in the `pst- optexp`. Does anyone know whether there exists a workaround?


title: Add more horizontal space in an array

text: Is there a setting I can input to the `array` environment, which will slightly increase the horizontal spacing between each entry? I would appreciate it if you could test your code on the following example I am using:               \documentclass{article}     \usepackage{forloop}     \newcounter{loopcntr}      \newcommand{\rpt}[2][1]{% repeat text        \forloop{loopcntr}{0}{\value{loopcntr}<#1}{#2} }      \begin{document}     \[ \begin{array}{*{5}{c}}     1 & 2 & 3 & 4 & \ldots \\     \rpt[4]{\downarrow &} \unskip \downarrow \\     x_{1}^1 & x_{1}^2 & x_{2}^1 & x_{1}^3 & \ldots \\     \end{array} \]     \end{document}      I want slightly more whitespace between each number, between each arrow, and between each x. ![table.png](http://i.stack.imgur.com/5KAFG.png)


title: How to prevent a pdf-figure to overlay text?

text: I have a pdf-figure which I want to include in my tex-file. I wrote the following line of code to insert the figure in my file:               \includegraphics[width=.8\textwidth, bb=0cm 12.5cm 26cm 15.5cm]{./images/FA/subsystems.pdf}      The result I get in my file is that the figure is overlapping with text. ![Output of tex](http://i.stack.imgur.com/B18PL.png) Somewhere else in the code, I used the exact same way of including another pdf-figure in the file and this worked fine, without overlap:               \includegraphics[width=.4\textwidth, bb=0cm 25cm 8.5cm 29cm]{./images/BladePitch.pdf}      Does anybody have an idea on how to position the figure somewhere without overlapping text?


title: Where do I find documentation for packages in a MiKTeX installation?

text: Is there a systematic way to find documentation for latex packages (e.g. beamer, TikZ, amsmath) on a windows machine with a MiKTeX/TeXnicCenter installation? It seems the package user manuals (pdf files) are scattered around in different folders on my machine. Can one ask MiKTeX or TeXnicCenter to find the documentation for a specific package?


title: What Pascal procedure inserts \mathon and \mathoff?

text: TeX surrounds inline math formulae with `\mathon` and `\mathoff`, which appear to be nodes. For instance, running TeX on `$ $\showlists\bye` gives               ### horizontal mode entered at line 0     \hbox(0.0+0.0)x20.0     \mathon     \mathoff     spacefactor 1000     ### vertical mode entered at line 0     prevdepth ignored      Where are those defined or documented? Neither the string `mathon` nor `mathoff` appear in the source file `tex.web` of TeX.


title: tikz foreach loops: is there an equivalent of metapost's step?

text: I apologise if I'm using and searching with incorrect terminology. This seems an obvious question (to me) so I'm surprised I've not found anything (and so assume I'm missing something). In `metapost`, I can use the following to define a loop:               for i=some-value step 0.05 until some-other-value:         fill fullcircle scaled so-and-so withcolor i*white;         so-and-so := so-and-so - something;         something-else := i;     endfor;      This means that I can define how large the increments should be without needing to know the initial and final value of `i`. Is something similar possible in `tikz`? I can achieve the same effect in a more roundabout fashion by calculating the second value for the loop from the first value plus the value of the step. However, I wonder if there is not some simpler method. That is, the following code works:               \documentclass[border=5pt,tikz]{standalone}          \begin{document}       \tikzset{         /mytree/key1/.initial={-10},         /mytree/key2/.initial={10},         /mytree/step1/.initial={2},       }       \begin{tikzpicture}         \pgfmathsetmacro{\myfirststep}{\pgfkeysvalueof{/mytree/key1} + \pgfkeysvalueof{/mytree/step1}}%         \foreach \i in {\pgfkeysvalueof{/mytree/key1},\myfirststep,...,\pgfkeysvalueof{/mytree/key2}}           \node at (\i,0) {\i};       \end{tikzpicture}     \end{document}      but I wonder is it possible to replace the lines                   \pgfmathsetmacro{\myfirststep}{\pgfkeysvalueof{/mytree/key1} + \pgfkeysvalueof{/mytree/step1}}%         \foreach \i in {\pgfkeysvalueof{/mytree/key1},\myfirststep,...,\pgfkeysvalueof{/mytree/key2}}      with something more elegant such as                   \foreach \i [step=\pgfkeysvalueof{/mytree/step1}] in {\pgfkeysvalueof{/mytree/key1},...,\pgfkeysvalueof{/mytree/key2}}      which would be analogous to the usage of `step` in `metapost`?


title: ISBN-13 in bibtex

text: What is the proper way to put an ISBN-13 number into a bibtex entry? What do I have to do to make it show up in the bibliography? I have the following book:               Landmarks of Tomorrow: A Report on the New Paperback     January 1, 1996     by Peter Drucker     Paperback: 270 pages     Publisher: Transaction Publishers (January 1, 1996)     Language: English     ISBN-10: 1560006226     ISBN-13: 978-1560006220     Product Dimensions: 6.3 x 9.2 inches     Shipping Weight: 1 pounds      I am building a bibtex database and am expecting in the long term to track ISBN-13 numbers as the publishing industry switches over (...any decade now...). I am curious how the proper way to store these numbers would be. My current bibtex entry is:               @book{drucker1959landmarks,       title={Landmarks of Tomorrow: A Report on the New},       author={Drucker, Peter},       publisher={Transaction Publishers},       year={1996},       ISBN={1560006226},       note={[original edition 1959]}     }      I suppose the new entry might be `ISBN-13` or `ISBN13` but I am looking for precidence on how to enter this.


title: pgfplots memory overload

text: I want to plot 5x9000+ data points. I am already using:               \usepgfplotslibrary{external}      \tikzexternalize      and               -shell-escape -enable-write18       in PDFLatex. However, I still get the memory error. I am reading the data from a file like this:               \pgfplotstableread{C:\\data_1373554136.txt}     \datatable     %\addplot table[x = 0] from \datatable ;     \addplot table[y = 1] from \datatable ;     \addplot table[y = 2] from \datatable ;     \addplot table[y = 3] from \datatable ;     \addplot table[y = 4] from \datatable ;     \addplot table[y = 5] from \datatable ;      My data in the file looks like this:               Time    0   1   2   3   4   5     0   0   0   0   0   0   0     1   0   1   7   19  1   115      I am running on Windows 7 using Miktex. Any suggestions there?


title: Problems with a template (CV front page)

text: How to make this to look like the link? And please not make it XeLaTeX :-) enter link description here Preamble:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \pagestyle{empty}     \usepackage{tikz,xcolor,mwe}     \definecolor{cvgreen}{HTML}{92D14F}     \definecolor{cvgray}{HTML}{D8E4BE}     \definecolor{cvtext}{HTML}{92909B}     \usetikzlibrary{shadows}     \begin{document}     \begin{tikzpicture}[remember picture,overlay]         % green bar         \fill[cvgreen] (current page.north west) rectangle ([xshift=5cm]current page.south west);         % gray bar         \fill[cvgray] ([yshift=-5cm]current page.north west) rectangle ([yshift=-10cm]current page.north east);         % title and date         \node[cvtext,right] at ([yshift=-7cm]current page.north west) {\bfseries Bewerbung als Bankkauffrau};         \node[cvtext,above left] at ([xshift=-1cm,yshift=-9.5cm]current page.north east) {\huge\bfseries zum 01.09.2013};         % cover photo         \node[inner sep=0pt,below right] (image) at ([xshift=5cm,yshift=-10cm]current page.north west) {\includegraphics[width=7cm,height=9cm]{example-image-a}};         % name and address         \node[fill=white,drop shadow,align=center,text width=6.4cm,inner sep=0.3cm,below] (name) at (image.south) {\LARGE Martina Mustermann};         \node[text width=15cm,inner sep=0.3cm,below right] at (name.south west) {\Large\obeylines%             Musterweg 8             81929 München             Tel.: 01 74 / 98 98 61             E-Mail: Martina.M@web.de         };         % attachments         \node[white,text width=5cm,inner sep=0.3cm,above right] at ([yshift=1cm]current page.south west) {\large\obeylines%             \textbf{Anlagen:}             Lebenslauf             Bewerbungsschreiben             Letzte 2 Schulzeugnisse             Praktikumsbestätigungen         };     \end{tikzpicture}     \end{document}


title: Texmaker - easy approach to edit large paragraphs (jump to line) - inverse search

text: Editor: TexMaker I have been searching for a while, but couldn't find a practical solution. I am writing an article, and the problem is when I need to edit. When I find a mistake in the pdf, I use the "jump to line, syncTex" command. It used to work fine, but now that I am having big paragraphs; it either go to the beginning or the end of the paragraph and I have to search again for the line that contains the mistake! It is a real headache, and I know there must be an easy solution for this, such as a "go-to-word" tool, I have tried some ideas like adding empty equation but it doesn't work!. I am willing to change the editor if others provide this functionality. Any suggestions are very appreciated. Regards


title: Problem with tikz: Arrows not parallel

text: I want all the vertical lines parallel in this example. How can I manage that? Thanks a lot. Here is a picture. ![picture](http://i.stack.imgur.com/5Ouv5.jpg)               \documentclass{scrartcl}     \usepackage{tikz}     \usepackage{amsmath}     \usepackage{amsfonts}          \usetikzlibrary{matrix,arrows,calc}     \begin{document}     \begin{center}     \begin{tikzpicture}[]     \matrix (m) [matrix of math nodes, row sep=1.5em,                   column sep=1.5em, text height=1.5ex, text depth=0.25ex, text centered]                   {                               & 0 &   & A &       & A\amalg_AB     &       & C     & & 0\\                             0 &   & A &       & B     &                        & C     &       & 0\\                                   & 0 &   & A &       & A\amalg_AB &       & C & & 0\\                             0 &   & A &       & B &                        & C &       & 0\\                   };                   \path[->,font=\scriptsize]                              (m-2-1) edge node[auto] {} (m-2-3)                         (m-2-3) edge node[auto] {$f$} (m-2-5)                                        (m-2-5) edge node[auto] {$g$} (m-2-7)                         (m-2-7) edge node[auto] {} (m-2-9)                              (m-4-1) edge node[auto] {} (m-4-3)                         (m-4-3) edge node[auto] {$f$} (m-4-5)                                        (m-4-5) edge node[auto] {$g$} (m-4-7)                         (m-4-7) edge node[auto] {} (m-4-9)                              (m-1-2) edge node[auto] {} (m-1-4)                         (m-1-4) edge node[auto] {$$} (m-1-6)                                         (m-1-6) edge node[auto] {$$} (m-1-8)                         (m-1-8) edge node[auto] {} (m-1-10)                              (m-3-2) edge node[auto] {} (m-3-4)                         (m-3-4) edge node[auto] {$$} (m-3-6)                                         (m-3-6) edge node[auto] {$$} (m-3-8)                         (m-3-8) edge node[auto] {} (m-3-10)                              (m-2-3) edge node[auto] {} (m-1-4)                         (m-2-5) edge node[auto] {} (m-1-6)                         (m-2-7) edge node[auto] {} (m-1-8)                              (m-4-3) edge node[auto] {} (m-3-4)                         (m-4-5) edge node[auto] {} (m-3-6)                         (m-4-7) edge node[auto] {} (m-3-8)                         ;                 \end{tikzpicture}                \end{center}       \end{document}


title: Making the text fit in a specific space in Latex

text: I'm trying to fit my text in a specific space, as it's a Graph explanation. I would like to make something like the graph below: ![Fit text into a specific space](http://i.stack.imgur.com/J5ZYF.jpg) Is it possible to make the text fit in that space? LaTex does it by itself? Should a package or a command be used? Thank you.


title: How do I format a journal submission to Angewandte Chemie with LaTeX

text: Normally when my group writes journal papers we use the `achemso` style and package. However, we want to submit a paper to Angewandte Chemie. They don't appear to provide a LaTeX template, but will take PDF submissions. Now, there is the `chem-angew` Biblatex style, which is perfect for our needs, but we can't use the `achemso` style with it, for affiliation typesetting and such. Is there a replacement paper style we could use, either a general one or a package specific to Angewandte? We aren't married to `chem-angew` if there is a better way to write up submissions to this journal.


title: chemfig: reaction above arrow

text: I want to typeset a small reaction above a reaction arrow inside a scheme. Putting a `\subscheme{}` into the first of argument of `\arrow` unfortunately breaks the layout. Should I just try to position the nodes it manually inside a `tikzpicture`? The main arrow and the reaction under the arrow in this example basically illustrate what I'm trying to achieve, the difference being that I want the reaction to be above the arrow (flipped horizontally) ![Example](http://i.stack.imgur.com/TKk6J.png) Current attempt:               \documentclass{article}     \usepackage[english,ngerman]{babel}     \usepackage{chemfig}     \begin{document}               \section*{Arrow with empty labels}          \setatomsep{2.0em}     \setcompoundsep{4.8em}     \schemedebug{true}     \schemestart     \chemfig{[6]A----B}     \arrow(.base east--.base west){->[][][-10mm]}[,2]     \chemfig{[6]A------B}     \schemestop          \section*{Arrow with subscheme in top label}     \setatomsep{2.0em}     \setcompoundsep{4.8em}     \schemedebug{true}     \schemestart     \chemfig{[6]A----B}     \arrow(.base east--.base west){->[     \subscheme{ \chemfig{C}\arrow \chemfig{D} }     ][][-10mm]}[,2]     \chemfig{[6]A------B}     \schemestop          \end{document}      ![Result](http://i.imgur.com/DjVxtFh.png)


title: When to use \par and when \\

text: What is the difference between `\par` and `\\\` and when should I use `\par` instead of `\\\`?


title: Should I use \\ to end a line or a paragraph?

text: I am somewhat confused as to how to approach the following issue. In my thesis is have a lot of text and want to group this is using line breaks and paragraphs. Up to now I have been using `\\\` to end a line and forcibly start a new line as such:               some text that is the end of the line want.\\     End than the next line starts at the line below. etc      Nothing to worry about. However if i would like to have some white space ending a paragraph is use the `\\\` followed by a white line in my 'code'. This produces the desired result, however i have lot of underfull vboxes when compiling. A. is this related to my use of the `\\\`? B. What is the proper way to end/start a paragraph? I have read about the `\par` command but i am not certain how to apply this... I use the report documentclass and are going towards a 200 page document so i would like to get this right. I tried to find the answer in existing posts but was not successful.


title: unwanted vertical spacing

text: On some pages of my document LaTeX introduces a lot of spacing between my headline/paragraphs (around 5 times more than usual). What is the reason for this and how can I avoid it? It seems it is trying to fill the page until the next chapter starts.


title: Highlight a coordinate in a tikz / gnuplot graph

text: I want to place a coordinate on my `tikz`/`gnuplot` graph. How to do this? ![coordinateingraph](http://i.stack.imgur.com/B1xSv.png) Preferrably I want the graph to overlap the little red dot, and I'd like the dot slightly larger.               \documentclass{article}          \usepackage{pgfplots}     \usepackage[heightrounded]{geometry}     \usepackage[miktex]{gnuplottex}          \begin{document}          \subsubsection{P-waarde bij de chi-kwadraattoets}          \textbf{\textit{Let op!}} Deze paragraaf is geen stof die je moet weten, maar alleen ter verduidelijking!          \begin{figure}[h]     \begin{center}     \begin{tikzpicture}       \begin{axis}[%         xlabel = $\chi ^2$,         ylabel = $P\left(\chi ^2 (5) \geq \chi ^2\right)$,         samples = 200,        xtick={4,5,6,...,15},ytick={0,.05,.1,.15,.2,.25,.3,.35,.4,.45,.5},         restrict y to domain = 0.045:0.5,         domain = 5:15,       every axis y label/.style={at=(current axis.above origin),anchor=south},      every axis x label/.style={at=(current axis.right of origin),anchor=west},       height=8cm, width=8cm,     axis lines*=left]         \foreach \k in {5} {%           \addplot+[mark={}] gnuplot[raw gnuplot] {%         isint(x)=(int(x)==x);         log2 = 0.693147180559945;         cchisq(x,k)=k<=0||!isint(k)?1/0:x<0?0.0:igamma(0.5*k,0.5*x);         set xrange [ 5 : 15.0000 ];         set yrange [ 0 : 1.0000 ];             samples=200;             plot 1-cchisq(x,\k)};     }       \end{axis}     \end{tikzpicture}     \end{center}     \caption{Kansfunctie (Chi-kwadraat CDF) om een bepaalde waarde van $\chi ^2$ te vinden}     \end{figure}     \end{document}


title: How to plot a function in integral form with TikZ?

text: how to plot the function `$f:x\mapsto \int_x^{2x}\frac{4}{\sqrt{1+t^4}}\, \textrm{d}t$` with `TikZ`? ![enter image description here](http://i.stack.imgur.com/gqWIJ.png)


title: Indexes using datagidx where multiple terms have a single index entry

text: I'm building off of an example here from the LaTeX Community. What I want to do is create an index where multiple terms link to the same word in the index. So for example if the terms `toyota`, `ford`, and `honda`, appear on pages `7`, `9` and `15` I want the index simply say:               cars … 7, 9, 15       What I don't want is               cars,     toyota … 7     ford … 9     honda …15      I'm doing this in `beamer`. And the following example will create the term `cars`, but I don't know how to associate multiple words with that single term.               \documentclass[16pt,pdftex]{beamer}     \usepackage[T1]{fontenc}          \makeatletter     % beamer doesn't define \@idxitem, but it's used by the     % \printterms "index" style, so define it:     \newcommand\@idxitem{\par\hangindent40pt}     \makeatother          \usepackage{datagidx}          \newgidx{index}{Index}     \DTLgidxSetDefaultDB{index}          \newterm{car}               \begin{document}          \begin{frame}     \frametitle{example}     \gls{car}     \end{frame}          \begin{frame}     \frametitle{example}     %\gls{subaru}     \end{frame}          \begin{frame}     \frametitle{example}     %\gls{toyota}     \end{frame}               \begin{frame}     \frametitle{example}     %\gls{ford}     \end{frame}               \begin{frame}[allowframebreaks]     \frametitle{Index}     \printterms[style=index]     \end{frame}     \end{document}


title: Automatic per-mode switch from symbol to reciprocal

text: Is there a way to make the `siunitx` package output a unit with a single slash using `per-mode=symbol` and fallback to `per-mode=reciprocal` when there is more than one slash?               \documentclass{article}     \usepackage{siunitx}          \begin{document}     \SI{1}{\metre\per\second}            % would output 1 m/s     \SI{1}{\ampere\per\metre\per\second} % would output 1 A m-1 s-1     \end{document}


title: Censoring Curse Words with Grawlixes

text: Suppose that I would like to censor a curse word `<word>` using grawlixes, e.g. "What the #@$! are you doing?!" How can I define a command `\censor` such that `\censor{<word>}` results in a string of these symbols? I am not entirely sure which or how many symbols should be used given the word `<word>`. I suppose that the number of symbols used should approximately equal the number of characters in `<word>`. Thanks for your input!


title: LyX - Hiding inserted latex commands

text: I'm new to LyX. I needed to find an easy way for my boss to be able to edit my reports without the need to learn LaTeX. I found LyX and I think it's the solution. Even in LyX, often times I need to use `Ctrl + L` and add some LaTeX commands. Is there anyway to hide my LaTeX codes inside a LyX document? I need to have those commands, however, on the other hand, I don't want them to cause confusion for my boss. I also want those commands to remain untouched at all times. Thanks very much for your help,


title: Repeated note field in references when using ametsoc bibliography style

text: The contents of the `note` field are shown two times in the bibliography. I do not know how to solve it. I am using `natbib`. The bibliography style is `ametsoc`.               @misc{Wikipedia2014Photodiode,         Author = {Wikipedia},         Howpublished = {http://en.wikipedia.org/wiki/Photodiode},         Note = {[Online; accessed 25-June-2014]},         Title = {Photodiode --- {W}ikipedia{,} The Free Encyclopedia},         Year = {2014}}      This is the result: > Wikipedia, 2014c: Photodiode — Wikipedia, the free encyclopedia. [Online; > accessed 25-June-2014], http://en.wikipedia.org/wiki/Photodiode, [Online; > accessed 25-June-2014]. I want the note field to appear only one time. Below is the minimal code example you have asked me for. Edit: Following the recommendations of Torbjørn T., I have removed the 'non- necessary' code between `\begin{document}` and `\end{document}` to give you a minimal working example that can be compiled. I have compiled it and the field note continues appearing twice.               \documentclass[12pt,a4paper,twoside]{report}          \usepackage{filecontents}     \begin{filecontents*}{bibliography.bib}     @misc{Wikipedia2014Photodiode,         Author = {Wikipedia},         Howpublished = {http://en.wikipedia.org/wiki/Photodiode},         Note = {[Online; accessed 25-June-2014]},         Title = {Photodiode --- {W}ikipedia, The Free Encyclopedia},         Year = {2014}}     \end{filecontents*}          \usepackage[square]{natbib}     \bibliographystyle{ametsoc}          \begin{document}     \citep{Wikipedia2014Photodiode}     \bibliography{bibliography}     \end{document}


title: Comparing last character(s) of the output of \ref to manipulate output

text: I am trying to write a command that will replace `\ref` in a special way. It will add some text next to the number based on the last character(s) of the number `\ref` outputs. I will try to explain this with an example:   * If the last character of `\ref` output is 1 (like if it is 11, 21, etc.) then the output shall be "1'de" instead of "1"   * Similarly if the last character of `\ref` output is 5 (like if it is 5, 15, etc.) then the output shall be "5'te" instead of "5"   * If the last character is "0" then, the code should check last 2 characters. It will output something for 10 and another thing for 20 and so on. So the spec goes like this:   * 1: 1'de   * 2: 2'de   * 3: 3'te   * 4: 4'te   * 5: 5'te   * 6: 6'da   * 7: 7'de   * 8: 8'de   * 9: 9'da   * 10: 10'da   * 20: 20'de   * 30: 30'da   * ... It goes on forever. I will cut at some point. I am stuck at the beginning. I couldn't get the output of `\ref{}` to compare it with anything. I tried the following as a first trial using `etoolbox` and `xparse`but unfortunately failed to compare:               \NewDocumentCommand \reftr {m g}{%     \ref{#1}%Outputs the output of \ref with no problem     \IfNoValueTF{#2}{}{%         \expandafter\ifstrequal{\ref{#1}}{1}{'de}{'??} %this should at least give me 'de for the first crossref but it doesn't.     }%     }%      What am I doing wrong?