title: siunitx not working in table

text: I am trying to use siunitx package to format tables, but it just doesn't seem to be working. I am using texlive2012 installation under ubuntu 12.04. A minimal "working" example would be:               \documentclass{scrreprt}      \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{siunitx}          \begin{document}          \begin{table}[ht]       \centering         \caption{Test}      \begin{tabular}{S}       {Test2} \\       0.23 \\       0.56      \end{tabular}     \end{table}          \end{document}      When trying to compile this, it just gives me 3 errors with "undefined control sequence" - here an excerpt from the output:               l.14   {             Test2} \\     ! Undefined control sequence.     <recently read> ...gnore_spaces_execute_branches:           l.15   0             .23 \\     ! Undefined control sequence.     <recently read> ...gnore_spaces_execute_branches:           l.16   0             .56      It would be great if someone could help me here ... Thanks, Juergen


title: \text{} in a fraction but spread over two lines

text: Rather than try to describe in words or by way of a MWE, I have uploaded a picture of the desired result. I know how to create all the components (e.g. `\frac{}{} \text{}, ^{}`) of this fraction, except for the way in which each piece of text is over two lines. Any suggestions? ![enter image description here](http://i.stack.imgur.com/uZASJ.png)


title: How can I create a template for 2048 game situations?

text: I guess some of you might know the game 2048. A situation has the following shape: ![Example](http://i.stack.imgur.com/gn7Co.png) I would like to create a TikZ template that allows me to make similar drawings. ## MWE To create the following example (which is the best I got), I've used answers from Can TikZ create pixel art images?               \documentclass[tikz]{standalone}     \usepackage{ifthen}     \renewcommand\familydefault{\sfdefault}     \usepackage{tikz}     \usetikzlibrary{calc}     \def\pixels{     {0,2,0,0},     {0,8,0,4},     {2,2,4,16},     {8,16,128,2},     }          % Font color for 2 and 4: #776e65     % Font color for rest: #f9f6f2     % Grid color: #bbada0     % Font family: "Clear Sans", "Helvetica Neue", Arial, sans-serif          \definecolor{pixel 0}{HTML}{CCC0B3}     \definecolor{pixel 2}{HTML}{EEE4DA}     \definecolor{pixel 4}{HTML}{EEE4DA}     \definecolor{pixel 8}{HTML}{F2B179}     \definecolor{pixel 16}{HTML}{F59563}     \definecolor{pixel 32}{HTML}{F2B179} % TODO     \definecolor{pixel 64}{HTML}{F2B179}     \definecolor{pixel 128}{HTML}{EDCF72}     \definecolor{pixel 256}{HTML}{F2B179} % TODO     \definecolor{pixel 512}{HTML}{F2B179} % TODO     \definecolor{pixel 1024}{HTML}{F2B179} % TODO     \definecolor{pixel 2048}{HTML}{F2B179} % TODO     \definecolor{pixel 4096}{HTML}{3E3933}     \begin{document}     \begin{tikzpicture}       \foreach \line [count=\y] in \pixels {         \foreach \pix [count=\x] in \line {           \draw[fill=pixel \pix] (\x,-\y) rectangle +(1,1);           \ifthenelse{\equal{0}{\pix}}                {}                {\node at ($(\x,-\y) + (0.5,0.5)$)    {\Huge \pix};}         }       }          \end{tikzpicture}     \end{document}      ## Rendered: ![enter image description here](http://i.stack.imgur.com/9v5d4.png) ## Issues   * How do I change the font color?   * I always have problems with changing fonts: In this case, the font should be bold.   * The numbers should fit into the cells with some padding.   * The grid should not be black but `#bbada0`.


title: \textheight formula like Bringhurst

text: There is a formula like that of Bringhurst for the 66 characters to calculate the height of the cage of the text? or is it just a question of personal pleasure? for examples i have found this two command in classicthesis.sty                  \areaset[current]{336pt}{750pt} % ~ 336 * factor 2 + 33 head + 42 \the\footskip         \areaset{336pt}{761pt} % 686 (factor 2.2) + 33 head + 42 head \the\footskip 10pt        what means:               686 (factor 2.2) + 33 head + 42 head \the\footskip 10pt       and                ~ 336 * factor 2 + 33 head + 42 \the\footskip       ?


title: Extract document statistics? - How many pages has chapter xy? Count fixmes?

text: I have a large pdflatex document where each chapter is located in an extra text file and included with `\include{chapter3.tex}` ...   * How can I extract the page numbers of each chapter and write them into a text file?   I want to know how many pages each chapter has (at a certain moment) and get a list with e. g.   (Can this be done with the included text files or would it be better to define labels at the start of each chapter and then read out the page numbers of those labels)? > chapter 1: 5 pages   >  chapter 2: 10 pages   >  chapter 3: 4 pages > > document: 19 pages   * Furthermore I'd like to count the occurences of certain commands like e. g. `\N{note}` or `\NK{note}` (which I have defined for creating notes in the document with the `fixme` package per chapter and write them also in the text file like:  > chapter \N \NK   >  chapter 1: 20 3   >  chapter 2: 3 5 > > document: 23 8


title: \expandafter within a \begingroup ... \endgroup

text: > **Possible Duplicate:**   >  What does \begingroup\expandafter…\endgroup do? In many of Heiko Oberdiek's packages one sees this type of construction:               \begingroup\expandafter\expandafter\expandafter\endgroup     \expandafter\ifx\csname pdf@filesize\endcsname\relax       \ifxetex         ...      What is the purpose of enclosing the `\expandafter` commands within a `begingroup...\endgroup`? What are the advantages of such an approach?


title: How to get to use {align} with an unusual document class?

text: So I'm required to use a particular documentclass, "llncs", which for some reason is preventing me from using {align}. Is there an alternative that I can use? The beginning of my tex file               \documentclass{llncs}      My tex part with errors is               \begin{align*}     \forall q \in S \begin{cases}     PRUNE(I_{p_j}) \iff d(p_j,q) - r \ge d_{m_j}\\     PRUNE(O_{p_j}) \iff d(p_j,q) + r < d_{m_j}     \end{cases}     \end{align*}


title: Putting notes to the side

text: Is there a package to put "footnotes" to the side like in this example : http://www.bvh.univ- tours.fr/Consult/consult.asp?numfiche=571&index=15&numtable=B372615206_18229&mode=1&ecran=0 ?


title: TeXShop foreground color can't be set to desired default

text: Among the IDE's I've tried, TeXShop wins it for me as of now. Except for a small but very important customization: setting the foreground color. I dig through `~/Library/Preferences` and find `TeXShop.plist`. Somewhere near the bottom of the file, I find some text coloring preferences:               commandblue     commandgreen     commandred          commentblue     commentgreen     commentred          indexblue     indexgreen     indexred          markerblue     markergreen     markerred          background_B     background_G     background_R      If I set the values for the above parameters, they reflect successfully in TeXShop. However, the glitch comes in with:               foreground_B     foreground_G     foreground_R      The `foreground_` parameters don't reflect in TeXShop at all. Yes I can go to the Terminal and type               $ defaults write TeXShop foreground_B 0.7     $ defaults write TeXShop foreground_G 0.7     $ defaults write TeXShop foreground_R 0.7      ... which still fails. **A different approach**   I got this from a rather old (2008) forum post. >   1. Click the "Set ..." button for Document Font. > >   2. Click the Text Color button (a "T" with a lime rectangle to the right > of it). > >   3. [This is the weird bit.] Click the "OK" button in the TeXShop > Preferences window without closing the Text Colors window. > >   4. Choose a color in the Text Colors window. > > > > Unfortunately, this doesn't seem to save the text color settings -- whenever > you restart TeXShop it returns to black text. Alas! Am I missing something? I hope we can make TeXShop win it some more.


title: Problem Installing MiKTeX 2.9 under Windows XP Pro

text: Every time I try to install the full distribution of MiKTeX 2.9 under Windows XP Pro, I get the following error message.               Installation: C:\Program Files\MiKTeX 2.9     Loading package database...     starting package maintenance...     installation directory: "C:\Program Files\MiKTeX 2.9"     package repository: "C:\Documents and Settings\Vasilios\My Documents\My Downloads\MiKTeX\miktex-2.9.4250"     visiting repository "C:\Documents and Settings\Vasilios\My Documents\My Downloads\MiKTeX\miktex-2.9.4250"...     repository type: local package repository     loading lightweight database...     lightweight database digest: 33d72d9ab13255850b97edbad0e46998          An error occurred:       source file: Libraries\MiKTeX\PackageManager\PackageInstaller.cpp       source line: 3281       message: The operation could not be completed because the following file failed verification:          C:\Documents and Settings\Vasilios\My Documents\My Downloads\MiKTeX\miktex-2.9.4250\hpsdiss.cab       info:       If it's any help, the computer I am trying to install it on is connected to the internet via a wireless interface. To obtain the distribution files, I have had to download them onto a computer connected to the internet via ethernet, and transferred them over using a memory stick. Also, if it is any help, I downloaded the full distribution of MikTeX 2.9 from the following http server.               ctan.unsw.edu.au      Any help would be appreciated.


title: how can I shade an area in a beamer frame?

text: I have a beamer frame, and I want to shade a whole area with some color - i.e. that the whole area (rectangular) will be using a single grey color switched from any color (except for white) appearing in this area. Is that possible? I don't mind if I have to play around with the coordinates of the area specification to get it right (i.e. it can be absolute positioning). Just a note: if that's impossible (shading an area), I am willing also to settle for a whitespace holder in this area, that erases everything below. EDIT: By shading I mean changing the color of the current content to grey, not the background. EDIT 2: It seems like my question was not very clear. I have some packages that I am using (such as qtree). All of these are environment based, and are used as macros, and therefore they are hard to customize to make everything that appear in them grey. So what I want is to do re-draw on these areas and just replace every pixel which is non-white to a gray pixel. An alternative is to replace all pixels in a certain area in the frame to a white pixel (irregardless of its previous color). This seems much easier to do. It is just "re-positioning" a white rectangle on existing text/image. I think the general idea of what I want to do might go against the rather hierarchical top-down structure of latex code, but it seems like a simple thing to ask for, so I thought it might be possible.


title: Bibliography behave like section in the TOC

text: Is it possible to include the references/bibliographies in the TOC with an appropriate section number? Currently my MWE below results in the following image: ![enter image description here](http://i.stack.imgur.com/412pa.png) My MWE:               \documentclass{report}          \usepackage[resetlabels]{multibib}     % Implements functionality to "append" and "prepend" code to other commands     \usepackage{etoolbox}          \ifdefined\chapter       \newcommand{\refname}{References}       \patchcmd{\thebibliography}{\chapter*{\bibname}}{%         \section*{\refname}         \addcontentsline{toc}{section}{\refname}         }{}{}       \newcommand{\bibliographies}{%         \chapter*{\bibname}         \addcontentsline{toc}{chapter}{\bibname}       }     \else       \newcommand{\bibname}{Bibliography}       \patchcmd{\thebibliography}{\section*{\refname}}{%         \subsection*{\refname}         \addcontentsline{toc}{subsection}{\refname}         }{}{}       \newcommand{\bibliographies}{%         \section*{\bibname}         \addcontentsline{toc}{section}{\bibname}       }     \fi          \newcites{A}{References}     \newcites{B}{References}          \begin{document}          \tableofcontents          \chapter{First Chapter}       \section{A section}       this is a citation \citeA{aa}       \bibliographystyleA{plain}       \bibliographyA{lit}           \chapter{Second Chapter}       \section{A section}       this is another citation \citeB{bb}       \bibliographystyleB{plain}       \bibliographyB{lit}             \end{document}      and the `lit.bib` file is as follows:               @Article{aa,       author =   {Author, A.},       title =    {Title},       journal =  {Journal},       year =     2000     }          @Article{bb,       author =   {Brother, B.},       title =    {Titling},       journal =  {Ann. J.},       year =     2002     }      To compile you must run:               pdflatex main.tex     bibtex A.aux     bibtex B.aux     pdflatex main.tex     pdflatex main.tex


title: Command for Package feature Demo (listings problem)

text: I have to write a small demonstration of some features of my package. I was thinking about doing something like:               \documentclass{article}          \usepackage{listings}          \newcommand{\demo}[1]{%         \fbox{         \begin{minipage}{.5\linewidth}         #1         \end{minipage}}%         \fbox{%         \begin{minipage}{.5\linewidth}         \begin{lstlisting}         #1         \end{lstlisting}         \end{minipage}}     }          \begin{document}          \demo{\section{section}}          \end{document}      But this isn't working, because of listings can't be used inside commands. Any nice solution? (Would like to have a left right comparison between source and result) And is there some way to enclose this so that nothing outside is affected?


title: One column equation in twocolumn document class

text: I am writing a paper (`revtex4-1`, reprint documentclass which I believe uses `twocolumn`) and need to have a long equation that needs to break the two column format. I've seen answers to this question using `multicol` but I can't use that class. So does anyone know how to do this from `twocolumn` class? I have tried one way that makes the equation a `figure` but I can't get the alignment with the text correct. Any help would be greatly appreciated.


title: Typesetting on block matrix is ugly

text: I have a large `n` x `n` matrix I'm trying to typeset. My current code is as follows:               $\left(\begin{array}{c|ccc}     1 & c_2 & \cdots & c_n \\     \hline     0  & \multicolumn{3}{c}{\multirow{3}{*}{\Huge{$A$}}} \\     \vdots & & &\\     0 & & &      \end{array}\right)$      The output is currently terrible in a number of ways. First, the large block `A` matrix (which is supposed to be an `(n-1)` x `(n-1)` submatrix) is not centered properly. Second, the vertical dots on the left hand side are not properly vertically centered. Third, it is just visually unappealing in a way that I can't quite put my finger on. Does anyone have any suggestions on how to typeset this in a better manner?


title: Making footmisc work with manyfoot or bigfoot

text: How is it possible to get the `side` option of `footmisc` to work with the `manyfoot` or `bigfoot` packages? The following displays the footnotes in the bottom of the page. The footnotes show on the sides when `bigfoot` is not used.               \documentclass[twocolumn=true]{scrartcl}          \usepackage{lipsum}          \usepackage{bigfoot}     \DeclareNewFootnote{default}     \DeclareNewFootnote{B}[alph]     \MakeSortedPerPage{footnoteB}          \usepackage[side]{footmisc}          \setlength{\marginparwidth}{2cm}% adjust to your document's needs          \begin{document}          Hello\footnote{This is some text in the margin that should break and everything.}     World\footnoteB{And some more text that should go to the margin as well and behave like     the other footnote.}.          \lipsum[1-3]          Hello\footnote{This is some text in the margin that should break and everything.}     World\footnoteB{And some more text that should go to the margin as well and behave like     the other footnote.}.          \lipsum[4-6]          \end{document}      **Edit:** Here is my go at adapting Ulrike's answer:               \documentclass[twocolumn=true]{scrartcl}     \usepackage{lipsum}          \usepackage{bigfoot}     \DeclareNewFootnote{A}[arabic]     \DeclareNewFootnote{B}[alph]     \MakeSortedPerPage{footnoteB}          \newcommand\sidefootnoteA[1]{%        \footnotemarkA        \marginpar{\footnotesize\addtocounter{footnoteA}{-1}\footnotemarkA\raggedright#1}}          \newcommand\sidefootnoteB[1]{%        \footnotemarkB        \marginpar{\footnotesize\addtocounter{footnoteB}{-1}\footnotemarkB\raggedright#1}}          \begin{document}          Hello\sidefootnoteA{This is some text in the margin that should break and everything.}     World\sidefootnoteB{And some more text that should go to the margin as well and behave like     the other footnote.}.          \lipsum[1-3]          Hello\sidefootnoteA{This is some text in the margin that should break and everything.}     World\sidefootnoteB{And some more text that should go to the margin as well and behave like     the other footnote.}.          \lipsum[4-6]          \end{document}      It fixes does put the notes in the margin, and it does a good job with counter A, which is numeric, but counter B doesn't get decremented, so I end up with `d` for the last note. **Edit 2** : The problem comes from `\MakeSortedPerPage{footnoteB}`. Commenting it fixes the issue.


title: Space just before minipage

text: This is my `.tex` file:               \documentclass{article}     \usepackage{framed}     \setlength{\FrameSep}{3pt}     \begin{document}        \noindent{}The king\\        \begin{minipage}{0.9\textwidth}           is dead,           \begin{framed}              Long live           \end{framed}           the king        \end{minipage}     \end{document}      This is the output: ![current](http://i.imgur.com/EZvEX9K.png) This is the intended output: ![intended](http://i.imgur.com/D35NTzM.png) The spacing between "The king" and "is dead" should be the same as that between "is dead" and "Long live"(Ignore the left margins, couldn't take the screenshot properly). Of course I could replace               \noindent{}The king\\      by               \noindent{}The king\\[4mm]      or something, but I want something more elegant. What is the best way to do this? Any help would be appreciated.


title: I want to use Cyrillic in my document

text: I want to use the Cyrillic alphabet in my document, but the Russian words never compile. Here's the code I'm using: https://www.sharelatex.com/project/5250f987c4d3fb9d3e001233 As you can see, my name isn't showing up.


title: How does \usepackage work?

text: I have a style file which includes another `.sty` file with `\usepackage`. Everything works fine. Since this is a small file written by myself I decided to insert it verbatim at the same place were I use `\usepackage` in the surrounding file. But this results in errors. This gives raise to the general question in the title. More specific: What do I have to do to make such an inclusion work?


title: How to change the size of the brackets

text: \begin{document}          The algebraic system define over operator $\star$ , which is \emph{closed} and \emph{associative} is called SEMIGROUP.     The algebraic system define over operator $\star$ having property \emph{Closed}, \emph{Associative} and \emph{Identity} is  called MONOID.     \end{document}      I want to write 1.closed 2.associative } semigroup 1.closed 2.associative 3.identity } monoid I want to write 1.closed 2.associative in two different lines and to combine them with long'}' symbol and to write semigroup . How can I do that?


title: How to change the step of tick and label of \psgrid?

text: Sometimes it will be convenient to work in big integers for the coordinates. To control the physical size, we can adjust the `unit` for scaling. Unfortunately, changing `unit` to a small size will make the grid, that is very useful in navigation, become very dense and no longer useful. I have attempted to reduce the label size but it is still dense.               \documentclass[pstricks,border=12pt]{standalone}     \psset{unit=1mm}     \addtopsstyle{gridstyle}     {         gridlabels=3pt,     }     \begin{document}     \begin{pspicture}[showgrid](50,50)          \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ICoXS.png) Ideally we should have a control to change the step of the grid lines and labels. For example, the grid lines and labels are made and put only for the multiple of 5. How to do it? Is it possible? ## Note Don't suggest me to use `\psaxes` because I don't want to load `pst-plot` whenever I need the above mentioned requirement.


title: TeXnicCenter only offers an empty project

text: After clicking on "New Project" my TeXnicCenter only offers me an empty project, without any template. Can anyone tell me what is wrong with my programm? Thanks!


title: Titlingpage use in memoir class

text: Why the `titlingpage` command do not function as the titlepage command? is not the same command but for the memoir class?               \documentclass[a4paper]{memoir}          \usepackage{lipsum}          \begin{document}     \begin{titlingpage}     \lipsum[1-5]     \end{titlingpage}     \end{document}


title: Bibtex not running after upgrading Ubuntu from 13.04 to 13.10

text: I'm having problems with my latex installation on Ubuntu 13.10. Have been using it successfully for a while on Ubuntu 13.04, after I updated bibtex doesn't seem to work. The error I get is:               This is BibTeX, Version 0.99d (TeX Live 2013/Debian)     The top-level auxiliary file: paper.aux     I found no \citation commands---while reading file paper.aux     I found no \bibdata command---while reading file paper.aux     I found no \bibstyle command---while reading file paper.aux     (There were 3 error messages)      I have removed all texlive packages from my system and re-installed texlive- full and kile without success. Any ideas on how to solve this? Thanks! Edit1: Example of .tex file:               \documentclass[a4paper,10pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc} % File encoding, you should try to stick to utf8.          \usepackage{csquotes} % Needed for biblatex     \usepackage[maxnames= 10, minnames = 10]{biblatex} % Modern bibliography facilities (you may change style to numeric). change to old bibtex if you insist on using that.     \usepackage{booktabs}          \usepackage{mathtools} % All your math related needs     \usepackage{tikz} % Draw figures, required for cover page     \usepackage{subfig} % Subfloats          \addbibresource{bibliography}           \title{}     \author{}          \begin{document}     \section{test}     Citation\cite{Pironneau1984}          \cleardoublepage     \printbibliography          \end{document}      And bibliography.bib:               @article{Pironneau1984,     author = {Pironneau, O.},     journal = {Springer-Verlag},     title = {{Optimal Shape Design for Elliptic Systems}},     year = {1984}     }      **Solution:** I found a solution to this problem when you suggested running biber.               sudo apt-get install biber      and the bibliography started working again, even without the .bib extension. Not sure why I had to install it separately as it was working fine before. Thanks for the suggestions @CV4, @Māris Ozols & @MMA! As explained by @jon the default engine is now biber intead of bibtex which explains why the biber packages is needed.


title: Can't get babel and amsthm to play nice once Hebrew is loaded

text: I am working in LaTeX, and I am trying to get babel and amsthm to play nice together. I produced a minimal example (which gives a different error than the full project, but getting this to work could be the stepping stone I need for success in that)               \documentclass[hebrew,english]{memoir}       \usepackage[utf8x]{inputenc}       \usepackage{babel}       \selectlanguage{english}      \usepackage{amsmath}     \usepackage{amsthm}       \newtheorem{theorem}{Theorem}[chapter]       \begin{document}       \chapter{Hello}       This is some text.\newline       \begin{theorem}       This is a theorem.       \end{theorem}       \begin{otherlanguage}{hebrew}        שלום       \end{otherlanguage}       \hfill\newline       English again!       \end{document}      This does not compile. It would compile if:   1. I comment out the `\begin{theorem}...\end{theorem}` part,    2. I remove the use of babel completely, or   3. I simply remove the Hebrew from loading (and comment out the relevant part). The error message is:               ! Missing { inserted.       <to be read again>                           T       l.14 T             his is a theorem.       A left brace was mandatory here, so I've put one in.       You might want to delete and/or insert some corrections       so that I will find a matching right brace soon.       (If you're confused by all this, try typing `I}' now.)        This error is pointed at the `\begin{theorem}` part and there is another which seems to be related to the `\end{theorem}` line, it's slightly different:               )       Runaway text?       This is a theorem. \end {theorem} \begin {otherlanguage}{hebrew} \\ש\ETC.       ! File ended while scanning text of \dth@everypar.       <inserted text>                        }       <*> babeltest.tex            I suspect you have forgotten a \`}', causing me       to read past where you wanted me to stop.       I'll try to recover; but if the error is serious,       you'd better type \`E' or \`X' now and fix your file.            ! Emergency stop.        For the purpose of the project I don't need any theorems to be stated in Hebrew. I just need some text and minor mathematical symbols, these will be appended to the end of the document, too. Is there a way to make `babel` ignore `amsthm` each other, so that I can have one big project for everything, or do I need to create a separate project for the Hebrew part? **Edit:** It seems that the main problem with my big project is the fact that I define a long list of `\newtheorem` and counters (using `aliascnt`) and I think that `babel` is just getting confused by all those new counters and theorem styles. Any information on what and how to correct this would be mighty useful as well! **Edit II:** I just noticed that when only removing the `\begin{theorem}` and `\end{theorem}` lines it compiles without errors, but the " **Chapter 1** " is gone. I am also adding the [memoir] tag because I think it might be an internal clash between `babel` and `memoir`. * * * P.S. It doesn't work if I change the class from `memoir` to something else. I just use memoir in my main project so I figured it would be best to keep it here as well.


title: Chapter list in TOC whilst using \chapter{} only

text: I have a fiction book to typeset and I am using scrbook class as I thought that it is very flexible. For every chapter beginning I am using \chapter{} command and leave the field inside {} empty, so the command gives me only the text "Chapter 1." and so on. However, if there is no name for a chapter, it does not appear in TOC. Is it possible to make them appear? I hope this explains what I'm trying to achieve. **EDIT1** : I am strongly considering to use memoir class, so if somebody knows how to do this in memoir class, please, let me know. **EDIT2** : I just noticed, that with memoir class it happens automatically, but I am still interested in scrbook class hacks.


title: How can a style applied to a given node be inherited by all descendants of that node?

text: I'm using the `graphs` TikZ library to draw directed acyclic graphs. When I apply a particular style to a given node, I would like that style to be inherited by all descendants of the node in question. To fix ideas, say I've defined a node style called `alert` that modifies the default node style. When I apply that `alert` style to a node locally, I would like all descendants of that node to inherit the style in question, without having to apply that style to all its descendants manually. Here is an illustrative example:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{graphs}          \tikzset{       every node/.style={draw=black},       alert/.style={draw=red},     }          \begin{document}     \begin{tikzpicture}     \graph{       A -> {         B,         C[alert] -> D -> { E, F},       },     };     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Divtv.png) At the moment, `alert` is only applied to node `C`. However, by applying the `alert` style to node `C`, I would like all descendants of `C` (i.e. nodes `D`, `E`, and `F`) to inherit that style, without having to type               \graph{       A -> {         B,         C[alert] -> D[alert] -> { E[alert], F[alert]},       },     };      Is there a way of doing that? * * * **Edit** : Harish Kumar's approach can make my life much easier, but is not exactly what I want. Here is a more complex example illustrating what's missing:               \graph{       A -> { B, C[alert] }  -> D -> { E -> F, G -> H }     };      ![enter image description here](http://i.stack.imgur.com/7edZ6.png) Here, I'd like nodes `D` to `H` to inherit the `alert` style applied to their ancestor, node `C`. I could follow Harish's advice and write               \graph{       A -> { B, C[alert] }  -> {[nodes=alert] D -> { E -> F, G -> H }}     };      ![enter image description here](http://i.stack.imgur.com/MD1s0.png) but that would still force me to apply `alert` _twice_ in the graph. I would like a particular style applied to one node to be inherited by all nodes further down the chain   * without having to that style anywhere else, and   * no matter how the graph is specified. Is that even possible?


title: Only section heads in table of contents

text: I'm new to making LaTeX presentation. I'm using `beamer` type as documentclass. After the title slide, I have the table of contents slide. Now in the table of contents slide I don't want to show the subsection, but in the Outline slide that is shown at the beginning of each section I want to show the section and the subsection highlighted. How do I do so? This is the link to my code. I read some of the question here, but had much complex table of contents formatting and none sufficed my need.


title: Conflict with Natbib

text: I am currently writing my thesis and I've ran into a problem while increasing the complexity of the packages I needed to use. I was originally using the `\cite{}` macro to do all the references but I needed some more functionality hence I opted for the `natbib` package. Unfortunately when I try to compile the tex file I get the following error:               /usr/local/texlive/2011/texmf-dist/tex/latex/natbib/natbib.sty:739: LaTeX Error: Command \citetext already defined.                Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        ￼l.739 ...ommand\citetext[1]{\NAT@open#1\NAT@close}      I think that the `natbib` package might be conflicting with another package that already defines the `\citetext` key, but how can I tell? I've tried a process of elimination but wasn't able to track down the offending package - if it even is that case - . The packages are imported into the main tex file with `\input{packages}` and include:               %%%%%%%%%%%%%%%%%%%%%%     %% Declare packages %%     %%%%%%%%%%%%%%%%%%%%%%          \usepackage{ccaption, graphicx, textcomp, tabularx, booktabs, longtable, rotating, lscape}          \DeclareGraphicsExtensions{.jpg, .eps, .png}               \usepackage{enumerate,latexsym,amsmath,amssymb, amsthm, algorithm, algorithmic, verbatim}          \usepackage{listings}     \usepackage{color}          % Use of & in the acronyms     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}                    %%%%%%%%%%%%%%     %% Acronyms %%     %%%%%%%%%%%%%%     \usepackage[printonlyused,withpage]{acronym}           \newcommand{\listofacronymsname}{Acronyms}          \newcommand{\listofacronyms}{%     \chapter*{\listofacronymsname}%     \addcontentsline{toc}{chapter}{\listofacronymsname}%     \label{sec:acronyms}%     \markboth{\listofacronymsname}{\listofacronymsname}%     }               \usepackage[authoryear,round, nonamebreak]{natbib}          % Reference which pages the citation was referenced in     \usepackage[pagebackref, breaklinks]{hyperref}      \renewcommand*{\backref}[1]{[pp. #1]}      Can anyone think of any reason why this error might be coming up? I'm really stumped here. Please let me know if you need any more information. I know this is a bit skim, but the thesis is quite large at this point and I'm not sure what would be of help or not. Cheers, Christos


title: KOMAScript on Microsoft

text: I recently recommended lyx to a fellow writer. He downloaded it onto his MS box, but the download evidently didn't include KOMAScript. Questions: Does the CTAN KOMAScript package run on MS? If not, where can he find a version that does? I'm a Linux user so the MS world is land of mystery to me. Many thanks, LRP


title: Switching biblatex styles between numeric-style and authortitle

text: I could need some help with `natbib` / `biblatex`. In my document I use the `\footcite{}` command to add my references. I use `bibstyle=numeric-verb` and `citestyle = authortitle-icomp` – thats nice, I like that. Now my Problem! The references for pictures are not very nice. So far I also use `\footcite{}` but I simply want the number of the source in brackets behind the figure title. And this only in the `list of figures`. A short example:               ...     \includegraphics[draft]{fig1.jpg}     \caption[My first figure (Source: \cite{Geppert2004})]{My first figure}     ...      In the `list of figures` it should look like: > 1.1 My first figure (Source: [2]) ....... page x Alright and here is a complete MWE:               \begin{filecontents}{mybib.bib}          @ELECTRONIC{nowheel,       author = {Richard Dawkins},       month = {November},       year = {1996},       title = {Why dont animals have wheels?},       language = {EN},       url = {http://www.simonyi.ox.ac.uk/dawkins/WorldOfDawkins-archive/Dawkins/Work/Articles/1996-11-24wheels.shtml},       timestamp = {2012.06.27}     }          @ARTICLE{Geppert2004,       author = {Geppert, L. },       title = {Qrio, the robot that could},       journal = IEEE_M_SPECT,       year = {2004},       volume = {41},       pages = {34--37},       number = {5},       timestamp = {2012.06.11}     }          \end{filecontents}          \documentclass[pdftex,a4paper,12pt, titlepage]{scrreprt}     \usepackage[a4paper, left=3cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[babel,german=quotes]{csquotes}          \usepackage{hyperref,blindtext,graphicx}          \usepackage[     natbib=true,       bibstyle=numeric-verb,       citestyle = authortitle-icomp,     sorting = none     ]{biblatex}      \addbibresource{mybib.bib}     \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}               \begin{document}          \tableofcontents          \chapter{Hallo Welt}          \blindtext \footcite[S.45]{nowheel}          \begin{figure}[htp]     \centering       \includegraphics[width=0.5\linewidth,draft]{fig1.jpg}       \caption[My first figure (Quelle: \cite{Geppert2004}]{My first figure}       \label{fig1l}     \end{figure}          \chapter{Nochmal}          \blindtext \footcite[S. 36 ff.]{Geppert2004}          \begin{figure}[htp]     \centering       \includegraphics[width=0.5\linewidth,draft]{fig2.jpg}       \caption[My second figure (Quelle: \cite{nowheel}]{My second figure}       \label{fig12}     \end{figure}          \printbibliography     \addcontentsline{toc}{chapter}{Literaturverzeichnis}           \listoffigures     \addcontentsline{toc}{chapter}{Abbildungsverzeichnis}          \end{document}


title: New paragraph without \newline?

text: I am writing on a larger text and sometimes I want to begin a new paragraph. So I don't want to have a new heading, just a space for visiual reasons. Currently I use the solution with `\\\ \newline` For example:               Here is my text text text and now I finish this thought.      \\ \newline      Here I begin with another aspect....      text text      Another solution I can imagine is with vspace, but this is also not really professional, so how should I do this?


title: Insert a TeX code into a math mode at LyX

text: If i'm at math mode at LyX and I want to add a TeX code, how can I do it? This is possible? i.e something like: `\Ding{152}` (or code that is more then a symbol) in math mode.


title: Write reference of linenumber to file

text: I want to write the actual linenumbers that a `\lineref` command generates into an external file. The lines are referenced correctly (after 2 times compiling), but the writing to a file does not work. Here is my MWE, with my (humble) try uncommented to illustrate what I want to do:               \documentclass[10pt,a4paper]{article}     \usepackage{lineno}     \newwrite\tempfile          \begin{document}     \immediate\openout\tempfile=fooref.tex     \begin{linenumbers}*     foo \linelabel{lne:foo1} foo          foo \linelabel{lne:foo2} foo     \end{linenumbers}     \lineref{lne:foo1}     \lineref{lne:foo2}          %\immediate\write\tempfile{\lineref{lne:foo1}} % <- how to do it??     %\immediate\write\tempfile{\lineref{lne:foo2}} % <- how to do it??          \immediate\closeout\tempfile     \end{document}      The resulting fooref.tex should contain just the linenumbers:               1     2


title: Package Frontespizio

text: I'm Italian. For my degree thesis I've found (and used) the package `frontespizio`. Now I'm at the master thesis, in English, and I would like to know whether there exists a similar package in English. For example, I need to write "supervisor" instead of "relatore" and I think I can't change those parameters in the package `frontespizio`, though I would. I've seen a lot of frontispiece templates but they're not too similar to the usual Italian thesis frontispiece. Alternatively, how could I reproduce by myself the same output of such a package?


title: Making a page landscape, in a portrait written report

text: When using the following packages, is there any way to make a page landscape as opposed to portrait, i.e so that i can fit long equations in it?               \documentclass[11pt,a4paper]{article}     \usepackage{paralist}     \usepackage{mathtools}     \usepackage[margin=1in]{geometry}     \usepackage{enumitem}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \numberwithin{equation}{section}     \usepackage{fancyhdr}     \usepackage{braket}     \usepackage{parskip}     \usepackage{slashed}     \usepackage{graphicx}     \usepackage[numbers]{natbib}     \usepackage[usenames,dvipsnames]{color}     \usepackage[font={footnotesize}]{caption}     \pagestyle{fancy}     \pagestyle{myheadings}     \renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}{}}     \renewcommand{\headrulewidth}{0pt}     \usepackage[colorlinks=true]{hyperref}     \usepackage{hyperref}     \hypersetup{citecolor=Plum, linkcolor=Blue, urlcolor=RoyalBlue}


title: get max/min value in a table column with pgfplot

text: I'd like to get the max/min value from a specific column table via function `\findmax` and `\findmin` in order to use it in `ymin` and `ymax`. I really dont get how `\pgfplotstablesort` function works. What would be perfect is to call `\findmax{YAmax,YA,YAmin}` and get back the maximum value of those 3 columns. ![](http://i.stack.imgur.com/zJ4mp.png)               \documentclass{standalone}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{filecontents}          \newcommand{\findmax}[1]{         \pgfplotstablesort[sort key={#1},sort cmp={float >}]{\sorted}{data.dat}%         \pgfplotstablegetelem{0}{1}\of{\sorted}%         \let\ymax=\pgfplotsretval%     }          \begin{filecontents}{data.dat}     X   YA  YAmin   YAmax   YB  YBmin   YBmax     1   5   4   6   6   5   7     2   3   2   5   7   5   9     3   6   1   9   9   7   13     4   4   2   6   6   1   11     5   0   -1  3   3   0   5     6   1   -3  6   1   -1  2     \end{filecontents}                    \begin{document}               \pgfplotsset{width=3cm,scale only axis}          \begin{tikzpicture}               %\findmax{YAmax,YA,YAmin}     %\findmin{YAmin,YA,YAmin}     \begin{axis}[at={(0,0)},title=YA]%,ymin=\ymin,ymax=\ymax]     \addplot [very thick,smooth,red,solid]  table [x=X, y=YA]   {data.dat};      \addplot [very thick,smooth,red,dotted]  table [x=X, y=YAmin]   {data.dat};      \addplot [very thick,smooth,red,dotted]  table [x=X, y=YAmax]   {data.dat};      \end{axis}          %\findmax{YBmax,YB,YBmin}     %\findmin{YBmax,YB,YBmin}     \begin{axis}[at={(4cm,0)},title=YB]%,ymin=\ymin,ymax=\ymax]     \addplot [very thick,smooth,red,solid]  table [x=X, y=YB]   {data.dat};      \addplot [very thick,smooth,red,dotted]  table [x=X, y=YBmin]   {data.dat};      \addplot [very thick,smooth,red,dotted]  table [x=X, y=YBmax]   {data.dat};      \end{axis}          \end{tikzpicture}     \end{document}


title: Problem with creating specific header and footer

text: ![](http://i.stack.imgur.com/eRclU.jpg) If don't see clear, in top left corner is picture (university logo) and in top right corner are page numbers. We have specific header and footer at university. Because i'm new in LaTeX, could someone help me with creating this: http://rapidshare.com/files/3316564346/heather.doc i need this in all pages


title: How do I remove the whitespace above the first text in an article?

text: \documentclass{article}     \begin{document}     foo     \end{document}      This code leaves a very big whitespace above foo. Why is this and how do I make it smaller? `\usepackage[showframe=true]{geometry}` (thanks for the tip cmhughes) gives me ![enter image description here](http://i.stack.imgur.com/PJevt.png)


title: How can I position a picture precisely on a page?

text: I’m new to Latex and I’m trying to place a picture (my university’s logo) at an exact spot on my titlepage. For this, I would like to specify the coordinates on the page at which I would like the picture to be placed. Up to now, I have written the following code, but it doesn’t work.               \documentclass{article}     %...     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{graphicx}          \begin{document}          \begin{titlepage}          \begin{tikzpicture}[overlay, remember picture]     %...     \begin{picture} (10cm, 10cm) (0cm, 0cm)     \put(0.5cm, 0.5cm) {\includegraphics [width=5cm]{logo}}      \end{picture}     %...     \end{tikzpicture}           \end{titlepage}     %...     \end{document}      When I compile it (Pdftex, using TeXShop), the following error message appears:               ./Sans-titre.tex:56: Illegal unit of measure (pt inserted).     <to be read again>                     \setbox      l.56    \begin{picture} (10cm, 10cm) (0cm, 0cm)      Also, I will need to write some text and draw lines at specific spots on my title page, and I fear I will encounter the same problems.


title: Relative path issue with epslatex

text: I'm trying to include a figure which is saved as two files (eps and tex). I can get it to work if the files are in the same folder as the main document, but not if I move them elsewhere, even just to a subdirectory. I'm using Windows 7, TexnicCenter, and miktex 2.9. This is what I've tried to do:               \documentclass{article}          \usepackage{graphicx,epstopdf}          \begin{document}          \begin{figure}          \input{ImageDir/TestFile}          \end{figure}          \end{document}      It doesn't work. If I move the "TestFile" files out of "ImageDir" and change the above to "\input{TestFile}" then it works fine. Also the code below DOES work for png image file, and I don't understand the difference:               \documentclass{article}          \usepackage{graphicx}          \begin{document}          \begin{figure}          \includegraphics{ImageDir/TestPNG}          \end{figure}          \end{document}      I've been searching the internet and tried different syntax for the path but I just can't get the \input version to work with files in a different directory. Does anyone know what I'm doing wrong? Thanks a lot for any help!


title: Extended ordering with \cite

text: I’m using the `\cite` package with by appearance ordering in the references section. All good, however I’d like to extend the ordering. Let’s say I use `\cite(zhang2001, fisher2012, primroseIET2013)` yielding (28,1,51). I could reorder the cites myself, but this is likely to mess up similar ordering elsewhere in the document and would take ages. What I’m looking for is ordering within the group, if `\cite(fisher2012)` is indeed the first cite it needs to stay as reference 1, but within the final compiled group I’d like (1,28,51). I've looked at the `cite` package doc to no avail. If this sub sorting was on a group basis only, similar to the options for (1-4) if multiple consecutive citations (1,2,3,4), then it shouldn't mess up the document wide order by appearance.


title: Which chemistry package can be used for Lewis formulae and electron movement arrows?

text: I wanted to reproduced this set of steps for my thesis but I have no idea what package can do this. I am a newbie to latex I only started a few weeks ago. ![enter image description here](http://i.stack.imgur.com/9CFV0.jpg)


title: Small Caps not Working

text: \documentclass[12pt]{article}     \usepackage[paperwidth=8.5in,paperheight=14in,left=1.5cm,right=1cm,top=1cm,bottom=0cm]{geometry} %margins     \usepackage{amsmath,mathptmx,fixltx2e,graphicx,polyglossia,fontspec}     \setmainlanguage{english}     \setotherlanguage[numerals=western]{urdu}     \setmainfont{Times New Roman}     \newfontfamily\urdufont[Script=Arabic,Scale=1.2]{Jameel Noori Nastaleeq}     \begin{document}     \textsc{This is written in small caps}     \end{document}      This problem with this code is that the text is not written in small caps. Along with this how can i use "Times" font in polyglossia?


title: Fix all quotes in a document (pasted from another)

text: I'm translating some documents from MS Word (written by someone else) to TeX for my own uses. There are quotation marks all over the place, some of which are "weird" (e.g., unicode character 201c “ as opposed to ASCII 34 "). What is the best way to replace all of these with matching `` '' pairs? I'd prefer a solution using VIM but if there are other methods I'll accept them


title: Need chemnum style, but have the old TeXLive2009 version

text: First of all, I am a total beginner with both LaTeX and Ubuntu (and I have no clue about programming etc.), so please explain things in a way that I can follow and thanks in advance for your help and patience. So... I started writing my Chemistry-thesis with LaTeX (using Ubuntu 12.04, TeXLive2009 from the software center, and TeXmaker) and I am having problems with the numbering of my molecules. I used `chemstyle` and `bpchem`, but somehow the tracking doesn't work properly. Within the schemes the compounds are labelled correctly, whereas in the text it is completely messed up. I read that the `chemnum` package is better for this job, so I wanted to ask you how I can get this new package running (because it is not included in this TeXLive bundle). Where can I download it, where do I save the file? Do I need to use the terminal? (reminder: I am really a complete beginner with Linux)


title: Two separate align in one direction in latex

text: I would like two write two different align with two different labels, but I want both of them begin in one direction. How can I fix this code in latex?                   \documentclass[12pt,titlepage,a4paper]{book}         \usepackage{amssymb,amsthm,amsmath,bm, mathtools}         \begin{document}              \begin{align}         \label{x}         x = x + y + c         \end{align}         \begin{align}         \label{y}         a + b + c = z + c + v + b         \end{align}              \end{document}


title: Bounding box for each symbol in an equation

text: Is it possible to make LaTeX put a bounding box around each element in an equation, as in this file? I am aware of this question, but none of the solutions presented there, which does not require LuaTeX, seem to work within equations containing, e.g., commands like `\sum`. I have tried to resolve this "manually" by putting a framebox around each symbol within an equation, but neither that seems to work for commands like `\sum`, even though it do work for simpler symbols such as digits, such as               \fboxrule=.1pt \fboxsep=-\fboxrule     $\framebox[\width]{1}$


title: University's logo

text: How to put the logo before the date and after my name in the title? I write it as                \begin{document}           \title{}           \author{}           \titlepic{ \includegraphics[width=0.5\textwidth]{logo}           \date{}       but it appears after the date!!


title: Can you do all what you want with TeX?

text: With LaTeX, I know you can put pictures in the documents, use different fonts, ... and practically do whatever you want (except the fact that your document must have a predefined style, imposed by the macro packages you are using); instead, in TeX, you are absolutely free to dispose thing in the page as you like. But, in TeX, it seems (at least according to me) that you can't do things you can do with LaTeX, e.g., putting pictures in the pages. Is this the truth or is that I'm ignorant in it?


title: Split the equation into three lines because it is too long

text: How can I split the following equation that goes beyond the margin?               \begin{align}     f_4(s)=\\      \sum_{i=0}^{\Delta_1-1}{\frac{1}{i!}[(-s)^i  \frac{\delta^i}{\delta(s)^i}(\exp(-s^{\frac{2}{\alpha}} \lambda_1 (\eta_1 P_1)^{\frac{2}{\alpha}}C(\alpha,\psi_1))     (\exp(-s^{\frac{2}{\alpha}} \lambda_2 (\eta_2 P_2)^{\frac{2}{\alpha}}C(\alpha,\psi_2))}     \label{eq17}     \end{align}


title: Erasing Page Numbers on the IEEE Latex Template?

text: I am using the IEEE Latex Template for a paper I'm writing. However, one of the rules of the IEEE is to no have the page numbers in the paper. I have looked online and tried various methods for removing the page numbers, but none seem to work. I've tried all of the following options:                % make the title area      \maketitle      % to remove page numbers      \pagenumbering{gobble}      %\thispagestyle{empty}      %\pagestyle{empty}       Is there a way to erase the page numbers in this template in particular? Thanks


title: Splitting text in two sections when introducing figure

text: First of all, thanks for reading. I am trying to write my first report with latex and I am having a strange error that no one of my friends can solve. I am writing a two column article. When I try to include a Figure in one of the sections (Introduction) the two or three last lines jump into the next section. Here you have the full code, and the image of the pdf that I get.               \documentclass[a4paper,12pt,twocolumn]{article} %tamaño de papel, letra y clase.     \usepackage[english]{babel}     \usepackage[utf8]{inputenc} %Codificación del documento. utf8 es la más actual.     \usepackage{lipsum}     \usepackage{cleveref}     \usepackage{bm} %letras griegas en negrita (uso: \bm{\alpha})     \usepackage{graphicx,subfigure} %paquete de imágenes y de imágenes dobles               \usepackage{amsmath,amsfonts,latexsym,cancel,color,textcomp,anysize,eurosym,amsthm,multicol,float}     %\usepackage{booktabs} %para poder añadir tablas     %\usepackage{hyperref} %si lo activamos el índice aparecerá con hipervínculos     \usepackage[usenames,dvipsnames]{xcolor} %añadir una paleta de 68 colores más a los predefinidos     \usepackage{flushend}%Iguala la altura de las dos columnas de la última pagina     \marginsize{1.5 cm}{1.5cm}{1cm}{1cm} %MÁRGENES: izq,der,sup,inf     \setlength{\parindent}{0pt} %sangría      \parskip=4mm %espacio entre párrafos     %\usepackage{lineno} %paquete para numerar las líneas     \usepackage{caption}     \captionsetup[figure]{labelfont=bf} %esta y la anterior para poner Figure X en negrita     %\pagestyle{empty} %No numerar las páginas.      \newcommand{\emptyfootnote}{\let\thefootnote\relax\footnotetext} %con     \emptyfootnote{text} podrás poner una nota sin número     \setlength{\columnsep}{0.6cm} %Separacion entre columnas en el modo twocolumn          %opening     \title{\textbf{Improving Generators' Interface to Support     \\LHEF V3 Format}}     \author{\Large ME     \\Universidad, Spain     \\ DESY Summer Student}     \date{September 11, 2014}          \begin{document}          \twocolumn[ %Título, autor y abstract centrados y resto del documento en dos columnas       \begin{@twocolumnfalse}       \vspace*{2cm}         \maketitle         \thispagestyle{empty}  %Por defecto numera la primera. Con esta orden lo evitamos.         \vspace*{-0.8cm} %Acerca la línea superior a la fecha         \begin{center}\rule{0.9\textwidth}{0.1mm} \end{center} %Añade separación al     abstract y lo separa del resto del documento con una línea horizontal         \begin{abstract}         The aim of the project was to modify the Les Houches Event File Interface in order to make it capable of reading the newest version of LHEF format. A partially modified version of the interface was used as an starting point. From there, some features where implemented until the software was fully functional.              \end{abstract}         \begin{center}\rule{0.9\textwidth}{0.1mm} \end{center}         \vspace*{9cm} %Separa la línea inferior del texto     %  \begin{figure}[t]     %     \begin{center}     %        \includegraphics[width=50pt]{pics/DESY.png}     %        \caption{\small Representation of the trajectories followed by the photoelectrons when they do not have enough energy to reach the collector}     %        \label{cutoff}     %     \end{center}     %\end{figure}         \begin{center}             {\includegraphics[height=40pt]{pics/ATLAS.png}}             \hspace*{3cm}             {\includegraphics[height=50pt]{pics/DESY.png}}     %        \begin{flushright}             \hspace*{3cm}             {\includegraphics[height=55pt]{pics/UGR.png}}     %       \end{flushright}         \end{center}       \end{@twocolumnfalse}     ]           \section*{INTRODUCTION}     This reports is giving a dedicated account of my project in the ATLAS group. The main purpose of the project was to implement new features for what is called Les Houches Event File (LHEF hereafter) interface. This interface is part of Athena, an ATLAS control framework for particle physics Monte Carlo simulation.     In particle physics Monte Carlo simulation we have four basic steps:     \begin{itemize}         \item Event Generation (Hard Process)         \item Parton Showers         \item Hadronization         \item Underlying Event     \end{itemize}          In the next plot it is shown the steps asociated with each part of the event.          \begin{figure}[h]          \begin{center}             \includegraphics[width=240pt]{pics/Evento.jpg}             \caption{\small \cite{Webber} MC simulations steps}             \label{FDplot}          \end{center}     \end{figure}          In the following sections this framework is going to be explained as well as some formats (HepMC and LHEF) that would be necessary to know for a full understanding of the project. After that, the modified interface will be presented.          \section*{Athena}{          As it is mentioned before, Athena is a control framework that is used to run the particle physics Monte Carlo simulation in ATLAS. The whole process can be done using this framework.      Athena has six basic steps:     \begin{itemize}         \item Initialization: The settings and initial values can be introduced to the framework via the JobOptions. This JobOptions are written in Python.         \item Call the generator via the interface and give it the settings         \item Read the event data generated.         \item Castilla y León.         \item Castilla y León.         \item Castilla y León.     \end{itemize}     }     \section*{RESULTS \& DISCUSSION}          \section*{CONCLUSIONS}           \begin{thebibliography}{9}           \bibitem{Webber}      B. Webber, \textit{Monte Carlo Methods in Particle Physics}, University of Cambridge, IMPRS, Munich 19-23 November 2007.            \end{thebibliography}              \end{document}      And I get: ![Error](http://i.stack.imgur.com/Xt89f.jpg) As you can see in the code, the red rectagle of text should be in the Introduction, not in Athena. Thank you very much, Fernando


title: Cyclic ring and visibility problem in pst-solides3d

text: I'm trying to draw two cylindric rings on top of each other with `pst- solides3d`. Here is what I have:               \documentclass{article}          \usepackage{pstricks}     \usepackage{pst-solides3d}          \begin{document}              \begin{pspicture}(0,0)(3,5)              \psset{viewpoint=60 80 30 rtp2xyz,Decran=60,lightsrc=viewpoint}              \psSolid[object=anneau, h=1.7, R=4.4, r=3.8](0,0, 0.77)              \psSolid[object=anneau, h=0.6, R=5, r=4.4](0,0,0.46)              \end{pspicture}          \end{document}      And here is what if gives (`latex doc.tex; dvips doc.dvi; ps2pdf doc.ps`): ![](http://i.stack.imgur.com/rkHVf.png) And a view from the bottom (change `30` to `-50` in `psset`): ![](http://i.stack.imgur.com/6IAQZ.png) Have I done a silly mistake or there is a visibility problem ?


title: Bold the name of the speaker on specific frame

text: I have three speakers on the title frame as follow:               \author{Mister X, Mister Y, Mister Z}      I want to bold the name **Mister X** on frame 1 and 2 and **Mister Y** on frame 3 and 4 for example. I haven't found the solution; the content of `\author` can't be overwritten. It's possible to do that with beamer? Regards Here is a small code to illustrate:               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usetheme{Warsaw}     \usecolortheme{crane}     \usepackage[french]{babel}            \title{My Talk}     \subtitle{All authors must be here}     \author{Mister X, Mister Y, Mister Z}          \begin{document}          \begin{frame}       \titlepage     \end{frame}               \section{Mister X's part}             \frame{     \frametitle{Part of Mister X}          "Mister X" must be bold in the footer.          }          \section{Mister Y's part}             \frame{     \frametitle{Part of MisterY}          "Mister Y" must be bold in the footer.          }          \end{document}


\documentclass{minimal}     \parindent=0sp          \newlength{\Length}     \setlength{\Length}{1in}          \newcounter{Count}     \setcounter{Count}{10}               \begin{document}     \the\Length          \theCount     \end{document}      Length needs backslash but counter does not, why?


title: Is there latexmk functionality for LuaTeX?

text: I am a big fan of `latexmk` and lately I have been looking a bit towards LuaTeX. However I am am yet to find a way to get the functionality of latexmk (mainly recompilation on changes and automatic rerun an appropriate number of times to resolve cross references and such) for LuaTex. Is there something similar and if not how do you LuaTeX people survive without it? :)


title: Multirow and lines - how to draw line going through selected columns

text: I was wondering if it is possible to draw line which goes through some columns in table(not all columns). I have a table which looks like that               \begin{longtable}{|c|c|c|c|c|c|c|c|c|c|c|c|}     \caption{some text }     \label{tab:artificialShapes}     \\\hline     \multirow{2}{*}{Shape} & \multirow{2}{*}{$C^{*}$} & \multirow{2}{*}{$C_{0}$} &\multirow{2}{*}{$N$} & \multicolumn{4}{|c|}{\textbf{Noisless data}} & \multicolumn{4}{|c|}{\textbf{Noisy data}} \\     \hline     & & & & $J_{b}$ & $J_{a}$ & time[s] & $\rho$  & $J_{b}$ & $J_{a}$ & time[s] & $\rho$ \\ \hline          \end{longtable}      The problem is that text which is placed in multirow command is crossed by line. Is it possible to prevent a line from going through all columns ?


title: Visualization in LaTeX of hamming distance

text: I have for example the following two strings:                1: 00101101      2: 00100100      I would like that each number will be place in a box and the boxes with the number one should be higher then the ones with zero. example:                ---------------------------------      | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |      --------|   |---|   |   |---|   |              -----   ---------   -----                        -----       -----      --------|   |-------|   |--------      | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |      ---------------------------------           Later on I would like to play with the colors, between boxes which doesn't contain the same number. I would like some help how to create the boxes. **EDIT** It seems that my question was not so clear. I would like that the 'box' of 1 or 0 will not be shifted, but the 'box' of 1 will be simply bigger....


title: How to set up inverse search with Okular and Kile

text: The title pretty much sums it up. I use the package srcltx in my documents. I am running Ubuntu with Kile 2.1 and Okular 0.8.2 as a viewer. I am pretty sure that inverse search should work, but I haven't been able to set it up. How does one configure the viewer and editor to make this feature work?


title: Ways to show fractions

text: As I use `TexMaths` in LibreOffice and it has a problem with `\frac` and `\over`; are there other ways to show fractions in Tex? In LibreOffice with `\frac` the line is not shown: ![enter image description here](http://i.stack.imgur.com/ISPYr.jpg)


title: Creating table with multirow option fixed width and wrapped text

text: I am trying to create a table using multirow option. I am using the following code:               \documentclass[10pt]{article}     %\usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{textcomp}     \usepackage{microtype}     \usepackage{graphicx}     \usepackage{multirow}          \begin{document}     \begin{table}[h]         \newcommand{\lambdabar}{{\mkern0.75mu\mathchar '26\mkern -9.75mu\lambda}}         \centering         \begin{tabular}{r@{=}ll}             \hline             \hline                 $a_0$ & $\frac{\hbar^2}{m e^2}$                  & \multirow{2}{7cm}{Bohr (radius of electron orbit in Bohr's model of Hydrogen)} \\                    & $5.29\times10^{-9}$ & \\                 $\lambdabar_c$ & $\alpha a_0 = \frac{\hbar}{m c}$                   & \multirow{2}{7cm}{Reduced Compton wavelength ($\lambda_c = \lambda_c/2$). $ \lambda_c $ is change of wavelength of photon scattered at 90\textdegree by a stationary electron due to recoil of electron.} \\                     & $3.86159\times10^{-11} $cm & \\                 $ r_0 $ & $\alpha^2 a_0 = \alpha \lambdabar_c = \frac{d^2}{m c^2}$                 &  \multirow{2}{7cm}{Classical radius of electron (size for which electrostatic self energy equals rest mass energy)} \\                   & $2.81794\times10^{-13}$cm  & \\             \hline             \hline         \end{tabular}      \end{table}     \end{document}      And I am getting the following output: ![enter image description here](http://i.stack.imgur.com/EgLqz.png) Here we can see the last two row coming on the third and fourth row. Why is that happening and how to make it proper?


title: Uneven spacing in IEEE bibliography entries!

text: I am writing a IEEE journal article, the entire reference file is done in JabTex and all the entries seem pretty alright. I am referring to around 200+ papers. However when I build the file the first two pages of my bibliography are alright, then all of a sudden the spacing between the paragraphs changes. Here is my code. Just the initial and ending parts.               \documentclass[journal]{IEEEtran}     \usepackage{graphicx}     \usepackage{upgreek}     \usepackage{cite}     \usepackage{amsmath}     \usepackage{tabularx}     \usepackage{multirow}     \listfiles     \usepackage{cite}     \begin{document}      Followed by....               \bibliographystyle{IEEEtran}     \bibliography{ppy}     \end{document}      ![Bibliographyproblem](http://i.stack.imgur.com/7Qylw.jpg)


title: Drawing a curve in Tikz

text: I would like to redraw the following graph on latex. I can make the grids but cannot reproduce the graph correctly. Any ideas on how to reproduce the curved line? ![enter image description here](http://i.stack.imgur.com/zbQ8J.png)


title: Avoid multiple entries of caption in list of tables using pgfplotstable with longtable

text: I'm using pgfplotstable to display data from .csv files and it happens that displayed tables break over three pages. The problem is, that for every page an entry is placed into the list of tables. Here the way I currently use pgfplotstable:               \documentclass{article}               % MWE from http://tex.stackexchange.com/questions/40411/import-files-with-pgfplotstable-and-split-tables-across-multiple-pages     \usepackage{pgfplotstable}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{array}     \usepackage{filecontents}          \usepackage{pgfplotstable}      \usepackage{booktabs}      \usepackage{filecontents}     \usepackage{longtable}          \begin{document}     \listoftables     \begin{filecontents}{testdata.dat}     Idx  Nam Dim Grd     1   Ady 53  F     2   Bar 72  C     3   Cor 83  B     4   Dar 58  D     5   Esa 68  C     6   Foo 67  C     7   Gar 74  C     8   Hur 65  D     9   Jaz 85  B     10  Ker 91  A     1   Ady 53  F     2   Bar 72  C     3   Cor 83  B     \end{filecontents}          \pgfplotstableset{     begin table=\begin{longtable},     end table=\end{longtable},     }          \pgfplotstabletypeset[ col sep=space                          , header=true                          , every head row/.style={ before row=\caption{ The Caption }\\\toprule                                                  , after row=\midrule\endhead }                          , every last row/.style={after row=\bottomrule}                          ] {testdata.dat}          \end{document}      Is there a way keeping repetition of caption and head per page, but only placing one entry in list of tables? Best regards!


title: Does anybody knows why the title "Contents" does not appear on the top and bigger?

text: Why it appears on the bottom? ![enter image description here](http://i.stack.imgur.com/fzRSS.png) I use a .cls file where \tableofcontents is defined as:                   \def\tableofcontents{%       \@starttoc{toc}\contentsname      }     \def\listoffigures{\@starttoc{lof}\listfigurename}     \def\listoftables{\@starttoc{lot}\listtablename}     \AtBeginDocument{%       \@for\@tempa:=-1,0,1,2,3\do{%         \@ifundefined{r@tocindent\@tempa}{%           \@xp\gdef\csname r@tocindent\@tempa\endcsname{0pt}}{}%       }%     }


title: Displaying a book or thesis's number of pages in biblatex differently

text: Is there a way to format the output of biblatex's citations to a book in a different way? When you cite a paper, the pages usually refer to the page range of the paper in the proceedings or journal, but in the case of a book, most sources just give the number of pages of the book. Take for example the following bibliography, `fictivebook.bib` :               @book{fictivebook2012,     author = "John Smith and Bobby Fisher and Ron Jeremy and Martha Stewart and Barrack Obama",     title = "Super awesome book",     year = "2012",     pages = "9001"}      Cited in the following document :               \documentclass{article}          \usepackage[backend=biber,style=numeric]{biblatex}     \bibliography{fictivebook}          \begin{document}          This citation is useless, we only want a bibliography \cite{fictivebook2012}.          \printbibliography          \end{document}      The citation gets rendered as :               [1] John Smith et al. Super awesome book. 2012, p. 9001.      Which is a bit ambiguous. I mean, does it mean that I am citing only page 9001 of the Super awesome book, or does it mean that this is the work of someone which only corresponds to the 9001th page of this book? I would prefer an output like this, is there any way to achieve that?               [1] John Smith et al. Super awesome book. 2012, 9001 pages.      I tried editing the `.bib` file, putting `9001 pages` in the `pages` field to no avail. So far, the best solution I have would be to just remove the number of pages for books/theses, and thus removing the confusion.


title: How to Produce a Half-Box Symbol?

text: Does anyone know how to produce a half-box symbol in LaTeX which comprises a bar over an entire expression and a vertical line on the right meeting in the corner, like the top and the right edge of a box? I currently use `\overline{abc}\vert` as a compromise (say, abc is the text I wish to enclose) but clearly the bar and the vertical line do not meet each other in the top-right corner. Thanks


title: Equation number displaying problem

text: I used `\eqref` to reference two different equations (`\eqref{eq1}` and `\eqref{eq2}`) but it displays the same strange shape as shown below in the image. The equation numbers are 1 & 2, any help? ![error](http://i.stack.imgur.com/GGusC.png)


title: AUCTeX folding and square brackets in math mode

text: I want to use the folding functionality of AUCTeX, mainly to replace math macros with the corresponding symbols. But at the same time I want to continue to use square or curly brackets additionally to parentheses. But AUCTeX hides then square or curly brackets and their content. So if I write:               \documentclass{article}          \begin{document}          $a \to [b \to c]$          \end{document}      and then apply `TeX-fold-buffer` I get as result:               \documentclass{article}          \begin{document}          $a →$          \end{document}      What I would like to get is:               \documentclass{article}          \begin{document}          $a  → [b → c]$          \end{document}      How can I prevent AUCTeX folding from hiding square or curly brackets and their content in math mode?


title: Multicols and enumerate

text: I'm using `multicols` environment inside the `enumerate` one like this:               \begin{enumerate}     \begin{multicols}{2}            \item Se o $\tri ABC$ é isósceles de base $\ov{BC}$, determine $x$.       \begin{center}         \begin{minipage}{\linewidth}           \centering           \includegraphics[scale=1]{m5c4exf2}         \end{minipage}       \end{center}            \vspace{.5cm}            \item O triângulo $ABC$ é equilátero. Determine $x$ e $y$.       \begin{center}         \begin{minipage}{\linewidth}           \centering           \includegraphics[scale=1]{m5c4exf3}         \end{minipage}       \end{center}            \end{multicols}     \end{enumerate}      then I get this: ![enter image description here](http://i.stack.imgur.com/ncfdV.png) So there's a problem in the exercise number. How can I fix it? Thanks :)


title: Getting the author name to appear when using the Vancouver bibliography style

text: I am using Vancouver style for bibliography and I want to get author name also. How can I get author name using Vancouver style?               \documentclass [44pt]{amsart}     \usepackage{cases}     \usepackage [dvips] {graphicx}     \usepackage[super]{natbib}     \begin{document}     \cite{Z}          \bibliographystyle{vancouver}     \end{document}          @BOOK{Z,      author={Z, and W},      title={Growth},      publisher={Science Press},      year={1982},     }      It gives me "^1" but actually I want "Z^1" (^ denotes superscript).


title: Hyphenation of words containing apostrophes

text: My question is plain and simple. **Any way to hyphen words such as “Lor'themar”, “Kel'Thuzad”, etc.?** Using `\hyphenation{Kel'-Thu-zad}` gives me this error, for instance when compiling.               Error in hyphenation.tex (line 37): Not a letter. l.37 \hyphenation{Kel'                           -Thu-zad}      Letters in \hyphenation words must have \lccode>0.      Proceed; I'll ignore the character I just read.      I'd like to define a global hyphenation, but I don't mind using a local definition for each time I want to hyphen those (a bit tedious, but that'd do the job as well).


title: Fixing the location of the appearance in algorithmicx environment

text: I'm trying to force an algorithm to stay between two paragraphs, but after compilation, it shows up in the next page. My algorithm takes more than half a page and is something like:                \begin{algorithm}[tbh]      \caption{Game}           \begin{algorithmic}      \State  \bf{Initialize:} \normalfont          \begin{itemize}             \item \bf{A preferences:} \normalfont                  \begin{itemize}                     \item 1 for A                     \item 2 for A                     \item 3 for A                 \end{itemize}             \item \bf{B preferences::} \normalfont                 \begin{itemize}                     \item 1 for B                     \item 2 for B                     \item 3 for B                 \end{itemize}             \item \bf{Nature sets the laws:} \normalfont                 \begin{itemize}                     \item The nature chooses a set of incentives $\mathcal{R}$.                 \end{itemize}         \end{itemize}      \State        \While {Set of Incentives $\mathcal{R}$ Exists}      \State        \State \bf{Defend:} \normalfont          \begin{itemize}             \item I             \item II             \item III         \end{itemize}           \State        \State \bf{Attack:} \normalfont          \begin{itemize}             \item I             \item II             \item III         \end{itemize}      \State        \State \bf{Nature:} \normalfont          \begin{itemize}             \item The Nature updates $\mathcal{R}$.         \end{itemize}       \State       \EndWhile       \end{algorithmic}     \end{algorithm}      It seems like `[tbh]` is not working here.


title: Page header - Upper and lower case

text: First of all: this is the first time that I use LaTeX. I have these commands that create my header:               \usepackage[headsepline,plainheadsepline]{scrpage2}         \pagestyle{scrheadings}          \clearscrheadfoot %clear everything     \ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages     \renewcommand{\chaptermark}[1]{\markright{\ #1}} %??     \setheadsepline{1pt} %set size of sep-line      Everything works as intended, except: On the pages containing the bibliography or the ToC, the name of the chapter is in upper case letters, and elsewhere it is as in the chapter headline. How can I change that so that the chapter title is not formatted to upper case in the ToC and bibliography? PS: It would be great if you also could explain the second last line. I understand what it does, but I don't know where `\chaptermark` is used and thus why it affects the header...


title: Draw box with colored background and linebreaks which adjusts to the text width?

text: I want to draw labels on a photograph. The labels will only contain 1..3 words, and sometimes there shall be a linebreak, e. g.               Big House \newline     (empty)      Is it possible to create a box which draws a white rectangle below this text and which adapts to the width of the text? I could use `\colorbox{white}{Big House \newline (empty)}`, but it does not allow the linebreak. If I use a `\parbox{}`, I have to define the width by hand. Is there a box with a colored background, which can itself adapt its width to the longest text and contain linebreaks or paragraphs?


title: Remove Footer without removing the header

text: I created a header and footer using fancyhdr. I want to remove the footer from a particular page without touching the header. I tried changing the page styles but nothing worked. any idea?


title: How to escape single quote in lstlisting?

text: > **Possible Duplicate:**   >  Package listings: Error "Undefined control sequence." because of single- > quote-symbol? How to escape single quote `'` in lstlisting? I tried `\'` and `'''` but doesn't work.


title: Beamer: footer with current slide number but not total slide number

text: I am using `infolines` as outer theme and I like it. I would like just to display the current slide number without the total slide number (i.e. instead of "n / N" just "n") in the bottom right corner, keeping the rest of the layout provided by `infolines`. How can I achieve this?


title: Checkboxes in PDF forms don't show up in OS X

text: I'm trying to create a PDF form using hyperref. The form looks fine, except for the checkboxes. In both Adobe Reader and Preview.app, the boxes do not appear. My cursor changes if I mouse over where the box is, and if I click on it I can even see the briefest flicker of the box and checkmark. Both promptly disappear. In Adobe Reader on Windows, the checkboxes are initially invisible, but show up the first time I click on them. In FoxIt Reader they work exactly as expected. Here is a minimum working example, which I copied from a tutorial:               \documentclass{memoir}     \usepackage[left=25mm,top=25mm,bottom=10mm,right=10mm]{geometry}     \usepackage{graphicx}     \usepackage{color}     \usepackage[       xetex,a4paper=true,colorlinks=true,       pdftitle={Key form},pdfsubject={Key},       pdfauthor={ich},pdfpagemode=UseNone,pdfstartview=FitH,       pagebackref,pdfhighlight={/N}     ]{hyperref}     \begin{document}     \section*{Request for a key}     \begin{Form}     Front door: \CheckBox[name=ht]{}\\     \end{Form}     \end{document}      And here is a link to the output: http://dl.dropbox.com/u/2126832/ex0001.pdf I am using XeTeX, but I tried compiling with PDFTeX and encountered the same issue. I recently upgraded to OS X 10.7 (Lion) and Texlive 2011. I've spent a lot of time googling this issue and have found no mention of it elsewhere. Any assistance would be greatly appreciated. Edit: Just in case it helps in diagnosing the issue, I should note that the checkboxes in the eforms manual work just fine. (I also tried using eforms, without any luck. No surprise, since eforms uses hyperref.)


title: Listing occurrences of a name through the document in one table

text: I have a document (article) presenting a list and description of several tasks. Each task is written in either a section or subsection, beside the title and description it includes the name of the person in charge, just in plain text in the beginning of the (sub)section. The name can be present in more than one (sub)section, as one person may have multiple tasks. The end document looks something like this:               1. Basics     1.1 Task A     Name: John Doe     The task is about ...     It needs to be completed by July 2012.          1.2. Task B     Name: James F.     ...          2. Task C     Name: John Doe     ...      and so on. In the beginning of the document I would like to generate a table (or index) of the involved people and the tasks for which they are responsible (i.e. where all the occurrences of the names are referenced in one place), in order to have an organised view in which I could see all assigned tasks for a person, and it should be in the following format:               Name     | Task         | Section, page          John Doe | Task A       | 1.1, p. 2              | Task C       | 2, p. 5     James F. | Task B       | 1.2, p.3      Is there an easy solution for that? The solution should facilitate that each person could be easily switched to another task, so that the index is automatically regenerated. I don't think I can really use labels here, as one name can appear multiple times. Indexing, like this:               \subsection{Task A}     Name: John Doe \index{John Doe}     The task is about ...     It needs to be done by ...      Gives me a basic result:               Index          John Doe, 2, 5      It might be a good place to start, but as far as I know, changing the layout of the index in a table (which also includes section names) is a pain.


title: Error with \tableofcontents, after switching from report documentclass to amsbook and back again

text: I changed my documentclass from `report` to `amsbook` (from AMSLaTeX) and everything was fine. Then I decided to change it back to the `report` document class, but it will not compile. In order for it to compile, I am forced to comment out the `\tableofcontents` command. It gives the error message `undefined control sequence`. Any help would be much appreciated.


title: Text before references, but after bibliography title with BibTeX

text: How can I put some introductory text before the references in BibTeX, but after the bibliography title? I have found some reference to `\bibintro`, but it does not compile. I have tried with a fake reference, but it obviously has to start with many As ;)


title: How do I ensure a single character for \ldots

text: How do I ensure that `\ldots` comes out in the PDF as a single character? I'm formatting a document for a publisher, who has given this condition in its formatting rules, but I do not know how I can do this in LaTeX. I'm using MiKTeX 2.9 EDIT: Yes the question could be phrased as: _is it possible for`\ldots` to produce a single "triple point glyph" rather than 3 separate dots (like "..."), since that's what it currently does._ Following the suggestion of kahen, I tried with XeLaTeX and the ellipsis character "…" as well as the `\ldots` command. Both worked and looked the same.


title: Use fancy page numbering using Metapost graphic

text: `ConTeXt` is a great TeX format specially since `Metapost` is tightly integrated into it that producing page numbering style like ![enter image description here](http://i.stack.imgur.com/iD56t.png) is easily implemented _if_ you know `Metapost` (which I admit I don't, but learning). The following is the code, copied and pasted from documentation sources which produced this page numbering style.               \setuppapersize[A4][A4]     \setuplayout[topspace=0.5in, backspace=1in, header=24pt, footer=36pt,       height=middle, width=middle]          \def\MPclipFive#1#2#3#4%       {\startreusableMPgraphic{clip:five:#1#2#3#4}{}          %          delta  := #4;          width  := #1-delta;          height := #2-delta;          lines  := #3;          %          z1 = (0,0);          z2 = (lines,0);          z3 = (.5width,height);          z4 = (width-lines,0);          z5 = (width,0);          %          pickup pencircle            xscaled delta            yscaled .5delta            rotated 30;          %          draw z1--z2{dir 135}...z3...{dir -135}z4--z5 withcolor (.5,.5,.5);          %          pickup pencircle            scaled delta;          %          draw z1 withcolor red;          draw z2 withcolor red;          draw z3 withcolor red;          draw z4 withcolor red;          draw z5 withcolor red;          %        \stopreusableMPgraphic        \reuseMPgraphic{clip:five:#1#2#3#4}{}}          \defineoverlay       [NummerAchtergrond]       [\MPclipFive{\overlaywidth}{\overlayheight}{30pt}{5pt}]          \setuppagenumbering       [\c!location={\v!footer,\v!middle},        \c!command=\NummerCommando]          \unexpanded\def\NummerCommando#1%       {\framed          [\c!background=NummerAchtergrond,           \c!frame=\v!off,           \c!offset=6pt]          {\lower.5\dp\strutbox\hbox spread 60pt{\hss#1\hss}}}          %\setuppagenumbering[location={footer,center}]          \setupbodyfont[11pt,palatino]          \setupindenting[medium,yes]          \starttext     \phantom{Text.}     \vfill     \midaligned{Text.}     \stoptext      Much as I like to work everything else with `ConTeXt`, I am afraid my skills are not up to par with that from my LaTeX experience to do some of the typesetting that I usually do, specially with math and `tikz` graphics. Thankfully, one can do `Metapost` inside LaTeX with the `gmp` package. I have successfully used `egreg`'s example for using `gmp` for the fancy heading but I can't work out the details for the page numbering due to my lack of understanding, I think, of how `\sbox` and `\mpdim` works. I am thinking of using `fancyhdr` to integrate the `Metapost` graphic to achieve the effect. Here is a `MWE` to play with.               \documentclass[10pt]{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[shellescape,tex]{gmp}     \usepackage{xcolor}          \usepackage{titlesec}          \def\MPclipOne#1#2#3#4#5{\begin{mpost}           w := #1;  width  := 100;  wfactor := w/width;           h := #2;  height := 100;  hfactor := h/height;           color lightred;  lightred  := (.90,.50,.50);           color lightgray; lightgray := (.95,.95,.95);           color gray;      gray      := (.50,.50,.50);           def random_delta (expr d) =             d-(uniformdeviate 2d)           enddef;           z1 = (0,height);           z2 = (0,0);           z3 = (width,0);           z4 = (width,height);           z5 = (width+random_delta(.2width),height+random_delta(.2height));           z6 = (.5width+random_delta(.1width),height+random_delta(.1height));           pickup pencircle             xscaled (#3/wfactor)             yscaled (#3/(2*hfactor))             rotated 30;           draw z5..z1..z2..z3..z4..z6 withcolor #4;           pickup pencircle             xscaled (#3/wfactor)             yscaled (#3/hfactor);           draw z1 withcolor #5;           draw z2 withcolor #5;           draw z3 withcolor #5;           draw z4 withcolor #5;           draw z5 withcolor #5;           draw z6 withcolor #5;           newwidth  := (xpart (urcorner currentpicture)) -                        (xpart (llcorner currentpicture));           newheight := (ypart (urcorner currentpicture)) -                        (ypart (llcorner currentpicture));           currentpicture := currentpicture            xscaled (w/newwidth) yscaled (h/newheight);         \end{mpost}}          \def\MPclipFive#1#2#3#4%       {\begin{mpost}          %          delta  := #4;          width  := #1-delta;          height := #2-delta;          lines  := #3;          %          z1 = (0,0);          z2 = (lines,0);          z3 = (.5width,height);          z4 = (width-lines,0);          z5 = (width,0);          %          pickup pencircle            xscaled delta            yscaled .5delta            rotated 30;          %          draw z1--z2{dir 135}...z3...{dir -135}z4--z5 withcolor (.5,.5,.5);          %          pickup pencircle            scaled delta;          %          draw z1 withcolor red;          draw z2 withcolor red;          draw z3 withcolor red;          draw z4 withcolor red;          draw z5 withcolor red;          %        \end{mpost}}          % I want to combine this with fancyhdr, perhaps, to get the desired result.          \newsavebox{\tacopage}     \newcommand{\tacopagenumber}[1]{%     \sbox\tacopage{#1}%     {\ooalign{%     \MPclipFive{\mpdim{\wd\tacopage}} % width     {\mpdim{\ht\tacopage}} % height     {12}     % thickness of the curve     {(.7,.7,.7)}     % color of the curve     {red}     % color of the spots     \cr\hfill     %\raisebox{\dimexpr.15\ht\tacopage+1.5pc\relax}     {\box\tacopage}\hfill     }}}          % For the section formatting          \newsavebox{\tacochapterbox}     \newcommand{\tacochapterhead}[1]{%     \sbox\tacochapterbox{\Large\bfseries #1}%     {\ooalign{%     \MPclipOne{\mpdim{\wd\tacochapterbox+6pc}} % width     {\mpdim{\ht\tacochapterbox+3pc}} % height     {8}     % thickness of the curve     {(.7,.7,.7)}     % color of the curve     {red}     % color of the spots     \cr\hfill\raisebox{\dimexpr.5\ht\tacochapterbox+1.5pc\relax}     {\box\tacochapterbox}\hfill}}}          \newcommand{\secformat}[1]{\tacochapterhead{\thesection\ \raisebox{-4pt}{\textcolor{green}{\rule{1pt}{\baselineskip}}}\ #1}}     \titleformat{name=\section}[block]     {\large\bfseries\filcenter}{}{0pt}{\secformat}     \titleformat{name=\section,numberless}[block]     {\large\bfseries\filcenter}{}{0pt}{\tacochapterhead}          \begin{document}               %\maketitle     \section{A section}          \tacopagenumber{a try}          \end{document}      which produces the output: ![enter image description here](http://i.stack.imgur.com/Puzld.png)


title: [Tikz-]Qtree: force direction of single child to left or right?

text: I'm trying to draw a tree that has internal nodes with only one child, but which must be oriented.                   /         \         /\           \           /\      Instead of the typical qtree where said children just "hang":                   |         |        / \           |           |          / \      I think (but I do not know how) it might be possible to have invisible leaves to force the direction, but perhaps (hopefully) there is a better solution? This can be in either qtree or tikz-qtree... **EDIT** : follow-up question that would be useful, how can make each branch (in a straight line) distinct when the nodes are not labeled -- i.e., when the tree is has several connections in a row, like in the second example, how can I make them slightly spaced from one another so they do not form a straight undistinguishable line? **EDIT 2** : thanks your response, I now have these two trees:                 \documentclass[tikz]{standalone}       \usepackage{tikz-qtree}       \begin{document}       \begin{tikzpicture}\footnotesize         \Tree [ \edge node[midway,left] {000};               [ \edge[draw=none]; {} \edge node[midway,right] {111};                 [                 \edge node[midway,left] {0}; $U_2$                 \edge node[midway,right] {11};                 [ \edge[draw=none]; {} \edge node[midway,right] {11};                 [ \edge node[midway,left] {0}; $U_1$                     \edge node[midway,right] {1}; $U_3$ ] ] ] ]               \edge[draw=none]; {}  ]       \end{tikzpicture}       \begin{tikzpicture}\footnotesize         \Tree [ \edge node[midway,right] {$U_1=U_2$, $U_1=U_3$};               [.. \edge node[midway,right] {$U_1=U_2$, $U_1=U_3$};               [ \edge node[midway,left] {$0$}; $U_2$                    \edge node[midway,right] {$U_1\not=U_2$, $U_1 = U_3$}; [                       \edge node[midway, right] {$U_1 = U_3$};                        [ \edge node[midway, left] {$0$}; $U_1$                           \edge node[midway, right] {$U_1\not=U_3$}; $U_3$ ] ] ] ] ]       \end{tikzpicture}       \end{document}      Any idea on how to make them look better?


title: Middle names treated in a random way in the bibliography

text: I do not have a problem with all authors who have a first and surname only; e.g `John Smith`. Problems come when introducing middle names. `John P. Smith`, `J. P. Smith`, `J P Smith`, `Smith, J. P.` All these are treated randomly using `bibtex` **and** `biblatex`. E.g; some authors appear as **Smith (2010)** when using `\citet` from natbib or **(Smith, 2010)** when using `\citep`. However, other authors are shown in the main document as **(J. P. Smith, 2010)** and **J. P. Smith, 2010**. This made me crazy, and what's more; when creating the MWE for writing the question, the problem disappeared from some authors. MWE:               \documentclass[12pt]{report}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[UKenglish]{babel}     \usepackage{csquotes}     \usepackage[backend=biber,sorting=nyt,style=apa,natbib=true]{biblatex}     \DeclareLanguageMapping{british}{british-apa}               \addbibresource{./list.bib}               \begin{document}          \begin{itemize}          \item Doesn't work: \citet{Sutherland92} stated that \ldots \citep{Sutherland92}.     \item Works \citet{Bliss95} stated that \ldots \citep{Bliss95}.     \item Doesn't work: \citet{Sutherland82} stated that \ldots \citep{Sutherland82}.     \item Works! \citet{AusubelRobinson69} stated that \ldots \citep{AusubelRobinson69}.     \item Works: \citet{Ausubel68} stated that \ldots \citep{Ausubel68} (This doesn't work in the original document!!!)     \item Works: \citet{Bruner61} stated that \ldots \citep{Bruner61} (This doesn't work in the original document!!!)     \item \citet{Bruner66} stated that \ldots \citep{Bruner66} (Also doesn't work in original document :( )          \end{itemize}                    \printbibliography                \end{document}      sample `bib` file:               @ARTICLE{Bliss95,       author = {Bliss, Joan},       title = {Piaget and after: the case of learning science},       year = {1995},       editor = {Bliss 95},       volume = {25},       number = {1},       pages = {139-172},       journal = {Studies in Science Education},       timestamp = {2012.05.22}     }          @BOOK{Ausubel68,       author = {Ausubel, David P.},       title = {Education Psychology: A cognitive View},       year = {1968},       publisher = {Holt, Rinhart and Winston},       address = {New York},       timestamp = {2012.05.22}     }               @BOOK{AusubelRobinson69,       author = {Ausubel, David P. and Robinson, Floyd G.},       title = {School Learning: an Introduction to Educational Psychology},       year = {1969},       publisher = {Holt, Reinhart and Winston},       address = {New York},       timestamp = {2012.05.22}     }               @BOOK{Sutherland92,       author = {Sutherland, Peter},       title = {Cognitive Development Today: Piaget and his Critics},       year = {1992},       publisher = {Sage Publications Ltd},       address = {London, UK},       timestamp = {2012.05.22}     }          @ARTICLE{Sutherland82,       author = {Sutherland, Paul A.},       title = {An Expansion of Peel's Describer - Explainer Stage Theory},       year = {1982},       volume = {34},       number = {1},       pages = {69-76},       journal = {Educational Review},       timestamp = {2012.05.22}     }          @ARTICLE{Bruner61,       author = {Bruner, Jerome S.},       title = {The Act of Discovery},       year = {1961},       editor = {Bruner 61},       volume = {31},       number = {1},       pages = {31-32},       journal = {Harvard Educational Review},       publisher = {Bruner 61},       timestamp = {2012.05.22}     }          @BOOK{Bruner66,       author = {Jerome S. Bruner},       title = {Toward a Theory of Instruction},       year = {1966},       publisher = {Bruner 66},       address = {Cambridge Mass},       timestamp = {2012.05.22}     }      ![enter image description here](http://i.stack.imgur.com/FzYkV.png) I am more confused now as I keep adding references (that do not work originally) to the sample file and they work properly. It's only the Sutherlands that don't work in this sample. Does anyone know what is happening? **Edit** : Before I read the comments, I noticed that in the `bbl` file, the entries where the problem occur have the following data in the entry:                \entry{Sutherland92}{book}{}           \name{labelname}{1}{}{%             {{uniquename=1,hash=19d7df1fb93fb36727a88eb47c7919c6}{Sutherland}{S\bibinitperiod}{Peter}{P\bibinitperiod}{}{}{}{}}%           }           \name{author}{1}{}{%             {{uniquename=1,hash=19d7df1fb93fb36727a88eb47c7919c6}{Sutherland}{S\bibinitperiod}{Peter}{P\bibinitperiod}{}{}{}{}}%           }           \list{location}{1}{%             {London, UK}%           }           \list{publisher}{1}{%             {Sage Publications Ltd}%           }           \strng{namehash}{19d7df1fb93fb36727a88eb47c7919c6}           \strng{fullhash}{19d7df1fb93fb36727a88eb47c7919c6}           \field{sortinit}{S}           \field{labelyear}{1992}           \field{labeltitle}{Cognitive Development Today: Piaget and his Critics}           \field{title}{Cognitive Development Today: Piaget and his Critics}           \field{year}{1992}         \endentry      `uniquename=1` is repeated twice in each entry. However, for the working entries, the first `uniquename` is equal to zero. **Edit2** : uniquename=false as an option solves it, I get it now :)