title: How can I use authortype to set articles automatically?

text: The BibLaTeX documentation mentions a field `authortype`: > authortype field (key) > > The type of author. This field will affect the string (if any) used to > introduce the author. Not used by the standard bibliography styles. I was wondering whether this was intended to and/or could be used to set definite article in front of citations automatically. Consider the following short text:               \documentclass{article}     \usepackage[style=numeric]{biblatex}     \bibliography{foo}     \begin{document}     \Textcite{soc} thinks pine trees are really bad off     while \textcite{guy} begs to differ.     \Citeauthor{guy} and \citeauthor{soc} both love pine trees though.          \printbibliography          \end{document}      with the following example `.bib` file:               @misc{soc,     author={{Pine Tree Society}},     title={On the Mistreatment of Pine Trees through the Ages},     authortype={body}     }          @misc{guy,     author={Woodman, Hans},     title={Pine Trees -- A Natural Success Story},     authortype={person}     }      What this currently gives me is this: ![current result](http://i.stack.imgur.com/6WDSC.png) What I would rather like to have is this: ![desired result](http://i.stack.imgur.com/Y5dBh.png) Did anybody ever try something like this? Does anybody have any idea how to do this?


title: How to reset endnotes counter at parts and chapters

text: I have a document (book class, see condensed working-example below) in the book class, in which I've got some endnotes (extra notes that get saved until the end of the document as opposed to printed at the bottom of the current or nearest right-hand page). I also have footnotes, which I want to remain independent; I've achieved this, and have them resetting every page, and have the endnotes resetting every new chapter or part. Now, when I call `\theendnotes` I get a list of all the endnotes in the document in order, with the correct numberings (i.e. having reset the counter every chapter/part). I would like the part/chapter divisions displayed as section/subsection headings respectively, and without these interfering with my table of contents. I'm working with the endnotes package just now, but open to other ideas if they'd solve my problem without me getting my hands too dirty (I'm no pro when it comes to LaTeX hackery). The reason I have both footnotes and endnotes is that I'm translating an old academic text, and I need to be [reasonably] faithful to the original formatting. Working example below:               \documentclass{book}     \usepackage{endnotes}         \renewcommand\enoteheading{\chapter*{\notesname}\mbox{}\par\vskip-\baselineskip}         \makeatletter             \@addtoreset{footnote}{page}    % Reset footnote "numbering" (symbols) every new page             \@addtoreset{endnote}{part}     % Reset endnote numbering every new part             \@addtoreset{endnote}{chapter}  % Reset endnote numbering every new chapter         \makeatother     \usepackage{footmisc}         \renewcommand{\thefootnote}{\fnsymbol{footnote}}%     \begin{document}             Some text,\endnote{This endnote will naturally be numbered 1, as the first endnote in the document.}             not in any structural part of the document.         \part{Part One}             Some\footnote{This is the first footnote, symbolised by a star.}             text,\footnote{Second footnote, a pair of stars.}             not\endnote{This endnote will naturally be numbered 1, as the first endnote in the document.}             part\footnote{Third footnote, a solitary dagger.}             of any chapter.         \chapter{Chapter 1}             This\footnote{A footnote, should be a single star (symbol \#1), not a pair of daggers (\#4) because of reset footnote numbering at new page.}              is chapter one.\endnote{This endnote should be numbered 1, since it's the first of a chapter.}         \part{Part Two}             Text.\endnote{This should also be numbered 1, since it's the first in its part.}         \theendnotes     \end{document}


title: Biblatex: No \postnotedelim for citations that aren't numerals

text: When I am citing pages in books, I use the citation format > (Author 1982:45) But when I am citing something like paragraphs or online data with an ID number (i.e. things that aren't a plain numeral like a page number), I would like to remove the colon: > (Online resource no. 58; Author 1975 §18) I assume the necessary trick here is to specify an empty `\postnotedelim` iff the postnote is not a numeral. How can I accomplish this (adding something to the preamble in my `.tex` file)?               \documentclass{article}     \usepackage{fontspec,filecontents}     \usepackage[style=authoryear]{biblatex}     \renewcommand*{\postnotedelim}{\addcolon}     \DeclareFieldFormat{postnote}{#1}     \begin{filecontents}{\jobname.bib}     @BOOK{harrison,         AUTHOR = "George Harrison",         TITLE = "My life with the Beatles",         YEAR = "1982",         LOCATION = "London",         PUBLISHER = "Big House"}     @ONLINE{archiveZ,         TITLE = "Archive Z",         SHORTHAND = "Archive Z",         URL = "http://www.archivez.com",         URLDATE = "2013-03-22"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \parencites[45]{harrison}[no. 58]{archiveZ}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/fSsys.png)


title: Change the shape of a vertex using qtree

text: Using the QTree package, is it possible to add a shape to a node? For example, a square or a circle?


title: how to align item bullet to the top of the table in the item

text: Consider the following example:               \section{abc}       \begin{enumerate}         \item           \begin{tabu}[t]{c|c}             \hline             $p$ & $p \oplus p$ \\             \hline             T & F \\             F & F \\             \hline           \end{tabu}       \end{enumerate}      The bullet a) is above the top line of the table, e.g. the following picture ![enter image description here](http://i.stack.imgur.com/USo4n.png) How to make the bullet align to the first row of the table, e.g. like this ![enter image description here](http://i.stack.imgur.com/FsuDJ.png)


title: div equivalent to mod

text: What's the easiest way to define a `\bdiv` equivalent to `\bmod`, i.e., a binary operator for integer division? I tried `\meaning\bmod`, but got very primitive TeX commands, so I'm sure there's a higher-level way to define it that would give me the Roman font and binary operation spacing.


title: Difference between \relax and % for ending a line

text: when would I use one over the other? Are they the same?


title: xskak does not show dot after the number of the step

text: I write to xskak `1\. Rc8+ Rxc8 2. Rxc8+ Kg7`, but it displays `1 Rc8+ Rxc8 2 Rxc8+ Kg7` (without dots). It is annoying... Does it depend on something in the preambulum of the LaTeX file (setting languages)? I have no idea...


title: Draw edges and paths in the background of nodes in TikZ

text: Is it possible to draw edges or paths in the background of nodes independently of whether they are constructed before or after the nodes are defined? In the following example, the `\draw` instruction comes after the nodes are declared and so the path from `(foo)` to `(baz)` crosses the node `(bar)`.               \documentclass{article}          \usepackage{tikz}          \begin{document}       \begin{tikzpicture}         \node [fill=gray!30] (foo) at (0,0) { foo };         \node [fill=gray!30] (bar) at (2,0) { bar };         \node [fill=gray!30] (baz) at (4,0) { baz };              \draw (foo) -- (baz);       \end{tikzpicture}     \end{document}      What I would like to achieve is that the path crosses `(bar)` in the background, so the node is not crossed visually. Is this possible without changing the order of the instructions (in particular, without moving the creation of `(bar)` below the `\draw` instruction)? Here is how the above example looks like: ![edge crossing the node in the foreground](http://i.stack.imgur.com/fFFnL.png) And here is the desired result: ![edge crossing the node in the background](http://i.stack.imgur.com/5FAPq.png)


title: Why Latex keeps replacing some of the unchanged figures even though \tikzexternalize is used?

text: I use the following in preamble and it worked fine before (I think) I change the size of a figure.                 \usepackage{tikzscale}         \usepackage{tikz}         \usepackage{pgfplots}         \usetikzlibrary{external}         \tikzexternalize[prefix=ext-tikz/]      Now `pdfLatex` keeps updating the `pdf` files of a few of the unchanged figures every time I compile the document. I tried deleting all auxiliary files (.aux,etc), compiling with `MikTeX` and `TeXLive`, but the problem persist. What is the cause of this problem and how do you suggest solving it?


title: Adding output profile to TeXstudio

text: I downloaded some make files for adding output profiles to TeXnicCenter. The files consist of three .bat files and one .tco file. The files can be downloaded here: http://wikisend.com/download/236182/makefiles.zip The problem is that I am using Mac OS X with MacTeX and TeXstudio. Is there anyway I can add those output profiles to TeXstudio?


title: Inverse PDF Search in beamer

text: Can you please help in fixing a problem with inverse PDF search in beamer documents beamer does not work correctly with SyncTeX. Inverse PDF search (in Sumatra, Texworks, etc. I’ve tried all windows options) shows only the end of a frame, not the line with corresponding code. So if you have 30 pages in [allowframebreaks], inverse PDF search is useless. Any suggestions? Is it possible to insert some commands like line numbering to create inverse search points in beamer?


title: Long bibliography in Beamer presentation

text: I am a new user of the Beamer presentation template and would like to display an extensive reference list with numbers to the left of the entries just as the standard bibliography in LaTeX. How can I do so? My bibliography does not fit into a single slide and I think there should be a neat solution for it. Could you provide some suggestions? EDIT: I have managed to split my bibliography across many slides now I would like to enumerate them just like in LaTeX document class. How can I achieve this? Thanks


title: Subsection formatting in Memoir class (not bold)

text: In the following code, I would like to have the subsection in normal font (not bold).               \documentclass[]{memoir}          \setsecnumdepth{subsection}          \begin{document}     \section{section}     \subsection{subsection}     \end{document}      Which command can I use?


title: Typesetting Right-to-Left math

text: **UPDATE:** I've managed to produce something that is aesthetically correct, however with a lot of "hardcoding" and trial and error to manually measure my spaces. Not to mention that I have to write my equation "backwards" (e.g. "^2 b" instead of "b^2", and "0 = s" instead of "s = 0"). Is there a _cleaner_ and more _automatic_ way to do this ? The example then its minimal code follows: ![Looks good](http://i.stack.imgur.com/HSHIn.png)               \documentclass{article}     \usepackage[leqno]{amsmath}     \usepackage{graphicx}     \newcommand{\asqrt}[1]{\reflectbox{\ensuremath{\sqrt{\reflectbox{\ensuremath{#1}}}}}}     \newcommand{\asum}[3]{\reflectbox{\ensuremath{\displaystyle\sum\limits_{\reflectbox{\ensuremath{#1}}}^{\reflectbox{\ensuremath{#2}}} \reflectbox{ \ensuremath{#3} }}}}          \usepackage{polyglossia}     \setdefaultlanguage[calendar=gregorian]{arabic}  % from polyglossia     \setmainfont[Script=Arabic,Scale=1.8,Mapping=arabicdigits]{Scheherazade}     \begin{document}     \begin{equation}     \asqrt{\frac{ ^{\raisebox{3pt}{\mbox{\tiny 2}}}\mbox{ف} } {\mbox{ب} \mbox{4}}}     \end{equation}     \begin{equation}     \asum{\mbox{\scriptsize 0 = س}}{\hspace{-9pt} \scriptsize \infty}{ ^{\mbox{\small 2}} \mbox{س}}     \end{equation}     \end{document}      * * * **Original question:** * * * I am using XeLaTeX along with polyglossia package to typeset a mathematical article in Arabic. It is working very well for text but not for math. The text is of course set Right-to-Left. However this is not the case for math, which is by default typeset the other way around. Unfortunately, this is not the only problem with it; I do as a matter of fact, need a "mirrored" version of the integration and summation symbols, and square roots. > 1) Is there a ready package for that (I did search but didn't find any) ? > > 2) Is it possible to build such a package without losing existing features > like the align environment of amsmath, or I will also have to re-implement > that ? In particular I wondering how bad is my situation if I try to approach implementing a complete solution for RTL math for Arabic. EDIT: I know there is the question How to typeset an Arabic paper with the equations in the usual Latin in Latex? but it is talking about Latin equation, not Arabic equations. EDIT 2: I can try some tricks like mirrorbox (like this \vec{x} but with arrow from right to left?) but still it doesn't work correctly. There is several problems:   1. If I do not put the Arabic characters inside a box (mbox) they do not appear nor reserve a vertical space at all.   2. When using the "power" operator "^", I have to put the power before the base. Instead of x^2, I have to write it like ^2 x. However even so, it doesn't look raised because the size of the power mbox wasn't reduced (restricted space problem, it does look raised in the second example).   3. Reversed order for numbers and characters. In the denominator of the attached photo, it should appear as "4 b" but rather rendered as "b 4". To render it right I have to reverse the order in my source. All these reversals will make the source incomprehensible for complex equations. The example:               \asqrt{ \frac{ ^{\mbox{2}} \mbox{ف} } { \mbox{4 ب} } }      Where \asqrt is defined as :               \usepackage{graphicx}     \newcommand{\asqrt}[1]{\reflectbox{\ensuremath{\sqrt{\reflectbox{\ensuremath{#1}}}}}}      ![Example of incorrect behaviour](http://i.stack.imgur.com/GxXfV.png) EDIT 3: It gets hopeless with something like summation. The assignment below the summation should be reversed. Moreover, the need to use mbox makes the proportions very bad as well.               \newcommand{\asum}[3]{\reflectbox{\ensuremath{\sum\limits_{\reflectbox{\ensuremath{#1}}}^{\reflectbox{\ensuremath{#2}}} \reflectbox{ \ensuremath{#3} }}}}          \asum{\mbox{س = 0}}{\infty}{^{\mbox{2}} \mbox{س}}      ![Another bad example](http://i.stack.imgur.com/jXdHp.png)


title: What do I need to change if I change table to longtable?

text: I just used excel2latex to import a table, but the table is too long and across pages. I tried several times but found the table is shrunk and I don't know how to center all the contents of the cells. Thx a lot! Here is my code.               \documentclass[12pt,a4paper]{article}     \usepackage[pdftex]{graphicx}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{booktabs}     \usepackage{geometry}     \usepackage{longtable}     \begin{document}     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\     \begin{longtable}{c *6{p{1.5cm}}}         \hline         {\bf Order} & {\bf Analytical} & {\bf Numerical} &{\bf Order} & {\bf Analytical} & {\bf Numerical}\\ \hline         1     & 0.363636 & 0.363636 & 26    & 1.64E-07 & 1.64E-07 \\         2     & 0.299465 & 0.299465 & 27    & 9.07E-08 & 9.07E-08 \\         3     & 0.155492 & 0.155492 & 28    & 5.02E-08 & 5.02E-08 \\         4     & 0.082929 & 0.082929 & 29    & 2.78E-08 & 2.78E-08 \\         5     & 0.044763 & 0.044763 & 30    & 1.54E-08 & 1.54E-08 \\         6     & 0.024324 & 0.024324 & 31    & 8.52E-09 & 8.52E-09 \\         7     & 0.013274 & 0.013274 & 32    & 4.72E-09 & 4.72E-09 \\         8     & 0.007264 & 0.007264 & 33    & 2.62E-09 & 2.62E-09 \\         9     & 0.003984 & 0.003984 & 34    & 1.45E-09 & 1.45E-09 \\         10    & 0.002188 & 0.002188 & 35    & 8.03E-10 & 8.03E-10 \\         11    & 0.001204 & 0.001204 & 36    & 4.45E-10 & 4.45E-10 \\         12    & 0.000663 & 0.000663 & 37    & 2.47E-10 & 2.47E-10 \\         13    & 0.000365 & 0.000365 & 38    & 1.37E-10 & 1.37E-10 \\         14    & 0.000201 & 0.000201 & 39    & 7.57E-11 & 7.57E-11 \\         15    & 0.000111 & 0.000111 & 40    & 4.20E-11 & 4.20E-11 \\         16    & 6.13E-05 & 6.13E-05 & 41    & 2.33E-11 & 2.33E-11 \\         17    & 3.39E-05 & 3.39E-05 & 42    & 1.29E-11 & 1.29E-11 \\         18    & 1.87E-05 & 1.87E-05 & 43    & 7.15E-12 & 7.15E-12 \\         19    & 1.03E-05 & 1.03E-05 & 44    & 3.96E-12 & 3.96E-12 \\         20    & 5.71E-06 & 5.71E-06 & 45    & 2.20E-12 & 2.20E-12 \\         21    & 3.16E-06 & 3.16E-06 & 46    & 1.22E-12 & 1.22E-12 \\         22    & 1.75E-06 & 1.75E-06 & 47    & 6.75E-13 & 6.75E-13 \\         23    & 9.67E-07 & 9.67E-07 & 48    & 3.74E-13 & 3.74E-13 \\         24    & 5.35E-07 & 5.35E-07 & 49    & 2.08E-13 & 2.08E-13 \\         25    & 2.96E-07 & 2.96E-07 & 50    & 1.15E-13 & 2.58E-13 \\ \hline             \end{longtable}     \end{document}      The code below is got from excel2latex.               \begin{table}[htbp]     \centering     \caption{Add caption}     \begin{tabular}{cccccc}     \toprule     Order & Analytical & Numerical & Order & Analytical & Numerical \\     \midrule     1     & 0.363636 & 0.363636 & 26    & 1.64E-07 & 1.64E-07 \\     2     & 0.299465 & 0.299465 & 27    & 9.07E-08 & 9.07E-08 \\     3     & 0.155492 & 0.155492 & 28    & 5.02E-08 & 5.02E-08 \\     4     & 0.082929 & 0.082929 & 29    & 2.78E-08 & 2.78E-08 \\     5     & 0.044763 & 0.044763 & 30    & 1.54E-08 & 1.54E-08 \\     6     & 0.024324 & 0.024324 & 31    & 8.52E-09 & 8.52E-09 \\     7     & 0.013274 & 0.013274 & 32    & 4.72E-09 & 4.72E-09 \\     8     & 0.007264 & 0.007264 & 33    & 2.62E-09 & 2.62E-09 \\     9     & 0.003984 & 0.003984 & 34    & 1.45E-09 & 1.45E-09 \\     10    & 0.002188 & 0.002188 & 35    & 8.03E-10 & 8.03E-10 \\     11    & 0.001204 & 0.001204 & 36    & 4.45E-10 & 4.45E-10 \\     12    & 0.000663 & 0.000663 & 37    & 2.47E-10 & 2.47E-10 \\     13    & 0.000365 & 0.000365 & 38    & 1.37E-10 & 1.37E-10 \\     14    & 0.000201 & 0.000201 & 39    & 7.57E-11 & 7.57E-11 \\     15    & 0.000111 & 0.000111 & 40    & 4.20E-11 & 4.20E-11 \\     16    & 6.13E-05 & 6.13E-05 & 41    & 2.33E-11 & 2.33E-11 \\     17    & 3.39E-05 & 3.39E-05 & 42    & 1.29E-11 & 1.29E-11 \\     18    & 1.87E-05 & 1.87E-05 & 43    & 7.15E-12 & 7.15E-12 \\     19    & 1.03E-05 & 1.03E-05 & 44    & 3.96E-12 & 3.96E-12 \\     20    & 5.71E-06 & 5.71E-06 & 45    & 2.20E-12 & 2.20E-12 \\     21    & 3.16E-06 & 3.16E-06 & 46    & 1.22E-12 & 1.22E-12 \\     22    & 1.75E-06 & 1.75E-06 & 47    & 6.75E-13 & 6.75E-13 \\     23    & 9.67E-07 & 9.67E-07 & 48    & 3.74E-13 & 3.74E-13 \\     24    & 5.35E-07 & 5.35E-07 & 49    & 2.08E-13 & 2.08E-13 \\     25    & 2.96E-07 & 2.96E-07 & 50    & 1.15E-13 & 2.58E-13 \\     \bottomrule     \end{tabular}%     \label{tab:addlabel}%     \end{table}%      ![enter image description here](http://i.stack.imgur.com/pMcs6.png)


title: Tikz: How to Align the Text of simple Nodes?

text: I tried to put up a nice little graphic, to make an example for String- Matching. My Problem is the "b" is not aligned with a and c and i can't find a way to handle this:               \begin{figure}[h]                      \begin{tikzpicture}[align=bottom,shorten >=1pt,node distance=1cm,on grid,auto]                   \node(q_0) {$c$};                   \node(q_1) [right of=q_0] {$b$};                   \node(q_2) [right of=q_1] {$a$};                   \node(q_3) [right of=q_2] {$c$};                   \node(q_4) [right of=q_3] {$b$};                   \node(q_5) [right of=q_4] {$a$};                   \node(q_6) [right of=q_5] {$b$};                   \node(q_7) [right of=q_6] {$a$};                        \node(t_0) [below of=q_0]{$a$};                   \node(t_1) [right of=t_0] {$c$};                   \node(t_2) [right of=t_1] {$b$};                   \node(t_3) [right of=t_2] {$a$};                   \node(t_4) [right of=t_3] {$a$};                   \node(t_5) [right of=t_4] {$c$};                   \node(t_6) [right of=t_5] {$b$};                   \node(t_7) [right of=t_6] {$a$};                   \node(t_8) [right of=t_7] {$c$};                   \node(t_9) [right of=t_8] {$b$};                   \node(t_10) [right of=t_9] {$a$};                   \node(t_11) [right of=t_10] {$b$};                   \node(t_12) [right of=t_11] {$c$};                        \path[->] (q_0) edge node {$\neq$} (t_0);                   \end{tikzpicture}         \end{figure}


title: List of Figures Citation Issue

text: I know this has been asked before. However, none of the solutions helped me. I have tried `\notoccite` and that did not work. My issue is that each figure with a citation in the list of figures counts so, # List of Figures Figure 1 LoF Caption [1] .......... 1 Figure 2 LoF Caption [2] .......... 2 # Introduction Sentence with citation [3] Figure 1: Figure 1 LoF Caption [1] Figure 2: Figure 2 LoF Caption [2]               \documentclass{article}          \usepackage{graphicx, cite, caption, subcaption, notoccite}     \begin{document}          \listoffigures          \section{Introduction}          Sentence with a citation \cite{first}          \begin{figure}         \caption{Figure 1 LoF Caption \cite{second}}     \end{figure}     \begin{figure}         \caption{Figure 2 LoF Caption \cite{third}}     \end{figure}     \end{document}      It is important to note that `\autocite` does not work and I am using a *.bib file for my references. I do not want any citations citations to count in the list of figures.


title: Problem with Protext Setup

text: I downloaded `ProText.exe`, and was about to start Setup according to `protext-install-en.pdf`. But an error popped up. And in `Setup.exe`, it says this.               Traceback (most recent call last):       File "protext-setup.py", line 298, in <module>       File "protext-setup.py", line 97, in __init__       File "wx\_controls.pyc", line 494, in __init__     UnicodeDecodeError: 'cp949' codec can't decode bytes in position 4-5: illegal multibyte sequence      What does this mean? What should I do?


title: xelatex does not find texgyreterms

text: I want to use xelatex together with TexGyreTerms:               \ifxetex       \newcommand{\lsCoverTitleFont}[1]{\fontspec[LetterSpace=-2.0]{TeXGyreTermes}   \fontshape{sc}\fontsize{52pt}{16.75mm}\selectfont #1}      \else      However, although the packages are installed (Mac, texlive 2012), I get the following complaint:               kpathsea: Running mktextfm TeXGyreTermes     /usr/local/texlive/2012/texmf/web2c/mktexnam: Could not map source abbreviation T for TeXGyreTermes.     /usr/local/texlive/2012/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2012/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input TeXGyreTermes     This is METAFONT, Version 2.718281 (TeX Live 2012)               kpathsea: Running mktexmf TeXGyreTermes     ! I can't find file `TeXGyreTermes'.     <*> ...r; mag:=1; nonstopmode; input TeXGyreTermes          Please type another input file name     ! Emergency stop.     <*> ...r; mag:=1; nonstopmode; input TeXGyreTermes          Transcript written on mfput.log.     grep: TeXGyreTermes.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input TeXGyreTermes' failed to make TeXGyreTermes.tfm.     kpathsea: Appending font creation commands to missfont.log.          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "TeXGyreTermes" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.21       What can I do? Thanks for the prompt reply. I tried this, but the result is:               kpathsea: Running mktextfm TeXGyreTermes-Regular     /usr/local/texlive/2012/texmf/web2c/mktexnam: Could not map source abbreviation T for TeXGyreTermes-Regular.     /usr/local/texlive/2012/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2012/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input TeXGyreTermes-Regular     This is METAFONT, Version 2.718281 (TeX Live 2012)               kpathsea: Running mktexmf TeXGyreTermes-Regular     ! I can't find file `TeXGyreTermes-Regular'.     <*> ...1; nonstopmode; input TeXGyreTermes-Regular          Please type another input file name     ! Emergency stop.     <*> ...1; nonstopmode; input TeXGyreTermes-Regular          Transcript written on mfput.log.     grep: TeXGyreTermes-Regular.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input TeXGyreTermes-Regular' failed to make TeXGyreTermes-Regular.tfm.     kpathsea: Appending font creation commands to missfont.log.          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "TeXGyreTermes-Regular" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.21           ?       I do have this font:               $ otfinfo -f /usr/local/texlive/2012/texmf-dist/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf     aalt    Access All Alternates     c2sc    Small Capitals From Capitals     cpsp    Capital Spacing     dlig    Discretionary Ligatures     frac    Fractions     kern    Kerning     liga    Standard Ligatures     lnum    Lining Figures     onum    Oldstyle Figures     pnum    Proportional Figures     salt    Stylistic Alternates     size    Optical Size     smcp    Small Capitals     ss01    Stylistic Set 1     ss02    Stylistic Set 2     ss03    Stylistic Set 3     ss04    Stylistic Set 4     tnum    Tabular Figures     zero    Slashed Zero


title: Mhchem with decimal ratios

text: Without using full math-mode, does anyone know how to use the `mhchem` package with non-integer atomic subscripts. Consider the following:               \documentclass{article}     \usepackage[version=3]{mhchem}          \begin{document}         %Works         \ce{Fe98C2}                   %Doesn't Work.         \ce{Fe97.5C2.5}      \end{document}      The Second Formula I am seeking effectively:               Fe$_{97.5}$C$_{2.5}$


title: Creating delocalized double bonds in chemfig without tikzset?

text: I'm trying to create a delocalized double bond, similar to the example given in the chemfig documentation. They suggest using the tikz library package {decorations} to implement this. Before running the actual chemfig code for the molecule, the documentation suggests this setup code:               \pgfdeclaredecoration{ddbond}{initial}     {     \state{initial}[width=4pt]     {         \pgfpathlineto{\pgfpoint{4pt}{0pt}}         \pgfpathmoveto{\pgfpoint{2pt}{2pt}}         \pgfpathlineto{\pgfpoint{4pt}{2pt}}         \pgfpathmoveto{\pgfpoint{4pt}{0pt}}     }     \state{final}     {         \pgfpathlineto{\pgfpointdecoratedpathlast}     }      }               \tikzset{lddbond/ .style={decorate, decoration=ddbond}}     \tikzset{rddbond/ .style={decorate, decoration={ddbond, mirror}}}     \setatomsep{4em}      After which, the standard chemfig syntax comes in:               \chemfig{[:-30]R-C-[::60]C(-[::60,,,,,rddbond]O)-[,,,,lddbond]N(-[::-60]C-R}      My problem: I Have no idea how to use tikz, or even what it is. I run this above code and get errors from my compiler saying `! Package pgfkeys Error: I do not know the key /tikz/lddbond/ .style' and I am going to ignore it. Perhaps you misspelled it.` How do I implement tikz to create these delocalized double bonds; or, how do I create a double bond without tikz?


title: Beamer example (typeset second screen) does not compile

text: I'm trying to use the `[typeset second]` option in a beamer frame as specified by the Beamer User Guide. When I compile with that option, I receive the error `Undefined control sequence \end{frame}` I tried compiling the sample from the guide and received the same error. This issue has been reported occasionally but I haven't found a solution. Full code listing (copied directly from the guide):               \documentclass{beamer}     \usepackage{pgfpages}     \setbeameroption{second mode text on second screen}     \begin{document}     \begin{frame}[typeset second]       This text is shown on the left and on the right.       \only<second>{This text is only shown on the right.}       \only<second:0>{This text is only shown on the left.}     \end{frame}     \begin{frame}       This text is shown on the left. The right shows the same as for the       previous frame.     \end{frame}     \begin{frame}[typeset second]       \alt<second>{The \string\alt command is useful for second         mode. Let’s show the table of contents, here: \tableofcontents}       {Here comes some normal text for the first slide.}     \end{frame}     \end{document}


title: Output PDF not showing bookmarks

text: ![I want this](http://i.stack.imgur.com/Gke9w.jpg)![I get this](http://i.stack.imgur.com/Z6EVA.jpg) Just completed writing an article using ASME template and I found that the output PDF is not showing bookmarks in navigation bar. Any tips on how to fix it?               \documentclass[twocolumn,11pt,cleanfoot]{asme2e}       \special{papersize=8.5in,11in}       \usepackage{times}       \usepackage{multirow}       \usepackage{graphicx}       \usepackage{cite}       \usepackage{hyperref}       \hypersetup{pdftex,colorlinks=true,allcolors=blue}       \usepackage{hypcap}       \usepackage{bookmark}


title: put two images on the same slide

text: sorry to bother you but I'm quite new in Latex. I would like to put two images in a presentation, better in one slide in this way:               image1     image2      the two images will go one under the other and while I discuss the first image I would like the second to be not totally invisible but opaque. How this can be done?


title: A command which produces index if optional argument is not empty

text: I would like to define a command which creates an index with a certain name, when i pass the name, and doesn't create any index if there is no name passed. My first idea was to write it like that:               \newcommand{\kw}[1][]{\emph{#2}\index{#1}}      but the compiler gets stuch when I pass an empty optional argument. How can I build an if-then structure like the following?               \newcommand{\kw}[1][]{      if(#1 is not empty)       \emph{#2}\index{#1}}      else       \emph{#2}     }


title: beamer: How to align images in separate columns?

text: Here is a snippet of a beamer frame which is divided in three top-aligned columns. Each column contains:               some top text          an image          some bottom text      The problem is: because "some top text" in column #2 contains a "g" both the following image (which is the same in all 3 columns) and the "bottom text" are slightly more down-shifted. In fact the "little hook" of the "g" letter is not aligned with the very bottom of all previous capital letters. So, is there any way to get all three images perfectly aligned across the three columns?               \documentclass{beamer}     \usepackage{graphics}     \begin{document}     \begin{frame}{What is SLURM?}     \begin{columns}[t]       \begin{column}{0.30\textwidth}       \begin{center}         COLUMN NUMBER 1              \vspace{1cm}         \includegraphics[scale=0.4]{image.jpg}         \bigskip              SOME TEXT1       \end{center}       \end{column}       \begin{column}{0.30\textwidth}       \begin{center}         COLUMN NUMBER 2g              \vspace{1cm}         \includegraphics[scale=0.4]{image.jpg}         \bigskip              SOME TEXT2       \end{center}       \end{column}       \begin{column}{0.30\textwidth}       \begin{center}         COLUMN NUMBER 3              \vspace{1cm}         \includegraphics[scale=0.4]{image.jpg}         \bigskip              SOME TEXT3       \end{center}       \end{column}     \end{columns}     \end{frame}     \end{document}


title: Where would I find ua1.zip?

text: I'm using TeXShop Version 2.47, and I know from having written a twenty page document last year using apa6e (which I typeset again with no problem today) that this system is in a functional state. However, I'd now like to use uarial.sty in a similar document, and for some reason, I'm not able to do so. I found this excellent question/answer yesterday. Although I _was_ able to follow the instructions in the first answer (using `getnonfreefonts`), for some reason, my TeXLive system (2011 running in OS 10.6) still cannot use uarial.sty. I get the standard error message `latex error uarial.sty not found`. I even ran `texhash` after running `getnonfreefonts-sys -a` and still my system is not finding it. I know my system is out of date, and I think I may have a partial TL2012 installation installed alongside my 2011 system, and that's probably related to the reason that `getnonfreefonts` is not working for me. However, with a deadline approaching and a functional system in place, I'm loathe to attempt a complete upgrade before the end of the semester. I know the directories of my two TeXLive systems are as follows: `/usr/local/texlive/2011/` (2011) `/opt/local/share/` (2012) And I found where `getnonfreefonts` put uarial.sty is in: `/opt/local/share/texmf-local/tex/latex/ua1` But I need for it to be put into my `/usr/local/texlive/2011/` root in order for TeXShop to see it. So I tried a manual copy of the directory `/opt/local/share/texmf-local/tex/latex/ua1` to `/usr/local/texlive/texmf- local/tex/latex/local/` but I think I missed some accessory files (ua1.map et. al.?) in doing this which is why (although TeXShop did notice the uarial.sty file) that created a whole host of other problems for me. So I'm looking for the whole `ua1.zip` file so I can do as suggested in the second answer, but it's apparently no longer to be found at the URL listed in the second answer here. Anyone know how I can download ua1.zip by itself so I can manually get the .sty file and all of its accessories into my 2011 root? Thanks in advance. * * * ## Update I should've added that I did google this question and aside from the URL mentioned in the second answer, found no hits, thus the seemingly trivial question. I also downloaded arial.zip at that same URL and looked inside arial.zip for ua1.zip (that I think was previously to be found in arial.zip and that is even mentioned in the README for arial.zip), but as of today, the only zip file inside arial.zip is ua1fnst.zip; no ua1.zip.


title: split a node into 3 parts

text: I want to split a node into 3 parts: firstly split it vertically equally, then split the bottom one into 2 box horizontally and equally. What's the best solution for such case in tikz? Maybe we can just draw 3 box and align it carefully but the align task seems difficult for me:) Below is a test code but it seems B and C not align bottom of A and not split equally:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,shadows,positioning}     \usepackage{amsmath,bm,times}          \usepackage{verbatim}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}          \begin{document}     \tikzstyle{box}=[draw, fill=pink!10, minimum width=5em,          text centered, minimum height=2.5em,drop shadow]          \begin{tikzpicture}[node distance=0cm,outer sep = 0pt]         \node (A) [box,text width=10em] {A};         \node (B) [box,below= of A.south west,anchor=west] {B};         \node (C) [box,below= of A.south east,anchor=east] {C};     \end{tikzpicture}     \end{document}      The output picture looks like below: ![not split equally](http://i.stack.imgur.com/mAFMx.png)


title: Separation of citations on two lists without packages

text: I have to separate my citations on two lists: Preliminary Work (Own Papers) and the standard Bibliography list. The references to the standard Bibliography list should be numbered and cited with arabic numbers. The references to the Preliminary Work should be numbered and cited with roman numbers. There are several packages, which do similar work. But it seems that none of them can be used in my case. For example, the package `multibib` introduces a nice tool for creating several citation lists and citing them with the user defined command like `\citesec`. However, this is not appropriate for my purposes (I can be wrong) since: (i) in the process of editing our document with co-authors we can move some items between different lists; (ii) we want to have a possibility to cite items from two lists as `\cite{Ref2, Own2}`, in order to get a result like [2, II]. It may also be important that these two lists should appear in different parts of the document. In order to resolve this problem I define the new environment `thepreliminarywork` similar to the environment `thebibliography`. Here is my example:               \documentclass{report}          \makeatletter          \newenvironment{thepreliminarywork}[1]          {\chapter*{Preliminary Work}%           \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%           \list{\@biblabel{\@Roman\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin\labelsep                 \@openbib@code                 \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@Roman\c@enumiv}}%           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}          {\def\@noitemerr            {\@latex@warning{Empty `thepreliminarywork' environment}}%           \endlist}          \makeatother          \begin{document}          These are references to the standard bibliography list: \cite{Ref1}, \cite{Ref2}. This example works properly.          These are references to the list of preliminary papers: \cite{Own1}, \cite{Own2}. This example does not work properly since I want to get [I], [II].          I also want to write like this: \cite{Ref1, Own1}. This example also does not work properly since I want to get [1, I].             \begin{thepreliminarywork}{9}     \bibitem{Own1} The preliminary paper no. 1.     \bibitem{Own2} The preliminary paper no. 2.     \end{thepreliminarywork}          \begin{thebibliography}{9}     \bibitem{Ref1} The paper no. 1.     \bibitem{Ref2} The paper no. 2.     \end{thebibliography}          \end{document}      This gives correct numbering in both lists of citations. However the result of citation with `\cite` is always given by arabic numbers. Is there a way to correct my code? Or maybe there are some completely alternative solutions?


title: Save choice and execute later in pgfkeys?

text: Using pgfkeys, I would like to have a choice key which, rather than immediately executing some code when a value is selected, stores the selection somewhere and then later on demand I can execute the code associated with said option. An example should clarify things. I would like to define some sort of handler that allows me to write something like:               \pgfkeys{       /action/.is choice,       /action/jump/.on exec = \dojump,       /action/walk/.on exec = \dowalk,       /action/run/.on exec  = \dorun     }      So that when I select an option               \pgfkeys{/action=jump} # remembers that I selected "jump"      the corresponding code `\dojump` is _not_ executed just yet, but instead the selection is saved and executed only later until I actually say something like:               \pgfkeys{/action/.exec} # actually does the `\dojump`      This should allow the user to choose one option at some point, and change her mind later, and then put the option back. But nothing should be executed until I explicitly ask the code for the selected option to be executed. Is there a simple way to add handlers to pgfkeys and achieve this? Am I doing things the right way, or I am trying to reinvent the wheel?


title: Different color for individual bar in bar chart & adding bar labels

text: Please consider the following MWE. There are three things I would like to do:   1. **Individual colouring** For the last element ("not rejected") I would like to fill the bar with another color (e.g. orange)   2. **Nicer x-axis label** The x-axis label "not rejected" ist too long for which reason I chose to rotate all x-axis labels via `x tick label style = {rotate=90}`. However, it does not look very nice. So maybe some has an idea. (What just came up my mind: I could replace "not rejected" with an "*" and include a note below the figure. No idea how that can be implemented.)   3. **Bar labels** The current y-values represent the absolute occurrence of each element. However, I would like to add the relative occurrence of each element on top of its bar. The information is provided in the last column of the table `EvalAbgelehntePP.dat`. ![bar chart](http://i.stack.imgur.com/UxXrs.png) **MWE**               \documentclass{article}     \usepackage{filecontents}     \usepackage{tikz}     \usepackage{pgfplots,pgfplotstable}           \begin{filecontents}{EvalAbgelehntePP.dat}     Wert    PP  HaeufigkeitAbs  HaeufigkeitRel     1   4   682 61.49684400360685     2   5   630 56.80793507664562     3   7   457 41.2082957619477     4   9   414 37.33092876465284     5   1   403 36.339044183949504     6   8   394 35.527502254283135     7   6   360 32.46167718665464     8   3   268 24.16591523895401     9   2   254 22.90351668169522     10  10  207 18.66546438232642     11  {not rejected}  226 20.378719567177637     \end{filecontents}          \begin{document}          \begin{tikzpicture}      \begin{axis}[          ybar,         xtick={1,...,11},         xticklabels from table = {EvalAbgelehntePP.dat}{PP},         x tick label style = {rotate=90},         xtick align=inside,         xlabel={production programms},         every axis x label/.style={at={(ticklabel cs:0.5)},anchor=near ticklabel},         ylabel=occurrence,         every axis y label/.style={at={(ticklabel cs:0.5)},rotate=90,anchor=near ticklabel}     ]                \addplot[ybar,fill=blue] table [          x=Wert,          y=HaeufigkeitAbs,     ] {EvalAbgelehntePP.dat} ;          \end{axis}      \end{tikzpicture}           \end{document}


title: Paragraph indent in \intertext of align

text: I have the following LaTeX code:               \subsection{andere Ladungsdichte}          Gegeben ist die Ladungsdichte:     \[         \rho\del{\vec r} = - p \delta(x) \delta(y) \delta'(z)     \]          Durch Integration erhalte ich das Potential:     \begin{align*}         \Phi\del{\vec x}         &= - \frac{1}{4 \pi \varepsilon_0} \int_{\mathbb R} \dif x' \int_{\mathbb R} \dif y' \int_{\mathbb R} \dif z'  \frac{\rho\del{x', y', z'}}{\abs{\vec r - \vec r'}} \\         &= - \frac{1}{4 \pi \varepsilon_0} p \int_{\mathbb R} \dif x' \delta\del{x'} \int_{\mathbb R} \dif y' \delta\del{y'} \int_{\mathbb R} \dif z' \frac{\delta'\del{z'}}{\abs{\vec r - \vec r'}} \\         \intertext{             Durch partielle Integration kann ich die Ableitung nach $z$ von der             $\delta$-Distribution auf den inversen Abstand umwälzen.         }     \end{align*}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %                 Trennung der Variablen in Polarkoordinaten                  %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \section{Trennung der Variablen in Polarkoordinaten}      The important stuff in the preamble is this:               \documentclass[11pt, ngerman, fleqn]{article}          \usepackage[a4paper, left=3cm, right=2cm, top=2cm, bottom=2cm]{geometry}     \usepackage[activate]{pdfcprot}     \usepackage[cdot, squaren]{SIunits}     \usepackage[iso]{isodate}     \usepackage[parfill]{parskip}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{babel}     \usepackage{color}     \usepackage{commath}     \usepackage{fancyhdr}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{lastpage}     \usepackage{setspace}     \usepackage{tikz}          \usepackage[charter, greekuppercase=italicized]{mathdesign}      This renders to this using `pdflatex`: ![](http://wstaw.org/m/2012/11/01/latex-edit3.png) How can I get rid of that little spacing in the beginning of the paragraph in the `\intertext` command?


title: Emacs Indentation Problem

text: I started using Emacs/AUCTeX for writing my LaTeX documents. I now have an               \begin{inparaenum}[(1)]       \item An Item       \item an other Item       \item this is an item, too !     \end{inparaenum}      environment. **But I can't indent** the `\item`s nor using the `TAB` Key nor by using the `indent-region` command mentioned here Is it possible to 'auto indent' the LaTeX Code using AUCTeX. **And how do I indent this Code?** _**EDIT:_** This is my `.emacs` file:               (load "auctex.el" nil t t)     (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq TeX-PDF-mode t) ;; .pdf statt .dvi per default:     2;;Zeilenumbruch     ;; Removed to turn off 'auto-fill-mode'     ;;(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)     ;;Syntax Higlight     (add-hook 'LaTeX-mode-hook 'turn-on-font-lock)     ;; Mathe Modus     (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)     ;; Reftex einflechten und laden     (setq reftex-plug-into-AUCTeX t)     (add-hook 'LaTeX-mode-hook 'turn-on-reftex)     ;; Satzende ". " statt ". ". " f¨ur M-k: l¨oschen bis Satzende usw.     (setq sentence-end "[.?!][]\"’)}]*\\($\\| \\| \\)[     ;;]*") ;; Da ist ein "Newline in der Zeile!"     (setq sentence-end-double-space nil)     ;;direkte Rechtschreib Korrektur:     ;;(add-hook 'LaTeX-mode-hook 'flyspell-mode)     ;; Nur benutzen falls Auctex > 11.81 mit preview-latex:     (load "preview-latex.el" nil t t)     ;; aspell ist besser als ispell.     ;; Zeile kommentieren, falls nicht installiert:     (setq-default ispell-program-name "aspell")     ;; Deutsche Rechtschreibung falls \usepackage{ngerman}     ;; oder german benutzt wird     (add-hook 'TeX-language-de-hook     (function (lambda () (ispell-change-dictionary "german8"))))


title: Adding space between subfigures of tikzpicture (for caption)

text: I'm trying to draw two figures next to each others using **tikzpicture**. It's working fine, but the **caption** of the sub-figures is looking weird. I tried adding the \qquad's, but I'm still having the same problem. Here's my code;               \documentclass{article}     \usepackage{tikz,subfigure}     \begin{document}     \begin{figure}[!hb]%     \centering     \subfigure[Caption for subfigure 1]{     \begin{tikzpicture}[every node/.style={circle,draw}]     \node{5};     \end{tikzpicture}     }     \qquad\qquad\qquad     \subfigure[Caption for subfigure 2]{     \begin{tikzpicture}[every node/.style={circle,draw}]     \node{}             child{node{}}             child[missing];     \end{tikzpicture}     }     \caption{}%     \label{}%     \end{figure}          \end{document}      Here's the resulting image ![enter image description here](http://i.stack.imgur.com/Dfkje.jpg)


title: How to combine two dipole and tripoles efficiently in circuitikz?

text: I'm trying to learn how to use `circuitikz` to draw some circuit diagrams. So far it is going pretty well, except that now I've run into a problem when trying combine dipole circuit elements (such as resistors) with tripole elements like operational amplifiers. For example, I would like to attach the inverting input of the amplifier (the negative terminal) at the end of the resistor in the following circuit, as well as attach something to the positive terminal and the output. In my code below, I've managed to do this, but just by guessing the right coordinates for the op amp, and things don't align up nicely. With more op amps, in more complicated circuits, my approach really does not seem to be the most optimal one. Is there a better way of approaching this? Edit: I found this link for a similar question involving transistors: CircuitTikZ - Combine Tripoles with resistors, however I am not sure how to adapt this to my question. How do I know where to place the op amp so that it lines up nicely with the resistors?               \documentclass{article}     \usepackage[american voltages, american currents,siunitx]{circuitikz}     \begin{document}     \begin{circuitikz}     % the voltage source and the resistor        \draw (0,0) node [ground] {} to [V=\SI{1}{V}] (0,3)                          to [R=\SI{1}{k\ohm}] (3,3);          % the opamp        \draw (4,2.5) node [op amp] {};          % the ground at the + terminal        \draw (3,2) to (2.5,2) node [ground] {};          % the output        \draw (5,2.5) to (6,2.5)                      to [R=\SI{1}{k\ohm}] (6,0) node [ground] {};     \end{circuitikz}     \end{document}      ![sample op amp circuit diagram](http://i.stack.imgur.com/3gYud.jpg)


title: `pdfbookmark` for table of contents points to previous page

text: In my thesis, I'm using the `book` class as such:               \documentclass[a4paper,12pt,twoside,openright]{book}     \usepackage[bookmarks=true,         bookmarksopen,         bookmarksopenlevel=1,         colorlinks=true,         pagebackref     ]{hyperref}     \frontmatter     \begin{titlepage}     %\input{tex/universitytitlepage.tex}     \end{titlepage}          \pdfbookmark[0]{Table of Contents}{sumario_label}\tableofcontents          \mainmatter     \openright     %\include{tex/stuff}     \end{document}      But the "Table of contents" bookmark in the PDF points to the blank page after the titlepage instead ofthe TOC page. Any idea on how to make it point to the start of the TOC page, not the page before it?


title: Creating Macros for Math Text

text: The built-in commands for text in math mode, such as `\sup`, are formatted very nicely. How can I define a macro for some short text that is to appear multiple times in math mode (such as "diam"), so that it mimics the formatting of something like `\sup`?


title: .htf for Chinese utf8 fonts other than unisong*

text: In continue with this question: Producing html for Chinese documents with Tex4Ht Tex4Ht requires .htf fonts for converting Chinese documents. I've managed to make all the `unisong*.htf` fonts work thanks to the answer to the previous question, but the default TexLive 2011 installation doesn't seem to contain htf fonts for simhei, simkai, and all other Chinese fonts. Is there a place where I can download them, or how do I generate them if I can?


title: LPeg self-referential pattern

text: I am trying to create a self-referential pattern in lua/lpeg               local group = lpeg.P(sep1 * (1 - sep2)^0 * group^0 * sep2)      notice that group refers to itself. This is not possible since group is undefined. lpeg.V does not work outside a grammar definition. Is there any way to solve this chicken and egg problem?


title: consistent math font size in a formula

text: I have a math formula, having three underbraces, enclosing three expressions, with explanations below each brace, explaining what that quantity is. Since these expressions, as well as their explanations, have different widths and heights, LaTeX automatically adjusts the math font sizes. I want to prevent this so that the expressions above each brace have the same size, regardless of how big the brace is extended. How can I ensure a consistent math font size in a formula?               \documentclass{standalone}          \usepackage{tikz,amsmath}     \usetikzlibrary{positioning}               \begin{document}          \begin{tikzpicture}[>=stealth]               \node (a) at (0,0) {$\frac{\partial y}{\partial t}=\underbrace{\frac{AAA}{BB}}_{ Text 1}+     \underbrace{YYY}_{Text 2}+\underbrace{ZZZ}_{Text 3}$     };               \end{tikzpicture}          \end{document}


title: Angle brackets in non-math-mode text

text: Is there a way to directly input angle brackets into text without resorting to math-mode symbols? I'd like to correctly indicate orthography in a linguistics paper, and have been resorting to single guillemots ‹ › as they are simple to type and display correctly. But I'd prefer to use angle brackets like ⟨ ⟩ . If I input these directly (U+27E8 and U+27E9), they don't display correctly—I prefer the Linux Libertine font family—but `$\langle$` `$\rangle$` display just fine. As the rest of my document(s) use UTF-8 and `fontspec`, I'd prefer not to clutter up the body text with math commands. Is there a way around this?


title: How to left align the element when usig begin align, not the whole equation?

text: I am using begin align command and want to left align my equation. I learned that using `flalign` I can left align the whole equation. But this is not what I need now. I want to left align my equation "componentwisely". The following is what I have typed. and the right hand sides are automatically right- aligned. How can I fix this?               \begin{align*}     \frac{\partial f}{\partial v^j}&=&\frac{\partial f}{\partial u^l}\frac{\partial u^l}{\partial v^j}\\     \frac{\partial^2f}{\partial v^j\partial v^i}&=&\frac{\partial^2 f}{\partial u^l\partial u^m}\frac{\partial u^m}{\partial v^i}\frac{\partial u^l}{\partial v^j}+\frac{\partial f}{\partial u^l}\frac{\partial^2u^l}{\partial v^j\partial v^i}     \end{align*}      Pictorial description. I want to change 1 to appear like 2.               1.(right aligned right hand side)     _________________________     aa= aaaaaaaaaaa          aa=        aaaa     _________________________     2.(left aligned right hand side)     _________________________     aa= aaaaaaaaaaa          aa= aaaa      * * *


title: Change margins in a0poster class

text: I want to make a poster using the a0poster package. I want to modify the text margins, so the text should be wider. I'm using boxes in a portrait, three column poster, but I have problem trying to get boxes bigger (one white page and after the text). Thanks


title: Lower indices height

text: Adding a subscript to a dagged variable, the subscript is lower than when it is added to an undagged variable. Here's an example:               $c^{\dagger}_R c_R c^{\dagger}_R c_R c^{\dagger}_R c_R c^{\dagger}_R c_R $      I tried to solve the problem using `subdepth` package but it doesn't work. I also tried an awkward solution with dummy upper indices:               $c^{\dagger}_R c^{}_R c^{\dagger}_R c^{}_R c^{\dagger}_R c^{}_R c^{\dagger}_R c^{}_R $      but still doesn't work. I'd like to have all the "R" subscripts at the same height; possibly I'd like to lower the subscripts of the undagged variable at the height of the dagged ones.


title: vertically centered dot

text: I want to have a function name (like g(.)) and I do this in this ways:   1. `$g \left( . \right)$`   2. `$g(.)$` But in either way, the dot "." seems a little lower than it is better to be. I am wondering if there is another way to have this output? (this may seem so basic but when I saw that writing three consecutive dots has its own command, I doubted may be I am doing it wrong)


title: adding vc to restricted write18 list

text: I want to use the vc bundle to add version information to my files. I'd like to go the "write18" route, rather than the makefile route, for now at least. I believe to make it work, I need to allow the vc script to run. TeXlive has a restricted write18 list, of commands that can be run. (I believe I've understood this correctly...) So my question is: how do I the `vc` script to this list? I'm on ubuntu 10.10 with the packaged version of TeXlive 2009. I think I found the right file, in `/etc/texmf/texmf.d/95NonPath.cnf` but it is write only. So before I `sudo emacs` it, I wanted to check I am doing the right thing. Is there a way I could keep my configuration files I've changed in my `~/texmf` tree? I could just emacs-fu my way to automatically have vc run, but I'd rather have a write18 solution... So here's the relevant part of my preamble:               \immediate\write18{sh ./vc}     \input{vc}      I have tried adding `vc` to the `shell_escape_commands` list in `/etc/texmf/texmf.d/95NonPath.cnf` but this didn't work. `kpsewhich -expand- var '$shell_escape_commands'` still doesn't list it. So I add `vc` directly into `/usr/share/texmf/web2c/texmf.cnf` but this doesn't work either. I don't think I can add `sh ./vc` to the shell escape list, since I'm not allowed spaces in that list right? Would adding `sh` to the list work? Is that a good idea? I'm pretty sure that would be dangerous...


title: Vertically center itemize when using beamer `\only`

text: For a presentation I want to show how an equation is simplified in steps. When I try to do this using `\only`, the text jumps around vertically. Minimal failing example:               \documentclass[11pt]{beamer}     \begin{document}          \begin{frame}     \begin{itemize}     \item<1|only@1> Curvature term drops in 2d:     \begin{equation*}     S = \frac{1}{16 \pi G} \int d^{n}x \sqrt{-\det g} (R - 2 \Lambda)     \end{equation*}          \item<2|only@2> $\Lambda$ is constant:     \begin{equation*}     S = \frac{1}{16 \pi G} \int d^{n}x \sqrt{-\det g} (- 2 \Lambda)     \end{equation*}          \item<3|only@3> Rescale cosmological constant:     \begin{equation*}     S = \frac{-2\Lambda}{16 \pi G} \int d^{n}x \sqrt{-\det g}     \end{equation*}          \item<4|only@4> Integral over space:     \begin{equation*}     S = - \lambda \int d^{n}x \sqrt{-\det g}     \end{equation*}          \end{itemize}          \end{frame}          \end{document}      How can I fix this? Is there a better way to get a similar effect, without using `\only`?


title: Latest Version of BlueSky Textures for Mac

text: I've been a user of Textures since about 1987. I actually used it to prepare my dissertation for a Ph.D. I've continually updated it since and sorry to see it disappear from the scene TEX scene. I currently have a registered version 2.2.0.16b16, but I understand there is a later version (b18) with a few bug fixes. Is there somewhere I can get a copy of the most up-to-date version?


title: How to write a \newenvironment with a conditional structure and one optional parameter

text: I would like to define a new environment with an optional parameter. Currently, I have               \theoremstyle{plain}     \newtheorem{prop}{Proposition}     \newenvironment{propExt}[1][]{\ifx!#1! \begin{prop}      \else \begin{prop}(Proof in \ref{#1})}      {\end{prop}}      When I put the optional argument, everything works fine, e.g.               \begin{propExt}[label_name]      However, with no argument, `\begin{propExt}`, I have the error message               ! Incomplete \ifx; all text was ignored after line 283.      I think the problem comes from the fact that `\end{prop}` is not executed if there is no argument specified, as it follows `\else` How should I do?


title: LaTexing vs LaTexTools (Sublime text plugins)

text: I want to use sublime as my default IDE for TeX (currently I'm using Latex Studio). I've found two great packages:   1. LaTexTools   2. LaTexing Both has somehow the same list of features but LaTeXing seems to have extra feature and hassle free (is it correct?). It seems support better auto complete features (esp. the citation) and better multiple PDF viewer compatibility and larger snippets (I might be wrong). In another side, LaTexTools seems to have much larger user community and It's open source and again seems to have lots of primary features that LaTeXing has. LaTeXing isn't free (15$/user) but it has free unlimited trial and seems closed source and premium support. I searched the web for comparison between these two, but I didn't find any proper thread. I think it could be beneficial for the users to have a good review and comparison between these two packages (to save time). What is the key differences/features between the two? p.s.   * I'm using Linux vs ST3 ( LaTexTools didn't support ST3 some month ago and the choice was easier).   * I sometimes work with XeTeX and I like to switch to LuaTeX in the future so build systems are essential.   * I like to create TeX documents as projects and some times the projects are large so go to anything and auto complete the file names are quite handy


title: Baseline shift with fontspec?

text: Is there a way to manually adjust the vertical position of a font using fontspec (in XeLaTeX)? Such a feature would be quite useful when typesetting Asian text, since different font vendors often place Asian characters at different vertical positions.


title: Tiny gaps in large parentheses in PDF

text: This is bugging me for years: When having large parentheses in LaTeX, the output file seems to contain little holes in the parentheses. It is not a big deal, but it's one of the areas, where LaTeX's output is not perfect. The problem is best seen in an example:               \documentclass{article}     \usepackage{amsmath}     \begin{document}         \[\left(\frac{a}{b}\right)\]         \[\left(\frac{\frac{\frac{a}{b}}{\frac{a}{b}}}{\frac{a}{b}}\right)\]     \end{document}      ![enter image description here](http://i.stack.imgur.com/iQhGi.png) Please note, that the small parenthesis looks perfect, whereas the large parenthesis contains some gray pixels, as can be seen in the zoomed version.![enter image description here](http://i.stack.imgur.com/8ldpL.png) Does anyone know where these error pixels come from? I have seen these errors in other peoples' formulas, too, so I think this bug is not only present on my system. Is it related to the viewer? I think I have seen the problem in printed documents, so this again seems to be unlikely. Any idea how to locate and fix the problem?


title: Two images are not on the same level

text: I am using the following code to put two figures next to each other (I am not providing a minimal example right away, because maybe the problem is obvious from the code. However, I will, if someone needs one!):               \begin{figure}[h]     \begin{minipage}[h]{0.5\linewidth}     \centering     \includegraphics[width=\linewidth]{pdfexp.png}     \caption{Dichte der Exponential-Verteilung für  $a=0.5,\ \frac{1}{3},\ \frac{1}{5},\ \frac{1}{1000}.$}     \end{minipage}     \hspace{0.5cm}     \begin{minipage}[h]{0.5\linewidth}     \centering     \includegraphics[width=\linewidth]{cdfexp.png}     \caption{Verteilungsfunktion der Exponential-Verteilung für $a=0.5,\ \frac{1}{3},\ \frac{1}{5},\ \frac{1}{1000}$.}     \end{minipage}     \end{figure}      This produces: ![Image](http://i.stack.imgur.com/xTwUk.png) The images are of the same size, but the axes are not at the same base level. The axes from the right figure are put higher than the ones of the left figure. Why is this happening?


title: Resume visually separated

text: I'd like to separate professional experiences in my resume in such a way that each part are visually surrounded like this: ![enter image description here](http://i.stack.imgur.com/GCyAe.png) So :   1. is there a package to have header like this (date + Company + title)   2. and after the items list, the tab with presentation    3. all of this represent each an experience that should be surrounded. I've seen that tikz could do this but I'm not so used to do this.


title: \def taking next word as argument?

text: This question is a variant of my previous question requesting a macro that takes the rest of the line as argument. I would like to write a macro that would take the next word as argument, where word boundary is defined as a space or punctuation (say anything which is not a letter, a digit, or the colon character). The difficulty lies with the fact that a normal `\def` can be set to expect a specific character, not a set of characters. This is not a theoretical challenge---the concrete application is a macro that will do better references, so instead of writing `Lemma~\cite{Lemma:Kantor}`, one could write `\cf Lemma Kantor` An approximation is               \def\cf #1 #2 {#1~\ref{#1:#2}}      but of course it would fail in cases it is used just before punctuation.


title: Using a single symbol from an MnSymb package

text: I often face the following problem: I need just a single symbol from a package (currently `\equalclosed` from `MnSymbol`), however loading the whole package causes certain problems with already loaded ones (ams packages in my case). As far as I understood from answers to this question, there is no general solution for this problem. In my particular case, is there a ny short way to use `\equalclosed` or shall I study the structure of the MnSymbol package?


title: Moving title to header

text: I am trying to write a new class file for forms. I wish to redefine title so that it occurs inside `\rhead{}` (using the `fancyhdr` class). This is not a query about `\markboth` or anything like that. How would one go about redefining it?


title: How to create two series of align equations in the same document?

text: This question is similar to a previous question about how to create two series of numbered equations in the same document. However, the proposed solution doesn't work for my question, because it increments the counter once in the environment. Instead, I need a solution that works with the `align` environment. So, how can I work with two series of equation numbers using the align environment? For example I need environments `alignA` and `alignB` that allow me to write:               \begin{alignA}       x &= 2*y \\         &= 3*z     \end{alignA}          \begin{alignB}       u &= 4*v \\         &= 5*w     \end{alignB}      That outputs equation numbers A1, A2, B1 and B2.


title: IEEEtranSN + natbib and @masterthesis

text: I'm using `natbib` along with `bibliographystyle{IEEEtranSN}`. Everything works great, but when I'm trying to add an @masterthesis entry, I get the following warning: > Warning--entry type for "tarzan2013" isn't style-defined. I have tried changing @masterthesis for @thesis and I still get the same warning. I've looked in the IEEEtrans_bst_HOWTO, and it seems @masterthesis is supported. Why am I having this warning then? My entry looks like this:               @masterthesis{tarzan2013,       title={My monkey and some other stuff},       author={Tarzan de la Vega},       year={2012},       school={The jungle and others}     }


title: Display beamer with timer and notes

text: I manage to create a really nice beamer template and notes. I can create 2 pdfs: one with slides, one with notes. Now, I just need a dual screen pdf viewer that displays the slides in one screen and the notes in other screen and a **timer**. I need it for **Mac**. Before mark as duplicated, I show off the collection of answers: http://impressive.sourceforge.net/ https://code.google.com/p/splitshow/ https://github.com/TrilbyWhite/Slider http://pympress.org/ http://impressive.sourceforge.net/ Does anyone know a better option for Mac? I don't find any acceptable solution :( Keynote is, until now, the only acceptable but requires to copy the comments...


title: mindmap not working with calendar

text: Following the Tikz & Pgf manual, the tutorial on mindmaps - after adding calendar, the mindmaps are gone! Does anyone have the full LaTeX code for these examples? It is really frustrating... Here is my code:               \documentclass{article}%     \usepackage{tikz}     \usetikzlibrary{mindmap, trees, calendar, shadows, backgrounds, calendar}          % Define macro for annotations     % #1 - number of the lecture     % #2 - name of the lecture     % #3 - positioning options, like 'above'     % #4 - position where node is placed     % #5 - list of items to be shown     % #6 - date when the lecture will be held     \def\lecture#1#2#3#4#5#6{         \node[annotation, #3, scale=0.65, text width=4cm, inner sep=2mm] at (#4) {             Lecture #1: \textcolor{orange}{\textbf{#2}}             \list{--}{\topsep=2pt\itemsep=0pt\parsep=0pt             \parskip=0pt\labelwidth=8pt\leftmargin=8pt             \itemindent=0pt\labelsep=2pt}             #5             \endlist         };         % Place in calendar         \node [anchor=base west] at (cal-#6.base east) {\textcolor{orange}{\textbf{#2}}};     }          \begin{document}     \noindent     \begin{tikzpicture}         \begin{scope}[mindmap,             % set every node to be a concept node!             every node/.style ={concept, circular drop shadow, execute at begin node=\hskip0pt},             root concept/.append style={concept color=black, line width=1ex, fill=white, text=black, font=\large\scshape},             text=white,             % define different colors             styleA/.style={concept color=red,faded/.style={concept color=red!50}},             styleB/.style={concept color=blue,faded/.style={concept color=blue!50}},             styleC/.style={concept color=orange,faded/.style={concept color=orange!50}},             styleD/.style={concept color=green!50!black,faded/.style={concept color=green!50!black!50}},             grow cyclic,             level 1/.append style={level distance=4.5cm, sibling angle=90},             level 2/.append style={level distance=3cm, sibling angle=45, font=\scriptsize}         ]         \node [root concept]  (CompSci) {CompSci} % root             child [styleA] { node (Hard Ware) {Hard Ware}                         child {node {nodes} }                         child [faded] {node {in} }                         child {node {first} }                         child {node {tree} }             }             child [styleB] { node (Lower Part) {Lower Part}                     child {node {nodes} }                     child {node {in} }                     child [faded] {node {first} }                     child {node {tree} }             }             child [styleC] { node (Robot) {Robot}                     child {node {nodes} }                     child [faded] {node {in} }                     child {node {first} }                     child {node {tree} }             }             child [styleD] { node (Head) {Head}                         child [faded] {node {secondary} }                         child {node {tree} }                         child {node {nodes} }             };              \end{scope}              % Calendar         \tiny         \calendar [day list downward,                     month text=\% mt\ \%y0,                     month yshift=3.5em,                     name=cal,                     at={(-5.\textwidth-5mm,.5\textheight-1cm)},                     dates=2009-04-01 to 2009-05-last]         if (weekend)             [black!25];         if (day of month=1){             \node at (0pt,1.5em) [anchor=base west] {\small\tikzmonthtext};         };              \lecture{1}{Hardware topics}{above,xshift=-3mm}         {Hard Ware.north}         {             \item Hardware introduction             \item Blah introduction             \item More blah introduction         }{2009-04-08}              \begin{pgfonlayer}{background}             % Clip the background so as not to enlarge the page             \clip[xshift=-1cm] (-.5\textwidth,-.5\textheight) rectangle ++(\textwidth,\textheight);             \colorlet{upperleft}{green!50!black!25}             \colorlet{upperright}{orange!25}             \colorlet{lowerleft}{red!25}             \colorlet{lowerright}{blue!25}             % The large rectangles             \fill [upperleft] (CompSci) rectangle ++ (-20, 20);             \fill [upperright] (CompSci) rectangle ++(20, 20);             \fill [lowerleft] (CompSci) rectangle ++(-20, -20);             \fill [lowerright] (CompSci) rectangle ++(20, -20);                  % the shadings             \shade [left color=upperleft,right color=upperright]                 ([xshift=-1cm]CompSci) rectangle ++(2,20);             \shade [left color=lowerleft, right color=lowerright]                 ([xshift=-1cm]CompSci) rectangle ++(2, -20);             \shade [top color=upperleft,bottom color=lowerleft]                 ([yshift=-1cm]CompSci) rectangle ++(-20, 2);             \shade [top color=upperright, bottom color=lowerright]                 ([yshift=-1cm]CompSci) rectangle ++(20,2);         \end{pgfonlayer}          \end{tikzpicture}     \end{document}      And here is the output: ![empty output](http://i.stack.imgur.com/Urnad.png)


title: Error persists after removing the code

text: I accidentally added an erroneous backslash to a code in the equation environment. Even after removing it - in fact even after removing the whole line - the error persists.               ! Undefined control sequence.     l.176 \rho^2 = \sum_{i,j} \p                                 _i \rho_i p_j \rho_j     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Double subscript.     l.176 \rho^2 = \sum_{i,j} \p_                                  i \rho_i p_j \rho_j     I treat `x_1_2' essentially like `x_1{}_2'.      My mistake was the backslash in front of 'p_i', which is indeed an undefined control sequence. ~~Apparently this also causes a mysterious instance of a double subscript.~~ Strangly, I still get this exact error if my document ends at line 171. I tried deleting the .aux files and renaming the main.tex file as suggested here, but that didn't fix it. I am using ShareLaTeX; is this a known problem? EDIT: The PDF output also keeps the erroneous line after removing the offending code. Any edits to the previous code or new additions are not shown.


title: How to adust margin in listoftheorem

text: I have some definitions and theorems inside subsubsubsection. When latex generates the listoftheorems, the last digit of the subsubsubsection overlaps the first letter of the name of the theorem, definition, etc. How could I adjust the space between the number of the definitions and its label when I am generating the list of theorems using \listoftheorem of the package thmtools Thanks, Here is the example:               \documentclass{article}               \usepackage{amsthm}     \usepackage{thmtools}     \usepackage{xcolor}          \declaretheoremstyle[                 spaceabove=6pt,                  spacebelow=6pt,                 headfont=\normalfont\bfseries,                 notefont=\mdseries,            %da ainda para incluir outros argumentos, como \color{red},                  notebraces={(}{)},                 bodyfont=\normalfont\itshape,                 postheadspace=\newline,                 numberwithin=subsubsection,                 shaded={rulecolor=black,                             rulewidth=.4pt,                              bgcolor=grey!20}]{defStyle}     \declaretheorem[name=Definition,style=defStyle]{definition}     %=================================================          \begin{document}     \listoftheorems               \section{First}         \subsection{First}           \subsubsection{First}           \end{subsection}           \subsubsection{Second}                     \begin{definition}[name]                      adslkjafhsldfkh asdfhkh adfadsfa $f(x)$                     \end{definition}             \end{subsection}             \end{subsection}       \end{subsubsection}          \end{section}          \end{document}


title: Problem with gnuplot

text: [fr] La 1ere figure ci-dessous permet de représenter la conversion analogique numérique avec `\NN` le nombre de niveaux, réalisée avec le code suivant (il faut autoriser gnuplot). Comme vous pouvez le constater, la deuxième figure n'est pas complète, la seule différence est dans l'appel de la fonction, dans la seconde, j'ai généralisée en précisant `\NN` [en] The first figure below is used to represent the analog to digital conversion with `\NN` the number of levels, performed with the following code (you have to allow gnuplot). As you can see, the second figure is not complete, the only difference is in the function call in the second, I generalized by specifying `\NN`               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning,fit}          \begin{document}               \begin{tikzpicture}     \def\NN{16}     \begin{scope}[xscale=6,yscale=2]     \draw[draw=red,,fill=pink] plot[id=sin9c,prefix=gnuplot/,domain=0:2,samples=60,     ybar interval]      function{0.25*floor(\NN/4*(sin(4*x)+0.5*sin(20*x)+0.05*sin(200*x)+0.03*sin(400*x)+2))};     \draw[color=blue,thick] plot[id=sin7c,prefix=gnuplot/,domain=0:2,samples=1000,thick]      function{sin(4*x)+0.5*sin(20*x)+0.05*sin(200*x)+0.03*sin(400*x)+2};     \foreach \nn in{0,1,2,...,\NN}{     \draw (0,{2*\nn/(\NN/2)}) node[left]{\small \nn}-- (2,{2*\nn/(\NN/2)});     }     \draw (0,0) -- (0,4);     \end{scope}     \end{tikzpicture}               \begin{tikzpicture}     \def\NN{16}     \begin{scope}[xscale=6,yscale=2]     \draw[draw=red,,fill=pink] plot[id=sin9c,prefix=gnuplot/,domain=0:2,samples=60,     ybar interval]      function{4/\NN*floor(\NN/4*(sin(4*x)+0.5*sin(20*x)+0.05*sin(200*x)     +0.03*sin(400*x)+2))};     \draw[color=blue,thick] plot[id=sin7c,prefix=gnuplot/,domain=0:2,samples=1000,thick]      function{sin(4*x)+0.5*sin(20*x)+0.05*sin(200*x)+0.03*sin(400*x)+2};     \foreach \nn in{0,1,2,...,\NN}{     \draw (0,{2*\nn/(\NN/2)}) node[left]{\small \nn}-- (2,{2*\nn/(\NN/2)});     }     \draw (0,0) -- (0,4);     \end{scope}     \end{tikzpicture}               \end{document}      ![enter image description here](http://i.stack.imgur.com/e4ZZ8.jpg) Comment faire pour obtenir la courbe? / How to obtain the curve?


title: Parenthesis problem in Xelatex

text: The number parenthesis `()` scuh as `(1)` `(2)` etc disappear when compiled on xelatex/polyglossia. Adding space character inside the parenthesis is not a solution in my case. So need your help desperately. MWE:               \documentclass[10pt,a4paper]{article}     \usepackage[quiet]{polyglossia}     \setmainlanguage{english}     \setotherlanguage{arabic}     \usepackage{geometry}          \geometry{hmargin={0.04in,0.04in}, vmargin={0.04in,0.03in}, paperwidth=81mm, paperheight=105mm}     \newfontfamily\arabicfont[Script=Arabic, Scale=0.8]{Tahoma}          \begin{document}     \centering          \textarabic{نتبينت (9) نتيسن}      % Parenthesis with number in it is ignored.          \begin{Arabic}     نتبينت (9) نتيسن     \end{Arabic}     % Parenthesis with number in it is ignored.          %However following works:          \begin{Arabic}     نتبينت ( 9 ) نتيسن     \end{Arabic}          \end{document}


title: Font is not embedded

text: I need to create pdf file with all fonts embedded (from tex source). But, as I understood, the most common fonts are not embedded by default. Therefore I have problems: ? 8 Error Font Times-Bold is not embedded ? 8 Error Font Helvetica is not embedded ? 8 Error Font Symbol is not embedded ? 8 Error Font Helvetica-Bold is not embedded How to avoid this? I imagine three ways:   1. Avoid using this fonts. But they are default and used automatically. I have no font options.   2. Create dvi and convert to pdf. But I can't really convert my images (saved in pdf format) into ps or eps. I use convert command in linux and they converted incorrectly.   3. Set some option to latex. Logic tells that such an option Has to exist. What is it? Please, help me to avoid these errors.


title: First letter of first paragaph of a section with a different font

text: The problem is that every first letter of the first paragaph in a section is in a different font than the rest. The O's for example are a lot slimmer than the rest, and this is really bad for me, visually. How can I avoid this?               \documentclass[a4paper,12pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[brazil]{babel}     \usepackage{indentfirst}          \begin{document}          \section{Introd}     \begin{texttt}     O ter yuio paos wqepo ,kert ekjt elkrt . \\          Osd oeir qowie sajd eoir qwpeo eori lqwjer.          \end{texttt}          \end{document}      ![Strange O, good O](http://i.stack.imgur.com/bhlJM.png)


title: Separated Authorship by Affiliation

text: I need to make my paper look exactly like this, but I'm not sure of the syntax to do it. It's certainly not standard format. Any thoughts? ![enter image description here](http://i.stack.imgur.com/fVPgg.png)


title: \fxnote won't be suggested as a command in TeXstudio

text: I have a problem wit the `fixme` package, I can get it to work, but it wont be suggested as a command. I know that it works because when I write `\fxnote{something}` it compiles without a problem. I have made sure that I got it as an `.cwl` file in the correct folder and in the TeXstudio editor (the on I use) I have forced it to be recognized as an command. I have uploaded some screenshots that shows what I have written above: ![enter image description here](http://i.stack.imgur.com/gXuNV.png) Can anyone help without suggesting that I change editor? I really like TeXstudio?


title: TikZ & External: figure re-created for no apparent reason

text: I'm having an issue where only one out of multiple figures is recreated despite the use of the `tikz/external` library. I've created a MWE which shows the same effect with only two figures. Below is my main file which is compiled with `pdflatex -shell-escape file`.               \documentclass{article}          \usepackage{tikz,pgfplots,tikzscale}     \usetikzlibrary{external}     \tikzexternalize[prefix=figures/]     \pgfplotsset{compat=newest}     \graphicspath{ {./figures/}{./figures-tikz/} }          \newcommand{\figFilename}{}          \begin{document}       \begin{figure}[t!]         \renewcommand{\figFilename}{scalability-plot-all-sbb-2-optima}         \centering         \tikzpicturedependsonfile{\figFilename.tikz}         \tikzsetnextfilename{\figFilename}         \includegraphics[width=\textwidth,axisratio=1]{\figFilename.tikz}         \caption{Scalability plot for dDE, MPC, dDE$^-$ and a hill climber on the Scalable-Building-Block problem.}         \label{fig:\figFilename}       \end{figure}            \begin{figure}[t!]         \renewcommand{\figFilename}{scalability-plot-all-sbb-2-optima-log-y}         \centering         \tikzpicturedependsonfile{\figFilename.tikz}         \tikzsetnextfilename{\figFilename}         \includegraphics[width=\textwidth,axisratio=1]{\figFilename.tikz}         \caption{Same as in Figure~\ref{fig:scalability-plot-all-sbb-2-optima}, but y axis is in logscale.}         \label{fig:\figFilename}       \end{figure}     \end{document}      The first figure is re-created every time I run `pdflatex`. I tried changing the ordering of the two, but it does not make a difference --- the figure with the filename `scalability-plot-all-sbb-2-optima` is the one that's always re- created even though the other figure is identical but with a `semilogyaxis` instead. The `TikZ` files for both are merely five `addplot` commands which load data from five different .dat files. Showing everything here would take up a lot of space, so here's a link to the whole directory structure, including the `.tex`, `.tikz` and `.dat` files. I've found that if I keep only one addplot, the figure is not re-created. I was wondering whether this is a bug, whether `LaTeX` is confused by my directory structure, or whether it's simply a mistake on my part.


title: Is it possible to exit from the PostScript expression and abort the drawing?

text: I just want to draw a dot if the condition is satisfied and otherwise cancel the drawing of the single dot. The following code is the simplified version of my real scenario. Please don't suggest other methods because the part I want to learn is to abort drawing. The code below is intended to draw a dot for each point on the x-axis whenever its abscissa is an even number. More precisely, there is no dot for odd abscissa.               \documentclass[pstricks,border=12pt,12pt]{standalone}     \usepackage{multido}     \SpecialCoor     \begin{document}     \begin{pspicture}[showgrid](-5,-5)(5,5)         \multido{\i=-5+1}{11}{\qdisk(!\i\space 2 mod 0 eq {\i\space 0} {<don't draw a dot and continue the loop>} ifelse){2pt}}     \end{pspicture}     \end{document}      Is it possible to exit from the PostScript expression and abort the drawing just for certain dots that do not match the condition? ## Edit I want to get a solution that is useful not only for `qdisk` but also other graphic macros including the starred version.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \SpecialCoor          \begin{document}     % Herbert's method     \begin{pspicture}[showgrid](10,4)         \multido{\i=1+1}{9}         {             \pscircle*(!\i\space dup 2 mod 0 ne {/SD {pop pop pop} def} if 1){5pt}             \pscircle(!\i\space dup 2 mod 0 ne {/SD {pop pop pop} def} if 3){5pt}         }     \end{pspicture}          % modified Herbert's method     \begin{pspicture}[showgrid](10,4)         \multido{\i=1+1}{9}         {             \pscircle*(!\i\space dup 2 mod 0 ne {/SD {} def} if 1){5pt}             \pscircle(!\i\space dup 2 mod 0 ne {/SD {} def} if 3){5pt}         }     \end{pspicture}          % modified AlexG's method     \begin{pspicture}[showgrid](10,4)         \multido{\i=1+1}{9}         {             \pscircle*(!\i\space dup 2 mod 0 ne {mark Rand Rand /SD {cleartomark} def} if 1){5pt}             \pscircle(!\i\space dup 2 mod 0 ne {mark Rand Rand /SD {cleartomark} def} if 3){5pt}         }     \end{pspicture}          % my attempt with other macros     \begin{pspicture}[showgrid](10,4)         \multido{\i=1+1}{9}         {             % compilable but result in a wrong output             \psframe                 (!\i\space dup 2 mod 0 ne {/SD {pop pop pop} def} if .2 sub 2.8)                 (!\i\space dup 2 mod 0 ne {/SD {pop pop pop} def} if .2 add 3.2)             %--------------------------------------------------------------------------------             % does not compile with  GhostScript             %\psframe                 %(!\i\space dup 2 mod 0 ne {mark Rand Rand /SD {cleartomark} def} if .2 sub 2.8)                 %(!\i\space dup 2 mod 0 ne {mark Rand Rand /SD {cleartomark} def} if .2 add 3.2)         }     \end{pspicture}     \end{document}      Outputs in the same order. ![enter image description here](http://i.stack.imgur.com/AziM9.png) ![enter image description here](http://i.stack.imgur.com/6cyE2.png) ![enter image description here](http://i.stack.imgur.com/YsqFF.png) ![enter image description here](http://i.stack.imgur.com/b5AxB.png)


title: Making an array in the Table

text: So we have an Table and there is an array which we wish to have it in the Table: Here is the code               \documentclass[onecolumn,amsmath,amssymb,nofootinbib,superscriptaddress,floatfix]{revtex4}     \begin{document}                    \begin{table}[!h]     \begin{tabular}{|c ||c| c| c| c|}        \hline     $d$ \; & \;  $Z$  & \; $UZ1$ & \; $UZ2$ & \; $U$\\                      \; & \;   & \;       \;   & \;       \;   & \;   \\ \hline             $d=1$    \; & \; $S_1=\int x_1{}^2$,    & \;  $Y_3=\int y_3{}^2$,       \;   & \;       \;   & \;  \\                   \; & \;  $S_2=\int x_2{}^2$  & \;   $G_4=\int g_4{}^2$    \;   & \;    \;   & \;   \\   \cline{2-5}                              \; & \multicolumn{4}{l|}{$S1, S2, S3, \dots$ }  \\   \hline         $d=2$       \; & \;   & \;       \;   & \;     \;   & \;   \\                       \; & \;   & \;       \;   & \;    \;   & \;   \\   \hline          \end{tabular}     \caption{}     \end{table}                $$      \left\{       \begin{array}{ll}       S_1=\int x_1{}^2,\\      S_2=\int x_2{}^2        \end{array}  \right.      $$                    \end{document}      We have the array outside the Table I: ![enter image description here](http://i.stack.imgur.com/q42ok.png) > **Question:** What we wish is that to put this array form:               $$\left\{           \begin{array}{ll}           S_1=\int x_1{}^2,\\          S_2=\int x_2{}^2            \end{array}  \right.          $$      into the table, which **a single array exactly joins the two command lines** $S_1=\int x_1{}^2$, $S_2=\int x_2{}^2$ together inside the table. How to do that? While we keep $Y3$ and $G_4$ separated not joined by another array.


title: \marginpar trick: not considered as float

text: I've found on the net a useful trick that does exactly what the title says. This is the code:               \newcommand{\mymarginpar}[1]{%     \vadjust{\smash{\llap{\parbox[t]{\marginparwidth}{#1}\kern\marginparsep}}}}      It works fine, the only problem is that the note is created in the left margin. Is it possible to put it in the right margin instead?


title: Full citation of sources using Bibtex/Biblatex

text: For a scientific paper I am writing in school I need to use a custom style of citation. I would like to add the source to a paragraph by adding a footnode and putting all necessary information inside the footnote. So I add my footnote to the paragraphe and in the footnote should be something like `firstname of publisher, lastname of publisher, bookname, title of the essay in it, author of the essay, page etc`. And if I used an website as a source there should be something like `author, url, page, date you accessed the source last`. Because I will have to list a big amount of sources for this work I would like to use a central file for recording my sources. I am quite new to LaTeX so I am open to recommendations for any other kind of citation system then BibTeX/BibLaTeX. **Update 1** Here is an example for some internet sources without an author. Unfortunately the page is also missing. ![Example for citation](http://i.stack.imgur.com/AWIMt.png)


title: TikZ: Combining multiple paths in and outside foreach

text: I am trying to generate a path from a list of directions (as seen on the numpad). The coordinates are generated correctly, but because I use multiple call to \path the arrowheads are drawn on each segment. How do I change this code to only draw the starting arrowhead on the first segment and the ending arrowhead on the last segment? I have unsuccessfully tried to have one \path outside the \foreach and only coordinates inside. edit: It should work for any arrow shape passed in the optional argument. ![enter image description here](http://i.stack.imgur.com/2Ueqf.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}          \newcommand{\directedPath}[5][]     {       \edef\start{#2}       \edef\stop{#3}       \edef\step{#4}       \edef\directions{#5}       \coordinate (c0) at (\start);       \foreach [var=\dir, count=\cur] in \directions       {         % current coordinate dx         \pgfmathparse{(1-(1-1/sqrt(2))*mod(\dir, 2))*\step*(mod(\dir-1, 3)-1)}         \edef\dx{\pgfmathresult}         % current coordinate dy         \pgfmathparse{(1-(1-1/sqrt(2))*mod(\dir, 2))*\step*(div(\dir-1, 3)-1)}         \edef\dy{\pgfmathresult}         % previous coordinate index         \pgfmathparse{int(\cur - 1)}         \xdef\prev{\pgfmathresult}         % current coordinate         \coordinate (c\cur) at ($(c\prev) + (\dx, \dy)$);         % draw partial path         \ifnum \cur>1           \path [#1] (c\prev) -- (c\cur);         \fi       }       \path [#1] (\start) -- (c1);       \path [#1] (c\cur) -- (\stop);     }          \begin{document}          \begin{tikzpicture}       \node [draw=green] (Start) at (0, 0) {Start};       \node [draw=red] (End) at (5, 2) {End};       \directedPath[draw=black, >->]{Start}{End}{1.0}{3,6,9,8,7,8,9,6,3}     \end{tikzpicture}          \end{document}