title: Different numbering format between toc and body

text: To complete my memory, I would like to display different numbering format beetween my section in the body of my document and the one in the toc You will find just below my MWE :               \documentclass{book}          \usepackage{titlesec}     \usepackage{shorttoc}     \usepackage{lipsum}          % --------------------------------------------------     % Paramétrage des chapitres (parties)     % --------------------------------------------------     \titleclass{\chapter}{top}     \titleformat{\chapter}[frame]         {\null\vspace{.10\textheight}\normalfont}         {\filright         \enspace PARTIE~\thechapter\enspace}         {8pt}         {\huge\bfseries\filcenter\textsc}          \titlespacing{\chapter}{0pt}{*0}{*5}          \renewcommand\thechapter{\arabic{chapter}}          % --------------------------------------------------     % Paramétrage des sections (chapitres)     % --------------------------------------------------     \titleclass{\section}{straight}     \titleformat{\section}[block]         {\normalfont\huge\bfseries}         {\textsc{Chapitre}~\thesection~:}         {2.3ex plus.2ex}         {\huge}          \titlespacing{\section}{0pt}{*1.5}{*3}          \renewcommand\thesection{\arabic{section}}          % --------------------------------------------------     % Document     % --------------------------------------------------          \begin{document}         \chapter{Test chapter 1}         \lipsum[1]         \shorttableofcontents{Sommaire}{1}         \chapter{Test chapter 2}             \lipsum[1]             \section{Test section 1}             \lipsum[1]         \tableofcontents     \end{document}      Everything is looking good in the document except in the toc. I have this for the moment :               1 Test chapter 1 1     2 Test chapter 2 5         1 Test section 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5      And I would like to have this without any change in my text content :               1 Test chapter 1 1     2 Test chapter 2 5         2.1 Test section 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5      I found a question on the same problem on Different section numbering styles for toc and body. The MWE document is working great but I can't make it work in mine. I've commented all the lines linked to \titleclass \titleformat \titlespacing in my document, and used the package corrected in the answer but it doesn't reproduce good, I just have one element in the numbering format wanted for a paragraph and I don't have the numerotation of the parents sections. After this failed test, I tried to go in another way. I tried to adapt it to what I want directly by commenting \title... like previously and edited the aglc.sty file but I didn't see any change at all in the numerotation, I didn't succeed to display a 1.1 format type in my section. Can anyone help me with this ? Thank you very much in advance. :) * * * edit after Bernard comment : Sorry for the confusion about chapter and section headings. I had to do this because of the style headings og shorttoc toc and bibtex because I need to have the style of a part like these elements. This is the reason that pushed me to had a 'Partie' title in a chapter and a 'Chapitre' title in a section. If I type :               \chapter{Hello world}         \section{I'm a robot}      I would like to have in my body Partie 1 : Hello World Chapitre 1 : I'm a robot This work nicely but with my configuration, I get this in my shorttoc and toc :               1 Hello World         1 I'm a robot      and I would like to have :               1 Hello World         1.1 I'm a robot      Without seeing anychange in my document presentation. It would be like having two different format numerotation for my section, one for shorttoc and toc with the type \thechapter.\thesection and one for the content that is just \thesection.


title: dash instead of repeated author name

text: I am using the `natbib` package with a bibliography style very similar to `humannat`. I would like to get a long dash instead of the full author name in multiple references where the author is the same. I would be grateful for any suggestions.


title: Per-project texmf directory

text: Is it possible to specify a texmf directory from within a tex file? I think a project-specific way to set the `TEXMFHOME` environment variable, instead of within the `~/.bashrc` file would work. **Motivation**   I mostly use the Kile LaTeX editor on KDE, but I synchronise my TeX project tree over to other computers using `git`; on OSX I have MacTex installed. I've just installed the Myriad Pro OTF font package using Michael Gährken's package, and would like this font to be used on all machines without having to edit local files and folders on each host.


title: How to cite a book in a multi-author, single-editor collection in biblatex?

text: I use biblatex and biber, and biblatex's standard styles. I need to cite a self-standing book by a classic Latin author that appeared in a multi-volume collection put together by a single editor. Here is how the reference should appear in the bibliography: Boethius ( (-)). _In Categorias Aristotelis libri quatuor_. In: _Patrologia Latina_. Ed. by Jacques-Paul Migne. Vol. . Chadwyck-Healey. But I cannot get biblatex to produce what I want. If I use the following ref (as per biblatex's manual, sec. 2.3.5):               @INBOOK{BoethiusOnCateg,       booktitle = {In Categorias Aristotelis libri quatuor},       maintitle = {Patrologia Latina},       publisher = {Chadwyck-Healey},       year = {1995 (1844-1855)},       editor = {Jacques-Paul Migne},       author = {Boethius},       volume = {64}      }      I get the following output: Boethius ( (-)). In: _Patrologia Latina_. Vol. : _In Categorias Aristotelis libri quatuor_. Ed. by Jacques-Paul Migne. Chadwyck- Healey. If I switch to another of the manual's suggestions, namely:               @BOOK{BoethiusOnCateg,       title = {In Categorias Aristotelis libri quatuor},         maintitle = {Patrologia Latina},       publisher = {Chadwyck-Healey},       year = {1995 (1844-1855)},       editor = {Jacques-Paul Migne},       author = {Boethius},       volume = {64}     }      I get the same result: Boethius ( (-)). _Patrologia Latina_. Vol. : _In Categorias Aristotelis libri quatuor_. Ed. by Jacques-Paul Migne. Chadwyck-Healey. I tried other permutations of maintitle, title, and booktitle with @BOOK and @INBOOK, but I cannot get the desired result. Any suggestions?


title: Is there a way to query the page size that I have set in the memoir class?

text: In my preamble, I have:               \documentclass[a5paper,10pt,oneside,onecolumn,openany]{memoir}      I would like to later define some layout options based on the value of the page size, which in this case is `a5paper`. I've looked a little at pgfkeys, and discovered that it can't be called before `\documentclass`, while keyreader could be, but maybe there's infact a `stock size` or `page size` value that I'm effectively setting while calling `memoir`, that I could use as a trigger for subsequent conditional actions. Or maybe I should try defining a key _after_ calling memoir, and then later use the geometry package to set the page size (and other things) accordingly?


title: What is \mathchoice?

text: Can someone give me a detailed starters' guide to `\mathchoice`? I was trying to define commands for underscript and overscript (which I have found out to exist and be called \underset and \overset), and up till now I've been using scaled arrays (matrices) for that, i.e. compressing a column vector containing the line of text and the overscript/underscript stuff to avoid the matrix expanding and leaving space between itself and the surrounding environment, and rescaling its contents to normal size or to a smaller size for the overscript/underscript. Problem is, as soon as the height of a "cell" of this column vector is altered, my text starts flying above the rest of the text or sinking below it. So I have to work on the scalings and it's often boring to find the exactly right scaling factors to align the text with overscript/underscript with nearby text. Working on this, I tried to define a command `\lower`, and bumped into a `Command \lower already defined` error. I looked `\lower` up, and found out about the existence of something called \mathchoice. Problem is, what I found seems to be only troubleshooting, and to require a minimal knowledge of what `\mathchoice` is, or at least of what certain lines of code (as `\def\xfb#1#2{\fbox{$#1#2$}}`) do, which I don't have; or maybe what I've found (i.e. Proper use of \mathchoice) is meant to only give practical advice, i.e. to give you code that works, rather than explaining what one is doing with the recommended code. To make an example unrelated to `\mathchoice`, what I mean is what I found seems to either require the reader to know `\newcommand{\norm}[1]{\left\|#1\right\|}` is defining a new command, which is invocated by `\norm`, has one parameter, and places it between `\left\|` and `\right\|`, which are automatically resized double vertical bars, or to only give the reader the code without any intention of explaining it does that. `\mathpalette` seems to be closely related to `\mathchoice`, so it wouldn't be inappropriate to ask for help on both, I presume.


title: Ctrl+I produces Tab character instead of italizing text

text: I'm using Ubuntu 12.04 with Xfce 4.8. Only in some applications, namely TexStudio (v2.6.6) and TexMaker (v4.1), Ctrl+I inserts one Tab character instead of making text italic. How do I troubleshoot such a keyboard shortcut (mapping) issue?


title: Creating a marginal tcolorbox from inside an other tcolorbox

text: I have created a new `tcbtheorem`like this:               \usepackage[breakable, theorems, skins]{tcolorbox}     \tcbset{enhanced}          \newtcbtheorem         [number within = chapter]         {myexample}         {examples}         {   breakable,             colback=green!5,             colframe=green!35!black,             fonttitle=\bfseries,             shadow={1mm}{-1mm}{0mm}{black!50!white}         }         {ex}               \newcommand{\cmmNormalExample}[3]{         \begin{myexample}{#1}{#2}             {#3}         \end{myexample}     }          \newcommand{\cmmMarginalExample}[3]{        \marginpar{            \cmmNormalExample{#1}{#2}{#3}        }     }      with the second command (\cmmMarginalExample) trying to create a box in the margin. The stand-alone use of the above commands is ok but, when I use this command from inside the first one, for example:               \cmmNormalExample{Title A}{exlabelA}{        blah, blah, ...             \cmmMarginalExample{Title B}{exlabelB}{          this must (i.e. "I want to") be in the margin        }             blah, blah, ...     }      I get the error: `"! Latex Error: Not in outer par mode."` Any suggestions to skip this problem? Thanks in advance. Konstantinos Pavlou.


title: Overfull \hbox in the Table of Figures when using custom page numbering

text: I use a custom page numbering for appendices:                   \renewcommand{\thepage}{A~--~\arabic{page}}      The problem is there is a overfull \hbox in the Table of Figures for the custom page numbering: ![The page numbering for appendix ceate an overfull hbox](http://i.stack.imgur.com/R0qkj.png) The problem does not appear in the Table of Contents, so I am really wondering why it happens and what can I do to prevent it ? Thank you for your help.


title: Matrix within equation

text: I am having some difficulty getting this to display properly.                \begin{equation}     {\bf H} = -{\bf \mu} \cdot {\bf B} = - \gamma B_o {\bf S}_z = -\frac{\gamma B_o\hbar}{2}      \begin{bmatrix} 1&0\\0&-1 \end{bmatrix}.     \end{equation}      Which appears as, ![Ugly looking equation](http://i.stack.imgur.com/m6xDT.png) I would like the matrix height to be consistant with the rest of the equation.


title: Removing a segment of a frame

text: I have the following MWE in PSTricks, showing a rectangle:               \documentclass[pstricks, border=12pt]{standalone}     \usepackage{pst-node}          \usepackage{siunitx}     \begin{document}     \begin{pspicture}[showgrid=true](5,5)         \psframe(4,4)     \end{pspicture}     \end{document}      What I would like to is to remove the part of the right side spanned by the coordinates (4,1) and (4,3). What is the easiest way to achieve this? I could of course just superimpose a white line, but that seems like a wrong way to do it.


title: Smooth rendering of bitmap fonts

text: I would like to use the Concrete Math font in LaTeX, which is a bitmap font. The rendering with `pdflatex` is naturally poor-quality with jagged edges. My solution so far has been to generate a DVI file and then convert to PDF using Linux's `dvipdf`. This tool effectively traces and smooths the edges of the glyphs and the end result is beautiful. However, using the DVI output format (with `latex`) causes a host of other problems with including figures, etc. For instance, you can't include `.png` or `.pdf` figures when using plain LaTeX. Is there a way to somehow get the same bitmap font-smoothing effect in `pdflatex`? or via an intermediate format that still allows you to include at least `.png` figures?


title: Writing file names used with graphicx

text: I'm trying to modify the command `\includegraphics{}`to write the name of the included file, including its path and extension, to a text file. What I have so far is:               \makeatletter     \newwrite\myfile     \immediate\openout\myfile=myfigures.txt     \let\TempCmd\Ginclude@graphics     \renewcommand{\Ginclude@graphics}[1]{\TempCmd{#1}\immediate\write\myfile{#1}}     \makeatother      The only problem with this is that the file extension won't get written if it's not specified. For example, if I have `mypic.eps` in a subfolder called `figures`, and I write `\includegraphics{figures/mypic}`, then `myfigures.txt` will only have `figures/mypic` written to it, when what I want is `figures/mypic.eps` to be written. I've tried poking around in graphicx.sty and snapshot.sty to see if I can figure out how they handle file name extensions, and hack something together myself, but I haven't been able to figure it out yet. If I put `\filename@parse{#1}` in there I get nothing for `\filename@ext`. Here's my minimal working example (just supply some image of your choice):               \documentclass{article}     \usepackage{graphicx}          \makeatletter     \newwrite\myfile     \immediate\openout\myfile=myfigures.txt     \let\TempCmd\Ginclude@graphics     \renewcommand{\Ginclude@graphics}[1]{\TempCmd{#1}\immediate\write\myfile{#1}}     \makeatother          \begin{document}     \includegraphics{mypic}     \end{document}


title: Reading arguments in a command?

text: I now know that if I want to get for example the 3rd argument passed to a command, I have use `#3`. My question is if this argument is an array how can I read elements of array without a for loop? For example when {1,2,3} is passed as the 3rd argument. How should I read second element of it? Note: Assume that I will always get a comma separated array of constant length.


title: \medskip doesn't seem to work

text: I've just begun using TeXShop but seem to have come across a problem - I have a centered section that uses a \medskip right after a newline. Like so:               \begin{center}     Some text \\     Some subheading \#1\\     More subheading \#3\\     \medskip     Last subheading\\     \end{center}      Which works fine. But when I do this in a paragraph, or item, or, for that matter, anything else. It seems not to work. `\medskip` inserts line spaces in unexpected places, and never after the newline that directly precedes the `\medskip`. I've also tried not using the newline to precede the `\medskip` at all, to no avail. Your help is much appreciated, as usual! -L


title: Better extensible arrows

text: Using `amsmath` and `extarrows` packages, we have many extensible arrows. But these arrows look ugly, since some parts in an arrow are boldfaced. ![enter image description here](http://i.stack.imgur.com/qPiMA.png) Are there any better-looking extensible arrows?


title: How can I use align environment in conjuction with iopart.cls class?

text: I would like to use `align` environment over `eqnarray` for typesetting my equations. However the publisher forces to use the `iopart.cls` as the article class file which, as they mentioned, is incompatible with `amsmath.sty`. How can I somehow import `align` definition (or even other definitions too) from `amsmath.sty` while sticking to the document class of `iopart.cls` ?


title: Fontconfig warning every time I compile a file

text: Every time I compile a XeTeX file, the error/warning log always includes these warnings:               xetex> ) [1] ("D:\Projects\Test\test.aux")Fontconfig warning: no <cachedir> elements found. Check configuration.     xetex> Fontconfig warning: adding <cachedir>C:\Users\Peter\AppData\Local\MiKTeX\2.9\fontconfig\cache</cachedir>     xetex> Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>     xetex> Fontconfig warning: no <cachedir> elements found. Check configuration.     xetex> Fontconfig warning: adding <cachedir>C:\Users\Peter\AppData\Local\MiKTeX\2.9\fontconfig\cache</cachedir>     xetex> Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>      Is this something I should be concerned about? I haven't had any trouble compiling, except that sometimes it takes longer than I would like. How can I get rid of these warnings?


title: Multiple citations with force longnames for just the one citation natbib

text: Hope there is a convienient answer :) I'm Using Natbib I want to force just one of the citations in a \citep{} to show all authors but not for the other citations. e.g. \citep{page2001, western2002} to look like (Page, Plant, Bonham, Jones, 2001; Western et al., 2001) Possible? I know I can use \citep* but that will force longnames for both citations. Perhaps I could use \newcommand?


title: How can I typeset an equation with braces and conditions in LaTeX?

text: I've got the following equation ![Latex equation](http://i.stack.imgur.com/U3zo5.png) I've used               \begin{equation}         \centering             A_j =             \begin{cases}                 0 & N^2 <  N_j^2 \\                 \text{must have been constrained,} & N^2 > N_j^2 \\                 \text{can take any value as long} & N^2 = N_j^2             \end{cases}         \label{eq:10.30}     \end{equation}      to write down the equation (documented here http://en.wikipedia.org/wiki/Help:Displaying_a_formula#Continuation_and_cases ). What is the best way to add the condition of j = 2,3,4,6,7.. in latex? Thanks in advance!


title: An Error with XeLaTeX and fontspec

text: So I get the following error with some of my fonts and not the others:               xdvipdfmx:fatal: Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5)          Output file removed.      Is there a way to fix this? All the fonts I am using are .otf files.


title: grouped bar chart with pgfplots

text: I am trying to create a grouped bar chart with pgfplots, like this one: ![enter image description here](http://i.stack.imgur.com/pNH1J.png) but I can't put the values over the bars, like this one: ![enter image description here](http://i.stack.imgur.com/SjNwa.png) My code is:               \documentclass{article}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{compat=newest}     \usepackage{caption}     \usepackage{polyglossia}     \setdefaultlanguage{portuges}          \begin{document}          \begin{figure}[h]     \makeatletter     \pgfplotsset{         calculate offset/.code={             \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}             \pgfmathsetmacro\testmacro{(\pgfplotspointmeta *10^\pgfplots@data@scale@trafo@EXPONENT@y)*\pgfplots@y@veclength)}             \pgfkeys{/pgf/fpu=false}         },         every node near coord/.style={             /pgfplots/calculate offset,             yshift=-\testmacro         }     }     %0 - aramente   1 - Às vezes   2 - Quase sempre   4 - Sempre     \pgfplotstableread{       %2013-2014    %2012-2013  %2011-2012     0 32        35      20     1 28        45      23     2 30        24      25     3 10        68      70     }\dataset     \begin{tikzpicture}     \begin{axis}[ybar,             width=12cm,             height=8cm,             ymin=0,             ymax=100,                     ylabel={Percentagem},             xtick=data,             xticklabels = {                 Raramente,                 Às vezes,                 Quase sempre,                 Sempre                 %Category 5,                 %Category 6             },             xticklabel style={yshift=-10ex},             major x tick style = {opacity=0},             minor x tick num = 1,             minor tick length=2ex,             every node near coord/.append style={                     anchor=east,                     rotate=90             }             ]     \addplot[draw=black,fill=blue!20, nodes near coords=2013-2014] table[x index=0,y index=1] \dataset; %ano de 2013-2014     \addplot[draw=black,fill=blue!40, nodes near coords=2012-2013] table[x index=0,y index=2] \dataset; %ano de 2012-2013     \addplot[draw=black,fill=blue!60, nodes near coords=2011-2012] table[x index=0,y index=3] \dataset; %ano de 2011-2012     \end{axis}     \end{tikzpicture}     \captionsetup{justification=centerlast, margin=10ex, labelfont=bf, textfont=it, format=plain, labelformat=default, labelsep=endash, font=small, name=Gráfico\,}     \caption{Em sua casa é costume desligar os equipamentos no controlo remoto, deixando-os em standby (modo de “espera”)?}\label{Questao01}          \end{figure}          \end{document}


title: \CatchFileDef vs ( \input or \@@input )

text: I discovered catchfile here and now I would like to understand how works this package. Below some tests with `\foreach` or `\@for`               \documentclass{article}     \usepackage{filecontents,catchfile,pgffor}          \begin{document}          \def\mylist{1,2,3,4}      Test 1:\foreach \i in \mylist {\hspace{\i cm}\i}           \begin{filecontents*}{mylist.dat}     1,2,3,4     \end{filecontents*}          \CatchFileDef{\tempa}{mylist.dat}{}%           Test 2:\foreach \i in \tempa{\hspace{\i cm}\i}           \makeatletter           Test 3:\@for\i:=\tempa\do{\hspace{\i cm}\i}          \def\tempb{\@@input mylist.dat }           % I know this is not the right way but I always find it difficult to explain               Test 4: this is the content : \tempb       % \foreach \i in \tempb      % {\hspace{\i cm}\i}    %            Test 5:\@for\i:=\tempb\do{\hspace{\i cm}\i}           \begin{filecontents*}{myfile.dat}     \def\tempc{1,2,3,4}     \end{filecontents*}       \input{myfile.dat}          % last try ! and it works     Test 6:\foreach \i in \tempc{\hspace{\i cm}\i}             \end{document}      A) Test 4 does not work. but why Test 2 with `\CatchFileDef` works ? It would be interesting to have a clean explanation about this kind of problem ! B) Now why Test 6 works ?


title: How to use different fonts in footnotes and bibliography / special old hebrew

text: Im using for old hebrew and old greek text special fonts with fontspec. How can i use this also in the footnotes and in den bibilography? There are only single hebrew words in 3 of the booktitle. Im using Lulatex and Biblatex with biber.               \documentclass[twboside=false, fontsize=12bp]{scrartcl}     \usepackage{setspace}     \setstretch{1.5}      \usepackage[left=3cm, right=4cm]{geometry}     \usepackage{typearea}          \usepackage{fontspec, newunicodechar}     \setmainfont{Times New Roman}      \newfontfamily\stix[Ligatures=TeX]{STIXGeneral}     \newunicodechar{}{{\stix}}     \newunicodechar{}{{\stix}}     \newfontfamily\hebfont[Script=Hebrew, Scale=MatchUppercase, Ligatures=TeX]{Ezra SIL}     \newcommand{\textheb}[1]{\bgroup\luatextextdir TRT\hebfont #1\egroup}     \newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase, Ligatures=TeX]{SBL Greek}     \newcommand{\textgreek}[1]{\bgroup\greekfont #1\egroup}          \usepackage[     backend=biber,     style=geschichtsfrkl,     pagetracker=true,      backref=true,     ]{biblatex}      \bibliography{xy.bib}     \usepackage[german=quotes]{csquotes}          \begin{Document}     \textheb{some hebrew text, works fine here}     footcite[vgl.][51]{book1}               \printbibheading[title=Literaturverzeichnis]     \printbibliography[keyword=primaer,heading=subbibliography,title={Textausgaben und Hilfsmittel}]     \printbibliography[keyword=sekundaer,heading=subbibliography,title={Sekundärliteratur}]          \end{document}


when i compile my beamer , it says that `There's no line here to end. \end{frame}` what does that mean? But the strange is when i delete the `\\\~` after every `\item` , it works right. But i want to start every item in every other line. who can explain the reason of error? And are there any other ways to start every item in every other line? thanks


title: LaTeX Error: Illegal character in array arg using apsrtable in R

text: I am using sweave in R-Studio and am attempting to use the R package `apsrtable`. Both the model objects I am passing `apsrtable` are `lm` objects, and I get the error > illegal character in array arg when I run sweave.               \documentclass{article}     \usepackage{fullpage}     \begin{document}          <<results=tex>>=     apsrtable(mod.um,mod.km, Sweave=TRUE)     @      Here is the LaTeX code `apsrtable` generates               \begin{tabular}{ l D{.}{.}{2}D{.}{.}{2} }     \hline                 & \multicolumn{ 1 }{ c }{ Model 1 } & \multicolumn{ 1 }{ c }{ Model 2 } \\ \hline     %           & Model 1 & Model 2\\      (Intercept) & -0.06   & -0.05  \\                  & (0.12)  & (0.12) \\      lag1.x      & 3.28 ^* & 0.25   \\                 & (0.42)  & (0.67) \\      lag2.x      & 2.31 ^* &        \\                  & (0.42)  &        \\      lag3.x      & 0.86 ^* &        \\                  & (0.42)  &        \\      lag4.x      & 0.77    &        \\                  & (0.42)  &        \\      lag5.x      & 1.60 ^* &        \\                  & (0.42)  &        \\      lag.y       &         & 0.62 ^*\\                  &         & (0.10) \\     $N$         & 145     & 149    \\      $R^2$       & 0.47    & 0.42   \\      adj. $R^2$  & 0.45    & 0.41   \\      Resid. sd   & 1.44    & 1.49   \\ \hline     \multicolumn{3}{l}{\footnotesize{Standard errors in parentheses}}\\     \multicolumn{3}{l}{\footnotesize{$^*$ indicates significance at $p< 0.05 $}}     \end{tabular}     \end{document}


title: Filling path in pgfplot and pushing into background?

text: I'm using pgfplots to produce a plot of a closed path in the x-y plane. For reasons that are not important here, I would like to fill the closed path. That works fine, but the axes are then hidden by the filled path. How can I push the filled path into the background or the axes into the foreground? I looked at some other questions here that mention using pgflayers, but I can't find that in either the TikZ or `pgfplots` manuals. MWE:               \documentclass[10pt]{article}          \usepackage{tikz}     \usepackage{fancyhdr}     \usepackage{pgfplots}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}          \begin{document}     \thispagestyle{empty}          \begin{tikzpicture}     \begin{axis}[       axis x line=middle,       axis y line=middle,       xmin = -2.0, xmax =  2.0,       ymin = -2.0, ymax =  2.0,     ]     \addplot[fill=lightgray,mark=none] coordinates {       (-1.0, -1.0)       ( 1.0, -1.0)       ( 1.0,  1.0)       (-1.0,  1.0)       (-1.0, -1.0)     };      \end{axis}     \end{tikzpicture}          \end{document}


title: How to put one circle over another?

text: This is my code:               \documentclass[tikz,12pt]{standalone}     \usetikzlibrary{patterns}     \begin{document}     \begin{tikzpicture}[line width=1.5pt]     \coordinate (A) at (2,2);     \coordinate (B) at (2,1.2);     \coordinate (C) at (3,2);     \coordinate (D) at (3,1.2);     \draw[fill=white] (A) circle (0.5);     \draw[fill=white,pattern=north east lines, pattern color=black] (B) circle (0.5);     \draw[fill=white] (C) circle (0.5);     \draw[fill=white] (D) circle (0.5);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/JKTH4.jpg) When I use `pattern=north east lines` I can see first circle through second with pattern. If I do not use `pattern=north east lines` I get what I want to see: second circle overlay first one. But I need Second circle to be with pattern. How this problem could be solved without using `\pgfdeclarelayer{background} \pgfsetlayers{background,main}`?


title: pgfplots generating incorrect boxplots

text: While trying to reproduce some boxplots using pgfplots (and analyzing samples automatically), I noticed that in some cases I was getting different plots from Matlab. I have left all the settings in default, which means that the thresholds for outliers and whiskers should be the same in both cases. (Thresholds for outliers by default are `q1-1.5*(q3-q1)` and `q3+1.5*(q3-q1)` where `q1` and `q3` are the 25th and the 75th percentiles respectively). However, Matlab and pgfplots generate plots with different whisker and outlier positions. Plot from pgfplots: ![Boxplot from pgfplots](http://i.stack.imgur.com/jFSXn.png) Plot from Matlab: ![Boxplot from Matlab](http://i.stack.imgur.com/h6DXE.png) Following is the code and the data file that I am using to generate these plots: Latex:               \documentclass{minimal}     \usepackage{pgfplots}     \usepgfplotslibrary{statistics}     \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}       \begin{axis}[         boxplot/draw direction = y,         xmin = -2,         xmax = 4]         \addplot+[boxplot] table[y=Var1]{testdata.txt};       \end{axis}     \end{tikzpicture}     \end{document}      Matlab:               T=readtable('testdata.txt','delimiter','\t');     boxplot(T{:,:})      The data file:               Var1     0     1     2     3     4     5     3     10     14     -9      Any idea why they generate different plots? Which one is correct?


title: How to use \lstinline inside figure environment's caption argument

text: Here is the code that I have (I have removed parts which I think are not relevant):               \documentclass[12pt]{article}          \usepackage{listings}          % Python style for highlighting     \newcommand\pythonstyle{\lstset{frame=shadowbox,       language=Python,       ...     }}          % Python environment     \lstnewenvironment{python}[1][]     {     \pythonstyle     \lstset{#1}     }     {}          % Python for inline     \newcommand{\pythoninline}[1]{{\pythonstyle\lstinline!#1!}}          \begin{document}          \begin{figure}     \begin{python}     def function_name():         ...     \end{python}     \caption{Definition of the function_name function.}     \end{figure}          \end{document}      What I would like to do is to use the command \pythoninline inside the figure caption argument. This does not work:               \caption{Definition of the \pythoninline{function_name} function.}      Any suggestions would be much appreciated.


title: aliasing vs variants --- preferred practices?

text: This is somewhat related to a question I asked earlier here. I'm trying to split a token using a delimiter. However, the delimiter is stored in a token. Looking at the most recent documentation, I have the following options:                \seq_set_split:Nnn      \seq_set_split:NnV      and the corresponding global variants. Now suppose that I have the following defined,               \tl_new:N \l__delimiter_tl     \tl_set:Nn \l__delimiter_tl {;}      assume further that I have               \tl_new:N \l__content_string_tl     \tl_set:Nn \l__content_string_tl {a;b;c;d}      I would like to be able to write something like the following:               \seq_new:N \l__possible_values_seq     \seq_set_split:NnV \l__possible_values_seq {\l__delimiter_tl} \l__content_string_tl      But that doesn't work. I've also tried doing something like               \seq_new:N \l__possible_values_seq     \seq_set_split:NnV \l__possible_values_seq {\tl_use:N \l__delimiter_tl} \l__content_string_tl      But that doesn't work either. Now I know I can create a _variant_ such as               \cs_generate_variant:Nn \seq_set_split:Nnn {NVV}      because I could then write               \seq_set_split:NVV \l__possible_values_seq \l__delimiter_tl \l__content_string_tl      which will get the job done. However, in the link above, someone commented that it would be bad form to write such a variant. I'd like to keep to the spirit of that comment. So my question, how do I _interpolate_ a token-list before it's read. It seems that there should be some way of doing this. In TeX, I would do something like               \expandafter\<macro_name> {\<first_argument>}....      However, I'm still trying to understand the syntax of LaTeX3, it seems that part of what's making LaTeX3 nice is you can avoid the near unreadability of code like               \exp_after:wN \exp_after:wN \exp_after \seq_set_split:NnV \exp_after:wN \l__possible_values_seq {\l__delimiter_tl} \l__content_string_tl      which, incidentally, I tried and I got garbage out. So, how do I get `\l__delimiter_tl` to get expanded before `\seq_set_split:NnV` tries to read it? **EDIT** In the comments to my earlier post, there was some discussion of creating _aliases_ for LaTeX3 functions. For example, writing something like               \cs_new_eq:NN \seq_length:N \seq_count:N      But, in the comments to that post, it was remarked that this would be a bad naming convention. Am I misunderstanding the difference between _aliases_ and _variants_? **EDIT II** It seems that instead of creating a variant I could write:               \exp_args:NNVV \seq_set_split:Nnn \l__possible_values_seq \l__delimiter_tl \l__content_string_tl      and avoid using `\cs_generate_variant:Nn`. I get that `\cs_generate_variant:Nn` might be preferred. But it seems that there _might_ be circumstance---such as a one time occurrence for the need of the variant in a package---where generating the variant might be less clear. Any thoughts on this point?


title: How to show only the TeX boxes

text: I'd like to use a sequence of boxes to show how TeX works. I read some time ago that everything (or almost) in TeX are boxes. So, how to show only the TeX boxes that surround each character, each line, each paragraph? I'd like something similar to the image below, not `fbox` which contains blank space around it. ![enter image description here](http://i.stack.imgur.com/slNK8.gif)


title: How to change the weight of a pin line in PGF Plots?

text: Using pins is a nice way to annote your plots in PGF Plots. However, I would like to have the weight for the line leading from a point on the graph to the text to be bold. How do I do this? Consider the following MWE:               \documentclass{minimal}     \usepackage{pgfplots}         \pgfplotsset{compat=1.5.1}          \begin{document}     \begin{tikzpicture}         \begin{axis}             \addplot[domain=1:6]             {exp(x)};             54.59815             \node[coordinate,pin=left:{A pin!}]                 at (axis cs:4,54.59815) {};         \end{axis}     \end{tikzpicture}     \end{document}


title: How to tell when to use pdflatex, latex, and xelatex for any given tex file?

text: I'm writing an automatic compiling pipeline that should be able to compile any given tex file into a pdf. The diversity of the input tex files mainly shows up in what format of figures they use and how they include them. The figures are mostly `eps`, `ps`, and `pdf`, and they may use `psfig`, `graphix` etc to include them. I'm not particular clear on what criteria I should set up in the pipeline about what figure handling packages used in those tex file should trigger which latex compiling scheme among pdflatex, latex, and xelatex. Any easy rule of thumbs or any tables that I can look for the rules? thanks. **EDIT** I am aware the question is not well posed in the first place. I think what I want is 1) is there a tool that could compile all sorts of tex files with different figure formats and figure handling packages. 2) if not, is there a specific keyword I should search for in the file that tells me what compiling method I should use? My current design is to try various compiling schemes one by one (latex->pdflatex->xelatex) until it succeeds.


title: Why is this \def not working as expected?

text: I am having a weird problem with \def. I am new to (La)TeX and can't figure this out. I have a simple code as follows.               \documentclass[10pt,a4paper]{article}          \usepackage{listings}          \begin{document}          \lstset{     language=C++,     tabsize=4     }          \def\docend{\end{document}}          \def\codeend{\end{lstlisting}}          \begin{lstlisting}          class AClass     {         enum Types         {             t_one = 1         };         ~AClass()         {             cout << _T("destructor") << endl;         }     }            \end{lstlisting}          %  \codeend          \docend      Using `\codeend` gives an error '...emergency stop...no legal \end found...". However, `\docend` works fine. What mistake have I made? (FYI, using TeXMaker with Miktex 2.9 on Windows 7.)


title: tabular numbers in tables, proportional in text

text: I'm using LuaTeX with a font that has proportional, lining and tabular numbers available. Is it possible to set things up so tables automatically use tabular numbers - but proportional numbers are used in the text?


title: Print current date without updating

text: I am trying to keep a journal-type file using TeX. I would like to create a template in which I need not manually enter the date each day. Example: January 26, 2014 Entry for the day here. January 27, 2014 Entry for the day here. January 28, 2014 Entry for the day here. I would ideally like to automate this to: \today <--- Set date to January 26, 2014 that does not change when compiling next day Entry for the day here. \today <--- Set date to January 27, 2014 that does not change when compiling next day Entry for the day here. \today <--- Set date to January 28, 2014 that does not change when compiling next day Entry for the day here. Any help would be greatly appreciated! Best wishes, ~Joco


title: Using \toks registers

text: I was reading this tutorial for TeX programming: http://pgfplots.sourceforge.net/TeX-programming-notes.pdf recommended in the 2-nd answer here: Where do I start LaTeX programming? It says: > `\toks<number>` There are also 255 token registers which can be thought of > as special string variables. Of course, every macro assignment `\def\macro{ > content }` is also some kind of string variable, but token registers are > special: their contents won’t be expanded when used with `\the\toks` number > . This can be used for fine grained expansion control, see Section 2.3 > below. But no examples of using `\toks` registers. What does he mean: "special string variables"? For 2 previous kinds of registers I could assign the value:               \count0=12     \dimen0=1.102pt      And print it:               Value1: \the\count0     Value2: \the\dimen0      But I don't understand, how to use `\toks`.


title: Modification of Beamer theme

text: I would like to modify this theme.               \documentclass{beamer}          \DeclareOptionBeamer{compress}{\beamer@compresstrue}     \ProcessOptionsBeamer          \mode<presentation>          \useoutertheme[footline=authortitle]{miniframes}     \useinnertheme{circles}     \usecolortheme{whale}     \usecolortheme{orchid}          \definecolor{beamer@blendedblue}{rgb}{0.137,0.466,0.741}          \setbeamercolor{structure}{fg=beamer@blendedblue}     \setbeamercolor{titlelike}{parent=structure}     \setbeamercolor{frametitle}{fg=black}     \setbeamercolor{title}{fg=black} \setbeamercolor{item}{fg=black}          \mode <all>          \begin{document}     \begin{frame}     \frametitle{Task}     Task.     \end{frame}     \end{document}      I would be glad to get different footer in this way. I would like to have exactly the same one as it is used in Torine style (downloaded from http://blog.barisione.org/2007-09/torino-a-pretty-theme-for-latex-beamer/) with the only little change, where the three stripes would start on the left and go to the right (the number page is then also on the left). Does anyone know how to modify this?


title: Latex Error “log file not found”

text: Same problem as Rachelle's of Aug. 11: I am using TeXMaker with MikTeX on Windows 7. Had to reinstall MikTeX. Previous programs work fine on the new installation. New ones I write, don't. The error message is `log file not found`. I tried the following:   1. Taking an old minimal program that works, called `test1.tex`, I copied it and called the new instance `test2.tex`. The copy generates the same complaint: `No log file`.   2. I also copied `test1.log` to `test2.log` (creating it in the process) and edited internal references from `test1` to `test2`. Result: No complaint about a missing log file, but the pdf file is not created.  I would appreciate any suggestions. Most appreciated would be an explanation of the source of the problem.


title: Who wrote "What are TeX, LaTeX, and friends?"

text: Who wrote What are TeX, LaTeX, and friends? I want to reference it in my article.


title: Dropped column in multicolumn table

text: In a table with 4 rows and 4 columns I try to merge different cells in every row while preserving the table layout. As there are never more than 3 cells in a row, a table column seems to be dropped. If I add an empty row containing 4 cells there are 4 columns. Question: is it possible to preserve all columns without adding an empty row? Thank you. Here is my goal:               -------------------     | 1               |     -------------------     | 2          | 14 |     -------------------     | 3 | 7      | 15 |     -------------------     | 4 | 8 | 12      |     -------------------      And here, what I get:                --------------     | 1          |     --------------     | 2     | 14 |     --------------     | 3 | 7 | 15 |     --------------     | 4 | 8 | 12 |     --------------      The code:               \documentclass[10pt]{article}     \usepackage{multicol}     \begin{document}          \section{A}     {\begin{tabular}{|l|l|l|l|}       \hline \multicolumn{4}{|l|}{1} \\       \hline \multicolumn{3}{|l|}{2} & 14 \\       \hline 3 & \multicolumn{2}{|l|}{7} & 15 \\       \hline 4 & 8 & \multicolumn{2}{|l|}{12} \\       \hline     \end{tabular}}          \section{B}     {\begin{tabular}{|l|l|l|l|}       \hline \multicolumn{4}{|l|}{1} \\       \hline \multicolumn{3}{|l|}{2} & 14 \\       \hline &   &   &   \\       \hline 3 & \multicolumn{2}{|l|}{7} & 15 \\       \hline 4 & 8 & \multicolumn{2}{|l|}{12} \\       \hline     \end{tabular}}          \section{Goal}          I would like to have a table as in section B but without the third (empty) row.          \end{document}


title: How do you locally override/cancel a shadow?

text: In the example below, the style I've defined for `every node` uses a drop shadow. My `a` node uses that default style without modification. However, I'd like to override that style for node `b`, which should have no shadow at all. I've tried to   * pass `fill opacity=0` to `drop shadow` locally, or   * pass nothing to the option (`drop shadow=,`), but node `b` still has a shadow. I've read section 66 of the TikZ/PGF (v3.0) manual about the `shadows` library, but I haven't found a way of overriding a `drop shadow` style. Any help? ![enter image description here](http://i.stack.imgur.com/q6gul.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning,shadows}          \tikzset{       every node/.style={         draw,         drop shadow = {opacity=0.5,fill=red},         fill        = white,       },     }          \begin{document}     \begin{tikzpicture}     \node (a) {a};     \node[       right=of a,       drop shadow={opacity=0}, % the shadow is still there     % drop shadow=,            % also no effet     ] (b) {b};     \end{tikzpicture}     \end{document}


title: vbox disappearing inside hbox

text: I don't understand why a vbox disappears when it's surrounded by two `\hss`, for instance in:               \hbox to 0pt{\hss abc\hss}     \hbox to 0pt{\hss\vtop{def}\hss}% doesn't work     \hbox to 0pt{\vtop{ghi}\hss}% works      \bye      which more or less corresponds to what I'd like to achieve, why doesn't `def` show up? There must be something obvious I'm missing here, but I can't see what. I will work around this by using some `\raise`, but I'd like to understand...


title: Align equations left-right

text: I was trying to use `flalign` to align my equations from left to right, but it doesn't work. Any way it compiles the text to pdf, but it is exactly like `align` environment from right to left. Could you please help me to align my equations from left to right? I am writing my `tex` documents in Texmaker.


title: ConTeXt: hyperlinks with special characters

text: I need to link to some online resources in my PDF file. Based on the official documentation, I have written:               \useURL[dbdk] [http://dbpedia.org/page/The_Dark_Knight_(film)] [] [it's link to DBPedia]          Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \from[dbdk] dolor sit amet.      Note my code for the link to DBpedia: I had to write it in this convoluted way, instead of using my preferred `\goto`, because the link has the special characters, `(` and `)`. These characters interfered with `url()`. I can't use HTML's URL encoding scheme because the `%`s interfere with TeX. Is there another escape code format in ConTeXt for use within `\goto{...}[url(...)]`? * * * Addendum: Using the suggestion by @phg, I tried the following:               \startasciimode          Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \goto{it's link to DBPedia}[url(http://dbpedia.org/page/The_Dark_Knight_%28film%29)] dolor sit amet.          \stopasciimode      I still had to use escape codes, `%28` and `%29`, to keep it from interfering with `url()`. It turns out that DBpedia does not like these codes, and requires the actual characters. Is there another way I put them in `\goto{...}[url(...)]`?


title: Landscape table will not be in centre of page

text: I read all the questions and answers on this, but they only left me more confused. I want my table to be in the centre of the landscape page, but it's always aligned on the left instead. Is there a way to make it appear in the centre? I am including the packages and commands from the preamble of my document in case they are causing clashes. Minimal example:               \documentclass{amsart}     \usepackage{relsize, fullpage, url, amsmath, amssymb, graphicx}     \usepackage{lscape, afterpage}     \setlength{\parindent}{0cm}          \begin{document}     Some text          \afterpage{          \begin{landscape}     \begin{table}[h] %[!h]     \centering     \begin{tabular}{l|cccccccccccccccccccccc}     & 0& 1 &2& 3&4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17& 18& 19& 20 &21\\     & 0& 1 &2& 3&4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17& 18& 19& 20 &21\\     & 0& 1 &2& 3&4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17& 18& 19& 20 &21\\     & 0& 1 &2& 3&4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17& 18& 19& 20 &21\\     \end{tabular}     \caption{I want this table to be in the middle of the page, above the 2. It would also be nice if there was more vertical space before this caption.}     \end{table}     \end{landscape}          }          \end{document}


title: multicolumn in longtable with span dependant on number of columns

text: How can I use `\multicolumn` in a `longtable` environment to span all columns except for one? The `\LT@cols` counter is probably the way to go. However, doing arithmetics in LaTeX seems somewhat unconventional. Related to multicolumn-command which automatically uses all columns of the table?. What's needed is "`\LT@cols` minus one".


title: CV and cover letter in same file with own titles: Moderncv

text: I'd like to add my cover letter with the title "Cover letter" after my CV part in `moderncv`. I use `classic` style and I tried to add `\title{Cover letter}` after the `\clearpage` and before `\makelettertitle` but it doesn't print it anything. Has someone solved this problem?               \documentclass[11pt,a4paper,sans]{moderncv}                \moderncvstyle{classic}                                \moderncvcolor{blue}                                         \usepackage[scale=0.75]{geometry}     \title{Curriculum vitae}     \name{John}{Doe}               \begin{document}     \thispagestyle{empty}     \pagestyle{empty}     \makecvtitle          \title{Cover letter}     \recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State}      \date{\today}      \opening{Dear Sir or Madam,}      \closing{Sincerely yours,}               \makelettertitle     \end{document}      I'd like to print "cover letter" title with same font/size as the curriculum vitae title on the cover letter portion of my application.


title: Undefned control sequence problem

text: I am typing               \documentclass[12pt,letterpaper,fleqn,leqno,oneside]{article}          \usepackage{amsmath}          \newcommand{\R}{\mathds{R}}          \begin{document}          \title{M}     \author{Y}     \date{September 4, 2014}     \maketitle          \textbf{Exercise 1} (Open Balls). Prove \textit{rigorously} that an "open ball" $B_\epsilon(x)$ of radius $\epsilon > 0$ about a point $x$ in $\mathds{R}$ equipped with the Euclidean topology is, in fact, open.          \end{document}      And I'm getting the error > Undefined control sequence problem. ...epsilon>0$ about a point $x$ in > $\mathds What is the problem? I suspect that I didn't download completely the package `amsmath`. But, I downloaded in my desktop. Is there a problem with this??


title: Hyphenation of words with accents

text: I know that hyphenating words with accents produces an error in LaTeX. So what can I do in such an occasion? I am facing a problem like that in my text where I use the Linux Libertine O font as the main font. The character is a greek alpha with an accent.


title: Chords & lyrics, songbook

text: I'd like to make something like a songbook - just chords and lyrics. I have found several packages, but I also wanted to improve my TeXing skills by making my own commands/environmnets etc. Now I am struggling with this: I want to put chords above certain parts of lyrics, for example.               Gm     Remember when you were young,          Gb                 Bb     You shone like the sun.          Eb   Dm   Cm   Bb    F     Shine on you crazy diamond.      But I don't want to do this manually for maybe hundreds of songs. I'm hoping for a better way than counting the space between each two chords, something like this:               % ... TeX code     Eb\hspace*{XYpt}Dm\hspace*{XYpt}Cm\hspace*{XYpt}Bb\hspace*{XYpt}F     Shine on you crazy diamond.     % .. TeX code      or:               % .. TeX code     Eb\verb=   =Dm\verb=   =Cm\verb=   =Bb\verb=    =F     Shine on you crazy diamond.     % .. TeX code      I would be happy to find solution that would look like:               % .. TeX code     \chord{Eb}Shine\chords{Dm} y\chord{Cm}ou cr\chord{Bb}azy di\chord{F}amond     % .. TeX code      Maybe it looks more "messy", bud I think the result would be more precise. And as soon as I will find the solution to this problem, I will write some script in C or Python to format the songs for me.


title: \partpage doesn't fit onto the slide

text: I am using beamer to write a presentation which is split into several parts. The title of one part is too long to fit on one single line, so there should be a line break. However the command `\partpage` displays the text on one single line. I have the impression that the issue is related to `\insertpart`, since the same behavior happens as well for this command. Furthermore I noted that the problem disappears if I use pdflatex, which is however not possible for my presentation since I have many .eps figures. Here is a minimal example which reproduces the problem:               \documentclass{beamer}          \begin{document}           \part{very very very very very very very very very very very very very very very long part title}      \frame{\partpage}      \frame{\insertpart}          \end{document}      Any help is appreciated.


title: Shortcut for typewriter font/style in Lyx?

text: I want to format part of a paragraph in typewriter font. Is there a shortcut to quickly switch to the `typewriter` font in Lyx? Or even better: is there a concept like _character styles_ in Lyx so that I can have all my programming code (as in Java programming code) appear in the same way? I do _not_ want the whole paragraph to be in this style, just a part of a paragraph.


title: How to draw spherical using 3dplot

text: I would like do draw some sphericals using the package 3dplot. Does anybody know how to draw spericals with different diameter and postition in a coordinate system like that one?               \documentclass[a4paper, 12pt,]{scrartcl}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english,ngerman]{babel}          \usepackage{graphicx}     \usepackage{epstopdf}          \usepackage{tikz, tikz-3dplot}          \begin{document}            \tdplotsetmaincoords{60}{130}            \begin{tikzpicture}[scale=4,tdplot_main_coords]              \coordinate  (O)  at  (0,0,0);              \draw[thick,->]  (0,0,0)  --  (1,0,0)  node[anchor=north  east]{$x$};         \draw[thick,->]  (0,0,0)  --  (0,1,0)  node[anchor=north  west]{$y$};         \draw[thick,->]  (0,0,0)  --  (0,0,1)  node[anchor=south]{$z$};            \end{tikzpicture}          \end{document}      **Edit:** Here is some more code I wrote. I would like to put a sphere at each corner to draw a crystal lattice.               \documentclass[a4paper, 12pt,]{scrartcl}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english,ngerman]{babel}          \usepackage{graphicx}     \usepackage{epstopdf}          \usepackage{tikz, tikz-3dplot}          \begin{document}            \tdplotsetmaincoords{60}{130}            \begin{tikzpicture}[scale=4,tdplot_main_coords]              \coordinate  (O)  at  (0,0,0);              \draw[thick,->]  (0,0,0)  --  (1,0,0)  node[anchor=north  east]{$x$};         \draw[thick,->]  (0,0,0)  --  (0,1,0)  node[anchor=north  west]{$y$};         \draw[thick,->]  (0,0,0)  --  (0,0,1)  node[anchor=south]{$z$};              \tdplotsetcoord{P1}{.8}{30}{90}         \tdplotsetcoord{P2}{.8}{30}{30}         \tdplotsetcoord{P3}{.8}{30}{330}         \tdplotsetcoord{P4}{.8}{30}{270}         \tdplotsetcoord{P5}{.8}{30}{210}         \tdplotsetcoord{P6}{.8}{30}{150}              \draw[color=blue] (P1)--(P2)--(P3)--(P4)--(P5)--(P6)--cycle;         \draw[color=blue] (P1xy)--(P2xy)--(P3xy)--(P4xy)--(P5xy)--(P6xy)--cycle;         \draw[color=blue] (P1xy)--(P1);         \draw[color=blue] (P2xy)--(P2);         \draw[color=blue] (P3xy)--(P3);         \draw[color=blue] (P4xy)--(P4);         \draw[color=blue] (P5xy)--(P5);         \draw[color=blue] (P6xy)--(P6);            \end{tikzpicture}          \end{document}


title: Space between lines

text: I try to typeset title pages and use LARGE and bold for this. The problem is that the lines seem to be too close to each other. I think it looks bad. Is this the way it is supposed to be? Is there a better way to do this?               \begin{document}          \begin{center}     {\LARGE\bf An \textit{a priori} Typology of Sentential Negation from an HPSG Perspective}\\[\baselineskip]          \end{center}               \end{document}      Edit: OK what I really wanted isa title page like the stuff below. I wanted to have space between the lines. This was the reason for baselineskip. And the whole reason for messing around with the font sizes are the descriptions by google scholar that tell pdf producers to use fonts in different sizes for title and author and rest.               \documentclass[11pt,a4paper,fleqn,draft]{article}          \begin{document}          \begin{center}     {\LARGE\bf An \textit{a priori} Typology of Sentential Negation from\\[1mm] an HPSG Perspective}\\[\baselineskip]          {\large Joshua Crowgey}\\[\baselineskip]     University of Washington\\[3\baselineskip]                          Proceedings of the HPSG 2012 Conference\\[\baselineskip]          Department of Linguistics, Chungnam National University Daejeon, South Korea\\[\baselineskip]                                  Stefan M{\"u}ller (Editor)\\[\baselineskip]                                          2012\\[\baselineskip]                                    CSLI Publications\\[\baselineskip]                        http://csli-publications.stanford.edu/          \end{center}          \newpage          \end{document}


title: Delete some page numbers

text: How can I delete page numbers from only some pages? I've got some large figures which go over the margins, and have the page number superimposed.


title: Is there a way to apply different penalties to hyphenation points in a word?

text: Background: The quality of hyphenation points within a word can vary by a large amount. Especially in languages that allow rather arbitrary combinations of words, such as German. As an example, consider the English word _precondition_. Hyphenation after prefix _pre_ should be slightly preferred over any other hyphenation within the word stem _condition_. * * * The penalty associated with all potential hyphenation points is determined by `\hyphenpenalty`. How can `\hyphenpenalty` be changed (or augmented) locally so that TeX associates different penalties with hyphenations during line breaking? My first attempt was to put a `\penalty10` into a `\discretionary` command, like               pre\discretionary{-\penalty10}{}{}con\discretionary{-}{}{}di\discretionary{-}{}{}tion     \bye      But LuaTeX (the target engine) refuses to compile this:               This is LuaTeX, Version beta-0.76.0-2013120414 (rev 4627)  (format=luatex 2013.12.11)  3 APR 2014 15:09      restricted \write18 enabled.     **penalty.tex     (./penalty.tex     ! Improper discretionary list.     <recently read> }          l.1 pre\discretionary{-\penalty10}                                     {}{}con\discretionary{-}{}{}di\discretionary...     ?      The following discretionary sublist has been deleted:     \penalty 10      I have tried many alternative placements of `\penalty` or local assignments to `\hyphenpenalty`, such as               \discretionary{{\hyphenpenalty=10-}}{}{}      but none of them succeeded. Ideas? * * * More background: A fully manual solution is perfectly acceptable. If that can be found, the plan is to implement an automatic solution with the help of the padrinoma package, which provides support for pattern driven node list manipulations in LuaTeX. The package is still under development, but you might want to check-out the examples. Well, the question can be restated: How would a node list look like that associates different penalties with discretionary hyphens?


title: Phone number won't appear with achemso package except when fax is listed

text: I'm required to include a phone number with a corresponding author on the title page of a paper. The `achemso` package uses `\phone{}` to do this. The documentation states (on pg. 5) > The class will recognise the optional information \fax and \phone, which > will be printed along with the lead authors e-mail address. Note that this > information is only used for authors who have an e-mail address supplied. The MWE given by the documentation is the following:               \author{Second Bloke}     \email{second.bloke@some.place}     \phone{+xxx (0)yyy zzzzzz}     \fax{+xxx (0)yyy wwwwww}     \affiliation[University of Sometown]     {University of Somewhere, Sometown, USA}      My problem is this. I include `\email{}` and `\phone{}` but only the email will be displayed. It isn't until I include `\fax{}` that the the phone number will appear. Unfortunately, the fax number will also appear. **My question is** , can I simply display an email and phone number without printing the fax number? Here is my MWE:               \documentclass[journal=jpcafh]{achemso}     \setkeys{acs}{email=true}          \title{MWE: A Minimum Working Example}          \author{The Mighty Jingles}     \affiliation[Curbstompers Anonymous]     {123 Road St., City, State, 45678 USA}          \author{QuickyBaby}     \email{quickfingers@email.com}     \phone{+1 (555) 867-5309}     %\fax{+1 (555) 867-5310}     \affiliation[Curbstompers Anonymous]     {123 Road St., City, State, 45678 USA}          \begin{document}          \end{document}      **Note:** Uncommenting the fax line will get the phone to appear. I'm compiling with `latex -> dvips -> ps2pdf`.


title: Typeset URL in a non-typewriter font

text: I use `\usepackage{url}` and `\url{…}` to typeset URLs, but the typewriter font stands out a little too much. How can I have the URLs typeset in a different font?


title: Itemize environment of longtables?

text: I want to make a list of longtables. The example shows that the table is not indented and the bullet point is not next to the table. How can I do this? It works if I use a tabular environment but I need longtable because in my document the tables are sometimes quite long and should be automatically splitted at page breaks.               \documentclass{article}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{longtable}          \begin{document}          \begin{itemize}       \item \begin{longtable}[l]{ccc}               ABC & ABC & ABC             \end{longtable}             \blindtext     \end{itemize}          \end{document}      ![enter image description here](http://i.stack.imgur.com/5jqo9.png)


title: Postprocessing floating point numbers

text: A computed column, `columnWithFloatingPointNumbers`, is added to the table, `\table`. Then I am trying to compute geometric mean of this newly-added column. However I get this error:               ! Package PGF Math Error: Unknown operator `Y' or `Y1' (in '1Y1.1328e1]').      If I use `\pgfmathprintnumberto`, I get this error:               ! Package PGF Math Error: Could not parse input '$11.33$' as a floating point number, sorry. The unreadable part was near '$11.33$'..      Here is MWE:               \documentclass{article}     \usepackage{pgfplotstable}     \usepackage{multirow}          \begin{filecontents}{table.txt}     cA  P   Sp     A   16  15.1     B   4   3.2     C   8   6.7     D   4   3.5     E   16  10.9     F   8   7.2     \end{filecontents}               \begin{document}     \pgfplotstableread{table.txt}\table          \pgfplotstablecreatecol[create col/assign/.code={     \global\edef\tp{\thisrow{Sp}}     \global\edef\p{\thisrow{P}}     \pgfkeys{/pgf/fpu=true}     \pgfmathparse{\tp * 14.16 / \p}     \pgfkeys{/pgf/fpu=false}     \global\edef\entry{\pgfmathresult}     %\pgfmathprintnumberto[/pgf/number format/.cd,fixed,precision=2]{\entry}{\entryb}     \pgfkeyslet{/pgfplots/table/create col/next content}\entry     }]{columnWithFloatingPointNumbers}\table          \pgfplotstabletypeset[columns={cA, P, Sp,columnWithFloatingPointNumbers }, columns/cA/.style={string type},columns/cB/.style={string type},columns/columnWithFloatingPointNumbers/.style={column name={FP}, column type=l, numeric type}]\table      \end{document}      Here is MWE with geomean part: (I need the geomean part to work with the column `columnWithFloatingPointNumbers`)               \documentclass{article}     \usepackage{pgfplotstable}     \usepackage{multirow}          \begin{filecontents}{table.txt}     cA  P   Sp     A   16  15.1     B   4   3.2     C   8   6.7     D   4   3.5     E   16  10.9     F   8   7.2     \end{filecontents}               \begin{document}     \pgfplotstableread{table.txt}\table          \pgfplotstablecreatecol[create col/assign/.code={     \global\edef\tp{\thisrow{Sp}}     \global\edef\p{\thisrow{P}}     \pgfkeys{/pgf/fpu=true}     \pgfmathparse{\tp * 14.16 / \p}     \pgfkeys{/pgf/fpu=false}     \global\edef\entry{\pgfmathresult}     %\pgfmathprintnumberto[/pgf/number format/.cd,fixed,precision=2]{\entry}{\entryb}     \pgfkeyslet{/pgfplots/table/create col/next content}\entry     }]{columnWithFloatingPointNumbers}\table          \pgfplotstabletypeset[columns={cA, P, Sp,columnWithFloatingPointNumbers }, columns/cA/.style={string type},columns/cB/.style={string type},columns/columnWithFloatingPointNumbers/.style={column name={FP}, column type=l, numeric type}]\table           \foreach \col in {P} {% I want geomean for the column  columnWithFloatingPointNumbers         \pgfmathsetmacro\sum{0}%         \foreach \x in {1,2,...,6} {%                        \pgfmathtruncatemacro\ir{\x-1}  % get number without .0             \pgfplotstablegetelem{\ir}{\col}\of\table%             \pgfmathsetmacro{\val}{\pgfplotsretval}%                 \pgfkeys{/pgf/fpu=true}%                     \pgfmathparse{\sum + (ln \val)}%                 \pgfkeys{/pgf/fpu=false}%                 \global\let\sum\pgfmathresult%         }%         \pgfkeys{/pgf/fpu=true}%         \pgfmathparse{\sum /  6} %         \pgfkeys{/pgf/fpu=false}%         \global\let\sum\pgfmathresult%         \pgfkeys{/pgf/fpu=true}%         \pgfmathparse{exp \sum}%         \pgfkeys{/pgf/fpu=false}%         \global\let\sum\pgfmathresult%         \pgfmathprintnumberto{\sum}{\fsum}%         Geomean: \fsum     }%     \end{document}


title: Why should I use \usepackage[T1]{fontenc}?

text: As a native English speaker, I've mostly been allowed the luxury of pretending that ASCII is enough, and have been able to treat font encodings as not my problem. I've seen lots of advice that I ought to include `\usepackage[T1]{fontenc}` in my preamble. (See, for instance, p. 337 of The LaTeX Companion.) What isn't really adequately explained is why I ought to do so. So, if I am writing in English and have to make only occasional use of things like `G\"odel`, what does following the advice really get me?


title: removing page number for title page

text: I'm using `titlepage` to create a title/abstract page for a paper, and I don't want a page number to appear, so I use the following fragment:               \begin{titlepage}     \clearpage\thispagestyle{empty}       \maketitle          \begin{abstract}          \end{abstract}          \end{titlepage}      inside a default article class. While the page number resets correctly (so the second page is labelled '1'), the page number '1' still appears on the first page. I'm sure there's some obvious mistake I'm making here, and would be grateful for some help.


title: How to suppress page number on cover page?

text: > **Possible Duplicate:**   >  removing page number for title page I'm using the following code to create my front cover:               \documentclass[twoside,11pt,titlepage]{article}     \usepackage[paperwidth=5in,paperheight=7in]{geometry}     \usepackage{graphicx}     \usepackage[absolute]{textpos}     \begin{document}     \begin{textblock*}{400mm}(0mm,0mm)       \includegraphics[width=\paperwidth]{front.jpg}     \end{textblock*}     \end{document}      But I'm getting a page number '1' at the bottom of the front cover image. How can I suppress that?


title: How to create newcommand with Sanskrit Fonts

text: How to change font size in verse environment? I am working with these fonts (i.e. Aksharyogini / Nakula / Sanskrit 2003) When i replace \bfseries with any one of these I get error, what am I doing wrong. how would I work with these font types. thanks for your help                \newcommand\RedLine[1]{%       \textcolor{red}{\fontsize{8}{9.6}\selectfont\bfseries#1}       }


title: Tree using Latex

text: I want to to reduce the size of the node to which they perceived better in my presentation; the problem is that the nodes are overlap. I have the code from Drawing a tree where many nodes have the same child in TikZ :                 \begin{tikzpicture} [sibling distance=1.5cm]           \node [size=0.3cm](topnode) at (0,5) { {\{\{1\}\{2\}\}\{3\}\{4\}}\} }            child { node[size=0.3cm] {{\{\{1,2\}\{3\}\{4\}}\}} }           child { node[size=0.3cm] {{\{\{1,3\}\{2\}\{4\}}\}} }           child { node[size=0.3cm] {{\{\{1,4\}\{2\}\{3\}}\}} }           child { node[size=0.3cm] {{\{\{2,3\}\{1\}\{4\}}\}} }           child { node[size=0.3cm] {{\{\{2,4\}\{1\}\{3\}}\}} }           child { node[size=0.3cm] {{\{\{3,4\}\{1\}\{2\}}\}} }           ;                     \node[minimum width=3cm](bottomnode) {\{\{1,2,3,4\}\}} [grow'=up]           child { node[size=0.3cm] {{\{\{1,2,3\}\{4\}}\}} }           child { node[size=0.3cm] {{\{\{1,2,4\}\{3\}}\}} }           child { node[size=0.3cm] {{\{\{1,2\}\{3,4\}}\}} }           child { node[size=0.3cm] {{\{\{1,3,4\}\{2\}}\}} }           child { node[size=0.3cm] {{\{\{1,3\}\{2,4\}}\}} }           child { node[size=0.3cm] {{\{\{1,4\}\{2,3\}}\}} }           child { node[size=0.3cm] {{\{\{2,3,4\}\{1\}}\}} }           ;           \foreach \x in {1,2,3}{           \draw  [blue](topnode-1) -- (bottomnode-\x);           }                \foreach \x in {1,4,5}{           \draw (topnode-2) -- (bottomnode-\x);           }                \foreach \x in {2,4,6}{           \draw  [red] (topnode-3) -- (bottomnode-\x);           }           \foreach \x in {2,4,6}{           \draw  [red] (topnode-3) -- (bottomnode-\x);           }                \foreach \x in {1,6,7}{           \draw  [blue](topnode-4) -- (bottomnode-\x);           }                \foreach \x in {2,7,5}{           \draw  [red](topnode-5) -- (bottomnode-\x);           }                \foreach \x in {3,4,7}{           \draw (topnode-6) -- (bottomnode-\x);           }                \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/awC8H.png)


title: tikz-qtree and tikz trees not playing nice with each other

text: I have the following problem: I have tikz with tikz-qtree installed. Hence, if I draw a tree with q-tree it works perfectly. However, I have to recycle one drawing done without q-tree, so that the code looks like               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[every node/.style={circle,draw},level 1/.style={sibling distance=30mm},level 2/.style={sibling distance=10mm}]     \node {A}      child { node {B}       child { node {E} }      child { node {F} child { node {K} } child { node {L} } child { node {M}}}      child { node {G} }}      child { node {C}       child {node {H}}}      child { node {D} child {node {I}} child {node {J} child {node {N}} child  {node {O}}}}      ;      \end{tikzpicture}      \end{document}      This usually works if you don't have qtree installed, but if you do, then the level distance is ignored and the third level nodes z1 and t1 will overlap with each other. Is there any quick solution for that? TIA!


title: ToC for Part Heading Levels

text: I use `pdflatex` (TeX Live 2013). I try to make a book that contains 27 parts. It's in Russian. Only the last part has `\section` and `\subsection`. Also I need to have the title of the book on top page header in the odd pages and the name of books parts on top page header in the even pages. For compiling `\tableofcontents*` (without numbers, only parts names) I tried to use this solution. But it doesn't work fine in my case. The first page turns out to be blank page and numbered with '1', and the table of contents overlaps the bottom margin on the second page. Also it doesn't continue on the third page. It's just "gone". ![theres is a screenshot](http://i.stack.imgur.com/8OXrH.jpg). I used this code:               \documentclass[a4paper,twoside]{memoir}     \usepackage{tocloft}     \usepackage{tocvsec2}          \begin{document}           \setsecnumdepth{none}      \addtocontents{toc}{\protect\renewcommand{\protect\cftpartpresnum}{}}             \tableofcontents*          \part*{Name of the part 1}     \addcontentsline{toc}{part}{Name of the part 1}     \markboth{Name of book}{Name of the part}          \part*{Name of the part 2}     \addcontentsline{toc}{part}{Name of the part 2}     \markboth{Name of book}{Name of the part}      %-----------     \part*{Name of the part 27}     \addcontentsline{toc}{part}{Name of the part 27}     \markboth{Name of book}{Name of the part}     \section{Name of Section}     \subsection{Name of Subsection}          \end{document}      What am I doing wrong? Could somebody help me, please?


title: Indentation and page colors with standalone

text: ## Question I want to create a page whose size is cropped to the size of the content on the page. I also want to be able to have indented paragraphs and to set the color of text and background. Is there a way to do this? ## First Attempt My first attempt was to do this with the standalone package. Here is example code:               \documentclass[varwidth]{standalone}          \usepackage[usenames,dvipsnames]{xcolor}     \pagecolor{Apricot}     \color{Sepia}          \begin{document}     This is my first paragraph.      It is long enough to go on to the second line because I added a bunch of words to it.          This is my second paragraph.      Notice the lack of indentation.     \end{document}      This is the output it gives me: ![](http://i.stack.imgur.com/44jMY.png) Notice that the colors are as I intended, but there is no indentation. ## Second Attempt Researching this issue, I found this question, but when I tried to implement their solution as follows:               \documentclass[preview]{standalone}          \usepackage[usenames,dvipsnames]{xcolor}     \pagecolor{Apricot}     \color{Sepia}          \usepackage{etoolbox}     \edef\keptparindent{\the\parindent}     \patchcmd{\preview}       {\ignorespaces} %%% \preview ends with \ignorespaces       {\parindent\keptparindent\ignorespaces}       {}{}          \begin{document}     This is my first paragraph.      It is long enough to go on to the second line because I added a bunch of words to it.          This is my second paragraph.      Notice the colors are not right.     \end{document}      I get the following output: ![](http://i.stack.imgur.com/JArIK.png) as you can see the colors are not right.


title: Issue with arranging subtables

text: In this answer, there is a code provided for neatly arranging subtables inside a table. I tried that out and got the following error:                Missing number, treated as zero \begin{subtable}{0.5\linewidth}           Illegal unit of measure (pt inserted) \begin{subtable}{0.5\linewidth}      Could someone suggest how to resolve this issue? I have used the `subcaption` package. **EDIT** : Adding the code:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}     \usepackage{subcaption}     %opening     \title{}     \author{}          \begin{document}          \maketitle          \begin{table*}[ht]     \centering     \begin{subtable}{.5 \linewidth}\centering     {\small     \hfill{}     \begin{tabular}{|c|c|}     \hline     \textbf{Range of $I$} & \textbf{S}\\       \hline       1 & $A$\\       \hline       2 & $B$ \\       \hline     \ldots & \ldots \\     \hline     \end{tabular}}     \begin{subtable}{.5\linewidth}\centering     {\small     \hfill{}     \begin{tabular}{|c|c|}     \hline       \textbf{Range of $I$} & \textbf{D}\\       \hline       1 & $A$\\       \hline       2 & $B$ \\       \hline     \ldots & \ldots \\     \hline     % \end{tabular}}     \hfill{}     \caption{S vs I}     \label{tb:sw}     \end{table*}     \end{document}      **EDIT** : Adding the log file:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=latex 2011.11.1)  12 JUN 2012 12:25     entering extended mode      %&-line parsing enabled.     **ss.tex     (./ss.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov     ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1     9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san     skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn     orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian     , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po     rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty     Package: inputenc 2008/03/30 v1.1d Input encoding file     \inpenc@prehook=\toks14     \inpenc@posthook=\toks15          (/usr/share/texmf-texlive/tex/latex/ucs/utf8x.def     File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8     ))     (/usr/share/texmf-texlive/tex/latex/ucs/ucs.sty     Package: ucs 2004/10/17 UCS: Unicode input support          (/usr/share/texmf-texlive/tex/latex/ucs/data/uni-global.def     File: uni-global.def 2004/10/17 UCS: Unicode global data     )     \uc@secondtry=\count87     \uc@combtoks=\toks16     \uc@combtoksb=\toks17     \uc@temptokena=\toks18     )     (/usr/share/texmf-texlive/tex/latex/caption/subcaption.sty     Package: subcaption 2008/08/31 v1.0b Adding subcaptions (AR)               ! Package subcaption Error: `caption' package not loaded     (subcaption)                (which is needed by this package)          See the subcaption package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.38   \endinput}{}          If you do not understand this error, please take a closer look     at the documentation of the `subcaption' package.     Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          ) (./ss.aux)     \openout1 = `ss.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 9.     LaTeX Font Info:    ... okay on input line 9.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 9.     LaTeX Font Info:    ... okay on input line 9.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 9.     LaTeX Font Info:    ... okay on input line 9.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 9.     LaTeX Font Info:    ... okay on input line 9.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 9.     LaTeX Font Info:    ... okay on input line 9.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 9.     LaTeX Font Info:    ... okay on input line 9.      (/usr/share/texmf-texlive/tex/latex/ucs/ucsencs.def     File: ucsencs.def 2003/11/29 Fixes to fontencodings LGR, T3     )     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <12> on input line 11.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <8> on input line 11.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <6> on input line 11.               ! LaTeX Error: Environment subtable undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 \begin{subtable}                          {.45\linewidth}\centering     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ! Missing number, treated as zero.     <to be read again>                         }     l.15 \begin{subtable}{.45\linewidth}                                         \centering     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>                         }     l.15 \begin{subtable}{.45\linewidth}                                         \centering     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)          LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <7> on input line 16.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 16.          ! LaTeX Error: \begin{table*} on input line 13 ended by \end{subtable}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.27 \end{subtable}          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! LaTeX Error: Environment subtable undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.29 \begin{subtable}                          {.45\linewidth}\centering     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ! Missing number, treated as zero.     <to be read again>                         }     l.29 \begin{subtable}{.45\linewidth}                                         \centering     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>                         }     l.29 \begin{subtable}{.45\linewidth}                                         \centering     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               ! LaTeX Error: \begin{table*} on input line 13 ended by \end{subtable}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.42 \end{subtable}          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          [1          ] (./ss.aux)           *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     inputenc.sty    2008/03/30 v1.1d Input encoding file        utf8x.def    2004/10/17 UCS: Input encoding UTF-8          ucs.sty    2004/10/17 UCS: Unicode input support     uni-global.def    2004/10/17 UCS: Unicode global data     subcaption.sty    2008/08/31 v1.0b Adding subcaptions (AR)      ucsencs.def    2003/11/29 Fixes to fontencodings LGR, T3      ***********           )      Here is how much of TeX's memory you used:      503 strings out of 493849      7676 string characters out of 1152846      65732 words of memory out of 3000000      3835 multiletter control sequences out of 15000+50000      6983 words of font info for 25 fonts, out of 3000000 for 9000      714 hyphenation exceptions out of 8191      23i,8n,23p,325b,224s stack positions out of 5000i,500n,10000p,200000b,50000s          Output written on ss.dvi (1 page, 1156 bytes).


title: The mysteries of \mathpalette

text: I would like to make a macro, `\vfrac`, which output would look like:               $$\displaylines{       \displaystyle\raise.25ex\hbox{$\displaystyle1$}\!/\!\lower.5ex\hbox{$\displaystyle2$} \cr       \textstyle\raise.25ex\hbox{$\textstyle1$}\!/\!\lower.5ex\hbox{$\textstyle2$}\cr       \scriptstyle\raise.25ex\hbox{$\scriptstyle1$}\!/\!\lower.5ex\hbox{$\scriptstyle2$}\cr       \scriptscriptstyle\raise.25ex\hbox{$\scriptscriptstyle1$}\!/\!\lower.5ex\hbox{$\scriptscriptstyle2$}\cr     }$$      ![enter image description here](http://i.stack.imgur.com/fIJX0.png) I use the plain-format, so I tried to follow the TeXbook Appendix B:               \catcode`@=11     \def\vfrac#1#2{\mathpalette\vfr@c{#1}{#2}}     \def\vfr@c#1#2{\raise.5ex\hbox{$#1$}/\lower.25ex\hbox{$#2$}}     \catcode`@=12     $\vfrac{1}{2} \quad {}^{\vfrac12}$      which looks like ![enter image description here](http://i.stack.imgur.com/hRdZS.png) What is this I don't even... Oh wait, it looks like it's taking the "1" as the second argument. A quick search through tex.sx gives me Hendrik's question, where he just gives an empty first argument to `\mathpalette`. However, when I try that in my above macro, I get an error `! Argument of \vfr@c has an extra }.` I'm at loss. How does `\mathpalette` work?


title: How can I write % into a file?

text: How can I write `%` into an auxiliary file? `%` will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and `\%` will write `\%` into the file. How can it be accomplished?               \documentclass{article}     \begin{document}     \newwrite\outfile     \immediate\openout\outfile=example.dat     \immediate\write\outfile{%}% will not work, of course, but neither \%     \immediate\closeout\outfile     \end{document}


title: Which LaTeX font packages contain real small caps and work with the "microtype" package?

text: I'm wondering which font packages are available in MikTeX and TeXLive containing real small caps and also work together with the "microtype" package? For instance, `kpfonts` has real small caps but doesn't work with `microtype` as it complains that it doesn't work with non-scalable fonts. ## UPDATE It turned out there are no incompatiblity problems between `kpfonts` and `microtype` (see Getting strange error with MiKTeX when trying to use "kpfonts" package).


title: Resize braces arbitrarily

text: I'm trying to get arbitrarily big braces in some graphs I have to make, using Inkscape with the PDF+LaTeX option. The problem I have is that simply resizing a bracket makes it stretch: ![enter image description here](http://i.stack.imgur.com/jr43s.png) I'm aware that this may sound like an Inkscape question, but I'm trying to solve it with LaTeX (as opposed to a vector graphic approach). So, is there a way to arbitrarily "resize" the brackets without deforming it? I'm thinking about the end result of the `align` environment (vertical) or `overbrace`/`underbrace` (horizontal), but without really using any content to expand it (hence, arbitrarily). Something like: ![enter image description here](http://i.stack.imgur.com/hoihL.png)


title: Creating pagerefs referring to article version in beamer presentation

text: Is there any existing way to include references to page numbers in the supporting material in a beamer presentation? Assume that I have two files, one for generating the handout in `article` class, and one for the presentation which use a shared input file (along the lines suggested on page 206 of the `beamer` documentation). Assume further that the handout includes extensive source code/a complete derivation of a proof/a complete list of example sentences/a long table or similar in the handout which the audience will have in front of them. My idea would be to define a command `\hopageref{label}` that digs for the page number of `label` in the corresponding handout (i.e. `article`) file's `.aux` file, which would be used something like this:               \mode<article>{\label{longtable}         % include long table here         }     \mode<presentation>{(Details on page \hopageref{longtable})}      (this workflow would require to compile the handout before the presentation to assure correct page numbers, but that seems like an acceptable limitation.) Unfortunately, defining such a command exceeds my coding skills, but maybe something similar already exists?


title: Use of starred \ac commands in the acronym package

text: I'm trying to use the starred commands for the `acronym` package, i.e. `\ac*`, `\acs*`, `\acl*`, etc. But, I can't seem to get the package _not_ to set the `AC@used` flag (which I believe is used by the `acronym` package to track commands that are used in the document. Below is a minimum working example:               \documentclass{article}          \usepackage{acronym}     \newacro{TMN}{This Means Nothing}          \begin{document}          First use works as intended:          \ac*{TMN}          But the acronym is still marked as used:          \ac*{TMN}          \end{document}      The end result is something like this: > First use works as intended: > > This Means Nothing (TMN) > > But the acronym is still marked as used: > > TMN Any ideas? Or should I switch to the `glossaries` package?


title: Cannot copy text from the simplest PDF file?

text: Consider the following code:               \documentclass{article}     \begin{document}        We define multiplication by        $$v_1x = 0,\quad v_2x = v_1,\quad v_1y = -v_1,\quad v_2y = v_1$$     \end{document}      which looks like this > ![enter image description here](http://i.stack.imgur.com/IuO1I.jpg) It's as simple as it gets, but when I copy the content of the PDF I get:               We de??ne multiplication by     v1x = 0; v2x = v1; v1y = ??v1; v2y = v1     1      So there are 4 errors:   1. The **fi** in **define** disappears    2. , becomes ;   3. The minus sign is not being copied properly   4. Another 1 appears at the very end of the copied text How can I prevent this from happening? I use Texmaker with Miktex 2.9 and pdfLatex.


title: Latex answers package and cyrilic symbols in enumerate environment

text: I'm using both the answers package for an exercise book and Cyrillic symbols for 2nd level items. Here is my .tex code.               \documentclass[10pt, a4paper, openany]{report}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage{answers}          \begin{document}          \renewcommand{\theenumii}{\asbuk{enumii}}          \Newassociation{otv}{Otvet}{ans}     \Opensolutionfile{ans}[C1.ans6]          \begin{enumerate}         \item              \begin{enumerate}                 \item Excercise 1a)                     \begin{otv}                         answer 1a)  \end{otv}                 \item Excercise 1b)                     \begin{otv}                         answer 1a)  \end{otv}             \end{enumerate}     \end{enumerate}          \Closesolutionfile{ans}          Answers:     \input{c1.ans6}          \end{document}      and this error occurs               ...\c1.ans6.tex:1: Undefined control sequence. [\begin{Otvet}{1.1.\T2A\cyra )}]      Answers file contains the following:               \begin{Otvet}{1\T2A\cyra }                     answer 1a)       \end{Otvet}     \begin{Otvet}{1\T2A\cyrb }                     answer 1a)       \end{Otvet}      Could anyone help me to deal with this problem?


title: Line spacing inside quote environment

text: I use the `setspace` package to set double spacing throughout the document. It also sets double spacing inside the `quote` environment. But, I want one half space inside the `quote` environment. How can this be done? EDIT 1: If changing font size and font type is also included with the answers, then this Q&A thread will be little more comprehensive.


title: How to put figures inside text?

text: I want to put figures (controller button icons) beside text, for a game manual, like this image: ![screenshot](http://i.stack.imgur.com/qE4nk.png) source: http://www.zeldacapital.com/manual/ootmanual.pdf page 17


title: How to show work on binary number addition/conversion

text: I'm doing various operations with binary numbers for my Discrete Mathematics hw and I'm not quite sure how to render it because I need to show my work. This is an image of something I've been trying to show: ![screenshot](http://i.stack.imgur.com/4pByV.jpg) I am also trying to add and multiply numbers and show work. I appreciate all of your help!


title: Is there a LaTeX editor capable of synctexing a live preview from an included or inputted or subfiled chapter02.tex?

text: As a beginner... I thought I had settled for the distraction-free `Gummi`; but now I'm unsure, as I gather it's not so great for larger, modularized documents, such as writing a thesis: `Gummi`'s live preview works great, _as long as_ I'm working on a single `main.tex`, but _not_ in the modular writing case, when I'm editing, say, `chapter02.tex`. What makes matters worse is that switching tabs _resets the position of the preview_. Is there a LaTeX editor capable of synctexing a live preview when editing an   * included,   * inputted _- or -_   * subfiled `chapter02.tex` document?


title: TikZ and different alignments on the same line

text: This is my minimal example:               \documentclass{article}      \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node[draw=black, rounded corners=2pt, rectangle, bottom color=black!80!white, text width=12cm]         {text aligned on left margin  t.a. on the right margin};     \end{tikzpicture}     \end{document}      I'd like to have the first part of the text aligned on left margin of the node and the second on the right, but if I use for the second part the command `\begin{flushright} ... \end{flushright}` I get it on the next line. How can I get the whole text on a single line?


title: How to type primed sum?

text: I need to type a "primed sum" (a summation symbol with a ' at the top right corner of the summation symbol) in latex. How can I do this?


title: Positioning of text (box) relative to other text

text: I'm looking at the first, 'letter class' example in LaTeX/Letters - Wikibooks, open books for an open world. What I'd like to do is to use a `\newcommand` - say, `\insertbox` - which would be inserted somewhere in the `\adress` statement, e.g.:               ...     \address{\insertbox{}21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}     ...      ... and in the definition of `\insertbox`, have four lines of text (say, `21 Bridge Street \\\ Smallville \\\ extra line \\\ Dunwich DU3 4WE`), which will have width of, say, 2.5 cm; positioned to the left of the address lines, and the first line of the (left) box text is aligned to the first line of the address text. What would be the recommended way to do this? PS: For reference, I'm hotlinking the page image of the example below: ![example letter page](http://i.stack.imgur.com/dNRAr.png) EDIT: The position of the box with red outline is what I'd like to achieve: ![letter_example](http://i.stack.imgur.com/PedhN.png) The text in there is pointless ( _I just quickly copy pasted a portion of the image in`gimp`_) - but that is what should be specified through the `\insertbox` command.


title: How to add legend to contour plots?

text: The following does not work:               \documentclass{standalone}     \usepackage{tikz,pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[view={0}{90},legend entries={foo,bar}] % 'legend entries' causes compilation error     \addplot3[contour gnuplot={draw color=red,labels=false}]  {x*y};     \addplot3[contour gnuplot={draw color=blue,labels=false}] {x^2 + y^2};     \end{axis}     \end{tikzpicture}     \end{document}


title: Difference between \\ and \tabularnewline

text: What is the difference between `\\\` and `\tabularnewline`? Is it same as the difference between `\\\` and `newline`? Is `\tabularnewline` preferred over `\\\` when creating tables?


title: Best Windows tool for managing .bib files to be later processed by biblatex?

text: I think this topic is not specifically covered by none of the existing questions about `biblatex`. Sorry if I am wrong. I am planning to use `biblatex` to include and manage references in my LaTeX document. I already have the source for my references in a `.bib` file that is produced by Mendeley. I am quite happy with the results till now, but I would like to ask a generic question (so, there is no _minimal working example_ , sorry). I've read in `biblatex` help that `biblatex` has its own data model, although it is nearly fully compatible with classical BibTeX data model. Anyway, I wonder if there is a Windows (or multiplatform) program for managing `.bib` files (or that can generate `.bib` files) that is more appropriate when those `.bib` files are going to be processed by `biblatex` package. If so, which is the best one, in your opinion and according to your experience?