title: How to change the chaptermark of bibliography

text: In previously asked questions about changing the chaptermark in a bibliography, I couldn't get a solution for my problem. That is why I'm asking a new question. I'm writing my thesis. The references span across multiple pages. On the top of the second (and further) page there is a header (that appears on every page where a new chapter does not begin). The header informs a reader about the current chapter he/she is reading. But in the references it says "Algemene conclusies", which is my last chapter. I would like this not to appear in the references and say "Bibliografie" instead. Here is my code:                   \documentclass[11pt, a4paper, twoside, openright]{report}          %\usepackage[left=2.5cm,top=3cm,right=2.5cm,bottom=3cm]{geometry}     \usepackage[a4paper,inner=3.2cm,outer=2cm,top=2cm,bottom=1.5cm,includehead,includefoot]{geometry}          \usepackage{xspace}     \usepackage{setspace} \onehalfspacing     \usepackage[dutch]{babel}     \usepackage{graphicx}     \usepackage[latin1]{inputenc}     \usepackage{subfigure}     \usepackage{appendix}     \usepackage{amsmath}     \usepackage{pdfpages}     \usepackage{pdflscape}     \usepackage{capt-of}     \usepackage{longtable}     \usepackage[square]{natbib}     \usepackage{lscape}     \usepackage{url}     \usepackage{tocvsec2}     \usepackage[hang,small,bf]{caption}     \usepackage{pslatex}     \usepackage{titlesec}     \usepackage{fancyhdr}     \pagestyle{fancy}     \headheight = 14pt     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{#1}{}}     \fancyhf{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[RE]{\textit{\nouppercase{\leftmark}}}     \fancyhead[LO]{\textit{\nouppercase{\rightmark}}}          %\renewcommand{\sectionmark}[1]{\markright{#1}}      %\fancyhead[LO]{\nouppercase{\leftmark}}     %\fancyhead[LE]{\nouppercase{\rightmark}}     %\fancyhead[HR]{\thepage}     \renewcommand{\headwidth}{16cm}      \renewcommand{\baselinestretch}{1.2}          \setlength{\parindent}{0cm}     \setlength{\parskip}{2.3ex plus 0.3ex minus 0.3ex}          \usepackage{pstricks}     \makeatletter     \def\LigneVerticale{\vrule height 2cm depth 2cm\hspace{0.1cm}\relax}     \def\LignesVerticales{%     \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}     \def\GrosCarreAvecUnChiffre#1{%     \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%     \rlap{\hbox to 1cm{\hss\mbox{\white #1}\hss}}%     \vrule height 0pt width 1cm depth 0pt}     \def\@makechapterhead#1{\hbox{%     \huge     \LignesVerticales     \hspace{-0.5cm}%     \GrosCarreAvecUnChiffre{\thechapter}     \hspace{0.2cm}\hbox{#1}%     }\par\vskip 2cm}     \def\@makeschapterhead#1{\hbox{%     \huge     \LignesVerticales     %\hspace{0.5cm}%     \hbox{#1}%     }\par\vskip 2cm}      This is the code in my document:                    %...     \chapter{Algemene conclusies}         \input{Conclusie}         \clearpage              \clearpage         \addcontentsline{toc}{chapter}{Bibliografie}         \input{Bibliografie}      And this is the code in the file bibliography:               \bibliography{bronnen}        \bibliographystyle{agsm}%plainnat


title: Wrong page orientation when creating flyers

text: The answer Creating flyers in LaTeX has a complete code example illustrating how to create a flier. However when I create the PDF the page orientation is _portrait_ instead of _landscape_. ![Screen shot of PDF view of leaflet](http://i.stack.imgur.com/wxlko.png) Here is a simplified version of the code (with filler text)               \documentclass[10pt,foldmark,notumble]{leaflet}     \usepackage{url}     \usepackage{lipsum}  % this package is for creating filler text          \title{\bf LaTeX Applications Symposium}          \author{%     \Large \bf A University     }     \date{\bf April 13 -- April 15, 2012 }          \CutLine*{1}% Dotted line without scissors     \CutLine{6}%  Dotted line with scissors          \begin{document}     \maketitle     \section{Overview}      \lipsum[1]          Unlike previous years format of the conference is different. For the first time we have invited speakers.     \lipsum[2]          We kick off on Friday, April 13 at 4:30 pm with a single invited lecture     by the Newhouse which will be also departmental colloquium lecture     for that week at the Department of Mathematical Sciences at the University.          We finish Saturday with a conference banquet.               \section{Schedule}          \vspace{0.2cm}     {\large \bf Friday, April 13}          {\bf A nice place}          \lipsum[4-9]          \section{Hotel Info}     The Hotel for the conference is the Comfort Inn located at:     1305 Tiger Blvd.     US 123 \& 76     City, SC 1234     (Phone: (123) 456-7890).          \section{Parking}     \lipsum[6]          The price, \underline{\bf not covered by organizers}, is \$23 and should     be paid in cash upon arrival. The price does not include drinks.                    \section{Registration and Financial support}           \lipsum[8-9]          \url{http://www.somewebsite.org/}          Participants who are requesting financial support will also have to do     vendor registration required by the university as well as to submit     expense report form with receipts.          \section{Organizers}          an organizer  \url{}          a big man \url{}          \section{Tour to the countryside}     \lipsum[10-12]          \end{document}      The orientation is wrong as well. How do I fix this?


title: Small-caps, old-style numbers, and some ligatures produce odd symbols in PDF copy text?

text: This is a problem I've had consistently with XeLaTeX. Here's a small example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX,Numbers={OldStyle,Proportional}]{Minion Pro}          \begin{document}     The \textsc{nato} office 1234     \end{document}      The file compiles and displays just fine. But if I try to copy its text from Acrobat to another application, I get garbage characters in place of all small-caps, old-style numbers, and the ligature _Th:_ > e  office  This also means that if I search the PDF, there are no hits for "The", "NATO", or "1234". And God help me if the file gets indexed by Google. Now if I switch to LuaLaTeX, I don't have this problem:               The \textsc{nato} office 1234      > The nato office 1234 Then if I use uppercase small-caps, I can get _exactly_ what I want:               The \mbox{\addfontfeatures{Letters=UppercaseSmallCaps}NATO} office 1234      > The NATO office 1234 But try as I might with XeLaTeX, it still gives the same garbled copy text. The problem seems to be that in the resulting PDF file, LuaTeX generates "correct" CMap entries while XeTeX generates bugged ones which reference the Private Use Area:               LuaTeX                                        XeTeX     --------------------------------------------- ---------------------------------------------          /CIDInit /ProcSet findresource begin          /CIDInit /ProcSet findresource begin     12 dict begin                                 12 dict begin     begincmap                                     begincmap     ...                                           ...     1 begincodespacerange                         1 begincodespacerange     <0000> <FFFF>                                 <0000> <FFFF>     endcodespacerange                             endcodespacerange     0 beginbfrange                                5 beginbfchar     endbfrange                                    <0044> <0063>     13 beginbfchar                                <0046> <0065>     <0044> <0063>                                 <0050> <006F>     <0046> <0065>                                 <0107> <E062>     <0050> <006F>                                 <010F> <FB03>     <0107> <00540068>                             endbfchar     <010F> <FB03>                                 1 beginbfrange     <015D> <0031>                                 <015D> <0160> <F731>     <015E> <0032>                                 endbfrange     <015F> <0033>                                 4 beginbfchar     <0160> <0034>                                 <05C9> <E000>     <05C9> <0041>                                 <05D6> <E044>     <05D6> <004E>                                 <05D7> <E049>     <05D7> <004F>                                 <05DC> <E061>     <05DC> <0054>                                 endbfchar     endbfchar                                     endcmap     endcmap                                       CMapName currentdict /CMap defineresource pop     CMapName currentdict /CMap defineresource pop end     end                                           end     end      Indeed, if I just "transplant" all these CMap entries from LuaTeX's PDF into XeTeX's PDF, the problem goes away! So:   1. Is there a way to make XeTeX emulate the way LuaTeX makes CMap entries?   2. If not, is there a way to edit the _font_ to remove any references to the Private Use Area which may "tempt" XeTeX to make these incorrect CMap entries?   3. If none of that is possible, is there a way to edit the CMap entries in PDFs made by XeTeX, _automatically_ and _without needing a LuaTeX run?_ * * * **EDIT:** Since Jörg asked, here's how I did the "CMap transplant":   1. Make a file `test.tex` with the following contents:              \documentclass{article}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX,Numbers={OldStyle,Proportional}]{Minion Pro}     \begin{document}     The \mbox{\addfontfeatures{Letters=UppercaseSmallCaps}NATO} office 1234     \end{document}        2. Compile it with `xelatex` _and_ `lualatex` and uncompress each PDF with `pdftk`:              xelatex test     mv test.pdf test_x.pdf     lualatex test     mv test.pdf test_l.pdf     pdftk test_x.pdf output test_xu.pdf uncompress     pdftk test_l.pdf output test_lu.pdf uncompress        3. Open each uncompressed PDF file in a _text editor_ and look for the sections above. Delete the section from XeTeX's PDF and replace it with the equivalent section from LuaTeX's PDF (from `begincodespacerange` to `endcmap`).   4. The PDF is corrupted now, but `pdftk` will fix it:              pdftk test_xu.pdf output test_xf.pdf      Now `test_xf.pdf` will have the correct copy text. This is a neat proof-of- concept but it's useless for several reasons:   * You have to compile in XeTeX _and_ LuaTeX. If my files all compiled in LuaTeX then I'd just use LuaTeX and be done with it. That's the ideal solution here anyways.   * You can't make a "key file" that compiles in LuaTeX and then just put its CMap into every PDF you make using XeTeX, since XeTeX appears to assign random input codes (e.g., `<0044>`, `<0046>`, `<05C9>`) every time the file is changed. Transplanting a CMap which uses a different set of input codes results in _no_ characters being selectable.   * If you use more than one font, you need to fix the CMap for each one. This applies even to the same typeface in two different optical sizes. So the only way I can see this work is if someone made a program which had a built-in list of fonts and their problematic PUA references, which would go through every CMap section in a PDF line-by-line, identify the PUA references by their targets, and then change the targets according to the list. But that seems far too much work and at a certain point **you just have to migrate to LuaTeX**.


title: Problem with ragged lines

text: Somehow, the lines in my document are all ragged, i.e. the further use of `\raggedright` does not change the document. I do not know the command to undo this (I believe not ragged is the preset). Here are the packages I'm using, could it be one of them responsible for this?               \documentclass[12pt]{article}          \usepackage[letterpaper]{geometry}          \geometry{top=1.35in, bottom=1.35in, left=1.35in, right=1.35in}          \usepackage{setspace}          \usepackage{amsmath}          \usepackage{amssymb}          \usepackage{float}          \doublespacing          \usepackage{rotating}          \usepackage{multirow}          \usepackage{lineno}


title: Change .bst to put the pages number at the end

text: My question is simple, but I searched in vain for an answer. Right now, my bibliography style (.bst) gives the following result for an article : **Baumgärtel Hans, « Julius Weisbach und die Einführung der neuen Markscheidekunst in die Praxis », Zeitschrift für Bergbau, Hüttenwesen und verwandteWissenschaften, 13 (1), pp. 371–377, 1961.** I would like to have it with the pages number after the date, so this way : Baumgärtel Hans, « Julius Weisbach und die Einführung der neuen Markscheidekunst in die Praxis », Zeitschrift für Bergbau, Hüttenwesen und verwandteWissenschaften, 13 (1), **1961, pp. 371–377.** Here's the function, i've tried to work on it, but I really dont understand how it works :               FUNCTION {article}     { output.bibitem       format.authors "author" output.check       author format.key output new.block       format.title quote "title" output.check       new.block       crossref missing$         { journal emphasize "journal" output.check           eid empty$              { format.vol.num.pages output } %         { format.vol.num.eid output }       if$       format.date "year" output.check     }     { format.article.crossref output.nonnull            eid empty$         { format.pages output }         { format.eid output }       if$     }       if$       format.issn output       format.doi output       format.url output       new.block       note output       fin.entry     }      If you can help me, thanks very much in advance ... Thomas List of all used packages :               \usepackage{appendix} \usepackage{bredele} % Appel de bredele.sty %\usepackage[sectionbib]{natbib} %\usepackage{bibtopics} \usepackage[round]{natbib} \usepackage{amsmath} \usepackage[nodisplayskipstretch]{setspace} % pour virer les espaces dans les environnements equation et alig\usepackage{etoolbox} % it\usepackage{array} \usepackage[bottom]{footmisc} % pour coller les notes en bas de page \usepackage{array} % pour centrer verticalement dans les tableaux \usepackage{multirow}          \usepackage[T1]{fontenc} % un peu superflu, pour tenter d'améliorer l'hyphenation      \usepackage{lmodern} % un peu superflu, pour tenter d'améliorer l'hyphenation      \usepackage{index} % pour l'index      \usepackage{splitidx} % REMPLACE      \usepackage{multind}  %     \usepackage[T1]{fontenc} % NEW %     \usepackage[utf8]{inputenc} % NEW      \usepackage{colortbl}% pour les lignes en gris %     \usepackage{etoolbox} % pour utiliser \BeforeBeginEnvironment      \usepackage{french}[babel]      \usepackage{array}      \usepackage{lscape}      \usepackage[table]{xcolor} % mettre des cases de tableau en couleur %\usepackage{hyperref} % met des liens %     \usepackage{appendix}      \usepackage{chngcntr}      \usepackage[compact]{titlesec}      \usepackage{tikz} % pour des diagrammes simples      \usepackage[strict]{changepage} % pour mettre de grandes marges sur les pages d'annexes \usepackage{enumitem} \setlist{nolistsep}      \usepackage{framed} % pour mettre des textes dans des boites


title: best practice to include (standalone precompiled) graphics

text: ## General understanding I know that several people have asked about how to include plots and graphics (created by tikz and pstricks) into a latex document.   * What is the best way to include Matlab graphics?   * Including pictures in subdirectories with standalone package   * Best figure format practice to use?   * How can I use TikZ to make standalone (SVG) graphics? Now it seems evident to ask how to handle a big number of graphics. At first it seems crucial to pre-compile graphics that should enter the document to reduce compilation time. But there are many different ways to perform that issue and actually the package `standalone` seems the most auspicious. By trying it, I recognized that all files have to be in the same folder otherwise it would result in errors (Including pictures in subdirectories with standalone package). ## MWE               \documentclass{article}     \input{Style/macros.tex}     \usepackage{standalone}     \standaloneconfig{mode=buildnew}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{filecontents}          \begin{filecontents*}{Style/macros.tex}     \fontsize{10}{12}     \end{filecontents*}     \begin{filecontents*}{Documents/test_standalone_slave.tex}     \documentclass{standalone}     \input{../Style/macros.tex}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}          \begin{document}          \begin{tikzpicture}     \draw (0,0) circle (2);     \end{tikzpicture}          \end{document}     \endinput     \end{filecontents*}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     That's it!     \includestandalone{Documents/test_standalone_slave}     \end{document}      ## Question How do I now include graphics like the previous MWE (adapted from `matlab2tikz` for including my macros) in order to have the same common font size and shape (width and height)?


title: How to define frequently used variables in pseudocode?

text: ![alg_pic](http://i.stack.imgur.com/fSsX2.jpg) To generate the above pseudocode, I used the following code:               \begin{algorithm}     \caption{sample}\label{sample}     \begin{algorithmic}[1]     \Require $\mathbf{D} \in \mathbb{R}^{M \times N}$     \State $\mathbf{V}^{(0)} \in \mathbb{R}^{K \times N} \gets $ random matrix     \For {$t= 1:T$}         \State $\mathbf{U}^{(t)} \gets Update\mathbf{U}(\mathbf{D},\mathbf{V}^{t-1})$         \State $\mathbf{V}^{(t)} \gets Update\mathbf{V}(\mathbf{D},\mathbf{U}^{t})$     \EndFor      \State \Return $\mathbf{U}^{(T)},\mathbf{V}^{(T)}$     \end{algorithmic}     \end{algorithm}      The problem is I have to use `\mathbf` for all `D`,`U`and`V` to represent them as matrix or vector. Is there other way to define these variables once and no need to use `\mathbf` for all?


title: set DOI link on Journal Name with bibtex/.bst

text: > **Possible Duplicate:**   >  How to get DOI links in bibliography I'm struggling with a bibliography style problem. I would like to have the doi link set on the journal name, and then hide the doi key from the bibliography list. I've tried to write some bst-bibtex function, which produces many errors, warning me that the stack was empty. I can't remember all the errors. If you know something about `bibtex` code, help me please.               FUNCTION {journal_doi}     { doi duplicate$ empty$       { }       { "\href{http://doi.org/" doi * "}" *         journal empty$           { }           { "{" * journal * "}" * }         if$        if$       }     }


title: Add a hyperlink in bibtex

text: It's cool to add a hyperlink in references like this: ![enter image description here](http://i.stack.imgur.com/TTnZe.jpg) I want to know how to add the blue box in bibtex. For example, the following article's link is "ee".               @inproceedings{DBLP:conf/osdi/DeanG04,     author    = {Jeffrey Dean and                Sanjay Ghemawat},     title     = {MapReduce: Simplified Data Processing on Large Clusters},     booktitle = {OSDI},     year      = {2004},     ee        = {http://www.usenix.org/events/osdi04/tech/dean.html},     crossref  = {DBLP:conf/osdi/2004},     bibsource = {DBLP, http://dblp.uni-trier.de}     }


title: biblatex: Make title hyperlink to doi url (if available)

text: I'm using biblatex with the standard bibliography style. How or what should I modify so that the title is turned into a link pointing to a suitable doi url? (of course only if the doi is available)


title: deeplink bibliography items using Biblatex

text: > **Possible Duplicate:**   >  biblatex: Make title hyperlink to doi url (if available) I am looking for a way to make my bibliography items links to the articles on the internet using Biblatex. The input for this link should be the `OPTurl = {},` in Bibtex entry. As a side question, is there a way to do this using Biblatex-Chicago?


title: How to get DOI links in bibliography

text: I would like to add to all my bibliography items a DOI (Digital Object Identifier) link or a link to a download location. How can I do this with the `natbib` / BibTeX / `hyperref` combination? Currently I am using the `plainnat` style, but I'm willing to change that.


title: How to cite an online article with hyperlink to its online source in bibliography section

text: > **Possible Duplicate:**   >  How to get DOI links in bibliography   >  biblatex: Make title hyperlink to doi url (if available) I use TeXShop, BibDesk and NatBib, and am a beginner with BibDesk and the whole bibliography job. I am trying to cite articles with `hyperref` (that I already know how) but want to have hyperlinks in the bibliography section to online articles. How can I hyperlink so that only the title but not the web address shows up?


title: table of tables using memoir

text: I need help to create a "table of tables" using memoir. I'd like to use the booktabs features embedded in memoir. What I'm trying to typeset is something like subfloats, having two 2x2 matrix of (small) tables inside the same page and having a main caption for the table and sigle captions for every table. I was able to achieve it by using the \newsubfloat{figure} inside a figure enviroment and then using the \subbottom commands to add the tables. However, the problem is the environment is not a table environment and then the labels and captions are not referring to tables. How could I do?


title: Typeset assigments +=, -= etc nicely?

text: Could someone please show me how to get LaTeX to properly typeset the -=, += assignment operators. I have tried               $a -= 1$     $a\texttt{-=}1$     $a\verb!-=!1$      but they all look really ugly. I have been searching all over to find a solution for this, but apparently I am the only one with this problem. And I only have two such assignments in my whole document, so I am not interested in typesetting arbitrary blocks of C++ code, just those two assignments


title: translated from <language> by <translator> in biblatex

text: I could not find a biblatex style showing the language of a reference from which it is translated when the `translator` field is used even though the fields `language` and `orilanguage` are correctly filled in. In the `biblatex` guide (v1.7), I can see p. 183 that strings such as `fromenglish` are allowed but I cannot figure out how to have them in the final output.


title: How to adjust font size in TikZ state diagram

text: I want to decrease the font size of nodes to avoid the conflict of this edge penetrating the Node(D) I just want to decrease the size not anything else, IN ADDITION, if there is a way to decrease the nodes' radius would be great..


title: How to indent the bibliography?

text: > **Possible Duplicate:**   >  Indent second line of a bibliography I need to indent the second line for each paper in my reference list. How could I do this? Thanks


title: algpseudocode without end block text

text: `algpseudocode` lets me write code such as:               \documentclass{article}     \usepackage{algpseudocode}     \begin{document}          \begin{algorithmic}     \While{$n>3$}        \If{$m>n$}           \State ...           \State ...        \EndIf        \If{$m>2$}           \State ...        \EndIf     \EndWhile     \end{algorithmic}          \end{document}      Yielding results similar to               while n>3        if m>n            ...            ...        end if        if m>2            ...        end if     end while      I'd like all of that "end if", "end while", "end procedure" text to disappear and everything to compress upwards such that the result is:               while n>3        if m>n            ...            ...        if m>2            ...      That is, I'd like a Pythonic-style where indentations indicate blocks. Can `algpseudocode` do this? Or is there another package with similar functionality?


title: Is there an easy way to add hover text to all incidents of math mode where the hover text would contain the LaTeX code?

text: Adding hover text (I believe the technical term is a tooltip) to any part of any LaTeX document can be accomplished using `cooltooltips.sty`, as I have recently learned. I would like to do something a little more large scale. I would like to compile my documents so that every instance of math mode or math display mode automatically puts the defining LaTeX code as a tooltip (text hovering over it). So for example, my nicely typeset `$\frac{a}{b}$` can also show the user that very same code: "`\frac{a}{b}`". Ideally, I'd also like this to apply to math mode environments like `align`. I have two reasons for wanting to do this:   1. Math accessibility to the visually impaired is becoming a big issue. Some universities have been sued in the last few years for not complying with the Americans with Disabilities act because visually impaired students have little or no way to read math - be it LaTeX, MathML, MS Equation Editor, or whatever. Rather than wait 20 years for a screen reader that can accurately verbalize math on a pdf, I want to let screen readers verbalize the LaTeX code and let the visually disabled student interpret that code. It is an effective way to communicate math to sight-affected students as long as we're not talking about something intense like nested fractions.   2. For teaching others what code was used to typeset something, this would be a nice tool to have. It doesn't look like there is a package for doing this after a search on CTAN. Does anyone have any ideas?


title: How compose an image from a specific text?

text: I love playing around with ASCII art and, as you may know, there are tools to generate ASCII art from images, where the ASCII consists of those characters which will result in the best image, as this first picture shows: ![enter image description here](http://astr0baby.files.wordpress.com/2012/08/eye.gif) With the eye, you need ASCII characters with a lot of white (e.g. dots, commas, hyphens) to generate the brighter areas and characters with a lot of black (e.g. M, $) to generate darker areas. Now, what I want to achieve is being able to control the characters which make up the image. An example which is halfway there is the following image, where the story forms the shape of a raven. ![enter image description here](http://i.stack.imgur.com/CMVwx.png) However, this raven is only flat, with no depth like the eye has. I would like to combine the examples with the eye and the raven. Would it be possible to achieve the same kind of effect in \LaTeX either by using different shades of grey, or by using different sizes, for each individual character? So, for brighter areas, use a light grey or small black character, and for darker areas, use black and large characters. Does this make sense? Is it possible to achieve in an automatic way with `\LaTeX?`


title: Adding section number after section title with titlesec package

text: I am having difficulty adding the section number after the section title. Normally the order is section number followed by section title. I want it to be the opposite. I am looking for what I should add to the following `.tex` file code:               \usepackage[compact]{titlesec}     \titleformat{\section}[runin]{\large\bfseries}{\thesection}{}{}


title: Automatically check if a math character is greek or latin

text: My question is similar to Bold math: Automatic choice between \mathbf and \boldsymbol for Latin and Greek symbols?, yet slightly different. My non- compilable minimal example is the following one:               \documentclass{book}     \usepackage{amssymb}     \newcommand{\tensor}[1]{if latin alphabet \mathbb{#1} else \mathbf{#1}}     \begin{document}     $\tensor{A}$ $\tensor{\Lambda}$     \end{document}      Is what is suggested achievable? From the example below, I understand that there is no efficient switch at this time between Latin and Greek math alphabets if one uses pdflatex. I also understand that one solution would be to switch to lualatex where Latin and Greek alphabets are handled differently.


title: How can I make text figures document wide standard for numerals in Context?

text: In a CV I would like all numbers to be text figures. I can do this manually by using the `{\os 123}` switch locally, but I would like text figures to be the default in the document. How? If I make it the default, can I override it in some way if I **want** titling figures?


title: Regular Expressions in refs (i.e., \ref{tab:foo.*} )

text: Sometimes I want to refer to a long list of tables or figures. I've labelled them in categorical ways, but it's a lot of typing (I'm lazy programmer) to type out something like:               \ref{tab:foo1}, \ref{tab:foo2}, \ref{tab:foo3}, \ref{tab:foo4}      the ideal result of which looks like : > 1, 2, 3, 4 Wouldn't it be nice if I could just use regexes here instead? That is:               \ref{tab:foo.*}      Or, even better :               \ref{tab:foo[0-9]*}      I'm not very hopeful that this exists. I'm mostly just curious : Does anyone know of a package that enables this?


title: How do you remove the vertical distance between references in lyx?

text: Using LyX, a BibTeX file and the `unsrt` bibliography style. The program automatically leaves an empty line between each reference, wasting lots of space in the process! Is there any way to force LyX to leave no vertical gaps between references? Here is a LaTeX MWE (more or less generated by LyX) showing the problem:               \documentclass{article}     \begin{document}     \bibliographystyle{unsrt}     \nocite{*}     \bibliography{testlyx}     \end{document}      ![enter image description here](http://i.stack.imgur.com/aMKEL.png) And here is the sample file "testlyx.bib":               @ARTICLE{authorA,       author = {AuthorA},       title = {This is the title A},       journal = {journal A},       year = {1993},       volume = {47},       pages = {58--61},       month = {Feb}     }          @ARTICLE{authorB,       author = {AuthorB},       title = {That is the title B},       journal = {journal A},       year = {1994},       volume = {50},       pages = {53--79},       month = {May}     }


title: How to make an environment star Exercise?

text: I want to create an environment star Exercise, but I can not. Please help me.               \documentclass{book}          \usepackage{amsfonts}         \usepackage{amssymb}         \usepackage{amsmath}         \newtheorem{ex}{Exercise}[chapter]         \begin{document}         \chapter{First Chapter}         \section{First section}         \begin{ex}         This is an Exercise         \end{ex}              \begin{ex}         This is an Exercise         \end{ex}              \end{document}      If next is a difficult Exercise, how to define new environment Exercise star, for example `\textbf{Exercise} $1.3^\text{*}$`.


title: Linear regression - trend line with pgfplots

text: I am trying to display a trend line with pgfplots. I followed the instruction in the manual and looked around. I though I had implemented it correctly, but there is no regression line, and although the dots display correctly. Any suggestions?               \begin{tikzpicture}[scale=1]     \begin{axis}[        /pgf/number format/.cd,             use comma,             1000 sep={}]     \addplot [color=blue, only marks] coordinates{     (   1985    ,   293.4445874757  )     (   1986    ,   279.3118605376  )     (   1987    ,   282.6149240816  )     (   1988    ,   275.0321316854  )     (   1989    ,   282.514265914   )     (   1990    ,   265.2009422222  )     (   1991    ,   275.1986687778  )     (   1992    ,   284.7559793069  )     (   1993    ,   276.545687619   )     (   1994    ,   292.6098138043  )     (   1995    ,   302.9776170115  )     (   1996    ,   319.0738164198  )     (   1997    ,   299.9292631959  )     (   1998    ,   361.3646108235  )     (   1999    ,   293.1112261224  )     (   2000    ,   294.2231206931  )     (   2001    ,   283.6616129293  )     (   2002    ,   313.2993810185  )     (   2003    ,   273.69578875    )     (   2004    ,   278.5970550926  )     (   2005    ,   286.7000069643  )     (   2006    ,   262.0665872115  )     (   2007    ,   245.7247934066  )     (   2008    ,   258.789477  )     (   2009    ,   239.1641025714  )     (   2010    ,   243.2148177778  )     (   2011    ,   240.0082707477  )     (   2012    ,   242.0303828571  )     (   2013    ,   230.697315  )};     \addplot table[y={create col/linear regression={y=Y}}]{     (   1985    ,   293.4445874757  )     (   1986    ,   279.3118605376  )     (   1987    ,   282.6149240816  )     (   1988    ,   275.0321316854  )     (   1989    ,   282.514265914   )     (   1990    ,   265.2009422222  )     (   1991    ,   275.1986687778  )     (   1992    ,   284.7559793069  )     (   1993    ,   276.545687619   )     (   1994    ,   292.6098138043  )     (   1995    ,   302.9776170115  )     (   1996    ,   319.0738164198  )     (   1997    ,   299.9292631959  )     (   1998    ,   361.3646108235  )     (   1999    ,   293.1112261224  )     (   2000    ,   294.2231206931  )     (   2001    ,   283.6616129293  )     (   2002    ,   313.2993810185  )     (   2003    ,   273.69578875    )     (   2004    ,   278.5970550926  )     (   2005    ,   286.7000069643  )     (   2006    ,   262.0665872115  )     (   2007    ,   245.7247934066  )     (   2008    ,   258.789477  )     (   2009    ,   239.1641025714  )     (   2010    ,   243.2148177778  )     (   2011    ,   240.0082707477  )     (   2012    ,   242.0303828571  )     (   2013    ,   230.697315  )};     \end{axis}     \end{tikzpicture}


title: Is there any means by which to severely discourage breaking a line in a would-be box?

text: I have a small section of text—no more than 15 or 30 characters—that is split up into a few words. I'd like to add a penalty to breaking in this section, but I don't want to completely bar it and risk a truly awful paragraph. How can I effect this?               I have some text and \DiscourageBreak{some text that \emph{shouldn't} be broken.}      I looked at a list of penalties available on this site, but I didn't see one that seemed appropriate.


title: Import footnotes from one file

text: Like as bibtex is there anyway to import footnote from one tex files. What I come up with is               %--------------------------------------------Footnote references from label     \makeatletter     \newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}     \makeatother      and put a level in each reference               here\footnote{\label{note1}This is the labeled footnote}      and furthermore call the footnote with the label name as follows               Here\footnoteref{note1}      By adding like this footnote automatically visible in the first case. This approach is appropriate if I want to refer same footnote in multiple places. What I basically want is **like as bibtex add the footnote with specific ID or reference name ?** Thanks and any suggestion will be greatly appreciate.


title: My table is larger than the text box and I want to make it smaller

text: I have some tables that larger than my box text, but not my page. If I don't want to use the rotate package, what can I do to solve this problem? For example a picture of one of my pages is below ![enter image description here](http://i.stack.imgur.com/Y9Tyk.png) (My language is Persian). Did you mean this code:                \begin{table}     \begin{center}     \begin{tabular}{|1 | {l}|{l}|{l}|{l}|{l}|{l}|}     \hline     طول گام & $50$ نقطه & مدت زمان & $100$ نقطه & مدت زمان & $500$ نقطه & مدت زمان\\     \hline      $h=.5$& $11.8860$  & $.736471 $ & $11.8904$ & $.888925$  & $11.898$ & $3.562203$ \\      & $5.7892$&&$5.7918$&&$5.7926$&\\     \hline      $h=.25$ & $11.8877$&$.908528$ & $11.8921$ & $1.347235$ & $11.8956$ & $6.909139$   \\      & $5.7917$&&$5.7943$&&$5.7951$&\\     \hline     $h=.125$ & $11.8898$ & $1.800350$ & $11.8944$ & $2.689663$ & $11.8971$ & $14.014022$ \\       & $5.7932$&&$5.7957$&&$5.7965$&\\     \hline      $h=.0625$ & $11.8913$ & $4.274611$ & $11.8957$ & $6.344984$ & $11.8971$ & $28.677729 $ \\        & $5.7940$&&$5.7965$&&$5.7974$&\\     \hline      $h=.03125$ & $11.8921$ & $11.680354$ & $11.8965$ & $15.990138$ & $11.8979$ & $60.642217$\\         & $5.7944$&&$5.7970$&&$5.7978$&\\     \hline     $h=.015625$ & $11.8926$ & $37.061820$ & $11.8970$ & $46.333275$ & $11.8984$ & $134.800034\\      & $5.7946$&&$5.7972$&&$5.7980$&\\      \hline      $h=.0078125$ & $11.8928$ & $131.220405$ & $11.8972$ & $147.617634$ & $11.8986$ & $324.236971$ \\     & $5.7948$&&$5.7973$&&$5.7982$&\\     \hline      $h=.00390625$ & $11.8929$ & $488.012921$ & $11.8973$ & $519.168699$ & $11.8987$ & $893.012911$ \\     & $5.7948$&&$5.7974$&&$5.7982$&\\      \hline      $h=.001953125$ & $11.8930$ & $1889.675150$ & $11.8974$ & $1953.356823$ & $11.8988$ & $2723.479288$ \\     & $5.7949$&&$5.7974$&&$5.7982$&\\     \hline           \end{tabular}     \end{center}     \caption{نتایج مربوط به روش رانگه کوتا $2$ \label{tab=4.11}}     \end{table}


title: How to use \mainline with chessboard and skak packages on large chess boards?

text: I have a number of very large chessboards that I am setting, as a part of some work on infinite chess. I have been using the chessboard package, which is great. But I am having difficulty with using \mainline on these nonstandard size boards. Take for example the following position, which is used in one of my papers. ![A position with value $\\omega^3$](http://i.stack.imgur.com/3Eehz.jpg) This is the code to generate the first z columns of it:                 \documentclass{article}       \usepackage{chessboard,xskak}       \begin{document}            \chessboard[maxfield=z29,                   boardfontsize=9pt,                   labelbottom=true,                   labelleft=true,                   labelfontsize=6pt,                   labelleftwidth=2ex,                   showmover=false,                   borderleft=false,                   borderright=false,                   bordertop=false,                   borderbottom=false,                   coloremphstyle=\color{green!25!black},                   emphfield=m6,                   coloremphstyle=\color{blue!50!black},                   emphfields={n12,q15,t18,w21,z24},                   coloremphstyle=\color{red!50!black},                   emphfield=k9,                   pgfstyle=straightmove,linewidth=.05ex,                   backmove=m6-p9,                   margin=false,                   setfen=%       6PPPPP1PP1PP1PP1PP1PB/%       6PPPPP1PP1PP1PP1PPrP1/%       6PPPPP1PP1PP1PP1P1BpB/%       6PPPPP1PP1PP1PP1PB1P1/%       6PPPPP1PP1PP1PPrP1BPB/%       6PPPPP1PP1PP1P1BpB1PP/%       6PPPPP1PP1PP1PB1P1BPB/%       6PPPPP1PP1PPrP1BPB1Pp/%       6PPPPP1PP1P1BpB1PPBpP/%       6PPPPP1PP1PB1P1BPBpP1/%       2K3PPPPP1PPrP1BPB1PpP2p/%       6PPPPP1P1BpB1PPBpP2pP/%       6PPPPP1PB1P1BPBpP2pP/%       6PPPPPrP1BPB1PpP2pP/%       6PPPP1BpB1PPBpP2pP/%       6PPPPB1P1BPBpP2pP/%       3r2PPPP1BPB1PpP2pP/%       6PPPkB1PPBpP2pP/%       6PP1P1BPBpP2pP/%       6PPBPB1PpP2pP/%       6PPPPPBpP2pP/%       6PPPPBpP2pP/%       6PPPP1P2pP/%       6PPPPBPbpP/%       6PPPPPP1p/%       6PPPPPP1P/%       6PPPPPP/%       6PPPPPP/%       6PPPPPP/%       ]%            \end{document}      Now, my question. What I want to do is set this as the initial position of a game, with black to move, and then make commands like                \mainline{1...Bu14}      \chessboard       \mainline{2.xu14}      \chessboard      to show the next position, and so on. (Actually, my intention is to do this for dozens of moves and animate the play, but I can't even manage to do one step.) Could someone explain to me how to make this work?


title: nameref + fontenc causes umlauts in aux-File

text: I wrote a small new command that makes use of `\@currentlabelname` and `\nameref`. When I have Umlauts in the labelname (the argument of `\@currentlabelname`) everything works fine until I use the fontenc package. Then the umlauts are not correctly escaped/transformed into the .aux-File, which then causes an inputenc error. Here is a minimal example. Run twice to get the error! Any ideas how to make this work with fontenc?               \documentclass{scrartcl}     \usepackage[T1]{fontenc} %causes Umlauts in -aux-file and therefore an inputenc-error on the second run     \usepackage[utf8]{inputenc}     \usepackage{hyperref}          \makeatletter     \newcommand\AP[1]{%         \subsubsection*{#1}%         \edef\@currentlabelname{#1}%         }     \makeatother     \begin{document}         \AP{endgültig}         \label{foo}         \nameref{foo}     \end{document}


title: How to define a complicated hyphenation for Chinese pinyin

text: I am setting a document with Chinese pinyin. I use `\\-` to separate syllables in pinyin phrases (eg. `zhong\\-wen`). This not only allows for proper hyphenation, but also allows spell check in Emacs/AUCtex. A problem occurs with the hyphen for such words as Chang'an or Xi'an. Entering these words as `Chang'\\-an` or `Xi'\\-an` would retain the apostrophe even if hyphenated at the end of the line. Is there a way to make the apostrophe drop if the word is hyphenated, but kept otherwise?


title: How do I make a TikZ/pgfplots scatter plot without lines between points

text: I am attempting to make a scatter plot from a table of data. I seem to have almost succeeded, but there are lines between the points. I do not want this to happen, but I can't figure out how to remove them. My current code is               \begin{tikzpicture}[domain=0:3]     \begin{axis}[xlabel={$T_{\text{meas}}$}, ylabel={$T_{\text{cal}}$}]     \addplot[scatter, scatter src=\thisrow{class},           error bars/.cd, y dir=both, x dir=both, y explicit, x explicit, error bar style={color=mapped color}]           table[x=x,y=y,x error=xerr,y error=yerr] {         x       xerr    y        yerr       class         0.98521 0.00031 1        0.000001   0         0.49238 0.00044 0.5      0.00000025 0         1.09346 0.00032 1.111111 0.0000012  0         1.23021 0.00078 1.25     0.0000016  0         1.40567 0.00047 1.428571 0.000002   0         1.63971 0.00064 1.666667 0.0000028  0         1.96753 0.00063 2        0.000004   0     };     \end{axis}     \end{tikzpicture}      This creates a plot that looks like this ![scatter plot with lines](http://i.stack.imgur.com/JqFYN.png) but I want it to look like this ![scatter plot without lines](http://i.stack.imgur.com/HYHF5.png) How can I make this happen?


title: Right superscript dot

text: I would like to achieve the following: a dot right of an expression with this minimal example               \documentclass{article}     \usepackage{amsmath}     \usepackage{accents}          \newcommand{\dotr}[1]{%     #1\accentset{\mbox{\bfseries .}}{\vphantom{#1}}}          \begin{document}     $\dotr{(X+Y)}$     \end{document}      but the dot is too high. How can I lower the dot? Thanks a lot!


title: How to force letters augmented with a mathematical symbol to be placed in an alphabetical order in the glossary?

text: I'm using the `nomentbl` package to generate a glossary of my symbols. This works great for most general cases.   I'm using a class file where commands are defined to include Latin and Greek symbols as follows:               % Latin symbols     \newcommand{\lsymb}[5]         {#1\nomenclature[A#3]{#1}{#2}{#4}{#5}}     % Greek symbols     \newcommand{\gsymb}[5]         {#1\nomenclature[G#3]{#1}{#2}{#4}{#5}}      If I want to include a Latin symbol I type:               \lsymb{Symbol}{Explanation}{[Unit]}{}      The nomenclature then contains two separate lists, one for the Latin and one for the Greek symbols. Just now I've encountered a "special" symbol, being a `c` with a bar over it (`$\bar{c}$`). I declare it as a Latin symbol expecting it to turn up next to other symbols starting with a `c`. However, it is printed at the beginning of the Latin symbols list. How can I force `nomentbl` to place this symbol next to other symbols starting with a `c`? Can I maybe pre-pend a non-printing `c` to the `$\bar{c}$ to help`nomentbl` categorize it?


title: using symmetry of axis / point in pgfplot?

text: Is there a way to use symmetry of axis or a point in `pgfplot`? So that you have only to define half numbers of the coordinates or only one quarter? e.g. for doing things like this: ![enter image description here](http://i.stack.imgur.com/sKUHx.png) with less effort? example code with data (table) for "one quarter" which should be "mirrored" to achieve something like the figure above:               \usepgfplotslibrary{polar}          %%%% for speed only: %%%%%%     \usepgfplotslibrary{external}     \tikzexternalize     \tikzsetexternalprefix{tikz-fig-precomp-cache/}     %%%%%%%%%%               \begin{figure}[H]         \centering     \begin{tikzpicture}     \begin{polaraxis}[     xticklabel=$\pgfmathprintnumber{\tick}^\circ$,     ymin=0,     ymax=0.7]     \addplot  [smooth, color=blue]     table{     90 0.4     30 0.45     0 0.47     };     \end{polaraxis}     \end{tikzpicture}     \caption{Polar}     \end{figure}


title: How to use the standalone package in beamer?

text: I have a beamer presentation that shows a lot of graphs (in the sense of graph theory) and it takes a lot to compile. I think that the `standalone` package might help me but I cannot see how. Let us say this is my main document (I'm using Emacs, and an updated vanilla TeX Live 2011 in Ubuntu 11.10):               \documentclass{beamer}     \usepackage[mode=buildnew]{standalone}          \begin{document}       \begin{frame}          %\includestandalone{simpleframe}          \input{simpleframe}       \end{frame}     \end{document}          %%% Local Variables:     %%% LaTeX-command: "latex -shell-escape"     %%% End:      and this is the file simpleframe.tex:               \documentclass[beamer]{standalone}          \begin{document}       \begin{standaloneframe}         \only<1>{One}         \only<2>{Two}       \end{standaloneframe}     \end{document}      Then:   * compiling simpleframe.tex is OK   * compiling the main file is OK as it is   * compiling the main file with `\includestandalone` only shows the first overlay, and with overfull boxes. I would like the advantages of `[mode=buildnew]`, and, isn't true that for that I need to use `\includestandalone`? How do I do that?


title: How to automatically cite your own publications in a resume?

text: Is there a biblatex style (or another mean to generate this automatically) designed to autocite (citing your own work)? It could be useful in a resume or for exporting to your website a list of publications. Here is a example of what I want : In my (zotero) library, I have my work. If I cite these papers, I will obtain somthing like : > John Doe, _Electric equilibrium_ , Journal of quantum mechanic, 2043 (2), > 143-157 _But_ , when you create a list of publications, you may want (and I do) to remove author which is irrelevant in this context and replace it by a dot (list item). Like this : >   * _Electric equilibrium_ , Journal of quantum mechanic, 2043 (2), 143-157 > And if you have multi-authors papers, you may want to replace > John Doe and foo bar , _Electric equilibrium_ , Journal of quantum mechanic, > 2043 (2), 143-157 by (note the "with"): >   * _Electric equilibrium_ (with foo bar), Journal of quantum mechanic, 2043 > (2), 143-157 > I would like to save me the pain to do this by hand.


How to fix kerning of comma/colon after quotes? Hello, I’m a relative newbie in latex and am trying to reduce the space between closing quotes and colon/comma, but by a general way in the preamble, not by manual `\kern` commands. My document is actually in Portuguese, where it’s common to keep punctuation after the quotes (unlike English). Also, it is written in Markdown and translated into Latex by Pandoc; so it has a lot of `\enquote` followed by `\autocite` commands, which may be followed by colons/commas. Since I’m using biblatex’s footnote style, these cases are also problematic. In the next sample, my current situation is in line 1, but want it to look more like lines 2 or 3.               \documentclass{article}     \usepackage[autocite=footnote]{biblatex}     \begin{document}     1) \enquote{something}\autocite{key}, or \enquote{something}.     2) \enquote{something}\kern-.3em,\autocite{key} or \enquote{something}\kern-.3em.     3) \enquote{something\makebox[0pt][l]{,}}\autocite{key} or \enquote{something\makebox[0pt][l]{.}}     \end{document}      ![Resulting image](http://i.stack.imgur.com/jUKnP.png) Since Pandoc substitutes all quotes in my source file with `\enquote` commands, maybe a patch to it could do (but I dunno if it can deal with the interposed `\autocite`). I'm using pdflatex as processor.


title: Longtable: how to force a page break?

text: I am writing an application and I have to complete a table similar to this: ![Example table format](http://i.stack.imgur.com/SrZGT.png) and since the descriptions in the second column will be lengthy, I have decided to use `longtable`. Some of the descriptions use `itemize` and since I have read that I cannot force split a cell across two pages, I have tried to place the list items in different rows. However, I am finding that since there is still a lot of text in each bullet point, `longtable` appears to have problems knowing when to break to a new page and so my table goes into the page footer and off the bottom of the page. Here is an example .tex code (sorry it is still quite long, but this also to show the list of the packages that I am calling):               \documentclass[11pt,a4paper]{article}     \pdfoutput=1     \usepackage[T1]{fontenc}     \usepackage[scaled]{helvet}     \renewcommand*\familydefault{\sfdefault}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage[margin=10pt,bf,belowskip=-5mm]{caption}     \usepackage{fancyhdr}     \usepackage{array}     \usepackage{multirow}     \usepackage{color}     \usepackage{pifont}     \usepackage{longtable}     \usepackage[table]{xcolor}     \usepackage{colortbl}     \addtolength{\hoffset}{-20mm}     \addtolength{\textwidth}{40mm}     \addtolength{\voffset}{-10mm}     \addtolength{\textheight}{20mm}     \pagestyle{fancy}     \lhead{}     \chead{{\bf Acronym} -- Fellowship application}     \rhead{}     \lfoot{}     \cfoot{Part B --- Page \thepage\ of \pageref{LastPage}}     \rfoot{}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\headheight}{13.6pt}          \begin{document}          \section{Capacites of participating organisations}     \label{sec:organisations}     \begin{table}[h]     \renewcommand{\arraystretch}{1.5}     \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}     \begin{tabular}{|P{2.4cm}|P{13.5cm}|}       \hline       \multicolumn{2}{|>{\columncolor[gray]{.8}\arraybackslash}l|}{\textbf{Beneficiary:                                                                                X}}\tabularnewline \hline {\bf General Description}&The       Mordor Institute is one of the 20 institutes that form the National       Institute (NI). The Institute is active in research in all       the thematic macroareas (MAs) in which NI research and development       activity is organized:       \begin{itemize}       \item MA-1: Weapons       \item MA-2: Tactics       \item MA-3: Metal work       \item MA-4: Fighting       \item MA-5: Jewelry and crafts       \end{itemize}            The Institute also carries out an intense outreach and education activity. The       shares projects, facilities, activities, supervision of students with       the Department of Death of the University of Mordor. Tight       connections and collaborations are also established with other       research Institutes located in the Mordor area.\tabularnewline       \hline       {\bf Role and commitment of key persons}&{\bf Supervisor:} Sauron               (Director)\tabularnewline       \hline       {\bf Key research facilities, infrastructure \& equipment}&       \begin{itemize}        \item {\bf Offices:} the main tower hosts Sauron's office,         the administration offices, the computing and IT services,         and research office spaces, including meeting rooms and a video         conference room. A separate tower, located         over 1000 meters away, hosts the majority of researchers working         in archery and troll hunting, and is shared         with researchers of the Weapons Division of the Department of         Death. This logistic arrangement is optimal to enhance         interactions and promotes inter-institute collaborations without         affecting the management of administrative issues.              Upon joining up, the Recruit will be provided with a shared office         in the far away tower.  Printers, supplies, meeting rooms, a large         seminar room are all available in situ. Full access to licensed         versions of electronic journals and full-text of some electronic         collection is guaranteed as well as a scanned book service and         physical access to historical archives.       \item {\bf Training:} the Recruit will be granted access to two         armories devoted to training, which have 1000 swords and 1500         spears. The two armories have a storage capability of above 10000         helmets. An agreement with Saruman and Smaug was signed in June to         guarantee to Mordor recruits preferred access to a large ring         crafting facility recently acquired by these two villains.              In addition, the Recruit will have preferred access to the Warg         Riding School (WRS) located in Minas Morgul thanks to the partnership         with the NI and with the University of Death.      \end{itemize}\tabularnewline\hline      &\begin{itemize}       \item {\bf Other facilities:} Given Sauron's membership in the         SUPREMECY Consortium, the Recruit will be provided with other         resources such as a diary, pens, paper, unlimited soda refills,         tea and coffee making facilites, biscuits and cake.     \end{itemize}\tabularnewline     \hline          \end{tabular}     \label{organisations_table}     \end{table}     \end{document}      and here is the output: ![Page 1](http://i.stack.imgur.com/UfJ66.png) and ![page 2](http://i.stack.imgur.com/2sWdm.png) N.B. My `longtable` has NO headers or footer. So, my questions are: i) How can I force a page break to stop `longtable` going into the footer? Can I use `\newpage` inside the `longtable` environment? ii) How can I tell LaTeX that I want the `longtable` underneath the section title? I do not force any page break here. (Guessing this is also to do with the `longtable` being longer than the length of the page...) I need to finish this application soon and my LaTeX knowledge is basic, so a "plug & play" solution would be wonderful! Thanks!


title: Running several latex processes in parallel

text: I am working on an experiment running LaTeX on server to compile some documents on the fly. Assuming I want to have several workers waiting for documents to be compiled, are there any access issues in running several `latex` / `lualatex` processes in parallel? Should I for example duplicate the `texmf-var` directory for each process to avoid issues when generating `ls-R` or font files in parallel?


title: Is there a package with standard theorem environments and math functions

text: I would like a package that defines nice things by default like:   1. Theorem environments like definition, property, example etc.   2. Standard includes like subfloats, the amsmath family   3. Reference functions like `\sectionref`, `\algorithmref` etc.   4. Math functions like `\argmin`, `\trace`, etc. Essentially, I would like all the settings of the JMLR class, but be able to use it in a separate class (something for a thesis). I have tried modifying the secondary class (`thesis.cls`) to use JMLR as the base (`\LoadClassWithOptions`), however it complains because I need to use chapters.


title: A macro that passes each word of its argument to another macro as an argument?

text: I'd like a command that works like this:               \dothings{Takes several words as argument}      and have this expand to:               \@dothings{Takes} \@dothings{several} \@dothings{words}...      I know how to define a simple macro that takes everything up to the next space, but I don't know how to use that to apply it to _each_ word in a sentence. Is there a simple way to do this? I'm also curious about taking the next _letter_ as an argument, but I guess that's maybe a separate question...


title: How to convert "plain TeX" to LaTeX

text: I want to convert to LaTeX from plain TeX. I try use Emacs, but I can't. The document is this.


title: Vertical vectors in angle brackets

text: I wanted to produce the following formula: ![a vertical vector in angle brackets](http://i.stack.imgur.com/dKTV2.png) which is nothing but a vertical vector in angle brackets. I expected the following code to do the job:               \left\langle         \begin{matrix}           a  \\           b  \\           c  \\           d  \\         \end{matrix}     \right\rangle      However, the result is: ![result](http://i.stack.imgur.com/bxCiz.png) It seems that, contrary to brackets and parentheses, the angle brackets do not extend beyond some certain limit. Is there a workaround?


title: Adding slurs to words in a text

text: Friends, I have a special case in which I need to insert slurs (music) in some words in a text. A slur is a curved line connecting notes on a score to indicate that they are to be played or sung legato: ![Slur 1](http://i.stack.imgur.com/y1qNh.png) ![Slur 2](http://i.stack.imgur.com/eKEe0.png) It would be something like this: ![Hello world](http://i.stack.imgur.com/MBFjP.png) These "text" slurs won't be used on very long words. I thought of using `\draw (point) arc (x:y:z)`, but I'm stuck on how can I obtain the arc lenght for such words. Besides, I have no idea of what to do if there's a line break, though I don't believe this will ever happen. I don't if there are any specific packages for this purpose. Slurs are common in music, but not in text (at least, on this context). Any ideas?


title: Background image for minipage

text: I'd like to put a background image into a minipage, stretching exactly to the surrounding fbox. What's the best option to do that? (Searching the web, I only found solutions for backgrounding the whole page)


title: \batchinput (docstrip) in a different directory

text: `docstrip`provides the macro `\batchinput`, which calls a separate `ins` file. This file can be in a different directory with, say:               \batchinput{../contrib/xx.ins}      and they are generated, but in the same directory as the master `ins`. However, I want them to be generated in the same directory as the `dtx/ins` files. I've tried               \def\WriteToDir{../contrib/}      But then I get               ! I can't write on file `../contrib/xx.ldf'.      **Edit** ... because TeXLive doesn't allow paths beginning with two dots. I know `\BaseDirectory`, but this is intended for specifing the root directory of the TEX hierarchy (locally, by administrators). How can I tell `docstrip` the files must be generated in the same directory as the `dtx/ins` files? **Edit** In other words, I wonder if these `ins` files can be run without having to set the path of the corresponding files (only the `ins` one).


title: How do I place a single character from unicode in a LaTeX document?

text: I want to place a character from several, non-Latin, languages. I guess I can do this using unicode, but how do I do that? Specificaly, I want to place the Hebrew Aleph and the digit currently used in Arabic for 1.


title: LaTeX datatool problems

text: I'm using `datatool` package on a LaTeX document. I use it to write labels. I have the addr on a CSV file. The problem is that I'm unable to write more that 25 labels. It seem like if `datatool` can't load more that 25 line from CSV. Any idea? this is the .cvs file:               nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov     nome,via,,cap,localita,prov      and this is the code:               \documentclass{letteracdp}     \usepackage[italian]{babel}     %\usepackage{envlab}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{datatool}     \usepackage[usenames]{color}     \usepackage [normalem]{ulem}     \usepackage[utf8x]{inputenc}     \usepackage{textcomp}     \usepackage{tabularx}     \DTLloaddb{indirizzi}{/home/kde/Dropbox/associazione/documenti/ind_sas.csv}     %     \pagestyle{fancy}     \makelabels     %     \begin{document}     \DTLforeach*{indirizzi}{%     \nome=nome,\cognome=cognome,\via=via,\civico=civico,\cap=cap,\localita=localita,\prov=prov,}{     %     \begin{letter}{\emph{\textbf{\nome \space }\\\via\space \\\textbf{\cap},\space \localita\space  \prov}}     %     \end{letter}     }     \end{document}


title: \index causing spurious whitespace

text: I'm having a problem with the `\index` command causing unwanted whitespace:               \documentclass[a4paper,11pt,oneside]{book}     \usepackage{makeidx}     \makeindex          \def \nothing #1{}          \begin{document}          \noindent The Principle of Availability\\\index{principle of availability}     What is said must be intuitively accessible to the conversational participants,      unless something goes wrong and they cannot be counted as `normal interpreters'.          \end{document}      If this is compiled, the line starting with "What is said" has a slight indent. This indent is gone if I add a `\relax`, or a `%` after the `index{...}` command, I guess since that gobbles up the newline following it. If there is no index command at all (i.e. the line ends after the `\\\`), or if I replace it by `\nothing{...}` the spurious whitespace is also gone. If I change `\index` to `\nothing` and have `\nothing` insert an empty hbox by defining it `\def \nothing #1{\hbox{}}`, the problem is back again. So I guess `\index` inserts something that makes LaTeX no longer ignore the newline character. Is there a way to prevent `\index` from causing whitespace? Note that the above is actually the result of some macro expansions, so "just move the `\index` to the next line" isn't going to help me. Also, I tried wrapping `\index` in my own macro that inserts a `\relax` after it, but that didn't work either.


title: How to create a bar chart in which the y-axis is expressed in percents?

text: Suppose there is a chart like the following:   ![Example of a chart](http://i.stack.imgur.com/hmLAl.png) This chart was created using the code:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     ybar,     enlargelimits=0.15,     symbolic x coords={Category 1,Category 2,Category 3},     xtick=data,     nodes near coords,     ]     \addplot coordinates {(Category 1,6) (Category 2,2) (Category 3,3.5)};     \addplot coordinates {(Category 2,2) (Category 3,2.5)};     \addplot coordinates {(Category 3,4)};     \end{axis}     \end{tikzpicture}     \end{document}      I was wondering if it is possible to modify this chart in pgfplots in such a way that the y-axis expresses percents. So in this case, the blue bar in Category 1 would go up to 100%; the blue bar and the red bar in Category 2 would go up to 50% each; the blue bar, the red bar, and the brown bar in Category 3 would go up to 35%, 25%, and 40% respectively. (In other words, it is assumed that in each Category, the combined values of the bars amount to 100%.) At the same time, I would like to keep the non-percentage values in the label over the bars and mark only these values (6 in Cat. 1; 2 and 2 in Cat. 2 etc.) or combine them with percentages (6, 100% in Cat. 1; 2, 50% and 2, 50% in Cat. 2 etc.). In short, my question is: how to do that in pgfplots? (And, if that is not possible, then perhaps straight in PGF/TikZ.) EDIT: Obviously, you can achieve this manually in pgfplots by calculating the percentages, then writing them like `(Category 1,100)`, then providing the y-axis with an appropriate description (e.g. “in percents”), and then changing the label of each bar so that it shows the non-percentage values. What I'm looking for, however, is a little bit more automated solution :)


title: Make Chapter Titles link to Table of Contents

text: I'm using the `hyperref` package to create hyperlinks in my document. The links from the TOC->chapters/sections work great, but I was wondering if there was a way to automatically insert hyperlinks from section titles BACK to the TOC (section->TOC). For easier two-way navigation (especially when clicking on an incorrect link in the TOC). In case it matters I'm working in the `report` class, and this is a (minimized) version of what I have now.               \documentclass[11pt,a4paper]{report}     \usepackage{hyperref}          \begin{document}     First page          \clearpage     \tableofcontents     \clearpage          Blank page          \clearpage     \chapter{First chapter}     \end{document}      Thanks for any help!


title: Fontspec with bibtex with accents give me a bug : "Missing \endcsname inserted. \char"

text: i try to get out of a 3 days trouble, hope for your help ! I just want to find my bibliography in my font without bug... I'm using `\documentclass{scrbook}`, & `{Adobe Garamond Pro}` font with `\fontspec` for writing my thesis, but I have a problem with my bibtex bibliography : two ways.   1. when I compile xelatex-biblatex-xelatex, `\printbibliography` is done, it's printed in a font I don't know (may be a original font of Latex),    2. and after if I try to force my `{Adobe Garamond Pro}` font with `\renewcommand*{\bibfont}{\fontspec{Adobe Garamond Pro}}`   3. or with `\newfontfamily\normalfont{Adobe Garamond Pro}`,  when I compile xelatex-biblatex-xelatex, come a lot of `"Missing \endcsname inserted. \char"` Of course, I use accents in my Biblio.bib because my literacy is in french & I work with the Papers2 bibliography application… I don't know if I have to search in any direction :   * why `\bibfont` `\natbib`or `\bibtex` didn't accept accents ?   * may `\frenchb`of `\babel` have a solution with a `\frenchbsetup`? I don't think   * or in `\fontenc` or `\fontspec`directions Please help. Thanks That's my config :               \documentclass[12pt]{scrbook}         \addtokomafont{disposition}{\vfamily}         \addtokomafont{pageheadfoot}{\vfamily}               \addtokomafont{pagenumber}{\vfamily\small}           \addtokomafont{footnote}{\vfamily}                   \usepackage{fontspec}                                \usepackage[T1]{fontenc}                             \usepackage{xltxtra}                                     \newfontfamily\vfamily{Adobe Garamond Pro}     %   \newfontfamily\normalfont{Adobe Garamond Pro} % or point 3     \usepackage{xunicode}                                \usepackage[applemac]{inputenc}                  \usepackage{lmodern, textcomp}               \usepackage[english,frenchb]{babel}                      \frenchbsetup{FrenchFootnotes=false}         \usepackage[babel,french=guillemets*]{csquotes}         \MakeOuterQuote{"}                                   \frenchspacing                                           \usepackage[automark]{scrpage2}     \usepackage{lipsum}                              \usepackage[natbib=true,style=authortitle-icomp,doi=false]{biblatex}         \addbibresource{Biblio.bib}         \AtBeginBibliography{\def\UrlFont{\\\scriptsize}}                            %\renewcommand*{\bibfont}{\normalfont}  % point 2              \begin{document}     \fontspec{Adobe Garamond Pro}     \lipsum[1]\footcite[13]{Deotte:1993ve}\lipsum[2]\footcite[13]{Ricoeur:2000ga}     \printbibliography % point 1     \end{document}      And my Biblio.bib               @article{Ricoeur:2000ga,     author = {Ric{\oe}ur, Paul}, % I know that the problem is here :s     title = {{L'{\'e}criture de l'histoire et la repr{\'e}sentation du pass{\'e}}},     journal = {ahess},     year = {2000},     volume = {55},     number = {4},     pages = {731--747},     doi = {10.3406/ahess.2000.279877},     rating = {0},     date-added = {2014-01-29T09:45:37GMT},     date-modified = {2014-01-29T09:46:30GMT},     url = {http://www.persee.fr/web/revues/home/prescript/article/ahess_0395-       2649_2000_num_55_4_279877},     uri = {\url{papers2://publication/doi/10.3406/ahess.2000.279877}}     }          @book{Deotte:1993ve,     author = {D{\'e}otte, Jean-Louis},     title = {{Le mus{\'e}e, l'origine de l'esth{\'e}tique}},     publisher = {L'Harmattan},     year = {1993},     address = {Paris},     language = {fran{\c c}ais},     rating = {0},     date-added = {2013-07-08T22:13:04GMT},     date-modified = {2014-01-29T10:03:20GMT},     uri = {\url{papers2://publication/uuid/4A77F971-C505-4B1A-AB84-6647B00EAAF0}}     }


title: Frames with bibliography are not added to the circle progress bar in smoothbars

text: I'm working with a `Warsaw` theme and `smoothbars` outtertheme. I'm adding a bibliography entry at the end of the presentation that is meant to be used for a list of publications. However, these slides are not added to the circle progress bar (does this have a technical name?) from the `smoothbars`. Checking the Beamer navigation circles without subsections? question I thought that adding some subsections will do the trick but that didn't work. It seems that if the frame contains a `\printbibliography` (and I guess any bibliography) then the frame is skipped from the progress bar. Also, I'm not sure if this has something to do with this bug. Check the following example. The first frame appears by adding the subsection. The frames in the second subsection with the subsection in them appear also, with exception of the one with the bibliography on it.               \documentclass{beamer}          \begin{filecontents}{\jobname.bib}     @Book{test1,       author    = {Goossens, Michel and Mittelbach,                    Frank and Samarin, Alexander},       title     = {The LaTeX Companion},       publisher = {Addison-Wesley},       location  = {Reading, Mass.},       year      = {1994},     }     \end{filecontents}          \useoutertheme[subsection=false]{smoothbars}     \usepackage{biblatex}     \bibliography{\jobname}               \begin{document}     \section{Section}     \subsection{Subsection}     \begin{frame}{test}     content...     \end{frame}          \section{Publications}     \subsection{Subsection}     \begin{frame}{in nav}     this frame is in navigation bar     \end{frame}          \subsection{References}     \begin{frame}     \nocite{*}     \printbibliography[heading=subbibliography]     \end{frame}          \subsection{Subsection}     \begin{frame}{in nav}     this frame is also in navigation bar, but the previous one isn't     \end{frame}          \end{document}      So, how can I make the slides with a bibliography on them to appear in the `smoothbars`/circle progress bar?


title: How to transmit german umlauts to an index created by splitidx?

text: I'm currently trying to transmit German umlauts in index entries (e.g., `\sindex[p]{Böll, Heinrich}`) to the index created by `splitidx`. Right now, to sort the entries the right way, the umlauts are redefined by `\def Ä{"A}` etc. (see below). But now - which commands to tell TeXnicCenter to print the umlauts correctly after sorting them? At the moment entries appear as `Boll, Heinrich` and not as `Böll, Heinrich`. Are anyone able to support a motivated, but still incompetent LaTeX user?               \documentclass{scrbook}     %...          \usepackage[ngerman]{betababel}     \usepackage[ansinew]{inputenc}          \shorthandon{"}          \AtBeginDocument{%       \def Ä{"A}%       \def Ö{"O}%       \def Ü{"U}%       \def ä{"a}%       \def ö{"o}%       \def ü{"u}%       \def ß{"s}%         \def \~n{"n}%     }     \shorthandoff{"}           \usepackage[makeindex,split,idxcommands]{splitidx}     \newindex[Personenverzeichnis]{p}     \newindex[Sachregister]{s}          \frontmatter     %...     \mainmatter          Der Schriftsteller Heinrich Böll\sindex[p]{Böll, Heinrich} gilt zu unrecht als der \ldots          \appendix      \printindex*     \end{document}


title: Macro which creates another macro with custom name

text: I want to create a macro `\foo` which creates another macro which a custom name set just before the execution of `\foo` via a macro `\defcommand{myCustomName}` and saves/adds something to it just as the following pseudo-latex-code suggests. Is it possible to translate this to a working `LaTeX` example?               %\defcommand needs to be defined     %addtocommand needs to be defined     \newcommand{\foo}[1]{     %If the command \???CustomString??? doesn't exist, create it and then add the content of #1 to it.     \addtocommand{???CustomString???}{#1}     }          Some text          \defcommand{customA}     \foo{A1} \foo{A2} \foo{A3} %should create a command named `customA` (instead of ???CustomString???) which I can use in the whole document.           \customA %this schould print A1 A2 A3              some text...          \defcommand{customB}     \foo{B1},\foo{B2} %now \foo should create another command named `customB`...          \customB %should print A1 A2 A3          \customA %should print B1 B2      Note that I don't want to use an argument of `\foo` to do this. I.e. I don't want to write `\foo{Ax}{\customA}`.


title: add white space to manually indent line

text: I'm trying to add space to a line so that it lines up with the text above it which is bulletpointed. If I add \indent to the second line it indents the above line too so that it is all shifted over.               \documentclass[10pt]{article}     \begin{document}          \indent $\bullet$ This is the first line      \\ This is the second line          \end{document}      I want the "This"'s to line up. I've tried adding \ to the line but it doesn't work at the start of the line.


title: siunitx and adjectives

text: I would like to know if the `siunitx` package offers the possibility of adding an adjective after the unit, to get a hyphenated compound adjective. For instance, when typesetting "a 10 km-long road", I would like to pass the adjective as an optional argument to `\SI{1}{\kilo\meter}`, as in `\SI[[adj=long]{1}{\kilo\meter}`, instead of having to type `\SI{1}{\kilo\meter}-long`. Please understand that there is nothing wrong with the `\SI{1}{\kilo\meter}-long` syntax. It just "feels" wrong to hyphenate a command with a word. Also, I think this would make corrections a bit more straightforward. If this functionality is not offered, is it something the author of the package has thought of or is planning to implement?


title: Multilingual bibliographies with biblatex-chicago babel hyphenation

text: Don't know what I did (if I did anything) but seems multilingual libraries don't work for me anymore... I have some german and english references in an english document and so I want that english references are all output in small letters - for german titles, however, I want to keep the original spelling, including all capitals. Here's a minimal example:               \documentclass[10pt,oneside,a4paper]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[usenames]{color} %used for font color     \usepackage{graphics}     \usepackage[british,german]{babel}     \usepackage{csquotes}     \setquotestyle{british}     \usepackage{mathdots}     \usepackage{amssymb} %maths     \usepackage{amsmath} %maths     \usepackage{authblk}     \setcounter{secnumdepth}{-1}          \clubpenalty=10000     \widowpenalty=10000     \displaywidowpenalty=10000               % ********************************BIBLATEX**************************     \usepackage[language=british,isbn=false,authordate,doi=false,babel=other]{biblatex-chicago}          \defbibheading{quell}{\section{Primary Ressources}}     \defbibheading{lit}{\section{References}}     % ******************************************************************      references would be, for example:               @book{aunger_darwinizing_2001,     title = {Darwinizing Culture: The Status of Memetics as a Science},     isbn = {0192632442},     language = {english},     hyphenation = {english},     pagetotal = {256},     publisher = {Oxford University Press},     editor = {Aunger, Robert},     date = {2001-01-04},     }          @book{rautenberg_einfuhrung_2008,     location = {Wiesbaden},     title = {Einführung in die mathematische Logik: ein Lehrbuch},     isbn = {9783834805782 3834805785},     shorttitle = {Einführung in die mathematische Logik},     hyphenation = {german},     publisher = {Vieweg + Teubner},     author = {Rautenberg, Wolfgang},     date = {2008},     }      but what happens is that all are


title: ACM bibtex format missing title

text: I am using ACM format (Strict Adherence to SIGS style) to edit my bibtex file. The problem is that the compiler gave me the following error and corresponds to the following code:                @INCOLLECTION{Platt99a,      AUTHOR = "Platt, John C.",      CHAPTER = "Fast training of support vector machines using sequential minimal optimization",      BOOKTITLE = {Advances in kernel methods},      PUBLISHER = "MIT Press",      ADDRESS = "Cambridge, MA, USA",      YEAR = {1999}  }            Warning--empty title in Platt99a      I can't find any problem with my code. How to fix it? cheers


title: odd displays of accentuated characters in lstlisting environment

text: when i try to write accentuated characters (éà...) in a **lstlisting** environment, _hence :_               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{xcolor}     \usepackage{listings}          \lstset{         language=bash,         extendedchars=\true,         inputencoding=utf8,         classoffset=0,         keywords={arg1},         keywordstyle=\color{red}\bfseries,         classoffset=1,         keywords={arg2},         keywordstyle=\color{blue}\bfseries,         frame=boxshadow     }          \begin{document}          \begin{lstlisting}[title={syntaxe}]     $ ln -s arg1 arg2     arg1 : chemin (relatif ou absolu) du répertoire ou du fichier pointé     arg2 : chemin (relatif ou absolu) du lien à créer     \end{lstlisting}          \end{document}      > here's what i get : ## ![enter image description here](http://i.stack.imgur.com/prqwG.png) _note : it seems like the accentuated letters are placed before the non- accentuated ones._ My document uses _UTF-8_ encoding (from **texworks** settings) I've tried to setup **lstset** setting **extendedchars** to _\true_ and **inputencoding** to _utf8_. But this doesn't seem to apply any effects to the current code..


title: How to get align or similar equation environment to use the whole line instead of centering around the equality sign

text: I'm creating a Beamer presentation in which a line in the equation environment should fill the whole screen and should not only be centered arround the equality sign. I think this looks nicer and is much more readable for the audience. Actually using `\multline` on just one line gives me exactly that. How can I have that behaviour with `\align` or any other 'equation aligning' environment? Here is a comparison, I want to achieve the above with an alignment like below:               \documentclass{beamer}     \usepackage{amsmath}     \usepackage[thicklines]{cancel}     \usepackage{color}      \definecolor{Blue}{rgb}{0,0,1}     \definecolor{Red}{rgb}{1,0,0}     \newcommand{\ccancel}[2]{\renewcommand{\CancelColor}{\color{#2}}\bcancel{#1}}          \begin{document}     \begin{frame}     \begin{multline*}                                         \frac{\partial s_{\mu}}{\partial x_\mu}=                                         A \;[\ccancel{ \frac{\partial \phi^*}{\partial x_{\mu}}                                         \frac{\partial \phi}{\partial x_{\mu}}}{Red}                                         -\ccancel{\vphantom{\frac{1}{1}}(\square \phi^*)\phi}{Blue}                                          +\ccancel{\vphantom{\frac{1}{1}(kk)}\phi^* \square\phi}{Blue}                                          -\ccancel{\frac{\partial \phi^*}{\partial x_{\mu}}                                         \frac{\partial \phi}{\partial x_{\mu}}}{Red}]      \end{multline*}     \\[2em]     \begin{align*}                 \frac{\partial s_{\mu}}{\partial x_\mu} & = A \;[\ccancel{ \frac{\partial \phi^*}{\partial x_{\mu}}                                         \frac{\partial \phi}{\partial x_{\mu}}}{Red}                                         -\ccancel{\vphantom{\frac{1}{1}}(\square \phi^*)\phi}{Blue}                                          +\ccancel{\vphantom{\frac{1}{1}(kk)}\phi^* \square\phi}{Blue}                                          -\ccancel{\frac{\partial \phi^*}{\partial x_{\mu}}                                         \frac{\partial \phi}{\partial x_{\mu}}}{Red}] \\                                                         & = 0          \end{align*}          \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Jm5mK.png)


title: Specifying the width and height of a tikzpicture

text: Is it possible to specify the width and height of a `tikzpicture`? To scale a `tikzpicture` I use the option `scale`, i.e. for instance               \begin{tikzpicture}[scale = 2]     ...     \end{tikzpicture}      I tried to change the width and height as               \begin{tikzpicture}[width = 2in, height = 3in]     ...     \end{tikzpicture}      but this gives me an error "I do not know the key /tikz/width".


title: Align ylabels of grouped plots at a common line

text: I use the `groupplots` library of `pgfplots` to stack several plots above each other. The `y tick label` of the two plots have different width as the y axes of the plots are in different scales. As long as I don't set `\pgfplotsset{compat=1.6}`, `pgfplots` does not consider the `y tick label`'s width at all and prints the `ylabel` right across the tick labels. When I activate the `compat=1.6` option, the size of the tick labels is considered when placing the label, but in this case (cf. MWE below), the ylabels are placed relative to the tick labels of the concerning plot and therefore the labels of the two plots have different distance to the border of the whole plot group. Is there a simple command to align the ylabels at a common vertical line instead of aligning each of them relative to its respective plot?               \documentclass{standalone}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=1.6}          \begin{document}     \begin{tikzpicture}     \begin{groupplot}     [group style={group size = 1 by 2}]     \nextgroupplot[ylabel = Text]     \addplot coordinates {(0,0) (1,0.1)};     \nextgroupplot[ylabel=Text]     \addplot coordinates {(0,0) (1,2)};     \end{groupplot}     \end{tikzpicture}     \end{document}      ![Example output](http://i.stack.imgur.com/ZIcjL.png)


title: pgfplots - How to enlarge a plot when the nodes' coordinates are on/over the edge?

text: I am creating a groupplot (at least intend to) with a width 4cm for each plot. As I'd like to have the values shown via `nodes near coords`, this proves problematic because I can't figure out how to use `enlarge x limits` correctly. It either pushes the bars together too much so the values are above other values or other bars. The other case, when using `{0.2,upper}`, moves the bars too much to the left. **Is there a sound method to it, i.e. not just doing T &E runs at it till it fits?** (Also, the whole thing seems to be font dependent, but unfortunately I didn't manage to reproduce that so far.) ## Picture ![enter image description here](http://i.stack.imgur.com/u8EtM.png) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     lmodern,     amsmath,     tikz,     pgfplots,     pgfplotstable     }          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{filecontents}{force-stats.txt}     Stats,Min,MinStdDev,MinCIP95,Max,MaxStdDev,MaxCIP95     Fx,-7.35,2,2.26,6,1,1     Fy,-4,0.95,0.76,5,1.91,1.5     Fz,-2,1.42,1,4,4,3     \end{filecontents}          \pgfplotstableread[col sep=comma]{force-stats.txt}{\tableabcdef}          \begin{document}     \begin{center}     \begin{tikzpicture}     \begin{axis}[     scale only axis=true,     width=4cm,     height=6cm,     %     xlabel={Force components},     ylabel={Force in N},     %     ybar,     %     enlarge x limits={0.3},     %     symbolic x coords={Fx,Fy,Fz},     %     xtick=data,     nodes near coords,     xticklabels={{\(F_{x}\)},{\(F_{y}\)},{\(F_{z}\)}},     %     legend columns={1},     legend style={at={(0,0)},anchor=north,at={(axis description cs:0.5,-0.18)}}     ]     \addplot+[nodes near coords align={above right}] plot [error bars/.cd, y dir=both, y explicit] table [col sep=comma, x=Stats, y=Max, y error=MinCIP95] {\tableabcdef};     \addlegendentry{$F_i^{\text{max}}$, a very long one for the problem}     \addplot+[nodes near coords align={below right}] plot [error bars/.cd, y dir=both, y explicit] table [col sep=comma, x=Stats, y=Min, y error=MinCIP95] {\tableabcdef};     \addlegendentry{$F_i^{\text{min}}$, test text text}     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}


title: Justifying the output of toLatex function of utils R package

text: Using `utils::toLatex(sessionInfo())` in `.Rnw` we can get `R Session Info` to put in `LaTeX`. I would highly appreciate if someone guide me to fully justify the output of `utils::toLatex(sessionInfo())`. Thanks in advance for your help. * * * ## MWE * * *               utils::toLatex(sessionInfo())      * * * ## Output * * *               \begin{itemize}\raggedright       \item R version 3.1.1 (2014-07-10), \verb|x86_64-w64-mingw32|       \item Locale: \verb|LC_COLLATE=English_United States.1252|, \verb|LC_CTYPE=English_United States.1252|, \verb|LC_MONETARY=English_United States.1252|, \verb|LC_NUMERIC=C|, \verb|LC_TIME=English_United States.1252|       \item Base packages: base, datasets, graphics, grDevices, grid,         methods, splines, stats, tools, utils       \item Other packages: brew~1.0-6, car~2.0-21, foreign~0.8-61,         Formula~1.1-2, gdata~2.13.3, ggplot2~1.0.0, hexView~0.3-2,         highr~0.3, Hmisc~3.14-4, knitr~1.6.15, lattice~0.20-29,         MASS~7.3-34, memisc~0.96-9, mgcv~1.8-2, nlme~3.1-117, plyr~1.8.1,         psych~1.4.8.11, pwr~1.1.1, reshape2~1.4, rgl~0.93.1098,         scales~0.2.4, stargazer~5.1, survival~2.37-7, xtable~1.7-3       \item Loaded via a namespace (and not attached): cluster~1.15.2,         colorspace~1.2-4, digest~0.6.4, evaluate~0.5.5, formatR~1.0,         gtable~0.1.2, gtools~3.4.1, labeling~0.3, latticeExtra~0.6-26,         Matrix~1.1-4, munsell~0.4.2, nnet~7.3-8, proto~0.3-10,         RColorBrewer~1.0-5, Rcpp~0.11.2, stringr~0.6.2     \end{itemize}


title: tabularx and array

text: I need two things for my tables:   1. text has to be able to wrap.   2. the first row has to be bold For 1, I need the package `tabularx`. For 2, I need the package `array` and quite a lot of commands (see Make first row of table all bold) However if I transpose the above commands into a `tabularx` (rather than `tabular`) things won't work (apparently). Any ideas?


title: textls breaks smallcaps with luatex

text: I'm switching a code to LuaTex from XeTeX. In XeTeX, I had a combination of tracking and small caps using `LetterSpace` and `WordSpace` parameters in `fontspec` calls, but these are not supported in with LuaTeX. When using `textls` with `lualatex` from TL2011 and `microtype v2.5 <beta-06>`, small caps are broken. Here is a MWE:               \documentclass{scrbook}                                                                   \usepackage{fontspec}                                                                \usepackage{xunicode}                                                                \defaultfontfeatures{Ligatures=TeX}                                                  \setmainfont{Linux Libertine O}                                                      \newfontfamily\scfont[Letters=SmallCaps]{Linux Libertine O}                               \usepackage{microtype}                                                                    \begin{document}                      \scshape{Example of small caps}                                                           \textls{\scshape{Example of small caps with textls}}                                      \scshape{\textls{Example of small caps with textls inside}}                               {\lsstyle\scshape{Example of small caps with lsstyle}}                                    {\scfont Example of Letters=SmallCaps}                                                    {\scfont\textls{Example of textls with Letters=SmallCaps}}                                \end{document}               and the result I get: ![examples of sc with textls in luatex](http://i.stack.imgur.com/MT0BK.png) Is there a way to get small caps with tracking in LuaTeX?


title: Change math font for figures only (including TikZ environments within figures)

text: In my document, I want the main text to be in the `times` font, and the math to be in the `txfonts` font. This I can do with the help of the `txfonts` package. However, I want **everything** that shows up in my figures to be sans serif, including the math. So far I've been able to change the text font to sans serif but I also want to change the math font to a sans serif, both in the caption and the figure itself (where I use TikZ). Here's a minimal (non-working) example that needs tweaking. The problem is the math within the figure and the caption which now is `txfonts`.               \documentclass{article}     \usepackage{tikz}     %This package is used to get sans serif for regular text in captions.     \usepackage[font=sf]{caption}     %This package is used to get times for the main text and txfonts for math.     \usepackage[varg]{txfonts}     \begin{document}     Main text is supposed to be times. Math in main text is supposed to be     txfonts: $1+1=3$.     \begin{figure}     %Here I invoke the font option to make text within TikZ sans serif.     \begin{tikzpicture}[font=\sffamily]     \node at (0,0) {Sans Serif};      \node at (0,1) {Sans Serif Math: $5=3$};      \end{tikzpicture}     \caption{Figure caption text is supposed to be sans serif. Math in figure   capture text is supposed to be sans serif: $3+1=4.5$.}     \end{figure}     \end{document}


title: Figure numbering without the figure

text: It is quite common for academic journals to require article submissions to not include the figures, which are submitted separately. Then the journal staff position the figures in the text manually. However, they still require references to the figure to remain, so that these can be linked to the figure. The specific example I am dealing with right now is PLoS ONE. There doesn't seem to be a standard way of handling this with LaTeX. Obviously I don't want two separate files, so I've been handling it with conditional compilation, and for the submission just including the caption as a block of text, without any figure environment. See the example below. However, the problem with this is that the figure numberings are now blank. Can anyone suggest a way to retain the figure numbering, perhaps by adding a dummy counter or environment for the submission case? Note: I observed that in the non-submit case, where the figure is included, the figure numbering also disappears if I remove the caption. I'm not sure why this is the case. I've only a very sketchy idea of how the figure counter works. UPDATE: Here is Making labels from a counter, courtesy of Werner, which explains this. To quote Werner, "This is also why you place \label after \caption, since the latter executes a \refstepcounter." EDIT: For reference here are the relevant PLoS ONE guidelines. As can be seen, they want the detailed legend to directly follow the figure number and title. Unfortunately, figcaps as suggested by Werner doesn't quite do this. It puts all the legend/caption texts on a separate page. Also, here is the PLoS ONE LaTeX template.               \documentclass[10pt]{article}     \def\submit{}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,calc, external}     \begin{document}     \section*{A section}     Figure~\ref{schema}. % I want this to remain "Figure 1", even in the submit case     \section*{Figures}     \subsection*{Figure 1 - Database Schema}     \ifdefined\submit     Some caption text     \label{schema}     \else     \par \mbox{}     \par     \begin{figure}[tph]       \begin{center}         \begin{tikzpicture}[auto]           \draw (0,0) --(1,2);.         \end{tikzpicture}         \caption{some caption text}         \label{schema}       \end{center}     \end{figure}     \fi     \end{document}      UPDATE: I went with               \subsection*{Figure 1 - Database Schema}     \ifdefined\submit     \figlegend Some caption text \label{schema}     [...]      where `\figlegend` is defined by               \newcommand{\figlegend}{% figure legend     \refstepcounter{figure}% Increment counter for correct referencing      This is a simplified version of Werner's answer.


title: Automatic wrapping of a \multicolumn table cell

text: I output lots of tables to LaTeX using the `estout`/`esttab` package in **Stata**. I frequently want to have long footnotes on the bottom of the table, explaining coefficients, sources, etc. The estout package inserts footnotes using `\multicolumn{#}{l}{...}` at the bottom of the table, but requires me to figure out line breaks. That is, it will print several rows of `\multicolumn{#}{l}{...} \\\`, but I have to tell estout what I want on each row. This is a pain. I would like to find a way to make a `\multicolumn` wrap at the length of the table. I know that I can make `\multicolumn` wrap using the `p{<width>}` alignment specifier, but all the width macros I've been able to come up with (`\hsize`, `\textwidth`, `\linewidth`, etc.) cause the `\multicolumn` to wrap at the width of the page (or whatever fixed fraction I tell it), thus either stretching out my table or wrapping too short. Basically I want LaTeX to set the table width automatically (no `tabular*` or `tabularx`), but ignore the `\multicolumn` for the purposes of setting the width of the table, but have the `\multicolumn` wrap at the full width of the table. Here's an example of the type of table I'm working with               \documentclass{article}     \usepackage{booktabs}     \begin{document}     \begin{table}     \centering     \caption{This is a table}     \begin{tabular}{l*{6}c}\toprule     & Something & Something & Something & Something & Something & Something \\\midrule     Amazing regression results & 100 & 100 & 100 & 100 & 100 & 100 \\\bottomrule     \multicolumn{7}{p{\textwidth}}{This is a footnote that's really really  really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long}\\ %Ideally this should wrap without distorting the table     \end{tabular}     \end{table}     \end{document}      Any thoughts? I feel like there must be some LaTeX parameter containing the width of the table.


title: Identifying if a paper is developed from LaTeX

text: Is there any way to identify if a paper is developed using LaTeX or not. In other words, what are the characteristics of a paper developed using LaTeX. Since the term paper is too generic, I will reduce it to only research papers say `IEEE` or `elsevier` or `ACM`. But answers to other types of papers are also allowed. The reason I am asking this question is, while reading an IEEE paper, I found a range written like this `20 % to 60 %`, which is not advisable(to my understanding). In the paper:   ![enter image description here](http://i.stack.imgur.com/ST1yj.png)   In LaTeX:   ![enter image description here](http://i.stack.imgur.com/h1js5.png)                 \documentclass[12pt]{article}     \usepackage{siunitx}     \begin{document}     \SI{20}{\percent} to \SI{60}{\percent}     \end{document}


title: Combining DefineVerbatimEnvironment with UseVerbatim

text: I would like to combine the power of `\DefineVerbatimEnvironment` with `\UseVerbatim` within a combined beamer presentation and handout scenario. I have already defined the environment `coding`, and now I can typeset my code using               \begin{coding}       foo->bar( ).     \end{coding}      I can also define and re-use verbatim snippets in their stand-alone version:               \begin{SaveVerbatim}{Foo}       foo->bar( ).     \end{SaveVerbatim}          \UseVerbatim{Foo}      The problem is that the latter is typeset using the default `fancyvrb` options. How can I combine the two so that the saved text is displayed using my custom environment? * * *               \documentclass{article}     \usepackage{fancyvrb}          \DefineVerbatimEnvironment{coding}{Verbatim}{numbers=left,fontsize=\small}          \begin{document}          \begin{coding}       foo->bar( ).     \end{coding}          Yup. This works.          \begin{SaveVerbatim}{Foo}       foo->bar( ).       boo->baz( ).       cat->code( ).     \end{SaveVerbatim}          \UseVerbatim{Foo}     \UseVerbatim{Foo}     \UseVerbatim{Foo}          Yup, this works as well -- but it uses the default format, not my custom environment: larger font, no line numbers.          \end{document}


My texstudio clickable menus do not pull up whenever I have the dual monitor setup on my linux mint computer. How to fix texstudio gui compatibility in linux mint dual monitor setup?