title: Forest package: Left-align all nodes on every level

text: The tree below looks exactly the way it should. But is a more elegant way to left align all nodes on every level without explicitly specifying `tier` on every node? This is error-prone and really clutters up the source. Is there a global option I can maybe put in the `for tree`-propagator?               \documentclass{article}     \usepackage{forest}     \begin{document}          \begin{forest}     for tree={grow'=east, anchor=west}     [Root,        [C1, for children={tier=1}          [GC1Long, for children={tier=2} [GGC1][GGC2]]         [GC2, for children={tier=2} [GGC1][GGC2Long]]       ]        [C2Long, for children={tier=1}         [GC1, for children={tier=2} [GGC1][GGC2]]         [GC2]       ]       [C3VeryLong, for children={tier=1}         [GC1][GC2]       ]     ]     \end{forest}     \end{document}      ![](http://i.stack.imgur.com/0piuJ.png)


title: Strange character when using listings package

text: I'm seeing an odd character like a very flat U, where there should be a space, with the `listings package`. See example below. Does anyone have any idea why this is happening, or how to get rid or work around it?               \documentclass{standalone}     \usepackage{underscore}     \usepackage{listings}     \usepackage[usenames,dvipsnames, rgb, svgnames, x11names]{xcolor}     % Text layout     \topmargin 0.0cm     \oddsidemargin 0.5cm     \evensidemargin 0.5cm     \textwidth 16cm     \textheight 21cm      \lstnewenvironment{cmd}[1][]{%       \lstset{language=sh, backgroundcolor=\color{LightSteelBlue1}, #1}}     {}          \begin{document}     \begin{cmd}[caption=Configuration file section including filters]     [affy6]     [...]         [[hapmap]]         phenofiles = "data/Hapmap6.0/Pheno/hapmappheno_909.csv",         genofile = "/data/snppy/Hapmap6.0/Geno/birdseed-v2.calls.txt"         anno_filter = "chromosome = 5"         idlink_filter = "studyid = 'CEU'"         some_other_stuff = "foo = bar"     \end{cmd}     \end{document}      ![picture of the output](http://i.stack.imgur.com/LTBCw.png)


title: Problem with \citeauthor and with the abbreviation of first name in the bibliography

text: I am quite new in the field and I have tried to ressolve my issues by doing some research. Nevertheless so far... I failed. I hope you guys can help me. I am using the settings of one on my colleagues to type myt thesis using LaTeX. The problem that I have if that it is impossible for me to use \citeauthor as this turns into (author?). Another issue is that I extracted my information from my literature using mendeley. By doing this I have some authors with whole first name and others only with initials. I would like to have them all with initials. I looked into my style which is plain and to me it appears that instead of the ff there is already f. command. Tried to fix this myself... I don't know much about it, so I really would appreciate the help. Here some more information: \usepackage[square,comma,sort&compress]{natbib} % Voor aangepaste citatie methoden \bibpunct{[}{]}{,}{n}{,}{,} \usepackage[chapter,nottoc]{tocbibind} % Bibliografie in ToC % nottoc eruit gehaald om TOC in toc te krijgen %\setcounter{tocdepth}{3} % Diepte ToC \bibliographystyle{plain} \bibliography{bibliography}


title: \llap mystery with TeX--XeT

text: Consider               \documentclass{article}     \usepackage{xecolor} % loads fontspec by default     \setmainfont{Times New Roman}     \begin{document}     \fontsize{60}{70}\selectfont               TEST\llap{\textxecolor{red}{TEST}}     \end{document}      As expected, `TEST` will be in red color. However with               \documentclass{article}     \usepackage{xecolor} % loads fontspec by default     \setmainfont{Times New Roman}     \TeXXeTstate=1     \begin{document}     \fontsize{60}{70}\selectfont               \beginR TEST\llap{\textxecolor{red}{TEST}}\endR     \end{document}      `TEST` will be in black color. What is the reason?


title: PGF/TikZ error when using chains

text: I'm trying to learn how to use PGF/TikZ to draw pictures, in particular a chain of nodes. I have the following picture:               \begin{tikzpicture}[start chain, node distance=5mm]       \node [on chain,join] {$t_\mathrm{opt flow}$};         \node [on chain,join] {$foo$};     \end{tikzpicture}      I would expect this to yield two nodes connected by a simple line. Instead, when I run LaTex, I get the following error:               ./NIQ_Principles.tex:39: Package PGF Math Error: Unknown function `of'.     ./NIQ_Principles.tex:40: Extra }, or forgotten \endgroup.\endpgfpicture ... \pgf@y }\endgroup \hss \egroup                                                        \pgf@insertlayers \endgrou...      Can someone help me understand what I'm doing wrong? **UPDATE** Here is my complete example:               \documentclass{scrartcl}          \usepackage{tikz}     \usetikzlibrary{chains}          \begin{document}          \begin{tikzpicture} [start chain, node distance=5mm]       \node [on chain,join] {foo};         \node [on chain,join] {bar};     \end{tikzpicture}          \end{document}      And here is the output I get:               ERROR: Package PGF Math Error: Unknown function `of'.          --- TeX said ---          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.10   \node [on chain,join]                                  {bar};     --- HELP ---     From the .log file...          This error message was generated by an \errmessage     command, so I can't give any explicit help.     Pretend that you're Hercule Poirot: Examine all clues,     and deduce the truth by order and method.      I can't really claim that I'm as smart as Mr Poirot, so can someone point me in the right direction?


title: What is the best symbol to use for the d'Alembertian?

text: Normally, most people use the symbol $\Box$ to represent the d'Alembert (wave) operator (including the linked to Wikipedia page). Recently I wanted to use `\hat\Box` and `\tilde\Box`, but they do not render very well. ![boxes](http://i.stack.imgur.com/e0nLe.png) What is the "best" way to create such symbols? * * * Aside: The above image is rendered using my local install of pdflatex: `pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)`. The symbols seem to render fine on some online services: e.g. "Online LaTeX Equation Editor" produces ![more boxes](http://i.stack.imgur.com/Q6tbM.gif) from               \begin{align*}     \Box &= \sum_a \partial^a\partial_a \,, &     \hat\Box &= \sum_a \mathcal{D}^a\mathcal{D}_a     \end{align*}


title: How to change header to list first section on page and not last section

text: The standard use of header/footer is to display the chapter/section information, which normally begins on a new page. What I would like to do is to have the header show the **first** question that is on a particular page, not the **last**. This is useful when a question crosses over a page boundary, and I can refer to the header to know what question is at the top of the page. In the MWE, when I look at Page 2, I can only tell that the first part belongs to Question 2 since I see Question 3 following it. Even worse is that the Page 2 header shows Question 4, but Question 4 does not begin until Page 3. So, my question is, how do I adjust the setting of **QuestionNumber** so that it only changes value upon a page boundary, and have the header show the **first** question on a page.               \documentclass{article}     \usepackage{lipsum}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LE, LO] {Page \thepage}     \fancyhead[RE, RO] {Question \the\QuestionNumber}          % Each question is included from a separate file. But,     % for these purposes can imitate that with this     \newtoks{\QuestionNumber}     \newcommand{\MyInclude}[1]{%         \QuestionNumber={#1}         Question #1\newline\smallskip \lipsum[1-3]     }          \begin{document}     \MyInclude{1}      \MyInclude{2}      \MyInclude{3}      \MyInclude{4}      \MyInclude{5}      \end{document}      So, to summarize, I want Page 1 to show **Question 1** , Page 2 to display **Question 2** , and Page 3 ti display **Question 4**. This question seems related Saving the value of a text macro at the start of the page.


title: biblatex short title and long title in bibliography

text: Is it possible to customize the bibliography (at the end of the document) so that references are shown as follows:                 Author_A short_title              Author_A long_title      Short titles are used throughout the document. `biblatex` with `style=authortitle-comp` is used. It is difficult to relate the short titles to the normal long title in the bibliography when reading the document. It is therefore required that the author name and the short title should precede the full references in the bibliography for ease of reference. The solution by @lockstep work, but there is one issue. The layout is incorrect in that there is not a space between the author and the title. In addition the author references are mulched. Please see the screenshot here. ![Mulched references](http://i.stack.imgur.com/IXUGH.png) Bibtex was upgraded as per @lockstep's note hereunder and all issues were resolved. Well almost ... ![enter image description here](http://i.stack.imgur.com/03Ejn.png) What can be done to get rid of the dot at the start of every reference, see the example here: ![enter image description here](http://i.stack.imgur.com/M5XnE.png)


title: URL containing a question mark with hyperref

text: I have a Bugzilla URL, that looks like this:               http://host/bugzilla/show_bug.cgi?id=1234]      And I would like to include it using `\href`:               \href{http://host/bugzilla/show_bug.cgi?id=1234}{issue \#1234}      Unfortunately, the above "helpfully" translates the question mark to `%3F`, i.e. a _quoted_ question mark. I want an actual question mark there. [Editing to add failing code -- thanks Thorsten and Marco]. Here is an MWE:               \listfiles     \documentclass{article}     \usepackage{hyperref}     \begin{document}     \href{http://host/bugzilla/show_bug.cgi?id=1234}{issue \#1234}     \end{document}      Clicking on the link takes me to `http://host/bugzilla/show_bug.cgi%3Fid=1234`; but I would like to go to `http://host/bugzilla/show_bug.cgi?id=1234`. What should I do?


title: problem with harvard referencing style

text: I have to use Harvard referencing style for my essay, but there is a problem. In reference list it doesn't show the publisher and the address of the book. Also, could it write edition instead of edn.? Also, why it doesn't show (author's name, year) but it shows (author's name year)? The .bib source is               @book{thri,            author = {Thirlwal, A. P.},            year = {2011},            title = {Economics of development : theory and evidence},            edition = {9th}            publisher = {Palgrave Macmillan},            address = {New York}     }      The main body of the essay has including citation               Firstly, despite the differences,  \cite{thri}. commodities’ \cite{thri}{p.71};           \citationstyle{dcu}          \bibliography{essay}      ![sample](http://i.stack.imgur.com/VCUYe.png) My desidered reference would be, > Thirwall, A. P. (2011). _Economics of development: theory and evidence, 9th > ediiton_. New York: Palgrave Macmillan. How can I add quotation's page?


title: Subtract first row from each row and compute the relative differences

text: I am trying to create a new column from another one by subtracting from each row the first one. Then I want to create another column with the relative difference.               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstableread{     TotalDistance     35089     35182     35410     35523     35694     35789     35895     35984     36006     36068     }{\mytable}     \pgfplotstabletypeset[         columns={TotalDistance,LocalDistance},         create on use/LocalDistance/.style={             create col/expr={\thisrow{TotalDistance} - 35089},         },         create on use/DifferenceDistance/.style={             create col/expr={\thisrow{LocalDistance} - \prevrow{LocalDistance}},         },         ]{\mytable}     \end{document}      My goal is to obtain:                 TD  | LD  | DD     ------+-----+----     35089 |   0 |   0     35182 |  93 |  93     35410 | 321 | 228     35523 | 434 | 113     35694 | 605 | 171     35789 | 700 |  95     35895 | 806 | 106     35984 | 895 |  89     36006 | 917 |  22     36068 | 979 |  62      The problems so far are:   1. How to avoid to hardcode `35089`, but instead read it from the first cell?   2. I get errors _Unknown function `LocalDistance__column_not_found'_ when I try to typeset the column DifferenceDistance, even if the column LocalDistance would be created without problems.


title: Remove 'filename.bib' from pdf output file

text: I'm using `biblatex`, and everything works fine. But, before the references list, in each chapter, in the output `.pdf` file, the filename of my `.bib` file appears. I'm working with TeXnicCenter and compiling with Miktex 2.9 on Windows 7.               \documentclass[12pt,a4paper,oneside,english]{book}         \usepackage{fancyhdr}         \usepackage{epsfig}     \usepackage[bibstyle=numeric, citestyle=numeric-comp, refsection=chapter, sorting=none, hyperref=true, maxnames=20, backend=bibtex]{biblatex}          \renewbibmacro{in:}{}        \defbibheading{biblatex}{\section*{References}}          \usepackage[linktocpage=true]{hyperref}         \usepackage{guit}          \addbibresource{Introduzione/bibintro.bib}         \bibliographystyle{elsarticle}          \begin{document}         \chapter{Introduction}          \input{Introduzione/intro.tex}          \printbibliography[heading=biblatex]     \end{document}


title: natbib plainnat and parenthesis around year

text: My school requires the bibliography to be in this format: author (year). _title_. address: publisher I've managed everything except the parentheses around year and the colon after address by editing the plainnat style. I can't seem to wrap my head around the syntax for the functions in the .bst file. Any suggestions on how to adapt this function to display the parenthesis?               FUNCTION {format.date}     { year duplicate$ empty$         { "empty year in " cite$ * warning$            pop$ "" }         'skip$       if$       month empty$         'skip$         { month           " " * swap$ *         }       if$       extra.label *     }      and this one to add the colon after address:               FUNCTION {incollection}     { output.bibitem       format.authors "author" output.check       author format.key output       format.date "year" output.check       new.block       format.title "title" output.check       new.block       crossref missing$         { format.in.ed.booktitle "booktitle" output.check           format.bvolume output           format.number.series output           format.chapter.pages output           new.sentence           address output           publisher "publisher" output.check           format.edition output              }         { format.incoll.inproc.crossref output.nonnull           format.chapter.pages output         }       if$       format.isbn output       format.doi output       format.url output       new.block       note output       fin.entry     }


title: Why is the empty document an error?

text: I'm using Pluma (basically gedit) with a plugin I found to help with tex documents and it does this very well, I just started a new one and activated the preview (because I'll want it at some point) and I have found that an empty document is an error!               \documentclass{report}          \begin{document}          \end{document}      This gives an error about the PDF file not existing, why? Is it some bug, what could possibly require there to be text for it to work? Adding even a single letter fixes this. The engine used was "rubber" by the way.


title: How to Draw Vertical Arrays with Diagonal Arrows to Represent Memory in TikZ?

text: I am trying to find a way to use TikZ to create as much as possible a collection of lecture notes (1), (2) for an introductory level course in data structures for a public free uni of my country. I have been successful so far in finding trees, arrays and so on, but I was not able to find an starter point for representing memory and elements inside of them (wanted) with some arrows to point out concepts (optional) with diagonal arrows and code alignment (wanted). I found that in other questions TeX community was receptive for such requests, I hope this one wouldn't be a problem. The image below is from a book named Structures Gently Through C who has the visualization I am trying to achieve with TikZ. ![enter image description here](http://i.stack.imgur.com/X052K.png) ![enter image description here](http://i.stack.imgur.com/dexz1.png)


title: Gnuplottex fails with 'undefined control sequence' when choosing different font size

text: I encounter a very strange problem when using gnuplottex on my Win 7 32 bit system with MiKTeX 2.9 - gnuplot 4.6.3 & the latest gnuplottex release:               \documentclass[dvips]{minimal}          \newcommand{\sz}{\small}          \usepackage[miktex]{gnuplottex}          \begin{document}     \begin{gnuplot}[terminal=pslatex,terminaloptions={dashed auxfile}]     set xlabel '\sz{Test x}'     plot sin(x)     \end{gnuplot}     \end{document}      Here are the last lines of my log file:               Opening gnuplot stream test-gnuplottex-fig1.gnuplot     runsystem(gnuplot test-gnuplottex-fig1.gnuplot)...executed.          Package gnuplottex Info: test-gnuplottex-fig1.gnuplot converted on input line 1     8.          (D:\notebooks\data\cmds\test-gnuplottex-fig1.tex     ! Undefined control sequence.     \sz ->\small           l.10 ...9,140){\makebox(0,0){\strut{}\sz{Test x}}}                                                       %     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ) [1] (D:\notebooks\data\cmds\test.aux) )      Was is going wrong here? This is weird, since some days ago it worked and it seems to me that I didn't change something... If you just use               \newcommand{\sz}{}      everything's fine. The same message was encountered here: Gnuplottex basic example fails with 'undefined control sequence' but it was solved by updating the package. Every suggestion is greatly appreciated!


title: Advantages of a custom class over a package and environment

text: What are the advantages/disadvantages of defining a class over a package and environment? I have recently started to clean up some of the cruft in the preamble of my letters. The simplest solution might be creating a package with all my "standard" settings resulting in:               \documentclass{letter}     \usepackage{myletter}     \begin{document}%         \begin{letter}{To Name\\To Address}             \opening{Dear}             A letter based on the letter class and a package.             \closing{Sincerely,}             \encl{Some enclosure}         \end{letter}%     \end{document}%      But I could also making a custom letter class, which is built on the letter class, giving me:               \documentclass{myletter}     \begin{document}%         \begin{letter}{To Name\\To Address}             \opening{Dear}             A letter based on a custom class.             \closing{Sincerely,}             \encl{Some enclosure}         \end{letter}%     \end{document}%      Finally, it seems I could make a a package that copies a lot of the letter class and defines an environment named letter which would allow something like:               \documentclass{anyclass}     \usepackage{myletter}     \begin{document}%         \begin{letter}{To Name\\To Address}             \opening{Dear}             A letter based on a package that works in any class.             \closing{Sincerely,}             \encl{Some enclosure}         \end{letter}%     \end{document}%      where the package myletter could be used in any, or almost any, document class. I don't understand what the differences are between packages and classes and when each should be used. To me it seems the first two solutions are basically identical and the code for myletter.sty would be very similar to the code for myletter.cls. In the final case, I think the code for the pacakge would need most of the code from letter.cls. The advantage of this approach would be I could include a letter in any document class. Are there other differences that I am missing?


title: Function to define how many lines to be displayed

text: I have just made a command in my own document class wherein if I type: `\mline` it would automatically output 5 lines only. My problem would be producing lines by just defining how many lines I want to be displayed by the command `\mline`. ## This is what I want to achieve Examples:   * `\mline[10]` outputs 10 lines   * `\mline[3]` outputs 3 lines ## Code               \newcommand{\mline}{         \noindent \null\hrulefill{} \\         \null\hrulefill{} \\         \null\hrulefill{} \\         \null\hrulefill{} \\         \null\hrulefill{} \\     }


title: align with text

text: I have some equations into the aligning environment and i want below them to write something. But in the same time also want those to be aligned. In particular Imagine that I want or i could do this               \begin{align}     \mathrm{E_{0}\sum_{t=0}^{\infty}} & \beta^t U(c_{it}) \;\;  \\     c_{it} + d_{it+1} + x_{it} & = y_{it} - w_tl_{it} + (1+r_t)d_{it}  \\       \text{The budget constraint & of the entrepreneur} \nonumber \\     y_{it} & = f(k_{it}, l_{it}, z_{it})  \\      \text{The technology that &  the entrepreneur operates} \nonumber \\     k_{it+1} & = x_{it} - (1-\delta)k_{it}  \\     \text{the linear technology &that transforms final goods to investment goods} \nonumber\\     d_{it} & \leq \theta k_{it} \\     \text{collateral & constraint} \nonumber \\     z_{it} & \sim \text{exogenous random process drawn from} \;\; \psi(z)     \end{align}       of course latex gives me errors since i have the & inside the \text{}. Can someone propose an alternative that latex can produce ?


title: pgfplots: stacking plots in positive and negative y direction in the same diagram

text: I have several data files which I want to plot in the following manner: ![enter image description here](http://i.stack.imgur.com/MmFgb.png) I achieved this with the following code:               \documentclass{minimal}     \usepackage{pgfplots,filecontents}          \begin{filecontents}{total.dos}     0  0  0  0  0  0  0  0        1  2  0 -2  0  2  0 -2       2  4  0 -4  0  4  0 -4       3  2  0 -2  0  2  0 -2       4  0  0  0  0  0  0  0      5  1  0 -1  0  0  0  0      6  2  0 -2  0  0  0  0      7  1  0 -1  0  0  0  0      8  0  0  0  0  0  0  0      \end{filecontents}          \begin{document}     \begin{tikzpicture}       \begin{axis}[xlabel={Energy [eV]}, ylabel={Intensity}, no markers]         \addplot [fill=red,draw=none] table [x index=0,y index=5] {total.dos};         \addplot [fill=red,draw=red,fill opacity=0.25] table [x index=0,y index=1] {total.dos};         \addplot [fill=red,draw=none] table [x index=0, y index=7] {total.dos};         \addplot [fill=red,draw=red,fill opacity=0.25] table [x index=0,y index=3] {total.dos};       \end{axis}     \end{tikzpicture}     \end{document}      **My Question:** How can I stack several of those plots? It should look similar to this: ![enter image description here](http://i.stack.imgur.com/uNPFv.png) The problem is that normal stacking doesn't work because this would stack every `addplot` which leads to wrong output since some `y` columns of my data have positive and some have negative values for the same `x` value and `pgfplots` stacks the plots only in one direction (either positive or negative). But I need to make `pgfplots` group some `addplot`s, while within the respective groups there is no stacking, and then let it stack the groups. Is this possible? **Update:** I have changed the title of my question since the discussions in the comment section revealed that the crucial point is to make `pgfplots` plot in the positive and negative `y` direction at the same time. This way I get the plots to appear the way I want.


title: Problem with \begin{cases} -\end{cases}

text: I was reading some other questions about people getting problems with the environment cases and the solution was to install the package `amsmath`, which I did, but now I got this error message: > 1.53 } For no particular reason, I moved the line where I have `\usepackage{amsmath}` a few lines below and then I got the error > 1.890 } I don't know what those lines are since those lines don't contain the `\usepackage{amsmath}` . It is important to mention that I am working on a file that use the `\include`s to call other files, so for instance if I don't use the package `amsmath` then I got the error for the cases from another file . Thank you in advance.


title: How can I automatically boldify formulas that include text?

text: I have some simple formulas that I would like to have in bold and non-bold versions. Because retyping a formula is error-prone, I'd like to have a macro that takes the non-bold formula (which is wrapped in a macro) and emits a copy of the macro, but bolded. What I have so far: (MNWE):               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{etoolbox}     \thispagestyle{empty}          \newcommand{\foo}{A\text{a}\text{b}+}     \newcommand{\baz}{B\text{c}\text{d}-}          \makeatletter     \newcommand{\boldify}[2]{%       \let\@boldme#1       \patchcmd{\@boldme}{\text}{\textbf}{}{}       \newcommand{#2}{\ensuremath{\boldsymbol{\@boldme}}}     }     \makeatother          \boldify{\foo}{\bffoo}     \boldify{\baz}{\bfbaz}          \begin{document}          $$\foo \bffoo$$     $$\baz \bfbaz$$          \end{document}      This produces: ![results of above LaTeX](http://i.stack.imgur.com/QV8oi.png) There are three reasons I'm unsatisfied:   1. The second `\text` is not bolded.   2. The `\text` blocks in the last invocation replace those in the first.   3. I have to manually specify the name of the bold version of the command. It's only the 2nd problem which is really critical for me. What am I missing?


title: Issue with chapter numbers in page numbers

text: I am writing my thesis and using a template given by my university. To get the chapter numbers in the page number, I use the following commands:               \@addtoreset{page}{chapter}     \renewcommand{\thepage}{\thechapter-\arabic{page}}      Chapter heading formating is done by using the `titlesec` package. So to get new chapters in an odd page I use:               \newcommand{\chapterbreak}{\cleardoublepage}      However, the issue with this is that the last page of each chapter gets numbered with the chapter number of the next chapter. For eg. the last page of chapter 2 will be numbered `3-0` instead of `2-10`. The way I see it, the chapter number is being incremented _before_ the chapter break is done. Any ideas how to fix this or work around this? **Update 1:** I have also tried the `chappg` package which has the same problem.   **Update 2:** Minimum working example:               \documentclass[twoside]{report}       \usepackage{titlesec}     \usepackage{lipsum}\setlipsumdefault{1-3}          \titleclass{\chapter}{straight}     \titleformat{\chapter}[hang]{\bfseries\huge}{\thechapter\quad}{0em}{}     \newcommand{\chapterbreak}{\cleardoublepage}          \makeatletter     \@addtoreset{page}{chapter}     \renewcommand{\thepage}{\thechapter-\arabic{page}}     \makeatother          \begin{document}       \chapter{One}     \lipsum     \chapter{Two}     \lipsum     \chapter{Three}     \lipsum     \end{document}        `\cleardoublepage` doesn't seem to work for some reason in my example, but the problem with the page numbering holds.


title: Insert 3 appendices after Bibliography and include them in the TOC

text: How to insert 3 appendices after Bibliography and include them in the TOC for my thesis I have no idea as i am beginner in Latex


title: How can I build this equation in latex

text: I am trying to write this equation in latex but couldn't accomplish it. Can someone help me? ![enter image description here](http://i.stack.imgur.com/pLZGs.png)


title: Drawing Axis Grid in 3D with Custom Unit Vectors

text: I am trying to adjust the unit vectors for each of the axis, and draw a coordinate grid. I can get it to work _without_ specifying the unit vectors, of specifying it as:               x={(1.0cm,0.0cm)}, y={(0.0cm,1.0cm), z={(-0.5cm,-0.1cm)}      Since I don't notice any difference in the output I am assuming that the above are the default settings. The above yields the graph on the left, but if I specify               x={(-0.5cm,-0.5cm)}, y={(0.9659cm,-0.25882cm)}, z={(0cm,1cm)}      then I get the grid on the right where the `x-y` grid (in red) does not quite look right to me. The triangle in yellow is to show that the coordinates are working fine as it is drawn as:               \begin{scope}[canvas is xy plane at z=0]       \draw [fill=yellow!10,opacity=0.2] (0,1) -- (3,0) -- (0,4) -- cycle;     \end{scope}      ![enter image description here](http://i.stack.imgur.com/QOOhw.png) ## References:   * A very good reference for the unit vectors is available at Drawing simple 3D cylinders in TikZ   * The settings for the unit vectors that I am trying to use are from the 3d box example from altermundus.com ## Code:               \documentclass{standalone}          \usepackage{xparse}     \usepackage{tikz}     \usetikzlibrary{3d}          \NewDocumentCommand{\DrawCoordinateGrid}{O{} m m m m m m}{%         \def\XGridMin{#2}         \def\XGridMax{#3}         \def\YGridMin{#4}         \def\YGridMax{#5}         \def\ZGridMin{#6}         \def\ZGridMax{#7}         %         \begin{scope}[canvas is xy plane at z=0, thick, red]           \draw [#1] (\XGridMin,\YGridMin) grid (\XGridMax,\YGridMax);         \end{scope}         \begin{scope}[canvas is yz plane at x=0, thin, blue]           \draw [#1] (\YGridMin,\ZGridMin) grid (\YGridMax,\ZGridMax);         \end{scope}         \begin{scope}[canvas is xz plane at y=0, thin, orange]           \draw [#1] (\XGridMin,\ZGridMin) grid (\XGridMax,\ZGridMax);         \end{scope}     }%          \NewDocumentCommand{\DrawCoordinateAxis}{O{} m m m m m m}{%         \def\XAxisMin{#2}         \def\XAxisMax{#3}         \def\YAxisMin{#4}         \def\YAxisMax{#5}         \def\ZAxisMin{#6}         \def\ZAxisMax{#7}         %         \begin{scope}[thin, gray, -latex]             \draw [#1] (\XAxisMin,0,0) -- (\XAxisMax,0,0) node [below left] {$x$};             \draw [#1] (0,\YAxisMin,0) -- (0,\YAxisMax,0) node [right] {$y$};             \draw [#1] (0,0,\ZAxisMin) -- (0,0,\ZAxisMax) node [above] {$z$};         \end{scope}     }%          % A macro to save repeating the code     \newcommand*{\DrawTriangle}{%         \begin{scope}[canvas is xy plane at z=0]           \draw [fill=yellow!10,opacity=0.2] (0,1) -- (3,0) -- (0,4) -- cycle;         \end{scope}     }%               \begin{document}     \begin{tikzpicture}[         x={(1.0cm,0.0cm)}, y={(0.0cm,1.0cm), z={(-0.5cm,-0.1cm)}}% All grids are ok         ]              \DrawCoordinateGrid{0}{4}{0}{4}{0}{4}         \DrawCoordinateAxis[thick, black]{0}{5}{0}{5}{0}{5}              \DrawTriangle;% For reference purposes     \end{tikzpicture}     %     \begin{tikzpicture}[         x={(-0.5cm,-0.5cm)}, y={(0.9659cm,-0.25882cm)}, z={(0cm,1cm)}% x-y grid is wacky         ]              \DrawCoordinateGrid{0}{4}{0}{4}{0}{4}         \DrawCoordinateAxis[thick, black]{0}{5}{0}{5}{0}{5}              \DrawTriangle;% For reference purposes     \end{tikzpicture}     \end{document}


title: Verbatim environment with correct tab handling and special characters

text: I'm looking for an environment similar to `Verbatim` which will allow me to say something like the following code (which uses **indentation** instead of spaces):               \documentclass{article}          \usepackage{fancyvrb}     \usepackage[margin=1in]{geometry}          \begin{document}         \begin{enumerate}             \item We first set \texttt{x} to infinity if it is positive:                 \begin{Verbatim}                     if x > 0:                         x = \infty                 \end{Verbatim}         \end{enumerate}     \end{document}      and get back **exactly** the following, in terms of the indentation, the escaping of all symbols (like `\infty`), etc. ![Screenshot](http://i.stack.imgur.com/3HDEh.png) The problem with `Verbatim` is that it requires me to _un-indent_ the body with respect to the rest of the code, which makes my source code ugly. (I also can't use `verbatim` because it forces me to use spaces.) Furthermore, I can't figure out how to embed special symbols in it, either. Is there some environment that fixes these problems with a not-too-difficult syntax for inserting **special symbols** and **math** into the code? (Ideally, I would want `\` and `$` to be the escape characters, but anything that isn't too difficult to type will do.)


title: How to differentiate glyphs by script (semi-)automatically?

text: I am trying to emulate this poster which I've found at http://www.brill.com/about/brill-fonts. How could we define different color per script and get a similar glyph poster? ![poster at Brill Fonts](http://i.stack.imgur.com/IVPXe.jpg)


title: LuaSSEQ problem

text: I am trying to compile a Lualatex file using the luasseq package My minimum working example is               \documentclass{article}     \usepackage{luasseq}     \begin{document}     \end{document}      When I run 'lualatex' on this it simply stops with a command window expecting me to type something in:               (/usr/local/apps/texlive2011/texmf-dist/tex/generic/pgf/libraries/decorations/p     gflibrarydecorations.shapes.code.tex))     lua>       If I control-D (really all I can do)               ! LuaTeX error <\directlua >:1: attempt to call global 'sseq_set_defaults' (a nil value)     stack traceback:         <\directlua >:1: in main chunk.     l.332 \directlua0{sseq_set_defaults()}      Unsure what the problem is!


title: Customising title header of ModernCV template

text: So I want to customise CV using the ModernCV template. I am using the classic style but want to have the Personal information written in the CV title and under the First and Last name. Unfortunately I have a problem with getting everything to go where i want it to. Hopefully this picture better explains what I have (top) and what I want to get (bottom). ![Top the results from the code and bottom the sought results](http://i.stack.imgur.com/1oQCe.jpg) Here is the code I am using:               \newlength{\makecvtitlenamewidth}     \setlength{\makecvtitlenamewidth}{0pt}% dummy value     \renewcommand*{\makecvtitle}{%     % recompute lengths (in case we are switching from letter to resume, or vice versa)     \recomputecvlengths%     % optional detailed information (pre-rendering)     \def\phonesdetails{}%     \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number     \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%     \def\socialsdetails{}%     \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link     \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%     \newbox{\makecvtitledetailsbox}%     \savebox{\makecvtitledetailsbox}{%     \addressfont\color{color2}%     \begin{tabular}[b]{@{}l@{}}%     \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%      \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty         \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%       \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict       \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%       \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%       \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict       \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%     \end{tabular}}%     % optional photo (pre-rendering)     \newbox{\makecvtitlepicturebox}%     \savebox{\makecvtitlepicturebox}{%     \ifthenelse{\isundefined{\@photo}}%      {         \@initializelength{\makecvtitlepicturewidth}% Damit Länge bekannt bei Name         \settowidth{\makecvtitlepicturewidth}{0pt}%       }%       {%        \setlength\fboxrule{\@photoframewidth}%        \ifdim\@photoframewidth=0pt%          \setlength{\fboxsep}{0pt}\fi%        {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}         \@initializelength{\makecvtitlepicturewidth}%          \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%       \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of        }%     % end define optional picture     % optional detailed information (rendering)     % name     %    \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%     {   \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\par     \hfill\usebox{\makecvtitlepicturebox}%     %    \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%     %   \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}%\familyname     \\[-.35em]%     {\color{color2!50}\rule{\textwidth}{.25ex}}%     % optional title     % {   \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}     \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\hfill\titlestyle{\@title}}\\[2.5em]%      % optional quote     \ifthenelse{\isundefined{\@quote}}%     {}%     {{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%     \par}%       I am very new at this so I am not sure if I have included all important code, unless please let me know what I should also include. Many thanks for the help! /Tobias


title: \pdfpages, box, headers

text: I'm using `pdfpages` to put a PDF file into my latex document. The command               \includepdf[page=1,angle=90,height=\textheight]{file.pdf}      works fine but I would rather it kept the header and footer that are on every other page in the document and then had the PDF file fill in the remainder of the page. As is it kills the header and footer. Maybe I should construct a box?


title: \RaggedRight makes document longer

text: I have a document carefully written to fit in 4 pages; but when I added a `\raggedright` (or `\RaggedRight` with use of the `ragged2e` package) the length gets longer. Furthermore, suddenly the output isn't stable between moving from Web2c on my Linux machine, and a recent version of MiKTeX on my windows machine. Here's a test case exhibiting the behaviour:               \documentclass[11pt,a4paper]{article}     \usepackage[a4paper,margin=20mm,nohead,foot=7mm]{geometry}     \usepackage{lipsum}     \usepackage{microtype}     \usepackage{txfonts}     \renewcommand{\familydefault}{\sfdefault}     \begin{document}     \lipsum[1-35]     \end{document}      This produces something a touch over 4 pages and Web2c and MikTeX produce visually identical PDF files. But now consider:               \documentclass[11pt,a4paper]{article}     \usepackage[a4paper,margin=20mm,nohead,foot=7mm]{geometry}     \usepackage{lipsum}     \usepackage{ragged2e}     \usepackage{microtype}     \usepackage{txfonts}     \renewcommand{\familydefault}{\sfdefault}     \begin{document}     \newlength{\saveparindent}     \setlength{\saveparindent}{\parindent}     \RaggedRight     \setlength{\parindent}{\saveparindent}     \lipsum[1-35]     \end{document}      On Web2c this adds two lines to the length of the document; but on MikTeX it adds 7 lines! What's going on? **Update:** As some comments have very helpfully pointed out, package versions can make a difference, and unsurprisingly, this seems to be the case-- my Web2C installation (outside my control!) is very out of date. However, the original question stands-- why is there a different at all between using `\RaggedRight` and not?


I have created the following shape (it has some more features but the error is always the same), based on a rectangle.               \pgfdeclareshape{set}{         %Like in rectangle but without all the separators and height=width         \savedanchor\northeast{%             \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%             \pgf@x=.5\pgf@xb%             \pgf@y=.5\pgf@xb%         }%              \savedanchor\southwest{%             \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%             \pgf@x=-.5\pgf@xb%             \pgf@y=-.5\pgf@xb%         }%              % Inherit from rectangle         \inheritanchorborder[from=rectangle]%         \inheritanchor[from=rectangle]{center}%         \inheritanchor[from=rectangle]{north}%         \inheritanchor[from=rectangle]{south}%         \inheritanchor[from=rectangle]{west}%         \inheritanchor[from=rectangle]{east}%         \inheritanchor[from=rectangle]{north west}%         \inheritanchor[from=rectangle]{north east}%         \inheritanchor[from=rectangle]{south west}%         \inheritanchor[from=rectangle]{south east}%              \backgroundpath{%             \pgfpathrectanglecorners{\southwest}{\northeast}%         }%      }%      Most things work just fine for me. For example:               \node[set,draw, below right=10ex of n, rotate=270, anchor=center] (sA) {};      positions the node perfectly and rotates it. Same with 'below left'. But if I use               \node[set,draw, above left=10ex of n, rotate=270, anchor=center] (sA) {};      I get the error > Package PGF Math Error: Unknown function 'north' (in 'north west'). The same happens with 'above right'. The output still seems to be fine. I am using the new version of tikz 3.0.0. Any ideas to avoid this really disturbing error? Thank you!


title: Text font thinner on pages with pictures

text: I have a problem with font thickness on pages containing heavy pictures, the font looks slightly thinner than usual (see the example). Does anyone know how to solve this? FYI: I use TeXShop to compile. ![enter image description here](http://i.stack.imgur.com/qEgb5.png) On the left-hand side the page with the picture while on the right hand side the usual font. I guess it's not a problem of the reader, since I get the same result with adobe reader, preview and on the printed document. I don't know if this helps but the pictures I have on the page are .pdf. I think the problem might be related to the weight of the picture.


title: pgfplots, representing bars from same category and series adjacently

text: I would like to represent the number of counts from specific cell types on a bar chart. The cells are from different mutants, consequently there are four series (742, 743, 744, 745). However there are often counts from more than one cell on each sample. It was possible to do this in gnumeric, although rather unattractive. ![Example of formatting using gnumeric](http://i.stack.imgur.com/2J5ri.png) When I try in pgfplots it the bars in the same horizontal position, which is a bit misleading when looking at the graph: ![Example of formatting using pgfplots](http://i.stack.imgur.com/9NiXo.png) Is it possible to separate them out so they sit side by side? This is the full code used for the pgfplots graph:               \documentclass[a4paper,11pt]{article}     \usepackage{graphicx}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}[trim axis left,]     \begin{axis}[         ybar,         ymin=0,         scale=1.8,         legend style={             at={(.15,0.5)},             anchor=south             },         ylabel={counts},         symbolic x coords={xylem,metaxylem,parenchyma near,parenchyma far,endodermis,cortex},         xtick=data,         x tick label style={             rotate=90,             anchor=east,             major tick length=0pt,             },         ytick={0,1E-5,2E-5,3E-5,4E-5,5E-5},         minor y tick num=1,         minor x tick num=1,         ]                    \addplot       coordinates{     (xylem,4.77115957680291E-07)     (xylem,4.80700458746295E-07)     (xylem,6.18930207436045E-07)     (xylem,0)     (xylem,0)     (metaxylem,1.36717438165697E-06)     (metaxylem,8.6587710838275E-07)     (parenchyma near,1.40074803102931E-05)     (parenchyma near,5.6128882652721E-06)     (parenchyma near,3.52571708015267E-05)     (parenchyma near,1.92039172966317E-05)     (parenchyma near,1.91236661974104E-05)     (parenchyma near,2.35518573480108E-05)     (parenchyma far,7.43951692166563E-07)     (parenchyma far,8.88923267160998E-07)     (parenchyma far,3.6268814728485E-06)     (parenchyma far,1.09732874594568E-06)     (parenchyma far,8.53068275418508E-07)     (endodermis,2.57085162076528E-06)     (endodermis,3.29317195319341E-06)     (endodermis,4.94702484448028E-06)     (endodermis,2.13922579718091E-06)     (endodermis,2.22654113584136E-06)     (endodermis,4.12652290509265E-06)     (endodermis,1.17511893280516E-06)     (endodermis,6.53785861610346E-06)     (endodermis,4.47396914912963E-06)     (cortex,9.83914129289644E-06)     (cortex,1.86715647599582E-05)     (cortex,0)     };          \addplot       coordinates{     (xylem,7.53945434084153E-07)     (xylem,1.37415765387096E-06)     (xylem,0)     (xylem,0)     (xylem,0)     (metaxylem,1.98247542614061E-06)     (metaxylem,0)     (parenchyma near,3.68316451637233E-06)     (parenchyma near,8.0777112275819E-06)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma far,6.77656020223033E-07)     (parenchyma far,9.71881811732259E-07)     (parenchyma far,0)     (parenchyma far,0)     (parenchyma far,0)     (endodermis,1.08336656049687E-06)     (endodermis,1.39949378109776E-06)     (endodermis,1.91375090130445E-06)     (endodermis,1.13971032622582E-06)     (endodermis,1.00361006441752E-06)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (cortex,1.05480628479098E-06)     (cortex,2.26710233848155E-06)     (cortex,1.76455333227908E-06)     };          \addplot       coordinates{     (xylem,1.44022978099178E-06)     (xylem,0)     (xylem,0)     (xylem,0)     (xylem,0)     (metaxylem,6.05958746456549E-07)     (metaxylem,0)     (parenchyma near,2.63354304294999E-06)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma far,1.60959732610717E-06)     (parenchyma far,0)     (parenchyma far,0)     (parenchyma far,0)     (parenchyma far,0)     (endodermis,5.00987747409934E-06)     (endodermis,1.98538914922263E-05)     (endodermis,6.60814347871989E-06)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (cortex,9.5355341294319E-06)     (cortex,2.1057864731946E-05)     (cortex,1.5669977484698E-05)     };          \addplot       coordinates{     (xylem,8.8548394677423E-07)     (xylem,8.49207960018033E-07)     (xylem,1.82966958991188E-06)     (xylem,5.01832453727407E-07)     (xylem,6.31337603076415E-07)     (metaxylem,8.45054650059105E-07)     (metaxylem,0)     (parenchyma near,4.08132819251251E-05)     (parenchyma near,1.83620584272058E-05)     (parenchyma near,8.32828327462505E-06)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma near,0)     (parenchyma far,3.11847940394294E-05)     (parenchyma far,3.19814426901767E-05)     (parenchyma far,2.94103241285456E-05)     (parenchyma far,2.07894487802615E-05)     (parenchyma far,0)     (endodermis,6.44738578951128E-06)     (endodermis,3.60117193456986E-06)     (endodermis,2.3746975565665E-06)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (endodermis,0)     (cortex,3.62699100680599E-06)     (cortex,0)     (cortex,0)     };          \legend{742,743,744,745}     \end{axis}     \end{tikzpicture}     \end{document}


title: Removing an "Overfull \vbox" message caused by a nested table

text: I am trying to typeset a nested table, like this:               \documentclass{article}     \usepackage{bigstrut}     \usepackage{multirow}          \begin{document}          \begin{tabular}{|lll|}       \hline        A & \multirow{2}{*}{           \begin{minipage}{3cm}             \begin{tabular}{|l|l|}               \hline               A & \hfill 1\textsuperscript{st}\bigstrut[t] \\               \hline               A & A \\               \hline             \end{tabular}           \end{minipage}             } &  A \\        A & {} & A \\        A & A  & A \\       \hline     \end{tabular}          \end{document}      This causes a bad box: `Overfull \vbox (3.19998pt too high) detected at line 19` I have been trying for a while to detect the precise source of this bad box (it's caused partly by the `\bigstrut`), but I do not know how to remove this warning. I tried various fixes of the sort `\\\\[3.5pt]`, but I am not sure what's going wrong and how to address the issue. It might be the case that typesetting the table in an entirely different way turns out to be the "best" way, but for now I am interested in the source of the bad box and how to get rid of it. Note: In this minimized example, the bottom middle A overlaps with the nested table, but even if I do something like `\\\\[1cm]` for the second-to-last line, the bad (overfull) `\vbox` message persists (with incidentally the same point size indication). * * * **EDIT** Here's is an alternate MWE which creates a similar overfull error without having to read through a nested `tabular` environment:               \documentclass{article}     \usepackage{xcolor}     \usepackage{multirow}     \setlength{\parindent}{0pt}     \newcommand{\vstrut}[3][blue]{{\color{#1}\rule[-#2]{0.4pt}{#3}}}     \newcommand{\hstrut}[2][blue]{{\color{#1}\makebox[0pt][l]{\rule[-0.4pt]{#2}{0.4pt}}}}     \begin{document}          \begin{tabular}{|lll|}       \hline        A\vstrut{0ex}{5ex} & \multirow{2}{3cm}{%           \begin{minipage}[t]{3cm}                 Trial \vstrut[red]{18pt}{18pt}  text           \end{minipage}}                                                & A \\        A\vstrut{3ex}{3ex}\hstrut{1.65in} & {} & A \\        A                                 & A  & A \\       \hline     \end{tabular}          \end{document}


title: Equation Alignment!

text: ![paper](http://i.stack.imgur.com/fWsLL.png) I am having a hard time doing this format. Does anyone know how to do this? It will be a big help if anyone does. Thank you so much. This is what I did:               \documentclass{article}          \begin{document}          \begin{equation}     \begin{split}         \lambda_{N} &= \ln N  \text{{\itshape NBIC/SC} \citep{t}}\\         \lambda_{N} &= 2 \text{{\itshape AIC} \citep{a}}\\         \lambda_{N} &= 1 +\ln N  \text{{\itshape CAIC} \citep{e}}\\         \lambda_{N} &= 2 \ln\ln N \text{{\itshape HQIC} \citep{o}}.     \end{split}     \end{equation}          \end{document}      This is what shows.. ![enter image description here](http://i.stack.imgur.com/5iTYB.png)


title: Setting up page dimensions in LaTeX

text: I generally try typeset a document in LaTeX and then take a print out. Since I am not familiar with setting up the page dimensions, when I take print out on an A4 paper, lot of gaps are left.   * So can anyone tell me how I should go about defining the commands so that a gap of 1 inch is left from each corner of the A4page


title: Listings: increase internal margin between caption (top) and listing?

text: With the MWE below (adapted from here), how do I increase the internal margin in the listing so that instead of looking like this: ![enter image description here](http://i.stack.imgur.com/DABzh.png) It looks like this (note the gray background has been "stretched" a bit): ![enter image description here](http://i.stack.imgur.com/9fC0b.png) I have tried fiddling with `framextopmargin`, `belowcaptionskip` etc but it doesn't seem to work with the _internal_ margin.               \documentclass{article}     \usepackage[svgnames]{xcolor}      \usepackage{caption}     \usepackage{listings}     \usepackage{calc}      \lstdefinestyle{outline}{              basicstyle=\scriptsize\ttfamily,              numberstyle=\tiny,              numbersep=5pt,              tabsize=2,              extendedchars=true,              breaklines=true,              keywordstyle=\color{blue},              frame=b,              stringstyle=\color{green!40!black}\ttfamily,              showspaces=false,              showtabs=false,              numbers=left,              xleftmargin=17pt,              framexleftmargin=17pt,              showstringspaces=false,              backgroundcolor=\color[RGB]{200,200,200},              belowcaptionskip=-1pt     }          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox[RGB]{60,100,180}{\parbox{\textwidth - 2 \fboxsep}{\hspace{14pt}#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}          \begin{document}     \begin{lstlisting}[style=outline,caption=Test]     First line.     Second line.     \end{lstlisting}     \end{document}


title: How to convert a scientific manuscript from LateX to Word using Pandoc?

text: I have a typical scientific manuscript in a LaTeX `.tex` file, and I need to convert it to MS Word `.doc` file. The reason for having to convert to MS Word is I'm submitting the manuscript to an academic journal and they _only_ accept MS Word (I know...) The manuscript includes title page, figures, tables, equations (inline and in their own `align` environment), footnotes, bibliography, and an annex. The tables are in their own separate `tables.tex` file, which I include using the `\include{tables}` command. Most tables take up a whole landscape page, and were generated sing the package `pdflscape`. I am using Windows 7 Professional. My plan is to use `pandoc` to go form `.tex` to `.odt`, open the latter in Libre Office, and convert to `.doc`. I have read a related question but it is too general. Similarly the examples in the Pandoc website are too simple. I have played around but I am unable to accomplish what I want. This is surprising since converting a scientific manuscript is probably the most common use case for Pandoc. Here are some sample failures: **Example 1** I open a command line in the project folder, and execute the following:               pandoc -s document.tex -o document.odt      I get this error message:               pandoc: figure1: openFile: does not exist <no such file or directory>      where `figure1` is the name of a figure file (e.g. `figure1.png`) in the project folder referenced in a line as `\includegraphics[width=5.8in]{figure1}`. I suspect pandoc expects a `.png` extension but not sure how to provide it. **Example 2** Next I try `.html`, and excute the following:               pandoc -s document.tex -o document.html      The program executes fine. I open HTML file. Footnotes are there but figures are missing, tables are displayed as LaTeX, bibliography is missing, in-line math displays well, but math in `align` environment does not, section labels are displayed, and some other minor issues. So given that mine is probably a typical use case scenario, my question is this: What commands should I use to get the `.odt` file I want? I could not find a fully worked out example on the web. * * * Here is a specific list of errors. I'll update how I corrected them based on community suggestions:   1. **Figures not rendering**. Solved by adding `.png` extension to `.tex` file in `\includegraphics` command. Now figures are included but they are huge, with half of each figure outside the page.   2. **No bibliography**. Solved. First, I have one huge consolidated Latex `.bib` file where I keep all my citations. I manage it using JabRef. This was giving me problems as I do not keep the cleanest `.bib` file in town. So I reduced the problem by using a neat trick in JabRef that allows you to subset your master `.bib` file using the `.aux` file generated by Latex when compiling your manuscript. In JabRef click on Tools > New Subdatabase based on AUX file. This way I generated a much smaller `biblio.bib` file with only the articles referenced in my manuscript. Running `pandoc -s document.tex -o document.odt --bibliography=biblio.bib` did the trick.   3. **Display math**. Math in `\begin{align}` environment displayed in verbatim `\latex`; (A partial solution is to use the TexMaths Libre Office extension. Copy and paste the latex math code in the `.odt` file created by Pandoc into the equation editor, and so on. Surely this could be built into a macro that can post-process all remaining math.) UPDATE: Display math works very well using `\--mathjax` extension.   4. **Inline math**. Inline equation do not always render properly. Bold math is a problem. E.g. `$\Sigma=\sigma^2\bm{I}$` displays as `$\Sigma=\sigma^2\bm{I}$`;   5. Labels are displayed (e.g. section labels show as `[sec:empirical] blah blah]`;   6. All tables display as raw latex.


title: Braces (not)containing \underbrace

text: This:                \left\{       \begin{array}{l}        \frac{da}{dt}=\sum\limits_kJ_k\sin(D_{ok})\\        \frac d{dt}\left\{\begin{array}{c}e\\i\end{array}\right\}=A+\sum\limits_kJ_k\sin(D_{ok})\\        \frac d{dt}\left\{\begin{array}{c}\epsilon\\\Pi\\\Omega\end{array}\right\}=\underbrace{B-\sum\limits_kK_k\cos(D_{ok})}_{\mbox{functions }F\mbox{ from (2)}}       \end{array}      \right.      looks like this: ![enter image description here](http://i.stack.imgur.com/Ik6Tq.png) but I want it looking like this: ![enter image description here](http://i.stack.imgur.com/Gddcb.png)


title: Disable "Auto remove aux files" dialog in TeXworks

text: Every time LaTeX happens to generate a corrupted `.aux` file for whatever reason, the following dialog appears, reading _Whil tupesetting, a corrupt .aux file from a previous run was detected. You should remove it and rerun the typesetting process. Do you want to displaythe "Remove Aux Files..." dialog now? ![enter image description here](http://i.stack.imgur.com/OW2Uw.png) Not only it is redundant (why not to display the other dialog immediately with `Skip` button?), but more importantly it is very annoying. **I do not want any dialogs to appear!** Can it be switched off somehow or do I have to get the source, erase this part and recompile it?


title: Center content in longtable

text: I have this table               \documentclass[a4paper]{scrartcl}     \usepackage{longtable}     \begin{document}          \begin{longtable}{c|p{6cm}p{4cm}p{4cm}}     \hline     Blub & Bla & Blip & Blop \\     Blub & Bla & Blip & Blop \\     \hline     \end{longtable}     \end{document}      Now, for whatever reason, I would like to center ONE cell of the second column. How would I achieve that?


title: "Same as above" representation

text: When I have a table, where one row has the same content as above, is there a representation for that in latex? In Germany we sometimes use `\------- " --------` to say that the line here is the same as above. So instead of having this:               | title | description          |     | Bla   | no description       |     | Blubb | no description       |     | Blop  | no description       |     | Blip  | no description       |      Have something like this:               | title | description          |     | Bla   | no description       |     | Blubb | ---------"---------- |     | Blop  | ---------"---------- |     | Blip  | ---------"---------- |      Maybe not with the dashed line, but a straight line. Is there a command for that or any other way to say that one line is above the other, without writing "see above"? Forgot to mention: I use the `longtable` environment. My column types are `{c|lp{4cm}p{4cm}}`


title: How to change the numbering style of theorems based on the section number using amsthm?

text: I am using amsthm for theorems, propositions, and so on. But I altered the section numbering style so that it's '§1 First Section', hence my theorems are numbered (since I base them on sections) 'Proposition §1.1' or similar. How can I change this behaviour to just the numbers without '§', but also without having to change my sectioning style again?               \documentclass[a4paper,10pt]{scrreprt}     \usepackage{amsmath,amsthm}          \addtokomafont{sectioning}{\rmfamily}     \renewcommand{\thesection}{\S\arabic{section}}          \newtheorem{prop}{Proposition}[section]          \begin{document}     \chapter{Prerequisites}     \section{First Section}     \begin{prop}     Blub     \end{prop}     \end{document}      Thank you very much in advance!


title: Indenting First Paragraph in a List

text: I have an `enumerate` environment and each item contains several paragraphs. Normally, none of the paragraphs are indented, but using the `enumitem` package, I can set the `listparindent` to make all but the first paragraph indented. Neither using the `indentfirst` package nor using `\indent` before the first paragraph indents it. How can I also indent the first paragraph in each item?                   \documentclass[12pt]{article}         \usepackage{enumitem}         \usepackage{indentfirst}                   \begin{document}         \begin{enumerate}[listparindent=\parindent,parsep=0pt]         \item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum      eu ligula ut lacus condimentum pellentesque id ut urna. Class aptent taciti      sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.      Praesent rhoncus vulputate leo at rutrum. Maecenas bibendum massa nec risus      elementum volutpat. Duis dolor mi, facilisis ut accumsan consequat, fermentum      vel orci. Nam sagittis, elit et hendrerit pellentesque, sem sapien interdum      nunc, a convallis turpis erat nec turpis. Integer sed tortor tellus, id mollis      diam. Nullam a turpis eu lorem sagittis congue nec vitae ligula. Integer tempus      varius iaculis.              Fusce nec augue sit amet ante hendrerit convallis eu ac enim. Aliquam in      justo id erat hendrerit porta semper a ante. Mauris a elementum tellus. Proin      facilisis lacus a nunc semper malesuada. Duis quis augue est, ut posuere      turpis. Nam lobortis dui vel odio dignissim ultricies. Curabitur sapien urna,      ornare non pulvinar sed, vehicula at sapien. Sed velit sapien, tincidunt in      eleifend ut, malesuada feugiat nulla. Quisque in sapien non odio blandit      porttitor id id mi.          \item               Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu      ligula ut lacus condimentum pellentesque id ut urna. Class aptent taciti      sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.      Praesent rhoncus vulputate leo at rutrum. Maecenas bibendum massa nec risus      elementum volutpat. Duis dolor mi, facilisis ut accumsan consequat, fermentum      vel orci. Nam sagittis, elit et hendrerit pellentesque, sem sapien interdum      nunc, a convallis turpis erat nec turpis. Integer sed tortor tellus, id mollis      diam. Nullam a turpis eu lorem sagittis congue nec vitae ligula. Integer tempus      varius iaculis.              Fusce nec augue sit amet ante hendrerit convallis eu ac enim. Aliquam in      justo id erat hendrerit porta semper a ante. Mauris a elementum tellus. Proin      facilisis lacus a nunc semper malesuada. Duis quis augue est, ut posuere      turpis. Nam lobortis dui vel odio dignissim ultricies. Curabitur sapien urna,      ornare non pulvinar sed, vehicula at sapien. Sed velit sapien, tincidunt in      eleifend ut, malesuada feugiat nulla. Quisque in sapien non odio blandit      porttitor id id mi.               \end{enumerate}         \end{document}      ![Resulting output](http://i.stack.imgur.com/2J8iL.png) I want the first paragraph in each item to also be indented.


title: Cannot find ecrm1095.mf

text: The TeXLive 2014 was installed as I usually install them: Selected ADVANCED, then selected the collections   * Essential programs and files   * Generic recommended   * LaTeX recommended   * Windows only   * Graphics and pictures   * Graphics and font utilities Having done that, I tried one of my standard latex files and got the error message below. I understand it to be a missing font. In TeXLive 2013 no error message appeared. Could anyone tell how I can add what is missing? Hewe is what pdflatex tells me: kpathsea: Running mktexmf tcrm1095.mf The command name is C:\sys\texlive\bin\win32\mktexmf name = tcrm1095, rootname = tcrm, pointsize = 1095 mktexmf: empty or non-existent rootfile! Cannot find tcrm1095.mf. kpathsea: Appending font creation commands to missfont.log. ! Font TS1/cmr/m/n/10.95=tcrm1095 at 10.95pt not loadable: Metric (TFM) file no t found. relax l.159 \item C                          urved elements are shown with flat faces. This is found from ...


title: Two different scales on stacked barplot

text: What I want to plot I'd like to plot several stacked xbar plots where each bar plot contains two values. The total from each xbar-plot is based on one unit, i.e. the smallest bar represents "1" while the other are a multiple from this plot, e.g. 2 or 2.5 etc.   The two values per stacked plot are then percentages, i.e. 80% and 20%. The problem On the X axis I want the scale from 0 to the max value with one axis for all plots. On each stacked plot I want to plot a scale ranging from 0% to 100%. The problem is: I can either plot only the absolute value on the X-axis or have the percentages per bar plot but not a mixture. I want to know if there is a way to set something like a local coordinate system for each bar-plot. Or any hint to set the min and max value for the scale of a bar-plot. Or, a way hoe I can multiply the ticks from the percentages by the scaling factor. My code so far:               %% my preamble         \documentclass[11pt, a4paper]{article}     \usepackage{pgfplots}                     \pgfplotsset{compat=1.5.1}         \usepackage{tikz}         \usetikzlibrary{decorations.pathreplacing,                                  calc,                                  matrix,                                  positioning,                                 pgfplots.dateplot,                                 shapes.geometric,                                 shapes.misc,                                 shapes.arrows,                                 shapes.symbols                                }          \begin{tikzpicture}        \pgfplotsset{          every linear axis/.append style =          {          width = 3cm,          font = \scriptsize,           %scale only axis  %% uncommenting this results scales percentage over                              %% absolute value: not desired         },         stacked/.style =          {          xbar stacked,          bar width   = 5pt,         axis y line = none,         xmin =  0,          xmax = 40, %% largest value, needed to set absolute max         scale only axis  %% commenting this results in too short percentage                            %% scales         },         percent/.style =          {         xmin =   1,         ymin =   0,         ymax =   1,         axis y line  = none,         axis x line* = top,         yshift = 0.5cm,         }        }              \begin{scope}[yshift = 4.75cm, xshift = 7cm]          \begin{axis}[stacked, axis x line = none]              \addplot coordinates { (14.45, 0) };                \addplot coordinates { ( 2.55, 0) };            \end{axis}               \begin{axis}            [percent, xmax = 17,             x coord trafo/.code= %% routine to transform absolute values into                                   %% percentages             {              \pgfmathparse{#1 / 17 * 100}             }]           \end{axis}         \end{scope}               %% almost the same as above. However, using the last entry to plot           %% absolute X-axis         \begin{scope}[yshift = 2.5cm, xshift = 7cm]            \begin{axis}[stacked, xmax = 40, axis x line* = bottom]              \addplot coordinates{ (32, 0) };                \addplot coordinates{ ( 8, 0) };            \end{axis}            \begin{axis}[percent, xmax = 40,             x coord trafo/.code=             {              \pgfmathparse{#1 / 40 * 100}             }]          \end{axis}         \end{scope}


title: Circuitikz inverter bubble

text: I'm using `circuitikz` to create some logic gate diagrams. In my course we use "inversion bubbles" as a convenient shortcut instead of drawing inverters everywhere. As in inputs A and B in this image: ![enter image description here](http://i.stack.imgur.com/2t0OJ.png) Is it possible to create these bubbles using `circuitikz`? It's not in the documentation.


title: Comprehensive list of TikZ style options?

text: I'm aware that one can use `\tikzstyle{every label}=[...]` to apply styles to every label within a `tikzpicture`; or `\tikzset{mystyle/.style={...}}` to apply style specs to a specific type of node `mystyle` (from this answer); however, I'm having trouble finding style specs that meet my needs, mostly because I don't know what types of options are valid Ti _k_ Z and what aren't. For example, I wanted the labels `x`, `y`, and `z` in the take-grant diagram below to be in bold roman type, but not the labels on the edges. It turned out that adding the `\tikzstyle{every label}=[font=\bfseries]` was what I needed, but it took a lot of mostly fruitless searching before I found that. Is there a **concise resource** which lists all of the style specs one can use? More generally, although the Ti _k_ Z manual gives lots of thorough examples of using options for nodes, paths, and styles, it does not appear to be comprehensive. Am I missing something? Are there **better resources for enumerating options in general?**               \documentclass{article}     \usepackage[utf8]{inputenc}          \usepackage{tikz}         \usetikzlibrary{arrows,topaths}          \begin{document}          \begin{tikzpicture}[>=stealth',semithick,auto]         \tikzstyle{subj} = [circle, minimum width=8pt, fill, inner sep=0pt]         \tikzstyle{obj}  = [circle, minimum width=8pt, draw, inner sep=0pt]         \tikzstyle{dc}   = [circle, minimum width=8pt, draw, inner sep=0pt, path picture={\draw (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);}]              \tikzstyle{every label}=[font=\bfseries]              % Before diagram .........................         \node[obj,  label=below:x] (xa) at (0,0) {};         \node[subj, label=below:z] (za) at (1,0) {};         \node[dc,   label=below:y] (ya) at (2,0) {};              \path[->]   (za)    edge                node[swap]  {$t$}       (xa)                             edge                node        {$\alpha$}  (ya);              \node at (3,0) {$\vdash^{*}$};              % After diagram .........................         \node[obj,  label=below:x] (xb) at (4,0) {};         \node[subj, label=below:z] (zb) at (5,0) {};         \node[dc,   label=below:y] (yb) at (6,0) {};              \path[->]   (zb)    edge                node[swap]  {$t$}       (xb)                             edge                node        {$\alpha$}  (yb)                     (xb)    edge[bend left=60]  node        {$\alpha$}  (yb);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/G5eWb.png)


title: marginfix and letter class

text: One of the things I like about the `letter` class is that it vertically centers 1 page letters on the page. I recently discovered the `marginfix` package, but it seems to prevent the centering behavior.               \documentclass{letter}     \usepackage{lipsum}     \usepackage{marginfix}     \begin{document}         \begin{letter}{}         I like to use marginals for editing notes.\marginpar{FIX THIS}                  \lipsum[1-2]         \end{letter}     \end{document}      The letter is not vertically centered when `marginfix` is used. I can get the centering back with `\def\MFX@attachmargin{}`, but I am pretty sure that defeats the purpose of loading `marginfix`. Is there a way to make `marginfix` and vertical centering compatible?


title: Creating a very flexible TOC with beamer

text: To manage TOC in bearmer I normally use these codes:               \AtBeginSection[]{     \frame<beamer>{      \frametitle{Table of Contents}        \tableofcontents[currentsection,subsections]       }       }     \begin{frame}{Table of Contents}     \pdfbookmark[0]{Contents}{toc}     \tableofcontents{}     \end{frame}      I came across this presentation. This have TOC for sections only in two columns and then at the start of each section it has TOC for the section and subsections (please have a look on this nice presentation). I wonder how to get such TOC and and color scheme for this WARSAW theme. Thanks in advance. **EDIT** I found that to get this beamer theme this code was used:               \documentclass[compress]{beamer}     \mode<presentation>     {      \usetheme{Warsaw}     }


title: how to enforce correct hyphenation of "(near-)uniform" as "(near-)" + "uniform" instead of "(near-" +  ")uniform"?

text: how to enforce correct hyphenation of `(near-)uniform` as `(near-)` `uniform` instead of `(near-` `)uniform`?


title: Version Control with GIT for Tex / Latex Files in One repository or split to sep. repos

text: I am looking up at setting up version control for my latex documents. I was wondering people's typical setup for this. Do they set it up in there top folder or individual projects. I will be using GIT. Specifically can you start a new project that is in a seperate repo (but the same folder as the original GIT) and then merge it into the master branch easily. This would also be useful.


title: Reference to figure label in adjustbox

text: \begin{figure}      \begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption[bla]     {%     bla ..., fig. \protect\ref{fig:fig1}, ...bla.       }     \end{minipage}}}     \includegraphics[scale=1]{figure.png}     \end{adjustbox}     \label{fig:fig2}     \end{figure}      For some reason the referencing to `\ref{fig.fig1}` does not work inside the caption of `fig.2`


title: How to add custom floats to \listoffigures?

text: I created custom float objects using the `float` package to draw stuff with `tikz`.               \usepackage{float}      \floatstyle{plain}      \newfloat{tkizfloat}{htb}{lof}      \floatname{tkizfloat}{Figure}      Is there any way of adding custom floats like this one created above to the `\listoffigures` without messing up the existing one? And how to ensure that the custom float objects are counted the same way like normal figure objects, like that:               1.1 Example 1 (figure)     1.2 Example 2 (figure)     1.3 Example 3 (tikzfloat)     1.4 Example 4 (figure)      I'm currently adding them simply to the `lof`-file but that's a complete mess. Just see the screenshot below to understand the problems explained above. ![screenshot explaining the issue](http://i.stack.imgur.com/UwzMB.png) Minimal working example for the screenshot above:               \documentclass{report}     \usepackage[english]{babel}     \usepackage{float}      \floatstyle{plain}      \newfloat{tkizfloat}{htb}{lof}      \floatname{tkizfloat}{Figure}     \usepackage{environ}     \usepackage{tikz}      \NewEnviron{elaboration}{       \par       \begin{tikzpicture}        \node[rectangle,minimum width=0.4\textwidth] (m)        {\begin{minipage}{0.5\textwidth}\BODY\end{minipage}};        \draw[dashed] (m.south west) rectangle (m.north east);       \end{tikzpicture} }      \usetikzlibrary{plotmarks}          \begin{document}      \listoffigures           \begin{tkizfloat}       \centering       \begin{tikzpicture}[y=4cm, x=.5cm,font=\sffamily]        \draw (0,0) -- coordinate (x axis mid) (20,0);        \draw (0,0) -- coordinate (y axis mid) (0,1);       \end{tikzpicture}       \caption{Some Chart}       \label{tkiz:example}      \end{tkizfloat}           \begin{figure}[htb]       \centering       \includegraphics[width=0.5\textwidth]{example.png}       \caption{Some Image}       \label{img:example}      \end{figure}     \end{document}


title: Rowcolors and tabularx: Colors not reset in each new table

text: I'm having an issue with `rowcolors` from the `xcolor` package. Whenever I use `rowcolors` before a table, it seems that the row counter does not reset with each `tabularx` environment. I read that `rowcolors` uses the `rownum` counter internally, and I tried resetting this with `\global\rownum=1`, but unfortunately this does not seem to work. I am basically just trying to alter all my tabularx environments to be colored:               \definecolor{table-shade}{gray}{0.9}     \let\oldtabularx\tabularx     \let\endoldtabularx\endtabularx     \renewenvironment{tabularx}{\table\rowcolors{1}{white}{table-shade}\oldtabularx}{\endoldtabularx\endtable}      I'd welcome any suggestions, and thanks for your help.


title: How to alternately shade rows in a table

text: I'm having trouble finding anything that will work with this checklist table that I have set up. I was hoping someone might have some suggestions.               \usepackage{colortbl}          \begin{center}     {\renewcommand{\arraystretch}{1.3}%     \begin{tabular}{ | m{5cm} | c | l | l |l |l |l |}     \hline     Checklist & Agency #1 & Agency #2 & Agency #3 & Agency #4 &  Agency #5 \\ \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\      \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\      \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\     \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\     \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\     \hline     List Item. & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} & \hspace{1.3 cm} \\     \hline     \end{tabular}     \end{center}


title: How to apply alternate row coloring in a longtable in LyX?

text: In attempting to apply an alternate table row coloring (using `xcolor`) in a `longtable`, one confronts, sooner or later, problems in compiling a PDF. In `xcolor`'s documentation it is clearly stated, under _Known Issues_ , that **`\rowcolors[\hline]...` does not work with longtable**. Within tex.SE, various solutions address the issue of alternate row coloring of _normal_ tables, i.e. How to create alternating rows in a table? A nice way for auto-alternate row-coloring every table is posted at Coloring every alternate table row (see _Addendum_ in the end of the post). However, there is no direct question & answer referring to the combined use of `xcolor`'s `\rowcolors` command & `longtable`. Moreover, searching the web for work-arounds, at least one solution, involves the use of longtable and colortbl. Is there a way to use, within LyX, the `\rowcolors` (set of) command(s) provided by `xcolor` within `longtable`?


title: Why can the labelsep of \uput not work when represented in RPN?

text: In order to be more noticeable, I present my comment as a new question here. ## Background: `\uput` with the following syntax ![enter image description here](http://i.stack.imgur.com/j5gZG.png) accept 5 arguments. I have tested the last four arguments that they can be represented in RPN. The first argument is the only one cannot be represented in RPN. ## Question: Why can the first argument of `\uput` not be represented in RPN? Is it a bug? You can try `\uput{! 2 sqrt}[!0]{!0}(!0 0){Hello World}` to put `Hello World` `\sqrt{2}` unit length away to the right of the origin `(0,0)`, but it fails.


title: Centring a heading, including the numbering

text: I've got a problem that should be simple to fix. I'm using the fontspec to layout my chapter headings like so               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[oneside,a4paper,10pt]{book}     \usepackage{titlesec}     \usepackage[utf8x]{inputenc}     \usepackage{fontspec}     \titleformat{\chapter}[hang]       {\normalfont\fontsize{25}{30}\bfseries\centering \fontspec{Times New Roman}}}       {\chaptertitlename\ \thechapter:\space }{0pt}       {}[]        \begin{document}        \chapter{The Road In The Wood}             \end{document}      and for the most part it works just as I want. There is however one slight issue, some of my chapter headings run onto two lines - that's fine. However instead of centring the the second line properly it's placed towards the right of the page. I believe what it's doing is centring as though the page begins just after the "Chapter 1" part of the heading. Is there a way to tell it to center based on the whole page?


title: How to input b with stroke?

text: I want to use the symbol ƀ (b with stroke) in my document. I use it for the blank symbol in the formal definition of Turing machines. I use XeLaTeX, so I should be able to use the Unicode symbol, but I don't know how to enable the font for it in math mode. Right now, I use the following, which works, but is quite ugly:               \newcommand{\blank}{\raisebox{0.8ex}{-}\kern-0.4em b}      What do I need to do in order to use the Unicode character in my document?


title: error occurs when comma separated affiliation in revtex4-1 if breqn is loaded

text: I encountered an error trying to use the breqn package. First, the below snippet compiles fine without any problem.               \documentclass[aps,prl,twocolumn,floatfix]{revtex4-1}     \usepackage{breqn}     \begin{document}          \title[]{Title}     \author{Name~GivenName}     \affiliation{Department}     \maketitle     ABC     \end{document}      However, if I add more contents to the affiliation (with comma), namely `\affiliation{Department}` to `\affiliation{Department, University}`. It does not compile now. Why and how can I fix it? I am using Texlive2013, updated up to date.


title: How to change the fontsize of the Greek letters in formula?

text: \documentclass[20pt]{beamer}       \geometry{ papersize = {27cm, 21cm}}        \usepackage[english]{babel}        \usepackage{mathrsfs, booktabs, multirow}        \usepackage{amsmath}        \usetheme{Darmstadt}            \begin{document}       \begin{frame}        \frametitle{Maxwell Equation}\linespread{0.5}            \huge            \begin{equation}       \vec A = \frac{\mu}{4\pi }\int_V {\frac{{\vec J(\vec x')dV'}}{r}}        \end{equation}       \begin{equation}       \nabla \cdot \vec D =\rho       \end{equation}       \end{frame}       \end{document}        I know the problem is relevant to the `\huge`. The Latin letters and the Greek letters do not increase in the same scale, but how to solve it?


title: beamerarticle not defining \inserttitle and co

text: I'm trying to make some notes for my beamer slides, using the `article` class and `beamerarticle`. However, some of the commands I use in my slides --- specifically, the ones that insert previously set values (`\inserttitle`, `\insertauthor`, `\secname`) seem to be missing when using `beamerarticle`. I've looked briefly at the `beamerbasearticle.sty` and `beamerbasetitle.sty` files (which are being included properly as far as I can tell), but my tex-fu is not strong enough to glean much useful information, except in so far as it appears that the commands I want should be working fine... Are there some commands I can use to help track this down? (e.g., to confirm that `\inserttitle` is not defined) Using pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) `slide-notes.tex`:               \documentclass[a4paper]{article}     \usepackage{beamerarticle}     \usepackage{fullpage}          \usepackage{graphicx}     \DeclareGraphicsExtensions{.pdf,.png,.jpg}     \graphicspath{{../media-inc/}}          \include{tex/util}     \input{tex/presentation}      Start of `tex/presentation.tex`:               \newcommand{\pubdate}{January 2011}     \newcommand{\reviewtitle}{Monocular Visual SLAM on a Micro Air Vehicle}     \newcommand{\authorname}{John Bartholomew}          \title{\reviewtitle}     \titlegraphic{\includegraphics[height=20mm]{MAV-side}}     \author[\authorname]{\authorname}     \institute[UoB]{University of Bristol}     \date{\pubdate}          \begin{document}          \begin{frame}[plain]     \begin{center}     \inserttitlegraphic\\[6mm]     \inserttitle\\[8mm]     \insertauthor     \end{center}     \end{frame}      pdflatex output is:               pdflatex -file-line-error-style -halt-on-error slide-notes     This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)      restricted \write18 enabled.     entering extended mode     (./slide-notes.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     (/usr/share/texmf/tex/latex/beamer/base/beamerarticle.sty     (/usr/share/texmf/tex/latex/beamer/base/beamerbasercs.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasemodes.sty     (/usr/share/texmf/tex/latex/beamer/base/beamerbasedecode.sty))     (/usr/share/texmf/tex/latex/beamer/base/beamerbasearticle.sty     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseoptions.sty)     (/usr/share/texmf/tex/latex/xcolor/xcolor.sty     (/etc/texmf/tex/latex/config/color.cfg)     (/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))     (/usr/share/texmf/tex/latex/beamer/base/beamerbasecompatibility.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasefont.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasemisc.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasetwoscreens.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseoverlay.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasetitle.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasesection.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseframe.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseverbatim.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseframesize.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseframecomponents.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasecolor.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasenotes.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasetoc.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasetemplates.sty     (/usr/share/texmf/tex/latex/beamer/base/beamerbaseauxtemplates.sty))     (/usr/share/texmf/tex/latex/beamer/base/beamerbaselocalstructure.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasenavigation.sty)     (/usr/share/texmf/tex/latex/beamer/base/beamerbasetheorems.sty     (/usr/share/texmf-texlive/tex/latex/translator/translator.sty     (/usr/share/texmf-texlive/tex/latex/translator/translator-language-mappings.tex     )) (/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty     (/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty))     (/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty)     (/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty))     (/usr/share/texmf-texlive/tex/latex/amscls/amsthm.sty))     (/usr/share/texmf/tex/latex/beamer/base/beamerbasethemes.sty)))     (/usr/share/texmf-texlive/tex/latex/preprint/fullpage.sty)     (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty     (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty     (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)     (/etc/texmf/tex/latex/config/graphics.cfg)))     \@input{tex/util.aux}     (./tex/util.tex) (./tex/presentation.tex (./slide-notes.aux)     (/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )     (/usr/share/texmf-texlive/tex/latex/translator/translator-theorem-dictionary-En     glish.dict) <../media-inc/MAV-side.pdf, id=1, 455.10695pt x 257.53128pt>     <use ../media-inc/MAV-side.pdf>     ./tex/presentation.tex:17: Undefined control sequence.     l.17 \inserttitle                      \\[8mm]     ./tex/presentation.tex:17:  ==> Fatal error occurred, no output PDF file produc     ed!     Transcript written on slide-notes.log.     make: *** [slides] Error 1


title: Starting point of arrows in tikzpicture

text: I am new to drawing a block diagram using tikzpicture. The following MWE               \documentclass[a4paper,11pt]{article}          \usepackage{amsmath}     \usepackage{tikz} %http://www.texample.net/tikz/examples/control-system-principles/     \usetikzlibrary{shapes,arrows}     \tikzstyle{block} = [draw, fill=blue!20, rectangle,      minimum height=3em, minimum width=6em]     \tikzstyle{sum} = [draw, fill=blue!20, circle, node distance=1cm]     \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]     \tikzstyle{pinstyle} = [pin edge={to-,thin,black}]          \begin{document}     \begin{tikzpicture}[auto, node distance=2cm,>=latex']     % We start by placing the blocks     \node [input, name=input] {};     \node [sum, right of=input, name=sum] (sum) {};     \node [block, right of=sum,label=below:controller] (controller) {?};     \node [sum, right of=controller,node distance=2cm,pin={[pinstyle]above:$D(s)$}] (sum2) {};     \node [block, right of=sum2,node distance=2cm,label=below:process dynamics] (system) {$\dfrac{32}{s(s+4)(s+16)}$};     % We draw an edge between the controller and system block to      % calculate the coordinate u. We need it to place the measurement block.      \draw [->] (controller) -- node[name=u] {} (system);     \node [output, right of=system] (output) {};     \node [block, below of=u,label=below:sensor] (measurements) {1};     % Once the nodes are placed, connecting them is easy.      \draw [draw,->] (input) -- node {$\varphi_d$} (sum);     \draw [->] (sum) -- node {} (controller);     \draw [->] (controller) -- node {} (sum2);     \draw [->] (sum2) -- node {} (system);     \draw [->] (system) -- node [name=y] {$\varphi$}(output);     \draw [->] (y) |- (measurements);     \draw [->] (measurements) -| node[pos=0.99] {\tiny $-$}          node [near end] {} (sum);     \end{tikzpicture}     \end{document}      yields ![Block diagram](http://i.stack.imgur.com/0cj5n.png) How can I let the arrow connecting the second sum tot the block 'process dynamics' start on the right side of the sum, rather than on the left side (see orange arrow)?


title: Percent signs - "comment" and "active" both at once?

text: I convert documents from Word a lot, and I often forget to escape `%`, which leads to pieces of text missing. So I would like the following to happen in the main document body:   * escaped `\%` working as expected;   * single `%` causing an error;   * double `%%` behaving like a comment. Do you think this is possible to do? I think it can be done by making `%` catcode `active` and chanking if the next one is `%` as well based on this changing it to `comment` for the rest of the line. Starting point / MWE:               \documentclass{article}          \usepackage{lipsum}          %\usepackage{lipsum} % should cause no error          \begin{document}          Hello!          I use to forget to escape up to 70 % of my percent-signs, which causes missing ends of sentences. So I would like this to cause error.          %% On the other hand, sometimes I really need to make a comment, so I want to use a double-percent-sign for that.          And of course, the 30 \% of escaped percent-signs should work correctly.          \lipsum          \end{document}


title: Is there a vertical \mapsto symbol?

text: What is the TeX code for a vertical `\mapsto` symbol? I've looked but can't find it. I'm drawing a commutative diagram, and I want to draw what a specific symbol is being mapped to as well, so I am doing this on the label of the vertical arrow, by adjusting the position of the elements of the label. The rest has worked fine, all I need is a vertical `\mapsto` symbol. The best I can do at the moment is to use `\downarrow` and put a hyphen slightly above, but that doesn't look great.               \usepackage[all]{xy}           \xymatrix{       0 \ar[r] &        A_{n+1} \ar[r] \ar[d] &       B_{n+1} \ar[r] \ar[d] &       C_{n+1} \ar[r] \ar[d] &       0 \ar[d]       \\       &       A_n \ar[r] \ar[d] &       B_n \ar[r] \ar[d]^(0.25){b}^(0.6){d_{n}} &       C_n \ar[r]^{g_n} \ar[d]_(0.3){c}_(0.44){ \; \; - }_{ \downarrow}_(0.7){0} &       0 \ar[d]       \\       &       A_{n-1} \ar[r]^(0.2){a} &       B_{n-1} \ar[r]^{f_{n-1}} &       C_{n-1} \ar[r] & 0     }


title: How to install (automatically) a new document class in Texmaker through MiKTeX?

text: I am trying to install a new document class style in Texmaker for a scientific journal. There is any direct way to install on Texmaker? This post discusses How can I manually install a package on MiKTeX (Windows)?, but I want to know if MiKTeX could update (automatically) document class, or is just able to update packages?


title: Overlap of section and chapter name in the header

text: In the header of the book I'm writing using Latex, the Chapter name and a Section name are overlapping due to the large number of characters. For instance, in the final pdf file, the header is "2.1. Application of the classical approach Chapter 2. Efficient Initializations to..." Note that by header I assume the text that is displayed at each page above the main text. Obviously, the both the Section name and Chapter name cannot fit one page. How could I specify that I only need "Chapter 2" to be written after the section name in the header? The main file looks like:               \documentclass[a4paper,12pt]{book}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{url}     \usepackage[algoruled,vlined]{algorithm2e}     \documentclass[a4paper,12pt]{book}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{url}     \usepackage[algoruled,vlined]{algorithm2e}     \usepackage{graphicx,subfigure}     \usepackage{booktabs}     \usepackage[usenames,dvipsnames]{color}          \usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}          % fancy headers and footers     \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.1pt} % for upper line     \renewcommand{\footrulewidth}{0.1pt} % for lower line      \fancyhead[LE,RO]{\itshape \nouppercase \rightmark}\fancyhead[LO,RE]           {\itshape \nouppercase \leftmark}     \fancyfoot[C]{\thepage}           \usepackage[semicolon]{natbib}          \usepackage{fancybox}          \usepackage{xcolor}     \usepackage{framed}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \newenvironment{myfancybox}{%     \def\FrameCommand{\fboxsep=\FrameSep \fcolorbox{black}}%     \color{black}\MakeFramed {\FrameRestore}}%     {\endMakeFramed}               \usepackage{rotating}               \usepackage{sectsty}     \allsectionsfont{\itshape}          \setlength{\headheight}{15pt}          \parskip1ex     \begin{document}          \include{forTest}     \end{document}      In a document forTest.tex put               \chapter{sakdlf fsadfkjdls kfkjs dflasfj ihfowijif}     \label{ch:grid}          \section{adfafdfklkjsaf  fksajflls lasfjl sfjls flafj }      and then some arbitrary text that goes to the second page. On the second page you'll see an overlap at the top. So, I would only like "Chapter 1" to be written, without the chapter name.


title: Edit LaTeX source in LyX

text: I recently installed LyX 2.0.1 (2011-08-31). I have the option to display the LaTeX source. I have tried to modify this source (in the LyX tab) in order to get some changes in the LyX file and the pdf output but I couldn't. I want to modify the LaTeX source directly in LyX because sometimes LyX doesn't align the tables as I want or the spaces between the lines or even the list are not in the format I want. How can I do that?


title: Parenthesis while using subfig and autoref

text: I would like to use `subfig` while using the `autoref` package. I have added the line               \usepackage[listofformat=subparens,subrefformat=parens,labelformat=parens]{subfig}     \newcommand{\subfigureautorefname}{\figureautorefname}      to my master tex file. The purpose of adding these lines was to see _Figure 1(a)_ instead of _Figure 1a_ each time I reference a subfigure. I wish to see the parenthesis. The problem is if use `\autoref{fig:ABC}` instead of seeing _Figure 1(a)_ I see _Figure 1a_. However if I


title: Environment to allow line breaks at `,` in math mode

text: I find the question and accepted answer to Allowing line break at ',' in inline math mode? very useful, BUT I would like to make an environment (e.g. "allowbreaks"} out of it. The problem is that I'm not able. Let me explain the idea:               \begin{allowbreaks}     Commas are modified in such a way that they allow breaks in     inline mathmode $(a,b,c)$ only within this environment.     \end{allowbreaks}      Is it possible somehow, please? **edit:** I renamed the environment to `allowbreaks`, because of naming conflicts with the command `allowbreak`.