title: tikzpicture alignment and centering

text: I have several very similar images except some have some extra graphics that enlarge them slightly. This causes some pictures to be offset and not aligned visually when it's clear they should be. How can I align several `tikzpicture`s along the the same origin they were created and center vertically and horizontally properly?   * First, I want to align the 3 large boxes regardless of the what the small boxes are doing   * Second, I want to be able to center them all without adding additional spaces the `\begin{center}` seems to do   * Third, I want to be able to reproduce the exact same results but everything in landscape mode without using the landscape package if possible. (as you can see, the problem is that TeX is putting one rectangle at a time which is not what I want)   * The methods should be easy and quick. I have many rectangles stacked and some need to be grouped arbitrarily. What these means is I want the methods to sort of be "smart" in that they can figure out themselves so I don't have to go change a lot of stuff each time I have to change the grouping. Basically I would like the first rectangle on the page to define the alignment location and the others on the same page to use it unless I tell them not to. I've tried creating a custom bounding box as shown in How does TiKZ calculate positioning of picture on page? but it didn't do anything unless I make it too large which then causes other problems. (I can end up doing the alignment but it seems more complex than necessary)               \documentclass[10pt]{book}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \draw[line width=30pt] (0,0) -- (7,0);     \end{tikzpicture}          \begin{tikzpicture}         \draw[line width=30pt] (0,0) -- (7,0);         \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);     \end{tikzpicture}          \begin{tikzpicture}         \draw[line width=30pt] (0,0) -- (7,0);         \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);         \draw[line width=20pt] (-0.8, 0) -- (-0.5, 0);     \end{tikzpicture}                    \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (7,0);     \end{tikzpicture}%     \end{center}%          \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (7,0);         \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);     \end{tikzpicture}%     \end{center}%          \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (7,0);         \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);         \draw[line width=20pt] (-0.8, 0) -- (-0.5, 0);     \end{tikzpicture}%     \end{center}%                         \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);     \end{tikzpicture}%               \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);         \draw[line width=20pt] (0,-0.4) -- (0,-0.1);     \end{tikzpicture}%          \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);         \draw[line width=20pt] (0,-0.4) -- (0,-0.1);         \draw[line width=20pt] (0,-0.8) -- (0,-0.5);     \end{tikzpicture}%                    \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);     \end{tikzpicture}%     \end{center}               \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);         \draw[line width=20pt] (0,-0.4) -- (0,-0.1);     \end{tikzpicture}%     \end{center}%               \begin{center}%     \begin{tikzpicture}%         \draw[line width=30pt] (0,0) -- (0,7);         \draw[line width=20pt] (0,-0.4) -- (0,-0.1);         \draw[line width=20pt] (0,-0.8) -- (0,-0.5);     \end{tikzpicture}%     \end{center}%               \end{document}


title: After merging documents, compensate page numbering manually (of ToC)

text: I have a PDF that I want to append to three other PDFs (of one page each). It works with a command I found here only of course, page numbering (the ToC) isn't right. So, how could I tell it to add a digit before start counting "for real"? (To compensate for the pages I added!) Note, I don't have the LaTeX source of the "head" documents so my bet is to manually change the start point in the "tail" document, for which I do have the LaTeX source. The ToC is there, too.


title: tikz - node covering several columns

text: Is there an easy way to stretch a node in a matrix environment in TikZ over several columns? In the following example I want to merge the three nodes in the second row as one wide node. Any idea?               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}          \begin{tikzpicture}     [auto,     mytext/.style={thick, text width=4.5em,inner sep=1pt},     line/.style ={draw, thick, -latex',shorten >=2pt},     block/.style ={rectangle,text width=6em,draw,minimum height=4em, outer sep=0pt}]     \matrix [column sep=1cm,row sep=7mm]     {      % 1. row      \node [mytext] (st0) {Step 1}; &      \node [block] (cl0) [label=above:\textbf{Climate}] {rainfall and temperature}; &       \node [block] (veg0) [label=above:\textbf{Vegetation}] {forest}; &       \node [block] (sol0) [label=above:\textbf{Soil and terrain}]       {soil}; \\      % 2. row      \node  (st2) {some text}; &      \node [block] (cl1) {this blocks}; &      \node [block] (veg1) {should be}; &      \node [block] (sol1) {merged together}; \\          \\ };     \tikzstyle{every path}=[line]     \path (cl0) -- (cl1);     \path (veg0) -- (veg1);     \path (sol0) -- (sol1);          \end{tikzpicture}          \end{document}       ![enter image description here](http://i.stack.imgur.com/8v8Ts.png)


title: Nested \loop macro

text: Please are there 'nestable' variants of Knuth's favourite looping macro `\loop` without the brace-scope introduced in the answer at nested loops. I am developing a package called **loops** , where I am collecting many loops (including a new `\foreach` and some weird looping macros).               \@tempcnta0 % LaTeX     \loop       \advance\@tempcnta by1       \ifnum\@tempcnta<3\relax       \@tempcntb0       \loop         \advance\@tempcntb by1         \ifnum\@tempcntb<4\relax         \@namedef{w@\romannumeral\@tempcnta @\romannumeral\@tempcntb}{x}%       \repeat     \repeat


title: listing package: colored numbers, but not colored in variable names

text: How to format all numbers in a different color has been discussed in this post. However, this also colors numbers that are part of a variable name. Is there an option to avoid that?               \documentclass[fleqn, a4paper]{article}     \usepackage{listings}      \usepackage{color}          \lstdefinelanguage{mylang}{%         basicstyle=\ttfamily,%         literate={0}{{\textcolor{blue}{0}}}{1}%              {1}{{\textcolor{blue}{1}}}{1}%              {2}{{\textcolor{blue}{2}}}{1}%              {3}{{\textcolor{blue}{3}}}{1}%              {4}{{\textcolor{blue}{4}}}{1}%              {5}{{\textcolor{blue}{5}}}{1}%              {6}{{\textcolor{blue}{6}}}{1}%              {7}{{\textcolor{blue}{7}}}{1}%              {8}{{\textcolor{blue}{8}}}{1}%              {9}{{\textcolor{blue}{9}}}{1}%              {.0}{{\textcolor{blue}{.0}}}{1}% Following is to ensure that only periods              {.1}{{\textcolor{blue}{.1}}}{1}% followed by a digit are changed.              {.2}{{\textcolor{blue}{.2}}}{1}%              {.3}{{\textcolor{blue}{.3}}}{1}%              {.4}{{\textcolor{blue}{.4}}}{1}%              {.5}{{\textcolor{blue}{.5}}}{1}%              {.6}{{\textcolor{blue}{.6}}}{1}%              {.7}{{\textcolor{blue}{.7}}}{1}%              {.8}{{\textcolor{blue}{.8}}}{1}%              {.9}{{\textcolor{blue}{.9}}}{1}%              {\ }{{ }}{1}% handle the space              ,%         }     \begin{document}     \begin{lstlisting}[language=mylang]         {           _SetCalibTableName("lorem",100);           g_Met_strReferenceName1=Met_strReferenceName;         }     \end{lstlisting}     \end{document}


title: How to decorate a node with additional paths?

text: I want to add styles to my nodes that draw additional paths inside of the node. For example (without proper placement of nodes)               \node[draw,circle,lVert] {};     \node[draw,circle,lHor]  {};     \node[draw,circle,lVert,lHor] {};      shall result in these nodes: ![enter image description here](http://i.stack.imgur.com/od7zo.png) ## Keywords strike through node, line in node, strike through style, cross, path as style


title: Plot mean of measurements with pgfplots

text: I have a file of measurements that I am planning to plot with pgfplots. There are multiple measurements for each input:               Size        Time     100           599.3     100           598.0     100           597.7     100           597.9     100           596.3     100           592.6     100           593.1     100           600.3     250         21423.3     250         21479.8     250         21353.4     250         21333.7     250         21322.7     250         21262.6     250         21395.5     250         21873.0     250         21400.9       etc. When I try to plot them naively, I get one point for each measurement, which makes the plot look bad. The question is: how do I plot just the average for each input size? Thanks!


title: Automatic brace sizes with braket and mathtools

text: The packages `braket` and `mathtools` provide two different command to typeset set with dynamically sized braces. For example with `braket`:               \documentclass{standalone}     \usepackage{braket}     \begin{document}     $\displaystyle \set{ \frac{x}{2} | x > 5 }$     $\displaystyle \Set{ \frac{x}{2} | x > 5 }$       \end{document}      And the example with `mathtools`:               \documentclass{standalone}     \RequirePackage{mathtools}     \DeclarePairedDelimiterX\setc[2]{\{}{\}}{\,#1 \;\delimsize\vert\; #2\,}     \begin{document}     $\displaystyle \setc{ \frac{x}{2} }{ x > 5 }$     $\displaystyle \setc*{ \frac{x}{2} }{ x > 5 }$     $\displaystyle \setc[\bigg]{ \frac{x}{2} }{ x > 5 }$     \end{document}      (`setc` from https://tex.stackexchange.com/questions/448#124781) I am currently using `braket` for its nicer interface. However, recently I found that in same cases I'd like to specify the bracket size manually as in the third case of the `mathtools` example. Is it somehow possible to combine the features of both packages into one command?


title: Get both advantage of multline ( spacing) AND equation/multlined (numbering)

text: I like the spacing of `multline` but not the numbering (on the last line). I tought for a moment that `equation`+`multlined` will do the trick but that is not the case right now. The numbering is OK, but the spacing is far more "centered" on the page and I did not manage to improve it in any way (`flushleft`/`flushright` did not work either). Can anyone help me? MWE: Compare               \documentclass[a4paper,10pt]{article}          \usepackage{mathtools}          \begin{document}          \begin{multline}     111111111+2222222222\\3333333333333+4444444444\\=XXXXXXXXXXXXXX     \end{multline}          \begin{equation}     \begin{multlined}     111111111+2222222222\\3333333333333+4444444444\\=XXXXXXXXXXXXXX     \end{multlined}     \end{equation}          \end{document}


title: How to prevent empty page after \maketitle?

text: I have a few pages that I've texed. I wanted to start the document with a title page but if I do that it produces an empty page numbered '1' between the title page and the first section. How to prevent that? I tried document classes `report`, `article` and `book`, `\maketitle` as well as `\begin{titlepage}`/ `\end{titlepage}`. The code looks like this:               \documentclass{report}     \usepackage{amsmath}     \usepackage{amssymb}     \begin{document}     \textwidth 13cm     \title{Author: My title}     \author{a. name}     \maketitle     \hfill     \chapter{Chapter title}     \section{section title}     \end{document}      Thanks for your help.


title: Drawing scaled triangles with their bottom left corner at the same coordinates in TikZ

text: You'd figure that I failed trig class as for the life of me I cannot figure how to originate all scaled triangles from the same point. If polygon had an option to move base point from center to bottom left, it would be a piece of cake to draw below, but there does not seem to be an option for that. So I tried using what seemed to be right trigonometric formulas for vertix offset from center, but they did not work.               documentclass[10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{shapes.misc}          \begin{document}          \begin{figure}[!htb]     \resizebox{\linewidth}{!}{         \begin{tikzpicture}             \tikzstyle{every node}=[draw,thin]             \draw[help lines] (0,0) grid (4,4);                  \foreach \a in {0,...,3}{                 \node[scale={\a/sin(30)},regular polygon, regular polygon sides=3]                     at ({(\a)*cos(30)}, {(\a)*sin(30)}) {};              }              \end{tikzpicture}     }          \caption{Triangular grid}     \end{figure}          \end{document}


title: Fmtcount and Australian Babel

text: How can I get `fmtcount` to work when babel is loaded with the Australian option? Consider the following code which doesn't compile, due to babel australian not being supported:               \documentclass{minimal}          \usepackage[australian]{babel}     \usepackage{fmtcount}          \begin{document}         \numberstringnum{100}             \end{document}


title: Extract a part of a path and reuse it as part of a new one

text: I want to draw the blue line part 1-2-3-1 filled and the blue line part 1-4-3 dashed. The definition of the blue line (EllA path) is made of computed nodes. I can't find intersection points during `preaction` of the drawing because tikz doesn't know the name of the path at this time. It will be nice if it will become possible in a next version of tikz. I need to extract a part of EllA path (and I don't know if it's possible, steel asking the question ?) and draw it after, but to determine the intersection points it has to be drawed (at least without the draw option), but how to draw again a part of it even reuse it as part of a new path ?. It is a vicious ellipse ;-) PS clip half of the blue line is not a solution has I don't know his shape in advance. I want a dynamic solution based only on pathes themselves. If such a solution is possible with tikz.               \documentclass[a4paper]{article}     \usepackage[marginparsep=3pt, top=2cm, bottom=1.5cm, left=3cm, right=1.5cm]{geometry}          \usepackage{tikz}     \usetikzlibrary{calc,intersections}          \tikzset{small dot/.style={fill=black,circle,scale=0.3},}          \newcommand{\EllA}[1]{%             \pgfmathsetmacro\CX{1*cos(#1)}             \pgfmathsetmacro\CY{2*sin(#1)}     }          \begin{document}     \begin{tikzpicture}          % Complex computed path     % here an ellipse for the example     \foreach \A in {0,10,...,350} {%         \EllA{\A} ;                  \coordinate (EA\A) at (\CX,\CY) ;     }          % The draw option is here to see what it looks like     % but I just want to draw a part of it               \path[name path=EllA,draw,blue]         (EA0)         \foreach \A in {10,20,...,350} {%             --(EA\A) } --cycle ;          % Another path who may be computed as the first     \path[name path=EllB,draw,xslant=tan(30)] (0,0) circle (1) ;          \fill [red,     name intersections={of=EllA and EllB,     name=i,sort by=EllA,     total=\t}]     [every node/.style={above left, black, opacity=1}]     \foreach \s in {1,...,\t}         {(i-\s) circle (1pt) node {\footnotesize\s}};          \path[draw] (i-2)--(i-4) ;          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/f8BwQ.png)


title: eledmac and cleveref?

text: I'd like to use eledmac and cleveref in the same document, but I'm running into trouble with something like this:               \documentclass{article}          \usepackage{eledmac}     \usepackage{cleveref}          \begin{document}     \beginnumbering     \pstart     a b c d     \pend     \endnumbering     \end{document}      The error message I get (on every second run with either pdflatex or xelatex) is:               ! Use of \gl@poff doesn't match its definition.     \actionlines@list ->\expandafter                                       \def \csname \@tempc @line@name@plural@prea...          l.7 \beginnumbering      If I comment out the cleveref package, it works fine (but I need it in another part of the document). Can anyone think of a workaround? This is the list of packages loaded, in case it helps:               *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)      eledmac.sty    2013/12/15 v1.8.1 LaTeX port of EDMAC        xargs.sty    2008/03/22 v1.1  extended macro definitions  (mpg)      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)       suffix.sty    2006/07/15 1.5 Variant command support      xstring.sty    2013/10/13  v1.7c  String manipulations (C Tellechea)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     cleveref.sty    2013/12/28 v0.19 Intelligent cross-referencing


title: pdflatex problem

text: I just use latex to grid a pdf file. the code like follow               \documentclass[ letterpaper, 10pt]{article}     \usepackage{tikz}     \usepackage{pdfpages}          \newcommand\su[1]{     \begin{tikzpicture}[overlay,remember picture]%     \node at (current page.north west){      \begin{tikzpicture}[remember picture, overlay]         \draw[very thin, blue!10,step=0.2in]       (current page.south west) grid (current page.north east);       \draw[very thin, red!20,step=1in]       (current page.south west) grid (current page.north east);       \end{tikzpicture}     };     \end{tikzpicture}%     }     \begin{document}          \includepdf[pages=-,scale=1,pagecommand={\su}]{Jan31.pdf}     \end{document}      compile command are               pdflatex xxx.pdf     xelatex  xxx.pdf      Step1: After pdflatex compiled, the pdf file did not show any grid. ![enter image description here](http://i.stack.imgur.com/4I1EV.jpg) Step2: Then I try to use xelatex to generate pdf file, its just show a little of grid on the bottom. ![enter image description here](http://i.stack.imgur.com/uadSd.png) Step3: I try to use pdflatex to generate it again, the file is changed, it shows most of the grid but miss some on the top. ![enter image description here](http://i.stack.imgur.com/sy5FS.png) Step4: Use pdflatex again and again, just the 1 inch of the bottom missed. ![enter image description here](http://i.stack.imgur.com/kMPxC.png) Step5: use pdflatex again........ it work!!!! ![enter image description here](http://i.stack.imgur.com/rZsE5.png) After that, I did a lot of experiment. If do not run xelatex, whether run how many times pdflatex, the pdf file cannot be grided(just like the picture of step1). But if run one time xelatex, run several times pdflatex, the pdf file will be grided(just like the picture of step5) version:               pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.6.1; using libpng 1.6.1     Compiled with zlib 1.2.7; using zlib 1.2.7     Compiled with xpdf version 3.03          xelatex -v     XeTeX 3.1415926-2.5-0.9999.3-2013052718 (TeX Live 2013)     kpathsea version 6.1.1     Copyright 2013 SIL International and Jonathan Kew.     There is NO warranty.  Redistribution of this software is     covered by the terms of both the XeTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the XeTeX source.     Primary author of XeTeX: Jonathan Kew.     Compiled with ICU version 51.1; using 51.1     Compiled with zlib version 1.2.7; using 1.2.7     Compiled with FreeType2 version 2.4.11; using 2.4.11     Compiled with Graphite2 version 1.2.1; using 1.2.1     Compiled with HarfBuzz version 0.9.15; using 0.9.15     Using Mac OS X Core Text, Cocoa & ImageIO frameworks


title: Remove the automatic generation of number?

text: I looked for my past thread which can be found here: Create a two column static small box the solution i accepted was the `truefalse` environment. My question is, how will i remove the automatic numbering of the environment?


title: How to change symbol for footnote in minipage

text: `\renewcommand` method does not work               \documentclass{article}     \renewcommand{\thefootnote}{\arabic{footnote}}     \begin{document}          \begin{minipage}{1.3\textwidth}          test this\footnote{abc}     \end{minipage}          \end{document}      In the following example the footnote number is incorrect. Why?               \documentclass{article}     \renewcommand{\thempfootnote}{\arabic{mpfootnote}}     \begin{document}     \begin{minipage}{.5\textwidth}     test this\footnotemark     \footnotetext{abc}     \end{minipage}     \end{document}


title: Using different fonts in a latex document

text: The present state is:   * I get two ttf fonts, say `font1.ttf` and `font2.ttf`.    * I used autoinst tool to convert the both into latex usable fonts.  In my document preamble, now I'm able to use:               \usepackage{font1}      or               \usepackage{font2}      The question now is how (with or without this ability) to _redefine_ fonts for chapter and section names with one of the font? My first idea was to `\usepackage{font1}` to set a _main font_ for the document and to `\usepackage{titlesec}` to format the section/chapter names with the other, but now I can't find how to make use of my font2 inside the `\titleformat` command


title: How do I put text before page number?

text: I need to put "H.S. -" before every page number. How can I do that?


title: Appendix section numbering that mimicks theorem numbers?

text: I have a document with several theorems ("`\begin{restatable} \label{thmA}...`"). After each theorem I have the statement "`see proof in section \ref{sec:thmA:proof}`". So my appendix is now a long series of sections numbered in the usual way ("`7.1, 7.2, ...`"). However, I would like the section numbers to be the same as the theorem numbers, except for a prefixed "`A`". For example, for theorems: > Theorem 1.1 > > Theorem 2.1 > > Theorem 2.2 I would like the appendix to look like: > A1.1. Proof of theorem 1.1 > > A2.1. Proof of theorem 2.1 > > A2.2. Proof of theorem 2.2 Here is a working example, which uses the `thm-restate` package to restate theorems in the appendix, although this is not crucial for the question:               \documentclass[]{article}          \usepackage{amsmath,amsthm}     \usepackage{thmtools,thm-restate}          \newtheorem{thm}{Theorem}[section]          \begin{document}          \section{A section in the body}          \begin{restatable}{thm}{thmA} \label{thmA}     Statement of the theorem.     \end{restatable}          The proof of theorem \ref{thmA} can be found in the appendix (see section \ref{sec:thmA:proof}).          \newpage     \appendix          The appendix starts here.          \section{Proof of theorem \ref{thmA}} \label{sec:thmA:proof}          \thmA*          \begin{proof}     Here goes the proof.     \end{proof}          \end{document}      In the previous example, the theorem is numbered `Theorem 1.1.`, and the first section of the appendix is titled `A. Proof of theorem 1.1.`. I would like it to be `A1.1.`, which includes the information of the theorem number.


title: Which one should I use to annotate equations? \tag or \text?

text: I am still confused in selecting whether to use `\text` or `\tag` for annotating equations. Which one should I use? If it is about personal preference, what is the pros and cons between them?               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{mathtools}          \begin{document}          \section*{With \textbackslash text}     \begin{align*}     v = u + at && \text{without $s$}\\     s = vt - \tfrac{1}{2}at^2 && \text{without $u$}\\     s = ut + \tfrac{1}{2}at^2 && \text{without $v$}\\     s = \frac{v+u}{2}t && \text{without $a$}\\     v^2 = u^2 +2as && \text{without $t$}     \end{align*}               \section*{With \textbackslash tag}     \begin{gather}     v = u + at \tag*{without $s$}\\     s = vt - \tfrac{1}{2}at^2 \tag*{without $u$}\\     s = ut + \tfrac{1}{2}at^2 \tag*{without $v$}\\     s = \frac{v+u}{2}t \tag*{without $a$}\\     v^2 = u^2 +2as \tag*{without $t$}     \end{gather}     \end{document}      ![enter image description here](http://i.stack.imgur.com/EUnt4.png)


title: Align points with text vertically

text: I have the following code:                \begin{itemize}        \item SPOJ - everyone loves SPOJ\\                   - I love SPOJ      \end{itemize}      And what I'd like to do is display the two hyphens at the same position. I'd love something as simple as possible, such as:                \begin{itemize}        \item SPOJ &- everyone loves SPOJ\\                   &- I love SPOJ      \end{itemize}      Which unfortunately doesn't work. However, all solutions are welcome. I've searched for it but haven't found anything that would work (maybe because of my ignorance with LaTeX and inability to use some solutions in my case). I'll add that I know what I'm interested in and itemize inside itemize won't satisfy me. Sorry for being so demanding.


title: Can't debug init.el

text: I get the following error when I open emacs in Mac OSX:               Warning (initialization): An error occurred while loading      `/Users/my-user-name/.emacs.d/init.el':     Symbol's value as variable is void: Synctex          To ensure normal operation, you should investigate and remove the     cause of the error in your initialization file.  Start Emacs with     the `--debug-init' option to view a complete error backtrace.      I then start emacs using `\--debug-init` and get the following:               Debugger entered--Lisp error: (error "Unknown keyword :risky")     signal(error ("Unknown keyword :risky"))     error("Unknown keyword %s" :risky)     custom-handle-keyword(package-load-list :risky t custom-variable)     custom-declare-variable(package-load-list (quote (all)) "List of packages for `package-initialize' to load.\nEach eleme$     (defcustom package-load-list (quote (all)) "List of packages for `package-initialize' to load.\nEach element in this li$     eval-buffer(#<buffer  *load*<3>> nil "/Users/my-user-name/.emacs.d/package.el" nil t)  ; Reading at buffer position 9131     load-with-code-conversion("/Users/my-user-name/.emacs.d/package.el" "/Users/my-user-name/.emacs.d/package.el" nil t)     require(package)     eval-buffer(#<buffer  *load*<2>> nil "/Users/my-user-name/.emacs.d/starter-kit.el" nil t)  ; Reading at buffer position 17$     load-with-code-conversion("/Users/my-user-name/.emacs.d/starter-kit.el" "/Users/my-user-name/.emacs.d/starter-kit.el" nil nil$     load("/Users/my-user-name/.emacs.d/starter-kit.el" nil nil t)     load-file("/Users/my-user-name/.emacs.d/starter-kit.el")      Can anybody help me sort through this? This is my first time trying to debug/edit init.el.


title: Underbrace in denominator with () [] {} (howto)

text: I would like to put an underbrace correctly under the denominator of a expression but what I get is wrong because of the (). Alternatively I create another line in the text `[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\underbrace{~~~~~~~~~~~~~~~~~~~~}_{=(1+3\cos^3\theta)}\\]` but I don't think that's the right method and the text `$(1+3\cos^3\theta)$` yet appear much larger than it should be. The same problem will occur for sqrt for example. Than I ask, what is the alternative form to comment expressions like these? ![enter image description here](http://i.stack.imgur.com/xLJtM.png)


title: What are the established methods for filing and tracking bugs in packages?

text: My particular concern is in finding Polyglossia's author, Francois Charette, whose email address I could not find in Google. However, I think the issue is much more general. If you encounter a bug in one of the packages you use, or something you believe is a bug, what are your options?


title: How do I detect the options passed to the documentclass from my own style?

text: In the `listings` package, they note that "a global `\documentclass`-option `draft` is recognized, so you don’t need to repeat it as a package option" I tried looking into its source to see how it accomplishes this, but I wasn't able to find the magic bit. How does one detect the global `\documentclass` options from within an independent style/package?


title: Show only first word of parenthetical citation in BibLaTeX

text: Standard MLA style is to display only the first word of a parenthetical citation. For example, a citation of "Encyclopedia Britannica Online Academic Edition" would be displayed only as `(Encyclopedia)`. I can remove any other authors and the "et al." suffix with               \usepackage[maxcitenames=1,uniquename=init,uniquelist=false]{biblatex}     \DefineBibliographyStrings{english}{andothers=\unskip} % delete et al.      However, I can't figure out how to prevent a citation such as `\cite{britannica}` from appearing as `(Encyclopedia Britannica Online Academic Edition)`; the desired output would be simply `(Encyclopedia)` (or possibly `(Britannica)`). How can I accomplish this in BibLaTeX?


title: Caption Formation for Figure

text: I use the `caption` package.   Somehow I got a period between the type (Figure) and the separator (:) When I wrote               listformat=empty,      for the Table of Figures, I just got the period and then the caption text. I have no idea, but the period just appeared when I tried to skip the chapter numbering               (\counterwithout{figure}{chapter})      One way or the other, I always have the period which looks like:               Figure 1.: Description      EDIT:   I tried it, but I couldn't get it to run. That's everything I have regarding the captions. But somehow I think somewhere is some more. I just can't remember.               \documentclass[     12pt, % Schriftgröße     %DIV10,  % Teilung der Seite in 10 Teile (Layout bessere Lesbarkeit)     ngerman, % für Umlaute, Silbentrennung etc.     a4paper, % Papierformat     oneside, % einseitiges Dokument (Standard)     titlepage, % es wird eine Titelseite verwendet     parskip=half, % Abstand zwischen Absätzen (halbe Zeile)     headings=normal, % Größe der Überschriften verkleinern     listof=totoc, % Verzeichnisse im Inhaltsverzeichnis aufführen     bibliography=totoc, % Literaturverzeichnis im Inhaltsverzeichnis aufführen     %index=totoc, % Index im Inhaltsverzeichnis aufführen     listof=flat,     captions=tableheading, % Beschriftung von Tabellen unterhalb ausgeben     final % Status des Dokuments (final/draft)     ]{scrreprt}          \usepackage{chngcntr}     \usepackage[     labelfont=bf,     %   labelsep=none,     listformat=simple,  % simple ist defaultwert.     ]{caption}          \counterwithout{figure}{chapter}          \usepackage[demo]{graphicx}                         \begin{document}     \listoffigures     \begin{figure}[htb]     \begin{center}     \leavevmode     \includegraphics[width=0.8\textwidth]{foo.jpg}     \end{center}     \caption{Beispiel einer Matrixkombination}     \label{fig:Matrixknoten}     \end{figure}               \end{document}


title: How to setup MacVim for ConTeXt (MkIV) and Skim?

text: This is a very basic question but I can't figure out how to configure MacVim (v7.3) properly to work with ConTeXt (MkIV) and Skim on Snow Leopard. Is there somebody who would kindly explain the steps that need to be taken for the setup and how to use MacVim comfortably (regarding compilation and PDF viewing and not navigation, of course)? I am currently using TeXShop which works fine but I'd like learn about the (Mac)Vim editor too.


title: How to highlight arabic texts with allowing line breaks?

text: I would like to highlight some texts. For Latin texts the `\hl` command of the _soul_ package works well, but not for Arabic texts. (`\hl{SOME ARABIC TEXT}` has only a small _line_ as output in the pdf file.) I could use `\colorbox{yellow}{ARABIC TEXT}` but it doesn't allow line breaks. (The command `\uline` of the _ulem_ package works for Arabic text too, so maybe it is not so difficult to get an "Arabic" `\hl`?) (Perhaps the code of Leo Liu could be helpful: It makes some yellow boxes which _cover_ the Arabic texts.) I'm using xelatex (TeX Live 2012). Here is a minimal example:               \documentclass{article}     \usepackage{xcolor}      \usepackage{ulem,soul}     %\usepackage{fontspec,color,xcolor,hyperref,xltxtra}     \usepackage{polyglossia}     \setdefaultlanguage{arabic}     \setotherlanguages{german}     \newfontfamily\arabicfont[Script=Arabic]{Times New Roman}          \begin{document}          \begin{german}     Highlighting works for \hl{latin texts}.     \end{german}          \hl{عربي} % you will just see a vertical small yellow line          \end{document}      * * * EDIT: With this code:               \documentclass{article}     \usepackage{xcolor}      \usepackage[normalem]{ulem}     %\usepackage{fontspec,color,xcolor,hyperref,xltxtra}     \usepackage{polyglossia}     \setdefaultlanguage{arabic}     \setotherlanguages{german}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Times New Roman}     \newcommand\hl{\bgroup\markoverwith %        {\textcolor{yellow}{\rule[-.5ex]{2pt}{2.5ex}}}\ULon}               \begin{document}     \begin{german}     Test \hl{for highlighting} text. %correct     \end{german}     \hl{عربي} % correct          \hl{عربي} % result: yellow box covers the word     \end{document}      I get the result: ![arabicTest](http://i.stack.imgur.com/5czm7.jpg) So, in the first line the highlighting of the arabic text is correct - does someone know how to modify the code to make the hightlighting correct in the second line too?


title: Layout for longer chapter title in Memoir class

text: I am using `\chapterstyle{section}` with `\Huge\sffamily` font. This means that some longer chapter titles spread over two lines. I get (a larger version of!) > 2 A long title splitting as illustrated here   >  over two lines with the second line starting at the left margin, when I'd _like_ the second line to be indented to start under the first word of the title. This must be easy to effect (without cheating and putting in an `\hspace!`), but I'm not seeing how from the `memoir` manual.


title: Change spacing between elements in \newfloat listof

text: I have created a new float type with the following in my preamble:               \floatstyle{plain}     \newfloat{myfloat}{thpb}{myfloat}[chapter]     \floatname{myfloat}{\bf My Float}      Then I use the following to create a list at the beginning of my document of all of these new floats:               \listof{myfloat}{My Floats}      I'd like to change the spacing between the elements in the list of myfloat's such that it matches the spacing in my listoffigures and listoftables. I'm using a class based on the book class (more specifically: http://www.eg.bucknell.edu/physics/thesis/buthesis.cls).


title: \rightarrow^* flipped to the left?

text: Is it possible to create something like `$\rightarrow^*$` only flipped to the left? Someone suggested using `$\mathbin{{}^*\leftarrow}$` but this still doesn't give me the same spacing.


title: Problem with box width

text: I have the following code, that draws a dashed box:               \documentclass{book}          \usepackage{lipsum}          \usepackage{arydshln,paralist}          \setlength{\parindent}{0pt}          \newenvironment{mybox}[1]       {\vspace{6pt}\par\tabular{:p{\linewidth}:}\hdashline        \rule{0pt}{4ex}#1\\        \compactitem}       {\endcompactitem\hspace*{1ex}\\\hdashline\endtabular\vspace*{1ex}}               \begin{document}     \lipsum[1]          \begin{mybox}{There are many items:}     \item First item     \item Second item     \end{mybox}          \end{document}      The results are shown below (notice that the box is wider than it should): ![Too wide box](http://i.stack.imgur.com/eZXTR.png) However, it gets drawn too wide, not respecting my margins. How do I change the defined box environment to reduce it's width? Thanks.


title: latex and e-readers

text: What is a best way of making math pdf files readable using an e-reader? One needs to reduce the number of characters per line, which one can do either by using the A5 paper option or with A4 paper by forcing the line to be 'unnaturally' narrow. But is there a better way, which can be applied to other people's pdf files? The same problem arises for people with some degree of visual impairmewnt.


title: Placing figure captions at the bottom

text: How do I get the captions for my figures to be placed at the bottom of the picture, just like the captions for tables?


title: Using bibleref with babel

text: I'm trying to use the `bibleref` package together with `[french]{babel}`, and failing. The bibleref documentation warns that it doesn't play nice, and that you might have to make colons non-active with babel. How do I do that? I've tried using `\shorthandoff{:}` but it doesn't seem to help. Forgetting about `babel` would make my life much harder to have proper French rules. To be more specific, here is the error I'm getting when calling `pdflatex` on my file:               Runaway argument?     5:21)      ! Paragraph ended before \@bibleverse was complete.     <to be read again>                         \par      l.73           ?


title: Punctuation in equations

text: My document will contain a lot of equations, and as usual in that case I would like to use "punctuation" in the equations, like commas, colons, periods/full stops, semicolons, etc. Is there a special way to correctly do that? Now I just type these characters at the end of the equations, but as it's in math mode maybe there is a better way that improve the spacing, etc. I also read about `\colon`, `\ldotp`. What do they do that the normal "characters" don't?


title: How to change the title of a PDF?

text: I am getting a bunch of PDF files from some other source, and I need to change the PDF title via a script, i.e. the title that you can inspect via pdfinfo for example. Does texlive come with some such tool / package? Or are there other packages? I have investigated pdftk and the pdftools, but not found anything so far.


title: Combination of \pm and \EUR

text: I am trying to simply combine a Euro sign with the plus-minus symbol \pm. However the Euro sign is always converted to a small e, instead of the actual €. Is there a simply workaround? Thanks!               \documentclass[12pt]{article}     \usepackage{eurosym}           \begin{document}          \pm \EUR{1}           \end{document}


title: Having docstrip place files in different folders

text: I've written my own biblatex citation style and decided to put both the `bbx` and the `cbx` file in a `dtx` file to process that with docstrip. Now I would like to have docstrip place the files in my local folder `~/Library/texmf/tex/latex/biblatex/bbx/` and ...`/cbx/` respectively. My attempt at using the following `ins` file failed:               \input docstrip.tex     \askforoverwritefalse     \usedir{~/Library/texmf/tex/latex/biblatex/bbx/}     \generate{\file{blah.bbx}{\from{blah.dtx}{bbx}}}     \usedir{~/Library/texmf/tex/latex/biblatex/cbx/}     \generate{\file{blah.cbx}{\from{blah.dtx}{cbx}}}     \end      It just places both files in the same directory as the `dtx` file. My guess is that I didn't quite understand the usage of `\usedir` in the docstrip manual ... Any help would be appreciated! The `ins` and `dtx` file are both in `~/Library/texmf/tex/source/blah/` by the way.


title: Beamer: problem of repetition of the logo on each page

text: I have a problem inserting an picture at the beginning. Once I compiled, I have the picture on each page but I want to have the picture just on the first page. Here is my code:                \documentclass{beamer}      \let\Tiny=\tiny      \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage[frenchb]{babel}      \usepackage{type1cm}           \usetheme{CambridgeUS} % theme          \title[automata]{ automata}      \subtitle{Lucian Ilie}      \author{Author}     \institute{Institute}           \date{26 Mars 2012 \\           \includegraphics[width=1cm]{./image/logo_ur.jpg}          }


title: How to change the vertical position of the text in a frametitle

text: I'm wondering how to change the vertical position of the text in a frametitle? Take for instance this frametitle: ![enter image description here](http://i.stack.imgur.com/XMtkh.png) I'd like to place the text, in this case "Introduction", a bit higher such that it is exactly in the vertical center.               \documentclass{beamer}     \usepackage{textpos}     \usepackage{tikz}          %remove navigation symbols     \setbeamertemplate{navigation symbols}{}          \definecolor{TUeRed}{RGB}{170,0,0}     \definecolor{TUeBlue}{RGB}{0,68,170}          \addtobeamertemplate{frametitle}{}{%      \begin{textblock*}{100mm}(.95\textwidth,-1cm) \tikz {\fill[white] (0,0) -- %     (2cm,0) -- (2cm,1.1cm) -- (0.5cm,1.1cm) -- cycle;\node[TUeBlue] at %     (0.8cm,0.5cm) {\normalsize\insertpagenumber};} \end{textblock*} }          \setbeamercolor{frametitle}{bg=TUeRed}     \setbeamercolor{frametitle}{fg=white}          \begin{document}          \begin{frame}     \frametitle{Introduction}     Some text     \end{frame}          \end{document}       **[Edit]** Changed the LaTeX code, thanks @Percusse!


title: Does latin modern sans serif have a weird kerning, or is there a problem on my side?

text: I don't know whether it's my brain, or my pdf reader, or a missing font on my system. I know I'm asking for Latin Modern, Sans Serif because it's for a presentation, and the result looks weird: ![enter image description here](http://i.stack.imgur.com/3jQrM.png) I underlined in red the kerning that seems weird to me. In addition, the stroke of some letters look way too thin (x, y, e) compared to others. Maybe I'm doing something wrong? Full code there:               \documentclass{beamer}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage{beamerthemelined}     \usecolortheme[rgb={0.4,0.2,0.4}]{structure}          \title{Let's look at some fonts.}     \author{Niriel}     \date{\today}          \begin{document}          \section{Meh}     \frame{         It's funny, I would have expected that font to look much better.     }          \end{document}      What other fonts could I use?


title: OpenType, extensible arrows, and diagrams

text: _Does the OpenType font format provide support for extensible arrows (as in`\xrightarrow`)? If so, is it true that it would be `unicode-math`'s job to make this functionality available in TeX?_ This functionality, besides being useful in itself, could possibly have the following interesting by-product. If fonts made the tips and tails of various arrows available as separate glyphs, then drawing programs (including TikZ, despite its claim to not be one such) would be able to use them to create graphics with arrows matching those in the document's main font. (My particular interest is to create commutative diagrams, which are really just like any mathematical formula, and should look like so, but often require a general purpose drawing package to be drawn.) For things to work fully automatically, drawing programs would also need to have access to some parameters, such as the line width of arrow stems. Does OpenType accommodate this?


title: Aligning defined section title correctly

text: This is a MWE of a section title I'm trying to define in a large project.               \documentclass[a2,portrait]{a0poster}          \usepackage{tikz}          % Blue section, large, text on next line.     \def\Lsect#1{\noindent\hbox to \hsize{\large\color{blue} #1}\bigskip}          \begin{document}          \Lsect{This is a title}          Some text.          \end{document}      and this is the output: ![enter image description here](http://i.stack.imgur.com/2MEDF.png) I've stripped the LaTeX file of every non-essential line to reproduce the issue (I'm not sure why `tikz` needs to be there though) I need to have the title correctly aligned to the left and I just can't figure out how to do that, I've tried every modification the the definition I could think of.


title: \addtotoc starts new page

text: I have a section which I don't want to be numbered, but which I still want in the table of contents. So I have written               \addtotoc{section}{My section}     \section*{My section}      I have done the same thing for all the subsections in this section. The problem is just that the subsections end up at separate pages, creating a lot of empty space in my document. If I remove the `\addtotoc` macro then the problem disappears. The question is why `\addtotoc` automatically starts a new page and if this can be turned off?


title: Many multirows in table

text: I am trying to achive something like this                   Name | Age | Sex | AverageGrade | Subject | Grade |     ---------------------------------------------------------              |     |     |              |Maths    | A     |         Jhon | 24  | M   | A            |Science  | A     |              |     |     |              |Arts     | A     |     ---------------------------------------------------------              |     |     |              |Maths    | A     |         Mary | 24  | M   | A            |Science  | A     |              |     |     |              |Arts     | A     |     ---------------------------------------------------------      I am using `multirow` on each of the first four column. Is there a simpler way to achive this.


title: Define new language listing with comments ONLY in the beginning of a line

text: I am trying to create listing for a home-brew language (using \lstdefinelanguage). The problem is that the comments in the language are somewhat ambiguous. For example, the following code is valid:               * This is a comment     a = 4 /* This is a comment as well */     ********** This is a comment ********     a = a + 1 /* So is this */         * And Surprisingly This is a comment       * And This     *      AND THIS!     a = a * 100500 /* Star here is not a comment! */      So I need to make sure that the '*' is treated as a comment iff in the beginning of the line (might have spaces before), but not in the middle, where it is a multiplication. What I have so far is the following:               \lstdefinelanguage{HOMEBREW}{       alsoletter = {\$},       comment = [l]{*},       keywords = {         *,         command,         eval,         if, elseif, else, endif,         include,         open, close,         print, printf,         set, reset,         while, endwhile,       },       sensitive = false,       string = [b]",       % MORE:       % morecomment = [l]{**},       % moredelim = [l]{(}{)},     }      Is it even possible?


title: how to replace matrix element by color box

text: How can I replace the matrix element by colored squared box ? Suppose I have a 10x10 matrix with entries{+1,-1}. I want to put a black square box for +1 and red square box got -1 which will give me a design. Anyone can provide me clear idea ? Thanks in advance.


title: bibliographystyle "unsrt" not working

text: I am using `unsrt` for bibliographystyle but getting an incorrect sequence in the References section in the pdf. Here's the content of the .tex file:               \documentclass{article}     \bibliographystyle{unsrt}     \title{\textbf{\large{Title Goes Here}}}     \author{     Author Name     }     \date{\today}     \begin{document}     \maketitle     \section{Introduction}      I am using unsrt.     I want to cite these two: ~\cite{JMechPhysSol_analytical} and ~\cite{OrigPaper}.     But they appear in the reverse order.     \begin{thebibliography}{00}       \bibitem{OrigPaper}       J. Cheng, E. H. Jordan, B. Barber, M. Gell,        ``Thermal/Residual Stress in an Electron Beam Physical Vapor Deposited Thermal Barrier                 \textit{Acta Mater.}, \textbf{46}, 5839-5850 (1998).       \bibitem{JMechPhysSol_analytical}       D. S. Balint, J.W. Hutchinson,       ``An Analytical model of rumpling in thermal barrier coatings.''       \textit{J. Mech. Phys. Solids}, \textbf{53}, 949-973 (2005).          \end{thebibliography}     \end{document}      Here's the ouput: ![enter image description here](http://i.stack.imgur.com/O3hl7.png)


title: In how many ways can you create a paragraph in LaTeX?

text: How many ways are there to indicate the beginning of a new paragraph in LaTeX? Only way I know of is the double linebreak.


title: How to align image

text: If i have in my beamer presentation some list of items and on that slide i wanna add a picture, which i want to be aligned e.g. to right top corner.               \begin{frame}[fragile]{III. Override pages}     \begin{enumerate}         \item Bookmark manager         \item History         \item New tab     \end{enumerate}         % image aligned to top right corner     \end{frame}      How can i do that?


title: Can I declare a different overlay specification in different beamer modes?

text: I have a beamer frame with about 150 slides on it. I want article and handout mode to only show frame 92. Reading section 8.6.2 of the beamer manual it seems like I should be able to do something like               \begin{frame}<handout:92>     ...     \end{frame}      but that seems to have no effect--all 150 slides are set in handout mode, overlaying (making the result unreadable). I have gotten the effect I want by taking all commands _within_ the frame that have an overlay specification and adding "`| handout:0`" to make them not appear in handout mode. Annoying, but works. But for my 150-slide frame the different slides are generated by a PGF `\foreach` loop so I can't code slide 92 differently from the rest. But can I do this at the frame's overlay specification? It seems that the frame's overlay spec really acts differently from other commands. If I only do               \begin{frame}<92>...\end{frame}      then I get only slide 92 in beamer mode but all slides in article or handout mode.


title: How to have an URL in PDF bookmark

text: I'm interested in having a PDF **bookmark pointing to an attached file in the PDF**. At least I know it is possible to have bookmarks pointing to an URL. See for instance the `hyperref` manual. You can see that the last bookmarks are pointing to other PDF in the Internet. If it is not possible to have a bookmark pointing to an attached file in the PDF file, how did they manage to have a bookmark pointing to an URL?


title: using \input and pygmentize together: trying to get line numbers to show

text: I am using pygments to highlight the code I insert in my lyx document. The external file gets inserted in my document like this:               {\small \input{listings/blah.tex} }      And I use this command to generate the `blah.tex` file:               pygmentize -f latex -O linenos=true -l xml blah.xml > blah.tex      I can see that the numbering flags seem to appear in the output of pygmentize:               \begin{Verbatim}[commandchars=\\{\},numbers=left,firstnumber=1,stepnumber=1]      But when I render the pdf, it only shows the highlighted listing, without line numbers. What am I doing wrong?


title: pdfTeX warning: destination with same identifier has been already used, duplicate ignored (weird behavior)

text: Here is a minimal example:               \documentclass{amsart}          \usepackage{amsthm}     \usepackage[pdftex]{hyperref}          \newtheoremstyle{myexercise}{\baselineskip}{\baselineskip}{}{}{\bfseries}{.}{ }{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}     \newtheoremstyle{mypart}{\baselineskip}{\baselineskip}{}{}{\bfseries}{}{\newline}{\thmname{#1}\thmnumber{ #2}\thmnote{ -- #3}}          \theoremstyle{myexercise}     \newtheorem{Exo}{Exercise}     \theoremstyle{mypart}     \newtheorem{Part}{Part}[Exo]     \renewcommand*\thePart{\Roman{Part}}          \begin{document}     \begin{Exo}[A cool exercise]     \begin{Part}     \label{p:ex1:I}     Prove that $1=0$.     \end{Part}     \begin{Part}     Deduce from Part~\ref{p:ex1:I} that this exercise is wrong.     \end{Part}     \end{Exo}          \begin{Exo}     \begin{Part}     Let $a=b$. Deduce that $0=0$.     \end{Part}     \begin{Part}     Let $a=42$. For what values of $b$ do we have $a=b$?     \end{Part}     \end{Exo}     \end{document}      The warning I get is the following: > pdf TeX warning (ext4): destination with the same identifier > (name{Part.1.1}) has b een already used, duplicate ignored > > \AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi l.35 > \end{document} pdfTeX warning (ext4): destination with the same identifier > (name{Part.2.1}) has been already used, duplicate ignored > > \AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi l.35 > \end{document} ] (./TestHyperref.aux) ) This looks like a strange behavior to me. Or have I done anything wrong? Besides, the error completely disappears if I use, e.g., enumerates inside the Part environment, as in               ...     \begin{Part}     \begin{enumerate}     \item Prove that $1=0$.     \end{enumerate}     \end{Part}     ...      Also, there's no error if I remove the hyperref package. Unfortunately, I need to use hyperref. Any idea?


title: scale tikzpicture to enclosing minipage

text: How to alter the following code, to have the **tikzpicture to have the exact width and height of the`minipage` containing it** (without changing the literal coordinates of course :))?               \begin{minipage}{2cm}          \begin{tikzpicture}          \draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);          \end{tikzpicture}          \end{minipage}


title: How can I align, break and fill tabular entries properly for my Curriculum Vitae?

text: I am trying to make a nice Curriculum Vitae in LaTeX but am having some difficulties with aligning, breaking and filling the tabular entries. A Curriculum Vitae has to be short and clear. I thus need a tabular environment which is allowed to be split across multiple pages. The 'entries' of the tabular environment have to be horizontally aligned, but should not be split. For instance, if we consider the following               \section*{Work experience}         \begin{tabular}{ll}             Starting date 1 - End date 1 & Name 1\\             & Description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1\\             \\             Starting date 2 - End date 2 & Name 2\\             & Description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2\\             \\         \end{tabular}      , I want the descriptions to be limited to the page width minus its horizontal offset, and I do not want the descriptions to be split across multiple pages. Splitting should only be allowed between 'entry 1' and 'entry 2'. For the former, you can use `\usepackage{tabularx}` and for the latter the `\usepackage{supertabular}` could perhaps help. However, I do not know how to use them at the same time, and supertabular break at every `\\\` and not only between 'entry 1' and 'entry 2'. How can I resolve these issues?


title: How come only part of the interior of this path is used for clipping?

text: Here is an example document and the output I get from it.               \documentclass[convert={size=480}]{standalone}          \usepackage{tikz}          \tikzset{ little circle/.style = { fill = black,                                        shape = circle,                                        minimum size = 1.5mm,                                        inner sep = 0mm,                                        outer sep = 0mm},               concentric circles/.style = {draw = gray!90, very thick}}          \begin{document}          \begin{tikzpicture}         \def\concentriccircles{\foreach \r in {1.5, ..., 19} {circle (\r mm)};}         \foreach \name/\x/\y in {A/8/30, B/16/-24, C/-30/8} {             \node [little circle] (\name) at (\x mm, \y mm) {};         }         \node [little circle] (P) at (barycentric cs:A=1,B=1,C=1) {};         \foreach \name/\origin/\destination in {H/A/B, J/B/C, K/C/A} {             \path (\origin) -- (\destination) coordinate [midway] (\name);             \path (P) -- (\name) node [pos = 1.6, little circle] (\name 2) {};         }         \draw [concentric circles] (P) \concentriccircles;         \foreach \x/\y/\v/\c in {A/B/H/green, B/C/J/red, C/A/K/blue} {             \begin{scope}                 \clip (\x) .. controls (P) .. (\y) -- (\v 2) -- (\x); % (*)                 \draw [concentric circles, draw = \c] (P) \concentriccircles;             \end{scope}         }         \begin{scope}[very thick]             \foreach \x/\y/\c in {A/B/red, B/C/blue, C/A/green} {                 \draw [\c] (\x) .. controls (P) .. (\y);             }         \end{scope}         \begin{scope}[very thick, red]             \path [use as bounding box];             \clip (A) circle [radius = 25mm];             \draw (A) .. controls (P) .. (B);         \end{scope}     \end{tikzpicture}          \end{document}      ![](http://junk.orderofthehammer.com/j2014/clip-bezier.png) I don't understand why the clipping area excludes the triangle `(A, B, H2)` (`(B, C, J2)` and `(C, A, K2)`). You can see it does because the concentric circles beyond the line between A and B (B and C, C and A) are still grey. # Edit Here is what it looks like if you add the `draw` option to the `\clip` command at `(*)`. ![](http://junk.orderofthehammer.com/j2014/clip-bezier-2.png)


title: Lettrine and Arabic script

text: I am trying to typeset texts with numbered, non-titled chapters with latex and want the chapter number always large in the text. I have used lettrine in latin script text successfully, but I get horrible text overlaps in Arabic script. This is what I do.                   \documentclass{article}         \usepackage{polyglossia}         \usepackage{lettrine}         \title{(My title)}         \date{}              \setmainlanguage{english}         \setotherlanguage{farsi}         \newfontfamily\englishfont{Gentium}         \newfontfamily\farsifont[Script=Arabic,Scale=1.3,Ligatures=TeX,Mapping=arabicdigits]{Nazli}                   \begin{document}         \maketitle         \begin{farsi}                   \lettrine[lines=3]{1}{ }    تقدیم به عالیجناب تئوفیلوس:          تا به حال نویسندگان بسیاری به نوشتن شرح وقایعی كه در بین ما رخ داده است، اقدام         کردهاند          \end{farsi}          \end{document}      Any useful suggestions?


title: Passing parameters to \g@addto@macro

text: I'm a complete newbie but have a little background in programming. I've been looking at a MWE located here provided by Yiannis Lazarides. In the macro definition, we have               %% add an image to the DB, use the LaTeX macro     %% \g@addto@macro to store them at the DB location     \def\addtoDB#1#2{%         \ifx\@empty#1             \g@addto@macro{#1}{#2}         \else             \g@addto@macro#1{,#2}         \fi     }      What is the difference between `\g@addto@macro{#1}{#2}` and `\g@addto@macro#1{,#2}` ?


title: Aligning caption with figures in `subfigure` environment

text: I have the code               \documentclass[11pt]{article}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{chngcntr}     \counterwithin{figure}{section}     \usepackage{subfigure}          \begin{document}          \begin{figure}[ht]      \captionsetup{format=hang,width=7cm}       \caption{(a) dfdsfsdds.}     \quad     \subfigure[Neutral Smiley]{%     \includegraphics[height=3cm]{image.png}     \label{fig:subfigure1}}     \quad     \subfigure[Neutral Smiley]{%     \includegraphics[height=3cm]{image1.png}     \label{fig:subfigure1}}     \quad     \end{figure}          \end{document}      which gives something like ![enter image description here](http://i.stack.imgur.com/8Nrt9.png) I'd like the "Figure" caption to lie on the left of these images, but still be inline with them. So something like: ![enter image description here](http://i.stack.imgur.com/sjILf.png) Is there a way to do this within my `subfigure` environment?


title: On syllabic trees

text: I have to typeset some syllabic trees. They look like this: ![A simple syllabic tree](http://i.stack.imgur.com/IYT0e.png) I’m currently using the `qtree` package to typeset them, but I can’t figure out how to put all the last letters on the same level — like the red letters in the image above. Here’s a code excerpt:               \Tree[.$\sigma$ [.A \ipa{Z} ] [.R [.N \ipa{e} ] [.Co N ] ] ]      And the output: ![Output](http://i.stack.imgur.com/AU8po.png) So, /ʒ/, /e/ and /N/ should be on the same level. Is that possible? I have no problem migrating to TikZ — I only think that `qtree` is a more straightforward approach. Just to make things clear, `\ipa` is a shorthand I created through `\newcommand` for `\textipa` , provided by the Rei Fukui’s fantastic `tipa` package.


title: Widetilde and prime (derivative) position

text: I need to write something like `{\widetilde f}'` in my text, but the result looks rather ugly since the prime (derivative) sign is too low. It looks like `\widetilde{f'}`. Is there any way to do this properly?


title: Change entry label to [Jones,82]

text: I'm trying to set a bibliography this way:               \documentclass[12pt,french]{report}     \usepackage[backend=bibtex,     style=alphabetic     ]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{Cha65,       author = {Charles, Daniel},       year = {1965},       title = {Entr’acte: “Formal” or “Informal” Music?},       journaltitle = {The Musical Quarterly},       volume = {51},       number = {1},       pages = {144--165},     }     \end{filecontents}          \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \addcontentsline{toc}{chapter}{Bibliography}     \end{document}      Which biblatex's style allows me to display citation this way `[AuthorName, Last_two_integers_of_year_number]`, please ? Thanks a lot!


title: Undefined control sequence error with moderncv

text: When I use these commands to display a bibliography in a `moderncv` document I get an Undefined control sequence error.               \nocite{*}     \bibliographystyle{plain}     \bibliography{publications}      This is the error message:               ! Undefined control sequence.     \ref@jnl #1->{\jnl@style                               #1}     l.17 \newblock {\em \mnras                               }, 370:529--558, August 2006.      The `\mnras` macro is defined in a style file `aas_macros.sty` that is imported in the preamble. The exactly same commands work well when I use the article document class. What could be going on?


title: How to edit tables in LyX?

text: I have a problem with re-sizing the table in LyX. When I export it to `.pdf` its too wide so it goes far out of the border. Any ideas on how to shrink it, or make it readable in `.pdf`? p.s. In LyX, everything seems ok.


title: Change figure/equation labels, along with their \ref?

text: Say I labeled a Equation with `\label{ABC}`, and refer to it couple of times with `\ref{ABC}`. Now I want to change the label to `\label{XYZ}`. Is there an automatic way that those `\ref{ABC}` will be simultaneously changed to `\ref{XYZ}`? I also have multiple `.tex` files and `\input` them to the main file. So search/replace doesn't work well...


title: Use several different fonts in latex beamer / change font for block title only

text: I want to use a specific font only for the headings. Does anybody know how to change the font (and I mean really the font, not only its appearance like bold, italic or so) for the beamer block title only? In the code below I added an own block-environment where the font is selected manually. I would like to do the same for the default blocks (maybe the `setbeamerfont` command can be used for this but I have found no way to do so). Furthermore, my own block has the deficit that it does not change its appearance according to the `setbeamerfont` command, i.e. if I select a bold font for the title, it changes the appearance of the ordinary block, but not my own one.               \documentclass[slidestop]{beamer}     \usetheme{Madrid}          \newenvironment<>{myblock}[1]{%        \begin{actionenv}#2%        \def\insertblocktitle{\fontfamily{LinuxLibertineO}\selectfont #1\par}%        \par%        \usebeamertemplate{block begin}}      {\par%        \usebeamertemplate{block end}%        \end{actionenv}}               \begin{document}          \setbeamerfont{block title}{series=\bfseries}               \begin{frame}{Test}     \begin{block}{The quick brown fox jumps}     Test     \end{block}     \begin{myblock}{The quick brown fox jumps}     Test     \end{myblock}     \end{frame}          \end{document}


title: unicode-math + TeX Gyre Termes Math without \bigstar?

text: When I use TeX Gyre Termes Math with `unicode-mat`h like in the example I can't get the `\bigstar` symbol. It seems that the font does not have a bigstar at U-2605. Is there a way to re-define the `\bigstar` command to deliver a scaled version of the `\star` command to fit the math sizes? BTW, `\ast` is a lot bigger than `\star`; I wouldn't have to bother about `\bigstar` if `\star` were of the same size as `\ast`.               \documentclass{minimal}     \usepackage{fontspec}     \setmainfont[Numbers=OldStyle, Ligatures=TeX]{TeX Gyre Termes}     \usepackage[math-style=ISO]{unicode-math}%     \setmathfont[Numbers=Lining]{TeX Gyre Termes Math}     \begin{document}     \begin{equation}         (\mathbb{Z}(p))^\star \star \qquad          \left(\mathbb{Z}(p)\right)^{\bigstar} \bigstar\qquad         (\mathbb{Z}(p))^\ast \ast     \end{equation}         ---$\symbol{"2605}$\symbol{"2605}---     \end{document}


title: subfloat with array?

text: the following code produces an error: > missing $ inserted. 1.109 \end{array} any suggestions on what I am missing:               \begin{figure}[H]     \caption{My caption goes in here.}     \centering     \subfloat[Subfloat 01]     {\includegraphics[width=0.30\textwidth]{../PNG/Figure_1.png}}     \subfloat[Subfloat 02]     {\[ \begin{array}{ccc}     $text$ & $text$ & $text$\\     $text$ & $text$ & $text$     \end{array}\]}     \end{figure}


title: Adding tikzpicture layers that can be viewed sequentially in the output (Motzkin graphs)

text: In a Beamer presentation it's possible to add elements to a tikzfigure on a page sequentially so that the viewer doesn't have to take in all of the complexity at once. You cannot use the Beamer commands in a book documentclass however. Is it possible to add layers to a diagram using tikz, say for an interactive figure in an e-book? The viewer should be able to advance through the sequence of frames with a mouse click.


title: Macro to convert 'multi-line' text to 'single-line' (remove line breaks?)

text: Consider the following example:               \documentclass{minimal}          \def\myMultiLineText{%     Line One Line One \\ %     Line Two Line Two \\ %     Line Three Line Three \\ %     Line Four Line Four  %     }          \begin{document}          Here is multi-line: \myMultiLineText ...          \end{document}      In the document, I'd like to insert something like:               Here is single-line: \doSingleLine{\myMultiLineText} ...      ... where the `\doSingleLine{}` macro would basically remove the line-breaks (`\\\`) from the text stored in `\myMultiLineText` (so its contents would be rendered on a single line). Could someone provide an example of such a macro?


title: stacked \widetilde and \dot

text: I need to typeset (from bottom up) math bold L with above-dot and widetilde (both centered horizontally above the L), i.e. approximate time-derivative of tensor-valued function. (I would google more, but being one-handed those days makes it a bit more difficult.)


title: How to cite and reference a manuscript type of work by title

text: For a project I am working on, I use manuscript type of reference works that I would like to cite and include in the bibliography. Though these manuscripts have an editor and year of publication, it is customary to cite them by the title of the manuscript, and list them under that title in the bibliography as well. This is more meaningful for readers. I was initially using natbib, and here the @misc entry type and key entry field solved it for me. For example:               @misc{CSPD16991700,         title    = {{Calendar of State Papers Domestic: William III, 1699 - 1700}},         editor   = {{Edward Bateson}},         key      = {{CSPD 1699-1700}},          year     = 1937     }      In the text, I would see something like               (CSPD 1699-1700, pp. 13-25)      which is more meaningful than               (Bateson (1937), pp. 13-35)      I migrated recently to biblatex, but now this construction does not work anymore. I can use the \citetitle, and add a shorttitle in the entry to achieve the proper citation, but the work is still added in the bibliography under the editor, and not under the title. What is a robust and acceptable solution for this using biblatex? Thank you in advance for suggestions I can look into.


title: How to define a list with custom symbols?

text: I'd like to define a list like the following: ![enter image description here](http://i.stack.imgur.com/eWzB8.gif) The nearest I found while googling was this:               \begin{itemize}     \item[-] foo     \item[*] bar     \end{itemize}      But how can I now use a cross or a check symbol?


title: Can't get split rectangle to shrink small enough in this TikZ picture

text: I'm having problem with a TikZ picture - I've got rectangles that I've split, but for some reason the split rectangles are _a bit_ larger than the other rectangles, causing the the alignment to get messed up: ![enter image description here](http://i.stack.imgur.com/sa15M.png) Any ideas on how to solve this? I've included the code below.               \documentclass[a4paper, 11pt]{article}          \usepackage[rgb,hyperref]{xcolor}     \usepackage{tikz}          % Define colors     \definecolor{shade1}{rgb}{0.9, 0.9, 0.9}     \definecolor{shade2}{rgb}{0.75, 0.75, 0.75}     \definecolor{shade3}{rgb}{0.5, 0.5, 0.5}     \definecolor{shade4}{rgb}{0.35, 0.35, 0.35}          % Load TikZ libraries     \usetikzlibrary{shapes,arrows}     \usetikzlibrary{fit}     \usetikzlibrary{backgrounds}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}          % Text settings     \newcommand{\figureTextSize}{\tiny}          % Figure element lengths     \newlength{\gpgpuElemSep}     \setlength{\gpgpuElemSep}{1mm}     \newlength{\gpgpuElemSize}     \setlength{\gpgpuElemSize}{8mm}          % TikZ styles     \newcommand{\arrowStyle}{stealth}     \newcommand{\bendAngle}{45}     \newcommand{\lineThickness}{semithick}     \tikzstyle{box} = [%       draw,       rectangle,       \lineThickness,     ]                    \begin{document}     \begingroup     \figureTextSize     \begin{tikzpicture}[%         every node/.style={%           node distance=0.375\gpgpuElemSep,         },         component/.style={%           box,           minimum size=0.42\gpgpuElemSize,           inner sep=0pt,         },         alu/.style={%           component,           fill=shade1,         },         controlcache/.style={%           component,           rectangle split,           rectangle split parts=2,           rectangle split part fill={shade2, shade3},         },         memory/.style={%           box,           fill=shade3,           minimum height=0.5\gpgpuElemSize,           inner sep=0pt,         },       ]       % Rows of ALUs, control logics and caches       \foreach \i in {1, ..., 7} {%         \ifnum \i=1           \node [controlcache] (cc\i) {};         \else           \pgfmathtruncatemacro\prevCC{\i-1}           \node [controlcache, below=of cc\prevCC] (cc\i) {};         \fi         \foreach \j in {1, ..., 7} {%           \ifnum \j=1             \node [alu, right=of cc\i] (alu\j) {};           \else             \pgfmathtruncatemacro\prevAlu{\j-1}             \node [alu, right=of alu\prevAlu] (alu\j) {};           \fi              }       }            % Memory       \path let \p1 = (cc7.south west),                 \p2 = (alu7.north east)              in                node [%                  memory,                  minimum width=\x2-\x1-\pgflinewidth,                  below right,                ] at ([%                  yshift={-2\gpgpuElemSep},                ] cc7.south west) (memory) {Memory};     \end{tikzpicture}     \endgroup     \end{document}


title: How do i get the x axis on top but keep a line on the bottom

text: I have the following plot               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     xlabel=$x$,ylabel=$\sin x$,     axis x line*=box]     \addplot[blue,mark=none,     domain=-10:0,samples=40]     {sin(deg(x))};     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KX2Ei.png) But i want the x axis on top:               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{width=6cm,compat=newest}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     xlabel=$x$,ylabel=$\sin x$,     axis x line*=top]     \addplot[blue,mark=none,     domain=-10:0,samples=40     ]     {sin(deg(x))};     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/FcInH.png) How do i get the line in the bottom back? ![enter image description here](http://i.stack.imgur.com/smmSO.png)


title: Anchor to left margin of the page instead of beginning of line

text: This may be a very minor thing, but when I click on an internal link within the document (produced by `hyperref`), the link takes me to the beginning of the line of text, moving the page horizontally (undesired) as well as vertically (desired), i.e. up/down to the page I need. Instead, I would like it to take me to the left-most margin of the page at the same point down the page. This is mainly (but not only) because I zoom into the page and centre it carefully, and when I click a link it always moves it to the wrong place. I hope these screenshots makes it clearer. This is what clicking to the "Chapter 3" anchor should do: ![enter image description here](http://i.stack.imgur.com/Pb6VP.png) And this is what it shouldn't do: ![enter image description here](http://i.stack.imgur.com/ZSdE3.png) Is there a way to do this?


title: Use of the comment package

text: In a `.tex` document, I'm using the `comment` package to produce two different versions (let's say : versionA and versionB) of the document. Each version contains different parts (it could be paragraphs, equations,...). If I use `\includecomment{versionA}`, it will include all the content between `\begin{versionA}` and `\end{versionA}`. Now, let's say some of the parts in each version are marked with a `*`. How can I ask latex to compile only the `*` parts in one version ? It may be clearer on the following example. Let's say I have               \documentclass[10pt,a4paper]{article}          \usepackage{comment}     \includecomment{versionA}     \excludecomment{versionB}          \begin{document}          \begin{versionA}          *part1          part2          *part3          \end{versionA}          \begin{versionB}          part1          *part2          \end{versionB}          \end{document}      I would like something which enables me to do : "compile all the content of versionA" or "compile only the content marked with * in versionA" (same for versionB). I hope this is clear!


title: Page Number styling in LaTeX

text: How to put the page numbers inside a logo in book in LaTeX. That is, in the book, at the footer, I want to add a logo and inside the logo the page number. How do I do that?               \documentclass[12pt]{book}     \usepackage{fancyhdr}     \begin{document}     %\includegraphics[scale=.25]{logo.png} this line throws an error ---> just to include a simple image for demo     \chapter{A Sample Chapter}     This is a sample chapter.     \end{document}      This is my logo: ![enter image description here](http://i.stack.imgur.com/LW5th.jpg)


title: Using Lato Light Font Throughout a Document

text: The command for using the lato light font is given to be               \fontseries{l}\selectfont      but this command produces no change to my document when compiled with `pdflatex`. I would like to use the light version of Lato as the default font for my entire document. How can I achieve this? Thanks!


title: How do I pronounce "TikZ"?

text: I have heard people pronounce the name of the package "TikZ" in many different ways: "tiks" or "tikz" or "tik-zee" or even "tee-eye-kay-zee". Does anyone know the authoritatively correct pronunciation?


title: How to use the package etoc to create local toc's?

text: I need to write a very large document, and I would like use etoc to create local tocs. (the minitoc is incompatible in my doc;) how i can create a local list of table and figures? why nameref gets wrong reference in this mwe? when I use a unnumbered part (\part*{Appendix}) the command \localtableofcontents show a empty table and the previous table of contents list the appendix content, how can I correct it?               \documentclass[]{report}     \usepackage{lipsum}     \usepackage{etoc}     \usepackage{titlesec}     \usepackage{nameref}          \titleclass{\part}{top} % make part like a chapter     \titleformat{\part}     [display]     {\centering\normalfont\Huge\bfseries}     {\titlerule[2pt]\vspace{3pt}\titlerule[1pt]\vspace{3pt}\MakeUppercase{\partname} \thepart}     {0pt}     {\titlerule[1pt]\vspace{1pc}\huge\MakeUppercase}     %     \titlespacing*{\part}{0pt}{0pt}{20pt}          \begin{document}     \listoffigures\newpage     \listoftables\newpage     \tableofcontents\newpage               \etocmulticolstyle{\noindent\bfseries\footnotesize     \leaders\hrule height1pt\hfill     \MakeUppercase{Contents}}     \etocsettocdepth{1}          \part{FIRST PART}\label{part:one}     %how to make a localtableofcontents of figures and tables?     \localtableofcontents     \chapter{INTRODUCTION} \lipsum{1}     \chapter{METHODOLOGY} \lipsum{1}     \chapter{CONCLUSION} \lipsum{1}               \part{SECOND PART}     %how to make a localtableofcontents of figures and tables?     \localtableofcontents     \chapter{INTRODUCTION}      Like in \nameref{part:one}.% why nameref gets the wrong reference?      \lipsum{1}          \chapter{METHODOLOGY} \lipsum{1}     \chapter{CONCLUSION} \lipsum{1}          \appendix     \part{APPENDIX}     %how to make a localtableofcontents of appendix     \localtableofcontents     \chapter{document a}     \chapter{document B}     \end{document}      thank u : )


title: Remove hyperlink from figure captions

text: I have been asked by the a journal editor to remove the blue highlighting (i.e., hyperlinks) in all figure captions. The following MWE generates the below output (provided that the ctanlion.eps file is saved in the working folder).:               \documentclass{article}     \usepackage{graphicx}     \usepackage{hyperref}     \hypersetup{       colorlinks = true,       citecolor = blue,       linkcolor = blue,       urlcolor = blue}          \begin{document}          \begin{figure}     \includegraphics[width=0.5\textwidth,keepaspectratio]{ctanlion.eps}      \caption{CTAN lion drawing by Duane Bibby; thanks to www.ctan.org}     \label{fig:Figure1}     \end{figure}          \begin{figure}     \includegraphics[width=0.5\textwidth,keepaspectratio]{ctanlion.eps}      \caption{Same as Fig~\ref{fig:Figure1}}     \label{fig:Figure2}     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/iMYo6.jpg) The red annotations are manually added on top of the latex output to better explain my request.


title: Align left-aligned formula at two points

text: I would like to get this WITHOUT using tables, because in my real equations there are fractions included that are scaled down in tables               a+b+c=1     y    =2      My code looks as follows:               \begin{align*}     &a+b+c&=1\\     &y    &=2     \end{align*}      But it doesn't work. I tried thousands of things such as `flalign` and so on. But nothing works. I am really frustrated. Any ideas?


title: spacing between lines in per entry of bibliography

text: I am using Easy-Thesis template to write my thesis. I downloaded this template from writelatex website. I am using `natbib` to format my bibliography style. This generate nice layout for the bibliography. But what I find is the distance between lines in a bibliography entry. The spacing between lines in a entry is about `4pt`. I want them to be close to each other. The next entry should be about `10pt` apart. What now I have is the spacing between all the lines (within entry and between entries) is the same through out whole bibliography. I have entered commands like               \usepackage[super,sort&compress]{natbib}          \usepackage{natbib}          \setlength{\bibsep}{0.0pt}      But seems it doesnt help me. You help is much appreciated in advance. Thank you. Vijay


title: How to publish a package that includes scripts and/or executables?

text: I'm preparing to publish my first package, and am not sure about the best way to proceed. I understand the standard CTAN publishing approach, but I'm dealing with a somewhat atypical case since my package involves Python scripts and (for Windows) batch files. I'm not sure what special treatment these may require. # Background My package allows Python code to be typeset within a document and/or saved to an external file from which it is executed (and then the output can be pulled back into LaTeX). Basically, a combination of most features of `python.sty`, `SageTeX`, and `minted`, with a lot of emphasis on speed (everything is hashed, only run when changed, and run in parallel) and usability (all Python errors can be reported in the LaTeX editor, with correct line numbers). Getting this to work involves running `latex file.tex`, `pythontex.bat file` (or `pythontex.py file`, depending on operating system; the `.bat` basically just calls the `.py`), and then `latex file.tex`. The problem is that the package needs to be installed such that `pythontex.bat` (or `pythontex.py`) can be run without specifying the full path (that is, be somewhere that is in the system path). They need to behave as if they were binaries in TeX Live's `bin/` folder. This is necessary so that they can easily be invoked by a LaTeX editor or from the command line. There is one additional complication. The package requires two additional Python files, `pythontex_utils.py` and `pythontex_types.py`. These need to be able to be imported by any Python script. That means that either they need to be installed as a Python package (so Python can automatically find them), or I need a way to automatically determine the full path to their location (so they can be imported using the path). # Possible approaches   * `SageTeX` bundles all the Sage/Python stuff within Sage. It is up to the user to make the `.sty` file accessible. I could take a similar approach: put my code in a Python package, and hopefully come up with some kind of automatic installer for the `.sty` file. That would make it easier to deal with the Python side of things (version 2.x versus 3.x, etc.), but would also mean that the package isn't on CTAN.   * I could put everything on CTAN except for the Python stuff that must be importable, and publish that separately as a Python package. The main disadvantage would be that users would have to install two things.   * I could put everything on CTAN, if there are satisfactory ways of dealing with all of my questions. That approach is preferable. # Summary   * I would like a way to install a `.py` or `.bat` file as part of a package installation, so that it can be launched just as if it were an executable in TeX Live's `bin/` folder (since that folder is added to the system path).   * This may be a restatement of the first point, but any elucidation of how TeX Live handles scripts would be very useful. For example, `sty2dtx` is a Perl script, but at least in the Windows installation of TeX Live, there is also a `sty2dtx.exe` under `bin/`, which launches the Perl script. It would be nice to know if these binaries are coming from package authors or TeX Live. I suspect TeX Live (at least for `sty2dtx`, there is no `.exe` on CTAN).   * Unless I also publish a separate Python package, I need a way to get the full path to where a LaTeX package is installed, based just on knowing the package name, so my programs can find the Python files that must be imported.


title: MathJax vertical space + too thick fraction lines

text: When I use `MathJax`, sometimes the fraction lines got a different thickness (below imgage). Why? Another question is how to increase the vertical space between the lines, because in `\begin{align} ... \end{align}` the lines are so close to each other and it's hard to read them (as you can see on the below sample image). ![enter image description here](http://i.stack.imgur.com/ZlAJI.png)


title: Which beamer theme is this? Or how to create the one like this

text: Could anyone please help, which beamer theme is this? Or how to create one like this? Any help will really be appreciated ![](http://i.stack.imgur.com/2FcTO.jpg)


title: Chemnum putting wrong numbers when compound label is introduced as a variable (stored as commands)

text: I'm on the process of migrating to the chemnum numbering system due to its advanced features (thank you!). For my purposes I need to input external files with the information (for each compound) stored as commands, and then applying those commands into a template (to "fill in" the information). You can see the "minimal" code below (I have not cropped the packages that I'm using in the preamble just in case there's a conflict or order issue I'm unaware of). Basically there are three commands that store the information of the compound and a fourth command that inserts a new section and a EPS figure (with a label 'TMP1' to replace). When compiling, this label is OK in the second event but not in the first one (!!!?). As the replacement occurs, I don't think is any problem with the psfrag part of it, but with the numbering of the compounds itself. If the "renewcommand" method is unsuitable for chemnum, is there any other alternative to introduce information from different files and apply consecutively the same template to them? Thanks a lot!               \documentclass[a4paper,12pt,oneside]{article}     \usepackage{environ,fixltx2e}     \usepackage{titletoc}     \usepackage[linktocpage=true,hidelinks,unicode]{hyperref}     \usepackage{fullpage}     \usepackage[detect-all]{siunitx}     \usepackage{graphicx}     \usepackage[runs=2,crop=off]{auto-pst-pdf}     \usepackage{chemnum}     \usepackage[journal=rsc]{chemstyle}     \usepackage[version=3]{mhchem}     \usepackage{bm}     \usepackage{multicol}     \usepackage{etoolbox}     \newcommand{\compoundtag}{}     \newcommand{\nameofthecompound}{}     \newcommand{\descriptiontext}{}          \newcommand{\compoundDATA}{         \section{\nameofthecompound{} - \cmpdplain{\compoundtag}}             \begin{scheme}[H]                 \replacecmpd[tag=TMP1]{\compoundtag}                 \includegraphics{a.eps}             \end{scheme}         \descriptiontext     }               \begin{document}          Main text mentioning \cmpd{A} and \cmpd{B}          %This data comes from a different file through an input event.     \renewcommand{\compoundtag}{A}     \renewcommand{\nameofthecompound}{Name of compound A}     \renewcommand{\descriptiontext}{Text of the compound A}     \compoundDATA          %This data comes from a different file through a second input event.     \renewcommand{\compoundtag}{B}     \renewcommand{\nameofthecompound}{Name of compound B}     \renewcommand{\descriptiontext}{Text of the compound B}     \compoundDATA          \end{document}


title: Trying to add an image/icon just before the text in a section while using moderncv

text: Note: I'm using `sharelatex` I was wondering if there are any way to set the background color of the header part (the one that contains personal info) of a file that uses `moderncv` in order to visually differentiate the header and the content. I tried with `minipage`, `\hfill` and so on but I guess that `moderncv` uses a heavily customized template and everything I've tried so far lead to a compile error.               \section{\includegraphics{../static/32x32/image.png}Expériences Professionnelles}      The error:               Error in fr/source.tex (line 54): Use of \@newline doesn't match its definition.     \@ifnextchar ... \reserved@d =#1\def \reserved@a {                                                   #2}\def \reserved@b {#3}\f...     l.54 ...image.png}Expériences Professionnelles}          If you say, e.g., `\def\a1{...}', then you must always     put `1' after `\a', since control sequence names are     made up of letters only. The macro here has not been     followed by the required stuff, so I'm ignoring it.


title: An Introduction to LaTeX in beamer documentclass in TeX format

text: Sorry if this is a off topic or duplicate question. I'm looking for `An Introduction to LaTeX` in `beamer` `documetclass` in `tex` format. Any help will be highly appreciated. Thanks * * * **Edited** * * * I'm looking for a document in Tex format similar to this one. So that I don't have to type everything.


title: What is "TeX daemon" and why and how is it used?

text: Recently I've come across a question that asks about "TeX daemon" for Windows. I always thought that nature of TeX is compilation of document sources. Why would anyone use a daemon for that? So, what is a "TeX daemon", and why is it used?


title: Can latexdiff be used for mathematics documents?

text: I've been pulling my hair out trying to get latexdiff to work with a mathematics document. It produces output that latex can't compile if one of the files is this:               \documentclass{amsart}     \begin{document}         \begin{equation} \label{eq:Psi-action}             2=1+1         \end{equation}     \end{document}      and the other is this:               \documentclass{amsart}     \begin{document}         yo     \end{document}      But I think it chokes on other things as well. Am I doing something wrong? Is anyone able to use latexdiff for mathematics documents more than a few lines long? If anyone is able to use it by making some easy changes to their LaTeX code, are there general guidelines about what kind of LaTeX code to avoid? Update 1: It appears that latexdiff doesn't like things like "\big(". You can sort of get around this by changing every "\big(" to a "\left(". Update 2: Here is another pair of files that breaks it:               \documentclass{amsart}     \begin{document}         \begin{equation*}             X_{[1],n}          \end{equation*}     \end{document}      and               \documentclass{amsart}     \begin{document}         \begin{equation*}             [1]X_{n}         \end{equation*}     \end{document}      I had only a few such examples and was able to get around them by just commenting out the offending code, but it would be nice to know if there are any rules of thumb to avoid having to worry about it in the first place, like Andrew's helpful comment about Perl and line breaks.


title: Unwanted white space in references

text: I am getting unwanted whitespace in references. ![unwanted out put](http://i.stack.imgur.com/w1xVy.png) I am using these packages for my bibliography               \usepackage[round, sort, numbers]{natbib}     \usepackage[numbib]{tocbibind}     \renewcommand{\bibname}{References}      These are my lines to create the bibliography               \bibliographystyle{plainnat}     \bibliography{references}      And my .bib entries are as follows               @booklet{NaveDP,     author = {Nave},     title = {Law of Dulong and Petit},     year = {2014},     howpublished = {url},     }          @booklet{NaveDB,     author = {Nave},     title = {Debye's Contribution to Specific Heat Theory},     year = {2014},     howpublished = {url},     }          @booklet{Brown,     author = {Robert G. Brown},     title = {First Law of Thermodynamics Summary},     year = {2004},     howpublished = {url},     }


title: Include section number in list number

text: As a follow-up to this question, I'd like to know if it is possible to automatically include the current section number, including all nesting levels, in the list number. How do I accomplish this? Example of what I want:               \section{This is section 1}       \pointedenum\begin{enumerate}         \item This item has number 1.1.         \item This item has number 1.2.         \pointedenum\begin{enumerate}           \item This item has number 1.2.1.         \end{enumerate}       \end{enumerate}            \subsection{This is section 1.1}         \pointedenum\begin{enumerate}           \item This item has number 1.1.1.           \item This item has number 1.1.2.         \end{enumerate}     % etcetera...


title: How can I store variables in lists and make use of them?

text: This question is clearly related to How can I store variables and iterate over them?. I'm sorry to ask such a close one, but I really don't understand the answer in plain TeX by David Carlisle. Basically, I'd like to make a template in LaTeX, compatible with plain LaTeX/pdfLaTeX (no lua code), with as few dependencies as possible, that would allow me to get personal information this way:               \adduser{John Doe}{UK}     \adduser{M. Dupont}{France}     \adduser{M. Martin}{Belgium}{France}     \adduser{Jan Jansen}{Netherlands}     \adduser{Matti Meikäläinen}{Netherlands}{Finland}      And output something like that: > **John Doe** (a), M.Dupont(b), M. Martin(b, c), Jan Jansen(d), Matti > Meikäläinen(d, e) > > a: UK > > b: France > > c: Belgium > > d: Netherlands > > e: Finland I'm sure this is possible, but in plain LaTeX, this seems very difficult. Any idea?


title: Add text after bibliography list

text: I have created my bibliography with Bibtex. I want to add a one-lined sentence **after the items**. How can I do that?


title: How do I create the following macros?

text: I would like to define the following macros.               \newcommand{\NC}{\ensuremath{\mathbf{NC}}}     \newcommand{\NC}[1]{\ensuremath{\mathbf{NC^{#1}}}}      But LaTeX complains that `\NC` is already defined. So, I only define `\NC` with optional arguments as follows.               \newcommand{\NC}[1][\phantom{0}]{\ensuremath{\mathbf{NC^{#1}}}}      And now `\NC` works, but `\NC1` doesn't work as expected.


title: Hierarchy of inheritance in bibtex crossrefs - not inheriting second layer

text: I have entries in my bibtex file as follows:               @inproceedings{Kang2011,         author = {Kang, Hongwen and Hebert, Martial and Kanade, Takeo},         title = {{Discovering object instances from scenes of Daily Living}},         crossref = {iccv-2011},         pages = {762--769}     }          @proceedings{iccv-2011,         crossref = {iccv},         year = {2011} }          @misc{iccv,         booktitle = {International Conference on Computer Vision (ICCV)}     }      The idea is that if I wish to change how a conference name is written, I need only do it in one place - this is inspired by this answer. However, when compiling a latex document using this, the year from the `@proceedings` shows up in the bibliography, but not the conference name from `@misc`: ![enter image description here](http://i.stack.imgur.com/nBUBr.png) What am I doing wrong?


title: KOMA-script modify part* page

text: My document has parts and *parts. I redefined the `\part` to print only a decorated number, that's working fine. Now I need `\part*` to print a decoration using the same style as `\part`. `\part*{}` ships out an empty page, which makes sense because it must not have a line for a part number. I can more or less do it by hand, using `\clearpage` and putting just the decoration on the page. But then both the horizontal and the vertical alignment of the decorations come out different to the part page layout. How can I make `\part*` print my decoration on the part page? Note: I don't have a table of contents, so that's not a concern.               \documentclass[open=any]{scrbook}     \usepackage{adforn}     \usepackage{graphicx}     \usepackage{lipsum}          \renewcommand*{\thepart}{\arabic{part}}     \renewcommand*{\partformat}{\adforn{21}~\thepart~\adforn{49}}     \renewcommand*{\partpagestyle}{empty}          \begin{document}     \part{}     \lipsum          \clearpage     \begin{centering}     \vspace*{\fill}     \Huge\adforn{21}\adforn{11}\adforn{49}     \vfill     \end{centering}     \clearpage          \lipsum          \part*{}          \lipsum          \end{document}