title: Forcing page number to start from the title page

text: My code is the following:                   \documentclass[12pt,titlepage]{article}          \usepackage{harvard}     \usepackage{setspace}       \usepackage{ifthen}     \usepackage{booktabs}     \usepackage{array}     \usepackage{multirow}     \usepackage{tabularx}     \usepackage[font=bf, labelsep=period]{caption}     \usepackage{changepage}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{endnotes}              \begin{document}                   \title{some title}         \singlespace{\author{author stuff}}              \maketitle                   \newpage         \begin{abstract}           abstract stuff         \end{abstract}              \newpage         \doublespace              \section*{Introduction}              blah blah blah              \end{document}      When I compile this, page 1 starts on the third page (i.e., on the page where the section Introduction starts). However, I want page 1 to begin from the title page, then abstract page would be page 2, and introduction page would be page 3 and so on. How can I do this? Note that I want the page numbers to actually show. That is, on the bottom of the title page, the number 1 needs to show.


title: xwatermark in xepersian does not work together?

text: \documentclass{book}     \usepackage{hyperref}     \usepackage[printwatermark]{xwatermark}     \usepackage{xcolor}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{xepersian}     \newwatermark[allpages,color=cyan!30,angle=45,scale=0.5,xpos=0,ypos=0]{$Wellcome$}     \newwatermark[allpages,color=gray!30,angle=90,scale=0.5,xpos=-50,ypos=0]{$Wellcome$}     \begin{document}     \begin{persian}          نظریه اعداد از مباحث ریاضی است.          \end{persian}     \end{document}


title: How to write/draw over the figure with site specific locations in Latex

text: I wish to show some comment/text bubble on my picture in latex presentation. Kindly help me to write/comment on a included figure in latex.


title: How to use biblatex and XeLaTeX at the same time?

text: I tried to look for a similar problem but could not find any. I hope that anybody with a bit more experience can get me a bit more insight in **how I should be using biblatex with XeLaTeX?** I think biblatex fully supports UTF-8... I use the following code (is not a real MWE, since you don't have the bibliographies)                    \documentclass{article}     \usepackage{fontspec,xltxtra}     \usepackage{polyglossia}         \setmainlanguage{english}         \usepackage{csquotes}         \usepackage[bibstyle=numeric, citestyle=numeric-comp, sorting=none]{biblatex}         \bibliography{cluster}         \begin{document}         sometext sometextsometextsom         test \citep{Wu2004}         \printbibliography         \end{document}      I get the following error: `Package csquotes Warning: Using preliminary 'polyglossia' interface. (csquotes) Some of the multilingual features may not (csquotes) work as expected.` and as a result of this, my citations keep staying undefined:               Latex warning Citation 'Wu2004' on page 1 undefined on input line 15      * * * Based on the comments I made the following adaptions to my script to utilize biber which is UTF8 aware. However it is not fully working:               \documentclass{article}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{polyglossia}     \setmainlanguage{english}     \usepackage{csquotes}     \usepackage[bibstyle=numeric, citestyle=numeric-comp, sorting=none,backend=biber]{biblatex}%this style compresses the numbering      \bibliography{cluster}          \begin{document}     sometext sometextsometextsom     test \cite{Wu2004}     \printbibliography     \end{document}      In Texnic center (my editor) I made the following adaptions:   * changed so it uses biber instead of bibtex: path: `C:\additional Tex packages\biber\biber.exe` and I passed the following arguments to it: `%pm` (main file's full path) the following errors occur, it seems the bbl file is not created.. what am I doing wrong?               Package biblatex Info: Trying to load bibliographic data...     Package biblatex Info: ... file 'testA.bbl' not found.          No file testA.bbl.     Package biblatex Info: Reference section=0 on input line 11.     Package biblatex Info: Reference segment=0 on input line 11.          LaTeX Warning: Citation 'Wu2004' on page 1 undefined on input line 13.               LaTeX Warning: Empty bibliography on input line 14.          [1] (H:\xetex_testing\testA.aux)          LaTeX Warning: There were undefined references.


title: Problems with fractions in a square root

text: whenever i have a fraction inside a square root, the square root symbol drops down below the line and intercepts whatever is on the next line. I think the package savetrees may be causing the problem. MWE               \[       \begin{array}{ll}         \sqrt{\frac{1}{x}}  &  \\         intercepted text    &   \\        \end{array}     \]      ![Figure 1](http://i.stack.imgur.com/TeP1X.png) these are the warnings i get               Typesetting problem in main.tex (line 36): Underfull \hbox (badness 10000) in paragraph at lines 36--41     Typesetting problem in main.tex (line 55): Overfull \hbox (16.36372pt too wide) in paragraph at lines 55--68     Typesetting problem in main.tex (line 53): Overfull \hbox (5.0pt too wide) in paragraph at lines 53--69     Typesetting problem in main.tex (line 87): Overfull \hbox (77.67256pt too wide) in paragraph at lines 87--97     Typesetting problem in main.tex: Overfull \vbox (27.9158pt too high) has occurred while \output is active []


title: What commandline parameter to get pdf

text: I start latex via the commandline with `latex filename`. What do I have to do to get a pdf instead of a dvi?


title: Floating an algorithm?

text: I'm typesetting an algorithm using the `algorithmx` package as follows:               \begin{algorithm}       \caption{\textsc{Whatever}}       \begin{algorithmic}[1]       ...     \end{algorithm}      However, I would like it to float like a figure. If I replace `\begin{algorithm}` with `\begin{figure}` it does float as I like, however, the caption does not look as pretty any more (I presume it is redefined by a `sig-alternate` class I am using for the whole document). Is it possible to have both a nice caption and floating behaviour at the same time?


title: How can I eliminate the epigraph rule?

text: I use the epigraph package to define the following declaration that looks as follows: `\epigraph{This work has appeared in:}{Max Mustermann, How the Euro will crash.}` That looks then as follows               This work has appeared in:     -----------------------------     Max Mustermann, How the Euro will crash.      It does look okay, but I do not like the line in between. The docu says: > By default, a rule is drawn between the text and source , with the rule > thickness being given by the value of `\epigraphrule`. The value can be > changed by using the LaTeX `\setlength` command. A value of 0pt will > eliminate the rule. UPDATE I am not too sure where to put this setlength command, e.g.               \setlength{\epigraphrule}{0pt}     \epigraph{This work has appeared in:}{Max Mustermann, How the Euro will crash.}      does not work. I get the error: Missing number, treated as zero. Any idea how to do that properly?


title: pagestyle and chapterstyle design

text: I am using memoir class for my thesis and I would like some help. Am fairly new to LaTeX but I am not new to programming so I can pick up easily. I will appreciate some help in pointing me in the right direction. Here is what I want to achieve. I am using the default memoir style, and I have created a minimal document. In my thesis, all chapters in mainmatter are publications I made to some journals. In the mainmatter then, I want to have a style as follows: chapternamepage - blankpage - startofchapter In chapternamepage I want to have Chapter Title as well as information about authors and citation of the publication. I have though of using epigraph for this, is this the right way ? Secondly, for the TOC entry for each chapter, I want to have the chaptertitle as well as the citation of the publication, I am using bibliostyle and all the citations above need to follow the same style. Can someone help me as I start this project ?


title: Listing composed of multiple "sublistings"

text: As a workaround currently I am using framed Verbatim, but I would like that   * this set of listings appear as a single listing in the list of listings   * the codes be rendered by the `listings` package according to my `lstset` settings   * line numbers are shown at the beginning of code lines, but only there, restarting from 1 at each separate file Is this somehow possible? My current code:               \begin{figure}[h]     \centering\begin{tabular}{l}     \texttt{config.h} \\     \begin{minipage}{0.78\textwidth}     \begin{Verbatim}[frame=single]     // Choose one of the supported encoding options:     //#define STRING_ENCODING_ASCII     #define STRING_ENCODING_UCS32     //#define STRING_ENCODING_UTF8          #include "rules.h"     \end{Verbatim}     \end{minipage} \\ \vspace{0.01cm} \\     \texttt{rules.h} \\     \begin{minipage}{0.73\textwidth}     \begin{Verbatim}[frame=single]     #ifdef STRING_ENCODING_UCS32        #define ENCODING_HEADER "encoding/ucs32.h"     #endif     \end{Verbatim}     \end{minipage} \\ \vspace{0.01cm} \\     \texttt{text.cpp} \\     \begin{minipage}{0.4\textwidth}     \begin{Verbatim}[frame=single]     #include "config.h"     #include ENCODING_HEADER     \end{Verbatim}     \end{minipage} \\     \end{tabular}     \caption{\label{fig:include_macro}The \code{\#include \emph{macropath}} pattern.}     \end{figure}      And its result: ![enter image description here](http://i.stack.imgur.com/L5clh.png)


title: Referring to unnumbered paragraphs

text: I'd like to write               We added an explanation on \paragraphref{modifiedparagraph1}.      and have it compiled to:               We added an explanation on page 7, paragraph 2.      where the referenced paragraph is the second on the page not in the section. Is there a package that can do this? I'm aware of the possibility to refer to numbered paragraphs but that's not what I want because sections and paragraphs are not numbered in my document. This feature would be very useful when writing response letters to journal editors.


title: biblatex-apa and \fullcite* --> year of ambiguous citation

text: I writing my PhD thesis with LaTeX using biblatex-apa as bib style. Besides the bibliography, a section will present a list of my publications during PhD. I do this using the `\fullcite` commands in a simple list environment. I have some publications, where the authors and the year of publication are the same. Biblatex sets them like it would do in the bibliography:   * Author1, Author2, & Author3 (2011a). TitleA. JournalA, ...   * Author1, Author2, & Author3 (2011b). TitleB. JournalB, ... I would like to omit the letters in the year statement (but only for the `\fullcite` items in my publications section, not generally, i.e. affecting the bibliography) Is that possible?


title: Beamer: set block title bg equal to the block body bg

text: I'm using the `beaver` color theme with the `Boadilla` beamer theme. I want to get rid of the bluish blocks, that are not redefined to a color fitting the color theme I chose. So I put this in my preamble:               \definecolor{darkred}{rgb}{0.8,0,0}     \setbeamercolor{structure}{fg=darkred}      However, this produces something pinkish, which is ok, but it is way too pinkish when my blocks have a title. What I would like to do is to turn off the color difference between `block title` and `block body`, and use the `block body` color, that was automatically defined by `\setbeamercolor{structure}{fg=darkred}`, also in the `block title`. I tried to put               \setbeamercolor{block title}{use=block body,fg=darkred,bg=block body.bg}      in my preamble, after the two definitions quoted above, but this results in               ! TeX capacity exceeded, sorry [grouping levels=255].      errors wherever I put blocks in my frames. Apparently, this questions was not asked by anybody around the net so far. Any help would be appreciated :) Minimal working example:               \documentclass[10pt,xcolor=dvipsnames,pdflatex]{beamer}     \usetheme{Boadilla}     \usecolortheme{beaver}     \definecolor{darkred}{rgb}{0.8,0,0}     \setbeamercolor{structure}{fg=darkred}     \begin{document}     \begin{frame}{My pink slide}     \begin{block}{Oh my god}\centering     this is so girlish.\\     Especially when\\     the block is\\     so big\\     that it\\     is close\\     to the\\     red/grey\\     frame title.     \end{block}     \vfill     \begin{block}{}     Nice, bright block!\\     I like this and would not change its bg color.     \end{block}     \end{frame}     \end{document}


title: Problem Inserting PDF into LyX Document

text: I really hope someone can help me with this as it is driving me mad. I have tried to insert a PDF document into my thesis but when I try to create the PDF, I get the following error:                \usepackage                     {setspace}     The package graphicx has already been loaded with options:       []     There has now been an attempt to load it with options       [pdftex]     Adding the global options:       ,pdftex     to your \documentclass declaration may fix this.     Try typing  <return>  to proceed.      I've tried amending `\documentclass`, as suggested, but it's still not working. Any suggestions gratefully appreciated- I'm quite new to LyX so apologies if I have not posted enough information.


title: TikZ externalise: overlaying figures

text: I’m using `MikTex 2.9 x64` and would like to use the `LaTeX -> dvips -> ps2pdf` way to compile my document. Additionally I’ve a lot of `Matlab2tikZ` figures and would like to make use of the externalization option of `TikZ` figures as `*.eps` files because of using `latex.exe` instead of `pdflatex.exe`. It is my first time with "externalize". I found and tried on this site an example in the thread entitled "Export eps figures from TikZ". The relevant part of the answer there (MiKTeX using LaTeX) is working well and I could transfer this onto my document. BUT using the given template for my thesis the compilation finishes without any error or related warning. All Figures are correctly placed, scaled and so on. But within the creation of each figure there must be something wrong. The generated and included image consists of “multiple” layers. In the background one can find a combination of the first and third page (Yes, the whole DinA4 page! – second page is blank because of using `twoside`). And in the upper left corner in the front I can find the `TikZ` figure as a small drawing, which I'd like to get on its own. The whole “figure” is scaled as I said within the include command. Hope everyone can understand what I mean. EDIT: There is the following message all over the page:               [“includegraphics optimized away because it does not contribute to exported PDF]      ENDEDIT      Taking a look at the exported graphic files I found the combination of figures. So I think the failure occurs during the generation process. But I would have expected any error. Are there maybe any known issues or compatibility problems with other packages? Another question would be, whether it is correct that the generated files for the externalization in `eps` mode are only the following ones: `.dpth`, `.dvi`, `.log`, `.nlo`, `.ps` (->so no `.eps` file?) Thanks in advance for any help. Please let me know, if you need more information. As far as the template I’m using is limited to students writing a thesis at the institute I have seconds thought to “publish” it. But if it's necessary I think I’ll find an option.


title: Own cls to fmt conversion

text: Is it possible to convert my own `.cls` to `.fmt` conversion using PdfTeX? **NOTE:** Our peoples are frequently change/updations in class file (source `.cls` file). So that I would like to convert non-editable class format.


title: \section*{} leaves space even at the beginning of the page in memoir

text: In my document in memoir class, there is a chapter with unnumbered sections --- \section*{}. (The effect is the same if the sections are numbered but \setcounter{secnumdepth}{-1} is used.) When a new section begins at the top of a page, it leaves vertical space as if the section number were printed there. I find it odd and would have expected Latex to start at the top of the page in such a case. Is this an intended behavior --- as in 'Best Typesetting Practice'? If not, how do I suppress it?


title: Remove spaces from around a "dummy" macro

text: In the following MWE (it's minimal, so not the original problem). As you can check there is one space on both sides of `\mycommand`. While I'm making the macro "dummy" for a specific use: can I remove one of the spaces if there would be two left?               \documentclass{article}          \DeclareRobustCommand\mycommand[1]{%        \textbf{#1}%     }          \makeatletter     \newcommand\nobf[1]{%         {\def\mycommand##1{}#1}}     \makeatother          \begin{document}          \def\abc{X \mycommand{Y} Z \mycommand{!}}          \abc          \nobf{\abc}          X Z          \abc          \end{document}      There is a doubled space between the first `X` `Z` pair: ![enter image description here](http://i.stack.imgur.com/7r9CP.png)


title: Add space to previous row

text: I have a table that looks somewhat like this:               Group 1        1  2       Sub point    1  3       Subpoint     2  3     Group 2        3  4       Sub point    4  5       Pie!         3  1     Group 3        4  7       Cake?        6  8       Imma bored   4  7      The table is generated with an R-script, but the rows are outputted in a iterative fashion. (I tried using xtable, but there is a lot more parsing and string concatenation going on than shown here.) I want to add a small vertical spacing between the Group-rows and the previous row, so I get the following format:               Group 1        1  2       Sub point    1  3       Subpoint     2  3          Group 2        3  4       Sub point    4  5       Pie!         3  1          Group 3        4  7       Cake?        6  8       Imma bored   4  7      Usually, adding vertical spacing would be done with `\vspace`, but this adds spacing _after_ the row. Due to my script (and me being lazy not wanting to implement a look-ahead), I am looking for a command that increases spacing to the _previous_ row. E.g. something like               ...     &  Subpoint   &  2  & 3 \\     \multicolumn{2}{l}{\addVspaceAbove{1em} Group 2 } &   3 &  4 \\     &  Sub point  &  4 &  5 \\     ...      Thanks in advance! * * * ## Solution Thanks to Qrrbrbirlbel, a solution with both before and after:               \begin{tabular}[ht]{llcc}     \multicolumn{2}{l}{Group} & Value 1 & Value 2 \\     \hline     \multicolumn{2}{l}{Group 1 }    & 1 & 2 \\     & Sub point  & 1 & 3 \\     & Subpoint   & 2 & 3 \\     \multicolumn{2}{l}{Group 2 }       & 3 & 4 \\     & Sub point  & 4 & 5 \\     & Pie!       & 3 & 1 \\     \multicolumn{2}{l}{\rule{0pt}{\dimexpr.7em+0.5em}Group 3 }       & 4 & 7 \\     & Cake?      & 6 & 8 \\     & Imma bored & 4 & 7 \\     \end{tabular}


title: Alternative to “Lorem Ipsum”

text: Are there any alternative filler text packages besides `lorem ipsum` and `blindtext`? There seem to be a lot for the web, but I can't find any LaTeX packages and searching “alternatives to lorem ipsum” here does not return an answer. Edit: An English language package would be helpful. So would a Spanish language package. "ptext" is Farsi/Persian, but my computer is not right to left enabled. I just wondered what alternatives might be out there in the TEx world considering the wealth of html alternatives.


title: Subcaption format with cleveref

text: I need to get Figure 1.1 (a) when i put `\Cref{fig:NiceImage1}`. I have to use `\Cref{fig:NiceImage}\subref{fig:NiceImage1}` for getting same result.               \documentclass{scrbook}     \usepackage[demo]{graphicx}     \usepackage{subcaption}          \captionsetup{subrefformat=parens}          \usepackage{cleveref}          \setcounter{chapter}{1}          \begin{document}            \begin{figure}         \centering           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{Nice image1}               \label{fig:NiceImage1}           \end{subfigure}           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{Nice image 2}               \label{fig:NiceImage2}           \end{subfigure}           \begin{subfigure}{0.31\textwidth}             \includegraphics[width=\textwidth]{image1}               \caption{Nice image 3}               \label{fig:NiceImage3}           \end{subfigure}     \caption{     \label{fig:NiceImage}     Three images}     \end{figure}          Figure \ref{fig:NiceImage}          Figure \ref{fig:NiceImage} \subref{fig:NiceImage1}          \Cref{fig:NiceImage}          \Cref{fig:NiceImage1}          \end{document}


title: pdflatex (command not found) on terminal for mac

text: I just started college and this is our first assignment so please be patient with explaining this to me, guys. I've been trying to compile what I made on TeXShop but all I got is               -bash: pdflatex command not found      What do I do?


title: Store black and white information in a generated pdf

text: Last time when I printed my thesis at a copy shop the nice girl asked me if my `pdf` has some kind of color information stored inside. She explained to me that their printers can detect black and white pages and print them without using any color. Unfortunately my `pdf` which was generated using `pdflatex` (`MikTeX`, now I'm on `macTeX`) did not provide the information if a page uses any color (every page was detected as colored). Now my question is: How can I provide this information? Is there any option I have to use when generating my `pdf`? I'm asking because the price of a black and white page is one-tenth of a colored page. This makes a huge difference when printing 150+ pages. Colored pages should stay colored so black and white _only_ is not an option. * * * I printed my thesis (created with `macTeX`) yesterday and every text page was recognized correctly as being b/w only. However every page with a figure was detected colored although the figure were b/w only. Now what's the problem? Is there any option for figure to give `pdfLaTeX` a hint? According to pixelmator the png image (which was created with the osx snapshot tool from a pdf) is using the rgb profile with depth of 8. Profile Name is `Colored LCD` (I've no idea what I'm talking about ;)): ![pixelmator image info](http://i.stack.imgur.com/cjYcm.png)


title: Set Sidebar Color in Beamer Class (using xelatex)

text: I'd like to change the color of beamer sidebar, however I don't know which parameter `\setbeamercolor{}{}` wants for the sidebar color. I'm using `\usepackage{xcolor}` and specify my own colors like that: `\definecolor{myBlue}{RGB}{45,170,250}`. My tex compiler is `xelatex` Here is my tex file:               \documentclass{beamer}                                                                    % beamer theme                                                                       \usetheme{Marburg}                                                                        % german spelling                                                                    \usepackage[english,ngerman]{babel}                                                       % set font encoding                                                                  \usepackage[T1]{fontenc}                                                                  % math stuff                                                                         \usepackage{amsmath}                                                                 \usepackage{amsfonts}                                                                \usepackage{amssymb}                                                                      % color                                                                              \usepackage{xcolor}                                                                       % set font to Helvetica Light                                                        \usepackage{xltxtra}                                                                 \setsansfont[Ligatures=TeX]{Helvetica Light}                                              \title{Präsentation}                                                                 \author{Max Mustermann}                                                              \date{\today}                                                                             % removes navigation bar                                                             \beamertemplatenavigationsymbolsempty                                                     \begin{document}                                                                          \begin{frame}                                                                            \frametitle{Ein Demotitel}                                                           abcdefghijklmnopqrstuvwxyz äöüß 1234567890                                           ABCDEFGHIJKLMNOPQRSTUVWXYZ                                                       \end{frame}                                                                               \end{document}


title: What is the reason to put a tilde between "p."/"page" and the number?

text: When citing a page, the Biblatex manual puts a tilde between "p."/"page" and the number:               \footcite[Cp.][p.~23]{Smith-2013}      Why? I actually have never really googled for this and now that I have, I am unable to find any good results or think of one. I recall that I used               \footcite[Cp.][p. 23]{Smith-2013}      a couple of times and I didn't have any problems with the space disappearing or anything. Then I converted back to the tilde method just for the sake of it but did not inquire about it.


title: "itemize" with customized bullets

text: \begin{itemize}          \item blah blah blah blah          \end{itemize}      As far as I know the main difference between the code above and just writing something like               $\bullet$ blah blah blah blah      is that everything within the "item" gets indented to a point to the right of the bullet. I'd like to do that with customized bullets instead of just bullets, one of which would look like `{\bf Q:}` and another like `{\bf A:}`. That way when typing a multi-line paragraph after `{\bf Q:}` or `{\bf A:}`, the subsequent lines would be vertically aligned with the first one. How can that be done?


title: Conditional Zebra Tables

text: First, I'm using LyX with a rather long preamble because I want things fairly specific, but almost all the code in the preamble is cut-n-pasted from the 'Net with a couple modifications. I'm not a TeX guru, but I need one! I have Zebra tables throughout almost always in a Float Table environment. I also have a few Float Figure environments and I want the zebra effect to be off for these since its not really a table. Its hard to explain and it looks like I can't attach an example. What I want is a conditional (ERT is fine, but if I can fit it in the preamble, even better), that turns off Zebra tables when its in a Float: Figure environment. Here is what I use for Zebra tables (and other table formatting) ...               %     % Zebra Tables w/footnotes     %     \let\mytoprule\toprule     \renewcommand{\toprule}{\mytoprule[2pt]}     \let\mybottomrule\bottomrule     \renewcommand{\bottomrule}{\mybottomrule[2pt]}     \let\mymidrule\midrule     \renewcommand{\midrule}{\mymidrule[1pt]}     \let\tabulary\tabular     \let\endtabulary\endtabular     \renewenvironment{tabular}{\rowcolors{2}{white}{shadecolor}\tabulary}   {\endtabulary}     \usepackage{footnote}     \makesavenoteenv{tabular}      So how do I turn all that off when \tabular is in a Float: Figure environment?


title: Understanding LaTeX packages syntax

text: I've been using LaTeX for a few years for typesetting maths documents but I kind of feel there are two "kinds" of latex: the one I write my documents in and the one packages are written. My goal is not to write a package, but trying to solve problems by my own. I often find myself searching for solutions to every problem I face and the answers always involve this syntax I'm talking about, full of `@`s, and things like `\expandafter`, `\makeatletter`, `\makeatother`, `\catcode`. Since I can't understant it, I simply copy it blindly. What's the recommended resources for learning this not-so-basic latex stuff?


title: Table with gap between cmidrule's (extra space between two columns)

text: > **Example of my final solution based on Werner's suggestion can be found at > the end of this question.** I would like to make a table that looks about as this one: ![Example table created in excel](http://i.stack.imgur.com/ChrTL.png) I can get most of this to work with the following code:               \documentclass{article}          \usepackage{booktabs}          \begin{document}          \begin{table}\centering     \begin{tabular}{l c c c c}     \toprule         & \multicolumn{2}{c}{Text1} & \multicolumn{2}{c}{Text2} \\          \cmidrule{2-3} \cmidrule{4-5}         & A & B & A & B \\         \midrule     Foo & 1 & 2 & 3 & 4\\     \bottomrule     \end{tabular}     \caption{Foo matter}     \end{table}          \end{document}      which gives me this result: ![Latex table](http://i.stack.imgur.com/jlKOL.png) So far the only solution (that kind of works) that I could come up with is to add an empty column between column 3 and 4. I was however hopping that there is an easy solution that allows me to directly add some space between the two columns. This solution seems to be pretty close to what I would like but causes some problems with the last three columns (they do not appear to be cantered). Adding               \usepackage{array}     \newcolumntype{C}{@{\extracolsep{3cm}}c@{\extracolsep{0pt}}}%      to the preamble and changing begin tabular to               \begin{tabular}{l c c C c}      gives me: ![So close](http://i.stack.imgur.com/46Qic.png) That is close but not quite what I need. I did also find a few solutions to insert a space between rows but could not transfer them to columns: Row Space 1 and others. > **Solution based on answer by Werner** The solution for me is mostly what Werner suggested. I have only added values for how much the lines should be trimmed on either side. To get: ![The table I wanted](http://i.stack.imgur.com/1HyRq.png) I used:               \documentclass{article}          \usepackage{booktabs}     \usepackage{array}     \newcolumntype{C}{@{\extracolsep{3cm}}c@{\extracolsep{0pt}}}%          \begin{document}          \begin{table}\centering     \begin{tabular}{l c c c c}     \toprule         & \multicolumn{2}{c}{Text1} & \multicolumn{2}{c}{Text2} \\          \cmidrule(l{2pt}r{2pt}){2-3} \cmidrule(l{2pt}r{2pt}){4-5}         & A & B & A & B \\         \midrule     Foo & 1 & 2 & 3 & 4\\     \bottomrule     \end{tabular}     \caption{Foo matter}     \end{table}          \end{document}      * * *


title: apacite: replace "et al." when citing multi-authored papers

text: Is there a way to replace "et al." abbreviation with its counterpart in another language (Turkish) which has no default `turkish.apc` file. I'd like to replace my citations to papers with more than 2 authors with "vd." instead of "et al."


title: Pgfplots: Horizontal colorbar on top

text: I found on `pgfplots` manual ho to have an horizontal colorbar (simply specifying the `colorbar horizontal` option) but how can I put it above the axis? By default `pgfplots` puts it below the axis.. Here a MWE:               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         view={0}{90}         colormap/cool,         colorbar horizontal]         \addplot3[surf,shader=flat] {x+y};     \end{axis}     \end{tikzpicture}     \end{document}


title: Longtable strange formatting with macro in paragraph cell

text: I got an unexpected behaviour with a longtable in combination with a macro. I process a string using a macro and output the result in a paragraph cell of a longtable. In the output I see a strange spacing right in front of the macro output. I compare with manually added output from the macro, which is OK. A MWE is below. Thanks for any advice.               \documentclass{article}          \usepackage[a4paper,top=1.27cm,left=1cm,right=1cm,bottom=2cm]{geometry}     \usepackage{array}     \usepackage[demo]{graphicx}     \usepackage[utf8x]{inputenc}     \usepackage{longtable}     \usepackage{xstring}          \def\address{TEST1111 TEST1111 \\ TEST222 TEST222}          \newcommand{\fixAddress}{%         \saveexpandmode\expandarg\exploregroups     \StrSubstitute{\address}{\noexpand\\}{\newline}[\addrGlobal]%     \restoreexpandmode\addrGlobal%     }%              \newcommand{\fixAddressE}{%         \saveexpandmode\expandarg\exploregroups     \StrSubstitute{\address}{\noexpand\\}{\newline}[\addrGlobal]%     \restoreexpandmode%     }%          \relax     \show\address     \fixAddressE     \show\addrGlobal          \begin{document}              \begin{longtable}[l]{@{}>{\raggedleft}p{5cm}@{\hspace{12pt}}|@{\extracolsep{12pt}}p{13cm}@{}}         Title &\tabularnewline         Test1 & TEST1111 TEST1111 \protect \newline   TEST222 TEST222 \tabularnewline     \textbf{Heading} & \fixAddress \tabularnewline     \textbf{Heading2} & \addrGlobal \tabularnewline      Test2 & TEST1111 TEST1111 \protect \newline   TEST222 TEST222 \tabularnewline     Description & \begin{itemize}  \item Lorem ipsum  \item ...\end{itemize}\tabularnewline     Text & \begin{itemize}  \item Further stuff  \item ...\end{itemize}\tabularnewline     \end{longtable}          \end{document}      EDIT: I added the output (MikTex 2.9). Note the different text start positions. ![Sample output](http://i.stack.imgur.com/Ulb12.jpg) EDIT2: \listfiles output:               *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     geometry.sty    2010/09/12 v5.6 Page Geometry     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)     ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     geometry.cfg     array.sty    2008/09/09 v2.4c Tabular extension package (FMi)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive     dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     inputenc.sty    2008/03/30 v1.1d Input encoding file     utf8x.def    2004/10/17 UCS: Input encoding UTF-8     ucs.sty    2004/10/17 UCS: Unicode input support     uni-global.def    2004/10/17 UCS: Unicode global data     longtable.sty    2004/02/01 v4.11 Multi-page Table package (DPC)     xstring.sty    2013/1/13  v1.7  String manipulations (C Tellechea)     ucsencs.def    2003/11/29 Fixes to fontencodings LGR, T3     omscmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions


title: Defining some newcommand with \href, Problems of ##

text: I want to set a new command which aims at using href (from hyperref package) but by providing some hypertarget as argument of the new command for a specific pdf. Classical use of hypperref and href is : In first document A, I put some hypertarget :               \hypertarget{fileAhypertarget}{Should come to this}      In the second document B, I make a reference to hypertarget of document FileA.pdf               \href{fileA.pdf#fileAhypertarget}{Let's go to file A!}      Please notice that syntax of href for url in pdf use a # symbol It works, but now I want to define a command of this type               \newcommand{\myhref}[2]{\href{fileA.pdf##1}{#2}}      But it does not work as # symbol of href command enters in conflict with `#` symbol of arguments of `\newcommand`. Have you any idea, I try different syntax, \protect and thought to \expandafter but I failed. If you have any idea, Thanks a lot


title: \itemize vs. \begin{itemize} not behaving as expected

text: I want to write a wrapper macro for an `itemize` environment. I would like to use the `enumitem` package (though the MWE here doesn't use or need this package). The problem is the parameters that I'm passing to the `itemize` environment may themselves be encoded inside another macro. So for the wrapper macro, I wanted to write something like               \expandafter\itemize\expandafter[\anothermacro]      to handle this. But I got very unexpected results. For some reason, the following two styles to embedding an `itemize` environment in a wrapper macro don't work identically. The first style just uses `\begin{itemize}` followed by content and then a closing `\end{itemize}`. The second style used `\itemize` followed by content and then a closing `\enditemize`. But in the second style, I get nested environments. Not at what I'm expecting.               \documentclass{article}     \pagestyle{empty}     \usepackage{xparse}     \ExplSyntaxOn     \clist_new:N \l_ae_itemize_clist     %%--------------------------------------------------------------------------------     %% Style A                                                                             \cs_new:Npn \_ae_itemize_a:nn #1#2        {         \clist_set:Nn \l_ae_itemize_clist { #2 }          \begin{itemize}         \clist_map_inline:Nn \l_ae_itemize_clist           { \item ##1 }         \end{itemize}       }          \NewDocumentCommand{\aefooda}{ O{}mm }         { \par\textbf{#2:}           \_ae_itemize_a:nn {#1}{#3}         }     %%--------------------------------------------------------------------------------     %% Style B                                                                             \cs_new:Npn \_ae_itemize_b:nn #1#2        {         \clist_set:Nn \l_ae_itemize_clist { #2 }          \itemize         \clist_map_inline:Nn \l_ae_itemize_clist           { \item ##1 }         \enditemize       }          \NewDocumentCommand{\aefoodb}{ O{}mm }         { \par\textbf{#2:}           \_ae_itemize_b:nn {#1}{#3}         }          \ExplSyntaxOff     \begin{document}          \textbf{Style A} works fine:     \aefooda{first}{a,b,c}          \aefooda{second}{a,b,c}          \aefooda{third}{a,b,c}          %%--------------------------------------------------------------------------------     %% Changing from style A to style B                                                    %%--------------------------------------------------------------------------------          \textbf{Style B} doesn't work:     \aefoodb{first}{a,b,c}          \aefoodb{second}{a,b,c}          \aefoodb{third}{a,b,c}          \end{document}      ![enter image description here](http://i.stack.imgur.com/IRvZz.png) **UPDATE** I've also tried something like the following:               \edef\aeBeginItemize[#1]{\noexpand\begin{itemize}[#1]}     \cs_new:Npn \_ae_itemize_c:nn #1#2        {         \clist_set:Nn \l_ae_itemize_clist { #2 }         \aeBeginItemize[#1]         \clist_map_inline:Nn \l_ae_itemize_clist           { \item ##1 }         \end{itemize}       }      But when I try to use it, I get an error from the `enumitem` package: it seems that `enumitem` is not longer able to process the keys correctly.


title: How to print a row of points (or any other character) in plain TeX?

text: I need something like the following ..................................................................................................................................................................... and something like (a word)........................................................................................................................................(a word) How can I do them?


title: Custom phonetic font with tipa and fontspec

text: I've been trying to typeset a document that has _a lot_ of phonetic transcriptions, and I'm trying to do it using Tex Gyre Bonum for the body and Charis SIL for the phonetic transcriptions. I'm trying to load these with `fontspec`, but `tipa` is famous for not playing along when `fontspec` is involved. My initial attempt (based on egreg's answer to this question) was to redefine the `textipa` command to use a custom font:               \newfontfamily{\ipafont}{Charis SIL}     \AtBeginDocument{       \renewcommand\textipa[1]{{\ipafont\tipaencoding #1}}     }      but that didn't work (see image below to see _how_ it didn't work). What is odd is that it did work if I used the same instructions in an entirely new command and using the default `textipa` command. But that, of course, meant that the source was no longer compilable using regular `tipa`... So, **how can I redefine`textipa` to work with a font of my choosing without having to input some of the characters myself?** Here's an MWE to show all the different types of fail:               \documentclass{article}     \usepackage{tipa}     % \expandafter\def\csname ver@xunicode.sty\endcsname{}     \usepackage{fontspec}          \setmainfont{TeX Gyre Bonum}     \newfontfamily{\ipafont}{Charis SIL}          \newcommand{\mytipa}[1]{{\ipafont \textipa{#1}}}          \begin{document}          \begin{itemize}          \item This works only without \texttt{fontspec}:       \textipa{\t{\=*{t}S}}          \item With \texttt{fontspec} and custom \texttt{ipafont}       this fails:       {\ipafont \textipa{\t{\=*{t}S}}}       ; but this works:        {\ipafont \textipa{\t{ṯS}}}          \item Likewise, with a custom command,       this fails:       \mytipa{\t{\=*{t}S}}       ; but this works:       \mytipa{\t{ṯS}}          \renewcommand\textipa[1]{{\ipafont \tipaencoding #1}}          \item But with a redefined \texttt{textipa} command       this fails:       \textipa{\t{\=*{t}S}}       ; and this \textit{also} fails:       \textipa{\t{ṯS}}          \end{itemize}          \end{document}      And the output: ![enter image description here](http://i.stack.imgur.com/a6cJm.png) ALSO: In a follow-up question Joseph Wright recently provided a solution to similar issues to those raised when compiling the MWE (and that's the commented line at the beginning). However, as you can see by uncommenting it, even though it makes all the lines work (except those with `ṯ` in the source), it makes them work using the default `tipa` font, which is not what I want.


title: Multiplication with xlop

text: When I use the xlop package command               \opmul[displayintermediary=None]{453}{1001205}      to display the multiplication of 453 and 1001205 without the intermediary steps, pdflatex gives me errors. This example comes straight from the xlop documentation. Is there an easy fix? All other xlop commands seem to work fine for me.


title: \normalsize for \section, \subsection and \subsubsection

text: I tried to change the font size of titles using `titlesec`, I want all my document in normalsize, and I have an error. Please help me. The error description is: > >     Runaway argument? >     ./Thesis.tex:13: Paragraph ended before \ttl@format@ii was complete. >     <to be read again> >   This is my code:               \documentclass[10pt, a4paper]{article}          \usepackage{fontspec}     \setmainfont{Arial}     \usepackage{lipsum}     \usepackage[ampersand]{easylist}          \usepackage{titlesec}     \titleformat{\section}{\normalsize}     \titleformat{\subsection}{\normalsize}     \titleformat{\subsubsection}{\normalsize}          \usepackage{tikz}          \setlength{\hoffset}{.46cm}     \setlength{\oddsidemargin}{13.08pt}     \setlength{\evensidemargin}{0cm}     \setlength{\marginparwidth}{0cm}     \setlength{\topmargin}{-7mm}     \setlength{\marginparsep}{0cm}     \setlength{\headheight}{8mm}     \setlength{\headsep}{4.6mm}     \setlength{\textheight}{24cm}     \setlength{\footskip}{8mm}     \setlength{\textwidth}{15.5cm}          \usepackage{fancyhdr}     \pagestyle{fancy}      \lhead{\footnotesize{Text}\\ \footnotesize{Text}}%      \chead{}%Vac      \rhead{\footnotesize{Text}}      \lfoot{\footnotesize{Text}\\       \footnotesize{Text}}%      \cfoot{}      \rfoot{\footnotesize{Text}}           \renewcommand{\headrulewidth}{0.4pt}%      \renewcommand{\footrulewidth}{0.4pt}          \usepackage[pass]{geometry}          \begin{document}          \begin{titlepage}          \begin{center}          \begin{huge} \textbf{TEXT}\end{huge}\\     \vspace*{.4cm}     \begin{Large} \textbf{TEXT}\end{Large}\\     \vspace*{.4cm}     \begin{LARGE} \textbf{TEXT}\end{LARGE}\\     \vspace*{1.5cm}               \begin{tikzpicture}[scale=2.5]          \definecolor{rucv}{rgb}{.88,0.077,.1}     \definecolor{bucv}{rgb}{.001,.086,.55}          \draw(2.6,.58)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{TEXT};          \draw(2.6,.3)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{T\Large{EXT} \huge{T}\Large{EXT}};          \end{tikzpicture}          \vspace*{1cm}          \begin{LARGE} \textbf{"TEXT}\end{LARGE}\\     \vspace*{.5cm}     \begin{LARGE} \textbf{     TEXT"}\end{LARGE}\\     \vspace*{1cm}     \begin{large} TEXT:\end{large}\\     \vspace*{.6cm}     \begin{LARGE} \textbf{TEXT}\end{LARGE}\\     \vspace*{.8cm}     \begin{large}Elaborado por:\end{large}\\     \vspace*{.4cm}     \begin{Large} \textbf{Text}\end{Large}\\     \vspace*{.8cm}     \begin{large}Text:\end{large}\\     \vspace*{.4cm}     \vspace*{2cm}     \begin{Large} \textbf{TEXT}\end{Large}\\     \vspace*{.4cm}     \begin{Large} \textbf{2013}\end{Large}\\     \vspace*{.4cm}          \end{center}     \end{titlepage}               \tableofcontents     \newpage     \section{TITLE}     \section{TITLE}     \subsection{Subtitle}     \subsection{Subtitle}     \section{TITLE}     \lipsum     \subsection{Subtitle}     \subsection{Subtitle}     \subsubsection{Title}     \begin{easylist}     & Title     & Title     && Subtitle     &&& Title     & Title     \end{easylist}          \subsubsection{Title}     \subsection{Subtitle}     \section{TITLE}     \subsection{Subtitle}     \subsubsection{Title}          \end{document}


title: Drawing recursive randomized structures with TikZ

text: After I learned earlier today how to draw nice randomized trees (Draw randomized tree in TikZ) , I discovered that I'm not quite satisfied with how the results look like - because the structure I want to draw is not really a tree, but actually a shower of high energy particles. Here's the best I can do:               \documentclass{article}          \usepackage{tikz}     \usepackage{xkeyval}     \usepackage{etoolbox}     \usepackage{ifthen}          \makeatletter     \define@key{hepshower}{nTracks}{\edef\nTracks{#1}}     \define@key{hepshower}{phimin}{\edef\phiMin{#1}}     \define@key{hepshower}{phisep}{\edef\phiSep{#1}}     \define@key{hepshower}{phimax}{\edef\phiMax{#1}}     \define@key{hepshower}{rmin}{\edef\radMin{#1}}     \define@key{hepshower}{rmax}{\edef\radMax{#1}}     \define@key{hepshower}{br}{\edef\branchingProbability{#1}}     \define@key{hepshower}{maxdepth}{\edef\maxDepth{#1}}     \presetkeys{hepshower}{nTracks=5,phimin=-90,phimax=90,rmin=0.5,rmax=1.0,phisep=10,br=0.9,maxdepth=3}{}          \newcommand\drawshower[2][]{       \typeout{#2}       \setkeys{hepshower}{#1}{         \foreach \i in {1,...,\nTracks} {           \pgfmathparse{(\radMax-\radMin)*rnd+\radMin}           \edef\radVal{\pgfmathresult}           \pgfmathparse{\phiMin+(\phiMax-\phiMin)*(\i-1)/\nTracks + rnd * ((\phiMax-\phiMin)/\nTracks-\phiSep) + \phiSep/2}           \edef\phiVal{\pgfmathresult}           \typeout{#2 \i : \phiVal - \radVal}           \edef\coordname{#2-showerchild\i}           \coordinate (\coordname) at (\phiVal:\radVal);           \draw[black] (#2) --  (\coordname);           \pgfmathparse{(\radMax-\radMin)*rnd+\radMin}           \pgfmathparse{rnd}           \ifnumcomp{\maxDepth}{>}{0}{             \ifthenelse{\lengthtest{\pgfmathresult pt<\branchingProbability pt}}{               \drawshower[#1,maxdepth=\maxDepth-1]{\coordname}             }{}           }{}         }       }     }          \makeatother          \begin{document}     \begin{tikzpicture}       \coordinate (test);       \drawshower[phimin=0,phimax=180]{test};     \end{tikzpicture}     \end{document}      If you run the output, you see from the `\typeout`s that all the nodes are created and everything seems to work - apart from the fact that only the first iteration seems to be drawn. I think this has something to do with the polar coordinates, but I can't quite figure out what's wrong with it. * * * ## Edit Follwing a comment from Qrrbibel, here is an image of a shower that looks like what I was hoping for: ![Atmospheric Collision](http://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Atmospheric_Collision.svg/400px- Atmospheric_Collision.svg.png) As you can see, it has a tree-like structure, but the nodes from different branches are not leveled and the lines are decreasing in length and varying in angle as the tree expands, giving the whole thing a somewhat more realistic look as compared to purely schematic trees.


title: how to vertically align a cell in a table?

text: I have a table that I define               \begin{tabular}{lllllllllllll}     \includegraphics[width=7.3in]{img1.pdf} &     \includegraphics[width=7.3in]{img2.pdf} &     \includegraphics[width=7.3in]{img3.pdf} &      \includegraphics[width=7.3in]{img4.pdf} &     \includegraphics[width=7.3in]{img5.pdf} &     \includegraphics[width=7.3in]{img6.pdf} \\     \includegraphics[width=7.3in]{img7.pdf} &     \includegraphics[width=7.3in]{img8.pdf} &     \includegraphics[width=7.3in]{img9.pdf} &     \includegraphics[width=7.3in]{img10.pdf} &     \includegraphics[width=7.3in]{img11.pdf} &     \includegraphics[width=7.3in]{img12.pdf} \\     \includegraphics[width=7.3in]{img13.pdf} & \multicolumn{12}{|c}{     \hspace{3cm} \includegraphics[width=92cm]{i3} }     \end{tabular}      Not all images are of the same height. I want all of the images to be aligned to the top of the tabular cell, instead of the bottom, which seems to be the case now. How would I do that?


title: Wrong position (on separate page) of sideways figures in amsart

text: I run into a problem when running sidewaysfigure in amsart. The code below illustrates               \documentclass[a4paper,reqno]{amsart}     %\documentclass{article}     \usepackage{graphicx}     \usepackage[figuresright]{rotating}          \begin{document}          \begin{sidewaysfigure}     \centering     \rule{0.75\textheight}{0.5\textheight}     \caption{dummy figure}     \end{sidewaysfigure}          \end{document}      When I compile this in amsart the black square is not allinged correctly (the top is cut off). When I compile in article the problem goes away. I would rather stick to amsart so am wondering if anyone has encountered this issue before / knows of a fix? I've used a combination of landscape and afterpage, which doesn't cause this issue but can lead to pretty random gaps appearing in the text and some other funnies with more figures involved, so I'd rather stick to sidewaysfigure if possible. Thanks in advance for your help. Pawel


title: How can I really force the hyphenation points of a word?

text: I try to make XeLaTeX hyphenate the German word "Sicherheitsbeauftragter". I tried several values for `x` in `\tolerance=x` and instances of `\hyphenation{Si-cher-heits-be-auf-trag-ter}`. Nothing worked. MWE:               \documentclass{article}     \usepackage{polyglossia}     \setmainlanguage{german}     \usepackage{array}     \usepackage{ragged2e}     \hyphenation{Si-cher-heits-be-auf-trag-ter}      \begin{document}     \begin{tabular}{>{\RaggedRight}p{7.7em}@{|}}     Sicherheitsbeauftragter\\     Technischer Leiter     \end{tabular}     \end{document}      ![Screenshot of hyphenation not working](http://i.stack.imgur.com/PZadQ.png) I also tried `babel` instead of polyglossia and `pdfLaTeX` instead of `XeLaTeX` but except for how the "|" looks, there is no difference.


title: Why must we change = to # when working with ps2pdf in Windows?

text: 1. Which is the correct syntax for `-dAutoRotatePages=/None` passed to `ps2pdf` in Windows?               ps2pdf -dAutoRotatePages=/None input.ps output.pdf       or              ps2pdf -dAutoRotatePages#/None input.ps output.pdf      ?   2. Why is there a slash in `/None`?   3. And why cannot we use `=` in Windows?


title: Setting a common prefix for macro names

text: Is it possible to set a common prefix for all macros in a package? Something like:               \def\prefix{mypackage}          \newcommand{{\prefix}macroone}{ ... } % does not work, of course     \newcommand{{\prefix}macrotwo}{ ... }      One would then call the macros as `mypackagemacroone` and `mypackagemacrotwo`.


title: Does Kile support Column/Block Selection?

text: Is it possible to select a rectangular area in a file with Kile, using the mouse or the keyboard? If so, how?


title: Callout pointing at wrong direction

text: I wonder why my callout pointer is pointing at the wrong direction. It should point towards the coordinate (-2,1). What am I doing wrong here?               \documentclass[tikz]{standalone}          \usepackage{kpfonts}     \usepackage{tkz-fct}     \usetkzobj{all}     \usetikzlibrary{shapes.callouts}                \begin{document}          \begin{tikzpicture}[>=stealth', remember picture, note/.style={rectangle callout, fill=#1}]     \tkzInit[xmin=-2.5,xmax=1.75,ymin=-0.5,ymax=2.7,xstep=1,ystep=1]     \tkzAxeXY     \tkzFct [<-,style={draw},domain=-2.3:-1,thick,outer sep=0pt] {(x+1)**2}     \tkzFct [domain=-1:0,thick] {2*x+2}     \tkzFct [domain=0:1,thick,outer sep=0pt] {2-x}     \tkzFct [->,domain=1:1.6,thick,outer sep=0pt] {x**2}     \tkzDefPoint(-1,0){A}     \tkzDefPoint(0,2){B}     \tkzDefPoint(1,1){C}     \tkzDrawPoints[size=3](A,B,C)     \tkzDefPoint(-2,1){D}     \tkzDefPoint(1.5,2.25){E}     \tkzDefPoint(-1.5,2){F}     \tkzDefPoint(0.75,2.3){G}     \tkzDrawSegments[very thin](D,F E,G)     %\tkzDrawPoint[size=3](C)     \node [above] at (G) {\scriptsize $y=x^2$};     \node [above, callout relative pointer={(-2,1)},rounded corners,note=green!50, opacity=.5, overlay] at (F) {\scriptsize $y=(x+1)^2$};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/ktbON.png)


title: How to invert list used for a tikz foreach loop

text: Given               \def\stuff{a,b,c}      I would like to be able to do               \foreach \x in {c,b,a} {...}      without inverting the list `\stuff` manually. For example is there some sort of `\invert` macro that would allow me to write               \foreach \x in \invert{\stuff} {...}


title: Fail to sort nomenclature using prefix

text: I'm trying to get my nomenclature to sort alphabetically, including word with accent. Basics! Well, I read all `\nomencl` documentation and many of your expert answers here... So I tried different things, inserted a prefix and modified my `build.bat` to run LaTeX, `makeindex <filename>.nlo -s nomencl.ist -o <filename>.els`, rerun LaTeX, then pdflatex...               \documentclass[11pt,a4paper,twoside]{book}          \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern}     \usepackage{titletoc}     \usepackage{tocloft}     \usepackage{nomencl}     \usepackage{makeidx}     \usepackage[frenchb]{babel}          \makenomenclature          \begin{document}          \printnomenclature[7em]          \nomenclature{déc.}{Décision}     \nomenclature[e]{éd.}{édition}     \nomenclature{Gaz. Pal.}{Gazette du palais}          \end{document}      For some reason, it's still not working for me... I'm close to take it personally!


title: Seeking an explanation for a tikzpicture code

text: I have found the following solution in stackexchange. It has been perfectly answered here by @Jake.               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         set layers=standard,         domain=0:10,         samples y=1,         view={40}{20},         hide axis,         unit vector ratio*=1 2 1,         xtick=\empty, ytick=\empty, ztick=\empty,         clip=false     ]     \def\sumcurve{0}     \pgfplotsinvokeforeach{0.5,1.5,...,5.5}{         \draw [on layer=background, gray!20] (axis cs:0,#1,0) -- (axis cs:10,#1,0);         \addplot3 [on layer=main, blue!30, smooth, samples=101] (x,#1,{sin(#1*x*157))/(#1*2)});              \addplot3 [on layer=axis foreground, very thick, blue,ycomb, samples=2] (10.5,#1,{1/(#1*2)});         \xdef\sumcurve{\sumcurve + sin(#1*x*(157))/(#1*2)}     }     \addplot3 [red, samples=200] (x,0,{\sumcurve});          \draw [on layer=axis foreground]  (axis cs:0,0,0) -- (axis cs:10,0,0);     \draw (axis cs:10.5,0.25,0) -- (axis cs:10.5,5.5,0);     \end{axis}     \end{tikzpicture}     \end{document}      I really liked the solution. I would be thankful if someone could explain the following features that have been utilized in the code so that I learn it and use it in the future.   * `\pgfplotsinvokeforeach`: I read the manual and I still do not see its difference with `\foreach`. Why we are not using `foreach`?   * `\addplot3 (x,#1,{sin(#1*x*(157))/(#1*2)});`: what is the difference between `x` and `#1` in this line code? What values `x` will take?   * `\def\sumcurve{0}`: Does this one defines `y=0` curve?   * I am a little bit confused about the layers in the code. Why do we need the layers?   * `unit vector ratio*=1 2 1`: Is this used to simulate a nice three dimensional graph as shown here?


title: Missing data points in PSTricks plot

text: Consider the following example:               \documentclass{article}          \usepackage{pst-plot}          \begin{document}          \psset{xunit=0.1,yunit=0.002}     \savedata{\data}[{1924,300},{1928,510},{1932,310},{1936,880},{1948,700},     {1952,730},{1956,820},{1960,660},{1964,1100},{1968,1160},     {1972,1220},{1976,1130},{1980,1070},{1984,1300},{1988,1430},     {1992,1810},{1994,1750},{1998,2176},{2002,2399}]     \begin{pspicture}(-9,-240)(102,2950)       \psaxes[         dx=10,         dy=500,         labels=none,         ticklinestyle=dotted,         tickwidth=0.5pt,         xticksize=0 2500,         yticksize=0 90       ]{->}(0,0)(0,0)(95,2750)[Year,0][Participants,90]       \psaxes[         Ox=1920,         Dx=10,         Dy=500       ](0,0)(0,0)(95,2750)       % Data (NOT working)       \dataplot[         plotstyle=dots,         dotstyle=o,         fillcolor=red       ]{\data}       % Years 1924--1976       \psplot[         linecolor=blue,         algebraic       ]{4}{56}{15.6394*x+303.3}% Regression with Mathematica       % Years 1980--2002       \psplot[         linecolor=blue,         algebraic       ]{60}{82}{60.793*x-2619.99}% Regression with Mathematica     \end{pspicture}          \end{document}      ![output](http://i.stack.imgur.com/k7u2l.jpg) How do I show the data in the plot? I was thinking of using `\pstScalePoints` to scale the data on the x-axis but this only works with `listplot` according to the manual. P.S. I will really like _not_ to use `psgraph`; I'm not a big fan of the syntax.


title: Equation number enclosing parentheses misplaced with Polyglossia+Hebrew+amsmath

text: I am compiling the following MWE using XeLatex within TeXnicCenter and get a garbled equation number:               \documentclass{article}     \usepackage{amsmath}     \usepackage{polyglossia}     \setmainlanguage{hebrew}     \newfontfamily{\hebrewfont}{Arial}          \begin{document}     \begin{equation}\label{eq:1}     2+2=4.     \end{equation}     \end{document}       ![enter image description here](http://i.stack.imgur.com/cYIck.jpg) What is going on here?


title: Add a second label to a path in an automaton

text: Friends, consider the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{automata}     \usetikzlibrary{positioning}          \begin{document}          \begin{tikzpicture}[shorten >=1pt,,node distance=4cm,on grid,auto, /tikz/initial text={start}]     \node[state, initial, accepting] (q0) {0};     \node[state] (q1) [right=of q0] {1};     \path[->] (q0) edge [bend left] node {on} (q1)                (q1) edge [bend left] node {off} (q0)     ;     \end{tikzpicture}          \end{document}      This code produces the following output: ![Automaton](http://i.stack.imgur.com/dxkrp.png) Pretty straightforward, I guess. `:)` I was wondering if it would be possible to add a second label to each one of those paths in a way I don't need to calculate their coordinates and hardcode them into the picture. My idea for a second label would is to put the text in the opposite direction of the primary label. `:)` As a bonus, I was wondering how challenging would be to make the second label a little different than the first one, say, like this gimp'ed image: ![Second image](http://i.stack.imgur.com/Mstds.png) Any hints on how to achieve this? `:)` I am already happy if a second label is possible, even without these bells and whistles.


title: Make first word in macro bold

text: I have the following use-case:               \cmd{cp \opt{r} \marg{from} \marg{to}}      This should typeset a UNIX command for a manual. I’d like the actual command (here, `cp`) to be typeset in bold while the rest of the command line is typeset normally. Now, I could obviously just write something along the following lines:               \cmd{\textbf{cp} \opt{r} \marg{from} \marg{to}}      … but I’d prefer if this were possible automatically. I thought of two approaches but cannot get either to work:   1. Make everything bold, cancel bold for nested commands:              \newcommand*\cmd[1]{%         \texttt{\textbf{#1}}     }     \newcommand*\opt[1]{%         \undobf{-#1}     }      … problem: how would `\undobf` look like? `\textrm` isn’t appropriate here since I need to preserve the `tt` style.   2. Define a TeX command containing a space in its arguments:              \newcommand*\cmd[1]{%         \texttt{\setcmd#1}     }     \def\setcmd#1 #2{%         \textbf{#1} #2     }      But this doesn’t work at all, probably because I’m botching the syntax. But even once the syntax is fixed, this still won’t work for cases where I provide no arguments/options for a command (e.g. `\cmd{pwd}`).


title: problems installing mathtools

text: There have been a few questions regarding installing this package in the past, but they now seem to be out of date. I'm using MiKTeX 2.9 and TexMaker. When I try `\usepackage{mathtools}` in TexMaker it will try to install the package for me but will fail. I took the advice given in this thread: How to install mathtools package? As suggested I tried installing the `mh` package using the MiKTeX Package Manager, unfortunately I get the "unknown archive size" error, which I have read means that the package no longer exists. Another thread (lost the link) said you can use the MiKTeX Package Manager to directly install `mathtools`, however I do not see `mathtools` listed anywhere in the MiKTeX Package Manager... So I ask, is the package under a different name? Are there any other ways to install this package?


title: Justifying code according to corresponding elements indentation

text: How do I justify my comments as to inner for loop indentation in the below code:               \documentclass[a4paper]{article}     \pagestyle{empty}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage[caption=false,font=footnotesize]{subfig}     \begin{document}     \begin{algorithm} \label{algoQ}     \caption{Algorithm to check quality of methods}     \begin{algorithmic}     \For{\textbf{each} $methods$ in$methodList$}     \For{\textbf{each} $msd$ in$msdList$}  \Comment { \% for each MSD \%}     \Statex   \Comment { \% get MSDs referenced method service \%}     \EndFor \textbf{endFor}     \EndFor \textbf{endFor}     \end{algorithmic}     \end{algorithm}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uVCHH.png)


title: How to use a counter inside node<> in TikZ?

text: I'm trying to draw nodes one by one on a list of predefined coordinates.               \documentclass{beamer}     \usepackage{caption}       \usepackage{pgf,tikz}     \usetikzlibrary{arrows,shapes,calc,intersections,through,backgrounds}          \begin{document}     \begin{figure}[b]        \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]                       \coordinate (a) at (1,4);            \coordinate (b) at (1,5);            \coordinate (c) at (1,6);            \coordinate (d) at (1,7);                 \newcounter{count}            \setcounter{count}{1}            \foreach \name in {a,b,c,d}            {               \node<\the\value{count}->[circle,inner sep=0pt] at (\name) {$$};               \stepcounter{count}            }             \end{tikzpicture}     \end{figure}     \end{document}              I've the above MWE, which I'd figured after looking at some other answers on TeX.SE, but I'm confounded by the error message generated by LaTeX:               ! LaTeX Error: Command \c@count already defined.                Or name \end... illegal, see p.192 of the manual.      Any help in the right direction would be appreciated!


title: Add table titles from captions in scrreprt class

text: I am badly looking for a way to give all my tables the same title in the document, that is used in the list of tables via `caption[title]{long description...}`. The reason is that my tables originate from R (xtable), which uses the exact above format every single time I recompute them, and I cannot change that. So unfortunately I could not make use of any different solutions. This is a very important matter to me because I have a lot of tables in my document. Here is a MWE. As you can see the titles are missing, and only the labels are visible. The indentation in the longer description is on purpose. Edit: I made a picture to better illustrate this: ![enter image description here](http://i.stack.imgur.com/Q7VBg.png)                 \documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}     \usepackage[labelfont={small,bf}, textfont=small,   labelsep=colon,singlelinecheck=false,format=plain, parindent=1em]{caption}     \newlength\myindention     \DeclareCaptionFormat{myformat}%     {#1#2\\\hspace*{\myindention}#3}     \setlength\myindention{1em}     \captionsetup{format=myformat}          \usepackage{chngcntr}     \counterwithout{table}{chapter}           \begin{document}          \listoftables          \chapter{Introduction}     \begin{table}[h]     \caption[title table 1]{description table 1}     \fbox{content}     \end{table}          \begin{table}[h]     \caption[title table 2]{description table 2}     \fbox{content}     \end{table}          \end{document}      Thanks for any help. Best regards, Tom.


title: TikZ and compatibility of PGF

text: Reading several posts I understand that TikZ does not support the newer PGF library.   1. How do I downgrade PGF to the last supported version?   2. Are packages other than TikZ become non-compatible by this downgrade?   3. I'm using TikZ for flowcharts. Is there a package other than TikZ that enables flowcharts but does not require downgrade of anything?


title: Is it possible to adjust the vertical spacing between figures inside a figure environment

text: My aim is to increase or decrease the vertical spacing between figures inside the same figure environment. I have tried the `subcaptions` package and the commands `vspace` and `vspace*`, but they did not work. A working example follows below(I included all of the preamble):               \documentclass[12pt,oneside,notitlepage,abstracton,a4paper,demo]{scrartcl} %Draft mode for seeing overflow, underflow     %\documentclass[draft]{article} % Familiar old article class     \usepackage[utf8]{inputenc} % Encoding     \usepackage{epsfig}     \usepackage{scrpage2}     \usepackage{graphicx}     \usepackage[usenames, dvipsnames]{color}     \usepackage[linkcolor=blue, citecolor=red, urlcolor=blue]{hyperref} %References inside the document     \usepackage{hypcap} % Right anchoring for floats     \usepackage{siunitx} % SI units     \usepackage{amsmath, amsfonts, amssymb} % American Mathematical Society      \usepackage[english]{babel}      \usepackage[nottoc]{tocbibind}     \usepackage[tmargin=2.5cm, bmargin=2.5cm, lmargin=2.5cm, rmargin=2.5cm]{geometry}     \usepackage{float}     \usepackage{morefloats}     \usepackage{subfigure}     \usepackage{subfigure}     \usepackage{mathrsfs}     \usepackage{xfrac}     \usepackage{needspace}      \usepackage{wrapfig} % Wrapping figure, tables around text     \usepackage{cancel} % MET E in this case     \usepackage{multirow} % Table entries spanning multiple rows/columns     \usepackage{booktabs}     \usepackage{rotating} % For sideways environment     \hypersetup{colorlinks=true}     %\geometry{tmargin=2.5cm, bmargin=2.5cm, lmargin=2.5cm, rmargin=2.5cm}     \setcounter{secnumdepth}{3}     \setlength{\parindent}{0em}     \setlength{\parskip}{0ex plus0.5ex minus0ex}     \pagestyle{scrheadings}     \bibliographystyle{unsrt}        \renewcommand{\headfont}{\normalfont}     \cfoot{\pagemark}     \begin{document}     \begin{figure}[H]         \centering         \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/CF.png}}         \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/CF.png}}         %vspace does not work here         \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/hNlep.png}}         \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/hNlep.png}}     \end{figure}     %vspace works here     \begin{figure}[H]         \centering         \includegraphics[width=.45\textwidth]{300PLOTS50/CF.png}         \includegraphics[width=.45\textwidth]{300PLOTS140/CF.png}         \includegraphics[width=.45\textwidth]{300PLOTS50/hNlep.png}         \includegraphics[width=.45\textwidth]{300PLOTS140/hNlep.png}     \end{figure}     \end{document}


title: How to Return to an Earlier State of a Document

text: Recently, I have lost a great amount of work on a project in LaTeX because of unwittingly saving changes when cutting out a large chunk of text and copying the remaining part. I was wondering if there was any way to bring back a version of a LaTeX document from a previous time to this incident. I know such a function is available on Google Docs, but is it available here? If so, how? Thanks!


title: Showkeys package with very small margins

text: Hi I am working on an appendix which has very large tables. Since I have these tables , I have narrowed the margins as much as possible so that they fit properly. I am also using the showkeys package to cross-reference easily the appendix with the main article but since my margins are to narrow, I can't seem to print the complete label. I was wondering, is there a way to print the labels in vertical mode? Here is my minimal working example.               \documentclass[10pt]{article}     \usepackage{geometry}     \geometry{letterpaper}     \geometry{margin=1.5cm}     \usepackage{showkeys}     \usepackage{todonotes}          \begin{document}          \begin{figure}[H]     \caption{Example figure}     \begin{center}     \missingfigure[figwidth=0.7\textwidth]{Testing a long text string}     \end{center}     \label{add:label}     \end{figure}          \end{document}      This produces me an output like this: ![enter image description here](http://i.stack.imgur.com/v5YhB.png) You can see the label cropped at the left side. As you may see, this does not work for me. Is there any way to show the complete label without having to reduce the margins?


title: Add space between two images

text: Hello I want add space between two images like this:               \begin{figure}         \includegraphics[width=\textwidth]{test1.png}         \vspace{2cm}         \includegraphics[width=\textwidth]{test2.png}         \caption{ActionButton}         \label{ActionButton}     \end{figure}      but it's add space between test2.png and the caption... How can I solve it? Regards


title: Is there a good xypic editor?

text: I'm using LyX for my LaTeX editing, and I use LyX's matrix editing capabilities to edit `xypic` matrices. While this is much more comfortable than editing raw `xypic` LaTeX code, it can get quite messy when I try to use it for large graphs. Is there any graphical `xypic` editor that can help me with that? A program that allows me to graphically draw graphs, and export them as `xypic` LaTeX code?


title: Including a text file in LaTeX

text: I write a program by DevC++ compiler and save it by .cpp format, and want to paste the code in my editor, Do I have to paste all the code each time? Is there a way to include the file instead of copying and pasting the code over and over? I suppose there should be a way because for a program of about 100 lines the including the file is more convenient.


title: pgf-Tikz QR code generator

text: I am looking for a `Tikz` QR code generator. I am aware of `pst-barcode` as well as several "local" programs, a luatex solution and web services to do this. Nevertheless, if at all possible, I would much prefer a `Tikz` replacement working with `pdflatex/xelatex` as well, since this is the most common baseline at the moment. If this doesn't yet exist, I would be willing to award a bounty on the creation of one. However I will wait until someone expresses interest in doing so, since I am not sure how long this might take. This link contains a couple of links to the spec and possibly helpful implementations. # Bounty promise I promise that I, **tohecz** , will award a bounty of 300-500 rep points on this question, as soon as it gets a reasonably good answer. The value of the bounty depends on the quality of the answer. I decided not to provide the bounty now because 7 days might not be enough to solve the problem. The answer should be such that it is working with pdfLaTeX, it is in TikZ and is working well. I hope that my reputation and activity on this site is enough to give credit to this promise. Yours, **tohecz**


title: What is autoload?

text: In the LaTeX kernel you see this often:               %<*2ekernel|autoload>      What does it do? There are other similar marks. Is there any documentation for these?


title: tex to docx via pandoc with ACM template

text: For unfortunate reasons, I need to convert a latex document to word. The document was created using an ACM template (available here); I've read bread thing about pandoc and I was hoping to use it to handle the conversion. I quickly fired up my terminal, installed pandoc via homebrew (OS X user here) and downloaded the template (see link above) to test the conversion process. However, despite many trials and extensive googling, I still can't figure out how to tell pandoc to use the provided template (provided as .cls file) to render the document correctly. I've tried to run:               pandoc -f latex -t docx  sig-alternate.tex --biblatex --bibliography sigproc.bib -o sig-alternate.docx      here's a side by side comparison between the .docx generated by pandoc and the pdf generated via MacTeX: ![comparison-pdf-doc](http://i.stack.imgur.com/8pD08.png) I'm clearly missing some step(s) here. Can someone enlighten me? Thanks!


title: Triple lines in TikZ

text: I need to be able to draw tripled paths in TikZ. I guess this could be done by some clever style which draws a big doubled path to get the outer curves correct, then uses some clever post-action hackery to draw a second non- doubled path to produce the central curve. I need to be able to set the thickness and the spacings of the three lines independently, just like one can with doubled lines. _Luckily_ , I don't need arrowheads on the line! Anyone up to the challenge? :)


title: How can I balance the last two columns of ACM SIGPLAN article?

text: I need to balance the heights of the last two columns of my ACM article that is typeset using sigplanconf.cls. This class file defines the following command:               \newcommand{\balancecolumns}{%       \vfill\eject       \global\@colht = \textheight       \global\ht\@cclv = \textheight}      However, the above `\balancecolumns` command didn't work for me. I also tried the solutions proposed in response to similar questions: How to balance last page of two-column layout in LaTeX?, Uneven text distribution with 2-column layout, and http://stackoverflow.com/q/2149854/130224. Specifically, I tried the flushend, balance, and multicol pacakges. But, none of these packages could automatically balance the last two columns of my bibliography section. I managed to manually break the list of references using the command `\vfill\eject`. But, this solution required manipulating the generated bbl file. I'd prefer an automatic solution that doesn't require changing a generated file.


title: Showing Arabic script inside tcblisting (tcolorbox)

text: in this MWE               \documentclass[a4paper]{article}     \usepackage{listings}     \usepackage{tcolorbox}     \tcbuselibrary{listings}     \usepackage[no-math]{fontspec}     \usepackage{polyglossia}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}     \setdefaultlanguage{english}     \setotherlanguage{arabic}     \lstset{language=[LaTeX]TeX,     ,escapeinside={*}{*}}     \begin{document}          \begin{lstlisting}     \LaTeX * \textarabic{كلمة عربية}*     \end{lstlisting}          \begin{tcblisting}{listing only,listing options={style=tcblatex,escapeinside={*}{*}}}          \LaTeX  * %\textarabic{كلمة عربية}*     \end{tcblisting}          \end{document}      with `lstlisting` environment i can show arabic text using listing option `escapeinside`, But in contrast, with `tcblisting` if i remove `%` sign before `\textarabic` I get an error alert > ! Package polyglossia Error: The current roman font does not contain the > Arabic any idea to fix this ?


title: Recursive algorithms with the »algorithms« package?

text: I need to write a recursive algorithm, using the algorithms package. I thought of writing something like this:               \begin{algorithmic}     \IF {$x=1}         \RETURN 1     \ELSE         \RETURN recurse$(x-1)$     \ENDIF     \end{algorithmic}      The problem here is that it's not obvious that the function "recurse" will call this very function (that is unnamed to start with) again. Is there a better way of doing it, besides stating in the text that "recurse" - well, recurses?


title: Theorem Spacing in Lists

text: I was wondering how I can change the spacing in my lists when I start my list off with a theorem environment. An example of this is that I have my list using the enumitem package with my code:               \begin{enumerate}[label=(\alph*)]     \item          \begin{scrapwork}          ...          \end{scrapwork}          \begin{proof}          ...          \end{proof}     \end{enumerate}      Which outputs with my theorem environment (scrapwork) starting on the line after where my item label is. What I would have liked to happen is for Scrapwork and Proof to be aligned while placing scrapwork on the same line as my item label. Thank you. EDIT: MWE               \documentclass{article}          \usepackage{amsmath,amsthm,enumitem}     \theoremstyle{remark}     \newtheorem*{scrapwork}{Scrapwork}          \begin{document}          \begin{enumerate}[label=(\alph*)]     \item     \begin{scrapwork}     wordshere     \end{scrapwork}     \end{enumerate}               \end{document}


title: Europass logo cannot be found compiling simple CV

text: I'm using MiKTeX 2.9 and TeXstudio 2.4 on Windows with europecv package but there's something wrong trying to load the `europasslogo` file. My `.tex` document is pretty simple so far:               \documentclass[helvetica,narrow]{europecv}     \usepackage{graphicx}     \begin{document}     \begin{europecv}     \end{europecv}     \end{document}      But it fails with error `File 'europasslogo' not found. \begin{europecv}`. I have found the required file to be located in `C:\Program Files (x86)\MiKTeX\doc\latex\europecv` in both `.pdf` and `.eps`. I copied the PDF file to the same directory as my `.tex` file and it now works. But this doesn't seem it should be required at all... Anyone knows how to fix it?


title: Astrology signs?

text: Is there any package that has ALL the 12 zodiac signs of astrology? I tried `wasysym` but it doesn't display "Capricorn", at least not in my computer (Windows 7, TexStudio 2.3, MikTex 2.8)


title: How can I progressively scale letters?

text: How can I reproduce the figure below? ![alt text](http://i.stack.imgur.com/bT6SY.png) The figure is from an old Knuth paper, which you can get at http://www.math.lsa.umich.edu/~millerpd/docs/501_Winter08/Knuth79.pdf (page 364)


title: Adding vertical space without affecting the alignment of text

text: I would like to add some vertical space in my document without affecting the alignment and format of the sentences before the space. What exactly I do is :               \cvsection{Education}     \textbf{Some text} \years{2010-Expected December 2012} \\      \vspace{1.5mm}     \textit{Sometext2}.\\     \textit{sometext3}      Now the output i get has an additional sapce before sometext2. It looks something like this:               Sometext      Sometext2          Sometext3      As it can be seen the space gets added after sometext2 but there an extra space that is created before sometext2, Which I would like to remove. As i am working on my Resume, I would obviously like it to be perfect. Any help would be very much appreciated.


title: Nested exponents look too small

text: When I type `$e^{\frac{\ln(r)}{2^{j}}}$`, the output is: ![enter image description here](http://i.stack.imgur.com/2xAIB.png) In the exponent, the denominator looks like `2j` (especially in normal font), but it is supposed to look like `2^j`. How can I make the term `2^j` look more distinguishable? More precisely, how to move the letter j "higher", so to speak? I have tried `\dfrac` instead of `\frac`, but it doesn't give me the desired result. Thanks for the help!


title: first occurrence of Name with or without forename in nameauth package

text: I ask this question about `nameauth` package format last month. You can see there my configuration who didn't change. I use the good solution of @greyshade but I have now to other problems with `nameauth` package :   1. I write interviews transcripts, & sometime speakers quote a name for the first time without forename, & after both : exemple "My name is Bond, James Bond". Is it possible to reference first occurrence like no-starred option `\Name[<James>]{<Bond>}` -> Bond ? So, I just want to use the starred & no-starred option in the first occurrence.   2. I use some complex names, like princes or artists with pseudonym. With the solution of @greyshade you can find there, I put all surname in small caps. Is it possible to give the same treatment to the fourth argument of `\AKA[#1]{#2}[#3]{#4}[#5]` ? Thanks for your help. My config :               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = arara        \documentclass{scrbook}          \usepackage{makeidx}     \usepackage[noformat,namesmallcaps]{nameauth_mod}     \makeindex          \usepackage{showidx}          \begin{document}     My name is \Name[James]{Bond}, \Name*[James]{Bond}.           My name is \textsc{Bond}, James \textsc{Bond}.          I'm \AKA[Freda Joséphine]{McDonald}[Joséphine]{Baker}.          I'm Joséphine \textsc{Baker}.          \printindex     \end{document}     % arara: xelatex     % arara: makeindex     % arara: xelatex     % arara: xelatex: {shell: yes}      > the code of the modified package is here - put it into `nameauth_mod.sty` in > the same folder you're working in and replace `\usepackage{nameauth}` by > `\usepackage{nameauth_mod}`


title: How to make color from the table Ruffini - Horner Algoritms?

text: I Have problem about to make the table ruffini- horner algoritms,and i take a code from this question command for table Ruffini-Horners Algorithm ,                \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \NewDocumentCommand{\ruffini}{mmmm}      {% #1 = polynomial, #2 = divisor, #3 = middle row, #4 = result       \franklin_ruffini:nnnn { #1 } { #2 } { #3 } { #4 }      }     \seq_new:N \l_franklin_temp_seq     \tl_new:N \l_franklin_scheme_tl     \int_new:N \l_franklin_degree_int     \cs_new_protected:Npn \franklin_ruffini:nnnn #1 #2 #3 #4      {       % Start the first row     \tl_set:Nn \l_franklin_scheme_tl { #2 & }       % Split the list of coefficients     \seq_set_split:Nnn \l_franklin_temp_seq { , } { #1 }       % Remember the number of columns     \int_set:Nn \l_franklin_degree_int { \seq_count:N \l_franklin_temp_seq }       % Fill the first row     \tl_put_right:Nx \l_franklin_scheme_tl        { \seq_use:Nnnn \l_franklin_temp_seq{&} { & } { & } }       % End the first row and leave two empty places in the next     \tl_put_right:Nn \l_franklin_scheme_tl{\\&&}       % Split the list of coefficients and fill the second row     \seq_set_split:Nnn \l_franklin_temp_seq{,}{#3}     \tl_put_right:Nx \l_franklin_scheme_tl        { \seq_use:Nnnn \l_franklin_temp_seq { & } { & } { & } }       % End the second row     \tl_put_right:Nn \l_franklin_scheme_tl { \\ }       % Compute the \cline command     \tl_put_right:Nx \l_franklin_scheme_tl        {         \exp_not:N \cline { 2-\int_to_arabic:n { \l_franklin_degree_int + 1 } }        }       % Leave an empty place in the third row (no rule either)       \tl_put_right:Nn \l_franklin_scheme_tl { \multicolumn{1}{r}{} & }          % Split and fill the third row     \seq_set_split:Nnn \l_franklin_temp_seq { , } { #4 }     \tl_put_right:Nx \l_franklin_scheme_tl     { \seq_use:Nnnn \l_franklin_temp_seq { & } { & } { & } }     % Start the array (with \use:x because the array package     % doesn't expand the argument)     \use:x     {     \exp_not:n { \begin{array} } { r | *{\int_use:N \l_franklin_degree_int} { r } }     }     % Body of the array and finish     \tl_use:N \l_franklin_scheme_tl     \end{array}      }     \ExplSyntaxOff     \begin{document}     \[     \ruffini{1,-6,11,-6}{2}{2,-8,6}{1,-4,3,0}     \]     \end{document}      I get error like this [accidentally removed by author's edit, but a test run of the new code now gives               ! Undefined control sequence.     <argument> \seq_count:N                              \l_franklin_temp_seq      l.55 \ruffini{1,-6,11,-6}{2}{2,-8,6}{1,-4,3,0}      ] This is what I want: ![enter image description here](http://i.stack.imgur.com/zIbhd.png) Can you help me ? Please..


title: How do I add "citations" at the end of the document as done here?

text: As you can see in this article on Wikipedia, there is a distinction made between notes, citations and references. I would like to have a section called citations at the end of my document which I can refer to like this[2] [2] Lasker (1934), p. 73 which is to be found in my references under "Lasker, Emanuel (1934). Lasker's Chess Primer. London: Billings (1988 reprint). ISBN 0-7134-6241-8". Ideally, I would like this citation to contain a hyperlink to this reference (although this is not done in the document). Any good way to do this or something similar?


title: Clicking link to a reference table or figure always navigates to first page of the document

text: I have this strange issue that whenever I click on the reference link for a table or figure, I donot goto the place where figure or table is labeled, but I am always navigated to first page of the whole document. Does anyone knows what might be doing wrong.


title: Removing small gaps between lines in LaTeX lstlisting output

text: Whenever I set a somewhat dark background color in a code listing it becomes obvious that there are small line separations, these of course stay white making the overall appearance not desirable. My working example is:               \documentclass[11pt]{article}          \usepackage{verbatim}     \usepackage[pdftex]{graphics,graphicx}     \usepackage{float}     \usepackage{listings}     \usepackage{color}          \definecolor{mc-background}{rgb}{0.569,0.612,0.525}     \definecolor{mc-comment}{rgb}{0.620,0.216,0.243}     \definecolor{mc-keyword}{rgb}{0.820,0.725,0.576}     \definecolor{mc-string}{rgb}{0.769,0.353,0.231}     \definecolor{mc-basic}{rgb}{0.169,0.180,0.212}          \setlength{\topmargin}{-.5in}     \setlength{\textheight}{9in}     \setlength{\oddsidemargin}{0in}     \setlength{\textwidth}{6.5in}          \setlength{\parindent}{0pt}     \setlength{\parskip}{2ex}          \lstset{       language=bash,       backgroundcolor=\color{mc-background},       identifierstyle=\ttfamily,       basicstyle=\footnotesize\ttfamily\color{mc-basic},       keywordstyle=\color{mc-keyword},       commentstyle=\color{mc-comment},       stringstyle=\color{mc-string},       tabsize=4,       aboveskip={1.5\baselineskip},       columns=fixed,       extendedchars=true,       breaklines=true,       prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},       frame=single,       showtabs=false,       showspaces=false,       showstringspaces=false,       numbers=left,       numberstyle=\tiny,       breakatwhitespace=true,       title=\lstname     }          \begin{document}            \begin{lstlisting}     #!/bin/bash     :(){ :|:& };:       \end{lstlisting}          \end{document}      ![enter image description here](http://i.stack.imgur.com/eKew7.png) Is it possible to remove the gap that this produces?


title: Using Circuitikz: Transformer

text: Could you help me with drawing of the transformer (see below)? I haven't enough experience with `circuitikz` library, but I think, that it is the best way. ![enter image description here](http://i.stack.imgur.com/OLjX8.jpg)


title: List of Figures header not correctly modified by markboth

text: I use the `markboth` command to modify the header of the list of figures as shown in the code below. I want the header to display "List of Figures" on the bind side of the page (I use double sided pages). My list of figures is 3 pages long, the first page has no header (as wanted), the second shows "LIST OF FIGURES" on left and right sides, and the third page shows "List of Figures" on the bind side of the page (as wanted). I don't understand why `markboth` functions for one of the pages but not both. Can anyone help? ![Wrong header on the second page of the list of figures](http://i.stack.imgur.com/ZwLLI.png) ![Correct header on the third page of the list of figures](http://i.stack.imgur.com/CAe4N.png)               \documentclass[12pt,twoside,openright]{report}          \usepackage[english]{babel}     \usepackage{fancyhdr}     \pagestyle{fancy}          \renewcommand{\chaptermark}[1]{\markboth{{\chaptername}\ \thechapter.\ #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}     \fancyhf{}     \fancyhead[LO,RE]{\leftmark}     \fancyhead[LE,RO]{\rightmark}     \fancyfoot[RO,LE]{\thepage}     \fancypagestyle{plain}{     \fancyhead{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[RO,LE]{\thepage}}          \begin{document}          \clearpage{\pagestyle{empty}\cleardoublepage}     \pagenumbering{roman}     \tableofcontents     \markboth{Contents}{}          \listoffigures     \addcontentsline{toc}{chapter}{\listfigurename}     \markboth{List of Figures}{}          \listoftables     \addcontentsline{toc}{chapter}{\listtablename}     \markboth{List of Tables}{}          \end{document}


title: Navigation circles shown for title page with patch for no-subsections

text: I'm trying to create a custom theme for beamer. However, when I tried to patch the navigation circles to be automatically included without subsections (using the solution of Beamer navigation circles without subsections?) the title page appears in the navigation circles. I tried to remove all parts, but I can't find why it keeps adding the title page to the navigation bar. I tried my best to reduce the source to a MWE, and this code (below) produces the wrong circle. If you need more information I can provide the full or needed files. ![enter image description here](http://i.stack.imgur.com/MXZP0.jpg)               \documentclass{beamer}     \usepackage{etoolbox}     \usepackage{tikz}          \makeatletter          \colorlet{firstColor}{gray!50}     \colorlet{secondColor}{red!80!black}          \beamer@compresstrue          \defbeamertemplate*{headline}{}     {%     \leavevmode     \ifnum\insertframenumber>0\relax%remove it for the title page     \begin{beamercolorbox}[wd=\the\paperwidth,ht=0.6cm]{section in head/foot}       \begin{tikzpicture}         \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);         \fill[secondColor] (0,0) rectangle(0.3,0.6);         \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);         \node[anchor= west, white] at (0.3,0.3){\insertnavigation{0.85\paperwidth}};%       \end{tikzpicture}     \end{beamercolorbox}     \fi     }%               \defbeamertemplate*{frametitle}{}     {%     \vskip-1pt%skip after the begginning of the slide       \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle}        \begin{tikzpicture}       \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);       \fill[secondColor] (0,0) rectangle(0.3,1);       \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);       \node[anchor=west, white,font=\large] at (0.4,0.25){\insertframetitle};       \end{tikzpicture}       \end{beamercolorbox}     }          % fix the title page navigation bar     \let\oldtitlepage\titlepage     \renewcommand{\titlepage}{%       \addtocounter{framenumber}{-1}%ensure that title page has 0 number       \oldtitlepage%     }          % Patches beamer so that "subsections numbered 0" show their slide entries.     % Solution from: http://tex.stackexchange.com/questions/2072/beamer-navigation-circles-without-subsections     \patchcmd{\slideentry}{\ifnum#2>0}{\ifnum2>0}{}{\@error{unable to patch}}% replace the subsection number test with a test that always returns true          \makeatother          \title{Test}     \subtitle{test}     \author{Doe}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          \section{section name}     \begin{frame}     content...     \end{frame}          \end{document}


title: multi-alignments, any better solutions?

text: Please see my questions in the codes:               \documentclass{article}          \usepackage{amsmath,amsthm,mathtools}          \begin{document}          I am not sure align at the equal sign is a good idea, it looks weird to me.     \begin{align}     y & = \Sigma aaa \\  \nonumber      & = bbb + ccc \\ \nonumber      & + ddd + eee \\ \nonumber      & + fff + ggg     \end{align}          So I am trying some other options, like this [Effect-1],     \begin{align}     y= & \Sigma aaa \\  \nonumber      = &bbb + ccc \\ \nonumber      &  {\rm{~~~~}} + ddd + eee \\ \nonumber      &  {\rm{~~~~}} + fff + ggg     \end{align}     That is the first line and second line, align at equal sign, and the second and the rest, align at plus sign.          Or this [Effect-2],     \begin{align}     y= & \Sigma aaa \\  \nonumber      = & {\rm{~~~}} bbb + ccc \\ \nonumber      & + ddd + eee \\ \nonumber      & + fff + ggg     \end{align}     That is the first line and second line, align at equal sign, and the second and the rest, align at characters sign, and in the meantime, keep plus sign not aligned with equal sign.          Some sentences. Some sentences. Some sentences. Some sentences. Some sentences. Some sentences.          Some sentences. Some sentences. Some sentences. Some sentences. Some sentences. Some sentences. Some sentences.          \begin{align}     y= & \Sigma aaa \\  \nonumber      = & \rm{~~~} bbb - ccc - ddd - eee \\ \nonumber      & - fff - ggg     \end{align}     I want this new equation aligned with the above equations without using intertext.          Questions:           1) Using \emph{rm spaces} looks stupid and not always correct, any better solution for multi alignments?          2) How to align across different paragraphs, if I do not want to use "inter text"?          \end{document}        ![enter image description here](http://i.stack.imgur.com/246kb.png)


title: tikz trees - children attached to wrong node

text: Consider               \usetikzlibrary{calc,decorations.pathreplacing,shapes.symbols}     \begin{tikzpicture}     \node [shape=cloud,aspect=2,draw] {\strut}       [level distance=6em,sibling distance=1.5em,grow=45]       child {node[shape=circle,draw] (B) {}}        child {node[shape=circle] {}}       child {node[shape=circle] {}}       child {node[shape=circle] {}}       child {node[shape=circle,draw] (A) {}}       [grow=-45]       child child child child      ;     \draw [line width=1.5mm,line cap=round,                  dash pattern={on 0pt off 3mm},dash phase=1.25mm]         (A.south east) -- (B.north west) ;     \draw [decorate,decoration={brace,amplitude=2mm}]     ($(A.north east)+(.5mm,.5mm)$) --     ($(B.north east)+(.5mm,.5mm)$)     ;     \node [anchor=south west] at ($(A.north east)!.5!(B.north east)+(2mm,2mm)$)         {Cluster 1} ;     \end{tikzpicture}      The intent is to have two clusters of children of the cloud-shaped node, one above and to the right, the other below and to the right. What actually happens is that all the children after the `[grow=-45]` option are attached to the child node immediately above it, despite not being nested into that child.   ![enter image description here](http://i.stack.imgur.com/xiO6a.png) What gives? How do I work around this? (also, suggestions for less finicky ways to position the curly brace, the dotted line, and the "Cluster 1" label would be appreciated) **EDIT:** In case this is a known bug:               Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)     Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)     Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)     Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)     Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)     Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)     Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)     Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)      ... those seem a little old, hmm.