title: Make enumerate have beamer themes when using enumitem

text: I really like the `enumitem` package, but it seems to have compatibility issues with `beamer`. I could get them to work together for `itemize` lists by using the following:               \setitemize{label=\usebeamerfont*{itemize item}       \usebeamercolor[fg]{itemize item}       \usebeamertemplate{itemize item}}      It seems to make `itemize` lists follow the current `beamer` theme. But I can't seem to do the same thing for `enumerate`. In particular, when I do this               \setenumerate[1]{label=\usebeamerfont*{enumerate item}}      I get the error "Use of `\enumerate` doesn't match its definition." Is it possible to do a similar thing with `enumerate` to make it follow the current `beamer` theme?


title: Alignment of paragraph with margin around list environment

text: I'm having some trouble with the alignment in my document, I've put my code below. How would I position the sentence starting "All three conditions must..." to be aligned with the definitions/theorems etc.? My itemised points (i), (ii) and (iii) etc. also seem abit out of place and lacking some line spacing? How would I get my document all in all to look something/aligned like the picture below? ![enter image description here](http://i.stack.imgur.com/50GUU.jpg)               \documentclass[11pt,a4paper]{report}     \usepackage{amsmath,amsfonts,amssymb,amsthm,epsfig,epstopdf,titling,url,array}               \theoremstyle{plain}     \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter     \newtheorem{lem}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposition}     \newtheorem*{cor}{Corollary}          \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers     \newtheorem{exmp}[thm]{Example} % same for example numbers     \newtheorem{conj}[thm]{Conjecture}          \theoremstyle{remark}     \newtheorem*{rem}{Remark}     \newtheorem*{note}{Note}               \title{\textbf{My Thesis Title}}     \author{My Name}     \date{\today}          \begin{document}     \tableofcontents          \chapter{Addition}     \section{Basics}     \begin{defn}     Picard's theorem is true if the following properties is valid:          (i) $x^2 =2$          (ii) $x^2 \Rightarrow e^2$          (iii) $\epsilon^2 = e^2$          All three conditions must hold in order for the theorem to be true, and there is an extra condition:          (iv)$ x^7$     \end{defn}          \begin{rem}     $x^2$ closed under multiplication and addition.          $x^3=e^3=e^3=e^3=e^3$     \end{rem}               \end{document}


title: square root of number in counter

text: I would like to get the square root of a number which I have stored into a counter. I have been using the calc package for summation and multiplication operations, but I cannot find anything like               \setcounter{squarerootofmynumber}{\value{mynumber}^{1/2}}      or something like that. Do you know the way?


title: Size of circle path vs. circle node in \pgfdeclareshape?

text: I'm trying to "overload" a rectangle node as a custom shape, such that it has a circle on its south west corner. In the MWE below, I use `\circsize` to set the size of the circle - and for testing purposes, I both draw a circular path, and I draw a circular node. The output I get, however, is this: ![test22.png](http://i.stack.imgur.com/ojO1x.png) ... that is - even if I'm trying to apply `\circsize` to both the circle path and the circle node - they are output with different sizes! (Note that I unfortunately cannot even `\typeout{\circsize}`, so as to debug it). Why does this happen - and how can I get both the node, and the path, to have the same size as specified by e.g. `\circsize`? EDIT: to clarify the question: why do I get different sized circles, when I use the circle path primitive `\pgfpathcircle{\southwest}{\circsize}`, versus the circle node primitive `\pgfnode{circle}{center}{}{\tikz@fig@name-A}{\pgfusepath{draw}}` (with a `\pgfkeys{/pgf/minimum size=\circsize}` to specify size? How could I get those circles to be of equal size, by using `\circsize` as an argument for both? The MWE:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}          \pgfkeys{/tikz/mycircsize/.initial = 0.3cm}     \makeatletter     \pgfdeclareshape{testshape}{       \inheritsavedanchors[from={rectangle}]       \inheritbackgroundpath[from={rectangle}]       \inheritanchorborder[from={rectangle}]       \foreach \x in {center,north east,north west,north,south,south east,south west,east,west}{         \inheritanchor[from={rectangle}]{\x}       }       \saveddimen\circsize{\pgf@x=\pgfkeysvalueof{/tikz/mycircsize}}       %\typeout{\the\circsize} % ! Undefined control sequence.       \foregroundpath{         \southwest         % just draw a circle path (and only it, a bit thicker)         \begin{pgfscope}           {           \pgfsetlinewidth{2pt} % no effect here ...           \pgfpathcircle{\southwest}{\circsize}           \pgfusepath{stroke}   % ... unless 'usepath is used!           }         \end{pgfscope}         % draw a circular node         {         \color{red}         \pgfkeys{/pgf/minimum size=\circsize}         \pgfset{minimum size=\circsize}         \pgfkeys{/tikz/radius=0.5\circsize}         %\pgfset{inner sep=0pt}         \pgftransformshift{\southwest}         \pgfnode{circle}{center}{}{\tikz@fig@name-A}{\pgfusepath{draw}}         %\pgfusepath{stroke} % no need for this?         }       }     }     \makeatother          \begin{document}     \begin{tikzpicture}     \node[testshape,draw] (n1) at (1,0) {Testing};     \end{tikzpicture}     \end{document}


title: Error on grouping level

text: I'm trying to create a graph from a big file with pgfplots. This is the code I use:               \begin{figure}     \makebox[\textwidth][c]{     \subfloat[]         {         \tikzsetnextfilename{SJ_RK_1e4_1e10_(circular)_Energy-S}         \begin{tikzpicture}         \begin{axis}[title={Deux corps}, xlabel={$t$ (\si{\second})}, ylabel={$E_{\text{méc}}$ (\si{\joule})},%         legend cell align=left]                  \addplot[blue,thick]                 table[x index=0,y index=3,each nth point={3}] {Data/SJ_RK_1e4_1e10_(circular)_Energy.dat};                  \legend{}         \end{axis}         \end{tikzpicture}} \quad          \subfloat[]         {         \tikzsetnextfilename{SJ_RK_1e4_1e10_(circular)_Energy-J}         \begin{tikzpicture}         \begin{axis}[title={Deux corps}, xlabel={$t$ (\si{\second})}, ylabel={$E_{\text{méc}}$ (\si{\joule})},%         legend cell align=left]                  \addplot[blue,thick]                 table[x index=0,y index=6,each nth point={3}] {Data/SJ_RK_1e4_1e10_(circular)_Energy.dat};                  \legend{}         \end{axis}         \end{tikzpicture}}}              \caption[Deux corps: énergie mécanique du Soleil en mouvement circulaire]{}\label{SJ_RK_1e4_1e10_(circular)_Energy-SJ}     \end{figure}      Unfortunately I obtains the following error, trying to compile the second graph (the first works well!):               ! Package pgfplots Warning: Axis range for axis y is approximately empty; enlar     ging it.     ! TeX capacity exceeded, sorry [grouping levels=255].     \pgfmath@basic@divide@ #1#2->\begingroup                                               \pgfmath@x =#1pt\relax \pgfmath@y =...     l.393   \end{tikzpicture}}}          Here is how much of TeX's memory you used:      37753 strings out of 493488      809240 string characters out of 3141326      1690572 words of memory out of 3000000      40374 multiletter control sequences out of 15000+200000      69173 words of font info for 117 fonts, out of 3000000 for 9000      957 hyphenation exceptions out of 8191      361i,12n,477p,915b,4921s stack positions out of 5000i,500n,10000p,200000b,50000s          !  ==> Fatal error occurred, no output PDF file produced!      What kind of error is this? What I'm making wrong? Thank you.


title: Exporting Definitions

text: Below is part of the code for my notes. I would like to "easily" create a new document displaying only the definitions, theorems, and lemmas. I can copy and paste this and just delete what I do not want, but if there is an easier way, that would be great.               \documentclass[12pt,letterpaper]{article}          \usepackage{amsmath}    % just math     \usepackage{amssymb}    % allow blackboard bold (aka N,R,Q sets)     \usepackage{amsthm} % allows thm environment     \usepackage{mathrsfs}     \usepackage{graphicx, framed} % allows graphics     \usepackage[none]{hyphenat} % allows graphics     \usepackage[usenames,dvipsnames]{color}     \usepackage{color}     \usepackage{wrapfig}     \definecolor{Def}{rgb}{0.85,0.65,0.13}     \definecolor{Ex}{rgb}{0,0.39,0}     \definecolor{Nt}{rgb}{1,0.08, 0.58}     \definecolor{Tm}{rgb}{0,0,0.80}     \definecolor{Pf}{rgb}{1,0.55,0}     \definecolor{white}{rgb}{1,1,1}     \linespread{1.6}    % double spaces lines          \textwidth 6.5truein  % These 4 commands define more efficient margins     \textheight 9.4truein     \oddsidemargin 0.0in     \topmargin -0.6in          \parskip 5pt  % Also, a bit of space between paragraphs          \newtheorem{theorem}{\color{Tm}{\textbf{\underline{Theorem}}}}     \newtheorem{cor}{\color{Tm}{\textbf{\underline{Corollary}}}}     \newtheorem{prop}{\color{Tm}{\textbf{\underline{Proposition}}}}     \newtheorem{claim}{\color{Tm}{\textbf{\underline{Claim}}}}     \theoremstyle{definition}\newtheorem{definition}{\color{Def}{\textbf{\underline{Definition}}}}     \newtheorem{lemma}{\color{Tm}{\textbf{\underline{Lemma}}}}     \newtheorem{exer}{\color{Plum}{\textbf{\underline{Exercise}}}}     \theoremstyle{definition}\newtheorem{note}{\color{Nt}{\textbf{\underline{Note}}}}     \theoremstyle{definition}\newtheorem{example}{\color{Ex}{\textbf{\underline{Example}}}}     \newtheorem{sidebar}{\color{Aquamarine}{\textbf{\underline{Sidebar}}}}     \newtheorem{pf}{\color{BurntOrange}{\textbf{\underline{Proof}}}}          \newcommand{\QEDend}{\linebreak \begin{flushright}\textbf{QED}\end{flushright}}     \newcommand{\QEDish}{\linebreak \begin{flushright}\textbf{$\approx$QED}\end{flushright}}     \newcommand{\bb}[1]{\mathbb{#1}}     \newcommand{\mcal}[1]{\mathcal{#1}}     \newcommand{\scr}[1]{\mathscr{#1}}     \newcommand{\R}[1]{$\mathbb{R}$}     \newcommand{\C}[1]{$\mathbb{C}$}     \newcommand{\N}[1]{$\mathbb{N}$}     \newcommand{\Q}[1]{$\mathbb{Q}$}     \newcommand{\lp}[1]{$\left({#1}\right)$}     \newcommand{\la}[1]{$\left|{#1}\right|$}     \newcommand{\as}[1]{\color{white}{*}\color{black}{}}     \newcommand{\ind}{\hspace*{30pt}}     \newcommand{\done}{\hfill \mbox{\raggedright \rule{0.1in}{0.1in}}}          \newcommand{\bigdotcup}{\ensuremath{\mathop{\makebox[-0.6pt]{\hspace{16pt}{\(\cdot\)}}\bigcup}}}          \newcommand{\dotcup}{\ensuremath{\mathop{\makebox[-0.6pt]{\hspace{13pt}{\(\cdot\)}}\bigcup}}}          \raggedright          \parindent 30pt               \newcommand{\ftheorem}[1]{\begin{framed}\begin{theorem}#1\end{theorem}\end{framed}}     \newcommand{\fdef}[1]{\begin{framed}\begin{definition}#1\end{definition}\end{framed}}     \newcommand{\fnote}[1]{\begin{framed}\begin{note}#1\end{note}\end{framed}}     \newcommand{\flemma}[1]{\begin{framed}\begin{lemma}#1\end{lemma}\end{framed}}     \newcommand{\fex}[1]{\begin{framed}\begin{example}#1\end{example}\end{framed}}     \newcommand{\fcor}[1]{\begin{framed}\begin{corollary}#1\end{corollary}\end{framed}}                         \begin{document}     \linespread{1.5}    % 1.5 space lines               \section{Course Notes}          %January 23, 2012          \subsection{Metric Spaces}          \begin{definition}The metric space $M$ is a \underline{complete metric space} if every Cauchy sequence is convergent in $M$.     \end{definition}          \begin{example}     $\bb{R}$ is a complete metric space\done     \end{example}          \begin{example}     $C[0,1]$ is a complete metric space with $d(f,g) = \sup \mid f(t) - g(t) \mid$, $t \in [0,1]$.\done     \end{example}          \begin{theorem}     Any closed subset $A$ of a complete metric space $M$ is complete.     \end{theorem}          \begin{proof}     Let $A \subset M$ be closed and $<x_n>$ be any Cauchy sequence in $A$. Since $M$ is a complete metric space, $<x_n>$ is convergent in $M$, so $x_n \rightarrow x \in M$. Since $A$ is closed, $x \in A$. Thus, $A$ is complete.     \end{proof}          \end{document}`


title: Customize text format of captions by parsing content of \@caption

text: I need the first sentence of my captions to appear on its own line in a \large, bold font. I also need to same document to easily produce standard captions (all same font, no line breaks). I have implemented a class file that uses an option to directly modify \@caption and add the necessary formatting; however, my code isn't quite working. This example correctly places the first sentence of the caption on its own line in the correct font, but the text is not left-aligned.               \documentclass{article}     \usepackage{xstring}     \usepackage{etoolbox}     \usepackage{caption}          \captionsetup{labelfont=bf,labelsep=newline,tableposition=top}          \makeatletter     \newcommand\formatlabel[1]{%         \noexpandarg         \StrBefore{#1}{.}[\firstcaption] %         \StrBehind{#1}{.}[\secondcaption] %         \textbf{\large\firstcaption}         \\         \secondcaption}          \patchcmd{\@caption}{#3}{\formatlabel{#3}}     \makeatother          \begin{document}          \begin{table}     \centering     \caption{A Simple table. It has a caption with multiple sentences. It has a caption with multiple sentences. It has a caption with multiple sentences.}     \begin{tabular}{ l c r }       1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\     \end{tabular}     \end{table}          \end{document}


title: Center-justify with hrule above and below

text: On my title page, I have something like this:               \rule{\linewidth}{0.25mm}\\[0.25cm]     \huge     \textbf{This is my title, it is somewhat long and split over two lines!}\\[0.25cm]     \normalsize     \rule{\linewidth}{0.25mm}      and this is the corresponding output:               --------------------------------------        This is my title, it is somewhat         long and split over two lines!     --------------------------------------      Notice two things:   1. The top first and the (wrapped) second line are similar, but different lengths. I would like to justify them (compress the top line slightly, and expand the bottom slightly).   2. The `\rule` is extended to the `\linewidth`, whereas I would like it to be the width of the text in between the rules. The result I'd like is something like:               --------------------------------     This is my title, it is somewhat     long and  split over  two lines!     --------------------------------      Any help with how to accomplish this? Thank you :)


title: I want to number my subsubsection and number it in TOC

text: I tried to use               \setcounter{secnumdepth}{4}     \setcounter{tocdepth}{4}      to include the subsubsection with a number before it into my TOC. But it doesn't work. Then I found something in my template. But the original setting is subsection, and I turned them into subsubsection. But it still does not work. Any one help?               % replace subsection with subsub     \setsecnumdepth{subsubsection}     \maxsecnumdepth{subsubsection}     \settocdepth{subsubsection}     \maxtocdepth{subsubsection}       ![enter image description here](http://i.stack.imgur.com/dNKhG.jpg)


title: MiKTeX savesym package not found

text: Using MiKTeX 2.9 package manager (`mpm.exe`) I try to install `savesym.sty`. It is listed in the mpm window, I can right click it and choose 'Install'. But when mpm tries to install it aborts with a "not found" error: > >     package repository: > http://mirrors.dotsrc.org/ctan/systems/win32/miktex/tm/packages/ >     lightweight database digest: b412617853dd68b9a7087203775787c7 >     going to download 1311 bytes >     going to install 2 file(s) (1 package(s)) >     downloading > http://mirrors.dotsrc.org/ctan/systems/win32/miktex/tm/packages/savesym.cab... >   And then a dialog pops up simply saying > Error response from server: 404 Following that link to the repository, the file does indeed not seem to exist. So how can I solve this problem? And it is not an administrator rights problem. I can install and use other packages using mpm.


title: Beamer: how to make theorem-like block (with free title)

text: I often use CambridgeUS, the only negative part about is that when I put theorems in blocks, it's not see clear where that theorem ends. So I would like the body of the theorem to be in italic. However, I also want to be able to choose the title, so instead of "Theorem" I would want "Theorem (Erdos, 1960)". What is the best way to do this? Should I make a new type of block environment, or change the theorem environment? I could of course use ordinary blocks and always make it italic by hand, but that looks like a nasty solution.


title: Changing color of \dir in xypic

text: I'm trying to use \dir to draw custom frames in an XYpic drawing, but have been unable to figure out how to change the color of the line drawn by each command. For instance, to draw a triangle frame, I'm using the code `\POS ="i","i"+UL;"i"+DL **\dir{-};"i"+R **\dir{-};"i"+UL **\dir{-},"i"` inside a `\begin{xy}` environment. How do I change the lines drawn the `**` commands to be some color other than black?


title: How not to expand acronym in ToC or section title

text: I want just the opposite to this post. Actually the idea is that in ToC, sections, chapters, etc titles the acronym is not expanded. But then the first time it is used in the text it should be expanded as the first. Thanks.               \documentclass{amsbook}          \usepackage[acronym,nonumberlist]{glossaries}     \newacronym{MOSFET}{MOSFET}{metal-oxide semiconductor field-effect transistor}     \makeglossaries          \begin{document}     \tableofcontents     \chapter{\Gls{MOSFET}}     \printglossaries     \end{document}


title: how to put personal info (address, phone) in header

text: I am using modern cv casual style. Currently I have personal info (address, street, phone, email) in footer. Is it possible to have these information in header instead of footer and only in first page ?


title: How can I get an underbrace and an overbrace to partially overlap in an equation?

text: Sometimes I want to describe portions of an equation using `\underbrace` and `\overbrace` in such a way that the portions are not completely distinct, for example:                       /-------\     x = A + B + C + D + E         \-------/   \---/      > What is the best way to do this?


title: pgfplots: show x tick labels for data below ymin

text: I have a very simple bar chart plot. My problem is when I set a ymin value, all x labels whose values are below that threshold will not be displayed. I'd rather have the labels but no values shown. mini example:               \begin{tikzpicture}      \begin{axis}[         ybar,         ymin = 5,         xtick=data,         symbolic x coords={a,b,c},         ]         \addplot coordinates {(a,7) (b,9) (c,4)};     \end{axis}     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/gPKaS.png) ![enter image description here](http://i.stack.imgur.com/06E4Q.png) left picture no ymin, right picture with ymin Can anybody tell me how to achieve this? Thanks in advance.


title: Captions for figures in \listoffigures

text: When I use `\listoftables` and `\listoffigures` I get in the list long captions that appear next to the tables/figures. I would like to use short captions for this list which summarize these captions. Is that common to do? If so, what is one way to do it? Thanks.


title: How to avoid page overrun using scrreprt document?

text: I'm in the process of writing a requirements document and have been using a template based on the scrreprt document class. The problem I'm running into is that when I compile my document, in certain places, the text over-runs the page. Here is a crude MWE of the problem:               \documentclass{scrreprt}     \begin{document}     \chapter{Specific Requirements}     \section{External Interface Requirements}          \subsubsection{foo}          \section{Functional Requirements}          \subsection{Sign In}          \subsection{Profile Page}          \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}     \subsubsection{foo}          \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}     \subsubsection{some of these subsections will run off the page}          \end{document}      If you compile it, you should see some of the subsections marked "some of these ..." running off the bottom of the page, and indeed, covering the page number. Any help on how to correct this problem would be very welcome. Likewise, if anyone has suggestions for document classes other than scrreport, I'm open to that as well.


title: Why doesn't my redefinition of `\item` recognize that it's been passed an optional argument?

text: I wanted to redefine `\item` temporarily, but also wanted to allow it to behave as much as the _normal_ `\item` should. So, I thought by closely following the definition of `\item`, I would get the results I wanted. However the following MWE doesn't recognize the optional argument.               \documentclass{article}     \pagestyle{empty}     \begin{document}          \begin{enumerate}     \begingroup       \makeatletter       \def\item{\@ifnextchar [\@item{\@noitemargtrue \@item[\@itemlabel]} \rule[-2ex]{0.8pt}{5ex}\endgroup}%%'       \makeatother     \item[test]   A     \item B     \item C     \item D     \end{enumerate}          \end{document}      Why is it failing?


title: TikZ: Is drawing an arc that either curves to much or isnt long enough

text: \documentclass[convert = false, tikz]{standalone}     \usetikzlibrary{intersections}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);       \coordinate (M) at (4, 0);            \def\angle{130}            \draw (O) -- (M);       \draw (M) -- ++(\angle:2cm) coordinate (SOI);            \begin{pgfinterruptboundingbox}         \path[name path global = circ] (O) circle[radius = 1.5cm];         \path[name path global = xline] (O) -- +(-10, 0);         \path[name path global = yline] (O) -- +(0, 2);         \path[name path global = toE] (SOI) -- ++(-170:8cm);         \path[name intersections = {of = yline and toE, by = E}];         \path[name intersections = {of = xline and toE, by = I}];         \path[name intersections = {of = circ and toE, by = P1}];       \end{pgfinterruptboundingbox}            \draw (SOI) -- (E);            \draw[-latex] let         \p0 = (I),         \p1 = (M),         \p2 = (P1),         \n1 = {atan2(\x1 - \x0, \y1 - \y0)},         \n2 = {atan2(\x2 - \x0, \y2 - \y0)},         \n3 = {1.5cm}       in (I) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];            \draw[-latex] let         \p0 = (O),         \p1 = (M),         \p2 = (P1),         \n1 = {atan2(\x1 - \x0, \y1 - \y0)},         \n2 = {atan2(\x2 - \x0, \y2 - \y0)},         \n3 = {1.5cm}       in (O) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];            \draw[-latex] let         \p0 = (I),         \p1 = (M),         \p2 = (SOI),         \n1 = {atan2(\x1 - \x0, \y1 - \y0)},         \n2 = {atan2(\x2 - \x0, \y2 - \y0)},         \n3 = {1.5cm}       in (I) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];            \draw[-latex] let         \p0 = (O),         \p1 = (M),         \p2 = (SOI),         \n1 = {atan2(\x1 - \x0, \y1 - \y0)},         \n2 = {atan2(\x2 - \x0, \y2 - \y0)},         \n3 = {1.5cm}       in (O) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];     \end{tikzpicture}     \end{document}        1. Using `(P1)` > If we consider the code above, the arc that is long enough curves too much > and the arc that has the right amount of curve is too short. How can I get > the right amount of curve with the correct length in a case like this?   1. Using `(SOI)` > Both curves are too short but neither appear to over arc. What can I do here? ![enter image description here](http://i.stack.imgur.com/bR4t6.png) * * * @Jake, your code that switches `y` and `x` rotates my vector to appear horizontal not vertical.                \draw[-latex] let         \p0 = (O),         \p1 = (M),         \p2 = (SOI),         \n1 = {atan2(\y1 - \y0, \x1 - \x0)},         \n2 = {atan2(\y2 - \y0, \x2 - \x0)},         \n3 = {veclen(\x2 - \x0, \y2 - \y1)},         \n4 = {(\n1 + \n2) / 2}       in (O) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];      The code above you posted produces: ![enter image description here](http://i.stack.imgur.com/KSaU2.png) Going back to `x` and then `y` produces: ![enter image description here](http://i.stack.imgur.com/UEGfi.png) * * * The problem was the `(I)` coordinate. It never actually existed but `LaTeX` wasn't returning any errors. The path `toE` never intersected the `xline`. Therefore, so when I was drawing from the `(I)`, the circle path making up the intersection origin was above `y = 0`. Thus, causing the `(I)` arcs to be short. To correct this, set               \path[name path global = toE] (SOI) -- ++(-170:9cm);      which changes the radius of the ray to `9cm` from `8cm`.


title: Errors passing the contents of a LaTeX environment to a macro

text: First of all, I'm sorry if this is a bit of an obvious newbie question, I've tried reading as many of the posts on here about doing this sort of thing, but was unable to get any of them to work. I'm working on a macro which draws a vertical line down the side of some text, the following version works perfectly when used like `\sbshort{Foo Bar}`               \long\def\sbshort #1 {\par{\bigbreak\vbox{\hbox{\vrule\kern3.5pt\everypar{\leftskip 5pt\rightskip 2.75pt}\vbox{\noindent {#1}}}}\par}}      However when I try to use the environ package as follows:               \NewEnviron{TestEnviron}{\sbshort{\BODY}}     \begin{TestEnviron}     Foo Bar     \end{TestEnviron}      I receive the error `Argument of \env@ignore has an extra }.`


title: Line break in date ticks label

text: I want to plot some data depending on dates, but as the date range is quite large (4-5 years) I would like to have ticks in the form `dd.mm\\\yyyy`, is it possible ? It would be even better not to repeat the year for each tick, by displaying only year changes, but it is not a necessity ;) Here is a working example :               \begin{tikzpicture}         \begin{axis}[         axis on top,         enlarge x limits = false,         date coordinates in=x,         xticklabel=\day.\month.\year,         date ZERO = 2013-08-13     ]     \addplot[RoyalBlue] coordinates {         (2013-08-13, 5)         (2013-08-18, 10)         (2013-08-21, 4)         (2013-08-26, 7)         (2013-09-01, 1)         (2013-09-02, 0)         (2013-09-06, 4)         (2013-09-11, 5.5)         (2013-09-15, 3)         (2013-11-13, 5)         (2013-11-18, 10)         (2013-11-21, 4)         (2013-12-26, 7)         (2014-01-01, 1)         (2014-01-02, 0)         (2014-01-06, 4)         (2014-02-11, 5.5)         (2014-02-15, 3)     };     \end{axis}     \end{tikzpicture}      I tried replacing `xticklabel=\day.\month.\year` by `xticklabel={\day.\month\\\ \year}` without success.


title: How do automatic overlay specification work in beamer?

text: I've tried reading the excellent Beamer user guide, but failed to understand. I understand the basic idea: there's a counter `beamerpauses` that is advanced by a `+` inside an overlay specification. You can for example write `\item<+>` and you'll get an item that only shows for the slide with the current value of beamerpauses. Also, beamerpauses gets increased by one. So far so nice. One can write `\item<.>`. This has the effect of turning on the item for the previous (-1) value of beamerpauses, and it does not increase the counter. Great. Now what happens here (edited so that it does something interesting:)               \only<.(2)-+(6)>{\alert<+->{foo}\alert<+->{bar}} \only<-.(2)>\alert<-+>{BAR}\alert<-+(1)>{FOO}}           (1)          (2)            (3)                (4)                         (5)      is it equivalent to                \only<3-7>{\alert<2->{foo}\alert<3->{bar}}\only<-6>\alert<-5>{BAR}\alert<-7>{FOO}}      ? > In particular: When does the increment at (1) happen? Before both the > arguments are processed or after? Do the increments at (2) and (3) affect > the counter when (4) and (5) are evaluated? > > How does the counter change in this case? what is its value at every point? > How can I find out? I tried writing `\thebeamerpauses` but this counter does > not seem to change with the slides. **Is there a counter that holds the > slide number?**


I would like to translate a code from the pgf Basic Layer to the pgf System Layer. My first code is :               \documentclass{scrartcl}     \usepackage{tikz}          \begin{document}           a\fbox{\begin{tikzpicture}     \pgftransformscale{.025}%      \pgfpathmoveto{\pgfqpoint{71.43 bp}{238.86bp}}     \pgfpathlineto{\pgfqpoint{310.29bp}{238.86bp}}     \pgfpathlineto{\pgfqpoint{310.29bp}{332.57bp}}     \pgfpathlineto{\pgfqpoint{428.57bp}{214.29bp}}     \pgfpathlineto{\pgfqpoint{310.29bp}{96.00 bp}}     \pgfpathlineto{\pgfqpoint{310.29bp}{189.71bp}}     \pgfpathlineto{\pgfqpoint{71.43 bp}{189.71bp}}     \pgfpathclose      \pgfusepath{fill,stroke}%        \pgfpathmoveto{\pgfqpoint{453.14bp}{381.71bp}}     \pgfpathlineto{\pgfqpoint{500.00bp}{381.71bp}}     \pgfpathlineto{\pgfqpoint{500.00bp}{46.86 bp}}     \pgfpathlineto{\pgfqpoint{453.14bp}{46.86 bp}}     \pgfpathclose      \pgfusepath{fill,stroke}%        \end{tikzpicture}}b       \end{document}      I get what I want :![enter image description here](http://i.stack.imgur.com/qxnhL.png) Now with the pgf System Layer, I have the next code but I don't know how to add a bounding box               \documentclass{scrartcl}     \usepackage{tikz}          \begin{document}           \makeatletter           a\fbox{\begin{tikzpicture}     \pgfsys@transformxyscale{.025}{.025}     \pgfsys@fill      \pgfsys@moveto{71.43bp}{238.86bp}     \pgfsys@lineto{310.29bp}{238.86bp}     \pgfsys@lineto{310.29bp}{332.57bp}     \pgfsys@lineto{428.57bp}{214.29bp}     \pgfsys@lineto{310.29bp}{96.00bp}     \pgfsys@lineto{310.29bp}{189.71bp}     \pgfsys@lineto{71.43bp}{189.71bp}      \pgfsys@closepath     \pgfsys@fillstroke     \pgfsys@fill      \pgfsys@moveto{453.14bp}{381.71bp}     \pgfsys@lineto{500.00bp}{381.71bp}     \pgfsys@lineto{500.00bp}{46.86bp}     \pgfsys@lineto{453.14bp}{46.86bp}     \pgfsys@closepath     \pgfsys@fillstroke         \end{tikzpicture}}b           \end{document}      and unhappily the result is ![enter image description here](http://i.stack.imgur.com/8luWz.png) How to obtain the same result?


title: How to join paragraphs with a pilcrow \P?

text: # Background There are many typographically distinct ways to separate paragraphs from one another, the most common being starting each paragraph on a new line with either an indent or additional vertical space. (Some use both, but this is redundant and generally frowned upon in typographic circles.) ¶ Another space- economical alternative is to use a special character - typically the pilcrow `\P` - to separate paragraphs. (Bringhurst in The Elements of Typographic Style has a nice discussion of the merits of this and other techniques.) # Question What is the best way to join paragraphs with a pilcrow "¶" (`\P`) in LaTeX? # Discussion The obvious solution is to manually insert pilcrows into the text rather than using newlines, however, this precludes quickly changing between various different format. One could use a custom macro which could be then be redefined to either `\P` or `\par`, but this still does not seem the best solution as it cannot be applied to sources that have been structured in the typical manner with blank lines (e.g. confounding the ever-so-useful `lipsum` package). ¶ A proper solution probably involves redefining `\par`: something like `\def\par{ \P~}`. This is fine for short regions of text that is properly grouped, but I suspect has many subtle difficulties when implemented throughout a document. The following minimal example demonstrates a few of the problems:               \documentclass{article}     \usepackage{lipsum}     \def\par{ \P~}     \begin{document}     \lipsum[1-5]          \let\par\endgraf     \begin{enumerate}     \item This is a list item.     \item And another.     \end{enumerate}          \def\par{ \P~}     \lipsum[6-11]     \def\par{\endgraf}     \end{document}      One must restore the original functioning `\let\par\endgraf` before lists and before the `\end{document}`. Even doing this manually will insert spurious pillcrows after the last paragraph before the lists and at the end of the document. (Pillcrows should only occur _between_ joined paragraphs, not after paragraphs that are followed by a newline, section header, equation, etc.) What is the correction solution? # Further Information Frank Mittelbach explains exactly where TeX executes the paragraph builder. There are also some discussions about how to change `\par` in LaTeX (where `\@setpar` is mentioned) and how to avoid mucking up other uses of `\par` in environments, lists etc. Some other relevant discussions are:   * In how many ways can you create a paragraph in LaTeX?   * Downsides of using \par instead of two new lines   * Avoid paragraph due to trailing empty line in standalone file   * What exactly does \@doendpe do?   * Environment with first paragraph in bold and no pagebreaks   * Changing the style of the first *typeset* line of a paragraph


title: Phantomsection hyperlink problem

text: I have a problem. The hyperlinks work but it jumps on the center of page and not on the title name Index1 and Index2. What did I do wrong? I use `documentclass{book}`.                   \documentclass{book}         \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}         \usepackage[ngerman]{babel}         \usepackage[makeindex]{splitidx}         \usepackage{hyperref}                   \newcommand{\ITerm}{IndexTerms}         \newcommand{\IServ}{IndexServs}         \newcommand{\MyLarge}{\Large}         \newcommand{\smindexxspecial}[2]{{\MyLarge#2} \sindex[#1]{#2}}         \newcommand{\smindexspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}         \newcommand{\smindexvspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}         \newcommand{\smsindexspecial}[2]{{\MyLarge \url{#2}}\sindex[#1]{#2}}              \makenomenclature         \newindex[General Index]{IndexTerms}         \newindex[Websites]{IndexServs}              \begin{document}              \smindexspecial{\ITerm}{blabla}         (\smsindexspecial{\IServ}{www.wikipedia.com})         \nomenclature{bla}{bla}              \tableofcontents                   %other things they go to tableofcontent too              \backmatter         \cleardoublepage         \phantomsection         \addcontentsline{toc}{chapter}{Nomenclature}         \printnomenclature[3,0 cm]              \cleardoublepage         \phantomsection         \addcontentsline{toc}{chapter}{Index1}         \printindex[Index1]              \cleardoublepage         \phantomsection         \addcontentsline{toc}{chapter}{Index2}         \printindex[Index2]              And this is the end of the story.         \end{document}


title: How to draw this picture in Latex

text: I need to draw a picture, the picture is showed below. Which package is better to draw it,TikZ? Actually I need integrate the latex code into my software program, and the input, output and variable are changeable according to the parameters in the program, for instance, if there are only two input parameter, then the picture just show two inputs. And the Legend part, since it is fixed, may be used as an attachment? The program part I can think about it, but how to draw the picture in latex is really a challenge for me, anyone can help? How to draw the black color arrow sign?(RTDB variable) ![enter image description here](http://i.stack.imgur.com/TDM2S.jpg) I try to use pifont package for the little black arrow. I checked \ding{253} is the one i want, but when i use it in my latex code, it showed like a fishbone, do you know what is the problem? ![enter image description here](http://i.stack.imgur.com/qql8F.jpg)


title: How to suppress Warning--empty author Message?

text: I am citing the IEEE-754 standard and it doesn't have an author. However, when I generate my PDF, the tool I am using (texnixcenter) provides a warning that there is no author. I would like to know how to get rid of this warning? Here is the IEEE-754 standard bibtex entry that I have:               @ARTICLE{ieee754std,     journal={IEEE Std 754-2008},      title={{IEEE Standard for Floating-Point Arithmetic}},      year={2008},      pages={1-70},      keywords={IEEE standards;floating point arithmetic;programming;IEEE standard;arithmetic formats;computer programming;decimal floating-point arithmetic;754-2008;NaN;arithmetic;binary;computer;decimal;exponent;floating-point;format;interchange;number;rounding;significand;subnormal},      doi={10.1109/IEEESTD.2008.4610935},}


title: KOMA-Script scrbook: How to put page numbers at top-right for all \mainmatter & \backmatter

text: Per my university's instructions for dissertations, I need the following:   1. All \frontmatter pages numbered bottom-center (Easy...I got that)   2. All other pages with numbering placed "even with the top right margin" (I'm quoting the university's literature there) In my understanding of KOMA-script's treatment of headers/footers so far, its easiest to define requirement #2 as: Right justified, at the bottom of the vertical space defined by the top margin. What I'm reading in the manual about the `\pagestyle` command, and elsewhere about a `fancyhdr` package. It's probably a simple thing, but I'm missing it somehow. Help?


title: How to modify some command (like \begin{flalign}) so I can use it as my own

text: my first post as every beginner starts with question and later on I will give answers :). OK, I am doing my undergraduate work (to become graduate) in Electrical Engineering and I choose LaTeX as tool for the job and TexStudio as an LaTeX editor. I had pretty nice walk through LaTeX but I begin to wonder what about some advanced stuff like changing / modifying existing commands or what is my particular need to make `\begin{myflalign/myflalign*}` command that would do this:               \begin{myflalign*}         &  &     \end{myflalign*}      and position my cursor in between two & signs. I do a lot of aligning and find that this command really suits me well and I only need a slight improvement of existing command.


title: Table Large Text and Centering

text: I'm trying to learn the TeX language in preparation for my final engineering project before I graduate, and while I've been able to find most of the solutions online, I can't seem to find a solution for this one. I'm trying to format a table so that the Large text is centered vertically and horizontally and that the table itself is centered on the page. The Large text, in the format I have it in now, is touching the top of the hline. ![Table as it stands now](http://i.stack.imgur.com/HzqSo.jpg) Here's the code:               \documentclass[11pt]{article}     \usepackage{array}     \begin{document}          %\begin{center}               \begin{table}[ht]          \caption{Room 6 - Customer Assessments of Competing Products}     \begin{tabular}{|c|c|c|}\hline     \Large     Customer Requirements  & \Large Zhang Company & \Large Wisking Company \\[2ex] \hline           Standard size & 3 &1\\ \hline     Pushed Manually & 5&3 \\ \hline     Max Weight = 150 & 2& 3 \\ \hline     Lifespan &3&4\\ \hline     Rigid Backrest &3&3\\ \hline     Adjustable&2&2\\ \hline     Easy Operation&1&3\\ \hline     Left-/Right-hand Steering&3&4\\ \hline     Drive Up Inclines&4&4\\ \hline     Non-Obtrusive Motor&4&3\\ \hline     Non-Obtrusive Electrical Components&3&5\\ \hline     Safety&3&5\\ \hline     Braking&5&5\\ \hline     \multicolumn{3}{c}{1 - Poor; 3 - Good; 5 - Excellent}               \end{tabular}     \end{table}     %\end{center}     \end{document}      Much appreciated. Hopefully I've been descriptive enough.


title: How to add more indentation for section in table of contents

text: I would like to move sections in my TOC more to the right =) The picture will explain all: ![enter image description here](http://i.stack.imgur.com/YzHwq.png) Here is my code so far (This code will give me the upper part in the picture):               \newgeometry{hmargin={3cm,3cm},vmargin={3cm,4cm}}     % SISÄLLYSLUETTELO          \setlength{\cftsecindent}{2cm}     \dottedcontents{section}[1.5em]{}{1.3em}{.6em}     \renewcommand{\contentsname}{Sisällysluettelo}          \doublespacing     \large \tableofcontents     \singlespacing          \restoregeometry       Now even if I try to modify the length in `\setlength{\cftsecindent}{2cm}` the section stays where it is...any ideas why? What am I doing wrong x) Thank you for your help! =) UPDATE =) If I remove the `\dottedcontents{section}[1.5em]{}{1.3em}{.6em}` from the code above, I get this: ![enter image description here](http://i.stack.imgur.com/z0JZn.png) Now the subsections stay where they are and section goes to bold :/


title: Constant height and depth of hyperref link boxes

text: For boxes around links which the `hyperref` package creates, their height/depth seems to be dependent on the maximum height and depth not of letters _of the enclosed material_ (see top example pair below) but of letters _on the same line_ (see bottom example pair below). It would be nice to   1. make the height/depth of link boxes dependent on only the enclosed material or   2. make the height/depth of link boxes constant (maybe something with height x⋅`\baselineskip` and depth (1-x)⋅`\baselineskip`). How can I achieve option 2? (Answers for option 1 are welcome too, but I will mark as "the" answer only one that does option 2.) ![hyperref link boxes](http://i.stack.imgur.com/uXi1l.png) (This difference in vertical dimension(s) seems to be viewer-independent.)               \documentclass{article}     \usepackage{hyperref}          \begin{document}          \tableofcontents          \section{dy}     dy.\footnote{Footnote.} \smash{\rule[-0.3\baselineskip]{1em}{\baselineskip}}          \section{abc}     ac.\footnote{Footnote.} \smash{\rule[-0.3\baselineskip]{1em}{\baselineskip}}          \end{document}


title: Caching includegraphics{} image files for speed

text: our graphics files were created by third parties. I don't have much control over them. I do have access to Imagemagick, so I can shrink and/or manipulate them. for example, I have a 200KB (modest-file size) png image that uses unreasonably large canvas sizes:                 Image Width: 10200 Image Length: 13200       Bitdepth (Bits/Sample): 4       Channels (Samples/Pixel): 1       Pixel depth (Pixel Depth): 4       Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (5 colours, 1 transparent)        Image filter: Single row per byte filter        Interlacing: No interlacing        Compression Scheme: Deflate method 8, 32k window       Resolution: 47245, 47245 (pixels per meter)       FillOrder: msb-to-lsb       Byte Order: Network (Big Endian)       Number of text strings: 0 of 0      This png file will be enclosed with                 \includegraphics[width=0.33\textwidth]{image.png}      this works out great...except it takes pdflatex about 10 seconds to do this. I have similar issues with large-size .jpg canvas images, too. Multiply the delays by 20-50 images, and you see my point. I do not want draft mode. I would like to see my images and I don't want them degraded. Is there a way to cache the png file into what pdflatex actually includes, so that on subsequent runs the pdflatex compilation is a lot faster? advice appreciated. EDIT: More complex:   1. I think fast png inclusion does not work with transparency in the image. so the following fails:  pngtopnm f.png | pnmtopng > f.png ; convert f.png -transparent white f.png   2. conversion of my file with Imagemagick worries me. latex tells me the pt size of the image that it scales to, but this can have many or few pixels, depending on the output destination resolution. so, the two simple solutions are not working in my case, I think. /iaw


title: Help longtable ,landscape,footnotes

text: I am having a problem with footnotes in lanscape longtable. Below the code I am using ,but the footnote are not appearing at all.Also I tried to use minipage ,but it seems that it doesn't work. Thanks :)               \begin{landscape}          \begin{longtable}{C C C C C C C C C C C C C C C C}          \caption{A simple longtable example}\\     \toprule          Study && \multicolumn{2}{C}{Flow} && \multicolumn{3}{C}{Uncertain Parameters} &&\multicolumn{5}{C}{Uncertainty Approach} &&              Key findings\\     \cline{3-4}     \cline{6-8}     \cline{10-14}         && Forward & Reverse          && Demand & Supply & Others              &&SP\footnote{Stochastic Programming.} & RO \footnote{Robust Optimization.}& FP\footnote{Fuzzy Programming.} & Sim & H-A             &&\\              \midrule     \endfirsthead          \toprule          Study && \multicolumn{2}{C}{Flow} && \multicolumn{3}{C}{Uncertain Parameters} &&\multicolumn{5}{C}{Uncertainty Approach} &&              Key findings\\     \cline{3-4}     \cline{6-8}     \cline{10-14}         && Forward & Reverse          && Demand & Supply & Others              &&SP\footnote{Stochastic Programming.} & RO \footnote{Robust Optimization.}& FP\footnote{Fuzzy Programming.} & Sim & H-A             &&\\          \endhead     \hline     \endfoot          \hline     \endlastfoot     ~\cite{el2010stochastic}\\     Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study     \end{longtable}     \end{landscape}


title: Natbib sorting and citation order by appearance in lyx

text: I am wondering how I can change the order of the citations in my paper. They are appear in alphabetical order however I want to be in the order that I selected. (Note: I am not asking about order of the references and I know that should be alphabetically ordered). Could you please help me to fix this .. Thank you in advance.


title: How to manually format \ointctrclockwise?

text: For a wordpress post, I can't use the `txfonts` package for things like:               \ointctrclockwise      How can I format this manually?


title: Suppress nonstandard pages in book-in-book citation

text: I need to cite a book in an anthology that does not use standard page numbers. In the bibliography, the page numbers for the whole work should be given. In the citations, only the page numbers that I am referring to should be listed. Ordinarily this is done with the option citepages=omit. Unfortunately, when the pages in the "postnote" field are nonstandard, this option does not seem to work. Here is the MWE:               \documentclass{book}          \usepackage[backend=biber,                     style=verbose-ibid,                     citepages=omit,                     ibidpage=true]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{pages.bib}          @bookinbook{a,       author    = {An Author},       title     = {A Book With Nonstandard Pages},       booktitle = {A Bigger Book},       pages     = {123A--131D},     }          \end{filecontents}     \addbibresource{pages.bib}          \begin{document}          I want to cite this book with only the pages I am referring to.\footcite[130B]{a}          \end{document}      The current result in the footnote is as follows: > 1 An Author. _A Book With Nonstandard Pages_. In: _A Bigger Book_ , > 123A–131D, 130B. The desired result is > 1 An Author. _A Book With Nonstandard Pages_. In: _A Bigger Book_ , 130B. (The fact that it does not add "pp" is OK with me.) Any ideas for how to do this?


title: List of [newfloat] – change font

text: Using the `tocloft` package, I can change the appearance of the "List of Tables/Figures" by redefining `\cfttoctitlefont` etc. However, I created a new float type, called "Example", with the `newfloat` package. Is there a way to control the fonts in the "List of Examples" similarly?


title: Environment with coordinate-like arguments

text: I would like to define an environment which takes coordinate like arguments `(1,2)`. I think about two different calling schemes:   1. `\begin{myenv}(mandatory coordinate)[optional](optional coordinate)`   2. `\begin{myenv}[optional](mandatory coordinate)(optional coordinate)` I need suggestion how to implement them. I am using `TikZ`so for the optional arguments I would like use `pgfkeys`, but I don't have a clue about how to specify arguments with parentheses.


title: How to change the setting of WinEdt to open all newly generated PDF files in another PDF reader?

text: I am using WinEdt 6.0 software for my regular latex typesetting. The operating system is windows 8. There are several PDF viewers in my computer. Default PDF viewer is Foxit Reader. So a newly generated PDF file is always opened in Foxit. Uninstalling Foxit software I have seen that the WinEdt can not able to give me the PDF file. I want to open all my newly generated PDF files by Adobe Reader whereas Foxit will act as my default PDF viewer. How to change the settings of WinEdt to do it? Thank you for your help.


title: Converting unit to coordinate works for x-coordinate, but not for y-coordinate

text: By Jake's help I received a solution (in principle) for an "older" version of this question here, i.e. to extract/convert units in the data to local measures. It works for _x_ , yet unexpectedly fails for the _y_ -coordinate. Why does `\pgfplotsconvertunittocoordinate` not work twice for the same point? Is there some additional code needed? ## Picture ![enter image description here](http://i.stack.imgur.com/MJJ9N.png) ## Data http://pastebin.com/5AkHFZhh ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{         lmodern,         amsmath     }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{         tikz,         pgfplots         }     \usetikzlibrary{         calc     }          \listfiles          \begin{document}          \begin{center}     \centering     \begin{tikzpicture}[font=\small]     \begin{axis}[     height=6cm,     width=14cm,     %     scale only axis=true,     xlabel={Distance in mm},     ylabel={Voltage in volt},     ]     \addplot [sharp plot, no marks, x=Wegnormiert] table [col sep=tab] {data.txt} coordinate [pos=0.4] (A) coordinate [pos=0.6] (B);     \filldraw let \p1= (A) in (\x1,\y1) circle [radius=1pt] node[pin={270:({{\pgfplotsconvertunittocoordinate{x}{\x1}\pgfmathprintnumber[fixed,precision=1]{\pgfmathresult}}};{{\pgfplotsconvertunittocoordinate{y}{\y1}\pgfmathprintnumber[fixed,precision=1]{\pgfmathresult}}})}] {};     \draw (A) -| (current axis.west) coordinate (Ay) node[midway, above right=2pt, fill=white] {\(\simeq -2\)};     \end{axis}     \end{tikzpicture}     \end{center}          \end{document}


title: Help with vertically aligning enumerate labels

text: I am just getting started using latex and am having some problem vertically aligning the enumerate labels when listing tables (see image below). I would like to have the '(a)' label aligned vertically with the table, rather than being centered vertically. ![enter image description here](http://i.stack.imgur.com/Hfbbh.jpg) This is what I have so far:               \begin{enumerate}[label=(\alph*)]     \item          \begin{tabular}{c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c}         & & & & 1 & 1 & 0 & 1 \\         $ \times$ & & & & 1 & 0 & 0 & 1 \\         \hline         & & & & 1 & 1 & 0 & 1 \\         & & & & & & 0 & \\         & & & & & 0 & & \\         + & 1 & 1 & 0 & 1 & & & \\         \hline         & 1 & 1 & 1 & 0 & 1 & 0 & 1 \\         \end{tabular}     \end{enumerate}


title: \subfloat command from subcaption package doesn't produce bottom margin if used in table

text: I'm trying to typeset a table of images. If image inserted into cell with `\subfloat` (subcaption package included), resulting box will be w/o bottom margin, but top, left and right margins will be ok. Example:               \documentclass[a4paper]{book}     \usepackage[utf8]{inputenc}     \usepackage[demo]{graphicx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \chapter{Sample Chapter}          \begin{table}       \caption{Sample Table}       \label{tbl:sample}       \begin{tabular}{|c|c|c|}         \hline         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular} &         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular} &         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular}         \\\hline         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular} &         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular} &         \begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular}         \\\hline       \end{tabular}     \end{table}          \end{document}      If `subcaption` package replaced with `subfig` the table looks good. Is there any way to fix such behavior, since I can't use `subfig`? Or maybe there is another way to do table with images? **Update:** Thanks to Gonzalo Medina, I solved original problem. But I stuck with another one with that approach. I'm trying to put titles in separate column:               \documentclass[a4paper]{book}     \usepackage[demo]{graphicx}     \usepackage{caption}          \begin{document}          \begin{table}       \centering       \caption{Sample Table}       \label{tbl:sample1}       \renewcommand\arraystretch{2}       \begin{tabular}{|c|c|c|c|}         \hline\rule{0pt}{\dimexpr0.15\textwidth+1em\relax}              imeage 1 &         \includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1} &         \includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1} &         \includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1}                          \\\hline\rule{0pt}{\dimexpr0.15\textwidth+1em\relax}              imeage 2 &             \includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2} &         \includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2} &         \includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}              \\ \hline       \end{tabular}     \end{table}          \end{document}       But text in first column is aligned at bottom of cell. How to make text in title column to be centered?


title: Listings Character problem

text: Hi I want to define a string in Listings but I can not do it in Turkish. I want to write: `int[] sayılar= new int[5];'` but the output is `int[] saylar= new int[5];` How can I write Ç,ç,ı,ö,ü,ğ?


title: How to write Persian/Arabic text in a LaTeX document which is mainly written in English?

text: Actually, I want to add some sentences in Arabic script inside my PhD thesis. Will it be possible just by adding some `\usepackage` statement in the preamble or need more than this? This is a bit tricky requirement in the sense that English script is written from left to right but the Persian/Arabic text is written other way around! I don't know how LaTeX deals with such requirements. Any idea?


title: Beramono in XeTeX?

text: I like the beramono font, and I want to use it for code listings (using the `listings` package). I want the standard CMR tt font for typewriter font in the body of the text. I could do this using XeLaTeX, by importing beramono using `fontspec` - but I can't find the proper name of the font! All I can find is (for LaTeX):               \usepackage[T1]{fontenc}     \usepackage{beramono}      which is all very well, but it changes all typewriter fonts, not just the ones in the listings. What I want is to use XeLaTeX with something like               \usepackage{fontspec}     \newfontface\lstmono[scale=0.9]{The Proper Name for Beramono}      and then in my listing preamble include               basicstyle=\lstmono      However, I don't know the proper name for beramono. The command `fc-list` has not been much help. Can beramono be used with XeLaTeX?


title: verso and recto page margin swapped

text: During thesis writing, I noticed the recto and verso page margins are swapped. In other words, e.g. page 23 is on the right side (as should be) however it has verso margin setup. The text is thus placed more to the left then should be. Can someone provide me with a hint how to solve this? I have:               \usepackage[text={155mm, 24cm}, top=25mm]{geometry}     ...     \frontpage     \setcounter{page}{2}      Adding twoside options to the geometry package doesnt work out.


title: Branching lines in TikZ without antialiasing/subpixel artifact?

text: Is there a way to properly branch a line into several lines in TikZ? Simply adding paths creates a darkening artifact where the paths overlap:               \begin{tikzpicture}[very thin,-stealth]       \draw (-1, 0) -- (2, 0);       \draw (0, 0) .. controls (1, 0) and (1, 0) .. (1, 1);       \draw (0, 0) .. controls (1, 0) and (1, 0) .. (1, -1);     \end{tikzpicture}      ![Darkening artifact](http://i.stack.imgur.com/rW1Hg.png) I suppose this is due to subpixel rendering and antialiasing in the PDF reader... No artifact is visible on a laser printer output, but on screen rendering is also important so I wonder if there is any way to solve this problem. Do the PDF or PostScript formats support specifying branching lines as a single object? Any idea for a workaround?


title: Help with ieee.cls and figure?

text: Using {ieee}[2000/01/11].cls (via Formatting IEEE Papers in LaTeX2e), I have a problem with the following minimal code ( _which builds fine for`\documentclass{article}` - using `pdflatex` to compile_):               \documentclass[%             %draft,             %submission,             %compressed,             %final,             %             %technote,             %internal,             %submitted,             %inpress,             %reprint,             %             %titlepage,             notitlepage,             %anonymous,             narroweqnarray,             inline,             %twoside,             ]{ieee}     % \documentclass{article}          \usepackage{xcolor}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{cite}     \usepackage{caption}          \begin{document}          Test ...          \begin{figure}     \end{figure}          \end{document}      It fails with:               ! Too many }'s.     \color@endbox ->\color@endgroup \egroup           l.33 \end{figure}          ? X     No pages of output.     Transcript written on test.log.      This error is discussed in LaTeX Community • View topic - color package incompatible with figures?, and indeed, ieee.cls does define `\@xfloat` - but I'm trying the following things:               \makeatletter          % \undef\@xfloat % no work :)           % http://joonidea.blogspot.com/2010/04/how-to-undefine-command-in-latex.html     % \let\@xfloat\@undefined                  % undefine \@xfloat     % no work, fails with:     %% ! Undefined control sequence.     %% \@xfloat #1[#2]->\caption@ORI@xfloat      %%                                      {#1}[#2]\caption@settype {#1}     %% l.49 \end     %%          {figure}          % http://www.latex-community.org/forum/viewtopic.php?f=4&t=507&p=1978     % the below has no effect:      % \let\latex@xfloat=\@xfloat     % \def\@xfloat #1[#2]{%     %   \latex@xfloat #1[#2]%     %   \def \baselinestretch {1}\@normalsize  %%  GT: need \@normalsize?     %   \normalsize     % }          \makeatother      ... but obviously, cannot get it to work. Is it somehow possible to have `\figure` with this `{ieee}[2000/01/11]` class, such that I override its behavior in the tex file, instead of hacking the .cls file? Many thanks in advance for any answers,   Cheers!


title: Extra space between number and variable in math mode

text: I find that if I typeset `$3 q$`, I find the 3 and the q a bit too close to each other. I know that I can manually add a thin space by typing: `$3 \, q$`.   1. However, I was wondering if there was a way to automate this, i.e. that every time a number precedes a variable, a thin space is added. In other words I would like a thin space to be automatically added in `$5 q$`, but not in `$5 7$`.   2. And is it possible to have added in `$p q$` too? Do you recommend such practice between two variables that are multiplied? (I don't want to use `\cdot` as it clutters the display.)


title: mathtools with mu = Illegal unit?

text: I'm trying to change `medmuskip` while using `mathtools`:               \documentclass{article}     \usepackage{mathtools}     \setlength{\medmuskip}{0mu}     \begin{document}     \end{document}      But this results in an error:               ! Illegal unit of measure (pt inserted).     <to be read again>                        m     l.3 \setlength{\medmuskip}{0mu}      Without mathtools, this works. Why and what should I do to be able to change `medmuskip`?


title: Underlined links with hyperref possible?

text: How can I have underlined links with `hyperref`? That means how to configure `hyperref` not to change the color of the printout but use underlined active links which are completely transparent in print. The condition for an answer to be qualified would be not to make code changes in a local copy of the `hyperref` macros, working for linebraking/hyphenation of links in dvi/PS as well as PDF output, configuration for different dvi- drivers (e.g. `pstricks.con`). Options to specify underline color, linewidth, relative position/offset to baseline are a plus but functional not essential.


title: Beamer: strange behaviour of textpos on title page

text: I'm working on a customized template for LaTeX beamer. It's finished, except for some strange behaviour of textpost on the title page. Sample code:               \documentclass[t]{beamer}     \usepackage[absolute,overlay]{textpos}          \setbeamertemplate{navigation symbols}{}          \addtobeamertemplate{footline}{}{     \begin{textblock*}{100mm}(.5cm,.96\textheight)     This text should not appear on the title sheet.     \end{textblock*}}          \begin{document}          \title{Some title}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}     \frametitle{Some frame title}     Some text     \end{frame}          \end{document}      The result looks like this: ![enter image description here](http://i.stack.imgur.com/fJtI8.png) It looks like the title page has two footers! But I don't want _any headers or footers_ on my title page. I stumbled upon the option `[plain]`, i.e. `\begin{frame}[plain]` This results in: ![enter image description here](http://i.stack.imgur.com/KC4WE.png) So even though this gives a better result, there is still one footer left. It has something to do with the `textpos` package. I really need the options `absolute` and `overlay` for some other things in my template, so changing this is not an option. I was thinking about adding this text to the frametitle -- instead of the footline -- using `\addtobeamertemplate{frametitle}`, but this is not a very clean solution. Any ideas how to fix this? Since I'm creating the title page from scratch, is there an option to clear the entire title page? Or anything like `\pagestyle{empty}`? **[Edit]** Or any way to add a logo in the bottom right corner and some text in the bottom left corner _without_ using `textpos` is welcome! But keep in mind that it shouldn't be _exactly_ in the corners, there must be some whitespace around it.


title: Tools for project delivery?

text: This is another in a long line of Project directory organization questions of mine. I'm trying to build a project directory organization structure which follows best-practices. I'd like the structure to be set up in a way that is easy to deliver to others and have them execute it. Adapting this structure, part of my project structure would look as follows:               common-data/     LocalTexTree/     projects/myproject/     projects/myproject/myproject.exe     projects/myproject/code/r/main.r     projects/myproject/data/myproject-data.dat     projects/myproject/report/main.tex      Q: Suppose I'd like to deliver my full project to someone for execution using `myproject.exe`. What's the best way to do that? My concern is that `common-data/` and `LocalTexTree` will be large and have a lot of files irrelevant to "myproject". From reading around, I suspect the solution would be to track the relevant files in a Makefile(?) that zips the entire project. That just seems like too clunky a solution and that it would break easily. There has to be a better way, right? Again, I'm no programmer. This stuff isn't obvious to me at all. Any and all comments are welcome!


title: How to draw a vertical line of desired length in equations.

text: I am writing a big formula where a vertical line is needed. Instead of `$\vline$` or `$|$`, does anyone know a way to draw this vertical line of desired length? The formula is something like               $$     E\Bigg[     F_{m-1}\Big( \text{some big contents} \Big) |\: \mathcal{F}_1     \Bigg]     $$      Thank you very much!


title: Tikz \path problem, command not found

text: I am following tikz tutorial and my code has reached to this point:               \documentclass{article}       \usepackage{tikz}       \usetikzlibrary{shapes,decorations,shadows}       \usetikzlibrary{decorations.pathmorphing}       \usetikzlibrary{decorations.shapes}       \usetikzlibrary{fadings}       \usetikzlibrary{patterns}       \usetikzlibrary{calc}       \usepackage{verbatim}            \begin{document}          \tikzset{Yasser grid/.style={help lines,color=blue!50}}       \begin{tikzpicture}[scale=5]           \clip (-0.1,-0.2) rectangle (1.1, .75);           \draw [Yasser grid, step=0.5cm] (-1.4,-1.4) grid (1.4,1.4);           \draw (-1.5,0) -- (1.5,0);           \draw (0,1.5) -- (0,-1.5);           \draw (0,0) circle (1cm);           \draw (3mm,0mm) arc (0:30:3mm);                \shadedraw[left color=gray,right color=green, draw=green!50!black]               (0,0) -- (3mm,0mm) arc (0:30:3mm) -- cycle;               \draw [red, very thick] (30:1cm) -- +(0, -0.5);               \draw [blue, very thick] (30:1cm) ++(0, -0.5) -- (0,0);               \draw [green, very thick] (0,0) -- (30:1cm);                \draw [orange, very thick] (1,0) -- (30: 1.1547cm);               \path [name path=upward line](1,0) -- (1,1);               \path [name path=sloped line](0,0) -- (30: 1.5cm);               \draw [name intersections={of=upward line and sloped line, by=x}][very thick , orange] (1,0) -- (x);                \end{tikzpicture}        \end{document}        I have seen these posts:   * How to install a current version of TikZ?   * Weird tikz/pgfkeys error while trying example from the tikz manual. I am using TexShop (MacOS) and I followed the instruction in the first post above. Before updating the tikz and after updating it, I am receiving the same error which is similar to the second post above:               Package pgfkeys Error: I do not know the key '/tikz/name path' and I am going to ignore it. Perhaps you misspelled it.      If I comment out the \path command every thing is fine. Am I still not using the latest version of tikz? But I have downloaded the latest version and installed it accordingly. Is there any manual on how to completely remove the tikz and install it in texmf-local instead?


title: titlesec, hyperref, algorithm2e, and \appendix

text: When I use `titlesec`, `hyperref`, and `algorithm2e` together, sections after an `\appendix` are not numbered properly.               \documentclass{article}     \usepackage{titlesec}     \usepackage{hyperref}     \usepackage{algorithm2e}     \begin{document}     \section{foo}     \appendix     \section{bar}     \end{document}      Compiling this gives the warning > pdfTeX warning (ext4): destination with the same identifier > (name{section.1}) has been already used, duplicate ignored Sure enough, the .aux file shows               \@writefile{toc}{\contentsline {section}{\numberline {1}foo}{1}{section.1}}     \@writefile{toc}{\contentsline {section}{\numberline {A}bar}{1}{section.1}}        * Removing `titlesec` changes the second `section.1` to `appendix.1`.    * Removing `algorithm2e` changes the second `section.1` to `section.A`.   * Removing both changes the second `section.1` to `appendix.A`. Unlike last time, I tried all six permutations of the packages but had no luck. Can this combination of packages be made to work?


title: How to add a caption to a listing with minted?

text: Package `minted` provides a way to add captions and labels to a listing wrapping it around with `listing` environment. With this environment the code block is put inside a floating box which won't break any source code if it doesn't fit in a page. But what I need is this code not to be inside a floating box so it could be split in several pages if needed. I need to be able to generate a listings index with `\listoflistings` too. How could a possible solution be using `minted`? A minimal working example could be the one that comes with documentation:               \begin{listing}[H]      \mint{cl}/(car (cons 1 ’(2)))/       \caption{Example of a listing.}       \label{lst:example}     \end{listing}      Longer code blocks will be treated as `\figure` environments: if it doesn't fit in the place where it appears in latex code, it won't be split but it'll be moved to next page.


title: Minted in listing: break code across pages?

text: I'm using `minted` to highlight code. And I put that into a `listing` environment in order to get those numbered. By it self `minted` breaks code across pages. But when I put it into a `listing`, I get code on a separate page. Here's an MWE:               \documentclass{article}          \usepackage{minted}          \usepackage{lipsum}          \begin{document}          \lipsum[1-3]          \begin{listing}[H]     \begin{minted}{python}     # defs:     def fitfunc(p, coords):         x0, y0, z0, R = p         x, y, z = coords.T         return sqrt((x-x0)**2 + (y-y0)**2 + (z-z0)**2)          # initial fit values:     BeadsCenter = (Beads.coordinates().max(axis=0)                   + Beads.coordinates().min(axis=0)) / 2     BeadsInSwell = Beads.selectAtoms("point {0} {1} {2} {3}".format(                    BeadsCenter[0], BeadsCenter[1], BeadsCenter[2],                    args.radius))          MaxZ = (BeadsInSwell.coordinates().max(axis=0)[2])     MinZ = (BeadsInSwell.coordinates().min(axis=0)[2])     b = MaxZ - MinZ          MaxY = (BeadsInSwell.coordinates().max(axis=0)[1])     MinY = (BeadsInSwell.coordinates().min(axis=0)[1])     a = MaxY - MinY          R0 = (a**2 / 4 + b**2) / (2 * b)          x0, y0, z0 = (BeadsInSwell.coordinates().max(axis=0)                  + BeadsInSwell.coordinates().min(axis=0)) / 2.     z0 = MaxZ - R0          # data:     coords = BeadsInSwell.coordinates()          # initial fit paramters:     p0 = [x0, y0, z0, R0]          # fit:     errfunc = lambda p, x: fitfunc(p, x) - p[3]     p1, flag = leastsq(errfunc, p0, args=coords)     \end{minted}       \caption{Fit code (crucial part).\label{lst:fit}}     \end{listing}          \end{document}      I tried to put the `listing` environment in `minipage`, but it doesn't work.


title: \tikzexternalize doesn't work with lua code

text: The following code from the pgf manual compiles fine with `lualatex --shell- escape`               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize     \begin{document}     A simple image is \tikz \fill (0,0) circle(5pt);.     \end{document}      But, if I write some luacode (for example `$\pi = \directlua{tex.sprint(math.pi)}$`) I have the following error message :               ===== 'mode=convert with system call': Invoking 'pdflatex -halt-on-error -inter     action=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{test}\input{     test}"' ========     runsystem(pdflatex -halt-on-error -interaction=batchmode -jobname "test-figure0     " "\def\tikzexternalrealjob{test}\input{test}")...executed.     ./test.tex:7: Package tikz Error: Sorry, the system call 'pdflatex -halt-on-err     or -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{tes     t}\input{test}"' did NOT result in a usable output file 'test-figure0' (expecte     d one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system cal     ls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named      'write 18' or something like that. Or maybe the command simply failed? Error me     ssages can be found in 'test-figure0.log'. If you continue now, I'll try to typ     eset the picture.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7 ...ple image is \tikz \fill (0,0) circle(5pt);      The question is: what's wrong? And subsidiarily, why is pdflatex invoked? N.B. The compilation with lua code fails only if I deleted the aux files before.


title: longtable package is not spanning table across multiple pages

text: I have a table which spans into multiple pages. but, I could not get the table spanning into multiple pages. here is my MWE.               \documentclass[a4paper,10pt]{book}     \usepackage{multirow}     \usepackage{graphicx}     \usepackage{pstricks}     \usepackage{epstopdf}          \usepackage{pdflscape}    % to change certain pages to landscape mode     \usepackage{array}     \newcolumntype{P}[1]{>{\raggedright\arraybackslash\hspace{0pt}\mybreaks}p{#1}}          % Macro for my work     \begingroup     \catcode`=\active     \catcode`-\active     \catcode`)\active     \gdef\mybreaks{%     \catcode`=\active\edef={\string=\penalty0 }%     \catcode`)\active\edef){\string)\penalty0 }%     \catcode`-\active\edef-{\string-\penalty0 }}     \endgroup               \usepackage{verbatim}       % to commenet multiline               \usepackage{cite} %for compressing referenceing          \usepackage[para]{footmisc}          \usepackage{longtable}          \usepackage{booktabs,chemnum}     \usepackage[version=3]{mhchem}          \usepackage{imakeidx}     \makeindex          \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{xparse}% http://ctan.org/pkg/xparse          % another macro for my work     \newcounter{compoundcntr} \newcounter{subcompoundcntr}[compoundcntr]     \renewcommand{\thesubcompoundcntr}{\thecompoundcntr\alph{subcompoundcntr}}      \NewDocumentCommand{\compound}{s o m}{%       \IfBooleanTF{#1}        {% \compound*[<label>]{<name>}          \IfNoValueTF{#2}           {#3}% \compound{<name>}           {\stepcounter{compoundcntr}\refstepcounter{subcompoundcntr}#3,         \thesubcompoundcntr\label{#2}}% \compound[<label>]{<name>}         }     {% \compound[<label>]{<name>}       \IfNoValueTF{#2}         {#3}% \compound*{<name>}         {\refstepcounter{subcompoundcntr}#3, \thesubcompoundcntr\label{#2}}% \compound*      [<label>]{<name>}         }     }                \begin{document}          \begin{tabular}{|p{1cm}|p{1cm}|}      \hline       Names & Score \tabularnewline \hline       A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      A & 1 \tabularnewline \hline      \end{tabular}          \end{document}      The question is how to make the table to span thro multiple pages. May be the reordering of the packages may be an option.


title: subfig package displays "figure" below caption

text: I've included the subfig package in my latex document. The word "figure" is appearing below the main caption in each figure (even those not using subfloats). Has anyone had the same problem?               \documentclass[         final,         reprint,         notitlepage,         narroweqnarray,         inline,         twoside         ]{ieee}          \newcommand{\latexiie}{\LaTeX2{\Large$_\varepsilon$}}          \usepackage{epstopdf}     \usepackage{subfig}     \usepackage{graphicx}          \begin{document}          \begin{figure}     \centering       \subfloat[one]{\label{fig:one}\includegraphics[width=.4\textwidth]{figures/one.png}}       \qquad      \subfloat[two]{\label{fig:two}\includegraphics[width=.4\textwidth]{figures/two.png}}       \caption{some text}     \end{figure}          \end{document}      In the output document: > Fig 1. Some text > > figure I want to get rid of that last "figure" UPDATE:               \begin{table}[!t]     \renewcommand{\arraystretch}{1.3}     \caption{a caption not displaying OK}      \begin{tabular}{|c|p{2.5cm}|p{2.5cm}|}     \hline     &Average distance (km) & Total distance (km)\\ \hline     set 1&5.137&102.749\\     set 2&1.602&32.058\\     \hline     \end{tabular}     \label{distances}     \end{table}


title: How to show the file field with biblatex+biber?

text: I'm using `biblatex` + `biber` with a `bib` file containing entries like this:               @article{pm2006,       author={Pritsker, Matthew},       title={The hidden dangers of historical simulation},       journal={Journal of Banking \& Finance},       year={2006},       volume={30},       number={2},       pages={561-582},       month={February},       file={xpto.pdf}     }      I want to show the `file` field. How can I do that?


title: How best to set a comparison table in beamer?

text: I want to make a `frame` in `beamer` that compares two thingys according to 4-5 parameters, uncovered sequentially. My modest efforts to get something pleasing to the eye using `\begin{columns}` and `<1->`-type things have floundered. Do you know of a nice way to do such a thing?


title: Add Metadata to XeTeX PDF's

text: Is it possible to specify the metadata in PDF's made with XeTeX? Here's an example of the type of metadata I'd like to set (and a speculative form for XeTeX):               \pdfinfo     { /Title (My Masterpiece)       /Author (YourName)       /CreationDate (D:YYYYMMDDhhmmss) % this is the format used by pdf for date/time       /Subject (...)       /Keywords (...)     }      While it's clearly possible to do precisely this with pdfTeX, the following link suggests it's not possible with XeTeX: pdfauthor, pdftitle etc. in XeTeX. I'd be grateful for thoughts and feedback.


title: Harpoons in TikZ

text: Can I have any harpoons in TikZ? I refer to my previous question on harpoons: "How to draw protocol interaction" using `amsmath`.   The closest thing I have found is this code:               \begin{tikzpicture}[decoration={bent,aspect=.3}]           \node[circle,draw] (A) at (.5,.5) {A};            \node[circle,draw] (B) at (3,1.5) {B};            \draw[->,decorate] (A) -- (B);            \draw[->,decorate] (B) -- (A);       \end{tikzpicture}


title: how to allow figures to float inside paragraph?

text: I have a problem with floating figures... It seems like latex does not allow the figures to float inside a paragraph, but only in between them. This results in a big waste of space, espacially with large figures and long paragraphes. I'm using the article class with twocolumn. And also I'm using lyx, but if you can explain the issue in latex i will be able to translate it into lyx. Thank You!


title: How to change the fontsize in the heading of the glossary

text: I set up a glossary using the following code:               \documentclass[12pt]{report}          \usepackage[nonumberlist]{glossaries}     \usepackage[printonlyused]{acronym}     \makeglossaries          \newacronym{cmp}{CMP}{Common Mid Point}          \addcontentsline{toc}{chapter}{Glossary}     \glsaddall     \printglossaries          \end{document}      After running `name.glo -s name.ist -t name.glg -o name.gls` in the shell, I get a nice Glossary. The heading of my glossary is automatically created to be "Glossary". This is all right, except the fact that the fontsize of my this heading is far too big, compared to the other constituents in my table of contents. How can I modify the fontsize with which the glossary is created? Any help is highly appreciated.


title: Tikz: How to shade a node

text: I have made a graph with TikZ and now I would like to apply a shading to some of the nodes but I can't seem to find out how to do that. This doesn't work:               \documentclass{article}     \usepackage{tikz}          \tikzset{every node/.append style={minimum size=.7cm, draw,circle,font=\sffamily\Large\bfseries,inner sep=0.05cm}}          \begin{document}          \begin{tikzpicture}[sh/.style={shade,shading=axis,shading angle=45,left color=red,right color=green}]       \node                                 (x1) {$x_1$};       \node[node distance=3cm,right of=x1]  (x2) {$x_2$};       \node[node distance=3cm,right of=x2]  (x3) {$x_3$};            \node[node distance=1cm,below of=x1]  (1) [sh] {};       \node[node distance=1cm,below of=x2]  (2) [sh] {};       \node[node distance=1cm,below of=x3]  (3) [sh] {};       \node[node distance=1.5cm,below of=1] (4) {};       \node[node distance=1.5cm,below of=2] (5) {};       \node[node distance=1.5cm,below of=3] (6) {};       \foreach \from/\to in {x1/1,x2/2,x3/3,1/4,2/5,3/6,4/5,5/6} \draw (\from) -- (\to);     \end{tikzpicture}          \end{document}


title: What is causing different spacing between a header and content on one page only?

text: I have found that for only one page (so far) the spacing between the header and content is different from the spacing on all the other pages. You can see this behavior in the images below (from pages 2 and 3 of the document): ![correct spacing](http://i.stack.imgur.com/eJM5l.png) ![incorrect spacing](http://i.stack.imgur.com/FJ7hH.png) My .tex file contents are shown below.               \documentclass[a4paper]{report}     \usepackage{fullpage}     \usepackage{lipsum}     \usepackage{fancyhdr}     \pagestyle{fancy}     \setlength{\headsep}{0.5cm}          \begin{document}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}     \fancyhead[L]{\bfseries \leftmark}     \fancyhead[R]{\bfseries \rightmark}          \chapter{Version Control}     \lipsum     \lipsum     \lipsum     \lipsum          \end{document}


title: How to create Fancy Title Headers

text: I want to create a Fancy Title Header for an Article, like the one shown below: ![enter image description here](http://i.stack.imgur.com/9cdTQ.jpg) Can someone please provide some hint on how to achieve this?


title: pgfplots + gnuplot not working, shell escape and windows PATH are ok

text: I'm trying to get pgfplots to work with gnuplot to get this answer to work (i.e. triangulate a surface from a set of points). Shell escape was already enabled since I use TikZ externalization. gnuplot is also added to the Windows PATH since I can run it from the command line. However, when I run the following MWE it does not work and I get the following message in my .log:               runsystem(gnuplot TMP_latexTests.sin.gnuplot)...executed.               ! Package pgfplots Error: Sorry, the gnuplot-result file 'TMP_latexTests.sin.ta     ble' could not be found. Maybe you need to enable the shell-escape feature? For      pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnuplot      <file>.gnuplot' manually on the respective gnuplot file..          See the pgfplots package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.12   gnuplot[id=sin]{sin(x)};          ? x      It seems that gnuplot can be found and executes correctly, but no .table is created. The .gnuplot file is created and when I manually call gnuplot on this file the required .table is created, so that all works fine. I also checked and the .table file is not created in a nother location. MWE:               \documentclass[tikz]{standalone}     \usepackage{pgfplots}       % Charts in LaTeX, or, even better, in TikZ!!!     \usepgfplotslibrary{patchplots}     \pgfplotsset{compat=1.10}          \begin{document}     \begin{figure}     % Preamble: \pgfplotsset{width=7cm,compat=1.10}     \begin{tikzpicture}     \begin{axis}     \addplot       gnuplot[id=sin]{sin(x)};     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}       Environment information:   * Windows 7 64-bit Enterprise   * gnuplot 4.6 patchlevel 0   * MiKTeX 2.9   * WinEdt 8.1 64-bit   * pgfplots 1.10 / TikZ 3.0.0 So my question is, what other setting should I change in order to get pgfplots/MiKTeX to find my gnuplot executable? Or is there another issues I'm overlooking?


title: Error installing Vim-LaTeX using Pathogen on MacVim

text: I installed vim-latex using pathogen following the very clear instructions proposed in: How to install vim-latex? However, when I open a .tex file using MacVim, I get the following error message:               Error detected while processing ~/.vim/bundle/vim-latex-1.8.23-20130116.788-git2ef9956/ftplugin/latex-suite/texviewer.vim:     line  728:         Traceback (most recent call last):       File "<string>", line 1, in <module>       File "/Users/valeria/.vim/bundle/vim-latex-1.8.23-20130116.788-git2ef9956/ftplugin/latex-suite/outline.py", line 12, in <module>         import StringIO     ImportError: No module named StringIO     Error detected while processing /Users/valeria/.vim/bundle/vim-latex-1.8.23-20130116.788-git2ef9956/ftplugin/latex-suite/main.vim:     line 1040:     Traceback (most recent call last):       File "<string>", line 1, in <module>       File "/Users/valeria/.vim/bundle/vim-latex-1.8.23-20130116.788-git2ef9956/ftplugin/latex-suite/pytools.py", line 1, in <module>     import string, vim, re, os, glob     ImportError: No module named string      I don't really know if it helps, but since `import StringIO` looked like python syntax, I checked on the shell to see if my python had such module and it does. I am using MacVim on a Mac running Mavericks. Thank you so much!


title: luaotfload cannot load system font

text: (I have asked this question in `comp.text.tex` and `lualatex-dev@tug.org` mailling lists, but I still haven't got any reply. I know this website is not for bug report, but since no developer responded me, maybe my problem is only related to a specific type of setup, and possibly be helpful for someone who encounters the same error message). I updated my texlive 2013 pretest on May 14, and luaotfload was updated to v2.2 (2013/05/10). After the update, no matter I use fontspec or luaotfload package in the preamble, lualatex cannot load system font. Both produce the same error message. (The last update I made is May 17, and the problem still persist). System info: texlive 2013 pretest, last update on May 17. Archlinux x86_64. Here's the error message:               ! LuaTeX error .../texlive/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:85: a     ttempt to index global 'dir' (a nil value)     stack traceback:             .../texlive/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:85: in main chunk             [C]: in function 'require'             ...pt/texlive/texmf-dist/tex/luatex/luatexbase/modutils.lua:57: in function 're     quire_module'             [string "\directlua "]:1: in main chunk.     \lltxb@requirelua ...xluaescapestring {#2}" \fi )}          l.41 \fi


title: Referencing and printing table entries in main body

text: I have a table with numbers and I would like to reference a specific number in this table by re-producing it in the main body of the text. For example in this table:                \begin{table}[h]\caption{Summary Statistics}\centering     {\begin{tabular}{lc}     \hline\hline      &\textbf{Fraction of Monkeys}\\\hline     {New Construction}&0.006\\     {Preventive Maintenance}&0.275\\     {Resurfacing}&0.291\\     {Road Reconstruction}&0.103\\     {Road Rehabilitation}&0.105\\     {Roadside Facilities}&0.079\\     {Safety}&0.141\\     \end{tabular}}     \end{table}      I would like to be able to write the following sentence in my main body: "Roadside Facilities appear in **0.079** of monkeys". I would like the bold item to be linked to the table so that any update in the table is immediately reflected in the main text. Any help will be greatly appreciated.


title: ClassicThesis, Lyx and reference ordering?

text: I am writing my PhD thesis with ClassicThesis, in LyX under Linux. Everything is working perfect... until I noticed that the order of apperance for my references is off. For example, the first listed reference in the text is reference 48 (and not 1), so the list of references is in another order than they were referred to. This of course looks... Bad to say the least. I have tried passing unsrt to natbib, tried unsrt, unsrtnat as bibstyles (Using biblatex, but with the bst file for Angewandte Chemie journal). Nothing happens, I have changed everything everywhere but the references still come in the wrong order. Anyone? Please? :)


title: strange includegraphics behaviour Windows

text: i have problem including graphics in a document...i have the following structure               document.tex     tex/chap1.tex     tex/chap2.tex     img/image1.png     img/image2.png      I have traying almost anything to specify the path in the includegraphis sentence but it always pdflatex complains and not find the image. Maybe is in conflict with some other package that I put to the style file, but its really weird. I use the following to include a graphic:               \begin{figure}[H]     \centering     \includegraphics[width=8cm]{img/image1}     \caption{Arquitectura Visual Studio}     \label{IMG_VSBasicArchitecture}     \end{figure}      in the preamble i add the following:               \usepackage{graphicx}     \usepackage{float}      I compile from the document.tex directory. this file has the \input{tex/chapX.tex} sentences


title: Multi-column delimiter in align

text: I want to set the following, but with all the <'s aligned horizontally ![http://i.stack.imgur.com/SqeiG.png](http://i.stack.imgur.com/PqhpQ.png) Source of this failed attempt:               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}          \newcommand{\ra}{\rightarrow}     \newcommand{\T}[1]{\mathbb{T}_{#1}}     \newcommand{\lbe}{<_{\beta\eta}}          \begin{align*}     0 & \lbe 0 \ra 0                && \in \T0 \\     &\left.     \begin{aligned}     & \lbe 0^2 \ra 0 \\     & \lbe \cdots \\     & \lbe 0^k \ra 0 \\     & \lbe \cdots     \end{aligned}     \right\}                        && \in \T1 \\     & \lbe 1 \ra 0 \ra 0            && \in \T2 \\     & \lbe 1 \ra 1 \ra 0 \ra 0      && \in \T3 \\     & \lbe 3 \ra 0 \ra 0            && \in \T4 \\     & \lbe 1_2 \ra 0 \ra 0          && \in \T5     \end{align*}          \end{document}


title: The whitespace character in listings

text: > **Possible Duplicate:**   >  Explicit space character? The `listings` package by default replaces spaces in (for example) strings with a strange underscore style thing, almost like a square bracket but rotated by 90 degrees. ![example](http://i.stack.imgur.com/su5jc.png) My question is, what is that character, and how can I use it outside of the `listings` package? I want to illustrate spaces in file paths easily.


title: line numbering of minipages

text: I can't manage to add linenumbers left of the boxes. Can anybody help me?               \documentclass{article}          \begin{document}          \fbox{\fbox{          \begin{minipage}{0.8\linewidth}          \textbf{def} mapper (key, value):          \hspace{7mm}\textbf{for} word \textbf{in} value.split():          \hspace{14mm}\textbf{yield} word, 1\\          \textbf{def} reducer (key , values):          \hspace{7mm}\textbf{yield} key, sum(values)\\               \textbf{if} name == "main":          \hspace{7mm}\textbf{import} dumbo          \hspace{7mm}dumbo.run (mapper, reducer, combiner=reducer )          \end{minipage}          }}          \end{document}      Thanks


title: How to get straight quotation marks?

text: How do I get straight quotation marks, i.e., `"` and `'` in TeX? (No, `\verb` changes the font and this is unacceptable.) [Edit] I forgot to mention that I’m using XeLaTeX, and `fontspec` is a necessity. The first two proposed answers did work, without `fontspec`.