title: Footnote mark in non-superscript with ConTeXt

text: Usually a footnote has a mark within the text (which is superscript) and a mark near the footnote text at the bottom of the document (which is also superscript). How can I change the mark within the text (but not the mark at the bottom of the document), such that it is not superscript (with ConTeXt MKII)?   * I have found similar solutions for this in LaTeX (see How to set superscript footnote mark in the text body but normalsized in the foot? and Footnote mark in regular or other font styles), but I have found no way to adjust these solutions for use in ConTeXt.   * ConTeXt has `\setupfootnotes` (ConTeXt wiki: Reference/en/setupfootnotes), which seems to offer a lot of customization of the footnotes, but after much experimenting, I have not found any way to modify the mark such that it is no longer superscript.


title: Can downloaded citations be used directly?

text: I am using **plain** bibliography style and I found the citations that I downloaded from IEEE Xplore quite self-contradicting... In the block quote below is a really bad example that I have encountered: > >        @INPROCEEDINGS{652309, >         author={Bangun, R.A. and Beadle, H.W.P.}, >         booktitle={Information, Communications and Signal Processing, 1997. > ICICS., Proceedings of 1997 International Conference on}, >         title={A network architecture for multiuser networked games on > demand}, >         year={1997}, >         month={sep}, >         volume={3}, >         number={}, >         pages={1815 -1819 vol.3}, >         keywords={ADSL;cable-modem;computer games;high bandwidth > networks;multiplayer networked  games;multiuser networked games on > demand;network architecture;software architectures;computer games;computer > networks;entertainment;interactive systems;multi-access systems;network > topology;}, >         doi={10.1109/ICICS.1997.652309}, >         ISSN={},} >   By self-contradicting I mean:   * The **author** field is often inconsistent, sometimes they have full names but sometimes they just have initials (such as in the example above).   * They included volume number in the **pages** number, which produces duplicate volume numbers after compilation.   * The **booktitle** field is simply not right. The result is that I have to proofread and correct all downloaded citations, as I want my reference list to look consistent. I am not writing for any journal or conference so I don't have to stick to a particular style (though it would help to make my references consistent I guess), but I do want a time- saving method to help me get a nice, clean, uniform reference list. Any suggestions?


title: Use special objects of xy-pic with beamer

text: When I try to use the general format for labels (cf. xyguide, §2.2) together with beamer overlays, the part that should show up later isn't formatted properly. I guess, beamer doesn't convert the `*` properly. What can I do? See the code below.               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Madrid}       \usecolortheme{seahorse}       \setbeamercovered{covered}       \beamertemplatenavigationsymbolsempty     }               \usepackage{tikz}     \usepackage[all]{xy}          \begin{document}     \begin{frame}     \[\xymatrix@=1.5em{     *++[o][F]{C} \only<+->{\ar@/^/[r]^{\alpha\rho}} &      \uncover<.->{*++[o][F]{Z}} \only<.->{\ar@/^/[l]^{100\%}}     }\]     \end{frame}          \end{document}


title: Mathptmx - number subscript too large

text: I don't know if this is actually intentionally, but if I use the font:               \usepackage{mathptmx}      and type e.g.:               \beta_{8,t}      it looks kind of weird, **because the 8 is so much larger than t**. If I use the older (outdated?) package               \usepackage{times}      instead, it looks better because both, **8 and t** , **are equal in size**. But I was recommended to use the `mathptmx` package because it is supposed to be better for maths (which I require a lot), but still in other papers that I check the subscripts are usually of equal size. Anyone knows what's the problem is or can recommend me the right font/a combination of fonts? I am supposed to write in Times New Roman. I though `mathptmx` was all I needed, but it seems to be more complicated. Edit: Maybe I need just 2 different packages, one of the latest 'Times' type for the text, and something else for the formulas. Let me know if you know any good combinations!


title: ToC and each page with thumbs (with chapter title rotated)

text: I have seen some using thumbs for the text, but I want it for the ToC. Is it possible? and if yes, how and which packet enables it the easiest way. I want it for a Conference Brochure. More details including a picture with ToC and some of the pages. I want it to be in A5 paper. At the beginning I want the TOC with a kind of rectangle till the end of the page for refering to the thumb. Then every odd page should have the mark fo the section in the same color as the assigned in the ToC. Besides, the thumb should have the title of the section (they will be quite short). If possible rotated. ![enter image description here](http://i.stack.imgur.com/V7TZW.jpg)


Is there a Tikz library for network symbols? For example:   * Server   * Database   * Firewall   * PC   * Laptop   * etc...


title: how to enclose selection in {} using vim-latex keyboard shortcuts

text: Is there an easy way of wrapping a selected text in {} with a shortcut in the same way you can turn a text into italics by typing ``it` while selecting a piece of text. I tried ``{` but and that works but formatting the {}'s as for text not commands e.g to transform "Computational Skills Learned:" what happens is: `\left\{ Computational Skills Learned: \right\}` This is not what I want, I want `{Computational Skills Learned:}`


title: MetaPost label positioning based on the text baseline

text: We are all familiar with MetaPost labels:               label.top(btex $a_t$ etex, z0);      The problem with the above is that the positioning is based on the _entire_ label, including the subscript. How do I calculate the positioning based on the _baseline_ of the text, i.e. only the "a" part, and not the "t" subscript?


title: Chemical purity and siunitx clash when putting a "+" after percentage

text: I'm using `siunitx` to describe some chemical purities. The purity I would like to describe is sold by the chemical company as 99.9+ % (not the best way of describing it I'm sure). When I try to describe this using `siunitx` it halts `pdflatex`.               \SI{99.9+}{\percent}      Is there a way around this problem with `siunitx`?


title: Process a string with replacing and splitting

text: I have an input string like "123-45" or "1-3-5" or "2-4; 6-8" where the minus signed should be removed. This is easy with the `xstring` package.               \StrSubstitute{#1}{-}{}      The next step is to split the input strings at the semicolon. This maybe could be done with `\StrMid`. The final output should be than:               123-45 = \somecommand{12345}     1-3-5 = \somecommand{135}     2-4 = \somecommand{24}     6-8 = \somecommand{68}      At the moment I have this not real working code:               \newcommand{\test}[1]{%       \newcommand{\stripped}{\StrSubstitute{#1}{-}{}}%       \IfInteger{\stripped}{\somecommand{\stripped}}{error}%     }      How can I solve this issue?


title: Chapter reference not displaying

text: I am involved in a writing a large document with a co-author who set up the LaTex files that we're using (i.e., I don't have complete autonomy in what I change). We have a root file which does two things: 1) loads a header file that contains the `\usepackage{}` commands and then lists the user-defined commands. 2) Then it loads in each chapter file using a user-defined command `\Chapter{#}{Title}` Which is coded as:               \newcommand{\Chapter}[2]{     \setcounter{chapter}{\numexpr#1-1}%     \refstepcounter{chapter}%     \setcounter{eqnhelper}{0}     \setcounter{section}{0}     \setcounter{figure}{0}     \setcounter{equation}{0}     \include{#2}     }      As you can see, this command mostly just resets various counters to 0, it also has the command `\setcounter{chapter}{#1}`. That way, when we compile chapters 3 and 8, they are both numbered correctly. Last, it calls the chapter file with the `\include` command. Each chapter file starts off with               % !TEX root = 00_makefile.tex      \chapter*{Chapter \thechapter\\ Chapter Title}     \label{chapter: apps of integration}      Here's the problem. Let's say we compile two chapters (say #3 and 8), and we want to reference Chapter 3 up in Chapter 8. Using the Typing `Chapter \ref{chapter_label}` command produces: Chapter <-(see the blank space?). Why is that? and how do we fix it? I guess I should also mention that this is using `\documentclass{report}` and we are NOT using the `hyperref` package. UPDATE: I just now realized I can't reference the chapter within itself either. Inside chapter 3 I added the line `This is chapter \ref{chapter3}` and I still got a blank space after the word 'chapter.'


title: Title does not appear when LaTeX code is compiled

text: I use Texmaker 4.0.1 to write LaTeX code. I have written the following code:               \documentclass[12pt,onecolumn,oneside,a4paper]{article}     \begin{document}     \title{test}     some text     \end{document}      I saved it with the name `test.tex` and compiled it with pressing `F6` -> `F6` -> `F2` -> `F9` in succession. When I press `F7` (View PDF) I see no title in the pdf but only "some text" that is, title does not appear. Later, I have written the following code and saved it with name `test1.tex`:               \documentclass[12pt,oneside,onecolumn,a4paper]{article}     \begin{document}     \title{some title}     \end{document}      When I compile it pressing `F6` -> `F6` -> `F2` -> `F9` in succession, the following message appears, > test1.dvi -> test1.pdf ** ERROR ** Could not open specified DVI file: > test1.dvi Output file removed. And neither dvi or pdf file is made. I use Miktex 2.9 on Windows 7.


title: Anomalous bracket sizes when using the cancel package

text: I have been happily using the cancel package that allows to cross out parts of mathematical formulas for some time now. However, today I noticed a very strange behaviour in the size of brackets located outside the cancelation in formulas with powers that had several terms. Depending on the number and combination of plus and minus signs in the power, the outer `\left(` and `\right)` brackets where unexpectedly larger or smaller than usual. This makes it complicated to use them with equivalent non-cancelled terms or, as in my case, terms with only a difference in a sign. The simpler example of what I'm trying would be:                   \documentclass{article}         \usepackage{cancel}          \begin{document}              \begin{equation}         \left[ \psi_0 \, \cancel{e^{-i \left( k_0 z-\omega_0t\right)}} \right]          \left[ \psi_0 \, \cancel{e^{i \left( k_0 z-\omega_0t \right)} } \right]          \end{equation}              \end{document}      But I would like the brackets in both terms to be the same size. I'm not sure if this is a bug or I am missing something. But even in the case it's a bug it would be helpful to know if there is any trick that would allow me to sort it out. An image with two examples, one where the cancel command shrinks the brackets below the normal size and another where it enlarges them: ![Two examples of anomalous bracket sizes caused by the cancel package](http://i.stack.imgur.com/hWTRl.png) I've tried to find the rule to post it here, using from one to seven terms with different combinations of plus and minus signs, but unfortunately it seems to me such an erratical behaviour that I haven't been able to understand the global pattern. I post here some additional examples in case it can help an expert user to spot where the problem might be.                   \documentclass{article}         \usepackage{cancel}          \begin{document}              How the brackets normally look:         \begin{equation}         P =  \left[ {e^{1}} \right]         \quad         P =  \left[ {e^{-1}} \right]         \quad         P =  \left[ {e^{-\left(1\right)}} \right]         \quad         P =  \left[ {e^{-\left(-1\right)}} \right]         \quad         P =  \left[ {e^{-\left(12\right)}} \right]         \end{equation}              If there are brackets in the exponential, it matters whether the signs are inside or outside and even the number of characters as well:         \begin{equation}         P =  \left[ \cancel{e^{1}} \right]         \quad         P =  \left[ \cancel{e^{-1}} \right]         \quad         P =  \left[ \cancel{e^{-\left(1\right)}} \right]         \quad         P =  \left[ \cancel{e^{-\left(-1\right)}} \right]         \quad         P =  \left[ \cancel{e^{-\left(12\right)}} \right]         \end{equation}              With one to five terms preceded by a plus sign in the exponential, the outer brackets look normal, six or more, they are larger than usual:              \begin{equation}         P =  \left[ \cancel{e^{+1+2+3+4+5}} \right]         \quad         P =  \left[ \cancel{e^{+1+2+3+4+5+6}} \right]         \end{equation}              When the terms are preceded by a minus sign, the strange behaviour starts at five terms instead:              \begin{equation}         P =  \left[ \cancel{e^{-1-2-3-4}} \right]         \quad         P =  \left[ \cancel{e^{-1-2-3-4-5}} \right]         \end{equation}              When the first number in the exponent is not preceded by any sign the behaviour is quite erratical.          \begin{equation}         P =  \left[ \cancel{e^{1+2}} \right]         \quad         P =  \left[ \cancel{e^{1+2+3}} \right]         \quad         P =  \left[ \cancel{e^{1+2+3+4}} \right]         \end{equation}              \end{document}


title: Horizontal boxes in article class

text: How can I have a box with multiple boxes inside like the following in the article class? ![enter image description here](http://i.stack.imgur.com/BYk7Q.png) It should be at the beginning of the page on the left side.


title: Error: Unicode char \u8 with french document

text: I have recently picked a file in asian laguage. When I have maked the necessary change in order to take a file in french laguage, I have this error:               ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.      Here is the code source               \documentclass[12pt]{article} \usepackage[utf8]{inputenc}     \usepackage[TS1,T1]{fontenc}     \usepackage[a4paper,hmargin=2cm,vmargin=2cm]{geometry}     \usepackage{amsfonts,amsmath, amssymb,amsthm, graphicx}     \usepackage[francais]{babel} \usepackage{textcomp}     \usepackage{lmodern}          \newtheorem{definition}{\textbf{Definition}}          \begin{document}          \section{Chaos de Wiener}          \subsection{Décomposition en Chaos de Wiener}          On se donne: \begin{itemize}   \item Un espace de Hilbert séparable     $H$, muni du produit scalaire $\langle \cdot , \cdot \rangle_{ H}$,     qui induit une norme $\| \cdot \|_{ H}$   \item  Un espace de     probabilité complet $(\Omega, \mathcal{F}, \mathbb P)$. \end{itemize}               \begin{definition}[Processus Gaussien isonormal] \label{def:1} On dit     que le processus  $W = \{ W(h); h \in  H\}$  défini sur  $(\Omega,     \mathcal{F}, \mathbb P)$,  est un \textit{processus Gaussien     isonormal} sur  $H$ si $W = \{ W(h); h \in  H\}$ est   constitué par     une famille de v.a.r  gaussiènne centrée  vérifiant la relation: Pour     tout $h, g \in H$,  on a          $$E [ W(h) W(g) ] = \langle  h, g \rangle_H$$          \end{definition}          \end{document}       Well, I do not know if my questions are understandable and acceptable. Thank you in advance (and thank you to Gonzalo Medina and cfr and other for these answers).


title: sequence of images on a single beamer slide / frame

text: how does one make a sequence of images, which occupy a single slide. i.e. when one 'advances', the slide ('frame'} does not advance (keeping header, page number etc stay constant} but the image advances to the next in the list?


title: How can I run pdflatex on multiple .tex files on Windows 7?

text: I built some graphics with TikZ and pgfplots. I have put the code with the most minimal necessary preamble into a standalone document for each figure. Say I put all those files for chapter 3 (hence the name Chap03_Something.tex) into the `main.tex`'s folder. Is there a way to run the engine of my choosing (most of the times that would be pdflatex, or LuaLaTeX a couple of times) on all files those `Chap03_*` **at once**?


title: Aligning picture with displaymath

text: I have a small picture of a graph and I would like to align it with its adjacency matrix, defined within math environment, side by side on a page. I tried to use subfig package, but the matrix is then misaligned (it begins vertically in the middle of the picture). EDIT: I have               \begin{figure}[H]     \centering     \includegraphics{Graph1.png}     \qquad\qquad     \begin{minipage}{1.2in}     \begin{math}     \begin{matrix}     1 & 0 & 1 & 1 & 0 & 1\\     0 & 1 & 0 & 1 & 0 & 1\\     1 & 0 & 1 & 0 & 1 & 1\\     1 & 1 & 0 & 1 & 1 & 0\\     0 & 0 & 1 & 1 & 1 & 0\\     1 & 1 & 1 & 0 & 0 & 1     \end{matrix}     \end{math}     \end{minipage}     \end{figure}      If you include it in a document, you will see the matrix is "misaligned" - it is lower than the image. I would like them verticaly centered to the center. If I add               \parbox{1.2in}{\includegraphics{Graph1.png}}      then it is working, but I get Overfull \hbox.


title: How to add navigation circles to Copenhagen theme in beamer?

text: I would like to ask if there is a way to add navigation circles to the Copenhagen theme. Let me expalin it better: 1\. on the left hand side of the header there is a list of the sections. 2\. on the right hand side of the header there is a list of the subsections (if there are any). I don't have subsections. I would like to have on the right hand side as many navigation circles as frames, situated at the same height as the corresponding section. I saw this configuration in some presentation, but I am unable to replicate it. As I am unable to show you an example with a real slide, next I show a scketch of how I want the header (each x is for a navigation circle and treat · as white spaces): |··························|····················| |···········Section 1 | xxx·············| |···········Section 2 | xxxxx·········| |···········Section 3 | xx ··············| |··························|····················| Where section 1 has 3 frames, section 2 has 5 frames and section 3 has 2 frames. Thanks for your help. Mihaela


title: Organizing Information in Columns without Tables

text: I need to organize, without using tables, information such as:               Name: James      Profession: Dentist     Nationality: American     Age: 32      I want entries in each field to look like if they were placed in a table, but without the table. How can I do that? **[EDIT]** I'm having trouble with this; I'm using the `tabbing` environment but when I compile the text overlaps with the formula:               \begin{tabbing}     \=Feature: \=Formula\kill     \>Elements: \>$ds = \sqrt{dx^{2} + dy^{2}}$, $ds^{2} = dx dy$ \\     \end{tabbing}      I don't see the mistake here.


I have a problem with the frontmatter page numbers in the Table of Contents (TOC). For the mainmatter, everything works just fine. My abstracts start at page V and appear at page V in the TOC. The acknowledgment is at page xi and appears at xi in the TOC. The "List of figures" and "List of tables" start at pages xvii and xix. However, they are at xvi and xviii in the TOC (1 page shift). How could I fix that? tnx, Farzin               \frontmatter     \input{head/titlepage.tex}     \include{head/dedication}     \include{head/abstracts}     \include{head/acknowledgements}          \tableofcontents     \addcontentsline{toc}{chapter}{List of figures}      \listoffigures     \addcontentsline{toc}{chapter}{List of tables}      \listoftables          \setlength{\parskip}{1em}          \mainmatter


title: Some Sections in the Structure Pane are Highlighted Red

text: Being a newbie to LaTeX, while adding a new page to an existing Latex template using TeXstudio some sections of the document turned red in the Structure Pane. Kindly someone may explain the reason behind and potential consequence if any.


title: Custom ToC for appendices

text: I would like to create a table of content for the Appendices that produce this result               Appendices        A   First Appendix        B   Second Appendix        C   Third Appendix      So far I've tried with               \appendix     \addcontentsline{toc}{chapter}{Appendices}     \setcounter{section}{0}     \section{First Appendix}     \section{Second Appendix}     \section{Third Appendix}      which returns               Appendices        .1   First Appendix        .2   Second Appendix        .3   Third Appendix      I know it's possible to change the numbering of sections to be alphabetical, but that will also affect all the sections in normal chapters. Can you find a solution to this?


title: Conflict between verbatim.sty and ltxdoc.cls

text: I am writing a package which uses the `verbatim` package.               \RequirePackage{verbatim}      For the documentation I'm using the `ltxdoc` class. So I have to put an `%` character before every line of the documentation. Also when I'm using the `vebatim` environment to typeset code examples like               % \begin{verbatim}     % Some Code     % Some other code     % \end{verbatim}      `ltxdoc` removes all the `%` at beginning of each line, also inside the `verbatim` environment. It seems that the `verbatim` package redefines the special `verbatim` environment from the `ltxdoc` class, because when I write               % \begin{verbatim}     % some code example     % some other code example     % \end{verbatim}      the `%` before `Some code` and before `Some other code` is still there in the produced pdf. So the pdf-output is               % some code example     % some other code example      But it should be               some code example     some other code example      Can anyone help me to solve this problem? ## Minimal working example (MWE) This is an MWE of the `.dtx` file.               % \iffalse     %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]     %<package>\ProvidesPackage{exercises}[2014/04/22 v1.0 .dtx exercises file]     %     %<*driver>     \documentclass[a4paper]{ltxdoc}     \usepackage{exercises}     \begin{document}       \DocInput{exercises.dtx}     \end{document}     %</driver>     % \fi     % \GetFileInfo{exercises.sty}     % \title{The \textsf{exercises} package\thanks{This document     %   corresponds to \textsf{exercises}~\fileversion, dated \filedate.}}     % \author{Roger Jud}     %     % \maketitle     %     % \begin{verbatim}     % \begin{exercise}     %   Calculate $1 + 1 =$     % \end{exercise}     % \end{verbatim}     %     % \StopEventually{\PrintChanges\     %     %    \begin{macrocode}       \RequirePackage{verbatim}       \newenvironment{exercises}{Start}{End}     %    \end{macrocode}     % \Finale     \endinput


title: Aligning bullet and text in itemize

text: I want to make the bullets in itemize to align at 0 mm (no indent). Using the `enumitem` package, this can be done by specifying the option `[leftmargin=*]`. At the same time, I would like the texts to align at 3 mm. How to do this? (I want to set this globally.)


title: pgfplots and tikz: clipping a named plot

text: I would like to clip along a `\addplot` line made by `pgfplots`. I am not sure entirely how to do this since my tries have failed. What have done so far is below.               \documentclass[tikz, convert = false]{standalone}          \usepackage{pgfplots}     \pgfplotsset{compat = 1.10}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}       \begin{axis}[         no marks,         axis x line = center,         axis y line = center,         xmin = 0,         xmax = 5,         xlabel = {x},         ylabel = {y}         ]         \addplot[blue, samples = 500, smooth, name path global = pinvx]         gnuplot[domain = .5:5] {1/x};         \addplot[red, samples = 500, smooth, name path global = ninvx]         gnuplot[domain = .5:5] {-1/x};         \legend{$\frac{1}{x}$, $\frac{-1}{x}$}              \path[name path = line1] (axis cs:1.6, 1) -- (axis cs:1.6, -1);         \path[name path = line2] (axis cs:1.75, 1) -- (axis cs:1.75, -1);         \path[name intersections = {of = pinvx and line1, by = P1}];         \path[name intersections = {of = ninvx and line1, by = P2}];         \path[name intersections = {of = pinvx and line2, by = P3}];         \path[name intersections = {of = ninvx and line2, by = P4}];              \draw[green, opacity =.7] (P1) -- (P2);         \draw[green, opacity =.7] (P3) -- (P4);              \begin{scope}           \clip pinvx;           \fill[green, opacity =.7] (P1) -- (P3) -- (1.75, 0) -- (1.6, 0);         \end{scope}       \end{axis}     \end{tikzpicture}     \end{document}      My end goal is to fill the area between the lines and the `1/x` and `-1/x` plots. I tried using clip with the first plot name but that doesn't work. Here is the plot with out the attempt of shading the area. ![enter image description here](http://i.stack.imgur.com/qabG9.png)


title: Trying to convert an svg to use in LaTeX

text: I know this is only semi-tex related but I think it's something a lot of people are familiar with. I used inkscape to grab an image out of a pdf. After doing so, I found out the only way it would actually save was to save it to .svg (all other formats are blank). I then tried saving the svg to eps/pdf/wmf/emf... etc basically every format I can think of, and they are all just blank pages. I even tried opening it in chrome, which it does, but when i click print (to send it to a pdf printer), the page is just a big black box. I'm uploading the .svg at the link below, i'm wondering if its some transparency problem but I have no idea how to fix it.. http://www.filedropper.com/drawing-2 The end goal is of course to have this thing in eps format so I can insert into LaTeX without issue... Any ideas??


title: Multiply fine tuning with a thinspace \,

text: What I want is a redefinition of command `\,` to the version `\,[N]` for given integer N               \, % standard usage     \,[2] % the same as \,\,     \,[3] % the same as \,\,\,      and so on The usage of `\hspace` instead of the above is not quite comfortable


title: How to Improve my TikZ Code to construct a Triangle Diagram

text: I'm inviting interesting, alternative _TikZ_ solutions to improve on the code for a "triangle diagram" that may be found further on. One of the problems with the code is that I hardcoded some lengths because they were needed in different `path`/`draw` commands. I could have defined the lengths with `\def` (or related TeX/LaTeX commands) but that's not really a TikZ solution. If you have a high-level, more elegant TikZ solution then I'd like to know. Please note this question is related to this other question but the purpose of this question is different.               \documentclass{minimal}          \usepackage{tikz}     \usetikzlibrary{calc}     \tikzset{my node/.style={shape=circle,draw=black,fill=red!40,minimum size=5mm,inner sep=0pt}}          \begin{document}         \begin{tikzpicture}            \draw[red,thick]                 (0,0) coordinate (A) -- ++(120:6)                        coordinate (B) -- ++(6,0)                       coordinate (C) -- cycle;            \foreach \a/\b/\c in {A/C/B,B/A/C,C/B/A} {                \draw[<->]                     ($(\a)!5mm!(\b)$)   coordinate (fst)                     ($(\a)!1!30:(fst)$) coordinate (snd)                     ($(\a)!5mm!(\c)$)   coordinate (lst)                     ($(\a)!1.5!(snd)$) node {60}                     (fst) .. controls (snd) .. (lst);            }            \filldraw[draw=black,fill=red!40]                     let \n{length}={1.5} in            \foreach \r[evaluate=\r as \rr using \r*\n{length},                        evaluate=\r as \lst using int(round(\r*(\r+1)/2)),                        evaluate=\r as \fst using int(round(\lst-\r+1)] in {1,...,5} {                \foreach \curr in {\fst,...,\lst} {                    ($(A)+(120:-1.5)+(120:\rr)+(-\n{length}*\fst,0)+(\n{length}*\curr,0)$)                        node[my node] {$\curr$}                }            };         \end{tikzpicture}     \end{document}      ![triangle](http://i.stack.imgur.com/cp2J7.png)


title: \IfStrEqCase having problem with last optional parameter

text: It's been a while since I asked an embarrassing question, and am pretty sure this is another one of those: This code below attempts to use `\IfStrEqCase` from the `xstring` package and results in:               Runaway argument?      {document} \par \par \par \documentclass {article} \usepackage {pgfpl\ETC.     ! File ended while scanning use of \@xs@testcase.      for the case where none of the cases match, but I don't know why. ## Notes:   * This is especially embarrassing as I answered What's the best/right way to test an argument to a macro? using `\IfStrEqCase` and that code works just fine. Hence, don't think it is a version issue. ## Code:               \documentclass{article}     \usepackage{xstring}          %\newcommand{\CaseVar}{case A}% This works     %\newcommand{\CaseVar}{case B}%  This works     \newcommand{\CaseVar}{case C}% This does NOT!!!          \begin{document}         \IfStrEqCase{\CaseVar}{%             {case A}{Found Case A}             {case B}{Found Case B}         }[Oppsss, unknown case '\CaseVar'.]     \end{document}


title: Keep the frame background in minislides

text: I'd like to know if it is possible to keep the background used in standard frames in minislides too:               \documentclass{beamer}     \usepackage{blindtext}          \usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{lion.jpg}}     \setbeameroption{show notes}          \begin{document}      \begin{frame}        \blindtext      \end{frame}     \note{no lion in the topright minislide :(}     \end{document}      ![enter image description here](http://i.stack.imgur.com/FRP21.png) You can find the background here. As far as I understand, the content of the minislide is provided by `\beamer@frameboxcopy` inside the `\insertslideintonotes` macro from the beamerbasenote.sty file. Is it possible to let `\beamer@frameboxcopy` keep the background of the original frame?


title: Hyphenation of words connected with a double/triple dash

text: I can't hyphenate the words > `Cam•bri•an--Or•do•vi•cian` because they are connected with an endash. The same probably happens when using the emdash. I tried this                \defineshorthand{"=}{\penalty1000-\hskip0pt}      \hyphenation{Cambrian"="=Ordovician}      But I obviously don't understand this shorthand thingy.


title: Add text in Citation

text: I want `[1, Eqns. (4)-(6)].` For that I have written               \cite{citekey} Eqns. (4)-(6).      But it generates `[1] Eqns. (4)-(6).`   How to write `[1, Eqns. (4)-(6)].`?


title: IfLanguageName versus iflanguage

text: The `babel` package recommends using the command `IfLanguageName` of the `iflang` package to test for a language. It is explained that the command `iflanguage` is too coarse, because it is only based on the hyphenation pattern. But if for example, we would like to test if the current language is one of the four English, USEnglish, usenglish or american, do we have to do four tests for each one of these languages? Is there any test for language families, for example one for the English language family that includes British, American and other variants?


title: reference problems after upgrading

text: so i know this has been asked before but i am having an issue with biblatex after i upgraded my packages in miktex. i have uninstalled and reinstalled entire tex distribution, i cleared temp file in appdata folder and nothing works. I get undefined citation. i am wanting to use APA format, i have a minimal example, so this is the code i have this code:               \documentclass [12pt]{article} % this must go first, there are many different classes     \usepackage [american]{babel}     \usepackage{csquotes}% recommended in output (biblatex)      \usepackage[style=apa]{biblatex}      \usepackage{titletoc}     \DeclareLanguageMapping{american}{american-apa}     \bibliography{C:/Users/Joe/Desktop/text/test}     \begin{document}          \parencite{Hox2010}          \bibliography{}     \end{document}      my bib file is named test.bib and contains this citation               @book{Hox2010,     address = {New York},     author = {Hox, Joop J.},     edition = {2},     file = {:C\:/Users/Joe/Misc/Mendeley PDFs/Multilevel Analysis Techniques and     Applications.pdf:pdf},     isbn = {1848728468},     keywords = {Linear Models},     mendeley-tags = {Linear Models},     pages = {392},     publisher = {Routledge Academic},     title = {{Multilevel Analysis: Techniques and Applications, Second Edition}},     year = {2010}     }      in my log file i get this               LaTeX Warning: Citation 'Hox2010' on page 1 undefined on input line 9.     ! LaTeX Error: Can be used only in preamble.


title: drawing a "hand-drawn" circle (of sorts)

text: I would like a better approach to drawing something approximating a hand-draw circle using `tikz`:               \documentclass{article}     \pagestyle{empty}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \begin{tikzpicture}            \coordinate (A) at (0,0);       \coordinate (C) at (2in, 0);       \coordinate (B) at ($(C)!1in!-90:(A)$);            \draw (A) -- (C) -- (B) -- cycle;            \coordinate (A/u) at ($(A) + (30:1em)$);       \coordinate (A/d) at ($(A) + (-10:1em)$);       \coordinate (A/x) at ($(A) + (120:2em)$);       \coordinate (A/y) at ($(A) + (-120:2em)$);            \draw[line width=1pt] (A/d) .. controls (A/x) and (A/y) .. (A/u);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/vhZme.png) I am aware of Simulating hand-drawn lines. Though the wobbly effect would be nice, I'd like something approximating my circle where the ends don't quite meet.


title: How to embed a video in a pdf generated by beamer and read it independently of the file emplacement?

text: I would like to embed a video in a presentation using `beamer`. All is going well until I change the pdf location. Is there any command that enables to integrate that video in my pdf so that I can send it for example by email and it can be read by my friend? Please here what I use for embedding the video:               \begin{frame}     \frametitle{Particles with inertia}      \movie[width=10cm,height=7cm]{Heavy particle pair separation}{twoheavy.avi}     \end{frame}


title: How to pass the value of \mylength to the "trim" option of \includepdf of pdfpages.sty?

text: This problem is related to my previous problem about pdf trimming. Here is the minimal code:               \documentclass{article}     \usepackage{pdfpages}     \usepackage[paperwidth=6.38in,paperheight=4.025in,margin=0mm]{geometry}     \newlength{\mylength}     \setlength{\mylength}{0.7in}     \usepackage{multido}     \begin{document}     \multido{\i=50+1}{10}%     {%         \ifthenelse{\isodd{\i}}%         {%                 \includepdf[pages=\i,trim=\mylength 4.325in 0.3in 0.9in,clip]{MVC}%                 \pagebreak                           \includepdf[pages=\i,trim=0.7in 0.4in  0.3in 4.825in,clip]{MVC}%         }%         {%                 \includepdf[pages=\i,trim=0.3in 4.325in 0.7in 0.9in,clip]{MVC}%                 \pagebreak                       \includepdf[pages=\i,trim=0.3in 0.4in  0.7in 4.825in,clip]{MVC}%         }%     }%     \end{document}      The pdf file to be trimmed is available here. I rename the pdf as MVC.pdf and save it in the same directory in which the tex input file above is saved. I compiled and got blank pages.


title: Node with tikz and bookmarks

text: Is it possible to link a bookmark to the command `\titA` in the following example?                   \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{shadows}         \newcommand{\titA}[1]{\begin{tikzpicture} \node[circle,shading=ball, ball color=red!80!white, minimum size=1cm]{#1};\end{tikzpicture}}         \begin{document}         \titA{blah blah}         \end{document}


title: WYSIWYG Editor for drawing trees (and export them as vector images)

text: Is there a good WYSIWYG solution out there for quickly drawing tree-like structures (e.g. in combination with graphviz)? The nodes may contain arbitrary text and should be positioned automatically. I explicitly do not want to model the tree with a text editor (or just for fine-tuning). I need it for latex and therefore it's necessary that the tool is capable of exporting the tree in a vector format like PDF/ EPS.


title: Highlight a prompt with the listings package

text: I use the `listings` package to typeset a series of commands in the language Octave (a free clone of Matlab) in my lecture notes. Most of the command lines look like this:               octave:1> A=eye(4)     A =          Diagonal Matrix             1   0   0   0        0   1   0   0        0   0   1   0        0   0   0   1          octave:2> det(A)     ans =  1     octave:3>       As you can see, each command is prefixed by a prompt in the form `octave:N>`, where `N` is the number of the command in the session (may have more than one character). I do not skip this prompt because I want my notes to look exactly like the students' screens. Output lines have no prefix. I would like this command prefix to be formatted in a different color (grayed out, to mean that it is not as important as what follows). How can I do that with `listings`? In the manual I find only an option `gobble` to ignore the first _k_ characters of every line, but this does not work in my case since only some lines have this prefix.


title: How to get a bibtex-bibliography and a selfwritten "\bibliography" element together?

text: I've got **an external .bib file** , which is written in bibtex and i can't add some elements into, because i just have the read permissions on it. When i build **a bibliography element for my additional content** , **two indexes will be displayed**..How can i tell Latex, that it should build the both indexes together?


title: Color of square cell in array

text: I would like to have array with square cells and fill cells with colors. There is done implementation of table with square cells by W. Robertson http://www.tug.org/pracjourn/2005-2/robertson/robertson.pdf :               \newlength\celldim \newlength\fontheight \newlength\extraheight     \newcounter{sqcolumns}          \newcolumntype{S}{ @{}       >{\centering \rule[-0.5\extraheight]{0pt}{\fontheight + \extraheight}}       p{\celldim} @{} }          \newcolumntype{Z}{ @{} >{\centering} p{\celldim} @{} }          \newenvironment{squarecells}[1]       {\setlength\celldim{2em}%       \settoheight\fontheight{A}%       \setlength\extraheight{\celldim - \fontheight}%       \setcounter{sqcolumns}{#1 - 1}%       \begin{tabular}{|S|*{\value{sqcolumns}}{Z|}}\hline}       % squarecells tabular goes here       {\end{tabular}}          \newcommand\nl{\tabularnewline\hline}      So I write:               \documentclass[a4paper,12pt]{report}          \usepackage[MeX]{polski}     \usepackage[utf8]{inputenc}     \usepackage[table]{xcolor}     \usepackage{array}     \usepackage{calc}     \newlength\celldim \newlength\fontheight \newlength\extraheight     \newcounter{sqcolumns}          \newcolumntype{S}{ @{}       >{\centering \rule[-0.5\extraheight]{0pt}{\fontheight + \extraheight}}       p{\celldim} @{} }          \newcolumntype{Z}{ @{} >{\centering} p{\celldim} @{} }          \newenvironment{squarecells}[1]       {\setlength\celldim{4em}%       \settoheight\fontheight{A}%       \setlength\extraheight{\celldim - \fontheight}%       \setcounter{sqcolumns}{#1 - 1}%       \begin{tabular}{|S|*{\value{sqcolumns}}{Z|}}\hline}       % squarecells tabular goes here       {\end{tabular}}          \newcommand\nl{\tabularnewline\hline}           \begin{document}          \begin{squarecells}{4}     \cellcolor{red}16 & 3 & 2 & 13 \nl     5 & 10 & 11 & 8 \nl     9 & 6 + 2 & 7 & 12 \nl     4 & 15 & 14 & 1 \nl     \end{squarecells}          \end{document}      Output is: ![Output](http://i.stack.imgur.com/mVQ6E.png) Cell is filled with red color a little more than it should be. Question is, how to properly fill cell with color? Or maybe is there some other good solution to create table with square cells?


title: Problem inserting figure to LaTeX file using Texlipse

text: I'm trying to insert a figure into my LaTeX file using the following syntax:               \begin{figure}       \centering       \includegraphics [width=3in]{fig1.png}       \caption{Calculation of shortest path betweenness}       \label{Fig.3:Shortest path betweenness}     \end{figure}      It worked for me before but this time I'm getting the following error:                LaTeX Error: \begin{figure} on input line xxx ended by \end{document}      Also, hovering over the red cross symbol indicating error in Eclipse, I see this message                paragraph ended before Gin@iii was completed.      It's obvious that I have the `\end{figure}` to end my `\begin{figure}` so I don't understand how I still get that error. Can someone please tell me what the problem is? Edit: Add more details for debugging. The problem went away if I remove '[width=3in]'. Here is the detail error:               pdflatex> Runaway argument?     pdflatex> width=3in]{fig1.png} \caption {Caption} \label {Fig.1}      pdflatex> ! Paragraph ended before \Gin@iii was complete.     pdflatex> <to be read again>      pdflatex>                    \par      pdflatex> l.40      pdflatex>            pdflatex>      pdflatex> Underfull \vbox (badness 10000) has occurred while \output is active     pdflatex> (./document.bbl     pdflatex>      pdflatex> Package natbib Warning: Empty `thebibliography' environment on input line 3.      Added sample code:               \documentclass[10pt,psfig,letterpaper,twocolumn]{article}     \usepackage{geometry}     \usepackage{graphics}     \usepackage{setspace}     \usepackage{natbib}     \usepackage{verbatim}     \usepackage[scaled=0.9]{helvet}     \singlespacing     \paperwidth 8.5in     \paperheight 11in     \oddsidemargin 0in     \headsep 1.3cm      \geometry{left=0.75in,top=0.75in,right=0.75in,bottom=1in}     \textwidth 7in      \textheight 9.25in     \columnsep 0.4in     \footskip 0in      \renewcommand{\bibname}{REFERENCE}     \pagestyle{empty}      \begin{document}     \bibliographystyle{acm}           \title{\fontfamily{phv}\selectfont{\huge{\bfseries{Title here}}}} \author{     {\fontfamily{ptm}\selectfont{\large{\bfseries{author name}}}}\thanks{contact     info }}          \maketitle     \thispagestyle{empty}          \section*{\fontfamily{phv}\selectfont{\normalsize{\bfseries{Section name}}}}          \begin{figure}     \centering     \includegraphics[width=3in]{fig1.png}     \caption{Caption}     \label{Fig.1}     \end{figure}          \pagebreak[4]     \vspace*{5.52in}     \bibliography{ref}     \end{document}


title: How to make footnotes left-right and the numbers in English in Persian documents?

text: The document is compiling in Xelatex and the whole document is Persian using the package xepersian. The footnotes are all in English but they are aligned right and the numbers are persian. I want the footnotes to be aligned at the left side of the document and the numbers of them to be in English. Note that just the numbers at the bottom of the page should be in English, the numbers referring them in the text should be Persian.


title: Vertical align in tikz matrix

text: \documentclass[a4paper,12pt]{report}          \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}          \begin{center}     \begin{tikzpicture}          \tikzset{square matrix/.style={         matrix of nodes,         column sep=-\pgflinewidth, row sep=-\pgflinewidth,         nodes={draw,           text height=#1/2+0.75ex,           text depth=#1/2-0.75ex,           text width=#1,           align=center,           inner sep=0pt         },       },       square matrix/.default=1.4cm     }          \matrix[square matrix]     {     |[fill=lightgray]|+ & |[fill=lightgray]|0 & |[fill=lightgray]|1 & |[fill=lightgray]|$\ldots$ &  |[fill=lightgray]|$\alpha^{2^m-3}$ & |[fill=lightgray]|$2^m - 1$\\     |[fill=lightgray]|0 & 0 & 1 & $\ldots$ &  $2^m - 2$ & $2^m - 1$\\     |[fill=lightgray]|1 & 1 & 0 & $\ldots$ &  $2^m - 2$ + 5465 1\\     |[fill=lightgray]|$\vdots$\\     |[fill=lightgray]|$2^m - 2$\\     |[fill=lightgray]|$2^m - 1$\\     };          \end{tikzpicture}     \end{center}          \end{document}      And output is: ![output](http://i.stack.imgur.com/qSi5V.png) Text in the right-bottom cell doesn't fit into cell. How to set vertical align of cell to center which will move this text a bit higher and it will fit into cell?


title: natbib: Split Bibliography Into Sections By Entrytype (without using multibib)

text: ## What's wrong with `multibib`? `multibib` lets me split up my bibliography. But I have to specify manually (by `\citeabc` or `\citedef`), which bibliography entry belongs to which section. Also, it's not (really) compatible with `LyX`. ## What do I want? I want to create a `book` including `natbib`'s `author-date` cites and bibliography using `LyX`. My `\bibliography` should be splitted into 2 parts:   * `@ELECTRONIC` ( **Electronical resources** )   * non-`@ELECTRONIC` ( **Books, jornals etc.** ) I don't want to do this by hand because it's error-prone on big bibliographies and just redundant. ## My Question: What's the best way to **automatically split up a`natbib` bibliography** into an `@ELECTRONIC` and a non-`@ELECTRONIC` section ( **by the entrytype** of the `.bib` file)? Thanks for your ideas, for your answers. - If my question isn't clear this way, please write a comment to inform me about that. ## An Example:               % file.bib          @ELECTRONIC{Lundmaier,       %...     }          @ARTICLE{Lundstein,       %...     }          @BOOK{Lundberg,       %...     }               % file.tex          \citep{Lundberg, Lundstein, Lundmaier}     \bibliography{file}      should result in:               == Bibliography ==     = Books and Jornals =     Lundberg, Ulla-Lena ...     Lundstein, Hannah ...          = Electronical Resources =     Lundmaier, Tina ...


title: Insert MathTime Pro 2 math in Inkscape

text: I'm using Inkscape (and TeX Live 2009/Debian, with MTPro2 fonts installed), and I want to insert LaTeX math code in images created in Inkscape and have the math rendered in the MTPro2 font. I'm aware of the Inkscape extension Inkscape de LaTeX, but I can't see how to cause that extension to render using MTPro2 fonts. Any ideas or suggestions? I know I could use PGF/TikZ, but I simply don't have time to use those at present --- especially since I've never used them before.


title: Using a fancy font for mathmode, falling back to XITS for missing symbols

text: I'm using a silly font inside an environment, so that the text inside looks quite different than the surrounding text. However, I am having trouble getting mathmode to look silly, but legible.               \documentclass{minimal}     \usepackage{fontspec}     \usepackage{unicode-math}     \setmathfont{XITS Math}     \begin{document}     Normal text. $abc$.     \begingroup     \fontspec{Handwriting - Dakota}%     \setmathfont{Handwriting - Dakota}%     Silly text $abc$ or even just  $2 - 4 + \frac{2}{3} + x^2$     \endgroup     Normal text. $10-8=2$.     \end{document}      However, the `$abc$` does not show up, probably because the font doesn't have the special scripts `unicode-math` is asking for. I just want to use fairly normal characters, no need for unicode input. On the other hand the `mathspec` package only allows a single font, I believe, so I'd have to have silly math in the whole document. Some of the fonts are even a little sparser, I think. They have a hyphen, but `$10-8$` does not include the minus sign, presumably because the font lacks such a symbol. Is there some way to use the silly font for letters and digits (inside this environment), but fall back to a "real" font for any missing symbols?


title: LaTeX with biblatex and biber: How to balance \printbibliography in a two column IEEE trans paper?

text: (repost/moved from stackoverflow: currently no answers) ### Here is my LateX question: I'm using (PDF)LaTeX with `IEEEtran` documentclass and `biblatex`/`biber` as bibliography system. As mentioned in the IEEE example (two column paper), references should be balanced between columns on the last page. The presented `\IEEEtriggeratref{}` command inserts a `\newpage` command after the given reference to manually balance the references list. But, it's not working with `biblatex` -> nothing happens. ### How can I balance my references with biblatex in an equivalent way? Here are my settings:               \documentclass[conference]{IEEEtran}     [...]     \usepackage[backend=biber,      % replace bibtex with biber (bibliography backend engine)         bibstyle=ieee,              % write literature lists in IEEE style         citestyle=numeric-comp,     % \cite uses a numeric key         sortcites=true,                                      maxbibnames=3     ]{biblatex}     [...]      Here is the original `natbib`/`bibtex` example:               % trigger a \newpage just before the given reference     % number - used to balance the columns on the last page     % adjust value as needed - may need to be readjusted if     % the document is modified later     \IEEEtriggeratref{8}


title: problems with tikz and arabi package

text: I have some problems and I hope you can help me. When I put a `tikzpicture` and use the `arabi` package, the picture is not displayed in the `dvi` or `pdf` file, and this without a single error. I have a solution for that (which I don't like), I have to put the TikZ picture inside an english language environment, like this :               \begine{otherlanguage}{english}     \begin{tikzpicture}     ...     ...     \end{tikzpicture}     \end{otherlanguage}      it is a boring solution and not suitable if I want to create environments like boxed theorems, etc. Here is a sample :               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \documentclass{report}               \usepackage[Latin1, utf8, cp1256]{inputenc}     %\usepackage[T1, OT1, LAE]{fontenc}     \usepackage[english, arabic]{babel}     \usepackage{amsmath, amsfonts, amssymb, amsthm}     \usepackage{tikz}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%% Indian to Arabic Numerotations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \renewcommand{\theenumi}{\textLR{\arabic{enumi}}-}     \renewcommand{\labelenumi}{\theenumi}     \renewcommand{\theenumii}{\alph{enumii})}     \renewcommand{\labelenumii}{\theenumii}          \renewcommand{\theequation}{\textLR{\arabic{equation}}}          \renewcommand{\thesection}{\textLR{\arabic{section}} -}     \renewcommand{\thepage}{\textLR{\arabic{page}}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \begin{document}          \section{المتتاليات العددية}          \tikzstyle{mybox} = [draw=red, fill=blue!20, very thick,         rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]     \tikzstyle{fancytitle} =[draw=red, fill=blue!20, text=black, rectangle, rounded corners]     \begin{otherlanguage}{english}     \begin{tikzpicture}     \node [mybox] (box){%     \begin{minipage}{.89\textwidth}     \begin{otherlanguage}{arabic}               لتكن $f$ دالة مستمرة على المجال $[a,b]$ و قابلة للإشتقاق على $]a,b[$,      حيث $f(a)=f(b)$.     إذن, يوجد عدد حقيقي $c \in ]a,b[$ حيث      $$     f(c)=0     $$.     \end{enumerate}     \end{otherlanguage}     \end{minipage}     };     \node[fancytitle, left=10pt] at (box.north east) {\AR{نظـريـة}};     \node[fancytitle, rounded corners] at (box.east) {$\clubsuit$};     \end{tikzpicture}%     \end{otherlanguage}          \begin{center}     \begin{otherlanguage}{english}     \begin{tikzpicture}     \draw[thick,rounded corners=8pt]     (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);     \end{tikzpicture}     \end{otherlanguage}     \end{center}               \end{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      you can try to compile this code with pdflatex without \begin{otherlanguage}{english} \end{otherlanguage} in the last picture. this picture isn't displayed in the output pdf file.


title: What does the "! Incomplete \ifx" error mean?

text: \documentclass[12pt,a4paper]{article}     \usepackage[version=3]{mhchem}     \usepackage{siunitx}          \begin{document}          \begin{align*}      \ce{PH &= -\log  \ce{[H+]}} \\      -\ce{PH} &= \log \ce{[H+]} \\      10^{-\ce{PH}} &= \ce{[H+]} \\     \end{align*}     \end{document}      gives               (/home/peter/texlive/2011/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviat     ions.cfg)     (/home/peter/texlive/2011/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cf     g)     ! Incomplete \ifx; all text was ignored after line 11.     <inserted text>                      \fi      l.11 \end{align*}      What is wrong?


title: Biblatex[-chicago, authordate] footnote on first cite. Extra space put in parencite

text: Following http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as- footnotes/ I made the following minimal example, that put the full citation in a margin note for the first time, when using `biblatex-chicago` authordate style:               \documentclass{article}     \usepackage[citetracker=true,ibidtracker=false,authordate]{biblatex-chicago}     \bibliography{biblatex-examples}     \makeatletter     \DeclareCiteCommand{\parencite}[\mkbibparens]       {\usebibmacro{cite:init}%        \usebibmacro{prenote}}       {\usebibmacro{citeindex}%        \usebibmacro{notefullcite}%        \usebibmacro{cite}}       {}%\setunit{\multicitedelim}       {\usebibmacro{postnote}}          \newbibmacro*{notefullcite}{%       \ifciteseen         {}         {\nopunct\unspace\marginpar{%         \usedriver{}{%             \thefield{entrytype}}.}}}     \makeatother     \begin{document}          Text \parencite{hammond}.          Text \parencite{cotton,hammond}.          Some filler text \parencite{cotton}.          Some text\parencite{cotton}.          Text \parencite{cotton,hammond}.          \end{document}      But with this code, before the first time a parencite is used for a citation, biblatex put a extra space after "(". ![enter image description here](http://i.stack.imgur.com/pXgmA.png) I tried to find the origin of this space, but I failed. I hoped that the `\unspace` remove it but not. I think this space is generated by `\printnames` from the `cmsbracketname` macro, but I don't know what to do =[. I'm using:   * % $Id: biblatex-chicago.sty,v 0.1.1.31 2011/02/15 11:56:42 dfussner Exp $   * % $Id: chicago-authordate15.bbx,v 0.8.1.2 2011/09/21 10:53:07 dfussner Exp $   * % $Id: chicago-authordate15.cbx,v 0.8.1.4 2011/09/21 10:53:18 dfussner Exp $   * % $Id: biblatex.sty,v 1.6 2011/07/29 19:21:28 lehman stable $


title: Wrapping \obeylines with \halign into a macro

text: In the TeXbook, Knuth gives an example: > Are you tired of typing `\cr`? You can get plain TEX to insert an automatic > `\cr` at the end of each input line in the following way: >   >   >     \begingroup \let\par=\cr \obeylines % >     \halign{⟨preamble⟩ >     ⟨ﬁrst line of alignment⟩ >     ... >     ⟨last line of alignment}\endgroup >   How would one wrap this up into a macro? So that one could use:               \mytable{%     This & is & the & first & row     This & is & the & second & row     }


title: ‘β’ using Latin Modern fonts

text: I’m typesetting a text with some math and Greek letters. LaTeX handles Greek letters just fine in math mode but I can’t get it to display the character ‘β’ using either direct input or the `\b` macro provided by the `chemmacros` package. Here's a minimal example:               \documentclass{minimal}     \usepackage{fontspec}     \usepackage[greek=textgreek]{chemmacros}          \begin{document}         \iupac{\b-carotene} % doesn't work          \iupac{β-carotene} % doesn't work          β % doesn't work          \Chembeta % doesn't work          $\beta$ % works fine     \end{document}      I’m compiling the document with `lualatex`. * * * # Update Using a different font (namely, Linux Libertine or Times New Roman) solves the problem. Does that mean the Latin Modern family has no support for upright Greek letters?


title: How do I set \itemsep to rubber length?

text: I know that I can set `\itemsep` to any length like this,               \setlength{\itemsep}{0pt}      But if I want to set `\itemsep` to a rubber length (e.g. `\bigskip`), how do I do this?               \setlength{\itemsep}{\bigskip}       does not work.


title: setting \tabskip in a repeating \halign preamble

text: Is it somehow possible to set the `\tabskip` glue to zero for the first and last column in a repeated `\halign`? Eg.               % tabskip=0pt     \halign{&#\hfil\tabskip1em plus1em minus.5em\cr       Foo&Bar&Baz\cr       \noalign{\smallskip\hrule}     }     \bye      There you can see that for the last column, there is a tabskip after it. I would like to have a preamble which has zero tabskip for the first and last column. Is this somehow possible?


title: How to prepare a PSTricks-like canvas (or drawing area) in PGF/Tikz before drawing other objects inside it?

text: Objectives:   1. To show a canvas bounding box with a specified size in advance. In other words, I want to create a `\begin{pspicture}(-2,-2)(3,3)`-like canvas before drawing other objects inside it. I don't like auto-determined canvas size produced by Tikz because of some reasons.   2. To show the colored grid with numbers along its axes for navigation purpose. It also clips any objects beyond its boundary. The grid can be applied to the canvas in 2 ways: permanent and temporary.   3. To hide **GLOBALLY** the temporary grid at the final phase without having to make adjustment one by one per `\tikzpicture` (that is tedious). It is better if I provide the example in PSTricks to make it clearer. * * * ## PSTricks ![alt text](http://i.stack.imgur.com/IN6DB.png)               \documentclass[dvipsnames,dvips,rgb]{minimal}     \usepackage{pstricks}          \newpsstyle{gridstyle}{%     gridwidth=0.4pt,%default: 0.8pt     gridcolor=Red!10,%default: black     griddots=0,%default: 0      %     gridlabels=3pt,%default: 10pt     gridlabelcolor=Blue,%default: black     %     subgriddiv=5,%default: 5     subgridwidth=0.2pt,%default: 0.4pt     subgridcolor=Green!10,%default: gray     subgriddots=0%default: 0     }          \psset{style=gridstyle}                    %To remove the grid globally, please remove th following comment.      %\let\psgrid\relax          \begin{document}          \begin{pspicture}[showgrid](-2,-2)(3,3)         %Permanent grid has been setup.         %other objects start from here         \pscircle[fillstyle=solid,opacity=0.25,fillcolor=red](0.5,0.5){2}       \end{pspicture}           \vspace{1cm}          \begin{pspicture}(-2,-2)(3,3)         \psgrid%this is a temporary grid that can be hidden globally later.         %other objects start from here         \pscircle[fillstyle=solid,opacity=0.25,fillcolor=red](0.5,0.5){2}       \end{pspicture}      \end{document}      * * * ## PGF/Tikz My attempt below did not produce the same figure as the PSTricks did above. ![alt text](http://i.stack.imgur.com/heSVT.png)               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \clip (-2,-2) rectangle (3,3);     \draw (-2,-2) grid (3,3);     \draw[opacity=0.25,fill=red] (0.5,0.5) circle (2);      \end{tikzpicture}     \end{document}      * * * ## First attempt based on @Torbjorn's suggestion It is better but not similar to the PSTricks one given above.               \documentclass{minimal}     \usepackage{tikz}     \begin{document}          \newcommand{\grid}[4]{\draw [green] (#1,#2) grid (#3,#4);}          \begin{tikzpicture}     \clip (-2,-2) rectangle (3,3);     \draw [opacity=0.25,fill=red,draw=black] (0.5,0.5) circle (2);      \draw [green] (-2,-2) grid (3,3);%Permanent     \end{tikzpicture}          \vspace{1cm}          \begin{tikzpicture}     \clip (-2,-2) rectangle (3,3);     \draw [opacity=0.25,fill=red,draw=black] (0.5,0.5) circle (2);      %     %I hope it to be temporarily grid that can be removed globally later.     \grid{-2}{-2}{3}{3}     \end{tikzpicture}     \end{document}


title: Is the biblatex toggle behavior expected or should the result stabilize

text: In my previous question an issue arose due to the use of multiple bibliographies in the given solution, that I extended here. So the issue is that the numbering in the second bibliography toggles between two states, shown below: ![fixed](http://i.stack.imgur.com/CfqEv.png) ![fixed toggle](http://i.stack.imgur.com/J7A1p.png) Every run of `pdflatex` toggles between these two states. Is it a glitch? I haven't tested further, but as Andrew mentioned in the comments the problem may be the use of `defernumbers`. However, without them the second bibliography stays unsorted. Is it possible to stabilize the result? or is there a problem somewhere else when using the two bibliographies? **Edit.** This is a minimal version of the example below that also produces the same toggling behavior.               \documentclass{article}     % include bib from full example here     \usepackage[backend=biber,bibencoding=utf8,citestyle=numeric,defernumbers=true]{biblatex}          \bibliography{ref2}          \begin{document}     \cite{J2010, Z2010, Z2007, C2009, T2010}         \printbibliography     \newrefsection     \nocite{*}     \printbibliography[resetnumbers=true,keyword=publication,type=article,heading=subbibliography,title={Journals}]     \printbibliography[keyword=publication,type=inproceedings,heading=subbibliography,title={Conferences}]     \end{document}      **Original code for pictures:**               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents}{ref2.bib}     @INPROCEEDINGS{C2009,       author = {C H.},       title = {M},       booktitle = {C},       year = {2009},       month = oct     }     @INPROCEEDINGS{J2010,       author = {J O.},       title = {L},       booktitle = {P},       year = {2010}     }     @ARTICLE{T2010,       author = {X B.},       title = {E},       year = {2010},       month = jun,       journal = {I}     }     @ARTICLE{Z2010,       author = {B},       title = {L},       year = {2010},       volume = {19},       month = feb,       journal = {I}     }     @ARTICLE{Z2007,       author = {B},       title = {H},       year = {2007},       month = jan,       journal = {I}     }     @ARTICLE{K2013,       author = {K O.},       title = {B},       year = {2013},       month = feb,       journal = {I},       keywords = {publication}     }     @INPROCEEDINGS{K2012,       author = {K  O.},       title = {S},       booktitle = {I},       year = {2012},       month = jul,       keywords = {publication}     }     @ARTICLE{M2011,       author = {M O.},       title = {M},       year = {2011},       month = jun,       journal = {L},       keywords = {publication}     }     @INPROCEEDINGS{M2010,       author = {M O.},       title = {S},       booktitle = {A},       year = {2010},       month = aug,       keywords = {publication}     }     @ARTICLE{M2012,       author = {M O.},       title = {S},       year = {2012},       month = jul,       journal = {I},       keywords = {publication}     }          \end{filecontents}          \usepackage[backend=biber,style=ieee,bibencoding=utf8,sorting=cymat,defernumbers=true]{biblatex}          \DeclareSortingScheme{ymdtn}{       \sort{         \field{presort}       }       \sort[final]{         \field{sortkey}       }       \sort[direction=descending]{         \field{sortyear}         \field{year}         \literal{9999}       }       \sort[direction=descending]{         \field[padside=left,padwidth=2,padchar=0]{month}         \literal{99}       }       \sort[direction=descending]{         \field[padside=left,padwidth=2,padchar=0]{day}         \literal{99}       }       \sort{         \field{sorttitle}       }       \sort[direction=descending]{         \field[padside=left,padwidth=4,padchar=0]{volume}         \literal{9999}       }       \sort{         \name{sortname}         \name{author}         \name{editor}         \name{translator}         \field{sorttitle}         \field{title}       }     }     % sort in citation order and then by year/month, and author and title     \DeclareSortingScheme{cymat}{       \sort{\citeorder}       \sort{           \field{sortyear}           \field{year}           \literal{0}         }         \sort{           \field[padside=left,padwidth=2,padchar=0]{month}           \literal{0}         }         \sort[direction=descending]{           \field[padside=left,padwidth=2,padchar=0]{day}           \literal{99}         }       \sort{           \name{sortname}           \name{author}           \name{editor}           \name{translator}           \field{sorttitle}           \field{title}       }     }          \bibliography{ref2}          \pagestyle{empty}          \begin{document}     \cite{J2010, Z2010, Z2007, C2009, T2010}     \printbibliography%[sorting=cymat] % removed the sorting from here to the package     \newrefsection     \nocite{*}     \printbibliography[resetnumbers=true,keyword=publication,type=article,heading=subbibliography,title={Journals},sorting=ymdtn]     \printbibliography[keyword=publication,type=inproceedings,heading=subbibliography,title={Conferences},sorting=ymdtn]          \end{document}


title: Set width of algorithm environment (preferably document wide)

text: Looking for a way to set the width of an `algorithm` environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution. Found this one here (wrap an algorithm in a minipage in a float, which is relatively okay, but surely there's a simpler way)?               \documentclass{article}     \usepackage{algorithm}     \floatstyle{plain}     \newfloat{myalgo}{tbhp}{mya}          \newenvironment{Algorithm}[2][tbh]%     {\begin{myalgo}[#1]     \centering     \begin{minipage}{#2}     \begin{algorithm}[H]}%     {\end{algorithm}     \end{minipage}     \end{myalgo}}          \begin{document}     \begin{Algorithm}[t]{10cm}     \caption{Does work, though no nice solution.}     \end{Algorithm}     \end{document}


title: Complicated alignment within multiline equation

text: I'm having trouble getting the desired alignment behavior in a set of "sets" that I'm typesetting. I have a bunch of set definitions of the form               $$U = \{\text{$x$ $|$ $x$ satisfies some condition}\}$$      Of course, I want the equals signs to line up, which is easy enough to do with an `align*` environment. The problem is that for some of the sets, the "some condition" takes a couple of lines to state. I'd like like those lines to align after the `|` symbol. Of course, if I only had one set to define, then I could do the previous thing with the `align*` environment. However, I want to achieve both of the above behaviors in the same set of equations. How do I do this? EDIT: After seeing frabjous's answer below, I realized that I didn't emphasize (or even mention) one of the key difficulties. The `U`'s and `x`'s in my set definition are actually expressions with different lengths, so the second align point in each set definition is different. This prevents me from using an array environment. For instance, I could have something like the following: > X = {(p,q) | p=q+7 and something else very long that doesn't fit   > on one line} > > Y(1) = {x | x is prime} > > Z' = {(a,b,c) | the variables a, b, and c satisfy a condition that   > is too long for one line}. Sorry for not using tex in the above, but I think it makes it clear what is happening. Thanks for any help. EDIT 2: Thanks to Antal S-Z's nice answer, I was able to create a macro that does exactly what I wanted. In case anyone desires the same behavior, here it is.               \newcommand\Set[3]{\ensuremath{\{\text{#1 $|$ \parbox[t]{\widthof{#3}}{#2\}}}}}      You call it with 3 arguments. To get a set {x|P}, the first argument should be x, the second P (with newlines in it) and the third the longest line in your condition P. This is compatible with `align*`, so you can then do things like               \begin{align*}     A &= \Set{x}{P}{Q}\\     B &= \Set{y}{R}{S}     \end{align*}      and it typesets things correctly.


title: How to change line color in tabular?

text: How can I change the color of the lines (the frame) in a `tabular` environment? In the following MWE:               \begin{tabular}{c|c|c}     a&b&c \\ \hline     d&e&f \\ \hline     g&h&i     \end{tabular}      I would like the horizontal and vertical lines of the table to have, say a blue color.


title: \upharpoonright problem

text: Sometimes `\upharpoonright` prints the "restriction" (as it is supposed to do) on the output text file, but sometimes it prints horizontal bars (on top of the line) - which I don't know how to correct. How can I always get the "restriction" arrow?               \begin{corollary}      Suppose $A \subseteq B$ and $C$ is a club in $P_\kappa B$.      Then $C \upharpoonright A$ includes a club of $P_\kappa A$.      \end{corollary}


title: Tables do not align side by side

text: . . ![alt text](http://i.stack.imgur.com/nkqWz.png)               \usepackage{tabularx}     \usepackage{multicol}          \begin{table}[ht]     \begin{minipage}[b]{0.5\linewidth}%\centering     \begin{tabular}{|c|c|c|c|}     \hline         & One & Twp & Three \\      \hline     1 & Subject A: & Subject A & Subject  \\     2 & Subject B & Subject B& Subject  \\     3 & Subject C & Subject C & Subject   \\     4 & Subject D & Subject D & Subject  \\     4 & Subject E & Subject E & Subject   \\     5 &Subject F & Subject F & Subject  \\     6 & Subject G & Subject G & Subject  \\     7 &Subject H &Subject H &Subject   \\     \hline     \end{tabular}     \caption{Table 1}     \end{minipage}     \hspace{0.5cm}     \begin{minipage}[b]{0.5\linewidth}     \centering     \begin{tabular}{|c|c|c|c|}     \hline         & One & Twp & Three \\      \hline     1 & Subject A: & Subject A & Subject  \\     2 & Subject B & Subject B& Subject  \\     3 & Subject C & Subject C & Subject   \\     4 & Subject D & Subject D & Subject  \\     4 & Subject E & Subject E & Subject   \\     5 &Subject F & Subject F & Subject  \\     6 & Subject G & Subject G & Subject  \\     7 &Subject H &Subject H &Subject   \\     \hline     \end{tabular}     \caption{Table 2}     \end{minipage}     \end{table}      I am trying to create two tables side by side and in the PDF they do not appear aligned. Second table is slightly lower than the first one, I have no clue how to fix it. Any suggestion would be greatly appreciated. thanks Aku


title: for loop in pgfplots

text: I have a file with 3 columns, space separated. The first two columns represent the center of a circle (x,y) and the last column is the circle radius. I want to select every 4 rows (or more generally specifying row numbers in a list) and plot selected circles by a for loop. I do not seem to work it out in pgfplotstable. Any hints?! Thanks


title: Using achemso package, can't reference equations with \label and \ref

text: I have a manuscript in preparation with achemso class and package. I have equations in the equation environment, with `\label` and `\ref` used to automatically reference them in the text. This was working fine, along with labels in figures, schemes and tables, until yesterday when I updated the achemso, cleveref, hyperref packages. Now the references to figures, schemes and tables still works fine, but when I try to use it with my equations, I get ?? in the text no matter how many times I compile, even if I trash the aux files and start over. Here is what I think the relevant error message is from the log file/console output:               LaTeX Warning: Reference `eq:structprop' on page 1 undefined on input line 38.      [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./minimalexample.aux)          LaTeX Warning: There were undefined references.       and here is a minimal working example:               \documentclass[journal=jacsat,manuscript=article,layout=traditional]{achemso}          \setkeys{acs}{maxauthors=0}           \usepackage[version=3]{mhchem}            \title{title}          \author{some guy}          \email{someguy@someplace.somedomain}          \affiliation{some place}          \begin{document}           \section{Introduction}           some introductory text           \begin{equation}          \label{eq:structprop}          \delta_{g\to e^{\prime}}\propto\frac{M_{ge}^{2}M_{ee^{\prime}}^{2}}{(E_{ge}-\hbar\omega)^{2}\Gamma_{ge^{\prime}}}          \end{equation}           In \ref{eq:structprop}, $M$ represents a blah blah blah.          \end{document}      I hope this is sufficient information to help anyone kind enough to help me. If not I would be glad to add other information that could help. I note that if I just use the book class without achemso, I can get references to numbered equations to work right, this is why I think there is something specific about achemso that results in what I see. **EDIT** I have checked out my problem on both my PC at work and my Mac at home. I get the same problem, even when removing unnecessary line breaks in the equation environment. I saw Joseph Wright's comment, so I ran `\listfiles` (results pasted below). I also saw his last comment, so I checked my package versions and those are all the ones that I have. My hunch is that the issue lies with the new version of `cleveref`, since I was able to get `\ref` to work with equations before I updated `cleveref`, but not after, regardless of which version of `achemso` I was using. I could of course be wrong on that. I'll be happy to help if I can, but I don't know what else I can do from here. For now I'll try to go back to an earlier version of `cleveref`, if I can find one; otherwise I may just put equations within a user defined float and see if I can make it work like that. Thanks to everyone who has responded and helped. `\listfiles` result (from PC, using MiKTeX):                *File List*      achemso.cls    2011/12/30 v3.5k Submission to ACS journals      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)     mciteplus.sty    2008/09/30 v1.1 enhanced mcite      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file     geometry.sty    2002/07/08 v3.2 Page Geometry     geometry.cfg       helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS)       caption.sty    2011/11/10 v3.2e Customizing captions (AR)     caption3.sty    2011/11/01 v1.4a caption3 kernel (AR)      courier.sty    2005/04/12 PSNFSS-v9.2a (WaS)             float.sty    2001/11/08 v1.3d Float enhancements (AL)      graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX         infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)      ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)     mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS)      setspace.sty    2011/12/19 v6.7a set line spacing          url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.     cleveref.sty    2011/12/24{} v0.18.1{} Intelligent cross-referencing       jacsat.cfg    2011/12/30 v3.5k achemso configuration: J. Am. Chem. Soc.       natbib.sty    2010/09/13 8.31b (PWD, AO)      natmove.sty    2010/01/15 v1.1a Automatic citation moving with natbib       mhchem.sty    2011/06/03 v3.11 for typesetting chemical formulae       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)       twoopt.sty    2008/08/11 v1.5 Definitions with two optional arguments (HO)      amsmath.sty    2000/07/18 v2.13 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names        t1ptm.fd    2001/06/04 font definitions for T1/ptm.        t1phv.fd    2001/06/04 scalable font definitions for T1/phv.     ot1ztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OT1/ztmcm.     omlztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OML/ztmcm.     omsztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMS/ztmcm.     omxztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMX/ztmcm.       ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.      **END EDIT**


title: split a horizontal line into serveral lines in a table

text: I know `\cline{i-j}` to span a line from column i to j. But if in one line, I want a line only spanning from {1-1} and then {3-3} for example, how can I make it? | a | b | c | \--`` `` ``\-- |d | e | f | Thanks.


title: \input{glyphtounicode} with \pdfgentounicode=1 creates unwanted hyperlinks from link-like text

text: I often use `\input{glyphtounicode} \pdfgentounicode=1` to generate PDF-files whose contents paste with the correct Unicode codepoints. However I noticed that as a side effect of these commands, some weblinks are created that I didn't explicit call for (using for example `hyperref`).               \documentclass{article}          % If at least one of the following two lines is omitted,     % the two text strings won't generate weblinks.     \input{glyphtounicode}     \pdfgentounicode=1               \begin{document}          www.google.com          http://www.google.com/          \end{document}      If either of the two relevant commands above is omitted, `www.google.com` and `http://www.google.com/` will not appear as hyperlinks in the generated PDF- file. (I use Adobe Reader to view them.) Why? How can I prevent these text strings from producing hyperlinks?


title: Sample Metafont source for one character

text: I would just like to look at the Metafont source code for the lower-case 'a' in the Computer Modern font. Where could I find that? Or even better, if that source could be the answer to this question.


title: Color \ , [], {} and / in listings environment

text: I tried to color a source code listing as follows. I would like the \ to be the same color as the word that follows for example:               \documentclass in red including "\"     \usepackage in blue including "\"      I would like brackets `[ ]` in green, but black text between them and `{ }` and `/` in red, but the text within them in black and numbers in gray. The file:               \documentclass[10pt]{article}     \usepackage{bera}     \usepackage{xcolor}     \usepackage{listings}     \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,framerule=0pt,%         backgroundcolor=\color{gray!20},%         xleftmargin=\fboxsep,%         xrightmargin=\fboxsep,         language=[LaTeX]TeX,%         keywordstyle=\color{blue},%             texcsstyle=*\color{red}\bfseries,%             texcs={end,begin,documentclass},%             mathescape=false,escapechar=|,%             literate={<B>}{\textcolor{blue}{\string\usepackage}}1                  {<P>}{\textcolor{blue}{\string\graphicspath}}1                      {<I>}{\textcolor{green}{[}}1                  {<D>}{\textcolor{green}{]}\normalcolor}1                          {<$>}{\textcolor{red}{\{}\color{black}}1                          {<$$>}{\textcolor{red}{\}}\normalcolor}1                              }     \pagestyle{empty}     \begin{document}     \begin{lstlisting}     \documentclass<I>12pt<D><$>article<$$>     <B><$>xcolor<$$>     <B><$>listings<$$>     <B><I>options<D><$>graphicx<$$>     <P><$><$>img/pdf<$$><$$>     \begin<$>document<$$>     Text     \end<$>document<$$>     \end{lstlisting}     \end{document}      I should add (if possible), my idea is to get a text colored similarly to Texmaker. The output![enter image description here](http://i.stack.imgur.com/nxSwF.png) I only need color / and numbers. One more query, do I add a literate for every word you want in blue? Thanks


title: \pdfpageheight does not work in XeTeX?

text: The XeTeX reference manual says that this engine understands `\pdfpageheight` and `\pdfpagewidth`. However, is seems to ignore the requests to change paper size in the middle of the document. Consider this example (from https://www.tug.org/members/TUGboat/tb32-3/tb102veytsman-ebooks.pdf)               \documentclass{article}     \usepackage{everyshi,lipsum}     \pagestyle{empty}     \textheight500cm     \pdfpageheight500cm     \EveryShipout{\pdfpageheight=\pagetotal     \advance\pdfpageheight by 2in     \advance\pdfpageheight by 2\topmargin     \advance\pdfpageheight by \footskip     \advance\pdfpageheight by \textheight     \advance\pdfpageheight by -\pagegoal}     \begin{document}          \lipsum[3-5]     \pagebreak          This line has a footnote\footnote{\lipsum[6-8]}.     \lipsum[1]          And this line too\footnote{\lipsum[12]}.     \pagebreak          \end{document}        1. `pdflatex` produces two pages with different page heights as intended.   2. `lualatex` also works fine   3. `xelatex` (`XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)`, `xdvipdfmx-0.7.8`) produces two pages of the same height (letter), which is _not_ what I wanted. My questions:   1. Is this a bug in `xetex` or, possibly, in `xdvipdfmx`, or maybe I do something wrong?    2. Are there any workarounds - for example, using PostScript `\special`s instead of `\pdfpageheight`?


title: Insert date set with \date command

text: I searched all morning to do this. I want to insert in my custom title page the date, author, title set with the following commands               \date{The date}     \author{Me \and Other}     \title{the document title}      I want to insert those in my document anywhere (and my custom title page) * * * ## Solution               \makeatletter     \@date     \@title     \makeatother      For the authors you put it in a tabular               \begin{tabular}[t]{c}\@author \end{tabular}


title: parenthesis around underbrace too big

text: I have the problem that I want to have an equation with `underbrace` but the surrounding parenthesis shall not include the `underbrace`, i.e. should have the size as if the `underbrace` wasn't there. Here is the code I use:               \documentclass{article}     \usepackage{amsmath}     \begin{document}         $\exp \left(\gamma \underbrace{\begin{pmatrix} 1 & 2\\ 3 & 4 \end{pmatrix}}_\text{some text} \right)$     \end{document}      I'd like to have that the outer parenthesis have the same size and center as the parenthesis of the `pmatrix`. I tried `\Bigg(` but it looked slightly off and it only works for 2x2 matrices but not for 3x3. Any ideas?


title: Subcaption compatibility with ACM document class

text: I'm currently working on a paper for an ACM conference and they require me to use the sigplanconf.cls I want to use subcaption, but if I add               \usepackage{caption}     \usepackage{subcaption}      then I get the following messages :               Package caption Warning: Unsupported document class (or package) detected,     (caption)                usage of the caption package is not recommended.     [...]     ! Package caption Error: No float type 'copyrightbox' defined.      Anyone encounter that problem ? Is there a fix that doesn't require messing with the cls since I'm supposed to use it as is ? Full MWE :               \documentclass[10pt]{sigplanconf}          \usepackage{amsmath}          \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \conferenceinfo{XXX '13}{Date, Place.}      \copyrightyear{2013}      \copyrightdata{[numbers] \copyright2013 IEEE}          \title{Title Text}     \subtitle{Subtitle Text, if any}          \authorinfo{Name1}                {Affiliation1}                {Email1}          \maketitle          test          \end{document}


title: Improve list parsing command

text: > **This question led to part of a new package:**   >  `menukeys` I build a command to iterate over a list with changable seperators and it works like expected but I wonder if there is a faster or more elegant way to do it?               \documentclass{article}     \makeatletter     \RequirePackage{etoolbox}     \RequirePackage{xparse}          \def\tw@first@element#1{\fbox{\strut#1 (first)}}     \def\tw@middle@element#1{\fbox{\strut#1 (mid)}}     \def\tw@last@element#1{\fbox{\strut#1 (last)}}     \def\tw@single@element#1{\fbox{\strut#1 (single)}}          \def\tw@seperator{\fbox{\strut sep}}     \def\tw@precode{\fbox{\strut pre}}     \def\tw@postcode{\fbox{\strut post}}          \newcounter{tw@list@i}     \newcounter{tw@list@last}          \def\tw@input@seperator{,}          \DeclareListParser{\tw@do@menu}{,}     \DeclareListParser{\tw@do@list@count}{,}          \NewDocumentCommand{\setmenuseperator}{v}{%        \let\tw@do@menu\relax%        \let\tw@do@list@count\relax%        \DeclareListParser{\tw@do@menu}{#1}%        \DeclareListParser{\tw@do@list@count}{#1}%     }          \newcommand{\menu}[1]{%        \setcounter{tw@list@i}{1}%        \setcounter{tw@list@last}{0}%        \renewcommand*{\do}[1]{\stepcounter{tw@list@last}}%        \tw@do@list@count{#1}%        \tw@precode%        \renewcommand*{\do}[1]{%           \ifnumequal{1}{\value{tw@list@last}}{%              \tw@single@element{##1}%           }{%              \ifnumequal{1}{\value{tw@list@i}}{%                 \tw@first@element{##1}%              }{%                 \ifnumequal{\value{tw@list@i}}{\value{tw@list@last}}{%                    \tw@seperator\tw@last@element{##1}%                 }{%                    \tw@seperator\tw@middle@element{##1}%                 }%              }%           }%           \stepcounter{tw@list@i}%        }%        \tw@do@menu{#1}%        \tw@postcode%     }          \makeatother          \setlength{\parskip}{1cm}     \begin{document}     \menu{1,2,3,4}          \menu{Single Element}          \menu{A,B,C,D,E}          \setmenuseperator{/}     \menu{C:/Nutzer und Einstellungen/Desktop/Test}          % doesn’t work yet     %\setmenuseperator{\}     %\menu{C:\Nutzer und Einstellungen\Desktop\Test}      \end{document}      The requirements for the `\menu` command are the following   * Special treatment for single item lists   * Treat first and last list item other than the mid ones   * Insert a separator only between the elements   * add some code before and after the list ## Extra As you can imagine such commands should be used to format paths automatically, so it would be great if a `\` could be recognized as list separator.


title: Can't draw ending arrow using tikz

text: I need that red edges become arrows, I use `\draw[->]` but the end of the drawn line is the same as the beginning, this is not an arrow! This is my code:               \documentclass[demo]{article}     \usepackage{tikz,tikz-qtree}          \begin{document}     \begin{figure}[ht]\begin{center}\begin{tikzpicture}[grow'=up]     \Tree [.\node(8){8};             [.\node(5){5};                    [.\node(3){3};                       \node(1){1};                       \node(4){4}; ]                     \node(6){6}; ]                   \node(12){12}; ]     \begin{scope}[shift={(2in,0)}]     \Tree [.\node(H){H};             [.\node(E){E};                    [.\node(C){C};                       \node(A){A};                       \node(D){D}; ]                     \node(F){F}; ]                   \node(O){O}; ]     \end{scope}     \draw[->,thick,red](8)  to[out=315,in=225] node[below]{g} (H);     \draw[->,thick,red](12) to[out=315,in=225] node[below]{g} (O);     \draw[->,thick,red](5)  to[out=315,in=225] node[below]{g} (E);     \draw[->,thick,red](3)  to[out=315,in=225] node[below]{g} (C);     %etc...     \end{tikzpicture}\end{center}\end{figure}     \end{document}      and this is the image produced: ![enter image description here](http://i.stack.imgur.com/q2c11.png)


title: Limit \listoffigures to several chapters of an entire book?

text: I use book class and have several chapters in it. However, I want to limit the number of chapters that are included in `\listoffigures` to less number then there actually are chapters. How could this be done?


title: Removing x and y ticks in PGFplot

text: I'm trying to disable the ticks from showing on this diagram: I've tried using `x tick=empty` as you can see, but it doesn't appear to change anything since I'm not actually plotting in the axis, only using it for easy construction. Any ideas?               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}[scale=0.9]     \begin{axis}[xtick=\empty, ytick=\empty, minor tick num=0, scaled ticks=false, xticklabel=\empty,yticklabel=\empty,axis x line=bottom,axis y line=left,xlabel={Volume}, ylabel={Pressure}]     \end{axis}     \draw [very thick][-latex](160pt,20pt)..controls(100pt,25pt) and (60pt,45pt)..(42pt,58pt);     \draw [very thick][-latex] (40pt,60pt)--(40pt,126pt);     \draw [very thick][-latex] (40pt,130pt)..controls(60pt,90pt) and (100pt,70pt)..(157pt,60pt);     \draw [very thick][-latex] (160pt,60pt)--(160pt,23pt);     \filldraw(40pt,60pt)circle(2pt) (40pt,130pt)circle (2pt)(160pt,60pt)circle(2pt)(160pt,20pt)circle(2pt);     \draw (160pt,20pt) node [below right] {$1$};     \draw (40pt,60pt) node [below left] {$2$};     \draw (40pt,130pt) node [left] {$3$};     \draw (160pt,60pt) node [above right] {$4$};     \end{tikzpicture}     \end{document}


title: biber/biblatex: \printbibliography spits out section heading despite filters/checks

text: With a setup as reproduced below, I end up with a section heading "Book Chapters" being produced although there is no bib entry to be printed. This leaves me (in my complete setting) with a bunch of empty headings for empty bib sections. A sample document:               \documentclass[a4paper]{article}     \pagestyle{empty}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}          \usepackage{textcomp}     \usepackage[autostyle]{csquotes}          \usepackage{filecontents}     \usepackage[style=alphabetic,%     backend=biber,%     language=english,%     isbn=false,%     url=true,%     maxbibnames=99%     ]{biblatex}          \begin{filecontents*}{test.bib}     @inbook{my:key,       author    = {AAA BBB and CCC DDD},       title     = {An Introduction},       year      = {2012},       booktitle = {YYY},       pages     = {111-222},       publisher = {LePub},       series    = {The Series},       keywords   = {authored}     }     \end{filecontents*}               \defbibfilter{bookChapters}{%       type=inbook or type=incollection     }          \defbibcheck{byYear}{%       \iffieldint{year}       {\ifnumless{\thefield{year}}{2013}         {\skipentry}         {}}       {\skipentry}     }          \bibliography{test}          \begin{document}     \nocite{*}          \printbibliography[title={Book Chapters},%       heading=subbibliography,%       check=byYear,%       keyword=authored,%       sorting=ydnt,%       filter=bookChapters]          \end{document}      I crawled the biblatex reference, but it did not come up with a solution for me. I am running biber 1.1 and biblatex 2.1. I'd appreciate your help.


title: How do I make \hat{i} pretty?

text: I'm looking for a way to make the hat in `\hat{i}` replace the dot. I can't find anything on Google, and am seemingly too dumb to figure it out myself.


title: Endfloat. Include chapter prefix in marker

text: How can I get the chapter prefix into the Endfloat marker in 'Table/Figure X about here'? For example, rather than have 'Table 1 about here' in the text of chapter 2, how can I have 'Table 2.1 about here'? Is there a workaround for this?               \documentclass[a4paper,12pt,twoside]{book}     \usepackage{pdflscape}     \usepackage[tablesfirst]{endfloat}     %\usepackage{titletoc}          %\renewcommand{\theposttable}{\Roman{posttbl}}     %\renewcommand{\thepostfigure}{\Roman{postfig}}     %\renewcommand{\thefigure}{\Roman{figure}}     %\renewcommand{\thetable}{\Roman{table}}          % new environment for landscape tables         \newenvironment{ltable}         {\begin{landscape}\begin{table}}         {\end{table}\end{landscape}}          % make it known to endfloat     \DeclareDelayedFloatFlavor{ltable}{table}          \begin{document}          \chapter{This is Chapter 1}     \startlist{lot}     Some text in chapter 1.  See my figure \ref{tab:table1}.          \begin{table}     \caption{First Table} \label{tab:table1}     \end{table}          \begin{table}     \caption{Second Table} \label{tab:table2}     \end{table}          \processdelayedfloats          \chapter{This is Chapter 2}     \startlist{lot}     Some text in chapter 2.  See my figure \ref{tab:table2}.          \begin{ltable}     \caption{Third Table} \label{tab:table3}     \end{ltable}          \begin{ltable}     \caption{Fourth Table} \label{tab:table4}     \end{ltable}          \begin{figure}     \caption{Fifth Table} \label{fig:table5}     \end{figure}          \processdelayedfloats          \end{document}      I'd be happy to modify Endfloat.sty if absolutely necessary, but don't know how.


title: How to typeset multiple equations center aligned but with single eq. number?

text: I want to typeset several equations with only one equation number vertically centered, and every equation horizontally center. I know two options. One is `aligned` environment within `equation`, which handles equation number nicely, but the default alignment (without any `&`) is right alignment; and you know, you can't rely on `&` to force center alignment. Another is `IEEEeqnarray` environment, which handles alignment nicely, but the equation numbering of which is somewhat awkward since numbering is processed on a line-to-line basis, as far as I know (if the number of equations is even, or equations take different vertical space, you will be screwed). Any idea about this? Maybe I missed some functionality of `aligned` or `IEEEeqnarray`?