title: Long Subequation in LaTeX

text: I'm using the amsmath package, in the subequations environment I have the following set of equations               \begin{subequations}     \begin{align}     &\rho\left(u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial r}\right)=-\frac{\partial P}{\partial x}+\frac{M^2_\infty}{Re}\frac{1}{r}\frac{\partial}{\partial r}\left(\mu r\frac{\partial u}{\partial r}\right)\\     &\rho\left(u\frac{\partial h}{\partial x}+v\frac{\partial h}{\partial r}\right)=\rho\left(u\frac{\partial P}{\partial x}+v\frac{\partial P}{\partial r}\right)+\frac{M^2_\infty}{Re\dot Pr}\frac{1}{r}\frac{\partial}{\partial r}\left(\mu r\frac{\partial h}{\partial r}\right)+\frac{M^2_\infty}{Re}\mu\left(\frac{\partial u}{\partial r}\right)^2     \end{align}     \end{subequations}      Using this code, the reference for the second equation is pushed to the line below. What I'm trying to figure out is how to send               +\frac{M^2_\infty}{Re}\mu\left(\frac{\partial u}{\partial r}\right)^2      onto another line, aline it with the equals signs without it gaining it's own equation reference. Any ideas?


title: Font problem when editing TeX produced pdf in external software

text: When I try to import TeX/LaTeX produced pdf code in Inkscape, then I loose a lot of the interletter and interword spacing, almost all interword spacing is shown wrong, the exponents are not at their normal place, glyphs interlap and so on. Is there anything in the pdf code that TeX produces that can cause that strange behaviour? I use pdftex.


title: An environment for two-way rules in category theory

text: I want to typeset some category-theoretic calculations involving adjunctions (sometimes called _two-way rules_ ). In short, they look approximately like this (MWE):               \documentclass[a4paper]{article}     \usepackage{amsmath}          \begin{document}     \begin{align*}     C &\longrightarrow FD\\     \line(1,0){75}&\line(1,0){75}\\     GC &\longrightarrow D\\     \line(1,0){75}&\line(1,0){75}\\     1 &\longrightarrow D^{GC}     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/e62SN.png) Of course, this looks horrendous, but it should get the approximate idea across. I would like to have an environment (called, say, `adjunctions`) which allows me to input the above as, e.g.:               \begin{adjunctions}     C & FD \\     GC & D \\     1 & D^{GC}     \end{adjunctions}      There are several things that I need:   * An option to set the width of the lines (which is universal throughout the environment), perhaps with the possibility to make them asymmetrical (i.e. longer to the left than to the right);   * Proper spacing; in the example above, the spacing between `GC \to D` and the line above it is about what I'm looking for, both top and bottom-margin;   * Optionally, control over the symbol going at the place of `\longrightarrow` (universal throughout the environment is fine). I have looked around on the internet, but I couldn't find anything (not even a properly typeset image). General references for creating custom `align`-like environments are also very much appreciated.


title: Problem with hyperref and bookmark

text: I use TeXnicCenter 2.02 Stable (32-bit) and MiKTeX 2.9.4533 (32-bit) on a 64-bit Windows 7. I just installed both the 32-bit softwares (uninstalling the 64-bit ones) to check wether the problem was in the architecture or not. Seems not. I've taken a model for my master thesis, which includes the packages `hyperref` and `bookmark`: When I try to build and view, LaTeX -> DVI, this simple code               \documentclass[10pt,a4paper,twoside,openright,oneside,openany,]{book}     \usepackage{hyperref}     \usepackage{bookmark}     \begin{document}     Hello world!     \end{document}      I get a MiKTeX Problem Report: > Some PostScript specials could not be rendered. If someone could help me suggesting how to fix that problem, I would be very grateful.


title: beamerposter passing portrait options to custom theme

text: Hi I'm preparing a custom theme for beamerposter to align with the theme of my institution. I have to include a figure banner on the headline plus the possibility to include 2 different logos. So far I've done like this in the .sty file               \setbeamertemplate{headline}{       \leavevmode      \parbox{\textwidth}{\includegraphics[width=\paperwidth]{poster-banner}}      \vskip-35ex      \begin{beamercolorbox}[wd=\paperwidth]{headline}      \begin{columns}[T]       \begin{column}{.2\paperwidth}         \begin{center}            \ifdefined\LeftLogo            \includegraphics[width=.6\linewidth,keepaspectratio,clip]{\LeftLogo}            \else            \fi          \end{center}          \vskip1.5cm        \end{column}       \begin{column}{.65\paperwidth}         \hskip1ex         \vskip4ex         \raggedright         \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}         \usebeamercolor{author in headline}{\color{fg}\Large{\insertauthor}\\[0.5ex]}         \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}            \end{column}       \begin{column}{.15\paperwidth}         \begin{center}            \ifdefined\RightLogo            \includegraphics[width=.6\linewidth,keepaspectratio,clip]{\RightLogo}            \else            \fi          \end{center}          \vskip1.5cm      \end{column}     \end{columns}     \end{beamercolorbox}}      Where \RightLogo and \LeftLogo have been defined before the               \def\RightLogo{logoa.pdf}     \def\LeftLogo{logob.pdf}     \documentclass[final]{beamer}      The trick work nicely in portrait mode for beamerposter. But whenever I use landscape option the banner is too big in height. So I think I should pass the dimension of the banner and also the amoung of vskip differently according to the option passed to beamerposter (i.e. orientation=portrait, orientation = landscape). But I can't figure out how to infer this options. I hope I explain my self. I know that I should give a MWE but I hope it is sufficient as I've done


title: Add chapter to TOC without page number

text: How can I add a chapter entry to TOC without showing the correspondent page number? my documentclass is `report` and I am generating my TOC like this:               \phantomsection      \pdfbookmark{\Contents}{contents}     \tableofcontents      Thank you.


title: smashoperator produces black line with Linux Libertine O

text: When I use fontspec to set the main font to "Linux Libertine O", the `smashoperator` command (and also `mathclap` and friends) produce a black line above the smashed subscript (with luatex). ![example of unwanted black line](http://i.stack.imgur.com/1h2Y0.png)               \documentclass{minimal}     \usepackage{mathtools}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}          \begin{document}          \[         \smashoperator{\sum_{i \in \mathrm{longidentifier}}} f(i)     \]          \end{document}      The problem does not occur with other fonts like Times New Roman or Linux Biolinum O. Is there a workaround?


title: Why does \includegraphics[\varone]{\vartwo} not compile?

text: I want to convert each EPS image imported from within the input file to a PDF version and save it with its original name separately. The code below simulates the real condition in which we don't want to make heavy modification. So I have to renew the definition of `\includegraphics` by appending the conversion process at the end. The conversion make use of an external template (`template.tex`) that is created on the fly when compiling the `inputfilename.tex`. For each invocation of `\includegraphics` in `inputfilename.tex`,               \immediate\write18{latex -jobname=#2 \unexpanded{"\def\varone{#1} \def\vartwo{#2} \input{template}"} && dvips #2 && ps2pdf -dAutoRotatePages=/None #2.ps}      will be invoked. It uses the template `template.tex` and gets two parameters `\varone` and `\vartwo` from `#1` and `#2` of `\includegraphics`. However, the following code does not compile with errors that you can see by yourself. The code must be compiled with `pdflatex -shell-escape inputfilename`.               % inputfilename.tex      \documentclass{book}     \usepackage{filecontents}     \begin{filecontents*}{template.tex}     \documentclass[preview,border=0pt,graphics]{standalone}     \usepackage{graphicx}     %\makeatletter     %\define@key{Gin}{width}{}     %\define@key{Gin}{scale}{}     %\define@key{Gin}{height}{}     %\makeatother     \begin{document}     \includegraphics[\varone]{\vartwo}     \end{document}     \end{filecontents*}          \usepackage{graphicx}                    \let\temp\includegraphics          \renewcommand\includegraphics[2][]{%         \temp[#1]{#2}%         %\immediate\write18{latex -jobname=#2 "\def\noexpand\varone{#1} \def\noexpand\vartwo{#2} \noexpand\input{template}" && dvips #2 && ps2pdf -dAutoRotatePages=/None #2.ps}%         \immediate\write18{latex -jobname=#2 \unexpanded{"\def\varone{#1} \def\vartwo{#2} \input{template}"} && dvips #2 && ps2pdf -dAutoRotatePages=/None #2.ps}%     }          \begin{document}     \chapter{A}     \begin{figure}[hbtp]     \centering     \includegraphics[scale=.5]{example-image-a}     \caption{A}     \label{fig:A}     \end{figure}     A \ldots          \chapter{B}     \begin{figure}[hbtp]     \centering     \includegraphics[scale=.75]{example-image-b}     \caption{B}     \label{fig:B}     \end{figure}     B \ldots          \chapter{B}     \begin{figure}[hbtp]     \centering     \includegraphics[scale=1]{example-image-c}     \caption{C}     \label{fig:C}     \end{figure}     C \ldots          \end{document}      How to solve it?


title: Inserting the slope inside a log-log chart with pgfplots

text: I would like to insert the slope inside a log-log chart with `pgfplots`. I checked both the `pgfplots` documentation and the net, but I didn't find something helpful about this problem. Here is the MWE:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usepackage{amsmath,amssymb}     \begin{document}          \begin{tikzpicture}         \begin{loglogaxis}[          xlabel={x},          ylabel={y},          xmin=0.01, xmax=0.10,          ymin=200, ymax=750,          width=.8\columnwidth,          /pgfplots/log ticks with fixed point,          /pgfplots/ytick={250,300,400,...,700}]          ]          \addplot          coordinates{          (0.0090,   704.11)          (0.0300,   476.05)          (0.0600,   379.49)          (0.0900,   332.26)          (0.1005,   320.46)          };          \end{loglogaxis}     \end{tikzpicture}     \end{document}


title: Coloured equation number (without changing colour of reference using hyperref)

text: I am working on a file where I am using the package `hyperref` so that the references to equations are linked and coloured. Here is a MWE:               \documentclass{article}     \usepackage{amsmath}     \usepackage{hyperref}     \hypersetup{colorlinks=true}          \begin{document}          \begin{equation}     1=\beta\left[ \frac{ 1+\left( 1-\tau_{t+1}\right) r_{t} }{\Pi_{t+1}} \right]\label{Fisher}     \end{equation}          Make reference to \eqref{Fisher}.          \end{document}      This gives me the reference at the end red, which is great. Now I want to have the equation number in blue (not the reference to the equation, but the equation number itself). I achieve that by adding               \renewcommand\theequation{{\color{blue}\arabic{equation}}}      to the preamble, before of after `hyperref` (the result seems to be the same). On first compile, great, I get the exact result I want: the equation number is blue, and the reference to the equation is in red: ![enter image description here](http://i.stack.imgur.com/KX7Sn.png) **but a second compile will turn both the equation number and the reference to the equation blue**! How can I avoid that, and have my equation number in blue not interfere with the equation reference colour from hyperref?


title: Clash between bibentry and hyperref

text: Created a document that cites a number of publications within text using the bibentry package. Then I noticed that the zoom was set too large. Thought I could fix this using the hyperref package but this seems to introduce some sort of conflict. Below is some code that replicates the problem along with a sample reference. Hope someone can help me understand what's going wrong here. Tried researching this online but didn't find anything that seemed to address this particular problem. Thanks, Paul               \documentclass{article}     \usepackage{bibentry}     % \usepackage{hyperref}     % \hypersetup{pdfstartview={XYZ null null 1.00}}     \begin{document}          \bibliographystyle{abbrv}     \nobibliography{ResumeBibliography}          \subsection*{Sample Referefence}          \bibentry{Goossens1994LaTeX}           \end{document}               @book{Goossens1994LaTeX,       author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},       title = {The \LaTeX{} Companion, $2^{nd}$ Edition},       publisher = {Addison-Wesley},       year = {1994{.}}     }


title: How can a macro know how many times a value has appeared and will appear?

text: Using ConTeXt, I have a macro which can be given a unique key value:               \macro{000010}     \macro{000011}     \macro{000010}     \macro{000010}     \macro{000012}     \macro{000011}      I need to be able to access information on the number of times that value has appeared so far in the document and the number of times that value appears in total. The code above would give me this information:               1/3     1/2     2/3     3/3     1/1     2/2      The information is not simply displayed in the page, I need to access this information for use in conditionals. How can I obtain information on how many times a macro has held a certain value and how many times it will in the entire document?


title: how to stop Extrainfo appearing in cover letter?

text: I am using Texmaker to update my CV, but i am having problem with the \extrainfo. I am using moderncv documentclass and moderncvstyle {classic}. I want extrainfo to appear in my curriculum but not in my cover letter. Latex Template code is given below:               \documentclass[11pt,a4paper,sans]{moderncv}     \pagestyle{fancy}     \usepackage{moderntimeline}     \moderncvstyle{classic}     \moderncvcolor{green}     \usepackage[utf8]{inputenc}     \usepackage[scale=0.75]{geometry}     \name{John}{Doe}     \title{Resumé title}      \address{street and number}{postcode city}{country}     \phone[mobile]{+1~(234)~567~890}     \phone[fixed]{+2~(345)~678~901}     \phone[fax]{+3~(456)~789~012}     \email{john@doe.org}      \homepage{www.johndoe.com}     \extrainfo{additional information}     \photo[64pt][0.4pt]{picture}     \quote{Some quote}     \begin{document}     \makecvtitle      Then code goes on with section, subsections for CV until we arrive at the coverleter part                   \recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}         \date{January 01, 1984}         \opening{Dear Sir or Madam,}         \closing{Yours faithfully,}         \enclosure[Attached]{curriculum vit\ae{}}           \makelettertitle         \makeletterclosing         \end{document}      What i get in Cv and cover letter is shown below: ![enter image description here](http://i.stack.imgur.com/ebcx0.png) Same 'Additional information' appear in the cover letter as:![enter image description here](http://i.stack.imgur.com/6XaAN.png) Now I want to keep this Additional information in my Cv but want to remove it from the cover letter. Any help????


title: Align the n's in the equation

text: In the following code, how do I align the `n`'s? Here is the MWE:               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     \begin{align}     n \propto exp(-U/kT) \notag \\     \Rightarrow \quad n  = A.exp(-U/kT) \notag     \end{align}     \end{document}      ![](http://i.stack.imgur.com/VRdCr.png)


This type of error (! Package PGF Math Error: Sorry, an internal routine of the floating point unit got an ill-formatted floating point number ...) arises when trying to use a predefined list for the `\pgfplotsforeachungrouped`-loop. This problem is related to parameter studies where all significant parameters are put into a list, e.g. Create Table for a Family of Curves. Following MWE shows the compiling error:               \documentclass[border=1mm]{standalone}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.8}          \pgfplotstableread{     1     2     3     4     5     }\dataQuad          \newcommand{\param}{2,3,4,5}          \pgfplotsforeachungrouped \y in \param {%         \pgfplotstablecreatecol[             create col/expr={\thisrow{0}^\y}         ]{\y}\dataQuad     }          \begin{document}         \begin{minipage}[c]{0.75\textwidth}             \begin{tikzpicture}                 \begin{axis}[%                     legend pos=north west,                     domain=0:5,                     cycle list={green, red, black, purple, orange},                     xlabel=${x}$,                     ylabel=${y}$]                 \pgfplotsinvokeforeach{2,...,5}{                         \addplot +[smooth] table [x index=0, y=#1] \dataQuad;                 }                 \end{axis}             \end{tikzpicture}         \end{minipage}              \begin{minipage}[c]{0.75\textwidth}             \pgfplotstabletypeset\dataQuad         \end{minipage}     \end{document}      A similar problem was discussed here Using Macro Defined Lists in TikZ/PGFplots, but don't bring any solution for this particular problem. So far I use `\newcommand{\paramA}{2}`,`\newcommand{\paramB}{3}`, and so forth and looping via `\pgfplotsforeachungrouped \y in {\paramA,...,\paramE} {%`. The main drawback with this is when I need to change the number of parameters. May someone have a more elegant way for using a predefined parameter list that can be used for every loop type like `\foreach`, `\pgfplotsforeachungrouped` and `\pgfplotsinvokeforeach`. Any hint is much appreciated!


title: part number (1, 2, 3) as word (one, deux, trois)?

text: Can someone please explain to me, why I get: ## Part ONE but then: ## Part DEUX ## Part TROIS * * * In addition to an explanation, any successful solution to this rather odd phenomenon would be highly appreciated. * * *               % !TEX TS-program = lualatexmk     \documentclass[oneside]{scrbook}     \usepackage[french,british]{babel}     \usepackage{fontspec}     \usepackage{relsize}     \usepackage{fmtcount}       %For ''Part One'' instead of ''Part 1''     \usepackage{titlesec}         \renewcommand*{\partformat}{\partname~\numberstring{part}}     \begin{document}         \part{This is Just a Part}         \part{This is Yet another Part}         \part{And, in Fact, One More}     \end{document}


title: Chords between nodes on a clock-like diagram using TikZ

text: I'm trying to create a series of illustrations of clock faces with chords going between nodes. I'd like to start at the 12 o'clock position, then draw a chord to the number at n positions away repeatedly until returning to 12 (e.g., if n were 3 I'd like chords on the clock face going from 12-3-6-9-12; if n were 5 I'd want to go 12-5-10-3-8-1-6-11-4-9-2-7-12). Based on other code I've found online I'm drawing the clock like this:               \newcommand{\TikZMGClockMath}[2]{% Diameter; num. of nodes to skip       \pgfmathsetmacro{\angle}{360/12};%       \draw (0,0) circle (#1);            \foreach \i in {1,...,12} {         \begin{scope}[rotate=-\i * \angle]         \node (p\i) at (0,#1) {$\bullet$};         \node at (0,#1+0.3) {\i};         \end{scope}       }     }          \begin{tikzpicture}     \TikZMGClockMath{3}{3}     \end{tikzpicture}      I was hoping that this would let me easily create a series of nodes to traverse (e.g., p12--p5--p10--,...,--p12), but as a newcomer to TikZ the task has proven to be beyond me. In a standard programming language I guess I'd create an array using mod(), but I'm not sure how to accomplish that here. Any suggestions as to how I might do this would be greatly appreciated.


title: Condition within condition

text: Consider the following logical satatements:               If \conditionA != 100 and \conditionB != 100 do ``Something~A''     If \conditionA != 100 and \conditionB  = 100 do ``Something~B''     If \conditionA  = 100 and \conditionB != 100 do ``Something~C''     If \conditionA  = 100 and \conditionB  = 100 do ``Something~D''      How do I translate this into a               \ifnum ... do ... \else do ... \fi      type of argument? I've found this post by Joseph Wright but I can't figure out how to modify the example to make it do what I would like. P.S. Feel free to add missing tags.


title: Setting parent of a counter and removing counter from caption

text: I guess, I have two questions. My very concrete problem is that I want `\caption{xyz}` to not print a table counter within a table. By now it prints “Table 0.1: xyz“. How would I remove that? But maybe I want to keep the “1”. How can I remove the section parent from the table counter such that my output becomes “Table 1:”?


title: wavy division sign wanted

text: I would like to find or create a math relation symbol that resembles a division sign, except that the horizontal bar would instead be a tilde (\sim). Can anyone help with this?


title: Arrows coordinates in TikZ

text: I want to write a macro that uses TikZ to create a photo like this: ![example](http://blogs.msdn.com/cfs- filesystemfile.ashx/__key/communityserver-components- postattachments/00-07-14-56-31/Slide1.jpg). But, finally I came up with something like this: ![TikZ Picture](http://i.stack.imgur.com/TbQD9.png) As you see, the problem is that the arrows go to the wrong side of the end circle (they always go to the right side). Here is the source code of my example:               \documentclass[11pt]{scrartcl}     \usepackage[utf8]{inputenc}       \usepackage{tikz}     \usetikzlibrary{calc}      \makeatletter      \@namedef{color@1}{red!40}     \@namedef{color@2}{green!40}        \@namedef{color@3}{blue!40}      \@namedef{color@4}{cyan!40}       \@namedef{color@5}{magenta!40}      \@namedef{color@6}{yellow!40}              \newcommand{\graphitemize}[1]{%     \begin{tikzpicture}[every node/.style={align=center}]            \foreach \gritem [count=\xi] in {#1}  {\global\let\maxgritem\xi}            \foreach \gritem [count=\xi] in {#1}     {%      \pgfmathtruncatemacro{\angle}{360/\maxgritem*\xi}     \edef\col{\@nameuse{color@\xi}}     \node[circle,          ultra thick,          draw=white,          fill opacity=.5,          fill=\col,          minimum size=3cm] (satellite\xi) at (\angle:4cm) {\gritem };     }%          \foreach \gritem [count=\xi] in {#1}     {%      \pgfmathsetmacro{\xj}{mod(\xi, \maxgritem) + 1}     \edef\col{\@nameuse{color@\xi}}     \draw[<-,line width=.5cm,opacity=.5,\col] (satellite\xj) to[bend left] (satellite\xi);     }%     \end{tikzpicture}       }%          \begin{document}          \graphitemize{Phase 1,Phase 2, Phase 3, Phase 4}          \end{document}       Note that I adapted the code from Altermundus answer to this question. How can I fix the end position of the arrows?


title: JabRef + TeXStudio BibTeX problem

text: I have created a database of bibliography on Jabref named `Review.bib`. I have called this file in TexStudio. Out of 15 citations, 12 are perfectly fine but 3 are not cited at all. There is this sign `[?]` and even citation not added to reference list.


title: How can I get extra subtitles for chapter titles that also appear in the ToC?

text: I have several chapter titles that I would like to combine with subtitles, typeset in italics. For example, > ## Chapter Title > > _A very fine chapter indeed …_ Now, I found an approach on how to do this here, introducing a new `\Chapter` command, which now looks like this:               \newcommand\Chapter[2]{       \chapter[#1: {\itshape#2}]{#1\\[2ex]\Large\itshape#2}     }      This somewhat works (although it breaks TextMate's auto-recognition of chapters), but I would like these subtitles to also be visible in the Table of Contents. Like so: > ## Chapter Title > 1 > > _A very fine chapter indeed …_ Is there any way to achieve that? Note that my LaTeX fu is pretty limited, so I'm not sure where to even start.


title: \hyperref to a \label doesn't work ("empty destination key")

text: In one of my documents, I used the combination of `\label` with `\hyperref`. Now, I fail for some reason. I included the package:               \usepackage[colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}      Created a label somewhere in my text:               \label{key1}      And referenced it from the text:               \hyperref[key1]{there}      But xelatex gives me this:               Package hyperref Warning: Empty destination name,     (hyperref)                using `UNDEFINED' on input line 66.      What am I doing wrong? EDIT: Minimal working example:               \documentclass[a4paper, 12pt]{article}          \usepackage{xltxtra}     \usepackage[colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}          \begin{document}            Some text. \label{key1} Continuing.            Some more text (\hyperref[key1]{goto}).          \end{document}


title: Troubles with column width in the tables headings

text: Well, we all know that compose tables in LaTeX is not easy, however, despite the large number of existing packages and options to facilitate this, I still have some problems I could not solve, and I want to fix. The first one has to do with the column width. Especially when the cell has a lot of text or more frequently when the header has a longer title than the content width of that same column. This causes the contents of the tables present an awful justification, like it was made in M$ Word. My second problem is the vertical alignment, because I do not always seem right that the text aligns with the top edge of the cell. An example of that would be the following table:               \begin{table}[!htb]     \caption{Mezclas de Óxidos de Ir y Ru.} %Tabla 6.2.      \label{taula:oximixs2}     \begin{center}     \begin{tabular}{cp{30pt}p{30pt}p{55pt}p{45pt}p{43pt}} \hline     \textbf{Óxido}  & \textbf{Sal Precursora} & \textbf{Peso molecular (\si[detect-weight= true]{\g\per\mole})} & \textbf{Volumen de \BPChem{H\_2O} deionizada (\si[detect-weight= true]{\litre})} & \textbf{M (\si[detect-weight= true]{\mole\per\litre})} & \textbf{Cantidad de sal (\si[detect-weight= true]{\g})} \\ \hline     \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 80:20} & \BPChem{H\_2IrCl\_6} & 515 & 0.02 & 0.01 & 0.1030 \\      & \BPChem{RuCl\_3} & 261.42 & 0.005 & 0.01 & 0.0131 \\     \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 50:50} & \BPChem{H\_2IrCl\_6} & 515 & 0.0125 & 0.01 & 0.0644 \\      & \BPChem{RuCl\_3} & 261.42 & 0.0125 & 0.01 & 0.0327 \\      \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 20:80} & \BPChem{H\_2IrCl\_6} & 515    & 0.005  & 0.01 & 0.0258 \\      & \BPChem{RuCl\_3} & 261.42 & 0.02 & 0.01 & 0.0523 \\ \hline     \end{tabular}     \end{center}     \end{table}      Well, maybe without a preamble to build a minimal working example that does not tell you anything, so taking the minimal packages from the original document, this would be like:               \documentclass[notitlepage,openbib]{book}     \usepackage[utf8]{inputenc}     \usepackage[TS1,T1]{fontenc}     \usepackage[spanish,activeacute,mexico]{babel}     \usepackage[osf]{mathpazo}     \usepackage{amsmath,amsthm,amstext,amssymb}     \usepackage{multicol}     \usepackage[cbgreek]{bpchem}     \usepackage[per-mode=symbol]{siunitx}     \sisetup{     output-decimal-marker = {,},      range-units = brackets,     list-final-separator = { \translate{and} },     list-pair-separator = { \translate{and} },     range-phrase = { \translate{to (numerical range)} },     }          \begin{document}         \begin{table}[!htb]     \caption{Mezclas de Óxidos de Ir y Ru.} %Tabla 6.2.      \label{taula:oximixs2}     \begin{center}     \begin{tabular}{cp{30pt}p{30pt}p{55pt}p{45pt}p{43pt}} \hline     \textbf{Óxido}  & \textbf{Sal Precursora} & \textbf{Peso molecular (\si[detect-weight= true]{\g\per\mole})} & \textbf{Volumen de \BPChem{H\_2O} deionizada (\si[detect-weight= true]{\litre})} & \textbf{M (\si[detect-weight= true]{\mole\per\litre})} & \textbf{Cantidad de sal (\si[detect-weight= true]{\g})} \\ \hline     \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 80:20} & \BPChem{H\_2IrCl\_6} & 515 & 0.02 & 0.01 & 0.1030 \\      & \BPChem{RuCl\_3} & 261.42 & 0.005 & 0.01 & 0.0131 \\     \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 50:50} & \BPChem{H\_2IrCl\_6} & 515 & 0.0125 & 0.01 & 0.0644 \\      & \BPChem{RuCl\_3} & 261.42 & 0.0125 & 0.01 & 0.0327 \\      \multirow{2}{*}{\BPChem{Ir:Ru-O\_x} 20:80} & \BPChem{H\_2IrCl\_6} & 515    & 0.005  & 0.01 & 0.0258 \\      & \BPChem{RuCl\_3} & 261.42 & 0.02 & 0.01 & 0.0523 \\ \hline     \end{tabular}     \end{center}     \end{table}     \end{document}      The way I work is trial and error it is not the most efficient way, so suggestions are accepted.


title: Several footnotes in the section heading

text: How can I insert two footnotes in the section headings?               \chapter[aaa]{aaa\protect\footnotemark\footnotemark}          \footnotetext{some text1}     \footnotetext{some text2}      When I use this syntax, I come up with a 12 appearing on the top of aaa (without any comma between 1 and 2) and both of the footnotes on the bottom of the page are numbered 2! How can I change the numbers to symbols in the footnote?


title: Defining a macro with optional parameter

text: I like to define a macro with an optional parameter. As an example, consider a macro for the differential:               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{bm}          \newcommand\drm{\mathop{}\!\mathrm{d}}     \newcommand\Drm[1]{\mathop{}\!\mathrm{d^#1}}          \begin{document}          \begin{equation}     \int\limits_0^\infty \drm t \, f(t)     \end{equation}          \begin{equation}     \int\limits_0^\infty \Drm{3} r \, g(\bm{r})     \end{equation}          \end{document}      The macros for the differentials are taken from an earlier post. Apart from my own question, why is there a `\mathop{}` in the definition of the differentials? But second, how can I achieve a macro that puts both of them together? Like it is with `\sqrt`, where you can do `\sqrt{x}` or `\sqrt[3]{x}`. I like to do `\drm` or `\drm[3]`.


title: Producing different versions of a document

text: I am writing a documentation for a software environment which will be composed of several subfile put together using the `\include` command. The thing is, I would like to be able to output different version of the file so that I can print it for different kind of readers without actually modifying the overall documentation. For example, I would like to be able to generate a version of the file for the programmers, another for the risk analyst, another for the DB admin, each of them having access to different section. I know I could create several tex files, each including the right subsections, but I think I saw somewhere a way to do it using a parameter at compile-time. Anyway, I'm looking for suggestions. **EDIT:** If possible, I would like that the document created for each type of reader looks like it is the complete piece (correct chapter numbering etc...)


title: AMS theorems in table of contents

text: I am using the `amsthm` package. I defined some enviroments like               \theoremstyle{plain}     \newtheorem{theo}[subsection]{Theorem}     \newtheorem{satz}[subsection]{Satz}      the numbering works as expectect, counting the theorems as if they where subsections. However I also want them to appeare in the table of contend as if they where subsections. **UPDATE** To be more precise, say I have the fwollowing document:               \begin{document}     \tableofcontents          \chapter{Chapter One}          \section{Section A}     \begin{theo}[First Theorem]     Whatever.     \end{theo}          \section{Section B}     \begin{theo}[Second Theorem]     Whatever.     \end{theo}          \chapter{Chapter Two}          \section{Section A}      \begin{theo}[Third Theorem]     Whatever.     \end{theo}          \begin{theo}[Fourth Theorem]     Whatever.     \end{theo}     \end{document}      I want my Table of content to look like this               1. Chapter One         1.1 Section A             1.1.1 First Theorem         1.2 Section B             1.2.1 Second Theorem     2. Chapter Two         2.1 Section A             2.1.1 Third Theorem             2.1.2 Fourth Theorem


title: Disabling interword spacing for periods following capital letters

text: By default, LaTex inserts a longer, intersentence space after a period. The exception is if the period follows a capital letter, in which case an interword space is assumed. This thread describes the situation (and how to work around it) nicely: When should I use intersentence spacing `\@`? However, I _never_ follow acronyms with periods, so this behavior is a constant source of annoyance. It means that I always have to carefully proofread my document to make sure that I haven't forgotten the critical `\@` between my uppercase acronyms and trailing periods. Not only does this waste my time, it violates the very good idea that content and the busywork of formatting should be kept separate. Is there any way to modify this default behavior? ~~If the string ". " occurs in my document, I always want LaTex to use an intersentence space.~~


title: Inserting an image into a figure using psfrag

text: I'm trying to import figures from `Matlab` into a `LaTeX` document using `PSFrag`. For some of the figures I'd like to be able to add little images in particular places. I thought I'd be able to just add dummy tags in `Matlab` and replace them, as in               \psfrag{s14}[lt][lt]{%         \color[rgb]{0,0,0}         \setlength{\tabcolsep}{0pt}         \begin{tabular}{l}             \includegraphics[width = 0.8cm]{Simple2}         \end{tabular}}%      but for some reason it replaces the tag with the base figure (as in, the big plot I'm trying to add little images to) instead of the little image. Any solutions greatly appreciated.


title: If tug.org is down, where can I download TexLive?

text: If tug.org is down, where can I download/update TeX-Live?


title: TikZ's fixed point arithmetic not happy with arrows.meta

text: When I try to combine using the features of `arrows.meta` in a context where I'm also using `fixed point arithmetic`, I'm getting an error message. MWE:               \documentclass[border=8pt]{standalone}          \usepackage{fp}     \usepackage{tikz}     \usetikzlibrary{fixedpointarithmetic}     \usetikzlibrary{calc}     \usetikzlibrary{arrows.meta}          \pagestyle{empty}     \begin{document}          \begin{tikzpicture}[                         my arrow/.style={arrows={-Stealth[scale=1.5]}},                         fixed point arithmetic,                         ]       \coordinate (A) at (0,0);       \coordinate (B) at (60:3in);       \draw[my arrow] (A) --  (B);          \end{tikzpicture}          \end{document}      Here is the error message:               ! FP error: Illegal character \pgfarrowlength  found in float number!.     \FP@errmessage #1->\errmessage {FP error: #1!}          l.18   \draw[my arrow] (A) --  (B);          ?       How do I work around this?


title: Is it a bug? (LuaLaTeX AND [russian](Polyglossia OR Babel) AND Cleveref) => ERROR

text: So, with the following code               \documentclass[12pt, russian]{article}          \usepackage{fontspec}     \defaultfontfeatures{Ligatures={TeX},Renderer=Basic}     \setmainfont[Ligatures={TeX,Historical}]{Linux Libertine O}     \setsansfont{Linux Biolinum O}     \setmonofont{Inconsolata}     \usepackage{babel}     \usepackage{cleveref}            % \tracingall       % \tracingassigns=5       % \tracingmacros=2       % \tracingcommands=2       % \tracingrestores=1       % \tracingstats=0       % \tracingoutput=10       % \tracinggroups=10       % \tracingonline0          \begin{document}     123     \end{document}               %%% Local Variables:      %%% mode: latex     %%% TeX-master: t     %%% End:       I have the following error               ! Undefined control sequence.     \@tempa ^^@-\CYRR \cyri \cyrs                                  \cyru \cyrn \cyro \cyrk      l.3 \select@language{russian}          ? X      The word 'Risunok' stands for 'Picture' in Russian. (That's the word you get by stripping "\cir"s from what is in the error message.) Is it a bug? Any help or suggestions? (As you can conclude by playing with the code it's because of the exact combination in the title of the question - well, it is like so on my machine with fully updated TeX Live 2014).


title: Print screen img - png/eps loses quality with no scaling

text: I am trying to include image to LaTeX, but I loose quality. It is a print-screen with image and little bit of text and it looks awful after the conversion to PDF. I guess that DPI of the image is 90, it was taken in windows 8 with it's snipping tool. I can convert the image with no visual cost to EPS but not PDF. ANY suggestions, please ? EDIT: it almost looks like the image is rescaled to 99.99% I have tried to use pdflatex, ps2pdf, dvipdfm... nothing helped


title: Custom Compilation Messages

text: Is there a way to create custom compilation messages? For example               \msg{Compiling Chapter 1}     \input{chapter1.tex}     \msg{Finished chapter compilation}


title: Inclusion of TikZ package changes page dimensions

text: For some reason, inclusion of the TikZ package in a document seems to change the page size: the bottom of the page is slightly shorter if TikZ is included. A minimal example is               \documentclass{article}     \usepackage{tikz}     \begin{document}     Hi, there!     \end{document}      I'm compiling using pdflatex, from TeX Live 2013 (pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)). I assume that it won't make much of a difference when printing, except maybe if the page is centered. In that case, using TikZ would shift the contents of the entire page downwards a bit...


title: How to reference an inequality with \cref?

text: I have inequalities being referenced by `cref` as equations. 1-) How can I change that? (and still have inequalities with the same numbering as equations) 2-) How can I change that and have inequalities with their own numbering?               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{cleveref}     \usepackage[letterpaper]{geometry}     \begin{document}          \begin{flalign}     &f(x) \geq g(x)& \label{i:positivity}     \end{flalign}          Admitting that \cref{i:positivity} has a solution, ...            \end{document}


title: My bibliography has 2 parts. How to get the name right?

text: I'm using the basic class article/scrartcl. I have a (manually created) bibliography which consists of 2 parts. I am able to add the different parts under different names into the TOC by               \addcontentsline{toc}{section}{Primärliteratur}     \begin{thebibliography}     ...     \end{thebibliography}     \addcontentsline{toc}{section}{Internetquellen}     \begin{thebibliography}     ...     \end{thebibliography}      but I get the heading "Literatur" on both parts of the bibliography-section of course. If I try to insert \renewcommand{\bibname}{Internetquellen} before the second thebibliography-environment that doesn't help. What can I do to get 2 different headers for the bibliography?


title: Removing space in table with itemize environment

text: I have a table that has enumerate environment in it. The issue is that I have a blank line before the first item in the itemize environment. How can I remove it? ![enter image description here](http://i.stack.imgur.com/vDUfc.png)               \documentclass{article}     \usepackage{booktabs}     \usepackage{enumitem}          \newcommand{\fu}[1]{%     %\tightlist%     \begin{itemize}[nosep]%     #1%     \end{itemize}%     \vspace{-\baselineskip}\mbox{}}          \begin{document}          \begin{table}[htbp]       \centering       \begin{tabular}{l|p{0.6\textwidth}}         \toprule     \textbf{SB Solution Component} & \textbf{BB Data Satisfied}      \\\midrule     \textbf{Registration Module} & \fu{     \item Capability List     \item Representation List}     \\\midrule          \textbf{Sensing Data Module} & \fu{     \item Ready Signal     }     \\\midrule          \textbf{Contexts Module} & \fu{     \item Control List     \item Contexts     }     \\     \bottomrule       \end{tabular}       \caption{BB Data Satisfied for SB Solution Component}       \label{tab:data}     \end{table}          \end{document}


title: \vphantom and superscripts

text: The superscripts position is exactly the same for these two statements: `\vphantom{\int}^S` and `{}^S` How can I get the superscript higher up? **Edit** The `\int`is just an example. Here is another one: `\vphantom{)}^S` and `)^S`.


title: Chaptername not displayed in the header

text: I have a question regarding the header and footer. I am using memoir class and want to create a custom header which displays the name of the chapter. Below is the code I have so far, that doesnt show the chaptername. It seems to me that I have to define the \rightmark and \leftmark command, resp. but can I do this in a gerneric way ? Alternatively, when doing this:               \makeoddhead{pstest}{DUMMY ODD}{}{\thechapter}      then the number is printed, But how can output the name of the chapter ?               \documentclass[11pt,a4paper,article]{memoir}     \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{titlesec}          \makepagestyle{pstest}     \makeevenfoot{pstest}{\thepage}{}{}%page numbers at the outside     \makeoddfoot{pstest}{}{}{\thepage}     \makeheadrule{pstest}{\textwidth}{\normalrulethickness}     \makeevenhead{pstest}{\leftmark}{}{DUMMY EVEN} % small caps     \makeoddhead{pstest}{DUMMY ODD}{}{\rightmark}          \aliaspagestyle{chapter}{pstest}     \aliaspagestyle{section}{pstest}               \begin{document}     \pagestyle{pstest}     \chapter{Intro}     \blindtext[20]          \chapter{Methods}     \blindtext[20]          \end{document}      Thank you for any comments ! Edit 1: actually it seems that the \chaptername command gives just "chapter". Is this expected ?


title: Beamer --- Replace one word with another

text: I would like to replace one word with another in a paragraph in my Beamer presentation. Example: First Slide Roses are red Second Slide Flowers are red i.e. when I click, Roses should be replaced by Flowers Thank you


title: Defining a list environment with multiple optional arguments

text: I'm trying to define a `list` environment with multiple optional arguments and with a default values for those arguments. For example, creating a new environment with a name **`newenv`** , which accepts two arguments, and if they aren't present uses _default_ values:               \documentclass{article}     \usepackage{array}     \usepackage{multicol}     \usepackage{enumerate}          \begin{document}          \newenvironment{newenv}[2][2]     {\begin{multicols}[#1]\begin{enumerate}[#2]}     {\end{enumerate}\end{multicols}}          \begin{newenv}{2}{2}       \item a       \item b       \item c       \item d     \end{newenv}          \end{document}      What am I missing?


title: Using Kile's tools in scripts

text: I have just started using Kile, and I would like to set up some custom scripts for various things that may help speed up my writing. One thing I in particular would like to do it make a script that, if executed while the cursor is over the name of a label, gives me a preview of the environment that label sits inside. So for example, if I want to refer to some theorem, and I am not entirely certain I remember which label to refer to, I can type the label and use this script to quickly check in my bottom panel if that is indeed the correct theorem. Now, I think I can make the script select the desired part of the text, except that I am not sure if I can do a "find" command in the script. But I have not been able to find a way to make the script execute the preview of the selected area. Is this possible?


title: How to make different shape nodes in automata in TikZ?

text: This is my code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}          \begin{document}          \begin{tikzpicture}[shorten >=1pt,auto,node distance=7 cm, scale = 0.6, transform shape]                \node[initial,state] (A)                      {$e, n, s$};           \node[state]         (B) [right of=A]         {$w, (p+1)\%W, (p+1)\%N$};           \node[state]         (C) [below of=A]     {$(q+1)\%W, n, x$};                    \end{tikzpicture}          \end{document}      This is the following output: ![enter image description here](http://i.stack.imgur.com/eDOjj.png) How can I make all of them of same size? how to draw ellipse instead such that it doesn't look that big?


title: Making integral ∫ use \limits by default with unicode-math

text: How can I make the unicode integral symbol ∫ act as if it is followed by `\limits`? Classically `\usepackage[intlimits]{amsmath}` would do. But with `unicode-math` this does not help anymore. I also tried:               \documentclass{article}     \usepackage{unicode-math}     \setmathfont{XITS Math}          \usepackage{newunicodechar}     \newunicodechar{∫}{∫\limits}          \begin{document}         \[ ∫_a^b f(x) dx \]     \end{document}      But that seems to lead to an infinite recursion               ! TeX capacity exceeded, sorry [input stack size=5000].


title: Stand-alone LaTeX -compiler for Windows i.e. without installation? Some USB -stick?

text: My university here provides TeXnicCenter without compiler. I am unable to install the compiler due to permissions, I am forced to work in Windows environment during classes without traditional *ix tools such as `pdflatex`. I am now trying to find out a way to get my LaTeX -installations to something like USB-stick or other way without requiring permissions. I don't have root -computer co cannot get any below methods working. So how can I get LaTeX compiler for Windows without installation due to limited permissions in my university? **Perhaps related**   1. TeX Installation on USB   2. Standalone LaTeX editor/renderer for Windows?   3. What is a good LaTeX compiler for Windows?


title: wrapbox with tabular has extraneous vertical space

text: \begin{wrapfigure}{r}{0in}     \begin{tabular}{|p{2in}|}     \hline     \begin{verbatim}     Some stuff here, hi mom     abcdefghijklmno     \end{verbatim} \\     \hline     \end{tabular}     \end{wrapfigure}      This doesn't quite do what I want, as the box ends up with extraneous vertical space between the top line of the text and the top of the box. I definitely want verbatim text and the ability to wrap the text outside around the box.


title: Macro with local variables expanding over several tab-points

text: I finally developed from egreg's answer in my previous question ( Defining a macro with three optional arguments in the form \newmacro{a}{b}[c]{d}[e][f] and \newmacro{a}{b}[c]{d}*[f] ) While my original answer was about making a shorter code, I ended up with a ~190 lines package. For the curious you can check it here in github, and it is also documented here. The macro works fine, except for a display mode I would like to achieve: I want the macro to work inside tabular environments such as `array` or `align`: that would allow to typeset several function definitions preserving some alignment. However I found a problem. Let's took a look of the following code:               \documentclass{article}     \def\tempi{0}     \def\tempii{1}     \newcommand\mymacro[1]{       \let\tempiii\tempi       \def\tempi{#1\tempiii}       \def\tempii{#1}       \mymacroi     }     \newcommand\mymacroi{\tempi & \tempii}     \begin{document}     \[       \begin{array}{cccc}         a & \mymacro{1} & b \\         \mymacro{2} & \mymacro{3}       \end{array}     \]     \end{document}      It gets this result: ![a 10 1 b // 20 1 30 1](http://i.stack.imgur.com/ezeF8.png) Changing the definition of `\mymacroi`               \newcommand\mymacroi{\tempi , \tempii}      The new result is: ![1 10,1 b // 20,2 30,3](http://i.stack.imgur.com/hWZdP.png) In the first code, the changes in `\tempii` are not preserved after the tab character `&`. The second one shows the modification of `\tempii` (but does not align). Using `\begingroup` in `\mymacro`:               \newcommand\mymacro[1]{       \begingroup       \let\tempiii\tempi       \def\tempi{#1\tempiii}       \def\tempii{#1}       \mymacroi       \endgroup     }      And, with the original `\mymacroi` (the one with `&`) I get an error. So the problem is indeed trying to use `&` from the macro, while preserving changes local to my macro, while expanding these changes over several cells. * * * (In this MWE there is a circular reference which does not exist in my original macro.) * * * **Update:**   My original example was too simple to show some desired result, and given that my macro should work both inside tabular environment and non-tabular environments, I will mimic that in this MWE by redefining `\mymacroi`. I copy only the document environment.               \begin{document}     \[       \begin{array}{cccccc}         a & \mymacro{7} & b & \tempi & \tempii \\         \mymacro{2} & \mymacro{3} & \tempi & \tempii        \end{array}     \]     \renewcommand\mymacroi{%       \edef\tmp{\tempi,\tempii}%       \tmp     }     \par Test 1 \(\mymacro{5};\tempi,\tempii\)     \par Test 2 \(\mymacro{4};\tempi,\tempii\)     \end{document}      The expected result is:   ![array-check](http://i.stack.imgur.com/sn4Ma.png)   and   ![non-array-check](http://i.stack.imgur.com/UilVe.png)


title: IguanaTex doesn't access the LaTeX process

text: I run IguanaTex 32-bit in Office 2010 32-bit / Windows 7 SP1 64x with MikTeX 2.9 32-bit. When I try to compile some TeX things with IguanaTeX to PPT, I get the error `"Could not start process 'latex -interaction=batchmode "addin_tmp.tex"' GetLastError returned 0"`. The prompt `latex -interaction=batchmode "addin_tmp.tex"` runs properly on PowerShell 32-bit and 64-bit and on `cmd.exe` (both in C:\Temp). I already tried to repair and reinstall IguanaTeX and to run PPT with admin rights.


title: line 66: Missing number, treated as zero \end{frame}

text: \documentclass{beamer}          \usepackage[latin1]{inputenc}          \usetheme{Warsaw}     \usepackage[english]{babel}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage{array}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage[font=scriptsize,format=plain,justification=centering,labelformat=empty]{caption}     \usepackage{textcomp}     \usepackage{animate}          \title[Bose-Einstein Condensates and Superfluidity]{Bose-Einstein Condensates and Superfluidity}     \author{Pablo Ramos and Alessandro Genova}     \institute{Rutgers University}     \date{December 17, 2013}     \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}     \frametitle{Table of Contents}     \tableofcontents      \end{frame}          \section{Introduction}           \begin{frame}       \frametitle{What is a Bose-Einstein Condensate ($BEC$)}       \begin{columns}       \begin{column}{0.6\textwidth}         \begin{enumerate}           \item Collection of bosons (particles integer spin) at temperatures near to 0 \ \textdegree K           \item If the system is describe by $n_i=\frac{g_i}{e^{(\epsilon_i-\mu)/kT}+1}$              \begin{itemize}           \item Particles collapse $\Rightarrow$ Lowest quantum state           \item  Quantum effects become apparent on a macroscopic scale.           \end{itemize}           \item  Fritz London proposed BEC as a mechanism for superfluidity in 4He and superconductivity.           \end{enumerate}       \end{column}      \end{columns}      \end{frame}           \begin{frame}        \frametitle{Experimental evidence of BEC}        \begin{columns}        \begin{column}{0.6\textwidth}           \begin{itemize}            \item Kapitsa, Allen and Misener discovered He-4 $\Rightarrow$ superfluid, at $T < 2.17$ \textdegree K ($\lambda$ point).            \item First "pure" $BEC$ was created by Cornell and Wieman $\sim$ dilute vapor $\sim 2000$ Rb-87 atoms $T < 170 \ nK$.            \item $BEC$ applies to quasiparticles (solids). A magnon in an antiferromagnet (S=1)-Bose–Einstein statistics.            \end{itemize}        \end{column}        \begin{column}         \begin{center}            \includegraphics[width=0.6\textwidth]{pictures/BEC1.jpg}          \end{center}        \end{column}        \end{columns}      \end{frame}          \end{document}


title: What program is something like this created on?

text: Been trying to further improve my LaTeX skills, and such to make my notes look better. But I was curious if you guys could easily tell what program something like this was created in? http://www.maths.ed.ac.uk/~chris/NTh/Ch6_Sum2sq_Ch7_Fermat_descent.pdf ![enter image description here](http://i.stack.imgur.com/X3k9i.png)


title: Filling an area in a graph positionned with the positionning library

text: to me the following MWE should work:               \documentclass[a4paper,11pt]{article}          \usepackage{xunicode}% for XeTex!     \usepackage{fontspec}% for XeTex!     \usepackage{xltxtra} % for XeTex!          \usepackage[french]{babel}     \usepackage{tikz}     \usetikzlibrary{positioning}          \defaultfontfeatures{Scale=MatchLowercase}     \setromanfont[Mapping=tex−text]{Linux Libertine O}     \setsansfont [Mapping=tex−text]{Linux Biolinum O}     \setmonofont [Mapping=tex−text]{Inconsolata}          \begin{document}     \begin{figure}[ht]     \centering     \begin{tikzpicture}     [note/.style={draw,black,circle,inner sep=2mm},     label distance=-1mm,label position=below left,     double distance=.5mm]     \node[note,double]      (C)  [label=Do   ] {};     \node[note,left=of C]   (F)  [label=Fa   ] {};     \node[note,right=of C]  (G)  [label=Sol  ] {};     \node[note,right=of G]  (D)  [label=Ré   ] {};          \node[note,above=of F]  (A)  [label=La   ] {};     \node[note,right=of A]  (E)  [label=Mi   ] {};     \node[note,right=of E]  (B)  [label=Si   ] {};     \node[note,right=of B]  (Fd) [label= Fa♯] {};          \node[note,above=of A]  (Cd) [label= Do♯] {};     \node[note,right=of Cd] (Gd) [label=Sol♯] {};     \node[note,right=of Gd] (Dd) [label= Ré♯] {};     \node[note,right=of Dd] (Ad) [label= La♯] {};          %\draw (F)  -- (C)  -- (G)  -- (D);     %\draw (A)  -- (E)  -- (B)  -- (Fd);     %\draw (Cd) -- (Gd) -- (Dd) -- (Ad);     %     %\draw (F) -- (A)  -- (Cd);     %\draw (C) -- (E)  -- (Gd);     %\draw (G) -- (B)  -- (Dd);     %\draw (D) -- (Fd) -- (Ad);          \begin{scope}[fill=black!50]     \filldraw (C) -- (E)  -- (G) -- cycle; % DOM     \filldraw (A) -- (Cd) -- (E) -- cycle; % LAm     \end{scope}          \draw[dashed] (Cd.north) -- +(0cm ,6mm );     \draw[dashed] (Gd.north) -- +(0cm ,6mm );     \draw[dashed] (Dd.north) -- +(0cm ,6mm );     \draw[dashed] (Ad.north) -- +(0cm ,6mm );     \draw[dashed] (F.south)  -- +(0cm ,-6mm);     \draw[dashed] (C.south)  -- +(0cm ,-6mm);     \draw[dashed] (G.south)  -- +(0cm ,-6mm);     \draw[dashed] (D.south)  -- +(0cm ,-6mm);     \draw[dashed] (F.west)   -- +(-6mm,0cm );     \draw[dashed] (A.west)   -- +(-6mm,0cm );     \draw[dashed] (Cd.west)  -- +(-6mm,0cm );     \draw[dashed] (Ad.east)  -- +(6mm ,0cm );     \draw[dashed] (Fd.east)  -- +(6mm ,0cm );     \draw[dashed] (D.east)   -- +(6mm ,0cm );     \end{tikzpicture}     \end{figure}     \end{document}      But I do not get the desired result, that is 2 filled triangles with `black!50`. Instead I get this : ![Cayley graph](http://i.stack.imgur.com/4fJl4.png) Any reason why? Do you get the same result?


title: Problem with UTF-8 in meta data

text: my problem is the following, when I use UTF-8 in meta data is not working               \documentclass[10pt,a4paper]{article}     \usepackage[slovene]{babel}     \usepackage[utf8]{inputenc}               %Meta data     \pdfinfo{      /Author (Č ŽĆŠĐ)      /Title (Č ŽĆŠĐ)      /Keywords (Latex;Č;Ž;Ć;Š;Đ) }          \begin{document}          test utf-8 žćč          \end{document}      example of output (meta data) ![enter image description here](http://i.stack.imgur.com/Y4jbK.png) Why can not parse it Š,Č,Ž,Đ in meta data?


title: Double stroke fonts with unicode-math like dsfont

text: It is tempting to switch to `unicode-math`. But there is (at least) one point that I still don't like. That are the double stroke characters. They look simply terrible in `XITS Math`. Just compare: ![XITS Math](http://i.stack.imgur.com/kIaQ3.png) with ![dsfont](http://i.stack.imgur.com/XrPpT.png) Are there any better options with `unicode-math`? At least they should be `serif`!


title: zero-installation LaTeX-ish math for casual users?

text: I teach physics at a community college, often to biology majors who are not math or computer geeks. For certain assignments, I require them to type up materials that include math. A typical application is writing half a page of notes on a textbook chapter. In the past, I suggested that they use OpenOffice for this, and I wrote up some instructions for them on how to use its equation editor. This is awkward, however, when they want to print their work on campus, since most of the campus computer labs don't have OpenOffice. OO's equation editor is also rather clumsy IMO. Is there a better way to do this? I am looking for a solution that is cross-platform and has zero cost (and preferably one that is open source). My students do not already know LaTeX, so there has to be some kind of GUI. LyX has most of the same pros and cons as OO. I would really prefer a Web-2.0 zero-install solution rather than a standalone application. Google Docs has pretty decent math support now, and most of the math features are fairly easy to use, although I was baffled by how to produce exponents using the GUI. It's not LaTeX, but it does have a lot of LaTeX symbols built in as keyboard shortcuts (and typing x^2 was the only way I could find to get $x^2$). Unless I hear about something better, this is the solution I'm leaning toward. Printing is extremely awkward. When you do File:Print from Google Docs' interface within the browser, you get a PDF file which contains the equations rendered as lousy-looking bitmaps. I dislike the fact that it's not open-source. I like the way MathJax works in SE, for me, in Firefox. Is there any system analogous to Google Docs that uses MathJax? The main reasons I'm not leaning toward such a solution are that: (a) my students need a GUI; and (b) for a student walking into a campus computer lab and using IE on Windows, I believe there would be a significant performance hit while the fonts were downloaded. On my linux box at home, printing sort of works, but not well -- equations are rendered in a font that is the wrong size, and they overlap the surrounding text. Solutions based on ASCIIMath will produce hassles for students using IE on Windows, since they'll either need to download the MathType plugin or switch to Firefox -- and they can't necessarily do either of these things in a campus computer lab.


title: Dynamic (sub)sections?

text: > **Possible Duplicate:**   >  Create context sensitive headings I am working on a rather large document, where the final structure is not quite clear. As another dozen people are working on it, we decided to make heavy use of `\input` and put everything that is a self-contained topic in its own file. However, assuming we move one topic to another part of the document, it may be necessary to adjust the `\section` and `\subsection` etc for this part, potentially crossing multiple files. Is there a way to "know" the current level of section, and just increase it in some generic fashion?


title: Error when using SciTE

text: I get the following error when trying to compile a file using SciTE for ConTeXt:               mtxrun          | kpse fallback with progname 'context' initialized in 0.381 seconds>Exit code: 1      I followed all of the instructions given here, but nothing promising so far. Has anyone else experienced this error?


title: How do I set itemize options in the theme (style) file

text: I have had a look at this thread here but that did not help me solve my problem. This post suggests defining another environment so that nothing breaks, but since I am using a style file, it is not helpful. What I would like to do is to set `\setlength{\itemsep}{\fill}` for all the itemize environments in my beamer presentation. I would like to achieve this by somehow modifying all the itemize, enumerate and similar environments in the theme file for my presentation. Thanks for the inputs. Here's a minimal working example               \documentclass[xcolor=dvipsnames]{beamer}     \mode<presentation>          \usetheme{MyCustomTheme}     \begin{document}          \begin{frame}       \frametitle{No Title}       \begin{itemize}          \setlength{\itemsep}{\fill}         \item item 1         \item item 2         \item item 3       \end{itemize}     \end{frame}           \end{document}      As you can see, I have used the `\setlength{\itemsep}{\fill}` command in my file. I would like to put the command somewhere in `beamerthemeMyCustomTheme.sty` so that I can have the effect without having to do it every time, for every presentation that is ever made using this theme. The contents of `beamerthemeMyCustomTheme.sty` file presently are:               \mode<presentation>          %Loading essential fonts, changing default encoding to UTF-8 for symbol support     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          %Using a defailt outer theme to begin with     \useoutertheme[subsection=false]{smoothbars}          %Setting default structure     \definecolor{beamer@blendedblue}{RGB}{78,38,131}%          %Changing the colors of hyperlinks     \definecolor{links}{HTML}{2A1B81}     \hypersetup{colorlinks,linkcolor=blue!40!structure,urlcolor=links}          %Specifying colors and shadings for various aspects     \setbeamercolor{headline}{bg=white,fg=structure.fg}     \setbeamercolor{footline}{fg=white,bg=structure.fg!85!black}     \setbeamercolor{author in head/foot}{bg=white,fg=structure.fg!85!black}     \setbeamercolor{title in head/foot}{bg=white,fg=structure.fg!85!black}     \setbeamercolor{frametitle}{bg=white,fg=structure.fg!90}     \setbeamercolor{section in head/foot}{bg=white,fg=structure.fg}     \setbeamercolor{subsection in head/foot}{bg=white,fg=structure.fg}     \setbeamercolor{subtitle}{fg=black}     \setbeamercolor{title}{fg=structure,bg=white}          \mode     <all>


title: LaTeX math textbook conversion to ebook/Kindle

text: I'm looking to buy a very math-heavy textbook (LeSage's Spatial Econometrics). The Kindle version is about $20 cheaper. Normally, I would be happy with the Kindle version, but I'm nervous about how the formulae will show up in e-type. I know that the text of the book is written in LaTeX, but I don't know about math conversion to e-type Alas, the Kindle preview is not available. What is the mechanism that Amazon (or other ebook dealers) use to convert LaTeX formulae to electronic type? Does anyone know of a good Kindle preview for a LaTeX math document?


title: Same page and multicols

text: I use multicols at times for specific blocks in my thesis, which has a title, and a block of stuff similar to the following:               \documentclass{article}          \usepackage{lipsum}     \usepackage{multicol}          \newenvironment{mh}[1]{%         \textbf{#1}%         \begin{multicols}{2}%     }{%BODY         \end{multicols}%     }          \begin{document}         \begin{mh}{This is the title.}             \lipsum[1]         \end{mh}     \end{document}      ![Top](http://i.stack.imgur.com/9dV8q.png) I am getting an occurrence which is creating a page break between the title and the body, so I need to be able to instruct them to be on the same page. However the problem is, that using `begin{samepage} ... \end{samepage}` destroys the `multicols` environment, putting all the text in one column as per below:                %NEED TO FORCE HEADING AND BLOCK ON SAME PAGE      \begin{samepage}         \begin{mh}{This is the title.}              \lipsum[1]         \end{mh}     \end{samepage}      ![Bottom](http://i.stack.imgur.com/qpZWn.png) Anyone know how to work this?


title: Umlaut dots in a different color

text: Is there an easy way to do the dots of an o-umlaut in a different color than the _o_? I've already tried using the `textcolor` function in the `color` package, but I suspect that's the wrong way to go. I know I could just manually rotate and position some colored dots over an _o_ , but I'm hoping someone has already implemented this sort of functionality in a package I just don't know about yet.


title: PythonTeX texing problem

text: I am trying to play with PythonTeX package. Installation went smoothly on this machine running old TeXLive 2011. However when I try to pdflatex or lualatex example provided with installation (pythontex_gallery.tex) I get the following error.               ! Undefined control sequence.     <argument> \DeclareFloatingEnvironment                                             [fileext=lopytx]{listing}     l.46 \begin{document}      Can anybody familiar with PythonTeX shed a light on what is going on. By the way I added newfloat.sty downloaded from the Internet manually in the working directory.


title: alternative syntax of subscripts using tex

text: I would like to sometimes write subscripts using different syntax, instead of `$u_{xx} blahblah$` write something like   1. `$u⎵xx blah blah$`, or even   2. `$u⎵xx+blah blah$` where either space following the `x` in 1. or the plus sign in 2. kicks its out of the subscript. Is this possible to do using something clever in TeX? -I am using XeLatex


title: Empty pages in the preface section of my thesis

text: I am writing a thesis and I'd like to use the openright option:               \documentclass[letterpaper,12pt,twoside,openright]{report}      The problem is that when I use this option, empty pages are placed between different sections of the preface. i.e. abstract - empty page - table of contents - list of figures - empty page - list of tables... etc. I looked at the _thesis.sty provided by my department_ and I noticed that each section of the preface are formatted to behave like chapters.               \def\prefacesection#1{         \chapter*{#1}          \addcontentsline{toc}{chapter}{#1}}      I tried changing this code snippet so that sections of the preface are actually treated as sections               \def\prefacesection#1{         \section*{#1}          \addcontentsline{toc}{chapter}{#1}}      Although this removed the empty pages, I was disappointed with the results. Firstly, the ToC, LoF, and LoT were not affected by this change (I assume their style is defined elsewhere). Secondly, I strongly preferred the look and style as it was before I made any changes to the preface style. Is there anyway I can selectively apply the openright option so that the contents of the preface are unaffected? Or is there a better way to fix my problem with empty pages in the preface?


title: Loading Aurical fonts without generating a font warning

text: I've got a document where I load in the **aurical** package. However, whenever I use the fonts this defines, I get a Font Warning telling me that the font shape has been scaled. For example,               \documentclass{article}     \usepackage{aurical}     \begin{document}     \Fontamici Test!     \end{document}      yields:               LaTeX Font Warning: Font shape `T1/AmiciLogo/m/n' will be     (Font)              scaled to size 11.99997pt on input line 4.      What's the right way to use this set of fonts so that it doesn't generate a warning?


title: More elegant way to achieve this same camera perspective projection model?

text: I just finished a camera perspective projection model using TikZ. Although, while I'm pretty satisfied with the result, it took me a _lot_ of time to do it. It's easy to see from the code below that I'm not very used to Latex and even less to TikZ. So, I'm sure that there are much better ways of drawing this same picture. I did find a package that supported 3d drawing with TikZ (tikz-3dplot), but at first glance I didn't think it would help me too much. So I didn't bother learning another package. Maybe there are other alternatives which I'm not aware of. The basic idea of my code is defining three vectores for the picture's coordinate system (x_c, y_c and z_c). Then everything is drawn based on these vectors. So, for example, if I want to move 3 units in the x direction, I simply do something like `\draw (0,0) -- (3*\xOne, 3*\xTwo)`, where `\xOne` and `\xTwo` are the first and second values of the defined x vector, respectively (hence the decomposition of this vector in the absolute TikZ x and y direction). I though that maybe I could learn by finding different solutions from people with more experience. While I would prefer PGF/TikZ solutions since this is the only one that I know something, other alternatives like PSTricks and Metapost would be welcomed too (maybe this is the opportunity for me to learn them). This is the picture I have: ![enter image description here](http://i.stack.imgur.com/HYuUQ.png) And this is my code:               \documentclass{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \usetikzlibrary{calc}          % Picture's vectors definition     \def\xOne{1}     \def\xTwo{0.5}     \def\yOne{0}     \def\yTwo{-1.3}     \def\zOne{-1}     \def\zTwo{0.5}          % CAMERA COORDINATE SYSTEM     %\draw[thick,->] (0,0) -- (\xOne,\xTwo) node[anchor=north]{$x$};     %\draw[thick,->] (0,0) -- (\yOne,\yTwo) node[anchor=west]{$y$};     %\draw[thick,->] (0,0) -- (\zOne,\zTwo) node[anchor=north,yshift=-2pt,xshift=3pt]{$z$};     \draw[very thick,->] (-\zOne/2,-\zTwo/2) -- (-\zOne/2+\xOne,-\zTwo/2+\xTwo) node[anchor=north west, xshift=-3pt,font=\footnotesize]{$x_c$};     \draw[very thick,->] (-\zOne/2,-\zTwo/2) -- (-\zOne/2+\yOne,-\zTwo/2+\yTwo) node[anchor=west,font=\footnotesize]{$y_c$};     \draw[very thick,->] (-\zOne/2,-\zTwo/2) -- (\zOne/2,\zTwo/2) node[anchor=north,yshift=-2pt,xshift=3pt,font=\footnotesize]{$z_c$};     \draw (-\zOne/2,-\zTwo/2) node[anchor=north west,font=\footnotesize]{$\mathcal{F}_c$};          % CAMERA AXIS ELONGATION     \draw[very thin,solid] (-\zOne/2-2*\xOne,-\zTwo/2-2*\xTwo) -- (-\zOne/2+2*\xOne,-\zTwo/2+2*\xTwo); % x elongation     \draw[very thin,solid] (3*\zOne,3*\zTwo) -- (6*\zOne,6*\zTwo); % optical axis behind projection plane          % REFERENCE LINES     %\draw[thin,dashed] (1.4*\xOne-\zOne/2,1.4*\xTwo-\zTwo/2) -- (6*\zOne+1.4*\xOne,6*\zTwo+1.4*\xTwo); % object x position     \draw[very thin,solid] (6*\zOne-2*\xOne,6*\zTwo-2*\xTwo) -- (6*\zOne+2*\xOne,6*\zTwo+2*\xTwo) node[anchor=west]{}; %object z position          % WORLD OBJECT     \draw[-latex,line width=3pt,blue,line cap=round] (6*\zOne+1.4*\xOne,6*\zTwo+1.4*\xTwo) -- (6*\zOne+1.4*\xOne,6*\zTwo+1.4*\xTwo+1.1) node[anchor=south,font=\footnotesize]{$ P = (X,Y,Z) $};     \node[circle,inner sep=0pt,minimum size=0.2cm,fill=blue] (object) at (6*\zOne+1.4*\xOne,6*\zTwo+1.4*\xTwo+1.1) {};          % PROJECTION LINE BEHIND PROJECTION PLANE     \draw[thick,solid,red] (3*\zOne+0.69*\xOne,3*\zTwo+0.7*\xTwo+0.69) -- (6*\zOne+1.4*\xOne,6*\zTwo+1.4*\xTwo+1.1);          %% PROJECTION PLANE     \filldraw[fill=gray!20,draw=gray!70,opacity=0.8] (3*\zOne-1.5*\xOne-1.5*\yOne,3*\zTwo-1.5*\xTwo-1.5*\yTwo) -- (3*\zOne+1.5*\xOne-1.5*\yOne,3*\zTwo+1.5*\xTwo-1.5*\yTwo) -- (3*\zOne+1.5*\xOne+1.5*\yOne,3*\zTwo+1.5*\xTwo+1.5*\yTwo) -- (3*\zOne-1.5*\xOne+1.5*\yOne,3*\zTwo-1.5*\xTwo+1.5*\yTwo) -- (3*\zOne-1.5*\xOne-1.5*\yOne,3*\zTwo-1.5*\xTwo-1.5*\yTwo);          % PLOJECTION PLANE COORDINATE SYSTEM u,v     \draw[->,thick,green!70!black,dashed] (3*\zOne-1.5*\xOne-1.5*\yOne,3*\zTwo-1.5*\xTwo-1.5*\yTwo) -- (3*\zOne+2*\xOne-1.5*\yOne,3*\zTwo+2*\xTwo-1.5*\yTwo)          node[anchor=north west, xshift=-3pt,font=\footnotesize]{$u$};     \draw[->,thick,green!70!black,dashed] (3*\zOne-1.5*\xOne-1.5*\yOne,3*\zTwo-1.5*\xTwo-1.5*\yTwo) -- (3*\zOne-1.5*\xOne-1.5*\yOne,3*\zTwo-1.5*\xTwo+2*\yTwo)          node[anchor=west,font=\footnotesize]{$v$};          % PROJECTION PLANE COORDINATE SYSTEM x,y     \draw[->,thick,cyan,dashed] (3*\zOne-2*\xOne,3*\zTwo-2*\xTwo) -- (3*\zOne+2*\xOne,3*\zTwo+2*\xTwo)          node[anchor=north west, xshift=-3pt,font=\footnotesize]{$x$};     \draw[->,thick,cyan,dashed] (3*\zOne-2*\yOne,3*\zTwo-2*\yTwo) -- (3*\zOne+2*\yOne,3*\zTwo+2*\yTwo)          node[anchor=west,font=\footnotesize]{$y$};          % PROJECTION  OBJECT     \draw[-latex,line width=1.5pt,blue,line cap=round] (3*\zOne+0.69*\xOne,3*\zTwo+0.69*\xTwo) -- (3*\zOne+0.69*\xOne,3*\zTwo+0.69*\xTwo+0.69);     \node[circle,inner sep=0pt,minimum size=0.1cm,fill=blue] (object) at (3*\zOne+0.69*\xOne,3*\zTwo+0.7*\xTwo+0.69) {};          % PIXEL OBJECT     \filldraw[red,opacity=0.6] (3*\zOne+6*0.105*\xOne,3*\zTwo+0.75+6*0.105*\xTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo);          % PROJECTION LINE IN FRONT OF PROJECTION PLANE     \draw[thick,solid,red] (-\zOne/2,-\zTwo/2) -- (3*\zOne+0.69*\xOne,3*\zTwo+0.7*\xTwo+0.69);          % OPTICAL AXIS IN FRONT OF PROJECTION PLANE     \draw[thin,solid] (0,0) -- (3*\zOne,3*\zTwo);          % ANNOTATIONS     % z = f     \draw (3*\zOne-1*\xOne+1.3*\yOne,3*\zTwo-1*\xTwo+1.3*\yTwo) node[gray!70,rotate=28] {$ z = f $};     % bar(u)     \draw[to-to, green!70!black] (3*\zOne+0.13*\xOne+0.08*\yOne,3*\zTwo+0.13*\xTwo+0.08*\yTwo) -- (3*\zOne+0.7*\xOne+0.08*\yOne,3*\zTwo+0.7*\xTwo+0.08*\yTwo) node[midway,anchor=north west,xshift=-2pt,yshift=2pt,font=\scriptsize] {$ \bar{u} $};     % bar(v)     \draw[to-to, green!70!black] (3*\zOne-0.1*\xOne-0.04*\yOne,3*\zTwo-0.1*\xTwo-0.04*\yTwo) -- (3*\zOne-0.1*\xOne,3*\zTwo-0.1*\xTwo+0.75) node[midway,anchor=east,xshift=2pt,font=\scriptsize] {$ \bar{v} $};     % (u,v)     \node[green!70!black,anchor=west,font=\scriptsize] at (3*\zOne+0.69*\xOne,3*\zTwo+0.7*\xTwo+0.69) {$ (u,v) $};     % principal point     \draw[very thin] (3*\zOne-0.02*\xOne+0.02*\yOne,3*\zTwo-0.02*\xTwo+0.02*\yTwo) .. controls (3*\zOne-0.1*\xOne+0.3*\yOne,3*\zTwo-0.1*\xTwo+0.3*\yTwo) and (3*\zOne-0.3*\xOne+0.1*\yOne,3*\zTwo-0.3*\xTwo+0.1*\yTwo) ..  (3*\zOne-0.6*\xOne+0.4*\yOne,3*\zTwo-0.6*\xTwo+0.4*\yTwo) node[anchor=north,align=center,font=\sffamily\scriptsize] {ponto \\ principal};     % optical axis     \draw[very thin] (5.5*\zOne-0.02*\xOne+0.02*\yOne,5.5*\zTwo-0.02*\xOne+0.02*\yOne) .. controls (5.5*\zOne-0.1*\xOne+0.3*\yOne,5.5*\zTwo-0.1*\xTwo+0.3*\yTwo) and (5.5*\zOne-0.3*\xOne+0.1*\yOne,5.5*\zTwo-0.3*\xTwo+0.1*\yTwo) ..  (5.5*\zOne-0.6*\xOne+0.4*\yOne,5.5*\zTwo-0.6*\xTwo+0.4*\yTwo) node[anchor=north,align=center,font=\sffamily\scriptsize] {eixo \\ \'otico};          % PIXEL POSITION     \draw[thin,gray!70] (3*\zOne,3*\zTwo+0.75) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.105*\yOne,-0.105*\yTwo) -- ++(0.21*\xOne,0.21*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.21*\yOne,-0.21*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo) -- ++(-0.105*\xOne,-0.105*\xTwo) -- ++(-0.19*\yOne,-0.19*\yTwo) -- ++(0.105*\xOne,0.105*\xTwo) -- ++(0.105*\yOne,0.105*\yTwo);          \end{tikzpicture}     \end{document}


title: straight voltage arrows in circuitikz

text: I want straight voltage arrows in `circuitikz`, but all are bowed. Someone has a new solution? The bowed arrows are totally ugly.               \documentclass[a4paper,10pt]{scrartcl}     \usepackage{tikz}     \usepackage[european]{circuitikz}     \begin{document}     \begin{circuitikz}[scale=2,transform shape] \draw      (0,0) to [battery1] (0,2)      (0,0) --(4,0)      (0,2) to [R, l=$\mathrm{R_{vor}}$, v=U] (2,2)      (2,2) -- (4,2)      (2,2) to [thRp, l=$\mathrm{R_{PT}}$, v=U] (2,0)      (4,2) to [voltmeter] (4,0)     ;\end{circuitikz}     \end{document}


title: Figure and table side by side with common caption

text: I'm not a LaTeX expert, and I want to align a table and a figure side by side, with a common caption; the table and the figure should be aligned to the bottom, too. I tried this:               \begin{figure}       \begin{minipage}[b]{0.60\linewidth}         \centering         \rule{6cm}{6cm} %to simulate an actual figure       \end{minipage}       \begin{minipage}[b]{0.30\linewidth}         \centering     \begin{tabular}{ |l|l|l| }       \hline       \multicolumn{3}{|c|}{Zzzzzz} \\       \hline \hline       A & B &  C \\ \hline       0 & 0 &  0\\ \hline       0 & 1 &  0\\ \hline       1 & 0 &  0\\ \hline       1 & 1 &  1\\ \hline%     \end{tabular}     \end{minipage}     \caption{Bla bla}     \label{fig:test}     \end{figure}      But the result is:               *********     *********     *********     *********   Zzzzz     *********   0 0 0     *********   0 0 1                 0 1 0                 0 1 1                 1 1 1           Figure 1: Bla bla      The table and the figure are not bottom-aligned. I read other answers on tex.stackexchange, but I didn't find a way to fix it.


title: If a letter is white on white background, does a printer see it?

text: In preparation for press printing, I would like to produce a version of a document for printing a glossy varnish layer, where all the text is "missing", but the images and other elements are at the same position. `\color{white}` sounds like a good solution, but since the text is still there, I'm concerned that the printer might still print some thin stray artefacts at the letter edges, or make similar mistakes due to antialiasing or some obscure stage in font rendering. Or perhaps this is a non-issue?


title: Whitespace created in csname

text: I am using the `newfile` package to use an input file to insert figures, headings etc. Everything works fine, but a whitespace is created after the variable which is a problem if that variable represents a figure name that must be included in the tex file. Here is my code:               \documentclass[12pt]{article} % Default font size is 12pt, it can be changed here          \usepackage{geometry} % Required to change the page size to A4     \geometry{a4paper} % Set the page size to be A4 as opposed to the default US Letter          \usepackage{graphicx} % Required for including pictures          \usepackage{float} % Allows putting an [H] in \begin{figure} to specify the exact location of the figure     \usepackage{wrapfig} % Allows in-line images such as the example fish picture          \usepackage{newfile}          \linespread{1.2} % Line spacing          %\setlength\parindent{0pt} % Uncomment to remove all indentation from paragraphs          \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored                    \begin{document}          %Define the file read object     \newread\productin     %Open auxillary file and stream relevant variables          \immediate\openin\productin=aux_files/femara.tex  %this filename must change according to relevant report     \newcounter{linenr}     \loop\unless\ifeof\productin     \stepcounter{linenr}     \immediate\read\productin t\expandafter o\csname var\alph{linenr}\endcsname     \repeat     \immediate\closein\productin               %----------------------------------------------------------------------------------------     %   TITLE PAGE     %----------------------------------------------------------------------------------------          \begin{titlepage}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here          \center % Center everything on the page                    \HRule \\[0.8cm]     { \huge \bfseries \varc Analytics Report for \vara}\\[0.4cm] % Title of your document     \HRule \\[2cm]          \textsc{\LARGE \varb}\\[12cm] % Report month          \begin{minipage}{1\textwidth}     \begin{flushright} \large     \emph{Prepared by:}\\     \textsc{Umami Consulting} \\[0.4cm]     {\large \today}\\[3cm]     \end{flushright}     \end{minipage}                %\includegraphics{Logo}\\[1cm] % Include a logo - this will require the graphicx package          \vfill % Fill the rest of the page with whitespace          \end{titlepage}          %----------------------------------------------------------------------------------------     %   TABLE OF CONTENTS     %----------------------------------------------------------------------------------------          \tableofcontents % Include a table of contents          \newpage % Begins the essay on a new page instead of on the same page as the table of contents           %----------------------------------------------------------------------------------------     %   REPORT OVERVIEW     %----------------------------------------------------------------------------------------          \section{Report Overview} % Major section     \subsection{Subsection 1} % Sub-section          \begin{figure}[H] % Example image     \center{\includegraphics[width=1\linewidth]{\vard}}     \caption{Example image.}     \label{fig:speciation}     \end{figure}               %----------------------------------------------------------------------------------------     %   CONCLUSION     %----------------------------------------------------------------------------------------          \section{Conclusion} % Major section          %----------------------------------------------------------------------------------------     %   BIBLIOGRAPHY     %----------------------------------------------------------------------------------------          \begin{thebibliography}{99} % Bibliography - this is intentionally simple in this template          \bibitem[Figueredo and Wolf, 2009]{Figueredo:2009dg}     Figueredo, A.~J. and Wolf, P. S.~A. (2009).     \newblock Assortative pairing and life history strategy - a cross-cultural       study.     \newblock {\em Human Nature}, 20:317--330.          \end{thebibliography}          %----------------------------------------------------------------------------------------          \end{document}      Input file content (`femara.tex`)               June 2014     Data     Plt_Province      My problem is that `\vara` produces `Area ` instead of `Area`. My input file doesn't have whitespaces after the variable names. Any idea how to strip the whitespace?


title: How to have footer in first page? (Table of contents is also in the first page)

text: I have footer in my article file, but the footer does not show in the first page. The Table of Contents is in the first page too, there is a page number in the bottom of the page, but I do not need the page number, so i use below               \tableofcontents      \thispagestyle{empty}      The number is gone, but the footer is still not there. If I do not use \thispagestyle{empty} the footer still not there               \tableofcontents       How to have the footer in the first page?(now it shows every page except the first page)


title: Symbol for contraction / interior product?

text: How to make the symbols for interior product (a.k.a. contraction)? The best I've been able to come up with is `\mathrel{\llcorner}` (or `\lrcorner`). Any other suggestions?


title: Setting different recto/verso margins size (geometry) on this example

text: * * * # CONTEXT. Because of specific University requirements (1), I had to use this nice code found on _tex.stackexchange_ http://tex.stackexchange.com/a/96366/50507 written by _David Carlisle_ , that was fitting perfectly with my needs so far. (1) _The requirements are listed on that question, please follow the link, I don't want to make a duplicate. It also explains the`oneside` document article._ Therefore, given the linked code, let's consider it as my **Minimum Working Example :**               \documentclass[oneside]{article}     \usepackage{caption}     \def\a{One two three four \stepcounter{enumi}\roman{enumi} five six. }     \def\b{\a\a\par\a\a\a Red green blue yellow black white. }     \def\c{\b\b\par\b\b\b\b\b\par\b\b\b\par\b\b\b\par\b}     \makeatletter     \def\@oddhead{ODD PAGE\hfill\thepage}          \long\def\grabfirst#1#2\@@{\toks@{#2}\xdef\insertlist{\the\toks@}#1}     \let\old@outputpage\@outputpage     \def\@outputpage{%     \ifx\insertlist\@empty     \shipout\vbox to\@colht {\vss}%     \else     \begingroup     \setbox\@outputbox\vbox to\@colht {%     \expandafter\grabfirst\insertlist\@@     }%     \def\@oddhead{\thepage(x)  \hfill EVEN PAGE}     \old@outputpage     \addtocounter{page}{-1}%     \endgroup     \fi     \old@outputpage}          \gdef\insertlist{}     \long\def\insertpic#1{\g@addto@macro\insertlist{{#1}}}          \makeatother     \begin{document}          \c     \insertpic{%     \rule{1cm}{2cm}     \captionof{figure}{a picture}}     \c     \begin{figure}[t]     this\\     is\\     a\\     t figure          \caption{zzz}     \end{figure}          \c     \begin{figure}[p]     this\\     is\\     a\\     p figure          \caption{zzz}     \end{figure}          \c     \insertpic{%     \rule{1cm}{1cm}     \captionof{figure}{a picture}}          \c     \end{document}      * * * # THE PROBLEM. My aim is to set up different margins on recto pages and verso pages, for example :   * on recto : left = 3cm, right = 3cm, top = 3cm, bottom = 3cm (let's say it's the default, given on the full report, except on verso when they occur)   * on verso only (when they occur): left = 2cm, right = 2cm, top = 1.5cm, bottom = 1.5cm The problem is that some of the pictures (and tables) are too wide for the global margin used for the entire code, thus for the verso as well. * * * # MY QUESTION. I don't see how I can modify the margins geometry of one side (verso) without modifying the other side (recto) and not breaking the given code. I would be most grateful if you could help me with that. * * * # ADDITIONAL NOTE. Please note that it was not the nature of my question - my first question was simply to use different geometry on recto and verso - the linked solution worked very fine for me so far except for these margins. _However_ if there is no way to set up different margin on recto and verso with this code, I would be most grateful if you could propose another solution with the same numbering requirements. > **SUGGESTIONS regarding the question format?** > > As I didn't received any answers yet, should you have any suggestion to help > me presenting better the issue that I am facing, so that I could get more > easily a solution, please do not hesitate to let me know in comments. Shall > I propose another bounty ? What should I do to find some hints about that > topic ? Thank you again for your attention.


title: Subscripts in bibtex

text: I've got references that have math markup in their titles, and I'm having trouble getting bibtex to compile subscript output. For instance, a title including `$\mathcal{A}_5$` comes out as though it were `$\mathcal{A}\\_5$`. Anyone know how to fix this? What formatting would bibtex prefer?


title: Is there a readymade symbol for a 90 degrees rotated \Bowtie?

text: **Where do I find a symbol that looks like a slightly smaller version of a 90 degrees rotated`\Bowtie` from the `wasysym` package?** Something like ![alt text](http://i.stack.imgur.com/2KSzz.png). I couldn't find anything in the usual tables. The detexify site yields nothing close. I managed the following hack (which defines a binary operator):               \documentclass[12pt]{article}       \usepackage{wasysym,graphicx}       \newcommand{\uproduct}{\mathbin{\;{\rotatebox{90}{$\small\Bowtie$}}}}     \begin{document}       $A \uproduct B$       \end{document}      It produces ![alt text](http://i.stack.imgur.com/hgPsV.png). Although it looks OK here, it looks bad when used in a subscript. This is surely not the right solution. I'd well believe that a solution using metafont exists, but would prefer something less esoteric. Perhaps there is a standard symbols package that I overlooked? * * * **EDIT: Geoffrey and Aditya gave admirable solutions for creating this symbol (I'm sorry for previously calling them "hacks"). And Seamus found a font package.


title: what is interfering with the new environment here?

text: Basically I wanted to modify the `description` list so that the first word(s) are underlined and bold If you compile this file.               \documentclass{article}     \usepackage{soul}     \newenvironment{mydescription}{%        \renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{\ul{##1}}}        \begin{description}%     }{%        \end{description}%     }          \begin{document}          \begin{mydescription}       \item[First] Test       \item[Second] Test     \end{mydescription}               \end{document}      * * * The output is okay. But if you compile the following, you see that the environment is not what it is supposed to be. What commands in the preamble are interfering with the compilation and how to solve this issue?               \documentclass[10pt]{article}     \usepackage{soul}     \usepackage[margin=0.75in]{geometry}     \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}     \let\endchangemargin=\endlist      \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{Lecture 1}     \rhead{Handout 2}          \usepackage{tikz}     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \usetikzlibrary{decorations.pathreplacing,calc,graphs,decorations.markings}     \def\annotateEquality#1{ %for the arrow from equality sign     \tikz[overlay]       \draw[blue,<-] (-1.5ex,1.5ex) -- +(.7,.5) node[right] {#1};     }          \usepackage{comment}     \usepackage{mathtools}          \newcommand{\verteq}{\rotatebox{90}{$\,\neq$}}     \newcommand{\equalto}[2]{\underset{\scriptstyle\overset{\mkern4mu\verteq}{#2}}{#1}}               \usepackage{enumitem,array}     \usepackage{relsize}     \usepackage{amsmath}     \usepackage{amsthm} %for proof      \newtheorem*{mythm}{Theorem}     \newtheorem*{mydef}{Definition}     \usepackage{centernot} %for `not implies' symbol          \usepackage{amssymb} %for 'therefore' symbol     \usepackage{tikz-cd}% Commutative diagram      \title{\ul{Expectations in Bivariate Probability Distribution}}     \date{}          \everymath=\expandafter{\the\everymath\displaystyle}          \tikzset{degil/.style={                     decoration={markings,                     mark= at position 0.5 with {                     \node[transform shape] (tempnode) {$\backslash$};                     %\draw[thick] (tempnode.north east) -- (tempnode.south west);                     }                     },                     postaction={decorate}     }     }          \newenvironment{mydescription}{%        \renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{\ul{##1}}}        \begin{description}%     }{%        \end{description}%     }          \begin{document}     \thispagestyle{fancy}     %These define a new itemize environment with 'invisible' bullets     \newenvironment{Myitemize}{%     \renewcommand{\labelitemi}{{}}%     \begin{itemize}[nosep]}{\end{itemize}}     \maketitle      \thispagestyle{fancy}           \begin{mydescription}      \begin{mydescription}      \item[First] Test      \item[Second] Test      \end{mydescription}          \end{document}


title: Bad spacing of math letters within italic text

text: I use the standard AMS theorem style, which means that my theorems are set in italic. In combination with math variables, this sometimes gives horrible spacing: The input `If $U$ or $V$ \dots` yields ![](http://i.stack.imgur.com/1KHLS.png) I see two spacing problems here: The space between "If" and "U" is too small, and the space between "U" and "or" is too large. Thus, the output would look a lot better if the "U" would be moved a bit to the right. One non-solution is to remove the dollar signs: `If U or V \dots` yields ![](http://i.stack.imgur.com/L6Y2m.png) Here the spacing is a lot better, but now the problem is that a different font (namely italic) is used for "U" and "V", which is similar but not quite the same. Another non-solution is to use italic correction `\/` after "If": This only corrects the first space (and it is not nice if one has to remember typing `\/` all the time). My present "solution" is to apply manual corrections where I find it appropriate, which of course is a real nuisance. Does anyone have a better solution? Do XeTeX or LuaTeX offer something? (I think I do understand what causes the problem. The idea is to show the bounding boxes of the relevant characters in both examples: ![](http://i.stack.imgur.com/O7CTy.png) ![](http://i.stack.imgur.com/W5U0p.png) What you see is that the spacing of the bounding boxes is good in both cases. But the italic letters tend to stick out of their boxes to the right, and with "U" (in the right picture) and "o" you see that they have some white space in the left of the box. The math "U" (in the left picture), however, does not have this white space in the left, and it doesn't stick out to the right. As a result, the math "U" sits too far to the left.) EDIT: Khaled is quite right, the space between the math "U" and "or" is so large since the math "U" includes an italic correction. This is explicitly described in the infamous Appendix G of the TeXbook, rule 17. So the math "U" doesn't stick out of its box since the box includes the italic correction, and this is quite alright if the math in embedded in roman text. I just have no idea how to get rid of the italic correction if the math is already in some italic text!


title: Place all floats last without changing numbering

text: I'd like to place some of my floats (specifically code listings) in my documents in a section at the end, without disturbing the numbering. Currently, I have them numbered within sections, so in section 1 all listings are called **Program 1.1** , **Program 1.2** etc. Is there a way to create a section at the end (like an appendix) where all the program floats go, without changing their numbering? Ideally, I'd like to have > **Section 1**   >  Some text in Section 1, and a reference to Program 1.1 and 1.2. > > **Section 2**   >  Apparently Program 2.1 was the only code shown in this section. > > ... > > **Appendix A**   >  _Program 1.1:_ >   >   >     for i = 1:n >         doStuff(); >     end > > _Program 1.2:_ >   >   >     % This program doesn't do anything > > Etc... **Update:**   Before anyone shoots me for not showing exactly how the programs are defined, here's how it works:               % In the preamble     \usepackage{listings}     \usepackage{float}     \newfloat{program}{tbphH}{lop}     \floatname{program}{Program}          \newcommand{\codefrom}[2][Matlab]     {     \begin{program}[hbt]         \lstinputlisting[language=#1]{#2}         \caption{#2}         \label{#2}     \end{program}     }          % In the document     \codefrom{alocalfile.m}


title: Nodes within leaf text in tikz-qtree?

text: I'm trying to draw a box around only part of the text in a tikz-qtree tree, but the closest I can do is this:               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree}     \begin{document}          \begin{tikzpicture} \tikzset{every tree node/.style={align=center, anchor=north}}     \Tree      [.parent        [.child \node[draw]{boxed}; unboxed ]      ]     \end{tikzpicture}     \end{document}      Unfortunately, this generates 'boxed' and 'unboxed' as child nodes of 'child', when I'd much prefer them to be part of the text in 'child'. I've been doing lineless labels on nodes like this -               [.{child \\ label} ]      and so I'd like to be able to do something like this -               [.{child \\ \node[draw]{boxed};unboxed} ]      giving '[boxed]unboxed' on a line under 'child'. The problem is that placing a node inside a [.{} ] element gives an undefined control sequence error. Is there any way around this issue, or am I just going to have to put the whole thing inside a boxed node?