title: Increasing height of single row in table

text: > **Possible Duplicate:**   >  Column padding in tables I want to make a table where one column heading has superscript which overlaps with hline above it. How can I increase the height of just that row so that it does not overlap? I tried commands such as `\arraystretch`, but this increases the whole table which then looks odd in the document. The exact code is copied below (MWE).               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{table}[htbp]     \caption{Some values}     \begin{center}     {      %\renewcommand{\arraystretch}{1.35}     \begin{tabular}{|c|c|c||c|c|c|}     \hline     & \multicolumn{2}{c||}{L2 Unit} &  \multicolumn{3}{c|}{SUB} \\ \cline{2-6}       Unit & $E^{\text{Dyn}}_{\text{L2}}$&  $P^{\text{SUP}}_{\text{L2}}$ &  Number  &$E^{\text{Dyn}}_{\text{SUB}}$ &$P^{\text{SUP}}_{\text{SUB}}$ \\     Size & (unit) & (unit) &  ($N$) &(unit) & (unit) \\\hline     4MB& 0.289& 1.39 &2 & .005 &.006\\\hline     \end{tabular}     }     \end{center}     \end{table}     \end{document}


title: Remove chapter from header but page number stays intact

text: I want to remove the title of a chapter from the header, but the page number must stay intact. I'm using a the book class               \documentclass[11pt,a4paper,twoside,openright]{book}     \usepackage{lipsum}     \begin{document}     \chapter{Some title}     \lipsum     \end{document}      The script generates two pages. The second page contains a header, page number and title. Now I want to remove the title from that particular page. -edit- I found out that you can use `\thispagestyle{plain}`, however when I use this the page number, which is located at the top right, is then placed at the bottom.


title: Nicely force 66 characters per line

text: I would like to have "something" (a package, a trick, a macro, ...?) that makes it possible for me to nicely play with the margins (or the layout) in order to set the average or typical number of characters per line. Ideally, this "system" would help me keep this ratio (66, 2.5 alphabets, or any other number I choose/input) independent from changes in font families (such as with the use of the package pslatex or txfonts for example), in font sizes (with a 10pt or 12pt class option for example). I've looked around a bit, and I kind of understood, that using KOMA-Script classes or the memoir class may be part of a solution, be I would prefer not (especially because I have never used any so far). An important point for me is that the whole proportions or principles of the original layout must be kept. For example, if there was a set ratio between left and right margins, then, just playing around with one margin or with textwidth/linewidth would not satisfy me. Why I'd like to do this? Because I like to use the pslatex package, but this put the average number of charaters per line from about 65 without to about 75+ with. Note, I have already gone or skimmed through:   * Best ratios of number of letters per line and of number of lines per page   * Are there any good general typesetting books / references?   * http://www.tex.ac.uk/ctan/macros/latex/contrib/memoir/memman.pdf And, also there may be answers there, I couldn't (too easily) find them.


title: \textminus in tex4ht

text: Is there a way to make `tex4ht` aware of the `\textminus` command?               \documentclass{scrartcl}     \usepackage{textcomp}     \pagestyle{empty}          \begin{document}       \textminus 5     \end{document}      works as expected with `pdflatex` --- ![-5](http://i.stack.imgur.com/R2eGy.png) --- but creates a simple hyphen when converting to HTML using               mk4ht htlatex texput.tex "xhtml,bib-"      I'd like it to print a Unicode minus sign instead; I can print an em rule by saying               \def\textminus{--}      in the preamble, but I understand that an em rule is something different than a minus sign. The MWE is also at GitHub, use `make texput.html` after checking out the `tex4ht-textminus` branch to generate HTML output.


title: Left align text that is flushed right?

text: ![picture](http://s18.postimg.org/e8t45pk55/Untitled.png) I want the row kandidatnivå, 15 hp to be aligned to left with examensarbete nr. xxx. How do I solve this?               \begin{minipage}[t]{0.48\textwidth} \scriptsize     Institutionen för Fastigheter och Byggande\\     Civilingenjör Samhällsbyggnad\\     Fastighetsekonomi och fastighetsjuridik     \end{minipage}     \hfill     \begin{minipage}[t]{0.48\textwidth} \scriptsize     \begin{flushright}     Examensarbete  nr. xxx\\     Kandidatnivå, 15 hp     \end{flushright}     \end{minipage}


title: Vertical alignment in a tabular environment with asymptote image

text: In a tabular environment, I would like to align text vertically at the top of one cell while placing an Asymptote image in an adjacent cell. There are numerous posts on vertical alignment with images in a tabular environment with "normal" image placement using \includegraphics. See here for instance: Vertical alignment of text and figures in a table However, the two most commonly suggested techniques -- using \raisebox or \adjustbox -- don't seem to work with asymptote images. Here is a minimal example showing the effect I would like to get, and what actually happens when I use an asymptote image:               \documentclass{article}     \usepackage{mwe}     \usepackage{asymptote}          \begin{document}     \begin{tabular}{c c}     Text &     \raisebox{-.9\height}{\includegraphics[scale=0.25]{example-image}}          \\ Text &     \begin{asy}     import graph;     unitsize(1inch);     draw((0,0)--(1,0)--(1,1)--(0,1)--(0,0));     \end{asy}     \end{tabular}     \end{document}      Any idea how to get top-aligned text next to an asymptote image?


title: LaTeX beamer handout mode textpos

text: I'm using `beamer` with `textpos` to place certain blocks at particular positions (in particular, I use the `textblock*` environment). When I attempt to create a handout, the pieces of text within `textblock*` are moved into (what seems to me) random positions of the page. Any advice? Here is a small example:               \documentclass[t, handout]{beamer}          \usepackage[absolute,overlay]{textpos}          \usepackage{pgfpages}     \pgfpagesuselayout{4 on 1}[letterpaper, border shrink = 5mm, landscape]          \mode<presentation>{       \setbeamercovered{invisible}     }          \usetheme{Madrid}     \usecolortheme{beaver}          \title{Presentation Title}          \author{       A, B     }          \institute[Institute]{       The Institute     }          \date{September 5, 2012}          \setbeamertemplate{footline}[frame number]     \setbeamertemplate{navigation symbols}{}           \begin{document}          \begin{frame}       \titlepage     \end{frame}          \begin{frame}{Some title}       Some text     \end{frame}          \begin{frame}[center]{Part A}       \begin{textblock*}{300pt}(0.1\textwidth, 0.5\textheight)         \Large         \centering         This title should not appear at the first slide!       \end{textblock*}     \end{frame}          \end{document}


title: Automating error message references

text: I'm writing a book which will include error messages and codes from a strange computer system. What I need to do is this: Maintain a list of error message codes: > `ABC0000T` For each code, have a sample message text: > `ABC0000T Badgers detected - code` _xx_ And a descriptive text: > If the current daily badger access code doesn't match _xx_ , badger access > control has failed and you should call out support immediately. > > If the code is **99** , then these are zombie badgers and you should fly for > your life. The way I see this working is this: at some point in the book (probably an appendix), all this stuff is printed, probably in alphabetical order of message code (though I _may_ need to split things into two or three sections/groups. In the body of the book, I write turgid stuff like: > If any problems occur with badger access, message `ABC0000T` is issued and > the system halts. where the message text is also a hyperlink into the messages appendix. Here's the question: I _think_ the `glossaries` package is probably up to this, but before I start investing time, can you provide better suggestions? Improvements to the title and the tagging (or indeed, anywhere) are cordially invited.


title: Glossary style long but without the indentation before the notations

text: I want to do a nomenclature list using the glossaries package. I like the print style "long", however, I would prefer if it didn't have the large indentation to the left and it also would be great if it had three columns so I could have the first column for the notation, second column for units and third for description. Minimal example of my code:               \documentclass[12pt,a4paper]{report}          \usepackage{amsmath}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage[acronym,toc,nopostdot]{glossaries}          \hypersetup{       colorlinks   = true, %Colours links instead of ugly boxes       urlcolor     = black, %Colour for external hyperlinks       linkcolor    = black, %Colour of internal links       citecolor   = black %Colour of citations     }          \newglossaryentry{resonance_angular_frequency}{       name = $\omega_0$ ,       description = [rad/s] - The angular frequency at which the imaginary part of an impedance is zero     }     \newglossaryentry{coil}{       name = $W_i$ ,       description = The coils in the magnetic circuit where 1 denotes the primary side and 2 denotes the secondary side.     }     \newglossaryentry{electric_field}{       name = $\vec{E}$ ,       description = [V/m] - Electric field     }     \newglossaryentry{magnetic_flux_density}{       name = $\vec{B}$ ,       description = [T] - Magnetic flux density     }          \makeglossaries          \glsaddall          \printglossary[nonumberlist, style = long, title=Nomenclature]          \end{document}      Is there a way of adjusting the glossary style "long" the way I want to? EDIT: In case you want to see what it looks like right now using the "long" style: ![](http://imgur.com/BArlGKQ.png)


title: Multicolumn overrules rowcolors

text: I am trying to create a table with alternating rowcolors. This works fine in itself with a command like:               \rowcolors{1}{gray!20}{white}      However, from here it gets a bit more complex. Since the last line of my table need 6 columns, I need to use the `\multicolumn` comment, which causes all multicolumn parts _to not inherit_ the color as specified by the `\rowcolors` command. Code example:               \begin{table}[!ht]     \rowcolors{1}{gray!20}{white}     \begin{tabular}{|p{0.184\linewidth}|p{0.452\linewidth}*{4}{|c}|}\hline     \bf{Item} & \multicolumn{5}{l|}{\bf{Description}}\\ \hline     \bf{Goal} & \multicolumn{5}{l|}{Goal of this}\\ \hline     \bf{Procedure} & \multicolumn{5}{l|}{How to do it}\\ \hline     \bf{Specification} & \multicolumn{5}{l|}{Think of this and that while doing this} \\ \hline     \bf{Comments} & & \bf{Pass} & \bf{Fail} & \bf{Pass} & \bf{Fail}\\ \cline{3-6}     & & $\circ$ & $\circ$ & $\circ$ & $\circ$\\ \hline     \end{tabular}     \end{table}      Specifying the `\multicolumn` color like:               \multicolumn{5}{>{\columncolor{gray!20}{some text here}}l|}{}      would force the multicolumn color, however I require the `{gray!20}` part to be inherited from the `\rowcolors` command for that row.


title: BibLaTeX: allowing a line break between citations for the same year in authordate-comp

text: I am using BibLaTeX, with the `authordate-comp` style. I have one citation where I cite seven citations for the same author for the same year, using `\parencite`. This results in a citation like (Author, 2000a,b,c,d,e,f,g), which is what I want. However, the citation falls near the end of a line, and there are apparently no line breaks allowed between the letters representing the multiple citations (where the commas are), and this results in the citation running into the margin. Here is a MWE:               \documentclass[12pt]{report}     \usepackage[left=1.5in, top=1.3in, right=1.3in, bottom=1.2in]{geometry}     \usepackage[style=authoryear-comp,backend=bibtex8]{biblatex}          \usepackage{filecontents}     \begin{filecontents*}{MWE.bib}     @misc{a1,       author = {Author},       title = {title1},       date = {2000},     }     @misc{a2,       author = {Author},       title = {title2},       date = {2000},     }     @misc{a3,       author = {Author},       title = {title3},       date = {2000},     }     @misc{a4,       author = {Author},       title = {title4},       date = {2000},     }     @misc{a5,       author = {Author},       title = {title5},       date = {2000},     }     @misc{a6,       author = {Author},       title = {title6},       date = {2000},     }     @misc{a7,       author = {Author},       title = {title7},       date = {2000},     }     \end{filecontents*}          \addbibresource{MWE.bib}          \begin{document}     This citation has many works by one author from one year     \parencite{a1,a2,a3,a4,a5,a6,a7}. As you can see, the      letters for repeated citations stick into the margin,      and an ``Overfull /hbox'' warning is produced.     \end{document} How can I make `authordate-comp` allow line breaks after the commas in the citation? I have already thought of "rewrite the text so that the citation doesn't occur near the end of a line" and "just write the citation out by hand instead of using `\parencite`", but I'd like a more robust answer.


title: Editing texmf.cnf to avoid "TeX capacity exceeded" error

text: I'm getting the "TeX capacity exceeded" which seems to be a common issue, and I've been trying to edit my texmf.cnf file to fix it but it's locked on my computer which is a mac running OS X Maverick. I accessed the file my going into Terminal and typing:               open -a TextEdit /usr/local/texlive/2013/texmf.cnf      I also tried:               sudo open -a TextEdit /usr/local/texlive/2013/texmf.cnf      I'm having the same issue when I open the `/usr/local/texlive/2013/texmf- dist/web2c/texmf.cnf` file. This may be a general computer question, but I think the lock was done by the software.


title: How to write multiple line caption with figure

text: How to split a long figure caption to multiple line? Using '\' doesn't work.               \begin{figure}[H]     \includegraphics[width=1\textwidth]{x.jpg}      \caption{line 1.....       line 2......       line 3 ....}      \label{fig1}     \end{figure}


title: How to rename a command for a symbol

text: I'm using the symbol `int` for the interior of the topological space and `Int` for the interior of a closed manifold in Rn. But `\int` is the built-in command for the 'integral' symbol. How can I rename the integral symbol to `\intgrl`? At this moment, I have:               \def\int{\mathrm{int}}     \def\Int{\mathrm{Int}}


title: Spanning a cell across several rows in TikZ-matrix

text: Using the `matrix`-library of TikZ I am producing the following image: ![current layout](http://i.stack.imgur.com/fKdUN.jpg)               \documentclass[tikz]{standalone}     \usetikzlibrary{matrix}          \begin{document}          \begin{tikzpicture}[auto, node distance=2cm,font=\small,         every node/.style={inner sep=0pt,rectangle, minimum height=2.5em, text centered},         comp/.style={draw,very thick,text width=2.5cm,fill=blue!10},         crit/.style={draw,text width=2cm}]     \matrix [ampersand replacement=\&,column sep=1.5mm, row sep=3mm]     {     \node [comp] {Category\\One}; \&     \node [crit] {Attribute\\One}; \&     \node [crit] {Attribute\\Two}; \&     \\     \node [comp] {Category\\Two}; \&     \node [crit] {Attribute\\Three}; \&     \node [crit] {Attribute\\Four};     \\     \node [comp] {Category\\Three}; \&     \node [crit] {Attribute\\Five}; \&     \node [crit] {Attribute\\Six}; \&     \node [crit] {Attribute\\Seven};     \\     \node [comp] {Category\\Four}; \&     \node [crit] {Attribute\\Eight}; \&     \node [crit] {Attribute\\Nine}; \&     \node [crit] {Attribute\\Ten}; \&     \\     };     \end{tikzpicture}          \end{document}      Now, I'd like to extend this slightly to achieve such a layout (don't mind the different colours): ![target layout](http://i.stack.imgur.com/FYROY.jpg) I just can't figure how to make one cell span several rows. Is this possible with `matrix`?


title: Non-Uniform Inter-Row Spacing in tabularx with p Cells

text: Take a look at the following picture: ![enter image description here](http://i.stack.imgur.com/JRqTt.jpg) The Namespace column is typeset using a `p` cell. The page layout is in landscape mode. I've set the inter-row spacing explicitly to `20pt`. However, since the `p` cell in the first row has one extra line of text compared to its neighbors, the row spacing between R1 and R2 is less than that between R2 and R3. How can I fix this, so that the row spacing takes into account, the height of the `p` cells? Here is a MWE:               \documentclass[10pt]{article}     \usepackage[landscape,margin=0.5in]{geometry}     \usepackage{tabularx}     \usepackage{booktabs}     \newcommand*{\nkeywfont}{\fontfamily{pcr}\selectfont}     \newcommand{\nkeyw}[1]{\begingroup \nkeywfont #1\endgroup}     \newcommand{\keyw}[1]{\begingroup \fontfamily{qcr}\selectfont \textbf{#1}\endgroup}          \newcommand{\lbtcell}[1]{%       \begin{tabular}[t]{@{}p{4cm}@{}}#1\end{tabular}}     \newcommand{\libtype}[3]{\nkeyw{#1} & \lbtcell{#2} & #3 \\[20pt]}          \begin{document}     {\centering     \begin{tabularx}{\linewidth}{rp{4cm}X}     \toprule     Type & Namespace & Description \\     \cmidrule(l{1cm}r){1-1} \cmidrule(lr){2-2} \cmidrule(lr{1cm}){3-3}          \libtype{size\_type}{\nkeyw{string} \\ \nkeyw{vector<T>} (and all other containers)}{Unsigned type big enough to hold the number of characters in a \nkeyw{string}, or the number of elements in a \nkeyw{vector}. Returned by the \nkeyw{size} function}          \libtype{iterator}{\nkeyw{string}, \nkeyw{vector<T>} (and all other containers)}{Denotes the type of an iterator. Can be used to read and write the element it denotes. May be used only with non\keyw{const} \nkeyw{string}s and containers}          \libtype{const\_iterator}{\nkeyw{string}, \nkeyw{vector<T>} (and all other containers)}{Denotes the type of an iterator. Can be used only to read the element it denotes. If the \nkeyw{string} or container is \keyw{const}, only its \nkeyw{const\_iterator} can be used. However, \nkeyw{const\_iterator} may also be used for non\keyw{const} \nkeyw{string}s and containers}     \bottomrule     \end{tabularx}     \\}         \end{document}


title: Changing grouping for bookmarks of appendix

text: I have an appendix with multiple chapters, while I like it that the main chapters of the document appear on the highest hierarchy level in the bookmarks, I would like the appendix chaptes to be children of the appendix bookmark. It would be even better if i could prefix the chapter number I have this for the bookmarks               Appendices     Additional Images     Additional Code      and would like this               Appendices     |-A Additional Images     |-B Additional Code      MNWE               \documentclass{report}     \usepackage{hyperref}     \usepackage[toc,page]{appendix}     \begin{document}     \begin{appendices}         \chapter{Additional Images}         blah         \chapter{Additional Code}     \end{appendices}     \end{document}


title: Remove space below numbers/bullets in itemize/enumerate environments

text: I am using `itemize` and `enumerate` environments and while I have removed the indentation using the `enumitem` package I also want to remove the space below the numbers/bullets.               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \setlength{\parindent}{0cm}          \usepackage{enumitem}          \usepackage{lipsum}          \everymath{\displaystyle}          \newcommand{\3}{\vspace{0.3cm}}          \begin{document}          \lipsum[1]          This is what I have so far:     \begin{enumerate}[leftmargin=*]     \item \lipsum[1]     \item \lipsum[1]     \end{enumerate}          What I want from the itemize/enumerate environments is something like that (without the spaces bellow the numbers/bullets):          \3          (1) \lipsum[1]          \3          (2) \lipsum[1]               \end{document}      This is what I have: ![enter image description here](http://i.stack.imgur.com/xqWQA.png) Something like that is what I want: ![enter image description here](http://i.stack.imgur.com/REF9W.png)


title: How to use \ifnum for arguments (expanding macros)?

text: I want to count my `section`'s, `figure`'s etc. using the `totcount` package. To get a general useable template I want to show only counters which are larger than zero. But it seems that `total{counter}` would not evaluated. I tried the following but none of the both `hide` calls generate any output:               \documentclass{article}          \usepackage{totcount}          \regtotcounter{section}          \newcommand{\hide}[2] {       \ifnum0<0#1         #2       \fi     }          \begin{document}          \section{Section One}     \section{Section Two}     \section{Section Three}          % should print "Sections: 3" but doesn't show anything     \hide{\total{section}}{Sections: \total{section}}     % should print nothing     \hide{\total{figure}}{Figures: \total{figure}}          \end{document}      If I wrote the numbers manually it works like expected:               % prints "Sections: 3"     \hide{3}{Sections: \total{section}}     % prints nothing     \hide{0}{Figures: \total{figure}}      What am I doing wrong? Is there a better approach to get the expected result?


title: hyperref links break with babel + hebrew (or right-to-left language)

text: It's time for Eyal's babel + Hebrew incompatibility of the week. And this time: `hyperref`... :-( Basically, you can't get links with right-to-left text. It's about the direction rather than the non-Latin language - somehow the link-start command is placed at the end due to some sort of reversal. The problem is described in Guy Rutenberg's blog, here. Here's an MWEs for `\cite` and `\ref`:               \documentclass{article}     \usepackage[hebrew,english]{babel}     \usepackage{hyperref}     \begin{document}     \section{A section}     \label{mysection}     LTR English cite \cite{MYSRC}. And now in RTL Hebrew:          \selectlanguage{hebrew}     \cite{MYSRC}     \selectlanguage{english}          Let's refer to the current section:          \selectlanguage{hebrew}     \ref{mysection}          \begin{thebibliography}{MYSRC}     \bibitem[MYSRC01]{MYSRC}     The bibliography entry for MYSRC.     \end{thebibliography}     \end{document}      For both of these (and for `\autoref`), you get:               ! pdfTeX error (ext4): pdf_link_stack empty, \pdfendlink used without \pdfstart     link?.     \AtBegShi@Output ...ipout \box \AtBeginShipoutBox                                                        \fi \fi       **Notes** :   * Vafa Khaligi's comment below may be useful in isolating the minimum offending code out of everything 'babel' does, although I can't say for sure.   * The blog entry I linked to has a workaround - which only works with xetex. Can it be adapted somehow?   * Stefan Kottwitz suggested a workaround which won a bounty on this question. But what I would really like is to make hyperref get such links correctly somehow.


title: In a beamer slide highlight a region of an image with a rectangle overlay

text: I have a slide with a figure in it. I want to draw a rounded corner rectangle overtop part of a figure to highlight that section. Bonus points if you can draw two rounded rectangles as overlays that appear one at a time. ![alt text](http://i.stack.imgur.com/YrNUi.jpg)               \documentclass{beamer}     \usepackage[T1]{fontenc}          \begin{document}          \begin{frame}         \frametitle{ESR1}               \begin{center}             Functional analysis         \end{center}              \begin{center}             \includegraphics[width=1\textheight]{some_image.jpg}         \end{center}     \end{frame}     \end{document}      (Note: I removed most of the unnecessary code in the example code, so the theme in the picture doesn't match with the default one in the example code anymore. --Caramdir)


title: drawing a line in polar coordinates

text: I have a point in polar coordinates `(110:2cm)`, but from here I want to draw a line straight down. Doing `(110:1cm)` is a line towards the center along 110 degrees. Without taking `2*sin(110)` and `2*cos(110)` to find the explicit x and y location, is there a way to say draw a line down from that location?


title: Makeindex without sorting

text: Can I use `makeindex` but without sorting? This question looks peculiar but I would like to use index while the index entries (for example `\index{Peace}` in the document) are already sorted correctly according to Icelandic alphabet. The reason is that `xindy` sorting of Icelandic (for now) is incorrect (according to this answer)


title: Footnotes for a right-to-left phrase within a left-to-right paragraph

text: I have an English paragraph with a right-to-left Hebrew phrase in the middle of the paragraph with a footnote referring to a word within that Hebrew phrase. Should the footnote be positioned at the beginning of the Hebrew word or at the end?


title: Changing color in an eps file from within LaTeX

text: We have an EPS file with a logo in one color. Is it possible to somehow manipulate this color from within LaTeX? We need this logo in different colors for different series of one imprint. **Edit** : This is the logo: http://hpsg.fu-berlin.de/~stefan/transfer/Logo_Buchcover_hellblau.eps


title: Beamer: Grouping environment counters

text: In _beamer_ , when I use `\setbeamertemplate{theorems}[numbered]` but this groups them all as the following. ![What I have](http://i.stack.imgur.com/g5laF.jpg) What I want is _theorems_ , _lemmas_ and other environments to have different counters such as the following. ![What I want](http://i.stack.imgur.com/jBfiN.jpg) Is there a simple way for this? I can use _notheorems_ option for _beamer_ and redefine the environments myself but in this case the colour styles of the environments are removed.


title: Replicate a typesetting of polynomial long division

text: I found a typesetting of series long division I want to replicate in a book I've been reading: ![enter image description here](http://i.stack.imgur.com/Y6CeZ.png) So I tried with the following code (using different polynomial than the example):               \begin{align*}     \renewcommand\arraystretch{2}     \begin{array}{r@{\hskip\arraycolsep}c@{\hskip\arraycolsep}l*2r}     &&\dfrac{1}{z}+\dfrac{1}{3!}z&+\left[\dfrac{1}{(3!)^2}-\dfrac{1}{5!}\right]z^3+\cdots\\     \cline{2-4}     z-\dfrac{1}{3!}z^3+\dfrac{1}{5!}z^4-\cdots&\Bigg)&1\\     &&1-\dfrac{1}{3!}z^2&+\dfrac{1}{5!}z^4-\cdots\\     \cline{2-4}     &&\hfill\dfrac{1}{3!}z^2&-\dfrac{1}{5!}z^4+\cdots\\     &&\hfill\dfrac{1}{3!}z^2&-\dfrac{1}{(3!)^2}z^4+\cdots\\     \cline{2-4}     &&&\left[\dfrac{1}{(3!)^2}-\dfrac{1}{5!}\right]z^4-\cdots\\     &&&\left[\dfrac{1}{(3!)^2}-\dfrac{1}{5!}\right]z^4-\cdots\\     \cline{2-4}     &&&\multicolumn{1}{c}{\vdots}\\     \end{array}     \end{align*}      and here is the result: ![enter image description here](http://i.stack.imgur.com/eymOW.png) As you may see, the are some differences between the example and my attempt (besides fonts, of course). The biggest problem seems to be associate with the vertical spacing, is there anything I can do to improve the result? Thank you very much!


title: Nested loops and conditionals in pgfplots

text: I have trouble in using nested loops and conditionals in `pgfplots`. I'm familiar with the `\foreach` and `\ifthenelse` commands, but do not work well with `pgfplots`. For example, in the following I want to fill some region, while other region empty. Some kind of conditional is needed to decide the region and conditionally fill them. How to resolve this problem?               \begin{tikzpicture}     \begin{axis}[enlargelimits=false,disabledatascaling]              \foreach \x in {0,1,...,9}         {           \foreach \y in {0,1,...,9}           {               \addplot[mark color=black,mark=o] coordinates {(\x,\y)};               \ifthenelse {\x < \y}                  \draw[fill]  (\x,\y) circle (2pt);           }         }     \end{axis}     \end{tikzpicture}


title: How to display e-mail addresses for multiple authors in Beamer?

text: I have a Beamer presentation with multiple authors and I would like their e-mail addresses to be displayed underneath each author name. The post Email field in beamer class? is simple enough to do for a single author, but for multiple authors the results are disappointing:               John Doe     john@example.com Jane Doe     jane.doe@example.com      instead of                   John Doe          Jane Doe     john@example.com  jane@example.com      I can sort-of understand why this is happening, but I am not sure how to resolve this. In a `tabular` environment fixing this would involve a number of paragraph boxes or minipages... Is there an easy way to achieve this result?


title: configuring auctex in emacs

text: I need help with configuring auctex in emacs. I have downloaded and installed auctex but I cannot get anything to work. I am running MAC OS X 10.8.4 and am running emacs through the terminal. If I use Aquamacs emacs (a GUI emacs for MAC) then I can at least get the View command to work (it opens up the default PDF viewer, which is called Preview). However, I wish to use emacs through the terminal. I've added the following to my `.emacs` file:               (load "auctex.el" nil t t) ;; loads tex-site in such a way so that it can be undone                   (load "preview-latex.el" nil t t) ;; actual preview-latex                                             (setq TeX-view-program-list '(("Shell Default" "open %o")))                                           (setq TeX-view-program-selection '((output-pdf "Shell Default")))                                     (setq TeX-PDF-mode t)                                                                                (setq TeX-auto-save t)                                                                                (setq TeX-parse-self t)                                                                               (setq-default TeX-master nil)                                                                         (add-hook 'LaTeX-mode-hook 'visual-line-mode)                                                         (add-hook 'LaTeX-mode-hook 'flyspell-mode)                                                            (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)                                                          (add-hook 'LaTeX-mode-hook 'turn-on-reftex)                                                           (setq reftex-plug-into-AUCTeX t)      Is it even possible to run Latex through the terminal in emacs? I am relatively new to all of this (however I did manage to install everything else I needed such as multiple interpreters and even a web browser!). What I have tried so far is to open up a TeX document (which loads fine and switches to a mode called "LaTeX/MP Ref Wrap" (is that right for Auctex?). I type:`C-c C-c` emacs gives me the prompt:`Command: (default LaTeX)` My options are:               Possible completions are:                                                                             BibTeX       Check        Clean        Clean All    File         Index                                LaTeX        Other        Print        Queue        Spell        View      If I choose to use `LaTeX` then I get this from emacs:               LaTeX errors in `*~/path/to/file output*'. Use C-c ` to display.           So I type C-c ` to display the errors and this is what I get from emacs:          ERROR: LaTeX Error: File `etoolbox.sty' not found.                                                         --- TeX said ---                                                                                Type X to quit or <RETURN> to proceed,                                                                or enter new name. (Default extension: sty)                                                                Enter file name:                                                                                ! Emergency stop.                                                                                <read *>                                                                                l.28 \def                                                                                \NN{\tabularnewline}^^M                                                                      --- HELP ---                                                                                From the .log file...                                                                                *** (cannot \read from terminal in nonstop modes)        1. How would I fix this? Also, instead of typing `LaTeX` I tried `View`. Emacs prompted and auto- completed : `View command: dvi2tty -q -w 132 file_name` I hit enter to execute that command and emacs replies: `View: done.` Now there is a new buffer with content:               unning `View' on `combinatorics_bin_trees' with ``dvi2tty -q -w 132 combinatorics_bin_trees''        /bin/sh: dvi2tty: command not found                                                                        View exited abnormally with code 127 at Fri Jun 14 16:55:35      Note as stated above with Aquamacs Emacs (Emacs for MAC OS X) the `View` command will open the default PDF viewer, which is called Preview. So I must be missing some kind of package? (this is disappointing considering that I use package managers which do work out dependencies to download all my programs...) How can I fix this problem? All help is GREATLY appreciated! I am also welcoming any suggestions in tuning auctex settings for emacs and any general links that are help flu (I did not find the emacswiki about auctex to be useful at all!)


title: Latex symbol for right arrow with circular and diamond shaped tail

text: I want to create a right arrow with a circle on its tail and a diamond on its tail. How is it possible? Please help.


title: Reliably remove baseline skip between text and math

text: I'm using ntheorem, with a proof environment that roughly works like               \newenvironment{proof}{\par\textbf{Proof} }{}      My proofs are just blocks of `align`, so I want to get rid of the long space between “Proof” and the first line of the equation. This could be done like               \begin{flalign}     &\text{\textbf{Proof} to show: }&  x &= y &\\     && more & math     \end{flalign}      But the “Proof” text comes from the environment, I can't move it into the flalign. So I tried to just set the first math baseline to the last text baseline which would allow writing:               \documentclass{minimal}     \usepackage{amsmath}     \setlength{\textwidth}{7cm}          \begin{document}     \newlength{\antiskip}     \setlength{\antiskip}{\abovedisplayskip}     \addtolength{\antiskip}{\baselineskip}          % Ok     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,     \begin{align}\noalign{\vskip-\antiskip}         \qquad\text{baseline } x^2     \end{align}          % Breaks     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,     \begin{align}\noalign{\vskip-\antiskip}         \qquad\text{baseline } \sum_{i=0}^n     \end{align}          % Desired outcome (yes, really)     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,     \begin{align}\noalign{\vskip-\antiskip\vskip-1.5ex}         \qquad\text{baseline } \sum_{i=0}^n     \end{align}          \end{document}      ![Output](http://i.stack.imgur.com/FwOFV.png) TL;DR: I want it to look like (3)


title: How to place figure/table without caption in ConTeXt?

text: When I am trying to               \placefigure[here]{none}{\externalfigure....      I am getting figure with caption "none" instead of figure without any caption. How to `\placefigure` without a caption in               mtx-context     | ConTeXt Process Management 0.60     mtx-context     |     mtx-context     | main context file: /usr/share/texmf-dist/tex/context/base/context.mkiv     mtx-context     | current version: 2013.05.28 00:36


title: 2D Bar Chart in 3D Space

text: I have a graph in 3D space and I'd like to add a histogram along the vertical axis. The bars are supposed to be spaced equally along the vertical axis. I am, however, unable to get the positions of the bars correctly. Here is a MWE of what I have tried so far.               \documentclass[tikz]{standalone}          \usepackage{pgfplots}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \begin{axis}[       view={35}{15},       height=3in, width=3in,       xmin=0, xmax=1,       ymin=0, ymax=1,       zmin=0, zmax=1,       3d box=complete,       xlabel=$x$, ylabel=$y$, zlabel=$z$]     \addplot3 [xbar,bar width=2pt] coordinates{     (0.51,0,0.00) (1.00,0,0.05) (0.82,0,0.10) (0.45,0,0.15) (0.20,0,0.20) (0.30,0,0.25) (0.04,0,0.30) (0.06,0,0.35) (0.19,0,0.40) (0.17,0,0.45) (0.12,0,0.50) (0.09,0,0.55) (0.13,0,0.60) (0.30,0,0.65) (0.11,0,0.70) (0.28,0,0.75) (0.06,0,0.80) (0.21,0,0.85) (0.46,0,0.90) (0.24,0,0.95) (0.01,0,1.00)     };     \end{axis}     \end{tikzpicture}          \end{document}      My understanding is that the last element of each coordinate point should determine the position of the bar along the Z-axis, while the first element specifies the height. I meant to have the bars equally spaced, though, as seen from the below picture, the output is not produced as such. ![enter image description here](http://i.stack.imgur.com/PCaA7.jpg) Also, my second question is that how I can get the bars rotated around the Z-axis such that they lie flatly on the Y-Z plane rather than hanging up in the space like in the picture above.


title: Combining \autoref and \eqref

text: Say the equation is               \begin{equation}     r^2 = x^2 + y^2 \text{.} \label{eq:circ}     \end{equation}      Now, if I use               \autoref{eq:circ}      I get `Equation 1`. How do I get `Equation (1)` (the parenthesis that we get while using `\eqref`) while still maintaining the hyperlink? _Edited in response to an answer below._ I have defined two versions of the command to be used at the beginning and in the middle of a sentence:               \def\chapterautorefname{Chap.}     \def\sectionautorefname{Sec.}     \def\subsectionautorefname{sub--Sec.}     \def\figureautorefname{Fig.}     \def\tableautorefname{Tab.}     \def\equationautorefname{Eq.}          \newcommand{\Autoref}[1]{%       \begingroup%       \def\chapterautorefname{Chapter}%       \def\sectionautorefname{Section}%       \def\subsectionautorefname{Sub--Section}%       \def\figureautorefname{Figure}%       \def\tableautorefname{Table}%       \def\equationautorefname~#1{Equation~(#1)}%       \autoref{#1}%       \endgroup%     }      While using `\Autoref` it says > Use of `\equationautorefname` doesn't match its definition > `\Autoref{eq:llg1}`. How do I fix it?


title: How to remove or substitute "and" from a BibTeX bibliography?

text: I would like to remove "and" from my bibliography,because this what I have now: > C. Danti, M. Matteini, **and** A. Moles. Le Pitture murali: tecniche, > problemi, conservazione. Centro Di, 1990. I would like to remove "and" or replace it with the proper conjunction in my languages (e.g. "e"). To get this: > C. Danti, M. Matteini, A. Moles. Le Pitture murali: tecniche, problemi, > conservazione. Centro Di, 1990. This, for example, is my `biblio.bib`file:               @book{danti1990pitture,         Author = {Danti, C. and Matteini, M. and Moles, A.},         Date-Added = {2013-11-25 16:52:18 +0000},         Date-Modified = {2013-11-25 16:52:18 +0000},         Isbn = {9788870381962},         Lccn = {91161506},         Publisher = {Centro Di},         Title = {Le Pitture murali: tecniche, problemi, conservazione},         Url = {http://books.google.it/books?id=077qAAAAMAAJ},         Year = {1990},         Bdsk-Url-1 = {http://books.google.it/books?id=077qAAAAMAAJ}}      This is my `.tex` file:               \documentclass[12pt,a4paper]{book}     \usepackage[utf8]{inputenc}     \begin{document}     I cite \cite{danti1990pitture} but I don't want the``and".     \bibliographystyle{plain}     \bibliography{biblio}     \end{document}


title: Hello World in pdfLaTeX

text: After many years being silent, TeX can now talk! Almost minimal code below! It should be of particular interest to Physicists and Cosmologists. Need to have Adobe Reader installed.               \documentclass{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[scaled =.92]{helvet}     \setlength{\paperwidth}{5.2075in}     \setlength{\paperheight}{4.90in}     \renewcommand*{\familydefault}{phv}     \usepackage[pdftex,margin=0.5in]{geometry}     \usepackage{soul}     \usepackage{fancyhdr}     \lhead{Sound and TeX}\chead{}     \rhead{Can you hear me?}     \lfoot{}\cfoot{}\rfoot{}     \pagestyle{fancy}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage[pdftex,pdfpagelayout=SinglePage,     pdftitle={Hello world},pdfsubject={Invest your new year improving your TeX skills}%     ]{hyperref}     \definecolor{background}{rgb}{0.99,0.98,0.90}     \pagecolor{background}     \setlength{\parindent}{0.0cm}     \usepackage[pdftex]{insdljs}          \begin{insDLJS}[test]{test}{JavaScript}     function Hello()     {       var cSpeaker = tts.getNthSpeakerName(0);        tts.speaker = cSpeaker;        tts.qText ("Hello, Tex Stack Exchange. Helloooo, can anybody hear me? Helloooo?");        tts.talk();     }               function HelloWorld()     {       var cSpeaker = tts.getNthSpeakerName(0);        tts.speaker = cSpeaker;        tts.qText ("Hello, Tex Stack Exchange. Helloooo, can anybody hear me?");        tts.qText("This is a new and alien TeX world.");        tts.talk();     }          function WhatsUp()     {       var cSpeaker = tts.getNthSpeakerName(0);        tts.speaker = cSpeaker;        tts.qText ("Humans are not proud of their ancestors, and rarely invite them round to dinner.");        tts.qText("What\'s up?");        tts.talk();     }          function Universe()     {       var cSpeaker = tts.getNthSpeakerName(0);        tts.speaker = cSpeaker;        tts.qText ("In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.In those days spirits were brave, the stakes were high, men were real men, women were real women and small furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri. There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened. I am Douglas Adams");        tts.qText("Who are you? I may be a sorry case, but I don't write jokes in base 13");        tts.talk();     }               \end{insDLJS}          %% This must be here     \OpenAction{/S/JavaScript/JS(Hello();)}          %% Short hand commands     \newcommand{\textforlabel}[2]{%     \TextField[name={#1}, value={#2}, width=9em,align=2,%         bordercolor={0.990 .980 .85},%      readonly=true]{}%     }               %% Define the heading     \newcommand{\heading}[1]{\so{#1}}          \begin{document}     \phantom{0}     \begin{center}     \vspace{2cm}     \textbf{\Huge Hello World!\\[0.2cm] Can you hear me?}     \end{center}     \vfill     \newpage          \begin{Form}     \begin{center}     %% Push button is defined here     \PushButton[name=hello,%     onclick={HelloWorld();}, bordercolor={0.650 .790 .94}%     ]{Hello World!}      \\[10pt]          \PushButton[name=hello,%     onclick={WhatsUp();}, bordercolor={0.650 .790 .94}%     ]{What's Up?}      \\[10pt]          \PushButton[name=hello,%     onclick={Universe();}, bordercolor={0.650 .790 .94}%     ]{What's with the Universe?}      \\[2cm]     \heading{Press a button!}\\     \end{center}     \end{Form}               \end{document}      On a more serious note, does (all)TeX have a place in the "new" media?


title: Creating CAPTCHAs and other fancy distorted letters with TikZ

text: I try to do a little more spectacular that phrase ( Δελτιο Υλης) . Is the headline on a press material for my students. The fact is that I could accomplish this with gimp or a graphics program such as the inscape or similar programs. But what I want is to make a somewhat **artistic distortion of letters through tikz** to show to my students the possibilities of having the LaTeX without using external programs. **My question:** is there a way to warp letter and how? Currently this is what I've done ... and certainly I have not artistic vein ... ![enter image description here](http://i.stack.imgur.com/suMH2.png)               \documentclass[b5paper,svgnames,10pt]{book}     \usepackage[utf8x]{inputenc}     \usepackage{tikz}     \usepackage{color}     \usepackage{xcolor}     \begin{document}     \begin{tikzpicture}     \draw[grid,step=0.5cm,gray,very thin] (-1cm,-1cm) grid (9cm,1.5cm);     \node[scale=5.,color =MidnightBlue ] at (0,0) {$\Delta$};     \node[scale=5.,color =MidnightBlue ,rotate=30] at (0.84cm,0.1cm) {$\varepsilon$};     \node[scale=5.,color =MidnightBlue,rotate=-15 ] at (1.3cm,0.0cm) {$\lambda$};     \node[scale=5.,color =MidnightBlue,rotate=+15 ] at (1.95cm,-0.2cm) {$\tau$};     \node[scale=5.,color =MidnightBlue ] at (2.5cm,0) {$\iota$};     \node[scale=5.,color =MidnightBlue ] at (2.6cm,0.4cm) {$'$};     \node[scale=5.,color =MidnightBlue ] at (3.0cm,0) {$o$};     \node[scale=6.,color =MidnightBlue,rotate=-20 ] at (5.3cm,0.08cm) {$\Upsilon$};     \node[scale=5.,color =MidnightBlue ] at (6.cm,-0.2cm) {$\lambda$};     \node[scale=5.,color =MidnightBlue ] at (7.cm,-0.1cm) {$\eta$};     \node[scale=5.,color =MidnightBlue ] at (8.cm,0) {$\varsigma$};     \end{tikzpicture}     \end{document}


title: Accommodating page numbers with narrow margins

text: **Problem:** I'm having trouble getting page numbers to display in a LaTeX document. **Background:** I have a document with 0.3in margins that I suspect covers up the page numbers. A very similar document with 0.5in margins displays the page numbers. The preambles are identical except for the 0.2in difference. If it makes any difference, the document is built in R using the Sweave package. This is my most recent attempt:               \documentclass{article}     \usepackage{setspace, relsize}     \usepackage{moreverb}             \usepackage[pdftex]{lscape}         \usepackage{longtable}              \usepackage{url}                    \usepackage[margin=.3in, landscape]{geometry}      \usepackage{hyperref}     \usepackage{pdfpages}     \usepackage{fancyhdr}          % New command to make R code stand out     \newcommand{\co}[1]{\texttt{\smaller #1}}          \title{MIND-USA Site Report}     \author{Screening, Exclusions and Enrollment}     \date{\today}     \pagestyle{fancy}     \rfoot{\thepage}     \begin{document}     \SweaveOpts{concordance=TRUE}          \maketitle      **What I've tried:**               \pagestyle{plain}       This didn't do anything for the numbering, but the document compiled.               \usepackage{fancyhdr}     \pagestyle{fancy}     \rfoot{\thepage}       This also didn't do anything, but compiled. I hope that provides the right amount of information and is an appropriate/helpful question!


title: How to make ebook-friendly formula heavy documents?

text: Tablets and ebook readers can be very useful if you have to read a lot of scientific texts and papers, and don't want to print them all out. However, it can sometimes be really annoying, especially if you are reading PDFs on a 7 inch tablet. Either you display the whole page in portrait, but then the fonts are too small, or you view it in landscape, and you have to scroll a lot. Many programs have a "reflow" mode, but that completely breaks texts with formulas. I'd like to make some scientific texts I'm working on tablet friendly, with special emphasis that the formulas and figures remain readable. The end goal is of course to convince others to do the same. The output should be either:   * A reflow friendly PDF.   * A PDF with different page sizes, depending on the device (is that possible? it would certainly be useful).   * In a dedicated ebook format. The first two options would be definitely preferable, as I'd only have one file. If people download it for their tablet, they wouldn't have to redownload it for printing. The formulas in my document are short enough that they don't have to be relayouted (if there are some that need it, they are few, and I can do it easily by hand). I'm not so much concerned about the actual layouting, that is covered in other questions (for kindle, regarding margins), and I can do that myself. I'm wondering with what commands I can actually produce a "smart" PDF, or a ebook file, with emphasis on formula-heavy text (e.g. conversion to HTML and then to something else would likely give bad looking formulas).


title: Section titles in caps give problems with math mode in it

text: I use the style file mn2e that makes section titles appear in boldface and in all caps. Which is fine, but not for the formula within such a title. Example:               \section{The derivative $dI/dR$}      gives as output > APPENDIX B: THE DERIVATIVE DI/DR So the math mode remains, which is good, but now also the derivation "d" has been capitalized, which obviously shouldn't be the case. This seems like a pretty standard problem, but I couldn't find the answer here, so sorry if this is a previously answered question. Any help is greatly appreciated.


title: Add two column heading on table of contents

text: How can I put "Chapter" and "Page" below Table of Contents title like shown in picture? And I also have to carry these into next pages in my thesis if toc is more than one page.Thanks, ![ ](http://i.stack.imgur.com/SNIuR.png) And it would be great if they are not hyperlinked


title: Figure with long list of predicates and conjunctions (\wedge)

text: I have a figure with a long list of predicates connected with \wedge, here is the code:               \begin{figure}[h]                        \small{              $         Defined\_in(subject\_state, concrete\_subject) \wedge Defined\_in (observer\_state, concrete\_observer) \wedge         Defined\_in(attach, subject) \wedge Defined\_in(detach, subject) \wedge Defined\_in(notify, subject) \wedge ... it continues ...         $         }         \caption{Caption text}         \label{fig:myfig}     \end{figure}      the problem is that the output produced by pdflatex is rather ugly: ![ugly output](http://i.stack.imgur.com/z1ADk.png) what I would like is to align it all to left, which I think will look better. If I use `\\[` and `\\]` instead of `$`, latex places all the content on one line which overlaps from the page. I would like to avoid manual inserting of new lines with `\\\`, and rather let latex to break it up into lines and align it to left.


title: How to reference another document in latex?

text: I want to compile sections of the article independently. Clearly, I can make their numbers right just by using something like `\setcounter{section}{4}`. How can I get something like `\ref{VeryUsefulTheorem}` working if the command `\label{VeryUsefulTheorem}` is in another section (i.e. in another .tex file, which is compiled to its own .pdf file)? I'm using a hyperref package, and, therefore, inter-document links are clickable. Is it possible to make links to a stuff in a different pdf file clickable?


title: Problems with spacing in lstlisting with escaped code

text: Consider the following code:               \documentclass{beamer}     \usepackage{listings}          \begin{document}          \begin{frame}[fragile]{title}     \begin{lstlisting}[escapeinside={!*}{*!},]     int add     int !*\color{red}add*!     \end{lstlisting}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/1Wz0T.jpg) As you can see, the spacing (or the font) in the word inside the escaped code changes. How can I make it to look the same? I need to change specific parts inside the listing, but the spacing inconsistencies is a problem.


title: How to make cross-referencing with shorthands?

text: Could somebody help me to make shorthands when I cite entries `Inproceedings` with `Proceedings` as `crossref`? I use this code:               \documentclass[a4paper]{article}          \usepackage[T1]{fontenc}          \usepackage[english,ngerman]{babel}          \usepackage[style=verbose-ibid,citepages=suppress,sorting=nty]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{conference.bib}          @Inproceedings{Science:Environment2000,     title = {Environmental Science and Management in Developing versus Developed Countries: education and research perspectives},     crossref = {Environment2000},     author = {John Doe},     pages = {23--45}     }               @Inproceedings{health:Environment2000,     title = {Public health: implications from a compromised environment },     crossref = {Environment2000},     author = {Ho Chi Minh},     pages = {330--335}     }          @Proceedings{Environment2000,     title = {International Conference on Environmental Pollution, Restoration,and Management},     booktitle = {International Conference on Environmental Pollution, Restoration,and Management},     shorthand = {ICEP},     date = {2000},     }          @Article{Episkepsis1970:1,     title = {Decide ne plus refuser},     crossref = {Episkepsis},     date = {1970},     number = {1},     pages = {6--7},     }               @Article{Episkepsis1972:62,     title = {La jeunesse et la préparation},     crossref = {Episkepsis},     date = {1972},     number = {62},     pages = {5--7},     }          @Article{Episkepsis2009:701,     title = {Réunion à Chambésy de la IV\textsuperscript{e} Conférence},     crossref = {Episkepsis},     date = {2009},     number = {701},     pages = {8--21}     }          @Collection{Episkepsis,     journaltitle = {Episkepsis},     publisher = {Ceneter OPO},     address = {Chambésy--Genève},     shorthand = {EP},     keywords = {primary},     }          \end{filecontents}          \addbibresource{conference.bib}               \begin{document}     test\footcite[331]{health:Environment2000} est\footcite[23--27]{Science:Environment2000} test \footcite[23--27]{Episkepsis1970:1}test\footcite[23--27]{Episkepsis1972:62} \footcite[23--27]{Episkepsis2009:701}          \printbibliography          \end{document}      and I have this ![enter image description here](http://i.stack.imgur.com/Z8r8M.jpg) But I would like to have   1. Ho Chi Minh. "Public health: implications from a compromised environment". In: International Conference on Environmental Pollution, Restoration,and Management. 2000 (henceforth cited as ICEP), p.331.   2. John Doe. "Environmental Science and Management in Developing versus Developed Countries: education and research perspectives". In: ICEP, pp.23-27 And the same for the `Incollection` and `@Article` (for articles' `crossref` I used `@Collection` may be it's not wright) entries. Thank you.


title: Code is a mess because I cannot indent inside a for loop in my algorithm

text: I have a for loop in my algorithm and I can't get latex to properly indent the pseudocode inside it. It's just a mess at the moment, it won't even put the code in the for loop on separate lines.               \documentclass[a4paper,12pt,times,numbered,print,index]{Classes/PhDThesisPSnPDF}          \RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}     \RequirePackage{libertine}      \RequirePackage[small,bf]{caption}     \RequirePackage[labelsep=space,tableposition=top]{caption}      \usepackage{subfig}       \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{braket}     \usepackage{algorithm}% http://ctan.org/pkg/algorithms     \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx     \usepackage{algorithm}% http://ctan.org/pkg/algorithms     \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx          \begin{document}     \begin{algorithm}     \caption{Generate transition matrix for one-dimensional quantum walk}\label{tran_mat_1d_qw}     \begin{algorithmic}[1]     \Procedure{generateTransitionMatrix}{$steps$}         \State $numElements \gets steps * 4 + 2$         \State $transitionMat \gets numElements \times numElements$ MATRIX              \BlankLine         \State $col \gets 0$         \For {$i = 1 \to (steps * 2) - 1$}             \State row \gets i * 2$             \STATE\hspace{\algorithmicindent} transitionMat[row,      col]        \gets $1$             \STATE\hspace{\algorithmicindent} transitionMat[row,      col + 1]    \gets $1$             \STATE\hspace{\algorithmicindent} transitionMat[row + 5,  col]        \gets $1$             \STATE\hspace{\algorithmicindent} transitionMat[row + 5,   col + 1]   \gets $-1$         \ENDFOR     \end{algorithmic}     \end{algorithm}     \end{document}


title: Curved text within a curved arrow

text: I am trying to get the text that I place inside a curved arrow to curve with the arrow. I have the following code that generates that given picture, but I wonder how I can get the text to curve with the arrow. I have found a solution proposal here, but I could not adapt it to my case. In particular, I would really like to get the definition of vecArrow to be modified to do what I want (ideally with the text as an argument). Any help would be appreciated.               \documentclass[table,xcolor=pdftex,dvipsnames]{beamer}          \usepackage{tikz}          \usetikzlibrary{arrows,shapes,snakes,positioning,decorations.text,decorations.pathmorphing,decorations.markings}          \begin{document}          \begin{frame}        \frametitle{Curved Arrow}      \tikzset{     vecArrow/.style={       line width=3ex,       decoration={markings,mark=at position        1 with {\arrow[scale=2, blue!20!white]{triangle 60}}},         blue!20!white,       shorten >= 32pt,       line width=4pt,       preaction = {decorate},       postaction = {draw=blue!20!white,line width=3ex, shorten >= 30pt}       }     }          \begin{tikzpicture}     \node[rectangle,draw,minimum width=2in, minimum height=1in] (box1) {};     \node[rectangle,draw,minimum width=2in, minimum height=1.5in,below right=of box1] (box2) {};     \draw[vecArrow]  (box1.east) to[in=135,out=45] node[black,rotate=-47,anchor=west,xshift=-6mm]{\scriptsize Subgraph Match} (box2.north);          \end{tikzpicture}          \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/kyCUG.jpg)


title: How do I make pdfcrop output all pages of the same size?

text: I am trying to crop a powerpoint animation that I converted to pdf for import into beamer (using ppsplit), but when I run `pdfcrop` (from texlive) to reduce the whitespace, it crops the pages individually such that each page is a different size. Is there a way to make it so all pages are the same size as the largest page?


title: Missing $ error using htlatex

text: Running the code posted in this question, the first code shown there, posted by the accepted answer by Andrew Swann. When running the code through htlatex on texlive 2012 debian, I get the error > htlatex index.tex   >  This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) > restricted \write18 enabled. entering extended mode LaTeX2e <2011/06/27> > > .... > > (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) ! Missing $ > inserted. $ l.28 \end{align*} ? No errors when running latex nor pdflatex on the same code. Any idea what causes this error? ps. here is a copy of the code just in case. (it will be nice if one can have a direct links at stackexchange to posted code fragments within messages, so that it is easier to point someone to a specific code on a web page).               \documentclass{article}          \usepackage{mathtools}     \usepackage{amsfonts}          \makeatletter     \newcommand{\mydmath}[1]{\( \m@th\displaystyle #1 \)}     \makeatother     \newcommand{\mydmathtowd}[2]{\hbox to #1{\mydmath{#2}}}     \newsavebox\mytmpbox          \DeclarePairedDelimiter{\abs}{\lvert}{\rvert}          \begin{document}          \sbox\mytmpbox{\mydmath{\adjustlimits\lim_{y\to\infty}\sup_{x\in\mathbb{R}}     \abs[\Big]{y^{9/2-\varepsilon}\bigl[\omega(x,y)-\omega_{\mathrm{as}}(x,y)\bigl]}}}     \begin{align*}       \mydmathtowd{\wd\mytmpbox}{\adjustlimits\lim_{y\to\infty}\sup_{x\in\mathbb{R}}       \abs[\Big]{y^{5/2-\varepsilon}\bigl[\vphantom{A^2}u(x,y)-u_{\mathrm{as}}(x,y)\bigr]}}       & = 0 \\       \mydmathtowd{\wd\mytmpbox}{\adjustlimits\lim_{y\to\infty}\sup_{x\in\mathbb{R}}       \abs[\Big]{y^{5/2-\varepsilon}\bigl[\vphantom{A^2}v(x,y)-v_{\mathrm{as}}(x,y)\bigr]}}       & = 0 \\       \usebox\mytmpbox & = 0     \end{align*}          \end{document}


title: How can I reverse the order of letters/tokens?

text: I want a simple way to have:               \reverseit{abc defg \mycommand}      yield               \mycommand gfed cba      ? (Yes, the original motivation is related to Hebrew and RTL languages, but that can sort of be solved using `\beginR ... \endR`/`\beginL ... \endL` where necessary without changing the language. So I'm asking the general question.) **Edit:** The solution in this question is acceptable as a non-LaTeX-3 solution...


title: Three variables look like a word

text: Sometimes when I type in LaTeX something like this: `$e^{int}$` where i is the imaginary number, n an natural number and say t is time, it looks like I'm writting the word 'int'. Is there any way to make this look better? Thank you.


title: Opposite poles battery in circuitikz

text: This might be a simple question, but I would like the battery positive pole to be to the left, and to the right as the default,               (0,0) to [battery, v=$\varepsilon$] (2,0)      Also, is there an option within `circuitikz` to draw only one pair of poles instead of 2? I have seen the following solution Battery symbol in circuitikz but I would be happy to know if a `circuitikz` solution exists.


title: IEEEtrans template requires not to use algorithm package?

text: During the IEEEtrans.tex, there is a comment below package algorithmic saying that > Do NOT use the algorithm floating environment provided by algorithm.sty (by > the same authors) or algorithm2e.sty (by Christophe Fiorio) as IEEE does not > use dedicated algorithm float types and packages that provide these will not > provide correct IEEE style captions. How can I make a beautiful box to show the pseudo code while using only the `algorithmic` package?


title: Footnotes (e.g. citations) in the footline of beamer frames?

text: I like to have references to images etc. on my beamer slides printed in the footline area of the frame, i.e. close to the bottom: ![Testframe with reference in the footline](http://i.stack.imgur.com/PoCn4.png) In the example I create the footnote 'manually' like this:               \begin{frame}{Testframe}        It is known\textsuperscript{1}        \footlinetext{\textsuperscript{1}en.wikipedia.org}     \end{frame}      where the '\footlinetext' command has been created according to How do I insert text into the footline of a specific slide in Beamer? My question is now: Can I redirect the output generated by '\footnote' commands to the footline via '\footlinetext' ? Specifically, I'd like to use Biblatex citation commands such as '\footfullcite' automatically generate the footnotemark and to fill the footline with the reference's information from the bibtex database. So this code should produce the same output than above:               \begin{frame}{Testframe}        It is known\footfullcite{wiki-en}     \end{frame}      assuming that 'wiki-en' is the Bibtex key for en.wikipedia.org


title: How to use parameterized style?

text: I haven't read the documentation.               \documentclass[tikz,border=12pt]{standalone}     \tikzset     {         helper/.style={color=#1!50,line width=#2},         helper/.default={blue,12pt}     }          \begin{document}     \begin{tikzpicture}         \draw[helper] (0,0) -- (2,2);     \end{tikzpicture}     \end{document}      How to use parameterized style?


title: Remove lettering for references with same first author, different second author, and same year

text: I have 2 references with same first author but different other authors and same year (2006). Currently, these entries are appearing as 2006a and 2006b in my bibliography and in-text citations. I want them to appear as simply 2006 (no a or b). In the text, I will always use \citet* to refer to these articles, therefore there should be no confusion in the text. A MWE for the tex file is:               \documentclass[12pt,notitlepage]{article}     \usepackage{natbib}     \bibliographystyle{./bibliostyle}     \begin{document}     Article 1: \citet*{angchenxing2006rfs}.     Article 2: \citet*{anghodrickxingzhang2006jf}.     \bibliography{./BibTest}     \end{document}      My .bib file is:               @article{angchenxing2006rfs,     author = {Ang, Andrew and Chen, Joseph and Yuhang Xing},     title = {Downside Risk},     journal = {Review of Financial Studies},     volume = {19},     number = {4},     pages = {1191-1239},     year = {2006}     }          @article{anghodrickxingzhang2006jf,     author = {Ang, Andrew and Hodrick, Robert J. and Xing, Yuhang and Zhang, Xiaoyan},     title = {The Cross-Section of Volatility and Expected Returns},     journal = {Journal of Finance},     year = {2006},     volume = {61},     number = {1}     pages = {259-299}     }      My .sty file is here. Any help is greatly appreciated.


title: LaTeX Warning: Empty `thebibliography' environment on input line 3

text: I have a problem with my bibliography. Though my bib file is not empty, I get the message that it is. Also my .bbl file is empty. This is my document:                 \documentclass[10pt, a4paper]{Thesis}            \begin{document}            \cite{Author2010}            \bibliographystyle{unsrt}        \bibliography{testbib.bib}             \end{document}      And this is my bib file:                @BOOK{Author2010,               author = {Author, This},                pages = {301},            publisher = {Springer},                title = {{Book}},                 year = {2010}            }


title: etoolbox patch lstlistings

text: This is a follow up question to empty page afterpage listings. I'm trying to work around a listings problem with etoolbox:               \documentclass{scrartcl}     \usepackage{listings}     \usepackage{afterpage}          \usepackage{etoolbox}     \AtBeginEnvironment{lstlisting}{\setbox0\vbox\bgroup}     \AtEndEnvironment{lstlisting}{\egroup\unvbox0}          \begin{document}     \afterpage{     %something     }          \begin{lstlisting}         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123         asd 123 asd 123 asd 123 asd 123 asd 123 asd 123     \end{lstlisting}               \end{document}      But I get `Missing } inserted \end{lstlisting}`.


title: pgf-blur not working AtEndDocument

text: With the MWE below:               \documentclass{memoir}          \usepackage{xcolor}     \usepackage{tikz}     \usetikzlibrary{shadows.blur}          \AtEndDocument{     \begin{tikzpicture}     \filldraw[fill=white, draw=black,        blur shadow={shadow blur radius=1.5ex}]     (0,0) circle (0.5);     \end{tikzpicture}}          \begin{document}     \begin{tikzpicture}     \filldraw[fill=white, draw=black,     blur shadow={shadow blur radius=1.5ex}]     (0,0) circle (0.5);     \end{tikzpicture}     \end{document}        I get the right blurred shadow in the first `tikzpicture` environment, but a solid black background frame (not even a shadow properly) in the last one, within the `\AtEndDocument` hook. Why is it so and how can the blurred shadow be obtained also in the latter case? The picture code has been copied from the `pgf-blur` documentation.


title: Multiple Bibliographies - Basic

text: I'm try to use package which provides the multiple bibliographies first time. Before, I've used just standard **thebibliography** environment. Here is the example from **bibunits** package manual:               \documentclass{article}     \usepackage{bibunits}     \begin{document}     \begin{bibunit}[plain]     References to the \TeX book \cite{Knuth:1991}     and to Lamport’s \LaTeX\ book, which appears     only in the references\nocite{Lamport:1994}.     \putbib[lit]     \end{bibunit}     \begin{bibunit}[alpha]     A new bibunit with a different style and a cite     of a Postscript tutorial \cite{Adobe:1985}.     \putbib[lit]     \end{bibunit}     \end{document}      ![enter image description here](http://i.stack.imgur.com/hW5SD.jpg) I can't understand one simple thing: where is the describe of book has been writen? (Donald E. Knuth. The TEX book. Addison-Wesley, Reading, Massachusetts, 1991. and others) In the case of the **thebibliography** environment, it was provided by **\bibitem** command inside the **thebibliography** environment, but what in the case of **bibunits** and similar packages?


title: How do I remove "Chapter N" from the chapter titles of a book

text: How do I remove "Chapter N" from the chapters when using the `book` document class? This does not appear in the TOC (which I don't want, either). But it appears at the beginning of a chapter, and on each page, in the header.


title: Problems typesetting footnotes with RevTeX 4-1

text: The RevTeX classes, for some of the APS journals, typeset all footnotes in the bibliography (as endnotes). Although it works perfectly if I try with RevTeX4, I consistently have problems doing this under RevTeX4-1. Here's a compact example.               \documentclass[prl,aps,10pt,twocolumn]{revtex4-1}     \begin{document}     \title{A nearly minimal example using RevTeX4-1}     \author{Niel de Beaudrap}     \noaffiliation     \date{\today}     \begin{abstract}         In this letter, we attempt to typeset a footnote.         We find that it fails to be properly typeset with the package ``revtex4-1'',         whereas it works properly with the package ``revtex4''.     \end{abstract}          \maketitle          The following should appear in the bibliography~\footnote{%         This compiles correctly under RevTeX4.}.     It is our hope that others are able to reproduce our results     and identify potential sources of error.           \begin{thebibliography}{99}     \end{thebibliography}     \end{document}      If I use the `nofootinbib` option (which turns off end notes), the package behaves properly under both RevTeX4 and RevTeX4-1. I can manually insert my footnotes into the bibliography, but I would rather not. Help?


title: Scale tikz figure to a percentage of \textwidth

text: A user asked a question about scaling a figure to a factor of `\textwidth` and got an answer like this:               \documentclass{article}     \usepackage{graphicx}     \begin{document}       \includegraphics[width=0.5\textwidth]{file}     \end{document}      however, I'm not sure how to apply this to my document:               \documentclass{article}     \usepackage{graphicx}     \usepackage{tikz}     \begin{document}       \begin{figure}[!h]         \centering         \begin{tikzpicture}           %         \end{tikzpicture}         \caption{This figure has a width which is a factor of \\textwidt}       \end{figure}     \end{document}      I've tried               \begin{figure}[!h, width=\textwidth]      but that didn't work.


title: table of content, list of figures, list of tables in oneside in a twoside thesis

text: I am writing my thesis in `twoside` documentclass, but I want to put the table of contents, list of figures, list of tables and other frontmatter in `oneside`. I have been searching the google for many hours and got nothing. Please, help me....


title: How can I place a vertical rule between subfigures?

text: I have implemeted a figure with subfigures by following the instructions here. Each subfigure is an image and some text beneath it. I would like to introduce a vertical rule between each subfigure that extends the height of the subfigure, from the top of the image to the bottom of the text. Here is an example of the code that I have.               \begin{figure*}[ht!]     \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         Now that we know who you are, I know who I am. I'm not a mistake!         It all makes sense!     \end{subfigure}     \rule{1px}{100px}     \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         In a comic, you know how you can tell who the arch-villain's going to be?         He's the exact opposite of the hero. And most times they're friends,         like you and me!     \end{subfigure}     \rule{1px}{100px}     \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         I should've known way back when... You know why, David? Because of the kids.         They called me Mr Glass.     \end{subfigure}          \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         Yeah, I like animals better than people sometimes... Especially dogs.         Dogs are the best. Every time you come home, they act like they haven't         seen you in a year.     \end{subfigure}     \rule{1px}{100px}     \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         And the good thing about dogs... is they got different dogs for different         people. Like pit bulls. The dog of dogs. Pit bull can be the right man's         best friend... or the wrong man's worst enemy.     \end{subfigure}     \rule{1px}{100px}     \begin{subfigure}[t]{0.32\textwidth}         \includegraphics[width=\textwidth]{tux.png}         You going to give me a dog for a pet, give me a pit bull. Give me...         Raoul. Right, Omar? Give me Raoul.     \end{subfigure}     \caption{How can I get vertical rules?}     \end{figure*}      In this code, I have tried to solve the problem by adding `\rule{1px}{100px}` between each subfigure but the line starts at the bottom of the image, not the text. Also, I don't know how to specify the line height in terms of the subfigures' height. The line should be the height of the subfigure, including the space occipied by the text beneath it. The reason why I want to do this is to make the texts easier to read. If the bar extended just between the texts that would be fine.


title: How to set the pagestyle on the page a particular float ends up on?

text: Sometimes, a float is just a tiny bit too large for one page and one would like to remove the page number and hope that nobody notices.               \documentclass{article}     \usepackage{mwe}     \begin{document}     \blindtext     \begin{figure}     \thispagestyle{empty}     \includegraphics[width=\linewidth,height=1.02\textheight]{example-image-a}     \caption{This float is too large for one page.}     \end{figure}     \blindtext     \end{document}      (Why, of course this is an artificial example and I could just make the image smaller. This is a more common problem for tables where using a `\resizebox` looks even worse.) ![this float is too large](http://i.stack.imgur.com/YD6xR.png) Unfortunately, no matter where I put the `\thispagestyle{empty}`, there is no way to guarantee that it really affects the page the float ends up on. I tried both before and after the `\includegraphics` and also in the caption itself. There is a way to change the pagestyle for all float pages (How to remove header on the page with big picture? and `floatpag`) but that's not what I want here.


title: Problem with defining a titlepage

text: I am writing a LaTeX 2e class with two options `msc` and `phd` for my department theses/dissertations. In this class, I need to define a titlepage for the first page of the theses/dissertations which contains the university name, the department name, the title, the author name and so on. The code is something like the following:               \documentclass[phd]{book}     \makeatletter     \newif\if@phdthesis     \@phdthesisfalse     \DeclareOption{phd}{\@phdthesistrue}     \newif\if@mscthesis     \@mscthesisfalse     \DeclareOption{msc}{\@mscthesistrue}          \def\author#1{\gdef\@author{#1}}     \if@mscthesis     \def\mytitle{\begin{titlepage}         \begin{center}         A  thesis for the degree of master of science by\\         \@author         \end{center}         \end{titlepage}     }     \fi     \if@phdthesis     \def\mytitle{\begin{titlepage}        \begin{center}         A Dissertation for the Degree of Doctor of Philosophy by\\         \@author        \end{center}         \end{titlepage}     }     \fi     \makeatother     \begin{document}     \author{Vahid}     \mytitle     \chapter{Chapter Name}     bla bla bla     \newpage     bla bla bla     \end{document}      But I get an error: `Undefined control sequence.l.32 \mytitle`. I am wondering if anybody help me solve this problem.


title: Is there any way to reproduce this figure of the Solar System using TikZ?

text: # The Challenge Today I'd like to pose a particular TikZ challenge. I stumbled upon the following picture: ![Solar system](http://i.stack.imgur.com/uvjoh.jpg) It condenses a great deal of information: each line represents one mission to the respective celestial body! # The question Is it possible to reproduce this figure using TikZ? Just the planets with the rings should be enough, and just a proof of concept. # The rationale If I look at all those lines, I wonder how painstaking a process this must have been to make. To me it screams: _automation_. And that is what TikZ is great at.


title: Typefaces that come with the standard LaTeX distribution on the TeX Live

text: Sorry guys for this silly question but I really don't understand the way to do this. I would like to use the fonts I saw here in my documents. I'm on Mac OS X, snow leopard using textmate as the editor and my TeX distribution is TeXLive-2010 installed via MacTeX. Normally I use pdftex as the rendering engine. Do I have to change it to xetex? Could you please provide me some sample code to use, for example, "Avant Garde Book" or whatever other unusual font from that document?


title: Strange Error with Libertine and pdfpages

text: Frequently I have to make a compilation of documents. Each document has been produced with pdfLaTeX, and the compilation is done with pdfLaTeX and the package pdfpages. MWE of my file »libertine-fehler1.pdf«:                  \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{libertine}          \begin{document}     \emph{Here we go.}     \end{document}      The result is as expected: ![Pichture of the result1](http://i.stack.imgur.com/LPL1H.png) Now, I reuse this PDF in my compilation. MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{pdfpages}          \begin{document}     \includepdf{libertine-fehler1.pdf}     \end{document}      I get the very surprising result: ![Libertine error 2](http://i.stack.imgur.com/5JT71.png) As you can see, there a squares instead of letters, and the »H«, which is readable, is not in italics. Any ideas? I'm using the old libertine package of the year 2011, and TeXlive 2012, but Libertine is installed in texmf-local. Everything else works, so it does not seem to be an error of the installation.


title: Using package appendix with llncs

text: I'm trying to get appendices to work with llncs as my document class. This minimal example does not work (i.e. complains about \@chapapp being undefined). Changing llncs to article fixes this (I guess the package figures out that article does not have chapters).               \documentclass{llncs}     \usepackage[title]{appendix}     \begin{document}     \begin{appendices}     \section{Also you should know this}     Really.     \section{And I also came across this}     But I need to put this in an appendix so that my paper is not too long.     \end{appendices}     \end{document}      Using the `subappendices` environment compiles but prints "Appendix 0.A"... I guess I'm fine with using subappendices, but I need a way to get rid of that 0. So which should it be? Subappendices (not that weird since llncs, like article, only goes up to sections) and removing the leading 0. somehow (bonus points for that), or telling the package that it somehow should number with sections instead of chapters?


title: Bad cross-reference using titlesec

text: When I define two new level using `titlesec`, the reference doesn't work correctly. This is an example:               \documentclass{article}          \usepackage{titlesec}          % First level     \titleclass{\exemple}{straight}[\subsection]     \newcounter{exemple}[section]     \titleformat{\exemple}[runin]{}{\theexemple}{0em}{Exemple \ }[\quad]     \titlespacing{\exemple}{0pt}{\baselineskip}{1em}          \renewcommand{\theexemple}{\thesection.\roman{exemple}}          % -------------------------------------------------------------------     % second one     \titleclass{\suiteexemple}{straight}[\subsection]     \newcounter{suiteexemple}[section]          \titleformat{\suiteexemple}[runin]{}{\thesuiteexemple}{0em}{Suite de l'exemple \ }[\quad]          \titlespacing{\suiteexemple}{0pt}{\baselineskip}{1em}     \renewcommand{\thesuiteexemple}{\thesection.\roman{suiteexemple}}     % -------------------------------------------------------------------               \begin{document}          \section{one} \label{sec:one}          ...          \exemple{First exemple}      \label{ex:one}          \exemple{Second example}          \section{two}          ...          Reference to exemple : \ref{ex:one}          \end{document}      The reference is displayed as "1", but it should be "1.1" (the exemple counter is not displayed). If you comment the code between the `% ------` the reference is correctly displayed. Do you know any workaround on this problem?


title: How to make a commutative diagram smooth?

text: I have drawn the following diagram: ![enter image description here](http://i.stack.imgur.com/sDEEg.png) using the following command:               \documentclass[11pt,twoside,a4paper]{book}          \usepackage[margin=1.5in]{geometry}     \usepackage{xypic}          \begin{document}     \xymatrix{       A\ar[rrrr]\ar[rrdd] && && B\ar[lldd] \\                                            \\       && C &&     }     \end{document}      But this diagram is not smooth, especially the arrow `AC` and `BC`. How can I make it smooth?


title: How can I split this equation?

text: Does anyone know how to split this equation in two lines?               \begin{equation*}          \iint_S \eta = \iint_S \left[F(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} + G(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)}+H(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} \right]          \end{equation*}      I would like the equation to look like this               \begin{equation*}           \iint_S \eta = \iint_S \left[F(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} + G(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)}+          H(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} \right]          \end{equation*}      by adding a linebreak or whatever necessary right at the +H(x(u,v)... Please, bear in mind that I'm pretty new to latex ![This is a screenshot of my document](http://i.stack.imgur.com/qD5Ye.jpg) Thanks for your help


title: Macro to create new .tex files

text: I borrowed from Extracting the contents of text in a specified environment into a new file some code that extracts lines from a `.tex` file and puts it into a new file. The code works well, but I would like to create a loop that will perform this for a bunch of test problems. In the example below, the user names a new environment: test and the macro pulls the text and puts it into a new file. I would like to be able to define multiple environments and use the macro to generate a different file for each.               \documentclass{article}     \usepackage{environ}          \newwrite\myexportone     \newwrite\myexporttwo          \makeatletter     \NewEnviron{test1}{%     \toks@=\expandafter{\BODY}%     \immediate\write\myexportone{\the\toks@}}     \makeatother          \makeatletter     \NewEnviron{test2}{%     \toks@=\expandafter{\BODY}%     \immediate\write\myexporttwo{\the\toks@}}     \makeatother          \begin{document}     \immediate\openout\myexportone=export1.tex     \immediate\openout\myexporttwo=export2.tex          \begin{test1}          \newproblem{          \FPsetpar{a}{-10}{10}[{-1,1}]     \FPsetpar{b}{-10}{10}[{-1,1}]          \item  If           \begin{equation*}  \a (x \dsign{\b} \b)=\a x+m \end{equation*} what is the value of $m$?          \vspace{10 mm}       \begin{answers}{2}\bChoices[random]         \Ans1 \FPsv{a*b} \eAns         \Ans0 \FPsv{-a*b} \eAns   \eFreeze         \Ans0 \a \eAns  \eFreeze         \Ans0 \b \eAns         \eChoices\end{answers}     }          \end{test1}          \begin{test2}          \newproblem{     \FPsetpar{a}{1}{10}          \item  What is the solution set for $x^2-\FPsv{\a^2}=0$?          \vspace{10 mm}       \begin{answers}{2}\bChoices[random]         \Ans0 $\FPsv{a}i$ \eAns         \Ans0 $\pm\FPsv{a}i$ \eAns         \Ans1 $\pm\FPsv{a}$ \eAns         \Ans0 $\FPsv{a}$ \eAns         \eChoices\end{answers}     }          \end{test2}          \end{document}


title: How to define a new PSTricks object that is not a redefinition of a built-in PSTricks object?

text: # Scenario I want to create a new PSTricks object, e.g., `\myBatLogo[<key-val options>]{}{}...{}` that is not a redefinition of a built-in PSTricks object. It means that any redefinition as follows does not make sense in my scenario.               \newpsobject{myBatLogo}{<built-in PSTrick object>}      # Question How to define a new PSTrick object that is not a redefinition of a built-in PSTricks object? It must accept key-value optional arguments and mandatory arguments.


title: Creating a shaded box with an outline

text: _**EDIT_** I'm attempting to create a box with a different background color. However, I've tried this and the box looks unpolished. So I would like to add a line that seperates the two background colors. In other words, the point where the special background color begins and the original document background ends should be seperated by a line that is a third color. I'm wondering how I can accomplish this... _**ORIGINAL POST (containing more details)_** I don't understand floats very well. I've been using the `framed` package instead, which is nice because I can easily put a frame around something. There is another behavior included in this package that I'd like to combine. It gives the option to create a `shaded` environment, which is another way of saying that it changes the background color of the object that I'd like to put a frame around. I really like this, but the edge of the shaded area looks unpolished. So what I'd like to do is to create a float that has a special background color, and I want the edges to have a thin line between the special color and the normal white background that I use for the rest of the document. I'm using these framed "floats" to display mainly text, so I'd like to know how to combine all of these features. In other words, I'd like to see an example that takes a bunch of text, and gives it a special background with a box that is perfectly aligned at the edge of the background (thus giving it a nice frame). I'd like to see how this can be implemented as a `float`, as well. One more thing that isn't necessary, but would be good to know, would be a way to implement similar behavior around an `align` environment. I don't know if this would require special treatment, but I'd really appreciate it if someone could show me how to do this.


title: Why does \rput(4,3){\psscalebox{1.5}{A}} differ from \psscalebox{1.5}{\rput(4,3){A}}?

text: I just tried this code to check whether both cases result in the same output. Apparently they are not identical. Why?               \documentclass[dvipsnames,cmyk]{minimal}     \usepackage[a4paper,margin=6cm]{geometry}     \usepackage{pstricks}     \usepackage{pst-node}     \usepackage{graphicx}          \newpsstyle{gridstyle}{%     gridwidth=0.4pt,%default: 0.8pt     gridcolor=Red!20,%default: black     griddots=0,%default: 0      %     gridlabels=5pt,%default: 10pt     gridlabelcolor=Blue,%default: black     %     subgriddiv=5,%default: 5     subgridwidth=0.2pt,%default: 0.4pt     subgridcolor=Green!20,%default: gray     subgriddots=0%default: 0     }     \psset{style=gridstyle}               \begin{document}     \pspicture(7,7)     \psgrid     \rput(2,2){\scalebox{2}{\pscircle{1}}}     \endpspicture          \vspace{1cm}          \pspicture(7,7)     \psgrid     \scalebox{2}{\rput(2,2){\pscircle{1}}}     \endpspicture     \end{document}      * * * Could you elaborate how `\psscalebox` and `\rput` do their jobs internally?


title: tree list in a table

text: I would like to put a tree list into a table environment. Smth. like:               +--------------------------+---------------------------+-------------+     | Heading 1                |  Heading 2                | Heading 3   |     +--------------------------+---------------------------+-------------+     | / main-item              |  main item data           | some info   |     |   +-- sub item 1         |  sub item 1 data          | some info 1 |     |   |   +-- sub sub item x |  sub sub item 1.x data    | some info x |     |   |                      |                           |             |     |   +-- sub item 2         |  sub item 2 data          | some info 2 |     |       +-- sub sub item y |  sub sub item 2.y data    | some info y |     +--------------------------+---------------------------+-------------+      I know about dirtree package, but it it possible to arrange dirtree data in that way? _**P.S.: I received multiple answers to this question, which solve the problem. I personally found the accepted answer more appropriate in my case. But here are also answers how to achieve the requested functionality with dirtree package. Therefore I encourage everyone to read all answers to find the best possible solution._**


title: change node level tikz mindmap

text: I would like to change the level of a specific node in a tikz mindmap, with something like `node[level=1]`, `[style=level 1/.style]`, or something like the skip level style. I would like to avoid making an overlapping tree like in the scientific interactions example.                   \documentclass{standalone}         \usepackage{tikz}         \usetikzlibrary[mindmap]              \begin{document}              \begin{tikzpicture}[mindmap,every node/.style=concept,text=white]         \node {root}             child {node {level 1 node}                 child {node {level 2 node}                 child[concept color=blue] {node {level 1 node}}                 child {node {level 3 node}}                 }             }             ;     \end{tikzpicture}                 \end{document}      Any suggestions? Thanks in advance :) ![the blue node should be level 1](http://i.stack.imgur.com/VZmDF.png)


title: LaTeX Templates in Russian

text: I am using LaTeX template for a thesis in English. Now I need to write my thesis in Russian using the same template. I added:               \documentclass[11pt, a4paper, oneside]{Thesis}          \usepackage{cmap}                    \usepackage[utf8]{inputenc}              \usepackage[russian]{babel}      \usepackage{mathptmx}     \renewcommand{\sfdefault}{ptm}     \usepackage[T1]{fontenc}      Everythig works perfectly apart from units. For example I want to write units in Russian `25 ${м^3 с^{-1}}$` but I have 25 3-1. What else I need to add or remove in the index I added? Or where is my mistake?


title: How can I write the number set of positive rationals in LaTeX2e?

text: ![how to do this?](http://i.stack.imgur.com/5V6fT.jpg) How to write this in latex2e, the set of all rational numbers.


title: How to reduce space in begining of itemize?

text: I am writing one list after one text?                Following is list items:                  1. Pen        2. Hen        3. Ten      I need to reduce spacing between text (Following is list items:) and begining of list(Pen). How can i reduce it?