title: alignment of equations in align environment with itemize

text: I am using `amsmath` environment and I want to align equations with multiple `align` environment. An example can be seen in the figure: ![enter image description here](http://i.stack.imgur.com/bF7NI.jpg) Now what i want is shown in arrows. I want i=0,..2n in eq 2.4.2 to shift leftwards so this text is aligned with the text of equation 2.4.1. at the same time i also want eq 2.4.3 to be aligned with eq 2.4.2. an example code is given below:                        \documentclass[hidelinks,a4paper,11pt]{report}     \usepackage{amsmath}         \begin{document}                     \begin{enumerate}                 \item Form $2n+1$ sample points (also known as sigma points) vectors $x^{(i)}$  as follows:                 \begin{equation}                 \begin{aligned}                 x^{(i)}=\begin{cases}\bar{x} & \text{$i=0$} \\                 \bar{x}+\left(\sqrt{(n+\lambda)P}\right)^T_i & \text{$i=1,\cdots,n$} \\[1.2ex]                 \bar{x}-\left(\sqrt{(n+\lambda)P}\right)^T_i & \text{$i=n+1,\cdots,2n$}                 \end{cases}                 \end{aligned}                 \end{equation}                 \item Transform sigma points:                 \begin{align}                 y^{(i)} &= h(x^{(i)}) & \text{$i=0,\cdots,2n$}                 \end{align}                 \item Approximate mean and covariance as given below:                 \begin{align}                 {y}_u &=\sum_{i=0}^{2n}W^{(m)}_i y^{(i)}\notag\\                 P_u &=\sum_{i=0}^{2n}W^{(c)}_i \left(y^{(i)}-y_u\right)\left(y^{(i)}-y_u\right)^T                 \end{align}                 \end{enumerate}         \end{document}


title: Insert a paragraph into a list that uses the whole text width

text: I want to insert a paragraph or possibly even a box with a background color into a list that uses the whole `\textwidth`. Something like this:               1st item         a subitem 1        b subitem 2          2nd item        a subitee          \begin{use the full width}        [ Here the text should use the full text width ignoring the list indent]     \end{use the full width}        b subitem     3rd item      The list is a normal enumerate.


title: Section numbering in Beamer ('CambridgeUS' theme)

text: Does anybody know how to make latex put the number for a section presented in header?               \documentclass{beamer}     %\usetheme{Warsaw}     \usetheme{CambridgeUS}     \begin{document}          \section{Section a}     \begin{frame}     Test frame     \end{frame}     \end{document}       Thank you in advance.


title: Table of definitions formatting help

text: I'm using the following code to produce a table of definitions.               \begin{tabular}{rl}     $R$ is... & ...if and only if... \\     \hline     irreflexive & for all $x$ iht $xx \notin R$. \\     \hline     transitive & for all $xyo$ iht if $xo \in R$ and $oy \in R$, then $xy \in R$. \\     \hline     antisymmetric & for all $xy$ iht if $xy \in R$ and $yx \in R$, then $x=y$. \\     \hline     a partial order & $R$ is transitive and antisymmetric. \\     \hline     \end{tabular}`      To be honest, the final output looks pretty mediocre. Any ideas for how to improve it? EDIT: Here's a complete file, featuring a second attempt at the table. Neither are very satisfactory, in my opinion.               \documentclass{article}     \usepackage{graphicx}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{eulervm}     \usepackage{stmaryrd}          \usepackage{tabularx}     \setlength{\extrarowheight}{2pt}          \usepackage{amsthm}     \theoremstyle{definition}     \newtheorem{defi}{Definition}          \begin{document}     \begin{defi} Fix arbitrary $R$. Then ($R$ is a \textit{relation}) if and only if ($R$ is a set, and every element of $R$ is an ordered pair). Supposing $R$ is indeed a relation, then the following hold.          \begin{center}     \begin{tabular}{|rl|}     \hline     $R$ is... & ...if and only if... \\     \hline     irreflexive & for all $x$ iht $xx \notin R$. \\     \hline     transitive & for all $xyo$ iht if $xo \in R$ and $oy \in R$, then $xy \in R$. \\     \hline     antisymmetric & for all $xy$ iht if $xy \in R$ and $yx \in R$, then $x=y$. \\     \hline     a partial order & $R$ is transitive and antisymmetric. \\     \hline     \end{tabular}\end{center}\end{defi}     \end{document}


title: TikZ spy and Beamer uncover

text: I'm trying to uncover a magnifying glass using the `\spy` functionality of TikZ, however, as you can see in the minimal working example below, the glass is there from frame 1. Does someone know how to fix this issue ?               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usetikzlibrary{shadows,spy,fixedpointarithmetic,patterns,arrows,decorations.text,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains}     \begin{document}          \begin{frame}         Space         \begin{center}             \begin{tikzpicture}[spy scope={magnification=1.5, size=2cm},every spy in node/.style={remember picture,overlay,magnifying glass,circular drop shadow,fill=white,draw,ultra thick, cap=round}]                 \node[rectangle, draw, minimum width=1cm, minimum height=1cm] (N) {};                 \uncover<2->{\spy on (N) in node;}                 % \only<2>{\spy on (N) in node;}             \end{tikzpicture}         \end{center}     \end{frame}     \end{document}


title: Why does the nature biblatex style not always show the DOI and URL?

text: I am using `biblatex` with the `biblatex-nature` package for my bibliography, and I've come across a peculiarity where the DOI and URL fields are not shown when the bibliographic entry includes the page numbers. I tried `natbib` with the `nature` package to see whether the behaviour was the same, but, in that case, the DOI and URL entries are typeset. Surely that can't be the right behaviour, can it? Either way, whether this is the intended behaviour, how can I get the `biblatex-nature` package to always show the DOI and URL? Forcing the DOI and URL fields to be shown with `doi=true` and `url=true` does not help. The only way I found to get `a:agrawal:2001:01` to show the URL and DOI is by removing the `pages` field. # MWE:               \documentclass{article}          \begin{filecontents*}{bib.bib}     @Article{a:agrawal:2001:01,       title         = {Phenotypic Plasticity in the Interactions and Evolution of Species},       author        = {Agrawal, Anurag A.},       journal       = {Science},       year          = {2001},       month         = oct,       volume        = {294},       number        = {5541},       pages         = {321--326},       doi           = {10.1126/science.1060701},       url           = {http://dx.doi.org/10.1126/science.1060701},     }          @Article{a:brown:2013:01,       title         = {What Evolvability Really Is},       author        = {Brown, Rachael L.},       journal       = {The British Journal for the Philosophy of Science},       year          = {2013},       month         = aug,       doi           = {10.1093/bjps/axt014},       url           = {http://dx.doi.org/10.1093/bjps/axt014},     }     \end{filecontents*}          % \usepackage[numbers]{natbib} % Uncomment for natbib.     \usepackage[backend=biber,style=nature]{biblatex}     \addbibresource{bib.bib}          \begin{document}     \noindent\parencite{a:agrawal:2001:01} \\     \parencite{a:brown:2013:01}          % Uncomment for natbib.     % \bibliographystyle{naturemag}     % \bibliography{bib}          \printbibliography     \end{document}      ![Output](http://i.stack.imgur.com/hajqe.png)


title: How to set width of mdframed?

text: I am new to latex i want to set a width and height of the `mdframed`. can any one help me to achieve this task.               \documentclass{article}     \usepackage{xcolor}     \usepackage{mdframed}     \newtheorem{mdtheorem}{Theorem}      \newenvironment{theorem}%      {\begin{mdframed}[backgroundcolor=lightgray]\begin{mdtheorem}}%      {\end{mdtheorem}\end{mdframed}}     \begin{document}     \begin{theorem}     Sample     \end{theorem}     \end{document}         1. My current output is , ![enter image description here](http://i.stack.imgur.com/niVbp.png)   2. My expected output is ![enter image description here](http://i.stack.imgur.com/zwMTB.png)


title: multiple rotated figures on one page

text: I googled for hours and tried all examples I found (`rotatebox`, `subfigures`, `minipages`), but nothing provided the output I am looking for. Is it really that difficult to place 3 figures rotated so they are in `landscape` mode side-by-side? It took me like 30 seconds in Word (see link to screenshot for better understanding below). It would be the non-plus-ultra if each `figure` would have a rotated caption as well... Does somebody know how to achieve this? ![screenshot](http://i.stack.imgur.com/SwIQs.jpg)


title: Changing reference text style

text: I'm trying to change the style of the text of the images reference. I want something like you see in textbooks, for example with the words > (fig. 1.23) in bold, colored and maybe a different font. So I define a new color               \definecolor{viola}{rgb}{0.42,0.05,0.09}      and try this:               (\textcolor{viola}{\textbf{\textsf{\textbf{fig. \ref{cap1:tree}}}}}).      But what I'm getting is this: ![enter image description here](http://i.stack.imgur.com/xclCR.png) How can I change the numbers style as well?


title: pgfplot number format: scientific notation on ticks, without factor 1

text: I have a pgfplot that is supposed to give me only a colorbar, no other plot. My code was inspired by this question. The logarithmic colorbar code was recycled from this answer and this answer. The result I'm getting is off in _one_ respect: **I want ticks at all powers of 10, written as such (`10^n`)** instead of ordinary decimals. Also, I don't want the redundant `1*` in front of a tick (as is the case now with 10^5). My output so far (please exue the glitchy rendering):   ![wrong ticks](http://i.stack.imgur.com/T7daA.png) And my MWE:               \documentclass{standalone}          \usepackage{filecontents}     \usepackage{pgfplots, pgfplotstable}          \begin{filecontents}{data.csv}     height,width     1,2     205241,3     205241,0     \end{filecontents}          % Define new pgfmath function for the logarithm     % to base 10 that also works with fpu library     \pgfmathdeclarefunction{lg10}{1}{%         \pgfmathparse{ln(#1)/ln(10)}%     }          \begin{document}     \begin{tikzpicture}     \begin{axis}[         ymode=log,         enlargelimits=false,         hide axis,         scale only axis,         height=0,         width=0,         colorbar horizontal,         colorbar style={             width=10cm,             xtick={0,1,2,3,4,5},             xticklabel={                 \pgfkeys{/pgf/fpu}                 \pgfmathparse{10^\tick}\pgfmathprintnumber\pgfmathresult                 \pgfkeys{/pgf/fpu=false}             },         },     ]     \addplot [         mesh,         draw=none,         point meta=explicit, % use the "meta expr" defined below     ] table [         col sep=comma,         create on use/xaccum/.style={             create col/expr=\pgfmathaccuma+\prevrow{width}         },         meta expr=lg10(\thisrow{height}), % transform "order" into "linear" for colorbar         x=xaccum, y=height,     ] {data.csv};     \end{axis}     \end{tikzpicture}          \end{document}


title: Remove double margins for a single page?

text: I'm using the AIP template seen here, I need to be able to make it so I can return to normal margins for a single page or two and then return back. How can I achieve this?               \documentclass[aip,jmp,reprint]{revtex4-1}     \usepackage{blindtext}          \begin{document}     \preprint{AIP/123-QED}     \title[Sample title]{Sample Title}     \thanks{Footnote to title of article.}     \author{A. Author}      \altaffiliation[Also at ]{Physics Department, XYZ University.}     \author{B. Author}%      \email{Second.Author@institution.edu.}     \affiliation{      Authors' institution and/or address     }%     \maketitle     \section{First Heading}     \blindtext     \subsection{A subsection}     \blindtext     \end{document}


title: which texlive package has times new roman for xelatex

text: I have following in my latex header:               \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Times New Roman}      This results in "font not found" error when compiled with xetex. I installed all packages related to times but the problem still persists. Thanks for taking a look.


title: equilateral triangle in tikz

text: I was wondering if there is a way to define an `equilateral triangle` in tikz. I am aware that there is a predefined `isosceles triangle` in `tikz`. Specifically I'd like to define a `\tikzstyle` for `equilateral triangle` and use it in my diagram. The similar situation with `isosceles triangle` is something like               \tikzstyle{buffer} = [draw,shape border rotate=-90, isosceles triangle,fill=red, node distance=2cm, minimum height=4em]      However, replacing `isosceles` with `equilateral` doesn't work. Thanks


title: Node only partially rendered near edge of plot

text: I'm trying to draw a relatively simple chart of a number line, and when one of the nodes is too close to the edge of the plot, it gets cut off. The code:               \documentclass{article}          \usepackage{natbib}     \usepackage{graphicx}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[       width=\columnwidth,       axis y line=none,       axis lines=left,       axis line style={-},       xmin=0,       xmax=1,       ymin=0,       ymax=1,       xlabel=$\mu$,       scatter/classes={o={mark=*}},       restrict y to domain=0:1,       xtick={0,1}     ]     \draw[ultra thin] (axis cs:0, 0) -- (axis cs:0,.05);     \draw[ultra thin] (axis cs:.4, 0) -- (axis cs:.4,.05);     \node[coordinate,label=above:{$B$}] at (axis cs:0.0,0.05) {};     \node[coordinate,label=above:{$A$}] at (axis cs:0.4,0.05) {};     \node[coordinate,label=above:{$b$}] at (axis cs:0.2,0.02) {};     \node[coordinate,label=above:{$a$}] at (axis cs:0.7,0.02) {};     \end{axis};     \end{tikzpicture}     \end{document}      The Result: ![Partially rendered node label](http://i.stack.imgur.com/wPUDX.png) How do I get the B to fully render?


title: Problem with parbox using pstricks and ticket package

text: I'm trying to make cards for a game. I have a problem with `\parbox`. It's working ok only if the `\parbox` in the previous picture is empty. If it's not the contents of `\parbox` are shifted down. Here is the code and output it makes. Cards go right to left because the ticket package goes top to bottom and I rotated the whole page so the contents of cards are upright. Why does that happen? ![output](http://i.stack.imgur.com/kujBA.png)               \documentclass[a4paper,12pt]{article}     \usepackage[cutmark]{ticket}     \usepackage{pstricks}     \usepackage{fp}          \hoffset=-5.0mm     \voffset=-20.0mm          \unitlength=1mm     \ticketNumbers{2}{5}     \ticketSize{85}{55}     \ticketDistance{0}{0}          \newcommand{\pbox}[3]{\parbox{#1}{\center\fontsize{#2}{#2}\selectfont#3}}          \renewcommand{\ticketdefault}{}          \newcommand{\myticket}[1]{\ticket{%     \pspicture[unit=10mm](0,0)(5.5,8,5)%     \rput[bl]{90}(8.5,0){%       \rput[t](2.75,8){\pbox{4cm}{25}{#1}}%       \psgrid[gridlabels=0,unit=.5,subgriddiv=0,gridwidth=0.1pt](0,0)(11,17)%     }\endpspicture%     }}          \begin{document}     \myticket{}     \myticket{1}     \myticket{2}     \myticket{}     \myticket{3}     \myticket{}     \myticket{}     \myticket{4}     \myticket{5}     \myticket{6}     \end{document}


title: Is there a tikz library for Communications Block?

text: Is there any tikz library with built in shapes like antennas (simple Y shaped), wireless channel (a cloud essentially), filters etc? In particular I'm looking to draw similar diagrams to: http://en.m.wikipedia.org/wiki/Mimo (the first figure). I guess most of the blocks can be rendered using rectangles but would be nice to have some built in shapes as well.


title: New to LaTeX, PATH to LaTeX is resetting every time exit the terminal

text: **ALSO POSTED HERE I didn't know about this tex.stackexchange untill after that post** http://stackoverflow.com/questions/21105531/linux-when-setting-my-latex-path- the-path-only-maintains-its-value-for-the-durat I am trying to learn LaTeX and I am running `Linux` mint 15 x64. I have installed "texlive" and followed this installation guide: http://www.tug.org/texlive/quickinstall.html The problem I am having is, as the title suggests when I set my PATH variable to the LaTeX directory, it works fine for one terminal window only, if I exit that terminal window the PATH no longer points to the LaTeX install, thus I have to reset it every time which is rather annoying. I am using the following command:               PATH=/usr/local/texlive/2013/bin/x86_64-linux/:$PATH       then when I do: echo $PATH I get this result:               /usr/local/texlive/2013/bin/x86_64-linux/:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx      and I can do this:               latex --version          pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.5.16; using libpng 1.5.16     Compiled with zlib 1.2.7; using zlib 1.2.7     Compiled with xpdf version 3.03      which is as expected, but when I close the terminal window, and re-open it I get the following:               echo $PATH      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <--- missing the latex path and when I check the version:               latex --version:     The program LaTeX is currently not installed. You can install it by typing:     sudo apt-get install texlive-latex-base      I have also tried doing the same as the super-user, I get the same end product. Any have a solution to this problem? Thanks


title: Typesetting a table to look like a spreadsheet

text: Continuing in my efforts to create particular computing environments in LaTeX, I'm now try to coerce a table to look like a spreadsheet. It needs   * All columns other than the first having equal width (say 3cm)   * First row and column having a gray background   * First column and first row right aligned   * All other rows and columns left aligned I can probably do this with a mess of stuff from the `array` and `colortbl` packages, but so far my efforts have been less than successful. (If I get the alignment right, then the background doesn't fill the cell properly, for example). Here's what I have so far, which is almost good, except for the formatting:               \begin{tabular}[h]{>{\columncolor[gray]{.9}}c|*{5}{>{\hfill}p{2cm}|}}       \hline       \rowcolor[gray]{.9}&A&B&C&D&E\\       \hline       1&0&1&2&3&4\\       \hline       2&185&&&&\\       \hline       3&-31&&&&\\       \hline       4&-39&&&&\\       \hline       5&-367&&&&\\       \hline       6&-1159&&&&\\       \hline     \end{tabular}      ![enter image description here](http://i.stack.imgur.com/4gDTf.png) The main difficulty seems to be formatting the first row differently from all other rows. Is there a LaTeX environment which allows you to changing formatting mid-table?


title: Table of Contents horizontal lines

text: How can I put horizontal lines before and after my Table of Contents entries? To illustrate the look and feel I am after, please take a look at this image: ![enter image description here](http://i.stack.imgur.com/tjr3r.png) I would like to understand how to do the same on a full ToC rather than, as it is the case in the linked image, on a "mini-ToC".


title: multicolumn table in Beamer

text: I'm new to beamer. I want to have table in my presentation same as in my latex document.               \begin{center}     \begin{tabular}{cc|c|c|}     \cline{3-4}     & & \multicolumn{2}{|c|}{Condition (Gold standard)}\\     \cline{3-4}     & & True & False \\     \hline     \multicolumn{1}{ |c| }{\multirow{2}{*}{Test outcome}}& \multicolumn{1}{ |c| }{Positive} & True Positive \cellcolor{green} & False Positive\cellcolor{red}\\     \cline{2-4}     \multicolumn{1}{ |c| }{} & \multicolumn{1}{ |c| }{Negative} & False Negative\cellcolor{red} & True Negative \cellcolor{green}\\     \hline     \end{tabular}     \end{center}      This is the table, but the multicolumn command is not working in beamer. Thanks for your help!


title: access all characters in an OpenType font with LuaLaTeX

text: This is a follow-up to Access specific characters in LuaTeX and How to access fleurons? With TeX Live 2012, I compiled the following file and got the output in the image:               \documentclass[12pt]{book}     \usepackage{fontspec}     \setmainfont[Numbers=OldStyle]{Garamond Premiere Pro Regular}     \def\fontchar#1{\directlua{fonts.otf.char("#1")}}     \begin{document}     \begin{center}       \begin{tabular}{lc}     bullet.01 & \fontchar{bullet.01}\\     bullet.02 & \fontchar{bullet.02}\\     bullet.03 & \fontchar{bullet.03}\\     bullet.04 & \fontchar{bullet.04}\\     bullet.05 & \fontchar{bullet.05}\\     bullet.06 & \fontchar{bullet.06}\\     bullet.07 & \fontchar{bullet.07}\\     bullet.08 & \fontchar{bullet.08}\\     bullet.09 & \fontchar{bullet.09}\\     bullet.10 & \fontchar{bullet.10}\\     bullet.11 & \fontchar{bullet.11}\\     bullet.12 & \fontchar{bullet.12}\\     bullet.13 & \fontchar{bullet.13}\\     bullet.14 & \fontchar{bullet.14}       \end{tabular}     \end{center}     \end{document}      ![Adobe Garmond fleurons](http://i.stack.imgur.com/qNZAm.png) With TeX Live 2013, compiling the same file produces this error message:               ERROR: LuaTeX error [string "\directlua "]:1: attempt to index field 'otf' (a nil val          --- TeX said ---     ue)     stack traceback:         [string "\directlua "]:1: in main chunk.     \fontchar #1^^@-\directlua {fonts.otf.char("#1")}          l.14     bullet.01 & \fontchar{bullet.01}                        \\     --- HELP ---     From the .log file...          The lua interpreter ran into a problem, so the     remainder of this lua chunk will be ignored.      I also tried this approach:               \documentclass[12pt]{book}     \usepackage{fontspec}     \setmainfont[Numbers=OldStyle]{Garamond Premiere Pro Regular}     \begin{document}     \begin{center}       \begin{tabular}{lc}     bullet.01 & \symbol{\string"051A}\\     bullet.02 & \symbol{\string"051B}\\     bullet.03 & \symbol{\string"051C}\\     bullet.04 & \symbol{\string"051D}\\     bullet.05 & \symbol{\string"051E}\\     bullet.06 & \symbol{\string"051F}\\     bullet.07 & \symbol{\string"0520}\\     bullet.08 & \symbol{\string"0521}\\     bullet.09 & \symbol{\string"0522}\\     bullet.10 & \symbol{\string"0523}\\     bullet.11 & \symbol{\string"0524}\\     bullet.12 & \symbol{\string"0525}\\     bullet.13 & \symbol{\string"0526}\\     bullet.14 & \symbol{\string"0527}       \end{tabular}     \end{center}     \end{document}      That didn’t produce any errors or warnings, but none of the ornaments appeared in the PDF output. How should I adjust my source in view of the changes in TeX Live 2013?


title: Table row height, text vertical center and color

text: So I have the table in the following working example. I used the solution at Column padding in tables but still the text inside each cell is not centered vertically … Besides, I wanted to give it a fancier look like in Beamer table drop shadow but I don't seem to be able to include `\rowcolors{1}{RoyalBlue!20}{RoyalBlue!5}` when working with `\multicolumn`, same for the drop shadow.               \documentclass[ignorenonframetext, xcolor={dvipsnames,table}]{beamer}     \mode<presentation> {     \usetheme{Berkeley}     \usecolortheme{dolphin}          \usepackage{multirow}     \usepackage{pbox}     }          \begin{document}     \begin{frame}     \begin{center}     {\small     \begin{tabular}{l|c|c|c|}         \multicolumn{1}{r}{}             & \multicolumn{1}{c}{\textbf{\pbox{20cm}{Tissue-specific\\penetrance}}}             & \multicolumn{1}{c}{\textbf{\pbox{20cm}{Ubiquitous\\penetrance}}}             & \multicolumn{1}{c}{}\\         \cline{2-4}             \textbf{\pbox{20cm}{Tissue-specific\\expression}}             & \textit{\pbox{20cm}{CLASS 1\\12 genes}}             & \textit{\pbox{20cm}{CLASS 4\\8 genes}}             & \textcolor{green!70!black}{20 genes}\\         \cline{2-4}             \textbf{\pbox{20cm}{Ubiquitous\\expression}}             & \textit{\pbox{20cm}{CLASS 3\\32 genes}}             & \textit{\pbox{20cm}{CLASS 2\\20 genes}}             & \textcolor{pink}{52 genes}\\         \cline{2-4}         \cline{2-4}             & \textcolor{red!70!black}{44 genes}             & \textcolor{RoyalBlue}{28 genes}             & \textbf{\pbox{20cm}{72 genes}}\\         \cline{2-4}     \end{tabular}     }     \end{center}     \end{frame}     \end{document}


**How can I find out the linebreak penalty at a given point of text or a math formula?** An example would be the point before and after the equals sign here: `\\(a + b = c\\)`. If I write complex formulas, I sometimes want to manually insert `\penalty` values, but the choice of number to get the effects I want (e.g., Do I really need `\penalty10000` to prevent a linebreak after some particular `\mathrel` in some particular formula?) often amounts to a long process of trial-and- error. Knowing what effective `\penalty` value there would be at a certain point within a formula without manual intervention will help reduce the space for experimentation.


title: Spacing before align environment

text: I am working with the exam class, and need to align some solutions. However, I would like to move the align environment up, so that it is on the same line as the question/part number. Is this possible? Thanks


title: Template of theorem statement?

text: So Basically I am looking for something that looks like this: Using the amsmath package:               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     $\left. \begin{aligned}            A &= T \\            B &= F          \end{aligned} \right\} \implies A \vee B = T \vee F = T$     \end{document}      ![enter image description here](http://i.stack.imgur.com/5DRxD.gif) Where we have multiple premises of the theorem on the left joined by a bracket, and we have (multiple) conclusions of the theorem on the right. Two sides connected by an arbitrary operator (in this case would be the arrow). The thing that isn't working with this template is that it should:   1. divides the page into left and right region, i.e. when new line is created, the content of the right region will not occupy that of the left.   2. must allow itemized/enumerated list on both sides, which means the template cannot be in math mode.


title: Adding information to a Beamer title page

text: I'm working on putting together a Beamer presentation and had a question.               \documentclass{beamer}     \usetheme{CambridgeUS}     \title{Screen Scraping with R}     \subtitle{}     \author{name}     \date{June 20, 2011}     \begin{document}      I want to add "Kansas City R Users Group" below the author, but I don't want it to be the subtitle. Can anyone tell me how to do that.


title: Using savebox around the BODY of environ

text: I tried to use a `\savebox` around the `\BODY` macro of `\NewEnviron`. Can I keep the linebreaks somehow (they are gone, in the MWE)?               \documentclass{article}          \usepackage{environ}          \newsavebox{\mybox}          \NewEnviron{myenv}{%         \savebox{\mybox}{\BODY}         \usebox{\mybox}     }          \begin{document}          \begin{myenv}     A          B     \end{myenv}          \end{document}      The problem is probably independent from the `environ` package but that is what I'm trying to use. Or: Is there a way to determine the vertical and horizontal size of the `\BODY`?


title: Put projects into OS X bundles

text: I’m still looking for the solution to a question asked in 2010: Under Mac OS X, but staying compatible with other operating systems, I want to hide the mechanics. _Please note:_ I do not want to delete the helper files after the job is done and I do not want to attach them to the PDF either! A *TeX project should appear as a single file in the Finder, despite its many temporary and auxiliary actual files. It would either open the associated PDF for Quick Look (incl. icon), viewing and printing or the main `.tex` for compilation or all `.tex` files for editing. It would still maintain transparent file access for terminal applications. The concept is called either bundle or package in OS X. Doing this should require only few things that a script or small app should be able to automate:   * Append `.texp` or `.texd` to the folder name (as introduced by Jérôme Laurens for iTeXMac). This is the only change the `*tex` programs would face.   * Generate and add at least one `.plist` file – `Info.plist`? –, possibly keep it up to date.   * Adhere to and maintain a certain file and folder structure within. Several steps would be nice to have, too:   * Hack the `Info.plist` of TeXShop (or what-have-you) to claim edit support for the two aforementioned file extensions, and Preview for viewing.   * Actually make TeXShop support bundles, i.e. no longer store metadata in comments like `% !TEX encoding = UTF-8 Unicode` or `% !TEX TS-program = XeLaTeX` or `% !BIB TS-program = biber` or `% !TEX root = main.tex`.   * Store a local copy of all classes and packages used to compile, but only use this if asked to.   * Revive the texwrapper project, it’s such a good idea. A recent, closed question suggests – or at least commenters there assume – that such bundles would be used parallel to the actual development version; this is not the case!


title: how can I improve the look and impact of thi tikz tree diagram

text: \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}          % styles for flowcharts     \tikzstyle{block} = [rectangle, draw, text width=5em, text centered, rounded corners, minimum height=4em]     \begin{document}     \begin{frame}     \begin{tikzpicture}[node distance=2.6cm, auto, >=stealth]        % nodes        \node[block](Physiological Reflux)[0,0]{Physiological Reflux};        \node[block] (Symptomatic GERD)  [right of=Physiological Reflux]                       {Symptomatic GERD};        \node[block,text width=2.8cm]                     (Esophagitis)  [right of=Symptomatic GERD, node distance=3.3cm]  {Esophagitis};        \node[block] (Complicated GERD)  [right of=Esophagitis, node distance=3.6cm]  {Complicated GERD};        \node[block, textwidth=4cm] (Typical)  [below left of=Symptomatic GERD, node distance=4cm]    {{\bf Typical} \newline Heart burn \\  Regurgitation};        \node[block](Atypical)[below right of=Symptomatic GERD, node distance =4cm]{{\bf atypical}\\ \indent Chest pain\\dysphagia\\Cough \\ Asthma \\ Laryngitis  };         \node [block](Complicated)[below  of =Complicated GERD, node distance =4cm]{ {\bf Complicated }\\Ulcerations\\ Hemorrhages \\ Barret's esophagus \\ Stricture\\ Adenocarcinoma };        % edges       \draw[->] (Physiological Reflux) -- (Symptomatic GERD);       \draw[->] (Symptomatic GERD) -- (Esophagitis);        \draw[->] (Esophagitis) -- (Complicated GERD);        \draw[->] (Symptomatic GERD) -- (Typical);        \draw[->] (Symptomatic GERD)--  (Atypical);         \draw[->](Complicated GERD)--(Complicated);        %\draw[->] (e) -- (f);        %\draw[->] (f) -- (g);        %\draw[->] (g) -- (h);       \end{tikzpicture}     \end{frame}     \end{document}


title: How to draw saturation symbol inside a node in TikZ

text: I'm working on a block diagram using TikZ. I'd like to create a symbol like below, which means I have to draw 5 lines inside a node and write a letter in the upper-right corner. ![enter image description here](http://i.stack.imgur.com/W4oLl.png) What's the best way to achieve what I need? Any hints appreciated.


title: \includesvg does not detect SVG file

text: ### Input `test.tex`:               \documentclass{article}     \usepackage{svg}          \begin{document}              \includesvg{my-svg-file}          \end{document}      `my-svg-file.svg` (in the same folder): http://ftp.gwdg.de/pub/ctan/info/svg- inkscape/image.svg ### Error output               Process started: "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\lualatex.exe"  -synctex=1 -interaction=nonstopmode "test".tex          Process exited with error(s)                       This is LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9)  (format=lualatex 2014.1.21)  4 FEB 2014 19:27     **test.tex     (D:/Desktop/TEST/test.tex     LaTeX2e <2011/06/27>     LuaTeX adaptation of babel <v3.8m-luatex-1.5> and hyphenation patterns for engl     ish, loaded.     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/svg/svg.sty"     Package: svg 2012/09/05 v1.0 SVG inclusion and extraction          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/xkeyval/xkeyval.sty"     Package: xkeyval 2012/10/14 v2.6b package option processing (HA)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/xkeyval/xkeyval.tex"     \XKV@toks=\toks14     \XKV@tempa@toks=\toks15     \XKV@depth=\count87     File: xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/xkeyval/keyval.tex")))     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/subfig/subfig.sty"     Package: subfig 2005/06/28 ver: 1.3 subfig package          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/caption/caption.sty"     Package: caption 2013/05/02 v3.3-89 Customizing captions (AR)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/caption/caption3.sty"     Package: caption3 2013/05/02 v1.6-88 caption3 kernel (AR)     Package caption3 Info: TeX engine: e-TeX on input line 57.     \captionmargin=\dimen103     \captionmargin@=\dimen104     \captionwidth=\dimen105     \caption@tempdima=\dimen106     \caption@indent=\dimen107     \caption@parindent=\dimen108     \caption@hangindent=\dimen109     )     \c@ContinuedFloat=\count88     )     \c@KVtest=\count89     \sf@farskip=\skip43     \sf@captopadj=\dimen110     \sf@capskip=\skip44     \sf@nearskip=\skip45     \c@subfigure=\count90     \c@subfigure@save=\count91     \c@lofdepth=\count92     \c@subtable=\count93     \c@subtable@save=\count94     \c@lotdepth=\count95     \sf@top=\skip46     \sf@bottom=\skip47     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/import/import.sty"     Package: import 2009/03/23  v 5.1     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/graphicx.sty"     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/graphics.sty"     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/trig.sty"     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/00miktex/graphics.cfg"     File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive     )     Package graphics Info: Driver file: pdftex.def on input line 91.          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/pdftex-def/pdftex.def"     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/infwarerr.sty"     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ltxcmds.sty"     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/pdftexcmds.sty"     Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO     )          ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ifluatex.sty"     Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)     Package ifluatex Info: LuaTeX detected.     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ifpdf.sty"     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     )     Package pdftexcmds Info: \pdf@primitive is available.     Package pdftexcmds Info: \pdf@ifprimitive is available.     Package pdftexcmds Info: \pdfdraftmode found.          ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/luatex-loader.sty"     Package: luatex-loader 2010/03/09 v0.4 Lua module loader (HO)          (C:/Program Files (x86)/MiKTeX 2.9/scripts/oberdiek/oberdiek.luatex.lua))     \pdftexcmds@toks=\toks16     )     \Gread@gobject=\count96     ))     \Gin@req@height=\dimen111     \Gin@req@width=\dimen112     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/oberdiek/transparent.sty"     Package: transparent 2007/01/08 v1.0 Transparency via pdfTeX's color stack (HO)               ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/oberdiek/auxhook.sty"     Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO)     ))     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/xcolor/xcolor.sty"     Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)          ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/00miktex/color.cfg"     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package xcolor Info: Driver file: pdftex.def on input line 225.     Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.     Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.     Package xcolor Info: Model `RGB' extended on input line 1353.     Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.     Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.     Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.     Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.     Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.     Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.     )     \SVG@out@width=\skip48     \SVG@out@height=\skip49     \c@svgfigure=\count97     )     (D:/Desktop/TEST/test.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.     LaTeX Font Info:    ... okay on input line 4.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.     LaTeX Font Info:    ... okay on input line 4.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.     LaTeX Font Info:    ... okay on input line 4.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.     LaTeX Font Info:    ... okay on input line 4.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.     LaTeX Font Info:    ... okay on input line 4.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.     LaTeX Font Info:    ... okay on input line 4.     Package caption Info: Begin \AtBeginDocument code.     Package caption Info: subfig package v1.3 is loaded.     Package caption Info: End \AtBeginDocument code.          ("C:/Program Files (x86)/MiKTeX 2.9/tex/context/base/supp-pdf.mkii"     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count98     \scratchdimen=\dimen113     \scratchbox=\box26     \nofMPsegments=\count99     \nofMParguments=\count100     \everyMPshowfont=\toks17     \MPscratchCnt=\count101     \MPscratchDim=\dimen114     \MPnumerator=\count102     \makeMPintoPDFobject=\count103     \everyMPtoPDFconversion=\toks18     )          See the next code block, please.         The relevant parts probably start at this line:               ! Undefined control sequence.     \@includesvg ...extracttrue \fi \ifnum \pdfstrcmp                                                        {\pdffilemoddate {\SVG@in@...     l.6     \includesvg{my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing number, treated as zero.     <to be read again>                         {     l.6     \includesvg{my-svg-file}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing = inserted for \ifnum.     <to be read again>                         {     l.6     \includesvg{my-svg-file}          I was expecting to see `<', `=', or `>'. Didn't.          ! Missing number, treated as zero.     <to be read again>                         {     l.6     \includesvg{my-svg-file}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Undefined control sequence.     \@includesvg ...ifnum \pdfstrcmp {\pdffilemoddate                                                        {\SVG@in@path #2.svg}}{\pd...     l.6     \includesvg{my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \@includesvg ...@in@path #2.svg}}{\pdffilemoddate                                                        {\SVG@in@path #2.pdf}}>0\i...     l.6     \includesvg{my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          runsystem(inkscape -z -C -f./my-svg-file.svg -A./my-svg-file.pdf --export-latex     )...disabled.               ! LaTeX Error: File `./my-svg-file' not found.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.6     \includesvg{my-svg-file}          I could not locate the file with any of these extensions:     .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2     Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.               ! LaTeX Error: File `./my-svg-file' not found.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.6     \includesvg{my-svg-file}          I could not locate the file with any of these extensions:     .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2     Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.               ! LaTeX Error: File `my-svg-file.pdf_tex' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: pdf_tex)          Enter file name:      ! Emergency stop.     <read *>           l.6     \includesvg{my-svg-file}               *** (cannot \read from terminal in nonstop modes)                    Here is how much of LuaTeX's memory you used:      3383 strings out of 495011      100000,128383 words of node,token memory allocated 482 words of node memory still in use:         nodes        avail lists: 1:1,2:26,3:1,4:2,6:2,7:1,9:2      6764 multiletter control sequences out of 65536+200000      15 fonts using 431807 bytes      68i,1n,98p,308b,87s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!      ### System   * Windows 8 Pro 64-bit   * Inkscape installed and added to PATH (verified)   * MiKTeX-pdfTeX `2.9.4535 (1.40.13) (MiKTeX 2.9)`   * LuaTeX `beta-0.70.2-2012060719` I'm sorry for not being able to further analyze the errors. I've already done some research via Google, but I haven't found any usable result yet. I appreciate every hint! * * * After incorporating Heiko Oberdiek's code, I get `LaTeX Error: File`./my-svg- file' not found.`. Changing the relative path to an absolute one (`D:\Desktop\TEST\my-svg-file` in this case), leads to completely different errors:               Log file     ...     ! Undefined control sequence.     \\  ->\let \reserved@e                             \relax \let \reserved@f \relax \@ifstar {\let \reserv...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \\  ->\let \reserved@e \relax \let \reserved@f                                                     \relax \@ifstar {\let \reserv...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ #1#2->\begingroup \def \in@@                                        ##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ ...f \in@@ ##1#1{}\toks@ \expandafter {\in@@                                                        #2{}{}#1}\edef \in@@ {\the...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ ... \expandafter {\in@@ #2{}{}#1}\edef \in@@                                                        {\the \toks@ }\expandafter...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ #1#2->\begingroup \def \in@@                                        ##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ ...f \in@@ ##1#1{}\toks@ \expandafter {\in@@                                                        #2{}{}#1}\edef \in@@ {\the...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \in@ ... \expandafter {\in@@ #2{}{}#1}\edef \in@@                                                        {\the \toks@ }\expandafter...     l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     <argument> \ifSVG@in@read           l.15    \includesvg{D:\\Desktop\\TEST\\my-svg-file}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          )     ! Incomplete \iffalse; all text was ignored after line 15.     <inserted text>                      \fi      <*> test.tex          The file ended while I was skipping conditional text.     This kind of error happens when you say `\if...' and forget     the matching `\fi'. I've inserted a `\fi'; this might work.


title: plain TeX theory, \afterassignment

text: Is there a real difference between               \newcount\acounter     \def\dosomething{\afterassignment\dosomesecret\acounter=}     \def\dosomesecret{I do something with \the\acounter}      and               \newcount\acounter     \def\dosomething#1{\acounter=#1%         I do something with \the\acounter}      What is the _plus_ of `\afterassignment`? Why should I prefer one solution over the other?


title: caption+autonum+{a certain structure}=freeze

text: PDFLaTeX'ing this results in a freeze:               \documentclass[12pt]{book}          \usepackage{caption}     \usepackage{autonum}          \begin{document}          \begin{figure}[ht]     \begin{align}     x=y     \end{align}     \caption{Caption}     \label{fig1}     \end{figure}          %\subsection{Title}     %\label{sec:xyz}          \begin{figure}[ht]     \begin{align}     y=z     \end{align}     \caption{Caption}     \label{fig2}     \end{figure}          \end{document}      And if I uncomment the two lines, it complains about an undefined control sequence. Am I implementing this structure wrong, or should I report a bug for one of the packages? P.S. MiKTeX 1/31/2014


title: Strange behaviour with \detokenize and underscore

text: I just learned about `\detokenize`, so this question is likely a naive one. Nonetheless, based on what I thought that I understood about `\detokenize`, I would have expected `\detokenize{_}` to render as `_`. However, when I compile the following MWE, `\detokenize{_}` renders as something that seems to be ~~`U+05C4`~~ `U+02D9` (see @Qrrbrbirlbel's comment).               \documentclass{article}          \begin{document}          A\detokenize{_}B          \end{document}      ![enter image description here](http://i.stack.imgur.com/UM480.png) However, when I add `\usepackage[T1]{fontenc}` to the preamble, everything works as expected.               \documentclass{article}          \usepackage[T1]{fontenc}          \begin{document}          A\detokenize{_}B          \end{document}      ![enter image description here](http://i.stack.imgur.com/tsuca.png) What's going on here? My `.tex` file is UTF-8 encoded, and I'm compiling on a Mac (OS X 10.9.1) with TeXShop (v. 3.26) if any of that is relevant here.


title: What does a double ampersand (&&) mean in LaTeX?

text: I've seen several answers that use the double ampersand, but I can't figure out exactly what it does. I tried this out:               \begin{align*}     \frac{3x + y}{7} &= 9   & \text{given}   \\     3x + y &= 63            & \text{multiply by 7}   \\     3x &= 63 - y            & \text{subtract y}   \\     x &= 21 - \frac{y}{3}   & \text{divide by 3}   \\     \end{align*}          \begin{align*}     \frac{3x + y}{7} &= 9  && \text{given}   \\     3x + y &= 63           && \text{multiply by 7}   \\     3x &= 63 - y           && \text{subtract y}   \\     x &= 21 - \frac{y}{3}  && \text{divide by 3}   \\     \end{align*}      ![one & vs double && alignment](http://i.stack.imgur.com/1IhRx.png) ...and it looks like the only difference is right vs. left justification. But when I throw in this:               \begin{align*}     \frac{3x + y}{7} &&= 9  && \text{given}   \\     3x + y &&= 63           && \text{multiply by 7}   \\     3x &&= 63 - y           && \text{subtract y}   \\     x &&= 21 - \frac{y}{3}  && \text{divide by 3}   \\     \end{align*}      ![more than one && in one line](http://i.stack.imgur.com/lenJ2.png) that goes out the window. **What exactly does && do in LaTeX?** Why does having a single && in a row make the last column left justified, but having two &&'s make it right justified? How do & and && differ?


title: Problem with qedhere

text: In a paper I'm writing, I end a proof with a displayed equation that has some cases in it. The relevant code looks something like the following:               \[f(x) = \begin{cases}     2x & \text{if $x<0$}\\     7  & \text{if $x=0$}\\     1-x & \text{if $x>0$}     \end{cases} \]     \end{proof}      What I want to happen is for the amsthm "tombstone" to be placed on the right- hand side of the page aligned with the "1-x" line. I think this should be possible by placing a \qedhere in an appropriate place, but I can't seem to figure out where (I've tried all the obvious choices, and they all give me incorrect behavior). Thanks for any help!


title: How to get showkeys bugfix into tools package distribution

text: Almost a year ago, the **showkeys** package was updated to v3.16 in response to a bug report: http://www.latex-project.org/cgi- bin/ltxbugs2html?pr=tools/4173 Showkeys is supposed to be part of the **tools** distribution. How do we get the **tools** distribution on CTAN updated to include the update to **showkeys**? http://www.ctan.org/pkg/tools


title: Why use a package to typeset units?

text: I've seen a lot of posts about different packages for typesetting units and their relative strengths and weaknesses. Most posts seem to agree that the `siunitx` package is the most up to date package, but I haven't really figured out the advantages of using a package at all. What is the advantage of writing something like:               \SI{10}{\kilo\gram\meter\per\second\squared}      when you could just write:               kg m s$^-2$      Or for numbers, what's the difference between               \num{10}      and               10


title: Intertext vertical spacing

text: How do I reduce the vertical spacing of `\intertext`?


title: Bangla latex comple error

text: % !TEX TS-program = XeLaTeX          \documentclass[10pt]{article}     \usepackage{polyglossia}     \setmainlanguage[numerals=Devanagari]{bengali}     \setotherlanguage{english}     \newfontfamily\englishfont[Scale=MatchLowercase]{Linux Biolinum O}     \newfontfamily\bengalifont[Script=Bengali]{Akaash}     \begin{document}     \tableofcontents          \section{ভূমিকা}     এটি একটি ইংরেজি লেখা ছোট অধ্যায় যে বাঙ্গালী এ \textenglish{Google Translate} দ্বারা অনুবাদ করা হয়েছে. এটা খুব স্পষ্ট নয় যদি সঠিক অনুবাদ বা না কিন্তু ক্রিয়াটি ফন্ট দেখাতে যথেষ্ট হওয়া উচিত.     \end{document}      I have copied the code from How to write Bengali in LaTeX? . When I paste it in my KILE editor its not working. Even I have inserted it on https://www.writelatex.com/656918hxmjxx#/1381658/   but it is showing compile error. How to solve this?               sudo apt-get install ttf-bengali-fonts      From above I have installed the code. When I run the problem is showing: ![enter image description here](http://i.stack.imgur.com/hwRkN.png) This is the .log file,:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2013.11.5)  17 JAN 2014 00:44     entering extended mode      %&-line parsing enabled.     **ppp.tex     (./ppp.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, sanskrit, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texmf-texlive/tex/xelatex/polyglossia/polyglossia.sty     Package: polyglossia 2009/01/25 v1.0.2 Babel replacement for XeLaTeX               ! LaTeX Error: File `etoolbox.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:      ! Emergency stop.     <read *>           l.5 \RequirePackage                        {fontspec} %which itself depends on xkeyval^^M     *** (cannot \read from terminal in nonstop modes)               Here is how much of TeX's memory you used:      208 strings out of 495052      2371 string characters out of 1182271      47242 words of memory out of 3000000      3474 multiletter control sequences out of 15000+50000      3640 words of font info for 14 fonts, out of 3000000 for 9000      28 hyphenation exceptions out of 8191      23i,0n,19p,158b,36s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!


title: New command with default does not work

text: Hello I have the following new command (a bit simplified for readability):               \newcommand{\xz}[1][0]{x_{#1}}      I'm expecting the following behavior:               $\xz$ outputs as $x_0$     $\xz{1}$ outputs as $x_1$      Though, the compiled result returns:               $\xz$ outputs as $x_0$ (ok!)     $\xz{1}$ outputs as $x_01$ (??)      What I'm missing there?


title: Can you explain how this code works?

text: I found this code somewhere on the Tex archives and have been puzzling over it for some time. Can anyone describe how it works?                    % Date: Thu, 7 Feb 91 12:20:50 -0500     %From: amgreene@ATHENA.MIT.EDU     %Subject: A response to perl hackers     \let~\catcode~`?`\     \let?\the~`#?~`~~`]?~`~\let]\let~`\.?~`~~`,?~`~~`\%?~`~~`=?~`~]=\def     ],\expandafter~`[?~`~][{=%{\message[}~`\$?~`~=${\uccode`'.\uppercase     {,=,%,{%'}}}~`*?~`~=*{\advance.by}]#\number~`/?~`~=/{*-1}\newcount.     =\-{*-}~`-?~`~]-\-~`^?~`~=^{*1}~`\ ?~`~= {.`\ $}~`@?~`~=@{,.,"#`@^$}     .`#*`'$.?~`~0-?~`~$//$^$ .``^$*?~`~$^$.?~`~0-?~`~/$-?~`~^$@*?~`~$ *     ?~`~*?~`~*?~`~*?~`~$@-?~`~$ .?~`~0-?~`~-?~`~$.``^$^^$.`<-?~`~*`<$@*     ?~`~$*?~`~-`(-`+$%}\batchmode      It lists all your input files!


title: Package options and \RequirePackage: order of commands and option conflicts?

text: How do the options of a `\RequirePackage` command interact with options specified for that same package elsewhere? Here is an example: The `pdfx` package, if loaded with the `a-1b`-option, executes the command `\RequirePackage[pdftex,pdfa]{hyperref}`. However, later in my LaTeX source file, I might also execute the command `\usepackage[pdfa=true,linkbordercolor={0 0 1}]{hyperref}`. Where in my document should I place the `\usepackage[a-1b]{pdfx}`-command so that it doesn't cause any conflicts with my `hyperref`-command? Does the fact that `pdfx`'s `\RequirePackage`-command loads different options from the ones I am specifying in my `\usepackage[...]{hyperref}`-command cause problems? Relevant:   * Creating a dependency tree (\RequirePackage) for packages used in my document   * What are best practices for package authors to deal with package conflicts?


title: Converter europass.xml to tex

text: Do you know a converter, which transforms an europass.xml to an europass.tex file? `europecv` could be the documentclass for the europass.tex for instance. This means, it is not a question about 'show me a link for a documentclass'. There is no interest concerning rewriting my cv. That's the point.


title: Setting leading in LaTeX using \fontsize: what are the advantages and disadvantages?

text: LaTeX has several ways of setting leading without changing anything else, including:   * `\fontsize{default font size}{value of leading}\selectfont`   * `\linespread{ratio of leading to original}`   * `\leading{value of leading}` % requires the leading package Some go in the preamble, and some go in the body of the text. I would like to use the first way above (`\fontsize`) exclusively, because I can set font size as well. Does this have any advantages or disadvantages compared to the other ways?


title: Hyperref, Table of Contents and subsections

text: I have encountered a problem in latex that I have not been able to solve. While the hyperref package generates clickable links in the table of contents, it does not link any subsection to the actual subsection but to the section that they are under. Is there anyway to change this behaviour so that it either links to the subsection itself or the page the subsection is on? After looking into it a bit more, it seems that it is required that one disables section numbering and uses the titlesec package for this issue to show. Below is a sample of this issue:               \documentclass{report}     \usepackage[linktoc=all]{hyperref}     \setcounter{secnumdepth}{0}     \usepackage{titlesec}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }          \begin{document}     \tableofcontents     \chapter{test}          Test text     \newpage     \section{A section}          Lorem Ipsum     \newpage     \subsection{This link is wrong}          \end{document}


title: old style numerals in mhchem equations

text: I use the Lucida font for my documents with its old style numerals in text and its lining figures in mathmode. But how can I get lining figures inside chemical eqautions with `mhchem`? Here is some sample code (I compile with either `latex` or `pdflatex`)               \documentclass{article}          \usepackage[paperwidth=90mm, paperheight=20mm, left=10pt, top=20pt]{geometry}%          \usepackage[romanfamily=bright-osf,stdmathdigits=true,scale=.9]{lucimatx}          \usepackage{mhchem}          \begin{document}     Chemical formula: \ce{2 H2O -> 2H2 + O2}     \end{document}      This is what I get ![Old style numerals](http://i.stack.imgur.com/wQIRc.png) This is what I want ![No old style numerals](http://i.stack.imgur.com/4fXSo.png) I already tried               {\fontfamily{hlh}\selectfont \ce{2 H2O -> 2H2 + O2}}      But that will mess up the format if the equations get more complicated I found a related entry with the same problem but this guy uses `luatex`: text figures (old style numbers) and mhchem


title: Iterate over space-separated list

text: I’ll briefly explain the background in case this can be solved simpler but I’d still be interested in an answer to the actual question, too. My chapter titles are very narrow and use a large font so that it may happen that it has to be broken. I want to prevent the hyphenation of words at all cost, so I thought I could simply wrap all the individual words inside the caption into `\mbox`es. This would cause line breaks to be inserted _between_ words, not inside of them. But of course, I don’t want to change my usage of `\chapter`. That is, I do _not_ want to write `\chapter{\mbox{Some} \mbox{chapter}}`. Instead, I wanted to handle this by redefining `\chapter` (well, using `[explicit]titlesec` actually). My idea was to create a list parser using `etoolbox` that separates the words on whitespace and wraps the words in mboxes. Conceptually, this is extremely simple:               \newcommand*\mboxed[1]{%       \let\do\mbox       \DeclareListParser{\dospacelist}{ }       \dospacelist#1}          \titleformat{\chapter}       {\sffamily\Huge}       {\thechapter\ }       {0pt}       {\mboxed{#1}}      Not very surprisingly, this doesn’t work. I also tried changing the catcode of space to 11 in the `mboxed` command inside a group but this didn’t work either. Is it even _possible_ to write the `mboxed` macro in (La)TeX? How should this look like? **Increased difficulty** (for extra points): The captions can also contain macros themselves, for example, one of my chapters is defined as               \chapter{{\texorpdfstring{\cpp}{C++}}      … because the `\cpp` command, which us a pretty-printed version of the string “C++”, doesn’t work in PDF labels.


title: Code alignment using listings with proportional fonts is poor

text: I would like to typeset code using proportional fonts and the `listings` package, but no matter what I do, alignment is always off. Here is an example in Java (taken from Wikipedia):               \documentclass[10pt,pdftex]{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{listings}          \begin{document}          \lstset{language=Java, columns=fullflexible, keepspaces}          \begin{lstlisting}     import javax.swing.JFrame;  // Importing class JFrame     import javax.swing.JLabel;  // Importing class JLabel     public class HelloWorld {         public static void main(String[] args) {             JFrame frame = new JFrame();            // Creating frame             frame.setTitle("Hi!");                  // Setting title frame             frame.add(new JLabel("Hello, world!")); // Adding text to frame             frame.pack();                           // Setting size to smallest             frame.setLocationRelativeTo(null);      // Centering frame             frame.setVisible(true);                 // Showing frame         }     }     \end{lstlisting}          \end{document}      Note that with the monospaced font seen above, all the comments are nicely aligned. I have tried using different combinations of `columns=flexible`, `columns=fullflexible`, `columns=spaceflexible`, and `keepspaces`, but none of them give correct alignment. Here is what an ideal result should look like: ![enter image description here](http://i.stack.imgur.com/NsGiY.png) Notice that the comments are aligned the same way as in the source code and no spurious spaces have been introduced. I think this could be done automatically by having a mechanism that detects when alignment is used in the source code. Since I use tabs for indentation and spaces for alignment, this mechanism could be e.g. detection of two or more consecutive spaces. My LaTeX programming skills are too poor to create this myself, but maybe someone here could give it a go?


title: Plot legend without line break

text: I am having a plot with legend entries. The entries are not really long, it would be nice to have them in a single row. The default behavior adds a line break after each entry. Furthermore, the are all centered, I would prefer left flushed. I did not find the correct parameter for changing that. Anyone any suggestions or pointers fore me?


title: In SI units, use text font numerals or math font numerals?

text: I am using Palatino and Neo Euler. When typesetting SI units with `siunitx` package the font for the unit is changed to the text roman, but the numerals are still from the math alphabet. Euler has a distinctive numerals, so what do you think? Should the numerals match the typeface used for the unit? Or should they remain as Euler? ![enter image description here](http://i.stack.imgur.com/fWxGF.png) My thought: When the unit is in line, surrounded by text it is, maybe, better to use the palatino numerals. But this leads to inconsistency with units given in equations or numerals in tables.               \documentclass{standalone}     \usepackage{filecontents}          \begin{filecontents*}{mykern.fea}     languagesystem DFLT dflt;     languagesystem latn dflt;     feature kern {       pos V  \slash -250;     } kern;          \end{filecontents*}          \usepackage{fontspec}     \setmainfont[FeatureFile=mykern.fea]{TeX Gyre Pagella}          \usepackage{unicode-math}     \setmathfont[math-style=upright]{euler.otf}     %\usepackage{microtype}     \usepackage{siunitx}               \begin{document}     \showoutput     \begin{tabular}{ll}     Euler + Palatino & \SI[per-mode = symbol]{300}{\mega\volt\per\metre}\\     \setmathfont[math-style=upright]{TeX Gyre Pagella}     Palatino + Palatino & \SI[per-mode = symbol]{300}{\mega\volt\per\metre}\\     \end{tabular}     \end{document}


title: Different line space in LaTeX for body text and for footnotes

text: Hello I have a LaTeX document and I want to set the space betwen the lines. Normally I would use `\linespread`, but this command will change also the space between lines of footnotes and I do not want that. So, is there any command that can change the space between lines of text, excluding the footnote text?


title: Remove all math for spelling and grammar checking

text: I'm compiling a LaTeX file to pdf and then I use a pdf to text converter to convert the file to plain text. I then use LanguageTool to do grammar checking on that plain text file. The LaTeX source has some customizations to improve the quality of the plain text file (e.g., I removed page headers, page number, multicolumn environments, and I'm using a huge paper size). Unfortunately, LanguageTool finds a lot of the grammar errors in the math parts of the file, which clearly is not very useful. So I was wondering: is it possible to just remove all math from the pdf output? Clearly, I could just delete all math from the LaTeX source, but that is not an acceptable way. The math should just not be rendered in the pdf.


title: Replacing some macro tokens in a list before \write ing

text: I'm trying to hack a bibliography package (`amsrefs`), and fall into the following problem. I'm trying to convert the amsrefs format back to .bib files. This doesn't quite work, because strings get modified; i.e. a name such as `Goode, Johnny~B.` gets transformed to `Goode, Johnny\nobreakspace {}B.` and this is what appears in the output stream when I try to \immediate\write it. How do I force the `\nobreakspace` and/or the more complicated `\protect \unhbox \voidb@x \penalty \@M` macros to evaluate to `~`? Here is a simplified version of what I'm trying to achieve, and the problem: saving this file into 'test.tex' and compiling it produces 'test.bib', which contains the lines               %Output bibliography test.tex to test.bib     @Book{      title={Goode, Johhny\protect \unhbox \voidb@x \penalty \@M \ {}B.}     }      and not just "title={Goode, Johnny~B.}"               \documentclass{article}     \usepackage{amsrefs}          \makeatletter          \def\printtitle#1{\immediate\write\bibfile{ title={#1}}}          \BibSpec{book}{%       +{}{\immediate\write\bibfile{@Book\@charlb}}{transition}       +{}{\printtitle}{title}       +{}{\immediate\write\bibfile{\@charrb}}{transition}     }          \begin{document}     \immediate\newwrite\bibfile     \immediate\openout\bibfile=\jobname.bib     \immediate\write\bibfile{\@percentchar Output bibliography \jobname.tex to \jobname.bib}          \begin{bibdiv}     \begin{biblist}     \bib{test}{book}{       title={Goode, Johhny~B.}     }     \end{biblist}     \end{bibdiv}          \immediate\closeout\bibfile     \end{document}


title: How to keep image file extension when exporting LyX to LaTeX

text: With the workflow: LyX -> LaTeX -> ePub (via pandoc) And I'm having a problem where an image filename included in LyX (say "image.jpg") will be converted into "image" (no extension) in LaTeX. pandoc will then obviously complain it can't find the images. Is there any way (short of parsing the LaTeX and adding the file extensions externally) of configuring LyX to keep them? (I'm using LyX's own export to LaTeX)


title: Beamer: content in box register does not survive \end{frame}

text: Consider the following example (I **edited** the example to include LaTeX `lrbox` environment):               \documentclass{beamer}     \newsavebox\mybox     \newsavebox\myboxb          \begin{document}     \frame{       \sbox\mybox{Hello World!}\usebox\mybox %works            \begin{lrbox}\myboxb Bonjour!\end{lrbox}\usebox\myboxb %works     }          \frame{       \usebox\mybox %is empty            \usebox\myboxb %is empty     }     \end{document}      Why is it that the second frame is blank? Is there possibly a workaround?


title: Integration with textstyle fractions limits

text: I am trying to write an integration question like below with amsmath package:               \displaystyle\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\sin x\,\mathrm{d}x      However, the two fractions limits appear to be too small. I would like to do something like this:               \displaystyle\int_{\textstyle\frac{\pi}{4}}^{\textstyle\frac{\pi}{2}}\sin x\,\mathrm{d}x      Is there an efficient way to set all the integration limits in the document to \textstyle?


title: Cannot convert to Chicago style in biblatex-chicago with notes

text: could you please help me! I need to convert a text to Chicago style with short notes and bibliography afterwards, like this: as Dahl has shown,56 Notes 56. Dahl, Democracy, Chs 1 and 2. Bibliography 11. Dahl, Robert A. “Democracy.” Encyclopædia Britannica Ultimate Reference Suite. Chicago: Encyclopædia Britannica,2004. That's my script, but I get it with footnotes that I don't need, and the list is not enumerated.               \documentclass{article}          \usepackage[nopar]{lipsum} % for dummy text          \usepackage[american]{babel}          \usepackage[babel]{csquotes}          \usepackage[notes, natbib,isbn=false,backend=biber]{biblatex-chicago}            \addbibresource{ex.bib}          \begin{document}          \lipsum[1]\autocite{read2003}     \lipsum[2]\autocite{moghadam2000}          \printbibliography          \end{document}      ex.bib contains the following               @book{moghadam2000,       title={Gender and globalization: Female labor and women\'s mobilization},       author={Moghadam, Valentine},       year={2000},       publisher={Illinois State University Women's Studies Program}     }          @article{read2003,       title={The sources of gender role attitudes among Christian and Muslim Arab-American      women},       author={Read, Jennan Ghazal},       journal={Sociology of Religion},       volume={64},       number={2},       pages={207-222},       year={2003}     }      Thanks a lot in advance!


title: Missing 'pi'-Symbol from euler font in sans serif?

text: I want to set one formula in my document in a sans serif font. As a math font I use the `eulervm`-Package. Unfortunately, the `\pi` is missing (instead a small line appears). Here is a minimal example:               \documentclass{article}     \usepackage[T1]{fontenc}       \usepackage{eulervm}      \begin{document}      \pagestyle{empty}          $2\cdot\pi$           $\mathsf{2\cdot\pi}$          \end{document}      ![Output of the above givn example](http://i.stack.imgur.com/hrcYW.png) It makes no difference, whether I take pdflatex or latex. When I remove the `fontenc` package, the problem is still there, but then I get a `\beta`-symbol instead of the desired `\pi`. Is there a workaround or something I do not understand here?


title: Make pgfplot load data automatically

text: I have a (hopefully) nice pgfplot (If you have any optimization suggestions towards the layout, don't hesitate to tell me :) ), which I will be using repeatedly. Therefore I would like to create a new command that is only fed with the data and produces the pgfplot automatically. The data to be fed are the values of each point plus the values of the confidence intervals. All the rest is supposed to stay the same. I can manage to create a new command where I put each value in question in a {} and put this into the code of the pgfplot - however this is not a nice solution. A more beautiful solution would be to enter the data in one {} and separate the individual entries with spaces. E.g:               \makemypgfplot{     4 3 2.5     5 4 2     7 3 2.5     ...     }      And this as the corresponding pgfplot:               \documentclass{article}      \usepackage{tikz} %<-- pgfplots loads TiKZ     \usepackage{pgfplots}     \definecolor{CG}{RGB}{127, 127, 127}     \definecolor{MC}{RGB}{23, 110, 178}     \definecolor{TV}{RGB}{208, 43, 139}     \definecolor{BP}{RGB}{27, 175, 147}     \pgfplotsset{compat=1.9}     \begin{document}          \begin{tikzpicture}[scale=1.3]         \begin{axis}[             axis lines=left,             xlabel= , xmin=0.5, xmax=3.5,             ylabel=Metacognition,             axis line style={-},             xtick = {1,2,3},             xticklabels = {$t_1$,$t_2$,$t_3$},             legend style={at={(axis cs:3.8,2)},anchor=south west,font=\small,mark size=2pt}         ]              \addplot[              smooth,             thick,             solid,             mark=*,             mark size=2.5pt,             color=CG,             mark options=solid,             error bars/.cd, y dir=both, y explicit,             error bar style={solid},         ] plot coordinates {                  (0.91,     4)+=(0, 3)-=(0,     2.5)                  (1.91,     5)+=(0, 4)-=(0,     2)                  (2.91,     7)+=(0, 3)-=(0,     2.5)         };         \addlegendentry{CG}              \addplot[smooth,                  thick,                  dashed,                  color=MC,                  mark=square*,                  mark options=solid,                  error bars/.cd, y dir=both, y explicit,                  error bar style={solid},         ] plot coordinates {                  (0.97,     1)+=(0, 3)-=(0,     2.5)                  (1.97,     2)+=(0, 4)-=(0,     2)                  (2.97,     4)+=(0, 3)-=(0,     2.5)         };         \addlegendentry{MC}              \addplot[smooth,                  thick,                  dotted,                  color=TV,                  mark=diamond*,                  mark size=3pt,                  mark options=solid,                  error bars/.cd, y dir=both, y explicit,                  error bar style={solid},         ] plot coordinates {                  (1.03,     2)+=(0, 3)-=(0,     2.5)                  (2.03,     5)+=(0, 4)-=(0,     2)                  (3.03,     3)+=(0, 3)-=(0,     2.5)         };         \addlegendentry{TV}              \addplot[smooth,                  thick,                  dashdotted,                  color=BP,                  mark=triangle*,                  mark size=3pt,                  mark options=solid,                  error bars/.cd, y dir=both, y explicit,                  error bar style={solid},         ] plot coordinates {                  (1.07,     2.4)+=(0,   3)-=(0,     2.5)                  (2.07,     3.1)+=(0,   4)-=(0,     2)                  (3.07,     1.1)+=(0,   3)-=(0,     2.5)         };         \addlegendentry{BP}                           \end{axis}         \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/bzaWs.jpg) I struggle to make the new command recognize the individual values. Does anyone know how to do that? Thank you for any ideas you might have! Mil


title: Is there a way to tell listings what to do immediately after escaping?

text: What I want to do is having two or more possibilities when escaping from normal code formatting. For instance, if I give the option `escapechar=\⠶` I would like to avoid saying something like this:               \begin{lstlistings}[language=C,escapechar=\⠶]     double a;     int i; ⠶\color{red}$\longleftarrow$ this is counter $i$⠶     \end{lstlistings}      I just want to escape with the given (unusual) character `⠶` being sure that the color command is automatically given. In other words, the escaped text in the following code:               \begin{lstlistings}[language=C,escapechar=\⠶]     double a;     int i; ⠶$\longleftarrow$ this is counter $i$⠶     \end{lstlistings}      should be in red. Similarly, instead of this:               \begin{lstlistings}[language=C,escapechar=\£]     double a; £\color{green}$\longleftarrow$ this is the variable $a$£     int i;     \end{lstlistings}      I want to escape with the character `£` being sure that a green text is typeset.


title: How can I orient a figure in landscape only when it is placed on its own page?

text: Floats sometimes end up placed on a page of their own. When this happens, I'd like them to be rotated to landscape mode so that they take up the whole page. `sidewaysfigure` from the `rotating` package will force a figure to appear on its own page, rotated 90 degrees. However, I'd like my floats to be placed in with the text, or more than one to a page, if at all possible: ideally, they would only be rotated when they end up as the only figure on a page. Is there a way to do this? Is it even feasible?


title: Why don't my hyperref links work with amsart?

text: When I process the file below either with pdflatex, or with latex and then dvipdf, the link on page 1 of the resulting PDF file does not take me to Lemma 1 as expected.               \documentclass{amsart}          \usepackage{hyperref}     \newtheorem{lem}{Lemma}          \begin{document}          See Lemma~\ref{testlemma} below.     \pagebreak          \begin{lem}\label{testlemma}       \begin{enumerate}       \item Testing!       \end{enumerate}     \end{lem}          \end{document}      When I use pdflatex then I get a warning:               pdfTeX warning (dest): name     {lem.1} has been referenced but does not exist, replaced by a fixed one      If I replace `\documentclass{amsart}` with `\documentclass{article}` then the link works as expected. How can I fix this test file to get working hyperref links in PDF files with `amsart`? I am using pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian).


title: Rotating and flipping in TikZ

text: It is known that if I want to shift a draw command by a constant vector, I can do that. My question is, is it possible to flip a draw command (along a given direction), or to rotate it around the zero/other point, given an angle?


title: Beamer poster : scaling issue

text: I am trying to make a poster using the beamer poster template given in this link. http://www.njohnston.ca/2009/08/latex-poster-template/ But I wanted much smaller size, with three columns, so I changed the dimensions using               \setlength{\paperwidth}{40in}     \setlength{\paperheight}{30in}     \setlength{\sepwid}{0.0024\paperwidth}     \setlength{\onecolwid}{0.3\paperwidth}      But I am not getting my margins correctly, The first column has shifted to left and won't see part of the third column. There must be something I should change in str files, I tried different ways, but still I couldn't find a solution. Appreciate if any one can help me on this.


title: About autoindent and postbreak in the package listings

text: I am using the package `listings` to show my Matlab code. The code was pre- typed in a file and everything will be loaded from the file and a `.tex` file will be generated automatically to show the code with `lstlisting`. Now, I am worrying about the long line and I need it break line automatically so I add the `breaklines` options. It works but if the breaking point is on the comment string, the line break will break the comment into two parts which look pretty ugly because in Matlab the comment must start with `%` symbol and now the second line is shown in comment style but not prefixed with `%`. I read the `listings` package documentation and it mention the `postbreak` and `autoindent` options. I don't understand how it work, I try the example shown in the document but didn't get the same results as shown there. Anyway, my question is if it is possible for `listings` package or other package to break the comment in a smart way such that the broken line will be aligned and correct prefix with be added to the broken comment. For example, a long command is shown as               delta = 0.001;    % interval of the time slice between two different signals measured in different point      In the following environment,               \begin{lstlisting}[postbreak=\space, breakautoindent=true, breakindent=10pt, breaklines]       delta = 0.001;    % interval of the time slice between two different signals measured in different point     \end{lstlisting}      It shows                 delta = 0.001;    % interval of the time slice between two          different signals measured in different point      But I want it to be                 delta = 0.001;    % interval of the time slice between two                          % different signals measured in different point


title: Package algorithm2e on Ubuntu

text: I am having some trouble getting a LaTeX document to compile. I would like to use the package `algorithm2e`. I am working on a machine running Ubuntu. I tried using Texmaker and Gummi (LaTeX editors) and got same errors on both:               ! LaTeX Error: File `algorithm2e.sty' not found.          Type X to quit or  to proceed,     or enter new name. (Default extension: sty)      Also I have texlive distribution. When I did this on my windows machine (with MiKTeX) it worked like a charm. Suggestions?               \documentclass[12pt]{article}     \usepackage{algorithm2e}          \begin{document}          \end{document}


title: Disable Algorithm Numbering

text: I have seen this question but I still disable the numbering of algorithms. I have the following code:                   \begin{algorithm}             \caption{\textsc{FizzBuzz}}             \begin{algorithmic}                 \FOR{$i \Leftarrow 1 \ldots 100$}                     \IF{$i$ \emph{mod} $3 = 0 \wedge i$ \emph{mod} $5 = 0$}                         \item \textsc{Print}(``FizzBuzz")                     \ELSIF{$i$ \emph{mod} $3 = 0$}                         \item \textsc{Print}(``Fizz")                     \ELSIF{$i$ \emph{mod} $5 = 0$}                         \item \textsc{Print}(``Buzz")                     \ELSE                         \item \textsc{Print}($i$)                     \ENDIF                 \ENDFOR             \end{algorithmic}         \end{algorithm}      It renders the following: ![Algorithm Rendering](http://i.stack.imgur.com/W7fui.png) I want to get rid of the part that says `Algorithm 1`. The answer to the question referenced above basically said to change `\caption{\textsc{FizzBuzz}}` to `\caption*{\textsc{FizzBuzz}}`, but when I do that the following is rendered: ![Algorithm Rendering \(No Caption\)](http://i.stack.imgur.com/VZ41G.png) This offers different algorithm numbering, but I want to disable numbering altogether and keep my caption. Can anybody help me?


title: How to show footnotes in multiple columns

text: I am attaching an image of the footnote page, It uses up lot of vertical space. I want to appear this at the bottom either in itemized format or two / three columns format. Two to three columns would be ideal because of better readability. Thanks for your help ![footnote](http://i.stack.imgur.com/sFLHJ.jpg)


title: TikZ: using the intersections library for normal vector

text: Consider the code:               \documentclass[convert = false]{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{calc}     \usetikzlibrary{intersections}     \begin{document}     \begin{tikzpicture}[       every label/.append style = {font = \scriptsize},       dot/.style = {inner sep = +0pt, shape = circle,         draw = black, label = {#1}},       small dot/.style = {minimum size = .05cm, dot = {#1}},       big dot/.style = {minimum size = .1cm, dot = {#1}}       ]       \coordinate (O) at (0,0);       \draw[name path = ell] (O) ellipse (2cm and 1cm);       \path[name path = line1] (O) -- (135:3cm);            \path[name intersections = {of = line1 and ell, by = P1}];       \node[font = \tiny, fill = black, big dot = {above: \(P_1\)}] (P1) at (P1) {};            \draw (P1) -- ($(P1)!1cm!-90:($(intersection-1)!1cm!(intersection-2)$)$);       \draw (O) -- (P1);            \path[name path = circ] (P1) circle [radius = 1bp];            \draw[name intersections = {of = circ and ell}] (P1) --       ($(intersection-1)!1cm!(intersection-2)$);     \end{tikzpicture}     \end{document}      On this post TikZ: Why is the 2nd intersection not found?, Jake helped with using intersections when only 1 intersection exist. However, even though I am receiving the error that `intersections-2` doesn't exist the plot is correct. ![enter image description here](http://i.stack.imgur.com/6Cc5L.png) If I change `intersection-2` to `P1`, the plot is incorrect but doesn't have a compiling error.               \draw (P1) -- ($(P1)!1cm!-90:($(intersection-1)!1cm!(P1)$)$);      ![enter image description here](http://i.stack.imgur.com/n8zII.png) So how can I have the best of both words a line normal to ray `OP1` and no compiling errors?


title: What's wrong with minipage(table(minipage(align))) arrangement

text: In an attempt to show the code and the output side by side, I have used a table inside a minipage. The table entries are two minipages and one contains an align environment. Having the align environment in the given setting causes problems. I get a meaningless error message > Argument \flalign* has an extra }. as a result. If I put the minipage that contains the align environment inside an fbox the problem disappears. For some reason, I thought I saw the answer to this problem in SX sometime ago, but now I cannot find it. Why do I get this error message? The following is the working example. I have commented out the `\fbox` so that you can see the effect.               \documentclass[11pt]{amsart}       \begin{document}          \begin{minipage}{1\textwidth}     \begin{tabular}{l r}     \begin{minipage}[t]{.65\textwidth}     \begin{verbatim}     \begin{flalign*}     P &=x^2+y^+2xy &\\     &=(x+y)^2     \end{flalign*}     \end{verbatim}     \end{minipage}     &     %\fbox{     \begin{minipage}[t]{.35\textwidth}      \begin{flalign*}     P &=x^2+y^2+2xy &\\     &=(x+y)^2     \end{flalign*}     \end{minipage}     %}     \end{tabular}     \end{minipage}          \end{document}      ![enter image description here](http://i.stack.imgur.com/gPBoc.png)


title: Effect of the definition of a language for \documentclass

text: What exactly does `\documentclass[american]{article}` do with the definition of a language and in what case is it useful to define a language? What is the difference to `\documentclass[british]{article}`?


title: Enumerate within a longtable

text: I have been looking through a couple questions, but cant seem to find the answer to my question. I am trying to create a two column table that spans several pages consisting of two `enumerate` environments that have somewhere around 20 items each. Even with using `longtable`, I still only get a table that only runs for one page. What am I doing wrong? Here is a code snipped:                   \begin{longtable}{p{0.4\textwidth}|p{0.4\textwidth}}         \multicolumn{1}{c|}{FitsFilter} & \multicolumn{1}{c}{Filter} \\         \hline          \begin{enumerate}         \item Read in necessary data from the FITS header and files         \item Define pretrigger range (ilzero) as a function of the sweeplength         and the hardware trigger channel         \item Read in sweep (sweep(i))         \item For iclass=2              \begin{enumerate}         \item Subtract the y-offset (yinit) and convert to AD units (divide by $\Delta$V         {[}V/AD unit{]})          \item Shift (shift()) to common trigger channel (hardware trigger channel         (nchst)) from calculated trigger channel (tfb)              \begin{enumerate}         \item Window data with cosine window         \item FFT to f-space         \item Shift the channel         \item Inverse FFT to t-domain         \item Divide resulting time-domain pulse by the size of the sweep length         \end{enumerate}         \item Accumulate 400 pulses (scum) = $S_{cum}(t)$         \end{enumerate}         \item For iclass=4         ....      On another note, how do I change the width of the table, so that it covers more of the page.


title: How to span the content across two pages in ConTeXt?

text: Most of the pages in my document look like this, a layout common in books:                ___________________________     |             |             |     | Title       | ........... |     |             | ........... |     |  .......... | ........... |     | ........... | ........... |     | ........... | ........... |     | ........... | ........... |     | ........... | ........... |     | ........... | ........... |     |      1      |      2      |     |_____________|_____________|      I have some special pages in which I hope the contents will span across the left and right page.   * The paper is essentially treated like one wide A3 page, except page numbers remain unchanged.   * The margins are identical to above, but there are no margins in the fold of the book.   * Even chapter and section titles should span. Most pages in the book do not span in this way.                ___________________________     |             |             |     | The Title Goes Across Too |     |             |             |     |  ........................ |     | ......................... |     | ......................... |     | ......................... |     | ......................... |     | ......................... |     |      1      |      2      |     |_____________|_____________|      How can I span the content of some pages across two pages in this manner?


title: Align text vertically

text: How can I do something like this:                blabla:   blabla bla bla blabla blabla bla                blabla ...     blabla2:   blabla bla blabla bla bla blabla                ablabla ..      I tried the `tabular` and `array` environements but it gives me long centred lines and don't return after the line reach the end of the page.


title: Can't list bilibliography in order cited using ReVTeX 4.1

text: The journal I am submitting to requires the bibliography be listed in the order cited in the text. How can I do this with ReVTeX? I have tried different journal styles but can't get it to work. If I try to override the `natbib` settings there is an error. I have tried the `\bibliographystyle` settings as well but those seem to be ignored.


title: Is it possible to get rid of the bullets in the miniframes outer theme

text: I actually like the bullets shown when using `\useoutertheme{miniframes}`, but for the long talk I have to give there are just ridiculously many. ![too many bullets](http://i.stack.imgur.com/eoCxk.png) Is it possible to keep the same theme and just removing the bullets, and then displaying slide numbers instead? Here is a minimal example:               \documentclass[compress, final]{beamer}         \usetheme[height=0mm]{Rochester}         \usecolortheme{dolphin}         \useinnertheme{rectangles}         \useoutertheme[footline=empty, subsection=true]{miniframes}          \begin{document}          \begin{frame}{Test frame}         \begin{block}<+->{Block}             Beamer is cool         \end{block}     \end{frame}          \end{document}


title: Why the tabular column specifier C doesn't work?

text: I'm using the tabular enviroment `\begin{tabular}` ... `\end{tabular}` inside of the beamer class `\begin{frame}` ... `\end{frame}` tags. In standard latex documents, i often use something like               \begin{tabular}{C{2.5cm} C{1cm} C{1.5cm} C{1.5cm} C{1.5cm} C{1.5cm} C{1.5cm} C{1.5cm} C{1.5cm} C{1.5cm}}`      to predefine column widths. This seems not to work inside of beamer frames, i get the error:               ! Package array Error:  Illegal pream-token (C): `c' used.      Replacing 'C' with 'c' leads to:               ! Package array Error:  Illegal pream-token (2.5cm): `c' used.      Why does the interpreter complains about setting the width? Is there a universal solution to handle that issue in general?


title: Watermark for selected page only

text: I need to display my college logo as watermark in certificate only... i tried with `\usepackage{draftwatermark}` and               \SetWatermarkText{\includegraphics{filename}}     \SetWatermarkAngle{0}     \SetWatermarkScale{0.45}     \SetWatermarkColor[rgb]{0,1,0}     \SetWatermarkLightness{1}      .....everything is fine except lightness..image is displaying as it is...so the text is not visible .Is there any other commands. for watermark certificate and lightness should be very low.


title: How to reduce space between header and text?

text: I m using mdframed as header. Now i want to reduce the space between header and first line on page. How can i reduce the space?                \documentclass{article}      \usepackage{array,multirow}      \usepackage[table]{xcolor}      \usepackage{fancyhdr}      \usepackage[framemethod=TikZ]{mdframed}      \usepackage[top=2cm, bottom=2cm, left=1cm, right=1cm]{geometry}      \pagestyle{fancy}      \fancyhf{} % sets both header and footer to nothing       \renewcommand{\headrulewidth}{0pt}      \fancyfoot{}      \begin{document}           \arrayrulecolor{white}                \definecolor{textcol}{rgb}{.118, .565, 1.00}                   \fancyhead[C]{%       \begin{mdframed}[linecolor=blue!60,roundcorner=3pt]       \parbox[t]{0.333\textwidth}{\raggedright XXX }%       \parbox[t]{0.333\textwidth}{\centering \thepage}%        \parbox[t]{0.333\textwidth}{\raggedleft YYY}       \end{mdframed}%      }           Some text           \end{document}