title: Vertically align two boxes based on their top borders, not on baseline

text: I have two boxes which to shows text to the left and right of a document.               \begin{minipage}[t][1in][t]{2in}     {\Huge First line box 1}\\     {\footnotesize Second line box 1}     \end{minipage}     \hfill     \begin{minipage}[t][1in][t]{2in}         \begin{flushright}     {\footnotesize     First line box 2\\     Second line box 2     }     \end{minipage}      These boxes align based on the baseline, however it looks ugly because of the huge text of box 1. I know I can raise box 2 a bit with `\raisebox` so that they are aligned based on top border of box 1, but it's kind of hacky. Is there any more elegant way to do it?


title: reference to tex document

text: is there any way where i can put a label on a full latex document and refer to it in another tex file. e.g. `supplement.tex`               \documentclass[review,12pt]{article}     \usepackage{graphicx}     \begin{document}     \label{supplement1}               something          \end{document}      and in the main document `main.tex` do something like:                   \documentclass[review,12pt]{article}         \usepackage{graphicx}     \externaldocument{supplement}         \begin{document}                   something is refered from Supplement file~\ref{supplement1}              \end{document}      _**EDIT_** thanks for your comments, what i basically want is not to refer to a section or chapter in another document, but i want to refer to the whole document.


title: Why does \hss fail?

text: Please why does the following fail?               % \hss -> \hskip 0pt plus 1fil minus 1fil     \setbox0=\hbox{a}%     \setbox0\hbox to 10mm{\hss\unhbox0\hss}     \unhbox0      And what makes LaTeX's               \def\bm@c{\hss\unhbox\@tempboxa\hss}      different? **EDIT** The following schemes work               \newbox\boxa     \newbox\boxb     \setbox\boxa=\hbox{a}%     % Case 1     \setbox\boxb\hbox to 10mm{\hss\unhbox\boxa\hss}     x \box\boxb y      and               % Case 2     \setbox\boxb\hbox to 10mm{\hss\box\boxa\hss}     x \unhbox\boxb y      I just wonder why `\unhbox\boxb` gives an error in case 1. When precisely is `\hss` evaluated? Inside or outside the box? TeX by Topic (Section 18.3.1) says that               \leftskip=0cm plus 0.5fil \rightskip=0cm minus 0.5fil      gives the error "infinite shrinkage..." But this doesn't seem to have a direct link with the issue in question.


title: Some assignments in the definition of \parbox

text: Why are these assignments necessary in the LaTeX's definition of `\parbox`?               \let\hss\vss\let\unhbox\unvbox      **EDIT** I should have added that I wondered if the assignments will affect any in- parbox calls (i.e., calls made by the parbox material) to the original definitions of the macros `\hss` and `\unhbox`, since compatibility problems might arise.


title: How to compose figure from text with latex?

text: I have an ascii image like               +---------------     |  xxxxxxx     +---------------     |  xxxxxxx     +---------------      I want to show this in figure environment. So currently I try like this:               \begin{figure}         \lstinputlisting{src.ascii}         \caption{xxx}         \label{fig:xxx}     \end{figure}      which works, except for some subtlities with `table of listings` and `table of figures` settings. The above codes treat `src.ascii` as listing which counters my mind that `src.ascii` is, exactly, a figure. I think I should either export the ascii file as an `eps` file or set `listing` package to omit some source input. How could I achieve it? Thanks and Best regards. * * * A MWC               \documentclass{report}     \usepackage[procnames]{listings}          \begin{document}          \lstlistoflistings     \listoffigures          \begin{figure}         \lstinputlisting{xxx.ascii}         \caption{xxx}         \label{fig:xxx}     \end{figure}     \end{document}      And an example ascii image:               +-----------------+     |                 |     +-----------------+


title: Possible to remove section number and page number from TOC?

text: I would very much like that the the appendix sections of the Table of Contents doesn't have a section numbers, dots, and page numbers. If I do the following               \documentclass{article}     \usepackage{tocloft}     \addtocontents{toc}{\cftpagenumbersoff{section}}     \renewcommand{\cftdot}{}     \begin{document}     \tableofcontents     \newpage     \section{Appendix}     \section*{Another Letter} \addcontentsline{toc}{section}{Another Letter}     \end{document}      then the section "Another Letter" is left aligned, so it doesn't look like the others. **Question** Is it possible to have "Another Letter" styled the same way as normal TOC entries, but just without section number, dots, and page number?


title: Verbatim environment and line-breaking

text: I've been wondering about how to display simple codes. I used `verbatim` and then found the `fancyvrb` package which added a lot of nice little features, but then I inserted some code with a long line and it did not break. I looked around and found that this was apparently a problem with this package, and thus looked for alternative ways to display code, and found `listings` (I found that it displayed the code strangely, I like the typewriter look of verbatim) and `minted` coupled with the `Pygments` Python tool (but I never got it to work with winshell). While looking at the 'listings' documentation I saw the 'fancyvrb' listed as an alternative, and in the description it said > The package provides frames, line numbers on the left or on the right, > automatic line breaking (difficult)... This question does not get an answer to the question of how to break lines using the `fancyvrb` package. I googled around and found this solution which provides a way to have automatic line-breaking in the `verbatim` environment, but this solution does not work with the `fancyvrb` package. So the question is: The `listings` documentation hints at a way to have automated line-breaking in the `fancyvrb` package, does anyone know how?


title: Auctex go to corresponding block between pdf and tex file

text: Texshop's `CMD+Click` can take you to the location of the current texts on its pdf/tex file. I am wondering how to do this in emacs/auctex?


title: Move figure away from the first page

text: In my LaTeX document, I don't want any figures on the first page. Is there a way to enforce this requirement?


title: Different Behaviors Digesting \csname x\endcsname and Digesting \x (expansion issue)

text: This question has been significantly EDITED, as I learned more of the problem. * * * If I was good, I would be able to create macros with multiple optional arguments, but not only can't I, but in this case, I'm trying to adapt an existing structure. I wrote the `boxhandler` package to be able to tune figure/table captions layouts (in particular, to a strange style my organization has). That aside, the syntax for a figure is               \bxfigure[htbp]{caption}{figure content}      Someone has requested the ability to use `\caption`'s optional argument, which this present structure does not allow. So I thought I could provide a syntax that works with the above syntax or with the following               \bxfigure[htbp]{[LOF caption]full caption}{figure content}      The code I thought would have done that is               \documentclass{article}     \usepackage{boxhandler}     \usepackage{etoolbox}     \makeatletter     \renewcommand\bx@caption[1]{%     \expandafter\optcaption\expandafter[#1]\relax%     }          \def\optcaption[#1]#2\relax{%     \ifstrempty{#2}{\caption{#1}}{\caption[\@gobble#1]{\striptrailingbracket#2}}}     %\ifstrempty{#2}{Full caption is \fbox{#1}}     %  {LOF caption is \fbox{\@gobble#1} Full caption is \fbox{\striptrailingbracket#2}}}          \def\striptrailingbracket#1]{#1}     \makeatother     \begin{document}     \listoffigures          %\def\x{my caption}     %\expandafter\optcaption\expandafter[\x]\relax          \def\x{[LOF caption]my caption}     %\expandafter\optcaption\expandafter[\x]\relax          \bxfigure[h]{my caption}{\fbox{TEXT}}     \bxfigure[h]{[LOF caption]my caption}{\fbox{TEXT}}     \bxfigure[h]{\x}{\fbox{TEXT}}     %\optcaption[[LOF caption]my caption]\relax     \end{document}      ![enter image description here](http://i.stack.imgur.com/Q9XRz.jpg) but as you see, the `\optcaption` parser does not extract the bracketed content from the argument, and always thinks the `#1` argument of `\def\optcaption[#1]#2\relax{}` is without a right bracket. To make the problem simpler, I studied the behavior of `\optcaption` specifically, apart from including it in `\bxfigure`. And here,               \documentclass{article}     \usepackage{boxhandler}     \usepackage{etoolbox}     \makeatletter     \renewcommand\bx@caption[1]{%     \expandafter\optcaption\expandafter[#1]\relax%     }          \def\optcaption[#1]#2\relax{%     %\ifstrempty{#2}{\caption{#1}}{\caption[\@gobble#1]{\striptrailingbracket#2}}}     \ifstrempty{#2}{Full caption is \fbox{#1}}       {LOF caption is \fbox{\@gobble#1} Full caption is \fbox{\striptrailingbracket#2}}}          \def\striptrailingbracket#1]{#1}     \begin{document}          All of these work...\par     \bx@caption{[LOF caption]my caption}\par     \def\x{my caption}     \bx@caption{\x}\par     \def\x{[LOF caption]my caption}\par     \bx@caption{\x}\par     ~\\The following does not work (and boxhandler passes the caption via a      csname; this is the root of the problem)\par     \bx@caption{\csname x\endcsname}\par     ~\\This fixes it, but it requires me to change the code that calls bx@caption\par     \expandafter\bx@caption\expandafter{\csname x\endcsname}     \end{document}      ![enter image description here](http://i.stack.imgur.com/JvQ6t.jpg) we see that it is able to detect the `]` and extract the optional argument, even when that argument is passed by way of a macro `\x`, but not when it is passed as `\csname x\endcsname`. * * * So I suppose I can go back and change the `boxhandler` calls to `\bx@caption` to pre-expand the `\csname` as I did in my last example (see my answer below). **But if anyone can rewrite`\bx@caption` to be able to properly digest a `\csname` argument (without patching `\ReciteFigure`), I will accept that answer.**


title: Generated Figure seems cut when using tikzexternalize

text: When I use the following code, the Figure seems cut, as from a too tight bounding box.                   \documentclass{article}              \usepackage{pgf}         \usepackage{tikz}         \usepackage{pgfplots}              \usetikzlibrary{shapes,arrows}         \usetikzlibrary{calc}         \usetikzlibrary{external}         \tikzexternalize              \usetikzlibrary{positioning}          \tikzstyle{seed}=[-latex,red, thick]         \tikzstyle{ray}=[green!50!black,dotted,thick,-latex]                   \begin{document}         \newcommand{\door}[1] {           \begin{scope}[shift={#1}]           \draw[red] (-0.5,0) arc (180:270:1cm);           \draw[black] (0.5,-1) -- (0.5,-0) node[right,  near start]{};           \draw[black,dotted] (-0.5,0) -- (0.5,-0)node(doorstepcenter)[pos=0.5]{} ;           \end{scope}         }              \newcommand{\room}{          \coordinate (a1) at  (4.5,0.5);          \coordinate (a2) at  (4.5,4);          \coordinate (a3) at  (0,4);          \coordinate (a4) at  (1,3);          \coordinate (a5) at  (1.4,3)  ;          \coordinate (a6) at  (1.4,2.6)  ;          \coordinate (a7) at  (1,2.6)  ;          \coordinate (a8) at  (1,3);          \coordinate (a9) at  (0,4);          \coordinate (a10) at  (0,0.5) ;          \coordinate (a11) at  (4.5,0.5);         }              \begin{tikzpicture}%[node distance =4.5cm,thick]            \room; %just get the door           \door{ ($ (a10)!0.5! (a1) -(0,0.1)  $) };                \coordinate (r1) at (a6);           \coordinate (r2) at (a7);           \coordinate (ray) at  ($ (r1)!.3!(r2) $);           \draw[ray] (doorstepcenter.center) -- (ray)  node [below=10pt, midway]{ray};           \path (a1)--(a2) node[pos=0.5,left,text width = 3cm, text centered]{Polygon cannot be closed };           \draw[seed] (r1) -- (r2);            \draw[thick] (a4) -- (a5);           \draw[thick] (a5) -- (a6);           \draw[seed] (a7) -- (a8);           \draw[seed] (a8) -- (a9);           \draw[seed] (a9) -- (a10);           \draw[seed] (a10) -- (a11);           \draw[seed] (a11) -- (a2);           \draw[seed] (a2) -- (a3);         \end{tikzpicture}        \end{document}      ![The arrows left and right seem cut](http://i.stack.imgur.com/KT4C0.png) The arrows left and right seem cut. Where does this come from and how can it be avoided ?


title: Angled line problem in Tikz

text: I want to create two angled lines in my free-body diagram, but one of them jumps around the page when I give it an angle. Why is that and how can I solve it? Here is the MWE               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}          \title{42}     \author{Jane Doe}     \date{June 2011}          \begin{document}          \begin{tikzpicture}       \draw(0,0) circle (0.25cm);       \draw(4,0) circle (0.25cm);       \draw[->] (0,0) -- (-1,0) node[above,near end] {$\vec{F_{21}}$};       \draw[->] (4,0) -- (5,0) node[above,near end] {$\vec{F_{12}}$};       \draw[->] (0,0) -- (0,-0.5) node[right,near end] {$\vec{W}$};       \draw[->] (4,0) -- (4,-0.5) node[left,near end] {$\vec{W}$};       \draw[->,rotate=70] (0,0) -- (1,0) node[right,near end] {$\vec{T}$};       \draw[->,rotate=-70] (4,0) -- (3,0) node[left,near end] {$\vec{T}$};     \end{tikzpicture}          \end{document}


title: Alignment in math environment

text: Consider the following piece of code               \documentclass[twocolumn]{article}          \usepackage{amsmath}          \begin{document}          \begin{align*}     A_i &= B_i + C_i\\     &= D_i + E_i+F_i + G_i + H_i\\     &= I_i + J_i+K_i + L_i\\     &\hspace{5.5em},\;i=1,\dotsc,m     \end{align*}          \end{document}      which produces the following output using `pdfLaTeX` ![](http://i.stack.imgur.com/ZCOR5.png) I would like to automatically align the final line, i.e., `i=1,...,m`, exactly as in the previous picture (in this example far right is at `H_i`), without manually setting an `\hspace{xx}` each time. How can I do that?


title: How to add vertical space between two lines of tables

text: \documentclass[11pt]{article}          \usepackage{tabu}     \usepackage[inline]{enumitem}          \begin{document}          \section{abc}     \begin{enumerate}       \item         \begin{enumerate*}           \item             \begin{tabu}[t]{c|c}               \firsthline               $p$ & $p \to \neg p$ \\               \hline               T & F \\               F & T \\               \hline             \end{tabu} \\           \item             \begin{tabu}[t]{c|c}               \firsthline               $p$ & $p \leftrightarrow \neg p$ \\               \hline               T & F \\               F & F \\               \hline             \end{tabu}         \end{enumerate*}       \item         This is the second item.     \end{enumerate}          \end{document}      I use inline enumerate to put multiple tables in a line and use forced linebreak when needed. The vertical space between two lines of tables are too small. How to make it bigger?


title: Generate list of undefined control sequences/used newcommands

text: I have a long tex file which uses many newcommands/providecommands sourced in from a separate file using `\input{}`. To upload to a preprint server I would like to keep only those commands which are really needed. Therefore I wonder how to generate a list of newcommands names to extract from the input file. Assuming all of these are defined as single lines it would be quite easy to extract them. My first approach was to comment the `\input`-statement to get a list `Undefined control sequence` errors and to generate the list from it. However the latex output is a little difficult to parse. Is there a switch to latex which allows me to extract a useful list more easily or some different approach?


title: Repeated text watermark on the whole page

text: I'm want to put a repeated short text on the whole page as watermark... I've read the `xwatermark` guide but didn't find anything helpful. Any idea how to handle that?


title: Texportal on Android

text: I read your comment on the TeXPortal-site (How to install TeX on android phones?). I would also like to have `TeX` on my Android tablet, and thus would like to know what exactly you did that it worked. I downloaded `TeXLive` on a `Linux` device, copied it to `/sdcard/texlive` (I have a folder on my device now that is named `TeXLive` on my sdcard. it contains the folders `texmf-dist`, `-var`, `-local`, `tlpkg` etc.) on my tablet (without the docs but with the source), installed TeXPortal, and it still gives me a `missing texmf.cnf`. Even though I changed the `TEXMFROOT` to `/sdcard/texlive`, and tried changing it in `texmf-dist/web2c/texmf.cnf` also to that value, and even tried changing the directory, which was given in TeXPortal-Settings (`storage/.../data/lah.texportal/files`) as the `TEXMF` Root to `sdcard/texive` - nothing did help. It says that `kpathsea` is missing, installs it, and then comes the missing `texmf.cnf`. Is it necessary to have the device rooted? As far as I understood, this was not necessary. Thanks for some advice ;) Best regards J


title: LaTeX, package documentation look-up

text: I am on OS X (10.6 Snow Leopard) using TeXLive-2011 to typeset a simple .tex file I am editing in Vim and trying to learn. My problem is: how do I...   1. gradually learn about what TeX can do for me   2. get detailed information about how I can use a specific command (e.g. get the full "command syntax" of url{...} An example follows, to be specific and contextual: A. I discovered there is a "url" command through a Google search, how can I get a "list of commands/packages"? B. I update my "packages" using TeX Live Utility.app, is this the "right" way to do it? C. To find out how to use "\url{...}" again I just "Googled", got to this address: http://www.ctan.org/tex-archive/macros/latex/contrib/url and in a file with an .sty extension, in a comment section, I discovered some usage hints:               Usage:    Conditions:     \url{ }   If the argument contains any "%" or "^^", or ends with               "\", it can't be used in the argument to another command.               The argument must not contain unbalanced braces.     \url|  |  ...where "|" is any character not used in the argument and not               "{" or a space.  The same restrictions as above except that the               argument may contain unbalanced braces.     \urldef\xyz\url{ }     \xyz      a defined-url: "\xyz" can be used anywhere, no matter what               characters it contains.     \DeclareUrlCommand\abc{settings}: makes \abc{ } like \url{ }     See further instructions after "\endinput"      _Could I have not got to this information in a simpler way?_ Just by "somehow asking for help on url"? This is the crux of my problem, really. I wish there was something like "JavaDoc" or a "built-in help system" akin to what I get using Eclipse and installing JavaDoc jars and attaching source documentations. Point-and-click access to documentation about packages. If the Eclipse analogy is foreign to you, think Xcode built-in doc system or even the excellent MSDN-to-VS.NET integration. Is anything like that available for LaTeX? I can pre-generate things like what one does with Sphinx and Python if need be...


title: TeX Live directory structure

text: > **Possible Duplicate:**   >  LaTeX, package documentation look-up This information must be somewhere on the Internet, but I am not able to Google it ... I am using `amsmath` with TeX Live (Ubuntu in case that is relevant). Specifically I want to use `amsart`. I know there comes sample documents with the installation, which (together with other documentation) must live somewhere in the huge directory tree TeX Live is using. I have been looking under `/usr/share`, but cannot find anything pertaining to `amsmath` (nor to other installed package for that matter!) Where are they living? And where on the Internet is such information?


title: How to get rid of the hyphenchar in XeLaTeX

text: I have the following `TeX` file which runs on `XeLaTeX`:               \documentclass{article}          \usepackage{fontspec}     \usepackage{polyglossia,xltxtra}          \setdefaultlanguage{malayalam}     \setmainfont[Script=Malayalam,Mapping=tex-text]{Rachana}% Downloaded from http://download.savannah.gnu.org/releases/smc/fonts/malayalam-fonts-5.0/Rachana/Rachana.ttf          \begin{document}     ആധുനികവ്യവസായം ലോകകമ്പോളം സ്ഥാപിച്ചിരിക്കുന്നു. അമേരിക്ക കണ്ടുപിടിക്കപ്പെട്ടതാണ് അതിനു് വഴിതെളിയിച്ചതു്. ഈ കമ്പോളം വ്യാപാരത്തിനും കടൽമാർഗ്ഗേണയും കരമാർഗ്ഗേണയുമുള്ള ഗതാഗതത്തിനും വമ്പിച്ച വികസനം നൽകി. ഈ വികാസമാകട്ടെ വ്യവസായത്തിന്റെ വിപുലീകരണത്തെ സഹായിച്ചു. മാത്രമല്ല, വ്യവസായവും വ്യാപാരവും കപ്പൽഗതാഗതവും റെയിൽവേകളും വളർന്ന തോതിൽത്തന്നെ ബൂർഷ്വാസിയും വളർന്നു: അതിന്റെ മൂലധനം പെരുകി; മദ്ധ്യയുഗത്തിന്റെ സന്തതികളായ എല്ലാ വർഗ്ഗങ്ങളേയും അതു് പിന്നോക്കം തള്ളിനീക്കി.     \end{document}      The output looks like: ![Output with problem marked](http://i.stack.imgur.com/lEAOj.jpg) I want to get rid of the hyphen characters appearing at the end of the line. I do not need the hyphen character where a word break into two lines. When I tried the following:               \setmainfont[Script=Malayalam,Mapping=tex-text,,HyphenChar="00]{Rachana}       the hyphen character disappeared and the output looks fine. Is this a right way?


title: writing to \jobname.aux using LaTeX3

text: In LaTeX2e, one can write to the standard auxiliary file via the `\@auxout` file handle. Are there dedicated LaTeX3 functions (planned) that facilitate writing to `\jobname.aux` or is there an equivalent `\@auxout` file handle in LaTeX3 we can use with the functions from the `l3file` package?


title: tikz command fails after .cls file change

text: The following tex content is a part a tex file which is added to main file with command `input`. With a new .cls and some other unrelated changes, tex isn't compiling with error message of               ! Package pgfkeys Error: I do not know the key '/tikz/every node/.style={align=     center}' and I am going to ignore it. Perhaps you misspelled it.      The related tex is as follows.               \newcommand{\graphitemize}[2]{%     \begin{tikzpicture}     [every node/.style={align=center}]         \node[minimum size=3.0cm,circle,fill=gray!40,text=white,outer sep=1cm,inner sep=.5cm,very thick](ce){#1};       \foreach \gritem [count=\xi] in {#2}     {\global\let\maxgritem\xi}       \foreach \gritem [count=\xi] in {#2}     {%      \pgfmathtruncatemacro{\angle}{360/\maxgritem*\xi}     \edef\col{\@nameuse{color@\xi}}     \node[circle,          ultra thick,          draw=white,          fill opacity=.6,          fill=\col,                  minimum size=3cm] at (ce.\angle) {\gritem };}%               \end{tikzpicture}       }%     \graphitemize{Alignment}{Organizational\\Strategy,Enterprise \\Architecture,Business \\ Process\\Management,Requirements\\ Engineering}      Minimal Working Example is shared in here. main.tex is the working tex file, while main2.tex has compile error. Only the `\documentclass .cls` file is different.


title: Multiple citation-keys in biblatex \parencite abbreviates authors

text: I use Emacs/Auctex/Biblatex/Jabref and encountered the following problem: If I have more than four citations, separated by comma, in a `\parencite`, the citations suddenly are shown with the abbreviated first name: With 4 citations it looks like: > Arnott and Rowse 2009; Arnott and Inci 2006; Arnott and Rowse 1999; Arnott > 1998 With 5 citations it looks like: > R. J. Arnott, Palma, and Lindsey 1991; R. Arnott and Rowse 2009; R. Arnott > and Inci 2006; R. Arnott and Rowse 1999; R. Arnott 1998 Is this a bug or a feature?


title: csvsimple usage in beamer class

text: Why does this work               \documentclass{beamer}     \usepackage{filecontents,csvsimple}          \begin{document}          \begin{filecontents*}{chunk.csv}     line one     line two     line three     \end{filecontents*}          \csvreader[no head]{chunk.csv}{}{         \begin{frame}             \csvcoli         \end{frame}     }          \end{document}      while this doesn't:               \documentclass{beamer}     \usepackage{filecontents,csvsimple}          \begin{document}          \begin{filecontents*}{chunk.csv}     line one     line two     line three     \end{filecontents*}          \csvreader[no head,before line=\begin{frame},late after line=\end{frame}]{chunk.csv}{}{\csvcoli}          \end{document}


title: Start Section page different style

text: I'm using the `fancyhdr` package for writing a document and I'd like each section of the document to start at half page (even better if I could decide height), and the section's name and number to be flushed on the right part of the page. Furthermore, in the starting page of a section I'd like to remove the header, and have the number of the page on the bottom and not in the top. What a new section is like in my case: ![enter image description here](http://i.stack.imgur.com/WNVw8.png) what I'd like it to be (don't mind the style, just the position of title and section number): ![enter image description here](http://i.stack.imgur.com/HfXWg.png) should I use a certain package or are there some commands I should use at the beginning of each section?


title: How to add border for an image?

text: I use `\includegraphics` command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation.


title: Diagonal strikeout starting too low and ending too high

text: I want to strikeout an equation with diagonal line but I've not managed to get the diagonal line to draw as I want. The closest I've gotten is via the first example in Frédéric's answer of \cancel draws under thing being canceled:               \documentclass{minimal}          \usepackage{tikz}          \newcommand{\hcancel}[1]{%         \tikz[baseline=(tocancel.base)]{             \node[inner sep=0pt,outer sep=0pt] (tocancel) {#1};             \draw[red] (tocancel.south west) -- (tocancel.north east);         }%     }%          \begin{document}          \begin{equation}\label{eq:2}     \hcancel{$h_1 \land h_2 \land h_3 \land h_4 \land h_5 \land h_6 \land h_7 \land h_8 \land h_9 \land h_{10}$}     \end{equation}          \end{document}      This produces: ![Line starts too low and ends too high](http://i.stack.imgur.com/LfIQ1.png) But the line starts too low and ends too high. The following is what I want: ![The line as I want it to draw](http://i.stack.imgur.com/deRr6.png) I'd be happy for an option to make the line start slightly earlier and end slightly later too.


title: biblatex: purge author and display "with" co-authors

text: I am a newbie with `biblatex`, and would like to accomplish the following: For a reference that is typically displayed as: > Blastname N., Alastname N. and Clastname N., Title of article, Journal of > Something, p.5-15, 2012 I would like to redefine the display as follows: > Title of article, with Alastname N. and Blastname N., Journal of Something, > p.5-15, 2012 (i.e., always purge author Clastname N.)


title: vertical spacing on enumitem

text: In the example below I want the enumerate list to essentially be ``inline'' with the word Example from the example environment. It works perfectly with text or enumerate* (inline list), but I cannot seam to figure out how to control some the remainder of the spacing created by the enumerate environment.               \documentclass{article}       \usepackage{amsthm}       \usepackage{enumitem}       \usepackage{hyperref}         \theoremstyle{define}           \newtheorem{example}{Example}     \begin{document}     \begin{example}       \fbox{\parbox[t]{9cm}{         \begin{enumerate}[label=(\arabic*),nosep]           \item The duplicate ratio of $2a:3b$ is $4a^2:9b^2$.           \item The subduplicate ratio of $49:25$ is $7:5$.           \item The triplicate ratio of $2x:1$ is $8x^3:1$.         \end{enumerate}       }}     \end{example}     \begin{example}       \fbox{Can you see the difference?}     \end{example}     \end{document}


title: Vector Formulas Representation in Latex

text: I want to write different formulas related vectors like subtraction, addition in latex, but don't know how to do this as I am new to Latex. I searched a lot but did not find any useful result.


title: Problem with tabularx

text: The following code does not work ??               \documentclass[a4paper]{book}          \usepackage{tabularx}          \begin{document}     \newcommand{\vrulehg}[1]     {\makebox[#1][c]{\rule{1pt}{0.5cm}}}% rule for vertical bar cell          \newcommand{\hrulehg}[3]{% hgrule{5cm}{c}{2}     \newdimen\wwo\wwo=#1%     \newdimen\wwl\wwl=\wwo\divide \wwl by #3%     \makebox[\wwo][#2]{\rule{\wwl}{1pt}}}          \begin{tabular}{ @{}>{\centering}p{6cm} @{}>{\centering}p{6cm} @{}>{\centering}p{6cm} @{}p{0.01cm} @{}>{\centering}p{6cm}X}     aaa & & bbb & & ccc \\     ddd & & eee & & fff \\     \end{tabular}     \end{document}      Error message is :               ! Extra alignment tab has been changed to \cr.     <recently read> \endtemplate           l.16 ddd &                & eee & & fff \\     ?       I am using :               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode      on a Mac Can someone help?? Thanks


title: Benchmarking various operations of TeX

text: TeX offers plenty of ways of doing some things, and it is sometimes difficult to predict which one will be quickest. For instance, how do   * a macro assignment   * a toks assignment   * a macro expansion   * a toks expansion compare to each other (depending on the lengths of arguments, and the number of them, of course). I have been told that `\romannumeral-`\0\somelongexpansion` is slower than `\somelongexpansion`. Is that true/how do I test it/has it been tested? Also, the expl3 source states that to gobble three brace groups it would be faster to gobble two, then one (with the equivalent of `\@gobble` and `\@gobbletwo`, rather than `\long\def\@gobblethree#1#2#3{}`). But preliminary tests with `\pdfelapsedtime` seem to point to the opposite. So I guess my question is on what exists in terms of benchmarking the various pieces of TeX (I'm particularly interested in the stomach, but any body part of TeX is appreciated).


title: Recommended directory structure for separating presentation and content

text: For my bachelor thesis I am going to structure the files for my LaTeX document in a more sophisticated way, which means I would like to use different folders for different file types. Is there a directory structure for reports in LaTeX which is recommended to follow? Currently I have the following folders:   * content: containing tex files for the different chapters, which are included into the main document   * images   * bib Whereas my main document thesis.tex remains in the root directory.


title: Add path in TeX Live 2012 on Ubuntu

text: I write a package named `umtools.sty`, since Ubuntu One can only sync the folder which is in `~/`, so I put `*.sty` in `~/tlpkg/`. Now, how can I use it like `\usepackage{umtools}` instead of `\usepackage{~/tlpkg/umtools}`, as the way it is set up, `\usepackage{ _< absolute path>_}` causes a warning: "You have requested package `~/tlpkg/umtools', but the package provides umtool", which makes me uncomfortable. I've tried to modify `~/.pam_environment` to add new PATH, but it doesn't work. Does someone know kpathsea. Ubuntu 13.04 + Tex Live 2012 by sh install_tl + TeXstudio + XeTeX


title: How can I extract equations from one document for use in another?

text: I have a LaTeX document that includes many equations. I would like to create a separate "quick reference" sheet that includes many of these equations. Instead of copy-and-pasting the equations from the first document to the second document, I would like to be able to reference the equations by name and have them be automatically included (so that if I later change an equation in the first document, that change will be automatically reflected in the second document after I recompile it). What's a good way to do this?


title: Missing lines in tabular with minimal.cls

text: If I replace the class by `minimal` in the code below for a very simple table, the vertical line disappears. Why?               \documentclass{article}     \begin{document}     \begin{tabular}{c|c}     a&b\\     c&d     \end{tabular}     \end{document}


title: Pandoc: How can I get numbered LaTeX equations to show up in both PDF and HTML output

text: To make a numbered equation in Pandoc, I defer to using pure LaTeX:               \begin{equation}     a^2 + b^2 = c^2     \end{equation}      In PDF form, it gives a nice numbered equation, however, this equation doesn't show up at all in the HTML output because the equation is within the `\begin` environment and is ignored. I would like to keep the numbering in the PDF, but would like the equation to show up in the HTML, with or without the numbering.


title: Is there a \bigcdot symbol in LaTeX

text: In my diploma thesis I need to LaTeX a concatenation over a set of sets. I use the `\cdot` symbol for concatenation of two sets as in `A \cdot B`. (Please correct me if this is a wrong symbol for concatenation). I would need to type a concatenation over a set of sets, using a `\bigcdot` symbol or an equivalent one. It should be like when you use the `\bigcup` symbol to do a union over a set of sets, as in `\bigcup_{i=1}^n A_{i}`. My LaTeX installation, however, does not know about such a symbol and I haven't found a clue on Google search either.


title: pdflatex "Required Page Does Not Exist" error with beamerarticle

text: I have several `beamer` tex files and need to create a manual (using beamerarticle) that incorporates all of the beamer files (with their notes) as one document. The original basis of the articlebeamer output can be found here: Displaying slides with Beamer and Article class Right now I have the following:   * `chapter1.tex`   * `chapter2.tex`   * `chapter1.beamer.tex`   * `chapter2.beamer.tex`   * `full.article.tex` `full.article.tex` has something like this:               % BEGIN FULL.ARTICLE.TEX     \documentclass{article}      \usepackage{beamerarticle}     \usepackage{pgf}          \setjobnamebeamerversion{chapter1.beamer}     \setjobnamebeamerversion{chapter2.beamer}          \newcommand{\showslide}[1]{         \begin{figure}             \center \fbox{\includeslide[width=10cm]{#1}}         \end{figure}     }          \input{chapter1.tex}     \input{chapter2.tex}     % END FULL.ARTICLE.TEX      I already ran `pdflatex` on the `*.beamer.tex` files so the corresponding PDF outputs are in the same folder as the `full.article.tex`. Running `pdflatex full.article.tex`, I get the following error:               !pdfTeX error: pdflatex (file ./chapter2.beamer.pdf): PDF inclusion: required page does not exist <8>      Would appreciate any help in figuring out what I'm doing wrong.


title: How to have \section{...} numbered as if it were a \subsection{...} but keep the same formatting

text: So I'm a student writing chapter summaries for final exam preparation. I'm using the 'article' documentclass and am using separate documents for each chapter. How can I have `\section{...}` numbered as if it were a `\subsection{...}`, but keep the same font size/style. Just a note, I will be removing numbering from all instances of `\subsection{...}`and `\subsection{...}` too. Here is a working example (per Werner's request). I want...               \documentclass{article}     \setcounter{secnumdepth}{1}           \begin{document}     \section{The Nature of Chemical Energy and Redox Reactions}     \subsection{The Structure and Function of ATP}     \subsubsection{Term Defintions}     \end{document}      to print... > 1.1 The Nature of Chemical Energy and Redox Reactions > > The Structure and Function of ATP > > Term Definitions (edited for clarity)


title: Table spacing, multi column

text: Good day, hi, I have a question to ask. If you have some spare time please kindly spare me a few minutes to enlighten me on the following question. Thanks in advance! So I am trying to construct a table, but the spacing isn't balanced.               \documentclass{article}     \usepackage[english]{babel}     \usepackage{multirow}          \begin{document}     \begin{center}     \begin{tabular}{ |c|c|c|c|c|c|c|c|c|c| }          \hline     \multirow{2}{*}{Class} & \multicolumn{2}{c|}{Similarity Gibbs Sampling} & \multicolumn{2}{c|}{Hand Computatation} & \multicolumn{4}{c|}{Combination} & \multirow{2}{*}{Graph Cut(S)} \\ \cline{2-1} \cline{3-1} \cline{4-1} \cline{5-1} \cline{6-1} \cline{7-1} \cline{8-1} \cline{9-1}     & 0 & 1 & 0 & 1 & 1 & 2 & 3 & 4 & \\ \hline     ${V_1}$ & 0.388 & 0.612 & 0.393 & 0.607 & 0 & 0 & 1 & 0 & 2 \\ \hline     ${V_2}$ & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & 2 \\ \hline     ${V_3}$ & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 3 \\ \hline     ${V_4}$ & 0.388 & 0.612 & 0.393 & 0.607 & 1 & 0 & 1 & 1 & 1 \\ \hline     %\cline{2-1}      \end{tabular}     \end{center}     \end{document}      ![1](http://s21.postimg.org/uk1xybtk7/qpic.png) As you can see, the 3rd column and 5th column do not share the same spacing as 2nd and 4th respectively.


title: scale column width with image width

text: I'm writing a presentation using the beamer class where multiple slides consist of an image on the very right and centered text on the left. So far I do this using the columns environment:               \documentclass{beamer}     \usepackage{mwe}     \begin{document}      \begin{frame}       \begin{columns}        \begin{column}{.4\textwidth}         \centering         centered text\\spanning multiple lines        \end{column}        \begin{column}{.6\textwidth}         \includegraphics[height=\paperheight]{example-image-golden-upright}        \end{column}       \end{columns}      \end{frame}     \end{document}      However, I have to set the column widths manually to make the right column have the same width as the image. ![enter image description here](http://i.stack.imgur.com/q5Rlo.png) As you can see, there is a some white space left right to the image. How can I make the right column as wide as the image and the left one occupy the remaining space? If you have a solution without using colums that would also be fine (as long as the image is rightmost and the text centers in the free space left to it). I need this automated since I have that multiple times using many pictures with different aspect-ratios. So the column widths need to be different on each slide.


title: Put ampersand (&) inside conditional

text: I'm trying to make a command that formats the alternatives of a test. Can I put an ampersand after each alternative? (I call my tabular command out of this command, and I want to put each alternative in a different cell).               \def\tabiiiii#1\\ %     {%         \def\tempa{#1}%         \ifx\tempa\endtabi%             \endtab%         \else%             \if\relax\detokenize{#1}\relax%             \else%                 \stepcounter{alternatives}\thealternatives)~~\@ifnextchar {_}{}#1%                 &% HOW TO WORK IT OUT?             \fi%             \stepcounter{countk}%             \the\value{countk}%             \ifnum\the\value{countk}<3%             \else%             \newline\newline\newline\newline%             \fi%             \expandafter\tabiiiii%         \fi%     }%


title: How to put a label at the beginning of an arrow?

text: I came with the following code to display the graph below:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{positioning}          \tikzset{        actor/.style={          rectangle,          draw=black,          minimum size=10mm        },        arrow/.style={          -latex,          thick,          shorten <=2pt,          shorten >=2pt        }     }          \begin{document}              \begin{tikzpicture}[node distance=0mm and 20mm]           \node (A)[actor] {A};           \node (B)[actor,right=of A] {B};           \node (C)[actor, right=of B] {C};           \node (Fake) [right=of C] {};           \node [right=of A,  xshift=-20mm, yshift=2mm] {1};           \draw[arrow] (A) -- node[font=\small, auto] {$200/s$} (B);           \draw[arrow] (B) -- node[font=\small, auto] {$100/s$} (C);           \draw[arrow] (C) -- node[font=\small, auto] {$100/s$} (Fake);         \end{tikzpicture}          \end{document}      ![Result](http://i.stack.imgur.com/6zjex.png) As you can see I used a **dirty hack** to place the "1" value on top of the beginning of the arrow between A and B. How can I do this properly ?


title: What are LaTeX templates for A5 booklets?

text: I am trying to produce a A5 size booklet. You might have seen these old small A5 size math books, with large size text in every page. They are very comfortable on the eyes to read and handy to hold. I am using documentclass `book`. If I use `a5paper`, the produced PDF is still A4 size with the text being produced in top-left corner of A5 size. Also, the text is pretty small compared to the large font seen in booklets. Are there LaTeX templates or packages I can use to easily produce this kind of A5 booklet? LaTeX newbie here :-)


title: abstract appears in mactex but not in texlive for achemso package

text: For preparation of a communication for an ACS journal I am using the achemso package and the following header               \documentclass[journal=jacsat,manuscript=communication]{achemso}      Then, after defining the authors, I write my document starting with               \begin{document}     \begin{abstract}      Here goes my abstract...     \end{abstract}      Surprisingly, when I compile this document with pdflatex in different machines I get different behaviour. When compiling with MacTex, I find that the abstract is properly formatted with the sans-serif fonts required by ACS. When I compile with texlive the abstract is shown as single column in the last page of the document, after the main text, acknowledgements and references. If I include the \listfiles command in my input, I get different results for both distributions. This is the difference between the output of the two, after doing "diff right.tex wrong.tex"               1c1     < achemso.cls    2012/05/08 v3.7a Submission to ACS journals     ---     > achemso.cls    2009/09/01 v3.3a Submission to ACS journals     9,16c9,15     < geometry.sty    2010/09/12 v5.6 Page Geometry     < ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     < ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)     < ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     < helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS)     < caption.sty    2012/02/19 v3.2f Customizing captions (AR)     < caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)     < courier.sty    2005/04/12 PSNFSS-v9.2a (WaS)     ---     > geometry.sty    2008/12/21 v4.2 Page Geometry     > ifpdf.sty    2009/04/10 v2.0 Provides the ifpdf switch (HO)     > ifvtex.sty    2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)     > helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS)     > caption.sty    2009/10/09 v3.1k Customizing captions (AR)     > caption3.sty    2009/10/09 v3.1k caption3 kernel (AR)     > courier.sty    2005/04/12 PSNFSS-v9.2a (WaS)     21,26c20,23     < graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live     < pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     < infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     < ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     < mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS)     < setspace.sty    2011/12/19 v6.7a set line spacing     ---     > graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live     > pdftex.def    2010/03/12 v0.04p Graphics/color for pdfTeX     > mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS)     > setspace.sty    2000/12/01 6.7 Contributed and Supported LaTeX2e package     28,30c25,28     < jacsat.cfg    2012/05/08 v3.7a achemso configuration: J. Am. Chem. Soc.     < natbib.sty    2010/09/13 8.31b (PWD, AO)     < natmove.sty    2010/01/15 v1.1a Automatic citation moving with natbib     ---     > varioref.sty    2009/09/13 v1.4w package for extended references (FMi)     > jacsat.cfg    2009/09/01 v3.3a achemso configuration: J. Am. Chem. Soc.     > natbib.sty    2009/07/16 8.31 (PWD, AO)     > natmove.sty    2009/04/20 v1.1 Automatic citation moving with natbib     33,41d30     < pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     < ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     < epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf     < grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     < kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     < kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)      < kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     < etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     < epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live


title: Center frame title vertically in beamer

text: Is it possible with beamer to center the frame title vertically (as well as horizontally), together with the frame content? That is, have the frame title and content appear together in the center of the page, with space above and below. I am trying to mimic the default appearance of a reveal.js presentation. I don't know where to start - every beamer theme I've found has the frame title at the top of the page.


title: How to multicite volumes style-independently

text: > **This question led to a new feature in a package:**   >  `biblatex` The family of multicite commands based on `\cites` typeset two or more citations from a list of keys. For example, `\parencites[<page>]{<key>}[<page>]{<key>}`. However, I can't find anything like `\volcites` or even `\avolcites`. My question is: How can I cite two or more volumes of a multivolume work in a single multicite command? Also, is it possible to do it style-independently? In short, I'm looking for this: `\avolcites{<vol>}[<page>]{<key>}{<vol>}[<page>]{<key>}`.


title: How to merge two tabulars into a single table the width of the column?

text: I am asking for advice on achieving two separate effects in the table environment. **(1)** I have two tables with a different number of columns. I need to merge them into a single table. I have this               \begin{table}[ht]     \small     \centering          \begin{tabular}{|l|c|l|c|}     \hline         parameter & value & parameter & value \\     \hline         blah blah & a & blah blah & 2 \\         blah blah & 4 & blah blah   & 17 \\                      blah blah & 4 & blah blah & 4 \\         blah blah & 4 & blah blah & 128  \\         blah blah & 1 & blah blah &  6 \\         blah blah & 8 & blah blah & 48 \\         blah blah & 48 & blah blah & 32 \\          blah blah & 10 & blah blah & 16 \\     \hline     \end{tabular}          \caption{My table 1}     \end{table}          \begin{table}[ht]     \small     \centering     \begin{tabular}{|l|l|l|l|l|l|}     \hline             blah & bloo & bleeblee & bloo bloo & meeh & hoohaa  \\ \hline             xyz & 3ubfjdf & 14 & 64 & 4 & 444 \\              abc & fddf4 & 44 & 64 & 8 & 555 \\              mno & dsf4tv & 100 & 64 & 8 & 777 \\     \hline     \end{tabular}     \caption{My even better table 2}     \label{tab:cacheparams}     \end{table}      ![two tables](http://i.stack.imgur.com/K3UzT.png) I want to join the two tables together. I've tried this               \begin{table}[ht]     \small     \centering          \begin{tabular}{|l|c|l|c|}     \hline         parameter & value & parameter & value \\     \hline         blah blah & a & blah blah & 2 \\         blah blah & 4 & blah blah   & 17 \\                      blah blah & 4 & blah blah & 4 \\         blah blah & 4 & blah blah & 128  \\         blah blah & 1 & blah blah &  6 \\         blah blah & 8 & blah blah & 48 \\         blah blah & 48 & blah blah & 32 \\          blah blah & 10 & blah blah & 16 \\     \hline     \end{tabular}     \begin{tabular}{|l|l|l|l|l|l|}     \hline             blah & bloo & bleeblee & bloo bloo & meeh & hoohaa  \\ \hline             xyz & 3ubfjdf & 14 & 64 & 4 & 444 \\              abc & fddf4 & 44 & 64 & 8 & 555 \\              mno & dsf4tv & 100 & 64 & 8 & 777 \\     \hline     \end{tabular}     \caption{My merged table}     \end{table}      But it produces this ![Table that I get](http://i.stack.imgur.com/zggnH.png) However I want this (notice the lack of white space between the two tabulars). ![Table that I would like](http://i.stack.imgur.com/wdYDk.png) **(2)** Once I have these two tabulars correctly positioned, I would like to make them both equal widths. Preferably the width of the column. I've tried using tabularx and using **|X|c|l|c|** which is so-so, but it puts too much whitespace in the first column. I would like the whitespace distributed over all of the columns. Any way to achieve these things?


title: How to modify the content of the bibliography in Beamer

text: I have a problem related to this question -- I'd like to put the bibliography outside of a block in Beamer. Based on the above solution, I have something that almost works, except that I'd like to modify the content of the bibliography but can't seem to figure out a way to do that. Right now I have:               \documentclass{beamer}     \usetheme{Berlin}          \usepackage{csquotes}        \usepackage[style=numeric-comp, backend=biber, citetracker=true, sorting=none]{biblatex}          \makeatletter     \renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont[\@thefnmark]}}}     \renewcommand\@makefntext[1]{{\normalfont[\@thefnmark]}\enspace #1}     \makeatother          \DeclareCiteCommand{\footfullcitetext}[\mkbibfootnotetext]       {\usebibmacro{prenote}}       {\usedriver          {\DeclareNameAlias{sortname}{default}}          {\thefield{entrytype}}}       {\multicitedelim}       {\usebibmacro{postnote}}               \addbibresource{mwe}          \begin{document}          \begin{frame}{Beamer frame}          \begin{beamerboxesrounded}[]{Beamer rounded box}         \begin{itemize}             \item Bullet 1 \footnotemark             \item Bullet 2          \end{itemize}     \end{beamerboxesrounded}          \footfullcitetext{LaTeX}          Outside           \end{frame}     \end{document}      In the footnote, it shows "[1] Leslie Lamport. LaTeX – A Document Preparation System. Addison-Wesley, 1985." How can I make it something like "[1] Lamport (1985)" instead? Alternately, is there an easier way to do bibliography such that I have something like "This is based on previous work [1]." in the content (within blocks) of the slides and just the authors and year in the footnote?


title: Can we simplify the transformation steps below to save more keystrokes?

text: I want to make the regions bounded as eyes transparent and the other regions opaque with solid fill. Unfortunately, `psellipse` (as well as `pscircle`) does not move the current point to its starting point before stroking as already questioned by me here (click). As a result, the rotated ellipses make the `moveto` operation need extra transformation before and after invoking it. See the following code for more detailed information.               \documentclass[pstricks,border=12pt]{standalone}          \begin{document}     \begin{pspicture}[showgrid=false,dimen=m](6,8)     \pscustom[fillstyle=eofill,fillcolor=red,linewidth=3pt]     {         % head         \psellipse(3,4)(3,4)         % left eye         \translate(1.5,4.5)         \rotate{30}         \moveto(1,0)         \rotate{-30}         \translate(-1.5,-4.5)         \psellipse[rot=30](1.5,4.5)(1,1.5)         % right eye         \translate(4.5,4.5)         \rotate{-30}         \moveto(1,0)         \rotate{30}         \translate(-4.5,-4.5)         \psellipse[rot=-30](4.5,4.5)(1,1.5)     }     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KzqCX.png) My question is can you simplify the transformation steps, for example,                   \translate(4.5,4.5)         \rotate{-30}         \moveto(1,0)         \rotate{30}         \translate(-4.5,-4.5)      to be a reusable operator such that I can save more keystrokes? ## My effort               \documentclass[pstricks,border=12pt]{standalone}          \pstVerb     {            /PRE {dup cos exch sin} bind def         /XXX {neg 3 -1 roll mul 3 1 roll mul add} bind def         /YYY {exch 3 -1 roll mul 3 1 roll mul add} bind def         /ROT {PRE 4 copy XXX 5 1 roll YYY} bind def     }          \begin{document}     \begin{pspicture}[showgrid=false,dimen=m](6,8)     \pscustom[fillstyle=eofill,fillcolor=red,linewidth=3pt]     {         % head         \psellipse(3,4)(3,4)         % left eye         \moveto(!1 0 30 ROT 4.5 add exch 1.5 add exch)         \psellipse[rot=30](1.5,4.5)(1,1.5)         % right eye         \moveto(!1 0 -30 ROT 4.5 add exch 4.5 add exch)         \psellipse[rot=-30](4.5,4.5)(1,1.5)     }     \end{pspicture}     \end{document}      But it does not seem to be simpler significantly.


title: Align a figure caption lines

text: I have an image with caption in LaTeX:               \begin{figure}[H]     \centering        \includegraphics[width=0.8\textwidth,height=0.8\textheight,keepaspectratio]{img/image9}        \caption{Text text text text text text\\*        On the basis of: \cite{Smi00}}     \label{fig:fig}     \end{figure}      it looks like that:               |                                                           |     |___________________________________________________________|               Figure 3.3 Text text text text text text                        On the basis of: [4]          ...      I'd like to align both lines of caption, but keep the centering of the whole caption, i.e. to change it to something like that:               |                                                           |     |___________________________________________________________|               Figure 3.3 Text text text text text text               On the basis of: [4]          ...      Not:               |                                                           |     |___________________________________________________________|     Figure  3.3    Text    text    text     text    text     text     On the basis of: [4]          ...      Or:               |                                                           |     |___________________________________________________________|               Figure 3.3 Text text text text text text     On the basis of: [4]          ...      ...but all my attempts failed. Does anybody know how it can be done?


title: Springer manuscript class natbib not showing references

text: I can't find a solution anywhere and I am in a hurry :( MWE:               \documentclass[natbib,smallextended]{svjour3}     \begin{document}           \citep[e.g.][]{rodenbeck2003co}            \citet{rodenbeck2003co}                \bibliographystyle{spbasic}     %\thebibliography{ref.bib}     \begin{thebibliography}{}     @article{rodenbeck2003co,       title={$CO_2$ flux history 1982--2001 inferred from atmospheric data using a global inversion of atmospheric transport},       author={R{\"o}denbeck, C and Houweling, S and Gloor, M and Heimann, M},       journal={Atmospheric Chemistry and Physics},       volume={3},       number={6},       pages={1919--1964},       year={2003},       publisher={Copernicus GmbH}     }     \end{thebibliography}{}          \end{document}      the results are coming weird ![enter image description here](http://i.stack.imgur.com/kOrue.jpg) where they should come looking like the springer format ![enter image description here](http://i.stack.imgur.com/8B0MN.jpg)


title: unicode-math and tex4ht with utf-8 input

text: I have a document which I'm compiling to PDF using LuaTeX, and I want to create an HTML version from the same sources. The text is german with umlauts, and for convenience I'm using some unicode-math (also _hyperref_ doesn't like `$\phi^2$` in the TOC but has no issue with `$φ²$`). Minimal example, compiles with `lualatex file`               \documentclass{article}     \usepackage[ngerman]{babel}     \usepackage{unicode-math}     \begin{document}     Löse $\sqrt{φ} = 1$     \end{document}      Now to compile it using `htlatex file "xhtml,mathml,charset=utf-8"` I add _inputenc_ so it doesn't ignore the `ö`, but _unicode-math_ isn't compatible with pdfTeX so I get an error for the `φ`, which can be ignored and is then missing from the output.               \documentclass{article}     \usepackage[ngerman]{babel}     \makeatletter     \@ifpackageloaded{tex4ht}{         \usepackage[utf8]{inputenc}     }{         \usepackage{unicode-math}     }     \makeatother     \begin{document}     Löse $\sqrt{φ} = 1$     \end{document}      So I use `htxelatex file "xhtml,mathml,charset=utf-8"`, without _inputenc_ because XeTeX already expects UTF-8 input and does indeed complain when _inputenc_ is used. However, now `ö` and `φ` are silently ignored in the output?! Compiling this code using `xelatex file` does give the expected result though, so it's a tex4ht problem. And, I guess as a consequence of that, _unicode-math_ doesn't work either, giving lots of errors which when ignored lead to no output at all.               \documentclass{article}     \makeatletter     \usepackage[ngerman]{babel}     \@ifpackageloaded{tex4ht}{         %\usepackage{unicode-math}     }{         \usepackage{unicode-math}     }     \makeatother     \begin{document}     Löse $\sqrt{φ} = 1$     \end{document}      The unicode-specific options mentioned in the manual, i.e. `-cunihtf`, don't have any effect either… How do I make this work? Or is that what the manual means by “partial support” for XeTeX (why does it work for pdfTeX then?!). The only reason I'm using XeTeX here is because there doesn't seem any LuaTeX-support for tex4ht, but could I maybe use LuaTeX to create the DVI for tex4ht anyway? * * * Things get weirder.               \documentclass{article}     \usepackage{newunicodechar}     \newunicodechar{ö}{\"o}     \newunicodechar{φ}{\phi}     \begin{document}     Löse $\sqrt{φ} = 1$     \end{document}      Compiles with `htxelatex testhtml "xhtml,mathml,charset=utf-8"` and inserts `ϕ` for `φ`, however the `ö` is inserted as a latin-1 encoded character. I have no idea where that comes from. `htxelatex testhtml "xhtml,mathml,charset=latin-1"` only changes the charset in the header, the file is then displayed correctly. Adding `" -cunicode -utf8"` as the third option causes the `φ` to be inserted as UTF-8, but doesn't change the latin-1 `ö`.


title: How can I write an 1,4 glycosidic bond in Latex text?

text: I want to write               \documentclass[12pt, a4paper, openright, twoside]{report}     \usepackage[english]{babel}     \usepackage{textgreek}     \usepackage[utf8x]{inputenc}  %ÄÖÜß und griechische Buchstaben          \usepackage{chemfig} %Erstellen von Skelettformeln organischer Substanzen     \usepackage[version=3]{mhchem} % \ce zum Darstellen von chemischen Formeln     \usepackage{pgfplots}          \begin{document}          It is a polymer consisting primarily of 1\ce{\rightarrow}\!4-linked 2-\textit{O}-sulfated \textsc{l}-iduronic acid  and 6-\textit{O}-sulfated, \textit{N}-sulfated glucosamine          \end{document}      But there is a space after the arrow and before the 4. How can I get rid of that space?


title: How to place the QED symbol at the end of equation using IEEEproof environment?

text: I was wondering how one can place the QED symbol at the end of an equation when using the `IEEEproof` environment? With the standard `proof` environment of `amsthm` this is done by simply placing `\qedhere` at the end of the equation, for example:               \begin{equation}          x = y+z \qedhere     \end{equation}      But the same code does not work when we change the environment to `IEEEproof`. In this case the QED symbol will be placed at the end of next line.


title: standalone problem

text: I need to get some equations in `.png`. Looking for the solution on the web I found that the `standalone` documentclass should do the job using the `convert` option. My code is the following:               \documentclass[convert={density=3000,outext=.png}]{standalone}     \begin{document}     $\displaystyle     \sum_a^b trial     $     \end{document}      Why when I compile it using `pdflatex -shell-escape trial.tex` I got the equation only in `.pdf`? (image magick is already installed) The same problem appears if I use the sole `convert` option without any sub- option.


title: TikZ externalize causing problems with template

text: I have a large document (I'm using pdflatex with Eclispe and TeXlipse) with many (many) TikZ graphics (math function plots, most of them). In order to reduce (drastically I hope) compilation time I read about using externalize, in order to save the plots and not to recalculate them every time. The problem is I'm using a book template (which I modified but just aesthetically) and other commands that incidentally use tikzpicture environment. When trying to compile I get an error if externalize is activated:               \usepackage{pgfplots}     \usetikzlibrary{external}      \tikzexternalize[prefix=tikz/]      If I comment this line, no error is thrown, but then again, no externalization occurs. It throws an error, on every user-defined environment of the template (that uses TikZ), even the chapter heads (the template redefines some \chapter related commands). The thing is, I don't care if those things are externalized (don't even know if they can) because they are little things that require almost no calculation. But the function plots that I use do, and really slow down the compilation process. Another thing that may cause trouble is that since I'm using babel with spanish I had to define my own tikzpicture environment to avoid some issue with the '>' character. The new environment looks like this:               \newenvironment{tikzpict}[1][]     {\begin{tikzpicture}[#1]\selectlanguage{english}}     {\selectlanguage{spanish}\end{tikzpicture}}      The error message goes like this: > Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error > -interaction=batchmode -jobname "tikz/document-figure0" > "\def\tikzexternalrealjob{document}\input{document}"' did NOT result in a > usable output file 'tikz/document-figure0' (expected one of > .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. > For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named > 'write 18' or something like that. Or maybe the command simply failed? Error > messages can be found in 'tikz/document-figure0.log'. If you continue now, > I'll try to typeset the picture. \chapter*{Licencia} (followed by: > \addcontentsline{toc}{chapter}{Licencia}) Is there a way to tell TikZ only to externalize some of the pictures, I don't mind having to add another command on every picture to externalize if it solves the issue. I'm not looking for a too-complex-and-fancy-solution, just something to get this going (I'd love the complex and fancy solution too, but it's not necessary). As an example, I'll quote the chapter definition, but again, every environment that uses TikZ throws the same error (as if it was trying to externalize it but couldn't).               \newcommand{\thechapterimage}{}     \newcommand{\chapterimage}[1]{\renewcommand{\thechapterimage}{#1}}     \def\thechapter{\arabic{chapter}}     \def\@makechapterhead#1{     \thispagestyle{empty}     {\centering \normalfont\sffamily     \ifnum \c@secnumdepth >\m@ne     \if@mainmatter     \startcontents     \begin{tikzpicture}[remember picture,overlay]     \node at (current page.north west)     {\begin{tikzpicture}[remember picture,overlay]          \node[anchor=north west,inner sep=0pt] at (0,0) {\includegraphics[width=\paperwidth]{\thechapterimage}};          %Commenting the 3 lines below removes the small contents box in the chapter heading     % \draw[fill=white,opacity=.6] (1cm,0) rectangle (8cm,-7cm);     % \node[anchor=north west] at (1cm,.25cm) {\parbox[t][8cm][t]{6.5cm}{\huge\bfseries\flushleft \printcontents{l}{1}{\setcounter{tocdepth}{2}}}};          \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=ocre,draw opacity=1,line width=2pt,inner sep=15pt]{\huge\sffamily\bfseries\textcolor{black}{\thechapter\ ---\ #1\vphantom{plPQq}\makebox[22cm]{}}};     \end{tikzpicture}};     \end{tikzpicture}}\par\vspace*{230\p@}     \fi     \fi     }     \def\@makeschapterhead#1{     \thispagestyle{empty}     {\centering \normalfont\sffamily     \ifnum \c@secnumdepth >\m@ne     \if@mainmatter     \startcontents     \begin{tikzpicture}[remember picture,overlay]     \node at (current page.north west)     {\begin{tikzpicture}[remember picture,overlay]     \node[anchor=north west] at (-4pt,4pt) {\includegraphics[width=\paperwidth]{\thechapterimage}};     \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,opacity=.7,inner sep=15.5pt]{\huge\sffamily\bfseries\textcolor{black}{\vphantom{plPQq}\makebox[22cm]{}}};     \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,draw=ocre,line width=2pt,inner sep=15pt]{\huge\sffamily\bfseries\textcolor{black}{#1\vphantom{plPQq}\makebox[22cm]{}}};     \end{tikzpicture}};     \end{tikzpicture}}\par\vspace*{230\p@}     \fi     \fi     }     \makeatother      Thanks in advance.


title: Making node's fonts larger when using the qtree package

text: I'm using the `qtree` package in LaTeX, but the tree nodes have very small text. I'm also using `\scalebox` to scale down the tree since it does not fit in the page. Is there a way to increase the size of the text while keeping the tree small? I tried `qtreeinithook` with `\Large` but without any luck, since the text is still not big enough. Edit: so, the problem is related to the template I'm using from here ftp://ftp.cup.cam.ac.uk/pub/texarchive/journals/latex/tlp-cls/unpacked/tlp.cls                   \documentclass[conference]{tlp}         \usepackage{qtree}         \begin{document}         \Tree [.A [ a b c d ].B !\qsetw{1cm} C ]         \newcommand\qlabelhook{\Huge}         \newcommand\qleafhook{\Huge}         \Tree [.A [ a b c d ].B !\qsetw{1cm} C ]         \end{document}      With this code, the edges of the tree get so big that the tree does not fit in the page. I guess the problem is with the template.


title: Draw reversed path in TikZ

text: Is there a way to draw a TikZ path reversed? I am trying to create some code that generates tessellating figures (to be used in How do we Draw a Bird in LaTeX). Here is what I got:               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \def\x{2}     \def\y{4}     \def\mypath{(0,0) -- (1,1) -- (\x,0) -- (\x,\y)}     \draw \mypath;     \draw[shift={(\x,\y)}, rotate=180, blue] \mypath;     \end{tikzpicture}     \end{document}      It generates this: ![wrong](http://i.stack.imgur.com/866yD.png) But what I wanted is this:![ok](http://i.stack.imgur.com/8HCfn.png). So it is obviously not correct to rotate the path. I need to break it into two an draw it reversed.


title: Suppress \gls links on one glossary only

text: I want to use `\gls*` automatically when invoking the `\gls` command. This should be done for one glossary (`type=tech`) only and globally. Not working:   * `\glsdisablehyper` does not work at the define level, only in the document. That would take away all other links as well.   * `\newglossaryentry[hyper=false]` does not do the thing I want.   * Replace `\gls` with `\gls*` manually? Not that nice... Any other ideas? Like defining an own style that does not use the link function? I'm a bit lost on this one. Edit: Here is a minimal example: Gist               \documentclass[german,pagesize,BCOR=0mm,titlepage,toc=bib,headinclude,headsepline]{book}     \tableofcontents     \usepackage[pdfusetitle,pdftex,colorlinks]{hyperref}               % DOCUMENTATION HERE:     % http://www.latex-community.org/know-how/263-glossaries-nomenclature-lists-of-symbols-and-acronyms     % °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°     % INCLUDE THIS EVER TIME!!!     %\newglossary[⟨log-ext⟩]{⟨name⟩}{⟨in-ext⟩}{⟨out-ext⟩} {⟨title⟩}[⟨counter ⟩]     \usepackage[acronym]{glossaries}     \newglossary{opad}{gls}{glo}{Technical and Research Terms}     \newglossary{tech}{tgls}{tglo}{Software and Libraries}     \newglossary[glignoredl]{ignored}{glignored}{glignoredin}{Ignored Glossary}          \makeglossaries            % ==============================================================================     % STYLING     % ==============================================================================          \defglsdisplayfirst[ignored]{\textit{#1}}     \defglsdisplay[ignored]{#1}             \defglsdisplayfirst[opad]{\textit{#1}}     \defglsdisplay[opad]{#1}          % TODO@IMPORTANT: How to highlight the tech terms? Declare them in the intro!!!     \defglsdisplayfirst[tech]{\textbf{{#1}}}     \defglsdisplay[tech]{ \textbf{{#1}} }          \defglsdisplayfirst[acronym]{\textit{#1}}     \defglsdisplay[acronym]{#1}                 \renewcommand*{\firstacronymfont}[1]{\normalfont{#1}}     \renewcommand*{\acronymfont}[1]{\normalfont{#1}}          % I want this: http://tex.stackexchange.com/questions/25805/disable-hyperlinks-in-some-entries-for-glossaries !!!     % TODO@GLOSS put gls* behind all links of type ignore. baaaah :(     \newglossaryentry{withoutlink}{         type=tech, name={withoutlink},       description={withoutlink} }       }          \newglossaryentry{withlink}{        type=tech, name={withlink},       description={withlink} }         }          % ==============================================================================       \begin{document}             \section{Manual Test}              \subsection{Gloss}         \gls*{withoutlink} (gls*)... Okay, that behavior can be done with starring gls. But I dont want to do this in my whole document since sometimes I muse gloss from the ignored type to the used type.\\              \noindent         \gls{withoutlink} (gls)... this should be without link by setting something in the \texttt{\defglsdisplay[ignored]{#1}} or so              \noindent            \gls{withlink}... This is just the normal behavior         \ \\            %\section{Ignored Gloss}       %\printglossary[type=ignored, title={Ignored Glossary. Don't show this in production!}]            \printglossary[type=opad]        \printglossary[type=tech]             \end{document}


title: Cannot access arguments in a lua block

text: The follow code is trying simply to print the first argument of a macro. I've tried various things found on the net(there is very little) to get #1 printed in lua but nothing works. I assume there is an issue with interpreting it in lua. Would be nice if there was some tutorial on bridging the gap between tex and lua. Most stuff I've seen use external lua files or do not reference anything except macros in a directlua block.               \documentclass[11pt]{book} % use larger type; default would be 10pt          \usepackage{luatex}     \usepackage{pgffor}          \tracingonline 6          \directlua{         tex.enableprimitives('',tex.extraprimitives())         local lpeg = require "lpeg"     }          \begin{document}          \def\Parse#1{              \directlua{             cmdString = tostring(#1)                  tex.print(cmdString)         }     }          \Parse{hello12341234asdf}               \end{document}


title: Unable to include equation featuring special symbols

text: I am designing an article, and using the `amsmath` package. I tried to use the following to include an equation in my document:               \begin{equation}            |\psi\rangle = \alpha|0\rangle + \beta|1\rangle \begin{pmatrix}         \alpha & \beta \end{pmatrix} ^T          \end{equation}      I get an error as:               ERROR: Missing $ inserted.          --- TeX said ---     <inserted text>                      $     l.51           --- HELP ---     TeX probably found a command that can be used only in math mode when     it wasn't in math mode.  Remember that unless stated otherwise, all     all the commands of Section 3.3 in LaTeX Book (Lamport) can be used     only in math mode. TeX is not in math mode when it begins processing     the argument of a box-making command, even if that command is inside a     math environment. This error also occurs if TeX encounters a blank     line when it is in math mode.      Any idea where I'm going wrong here? Thanks. EDIT: Took off the $'s. NOTE: I am using the T1 font encoding to be able to use the pipe symbol like that.


title: memoir without chapters

text: Is it possible to use memoir without having chapters?


title: How to add URL access date to MLA or APA

text: I'm currently using the `mla-good.bst` file for natbib (available as mla- good.bst.zip), but I suppose I don't really care if I use APA or MLA, so I may switch later. The problem I am having is that I can't figure out a way to add URL access dates to the bibliography. I would like to add notes to the sources in the bibliography that state the date an online material was retrieved. Unfortunately, I cannot find any good way to do this. I've seen methods of doing this using MLA and APA formats for biblatex, but none for natbib. Perhaps I should consider switching to biblatex, but I'm still fuzzy on the differences (advantages/disadvantages) of using biblatex versus natbib.


title: How to color just the wave produced by the ulem package

text: I am using `\uwave{Some text here}` to put a wave like emphasis under the text. Is it possible to change the color of only the wave and leave the text black?


title: Endnotes numbered by regular arabic numbers (instead of superscripts) and without indentation

text: The Latex document below (from my earlier question Chapter name appearing in the endnotes) produces endnotes which are numbered by arabic numbers in the **superscript** , and there is **indentation** for each note. I would like: (1) to have notes numbered by regular-sized Arabic numbers (not superscripts) followed by a period (like this: "1."), and (2) notes to appear with no indentation at the beginning of the note (but all paragraphs within a given note, starting with the second one, should be indented).               \documentclass[12pt]{book}          \usepackage{endnotes,chngcntr}          \counterwithin*{endnote}{chapter}  % Reset endnote numbering every new chapter          \let\latexchapter\chapter     \makeatletter     \renewcommand\enoteheading{%     \setcounter{secnumdepth}{-2}     \latexchapter*{\notesname\markboth{NOTES}{}}     \mbox{}\par\vskip-\baselineskip     \let\@afterindentfalse\@afterindenttrue     }     \makeatother          \usepackage{xparse}               \RenewDocumentCommand{\chapter}{som}{%     \IfBooleanTF{#1}     {\latexchapter*{#3}%     \setcounter{endnote}{0}%     \addtoendnotes{%      \noexpand\enotedivision{\noexpand\subsection}        {\unexpanded{#3}}}%     }     {\IfNoValueTF{#2}      {\latexchapter{#3}}      {\latexchapter[#2]{#3}}%     \addtoendnotes{%      \noexpand\enotedivision{\noexpand\subsection}        {\chaptername\ \thechapter. \unexpanded{#3}}}%     }%     }     \makeatletter     \def\enotedivision#1#2{\@ifnextchar\enotedivision{}{#1{#2}}}     \makeatletter          \begin{document}          \setcounter{tocdepth}{1}          \tableofcontents          \chapter*{Preface\markboth{MY BOOK}{PREFACE}}          \addcontentsline{toc}{chapter}{Preface}          This is the Prologue.\endnote{There is one endnote here, which should     appear under the heading "Prologue". The paragraph should start     with ``1.'' and should not be indented.          This is the second paragraph of the same note. It should be indented.}          \chapter{Amazing Story}     As I am describing this story, I make a note which should appear at     the end.\endnote{This the first endnote. It should start with ``1.''          This is the second paragraph of the same note. It should be indented.          This is the third paragraph of the same note. It should also be     indented.} And then I make the second note.\endnote{This is the second     note. It should start with ``2.''}          \chapter{Another Amazing Story}     In this chapter, there are no endnotes. So it should not appear in the     "Notes" at the end.          \chapter{Yet Another Amazing Story}     In this chapter, I have some notes again, which I want to go to the     end.\endnote{This note should appear at the end, under the heading     "Chapter 3. Yet Another Amazing Story", with the counter reset to 1,     since this is the first endnote of this chapter.}          \chapter*{Epilogue\markboth{EPILOGUE}{}}          \addcontentsline{toc}{chapter}{Epilogue}          This is the Epilogue.\endnote{One last endnote. It should have number     1 and should appear under the heading ``Epilogue''.}          \addtoendnotes{\unexpanded{\enotedivision{}{}}}          \cleardoublepage          \addcontentsline{toc}{chapter}{Notes}          \theendnotes          \end{document}


title: In emacs AucTeX mode, why is C-c C-j not working

text: I am having an issue with my newline's within itemized lists in AucTeX mode of Emacs. If I do, C-c C-e RET itemize RET, I expect the following               \begin{itemize}        \item      \end{itemize}      but instead get               \begin{itemize}\item      \end{itemize}      Additionally, when I do C-c C-j at the end of an item, it just gives me a new \item without putting me on an new line. So, C-h k C-c C-j reveals               C-c C-j runs the command LaTeX-insert-item, which is an interactive     compiled Lisp function in `latex.el'.          It is bound to C-c C-j, M-RET, <menu-bar> <LaTeX> <Item>.          (LaTeX-insert-item)          Insert a new item in an environment.     You may use `LaTeX-item-list' to change the routines used to insert the item.      So, it seems that my LaTeX-insert-item is somehow broken? How can I recover the correct C-c C-j behaviour?


title: Colored fancy boxes

text: I am trying to produce some fancy boxes. I have found the `fancybox` package that does the boxes I want. What I can't find now is: How do I change their background color? I would also like to make the box occupy the whole `\textwidth`. Can anyone help?


title: Conflict between nag and babel spanish

text: The following code gives me loads of `Font csname csname T1/cmtt/m/sc/10endcsname not found` errors.               \RequirePackage[l2tabu,orthodox]{nag}     \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \begin{document}     Testing bla bla bla . . .     \end{document}      There seems to be a conflict between the `nag` package (specifically with the `l2tabu` and/or `orthodox` options) and the `spanish` option of the `babel` package. I've tried the `es-noquoting` and `es-noshorthand` options with no success. Does anyone else have this problem? I'm using MacTeX 2012, but I get the same error with TexLive 2011 in Ubuntu.


title: Change appearance of nomenclature title but not in ToC

text: I am trying to change the header of the nomenclature section. I would like it to be a different font and all upper case. If I rename `\nomname` with               \renewcommand{\nomname}{\MakeUppercase Nomenclature}% etc.      it will also appear like this in the ToC, which I explicitly am trying to avoid. Is there an easy/dirty trick of doing this? Similarly, I'd like to do this for a reference section later on.


title: Unable to get rid of error babel: You haven't defined the language en yet?

text: ! Package babel Error: You haven't defined the language en yet      I am getting the above error - no matter what I do... I have tried everything from the other answers and am sure now that its not related: Package babel Error: You haven't loaded the option english yet, Language problems with biblatex and babel. Nothing is working. These are the errors: > ! Package babel Error: You haven't defined the language en yet. See the > babel package documentation for explanation. Type H for immediate help. > > ... > > l.81 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.89 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language English yet. See the > babel package documentation for explanation. Type H for immediate help. > > ... > > l.97 \select@language{English} Your command will be ignored, type to proceed > ! Package babel Error: You haven't defined the language en yet. See the > babel package documentation for explanation. Type H for immediate help. > > ... > > l.105 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language jpn yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.129 \select@language{jpn} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.137 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.145 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.153 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.161 \select@language{en} Your command will be ignored, type to proceed ! > Package babel Error: You haven't defined the language en yet. See the babel > package documentation for explanation. Type H for immediate help. > > ... > > l.169 \select@language{en} Your command will be ignored, type to proceed ) It doesn’t matter if I have this line or not:               \usepackage[english]{babel}      ~~~~~~~~~~~~~~~~~~~~~ MWE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               \documentclass{../frontiersstyle.sty/frontiersENG}          \usepackage{url,lineno}     \usepackage{textcomp}      \usepackage{gensymb}          \usepackage{mathtools}     \usepackage{calc}     \linenumbers          \copyrightyear{}     \pubyear{}          \begin{document}          \bibliographystyle{../frontiersstyle.sty/frontiersinSCNS&ENG}          \cite{katsuyama_functional_2010}          \bibliography{refs}          \end{document}


title: How can I get the borders of contiguous nodes to perfectly overlap?

text: Why aren't the vertical borders of my nodes overlapping, as the horizontal ones do? How can I force them to overlap (thereby preventing the vertical lines between nodes from looking stronger) and avoid the length problem at the right of the second line? By the way, is there a command I can use instead of `minimal width`, perhaps something like `exact width`? ![enter image description here](http://i.stack.imgur.com/1ZI6C.png)               \documentclass[tikz]{standalone}     \usepackage{fourier}     \begin{document}     \xdef\LW{.99*241pt}%\linewidth     \xdef\BLS{\baselineskip}           \begin{tikzpicture}[y={(0,-\BLS)},inner sep=0pt]          \node[draw,minimum width=1.2,minimum height=2.5*\BLS,text width=1cm,align=flush center,font=\scriptsize] (11) at (0,0) {Poids jusqu'\`a} ;           \node[draw,anchor=north west,minimum width=(\LW-1.2cm),minimum height=\BLS,] at (11.north east) {Tarifs nets (\$)};          \node[draw,anchor=south west,minimum width=(\LW-1.2cm)*.24,minimum height=1.5*\BLS,align=flush center,font=\scriptsize,text width=1.6cm] (22) at (11.south east) {Vers France m\'etropolitaine};          \node[draw,anchor=south west,minimum width=(\LW-1.2cm)*.38,minimum height=1.5*\BLS,align=flush center,font=\scriptsize,text width=1.8cm] (23) at (22.south east) {Vers zone outre-mer 1};          \node[draw,anchor=south west,minimum width=(\LW-1.2cm)*.38,minimum height=1.5*\BLS,align=flush center,font=\scriptsize,text width=1.8cm] at (23.south east) {Vers zone outre-mer 2};          \end{tikzpicture}          \end{document}


title: Is there a way to make all my \gls{} links italic

text: I'm using the glossaries package to define a glossary. However, I would like all \gls{} references to appear in italic. Is there any way to do this without adding \it everywhere?


title: Pgfplot axis and axis label cutomization

text: Well, simply, my code gives the graph below. ![What I have.](http://i.stack.imgur.com/5bXek.png) But what I want is something like Fig. 30 (p. 56, Advanced Engineering Mathematics, 9th Ed. by Irvine Kreszig). ![What I want](http://i.stack.imgur.com/XhNtb.png) `\ssfamily` font for the tick label, `axis label` position and a bit more space for it. Preamble:               \usepackage{xcolor}     \usepackage{pgfplots}         \pgfplotsset{compat=newest}         \pgfplotsset{small, every non boxed x axis/.append style={x axis line style=-},     every non boxed y axis/.append style={y axis line style=-}}      My code:               \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[             axis lines= middle,             ylabel=$y$,             xlabel=$t$,             height=100pt,             ymax=3, ymin=-1,             minor y tick num=1,             minor x tick num=1,                  restrict y to domain=-20:20,     ]          \addplot[         thick,         orange,         domain=0:15,         samples=100,     %   fill=orange!60!white,     ]     {(3-2*x)*exp(-0.5*x)};     \end{axis}     \end{tikzpicture}     \caption{The sample function, $y=(3-2x)e^{-0.5x}$.}     \end{figure}      Sorry, if it's long a bit.


title: Set the font color of a section title formatted with leftmargin

text: I am trying to set the font color of a section title that is formatted with `leftmargin`. When I don't use the `leftmargin` format, the font color changes correctly, but once I add the `leftmargin` format the color remains at default black.               \documentclass{article}          \usepackage{titlesec,xcolor}          \titleformat{\section}[leftmargin]   % When leftmargin is removed it works correctly     {\scshape\color{red}\fontsize{15pt}{11}\selectfont}     {}     {0.5em}                              {}          \begin{document}     \section{Section Heading}     \end{document}


title: Glossaries: display only long part of acronym in section headline?

text: In a report that I am creating I'm sometimes using acronyms in section and chapter headlines. I'm using the `glossaries` package for this purpose. I don't want `glossaries` to print the acronym's definition in the table of contents. Thus I'd like to use a command to print only the long version of the acronym in the section/chapter headlines, similar to the `\acl` command from the `acronym` package. I don't like the thought of manually writing the long version in every corresponding headline. Is there such a command or another suitable way to achieve this? Or is there a way for `glossaries` to determine if it's used in a headline and just print the long version there? //edit: `\acrlong` and `\acrshort` work pretty well. But they do two things in addition that I'd like to avoid:   1. the usage of the acronym appears in the number list in the glossary   2. a hyperref is created in the headline Is there a way to get the long part without a hyperref and hide its usage in the `\printglossary` output?


title: Substitute all 'A' with \textsc{a}

text: Can I use catcode to substitute all capital letters in my document to `\textsc{\myletter}`? EDIT: I would like to make this by a function, like: `\thisismystring{BLABLABLA}`, that converts into BL{\textsc{a}}BL{\textsc{a}}BL{\textsc{a}}.


title: How to split a footnote only to odd pages

text: I have a document which uses the `eledpar` package to edit parallel texts. On the even pages, I have a original text from an author and on the odd pages I have my commentary of the text. All is synchronized by the `eledpar` package. My problem is concerning footnotes. I have very big footnotes on the original text side (even pages). LaTeX automatically splits these footnote on two (or more) consecutive pages. I would like to split these footnote **only** between _even_ pages. I don't want a footnote about the original text to be split on the commentary side (odd pages). How can I achieve this?


title: Dramatist package putting speaker in different places when mixing prose and verse

text: I have document that contains both prose and verse. When using the `dramatist` package, the speaker is placed above verse and beside prose. I'd like them to both to the left of the text, similar to the first answer to Justification when using the dramatist package. Here is a MWE:               \documentclass{memoir}         \usepackage{dramatist}     \usepackage[latin]{babel}     \pagestyle{empty}     \linenumberfrequency{5}          \begin{document}          \Character[Billy Prose]{BILLY}{billy}     \Character[Sally Verse]{SALLY}{sally}          \begin{drama*}          \sallyspeaks I am a poet \\     I know it\\     I like to speak in short lines\\     Like this\\     My cat is gray\\     My fish is dead\\     Because the cat ate it\\     I am\\     A very difficult person\\     To have a conversation with.\\          \end{drama*}          \begin{drama}              \billyspeaks I like to talk like a normal person. Your cat is lame. I have a gerbil named Phil. He sleeps in my dresser. I'm so sorry that my examples sounds insane.          \end{drama}          \end{document}      ![](http://i.stack.imgur.com/8QtXf.png)


title: drawing arrows on a circle path and a tangent arrow in tikz

text: I would like to draw relatively complex paths in tikz. This is an example: ![enter image description here](http://i.stack.imgur.com/rsTWp.jpg) The boxes represent nodes with texts of different lengths. The arched arrows should be on a circle path. The arched arrow should touch the strait arrow in its middle. If the angle of the strait arrow is changed, the "circle" should be adjusted accordingly. Is this feasible? How? According to Tarass' suggestion I edited my question. This is the code I could make, but it gives far less nice result than his example.               \usepackage{tikz}     \usetikzlibrary{arrows,shapes}     \begin{document}     \tikzset{ar/.style={->,thick,shorten <=8pt,shorten >=8pt,>=stealth}}      \begin{tikzpicture}     \node (a)     at (0,4)    {aaaaaaaa};     \node (b)     at (8,8)    {bbbbbbbb};     \path (a.north east)    edge [ar]  coordinate[pos=0.5,sloped,below=3cm] (C)  (b.south west);     \path (C) ++(170:3cm) node (m) {MMMM} coordinate (m1);     \draw[ar] (m1) arc (170:60:3cm) node (p) {PPPPPP};     \path (m1) arc (170:60:3cm) coordinate (p1);     \draw [ar] (p1) arc (60:5:3cm) node (r) {RRRRRRRR};     \path (p1) arc (60:5:3cm) coordinate (r1);     \draw [ar] (r1) arc (5:-110:3cm) node (r) {SSSSSSS};     \path (r1) arc (5:-110:3cm) coordinate (s1);     \draw [ar] (s1) arc (-110:-190:3cm);     \end{tikzpicture}     \end{document}      which gives: ![enter image description here](http://i.stack.imgur.com/Wkvdy.jpg)


title: Lstlisting in beamer presentation

text: I would like to insert a source code listing into my beamer presentation. I learnt that we cannot use lstlisting directly in the frame environment, so I am using the following trick:               \defverbatim[colored]\makeset{     \begin{lstlisting}[language=C++,basicstyle=\ttfamily,keywordstyle=\color{blue}]     void make_set(int X) {       parent[X] = X;     }     \end{lstlisting}     }          \begin{frame}     \makeset     \end{frame}      My lstset is:               \lstset{ %       backgroundcolor=\color{white},        basicstyle=\footnotesize,              breakatwhitespace=false,               breaklines=true,                        captionpos=b,                           commentstyle=\color{mygreen},          escapeinside={\%*}{*)},               extendedchars=true,                     frame=single,                         keywordstyle=\color{blue},              language=Prolog,                       numbers=left,                           numbersep=5pt,                          numberstyle=\tiny\color{mygray},       rulecolor=\color{black},               showspaces=false,                      showstringspaces=false,                 showtabs=false,                         stepnumber=2,                           stringstyle=\color{mymauve},          tabsize=2,                             title=\lstname,                         morekeywords={not,\},\{,preconditions,effects },                   deletekeywords={time}                 }      Unfortunatelty the resulting slide has a thick grey line after the code: ![enter image description here](http://i.stack.imgur.com/gSeyy.jpg) Is there any way to remove the line?


title: Set Latex footnote hanging without using footmisc package

text: I need the same positioning of footnotes marks and text as produced by using `\usepackage[hang]{footmisc}` (footnote mark close to the left margin, some space between mark and text and the same space between the text and the left margin for all the lines). I also need to make hyperlinks to the footnotes. Since `footmisc` and `hyperref` packages don't work well together ( _i.e._ no hyperlinks to footnotes are produced), is it possible to specify mentioned positioning without using `footmisc` package? Or is there any other way to accomplish both desired positioning and linking? Here is the working example of what I want to accomplish, just with the working hyperlink:               % Compiled using XeLaTeX.     \documentclass[a4paper, 11pt, twoside, openright]{report}         \setlength{\parindent}{0pt}         \setlength{\parskip}{12pt}     \usepackage[nodisplayskipstretch]{setspace}     \usepackage[hidelinks,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]                {hyperref}     \usepackage[hang]{footmisc}         \setlength\footnotemargin{12pt}          \begin{document}     \section{This is the title}         This is some text with the footnote\footnote{And this is the footnote formated         exactly as I like, but it would be perfect if the hyperlink in the main text         would work as it does when I do not use the footmisc package.}.     \end{document}


title: Alignment in aligned and aligned[t] environments (2)

text: The following code almost gives me the alignment that I want. You will see that in the last five lines of the displayed equations, most of the expressions are ridiculously shifted rightward. I want the first "+" in these lines to be aligned with the first "+" in lines 2 and 3. Thanks.               \documentclass[10pt]{amsart}     \usepackage{}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{newlfont}     \usepackage{mathtools}     \usepackage{tikz}          \begin{document}     \begin{alignat*}{3}     \vert x + y + z \vert^{2}     &= [\cos{a} + \cos{b} + \cos{c}]^{2} + [\sin{a} + \sin{b} + \sin{c}]^{2} \\     &= \begin{aligned}[t] 3 &+ [2\cos{a}\cos{b} + 2\cos{a}\cos{c} + 2\cos{b}\cos{c}] \\     &+ [2\sin{a}\sin{b} + 2\sin{a}\sin{c} + 2\sin{b}\sin{c}]     \end{aligned} \\     &= 3&& + \bigl[&&\cos(a + b) + \cos(a + c) + \cos(b + c) \\       &&&&&+ \cos(a - b) + \cos(a - c) + \cos(b - c)\bigr] \\       &&&+ \bigl[&&\cos(a - b) + \cos(a - c) + \cos(b - c) \\       &&&&&- \bigl(\cos(a + b) + \cos(a + c) + \cos(b + c)\bigr) \bigr] \\       &= 3&&\mathrlap{{}+ 2\bigl(\cos(a - b) + \cos(a - c) + \cos(b - c)\bigr).}     \end{alignat*}          \end{document}


title: Small default distance between the caption and the table

text: By default (in the `article` class), a table caption (without letters with depth) is very close to a table with two or more rows. Only if the table has _one_ row then the caption and the table will be at some distance (in this case letters with depth in the caption seem not to change anything). ![output of MWE](http://i.stack.imgur.com/heHts.png)   * Why is the default distance so small (in Table 1)?   * Why does the distance increase if there is only one line (Table 2)? The picture was created from the following MWE.               \documentclass{article}     \begin{document}          \begin{table}[h]\caption{aaaa}     \centering     \begin{tabular}{r@{ }l}     \hline      Hardly any & distance\\     \hline      between &caption and table;\\ %second row is essential!     \hline      \end{tabular}     \end{table}          \begin{table}[h]\caption{bbbb}     \centering     \begin{tabular}{r@{ }l}     \hline      Some distance between & caption and table;\\     \hline      %no second row!!     \end{tabular}     \end{table}     \end{document}      * * * Of course, there are different "workarounds" (but that is not my question):   * by using              \usepackage{caption}      \captionsetup[table]{skip=5pt}      see: The space between the table and its caption is very small   * by setting `\belowcaptionskip` to some value              \setlength\belowcaptionskip{5pt}      see a similar question: A style prevents me from setting \belowcaptionskip, how do I change that?   * or simply by putting `\strut` inside the caption of Table 1.