title: How to change citation style in amsrefs?

text: I want to use the alphabetic style of citation in amsrefs, e.g. I want [Kr03] instead of just [1]. The documentation says that there is an option to do this, but I couldn't figure out how to invoke this option. Sorry for the dumb question. I am appropriately embarrassed already.


title: Dirtree and lstset side by side

text: A `\dirtree` and a `\lstset` should be shown side by side. With the code below the `\dirtree` is vertically not on the same level as the `\lstset` (above the `\dirtree` is some empty space). How can I fix that? Any help is appreciated. Minimal code:                \begin{minipage}[hbt]{.5\linewidth}         \dirtree{%            .1 /.           .2 Directory1.           .3 Directory2.           .2 Directory3.         }         \captionof{figure}{A directory structure.}       \end{minipage}       \hfill       \begin{minipage}[hbt]{.5\linewidth}         \lstset{language=java}         \begin{lstlisting}[caption=Hello World., captionpos=b, label={lst:javacode}]             System.out.println("Hello World!");         \end{lstlisting}       \end{minipage}


title: Increasing space between columns in a list of acronyms

text: For my List of Acronyms page, I'd like the explanation of the acronym (i.e. "List Abbreviations Here" in the example below) to be a bit more on the right. ![List of Acronyms](http://i40.tinypic.com/2rr4107.png) I'm using a thesis template, which obviously has class file (.cls) file attached to it and I don't want to fiddle too much with that although I guess that is how I will effect such a change. I dont want suggestions to install the nomenclature or glossary packages as I'm a bit too nervous to try out the packages, because every time I attempt to install a new package, everything else seems to be adversely affected. Code from the .cls file:                \newcommand\listsymbolname{List of Acronyms}      \usepackage{longtable}      \newcommand\listofsymbols[2]{      \btypeout{\listsymbolname}      \addtotoc{\listsymbolname}     \chapter*{\listsymbolname       \@mkboth{           \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}     \begin{longtable}[l]{#1}#2\end{longtable}\par     \cleardoublepage      Code from .tex file:               \setstretch{1.5}  % Set the line spacing to 1.5, this makes the following tables easier to read     \clearpage  % Start a new page     \lhead{\emph{List of Acronyms}}  % Set the left side page header to "Abbreviations"     \listofsymbols{ll}  % Include a list of Abbreviations (a table of two columns)     {     \textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere \\     }


title: TeXworks and textedit:// links

text: I use TeXworks for typesetting LilyPond music. The syntax is very similar, and the idea as well (text file -> PDF), so it's very convenient. However, LilyPond doesn't (obviously) use syncTeX for inverse-search, it uses the `textedit://` links. I would like to configure these links to work for forward-inverse search. I see two possibilities:   * Make TeXworks recognize `textedit://` links.   * Manage to exctract the `textedit://` links and convert them into syncTeX. I'm insterested in partial solutions as well, once a specific idea is proposed, I can implement it myself if it's a reasonable idea.


title: TOC edit the numbering from the part section in the TOC

text: I am very new to Tex, I am working of a template that someone else has given me. I am try to change the **/part{Part I: my stuff}** from looking like this in the TOC                1 Introduction           I  Part I: my stuff           2  Procedure blah blah           3  Procedure blah blah           II Part II: my stuff           4  Procedure blah blah      to something like:                1 Introduction           Part I: my stuff              2  Procedure blah blah              3  Procedure blah blah           Part II: my stuff              4  Procedure blah blah      Currently I have this               %% ---------------------------------------------------------------------- %%     \mainmatter          % Main matter     % -> Global Introduction     \input{Chapters/Introduction.tex}      %% *****     PART 1     *****     \part*{<Insert Title of First Part>}          \input{Chapters/SummaryPartA.tex}          %% *****     PART 2     *****     \part*{<Insert Title of second Part>}          \input{Chapters/SummaryPartB.tex}      Thank you for your help


title: Huge table/matrix with colored boxes

text: I have a huge CSV file with about 25.5k records that (structurally) looks like the sample below. In essence, I want to display the values of the columns U,V,W,X,Y,Z of each row as a colored box. The color of each box should represent its value, i.e. the value dictates what color along some gradient is to be drawn. E.g.: The larger the value, the darker the box. Now, there are a few things that I'd like to highlight using colors:   * Group names should be written to the left of the item names, turned 90 degrees, once per group. (items are sorted by group)   * The background colors of groups (and their items) should alternate   * Within a group, item's background colors should alternate   * There is a column `special`, which when `TRUE`/`1` should change the item's bg-color(map) to a special/alternative color for the current group's bg-color. In total there are two possible group bg-colors, and four possible item bg-colors.   * Also, when `special` is `TRUE`/`1`, the value color should be picked from a special/alternative gradient. In total there are two gradients/colormaps to pick from.   * The labels/columns U,V,W,X,Y,Z at the bottom should also be colored with alternating bg-colors.   * the labels/columns at the bottom should at a 90 degree angle, and aligned to the right (or top, in absolute terms). Since the number of rows is so large, and I want the complete drawing to fit on a single page, the rows will need to be _quite_ thin. (The columns should fit without compressing). Never the less, I do want the group and item text in there, because the dedicated reader should be able to zoom into the digital version of the final document, while regular/paper readers can obtain sufficient information from the alternating group colors. **Sadly, I have no idea how to start solving this problem.** _conceptual rendering (done in a spreadsheet):_   This is roughly what I hope to achieve. (Minus the grid lines.) ![enter image description here](http://i.stack.imgur.com/57xN7.png) _sample csv:_               group,item,special,U,V,W,X,Y,Z     a,a1,0,0.2,,0.2,,,     a,a2,0,,0.1,,,0.4,1     a,a3,0,,0.5,,,,     a,a4*,1,0.1,,0.8,,,     a,a5*,1,,,,,0.5,0.5     a,a6,0,,,,0.3,,     b,b1,0,,0.1,,,,     b,b2,0,0.6,,,0.4,,     b,b3*,1,,,0.4,,,     c,c1*,1,,,,,,0.1     c,c2*,1,,0.2,,,0.3,0.2     c,c3,0,,,0.7,,,     c,c4,0,,0.6,,0.3,,     c,c5,0,,,,,,0.7     ...      columns explained:   * group: String   * item: String   * special: Boolean   * U,V,W,X,Y,Z: real number in the range 0..1


title: Extendible equals sign

text: I have a command that has been floating around in my standard preamble for a while:               \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:}      It is meant to mimic the AMS-LaTeX extendible arrow symbols `\xleftarrow` and `\xrightarrow`. It's not perfect for two reasons:   1. It does not take the optional lower argument like the AMS `\xrightarrow[down]{up}`   2. The overlap of the constituent equals signs is slightly visible. Does anyone have a better command or know of a package with such a command?


title: Hyperref and lineno: always jumping to first page

text: I have a document where lines are numbered. I want to reference some special lines, for which the correct line numbers are generated. But using `hyperref` does not give the expected result: clicking on a line reference always moves me to the first page of the document, not the page which the referenced line is on. Check the following minimal example for reproducing my problem:               \documentclass[11pt]{article}          \usepackage{lipsum}     \usepackage{hyperref}     \usepackage[right]{lineno}          \begin{document}       \linenumbers       \lipsum[1-8]       \textbf{Here is the line, I want a reference to.}\linelabel{test}       \lipsum[5-8]       \textbf{Here is the line, where I refence a the special line (on page two):       \ref{test}}     \end{document}      I'm using `pdflatex`.


title: Sections running off page

text: I have a long list of sections and subsections like so               \chapter{Thin Lenses}     \section*{Aim}     \section*{A. Types of Lenses}     \subsection*{Prediction}     \subsection*{Observation}     \subsection*{Explanation}     \section*{B. Image Formation}     \subsection*{B1. The lens and the image and the object position}     \subsection*{B2. Partial lens}     \subsection*{B3. Eyeballing the image}     \section*{C. Focal Length of a Converging Lens}     \subsubsection*{Question 1}     \subsection*{C1. Estimating the focal length: Eyeballing the image}     \subsubsection*{Prediction}     \subsubsection*{Observation}     \subsubsection*{Explanation}     \subsubsection*{Focal length estimation 1}     \subsection*{C2. Estimating the focal length: Parallel rays}     \subsubsection*{Prediction}     \subsubsection*{Observation}     \subsubsection*{Explanation}     \subsubsection*{Focal length estimation 2}     \subsubsection*{Question 2}      etc. which just run off the bottom of the first page and disappear. Why is this? It doesn't happen if I include some text in the sections.


title: how to add extra vspace in TOC after one specific section?

text: I like some extra vertical white space in the TOC after one specific section. So far I have:               \documentclass{article}          \usepackage{etoolbox}     \usepackage{tocloft}          \preto\section{%      \addtocontents{toc}{\vskip10pt}}          \begin{document}     \tableofcontents          \section{No extra space in TOC 1}     \section{No extra space in TOC 2}     \section{Chapter after which extra space in TOC is wanted}     \section{No extra space in TOC 3}          \end{document}      This does create extra space the way I want it, but after _all_ chapters. (by the way I tried different things and I'm not sure if both packages are needed for the thing I have now...) How can I specify one chapter that the extra space should be put after in the TOC?


title: Draw line between two plots

text: I am trying to draw a line between points of two plots as shown in the picture (the blue line) but without luck. It is with tikzpicture and pgfplots. Similar to:               \begin{tikzpicture}     \begin{axis}       \addplot coordinates { (1,2) (2,3) };       \addplot coordinates { (1,4) (2,6) };     \end{axis}     \end{tikzpicture}      I did try adding nodes to \addplot but they seem to be located at (0,0) regardless of settings. Any suggestions? ![](http://i.stack.imgur.com/a8Dj8.png)


title: tikz graphics slightly cropped

text: \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usetikzlibrary{trees,positioning,arrows}          \begin{document}     \begin{tikzpicture}[thick,fill opacity=0]     \filldraw[fill=yellow] (0,0) circle (8cm);     \filldraw[fill=orange] (2,0) circle (6cm);     \filldraw[fill=red,line width=2pt] (-4,0) ellipse (4cm and 3cm);     \filldraw[fill=green] (0,0) circle (4cm);     \end{tikzpicture}     \end{document}      yields ![enter image description here](http://i.stack.imgur.com/v2kPs.png) I've added the yellow highlights to point out my question: how to prevent these portions of the curves from being clipped/cropped? It is even more noticeable the thicker the line width. Edit: I updated all my TeX-related packages (this was in MiKTeX 2.9 with PDF-LaTeX output viewed in Acrobat). Here is a close up of the PDF to show that it is indeed there: ![enter image description here](http://i.stack.imgur.com/k9fI8.png)


title: Setting rightmargin = leftmargin with enumitem package

text: The default leftmargin when using the enumitem package seems to be `leftmargin=*`, is there a way I can get the rightmargin to be the same width? The most obvious way would be `rightmargin=*` but that does not work, neither does `rightmargin=leftmargin` so I am beginning to expect I need to use the same value which enumitem uses internally. The text Customizing lists with the enumitem package says that when using arabic numbers the default is 0 which I have taken to understand as the width of glyph 0. If that is so maybe it is possible to get that length somehow and use it or how can this be accomplished?


title: How to create a double underscore with no space in between?

text: I want to add a link to my link of citations, and in the link there are several places where there are two consecutive underscores. Using the usual _ for an underscore, I did this:               \_\_       Specifically for my link, I have this right now:               http://law.onu.edu/sites/default/files/457\_F{\_\_}Supp\_\_957      but then I get a space in between the two underscore symbols. ![What is happening](http://i.stack.imgur.com/jstId.png) Any ideas?


title: Make emacs speller work with accented/modified letters

text: In continuation to this question I was wondering, now that my document is full of `\'` and other accents, the emacs speller balks on all the words... Is there a way to get a spell-checker to understand `\'e` as é and thus spell- check the document properly?


title: pgfplots - how to draw seconds from csv in hours:minute format?

text: I have data in a `.csv` file with seconds as `x` values. I'd like to tick the `x` axis in hours:minute formate e.g.: `0:00` , `0:30` , `1:00` , `1:30` ... How do I have to redefine the interpretation of values to fit into that different presentation style? data sample                   seconds values         30       3.98         60       3.97         90       3.96         120      3.96         150      3.95         ...      ...        3210      3.45


title: How to write math symbols in a verbatim?

text: Basically I have a section that is describing my algorithm in a pseudo code kind of way, and so I want that text to look like the verbatim text except I still want to be able to use math symbols. Is there any way to do this? Or any other hacky way to get the result?


title: Automatic vertical alignment of multirow cells

text: I have this MWE               \documentclass{article}     \usepackage{multirow}     \usepackage{bigstrut}     \setlength{\bigstrutjot}{2pt} % height added by \bigstrut     \usepackage{tabu}     \tabulinesep=1.5pt % ensures some offset between cell content and border     \begin{document}     \begin{tabu}{|c|c|}     \hline     bigstrut \bigstrut & \\\cline{1-1}     ordinary & \multirow{-2}{*}{Multirow} \\\hline     \shortstack{short \\ stack} & \\\cline{1-1}     ordinary & \multirow{-2}{*}{Multirow} \\\hline     ordinary & \\\cline{1-1}     $x=\int_0^\infty\frac{a}{b}$ & \multirow{-2}{*}{Multirow} \\\hline     ordinary & \\\cline{1-1}     $\displaystyle x=\int_0^\infty\frac{a}{b}$ & \multirow{-2}{*}{Multirow} \\\hline     \end{tabu}     \end{document}      which shows some cases where content of `multirow` cells is not exactly where it should be. ![MWE](http://i.imgur.com/EGT0mJA.png) I guess a lot of people are familiar with this issue, as I've seen a dozen of workarounds. However all of them required some fine-tuning like `[fixup]`. I've found a package called `makecell`, which partially makes what I want. Still it has flaws. It won't work for multi-line `multirow` cells and makes problems with `colortbl` package I use for bg colour (`multirow` has to be defined in the first row). Do you have any ideas on how automatic vertical alignment of `multirow` cell could be achieved?


title: Problem with position of table using sidewaystable environment

text: I am using the `sidewaystable` environment to rotate a table and its caption. My problem is that when compiling, there is a blank space at the bottom of the page and the table is moved to the top, colliding with the section header. I am using the `rotating` package; here is the code I use for this large table.               \begin{sidewaystable}\centering%     \begin{tabular}{ccp{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}p{0.45in}}     \hline\hline     \textbf{Copula} &  & \multicolumn{1}{c}{} & \multicolumn{13}{c}{\textbf{%     Estimator}} \\      True $\lambda _{L}$ &  &  & $\lambda _{L,n}^{e}$ & $\lambda _{L,n}^{e,r}$ &      lambda3 & $\lambda _{L,n}^{e}$ & $\lambda _{L,n}^{e,r}$ & $\lambda     _{L,n}^{ers}$ & $\lambda _{L,n}^{ers,r}$ & $\lambda _{L,n}^{CHT}$ & $\lambda     _{L,n}^{CHT,r}$ & $\lambda _{L,n}^{AM}$ & $\lambda _{L,n}^{GM}$ & $\lambda     _{L,n}^{rank}$ & $\lambda _{L,n}^{(U,U)(e)}$ \\ \hline\hline     \end{tabular}%     \caption{Comparison of the true tail dependence coefficient implied by the     parametric copula models, in the case of}%     \end{sidewaystable}\centering%      Any help is appreciated


title: xparse bug in optional arguments (simply not working)?

text: The follow code returns `-NoValue-` instead of `3` It seems I'm wrong in that I thought xparse took a single argument and parsed it instead of all the arguments of a macro.               \documentclass[11pt]{book} % use larger type; default would be 10pt               \usepackage{pgffor}     \usepackage{xparse}          \begin{document}          \DeclareDocumentCommand{\Dotparse}{o m} { #1 }          % Passes each value in the array to an xparse command.     \def\Dots#1     {         \foreach \n in {#1}{             \Dotparse{\n}     }}          \Dots{[3]f4s3,f12s5,s2f14,[5]e,f,g,1,2,3,4,5,6,7}               \end{document}


title: biblatex: What's the first character of a field?

text: I would like to know, what's the first character of the value of the editor field. If the character is a curly bracket "{" the value should be printed for example bold, if the first character is something else the fields value should be printed `\textnormal`. I've tried to do that with the package xstring and the following code in a biblatex declaration:               \IfBeginWith{editor}{\{}{\textbf{\printfield{editor}}}{\printfield{editor}}      But this will not modify anything. How to do that right?


title: Space after lettrine

text: When using the `lettrine` package, there are often additional spaces after the small caps: ![space after small caps](http://i.stack.imgur.com/A4Gcr.png) It can get even bigger than that actually. It seems to me that this is because `lettrine` uses an `mbox` to prevent breaking the line, so the spaces inside the `mbox` are not modified properly. Is that the case, and how can I get more equilibrated spaces after the small caps? **Note:** Even when only one word is used in the lettrine, the problem still shows up:![using one word only](http://i.stack.imgur.com/HLHvG.png)


title: How to define environment in LaTeX which replaces its content?

text: I'd like to define an environment that would display a graphviz image. The code should look like this:                 \begin{graph}{name}[optionalArgs]         a -> b; /* graphviz code*/       \end{graph}      I've started with simple definition:               \newenvironment{graph}[2]%      {#1 %name        #2 %code itself     }%      {% end code     }      However `#2` contains only first part in this case just `a` and the rest of input is displayed afer. How do I get whole content of environment in a variable?


title: Dynamic stretching of text

text: For the needs of a running title (in header), I would like the text of a running title (in header) to be stretched over the page. So far, I stretch it manually (using `LetterSpace` and `WordSpace` in `fontspec`), but my chapters can have pretty short or very long titles, so either short chapters will be not-so-stretched, or long chapters will look horrible. Is there a way to adapt the stretching dynamically?


title: beamer & TikZ: gradually unveil trees

text: Imagine a simple tree:               \begin{tikzpicture}         \node {Selbstregulation}         [edge from parent fork down]         child {node {Kognition}}         child {node {Metakognition}           child {node {Planung}}           child {node {Monotoring}}           child {node {Regulation}}         }     \end{tikzpicture}      Is it possible to unveil the child nodes step by step using overlays in beamer? I tried with the `\onslide` command at several positions around `child`, but it doesn't work... Any hints? - Thanks.


title: Putting itemize environment in a tabular environment

text: I have a macro that makes an itemize environment. When I tried to use the macro in a tabular environment, I have this error message. `ERROR: LaTeX Error: Something's wrong--perhaps a missing \item.` What might be wrong?               \documentclass{article}     \usepackage{booktabs}     \newcommand{\fuda}[2]{%     Function:%     \begin{itemize}%     #1%     \end{itemize} \topsep0pt \parskip0pt \partopsep0pt \itemsep0pt \parsep0pt     Data:%     \begin{itemize}%     #2%     \end{itemize}%     }     \begin{document}          \begin{tabular}{c}      A \\     \fuda{%     \item A%     \item B}     {%     \item X%     \item Y     }\\     \end{tabular}     \end{document}


title: Horizontal row separation line in tikz matrix (like \hline in tabular)

text: In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular. In this solution `cell/.style={rectangle}` was used to draw lines around every cell. But usually, however, I'd rather not give my tables this "grid"-look. Is there a way within the tikz matrix to draw horizontal lines between rows that essentially behave like `\hline` within tabular? I know I could put a node in the first and final cell of a row and draw a line between them, but this is not really handy compared to a single command like `\hline` and not very automated either.


title: How to stop fractions in display equations from running into each other?

text: Is there some standard way to create multiple display equations like the following ![enter image description here](http://i.stack.imgur.com/JKZqH.jpg) without having to use:   1. `\renewcommand*{\arraystretch}{2}` (so that the two rows in the second equation don't get too close to each other)   2. `array` environment (so that I can use `\renewcommand*{\arraystretch}{2}`. Can't use the `align` environment again)   3. `\displaystyle` (so that things would be displayed the way they would if I used `align`) as I've done below? My solution just seems like such a kludgy hack. There has to be a better/standard way...right?               \documentclass[10pt]{article}     \usepackage{amsmath}     \begin{document}     \renewcommand*{\arraystretch}{2}{         \begin{align*}           \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\                           &= \left\{                                 \begin{array}{lcl}                                   \displaystyle{\frac{(1-w)\phi(x)}{p(x)}}                                     & \mbox{for} & \mu = 0 \\                                   \displaystyle{\frac{w\gamma(\mu)\phi(x-\mu)}{p(x)}}                                     & \mbox{for} & \mu \neq 0. \\                                 \end{array}                               \right.\\         \end{align*}         }     \end{document}


title: Footnote with right parenthesis

text: I want to put a closing round parenthesis next to a footnote. I use `\footnotemark` and `\footnotetext`, since the footnote is part of a caption.                 \begin{center}          \includegraphics[width=0.8\textwidth]{...}          \caption[...]{...\protect\footnotemark}       \end{center}     \end{figure}     \vspace{15pt}          \footnotetext{...}      How can I configure a command for using a footnote with parenthesis?


title: Alternative for drawing graphs?

text: I've been trying to draw a graph with a series of X,Y points in TikZ, but it won't accept my points so I'm seeking an alternative package that might handle scaling a bit better. The kind of points i've been trying to graph are imported from a text file and look something like:               0 -5181.542311     0.001388889 -5180.244522     0.002777778 -5176.351945     0.004166667 -5169.866943     0.005555556 -5160.793459     0.006944444 -5149.137011     0.008333333 -5134.904699     0.009722222 -5118.1052     0.011111111 -5098.748774     ...      Any ideas on suitable alternatives for this kind of data?


title: Bookmarks in moderncv

text: When I open my CV/Cover letter in Adobe Reader I see that the `\sections` and `\subsections` are in that internal bookmarks. But is it possible to add the cover letter in there, because now it seems like my CV ends after my last `\section` entry on the CV part, but there is still the cover letter on the next page and I also added 2 full page pdf:s as attachments. MWE:               \documentclass[11pt,a4paper,sans]{moderncv}                \moderncvstyle{classic}                                \moderncvcolor{blue}                                         \usepackage[scale=0.75]{geometry}     \title{Curriculum vitae}     \name{John}{Doe}               \begin{document}     \thispagestyle{empty}     \pagestyle{empty}     \makecvtitle     \section{Stuff 1} %this is on the table of contents     \section{Stuff 2} %this is on the table of contents     \subsection{Minor stuff 2} %this is on the table of contents          \clearpage     \title{Cover letter} %This is not     \recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State}      \date{\today}      \opening{Dear Sir or Madam,}      \closing{Sincerely yours,}          \enclosure[Attached]{few pdfs}           \makelettertitle          \newpage     \clearpage     \includepdf{pdf1} %This is not     \newpage     \clearpage     \includepdf{pdf2} %This is not     \end{document}      Id like to add the cover letter and the 2 attached full page pdf:s to the same bookmarks.


title: \pagestyle{empty} doesn't work on first page of new chapter

text: I have a problem with page numbering in LaTeX. I don't want any page number in my document so I used `\pagestyle{empty}` but every time when I start a new chapter I get a page number on the bottom center of the page with the chapter's title. What should I do to remove those page numbers? My document class looks like this:               \documentclass[12pt, a4paper]{book}


title: Feynman diagrams with loops using TikZ

text: I've been doing Feynman diagrams with TikZ for quite some time now, but I have never needed to make loops. Now I'm forced to deal with them, and here comes the issue. I've played around a little and have been inspired by other questions to use the `calc` package in order to draw nice loops. Here's the best I can do. Please note how in the first diagram, the circle is messed up, while in the second (without the additional labels) it's fine. Ideally, the semicircles should carry one individual label each, the position of which should be adjustable (or should auto-adjust, depending on the orientation of the spline).               \documentclass{article}     \usepackage{pgfplots}          \usetikzlibrary{positioning,arrows,patterns}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{calc}           \tikzset{       photon/.style={decorate, decoration={snake}, draw=black},       fermion/.style={draw=black, postaction={decorate},decoration={markings,mark=at position .55 with {\arrow{>}}}},       vertex/.style={draw,shape=circle,fill=black,minimum size=3pt,inner sep=0pt},     }          \newcommand{\semiloop}[4][]{%             \draw[#1] let \p1 = ($(#3)-(#2)$) in (#3) arc (#4:({#4+180}):({0.5*veclen(\x1,\y1)});)     }                   \begin{document}     \begin{tikzpicture}[node distance=1cm and 1cm]     \coordinate[vertex] (v1);     \coordinate[vertex, right=of v1] (v2);     \coordinate[vertex, right=of v2] (v3);     \coordinate[vertex, right=of v3] (v4);     \coordinate[above right=of v4,label=right:$f$] (f1);     \coordinate[below right=of v4,label=right:$f$] (f2);     \coordinate[above left =of v1,label=left :$e^+$] (e1);     \coordinate[below left =of v1,label=left :$e^-$] (e2);     \draw[fermion] (e1) -- (v1);     \draw[fermion] (v1) -- (e2);     \draw[photon] (v1) -- (v2) node[midway,above=0.1cm] {$Z$};     \draw[photon] (v3) -- (v4) node[midway,above=0.1cm] {$Z$};     \draw[fermion] (f1) -- (v4);     \draw[fermion] (v4) -- (f2);     % the next two lines are causing the mess     \semiloop[fermion]{v2}{v3}{0}  node[midway,above=0.1cm] {$f$};     \semiloop[fermion]{v3}{v2}{180} node[midway,above=0.1cm] {$\bar{f}$};     \end{tikzpicture}          \begin{tikzpicture}[node distance=1cm and 1cm]     \coordinate[vertex] (v1);     \coordinate[vertex, right=of v1] (v2);     \coordinate[vertex, right=of v2] (v3);     \coordinate[vertex, right=of v3] (v4);     \coordinate[above right=of v4,label=right:$f$] (f1);     \coordinate[below right=of v4,label=right:$f$] (f2);     \coordinate[above left =of v1,label=left :$e^+$] (e1);     \coordinate[below left =of v1,label=left :$e^-$] (e2);     \draw[fermion] (e1) -- (v1);     \draw[fermion] (v1) -- (e2);     \draw[photon] (v1) -- (v2) node[midway,above=0.1cm] {$Z$};     \draw[photon] (v3) -- (v4) node[midway,above=0.1cm] {$Z$};     \draw[fermion] (f1) -- (v4);     \draw[fermion] (v4) -- (f2);     % the next two lines behave fine, but don't have any labels     \semiloop[fermion]{v2}{v3}{0};     \semiloop[fermion]{v3}{v2}{180};     \end{tikzpicture}          \end{document}      If anybody can tell me what's going wrong here or can show me a more elegant way of drawing circles through two points while being able to use predefined line styles, I would be very happy. # Edit Following an issue that has arisen from the accepted answer, this is the output of `\listfiles`                *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)     pgfplots.sty    2013/10/03 v1.9 Data Visualization (1.9)         tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)          pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)       pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)       pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)      pgfkeys.sty          pgfkeys.code.tex       pgffor.code.tex         tikz.code.tex       xparse.sty    2013/12/31 v4634 L3 Experimental document command parser        expl3.sty    2014/01/07 v4646 L3 Experimental code bundle wrapper      l3names.sty    2014/01/04 v4640 L3 Namespace for primitives     l3bootstrap.sty    2014/01/04 v4640 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2014/01/04 v4642 L3 Basic definitions      l3expan.sty    2014/01/04 v4642 L3 Argument expansion         l3tl.sty    2013/12/27 v4625 L3 Token lists        l3seq.sty    2013/12/14 v4623 L3 Sequences and stacks        l3int.sty    2013/08/02 v4583 L3 Integers      l3quark.sty    2013/12/14 v4623 L3 Quarks        l3prg.sty    2014/01/04 v4642 L3 Control structures      l3clist.sty    2013/07/28 v4581 L3 Comma separated lists      l3token.sty    2013/08/25 v4587 L3 Experimental token manipulation       l3prop.sty    2013/12/14 v4623 L3 Property lists        l3msg.sty    2013/07/28 v4581 L3 Messages       l3file.sty    2013/10/13 v4596 L3 File and I/O operations       l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips       l3keys.sty    2013/12/08 v4614 L3 Experimental key-value interfaces         l3fp.sty    2014/01/04 v4642 L3 Floating points        l3box.sty    2013/07/28 v4581 L3 Experimental boxes     l3coffins.sty    2013/12/14 v4624 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2014/01/06 v4643 L3 Experimental additions to l3kernel        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     supp-pdf.mkii     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      ***********


title: Unrecognized key-values

text: I try to implement a personnal class using key-value options (I am a beginner in that field). For exemple, I would like to specify the language (for babel package) with an option "langue=xxx" with "francais" as default value. I tried the _kvoptions_ package as follows : Class file : (I give you the whole list of packages in case you detect a conflict)               \ProvidesClass{mepp}[2014/03/08 Personnal class development version]     \NeedsTeXFormat{LaTeX2e}          \RequirePackage{kvoptions}          \DeclareStringOption[francais]{langue}     \ProcessKeyvalOptions*               \LoadClass[twoside]{report}               \RequirePackage[paper=a4paper, lmargin=15mm, rmargin=15mm, tmargin=15mm, bmargin=15mm,                         includeall, marginparwidth=44mm, headheight=\baselineskip]{geometry}     \RequirePackage{babel}     \RequirePackage[T1]{fontenc}     \RequirePackage[latin1]{inputenc}          \RequirePackage{emerald}     \RequirePackage{setspace}     \RequirePackage{calc}     \RequirePackage{array, multirow, tabularx}     \RequirePackage{xcolor, color, colortbl}     \RequirePackage[fleqn]{amsmath}     \RequirePackage{amssymb, mathrsfs, stmaryrd, gensymb}     \RequirePackage{graphicx, picins}     \RequirePackage{subfig}     \RequirePackage[top]{mcaption}     \RequirePackage{fancyhdr, lastpage}     \RequirePackage[fit]{truncate}     \RequirePackage[upright]{fourier}     \RequirePackage{mdwlist}     \RequirePackage{titlesec, titletoc}     \RequirePackage{ulem}     \RequirePackage{float}     \RequirePackage[globalcitecopy]{bibunits}     \RequirePackage{multido}     \RequirePackage{ragged2e}     \RequirePackage{marginfix}          \RequirePackage[geometry]{ifsym}     \RequirePackage{ifthen}     \RequirePackage[strict]{changepage}     \RequirePackage{framed}               \PassOptionsToPackage{\mepp@langue}{babel}      Tex file :               \documentclass[langue=francais]{mepp}     ...      but compilation fails : compiler says there is no language specified for babel. If I do not specify any option or if I give a "wrong" option without "=" symbol, compilation works, because it assigns the default value to "langue". So, why is the option "langue=francais" not recognized ? Thanks for your help. (sorry for language, I am French)


title: \lstinputlisting does not respect the \lstset 'float' option

text: How can I force `\lstinputlisting[...]{filename}` to obey _all_ parameters set by `\lstset`? (Note the `float` option given to the TeX example, but not to the LaTeX example.)               \begin{filecontents*}{helloworld.tex.example}     Hello, World!     \bye     \end{filecontents*}          \begin{filecontents*}{helloworld.ltx.example}     \documentclass{article}     \usepackage[margin=1in]{geometry}          \begin{document}       Hello, World!     \end{document}     \end{filecontents*}          %%%%%%%%%%%%%%%%%%%%%%%          \documentclass{article}          \usepackage{listings}     \lstset{float,frame=lines}          \usepackage{mwe}     \begin{document}     \lipsum[1]     \lstinputlisting[language = TeX, float, caption=A \TeX\ example]                     {helloworld.tex.example}     \lipsum[2]     \lstinputlisting[language = {[LaTeX]TeX}, caption=A \LaTeX\ example]                     {helloworld.ltx.example}     \lipsum[3]     \end{document}      ![output](http://i.stack.imgur.com/QnaTT.png)


title: How do I replace a default graphic in a `beamer` theme with one of my own choosing?

text: I am using an own beamer theme beamerthemeXY.sty which includes a (blue) graphic bow.eps. This graphic is in               /usr/share/texlive/texmf-dist/tex/latex/beamer/themes/images       and is known by the latex system.It is included in the theme by               \includegraphics[width=1.01\paperwidth]{bow}.      Is it possible to replace this picture for my slides by a local (e.g. orange) picture? If I delete the picture from the images-directory, make texhash and then write               \graphicspath{{./img/}}      in my document, the local (orange) graphics ./img/bow.eps is used. But only if there is no bow.eps in the directory texlive.../images. The file beamerthemeXY.sty               \ProvidesPackageRCS $Header: beamerthemeXY.sty,v 1.0 2014/04/01 $     \RequirePackage{graphics}     \mode<presentation>     \defbeamertemplate*{headline}{XY}{%       \begin{beamercolorbox}[wd=\paperwidth,ht=0.17\paperheight]{}         \begin{picture}(0,0)           \put(0, 7){\includegraphics[width=\paperwidth]{bow}}         \end{picture}       \end{beamercolorbox}     }%     \mode<all>      The file main.tex               \documentclass{beamer}     \mode<presentation>{       \usetheme{XY}       \graphicspath{{./img/}}     }     \begin{document}     \frame{\titlepage}     \begin{frame}{Another frame}       \includegraphics{img/bow}       \par\bigskip       \includegraphics{bow}     \end{frame}     \end{document}      The file bow.eps in blue and in orange and a Makefile for Fedora Linux are included in the archive               http://www.informatik.uni-oldenburg.de/~sos/example.zip      While making the example files I observed the same behaviour without installing the theme: The graphicspath is only used if the file bow.eps is not found (renamed) in the local directory.


title: Multicolumn overflow

text: I'm compiling a list of theorems and definitions from a math textbook (Mörters and Peres's "Brownian Motion"). Each item on the document (e.g. a definition, a theorem, a comment) opens with a title or a succinct description. As this screenshot demonstrates, comment 1.4's title overflows into the adjacent column. Why does it happen? Other items on the page have equally long titles, and yet they wrap properly. Following is a code listing of the beginning of the document up to (and including) the shrewish item.               \title{Brownian Motion}     \date{}          \documentclass[8pt]{article}          \usepackage[margin=0.2in]{geometry}     \usepackage{amsmath}    % needed for subequations     \usepackage{amsfonts}   % needed for $\mathbb{R}$     \usepackage{dsfont} % needed for $\mathds{1}$     \usepackage{graphicx}   % needed for figures     \usepackage{color}      % needed if color is used in text     \usepackage{hyperref}   % needed for hypertext links, including those to external documents and URLs     \usepackage{multicol}   % needed for the multicols environment          \usepackage{amsthm}     \newtheorem{definition}{Definition}[section]     \newtheorem{theorem}[definition]{Theorem}     \newtheorem{theonition}[definition]{Theorem and Definition}     \newtheorem{proposition}[definition]{Proposition}     \newtheorem{lemma}[definition]{Lemma}     \newtheorem{example}[definition]{Example}     \newtheorem{counterexample}[definition]{Counterexample}     \newtheorem{comment}[definition]{Comment}     \newtheorem{assumption}[definition]{Assumption}     \newtheorem{corollary}[definition]{Corollary}     \newtheorem{notation}[definition]{Notation}          \begin{document}     \maketitle          \begin{abstract}     A list of definitions, theorems and examples taught in the course ``Brownian Motion''.     \end{abstract}          \begin{multicols}{3}          \begin{comment}       Lecture No. 1     \end{comment}          \section{Chapter 1. Brownian motion as a random function}          \subsection{Stochastic processes}          \begin{definition}[Stochastic process; p. 7]       A \em{stochastic process} is a family $\left\{B\left(t\right) : t \geq 0\right\}$ of (uncountably many) random variables $\omega \mapsto B\left(t,\omega\right)$, defined on a single probability space $\left(\Omega,\mathcal{A},P\right)$.     \end{definition}          \begin{comment}[Sample path interpretation of a stochastic process; p. 7]       A stochastic process can be interpreted as a random function with the sample functions defined by $t \mapsto B\left(t,\omega\right)$.     \end{comment}          \begin{definition}[Finite-dimensional distributions of a stochastic process; p. 8]       By the \em{finite-dimensional distributions} of a stochastic process $\left\{B\left(t\right) : t \geq 0\right\}$ we mean the laws of all the finite dimensional random vectors $\left(B\left(t_1\right), B\left(t_2\right), \dots, B\left(t_n\right)\right)$ for all $0\leq t_1\leq t_2\leq \dots \leq t_n$.     \end{definition}          \begin{comment}[Finite-dimensional distributions; p. 8]       \begin{enumerate}       \item To describe these joint laws it suffices to describe the joint law of $B\left(0\right)$ and the increments         \begin{multline*}         \left(B\left(t_1\right) - B\left(0\right), \dots,\right. \\           \left.B\left(t_n\right) - B\left(t_{n - 1}\right)\right)         \end{multline*}         for all $0 \leq t_1\leq \dots \leq t_n$.         \item The set           $$           \left\{\omega \in \Omega : t\mapsto B\left(t,\omega\right)\textrm{ continuous}\right\}           $$           is in general not in the $\sigma$-algebra generated by the random vectors $\left(B\left(t_1\right), B\left(t_2\right),\dots,B\left(t_n\right)\right),\ n\in\mathbb{N}_1$.       \end{enumerate}     \end{comment}     \end{multicols}     \end{document}


title: text cannot be placed above image

text: I would like to place a text above an image, but latex do what it will.               \documentclass[12pt,ngerman]{report}     \usepackage[a4paper]{geometry}     %\usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     %\usepackage{ngerman}{babel}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{float}     \selectlanguage{ngerman}     \begin{document}     ...Anzahl die Lags, die über Confidence interval sind, gering sind, werden solche Störungen auch als wertvolle Informationen anerkannt.      \begin{figure}[h]      \centering     \includegraphics[scale=.4]{D:/MA/Bilder/window256lag15time2401}     \renewcommand*{\figurename}{Abbildung}     \centering      \caption{ \textit{ Die Fensterlänge ist 128 .Die Bilder von links; wenn drei, fünf, sieben Autokorrelation-Koeffizient über Confidence interval linie ist.} }     \end{figure}      Sollte die Anzahl die oben stehende confidence Interval Lags hoch sind, wird die Wahrscheinlichkeit, dass die wervolle Informationen extrahiert wurde, höher.              \begin{figure}[h]      \centering     \includegraphics[scale=.2]{D:/MA/Bilder/5acf-11-13}     \renewcommand*{\figurename}{Abbildung}     \centering      \caption{ \textit{ Von Links, wenn die Anzahl die Lags, die über das confidence interval sind, 11, 13 und 15 sind.} }     \end{figure}     \end{document}      But see no text between these two images. What I see is like this: ![enter image description here](http://i.stack.imgur.com/ONQ4V.png) how can I solve this problem?


title: Combine column types defined in dcolumn with tabularx

text: I'm looking for a way to define a column type which "mixes" the 'D' column defined in the `dcolumn`package and the 'X' column defined by the `tabularx` package. In other words, I want a column type that aligns cell contents by the decimal point _and_ can be stretched to fit the table width I specify. Of course it does _not_ necessarily have to mix `dcolumn`and `tabularx`. Any thoughts? Here's some code to make clear what I'm trying to achieve. The first table use column type D from dcolumn package, inside a tabular environment. How do I get the table to stretch to the width I specify?![table 1](http://i.stack.imgur.com/vl09H.jpg) The second table uses column `X` from `tabularx` package. The table spreads the way I want, but how do I get cells aligned by the decimal point?![table 2](http://i.stack.imgur.com/ogL6z.jpg) The third table tries to combine the two. The result is obvisouly not what I want (although it's exactly what I'd expect).![table 3](http://i.stack.imgur.com/ux2Dx.jpg)               % preamble     \usepackage{array}            \usepackage{tabularx}     \usepackage{dcolumn}        \newcolumntype{d}[1]{D{.}{.}{#1}}         \usepackage{booktabs}               \begin{document}          % table using D from dcolumn package     \begin{table}            \centering       \caption{table using dcolumn}       \begin{tabular}{l*{3}{d{-2}}}            \toprule                 &  \multicolumn{1}{c}{col A} & \multicolumn{1}{c}{col B} & \multicolumn{1}{c}{col C} \\ \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4}       \midrule              North &      2,228   &   0.300 &  10.6 \\                South &        689.2 &   0.8   &   2.6 \\       \bottomrule            \end{tabular}          \end{table}               % table using X from tabularx     \begin{table}            \centering       \caption{table using tabularx}            \begin{tabularx}{\textwidth}{l*{3}{X}}            \toprule                      &  \multicolumn{1}{c}{col A} & \multicolumn{1}{c}{col B} & \multicolumn{1}{c}{col C} \\ \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4}            \midrule              North &      2,228   &   0.300 &  10.6 \\                South &        689.2 &   0.8   &   2.6 \\            \bottomrule            \end{tabularx}         \end{table}          % table using D inside tabularx     \begin{table}            \centering       \caption{table using dcolumn inside tabularx}       \begin{tabularx}{\textwidth}{l*{3}{d{-2}}}            \toprule                 &  \multicolumn{1}{c}{col A} & \multicolumn{1}{c}{col B} & \multicolumn{1}{c}{col C} \\ \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4}       \midrule              North &      2,228   &   0.300 &  10.6 \\                South &        689.2 &   0.8   &   2.6 \\       \bottomrule            \end{tabularx}         \end{table}                    \end{document}


title: Logo situated only on titlepage of Beamer presentation

text: How to put logo only on the title page of Beamer presentation between the title and subtitle? I'm using               \title{Title}     \titlegraphic{\includegraphics[width=3cm]{logo}}     \subtitle{\textbf{Subtitle}}      but the logo comes after date.


title: Vertical space between matrices

text: I am writing some lecture notes in Econometrics and I want your advice on how to insert some vertical space between two matrices so the result will be easier to follow. Here is the minimal example:               \documentclass[10pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}          \begin{align*}     Var(u) &= E(uu') = \\     &= E     \begin{bmatrix}     u_1 u_1' & u_1 u_2' & \cdots & u_1 u_M' \\     u_2 u_1' & u_2 u_2' & \cdots & u_2 u_M' \\     \vdots & & \ddots & \vdots \\     u_M u_1' & u_M u_2' & \cdots & u_M u_M '     \end{bmatrix}     =     \begin{bmatrix}     \sigma_{11} I & \sigma_{12} I  & \cdots & \sigma_{1M} I \\     \sigma_{12} I & \sigma_{22} I  & \cdots & \sigma_{2M} I \\     \vdots &  & \ddots & \vdots\\     \sigma_{1n} I & \sigma_{2M} I & \cdots & \sigma_{MM} I     \end{bmatrix} \\     &=      \begin{pmatrix}     \sigma_{11} & \sigma_{12} & \cdots & \sigma_{1M} \\     \sigma_{12} & \sigma_{22} & \cdots & \sigma_{2M} \\     \vdots &  & \ddots & \vdots \\     \sigma_{1M} & \sigma_{2M} & \cdots & \sigma_{MM}     \end{pmatrix} \otimes I_T     \end{align*}          \end{document}


title: Is setting every node style anchor compatible with relative positioning in TikZ?

text: I'm trying to create a diagram and would like my nodes left aligned using the `anchor=west` option. I'd prefer to use relative positioning to make my diagram more flexible to changes. Here's my example:               \documentclass[11pt]{article}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}               \begin{tikzpicture}[%       every node/.style = {anchor=west}]          \node[fill=red!40, draw] (n0) at (0,0) {Base node} ;     \node[fill=red!40, draw] (n1) at (0,-2) {Node with longer text} ;     \node[fill=red!40, draw] (n2) [below=of n1] {Node with even longer text} ;          \end{tikzpicture}     \end{document}      Notice how the second node uses the `anchor=west` style set for every node, but the third node with the longest text seems to be centered below the second vs. being left aligned with it. Is there a way to accomplish what I'm looking for? Essentially, I want the alignment of the second node without having to specify absolute coordinates. ![enter image description here](http://i.stack.imgur.com/cCwtR.png)


title: Beamer table of contents -- customize with block environments

text: I am trying to create a custom table of contents format. What I want to do is to have the description of the section inside a block environment like:               \section{Section 1}     \frame{     \begin{block}     This is section description 1     \end{block}     }          \section{Section 2}     \frame{     \begin{block}     This is section description 2     \end{block}     }          \section{Section 3}     \frame{     \begin{block}     This is section description 3     \end{block}     }      and then show those blocks in the table of contents, instead of the section names. Let me explain why I need this. In my presentation I have three research questions that guide the overall presentation, and split it to several sections (each question is one section). Initially, I present all three together in one slide, but I then want to present only one of them, basically shading the rest, like what happens in the table of contents. Is something like that possible? Thanks in advance, Y.K.


title: Building a flowchart with PSTricks

text: I am building several flow-charts similar to this. They represent a procedure (algorithm) for dividing a triangle. Right now, I use the following code:               \newcommand{\thetriangle}{      \pspolygon[fillstyle=solid,fillcolor=green!20](0,0)(1.5,0)(0,1.5)     }     \newcommand{\godown}[1] {       \psline{->}(0.5,-0.1)(0.5,-0.4)       \rput[Br](0.48,-0.25){#1}     }     \newcommand{\goright}[1] {       \psline{->}(1.1,-0.1)(1.5,-0.4)       \rput[Bl](1.5,-0.25){#1}     }     \newcommand{\steptitle}[1] {       \rput[Br](-0.2,0.5){\emph{\textcolor{ForestGreen}{#1}}}     }     \begin{pspicture}(4,8)     \rput(0,8) {      \steptitle{Step 1}      \thetriangle      \rput(0.5,0.5){Divide}      \rput(0.5,0.3){to n}      \godown{}     }     \rput(0,6) {      \thetriangle      \steptitle{Step 2}      \psline[linestyle=dashed,linecolor=black](0,0)(0.75,0.75)       \rput{270}(0.2,0.75){k agents}      \rput(0.75,0.2){n-k agents}      \godown{$k=n$}      \goright{$1\leq k\leq n-1$}     }     \rput(2,4) {      \thetriangle     \psline[linestyle=solid,linecolor=black](0,0)(0.75,0.75) \rput{270}(0.2,0.75){Divide to k}      \rput(0.75,0.2){Divide to n-k}     }     \rput(0,4) {      \thetriangle      \steptitle{Step 3}      \psline[linestyle=dotted,linecolor=blue](0,0.1)(0.7,0.8)     \psline[linestyle=dotted,linecolor=blue](0,0.2)(0.65,0.85)      \psline[linestyle=dotted,linecolor=blue](0,0.3)(0.6,0.9)      \godown{select eastern}     }     \rput(0,2) {      \thetriangle      \psline[linestyle=solid,linecolor=blue](0,0.1)(0.7,0.8)      \rput(0.25,1){Divide}      \rput(0.25,0.8){to}      \rput(0.25,0.6){$n-1$}      \rput(0.7,0.2){Give to $1$}     }     \end{pspicture}      But this is inconvient because I have to explicitly put each step in its exact place (such as "\rput(0,6)"). This makes it difficult to add/remove steps, change the order between steps, etc. Is there a more convenient way to create a picture with several blocks? UPDATE: Based on Herbert's answer, I replaced the "pspicture" environment with a "psmatrix" environment. Based on another answer by Herbert, I added "makebox" tags to create variable-width columns. This is the result:               \begin{psmatrix}[colsep=0,rowsep=2]         \makebox[0cm]{} & \makebox[3cm]{} & \makebox[4cm]{} \\         \steptitle{Step 1} & [name=Step1]             \thetriangle            \rput(0.5,0.5){\shortstack[l]{Divide\\to n}}            \godown{}            \\         \steptitle{Step 2} & [name=Step2]             \thetriangle            \psline[linestyle=dashed,linecolor=black](0,0)(0.75,0.75)             \rput{270}(0.2,0.75){k agents}            \rput(0.75,0.2){n-k agents}            \godown{$k=n$}            \goright{$1\leq k\leq n-1$} \\         \steptitle{Step 3} & [name=Step3a]            \thetriangle            \psline[linestyle=dotted,linecolor=blue](0,0.1)(0.7,0.8)            \psline[linestyle=dotted,linecolor=blue](0,0.2)(0.65,0.85)            \psline[linestyle=dotted,linecolor=blue](0,0.3)(0.6,0.9)            \godown{select eastern} &           [name=Step3b]             \thetriangle            \psline[linestyle=solid,linecolor=black](0,0)(0.75,0.75)            \rput{270}(0.2,0.75){Divide to k}            \rput(0.75,0.2){Divide to n-k} \\          \steptitle{} & [name=Step4]             \thetriangle            \psline[linestyle=solid,linecolor=blue](0,0.1)(0.7,0.8)            \rput(0.25,0.8){\shortstack[l]{Divide\\to\\$n-1$}}            \rput(0.7,0.2){Give to $1$}     \end{psmatrix}


title: Title in box in Beamer presentation

text: 1)How to put the title on the titlepage in Beamer to a block of a desired color? Similarly like in themes Warsaw, Berlin... 2)How to control space between author and date? `\vspace` seems does not work. 1) I use this               \title[TITLE]{TITLE\\[1em]     \includegraphics[height=4cm]{logo}\\[1em]}     \subtitle{\textbf{Subtitle}}      But I want teh box only around TITLE . How can I do this?


title: \everymath, AMS equations, beamer, and tikz not working together

text: In a `beamer` document, I have `$` expressions embedded in displayed equations (using `tikz` to make, e.g., colored boxes around some expressions). I put `\everymath{\displaystyle}` in the preamble so that these expressions aren't show in text style. However, when the `$` expression is in an AMS equation environment rather than `equation`, this `\everymath` is not honored:               \documentclass{beamer}          \usepackage{tikz}     \usepackage{amsmath}          \everymath{\displaystyle}          \begin{document}       $\sum_i$ \$ expr\\                 % works       \tikz \node {$\sum_i$ \$ in tikz}; % works       \begin{equation}         \tikz \node {$\sum_i$ tikz in equation}; % works         \text{$\sum_i$ text in equation}         % works       \end{equation}       \begin{gather}         \tikz \node {$\sum_i$ tikz in gather};   % problem         \text{$\sum_i$ text in gather}           % works       \end{gather}     \end{document}      Note that this happens only inside `\tikz`, not `\text`; and only with the `beamer` document class. I am intrigued: why does this happen? And is there a simple workaround? (Of course there is a simple workaround: put `\displaymath` in every `$` expression ... But maybe something more elegant?)


title: Writing equation in LaTeX: some part are mysterious to me :)

text: I would like to write in LaTeX two equations: ![equation1](http://i.stack.imgur.com/Zpu9H.png) and ![enter image description here](http://i.stack.imgur.com/tPoPi.png) I do not know how to do that...Particularly, how to write stuff underneath the max function. And also how to have this line over `Wi` or `Wj`. PS: I do not ask for the whole equations, I am asking for the part that I do not know how to write in LaTeX :))


title: How to customize item's bullet

text: How to customize items putting this kind of bullet : ![enter image description here](http://i.stack.imgur.com/DvCZl.png) Code :               \documentclass[11pt,a4paper,french]{moderncv}     \moderncvtheme[blue]{classic}                     \usepackage[utf8]{inputenc}     \usepackage[top=1.1cm, bottom=1.1cm, left=2cm, right=2cm]{geometry}     % Largeur de la colonne pour les dates     \setlength{\hintscolumnwidth}{2.5cm}     \usepackage{babel}     \firstname{John}     \familyname{Smith}     \title{Graphic Designer}     \makeatletter     \newcommand\personaltitle{       \def\phonesdetails{}       \collectionloop{phones}{        \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%      \par\noindent\begin{tabular}{@{}l@{}}      {\LARGE\textbf{\@firstname\ \@lastname}} \\      \@addressstreet \\      \@addresscity  \\      Âge:\ \@extrainfo \\      \mobilephonesymbol:\ \collection@phones@item  \\      \emailsymbol:\ \emaillink{\@email} \\      \githubsocialsymbol:\ \httplink{\@homepage} \\      \end{tabular}\par%\noindent\rule{\linewidth}{1pt}\par%     }     \begin{document}     \cventry{d}{c}{b}{a}{}{ \begin{itemize}     \item aaa.     \end{itemize}}     \end{document}      Thanks a lot !


title: Define new align environment based on the old one

text: I am aware that there are plentiful similar questions, but since (even after several reading) I don't understand the the answers, I am unable to apply them to my problem. I simply want to define a new align environment based on the old one, e.g.               \documentclass[11pt]{scrbook}          \usepackage{empheq}     \usepackage[many]{tcolorbox}     \tcbset{highlight math style={enhanced,colframe=black,arc=8pt,boxrule=1pt}}     \newenvironment{alignteo}%       {       \begin{empheq}[box=\tcbhighmath]{align}       }{       \end{empheq}       }          \begin{alignteo}     f = a x     \end{alignteo}          \end{document}      Using `\begin{alignteo}` and `\end{alignteo}` I get the error               ! LaTeX Error: \begin{empheq} on input line 448 ended by \end{alignteo}.      Is there any way to do this without using `environ` package?


title: Memoir: no space after section heading

text: How do I set zero space after a section heading using `memoir.cls`? If I use the following:               \setbeforesubsubsecskip{-\baselineskip}     \setaftersubsubsecskip{0pt}      I get a run-in heading. This is only supposed to happen when the specified skip is negative. Currently, I have               \setbeforesubsubsecskip{-\baselineskip}     \setaftersubsubsecskip{0.0001pt}      but that feels rather hackish.


title: svn-multi: committed PDF always has an offset in revision number?

text: I'm using the `svn-multi` package to keep track of different versions of my PhD thesis. One problem (I did not find anything about it in the manual or in the web, but maybe I overlooked it): I have compiled my document and the PDF is marked with the number of the last revision "85". When I now do a commit (and I also commit the PDF to have it for future reference), in revision number 86 sits a PDF with number 85 printed on it. I think that is an inherent problem, because the PDF has to be created before the commit is done, or is there anything that can be done to avoid that and have the committed PDF showing the rev number corresponding to its commit?


title: IDE with AutoCompletion?

text: I was looking for an Latex editor that has an auto completion function. Is there any available? I thought about auto complete suggestion for common commands like for example defining chapters and sections etc.


title: zoom in with enumerated list in beamer

text: I would like to create an enumerated list, with some more details on a second slide. What I try is the following Slide A               1 First     2 Second     3 Third      However, on slide B I would like to display               1 First     2 Another topic before Second     3 Yet another topic before Second     4 Second     5 Third      It should be displayed, that item number 2 on slide A is the same than topic number 4 on slide B. It would be nice to get fancy replys.


title: TOC Problems: Every pages appear word "CONTENTS"

text: I got the problems with TOC, by the way. When I start to put TOC in my book, after that in every pages header appear word "CONTENTS" with capitalize font. I don't know how to edit or custom it. I try to finding documentation and FAQ at Lyx.com but they explanation not enough to solving my problem. I just getting stuck after while. What should I do for solve this problem? if could I want rename these header by chapter name like "BAB I". Thanks in advance. FYI: I use document class: book. Here my problem, appear words CONTENT in header: ![appear words CONTENT in header](http://www.zakariyasoewardi.co.uk/sandbox/img/Lyx-error-1.jpg) ![appear words CONTENT in header](http://www.zakariyasoewardi.co.uk/sandbox/img/Lyx-error-2.jpg)


title: How to put node in an accurate place? How to use different style of font in TikZ?

text: I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/ImVr6.jpg) This is my code:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}     %\usepackage[active,tightpage,floats]{preview}     %\setlength\PreviewBorder{30pt}%     \usetikzlibrary{calc, fit, shapes.geometric}     \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfsetlayers{background,main,foreground}          %\colorlet{MAROON}{Maroon}          \begin{document}          \begin{figure}[ht]       \centering       \begin{tikzpicture}         \coordinate (Origin)   at (0,0);              \coordinate (XAxisMax) at (5.5,0);         \coordinate (YAxisMax) at (0,4.5);              \coordinate (Ylow) at (-0.5,0);         \coordinate (Xlow) at (0,-0.5);         \coordinate (XMax) at (5.5,-0.5);         \coordinate (YMax) at (-0.5,4.5);              \draw [thick, darkgray] (Origin) -- (XAxisMax);% Draw x axis         \draw [thick, darkgray] (Origin) -- (YAxisMax);% Draw y axis              \draw [thick, darkgray!40, -latex] (Xlow) -- (XMax);% Draw x axis         \draw [thick, darkgray!40, -latex] (Ylow) -- (YMax);% Draw y axis              \foreach \x in {1,2,...,10}{% Two indices running over each           \foreach \y in {1,2,...,8}{% node on the grid we have drawn              \node[thick,draw,circle,inner sep=2pt,fill=gray!60, name=circle-\x-\y] at (0.5*\x,0.5*\y) {};                 % Places a dot at those points           }         }                   \begin{pgfonlayer}{background}         \node (B) [draw, color=BrickRed, fill=red!30, rectangle, rounded corners, fit={(circle-1-1) (circle-10-1)}] {};         \end{pgfonlayer}              \begin{pgfonlayer}{background}         \node (A) [draw, color=BrickRed, fill=red!30, rectangle, rounded corners, fit={(circle-1-5) (circle-10-8)}] {};         \end{pgfonlayer}              \node[align=center, below] at (2.75,0) {$i$};         \node[align=center, left]  at (0,2.25) {$j$};         \node[align=center, left]  at (-0.5,2.25) {Data\\domain};         \node [above] at (A.north) {$k = N -1$};         \coordinate (bb1) at (circle-10-1);         \node [above right of = 5pt] at (bb1) {$BB1$};       \end{tikzpicture}       \caption{Bounding boxes for convex union of data regions}       \label{figure:single}     \end{figure}     \end{document}      I am not put right side content properly. (for example, I have tried putting `BB1`, but it is not coming at proper location). And how to use different size and style of code like used here for `path[k][j]`? This is my output: ![enter image description here](http://i.stack.imgur.com/1U9nv.png)


title: Tables in an enumerate environment

text: \begin{document}          \begin{enumerate}[leftmargin=*]          \item *Kang, B., In, F., Kim, G., and Kim, T. (2010). A longer look at the asymmetric dependence between hedge funds and the equity market, \textit{Journal of Financial and Quantitative Analysis}, 45(3), 763-789.          This publication provides a core, comprehensive backbone for the current ARC proposal on hedge funds in Australia (ABDC: A*, IF: 1.342, SSRN downloads: 111).                         \begin{center}     \begin{table}[H]                    \newlength\mylena     \settowidth\mylena{M. Veerarghavan}     \newlength\mylenb     \settowidth\mylenb{Amount}     \newlength\mylenc     \settowidth\mylenc{systemic risk, hedge funds}                   \begin{tabularx}{\textwidth}{|X |       >{\centering}p{\mylena} |       >{\centering}p{\mylenb} |       >{\centering}p{\mylenb} |       X |}     \hline     Project Id & CI Name/s & Amount Funded & Amount of Years & Project Title \\     \hline     DP110103260 & Prof. \textbf{F. In}, A/Prof. P. Lajbcygier, Prof. M. Veerarghavan & \$225,048 &  3 & Systemic risk, hedge funds and modelling asymmetric dependence using a Copula approach \\     \hline     \end{tabularx}     \end{table}     \end{center}                         \item In, F., and Yoon, J. (2007). Determination of asset prices with an investment-specific technology model: Implications for the equity premium puzzle, \textit{Journal of Economic Dynamics and Control}, 31(8), 2637-2658.          This paper resolves the so-called equity premium puzzle of asset pricing using an investment-specific technology model (ABDC: A*, IF: 0.703).          \end{enumerate}          \end{document}      The output is this: ![enter image description here](http://i.stack.imgur.com/HxDi4.jpg) There are a few things I want to change. First, the table itself doesn't look very nice, I would like all contents in the first and last column to be center aligned, like the other columns, but whenever I change `X` to `c`, I get lots of errors. I would also like the table to be aligned to the text preceding it, e.g., currently it is aligned to the number 1 in the enumerate environment, but I would like it to be aligned to the text after the number 1 (so that the entire "width" of the table is the same as the width of the text). Also for some reason there is a large gap between the table and the next item, how can I make this gap smaller universally, since after each list there will be a table.


title: Problems labeling an arrow

text: Having this in the preamble:               \usepackage{tikz}     \usetikzlibrary{chains,shapes.multipart}     \usetikzlibrary{scopes}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{shapes,calc}     \usetikzlibrary{automata,positioning}      I have the following figure:               \begin{figure}            \centering            \begin{tikzpicture}[start chain=going right,>=latex,node distance=0pt]              \node[draw,rectangle,on chain,minimum size=1.5cm] (rr) {$I$};              \node[draw,rectangle,on chain,draw=white,minimum size=0.8cm]{};              % the rectangular shape with vertical lines             \node[rectangle split, rectangle split parts=5,             draw, rectangle split horizontal,text height=1cm,text depth=0.5cm,on chain,inner ysep=0pt] (wa) {};              \fill[white] ([xshift=-\pgflinewidth,yshift=-\pgflinewidth]wa.north west) rectangle ([xshift=-15pt,yshift=\pgflinewidth]wa.south);             \node at (wa.east) (A){};             \draw [-latex] (A) --+(30:1.5) coordinate (B1);             \draw [-latex] (A) --+(-30:1.5) coordinate (B2);              % the circle              \node [draw,circle,on chain,minimum size=1cm] at (B1) (se1) {$U_1$};              \draw [-latex] (se1) --+(0:1.3) coordinate (BB1);              \node [draw,circle,on chain,minimum size=1cm] at (B2) (se2) {$U_2$};              \draw [-latex] (se2) --+(0:1.3) coordinate (BB2);              \node [draw,diamond,on chain,minimum size=0.2cm] at (BB1) (C3){};              \draw [-latex] (C3)--+(0:1)node[midway,above] {$\mu$};              % the arrows and labels              \draw[<-] (wa.west) -- +(-20pt,0) node[midway,below] {$\lambda$};              \draw[->] (C3.north) to[out=120, in=145] ([shift=(up:.3)] wa.west);            \end{tikzpicture}               \caption{The model represented as a queuing system.}                  \label{fig:queue}            \end{figure}      How to put labels on arrows where there are none (the picture below shows the edges where i want to put labels)? ![enter image description here](http://i.stack.imgur.com/DGP2t.png)


title: Getting pages where an environment is located

text: I am trying to create a new environment that sticks a watermark in the background. Specifically, I have something like               \usepackage{background}          \newenvironment{\watermarked}{     \backgroundsetup{contents={This section contains a watermark., opacity=0.5}     }      I need to also count which pages have this environment. How would I keep count of the pages? Basically, I need to create a follow-on environment that says > The watermark appears on pages X-Y, Z-A, B-C How would I go about doing that? Final Edit: This gets exactly what I would expect:               \documentclass{article}     \usepackage[scale=1,opacity=0.5]{background}     \usepackage{hyperref}     \usepackage{forloop}     \usepackage{refcount}          \newcounter{markthis}     \newcounter{endmarkthis}          \newenvironment{watermarked}%     {% at start of watermarked     \SetBgContents{This section contains proprietary information.}     \stepcounter{markthis}\phantomsection\label{marked:\themarkthis}     Inside watermarked on page \thepage.     }     {% at end of watermarked     \stepcounter{endmarkthis}\phantomsection\label{endmarked:\theendmarkthis}     }     \SetBgContents{}          \begin{document}          Some text here on page  1.     \newpage          \begin{watermarked}     some text     \end{watermarked}          \begin{watermarked}     more text     \end{watermarked}          More text here.           \newpage     Page with no watermarked stuff.     \newpage          \begin{watermarked}     more text,      \newpage     on several pages     \newpage     \end{watermarked}          More text here. Start a new page.     \newpage               \begin{watermarked}     more text     \end{watermarked}          Loop to find pages containing the watermarked environment. Hard coded     here.          \noindent     The \arabic{markthis} watermarked environments appear on pages \\     \newcounter{thenumber}     \forloop[1]{thenumber}{1}{\value{thenumber}<5}{     \ifnum \getpagerefnumber{marked:\arabic{thenumber}} < \getpagerefnumber{endmarked:\arabic{thenumber}}         \pageref{marked:\arabic{thenumber}}-\pageref{endmarked:\arabic{thenumber}}     \else         \pageref{marked:\arabic{thenumber}}     \fi     }               \end{document}      still working on the logic to make sure I don't duplicate pages, but I can cope with that later. Great work, guys! Thanks so much!


title: Use Signature Font in Classic Thesis style

text: I'm using the Classic Thesis style and need to include my signature on a document. I have a font that I use. Normally I would do the following:                   \newfontfamily\signaturefont{fontname}      Obviously, when I try this I get errors. How can I accomplish this goal? Thanks!


title: How do you signal an error from within an expandable function?

text: I would like to do some error checking from within an expandable function. But my attempts at signalling an error are not processed correctly, but rather returned to the input stream---contrary to my expectations. Here's the code:               \documentclass{article}     \usepackage{pstricks,pst-eucl}     \psset{unit=0.25cm}     \usepackage{xparse}     \ExplSyntaxOn     \msg_new:nnnn {testing}{testing}{illegal~property}{}     %% property list     \prop_new:N \g__ace_all_properties_plist     %% setter     \cs_new_protected:Npn \__ace_set_property:nn #1#2         {             \prop_gput:Nnn \g__ace_all_properties_plist { #1 } { #2 }         }     %% getter     \cs_new:Npn \__ace_get_property:n #1         {             \prop_get:Nn \g__ace_all_properties_plist { #1 }         }     %%--- User interface for settr and gettr     \DeclareDocumentCommand{\settr}{ m m }         {             \__ace_set_property:nn { #1 }{ #2 }         }     \DeclareExpandableDocumentCommand{\gettr}{ m }         {             \prop_if_in:NnTF \g__ace_all_properties_plist { #1 }                 {                     \__ace_get_property:n { #1 }                 }                 {                     %% this next line does not get executed                     %% even when there #1 is not in the list                     %<var 1>%\msg_info_text:n { #1 ~ is ~ not ~ defined }                     \msg_fatal_text:n { testing}                 }              }             \ExplSyntaxOff     \pagestyle{empty}     \begin{document}     \settr{displacement}{10}%          This picture gets processed correctly\par     \begin{pspicture}(0,0)(10,10)         \pstGeonode[PointName=default,PointSymbol=default,PosAngle=0](0,0){A}(0,1){B}         \pstTranslation[DistCoef=\gettr{displacement}]{A}{B}{A}[C]     \end{pspicture}          \vspace{1cm}          No error signaled here $\rightarrow$     \gettr{unknownproperty}          \vspace{1cm}          This picture should signal an error when commented line uncommented\par     \begin{pspicture}(0,0)(10,10)         \pstGeonode[PointName=default,PointSymbol=default,PosAngle=0](0,0){A}(0,1){B}         %\pstTranslation[DistCoef=\gettr{unknown-property}]{A}{B}{A}[C]     \end{pspicture}          \end{document}      Initially, I thought this was an issue of calling a protect function `\msg_term:x` from within an expandable function. But, my errors are not properly triggered even when using using `\mgs_fatal_text:n`. This later approach is not really what I want. But signalling an error in any way would be nice. **EDIT** Following @DavidCarlisle's suggestion, I tried replacing               \msg_fatal_text:n{ testing }      with               \ERROR      So, the compilation stops, but since the wrong type of error message is signaled, I can imagine wasting a lot of time looking for the wrong error. So, instead of `\ERROR` I tried               \use:c { Attempting ~ to ~ call ~ undefined ~ property -> {#1} }      I figured at least with this, I'd get an error that made it clearer what the real issue was. But this doesn't signal an error at all---contrary to my expectations.


title: Reducing the distance in textbf environment

text: I want to introduce a notation for concatenating vectors in a manuscript that I represent vectors with bold characters, `$\textbf{x}$`. The problem is defining it like `$\textbf{x}:\textbf{y}$` introduces an extra distance between two characters which is far more than `$\textbf{x:y}$`. On the other hand the latter is not what I am looking for since I need non-bold subscripts for vectors and I need to use two `$\textbf$` environments. Any suggestions?               \articleclass{document}     \begin{document}     This is bad concatenation $\textbf{x}:\textbf{y}$     This is good concatenation $\textbf{x:y}$     \end{document}


title: Printed cited refs under "References" and then print all references under "Bibliography"?

text: I'm doing a dissertation which has the requirements of printing a References section, of those resources which have been cited, and then a bibliography which includes all resources, cited or not. I've tried this:               \usepackage[backend=bibtex,citestyle=authortitle,url=true]{biblatex}     \usepackage{filecontents}     \bibliography{refs} <- and what does this do?     \addbibresource{project_references.bib}     \renewcommand{\bibname}{References}          \begin{document}         \printbibliography              \nocite{*}         \printbibliography     \end{document}      But the \nocite{*} has an effect on both, regardless of where it is. Which defeats the point. I've been through numerous answers which include creating a boolean of "cited" and then trying to print those but nothing seems to work!! I just want: "References" Yada yada... I've been cited! "Bibliography" Yada yada... I may not have been cited! * * * Taking the answer received this is what I have now, which is not working. All references are being printed in each section:               \documentclass[12pt]{report}      \usepackage[backend=bibtex,citestyle=authortitle,url=true]{biblatex}     \usepackage{filecontents}     \addbibresource{project_references.bib}           \begin{refsection}     \chapter{Introduction}     \subfile{Introduction.tex}          \chapter{Literature Review}     \subfile{LiteratureReview.tex}          \chapter{Design}     \subfile{Design.tex}          \chapter{Implementation and Testing}     \subfile{Implementation.tex}          \chapter{Evaluation}     \subfile{Evaluation.tex}          \chapter{Conclusion}     \subfile{Conclusion.tex}          \printbibliography[title=Cited]     \end{refsection}          \printbibliography[title=References]          \nocite{*}     \printbibliography[title=Bibliography]     \end{document}      Don't know if it matters but I'm not using article, because I want chapters.


title: Additional references in BibTeX

text: I have a master `BibTeX` file that gets updated and maintained by `BibDesk`. I link to it from my TeX documents, but would sometimes like to add "on the fly" references without having to add these to `BibDesk` in order for them to get put into the master file. In other words, I would like the option to "mix in" additional `\bibitems` into my bibliography, something like:               \bibliographystyle{plain}     \bibliography{/Users/Papers/master.bib}     \bibitem{additional}Authors, paper, etc.      (Of course, this gives errors.) Any suggestions? Many thanks, and my apologies if this is a very standard or silly question.


title: Using another font for a glyph that is not available in the current font

text: I want to declare more than one font so XeTeX can use other fonts when first font did not have a specific glyph. How can I do that? In windows when the current font does not have a glyph, other font are used to show that glyph.(e.g. I want insert tick (✓) directly, not with `\Checkmark`) I know that I can use a Unicode font like code2000 but as you know this kind of fonts generally are not pretty enough.               \documentclass{article}     \usepackage{bbding}     \begin{document}     \section{NOK}      (✓)  (✗)     \section{OK}     (\Checkmark )  (\XSolidBrush)     \end{document}      ![enter image description here](http://i.stack.imgur.com/RAPDg.png)               \documentclass{article}     \usepackage{bbding}     \usepackage{fontspec}     \setmainfont{Arial Unicode MS}          \begin{document}     \section{OK}      (✓)  (✗)     \section{OK}     (\Checkmark )  (\XSolidBrush)     \end{document}      ![enter image description here](http://i.stack.imgur.com/QlZN1.png) At least I want to specify two fonts (e.g.`\setfont{Arial,Code200}`) ,a main font and a Unicode one so it can be used for missed glyphs.


title: Correct longtable \multicolumn exceeding page boundaries/margins

text: I have problem with some of the `longtable` tables, as illustrated here: ![](http://i.imgur.com/bYZ1Y.png) Is there an easy way to make table wrap cell contents multi-line so that it does not exceed page margins?


title: Is there a symbol for the y intercept in a linear model?

text: Model parameters in an linear regression include an intercept for the response variable (or in other words, a y intercept). Is there a symbol for this? I cannot find one in lists of maths symbols, for example like this one.


title: How to use \widthof as parameter to \kern

text: I sometimes encounter a problem when I attempt to use `\widthof` from the `calc` package, and don't know why. In the past I have just worked around it using a two step process of defining a `\newdimen{}` and using `\settowidth` (or `\setlength` and `\widthof`) to determine the value before attempting to use this length. The MWE below shows how this fails when I attempt to use the `\widthof` as the length of a `\kern` (i.e., the `\KernA` macro), but the two step process works just fine: ![enter image description here](http://i.stack.imgur.com/ihrDJ.png) # Questions:   1. Why does `\KernA` not work?   2. When can I use `\widthof` directly? ## References:   * Get width of a given text as length ## Code:               \documentclass{article}     \usepackage{calc}          \newcommand*{\KernA}{\kern\widthof{$text$}}%          \newdimen{\KernAmount}%     \newcommand*{\KernB}{%         \setlength{\KernAmount}{\widthof{$text$}}%         \kern\KernAmount%     }%          \newcommand*{\KernC}{%         \settowidth{\KernAmount}{$text$}%         \kern\KernAmount%     }%               \begin{document}     x~$text$~y           %x~\KernA~y  \verb|\kernA: \widthof| ??          x~\KernB~y  \verb|\KernB: \setlength and \widthof|          x~\KernC~y  \verb|\KernC: \settowidth|     \end{document}


title: Issues with figure numbering and\ContinuedFloat command

text: I am having an issues with the `subfig` and `\ContinuedFloat` command. I have a figure that has 4 subfigures. They are too large to fit on one page. I have tried using the `\ContinuedFloat` command to split it over two pages. It makes the images look correct and do what I want, but it is changing the figure number. I.e. the figure is supposed to be 3.4 (when I don't use the `\ContinuedFloat` command it is, but consequently runs off the page) but when I use the `\ContinuedFloat` command, it changes the figure number to 3.3 So now the figure looks right, but I have two figure 3.3. I am at a loss. Here is how I am coding it (I realize you don't have my images so it can't be run by someone else). If there is an issue with the coding, I would greatly appreciate if someone could point it out.               \documentclass[botnum, fleqn]{unmeethesis}          \usepackage{float}     \usepackage{subfig}     \usepackage{subfloat}     \begin{document}     \listoffigures          \begin{figure}[!htpb]     \centering     \subfigure[a]{     \includegraphics[width=4.5in]{figures1/ML_cycle_1_load}     }\\     \subfigure[b]{     \includegraphics[width=4.5in]{figures1/ML_cycle_1_unload}     }\\     \subfigure[c]{     \includegraphics[width=4.5in]{figures1/ML_cycle_2_load}     }\\     \end{figure}     \begin{figure}     \centering     \ContinuedFloat     \subfigure[d]{     \includegraphics[width=4.5in]{figures1/ML_cycle_2_unload}     }     \caption{This is my caption}     \label{ML_contour_2}     \end{figure}          \end{document}


title: TikZ signal flow graphs illustrating Mason's rule

text: I'm trying to make some Automatic Control charts illustrating Mason's rule, but couldn't find any suitable library. Is there any way to ease the process of creating these with TikZ? An example can be found on this page in section **sfg.m4: Signal-flow graphs** ![enter image description here](http://i.stack.imgur.com/WLruX.png) * * * I found this way to make one of the flows, however, I wonder if there is any clearer or simpler way to do this drawing, using any library (as when making circuits or blocks with the libraries a `\usepackage{blocks}` or `\usepackage{schemabloc}` or `\usepackage{circuitikz}`) so that the code is not as large and is more clear and clean the program?               \begin{tikzpicture}         \begin{pgfonlayer}{nodelayer}             \node [style=none] (0) at (1, 1) {};             \node [style=none] (1) at (-4, 0.5) {$\frac{1}{K}$};             \node [style=none] (2) at (-2, 0.5) {$\frac{K}{M}$};             \node [style=none] (3) at (0, 0.5) {$s^{-1}$};             \node [style=none] (4) at (2, 0.5) {$s^{-1}$};             \node [style=none] (5) at (-5, -0) {};             \node [style=none] (6) at (-4, -0) {};             \node [style=none] (7) at (-3, -0) {};             \node [style=none] (8) at (-2, -0) {};             \node [style=none] (9) at (-1, -0) {};             \node [style=none] (10) at (0, -0) {};             \node [style=none] (11) at (1, -0) {};             \node [style=none] (12) at (2, -0) {};             \node [style=none] (13) at (3, -0) {};             \node [style=none] (14) at (0, -0.75) {};             \node [style=none] (15) at (0, -1.5) {};         \end{pgfonlayer}         \begin{pgfonlayer}{edgelayer}             \draw [-triangle 60] (9.center) to (10.center);             \draw [bend right] (0.center) to (9.center);             \draw [-triangle 60, bend left, looseness=0.75] (11.center) to (14.center);             \draw [-triangle 60, bend left] (0.center) to (13.center);             \draw [-triangle 60] (11.center) to (12.center);             \draw [-triangle 60] (5.center) to (6.center);             \draw [bend right] (7.center) to (15.center);             \draw [bend left] (14.center) to (9.center);             \draw (6.center) to (7.center);             \draw [-triangle 60] (7.center) to (8.center);             \draw [-triangle 60, bend right] (15.center) to (13.center);             \draw (10.center) to (11.center);             \draw (12.center) to (13.center);             \draw (8.center) to (9.center);         \end{pgfonlayer}     \end{tikzpicture}


title: Why is this lettrine being bumped into the margin?

text: Consider the MWE from an earlier question:               \documentclass{article}     \usepackage{lettrine}     %\usepackage{fontspec}     %\defaultfontfeatures{Ligatures={Historical}}     %\setmainfont[Ligatures={Common,Rare}]{Hoefler Text}     %% unfortunately, I do not own these fonts          \newcommand\prelude[2][8em]{\makebox[#1][c]{\itshape\scriptsize#2.}}          \newenvironment{prayer}[4][]{%       \lettrine[ante=\prelude{#2},#1]{#3}{#4}     }{%       \unskip       \qquad       \textit{Amen.}%     }          % optional smart handling of words; works either way     \iftrue     \makeatletter     \def\prayer{\@ifnextchar[{\@prayer}{\@prayer[]}}     \def\@prayer[#1]#2#3#4 {\lettrine[ante=\prelude{#2},#1]{#3}{#4} }     \def\endprayer{\unskip\qquad\textit{Amen.}}     \makeatother     \fi          \def\mytext{O Lord, we join our unfeigned thanks for all thy       mercies; for our being, our reason, and all other endowments and       faculties of soul and body; for our health, friends, food, and       raiment, and all the other comforts and conveniences of life.  Above       all we adore thy mercy in sending thy only Son into the world to       redeem us from sin and eternal death, and in giving us the knowledge       and sense of our duty towards thee.  We bless thee for thy patience       with us, notwithstanding our many and great provocations; for all       the directions, assistances, and comforts of thy Holy Spirit; for       thy continual care and watchful providence over us through the whole       course of our lives; and particularly for the mercies and benefits       of the past day: Besecching thee to continue these thy blessings to       us; and to give is grace to show our thankfulness in a sincere       obedience to his laws through whose merits and intercession we       received them all, thy Son our Saviour Jesus Christ.}          \begin{document}     \begin{prayer}[loversize=0.1]{The Thanksgiving}       TO our prayers, \mytext     \end{prayer}          \lettrine[ante={\prelude{The Thanksgiving}},loversize=0.1]%     {T}{O} our prayers, \mytext\qquad\textit{Amen.}     \end{document}      I have this strange behavior: ![output](http://i.stack.imgur.com/ZiYQa.png) It is as if I had introduced `lhang=1` as an optional argument, but I've done no such thing. What could be causing this?


title: How to I force a word to move to the end of the line?

text: How do I force my document to pull selected words to the end of each line (and to hyphenate them as well, if needed)? I have an old document. I know the page size and I think I've found the corresponding modern font for the original typeface. However, I don't know the exact margins and some other details. Is there a way for me to designate words as being at the end of the line, and then having the rest of the words justify themselves? Here is my code:               \documentclass{article}         \usepackage[paperwidth=25.7cm, paperheight=40.6cm,bindingoffset=0in,left=1.2in,right=0.5in,         top=0.9in,bottom=1in,footskip=.25in]{geometry}                   \usepackage{lettrine}         \usepackage{fontspec}             \defaultfontfeatures{Ligatures={Historical}}             \setmainfont[Ligatures={Common,Rare},Scale=1.9]{Adobe Caslon Pro}              \newcommand{\prelude}[1]{\textsuperscript{\emph{#1.}\quad}}                     \begin{document}            \noindent deſires, may reſt there. Purge our hearts from envy, hatred, and malice;             that we may never ſuffer the ſun to go down upon our wrath ; but may always go to             our reſt in peace, charity, and good-will, with a conſcience void of offence            towards thee and towards men: That ſo we may be preſerved pure and blameleſs,            unto the coming of our Lord and Saviour Jeſus Chriſt. \textit{Amen.}            \lettrine[ante={\prelude{The Interceſſion}}, loversize=0.2]{A}{ND}              accept, O Lord, our interceſſions for all mankind. Let the light of             thy Goſpel ſhine upon all nations; and may as many as have received it,             live as becomes it. Be gracious unto thy Church; and grant that every member             of the fame, in his vocation and miniſtry, may ſerve thee faithfully. Bleſs             all in authority over us; and ſo rule their hearts and ſtrengthen their hands,             that they may puniſh wickedneſs and vice, and maintain thy true religion and virtue.             Send down thy bleſſings temporal and ſpiritual, upon all our relations, friends,             and neighbours. Reward all who have done us good, and pardon all thoſe who have             done or wiſh us evil, and give them repentance and better minds. Be merciful to             all who are in any trouble; and do thou, the God of pity, adminiſter to them              according to their ſeveral neceſſities, for his ſake who went about doing good,             thy Son our Saviour Jeſus Chriſt. \textit{Amen.}                 \lettrine[ante={\prelude{The Thanksgiving}}, loversize=0.1]{T}{O}                our prayers, O Lord, we join our unfeigned thanks for all the                mercies; for our being, our reaſon, and all other endowments and faculties of ſoul               and body; for our health, friends, food, and raiment, and all the other comforts and               conveniences of life. Above all we adore thy mercy in ſending thy only Son into the               world to redeem us from ſin and eternal death, and in giving us the knowledge and                          ſenſe of our duty towards thee. We bleſs thee for thy patience with us, notwithſtanding               our many and great provocations; for all the directions, aſſiſtances, and comforts of thy               Holy Spirit; for thy continual care and watchful providence over us through the whole               courſe of our lives; and particularly for the mercies and benefits of the paſt day:               Beſecching thee to continue theſe thy bleſſings to us; and to give is grace to ſhow               our thankfulneſs in a ſincere obedience to his laws through whoſe merits and               interceſſion we received them all, thy Son our Saviour Jeſus Chriſt. \textit{Amen.}                 \lettrine[ante={\prelude{Prayer for God's pro-\\tection through the night            following.}}, loversize=0.1]{I}{N} particular we beſeech thee to continue thy     gracious protection to us this night. Defend us from all dangers and miſchiefs, and from     the fear of them; that we may enjoy ſuch refreſhing ſleep as may lit us for the      duties of the following day. Make us ever mindful of the time when we ſhall lie      down in the duſt; and grant us grace always to live in fuch a ſtate, that we may      never be afraid to die: So that living and dying we may be thine, through the       merits and ſatisfaction of thy Son Chriſt Jeſus, in whoſe Name we offer up theſe       imperfect prayers. Amen.            THE grace of our Lord Jeſus Chriſt, and the love of God, and the fellowſhip of            the Holy Ghoſt, be with us all evermore. \textit{Amen.}                 \begin{center}            \textpilcrow \textit{ On Sundays and on other days, when it may be convenient,     it will be proper to begin with a\\Chapter, or part of a Chapter, from the New Teſtament}            \end{center}              \end{document}      Here's a screencap of the original (left) and the output (right). ![Screencap](http://i.stack.imgur.com/evbiB.png) Also how would I go about forcing 'protection' to become 'pro-tection' (with a return) in `\lettrine[ante={\prelude{Prayer for God's pro-\\\tection through the night following.}}, loversize=0.1]{I}{N}` ?


title: xticklabels misaligned

text: Please consider the following MWE. The same code is in another document with a larger preamble, so maybe my problem with the misaligned `xticklabels` is because of conflicting `packages`. The first screenshot shows the results of the MWE and the second how it looks like when compiled with a larger preamble. ![As is should be](http://i.stack.imgur.com/EVJMX.png) ![Misaligned xticklabels](http://i.stack.imgur.com/hX0F9.png) **Note:** For the MWE I did not include special formatting (e.g. colours, dashing etc). **EDIT** By the way: If you take a look at the data in `dataLevelerConverter2.dat` you will see that there is a Kalenderwoche 42. However, in the first screenshot it seems that the `xticks` start with Kalenderwoche 43. **MWE**               \documentclass{article}     \usepackage{filecontents}     \usepackage{tikz}     \usepackage{pgfplots}      \usepgfplotslibrary{groupplots}               \begin{filecontents}{dataLevelerConverter2.dat}     Wert    Kalenderwochen  Nachfrage   Nachfrage1a Nachfrage1b Nachfrage1c Nachfrage1d nachLeveler nachConverter     1   42  nan nan nan nan nan 128 608     2   43  255 255 nan nan nan 1088    608     3   44  1584    1584    1584    nan nan 960 1265     4   45  1296    nan 1296    1296    nan 1570    1265     5   46  432 nan nan 432 nan 610 610     6   47  972 nan nan 972 nan 610 610     7   48  540 nan nan 540 nan 610 610     8   49  1104    nan nan 1104    1104    610 610     9   50  0   nan nan nan 0   0   0     \end{filecontents}               %%%%Some number formatting for pgfplots%%%%     \pgfkeys{/pgf/number format/.cd,%additional code           use comma,%additional code            1000 sep={\,},%additional code     }          \begin{document}          \begin{tikzpicture}         \begin{axis}[             width=10cm,             height=6cm,             xticklabels from table = {dataLevelerConverter2.dat}{Kalenderwochen},             xtick from table = {dataLevelerConverter2.dat}{Wert},     %        xtick = {1,...,9},     %        xtick = data,             xlabel=Kalenderwoche,             ylabel=Kundennachfrage,             legend style={at={(0.5,-0.3)},anchor=north,draw=none},             legend columns=3     ]              \addplot table [x=Wert, y=Nachfrage] {dataLevelerConverter2.dat} ;             \addlegendentry{label1}              \addplot table [x=Wert, y=nachLeveler] {dataLevelerConverter2.dat} ;             \addlegendentry{label2}              \addplot table [x=Wert, y=nachConverter] {dataLevelerConverter2.dat} ;             \addlegendentry{label3}              \end{axis}     \end{tikzpicture}          \end{document}


title: Page numbering of LaTeX documents not showing

text: I have a ten page LaTeX document in which only the first page number shows (i.e., 1). The rest of the page numbering does not show. How can I fix this?


title: Measuring the width of a verbatiminput block

text: Is there any way of measuring the width of a VerbatimInput block? In other words, I would like something along the following lines, except that the verbatim data should be taken from an external file as with \VerbatimInput:               \documentclass{article}     \usepackage{fancyvrb}          \begin{document}          % Get the verbatim data from an external file instead.     \SaveVerb{data}+verbatim text }&^+          \newlength{\mylength}     \settowidth{\mylength}{\UseVerb{data}}          Width is: \the\mylength.          \end{document}      (Saving the verbatim block is not crucial to me so if there is some completely different way of measuring its width that would also be fine. I also don't insist on using the \fancyvrb package if there is another verbatim package that does this.)


title: How to make a newcommand producing a matrix

text: I would like to do something like this               \newcommand{\pmat}[1][2][3][4]{\begin{pmatrix} #1 & #2 \\ #3 & #4\end{pmatrix}}      But this produces the error               ERROR: LaTeX Error: Missing \begin{document}.     ...                                                   l.42 \newcommand{\pmat}[1][2][3                                    ][4]{\begin{pmatrix} #1 & #2 \\ #3 & #4\end{p..      How do I create a newcommand \pmat such that `\pmat{1}{2}{3}{4}` produces `\begin{pmatrix} 1 & 2 \\\ 3 & 4\end{pmatrix}`? Thanks, Thomas


title: Increase spacing in split environment

text: I'm writing long equations with the split environment:               \begin{equation}     \begin{split}     ...     \\     ...     \\     ...     \end{split}     \end{equation}      The problem is that the single lines are a bit high, and there is too little vertical spacing, so that the result looks messy. Is there a way to increase the vertical space of the split environment?


title: Netography for managing links

text: To manage my links used in my thesis, I wanted to use a netography so that I can cite links that are listed (with time stamp of the last visit!) at the end, like a bibliography. I couldn't find any package or similar questions. Does anyone know a package or a work-around?