title: Hyperref footnotes and section ref colors

text: I was using `hyperref` package so to link all the references within the LaTeX file, however I wanted to personalize a bit the default colors, so my preamble looks like this               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{epsfig,graphics}      \usepackage{hyperref}     \usepackage{url}     \hypersetup{colorlinks=true, urlcolor=Cerulean, citecolor=Cerulean}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}      Then my question would be whether is possible to change also the default colors of footnoes on one hand and references to section in the other. I couldn't find the command on ftp://tug.ctan.org/pub/tex- archive/macros/latex/contrib/hyperref/doc/options.pdf


title: reshaping an letter in an equation

text: I need to put a letter under the min symbol in the equation below but i couldn't do it,It now looks like this: ![enter image description here](http://i.stack.imgur.com/D0PIC.png) and I need it to look like this: ![enter image description here](http://i.stack.imgur.com/gC0tg.png)               \begin{document}     \begin{equation}     mina\sum^{N}_{i=1}\sum^{N}_{j=1}|y_i - y_j|^2 W_{ij}     \label{eqn4}     \end{equation}     \end{document}


title: References by BibTeX key name

text: I've seen Use BibTeX key as the cite key, and it's quite close to what I'm looking for, but doesn't quite make it - for a start I can't get biblatex to run over my document, and second What I'm trying to achieve is for the reference list to display, instead of reference numbers (or author-year pairs, but I'm using the `super` natbib style) the key, as in `\cite(key)`. This is partly a debugging issue, hence the tag, but partly as I'm required to port some existing work to word. I have no influence over that requirement, and I've written something to parse the .tex (excluding equations), leaving me with the cite keys inline - hence I'd like get a references section I can copy into the word document for shared editing. **Edit - more detail on biblatex** The error I see is:               ! LaTeX Error: Command \bibhang already defined.                Or name \end... illegal, see p.192 of the manual.      If I comment out `\usepackage{natbib}` in an attempt to fix that, I break some custom cite commands I added. Replacing those with a simple `\cite` allows it to compile. The top answer linked above doesn't help much, new keys are generated, which is why I didn't put too much effort into getting it to run before. **Edit2: The following compiles, but generates new keys.**               \documentclass[preview]{article}      \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{preview}     \usepackage[backend=bibtex,style=alphabetic,sorting=debug]{biblatex}     \usepackage{filecontents}               \begin{filecontents}{\jobname.bib}     @article{Jones_article1,         author = {A. . Jones and C. D. Smith},         title = {article1},     }     @article{Bloggs_article2,         author = {E. F. Bloggs},         title = {article title 2}         journal = {Journal of stuff},     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     foo\cite{Jones_article1} and bar\cite{Bloggs_article2}          \printbibliography     \end{document}      ![example of above code](http://i.stack.imgur.com/QAhMB.png) **Edit3: This doesn't run:**               \documentclass[preview]{article}      \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{preview}     \usepackage[backend=bibtex,natbib=true,style=alphabetic,sorting=debug]{biblatex}     \usepackage{filecontents}          \DeclareFieldFormat{labelalpha}{\thefield{entrykey}}\DeclareFieldFormat{extraal??pha}{}          \begin{filecontents}{\jobname.bib}     @article{Jones_article1,         author = {A. . Jones and C. D. Smith},         title = {article1},     }     @article{Bloggs_article2,         author = {E. F. Bloggs},         title = {article title 2}         journal = {Journal of stuff},     }     \end{filecontents}     \addbibresource{\jobname.bib}          %citenumns provides the reference number for a citation, not superscripted or bracketed     \makeatletter     \newcommand*{\citenumns}[2][]{%       \begingroup       \let\NAT@mbox=\mbox       \let\@cite\NAT@citenum       \let\NAT@space\NAT@spacechar       \let\NAT@super@kern\relax       \renewcommand\NAT@open{}%       \renewcommand\NAT@close{}%       \cite[#1]{#2}%       \endgroup     }     \makeatother          \begin{document}     foo\cite{Jones_article1} and bar ref. \citenumns{Bloggs_article2}          %\bibliographystyle(super)     \printbibliography     \end{document}      instead giving               ! LaTeX Error: \NAT@open undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...          l.40 ...} and bar ref. \citenumns{Bloggs_article2}


title: Custom key as cite reference

text: I would like to have the citations in my document shown as the custom bibliography keys rather than numbers. For example: for a bibliography item below, I would like it be shown as `[Rahman98]` rather than as `[1]`. How could I achieve this?               @article[Rahman98]{Abdul-Rahman1998,     author = {Abdul-Rahman, A and Hailes, Stephen},     file = {:C$\backslash$:/Users/lpts4220/Documents/MendeleyFileOrganized/p48-abdul-rahman.pdf:pdf},     journal = {Proceedings of the 1997 workshop on New \ldots},     keywords = {Recommendation-based,Trust,Trust model},     mendeley-tags = {Recommendation-based,Trust,Trust model},     pages = {48--60},     title = {{A distributed trust model}},     url = {http://dl.acm.org/citation.cfm?id=283739},     year = {1998}     }


title: LaTeX Bibliography / Citation Style Basic Question

text: > **Possible Duplicate:**   >  Use BiBTeX key as the cite key Let's say I have a .bib file where I'm citing a paper, say:               @ARTICLE{Bob04,      author={B.B. Bobs},      title={Bob's Theory},      journal={bob-ph/0102137},      year={2004},     }      Now, in my main document say I want to cite this reference, but using \cite{Bob04}. What I want, is the citation to reflect what is typed after the @ symbol               @ARTICLE{Bob04 ...      So for instance I would like               In Bob's paper[Bob04]      Is there any existing bib style or way to override to allow this to happen? Thanks.


title: Transparency group and decoration markings

text: How can I set the transparency so that the arrow belongs to the same `transparency group` as the path? ![enter image description here](http://i.stack.imgur.com/QJO0w.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}     \begin{document}     \begin{tikzpicture}       \tikzset{%         > = stealth,         arrow over path/.style = {%           decoration = {%             markings,             mark = at position .5 with {\arrow {>};}           },           postaction = decorate         }       }       \draw[arrow over path, semitransparent] (0,0) -- (1,1);     \end{tikzpicture}     \end{document}


title: Blank slides at beginning of sections with Philex/Linguex and Beamer

text: I use the Philex package for linguistic examples. I've found that if I load it with Beamer I get a blank slide at the beginning of each section (see my MWE). This isn't just a Philex problem, because the same thing happens with Linguex. (Philex is based on Linguex.)               \documentclass{beamer}          \title{Philex MWE}     \author{Thomas Hodgson}          \usepackage{philex}     % \usepackage{linguex}          \begin{document}     \maketitle          \section{Section one} % (fold)     \label{sec:section_one}          \begin{frame}[t]\frametitle{Frame one}          Some text.          \end{frame}          % section section_one (end)          \section{Section two} % (fold)     \label{sec:section_two}          \begin{frame}[t]\frametitle{Frame two}          Some more text          \end{frame}          % section section_two (end)          \end{document}


title: How to set the line width of vector graphics in ConTeXt?

text: I have several vector graphics in PDF format that I want to place in my ConTeXt document. I added them with `\externalfigure[graphic.pdf]`, some scaled to different sizes. All of the lines in these graphics use a single line width. I want all of these graphics, regardless of their scale, to have a consistent line width. Is there any way to set the line width of the graphics from within the ConTeXt document so that the line width of all of the lines is the same as the line width in the document's table rules?


title: rotate node shape in tikz

text: **Edit 1** Claudio gave a nice solution to my question. But the image should be included in a `beamer` presentation. I use for that the option `transform canvas={scale=0.5}` and this has a side problem with the node position. Compare the image below with that provided in Claudio's answer.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds,positioning}     \pgfdeclarelayer{foreground}     \pgfsetlayers{main,foreground}               \begin{document}     \thispagestyle{empty}     \tikzset{every picture/.style={transform canvas={scale=0.5}}}     \begin{tikzpicture}[      cross appereance/.style={        white,very thick,      },      cross/.style={append after command={         \pgfextra{         \begin{pgfinterruptpath}         \begin{pgfonlayer}{foreground}          \draw[cross appereance,shorten <=0.35\pgflinewidth,shorten >=0.35\pgflinewidth]       (\tikzlastnode.south) --        (\tikzlastnode.north);          \draw[cross appereance,shorten <=0.4\pgflinewidth,shorten >=0.4\pgflinewidth]       (\tikzlastnode.west) --        (\tikzlastnode.east);         \end{pgfonlayer}         \end{pgfinterruptpath}         }       }       },       quad/.style={cross,fill=purple, cross,rectangle, thick, label=below:{quad},minimum width=1cm},     ]             \node[quad]  (quad1) {};           \begin{scope}[shift={(1cm,1cm)}, every node/.style={rotate=-60}]        \node[quad, right= of quad1] (quad2) {};      \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/DXLES.png) **Original question** I made a rectangle with a white cross in the centre using the `picture path` and the shapes anchors (north, south,...). My problem is that when I rotate the node the cross is not rotated.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}     \begin{tikzpicture}[      cross/.style={path picture={        \draw[white,very thick]       (path picture bounding box.south) -- (path picture bounding box.north) (path picture bounding box.west) -- (path picture bounding box.east);}},       quad/.style={fill,cross, purple, rectangle, thick, label=below:{quad},minimum width=1cm},     ]             \node[quad]  (quad1) {};           \begin{scope}[xshift=1cm, every node/.style={rotate=-60}]        \node[quad, right= of quad1] (quad2) {};      \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/PGRrl.png)


title: dodecahedron calendar specific weeks colors

text: I've seen this calendar : http://www.texample.net/tikz/examples/feature/paper- folding/ and I would like to add colors for specific lines (weeks) but I don't know how to do that. Any ideas?


title: Breaking long links in bibliography using REVTeX and Bibtex

text: I'm writing an article using the REVTeX documentclass, and use hyperref. The problem is that when I add URLs to my references, the linked titles aren't broken at all. Minimal example:   .tex file:               \documentclass[twocolumn]{revtex4-1}     \usepackage{hyperref}     \begin{document}     \cite{reference, reference2}     \bibliography{references}     \end{document}      references:               @TECHREPORT{reference,         AUTHOR      = {Firstname Lastname},         TITLE       = {Extremely long and complicated title of something I want to reference several times in my very interesting article},             INSTITUTION = {Institution},         YEAR        = {2013},         URL         = {http://url/}     }          @TECHREPORT{reference2,         AUTHOR      = {Firstname Lastname},         TITLE       = {Regular reference},             INSTITUTION = {Institution},         YEAR        = {2013},         FILE        = {http://url/},     }      Compile using `latex`, `bibtex`, `latex`, `latex`, `dvipdf`. The result:![enter image description here](http://i.stack.imgur.com/FGvza.png) Does anyone know of a way to remedy this?


title: Output command arguments for spellchecking

text: I have a longer tex file which contains text in different languages. The languages are highlighted in different colors, e.g.               {\color{blue} some       text       in       french     }          {\color{red} some       text       in       german     }      The spellcheck would be a lot easier if I could separate the file into different languages and then run the spellcheck on the different files. A first idea is to redefine the `\color` command such that it appends the second argument to a file. Does this sound like a good plan to you? A different option would be of course to parse the tex-file using a script, but then I would need to have balanced bracket matching.


title: Underful hbox with revtex4

text: When I insert a figure into my two column report I get underful hbox error. Even if I scale this figure to 0.1/pagewidth I still get this error. How can I remove it?                   \begin{figure}[H]     \centering     \includegraphics[width=0.5\textwidth]{FEKII}     \caption{ FEKII peptide structure showing hydrophobic face (top) and hydrophilic face (bottom) at pH 7}     \label{fig:Fmoc}}     \end{figure}


title: How to extend the horizontal line and colored box all the way?

text: 1. I want to extend the horizontal line and the colored box all the way to the end of the page, however using `\hrulefill` (instead of `\hline`, screws up the format.)  This is my code: http://pastebin.com/Xd1jWqBb and this is what it looks like: ![enter image description here](http://i.stack.imgur.com/4HhLZ.png)   1. Also, how do i reduce the gap between the colorbox and the start of the text within it?   2. If I were to use Answer 2 (located in my code) i get this:  ![enter image description here](http://i.stack.imgur.com/3iXac.png) however the heading should be shifted towards the left. If I do that, how do i extend the color and the line all the way to the end. So ultimately i want ![enter image description here](http://i.stack.imgur.com/xxrQG.png) but with the colorbox extended as well. I posted a similar question and the above problems are the by products of the answers given from the other post. (Ref: How to edit the length of a color box?)


title: How to split the page with images on the right and information to the left

text: I would like to do the following but more correctly: ![enter image description here](http://i.stack.imgur.com/kAWIm.png) I would like to have to have the images on the right and information on the left. I tried using `wrapfigure` package to do it but I don't think that is the best route to take. What do you recommend I do to achieve this? EDIT: How can I the following so the images are side by side and the text between "Area" and table the is minimized? Here is an image: ![enter image description here](http://i.stack.imgur.com/liS54.png)


title: How to have 2 lines in a block?

text: I'm using the `schemabloc package`, and I want to have 2 lines of text in a bloc... `Diode` under `Protection`, and `Oscillator` under `Boost` in the following example Here it is:               \documentclass{article}     \usepackage{schemabloc}     \begin{document}     \begin{center}     \begin{tikzpicture}     \sbEntree{E}     \sbBloc[3]{PV}{PV Cells}{E}     \sbDecaleNoeudy[-1.9]{PV}{PV2}     \sbBlocL[2]{B}{Battery}{PV}     \sbBlocL{D}{Protection \\ Diode}{B}      % Here     \sbRenvoi[-2]{PV2}{D}{}     \sbBlocL[2]{OS}{Boost/Oscillator}{D}     % And Here     \sbBlocL[2]{L}{LED}{OS}      \sbSortie{S}{OS}     \end{tikzpicture}     \end{center}     \end{document}      And it's what I get :               ./Sans-titre.tex:10: LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.10 \sbBlocL{D}{Protection \\ Diode}{B}      Any ideas ?


title: Using set list with pgfplotstable

text: I am trying to create a new column in a table using the set list option, but it will not expand the list when stored in a macro. I've tried \expandafter in various locations with no joy so far.               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}          \noindent This works.     \pgfplotstableset{create on use/first/.style={create col/set list={a,b,c,d,e,f}}}     \pgfplotstablenew[columns={first}]{6}\mytable     \pgfplotstabletypeset[string type]\mytable          \noindent This also works.     \pgfplotstablecreatecol[set list={a,b,c,d,e,f}]{second}\mytable     \pgfplotstabletypeset[string type]\mytable          \noindent This doesn't.     \edef\names{a,b,c,d,e,f}     \pgfplotstablecreatecol[set list={\names}]{third}\mytable     \pgfplotstabletypeset[string type]\mytable     \end{document}      ![tables](http://i.stack.imgur.com/xVmVO.png) * * * Based on Matthew Leingang's answer I figured out how to handle an environment as well.               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}          \edef\names{A,B,C,D}     \edef\parms{symbolic x coords={\names},xtick=data}     \def\environ{\begin{axis}}          \begin{tikzpicture}     \expandafter\environ\expandafter[\parms]     \addplot coordinates {(A,0) (B,1) (C,1) (D,2)};     \end{axis}     \end{tikzpicture}     \end{document}


title: Expansion of macros and box contents

text: I don't understand the following behavior. ## Intro First, here is a simplified version of a macro I am using (which is itself a hacked version of a macro found in gloss.tex). If you have a string `MY|STRING` with a delimiter in it (in this case, a pipe), then `\getmorphs MY|STRING|\\` will split it into its parts `MY` and `STRING`. Notice we have to put a pipe at the end of `MY|STRING` when we pass it as an argument to `\getmorphs` so that there is always at least one "part delimited by a pipe" (argument #1 in `\getmorphs`):               \makeatletter     \def\getmorphs#1|#2\\{%       \@getparts(#1,#2,\getmorphs)     }     \def\@getparts(#1,#2,#3){Printed: #1%         \def\more{#2}%         \ifx\more\empty\let\more=\donewords         \expandafter\else\expandafter\let\expandafter\more=#3         \fi         \more#2\\%        }     \gdef\donewords#1\\{}%     \makeatother      That is illustrated here, where `\getmorphs` prints each part separately:               \getmorphs aaa|bbb|\\% Printed: aaa Printed: bbb (correct)      And it even works if we define a macro which expands to some text with pipes in it, and pass that macro as the argument to `\getmorphs`. To make it work, we have to use `\expandafter` so that `\testmacro` expands before `\getmorphs`:               \def\testmacro{aaa|bbb}     \getmorphs\testmacro|\\% Printed: aaa|bbb (incorrect)          \expandafter\getmorphs\testmacro|\\% Printed: aaa Printed: bbb (correct)      ## Problem In the actual code I am working on, I have an hbox whose contents are aaa|bbb:               \newbox\testbox     \setbox\testbox=\hbox{aaa|bbb}      What I can't figure out is how to pass the contents of that box to `\getmorphs`. I have tried variations of the sort               \getmorphs\unhbox\testbox|\\     \expandafter\getmorphs\unhbox\testbox|\\      etc., and have even tried defining a scratch macro to expand to \unhbox\testbox and then passed that as the argument to `\getmorphs` as before:               \def\moretest{\unhbox\testbox}     \expandafter\getmorphs\moretest|\\      Nothing works. Does anyone know how I can access the contents of that hbox and use it as an argument of a macro?


title: How to arrange image and text side by side?

text: I am working on image and text(description). I need to arrange image and text side by side but in beamer class. It is normal article with a4 size paper. How can i implement it?


title: Bibliography in theses separated by Section

text: Being at 3/4 of my master thesis is time to start gathering all separated docs into a theses pdf. I need some help with the bibliography... The structure is like this > *Section1 > > **Chapter 1 > > **Chapter 2 -Bibliography of section 1 > > *Section2 > > **Chapter 3 > > **Chapter 4 -Bibliography of section 2 > > [...] > > *Conclusion The thing is that I don't know how to create such a bibliography structure. I have it already written down with the "thebibliography" format but in different, separate documents. So the question is. Is there a way to put the items in "thebibliography" from, let's say chapter 1 and 2, into a some kind of .bib file that is then called at the end part of section 1 ? I'm sorry if the explication is a bit messy but I think the idea gets through. Any suggestion is most welcome, as always THX allot!


title: headlines with fancyhdr and documentclass scrreprt

text: I am using documentclass scrrept and fancyheader headlines. The problem is that on every page where a new chapter starts, here are no headers. Only the page no is shown in the middle of the footer. But I would like to have the header on each page.               \documentclass[12pt, bibliography=totoc]{scrreprt}          \usepackage{ngerman}     \usepackage[T1]{fontenc}     \usepackage[isolatin]{inputenc}          \usepackage{graphicx}     \usepackage[german]{varioref}     \usepackage{moreverb}          \usepackage{lastpage}     \usepackage{fancyhdr}                    \renewcommand{\baselinestretch}{1.5}     \setlength{\oddsidemargin}{0.8cm}     \setlength{\evensidemargin}{0.8cm}     \setlength{\textwidth}{14cm}     \setlength{\textheight}{23cm}     \setlength{\topmargin}{-0.8cm}     \setlength{\parindent}{0pt}          \begin{document}                    \pagestyle{fancy}          \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \fancyhf{}     \fancyhead[LE,LO]{Thorsten Sohn, 1076041}          \fancyhead[CE,CO]{\thepage\ von \pageref{LastPage}}


title: \cf@encoding vs. \UTFencname: which of them has priority?

text: There are two macros that bear the name of current font encoding. First is `\cf@encoding` which seems to be set by core of LaTeX 2e and NFSS and changed by the `fontenc` package. Second macro is `\UTFencname`. It is set, in particluar, by `fontspec` package and, perhaps, by some other packages that deal with OTF/TTF fonts and unicode. **What is the relation between these two macros?** I noted `\cf@encoding` also changes when LuaLaTeX runs.


title: Citing a report with an institutional author

text: How would you commonly register a report from an institution in Biblatex like the following:               @Report{OUNHCHR2014,       Title                    = {The right to privacy in the digital age},       Author                   = {{Office of the United Nations High Commissioner for Human Rights}},       Date                     = {2014-06-30},       Institution              = {Office of the United Nations High Commissioner for Human Rights},       Type                     = {Annual report of the United Nations High Commissioner for Human Rights and reports of the Office of the High Commissioner and the Secretary-General},       Year                     = {2014},       Location                 = {Geneva, Switzerland},       Number                   = {A/HRC/27/37},       Version                  = {2014-06-30}     }      Should the issuing institution go in the _Author_ or the _Institution_ field, or both (as per my example)? Or is this more a question of personal preference or the citation style used?


title: To Avoid the white space before negative sign to be treated as mathord

text: Some time we write `a=b\qquad -c=-d` then the negative sign was treated as minus sign, you know what happened: the space arround the sign is incorrect. Although it can be done with `{-}c=-d` or `\mathord{-}c=-d`, I think there might be an elegant solution.


title: Hide closing statements for algorithms

text: I would like to generate an algorithm with the `algorithmic` package which does not show the annoying closing statements when I typeset it. I have done this before but have now forgotten how to do it. Specifically,                  \FORALL Natural numbers N           \STATE N=N-1 !        \ENDFOR      I'd prefer that the final `\ENDFOR` statement not show up after typesetting as this just needlessly chews up space.


title: Defining a Length that Scales with Fontsize Changes

text: I noticed a behavior regarding lengths under fonstsize changes, which I'm hoping there is a way to circumvent. Consider this MWE:               \documentclass{article}     \begin{document}          \newlength\mylength     \mylength=\baselineskip     \def\stringmylength{\the\baselineskip}          mylength~~~  baselineskip~~~ stringmylength\\          \the\mylength~~~~~~~~\the\baselineskip~~~~~~~~~~~~~\stringmylength\\          \Large     \the\mylength~~~\the\baselineskip~~~~~~~\stringmylength\\          \end{document}      with this output: ![enter image description here](http://i.stack.imgur.com/iZKEL.jpg) When I define a length in a scalable unit (here, as `\baselineskip`, though the same behavior occurs if I define `\mylength` as 2.7871ex), I would hope that, upon changing the fontsize, it would scale. But `\mylength` does not. I seem to recall reading somewhere that lengths are converted to some internal LaTeX unit, which would explain, perhaps, why a length, once specified, doesn't scale with fontsize. Yet, it is clear that certain lengths do scale, such as `\baselineskip`, as given in my example. Also, I could "work around" the problem by storing the length not as a length, but as a string (`\stringmylength` in my example), though that seems crass to me. Is there a way to define a LaTeX length which will scale with fontsize changes? If not, what is the prescribed way of manually modifying lengths to conform to fontsize changes? [EDIT: As mentioned in a comment to David, and picked up on by egreg, this question concerns the formulation of lengths in the `stackengine` package]


title: Aligning two semicircles

text: I'm making `\item` commands with coloured circles. One needs to be two colours, i.e. two semicircles which form a single circle. I currently have this, which superimposes both circles:               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric}     \newcommand*\reditem{\item[{\tikz[baseline=-3]{\node[shape=circle,draw,fill=red,inner sep=4pt] (char) {};}}]}     \newcommand*\redblueitem{\item[{\tikz[baseline=-3]{       \node[shape=semicircle,rotate=90,fill=red,inner sep=3pt](char) {};        \node[shape=semicircle,rotate=270,fill=blue,inner sep=3pt] (char) {};}       }]}          \begin{document}     \begin{frame}     \begin{itemize}       \reditem test red       \redblueitem test redblue     \end{itemize}     \end{frame}     \end{document}      How can I adjust this to form a nice two-colour circle?


title: Title between lines

text: So I want to have one line above and one under the title of a chapter in `scrreprt`, like:               _________________________________________________     1. Introduction     _________________________________________________      But with the same space between the lines and the title. So this is what I've tried with the package `titlesec`:               \titleformat{\section}[display]     {}     {}     {}     {\titlerule       \vspace{0.2pc}%     \thesection\bfseries\hspace{5pt}\filright}     [\vspace{0.1pc}%       \titlerule]      But it's still not working fine, e.g. at the begining of one chapter on a new page there is a lot of space between the top margin and the chapter name and I only get the number of the chapter in a good position with `\hspace{5pt}`. Between: Is there any chance to have the same code for `srreprt` and `scrbook`? (after replacing `\section` by `\chapter` etc.) Anybody could help me?


title: Two horizontal lines above and under chapter-entry

text: > **Possible Duplicate:**   >  Title between lines Can anybody please tell me how to get horizontal lines above and under the `\chapter{MyChapter}`? Here is an example: ![enter image description here](http://i.stack.imgur.com/oagPR.png)


title: Images in two columns in beamer

text: I need to divide a frame into two columns and in each column i put two image taht one above the other.               \documentclass[compress,red]{beamer}     \usepackage{etex}     \mode<presentation>     \usetheme{Warsaw}     \usepackage[applemac]{inputenc}%les accents pour mac     \usepackage{caption}     \captionsetup{font=small}     \captionsetup{labelformat=empty}     \usepackage{subfigure}      \usepackage{amsmath}      \usepackage{graphicx}     \usepackage{array,ragged2e}     \usepackage{setspace}     \usepackage{multirow}        \begin{document}        \section{section1 }        \frame[shrink]{\frametitle{Titre de la fenetre}        \begin{columns}       \column{1.5in}        \begin{figure}[!h]        \centering       \fbox{        \mbox{\subfigure[Scénario 1]{\includegraphics[width=3cm]      {listefigures/scenario1.png}}\\          \subfigure[Scénario 2]{\includegraphics[width=3cm]{listefigures/sc10.png}}}}          \caption{Image 1}          \end{figure}         \column{1.5in}          \begin{figure}[!h]         \centering            \fbox{          \mbox{\subfigure[Scénario 1]{\includegraphics[width=3cm]{listefigures/scenario2.png}}\\          \subfigure[Scénario 2]{\includegraphics[width=3cm]{listefigures/sc11.png}}}}           \caption{Image 2}             \end{figure}             \end{columns}                    }                        \end{document}


title: Remove all Russian symbols from a PDF under Windows

text: I have a very weird task. There is a compiled PDF document with guidelines on a mathematical subject. It is in Russian, hence it contains a lot of Russian symbols in plain text and a lot of mathematical symbols in formulas. Here is a short sample: ![Source document](http://i.stack.imgur.com/yd071.png) I need to print this document with invisible plain text, i.e. to print only the formulas and mathematical symbols. Like the following: ![Corrected document](http://i.stack.imgur.com/fcyij.png) Document is compiled with LaTeX, but sources are unavailable. The only thing I can think of is somehow to remove or substitute all the Russian fonts in the document. But they are not embedded and I can't even locate them in my Windows! Here is the screenshot of fonts used in the document from Adobe Acrobat: ![Document fonts page 1](http://i.stack.imgur.com/EUPkF.png) ![Document fonts page 2](http://i.stack.imgur.com/gTUaJ.png) My ultimate task is to obtain a printed copy of this document. So if one could tell how to make all Russian symbols white - it would be acceptable solution. Any suggestions are welcome. And a couple of small questions just for me to understand how it works:   1. Where are these fonts stored in my Windows 7 x64 OS? There are no such entries in my `C:\Windows\Fonts\` folder.   2. What utility should I use for low-level edit of a PDF document? I.e. like fonts manipulation? **Update** Using Adobe Acrobat I've checked the fonts of shown fragment. It is `SFRM1200` for plain text, `SFTI1200` for italic, `CMMI12` and others for mathematical symbols. So now the question is how to unembed `SFTI1200` and `CMMI12` fonts from the document? I expect that once I unembed them, a reader wouldn't be able to render them correctly and will substitute them on some meaningless symbols, like squares. It is even more acceptable for my task.


title: Renaming label names in AucTex to recover ordered sequence

text: By rearranging (copy-and-pasting) math environments the automatically RefTeX generated label numbers               \begin{align}       \label{eq:5}         ...     \end{align}          texttexttext...          \begin{align}       \label{eq:3}        ...     \end{align}      become shuffled which makes the referencing to individual equations difficult. How it is possible to rename the label names so that an increasing order is recovered?


title: LaTeX figures in two column

text: Is there a convenient way to place a `figure*` at the end of the current page instead of taking up the entire next page in the `twocolumn` environment? Placement modifiers `[Hb]` do not work.


title: Dynamic path positioning between nodes

text: I'm trying to find the best way of dynamically positioning the blue path. The important part is its position relative to `b` and `c`. I currently am using `\path [line,blue] let \p1=(a.south), \p2=(c) in (h.south) |- +(2,-0.5) |- (\x2, \y1) -- (c.north);` for the blue path, but it really doesn't give me much dynamic control. I've thought about trying add a couple of let points and taking the middle of their x-values, but I can't seem to figure out how to do that. It would look something like: `\path [line,blue] let \p1=(a.south), \p2=(c), \p3=(b.east), \p4=(c.west) in (h.south) -| +( AAA , -0.5) |- (\x2, \y1) -- (c.north);` where `AAA` would be something like `($(\x3 !0.25! \x4)$)` or `(\x3 + \x4)*0.75` but that really seems like a kludgy way of doing it. So, what's the best way to draw this path so that it will scale dynamically?? Also open to any suggestions on improving the red path. ![path](http://i.stack.imgur.com/TE3LR.png)               \documentclass{article}          \usepackage{tikz}     \usepackage[margin=0.5in]{geometry}     \pagestyle{empty}          \begin{document}          %\input{../tikz-setup.tex}     \usetikzlibrary{shapes, arrows, calc, positioning}          % Define block styles     \tikzstyle{state}   = [ rounded rectangle,                              draw,                              text centered,                              minimum height=3em                            ]     \tikzstyle{test}    = [ diamond,                              draw,                              shape aspect=2,                              inner sep = 0pt,                             text width = 7em,                             text centered                           ]     \tikzstyle{action}  = [ rectangle, draw,                             text width=8em,                             inner sep = 5pt,                              minimum height=5em                           ]     \tikzstyle{line}    = [ draw, -triangle 45 ]          \begin{center}     \begin{tikzpicture}[align = flush center, font = \small]         % Place nodes         \matrix [column sep = 3em, row sep = 1.2em] (mtrx)         {              \node [state] (a) {a};\\              \node [action] (b) {b}; &         \node [test] (c) {c}; \\              \node [action] (d) {d}; &         &         \node [action] (e) {e}; \\              \node [action] (f) {f}; &         &         \node [action] (g) {g}; \\              \node [action] (h) {h}; \\         };              % Draw edges                  \path [line, red] (c.west) -- ($(b.east)!0.75!(c.west)$) |- ($(e.south)!0.5!(g.north)$);        %\path [line, red] let \p1=(e), \p2=(f), \p3=(c.west), \p4=(b.east) in (c.west) -- ($(\x3, \y3)!0.25!(\x4, \y3)$) |- ($(\x1, \y1)!0.5!(\x1, \y2)$); %alt              \path [line,blue] let \p1=(a.south), \p2=(c) in (h.south) |- +(2,-0.5)  |- (\x2, \y1) -- (c.north);          \end{tikzpicture}     \end{center}     \end{document}


title: How to create a 'summary of changes' with latexdiff

text: Following my previous question, I have successfully created a dif.tex file of a large, complex project, the results of which can be seen here. (This was done, in the end by updating latexdiff to the latest version: 1.0.3 which is not in Ubuntu 12.04 ppas and using: `PICTUREENV=(?:picture|DIFnomarkup|lstlisting|figure|table)[\w\d*@]*` as the configuration file. It is great to be able to scroll through the document and see all the improvements that have been made. Thank you latexdiff! The next problem is that the pdf document is very large and changes are relatively sparse - I cannot expect my examiners to look through all 300 pages looking for red and blue text to indicate changes. What I need is a _summary of changes_. This would, at a minimum, contain the text that had changed. Ideally it would also contain surrounding words for context and (a long shot) the page number of the alteration. Ways I've though of doing this:   * Redefine the `\DIFdelbegin` environment   * Use a regex like grep to extract all lines from dif.tex containing `\DIF` and compile this separately   * Do it using latexdiff commands (I've checked the documentation, but cannot see how.   * Would a different approach altogether be better for solving this problem (making an accessible list of changes made, without including text that has stayed the same). I know a similar question was closed on this site. Hopefully the clarity of this question and provision of an example will make it useful for others.


title: Alternative to \substack{} for a related purpose

text: I would like to write something like the following, but involves mathematical symbols: ![Word Sucks](http://i.stack.imgur.com/rtXCA.png) I tried using the `\substack{}` but it makes the font smaller. I'd like a novel alternative to achieve this. And, thank you TeX.SX users for being helpful ! **Edit:** I have received wonderful answers here, as is true of many of my other questions. I have chosen the answer whose code I am using now. I sincerely wish I could upvote answers several times and accept several answers. `:-(`


title: Adding a note in tables

text: ![enter image description here](http://i.stack.imgur.com/dssKG.png) How do you put the "Note: preferred model for each metric bold."? This is my work:               \begin{table}          \caption{Model selection metrics}          \begin{center}          \begin{tabular}{l c c c c c}     \hline     {} & {\itshape BIC} & {\itshape AIC} & {\itshape CAIC} & {\itshape HQIC} & {\itshape Correlation}\\     \hline \hline     Linear Regression & 138,210 & 138,014 & 138,236 & 138,080 & 0.2759\\     2-class (restricted) & 134,442 & 133,982 & 134, 503 & 134,135 & 0.2970\\     3-class (unrestricted) & 134,437 & 133,977 & 134,498 & 134,131 & 0.9275\\     3-class (restricted) & 134,128 & 133,464 & 134,216 & 133,685 & 0.2001\\     3-class (unrestricted) & --- & --- & --- & --- & --- \\     4-class (restricted) & 134,088 & 133,221 & 134,203 & 133,510 & 0.3045\\     4-class (unrestricted) & --- & --- & --- & --- & --- \\     5-class (restricted) & 134,160 & 133,089 & 134,302 & 133,446 & 0.3087\\     5-class (unrestricted) & --- & --- & --- & --- & --- \\      \hline          \end{tabular}          \end{center}          \end{table}      How can I add the note so it can look like the thing on the picture?


title: Is it possible to automatically add an index entry each time an acronym/glossaries command is used in the document?

text: > **Possible Duplicate:**   >  Automatically index acronyms I am using glossaries package for acronyms (`\usepackage[acronym]{glossaries}`). I have a separate .tex file for a list of `\newacronym{key}{label}{description}` and for a list of `\newglossaryentry{key}{name=,description=,type=}`. I have used the necessary command for generating index such as `\usepackage{makeidx}`, `\makeindex`, `\printindex`. I want all the list of acronyms to appear in the index. But i don't want to use the command `\index{}` in the document every time where i use `\acs` or `\acf` or `\gls` or etc, which also looks ugly full of commands. Can anybody help/suggest me how to generate index automatically every time i use the command of acronyms or glossary in the document without writing the command `\index{}`?


title: How can I tell AUCTeX that breqn is a math environment?

text: I have recently been trying to use the breqn package to automatically break up my equations. However, I use emacs (and/or Aquamacs, depending on the machine I'm on) with Auctex, and it does not recognize these environments as math environments which is a bit of a headache. Is there a list somewhere or a lisp command I can put in a .emacs file that tells auctex to recognize the math environments introduced by breqn as math environments?


title: Files no longer compile ("I cannot write pdf") in TeXMaker

text: I was working on my report for a few days in TeXMaker. I compiled it, went for lunch, came back and now it doesn't work. Compiling takes forever, and it doesn't complete - either ends in error ("I cannot write pdf") or it just hangs up. I get the error "File not found" when I just start up, but it opens up fine, so it is obviously found. It doesn't include any other files except my bibliography. I tried:   * Starting/restarting TeXMaker -> even killed the processes which for some reason don't stop once TeXMaker is closed.   * Restarted my computer   * Resaved the file in another directory   * Pasted code into another file   * Checked that I'm admin (I ran TeXMaker as admin too)   * Just reinstalled TeXMaker, still doesn't work... I am the only user on this computer, I have access to all drives. PDF isn't open anywhere else. In fact nothing else is really open. Thoughts?


title: Getting back to the toc by clicking on headlines in the text. How to do it?

text: I am working with texshop which lacks of a proper navigation (or I didnt find it yet). To make it easier to navigate through the document I would like to make all the headlines clickable in a way that when you click on them you get back to the toc. Is there a way to do so? Thanks in advance.


title: Naming convention for papers, articles and bibliographic references

text: This is not strictly speaking a TeX question, but I think every TeX author will have been confronted by it at some point. What convention do you follow when naming PDF copies of articles downloaded from the web? I used to follow the same naming convention I used for BiBTeX entries, i.e. _main author:year:title initials_. For example, the "Go To Statement Considered Harmful" by Dijkstra (1968) would be saved as `dijkstra:68:gtsch.pdf`. Now I'm not so happy about this convention because the colon, which was fine while I was working under Windows, is a reserved character under UNIX. Corollary question: what convention do you follow for BiBTeX entries?


title: Floating lines in align environment

text: I'm using the `align` environment to align some equations, and I would like to insert some comments between them. The problem is that I'm using `&` to align the equals, and because my comments don't contain some, they make the equations shift to the right. For example :               \begin{align*}        1 &=& 3 - 2 \\        \text{And because 2 = 1 + 1} \\          &=& 3 - 1 - 1      \end{align*}      Okay, this is a stupid example but the problem is the equals will be aligned after the comment "and because...". Do you have any idea of how I could tell LaTeX to "ignore" the comment and make it "float"?


title: I can't figure out why my tables are not being numbered

text: I want to have tables with numbers so I can say "`table 1 shows`".. Can you please help? Example:               \documentclass[table,dvipsnames]{beamer}     \usepackage[english]{babel}     % \usepackage{beamerthemesplit} // Activate for custom appearance     \usetheme{Berlin}     \useoutertheme{infolines}     \useinnertheme{circles}     \usecolortheme{dolphin}     \usepackage{caption}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage{booktabs}     \begin{document}          \frame{%     \frametitle{Calibration}     \begin{center}     \captionof{table}{Parameter values} % title of Table     \label{table:parametersone}     \setlength{\tabcolsep}{0.3pt}     \small     \scalebox{.65}{\begin{tabular}{l c l c p{8.5cm} } % centered columns (4 columns)              \hline     %inserts double horizontal lines     \\     Parameter &\phantom{.} & Value  & \phantom{.} & Description \\[1.0ex]    % inserts table      %heading     \hline             % inserts single horizontal line     \\     $\beta$ &\phantom{.}  & 0.97 &\phantom{.}  & Yearly discount factor   \\ % inserting body of the table     $\alpha$ &\phantom{.}  & 0.60 &\phantom{.}  & Output elasticity of labor  \\     $\gamma$ &\phantom{.}  & 0.10 &\phantom{.}  & Output elasticity of public capital \\     $\theta$ &\phantom{.}  & 2.68 &\phantom{.}  & \parbox{10cm}{Multiplicative factor in the \\     human capital technology} \\     $\psi$ &\phantom{.}  & 0.80 &\phantom{.}  & Parental altruism \\     $\sigma$ &\phantom{.}  & 0.63 &\phantom{.}  & \parbox{12cm}{Exponent on parental human capital} \\     $\phi$ &\phantom{.}  & 0.30 &\phantom{.}  & \parbox{12cm}{Elasticity of the fraction of time during first \\     period spent in school} \\     $\eta$ &\phantom{.}  & 0.10 &\phantom{.}  & \parbox{12cm}{Elasticity on public education expenditures} \\     $\underbar{h}$ &\phantom{.}  & 2.30 &\phantom{.}  & Constant\\     $\lambda$ &\phantom{.}  & 5.00 &\phantom{.}  & \parbox{10cm}{Relative weight of adult labor in production}  \\     $r$ &\phantom{.}  &5.0\% &\phantom{.} & Interest rate \\     $\delta_G$ &\phantom{.}  & 2.5\% &\phantom{.}  & Yearly depreciation rate of public capital\\        % [1ex] adds vertical space     \hline %inserts single line     \end{tabular}}     \end{center}}          \end{document}


title: TikZ shape definition from TikZ rather than PGF

text: Is there a way to define a TikZ shape using TikZ code rather than PGF? I'd like to have a gear shape (and some others) that I can use as a node and add text to it, have arrows go in and out of it, etc, just as one can with predefined tikz node shapes. Now, there's a nice example of drawing a gear with TikZ in http://tex.stackexchange.com/a/58735/29445, but I have no idea how I could turn that into a node shape. Creating node shapes (and some other answers) simply suggest using PGF -- however, since I'm just starting out with TikZ, I'd rather not learn another set of commands (especially since PGF seems kind of low-level to me). Essentially, my question is: is there any shortcut? Or do I simply have to know PGF in order to use TikZ?


title: How do I (temporarily) cancel centering?

text: There I was, a-merrily tracing through the depths of `beamer`'s code on the trail of the Dreaded Overprint Hurler of Bexhill-on-Sea, when I came across Something Completely Different. It looked like a cross between a vbox and a centering, but horribly, horribly mutated. Desiring to slay this monstrous beastie before it could wreak havoc, I studied it and its relatives (from a safe distance). Its behaviour is strange, but by caging it I could see some patterns in its responses to basic stimuli. Eventually, I realised that if I could but introduce some genetic mutation which temporarily switched off the `\centering` gene then it could be made safe and I could resume my quest to track down the Overprint. * * * In less prosaic language, while investigating Overprint environment inside tikz node: unexpected alignment of content I figured out that the problem was due to the interaction between the `center` environment (aka `\centering`) and how `beamer` implements the `overprint` environment. What `beamer` does is gather all the possible versions of the `overprint` environment into `vbox`es containing `minipage`s of the prescribed width. It then sets the correct one (according to the overlay specification) but with the height and depth of the biggest one. However, if the `overprint` environment is contained within a `center` environment, something a little odd ensues. It would appear that the `vbox` containing the `minipage` environment has already taken into account the `center` environment and so consists of the `minipage` environment at the centre of the line, with the requisite spacing fore (and presumably aft). But when the `vbox` is set, it is still within the `center` environment so picks up a _new_ indentation. This wouldn't matter, except for the fact that the `vbox`'s width is adjusted to the prescribed width so TeX adds yet more horizontal space to shove the `vbox` back into the centre of the line (or so it thinks). Given that all of this is going on inside a `beamer` overprint environment, and I don't want to muck around with that code, the simplest solution seemed to be to turn off the `\centering` just before the `overprint` environment (and, given my reading of the original question, turn it back on again inside). But `\centering` seems to be a one-way trap: there's `\centering`, `\rightragged`, `\leftragged`, but no `\backtonormal`. Here's some code to play around with:               \documentclass{article}          \newbox\mybox          \begin{document}          \setbox\mybox=\vbox\bgroup\fbox{\begin{minipage}{4cm}hello     world\end{minipage}}\egroup          \centering          \wd\mybox=4cm          \fbox{\box\mybox}          \setbox\mybox=\vbox\bgroup\fbox{\begin{minipage}{4cm}hello     world\end{minipage}}\egroup          \wd\mybox=4cm          \fbox{\box\mybox}          \setbox\mybox=\vbox\bgroup\fbox{\begin{minipage}{4cm}\centering hello     world\end{minipage}}\egroup          \wd\mybox=4cm          \fbox{\box\mybox}          \fbox{\begin{minipage}{4cm}hello world\end{minipage}}          \fbox{\begin{minipage}{4cm}\centering hello world\end{minipage}}               \end{document}      Here's what I get from that: ![boxes and centring and alignment](http://i.stack.imgur.com/4TBm0.png)


title: How to change the PDF previewer inside Kile?

text: I'm using a dev version of Kile to take advantage of the new PDF-preview feature (not the snippet-preview you find in Kile 2.1, a full preview feature similar to other modern LaTeX editors like TeXmaker, etc.). While the preview is offered by the Okular PDF reader, I'd like to change that to another PDF reader of my choice, does anybody know if it is possible?


title: Help to develop a \textcite command to be used with verbose citation styles in Biblatex (help with \DeclareCiteCommand)

text: > **This question led to a new feature in a package:**   >  `biblatex` I want to have a `\textcite` command to be used with verbose citation styles in Biblatex. It should do something as this: I use it within the text, to replace the subject of a sentence:               As \textcite[4]{JohnDoe} said...      And the result would be something like > As John Doe¹ said... > > . . . > > __ > >   1. John Doe. _Booktitle_. Address: Publisher, 2011, p. 4. > Or, if it's not the first citation: > As John Doe² said... > > . . . > > __ > >   1. Doe, _Booktitle_ , p. 4. > I tried to do so with the following command:               \renewcommand{\textcite}[2][]{\citename{#2}{author}\footcite[#1]{#2}}      but I know this isn't the best approach (just to begin, it completely ignores the punctuation tracker), since there are those `\DeclareCiteCommand` especially designed to do something like this --- I just can't understand how to use them...


title: Turn off paragraph indention for a single line

text: Is it possible to turn off the paragraph indention for a single line? I have the following use case: I open a new section which describes the task of an exercise. Since I use the font size `\large` for the section I don't want to use the section text for the task description. Therefore I added the task description after the section. The disadvantage is that an indention is created when starting to write text after the task description. What are possible solutions to this problem?


title: Math mode spacing (or glyph bounds) with mathspec

text: With mathspec, when you change the math font to an OpenType font, the spacing within equations is not fine: it is the same than the text mode spacing. For example in the equation `$e^j$`, the 'j' will collide with the 'e', most of time. So with mathspec you have to type `$e^{"j}$` to space the 'j'. This is refered as the 'glyph bounds' problem in the mathspec doc. What is really too bad is that it breaks compatibility with LaTeX. _Is there any way to both have correct spacing AND compatibility with LaTeX?_ Here is an example with two clashes :               \documentclass{article}     \usepackage{mathspec}     \setmathsfont(Latin,Digits){Times New Roman}          \begin{document}     $e^j + |f|$ should be written $e^{"j} + |"f|$.     $\"abcdefghijklmnopqrstuvw"$     $abcdefghijklmnopqrstuvw$ : the spacing is too thin, suitable for text, not for math.     \end{document}


title: Light markup languages for TeX users

text: I was wondering if people could share their experience with various mark up languages. In particular, I am interested in situations for which you consider light markups preferable to TeX. I am also interested in the level of TeX output support by different markups. My initial contact with markups started through PmWiki which has its own markup. After brief investigation I settled on txt2tags as my light markup of choice. I am contemplating using it to keep the notes from the meetings with my academic advisees. Is there any light markup with some kind a support for mathematics? Moreover is there a way to use a markup and TeX interchangeably. I am thinking of a situation in which one would take a class notes for example in a light markup.


title: Intersection of two surfaces

text: I'm trying to create a signed distance function S(x), where I want to intersect S(x) = 0 with a plane. The problem is not to get the two functions into a plot, but to get the two functions to visual intersect with each other, i.e the nearest surface is in the foreground. Currently, I have something like:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}       \begin{tikzpicture}         \begin{axis}[grid=major]           \addplot3[surf,domain=-10:10,samples=40]           {-sqrt((x-0)^2/1 + (y-0)^2/1) + 5};           \addplot3[surf,domain=-10:10,samples=2,opacity=0.5]           {0*x+0*y};         \end{axis}       \end{tikzpicture}       \end{document}      Which gives: ![enter image description here](http://i.stack.imgur.com/spcll.png) As you can see, the plane is only overlapping the function and not intersecting. How can it be done? Bonus question: Is it possible to create a contour on the 3d surf plot at the intersection?


title: Multiply the value by decimal number in latex?

text: I used the following construct quite often:               \includegraphics[width=\textwidth/2]{pic.png}      But when I try to adjust the size a small bit, like this:               \includegraphics[width=\textwidth*0.45]{pic.png}      I get               ! Package calc Error: `.' invalid at this point.      What am I doing wrong?


title: Scaling and trimming white space from a pgfplots picture

text: In answering How do I create a combined figure with two imported curves and draw around it with Tikz?, I was able to make my own graph fill the space between two horizontal lines as seen here. However, when I tried to import a `dat` file, I ran into difficulties. **My first problem was scaling**. I thought I could use the key `height` to fix the height of the image. But it's not behaving as I thought it would:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \def\myimage#1{%%         \begin{tikzpicture}%%[x=#1,y=#1]           \begin{axis}[             height=#1,             hide axis,             no markers,           ]           \addplot + table[x index=0, y index=1]{vp1.dat};           \end{axis}       \end{tikzpicture}}          \pagestyle{empty}     \begin{document}          \begin{tikzpicture}       \draw (0,0) -- ++(6,0)             (0,4) -- ++(6,0);       \node[inner sep=0pt,draw,red] at (3,2) {\myimage{4cm}};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/b8ZlC.png) I wanted it so that the red box's top and bottom should be flush with the black horizontal lines. **My second problem** was getting rid of all the white space. I would like the bounding box for the graph to fit as tightly as possible when I've hidden the axes. In other words, the red border should be snug up against the blue of the graph. Here's my `vp1.dat` file:               1 3     2 4     3 -5     4 6      Here's my `vp2.dat` file:               1 3     2 4     3 1     4 3      ## **Update** I have partial solutions to my questions but no combined solution. > Solution to first problem Regarding the **first problem** , I can get the `pgfplot` to fill the desired effect by using a combination of               scale only axis     height=#2      MWE:               \documentclass{article}     \usepackage[margin=0.5in]{geometry}     \usepackage{tikz}     \usepackage{pgfplots}     \def\myimage#1#2{%%         \begin{tikzpicture}           \begin{axis}[             scale only axis,             height=#2,             hide axis,             no markers,           ]           \addplot + table[x index=0, y index=1]{#1};           \end{axis}       \end{tikzpicture}}          \pagestyle{empty}     \begin{document}          \begin{tikzpicture}       \draw (0,0) -- ++(6,0)             (0,4) -- ++(6,0);       \node[anchor=south] at (3,4) {\texttt{height=4cm} passed to \texttt{pgfplots}};       \node[inner sep=0pt,draw,red] at (3,2) {\myimage{vp1.dat}{4cm}};       \draw[<->] (6.25,0) -- ++(0,4) node [midway,right]{4cm};     \end{tikzpicture}          \end{document}      which results in: ![enter image description here](http://i.stack.imgur.com/Ch2Q3.png) > Solution to second problem Regarding the **second problem** , I can get the `pgfplot` to trim the extra white space that I do not want by using both               clip bounding box=upper bound     hide axis      MWE:               \documentclass{article}     \usepackage[margin=0.5in]{geometry}     \usepackage{tikz}     \usepackage{pgfplots}     \def\myimage#1#2{%%         \begin{tikzpicture}           \begin{axis}[             clip bounding box=upper bound,             hide axis,             no markers,           ]           \addplot + table[x index=0, y index=1]{#1};           \end{axis}       \end{tikzpicture}}          \pagestyle{empty}     \begin{document}          \begin{tikzpicture}       \node[anchor=south] at (3,4.35) {graph fits snuggly in its bounding box};       \node[inner sep=0pt,draw,red] at (3,2) {\myimage{vp1.dat}{4cm}};     \end{tikzpicture}          \end{document}      which results in: ![enter image description here](http://i.stack.imgur.com/NngOn.png) > No solution for combined approach But when I try to combine both methods, the height is not obeyed properly and I can't figure out how it's being calculated.               \documentclass{article}     \usepackage[margin=0.5in]{geometry}     \usepackage{tikz}     \usepackage{pgfplots}     \def\myimage#1#2{%%         \begin{tikzpicture}           \begin{axis}[             scale only axis,             clip bounding box=upper bound,             height=#2,             hide axis,             no markers,           ]           \addplot + table[x index=0, y index=1]{#1};           \end{axis}       \end{tikzpicture}}          \pagestyle{empty}     \begin{document}          \begin{tikzpicture}       \draw (0,0) -- ++(6,0)             (0,4) -- ++(6,0);       \node[anchor=south] at (3,4) {combining \texttt{clipping} and \texttt{height}};       \node[inner sep=0pt,draw,red] at (3,2) {\myimage{vp1.dat}{4cm}};       \draw[<->] (6.25,0) -- ++(0,4) node [midway,right]{4cm};     \end{tikzpicture}     \end{document}      which results in: ![enter image description here](http://i.stack.imgur.com/DFLRA.png)


title: Error with chronology and babel packages : "! Paragraph ended before \pgffor@next was complete."

text: I am trying to use the chronology package in a report that includes babel. My distribution : `pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)` On below my **MWE** :               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[francais]{babel}          \usepackage{chronology}     \begin{document}     \begin{chronology}[5]{1983}{2010}{10cm}[7cm]     \event{1984}{\color{blue}{one}}     \event[1985]{1986}{\small{two}}     \event{\decimaldate{25}{12}{2001}}{\huge{three}}     \end{chronology}     \vspace{5cm}          \begin{chronology}*[5]{1983}{2010}{10cm}     \event{1984}{\color{blue}{one}}     \event[1985]{1986}{\small{two}}     \event{\decimaldate{25}{12}{2001}}{\huge{three}}     \end{chronology}     \vspace{5cm}          \begin{chronology}[5]{1983}{2010}{10cm}[13cm]     \event{1984}{\color{blue}{one}}     \event[1985]{1986}{\small{two}}     \event{\decimaldate{25}{12}{2001}}{\huge{three}}     \end{chronology}     \end{document}      Actually, I get this error : > >      ! Paragraph ended before \pgffor@next was complete. >   However, when I remove the line               \usepackage[francais]{babel}      The compilation is working fine. How can I fix it please ?


title: How to use fontawesome-package in moderncv?

text: since I am working on my CV using moderncv, I was wondering if it is possible to change the icons used in the header. These icons are from the package marvosym. As indicated by this question moderncv - non marvosym symbols, you can use the fontawesome-package.               \documentclass{article}     \usepackage{fontawesome}          \begin{document}     \faTwitter          \faLinkedin          \faLinkedinSign     \end{document}      Seems to be easy, but unfortunately I receive an error message even if I compile with xelatex or lualatex. The error indicates the following:               ! Fatal fontspec error: "cannot-use-pdftex"     !     ! The fontspec package requires either XeTeX or LuaTeX to function.     !     ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"      Both xelatex and lualatex are functioning well with other codes. Hence, I do not know what's the problem. However, I would really like to use the icons from the fontawesome-package. Does anybody has an idea? Thank you very much in advance, Phil


title: Referencing subequations with cleveref

text: I try to refer to the parent number of subequations with `\cref` from the `cleveref` package. However, I would like to change the output "eq. (...)" into "eqs. (...)" when I refer to parent numbers instead of individual equation numbers. Unfortunately, this does not seem to be implemented by default, or at least there is no `\crefformat{parentequation}` or `\crefformat{subequation}` available. A short example:               \documentclass{article}          \usepackage{amsmath}     \usepackage{cleveref}          \crefformat{equation}{#2eq.~(#1)#3}     \Crefformat{equation}{#2Eq.~(#1)#3}          \begin{document}          \begin{subequations} \label{parenteq}     \begin{align}       x + y = z \label{subeq1} \\       a + b = c \label{subeq2}      \end{align}     \end{subequations}          \Cref{parenteq} consist of \cref{subeq1} and \cref{subeq2}.          \end{document}      I would like to see the output > Eqs. (1) consist of eq. (1a) and eq. (1b). instead of > Eq. (1) consist of eq. (1a) and eq. (1b).


title: Which is the preferred command for equations in LaTeX?

text: While browsing some of the older questions I learned that I should not use `$$`. I also learned that I blamed LaTeX for obscure error messages that can be prevented by using `\(` and `\)`. I started to further review my LaTeX files (old habits die hard) and now I have the following question: Even if not using `$$`, there are many possible ways to get equations separated from the text. Which one should I use and why? `\begin{equation}`, `\[`, `\begin{eqnarray}` or some other? I want to make the question more precise and ask for   * a. a one line equation with no label/number,   * b. a one line equation with a label/number,   * c. a multi line equation with no label/number,   * d. a multi line equation with one label/number and   * e. a multi line equation with one number/label for each line. Could you please point out if a package is needed as well, but I would prefer to learn the 'pure' LaTeX macros/ environments, first.


title: What template is this document?

text: This image which is located on this page is the document that I'm thinking about. The title appears to be in, maybe, Adobe Cason Pro ![enter image description here](http://i.stack.imgur.com/HXPJV.png)


title: Bullets not showing in beamer

text: I copied a presentation in which everything worked fine, and now in this new presentation there are no bullets showing on slide! MWE:               \documentclass[xcolor=dvipsnames,hyperref={breaklinks=true},mathserif,professionalfont,12pt]{beamer}      \usecolortheme[named=RoyalBlue]{structure}      \useoutertheme{infolines}      \usetheme[height=7mm]{Rochester}      \setbeamertemplate{items}[ball]      \setbeamertemplate{blocks}[rounded][shadow=true]      \setbeamertemplate{navigation symbols}{}     %\usefonttheme{serif}     \usefonttheme{professionalfonts}          \usepackage{amsmath,amssymb,amsthm,amssymb}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{graphicx}     \usepackage{float}     \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{txfonts}     \usepackage{subfigure}     \usepackage{color}     \usepackage{xcolor}     \usepackage{listings}     \usepackage{time}     \usepackage{extarrows}               \title{Random title}     \subtitle{Random subtitle}     \author{Random Randofsky}     \institute{Random institute, Random City 1000, Randomia}     \date{\today}          \begin{document}     \maketitle               \section{Random section1}          \begin{frame}     \frametitle{About}     \begin{itemize}     \item Random stuff Random stuff     \item \itshape{more random stuff}     \item Random stuff...     \end{itemize}     \end{frame}               \begin{frame}     \frametitle{Reference}     \begin{thebibliography}{99}     \end{thebibliography}     \end{frame}               \begin{frame}     \begin{center}     Thank you for listening\\          The End     \end{center}     \end{frame}          \end{document}      What seems to be the problem? I didn't change anything in the preamble.


title: Create a good looking 2-actor normal-form game such as Prisoner's Dilemma

text: I am having difficulties in adjusting the `TikZ` code to get a symmetrical output matrix; I guess the `*` is the reason the right block is somehow higher?               \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{blindtext}     \setkomafont{disposition}{\normalfont\bfseries}          \usepackage{tikz}     \usetikzlibrary{calc,matrix,positioning}     \begin{document}          \begin{figure}[h]     \centering     \caption{Collective action problem in the Prisoners' Dilemma}     \label{Collective action problem in the Prisoners' Dilemma}     \begin{tikzpicture}[element/.style={ minimum width=1.75cm,minimum height=0.85cm}]     \matrix (m) [matrix of nodes,nodes={element},column sep=-\pgflinewidth, row sep=-\pgflinewidth,]{              & Cooperate & Defect  \\     Cooperate & |[draw]|3,3 & |[draw]|1,4 \\     Defect & |[draw]|4,1 & |[draw]|2,2* \\     };     \node[above=0.25cm] at ($(m-1-2)!0.5!(m-1-3)$){\textbf{Actor A}};     \node[rotate=90] at ($(m-2-1)!0.5!(m-3-1)+(-1.25,0)$){\textbf{Actor B}};      \node [below=1.5cm, align=flush center,text width=8cm]             {\begin{scriptsize}                 Number left (right) of comma refers to A's (B's) preference ordering (1 = worst outcome; 4 = best outcome). * indicates the equilibrium.                      \end{scriptsize}             };     \end{tikzpicture}     \end{figure}     \end{document}


title: XeLaTeX: WordInitial, Inner and WordFinal seem to match everywhere

text: I am creating a blackletter font and would like to use it with XeLaTeX. I try to use initial/medial/final substitution for letters, like s/ſ, but the context seems to match even when it should not. For example, I try to execute substitution of s by ſ using the `init` and `medi` tables, but with `fontspec` and `Contextuals={Inner}`, word-initial and -final “s”es are replaced by “ſ”, too. The corresponding applies for all substitutions of initial and final forms.               \documentclass{article}     \usepackage{fontspec}     \defaultfontfeatures{Script=Latin,Language=German,Contextuals=Inner}     \setmainfont{Jena1330.otf}     \begin{document}     smstsms     \end{document}      gives a document containing ſmſtſmſ in the correct font, instead of smſtſms, as I would expect. Am I doing something wrong? How does XeLaTeX decide if a letter is initial, medial or final?


title: How can you make your CV accessible?

text: Recently I learned, from an insider, that a CV in PDF format might have a significant disadvantage: automated data mining tools used by HR sometimes fail to extract information from the PDF. Most likely you experienced at least once to that you were asked to send a CV in (god forbid) WORD format. It seems that the reason is that the tools used by the Human Resources people do not cope well with PDFs. So, the question, how can you improve the visibility/accessibility of your CV? Probably, metadata (using `hyperref`) can be an answer, but I don't know. What is your experience?


title: Columns of Tabular on Different Slides (Beamer)

text: I would like to show a tabular by columns for didactical reasons. Example:               \begin{tabular}{ll}     Beispiel & Erklärung \\\hline     Die Schule fällt Fritzchen nicht leicht. & Unterricht\\     Fritzchen geht in die Schule. & Ort\\     Die Schule muss reformiert werden. & System\\     Die Schule muss renoviert werden. & Gebäude\\     \end{tabular}      I would like first to show the column "Beispiel" (maybe with slides seperated by `\pause`) and on one of the following slides I would like to show the "Erklärung" column (again, maybe seperated). Does anyone know how to do so?


title: TeX causing run-on italicized sentences that break formatting

text: Total neophyte to TeX, trying to type up a term paper due tonight and I keep getting really weird errors during compile. I'm not sure if this question has been asked before, but I don't really know any of the lingo to be able to word the question properly. I've just been going about learning TeX from the internet, and so I apologize if this is an absolute shambles. Here's a copy of the code snippet that is causing the problem, please let me know if there's anything else I need to include.               \documentclass[paper=a4, fontsize=12pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[margin=1in]{geometry}     \usepackage[english]{babel}     \usepackage{mathtools,amsfonts,amsthm}     \usepackage{sectsty}     \allsectionsfont{\centering \normalfont\scshape}     \usepackage{fancyhdr}     \pagestyle{fancyplain}     \fancyhead{}      \fancyfoot[L]{}     \fancyfoot[C]{}            \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \setlength{\headheight}{11pt}               \setlength{\parindent}{2em}     \setlength{\parskip}{16pt}          \begin{document}          if we start our octave at C, or N_{0}=C, then we get \{C,C,D,C,F,E,C,C,D,C,G,F\}, which we can relabel as \{0,0,2,0,5,4,0,0,2,0,7,5\} if we just use the indices of the group elements.          \end{document}


title: How do I write $\notin$ backwards?

text: I write `$P \niton x$`, but it does not work. How can I write the symbol `$\notin$` backwards?


title: How adjust the Header/Footer?

text: With this preamble :               \documentclass[12pt,a4paper,twoside]{book}     \usepackage[top=2.5cm,bottom=2.5cm,right=2.5cm,left=2.5cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{flshort}     \usepackage{shortvrb,latexsym}     \usepackage[french]{mylayout}     \usepackage{lettrine}     \usepackage{makeidx}     \usepackage[frenchb,english]{babel}     \usepackage{pb-diagram}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amscd}     \usepackage{amsthm}     \usepackage{mathrsfs}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage[all]{xy}     \usepackage{enumitem}     % Les ensembles math{\'e}matiques, utilisant l'extension amsfonts     \renewcommand{\headrulewidth}{1pt}     \renewcommand{\footrulewidth}{1pt}     \def\N{{\mathbb{N}}}     \def\Z{{\mathbb{Z}}}     \def\Q{{\mathbb{Q}}}     \def\R{{\mathbb{R}}}     \def\C{{\mathbb{C}}}     \newtheorem{thm}{Th\'eor\`eme}[section]     \newtheorem{lemma}{Lemma}[section]     \newtheorem{pro}{Proposition}[section]     \newtheorem{conj}{Conjecture}[section]     \newtheorem{cor}{Corollaire}[section]     \newtheorem{axiom}{Axiom}[section]     \theoremstyle{definition}     \newtheorem{dfn}{D\'efinition}[section]     \newtheorem{exs}{Exemples}[section]     \newtheorem{ex}{Exemple}[section]     \newtheorem*{rem}{Remarque}     \theoremstyle{remark}     \newtheorem*{note}{Note}     \newtheorem{cas}{Cas}     \newcommand{\p}{{\mathfrak{p}}}     \newcommand{\m}{{\mathfrak{m}}}     \renewcommand{\P}{{\mathbb{P}}}     \newcommand{\Rr}{\mathbb{R}}     \newcommand{\n}{{\mathfrak{n}}}     \renewcommand{\A}{{\mathbb{A}}}     \begin{document}     \selectlanguage{frenchb}     \tableofcontents     \end{document}      I get ![enter image description here](http://i.stack.imgur.com/8lTyl.png) I don't know how I can adjust the length of line in Header/Footer can someone help me to solve this problem? **Edit (flshort.sty)**                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           % Contents: Special Commands for the LShort2e Introduction            % $Id: flshort.sty,v 1.7 2001/11/25 17:43:58 matthieu Exp $          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            % By Tobias Oetiker               % Modified by Matthieu Herrb to handle the french extension             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %\errorcontextlines=10            %save pageref an label          \let\lsspageref=\pageref            \ProvidesPackage{flshort}              \RequirePackage{verbatim}         \RequirePackage{fancyhdr}         \RequirePackage{calc}              \RequirePackage{ifthen}            %          % Lets have some nice headings           %       \pagestyle{fancyplain}       \renewcommand{\chaptermark}[1]{\markboth{#1}{}}        \renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}}           \lhead[\fancyplain{}{\bfseries\thepage}]              {\fancyplain{}{\bfseries\rightmark}}        \rhead[\fancyplain{}{\bfseries\leftmark}]            {\fancyplain{}{\bfseries\thepage}}         \cfoot[]{}          \addtolength{\headheight}{1.6pt}            %             %            % Earlier paragraphs were separated by some space            %                  %\setlength{\parindent}{0pt}        %\setlength{\parskip}{1.5ex plus 0.7ex minus 0.6ex}                  \newcommand{\manual}{\emph{\LaTeX{} Manual}~\cite{manual}}                 \newcommand{\companion}{\emph{The \LaTeX{} Companion}~\cite{companion}}                   \newcommand{\desgraupes}{\emph{\LaTeX{}, Apprentissage, guide et                            r�f�                   rence}~\cite{desgraupes}}                \newcommand{\guide}{\emph{Local Guide}~\cite{local}}                 \newcommand{\contrib}[3]{#1\quad\texttt{<#2>}{\small\\\quad\textit{#3}}\\                 [1ex]}                %          % Some commands for helping with INDEX creation             %             % \protect added because needed with french package. --mh             %              \newcommand{\bs}{\symbol{'134}}%Print backslash               %\newcommand{\bs}{\ensuremath{\mathtt{\backslash}}}%Print backslash              % Index entry for a command (\cih for hidden command index              \newcommand{\cih}[1]{%               \index{commandes!#1@\protect\texttt{\bs#1}}%                \index{#1@\protect\texttt{\hspace*{-1.2ex}\bs #1}}}                   \newcommand{\ci}[1]{\cih{#1}\texttt{\bs#1}}               %Package                 \newcommand{\pai}[1]{%               \index{extensions!#1@\protect\textsf{#1}}%                   \index{#1@\protect\textsf{#1}}%            \textsf{#1}}              % Index entry for an environment             \newcommand{\ei}[1]{%               \index{environnements!\protect\texttt{#1}}%               \index{#1@\protect\texttt{#1}}%              \texttt{#1}}               % Indexentry for a word (Word inserted into the text)               \newcommand{\wi}[1]{\index{#1}#1}             %             % Typesetting Commands                 %                   \newenvironment{lscommand}%              {\nopagebreak\par\small\addvspace{3.2ex plus 0.8ex minus 0.2ex}%               \vskip -\parskip             \noindent%          \begin{tabular}{|l|}\hline\rule{0pt}{1em}\ignorespaces}%         {\\\hline\end{tabular}\par\nopagebreak\addvspace{3.2ex plus 0.8ex          minus 0.2ex}%             \vskip -\parskip}               %             % Type setting Code Fragments            %               \newenvironment{code}{\begin{quote}}{\end{quote}}              %                % Intro Environment             \newenvironment{intro}{\sffamily}{\vspace*{2ex minus 1.5ex}}                   %                 %                   % Symbol Entry for Math Symbol Tables                       %                       \newcommand{\X}[1]{$#1$&\texttt{\string#1}\hspace*{1ex}}                     % normal text ....                      \newcommand{\SC}[1]{#1&\texttt{\string#1}\hspace*{1ex}}                           % for accents in text mode                       \newcommand{\A}[1]{#1&\texttt{\string#1}\hspace*{1ex}}                           \newcommand{\B}[2]{#1#2&\texttt{\string#1{} #2}\hspace*{1ex}}                           \newcommand{\W}[2]{$#1{#2}$&              \texttt{\string#1}\texttt{\string{\string#2\string}}\hspace*{1ex}}               \newcommand{\Y}[1]{$\big#1$ &\texttt{\string#1}}  %              % Mathsymbol Table                \newsavebox{\symbbox}              \newenvironment{symbols}[1]%                {\par\vspace*{2ex}               \renewcommand{\arraystretch}{1.1}                \begin{lrbox}{\symbbox}\hspace*{4ex}               \begin{tabular}{@{}#1@{}}}%                  {\end{tabular}\end{lrbox}\makebox[\textwidth]                       {\usebox{\symbbox}}\par\medskip}                    %               % Special Prep for AMS Symbols Printout                % Should work if AMS is not available              %                      % we have no PS versions of the rsfs fonts ... so this is a nogo for pdf                \ifx\pdfoutput\undefined % We're not running pdftex                 \IfFileExists{mathrsfs.sty}                      {\RequirePackage{mathrsfs}\let\MathRSFS\mathscr\let\mathscr\relax}{}                \fi           \IfFileExists{amssymb.sty}            {\let\noAMS\relax \RequirePackage{amssymb}}             {\def\noAMS{\endinput}\RequirePackage{latexsym}}           \IfFileExists{eucal.sty}         {\RequirePackage[mathscr]{eucal}}          {\IfFileExists{euscript.sty}          {\RequirePackage{euscript}}{}}           %\IfFileExists{eufrak.sty}             %  {\RequirePackage{eufrak}}{}            \IfFileExists{amsbsy.sty}             {\RequirePackage{amsbsy}}{}                      %                % Print |--| to show a distance                    %        \newcommand{\demowidth}[1]{\rule{0.3pt}{1.3ex}\rule{#1}   {0.3pt}\rule{0.3pt}{1.3ex}}          %                % un morceau pour hyperref                   \def\realpageref#1{%            \@safe@activestrue%             \expandafter\real@setref\csname r@#1\endcsname\@secondoffive{#1}%         \@safe@activesfalse%             }                   %                   % --- example ----                % This is an environment to set LaTeX examples.                    % On the left side the source text and on the                % right side the typeset text.                   %              % \begin{example}                   % \Large This is Large              % \end{example}                        %                        % This Part is stolen from the verbaim.sty by FMi                        %                      \newwrite\example@out                     \newbox\exa@box              \newcounter{exacnt}               \setcounter{exacnt}{1}                \newlength{\savefboxrule}              \newlength{\savefboxsep}             \newlength{\outdent}                 \setlength{\outdent}{2cm}             \addtolength{\headwidth}{\outdent}                \newenvironment{example}%            {\begingroup% Lets Keep the Changes Local            \@bsphack           \immediate\openout \example@out \jobname.exa            \let\do\@makeother\dospecials\catcode`\^^M\active           \def\verbatim@processline{%             \immediate\write\example@out{\the\verbatim@line}}%           \verbatim@start}%          {\immediate\closeout\example@out\@esphack\endgroup%                                 %                                 % And here comes my part. :-                                 %               \setbox\exa@box=\vbox{% This box is mainly for debugging              \stepcounter{exacnt}%             \setlength{\parindent}{0pt}%             % Page \lsspageref{exa:\theexacnt}             \expandafter\ifx\csname r@exa:\theexacnt\endcsname\relax\else           \ifx\pdfoutput\undefined % We're not running pdftex           \ifx\@pr@ORI\undefined % We're not using french package              \def\exa@page{\HyPsd@pageref{exa:\theexacnt}}%             else %           \def\exa@page{\@pr@ORI{exa:\theexacnt}}% french pageref is not a number          \fi %           \else %           \def\exa@page{\HyPsd@pageref{exa:\theexacnt}}%            \fi              \ifodd\exa@page\hspace*{0pt}\else\hspace*{-\outdent}\fi%            \fi         \makebox[\textwidth][l]{%            \raisebox{-\height}[0pt][\totalheight]{%         \begin{minipage}[t]{0.5\outdent+0.46\textwidth-3mm}%         \small\verbatiminput{\jobname.exa}          \end{minipage}}%      \hspace{5mm}%      \setlength{\savefboxrule}{\fboxrule}%      \setlength{\fboxrule}{0.1pt}%      \setlength{\savefboxsep}{\fboxsep}%      \setlength{\fboxsep}{3mm}%      \raisebox{-\height}[0pt][\totalheight]{%       \fbox{%         \begin{minipage}[t]{0.5\outdent+0.54\textwidth-2mm-2\fboxrule-2\fboxsep-0.7ex}%           \setlength{\fboxrule}{\savefboxrule}%           \setlength{\fboxsep}{\savefboxsep}%           \setlength{\fboxrule}{0.5pt}%           %\setlength{\parskip}{1ex plus 0.4ex minus 0.2ex}%           \setlength{\parskip}{0ex plus 0ex minus 0ex}%           \begin{trivlist}\item\small\input{\jobname.exa}           \end{trivlist}         \end{minipage}         }%       }%       }\label{exa:\theexacnt}%       } % end vbox           %\showthe\ht\exa@box        \par\addvspace{2.0ex plus 0.8ex minus 1ex}\vskip -\parskip       \noindent\box\exa@box       \par\addvspace{3.2ex plus 0.8ex minus 1ex}\vskip -\parskip       }         \newenvironment{lined}[1]%        {\begin{center}\begin{minipage}{#1}\hrule\medskip}          {\vspace{-1ex}\hrule \end{minipage}\end{center}}         % I want no headers on pages created by clearpage              \renewcommand{\cleardoublepage}      {\clearpage\if@twoside \ifodd\c@page\else       \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}                % French.sty redefined tilde. Grrr        \ifx\@tildeORI\undefined        \else        \let\tilde\@tildeORI         \fi


title: How to specify self-installed fonts to XeLaTeX?

text: I successfully installed the font (*.tfm, *.pfb and *.vf files) of my university, I'm now struggling to use them with XeLaTeX. About my specifications: I am running TeXLive 2011 using AucTex 11.86. My LaTeX file looks as follow:               %!TEX TS-program = xelatex-xdvipdfmx                                                                                %!TEX encoding = UTF-8 Unicode                                                                                \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage{fontspec}     \setmainfont[Path = /usr/local/texlive/texmf-local/fonts/type1/ETH,     Extension= .pfb]     %\setmainfont{Arial}                                                                                \usepackage{enumerate}     \usepackage{fullpage}     \usepackage{amssymb}     \usepackage{amsmath}     %\usepackage[usenames]{color}                                                                                \usepackage{lineno}     %\usepackage[pdftex]{graphicx}                                                                                \usepackage{epstopdf}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}     \usepackage[margin=10pt,font=small,labelfont=bf]{caption}          % \usepackage{wrapfig}                                                                                \usepackage{subfig}     \usepackage{fixltx2e}     \usepackage{multirow}          \setlength{\parskip}{\baselineskip}     \setlength{\parindent}{0pt}     \renewcommand{\baselinestretch}{1.35}          \title{test Xelatex}          \author{Tonkiplis}          \begin{document}     \maketitle          \abstract{Abstract: only an outline for now.}          \noindent{\bf Keywords:}          \section{Introduction}     lol     \section{Methodology}          \clearpage          \end{document}      And I tried the different extensions (tfm, pfb and vf). The compilation is successful but the output pdf only contains an empty page.   * What am I doing wrong?   * How shall I specify the font path to be successful?   * What is the meaning of those tfm, pfb and vf types?


title: Drawing a Power Flow arrow in circuitikz

text: Is it possible to draw a power flow arrow in `circuitikz`? I'd like to draw an arrow point away from the voltage source on the right that indicates the flow of power towards the left. What I'm after is not a current arrow, but a larger arrow that sits above the circuit instead of on the wire. Thanks in advance!               \begin{circuitikz} \draw     (0,0)   to [sV, l=$V_{\text{upstream}}$] (0,2)             to [R, l=$R$] (2,2)             to [L, l=$X_l$] (4,2)             to [sV, l=$V_{\text{DG}}$] (4,0)             -- (0,0);     ;\end{circuitikz}      ![enter image description here](http://i.stack.imgur.com/bRUxo.png)


title: footnotes background color

text: In the usual Latex document classes, is there a simple way to have a background colour behind the footnotes only? It would probably help the reader in the organization of a page between main text and footnotes.


title: Automatically arrange references in increasing number

text: I have `\cite{b,c,a,d}` which generates `[2, 3, 1, 4]`. Is it possible to automatically make them in increasing order without manually changing `\cite{b,c,a,d}` to `\cite{a,b,c,d}`. Any help and suggestions will be much appreciated.


title: arara: making rules for a script that takes multiple flags and arguments

text: I'm working on an `arara` rule for `indent.plx` which can be called in a few different ways:   * `indent.plx myfile.tex` (outputs to the terminal)   * `indent.plx -w myfile.tex` (overwrites original file and outputs to terminal)   * `indent.plx -o myfile.tex outputfile.tex` (outputs to a separate file and outputs to terminal)   * `indent.plx -s myfile.tex` (silent mode, no ouptput to terminal) I'd like to wrap up these choices (and others, hopefully) in one tidy `arara` rule. So far I have               !config     # indent rule for arara     # author: cmhughes     # requires arara 3.0+     #     # Sample use:     # % arara: indent     # % arara: indent: {overwrite: true}     # % arara: indent: {overwrite: on}     # % arara: indent: {overwrite: yes}     # % arara: indent: {overwrite: false}     #     identifier: indent     name: Indent     command: indent.plx @{overwrite} "@{file}"     arguments:     - identifier: overwrite       flag: <arara> @{ isTrue( parameters.overwrite, "-w","" ) }      How can I extend my rule to include the other options to output to a separate file and for silent mode? I'd like to be able to use, for example, each of the following               % arara: indent: {overwrite: false, outputFile: outputfile.tex}     % arara: indent: {outputFile: outputfile.tex, silent: true}


title: Pgfplot Automation tool

text: Are there any good graphical software that I can use to draw diagrams/graphs and export them as pgfplot code? For example, I want to create an histogram so I drag an histogram icon from a menu to the "scene" and tell the program to load the data from what file.. etc.


title: Curved text (on multiple lines) within curved arrow using tikz

text: I have a curved arrow and want to put text inside of it (having the same curve as the arrow, of course). If the text is longer than the arrow, the text should be put on multiple lines (optimally with the arrow automatically getting thicker appropriately). See figure below. (How) can I do this? ![enter image description here](http://i.stack.imgur.com/HZxt4.png) * * * Update: I now use                 \coordinate (specRoot) at (-10,0);       \coordinate (testTreeRoot) at (0,0);       \draw[->, >=latex, blue!20!white, line width=15pt, bend left]       (specRoot) to (testTreeRoot);       \path [decorate,decoration={text along path, text={traverse part of           the STS and heuristically choose the best test tree}}]          [out=30] (specRoot) to [in=130] (testTreeRoot);      But how can I combine the decorated text along the path and the actual arrow? How can I do a carriage return, i.e. decorate two lines of text along a single path? * * * Update: And now I use the following, in the file `lazyOTFoverviewSmall.tex`:               \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.2cm, semithick, mypostaction/.style 2 args={              decoration={                 text align={                     left indent=#1},                     text along path,                     text={#2}                  },              decorate              }       ]            \begin{scope}[shift={(-10cm,0cm)}]           \node[state] (specq0) {$q_0$};       \end{scope}       \begin{scope}           \node[state] (q0) {$q_0$};       \end{scope}            \coordinate (specRoot) at (-10,0);       \coordinate (testTreeRoot) at (0,0);            \draw[-latex, blue!20!white, line width=5ex, bend left]       (specRoot) ++(1cm,1cm)       to (testTreeRoot) ++(-1cm,1cm);       \path [postaction={mypostaction={1cm}{traverse part of the STS}},     postaction={mypostaction={1cm}{and heuristically choose the best test         tree}, /pgf/decoration/raise=-3mm}]          [out=30] (specRoot) ++(1cm,1cm) to [in=130] (testTreeRoot) ++(-1cm,1cm);     \end{tikzpicture}      and in `master.tex` I have:               \usepackage{tikz}     \usetikzlibrary{decorations.text}     \usetikzlibrary{backgrounds,shapes} %pictures     \usetikzlibrary{arrows,automata}          ....          \begin{document}          ...          \begin{figure}[hbt]       \centering       \scalebox{.7}{\input{gfx/MBT/lazyOTFoverviewSmall.tex}}       \caption{Overview of Lazy On-the-fly MBT}\label{fig:lazyOTFoverview}     \end{figure}          ....


title: Using \typeC in package skak will not compile

text: (1) I am using MikTeX 2.9 and am generally a very happy user of `skak` \- barely two hours seperated the moment I wanted to typeset a chess problem and knowing absolutely nothing about what support there might be in LaTeX and having `skak` up and running and producing. However, I have just hit a hurdle: any attempt to invoke `\styleC` (which prints moves as a vertical array of 2 half moves per line) results in compilation errors, while `\styleA` and `\styleB` produce the intended results. What puzzles me even more is the fact that I have no problem compiling the `skakdoc.tex` file supplied in the distribution and I am using exactly the same list of `\usepackage` instructions in my document as `skakdoc` does. What the heck? (2) While on the subject of styles, wouldn't it be nice to have a style that will represent chess pieces with their letters (e.g. R for rook, N for knight etc.) in place of showing their symbols. I find that invoking `skak` with the 'small' parameter makes reading text somewhat marginal, particularly the bishops are hard to spot. I find modern chess literature supports both styles so I imagine such a letter-style would not go astray with users of `skak`. * * * Apologies for starting a goose chase with this one. My original code used the \mainline{} instruction followed by a linefeed, which is OK for styles A and B. When switching to \styleC this linefeed caused a compiler error; unfortunately my error messages after compilation have never worked properly, so I never got the explicit message "no line to end here".               \documentclass[10pt]{article}     \usepackage{xskak}     \begin{document}     \newgame     \styleA     \textbf{styleA}\\     \mainline{1.e4 c5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3} \\     \\     \newgame     \styleB     \textbf{styleB}\\     \mainline{1.e4 c5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3} \\     \\     Note: while linefeeds may follow the mainline command for style A and B, a linefeed following the mainline command when styleC is set causes compiler error "there is no line to end here".\\     \newgame     \styleC     \textbf{styleC}\\     \mainline{1.e4 c5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3}%\\      \end{document}


title: Fancy start-of-chapter marks

text: I'd like to include some fancy start-of-chapter marks in my poster. I especially like these marks (see pictures below) in a Power Point template. I wonder if there is a convenient way to produce similar marks using LaTeX commands. ![enter image description here](http://i.stack.imgur.com/5duV7.png) ![enter image description here](http://i.stack.imgur.com/R0C6A.png) **Note** : by "LaTeX commands" I don't mean `\includegraphics` and things like that. I might as well just use Power Point. I am wondering if LaTeX could give me similar fancy marks that can be zoomed to arbitrary size with good resolution. **Also** : I believe these marks are kind of standard, as I have seen them in several places. I am sure I have seen both marks in e-books, and OMG, the first mark appears in this page, right under the TEX header! ![enter image description here](http://i.stack.imgur.com/UwNsq.png)


title: Best way to do numbering in LaTeX

text: I have use enumerator before, that is good when it comes to numbering with letters after your initial number such as 2a, 2b etc. But now I have problem where I want to number my questions 2.1.1, 2.1.2. I tried to use the enumerator               \textbf{Question 2.1}\\     \HRule     \begin{enumerate}[(2.1.1)]\itemsep1pt          \end{enumerate}      But this gives me error, what would it the best way to handle this situation.


title: algorithm2e missing document mystery

text: I am trying to use the `algorithm2e` package. I downloaded the package from CTAN and verified that I can typeset its own documentation (`algorithm2e.tex`). I then try to write my own document that uses `algorithm2e`, as follows               \documentclass[12pt]{amsart}     \usepackage{algorithm2e}     \begin{document}     test     \end{document}      This TeX file is in the same directory as all the `algorithm2e` files that I copied from the web. I blew away all the `aux` files and other temporaries. I get `Latex error: Missing documentSee the LaTeX manual...` etc. I have tried this under TeXWorks, TeXShop, and Texmaker on a Mac Book Pro, all with the same results. I have read the detailed log and output of TeX trying to figure out what TeX thinks is missing, and I haven't found it. Every other document I have tried to typeset works out ok. If I take out the `\usepackage{algorithm2e}` command, everything is ok. I also have had no trouble using many other packages, such as               \usepackage[all]{xy}     \usepackage{noindent}     \usepackage{multirow}     \usepackage{amssymb,amsmath,latexsym,amsbsy,comment,pifont}     \usepackage{amscd}     \usepackage{palatino}     \usepackage{stmaryrd}     \usepackage{eulervm}     \usepackage{fullpage}     \usepackage[usenames,dvipsnames]{color}     \usepackage{fancybox}     \usepackage{graphicx}      All ok. The only one that seems to cause problems is `algorithm2e`, and only in my OWN document. To reiterate, it works great when typesetting its own documentation. I tried putting the following in every position in that block of usepackage commands               \usepackage[vlined]{algorithm2e}      it didn't matter where I put it, it generates the same error. I've boiled this down into the smallest example I can make and I'm stumped.