title: Page margin taking into account line number

text: I am typesetting an application that has pretty strict formatting requirements, which includes 12pt Times New Roman font and a 1 inch margin on all 4 sides. I have the following in my preamble.               \documentclass[12pt]{article}     \usepackage{mathptmx}     \usepackage[height=10in, width=8.5in, margin=1in]{geometry}          \pagestyle{empty}     \begin{document}      I added the `\pagestyle{empty}` macro in an attempt to remove the page numbers at the bottom of the page and make sure it's a 1 inch margin. However, it appears that this macro did not remove the page number, it simply made it invisible. There is still a 1 inch margin between the edge of the page and where the page number used to appear, and an additional margin directly below the main text, making the bottom margin about 1.75 inches. How can I completely remove the page number and ensure the bottom margin of the page is 1 inch? PS. I measured the margin on a printed test page and it's actually very close to a 1.25 inch margin. I don't think this will be a problem, but is there a way to make this more precise? PSS. Unfortunately, my problem was a silly one: I had set my height to 10in when I in fact meant 11in. However, your helpful responses taught me a few things: the difference between height/width and paperheight/paperwidth, and also the letterpaper shortcut for the 8.5x11in dimensions. Thanks!


title: How can I avoid the "Dimension too large" error when plotting in newer PGF versions?

text: After using a new version (2.10) of PGF, certain parts of my old TikZ code stopped functioning properly. For instance, the plot for a power function:               \documentclass{minimal}      \usepackage{tikz}     \begin{document}      \begin{tikzpicture}[scale=6,domain=0:1]       \draw[domain=0.0000125:1] plot (\x,{(\x)^(0.5)-\x});      \end{tikzpicture}     \end{document}      I now get the "Dimension too large" error for this. The problem has something to do with the power function: `\draw[domain=0.0000125:1] plot (\x,{(\x)^(2)-\x});` would cause no problem at all under the new version. More specifically, the problem seems to lie in taking square roots. I noticed the problem quite some time ago, but since I am able to revert back to an older version (2.00) of PGF under which the above piece of code causes no problem, I didn't bother to ask about it. Now, however, when other people run my code, they often get problems because they have newer versions of PGF. My question is: How can I rewrite the code such that the intended function gets plotted without any problem under the current version of PGF?


title: Have verbatim code as an equation

text: I have a little snippet of program code / input that needs to be rendered with the exact layout as typed in (verbatim). Is it possible to have this as an equation? I tried to nest the `Verbatim` environment in an `equation` without success. Any help?               \begin{equation}     \begin{Verbatim}     ... hack hack hack ...     \end{Verbatim}     \end{equation}


title: Accessing a style file from a subfolder.

text: I am currently working on a project with a number of other students. Now we are performing a number of tests on a hydraulic rig. As we are progressing with our tests we write test reports with our findings, each test is given a folder with the data and the .jpg pictures from our preliminary evaluation of the data. Now here is where things get complicated, we are using a template and style file to stream line the process, but since we are using a SVN repository i don't want to add our style file to each and every test folder. I can of course write the test report outside the folder and add the graphics with `\graphicspath{.../}` but the number of files will be substantial and I want to avoid this. Is there a way to call a style file from a subfolder? And yes, I am aware that the best solution would be to include our style file in the `~/texmf/tex/latex/mystyles/` folder. However since I don't know how many will have access to these test reports today, or afterwards I thought I should make it as simple as possible. Thank you in advance.


title: How to make nonstopmode really not stop on a missing input file

text: I have a file `test.tex` with these contents:               \input{missing}     \input{present}      When I run PDFLaTeX with `\--interaction=nonstopmode` it stops after the first missing input file:               $ pdflatex --interaction=nonstopmode test     This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)      %&-line parsing enabled.     entering extended mode     (./test.tex     LaTeX2e <2005/12/01>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, arabic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, monogreek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, latin, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded.          ! LaTeX Error: File `missing.tex' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: tex)          Enter file name:      ! Emergency stop.     <read *>           l.1 \input{missing}                        ^^M     !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on test.log.      How can I make PDFLaTeX continue even when `missing.tex` is not there? I would like to do this with either command-line options or code I can put at the beginning of any arbitrary source file, not changing the body of the source file.


title: highlight line numbers in listings

text: I would like to highlight the line numbers of the lines I refer to with `lstlistings`. I use escape characters to define labels in my Listing to which I refer later in my document (e.g. see Line X of Listing Y). How can I make the line number of line X of Listing Y colorful? The image below shows how it should look like. This was created by comparing the line number to a certain value. I would like to compare the line number to the value of a reference. ![This is what it should look like](http://i.stack.imgur.com/NYdhw.png) Here is a MWE in which I compare the line number against a hardcoded 5. My question is now, how to highlight the line number of the line in which I defined the label `code:label`?               \documentclass{article}     \usepackage{xcolor}     \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{mauve}{rgb}{0.58,0,0.82}     \usepackage{listings}          % define C++ style     \lstdefinestyle{cppStyle}     {       basicstyle=\footnotesize,       tabsize=2,       captionpos=b,       frame=lines,       breaklines=true,       % language related       language=C++,       keywordstyle=\color{blue},       commentstyle=\color{dkgreen},       stringstyle=\color{mauve},       % numbering       numbers=left,       numberstyle=\tiny     }          \begin{document}     \begin{lstlisting}[         style=cppStyle,         escapeinside={(*@}{@*)},         caption={Manual Definition -- \emph{Oh, what a mess!}},         label=lst:notNumbered,         numberstyle={\ifnum\value{lstnumber}=5\color{green}\fi}     ]      /* #include "readTwoPhaseEulerFoamControls.H" */     #include "readTwoPhaseLESEulerFoamControls.H"          // Solve the Momentum equation (*@\label{code:label}@*)          tmp<fvVectorMatrix> UEqn      \end{lstlisting}     \end{document}


title: Delta-like symbol in LaTeX

text: I'd like to write a majuscule delta-like symbol in LaTeX but I can't find it's syntax anywhere. You can see the symbol on equation (12) of the following paper:      **"Two-Frame Motion Estimation Based on Polynomial Expansion"**. ![enter image description here](http://i.stack.imgur.com/tdLuu.png)


title: How to draw a T-frame?

text: How can I re-produce the following figure using LaTeX? (Drawn in excel, using borders). ![enter image description here](http://i.stack.imgur.com/1UR6D.png)


title: How can I make an arrow returning to same entry in xymatrix?

text: I'm trying to make a diagram with arrows returning to the same entry using `xymatrix`. The following example works perfectly fine.               \[     \xymatrix{     V \ar@(dl,ul)[]^{h'} \ar@<0.5ex>[r]^{i} & W \ar@(dr,ur)[]_{h} \ar@<0.5ex>[l]^{p}      },     \]      However, if I try to change `V` to `(V,d_V)`, I only get error messages. I tried already to place it into `{}`, but it makes no difference. Typing               \[     \xymatrix{     {(V,d_V)} \ar@(dl,ul)[]^{h'} \ar@<0.5ex>[r]^{i} & {(W,d_W)} \ar@(dr,ur)[]_{h} \ar@<0.5ex>[l]^{p}      },     \]      I still get error messages like               ! Undefined control sequence.     \splineendScan@ ...s@ \expandafter {\splineedges@                                                    }\xylowtolerance@ \splined...      I hope someone can help me.


title: Please help me to run this code in LateX!

text: \documentclass{article}     \usepackage{array}     \begin{document}     \begin{tabular}{| >{\centering}p{2.5cm}  | >{\centering}p{0.5cm}  | >{\centering}p{2.5cm} |>{\centering}p{2.5cm} |>{\centering}p{2.5cm} |>{\centering}p{2.5cm} |}     \hline     Abc & Bcd & A long cell with text that wraps around and is centered & long cell with text  & AAAlong cell with text that wraps around and is centered & SSSlong cell with text that wraps around and is centered \\     1 & 3 & qw & qe & sad &11\\     \hline     \end{tabular}     \end{document}


title: Help! How to get the PDF-File? Error & Warnings lead to no pdf-file

text: I have a big problem. I am writing my phd thesis and started to use latex recently. I developed some basic skills that helped out me most time. But at the moment I dont know how to solve the problem. Every time I try to typeset the tex-file, the console says this:               This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)      \write18 enabled.     entering extended mode     (./Promotion4.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, arabic, armenian     , basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutch, u     kenglish, usenglishmax, esperanto, estonian, farsi, finnish, french, galician,      german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic, assamese,      bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panjabi, tamil,      telugu, indonesian, interlingua, irish, italian, kurmanji, lao, latin, latvian,      lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portuguese, roma     nian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish,      turkmen, ukrainian, uppersorbian, welsh, loaded.     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/book.cls     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/bk12.clo))     (/usr/local/texlive/2010/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2010/texmf-dist/tex/generic/babel/ngermanb.ldf     (/usr/local/texlive/2010/texmf-dist/tex/generic/babel/babel.def)))     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/inputenc.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/applemac.def))     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/biblatex.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/etoolbox/etoolbox.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/etex-pkg/etex.sty))     (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/ifthen.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/url/url.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/blx-compat.def)     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/biblatex.def)     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/bbx/authortitle-icomp.bb     x (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/bbx/standard.bbx)))     (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cb     x) (/usr/local/texlive/2010/texmf-dist/tex/latex/biblatex/biblatex.cfg))     (/usr/local/texlive/2010/texmf-dist/tex/latex/csquotes/csquotes.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/csquotes/csquotes.def)     (/usr/local/texlive/2010/texmf-dist/tex/latex/csquotes/csquotes.cfg)          Package csquotes Warning: Option 'babel' depreciated.     (csquotes)                Using 'autostyle' on input line 2327.          ) (/usr/local/texlive/2010/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hyperref.sty     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/etexcmds.sty))     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/pdfescape.sty     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifpdf.sty)     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifvtex.sty)     (/usr/local/texlive/2010/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/hycolor.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/xcolor-patch.sty))     (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/letltxmacro.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/pd1enc.def)     (/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/intcalc.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/hyperref.cfg)     (/usr/local/texlive/2010/texmf-dist/tex/latex/oberdiek/kvoptions.sty)          /usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hyperref.sty:3577: Packag     e keyval Error: cross-reference undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.3577 \ProcessKeyvalOptions{Hyp}      I tried all the shortcuts to ignore the warnings and errors, but nothing helps. In the end I dont get the pdf-file and I it feels like destroying all the work I have done so far. So if anyone knows how to fix the problem, that would be great.


title: Can I specify an output file name/path in AUCTeX?

text: I know I can use `C-u C-c C-c LaTeX` to edit the command before it is run, but is there any way I can generically specify an output file name without editing the command manually?


title: Setting Dynamic Column Properties in LaTeX Tabular

text: I am writing a system to export reports in various formats from PHP. When it comes to LaTeX it seems to require `\begin{tabular}{mandatory column arguments}` Since the number of columns in the datasets vary, with my current method I can't export in LaTeX without adding quite a bit of extra code to deal with LaTeX. I am trying to keep it simple and have a defined export format for each type (PDF/`pdflatex`, XLS, CSV, etc.). Is there a way to tell LaTeX to set all columns as one alignment? Something which would take the place of `help!` in the following line of code:               \begin{tabular}{help!}      Ideally I want the first column to be left aligned, and all the other columns to be center aligned. However I could settle for all left or all center.


title: Drawing a straight line over a coordinate

text: Suppose you want to draw a straight line over a coordinate named "cor" of which you don't know the position. Cor must be at the center of the line. I tried this:               \documentclass{article}     \usepackage{tikz}     \begin{document}      \begin{tikzpicture}       \coordinate (cor) at (0,0) ;       \draw (cor)+(180:2cm)--(cor)+(0:2cm);      \end{tikzpicture}     \end{document}      But it doesn't work. It works if you use               \draw (cor)+(180:2cm)--+(2,0);       My question is: why it doesn't work in the first case? Shouldn't the two approaches bring the same result?


title: Is there a PythonTex equivalent to \Sexpr{} in R?

text: I started to use the excellent PythonTex package to write reproducible reports but can't seem to get it to evaluate Python code inside a LaTeX command. R has Sweave & knitr which provide the `\Sexpr{}` command that lets you access variables declared in R chunks inside a LaTeX command. This works in R with Sweave/knitr:               \documentclass{article}     \usepackage{siunitx}     \begin{document}     <<read, engine='R'>>=     y = 4     @     The value of y is $\SI{\Sexpr{y}}{\metre}$.     \end{document}      However, the following does not seem to work in PythonTex:               \documentclass{article}     \usepackage{siunitx}     \usepackage{pythontex}     \begin{document}     \pyc{y = 4}          The value of y is $\SI{\py{y}}{\metre}$.          \end{document}      Am I missing something? Is there a way to achieve `\Sexpr{}` functionality in PythonTex? Thanks for your help!


title: Convincing pdfbook to assume letterpaper

text: I have a small booklet in half-`letterpaper` size:               \documentclass{book}     \usepackage[paperheight=8.5in,paperwidth=5.5in]{geometry}          \usepackage{mwe}     \begin{document}     \lipsum[1-13]     \end{document}      But when I run `pdfbook` on the resulting PDF, I invariably receive—no matter what the original page size is—a PDF that is 11.7 by 8.27 inches. How can I use `pdfbook` (or `pdfjam`) to simply (and appropriately) mash these pages together without trying to alter the paper size? ### Ideal After compiling the above MWE, I have a PDF that is exactly half of the size of a sheet of letter paper. I would like to run `pdfbook` (or a custom call to `pdfjam`) such that these pages are set two-up on the long edge in the correct configuration to bind it as a book. * * *               $ pdfbook -p letter test.pdf out.pdf               ----       pdfjam: This is pdfjam version 2.08.       pdfjam: Reading any site-wide or user-specific defaults...               (none found)       pdfjam ERROR: no PDF/JPG/PNG file found at -p


title: A pgf plot problem

text: I'm new to pgfplot and I have a pgfplot problem. figure 1 :As you can see the line is going through the number '2'. How can i fix it? ![enter image description here](http://i.stack.imgur.com/VdgAl.png) figure 2: Also can i fix the line length, going through 2, between 0 and intersection point. ![enter image description here](http://i.stack.imgur.com/IaatD.png)               \documentclass[11pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{tikz,pgf,pgfplots}     \pgfplotsset{compat=1.10}     \usepgfplotslibrary{fillbetween}     \usetikzlibrary{patterns}          \begin{document}     \begin{tikzpicture}     \begin{axis}[axis lines=middle,                 xlabel=$x$,                 ylabel=$y$,                 enlargelimits,                ytick=\empty,                 xtick={2},                 %xticklabels={2},                 every axis y label/.style={at=(current axis.above origin),anchor=south},                               every axis x label/.style={at=(current axis.right of origin),anchor=west},                             grid = major                 ]     \addplot[name path=F,blue,domain={0:2}] {6-x^2} node[pos=0.6, above]{$f$};          \addplot[name path=G,green,domain={0:2}] {x}node[pos=.4, below]{$g$};          \addplot[pattern=north west lines, pattern color=brown!50]fill between[of=F and G, soft clip={domain=0:2}]     ;     \node[coordinate,pin=30:{$A$}] at (axis cs:3.8,3){};          \end{axis}     \end{tikzpicture}     \end{document}


title: Using xy-pic, how do you label an arrow with a curly brace that spans the length of the arrow, and can be offset arbitrary distances?

text: I'm trying to figure out how to label the arrows with curly braces that span the length of the arrow, and to make it all very pretty. More specifically, I'm trying to make               \documentclass[10pt]{article}     \usepackage{amssymb} %needed for \mathbb{Q}     \usepackage[all]{xy}     \begin{document}          \xy     \xymatrix{      \ar@{-}[ddddd]_G & & F \ar@{-}[dd]^{p^\infty} &       \ar@{-}[dd]^{\Gamma^{p^m}} & \ar@{-}[dddd]^\Gamma\\\\      & \ar@{-}[ddd]_{G_m} & F_m \ar@{-}[dd]^{p^m} &       \ar@{-}[dd]^{\Gamma_m} & \\\\      & & F_0 \ar@{-}[d]^{p-1} & \ar@{-}[d]^\Delta & \\      & & \mathbb{Q} &     }     \endxy          \end{document}      with the outer arrows as curly braces, and preferably spaced better. By copying someone else's diagram I've managed to create a close approximation of it, but sideways               \documentclass[10pt]{article}     \usepackage{amssymb} %needed for \mathbb{Q}     \usepackage[all]{xy}     \begin{document}          \xy     \xymatrix "M"@C=0pt@R=10pt{      &&&&&&&&&& &&&&&&&&&& &&&&& \\      &&&&&&&&&& &&&&&&&&&& &&&&& \\      F \ar@{-}[rrrrrrrrrr]^{p^\infty} &&&&&&&&&&       F_m \ar@{-}[rrrrrrrrrr]^{p^m} &&&&&&&&&&       F_0 \ar@{-}[rrrrr]^{p-1} &&&&& \mathbb{Q}\\      &&&&&&&&&& &&&&&&&&&& &&&&& \\      &&&&&&&&&& &&&&&&&&&& &&&&&     }%      \POS      "M1,2"."M1,20"!C*\frm{^\}},+U*++!D{\Gamma}      ,"M2,2"."M2,10"!C*\frm{^\}},+U*++!D{\Gamma^{p^m}}      ,"M2,12"."M2,20"!C*\frm{^\}},+U*++!D{\Gamma_m}      ,"M2,22"."M2,25"!C*\frm{^\}},+U*++!D{\Delta}      ,"M4,12"."M4,25"!C*\frm{_\}},+D*++!U{G_m}      ,"M5,2"."M5,25"!C*\frm{_\}},+D*++!U{G_m}     \endxy          \end{document}      but I have no idea about this whole POS command and frankly find it rather mysterious. I've gotten fair with `xy-pic`, but am willing to embrace other packages. It would be nice if someone knew of a solution that didn't require that the braces be attached to entries of the matrix, so that I could do things like label the arrows of               \documentclass[10pt]{article}     \usepackage{amssymb} %needed for \mathbb{Q}     \usepackage[all]{xy}     \begin{document}          \xymatrix{      &&&& R\\      \\      && H \ar@{-}[rruu] && R_m \ar@{-}[uu]\\      & \\      F \ar@{-}[rruu] & & H_m \ar@{-}[rruu] \ar@{-}[uu] && R_0 \ar@{-}[uu]\\      &\\      F_m \ar@{-}[rruu] \ar@{-}[uu] & & H_0 \ar@{-}[rruu] \ar@{-}[uu]\\      \\      F_0 \ar@{-}[rruu] \ar@{-}[uu]\\      \mathbb{Q} \ar@{-}[u]     }          \end{document}      without having to rearrange the diagram for the sake of the labels. Then there is also the issue that the outer braces are not attached to an arrow. Perhaps an arrow that is itself a curly brace, but can be offset to the side? Any help would be greatly appreciated.


title: Large horizontal gap between my align equations

text: I wanted to show how a bijection works and so created equations below:               \begin{align*}     x_1 &  \longmapsto &y_1 \\     x_2 &  \longmapsto &y_2 \\     & \vdots & \\     x_n &  \longmapsto &y_n     \end{align*}      However there is a large gap between my arrows and my y's. Can anyone help me reduce this so that the space between x and the arrow is the same as the gap between y and the arrow? ![This is what I get](http://i.stack.imgur.com/VYYdn.png)


title: How to place personal informations on the left of header in moderncv with classic style

text: I found how to customize my CV created with the `moderncv` and the `classic` style, but I can't found how to put my name a little bit higher and put my personal informations on the left, just below my name, because beside the photo, I don't like it. If the title could be on the middle of the header it would be great. ![The header to modify...](http://i.stack.imgur.com/kDxyo.png) Thanks for your help, don't want to go back to Word it's very interesting to do it in LaTeX. @Gonzalo Medina : Ok, that's what i wannted :) you're the best thank you, and now if i want to reduce the space between the name and informations, how can i do ? : ![enter image description here](http://i.stack.imgur.com/traUw.png) @Gonzalo Medina : Ok, so this is the begining of my .tex file :               \documentclass[10pt,a4paper]{moderncv}     \moderncvtheme[blue]{classic}                     \usepackage[applemac] {inputenc}     \usepackage[french] {babel}      \usepackage[scale=0.9]{geometry}          \photo[100pt]{Photo_cv.jpg}     \firstname{NAME}     \familyname{NAME}     \title{}     \address{ADRESS}{ZIP CODE CITY}         \mobile{NUMBER}                         \email{Email}                 \extrainfo{birthdate\\ Nationality- driving license}          \begin{document}     \maketitle      Thanks a lot, really. Edit 18/12 : @Gonzalo Medina: Hi, Thanks for your answer, it's better now, there still a small space but it's smaller. Just a problem with the title, in my file, if i put a title in \title{}, it's gave me an error (see the photo of the error below) but if i let it empty, it works... don't understand why, maybe a problem of fonts like the error says. ![problem](http://i.stack.imgur.com/XRHSH.png) i think this is this line in the .sty file which gave this error : "\renewcommand*{\titlestyle}1{{\titlefont\text{color2}{#1}}}"


title: how to get square brackets with \SIrange{}{}{}?

text: I'd like to get something like this: [-40 ; 80] °C Instead I'm getting: ![enter image description here](http://i.stack.imgur.com/w6gDJ.jpg) Below is a MWE. I've tried to include all necessary packages for `siunitx`, as written in its documentation; there are more, perhaps they are conflicting with the ones `siunitx` requires...               \documentclass[a4paper,12pt]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[italian]{babel}          \usepackage{amssymb, amsmath, amsfonts, xfrac, mathpazo} %all maths     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{enumerate}     \usepackage{outlines}     \usepackage{enumitem}     \setlist[enumerate,2]{label= \roman*)}     \setlist[enumerate,3]{label=\textbf{\alph*})}     \usepackage{siunitx}      \sisetup{range-phrase = \ ;\ ,               range-units  = brackets,               list-units   = brackets}     \usepackage{listings} %useful for siunitex     \usepackage{cancel}     \usepackage{blindtext}     \usepackage{hyperref}     \hypersetup{pdfstartview=FitH}      \usepackage[italian]{cleveref}           \begin{document}     $\SIrange{-40}{80}{\celsius}$     \end{document}


title: Can't generate a tikz matrix, using expl3

text: Suppose, I want to generate a matrix of nodes:               \documentclass{article}     \usepackage{expl3}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}     \matrix     [         row  sep=2mm,     ] (matr)     {       \node[draw] (1) {1};\\       \node[draw] (2) {2};\\       \node[draw] (3) {3};\\     };     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ifxf7.png) I tried to do it, using expl3 `for` loop:               \documentclass{article}     \usepackage{expl3}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}     \matrix     [         row  sep=2mm,     ] (matr)     {       \ExplSyntaxOn       \tl_new:N \l__text_tl       \int_step_inline:nnnn { 1 } { 1 } { 3 }       {         \tl_put_right:Nn \l__text_tl {\node[draw] (#1) {#1};\\}       }       \l__text_tl       \ExplSyntaxOff     };     \end{tikzpicture}     \end{document}      The compiler fails with message:               ! Missing } inserted. <inserted text>      }     l.21 \end{tikzpicture}


title: how to hyperlink a shape using tikz

text: > **Possible Duplicate:**   >  Making TikZ nodes hyperlinkable something that has been giving me trouble for some time now. I would like to attribute a hyperlink to a shape, that is, not to text but to a whole area. For eg. in the MWE below, I would like the whole of the green circle to react as the mouse is positioned on top of it.               \documentclass{article}     \usepackage{tikz}     \usepackage{hyperref}     \usetikzlibrary{positioning}          \begin{document}          \begin{tikzpicture}     \node[circle, draw=black, fill=red!20, minimum size=2cm] (c1) {\hyperlink{t1}{long text}};     \node[circle, draw=black, fill=red!20, minimum size=2cm, right= 3cm of c1] (c1) {\hyperlink{t1}{}};     \end{tikzpicture}          \newpage          \begin{tikzpicture}     \node[circle, draw=black, fill=red!20] (t1) {\hypertarget{t1}{target}};     \end{tikzpicture}          \end{document}      Any idea? Thanks


title: Pandoc - Convert XeTeX to HTML

text: I posted the question here How to Convert XeTeX to Html However I tried something different so decided to ask the issues with the results as a new question. So far my XeTeX file is nicely getting concerted to HTML, thats nice :) I am attaching screenshot of PDF and HTML file. the table format did not come at all in the HTML. Image one is HTML and image 2 is pdf output. minimum example can be found of the previous post link given above. ![enter image description here](http://i.stack.imgur.com/8t5K9.png) ![enter image description here](http://i.stack.imgur.com/qFrKy.png) This is the command I ran `pandoc --from latex 001.tex --to html --standalone --output 001.html` I hope its something in my code than latex limitations. I would greatly appreciate your help.


title: Lower and upper Riemann integrals?

text: How can I make an integral symbol with a bar above it or a bar below it?


title: In listings, lines that are broken (option breaklines enabled) cause frame to be drawn badly. How do you fix this?

text: I have an `lstlisting` which has `breaklines` and `frame` enabled. The actual setting is as follows.               \lstset{         basicstyle=\ttfamily,         showstringspaces=false,         breaklines=true,         keywordstyle={},         frame=single,         frameround=tttt,         rulecolor=\color{gray},         escapechar=\&     }      The problem is, whenever a line is too long and thus breaks into two, the frame around it doesn't include the second line. Here is an image of how it looks like: ![Broken frame around lstlisting](http://i.stack.imgur.com/umdZt.jpg) **Edit** : Alright, I found out that I was missing some important information. I am styling the listing myself (as opposed to automatically) as you can see in the image. That is why I use `&` as `escapechar` and practically all of the contents of the listing is escaped. See this code (note that this is software generated!):               \documentclass{article}     \usepackage{listings, xcolor}          \lstset{             basicstyle=\ttfamily,             showstringspaces=false,             breaklines=true,             keywordstyle={},             frame=single,             frameround=tttt,             rulecolor=\color{gray},             escapechar=\&     }     \begin{document}     \begin{lstlisting}     &\#include <stdio.h>&     &int main()&     &\{&             &\textcolor[rgb]{0.0,0.2,0.4}{printf("Enter a, b, and c (space separated) in the following equation:\textbackslash{}nax\^{}2+bx+c = 0\textbackslash{}n");}&             &\textcolor[rgb]{0.0,0.2,0.4}{scanf("\%f \%f \%f", \&a, \&b, \&c);}&             &\textcolor[rgb]{0.0,0.2,0.4}{printf("What happens when I type two less{-}than signs like this? << \textbackslash{}n");}&     &\}&     \end{lstlisting}     \end{document}      In this code, I just used `\textcolor` for demonstration, although that IS principally what I am doing. This code produces this output: ![enter image description here](http://i.stack.imgur.com/iHn8h.png) This is `pdflatex`'s output:               This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)      restricted \write18 enabled.     entering extended mode     (./a.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,      lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol     ish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spani     sh, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2010/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2010/texmf-dist/tex/latex/listings/listings.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/listings/lstmisc.sty)     (/usr/local/texlive/2010/texmf-dist/tex/latex/listings/listings.cfg))     (/home/sciabaz/texmf/tex/latex/xcolor.sty     (/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/color.cfg)     (/usr/local/texlive/2010/texmf-dist/tex/latex/pdftex-def/pdftex.def)) (./a.aux)     (/usr/local/texlive/2010/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )          LaTeX Font Warning: Font shape `OMS/cmtt/m/n' undefined     (Font)              using `OMS/cmsy/m/n' instead     (Font)              for symbol `textbraceleft' on input line 19.          [1{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./a.aux)          LaTeX Font Warning: Some font shapes were not available, defaults substituted.           )</usr/local/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>     </usr/local/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb><     /usr/local/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></     usr/local/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/latxfont/lcircle1     .pfb>     Output written on a.pdf (1 page, 34186 bytes).     Transcript written on a.log.      Note that with Mike's code, I didn't get the font warning.


title: Is there a way to do an "upside down" \widehat?

text: I've come across this in a book I'm looking through, but I can't find the code for it. I want it to look exactly like the `\widehat` and go above text like `\widehat` does...I just want it to be (vertically) flipped!


title: Drawing A CrossFind Puzzle

text: I've got this code:               \begin{table}     \begin{tabular}{|l|l|l|l|l|l|l|l|}     \hline     A & R & R & A & N & G & E & V \\ \hline     C & A & N & C & E & L & M & O \\ \hline     H & B & Y & H & A & V & E & D \\ \hline     A & O & E & E & I & G & P & I \\ \hline     N & O & S & C & L & F & N & T \\ \hline     G & K & T & K & P & E & L & A \\ \hline     E & R & O & O & C & T & K & L \\ \hline     T & M & F & A & E & S & R & K \\ \hline     \end{tabular}     \end{table}      I want to draw the solutions of this puzzle. How can I do it? For instance, "arrange" and "cancel" are both solutions of this puzzle. Thanks


title: Texmaker: source editor and embedded pdf viewer on same window

text: How do I get Texmaker to display the source and ouput in the same window, as advertised. This seems to be the default behavior on some systems, but not on others.


title: Sweave (using R Studio) with AEA class

text: Apologies for the newbie question! I've been having some problems trying to get a minimal working example using Sweave with a the AEA document class. My minimal example works as a `.tex` file, but the `.rnw` file encounters an error (which I've included below). Here is the code I'm using:               \documentclass[AEJ]{AEA}     \begin{document}     Hello World!     \end{document}      As I said, I've been able to compile this when it's saved as a `.tex` file -- I've managed to save the `AEA.cls` (and `aea.bst`) files in the same directory as this script, which seems to work. However, when I save the same script as a swerve (`.rnw`) file, I get the following error:               Font T1/cmr/m/n/10.95=dcr10 at 11.0pt not loadable: Metric (TFM) file not found      I tried (as well) compiling the `.tex` file which was created when I tried to compile the `.rnw` file, but ended up with the same error. I gather that the problem has something to do with the file path to one of the fonts, but beyond that I'm a bit confused. Any help on this much appreciated!


title: What's the maximum number of pages a PDF produced by pdfTeX can have?

text: Are there some limitations regarding the `pdflatex` command with respect to the count of pages of the input files? My highest page count, when compiling, was 90 without any troubles. (2008) Currently another document will be prepared which will be approx. 170 pages in sum. EDIT: Thanks to all answers. They were helpful.


title: Color background for chapter titles which stretches horizontally to the margins

text: I'm working on my chapter titles. I like them to have a background which stretches to the edge of the page. The drawbacks of the minimal document below are:   1. The TOC also has the background, too. I'd rather have the TOC text color in the red background color I used for fill and have no background fill at all in the TOC. Eventually the default black would work, too (but red would be cooler, including the TOC page numbers).   2. I need to move the `\rule` I used a fair bit down since a bit of padding there looks better (and have background for letters like p, q, g, etc.)   3. I'm not sure it works well with multiple line titles, but that could probably be puzzled out with enough padding and increasing the size of `\rule`. ![colored-latex-chapter-titles](http://cl.ly/Scgh/latex-colored-chater- titles.jpg)               \documentclass[12pt,a4paper,     %   Add lists to TOC     listof=numbered,numbers=noenddot,version=first,     ]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \inputencoding{utf8}     \usepackage{helvet}     \usepackage{mathpazo}     \usepackage{setspace, lipsum}     \usepackage{xcolor}     \usepackage{tocloft}          %   SECTION TITLES     % apply only singlespace to section starters (chapters, etc.)     % can also be set only for `chapter` instead of sectioning     \makeatletter     \addtokomafont{sectioning}         {\color[RGB]{255,255,255}             \makebox[0pt][l]{{\color[RGB]{212,17,37}\rule{1.3\textwidth}{2em}}}         }         {\setstretch{\setspace@singlespace}         }     \makeatother               \begin{document}     %   TOC     \tableofcontents     \pagebreak          \chapter{Introduction}     \lipsum[1]     \chapter{Main Part}     \lipsum[2]     \chapter{Conclusion}     \lipsum[3]          \end{document}      I also saw this similar thread, but I'm `\blap` and `\tlap` might not be capable of adjusting well to multi-line chapter titles. Then again, I'm positive there's a better way to do what I want than my current approach, maybe even a `\colorbox`. But my head is hurting from the LaTeX input of the last days and I figured for this tricky problem some professional help might be beneficial. Does anyone know how to pull it off? **Status:** _LaTeX user for 3 days._


title: column separator in header line in column with dec sep align

text: I'd like to have a column with vertical bar separators. When I set the number format to 'dec sep align' the vertical separators disappear. Here is a MWE:               \documentclass{article}     \usepackage{array}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstabletypeset         [columns/A/.style={column type={|r|}},          columns/B/.style={dec sep align, column type/.style={|}{|}},          columns/C/.style={dec sep align, column type/.style={|}{|}},          outfile=TestTable.tex         ]{           A    B     C          1  1.23  1.23          20 3.4   5.654         }     \end{document}      In the generated code, indeed I don't see my vertical bars:               \begin {tabular}{|r|r<{\pgfplotstableresetcolortbloverhangright }@{}l<{\pgfplotstableresetcolortbloverhangleft }r<{\pgfplotstableresetcolortbloverhangright }@{}l<{\pgfplotstableresetcolortbloverhangleft }}%     A&\multicolumn {2}{c}{B}&\multicolumn {2}{c}{C}\\%     \pgfutilensuremath {1}&$1$&$.23$&$1$&$.23$\\%     \pgfutilensuremath {20}&$3$&$.4$&$5$&$.65$\\%     \end {tabular}%      What am I doing wrong? Thanks Juhui


title: How to split a minipage?

text: How can I measure the height of a minipage and then split and store the text into two macros? The first macro must store the text that does not exceed a certain limit say `\maxheight` and the second to store the balance of the text. Ideally I would like the split to happen at a word break.


title: How to use memoir change markers without the draft option

text: After considerable thought and experimentation, I came to the conclusion that I wanted to use _memoir_ 's `\changemarks` facility to indicate, as a courtesy to a client, where my proposal had changed as a result of our discussions. However, `\changemarks` and friends are suppressed unless the `draft` class option is used. But using `draft` gives me some horrible side-effects, like missing graphics and blobs at the edge of my occasional(!) overfull box, as well as being semantically untrue. I thought, initially, about latexdiff (barfs on my files), changebars (appears not to support xelatex), and changes (conflicts with memoir), and discarded them for the reasons mentioned. Now I'm heavily invested in the native memoir solution, I'm not sure which way to jump. Can anyone suggest a reasonable quick fix?


title: Is there a way to make the footnote package work correctly with hyperref?

text: I'm using the `footnote` package in conjunction with the `hyperref` package. However, when using more than one footnote per line in an environment (e.g. table, but also other floating environments), the `hyperref` package creates incorrect links (i.e. links point to the first page in the document). Why do I want this? Because there is a (Word-)template for my thesis and my latex doc should exactly the same. Using hyperref is not required, but I'd like to work them correctly. Since I use different environments with the `savennotes` environment, a solution that works with all environments is required. **Please note** : I don't want to use special packages like `threeparttable` or things like `\tablefootnote` because I need a solution that is applicable to other environments, not only tables. Also, I want to have the footnotes at the bottom of the page like text footnotes. Having them directly beneath the table is not an option (e.g. minipage). In the MWE below, the last footnote in each row is correctly linked by hyperref, however, the others point to the first page:               \documentclass[12pt,a4paper,twoside,openany,fleqn]{book}          \usepackage{lipsum}          \usepackage{hyperref}          \usepackage{footnote}     \makesavenoteenv{table}          \begin{document}     \chapter{First Chapter}          \lipsum[1-3]          \begin{table}[htp]%     \begin{tabular}{lcr}         My text\footnote{Incorrect 1}\footnote{Incorrect 2}\footnote{Correct 1} \\         My text\footnote{Incorrect 3}\footnote{Correct 2} \\         My text\footnote{Correct 3} \\     \end{tabular}     \caption{Test}     \end{table}          \lipsum[1]          \end{document}


title: Unable to load Asana-Math and compile with XeLaTeX

text: Just few days ago I decided to give XeLaTeX a try for its wonderful use of system fonts. I read a bit on the net about "fundamental lines" to change (I come from LaTeX) which basically boil down to (and correct me if I'm wrong!)               \usepackage{fontspec}     \setmainfont{<whatever>}      Now this yields very ugly math fonts. I wanted to use "Asana Math" via               \usepackage{unicode-math}     \setmathfont{Asana-Math}      but then this happens               ! fontspec error: "font-not-found"! The font "Asana-Math" cannot be found.!! <etc.>      I'm using _Mac OS X 10.7_ with the latest TeX Live distribution (I even ran TeX Live Utility to update anything "updatable" to make sure) and as editor _TeX Studio_. But I want to underline that this same error happens using the Terminal with               xelatex [-shell-restricted] <filename>.tex      I am "sure" the fonts are installed, at least Tex Live Utility says so. The issues presents even with this MWE               \documentclass[10pt,a4paper]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage{fontspec}     \usepackage{unicode-math}     \setmainfont{Ubuntu}     \setmathfont{Asana-Math}          \begin{document}     Formula     \begin{equation}         \sum_0^\infty 1/x^n = \frac{1}{x-1}     \end{equation}     \end{document}      Thank you in advance! P.S.: I am reluctant to call the above **MWE**. It is not! It'a **M** inimal **N** ot **W** orking **E** xample!


title: Align glosses in more than one language with gb4e

text: I'm using the package gb4e to gloss my linguistic examples. It nicely aligns the words in the original language with its glosses. But this alignment does not extend beyond the first line of glosses. If I want to gloss the words in more than one language, there will be no alignment beyond the first line of glosses. How can I enforce such alignment?               \documentclass{article}     \usepackage{gb4e}     \begin{document}     \begin{exe}         \ex         \gll gef hundinum matinn\\         gje hunden maten\\         give {the dog} {the food}\\         gib {dem Hunde} {das Essen}\\     \end{exe}     \end{document}      ![enter image description here](http://i.stack.imgur.com/v6Vpf.png)


title: Font installation woes - TeXShop on a Mac

text: Have read (carefully, I hope) the earlier question Font installation in TeXShop on a Mac looked to be exactly what I needed. Also looked at http://www.tug.org/fonts/fontinstall.html#fndb Am trying to install Arial from CTAN. However, the `sudo` commands `getnonfreefonts`, `texhash` and `updmap` did not seem to be available on my system. So I have downloaded and installed MacTeX 2012 (previously had 2010), which enabled `texhash` and `updmap`, but not `getnonfreefonts`, and tried again. The unzipped files went into /usr/local/texlive/2012/../texmf-local/arial which I think is right. sudo texhash made all the right noises, as in the answer to the earlier question referred to above. `sudo updmap-sys --enable Map=ua1.map` produced a limited response. I had made earlier attempts, sometimes with the wrong map name. The font is not 'working'. `testfont` confirms this, saying that `ua1b8a` (one of the `.tfm` files) cannot be found. I have clearly 'screwed up' my system somewhere along the line, unless I have misunderstood something. What do I do now? Remove all traces of TeX... from my computer and start again? Or... Sorry to be so dumb.


title: Problem with tikz and pgfplots

text: I have received some LaTeX code from a colleague which compiles successfully on his computer but not on mine. I get the following error messages (some of them more than once):               ! Package pgfkeys Error: I do not know the key '/pgfplots/fill' and I am going to ignore it. Perhaps you misspelled it.          ! Package tikz Error: Unknown coordinate system 'ticklabel'.          ! Package PGF Math Error: Unknown function `near' (in 'near ticklabel').          ! Package pgfkeys Error: I do not know the key '/tikz/legend pos' and I am going to ignore it. Perhaps you misspelled it.      I have tried finding an answer online but have not been successful. Any help would be much appreciated.


title: Use variable in domain of a plot in tikz

text: Consider the following example:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings}          \begin{document}     \begin{tikzpicture}        \foreach \t in {0,...,10} {          \pgfmathparse{8/10*\t};          \draw[color=red,domain=0:\pgfmathresult] plot (\x,{0.5*sin(2*pi*\t/10 r - 0.25*pi*\x r) - 2*\t});          }     \end{tikzpicture}     \end{document}      The point is, that I want use the variable `\pgfmathresult` in the domain of the plot. However it gives me `TeX capacity exceeded, sorry`. Any idea how to solve this?


title: Is there error in this code for a table?

text: I am trying to make a table using ScribTeX using the following code:               \documentclass[12pt,oneside,reqno]{amsart}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \makeatletter     \def\@setcopyright{}     \def\serieslogo@{}     \makeatother     \begin{document}     \begin{center}     \label{T1}      \begin{tabular}{|1|1|1|1|1|1|1|}                   \hline      $r/r_b$ & $\frac{8\pi G}{c^4}pr_b^2$ & $\frac{8\pi G}{c^2}\rho r_b^2$ & $\Big (    \frac{p}{\rho c^2} \Big )$ & $\frac{1}{c^2}\Big(\frac{dp}{d\rho}\Big)$ & $Z$ & $E\times r_b^2$ \\ \hline     0 & 0.095358 & 1.753927 & 0.054368 & 0.141513 & 0.502225 & 0 \\ \hline     0.1 & 0.093012 & 1.741188 & 0.053419 & 0.140512 & 0.499676 & 0.0000044\\      \hline     \end{tabular}     \end{center}     \end{document}      When I run the code it returns 7 errors, although the table is made perfectly. What is the cause of these harmless errors and how do I remove them. A second question I wish to ask is how do I give a title to the table?


title: Numbering sections

text: I want my sections, subsections and subsubsections in `revtex` to be marked by arabic numbers and 1.1., 1.1.1. etc. Instead I'm having roman numbers and letters. Can somebody help me?


title: Changing the color of itemize item in beamer

text: I would like to change the color of `itemize item` and `itemize subitem` (the bullet) throughout the presentation. I was wondering how I can do that. Here is my MWE:               \documentclass [11 pt, xcolor=pdftex,x11names,table]{beamer}      \usepackage{pgf, pgfpages}     \usepackage[latin1]{inputenc}      \usepackage[english]{babel}     \usepackage{beamerhighlight}     \usepackage{colortbl}     \usepackage{color}     \usepackage{pdfpages}     \usepackage[absolute,overlay]{textpos}     \usepackage{url}     \usepackage{graphicx}          \mode<presentation>     {         \usetheme{Madrid}         \usefonttheme{professionalfonts}          \setbeamertemplate{itemize item}{$\blacksquare$}         \setbeamertemplate{itemize subitem}{$\blacktriangleright$}     }     \usepackage{hyperref}     \begin{document}     \begin{frame}     \begin{itemize}         \item hey     \end{itemize}     \end{frame}     \end {document}


title: What is the advantage of using $f^\prime$ instead of $f'$?

text: Although the two outputs look quite similar, what is the advantage of using `$f^\prime$` instead of `$f'$`? By the way, here is my code:               \documentclass{article}     \begin{document}     \[ f^\prime (x)=y \]     \[ f' (x)=y \]     \end{document}


title: Help to plot a surface

text: I would like to plot the surface               $S=\{(x,y,z)\in\mathbb{R}^3\ z=xy\}$      for an exercise of affine geometry but I am a novice in graphics! Can I use GeoGebra? or TikZ or Asymptote?


title: Best way to remove page numbers from a TOC?

text: What is the best way to remove Page Numbers from a Multi-Page TOC without touching the `\pagestyle` or `\thispagestyle`? I've seen this post already, but I want to find out if there are more ways to solve this. Furthermore, if you have a collection of "pages", how do you easily nest these inside a block that does not include page numbers?


Please Help me to get rid of the following error:                   ("C:\Program Files\MiKTeX 2.9\tex\latex\mytheorem\demonstration.sty"     Package: demonstration                ! LaTeX Error: Command \openbox already defined.                    Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.13   \vrule\hfil}}      Giving by this code source:               \documentclass[12pt,a4paper]{book}         \usepackage{geometry}         \usepackage{lipsum}          \usepackage[calcwidth,raggedright,bf,sf]{titlesec}         \usepackage{blindtext}         \usepackage{slashbox}         \usepackage{tabularx}         \usepackage{fancyhdr}         \usepackage{fancybox}         \usepackage{turnstile}         \usepackage{bbding}         \usepackage{shadethm}         \usepackage{framed}         \usepackage[Lenny]{fncychap}         \geometry{left=-1cm, right=1cm, top=1.5cm, bottom=1.5cm}           \setlength{\shadeboxrule}{.4pt}         \setcounter{tocdepth}{3}         \def\mathbi#1{\textbf{\em #1}}         \newlength{\shadowbaseline}         \newcommand{\shadowbaselinebox}[1]{%           \leavevmode           \setlength{\shadowbaseline}                             {\fboxsep+\fboxrule+\heightof{#1}}%           \hbox{\vbox to \shadowbaseline{%                       \hbox{\protect\shadowbox{#1}}}}%         }         \setlength{\paperwidth}{21cm}         \setlength{\paperheight}{29.7cm}         \setlength{\evensidemargin}{0cm}         \setlength{\oddsidemargin}{0cm}         \setlength{\topmargin}{-2.5cm}         \setlength{\headsep}{0.7cm}         \setlength{\headheight}{1cm}         \setlength{\textheight}{25cm}         \setlength{\textwidth}{17cm}         \renewcommand{\theenumi}{\textbf{\arabic{enumi}}}         \renewcommand{\labelenumi}{\textbf{\theenumi.}}         \renewcommand{\theenumii}{\textbf{\alph{enumii}}}         \renewcommand{\labelenumii}{\textbf{\theenumii.}}         \everymath{\displaystyle\everymath{}}         \pagestyle{fancy}         \makeatletter         \renewcommand{\chaptermark}[1]{%            \markboth{%              \ifnum \c@secnumdepth >\m@ne                \if@mainmatter                  \@chapapp\nobreakspace                  \shadowbaselinebox{\thechapter}\nobreakspace                \fi              \fi            #1}{}}         \makeatother         \fancyhead{}         \fancyhead[RE]{ \scshape \leftmark}         \fancyhead[LO]{\scshape  \nouppercase \rightmark }         \fancyfoot{}         \fancyfoot[RE]{ \scshape  \textsc{ My institut}}          \fancyfoot[LO]{ \scshape \textsc{Title} }         \fancyfoot[LE,RO]{\shadowbaselinebox{\thepage}}         \renewcommand{\headrulewidth}{0.5pt}         \renewcommand{\footrulewidth}{0.5pt}         \begin{document}         \chapter{one}         \limpsum         \chapter{Two}         \lipsum         \end{document}


title: How to embed special markers into the code listing that will mark certain parts of code to be colored using a custom scheme?

text: I would like to color my C# code listings as Visual Studio does. However, all language definitions that I found so far only color the keywords and not the user types. I understand that it requires parsing the code and may not be supported by the listings package, therefore I am ready to specify the color of each word myself. E.g. something like this:               \definecolor{usertype}{rgb}{0.17,0.57,0.68}     \begin{lstlisting}[language=C#]     public interface {\color{usertype}IEntity}     {       {\color{usertype}Guid} Guid { get; }       {\color{usertype}ICollection}<{\color{usertype}IComponent}> Components { get; }       {\color{usertype}IComponent} this[string componentName] { get; }       event {\color{usertype}EventHandler}<{\color{usertype}ComponentEventArgs}> CreatedComponent;       event {\color{usertype}EventHandler}<{\color{usertype}ChangedAttributeEventArgs}> ChangedAttribute;     }     \end{lstlisting}      Note that some entries such as `Guid` are used both as a type and as an identifier. Unfortunately, this doesn't work as entries like `{\color{usertype}...}` are literally written into the output. How can I specify the color of individual words or code pieces in a listing? Or is there a better package than `lstlisting` for this? **UPDATE:** I have tried using `\texttt`, but it ignores the spaces in the beginning of the line, requires `\\\` at the end of each line to force a line break and characters such as `{` and `}` must be escaped as `\\{` and `\\}`. Even better would be if I could mark certain words as belonging to a specific class via some special symbol, e.g. like this:               \begin{lstlisting}[language=C#]     public interface @IEntity     {       @Guid Guid { get; }       @ICollection<@IComponent> Components { get; }       @IComponent this[string componentName] { get; }       event @EventHandler<@ComponentEventArgs> CreatedComponent;       event @EventHandler<@ChangedAttributeEventArgs> ChangedAttribute;     }     \end{lstlisting}      **UPDATE 2:** Tried using `minted` package. It parses the code and thus is able to highlight it better, but still doesn't highlight the user types.


title: Where are all these errors coming from?

text: With the following document, I get a lot of errors around line 38. I can't tell where these come from, but the resulting output looks fine. For the sake of good practice, what am I doing wrong here?               \documentclass{beamer}     \renewcommand\arraystretch{1.2}     \usepackage{beamerthemesplit}          \title{Why Duodecimal is Better than Decimal\\     (Yes, really.)}     \author{Alex Stubbins}     \date{\today}          \begin{document}          \frame{\titlepage}          \section{Introduction}     \subsection{}     \frame{     \frametitle{What is duodecimal?}     Duodecimal, less commonly referred to as dozenal, is a number system that has a base of twelve, whereas our standard number system, decimal, has a base of twelve.     }     \frame     {     \frametitle{Fractions}\begin{table}     \begin{tabular}{|c|c|c|}         \hline         Fraction       & Base-12                                 & Base-10             \\ \hline         $\frac{1}{2}$  & 0.6                                     & 0.5                 \\ \hline         $\frac{1}{3}$  & 0.4                                     & 0.\overline{33}     \\ \hline         $\frac{1}{4}$  & 0.3                                     & 0.25                \\ \hline         $\frac{1}{5}$  & 0.\overline{24972497}~or~$\approx$~0.25 & 0.2                 \\ \hline         $\frac{1}{6}$  & 0.2                                     & 0.1                 \\ \hline         $\frac{1}{7}$  & 0.\overline{186A35}                     & 0.\overline{142857} \\ \hline         $\frac{1}{8}$  & 0.16                                    & 0.125               \\ \hline         $\frac{1}{9}$  & 0.14                                    & 0.\overline{1}      \\ \hline         $\frac{1}{10}$ & 0.\overline{12497}                      & 0.1                 \\         \hline     \end{tabular}     \end{table}     }     \end{document}      The resulting errors are: Log can be seen here


title: Use column header as labels for x ticks

text: With `pgfplots`, it is possible to let the `xticklabels` be given by one column of a table. However, is it possible to import it from the table header ? In my concrete case, I have a table with two columns "speed" and "velocity". Ideally, they should be read from the table headers instead of writing it explicitely like `yticklabels={speed,distance}`. ![enter image description here](http://i.stack.imgur.com/f3GA8.jpg)               \documentclass{article}     \usepackage{pgfplots,filecontents}     \pgfplotsset{compat=1.9}     \usepgfplotslibrary{statistics}          \begin{filecontents}{test.dat}     speed distance     1 3     20 10     2 3     3 4     5 6     \end{filecontents}               \begin{document}          \begin{tikzpicture}     \begin{axis}[ytick={1,2},yticklabels={speed,distance}]     \pgfplotstablegetcolsof{test.dat}\pgfmathsetmacro\numberofycols{\pgfplotsretval-1}     \pgfplotsinvokeforeach {0,...,\numberofycols}{     \addplot+[boxplot] table[y index=#1] {test.dat};     }     \end{axis}     \end{tikzpicture}     \end{document}


title: How to Add 7 Authors' Name?

text: Hi I have a two columns table with ACM SIG Proceedings template http://www.acm.org/sigs/publications/proceedings-templates Here is my code for six authors, my problem is I have a 7-th author, I am not sure how to add it nicely, is it possible to squeeze the second rows(maybe smaller font size) to allow 4 authors?               \documentclass[9pt]{sig-alternate}          \begin{document}     \title{Paper title}               \numberofauthors{6}          \author{          % 1st. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     % 2nd. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     % 3rd. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     \and  % use '\and' if you need 'another row' of author names     % 4th. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     % 5th. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     % 6th. author     \alignauthor     Author Name\\            \affaddr{This is Author School Name}\\            \email{AuthorEmail@gmail.com}     }               \maketitle               \end{document}       ![enter image description here](http://i.stack.imgur.com/OycPr.png)


title: operators within the dollar sign

text: I am using operators : `+`,`-`. For example, `$6-1$`. The operator `-` becomes rather large between `$ $`. Normally, would you leave the operator negative between the `$$`? If not, how do you make it to the normal size ?


title: How do I use commands within tabular definition?

text: Using commands within tabular definition result in error `! Missing $ inserted`. In this case, it is the `\,` that causes problems when calling the custom command. Same commands work fine outside tabular definition, so how do I use commands in the parameter? MWE:               \documentclass{article}          \usepackage{calc}     \usepackage{array}          \newcommand{\comtest}[1]{     \begin{tabular}{p{\widthof{#1}}}     #1     \end{tabular}     }          \begin{document}          \setlength\fboxsep{0pt}     \setlength\fboxrule{0.5pt}          \fbox{\comtest{Text\,}}          \end{document}      **EDIT** : I need to use the width measurement for the paragraph width within the tabular so I can specify to vertically center multiple cells. Below is a less-contrived example. Padding modifiers removed for brevity.               \documentclass{article}          \usepackage{calc}     \usepackage{array}          %produces an image and following text vertically centered     % [image command, image width, text]     \newcommand{\vcenteredimagetext}[3]{{     \begin{tabular}{@{}>{\centering}m{#2}@{}@{\ }>{\centering\arraybackslash}m{\widthof{#3}}@{}}     #1&#3\\     \end{tabular}     }}          \begin{document}          \vcenteredimagetext{\rule{0.5in}{0.5in}}{0.5in}{\bf{Text}}     \bf{Text}          \end{document}      **EDIT #2** : Decided to go with `\raisebox` option here instead of pursuing fixes to this method further.


title: How to allow blank spaces between arguments of a macro

text: For example, I would to write `\defpoint [option] (1,2) {A}` instead of `\defpoint[option](1,2){A}`. What is the best way to build this kind of macro? Only the argument [...] is optional and if spaces are allowed between between arguments, spaces are not required (obligatory ?). And if the user made a syntax error, It might be interesting to note it, how do here?


title: Problem with fit a table in beamer

text: I try to use \resizebox to fit table in slide, but I reach some error. Please help me fix this problem.               \documentclass{beamer}     \usepackage{graphicx}     \usepackage[labelsep=quad,indention=10pt]{subfig}     \usepackage{tikz}     \usetikzlibrary{matrix,chains,positioning,decorations.pathreplacing,arrows,calc,}     \usetikzlibrary{decorations.markings}     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{array}% http://ctan.org/pkg/array     \usepackage{amsmath,amsthm,relsize}     \usepackage{adjustbox}     \def \symstalinear{      $f(x) =      \begin{cases}         -1,                 & \quad \hfill x<-1.\\         \phantom{-}x,       & \quad \hfill -1 \leq x \leq1\\         \phantom{-}1,       & \quad \hfill x>1     \end{cases}$     }     \def \hardlimit{     $f(x) = \begin{cases}       0 &\quad \hfill x<0\\       1 &\quad \hfill x \geq 0\\     \end{cases}     $     }     \begin{document}     \frame{      \resizebox{width=\textwidth}{height=\textheight}{     \begin{table}[h!]         \begin{center}             \begin{tabular}{ l >{$}c<{$} >{$}c<{$}}             \toprule             \textbf{Function} & \multicolumn{1}{c}{\textbf{Definition}}  & \multicolumn{1}{c}{\textbf{Range}} \\             \midrule             Linear & f(x)=x & (-\infty,\infty) \\[2ex]             Log-sigmoid & \dfrac{1}{1+e^{-x}}&(0,1)\\[3ex]             Hyperbolic Tangent Sigmoid & \dfrac{e^x-e^{-x}}{e^x+e^{-x}}&(-1,1)\\[3ex]             Symmetric Saturating Linear & $\symstalinear$ & [-1,1] \\[3ex]             Hard limit & $\hardlimit$ &[0,1]\\             \bottomrule             \end{tabular}              \end{center}     \caption{Definitons of activation function}     \label{tbl:def of act func}     \end{table}%     }     }     \end{document}


title: Changing enumeration of divisions to roman numbers

text: Please consider the following **MWE**. By default some lists (list of figures, list of tables) are numbered with arabic numbers in `scrbook` and some not (bibliography, index). How can I make LaTeX to use for these lists roman numbers instead of arabic numbers and arabic numbering only for the divisions `chapter`, `section` etc. **Example** I List of figures II List of tables 1.Chapter 1.1 Section 2.Chapter 2.1 Section III Bibliography IV Index **EIDT** I know that for the numbering of pages you can switch from `\pagenumbering{roman}` to `\pagenumbering{arabic}`. Maybe there is a similar approach to my problem. **MWE**               \documentclass[liststotocnumbered]{scrbook}          \usepackage{graphicx}     \usepackage{booktabs}     \usepackage{makeidx}     \makeindex          \begin{document}          \tableofcontents     \listoffigures     \listoftables          \chapter{First chapter}          \section{Section}              \begin{figure}[htbp]            \centering            \includegraphics{example.png}             \caption{example caption}            \label{fig:example1}         \end{figure}         \index{Figure!Example1}          \subsection{Subsection}              \begin{table}[htbp]            \centering            \begin{tabular}{@{} lcr @{}}                \toprule               \multicolumn{2}{c}{Item} \\               \cmidrule(r){1-2}                Animal    & Description & Price (\$)\\               \midrule               Gnat      & per gram & 13.65 \\                         & each     &  0.01 \\               Gnu       & stuffed  & 92.50 \\               Emu       & stuffed  & 33.33 \\               Armadillo & frozen   &  8.99 \\               \bottomrule            \end{tabular}            \caption{Tab. 1}            \label{tab:booktabs1}         \end{table}         \index{Table!Example1}          \chapter{Second chapter}     \section{Section}              \begin{figure}[htbp]            \centering            \includegraphics{example.png}             \caption{example caption}            \label{fig:example2}         \end{figure}         \index{Figure!Example2}          \subsection{Subsection}              \begin{table}[htbp]            \centering            \begin{tabular}{@{} lcr @{}}                \toprule               \multicolumn{2}{c}{Item} \\               \cmidrule(r){1-2}                Animal    & Description & Price (\$)\\               \midrule               Gnat      & per gram & 13.65 \\                         & each     &  0.01 \\               Gnu       & stuffed  & 92.50 \\               Emu       & stuffed  & 33.33 \\               Armadillo & frozen   &  8.99 \\               \bottomrule            \end{tabular}            \caption{Tab. 2}            \label{tab:booktabs2}         \end{table}         \index{Table!Example2}          \addcontentsline{toc}{chapter}{Bibliography}     \bibliography{BibliographyFile}          \renewcommand{\indexname}{Index}     \addcontentsline{toc}{chapter}{Index}     \printindex          \end{document}


title: Abstracting an author list

text: I am writing an academic paper and have no problem manually formatting an author list like               \startnarrower[middle]       \startalignment[middle]         Author One\thanks{email_one@gmail.com},         Author Two\thanks{email_two@gmail.com},         Author Three\thanks{email_three@gmail.com}       \stopalignment     \stopnarrow      Of course, this is somewhat unsavory. It would be nice to abstract this structure to something like:               \author{Author One}{email_one@gmail.com}     \author{Author Two}{email_two@gmail.com}     \author{Author Three}{email_three@gmail.com}          \placeauthorlist      However, I have no idea how to implement such a structure. I've google and looked all over the ConTeXt wiki and cannot find much on it. Anyone know of some resources that might be of use or of a similar implementation? **Edit:** I worked out a solutions that does what I need it to. I'm not sure how idiomatic it is and, seeing as how I have never written module code, have no idea if it is truly "correct", but it does produce the desired output. If you can improve it in any way, please feel free to and I'll give you the answer.


title: Alignment inside minipage with flushright

text: Please help me to figure out how to produce with that: I have the following code:               \begin{flushright}     \begin{minipage}{0.5\textwidth}              {\bfseries Допущен к защите: }\hrulefill \\         {\bfseries Заведующий кафедрой: }\\             Должность, что-то еще.\\             Дата.\\         {\bfseries Выполнил: }Студент группы 85-07\\             Калашников М. А.\\             Подпись.\\         {\bfseries Научный руководитель: }\\             Кандидат физико-математических наук, Чирков А. Ю.\\             Подпись.\\          \end{minipage}     \end{flushright}       This is what I need: ![First requirement](http://i.stack.imgur.com/7ZnTJ.jpg) I just want to add some spaces in certain strokes. I have tried to use `\hfill`, `\indent` and some other approaches but it seems they don't work inside `minipage`. There should be some easy way to do it (I've spent more 3 hours without results). Update: step2. ![Second requirement](http://i.imgur.com/EQGozfZ.jpg) Please take a look also at this one. How do I align some text blocks to the right? I believe there also should be introduced a `\newcommand`, but I'm still in the process of figuring out...


title: Biblatex-apa style is missing a comma in the references. why?

text: I have been trying to solve this problems for hours, but there is no solution in sight. Until a few weeks ago, my `biblatex-apa` style was working like a charm. Although, after installing the updates and Biber, the reference section became a problem. It should display a journal article by two authors with a comma after the first author, but it doesn't: > Weber, M. & Ruch, W. (2012). The role of character strengths in adolescent > romantic relationships: An initial study on partner selection and mates’ > life satisfaction. Journal of adolescence, 35(6), 1537–1546. > doi:10.1016/j.adolescence.2012.06.002 it should look like this: > Weber, M., & Ruch, W. (2012). The role of character strengths in adolescent > romantic relationships: An initial study on partner selection and mates’ > life satisfaction. Journal of adolescence, 35(6), 1537–1546. > doi:10.1016/j.adolescence.2012.06.002 This is how my document looks like:               \documentclass[12pt, onecolumn]{apa6}               \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style= apa, backend=biber]{biblatex}     \bibliography{testbib}     \DeclareLanguageMapping{american}{american-apa}               \begin{document}          Some text \parencite{Weber2012}.          \printbibliography     \end{document}      And the BibTeX file:               @article{Weber2012,     abstract = {},     author = {Weber, M. and Ruch, W.},     doi = {10.1016/j.adolescence.2012.06.002},     file = {},     issn = {1095-9254},     journal = {Journal of adolescence},     number = {6},     pages = {1537--1546},     pmid = {22749517},     publisher = {Elsevier Ltd},     title = {{The role of character strengths in adolescent romantic relationships: An initial        study on partner selection and mates' life satisfaction.}},     url = {http://www.ncbi.nlm.nih.gov/pubmed/22749517},     volume = {35},     year = {2012}     }       I have tried various things so far, but none of it helped: e.g,               \renewcommand*{\finalnamedelim}{     \finalandcomma}      or               \renewcommand\finalandcomma{\addcomma}      Even in the `biblatex` manual, the reference examples of two authors is without the comma (it works for three or more authors). There should be a comma, according to APA6. Why is that comma not there? And how could I insert that into my references?


title: debugging authorindex

text: I have two books for which I want to create an author index using `authorindex`. Creating the index works for my book but not for the book somebody else has written. This is what I get as an error message:               authorindex -p -i test.aux     This is BibTeX, Version 0.99d (TeX Live 2013)     The top-level auxiliary file: _autidx_.aux     The style file: _autidx_.bst     I found no \citation commands---while reading file _autidx_.aux     Database file #1: biblio.bib     (There was 1 error message)     BibTeX error. Aborting leaving all temporary files _autidx_.*      I do not know what to do. How can I debug this? What may be the problem? _Edit_ : OK. It is a problem with `babel`. If the loading of `babel`is commented it, `authorindex` complains. Otherwise it works nicely.               \documentclass{book}                                         \usepackage{natbib}     \usepackage{authorindex}          %\usepackage[british,italian]{babel}                % hyphenation               \begin{document}                     \citep{test}          \bibliography{test}     \bibliographystyle{plain}           \end{document}


title: Biblatex 2.9 is broken with Babel 3.9k under MiKTeX

text: I was unable to find babel bugtracker, so I'll post here in the search of help. Babel 3.9k seems to be broken under MiKTeX. Here is the part of the log file:               ("C:/Program Files/MiKTeX/tex/latex/babel-french/frenchb.ldf")     ("C:/Program Files/MiKTeX/tex/latex/babel-german/german.ldf"     ("C:/Program Files/MiKTeX/tex/latex/babel-german/germanb.ldf"     ! Conflicting pattern ignored.     \bbl@ev@luatex@patterns ...}', '\the \language ')}                                                       \fi \fi     l.183 \ldf@finish\CurrentOption          ?      And here is the MWE:               \documentclass[10pt,a4paper]{article}          \RequirePackage{filecontents}     \RequirePackage[utf8]{inputenc}     \RequirePackage[T1,T2A]{fontenc}     \RequirePackage{hyperref}          \RequirePackage[czech,danish,english,french,german,italian,polish,portuguese,spanish,russian]{babel}     \RequirePackage[bibencoding=utf-8,backend=biber]{biblatex}          \begin{filecontents}{\jobname.bib}     @book(         book,         author = {Joe First | Bob Third},         title = {Book title},         langid = {english},         year = 2013,         url = {http://www.example.com}     )     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     \nocite{*}     \printbibliography     \end{document}      It doesn't matter if I use pdflatex or lualatex. Here is a question on biblatex bugtracker: https://github.com/plk/biblatex/issues/246


title: How to remove the lines of the first top-left cell?

text: How to remove the lines of the first top-left empty cell, please?               \documentclass[french]{beamer}     \usepackage{babel}     \usepackage{adjustbox}     \usepackage{array}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \begin{document}             \begingroup     \defbeamertemplate{enumerate item}{image}{\small\includegraphics[height=1.8ex]{images/gofor}}     \makeatletter     \def\@listii{\leftmargin\leftmarginii                   \topsep    2ex                   \parsep    0\p@   \@plus\p@                   \itemsep   \parsep}     \makeatother     \begin{frame}{Conclusion}     \begin{table}     \centering     \caption{Comparatif entre ATL et MFC}     \vspace{0.4cm}     \begin{tabular}{       | C{0.07\textwidth}       *{3}{|C{\dimexpr0.22\textwidth-2\tabcolsep\relax}}       ||C{\dimexpr0.22\textwidth-2\tabcolsep\relax} |       }     \hline     & {\fontsize{9}{9}\selectfont Gestion avancée des threads} & {\fontsize{9}{9}\selectfont Gestion de la mémoire} & {\fontsize{9}{9}\selectfont Vitesse d'exécution} & {\fontsize{9}{9}\selectfont Difficulté} \\     \hline     MFC & \adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}} & \adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}} & \adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}} & \textcolor{green}{F}\\     \hline     ATL & \adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}} &\adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}\includegraphics[height=1.8ex]{example-image-a}} & \adjustbox{valign=c}{\includegraphics[height=1.8ex]{example-image-a}\includegraphics[height=1.8ex]{example-image-a}\includegraphics[height=1.8ex]{example-image-a}} & \textcolor{red}{D} \\     \hline     \end{tabular}     \end{table}     \end{frame}     \endgroup     \end{document}      Thanks a lot!


title: TikZ, arrow, looking for ++++++> style

text: I'm wondering if it's possible to draw, by `\tikzstyle`, this style of arrow : `+++++>`. Thanks, Simon


title: How can I refer to the page number corresponding to \lastdocpage - 2?

text: Follow-up question to Hiding watermark for first page?. I have recently learned about `\lastdocpage` (from the previous question), but is there a way to refer to two pages _prior_ to `\lastdocpage`? To understand the context, the watermark from the previous question should last from pages 2 to _two pages_ prior to the end of the document. MWE:               \documentclass[12pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{tikz}     \usepackage[version=3]{mhchem}     \usepackage [english]{babel}     \usepackage[printwatermark]{xwatermark}     \newwatermark*[pages=2-\lastdocpage,color=gray,angle=0,scale=1,xpos=46,ypos=-134]{\footnotesize Copyright \textcopyright\:2014 by some company.}     \begin{document}     Stuff     \newpage      More stuff     \end{document}      In this MWE, the watermark is on pages 2 to `\lastdocpage`. I have tried `\pages=2-{\lastdocpage-2}`but this did not work.


title: How to center the pictures to the same baseline on beamer titlepage?

text: ![The left picture is a bit lower than the right](http://i.stack.imgur.com/rTEpX.png) Here is part of the code i used,               \titlegraphic{         \includegraphics[width=2cm]{NCSE}          \hfill%         \includegraphics[width=2cm]{KENT-Blue}     }      I dont know the exact name on how to refer to this problem. But if you look at the picture, the NCSE logo is a bit lower than the Kent logo. Is that possible to adjust it? Thanks!


title: How to put a figure inside a minipage when using memoir?

text: I need to put a figure inside a minipage, like so:               \documentclass{memoir}          \begin{document}     \begin{minipage}{10cm}       \begin{figure}         blabla         \caption{test}       \end{figure}     \end{minipage}     \end{document}      However, LaTeX doesn't like that since it is no longer in outer par mode, so it crashes and burns. I then tried the solution provided here, but that doesn't work either since the `float` package doesn't play nicely with `memoir`. Is there a way of working around this?


title: Use textit in listing

text: How can I use `\textit` in a listing?               \documentclass[a4paper]{article}          \begin{document}          \begin{lstlisting}[label=test]     Some code.     \textit{This should be italic.}     Some code.     \end{lstlisting}          \end{document}


title: Setting over- and underbraces outside an matrix formula

text: I want to typeset a matrix which consists of several submatrices. As they consist of some longer formulae I'd like to assign each a name. I tried to use `\underbace` and `\overbrace`. However now the braces and the letter appears inside the matrix and I'd like to have it above or below the matrix. What would you suggest here?               \documentclass{article}     \usepackage{amsmath}     \usepackage{xfrac}     \begin{document}     \begin{gather*}     H_{8kl}=     \begin{pmatrix}         \overbrace{\sfrac{1}{2} (A+B)\otimes E + \sfrac{1}{2} (A-B)\otimes G}^{K} &         \overbrace{\sfrac{1}{2} (A+B)\otimes F + \sfrac{1}{2} (A-B)\otimes H}^{L}\\         \underbrace{\sfrac{1}{2} (C+D)\otimes E + \sfrac{1}{2} (C-D)\otimes G}_{M} &         \underbrace{\sfrac{1}{2} (C+D)\otimes F + \sfrac{1}{2} (C-D)\otimes H}_{M}       \end{pmatrix}     \end{gather*}     \end{document}


title: Getting the first digit of a number within a variable

text: I have a custom macro like this that stores data:               \somecommand{some text}{234}      Inside the `newcommand` for this, I can access the second column of data using `#2`.   * How can I obtain the first digit of that number? For e.g.: `\somecommand{some text}{3012}` gives `3` `\somecommand{some text}{21231}` gives `2` `\somecommand{some text}{9}` gives `9`


title: Typesetting ST-traces in LaTeX

text: An ST-trace is a string with additional back-reference arc or arrows which may cross. An example may be seen at page 13 of http://kilby.stanford.edu/~rvg/pub/STbisimulation.pdf So, basically, this is a string like $a^+b^+c^+a^-b^-$, but with an arc or arrow, under or over, from the $a^-$ back to the $a^+$ and from the $b^-$ back to the $b^+$. How on earth can I typeset this in LaTeX?


title: Using xstring macros in edef

text: I've tried to use `\protect` to make the following `\edef` work but no luck. Can it be done somehow?               \documentclass{article}          \usepackage{xstring}          \begin{document}          \def\abc{a,b,c}     \edef\result{\StrSubstitute[2]{\abc}{,}{ }}          \result          \end{document}      NOTE: I know I can do the same using `etoolbox` or `xpatch` (and I already did that), but became curious about the problem above.


title: How to typeset Cyrillic characters with the XeLaTeX engine?

text: The Cyrillic characters in pdf are not appear if using the XeLaTeX (from Why does \usepackage[T2A]{fontenc} take over?):               \documentclass{article}     \usepackage[T2A,T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage[russian,english]{babel}          \renewcommand{\familydefault}{\sfdefault}               \begin{document}          \renewcommand{\sfdefault}{PTSans-TLF}\normalfont     \section{PTSans}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}               \renewcommand{\sfdefault}{fds}\normalfont     \section{Droid}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}               \renewcommand{\sfdefault}{fco}\normalfont     \section{Comforta}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}               \renewcommand{\sfdefault}{fca}\normalfont     \section{Cantarell}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}               \renewcommand{\sfdefault}{iwona}\normalfont     \section{Iwona}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}               \renewcommand{\sfdefault}{fos}\normalfont     \section{OpenSans}          Todd is a cat. \textcyrillic{у меня есть машина. я очень харашо.}          \end{document}      **-------EDIT--------** I need to get these aims:   1. XeLaTeX engine   2. use the condensed iwona fonts in mathematics environment   3. use the condensed iwona fonts for main text (including both Latin and Cyrillic letters)   4. use the `txtt` fonts typesetting URL   5. use the `txtt` fonts instead default `ttfamily` Here is my code:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[no-math]{fontspec}     \renewcommand*\ttdefault{txtt}          \usepackage[T1]{fontenc}     \usepackage[condensed,math]{iwona}          \usepackage[russian,english]{babel}          \usepackage{url}          \begin{document}     \url{http://google.com}\\     \texttt{TXTT-FONTS}\\     \textcyrillic{Ломоно́сов}\\     $\sin^2 x+1$\\     today\\     \end{document}      Maybe I'm missing something, so I'd be happy to be pushed in the right direction.


title: Redefining ToC, LoF, and LoT

text: Before I was generating ToC, LoF, and LoT using the following:               \newpage     \tableofcontents          \newpage     \listoffigures     \phantomsection     \addcontentsline{toc}{section}{\listfigurename}          \newpage     \listoftables     \phantomsection     \addcontentsline{toc}{section}{\listtablename}      Now I am trying to writing a class file, I want to make them "automatically" begin with a new page as well as adding LoF and LoT to ToC when:               \tableofcontents     \listoffigures     \listoftables      are called. I am trying to "redefining" above 3 commands using the original commands but without fortune it doesn't work (there's no new page, and LoF and LoT will not be added to ToC):               \let\oldtableofcontents\tableofcontents     \def\tableofcontents{         \newpage         \oldtableofcontents     }          \let\oldlistoffigures\listoffigures     \def\listoffigures{         \newpage         \oldlistoffigures         \phantomsection         \addcontentsline{toc}{section}{\listfigurename}     }          \let\oldlistoftables\listoftables     \def\listoftables{         \newpage         \oldlistoftables         \phantomsection         \addcontentsline{toc}{section}{\listtablename}     }      I will be appreciated if someone can tell me if there is anything wrong on my approach (I did some same stuff to \appendix and it works properly) Thanks, Golson


title: Figure in columns in itemize

text: I`m trying to make an itemized list, where only one of the items has an image to the right. I tried this               \documentclass{beamer}     \usetheme{Dresden}     \begin{document}     \begin{frame}{Problem}       \begin{itemize}          \item           \begin{columns}             \column{.7\linewidth}             Here I want some text with an image to the right, all in the same item             \column{.3\linewidth}             \rule{.2\linewidth}{.2\linewidth}          \end{columns}          \item Some more text here that is long enough to continue bellow the image      \end{itemize}     \end{frame}     \end{document}      But this is what I get instead ![columns not inside item](http://i.stack.imgur.com/lahOS.png)


title: How to change \ref output?

text: I am writing my Greek PhD thesis in latex (using babel). FYI, by default _Τable_ in Greece is called: _Πίνακας_. So, for example, when I make a table using the `table` environment, `babel` automatically translates the word _Table_ as _Πίνακας 1. blabla_. Hence when I use `\ref{tab:label}` to crossreference to this table, the output of this command is " **Πίνακας 1. blabla** ", as you would expect. However, because of the Greek language's particularity which has many ways to call nouns, I would therefore like to change the output of the `\ref{tab:label}` to " **Πίνακα 1. blabla** " (please note that the difference is the missing **ς** at the end of the tablename). How could I do this? Please have in mind that I want to change only the way the tablename is referenced in the text after calling the `\ref` command and not the name that appears in the caption (which is correctly transformed by babel as Πίνακας)


title: Axis part coloring

text: I try/want to color the x-axes in a special way. I want to get the bottom x-axis red, but not the whole line. Only the 3 parts under the graph have to be colored. I tried it with options               separate axis lines,     every outer x axis line/.append style={-stealth,red},      but both x-axes completely get red. Is there a possibility to get what I want? ![enter image description here](http://i.stack.imgur.com/HBol1.png)               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{arrows,automata,backgrounds,fit,shapes,decorations.pathreplacing}     \usepackage{pgfplots}               \begin{document}          \centering     \begin{tikzpicture}     \begin{axis}[xlabel style={align=right},xlabel=Output (MW),     ylabel=Input (\$/h),unbounded coords=jump, xtick={0,1,2,3,4,5,6,7,8,9},  xticklabel style={anchor=base,yshift=-\baselineskip},ytick=\empty,xtick=\empty,extra x ticks={0,2,4,6,8,9},extra x tick labels={,$P_{pz}^-$,$P_{pz}^+$,,,}]     \addplot+[black,smooth,no markers] coordinates {     (0,0) (1,1) (2,4) (3,inf)     (4,16) (5,25) (6,36) (7,inf) (8,64) (9,81)     };     \end{axis}     \end{tikzpicture}          \end{document}


title: y label is stuck on the right side of the graph

text: I try to get y label on the right side of the figure, but the label is still stuck on the left side. Below is an example borrowed from another user here. It must be something very simple, but just I couldn't figure what it is. What am I doing wrong? Thank you               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[ylabel=Left label]     \addplot coordinates {(0,1) (1,1)};     \end{axis}     \begin{axis}[ticks=none,ytick pos=right,ylabel=Right label]     \addplot coordinates {(0,1) (1,1)};     \end{axis}     \end{tikzpicture}          \end{document}


title: Change figure as I keep adding text in Beamer

text: In Beamer, I would like to post a figure, then add some text using `\itemize`, and change the figure inbetween items **without** moving the already posted text. Here is roughly what I want: All on the same slide:               \documentclass{beamer}     \usepackage{graphicx}          \begin{document}          \begin{frame}     \includegraphics[width=\textwidth]{test1}     \pause     \begin{itemize}     \item     Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1     \pause     %%Change the original figure to "test2" without moving any already written text.     \pause     \item     Text 2 Text 2 Text 2 Text 2 Text 2 Text 2 Text 2 Text 2 Text 2 Text 2     \pause     %%Change figure again to "test3" again without moving any text.     \end{itemize}     \end{frame}          \end{document}


title: Problem with installing Font in MacTex 2013

text: I can't install my fonts in MacTex 2013; it wasn't a problem when I used MacTex 2012. I always did the following:   1. I copied my font-tree with the `.map` files and anything else in `/usr/local/texlive/texmf-local/`   2. Typed `sudo -H mktexlsr`   3. Activated the fonts with `sudo –H updmap-sys --enable Map=xxx.map`   4. Typed `sudo -H mktexlsr` Like O said, this worked for me the whole time until MacTex 2013. Now I get the error > pdfTeX error: /usr/texbin/pdflatex (file 5fpr8t): Font 5fpr8t at 570 not > found" Do you have any ideas how to fix the problem or whats the reason for the problem?


title: Use of environ package with knitr

text: I'm working on a knitr document and trying to place knitr output inside of a new environment defined using the `environ` package. The example below illustrates the problem. With a traditional LaTeX environment definition, the resulting LaTeX output is as expected and the document compiles with no problems. (I want to use `environ` for other reasons.) But using the `environ` package, the resulting LaTeX is identical (except for the relevant lines indicated below) but the document won't compile, throwing multiple errors.               \documentclass{article}          % This works     \newenvironment{newenv}{}{}          % This doesn't     \usepackage{environ}     \NewEnviron{newenv}{\BODY}{}          \begin{document}          \begin{newenv}     <<test>>=     l <- list(a=1)     print(l$a)     @      \end{newenv}     \end{document}      The situation is similar to that described in this earlier question but in this case, the inner environment is actually four nested knitr environments. To my reading, this means that both of the solutions offered on that question (the accepted one and the `newenviron` package) are probably impossible here or at least very ugly. Any suggestions?


title: sidewaysfigure and landscape

text: I have some figures which I wish to display in landscape, with rotated captions. I can achieve this fine using the `sidewaysfigure` environment from the `rotating` package. I want to also ensure that the PDF document automatically displays in the right orientation for the reader.I can achieve this using the `landscape` environment from the `pdflscape` package. I can't however seem to combine both of these for the effect I want. If I try encapsulating the `sidewaysfigure` in the `landscape` environment I get my graphic rotated 180 degrees (the page does display in the right orientation on screen however).               \afterpage{\begin{landscape}     \begin{sidewaysfigure}         \centering         \includegraphics{image}         \caption{caption}         \label{fig:label}     \end{sidewaysfigure}     \end{landscape}}      Doesn't work - figure displays incorrectly.               \begin{sidewaysfigure}         \centering         \includegraphics{image}         \caption{caption}         \label{fig:label}     \end{sidewaysfigure}      Figure displays correctly, but PDF document doesn't recognise that this page is landscape so displays automatically in portrait when viewed on-screen.


title: Flush equations left with breqn

text: I am using the `breqn` package to automatically break equations, like this:                 \begin{dmath}        a = b + c + d + e + f + g + h +i + j + k + l + m + n + p + q       \end{dmath}      I would like to have all my equations flushed to the left. However, the option `fleqn` used as follows:                \documentclass[fleqn]{article}      does not seem to achieve this (flushing equations to the left) for the `breqn` provided environments like `dmath` (though it works with `equation`). Is there any way to automatically flush all equations to the left while using `breqn` environments? MWEs:               \documentclass[fleqn]{article}     \usepackage{amsmath, breqn}     \begin{document}     \noindent Test is there.     \begin{equation*}        a = b + c + d + e + f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+      f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f      \end{equation*}     \noindent Test is here.     \end{document}      The above flushes the equation to the left, but the following does not flush left.               \documentclass[fleqn]{article}     \usepackage{amsmath, breqn}     \begin{document}     \noindent Test is there.     \begin{dmath*}        a = b + c + d + e + f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+      f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f+ f      \end{dmath*}     \noindent Test is here.     \end{document}


title: How to draw arrow between two text lines?

text: I want to draw this figure. Is it possible ?   ![enter image description here](http://i.stack.imgur.com/X9UpZ.png) I have written the following code to draw that figure :                   \documentclass[11pt,twoside,a4paper]{book}          \usepackage{xypic,wrapfig}     \begin{document}               \xymatrix{       \verb|\begin{wrapfigure}|[12]{r}[34pt]{5cm} &  <figure> &  \verb|\end{wrapfigure}|\\                & [<Number of narrow lines>]{<placement>}[<overhang>]{<width>}&     }          \end{document}      But failed! * * * @Gonzalo Medina's answer which I have compiled it.               \documentclass{article}     \usepackage{tikz}          \newcommand\tikzmark[1]{%       \tikz[remember picture,overlay]\node[inner ysep=4pt] (#1) {};}          \def\n#1{{\normalfont\ttfamily\small#1}}     \def\cs#1{{\normalfont\ttfamily\small\char`\\#1}}     \def\all{{\normalfont\ttfamily\small\char`\{}}     \def\cll{{\normalfont\ttfamily\small\char`\}}}     \def\aop#1{{\normalfont\ttfamily\small\char`\[#1\char`\]}}     \def\aob#1{{\normalfont\ttfamily\small\char`\{#1\char`\}}}     \def\gr#1{{\normalfont\ttfamily\small<\,#1\,>}}     \def\env#1{\all\n{#1}\cll}          \begin{document}          \hfill\cs{begin}\env{wrapfigure}\aop{\tikzmark{nla}12}%     \aob{\tikzmark{pla}r}\aop{\tikzmark{ova}34pt}\aob{\tikzmark{wia}5cm} %     \gr{figure} \cs{end}\env{wrapfigure}          \vskip20pt          \noindent\aop{\gr{number of \tikzmark{nlb}narrow lines}}%     \aob{\gr{\tikzmark{plb}placement}}\aop{\gr{\tikzmark{ovb}overhang}}%     \aob{\gr{\tikzmark{wib}width}}          \begin{tikzpicture}[remember picture,overlay]     \draw[->] ([xshift=15pt,yshift=3pt]nlb.north) -- ([xshift=5pt]nla.south);     \draw[->] ([xshift=15pt,yshift=3pt]plb.north) -- (pla.south);     \draw[->] ([xshift=15pt,yshift=3pt]ovb.north) -- ([xshift=8pt]ova.south);     \draw[->] ([xshift=15pt,yshift=3pt]wib.north) -- ([xshift=8pt]wia.south);     \end{tikzpicture}          \end{document}        But This gives: ![enter image description here](http://i.stack.imgur.com/X9UpZ.png)


title: How to remove parentheses from year in the references in chicago bibliography style

text: I'm using chicago bibliography style (`\bibliographystyle{chicago}`) and the references appear like: > Leibowitz, A. (1974). Education and home production. _The American Economic > Review 64_ (2), 243-250 What I need is to remove the parentheses from the year. It should be like this: > Leibowitz, A. 1974. Education and home production. _The American Economic > Review 64_ (2), 243-250. How can I get this?