title: how can I draw a vertical line between two specific columns in multicol environment

text: Trying to have a vertical line between the 4th and the 5th column in a multicol environment.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{multicol}     \usepackage{lipsum}     %opening               \begin{document}          \begin{multicols}{5}          \lipsum     %... line_beween_forth_and_fith_column     \end{multicols}               \end{document}


title: Bibliographical note with text appearing before the reference

text: I am trying to figure out how to have a bit of text in the bibliography before some entries. If a normal bibliographical entry is something like                [25] Ash, Culotta, Fahrenkamp-Uppenbrink, Malakoff, Smith, Sugden,      Vignieri Science 2 August 2013: 341 (6145), 472-473.      What I am aiming to do is something like               [25] This is approached in the recent very interesting paper treating      this topic. See, Ash, Culotta, Fahrenkamp-Uppenbrink, Malakoff, Smith,      Sugden, Vignieri Science 2 August 2013: 341 (6145), 472-473.      With the format I am using, footnotes appear as bibliographic entries, so if there is a way to cite the full bibliographic entry and make sure it doesn't appear twice,               \footnote{This is approached in the recent very interesting paper treating this topic. See,\citeCommandIdontKnow{paperlabel}.}      That would work.


title: Adding Tikz node in pgfextra triggers double drawing of containing path

text: This is a follow up question to Adding nodes in a style If I use the following code, I obtain a strange behavior: # Code               \documentclass[tikz]{standalone}     \usetikzlibrary{matrix,fit,backgrounds}     \tikzset{       fill first cell/.style={         append after command={           \pgfextra             \pgfonlayer{background}               \tikzset{every node/.style=}               \node[fit=(\tikzlastnode-\the\pgfmatrixcurrentcolumn-\the\pgfmatrixcurrentrow), inner sep=+0pt, fill=#1] {};             \endpgfonlayer           \endpgfextra         }       },       fill first cell/.default=red!7     }     \begin{document}     \begin{tikzpicture}     \matrix (m) [matrix of nodes, fill first cell] {       1 & 2 \\       3 & 4 \\     };     \end{tikzpicture}     \end{document}      # Output ![output](http://i.stack.imgur.com/upmAo.png) # Desired output ![desired output](http://i.stack.imgur.com/skCRk.png) Everything looks as expected when printed. However, the PDF viewer shows all the letters slightly bolder. This behavior can be seen in the two outputs shown above. I strongly suspect that the content of the matrix is drawn twice. I know it is drawn at least once **after** the code from my style. To prove it, remove the background layer command and the red rectangle will still appear in the background from the number 4. Furthermore, if I use a pgfnode instead of a Tikz node the problem does not appear. What is causing this behavior and how can I fix it? # Edit With the help of @percusse, @DavidCarlisle, and @AndrewSwann I have been able to find a shorter MWE as well as a better way to check for the existence of the bug. The following code exhibits the bug:               \documentclass[tikz]{standalone}     \begin{document}     \showoutput     \begin{tikzpicture}     \path node {x}           \pgfextra             \node{};           \endpgfextra     ;     \end{tikzpicture}     \end{document}      By using the following command `pdflatex mwe.tex | grep cmr/ | wc -l` you can check how many times the character `x` is being printed. `1` means no bug, `2` means bug. By playing with the content of `\pgfextra ... \endpgfextra` I have made some additional observations:   * `\pgfnode{rectangle}{node}{}{}{}` does not exhibit the bug, so it seems to be a Tikz problem   * `\draw (0,0) -- (0,1) -- (1,1) -- (1,0) -- cycle;` does not exhibit the bug either   * `\draw (0,0) -- (0,1) -- (1,1) -- (1,0) -- cycle node {};` does exhibit the bug   * `\draw (0,0) -- (0,1) -- (1,1) -- (1,0) -- cycle; \node {};` does not exhibit the bug The lines composing the path do not seem to be drawn twice. However, in the following code, both nodes, x and y, are printed twice.               \documentclass[tikz]{standalone}     \begin{document}     \showoutput     \begin{tikzpicture}     \path node {x} node {y}           \pgfextra             \node{};           \endpgfextra     ;     \end{tikzpicture}     \end{document}      # Workaround (Obsolete, see the solution instead) This question is not yet answered, however there is now a workaround available: just add a `\path;` before the `\node{};` inside `\pgfextra`. # Solution As mentionned in Adding nodes in a style and in @MarkWibrow's answer, the problem was a lack of protection of the outer path in `\pgfextra`. The classical way to protect is to use `\pgfinterruptpath`. This is however **not enough when inserting TikZ nodes** and it must be coupled with `\setbox\tikz@figbox=\box\pgfutil@voidb@x`. The fixed MWE looks like:               \documentclass[tikz]{standalone}     \begin{document}     \showoutput     \begin{tikzpicture}     \path node {x}           \pgfextra             \pgfinterruptpath               \makeatletter\setbox\tikz@figbox=\box\pgfutil@voidb@x\makeatother               \node{};             \endpgfinterruptpath           \endpgfextra     ;     \end{tikzpicture}     \end{document}      The `\pgfinterrupath` serves two purposes. If on top of a node `x` we were drawing a path, it would make sure the node `y` would not delete it. In our case, it is needed for `\makeatletter\setbox\tikz@figbox=\box\pgfutil@voidb@x\makeatother` not discard the `x` node. This solution works for TikZ/PGF version 2.10 and the CVS version. The problem mentionned by @MarkWibrow in the CVS version was the following: When the fit node was encountered, the nodes of the matrix were all inserted in the background layer instead of the main layer where they belong. This was a bug (http://sourceforge.net/p/pgf/bugs/260/) that is now fixed. If using exclusively the CVS version (after September 9 2013) the following code works:               \documentclass[tikz]{standalone}     \begin{document}     \showoutput     \begin{tikzpicture}     \path node {x}           \pgfextra             \pgfinterruptpath               \node{};             \endpgfinterruptpath           \endpgfextra     ;     \end{tikzpicture}     \end{document}


title: Displaying abbreviation names of authors

text: I would like to cite authors just "usually", like [Author, Year]. For example: alea iacta est. [Caesar, 2013] What I get is: alea iacta est. [Cae13] Although I am using a .bib file with the following information:               @TECHREPORT{caesar2013,        AUTHOR="G. I. Caesar",        TITLE="Title",        INSTITUTION="RomeDome",        TYPE="misc",        MONTH=jan,        YEAR=2013     }        However, the information is correct in the bibliography. Is there any way to change that? There shouldn't be a problem with my compiler or properties, because I am using the online editor and compiler writelatex.com. Is there any \usepackage tag or another option to fix this issue?


title: Change with Adobe Pro a PDF document generated with LaTeX

text: I have produced a PDF with LaTeX and now need to change something within Adobe Pro (being able to do so is a requirement by an editor). If I open the document within Adobe Pro and want to change some text I get the error message (I have it translated from german): > For the whole or for a part of the selection is no system font available I guess this is because the font LaTeX is using (CM) is not installed on the system. Is that correct? Can I somehow get around this (would installing the font help - didn't try because of lack of administrator rights)?


title: The font size in my page

text: In my report the chapter 1 have a small text but the chapter 2 have a big text ! someone now what the probleme !? I hope I explain well my problem this the code :               \documentclass[a4paper,9pt]{extreport} %document A4 type rapport          \usepackage[utf8]{inputenc} % les caractère spéciaux          \usepackage[french]{babel}  %traduire les mots anglais en français.          \usepackage{graphicx} %Package pour les images.          \usepackage{geometry} % la margine de la page          \usepackage{fancyheadings}% l'entête et le pied de page          % paramètre de l'entête du page et pied du page          \lhead{\leftmark}     \chead{}     \rhead{\thepage}          \cfoot{}          \pagestyle{fancy}           \usepackage{float}          %Pour l'index                    \usepackage{listings} % encadrer les codes sources          \usepackage{color}           \usepackage{setspace} %espace entre paragraphe          \usepackage{enumitem} %package de liste          \usepackage{xcolor} %package de liste          %\onehalfspacing %espace 1.5 cm     % \doublespace %espace double     % ***** on peut l'utiliser comme une environnement ******/                    % \definecolor{name}{rgb}{0.5,0.5,0.5} %définir une couleur pour l'encadrement du code source ( ici graylight)     \definecolor{lightgray}{rgb}{0.9,0.9,0.9}               \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\lstlistingname}{Code}          \renewcommand{\lstlistingname}{Codes}     \renewcommand{\lstlistlistingname}{Liste des \lstlistingname }               %\geometry{hmargin=2.5cm,vmargin=2cm}          \geometry{top=5cm, bottom=5cm,left=4cm, right=4cm}               \begin{document}     \thispagestyle{empty} %enlever la numéro du premier page ( page courant )     \begin{centering}          \Large{xxx } \\     \huge{\textbf{FACULTÉ DES SCIENCES} } \\          \hspace{3.5cm} %pour insérer un espace horizontal dans un texte. ---  \hspace* force l'insertion d'un espace même en début ou en fin de ligne. -----          \includegraphics[width=30mm]{fsr.jpg} \\          \vspace*{3cm}          \large{DÉPARTEMENT D'INFORMATIQUE} \\          \hspace{3cm}          \large{FILIÈRE} \\     \large{LICENCE PROFESSIONNELLE} \\     \large{xx} \\     \large{PROMOTION 2013-2014} \\          \vspace*{1cm}          \fcolorbox{black}{lightgray}{     \begin{minipage}{1\textwidth}     \vspace*{0.2cm}       \centering{ \Large{\textbf{MÉMOIRE DE FIN D'ÉTUDE} }}      \vspace*{0.2cm}     \end{minipage}     }          \vspace*{1cm}          \Large{Intitulé}\\          \Large{\textbf{xxx}} \\          \vspace*{1cm}          \Large{Présenté par :} \\          \end{centering}                    % ************************************************************************************************** %     \newpage     \tableofcontents     \thispagestyle{empty}     \newpage     \listoffigures          \newpage     \lstlistoflistings               \newpage     \vspace*{1cm}     \textbf{ \Huge{Remerciement}}\\          \begin{onehalfspacing}          L’achèvement de ce modeste travail n’a pas pu être réalisé sans la présence et  l’intervention généreuse de nos professeurs     , c’est le fruit de leurs  conseils précieux et de leurs efforts respectueux. A cet effet, nous tenons à présenter nos remerciements les plus sincères et nos respects les plus distingués à tous ceux qui nous ont assisté durant la réalisation de ce projet, en particulier notre encadrant \textit{xxxl} , ainsi nos Professeurs. Nous garderons toujours d’eux un très bon souvenir de leurs disponibilités et de leur enseignement riche, clair et méthodique. Que tous ceux qui nous ont aidés, de près ou de loin, trouvent ici l’expression de nos sentiments les meilleurs. Mentionnons aussi que l’aide et l’encouragement que nous a donné nos familles et nos      proches ont beaucoup compté dans la réalisation de ce projet.     \thispagestyle{empty}          \end{onehalfspacing}          \chapter{Introduction} % Chapitre 1     \parindent=1cm     \begin{onehalfspacing}          La réalisation d'un projet de fin d'étude est une occasion pour l'étudiant d'évaluer ses connaissances, c'est une expérience nécessaire qui permet lors des dernières années d'études de découvrir la difficulté d'appliquer les notions théorique acquises lors de la formation dans un travail purement pratique.          \end{onehalfspacing}     \thispagestyle{empty}          \chapter{Chapitre 2} % Chapitre 2          On sait depuis longtemps que travailler avec du texte lisible et contenant du sens est source de distractions, et empêche de se concentrer sur la mise en page elle-même.


title: Can I silence pdfpages output?

text: The `pdfpages` package does not seem to have either a `verbose` or `quiet` option. I am compiling a big document and the include messages from `pdfpages` are obscuring the warnings from other places in the document. Is there a way to quiet these messages or another method for drawing my attention to the warnings?


title: TikZ: Using optional arguments in after part of \newenvironment*

text: How can I pass the optional arguments to a node being drawn in the after part of a `\newenvironment*`? In the before part this is easy since I can simply use `#1`. I tried using `\edef`, but that ended up with: > ! Package pgfkeys Error: I do not know the key '/tikz/draw=red' and I am > going to ignore it. Perhaps you misspelled it.               \documentclass[tikz,convert]{standalone}          \newenvironment*{verycontrivedexample}[1][]     {       \node [draw=black, #1] (Before) at (0, 1) {Before};     }     {       % This is what I'd like to do, but #1 is not available anymore       % \node [draw=black, #1] (After) at (0, 0) {After};     }          \begin{document}     \begin{tikzpicture}            \begin{verycontrivedexample}[draw=red]       \end{verycontrivedexample}          \end{tikzpicture}     \end{document}


title: Package xcolor Error: Undefined colors “Maroon”/“Royal Blue” when master has PDF included classicthesis 3.1

text: I am using `classicthesis` 3.1 in Lyx 2.0.6. When I include PDFs in the master document, I receive the following error:               ! Package xcolor Error: Undefined color `Maroon'.          See the xcolor package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.13 \begingroup \color{Maroon}                                     \spacedallcaps{\myTitle} \endgroup\\     Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.      This topic has previously been asked and closed, but provided solutions do not work:   * Error with xcolor package   * "Package xcolor error" shows up when a child doc has an embedded pdf When I include PDFs in the original `classicthesis` template, I can get the document to compile if I do not remove the original `Chapter<1,2,3>.lyx` files. Once changed, the original template does not always compile. `classicthesis.sty` has not been modified as shown below.               % Colors     % ********************************************************************     \PassOptionsToPackage{dvipsnames}{xcolor}     \RequirePackage{xcolor} % [dvipsnames]      \definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0     \definecolor{webgreen}{rgb}{0,.5,0}     \definecolor{webbrown}{rgb}{.6,0,0}     %\definecolor{Maroon}{cmyk}{0, 0.87, 0.68, 0.32}     %\definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}     %\definecolor{Black}{cmyk}{0, 0, 0, 0}      Uncommenting `\definecolor` for `Maroon`, `RoyalBlue` and `Black` does not resolve the issue. I have modified `classicthesis-config.tex` to change the text area and added new commands under user ad-hoc commands, but otherwise it is set to default. Is this a conflict between `xcolor` and `pdfpages`? Or a colorspace issue?


title: Name formatting with cleveref - question about types

text: I want to customize the text that appears when I do a `\cref{}`, so for example, I want to make a link to section 0.1 but I want the text to say 'Summary' not section 0.1. I had this part working with the following line at the top of my document:               \crefformat{section}{\textbf{#2Summary#3}}      and then when I call the reference I use:               \cref{sec:CogSysParadigm}      And it shows up as Summary (but with a red box around it). Which is perfect. **My problem is that I can't get the same thing to work for an item.** I tried 'item', itemize item, subitem, etc. Example of what I tried:               \crefformat{item}{#2ToC#3} % so this would have a ToC as the text       and then I am using `\cref` like:               \cref{itm:CogSysParadigm} % but it gives me item 1(d)ii instead


title: Beamer–PSTricks Diagram "Wiggling"

text: I am working on a presentation using Beamer with diagrams done in PSTricks. I would like to animate one of my diagrams, and have achieved this by using various `\only`, `\uncover`, etc. statements. However, between one of the animations, the entire diagram appears to "wiggle" slightly. See the following link for the slides: https://www.dropbox.com/s/fvzfdwpo6ai6ms5/wiggling.pdf Here's my code:               \begin{pspicture}(1,1)     \psset{unit=2in, linewidth=0.02}     \uncover<2->{\psline[linestyle=dotted,arrows=-](-0.3,-0.3)(1.7,-0.3)}     \psline[linecolor=blue](0.0,-0.0)(0.0,-1.0)     \psline[linecolor=blue](0.4,-0.0)(0.4,-1.0)     \psline[linecolor=blue](0.8,-0.0)(0.8,-1.0)     \psline[linecolor=red](0.5,-0.0)(0.5,-0.85)     \rput{90}(0.5,-0.85){\textcolor{red}{\Huge\textsf{x}}}     \only<1-2>{     \psline[linecolor=red](0.5,-0.4)(0.9,-0.4)     \psline[linecolor=red,arrows=->,arrowsize=0.1](0.5,-0.4)(0.75,-0.4)     \psline[linecolor=red](0.9,-0.4)(0.9,-1.0)     }     \only<3>{     \psline[linecolor=red](0.5,-0.5)(0.9,-0.5)     \psline[linecolor=red,arrows=->,arrowsize=0.1](0.5,-0.5)(0.75,-0.5)     \psline[linecolor=red](0.9,-0.5)(0.9,-1.0)     }     \only<4-5>{     \psline[linecolor=red](0.5,-0.6)(0.9,-0.6)     \psline[linecolor=red,arrows=->,arrowsize=0.1](0.5,-0.6)(0.75,-0.6)     \psline[linecolor=red](0.9,-0.6)(0.9,-1.0)     }     \psline[linecolor=red](0.5,-0.3)(0.1,-0.3)     \psline[linecolor=red,arrows=->,arrowsize=0.1](0.5,-0.3)(0.2,-0.3)     \psline[linecolor=red](0.1,-0.3)(0.1,-1.0)     \psline[linecolor=blue,linestyle=dashed](0.8,-0.7)(0.65,-0.7)     \psline[linecolor=blue,linestyle=dashed](0.65,-0.7)(0.65,-1.0)     \psline[linecolor=blue,linestyle=dashed](0.0,-0.6)(-0.3,-0.6)     \psline[linecolor=blue,linestyle=dashed](-0.3,-0.6)(-0.3,-1.0)     \psline[linecolor=blue,linestyle=dashed](0.0,-0.8)(-0.15,-0.8)     \psline[linecolor=blue,linestyle=dashed](-0.15,-0.8)(-0.15,-1.0)     \uncover<5->{     \psline[linecolor=blue](0.8,-0.7)(0.65,-0.7)     \psline[linecolor=blue](0.65,-0.7)(0.65,-1.0)     }     \only<5>{     \psline[linecolor=red](0.7,-0.75)(0.9,-0.75)     \psline[linecolor=red](0.7,-0.75)(0.7,-0.9)     \rput{90}(0.7,-0.9){\textcolor{red}{\Huge\textsf{x}}}     }     \only<6->{     \psline[linecolor=red](0.5,-0.8)(0.9,-0.8)     \psline[linecolor=red,arrows=->,arrowsize=0.1](0.5,-0.8)(0.75,-0.8)     \psline[linecolor=red](0.9,-0.8)(0.9,-1.0)     }     % 2nd tree     \uncover<2->{     \psline(1.5,0)(1.5,-0.3)     \psline(1.3,-0.3)(1.7,-0.3)     \psline(1.3,-0.3)(1.3,-1)     \psline(1.7,-0.3)(1.7,-1)     }     \psline[strokeopacity=0,arrows=-](1.7,-0.3)(1.7,-1)     \end{pspicture}      Any thoughts on what may be the problem? Thanks in advance for your help.


title: LaTeX Command line in OS X

text: I need to run latex from command line for a project on OS X. LaTeX is installed in: > /usr/local/texlive/2010 in the bin folder there are three folders: > /usr/local/texlive/2010/bin/universal-darwin   >  /usr/local/texlive/2010/bin/win32   >  /usr/local/texlive/2010/bin/x86_64-darwin both "universal-darwin" and "x86_64-darwin" have the executable file "latex". I ran this line in both of these directories and received the same error. > ./latex /Users/fluid/Desktop/sample.tex Here is the error > fluid:x86_64-darwin fluid$ ./latex /Users/fluid/Desktop/sample.tex   >  This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)   >  restricted \write18 enabled.   >  entering extended mode   >  ! I can't write on file `sample.log'.   >  (Press Enter to retry, or Control-D to exit; default file extension is > `.log')   >  Please type another transcript file name: and here is the file sample.tex               \documentclass[12pt]{article}      \begin{document}     \begin{center}     Sample \LaTeX{} file     \end{center}     Here is an equation     \begin{equation}     f(x) = e^x     \end{equation}     \end{document}      How can I make this work?


title: How to suppress caption numbering in a figwindow

text: \documentclass[a4paper]{article}     \usepackage{picinpar}     \usepackage{graphicx}     \begin{document}          \begin{figwindow}[1,l,{\mbox{%     \includegraphics[width=80pt]{g/tiger.png}}},{\label{fig:leadfield}\TeX{} Tiger}]          In this lab, you will record the standard limb leads in sequence,according to the diagram below:     The goal for the Frank electrode system is to capture the three-dimensional extent of the heart dipole.  For this, it is necessary to measure potential differences not just in the frontal plane, as in the limb leads, but along the antero-posterior (front-to-back) axis of the body.  The diagram below illustrates the original Frank lead system \cite{RSM:Fra56} and we will use a simplified version of this.     \end{figwindow}               \end{document}


title: Side by Side matrices

text: How can I get matrices that are side by side? Currently I have the following:               \[     \begin{pmatrix}[ccc|c]     1&2&0&0\\     -1&1&2&0\\     1&0&1&5\\     0&-2&1&4     \end{pmatrix}     \]     \[     \begin{pmatrix}[ccc|c]     1&2&0&0\\     0&3&2&0\\     0&-2&1&5\\     0&-2&1&4     \end{pmatrix}     \]      What I want is the matrices to go across the paper with row equivalence signs on them (I am showing a reduced echelon form matrix)


title: Macro finding a forgotten \command

text: I do not know if this question has more to do with the editor I use (which is LaTeXShop, on Mac) or some clever LaTeX package, but I am typesetting some notes for a course and I would like to systematically use a command, say               \variable      for the variable of functions so that I can write               $f(\variable)$      and get `$f(x)$` or `$f(Y)$` consistently in the whole document by simply choosing once and for all in the preamble the value of `\variable`. The reason is that in a first version `$f(x)$` might be good, but I think I will eventually want to move to different variable names. The problem is that I have been typing `$f(x)$` automatically for ages now, and I fear that here and there I will write `$f(x)$` instead of `$f(\variable)$` getting the same visual effect if `\variable` is set to `$x$`, so that I will never catch the error while proof reading, but creating a mess the day I will rename my `\variable`. So comes my question: is there a systematic way to ask LaTeX to warn me whenever I use `$x$` "although I wanted to use `\variable`"? Of course, I do not want it to warn me each time I use the letter `x`. (I will be writing in French, and there are a lot of `x`'s here and there in text) nor to warn me about `$f(x)$` and forget about `$g(x)$`.)


title: Conditional compilation failed

text: I think you can understand the scenario of the following code only by reading it.               % compile with pdflatex -shell-escape          \documentclass{article}     \usepackage{filecontents}          \begin{filecontents*}{filename.tex}     \documentclass{article}     \newif\ifsecret     \begin{document}     common 1          \ifsecret     I have a top secret message here.     \fi          common 2     \end{document}     \end{filecontents*}               \begin{document}     \immediate\write18{pdflatex -jobname=secret-incuded "\AtBeginDocument{\secrettrue} \input{filename}"}     \immediate\write18{pdflatex -jobname=secret-excluded "\AtBeginDocument{\secretfalse} \input{filename}"}     Done, secret-included.pdf and secret-excluded.pdf have been generated!     \end{document}      What is wrong in my code above?


After updating my MiKTeX 2.9 package, `.tex` files which compiled perfectly with 0 error 0 warning now gives 0 error 1 warning:               Package etoolbox Warning: Patching '\begin' failed!  (pdflatex)     (etoolbox)  'AtBeginenvironment' will not work      A minimum working example is               \documentclass[11pt]{article}     \usepackage{html}     \usepackage{datetime}     \begin{document}        MWE!     \end{document}      I don't really like to let unanswered warnings piling ups at the end of compilations, what, short of not using one of the two packages, can I do to suppress the warning?


title: Draw curved lines with arrow in LaTeX (TikZ)

text: I need to write a paper and include some graphics. The image  I want to include by TikZ is the one on the link. The idee is to draw three curved lines, en put in the middle an arrow (the directions in this example are just random) en at both ends of the line an arrow. I have no idea how to do this, the TikZ manual isn't very helpful. I hope that someone can help me!


title: Printing the first N terms from a telescoping series

text: I would like to produce a LaTeX document that generates the first N terms of the telescoping series sum(1/k-1/(1+k)) where k=1,2,3...,N, such that it displays at least the first 10 terms. I want the output in the form (1-1/2)+(1/2-1/3)+.....+(1/10-1/11) How can I achieve this?


title: pgfplots intersection with path

text: I am trying to find the intersections of a path with plots from `pgfplots` via the `intersection` library. The intersections found clearly do not match the visable intersections. It seems as if they are transformed to a different coordinate system. Is it possible to correctly calculate these intersections? > ![example](http://i.stack.imgur.com/bHopQ.png) ## MWE               \documentclass{article}     \usepackage{pgfplots, tikz}     \usetikzlibrary{calc, intersections}         \begin{document}     \begin{tikzpicture}          \begin{axis}[name=firstaxis]     \addplot[name path global=firstfunction]{e^x};     \end{axis}         \begin{axis}[name=secondaxis, at={($(firstaxis.south)-(0,1cm)$)}, anchor=north]     \addplot[name path global=secondfunction]{x^3};     \end{axis}          % Draw intersection line      \draw[color=black, opacity=1, name path global=intersectionline] (firstaxis.north) -- (secondaxis.south);          % Draw intersections points     \fill          [name intersections={of=intersectionline and firstfunction}]          (intersection-1) circle (2pt);               \fill          [name intersections={of=intersectionline and secondfunction}]          (intersection-1) circle (2pt);          \end{tikzpicture}     \end{document}


title: Tufte like axis with pgfplots

text: How to achieve this kind of axis with pgfplot ? Image taken from Szymon Beczkowski's awesome PhD thesis design (thesis link) ![Credit to Beczkowski, Szymon](http://i.stack.imgur.com/UCHRv.png) I may provide you with some data to play with.               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[xlabel={$L$ [H]},ylabel={$\hat{I}_{DM}$ [A]},axis lines*=left,grid,xtick=data]       \addplot coordinates {(948e-6,1.61981) (1.5e-3,1.02377) (2e-3,0.769047) (2.5e-3,0.614994) (3e-3,0.503511)};     \end{axis}     \end{tikzpicture}     \end{document}


title: \vref and input command

text: You've saved my life in some occasions, I am writing my master thesis and as I am working with MATLAB, I found a very useful MATLAB function which "translate" MATLAB images to TeX tikzpicture. I decided to put the images in some folders and to call them with a "input" command, so i make everything like this:               \begin{figure}[H]     \centering           \input{./images/cap3/expmcwe/imax150t100.tex}     \caption{Results at time $t=100$ with $i_{max}=150$}         \label{fig:imax150t100exp}     \end{figure}      and everything worked fine. Then i tried to recall the images with the \vref command, recalling the labels i wrote (i made copy+paste to be sure!) and they doesn't recall anything. They write something like:"as we can see in figure ?? on page 79"; the page is correct but there is no figure number! Just to be clear:   * I have uploaded all the necessary packages (I also put hyperref before varioref)   * I use TeXShop on Mac   * I have read all the manuals of the packages and found nothing   * I have to give my thesis to my tutor on thursday :) I hope some of you have a piece of advice for me! Thank you in advice to all of you. [EDIT] I add some more informations: I am writing in the {book} environment, and it's a bit complicated to write here how my file is because I have one main file with the heading of my thesis recalling all the chapters. However I'll put here the code of the document which stays after the \usepackage (which are something like 40, so i don't know if it is useful to put them all...               \begin{document}          \title{---}     \providecommand{\autore}{Matteo Facchini}     \providecommand{\coautore}{}     \providecommand{\cocoautore}{}                            \providecommand{\principaladviser}{---}       \providecommand{\corelatore}{}     \providecommand{\secondadviser}{}     \providecommand{\annoacc}{2013-2014}     \providecommand{\corso}{\uppercase{---}}     \providecommand{\nomecorso}{}     \titlep     \thispagestyle{empty}          \cleardoublepage          \thispagestyle{empty} % citazione         \begin{flushright}         \vspace*{4 cm}         \textit{---}\\         \end{flushright}           \newpage     \thispagestyle{empty}          \cleardoublepage          \thispagestyle{empty} % dedica     \begin{flushright}     %   \vspace*{4 cm}     %   \textit{ \\     %   }\\     %   []\\          %   \vspace{2cm}     %   \textit{}\\     %   ()         \end{flushright}               \newpage     \thispagestyle{empty}              %\maketitle         \cleardoublepage         \input{abstract}         \newpage         \thispagestyle{empty}          \frontmatter             \newpage         \tableofcontents                  \listoffigures              \listoftables              \lstlistoflistings              \newpage         \printnomenclature          \mainmatter               \pagestyle{fancy}             %\fancyhead[LO]{}              %\fancyhead[RE]{}             \fancyhead{}             \fancyhead[RO,LE]{\slshape \leftmark}             \fancyfoot{}             \fancyfoot[RO,LE]{\thepage}      \fancypagestyle{plain}{%      \fancyfoot{}      \fancyfoot[RO,LE]{\thepage}}              \input{introd}              \input{cap1}             \input{cap2}             \input{cap3}     %    \input{cap4}     %    \input{cap5}     %    \input{cap6}          %   \input{conclusion}                \cleardoublepage          %\phantomsection         \addcontentsline{toc}{chapter}{\bibname}         \bibliographystyle{plainnat}         \bibliography{bibliography}              \cleardoublepage         \input{acknowledgement}         \newpage         \thispagestyle{empty}          \end{document}


title: Table of contents does not show in a frame

text: In the following presentation, the table of contents does not show on the second slide, but when I change the whole thing to an article (removing beamer related stuff), the table of contents is shown.               \documentclass{beamer}     \let\Tiny=\tiny     \usetheme{Warsaw}     \setbeamertemplate{headline}{}     \title{Title}       \author{HaskellElephant}     \date{\today}      \begin{document}          \begin{frame}     \titlepage     \end{frame}           \frame{\tableofcontents}          \section{description of problem}     \section{Second Section}       \subsection{sub1}       \subsection{sub2}       \subsection*{sub3}     \section{conclusion}     \end{document}      The whole thing is compiled (twice) on the texlive distribution from ubuntu 11.10. How do I make the table of contents show up on the second slide?


title: Datatool : can't use \DTLreplaceentryforrow in nested loop "foreach"

text: In the following MWE (which make no real sense, but which is minimal:) ) I have two nested `DTLforeach` loops. The values displayed in the line "`%for debugging`" show the expected behaviour for the `DTLforeach` loops: the first loop runs on all entries (4 rows). For each of these rows, the second loop runs on rows. But the command `\DTLreplaceentryforrow{a}{xx}`, which should replace the value of `a` by "`xx`", does not do it. Notice, that if you move `\DTLreplaceentryforrow{a}{xx}` outside from the inner loop, then it works as expected. Thus, there seems to be a problem with this command in a nested loop. (REM: according to datatools-documentation, `DTLforeach` can be nested up to three times.)               \documentclass[12pt]{article}     \usepackage{datatool}     \begin{document}     \DTLnewdb{table}     \DTLrowcount{table}          \DTLnewrow{table}     \DTLnewdbentry{table}{a}{1}     \DTLnewdbentry{table}{b}{oui}     \DTLnewrow{table}     \DTLnewdbentry{table}{a}{2}     \DTLnewdbentry{table}{b}{oui}     \DTLnewrow{table}     \DTLnewdbentry{table}{a}{1}     \DTLnewdbentry{table}{b}{non}     \DTLnewrow{table}     \DTLnewdbentry{table}{a}{2}     \DTLnewdbentry{table}{b}{non}          \section{original table}          \DTLdisplaydb{table}          \section{modified table}          \DTLforeach{table}{\a=a,\b=b}{%     \DTLforeach{table}{\aa=a,\bb=b}{%     a= \a , b= \b , aa=\aa , bb=\bb % only for debugging          \DTLreplaceentryforrow{a}{xx}     }     }          \DTLdisplaydb{table}     \end{document}


title: How to write a bounding box information in PostScript to an external file and read it in TeX at the second compilation?

text: ## Scenario   * I want to create a new environment, e.g., `pscanvas` that does not need any size specification but just a unique filename. It can contain any graphic objects that `pspicture` can contain. Thus              \begin{pscanvas}{<filename>}% no size specification needed     % any graphic objects go here     \end{pscanvas}      will simplify              \begin{pspicture}(<width>,<height>)% size specification needed as usual     % any graphic objects go here     \end{pspicture}      or              \begin{pspicture}(<x1>,<y1>)(<x2>,<y2>)% size specification needed as usual     % any graphic objects go here     \end{pspicture}        * Because the canvas size is not specified in the TeX input file, the TeX input file needs to be compiled at least twice. The first compilation with `latex->dvips->gs` must produce a temporary file, for example, `<filename>.bbi` (`bbi` stands for bounding box info). This temporary file is generated on the fly by GhostScript when invoking PostScript code embedded in `pscanvas`. The first compilation does not need to produce PDF output because the canvas size has not been properly prepared by TeX. However, if we produce PDF output, the PDF should render a notification box saying "Graphics is premature, please compile once more.". The second compilation with `latex`, TeX engine reads the `<filename>.bbi` to make the exact space for the graphics `filename`. Compilation with `dvips->ps2pdf` then produces a final PDF output. ## Question How to write bounding box information of the canvas in PostScript to an external file `<filename>.bbi` and read it from TeX world for preparing the canvas size?


title: Decorating (with random steps) a filling pattern

text: \fill[pattern=north east lines] (A,B) rectangle (C,D);      How to make so that the stripe the pattern creates is of style `decoration = {random steps, segment length = 0.5mm, amplitude = 0.15pt}`


title: How can I make a LaTeX poster with all affiliations on the same line, using Beamer?

text: I'm using the `beamer` class and all the examples I can find have the author affiliations on different lines. My research project requires us to have them all on 1 line, with superscripts indicating the author's correct affiliation. Here is my current code.               \title{Title goes here}      \author[shortname]{Author1 \inst{1} \and Author2 \inst{2}     \and Author3     \inst{3}}     \institute[shortinst]{\inst{1} Affil1 \and                        \inst{2} Afil2 \and \inst{3} Afil3 }      For the record, I tried reading authblk affiliations on same line but didn't understand it. Simple examples are needed with my knowledge level.


title: Add space before and after tabular environment

text: The `tabular` environment does not add any vertical space before or after it. This looks odd, in my view. What is the "correct" or "best" way to add some space? Also, why is there more space _after_ the `tabular` environment than before it, as seen in the example below?               \documentclass{article}     \begin{document}     \noindent Here is a line with some text in it.          \begin{tabular}{*4{l}}         Worg & Worg & Worg & Worg\\         Worg & Worg & Worg & Worg\\     \end{tabular}          \noindent Here is another line with some text in it.     \end{document}      ![enter image description here](http://i.stack.imgur.com/q7Ijw.png)


title: columns with variable width in LaTeX

text: I wanted to partition a text into three columns, each of which should have a different width. It's not a table of anything just how I'd like to put the text. I've already tried `multicols`, but there's no option for variable width (I've also tried `\varwidth` inside `multicols`, but `multicols` just ignores it) and I don't want it to look like a table. I won't post my code here, as I'd just need one environment to do what I want, the code's too long (and I'm a bit ashamed of it too, I'm just starting in TeX ^^). Hope anybody can help :P


title: Why does tikzlibrary change catcodes for certain characters?

text: I'm trying to put together a library of common exam and homework problems that I use throughout the year. I've gathered quite a collect over the years and was thinking it would be nice to have something like:               \loadhomeworkset{2.1.4.3}      I thought I would look at how `\usetikzlibrary` works. For the most part, I believe I understand the code. What I don't understand, though, is why the catcodes for `@`, `|`, `$`, are changed. Is this really something special to TikZ or is it something I should aware of in building a robust interface.


title: How to add a hook to a macro

text: LaTeX uses hooks extensively, one method employed is the command `g@addto@macro`. It is defined in source2e as:                \long\def\g@addto@macro#1#2{%       \begingroup          \toks@\expandafter{#1#2}%          \xdef#1{\the\toks@}%       \endgroup}      I have used the `g@addto@macro` in the minimal example below:               \documentclass{article}      \begin{document}          \long\def\mainmacro{Preambles in main macro. \par}     \xdef\testOne{Contents of first macro. \par }     \xdef\testTwo{Contents of second macro. \par }          \makeatletter       \g@addto@macro{\mainmacro}{\testOne}       \g@addto@macro{\mainmacro}{\testTwo \par}       \g@addto@macro{\mainmacro}{Adhoc contents (1). \par}       \g@addto@macro{\mainmacro}{\xdef\@elt{ Test } }       \g@addto@macro{\mainmacro}{Adhoc contents (2).\@elt \par}     \makeatother          \mainmacro     \end{document}      What would be the best way to add a hook to the macro - at the beginning or for that matter anywhere but the end?


title: Isometric Tables in LaTeX

text: Can someone please help me with a simple LaTeX code to draw something like the attached picture? ![3D Matrix table](http://i.stack.imgur.com/Ob9XA.png)


title: Multiple columns in table, problem with alignment

text: The following code generates a table: ![enter image description here](http://i.stack.imgur.com/Vdq23.png)               \begin{table}[!t]     % increase table row spacing, adjust to taste     \renewcommand{\arraystretch}{1.3}     \caption{An Example of a Table}     \label{table_example}     \centering     \begin{tabular}{|c|c|c|c|c|}     %\toprule     \hline     a & b & c & \multicolumn{2}{c|}{abcdefg fewfewfe}\\     %\midrule     & & & st1 & st2\\          \hline     a         & 1  & 2 &  3 & 4  \\     b         & 1  & 2 &  3 & 4 \\     %\bottomrule     \hline     \end{tabular}     \end{table}      I don't know why columns of st1 and st2 are not properly aligned. When I replace 'abcdefg fewfewfe' with a single word say 'abcde', the alignment will be good.


title: tex font error : rectification needed

text: If i use this command:               \documentclass[10pt,amssymb]{revtex4}     \usepackage{amsmath,fontspec}     \setmainfont[Mapping=tex-text}{URW Bookman L}     \begin{document}          Hi man how are u the font is not appearing          \end{document}      i get this errror:               \par     l.4 \setmainfont[Mapping=tex-text}     {URW Bookman L}     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.     Runaway argument?     Mapping=tex-text     ! Paragraph ended before \\setmainfont was complete.     <to be read again>     \par     l.4 \setmainfont[Mapping=tex-text}     {URW Bookman L}     I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.     ! Too many }'s.     <recently read> }     l.4 \setmainfont[Mapping=tex-text}     {URW Bookman L}     You've closed more groups than you opened.     Such booboos are generally harmless, so keep going.     ! LaTeX Error: Missing \begin{document}.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.4 \setmainfont[Mapping=tex-text}{U     RW Bookman L}     You're in trouble here. Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     Overfull \hbox (34.03pt too wide) in paragraph at lines 4--5     []\EU1/lmr/m/n/10 URW     []     Overfull \hbox (25.97pt too wide) in paragraph at lines 4--5     \EU1/lmr/m/n/10 Book-     []     Overfull \hbox (18.89pt too wide) in paragraph at lines 4--5     \EU1/lmr/m/n/10 man     []     Overfull \hbox (6.25pt too wide) in paragraph at lines 4--5     \EU1/lmr/m/n/10 L     []     (./sample.aux)     \openout1 = `sample.aux'.     LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     LaTeX Font Info: Checking defaults for EU1/lmr/m/n on input line 7.     LaTeX Font Info: ... okay on input line 7.     Class revtex4 Info: Patching LaTeX tabular. on input line 7.     Class revtex4 Info: cite was not loaded (OK!) on input line 7.     Class revtex4 Info: multicol was not loaded (OK!) on input line 7.     \symlegacymaths=\mathgroup6     LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'     (Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 7.     LaTeX Font Info: Redeclaring math accent \acute on input line 7.     LaTeX Font Info: Redeclaring math accent \grave on input line 7.     LaTeX Font Info: Redeclaring math accent \ddot on input line 7.     LaTeX Font Info: Redeclaring math accent \tilde on input line 7.     LaTeX Font Info: Redeclaring math accent \bar on input line 7.     LaTeX Font Info: Redeclaring math accent \breve on input line 7.     LaTeX Font Info: Redeclaring math accent \check on input line 7.     LaTeX Font Info: Redeclaring math accent \hat on input line 7.     LaTeX Font Info: Redeclaring math accent \dot on input line 7.     LaTeX Font Info: Redeclaring math accent \mathring on input line 7.     LaTeX Font Info: Redeclaring math symbol \Gamma on input line 7.     LaTeX Font Info: Redeclaring math symbol \Delta on input line 7.     LaTeX Font Info: Redeclaring math symbol \Theta on input line 7.     LaTeX Font Info: Redeclaring math symbol \Lambda on input line 7.     LaTeX Font Info: Redeclaring math symbol \Xi on input line 7.     LaTeX Font Info: Redeclaring math symbol \Pi on input line 7.     LaTeX Font Info: Redeclaring math symbol \Sigma on input line 7.     LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 7.     LaTeX Font Info: Redeclaring math symbol \Phi on input line 7.     LaTeX Font Info: Redeclaring math symbol \Psi on input line 7.     LaTeX Font Info: Redeclaring math symbol \Omega on input line 7.     LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 7.     LaTeX Font Info: Redeclaring symbol font `operators' on input line 7.     LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font     (Font) `operators' in the math version `normal' on input line 7.     LaTeX Font Info: Overwriting symbol font `operators' in version `normal'     (Font) OT1/lmr/m/n --> EU1/lmr/m/n on input line 7.     LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font     (Font) `operators' in the math version `bold' on input line 7.     LaTeX Font Info: Overwriting symbol font `operators' in version `bold'     (Font) OT1/lmr/bx/n --> EU1/lmr/m/n on input line 7.     LaTeX Font Info: Overwriting symbol font `operators' in version `normal'     (Font) EU1/lmr/m/n --> EU1/lmr/m/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathrm' in version `normal'     (Font) EU1/lmr/m/n --> EU1/lmr/m/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'     (Font) OT1/lmr/m/it --> EU1/lmr/m/it on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'     (Font) OT1/lmr/bx/n --> EU1/lmr/bx/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'     (Font) OT1/lmss/m/n --> EU1/lmss/m/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'     (Font) OT1/lmtt/m/n --> EU1/lmtt/m/n on input line 7.     LaTeX Font Info: Overwriting symbol font `operators' in version `bold'     (Font) EU1/lmr/m/n --> EU1/lmr/bx/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathrm' in version `bold'     (Font) EU1/lmr/m/n --> EU1/lmr/bx/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'     (Font) OT1/lmr/bx/it --> EU1/lmr/bx/it on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'     (Font) OT1/lmss/bx/n --> EU1/lmss/bx/n on input line 7.     LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'     (Font) OT1/lmtt/m/n --> EU1/lmtt/bx/n on input line 7.     [1] (./sample.aux) )     Here is how much of TeX's memory you used:     4478 strings out of 191470     70000 string characters out of 1925444     162455 words of memory out of 1500000     7668 multiletter control sequences out of 10000+200000     3648 words of font info for 15 fonts, out of 1200000 for 2000     605 hyphenation exceptions out of 8191     29i,4n,26p,296b,114s stack positions out of 5000i,500n,6000p,200000b,15000s     Output written on sample.pdf (1 page).      PLease tell me what to do?


title: Problems with chapter headings going from dvi to pdf.

text: I want to redefine the chapter headings using some code that I took from a friend. It works fine when I create a dvi and I see it in Okular (it doesn't look fine using Evince), but when I try generate a pdf either with pdflatex or dvipdf, the headings look wrong. I've no idea what the problem can be. Here is an example. Thanks in advance.               \documentclass{report}          \usepackage{psboxit}     \usepackage{pstricks}          % Title for chapters     \makeatletter     \def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}     \def\@makechapterhead#1{%       \reset@font       \parindent \z@       \vspace*{10\p@}%       \hbox{%         \vbox{%           \hsize=2cm%           \begin{tabular}{c}             \scshape \strut \@chapapp{} \\             \psboxit{box 0 0 0 setrgbcolor fill}{%               \vrule depth 8em width 0pt%               \vrule height 0pt depth 0pt width 10pt%               {\white \LARGE \bfseries                 \strut \vrule height 1em depth 0pt width 0pt                 \thechapter}%               \vrule height 0pt depth 0pt width 10pt%               }           \end{tabular}%           }%         \vbox{%           \advance\hsize by -2cm           \hrule height 0.4pt depth 0pt width \hsize           \par           \vskip 6pt%           \hspace{20pt}%           \parbox{260pt}{%             \LARGE \bfseries #1          }%           }%         }%       \vskip 100\p@     }          \begin{document}     \chapter{Introduction}     Intro here.     \end{document}


title: I want to write an expression like this, but I've never seen it before.

text: I want to write an expression almost the same as that in the picture, but I don't know which package should be used and what kind of grammar I should write down. Thank you all! ![enter image description here](http://i.stack.imgur.com/Q22Zc.jpg)


title: How to distinguish between Metafont and MetaPost?

text: ## Background I'm trying to make a nice SVG out of Knuth's Dangerous Bend symbol based on his own code, for which the obvious tool to use is MetaPost. However, I'd prefer to still be able to process the file with Metafont so I can more easily see exactly what differences I might introduce in the shape. Since this seems like it would benefit from `cutdraw`, my current plan is for my `dbend.mf` to work with both Metafont's `plain.mf` base and MetaPost's `mfplain.mp` base. I already have code that works fine in with both bases, but I want to do a couple of extra things if running under MetaPost, like colored fills and redefining `pt` as equal to `bp`. ## Question Is there a nice way to determine whether your code is running under Metafont or MetaPost, or do I just have to use e.g. `known red`?


title: I'm not able to add a figure

text: sorry if my english is not perfect, I'm writing in latex but I've a problem ... this is my code:               \documentclass[a4paper,10 pt]{report}     \usepackage[italian]{babel}     \usepackage[bibstyle=numeric,citestyle=numeric]{biblatex}     \bibliography{Biblio}          \newcommand{\e}{\`e }          \title{title}     \author{Francesco Serra}          \begin{document}          \maketitle     \tableofcontents          \input{Introduzione.tex}          \nocite{*}     \printbibliography          \end{document}      File "Introduzione.tex" is quite easy               \chapter{Introduzione}          something ...          \section{Mammografia e tomografia}     something else      \begin{figure}[h]     \includegraphics[width=0.7]{./Immagini/Mammo}     \end{figure}      All works without problem without the figure, while adding code about figure compiler gives me these errors:               Paragraph ended before \Gin@iii was complete          \begin{figure} on input line 12 ended by \end{document}. \end{document}     You can't use `\end' in internal vertical mode \end{document}          \begin{figure} on input line 12 ended by \end{document}. \end{document}          Missing } inserted \end{document}          Emergency stop     No "backend" specified, using Biber backend.     'babel' detected but 'csquotes' missing.      Someone can help me? Thank you


title: Same Footnotemark size all over the document

text: Does anyone know how to get the same sized footnote symbol (number) in the titles of the document?               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage[ngerman]{babel}     \begin{document}     \part[]{Titel\footnote{Part footnote}}     \blindtext\footnote{Text footnote}     \section[]{Titel\footnote{Session footnote}}     \blindtext\footnote{Text footnote}     \end{document}      As you can see this makes the number for the `part` huge and for the `section` also rather big. I need all footnote numbers to be the same as in the main text.


title: How to scale a tikzpicture in an external file for a beamer slide?

text: I have this tikz diagram in a separate document. I use the `standalone` package to include it into my presentation. However, I experience several problems:   * Setting the included picture size   * Scaling the picture so that it matches the visible frame area exactly   * Placing the picture in an arbitrary position within the file For concreteness here is my main document               \documentclass{beamer}     \usepackage{standalone}     \usepackage{tikz}          \usecolortheme{wolverine}     \setbeamertemplate{headline}{inflines theme}     \setbeamertemplate{footline}{infolines theme}          \setbeamertemplate{headline}{%      \hbox{%        \begin{beamercolorbox}[wd=.25\paperwidth]{section in head/foot}%        \end{beamercolorbox}%        \begin{beamercolorbox}[wd=.75\paperwidth]{section in head/foot}%        \end{beamercolorbox}%      }%     }%          \defbeamertemplate*{footline}{infolines theme}{\relax       \leavevmode%       \hbox{\relax       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%       \end{beamercolorbox}}%       \vskip0pt%     }          \begin{document}       \begin{frame}\frametitle{Frame Title}            \include{mindmap}        \end{frame}     \end{document}      While the included tikzpicture, residing in a file named `mindmap.tex`, is               \documentclass{article}     \usepackage[landscape]{geometry}     \usepackage{tikz}     \begin{document}     \usetikzlibrary{mindmap,shadows}     \begin{tikzpicture}[mindmap]       \begin{scope}      [      every node/.style={concept,circular drop shadow,execute at begin node=\hskip0pt},      text=white,      root concept/.append style={        concept color=black, fill=black, line width=1ex, text=white, font=\large\scshape      },      grow cyclic,     level 1/.append style={level distance=4.5cm,sibling angle=51.5,font=\itshape},     level 2/.append style={level distance=3cm,sibling angle=45,font=\bf\scriptsize}     ]       \node at (0,100) [fill=white, line width=1ex, text=black,font=\large\scshape] {Introduction to Programming Languages} [clockwise from=0]           child [concept color=gray] { node {Administration} [clockwise from=75]             child {node {Office Hours} }             child {node {Course Material} }             child {node {Exams} }             child {node {Assignments} }          }            child [concept color=purple, sibling angle=33] { node {Hello, World!} }           child [concept color=green!50!black, sibling angle=33] { node {Syntactical Elements}               [clockwise from=-10]             child { node {Identifiers}                 [clockwise from=0]                child { node {Autarkic}                   child { node {Pre-Declared Identifiers} }                }                child [sibling angle=60]{ node {Library Based} }              }          child { node {Literals}                 [clockwise from=-60]                child { node {String Literals}                    [clockwise from=0]                   child { node{Escaping} }                 }              }          child { node {Keywords} }          child { node {Comments} }          child { node {Blocks} }          }           child [concept color=red!30,text=black, sibling angle=46] { node {Specification} [scale=2,clockwise from = -90]            child {node {Semantics}            [clockwise from = -45]          child { node {Recursively Defined Sets} }          child [sibling angle=60] { node {Language Legalese} }          child [sibling angle=60] { node {Formal Semantics} }            }             child[sibling angle=90] {node {Syntax}             [clockwise from = 210]         child {node {RegExp}}         child [sibling angle=45] {node {BNF}}         child [sibling angle=45] {node {EBNF}}           }           }         child [concept color=yellow!40, text=black,sibling angle=45] { node {Motivation} }         child [concept color=teal,sibling angle=53] { node {Paradigms} [clockwise from=45]         [clockwise from = -150]                 child { node {Imperative} }           child [sibling angle=60] { node {Functional} }           child [sibling angle=60]{ node {Logical} }           child [sibling angle=60] { node {OO}}         }         child [concept color=orange] { node {History} }       ;      \end{scope}%     \end{tikzpicture}%     \end{document}      The output I get is quite annoying: ![The presentation with the included tikzpicture](http://i.stack.imgur.com/g4akz.jpg) BTW, I read this question, Scaling a tikzpicture for a Beamer slide, and it does not seem to shed light into this issue.


title: How can I move an inline labels up in pgfgantt?

text: Let's look at one of the example Gantt charts from the documentation:               \documentclass{standalone}     \usepackage{pgfgantt}          \begin{document}     \begin{ganttchart}[vgrid, hgrid, inline]{12}     \gantttitle{Title}{12} \\     \ganttbar{Task 1}{1}{3}     \ganttbar[bar label inline anchor/.style=above]{Task 2}{5}{10} \\     \ganttbar[bar label shape anchor=left,%     bar label inline anchor/.style=right]{Task 3}{2}{7}     \ganttbar[inline=false]{Final task}{11}{12}     \end{ganttchart}     \end{document}      Which looks like this: ![enter image description here](http://i.stack.imgur.com/drRzu.png) How can I move the label of Task 2 a bit up?


title: Nature-style bibliography

text: I need to adjust my bibliography style according to Nature requirements. Here is what it need to be in the ref list:               39. Lucas, A., Mangeney, A., Mège, D., & Bouchut, F. Influence of the scar geometry on landslide dynamics and deposits: Application to martian landslides. J. Geophys. Res. - Planets, **116**, E10001, (2011).      Currently, I have something really close:               [39] Lucas A., Mangeney A., Mège D., & Bouchut F. Influence of the scar geometry on landslide dynamics and deposits: Application to martian landslides. J. Geophys. Res. - Planets, **116**, E10001, (2011).      But, I need a comma after each name and initials and change the [39] into 39. Basically, I currently use               \usepackage[superscript]{cite}      and               \bibliographystyle{unsrt}      I guess I need to edit the unsrt (i.e. make my own copy and then edit it). Actually I already changed it in order to obtain the ampersand instead of "and" as well as all years in brackets which is not the case with unsrt. I'm getting close but I'm kinda stuck to be honest. Here is how looks the bst file, as people can see, ampersand and years in brackets have been added to the original unsrt.bst:                FUNCTION {format.date}      { year empty$     { month empty$         { "" }         { "there's a month but no year in " cite$ * warning$           month         }       if$     }     { month empty$          { "(" year * ")" * }           {month " "  * "(" year * }       if$     }       if$     }                FUNCTION {format.names}      { 's :=        #1 'nameptr :=        s num.names$ 'numnames :=        numnames 'namesleft :=        { namesleft #0 > }     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=       nameptr #1 >         { namesleft #1 >             { ", " * t * }             { numnames #2 >                 { "," * }                 'skip$               if$               t "others" =                 { "{\it et~al.}" * }                 { " \& " * t * }               if$             }           if$         }         't       if$       nameptr #1 + 'nameptr :=       namesleft #1 - 'namesleft :=     }     while$      }      So how should I change the format.name function in order to add a "," after each surname and initials? bst is really cryptic for me. thanks for any help!


title: Changing font colour in fncychap

text: I am using the Lenny chapter style from `fncychap` and I would like to change the colour of the chapter number. I found "How do you change the font when using fncychap?" and followed the recommendations there to produce:               \documentclass[12pt]{book}     \usepackage{xcolor}     \usepackage[T1]{fontenc}     \usepackage[Lenny]{fncychap}     \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont\color{blue}}     \begin{document}     \chapter{Title}     Lorem ipsum     \end{document}      This almost works, but has the unfortunate side-effect of changing the colour of the box too. Does anyone have an idea of how to fix that?


title: Still having horizontal lines while using \multirow?

text: I'm pretty new to TeX in general, having only produced two `beamer`-documents so far. Right now I'm working on my first term paper using TeX. What I want to accomplish is a simple use of `\multirow`. However, some remaining horizontal lines bug me even though I followed my instruction step by step. I believe the code sample speaks for itself:               \usepackage{multirow}     \begin{document}     \begin{tabular}{|c|c|}     \hline     \textbf{Biotoptyp: Abk"urzung} & \textbf{Fl"ache 2011, in m$^2$, ca.} \\ \hline     HN                & \multirow{4}{*}{15.800} \\ \hline     BRS               &                         \\ \hline     BMS               &                         \\ \hline     HB                &                         \\ \hline     UHT               & \multirow{2}{*}{8.200}  \\ \hline     GMK               &                         \\ \hline     UHM               & 4.000                   \\ \hline     SXA               & 2.500                   \\ \hline     HFS               & 1.100                   \\ \hline     \textbf{$\Sigma$} & \textbf{31.600}         \\ \hline     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nqryv.png) What am I missing here?


title: hyperref, babel and subequations conflict

text: I am trying to use `subequations` in a document. Playing around with my preamble I found out that if I use `babel` and `hyperref` package at the same time, a fatal error is occured and no `.pdf` is produced. I know I can play around with the `equation counter`, to make an enumeration 1.1a, 1.1b, but I was wondering why is this happening with `subequations` and if there's a way to fix this. My code is               \documentclass{book}     \usepackage{amsmath}     \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}          \usepackage{hyperref}     %\hypersetup{%         %pdfborder = {0 0 0},         %colorlinks,         %citecolor=red,         %filecolor=Darkgreen,         %linkcolor=blue,         %urlcolor=cyan!50!black!90     %}          \begin{document}     \chapter{Chapter one}     \begin{subequations}         \begin{align}             1+1=&2\\             2+2=&4         \end{align}     \end{subequations}     \end{document}


title: Changing the width of the table of contents

text: I'd like to be able to change (in particular, make smaller) the width of my table of contents in the article document class without altering the margins of the page. Is this possible??


title: TikZ: Cropping the Bounding Box

text: A graphing program I use has support for TikZ output. It generates a `\begin{tikzpicture} ... \end{tikzpicture}` which I can include in my document. The problem, however, is that it appears to insert a large amount of whitespace around the actual drawing. Currently, my approach has been to include the plot in an 'empty' LaTeX file, run `pdflatex` on it and then unleash `pdfcrop`. The resulting PDF can then be included in place of the TikZ image. However, this is not at all clean, and quite a bit of work on my part. Therefore, I am wondering if I can instruct TikZ to do the cropping for me. **Update** Here is a minimal document that shows the issue; sorry for the length, machine generated TikZ is (unfortunately) never that concise. I've added a chunk at the end to show the bounding box for the figure.               \documentclass[11pt]{article}     \pagestyle{empty}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}{0pt}{0pt}{518pt}{403pt}         \clip(0pt,403pt) -- (389.957pt,403pt) -- (389.957pt,99.6166pt) -- (0pt,99.6166pt) -- (0pt,403pt);         \color[rgb]{1,1,1}         \fill(3.76406pt,399.236pt) -- (380.923pt,399.236pt) -- (380.923pt,253.19pt) -- (3.76406pt,253.19pt) -- (3.76406pt,399.236pt);         \fill(53.4497pt,394.719pt) -- (374.901pt,394.719pt) -- (374.901pt,289.325pt) -- (53.4497pt,289.325pt) -- (53.4497pt,394.719pt);     \begin{scope}         \color[rgb]{0,0,0}         \pgftext[center, base, at={\pgfpoint{13.5506pt}{343.151pt}},rotate=90]{\sffamily\fontsize{9}{0}\selectfont{$\mathsf{\theta}$ / rad}}         \color[rgb]{0.0784314,0.0745098,0.0705882}         \pgftext[center, base, at={\pgfpoint{30.1125pt}{285.561pt}}]{\sffamily\fontsize{9}{0}\selectfont{-0.10}}         \pgftext[center, base, at={\pgfpoint{30.1125pt}{311.91pt}}]{\sffamily\fontsize{9}{0}\selectfont{-0.05}}         \pgftext[center, base, at={\pgfpoint{31.9945pt}{338.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.00}}         \pgftext[center, base, at={\pgfpoint{31.9945pt}{365.359pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.05}}         \pgftext[center, base, at={\pgfpoint{31.9945pt}{391.708pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.10}}         \color[rgb]{0,0,0}         \draw[line join=bevel, line cap=rect](52.6969pt,294.595pt) -- (48.9328pt,294.595pt);         \draw[line join=bevel, line cap=rect](52.6969pt,299.865pt) -- (48.9328pt,299.865pt);         \draw[line join=bevel, line cap=rect](52.6969pt,305.134pt) -- (48.9328pt,305.134pt);         \draw[line join=bevel, line cap=rect](52.6969pt,310.404pt) -- (48.9328pt,310.404pt);         \draw[line join=bevel, line cap=rect](52.6969pt,320.943pt) -- (48.9328pt,320.943pt);         \draw[line join=bevel, line cap=rect](52.6969pt,326.213pt) -- (48.9328pt,326.213pt);         \draw[line join=bevel, line cap=rect](52.6969pt,331.483pt) -- (48.9328pt,331.483pt);         \draw[line join=bevel, line cap=rect](52.6969pt,336.752pt) -- (48.9328pt,336.752pt);         \draw[line join=bevel, line cap=rect](52.6969pt,348.045pt) -- (48.9328pt,348.045pt);         \draw[line join=bevel, line cap=rect](52.6969pt,353.314pt) -- (48.9328pt,353.314pt);         \draw[line join=bevel, line cap=rect](52.6969pt,358.584pt) -- (48.9328pt,358.584pt);         \draw[line join=bevel, line cap=rect](52.6969pt,363.854pt) -- (48.9328pt,363.854pt);         \draw[line join=bevel, line cap=rect](52.6969pt,374.393pt) -- (48.9328pt,374.393pt);         \draw[line join=bevel, line cap=rect](52.6969pt,379.663pt) -- (48.9328pt,379.663pt);         \draw[line join=bevel, line cap=rect](52.6969pt,384.933pt) -- (48.9328pt,384.933pt);         \draw[line join=bevel, line cap=rect](52.6969pt,390.202pt) -- (48.9328pt,390.202pt);         \draw[line join=bevel, line cap=rect](52.6969pt,289.325pt) -- (45.9216pt,289.325pt);         \draw[line join=bevel, line cap=rect](52.6969pt,315.674pt) -- (45.9216pt,315.674pt);         \draw[line join=bevel, line cap=rect](52.6969pt,342.022pt) -- (45.9216pt,342.022pt);         \draw[line join=bevel, line cap=rect](52.6969pt,369.123pt) -- (45.9216pt,369.123pt);         \draw[line join=bevel, line cap=rect](52.6969pt,395.472pt) -- (45.9216pt,395.472pt);         \draw[line join=bevel, line cap=rect](52.6969pt,395.472pt) -- (52.6969pt,289.325pt);         \pgftext[center, base, at={\pgfpoint{215.304pt}{256.202pt}}]{\sffamily\fontsize{9}{0}\selectfont{\textit{t}}}         \color[rgb]{0.0784314,0.0745098,0.0705882}         \pgftext[center, base, at={\pgfpoint{52.6969pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{0}}         \pgftext[center, base, at={\pgfpoint{93.3487pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{5}}         \pgftext[center, base, at={\pgfpoint{133.248pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{10}}         \pgftext[center, base, at={\pgfpoint{173.9pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{15}}         \pgftext[center, base, at={\pgfpoint{213.799pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{20}}         \pgftext[center, base, at={\pgfpoint{254.451pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{25}}         \pgftext[center, base, at={\pgfpoint{294.35pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{30}}         \pgftext[center, base, at={\pgfpoint{335.002pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{35}}         \pgftext[center, base, at={\pgfpoint{374.901pt}{271.258pt}}]{\sffamily\fontsize{9}{0}\selectfont{40}}         \color[rgb]{0,0,0}         \draw[line join=bevel, line cap=rect](60.9778pt,289.325pt) -- (60.9778pt,285.561pt);         \draw[line join=bevel, line cap=rect](68.5059pt,289.325pt) -- (68.5059pt,285.561pt);         \draw[line join=bevel, line cap=rect](76.7869pt,289.325pt) -- (76.7869pt,285.561pt);         \draw[line join=bevel, line cap=rect](85.0678pt,289.325pt) -- (85.0678pt,285.561pt);         \draw[line join=bevel, line cap=rect](100.877pt,289.325pt) -- (100.877pt,285.561pt);         \draw[line join=bevel, line cap=rect](109.158pt,289.325pt) -- (109.158pt,285.561pt);         \draw[line join=bevel, line cap=rect](117.439pt,289.325pt) -- (117.439pt,285.561pt);         \draw[line join=bevel, line cap=rect](124.967pt,289.325pt) -- (124.967pt,285.561pt);         \draw[line join=bevel, line cap=rect](141.529pt,289.325pt) -- (141.529pt,285.561pt);         \draw[line join=bevel, line cap=rect](149.057pt,289.325pt) -- (149.057pt,285.561pt);         \draw[line join=bevel, line cap=rect](157.338pt,289.325pt) -- (157.338pt,285.561pt);         \draw[line join=bevel, line cap=rect](165.619pt,289.325pt) -- (165.619pt,285.561pt);         \draw[line join=bevel, line cap=rect](181.428pt,289.325pt) -- (181.428pt,285.561pt);         \draw[line join=bevel, line cap=rect](189.709pt,289.325pt) -- (189.709pt,285.561pt);         \draw[line join=bevel, line cap=rect](197.99pt,289.325pt) -- (197.99pt,285.561pt);         \draw[line join=bevel, line cap=rect](205.518pt,289.325pt) -- (205.518pt,285.561pt);         \draw[line join=bevel, line cap=rect](222.08pt,289.325pt) -- (222.08pt,285.561pt);         \draw[line join=bevel, line cap=rect](229.608pt,289.325pt) -- (229.608pt,285.561pt);         \draw[line join=bevel, line cap=rect](237.889pt,289.325pt) -- (237.889pt,285.561pt);         \draw[line join=bevel, line cap=rect](246.17pt,289.325pt) -- (246.17pt,285.561pt);         \draw[line join=bevel, line cap=rect](261.979pt,289.325pt) -- (261.979pt,285.561pt);         \draw[line join=bevel, line cap=rect](270.26pt,289.325pt) -- (270.26pt,285.561pt);         \draw[line join=bevel, line cap=rect](278.541pt,289.325pt) -- (278.541pt,285.561pt);         \draw[line join=bevel, line cap=rect](286.069pt,289.325pt) -- (286.069pt,285.561pt);         \draw[line join=bevel, line cap=rect](302.631pt,289.325pt) -- (302.631pt,285.561pt);         \draw[line join=bevel, line cap=rect](310.159pt,289.325pt) -- (310.159pt,285.561pt);         \draw[line join=bevel, line cap=rect](318.44pt,289.325pt) -- (318.44pt,285.561pt);         \draw[line join=bevel, line cap=rect](326.721pt,289.325pt) -- (326.721pt,285.561pt);         \draw[line join=bevel, line cap=rect](342.53pt,289.325pt) -- (342.53pt,285.561pt);         \draw[line join=bevel, line cap=rect](350.811pt,289.325pt) -- (350.811pt,285.561pt);         \draw[line join=bevel, line cap=rect](359.092pt,289.325pt) -- (359.092pt,285.561pt);         \draw[line join=bevel, line cap=rect](366.62pt,289.325pt) -- (366.62pt,285.561pt);         \draw[line join=bevel, line cap=rect](52.6969pt,289.325pt) -- (52.6969pt,282.55pt);         \draw[line join=bevel, line cap=rect](93.3487pt,289.325pt) -- (93.3487pt,282.55pt);         \draw[line join=bevel, line cap=rect](133.248pt,289.325pt) -- (133.248pt,282.55pt);         \draw[line join=bevel, line cap=rect](173.9pt,289.325pt) -- (173.9pt,282.55pt);         \draw[line join=bevel, line cap=rect](213.799pt,289.325pt) -- (213.799pt,282.55pt);         \draw[line join=bevel, line cap=rect](254.451pt,289.325pt) -- (254.451pt,282.55pt);         \draw[line join=bevel, line cap=rect](294.35pt,289.325pt) -- (294.35pt,282.55pt);         \draw[line join=bevel, line cap=rect](335.002pt,289.325pt) -- (335.002pt,282.55pt);         \draw[line join=bevel, line cap=rect](374.901pt,289.325pt) -- (374.901pt,282.55pt);         \draw[line join=bevel, line cap=rect](52.6969pt,289.325pt) -- (374.901pt,289.325pt);         \color[rgb]{1,1,0}         \fill[opacity=0.392157](271.012pt,348.045pt) -- (362.103pt,348.045pt) -- (362.103pt,337.505pt) -- (271.012pt,337.505pt) -- (271.012pt,348.045pt);         \color[rgb]{0,0,0}         \draw[line join=miter, line cap=rect](271.012pt,348.045pt) -- (362.103pt,348.045pt) -- (362.103pt,337.505pt) -- (271.012pt,337.505pt) -- (271.012pt,348.045pt);         %\color[rgb]{1,1,1}         %\fill[opacity=0.607843](278.541pt,396.225pt) -- (361.35pt,396.225pt) -- (361.35pt,351.809pt) -- (278.541pt,351.809pt) -- (278.541pt,396.225pt);         \color[rgb]{1,0,0}         \draw[line width=1pt, line join=miter, line cap=rect](287.574pt,385.685pt) -- (302.631pt,385.685pt);         \color[rgb]{0,0,0}         \pgftext[left, base, at={\pgfpoint{310.159pt}{381.921pt}}]{\sffamily\fontsize{9}{0}\selectfont{Euler}}         \color[rgb]{0,0.501961,0}         \draw[line width=1pt, line join=miter, line cap=rect](287.574pt,374.393pt) -- (302.631pt,374.393pt);         \color[rgb]{0,0,0}         \pgftext[left, base, at={\pgfpoint{310.159pt}{370.629pt}}]{\sffamily\fontsize{9}{0}\selectfont{Leapfrog}}         \draw[line width=1pt, line join=miter, line cap=rect](287.574pt,363.101pt) -- (302.631pt,363.101pt);         \pgftext[left, base, at={\pgfpoint{310.159pt}{359.337pt}}]{\sffamily\fontsize{9}{0}\selectfont{Analytic}}         \color[rgb]{1,1,1}         \fill(3.76406pt,249.426pt) -- (386.193pt,249.426pt) -- (386.193pt,103.381pt) -- (3.76406pt,103.381pt) -- (3.76406pt,249.426pt);         \color[rgb]{1,1,0}         \fill[opacity=0.392157](57.2137pt,246.415pt) -- (386.193pt,246.415pt) -- (386.193pt,133.493pt) -- (57.2137pt,133.493pt) -- (57.2137pt,246.415pt);     \end{scope}     \begin{scope}         \color[rgb]{0,0,0}         \draw[line join=miter, line cap=rect](56.4609pt,247.168pt) -- (385.44pt,247.168pt) -- (385.44pt,134.246pt) -- (56.4609pt,134.246pt) -- (56.4609pt,247.168pt);         \color[rgb]{0,0,0}         \pgftext[center, base, at={\pgfpoint{13.5506pt}{191.46pt}},rotate=90]{\sffamily\fontsize{9}{0}\selectfont{\textbf{ }}}         \color[rgb]{0.0784314,0.0745098,0.0705882}         \pgftext[center, base, at={\pgfpoint{30.8653pt}{131.988pt}}]{\sffamily\fontsize{9}{0}\selectfont{-0.010}}         \pgftext[center, base, at={\pgfpoint{30.8653pt}{159.842pt}}]{\sffamily\fontsize{9}{0}\selectfont{-0.005}}         \pgftext[center, base, at={\pgfpoint{32.7473pt}{186.943pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.000}}         \pgftext[center, base, at={\pgfpoint{32.7473pt}{214.044pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.005}}         \pgftext[center, base, at={\pgfpoint{32.7473pt}{241.898pt}}]{\sffamily\fontsize{9}{0}\selectfont{0.010}}         \color[rgb]{0,0,0}         \draw[line join=bevel, line cap=rect](56.4609pt,141.774pt) -- (52.6969pt,141.774pt);         \draw[line join=bevel, line cap=rect](56.4609pt,147.044pt) -- (52.6969pt,147.044pt);         \draw[line join=bevel, line cap=rect](56.4609pt,152.313pt) -- (52.6969pt,152.313pt);         \draw[line join=bevel, line cap=rect](56.4609pt,157.583pt) -- (52.6969pt,157.583pt);         \draw[line join=bevel, line cap=rect](56.4609pt,168.875pt) -- (52.6969pt,168.875pt);         \draw[line join=bevel, line cap=rect](56.4609pt,174.145pt) -- (52.6969pt,174.145pt);         \draw[line join=bevel, line cap=rect](56.4609pt,179.415pt) -- (52.6969pt,179.415pt);         \draw[line join=bevel, line cap=rect](56.4609pt,185.437pt) -- (52.6969pt,185.437pt);         \draw[line join=bevel, line cap=rect](56.4609pt,195.977pt) -- (52.6969pt,195.977pt);         \draw[line join=bevel, line cap=rect](56.4609pt,201.999pt) -- (52.6969pt,201.999pt);         \draw[line join=bevel, line cap=rect](56.4609pt,207.269pt) -- (52.6969pt,207.269pt);         \draw[line join=bevel, line cap=rect](56.4609pt,212.538pt) -- (52.6969pt,212.538pt);         \draw[line join=bevel, line cap=rect](56.4609pt,223.831pt) -- (52.6969pt,223.831pt);         \draw[line join=bevel, line cap=rect](56.4609pt,229.1pt) -- (52.6969pt,229.1pt);         \draw[line join=bevel, line cap=rect](56.4609pt,234.37pt) -- (52.6969pt,234.37pt);         \draw[line join=bevel, line cap=rect](56.4609pt,239.64pt) -- (52.6969pt,239.64pt);         \draw[line join=bevel, line cap=rect](56.4609pt,135.752pt) -- (49.6856pt,135.752pt);         \draw[line join=bevel, line cap=rect](56.4609pt,163.606pt) -- (49.6856pt,163.606pt);         \draw[line join=bevel, line cap=rect](56.4609pt,190.707pt) -- (49.6856pt,190.707pt);         \draw[line join=bevel, line cap=rect](56.4609pt,217.808pt) -- (49.6856pt,217.808pt);         \draw[line join=bevel, line cap=rect](56.4609pt,245.662pt) -- (49.6856pt,245.662pt);         \pgftext[center, base, at={\pgfpoint{220.95pt}{106.392pt}}]{\sffamily\fontsize{9}{0}\selectfont{\textbf{ }}}         \color[rgb]{0.0784314,0.0745098,0.0705882}         \pgftext[center, base, at={\pgfpoint{83.5622pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{28}}         \pgftext[center, base, at={\pgfpoint{112.169pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{29}}         \pgftext[center, base, at={\pgfpoint{140.776pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{30}}         \pgftext[center, base, at={\pgfpoint{169.383pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{31}}         \pgftext[center, base, at={\pgfpoint{197.99pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{32}}         \pgftext[center, base, at={\pgfpoint{226.597pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{33}}         \pgftext[center, base, at={\pgfpoint{255.58pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{34}}         \pgftext[center, base, at={\pgfpoint{283.81pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{35}}         \pgftext[center, base, at={\pgfpoint{313.17pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{36}}         \pgftext[center, base, at={\pgfpoint{341.777pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{37}}         \pgftext[center, base, at={\pgfpoint{370.384pt}{116.178pt}}]{\sffamily\fontsize{9}{0}\selectfont{38}}     \end{scope}          % My stuff -- show the bb     \path[draw=black] (current bounding box.north west) rectangle (current bounding box.south east);     \end{tikzpicture}     \end{document}


title: Reference style for scientific research

text: I want to make a bibliography with the same style for the articles referenced as in this one. I don't know what style to choose. Here is how I made the first article:               @Article{EA01,     author = {Newsholme, E. A. and Dimitriadis, G.},     title = {Integration of biochemical and physiologic effects of insulin on glucose metabolism},     journal = {Experimental and Clinical Endocrinology \& Diabetes},     year = {2001},     volume = {109 Suppl 2},     pages = {S122-34},     note = {Review}}      Thanks ![enter image description here](http://i.stack.imgur.com/kTPz6.png)


title: Bibtex Journal isn't shown in the entry

text: i have the following in my bibliography:               @Article{lyness,       Title                    = {Moderate degree symmetric quadrature rules for the triangle},       Author                   = {Lyness, J. N. and Jespersen, D.}       Journal                  = {J. Inst. Appl. Math.},       Year                     = {1975},       Pages                    = {19 - 32},       Volume                   = {15},            Owner                    = {user},       Timestamp                = {2014.04.19}     }          But when I compile the document (pdflatex - bibtex - pdflatex - pdflatex), the journal in question does not appear in the entry. How can this be fixed?


title: Problem with beamer's \pause in alignments

text: I have the following code, ( **edit:** ) now without `aligned`.               \documentclass{beamer}     \mode<presentation> { \setbeamercovered{transparent} }          \begin{document}     \begin{frame}     \[       \begin{cases}       %\begin{aligned}       v(t,x) &= g(t,x), \\       \pause       u(x) &= f(x) %& (x\in\mathbb R)       %\end{aligned}       \end{cases}     \]     \end{frame}     \end{document}      (In the first version of the question, nothing was commented out.) It compiles nicely, but everything except "u(x)" already shows up on the first slide if I use beamer.cls `v 1.70 2007/03/11 18:50:44`. On another computer at work we have an older version installed, namely `v 1.55 2004/10/11 16:09:50`; there everything works as expected: On the first slide, the full second line is shown in transparent style. The same happens if I use plain TeX's `\halign`, so `cases` is not the culprit. Moreover, if I don't use `\setbeamercovered{transparent}`, then everything works as expected. In other words, `\pause` doesn't work together with `\setbeamercovered{transparent}` and `\halign`. Is this a bug in `beamer` introduced between versions `1.55` and `1.70`? (If yes, then I'm surprised since it'd regard it quite a serious one.) Does anyone know a workaround that doesn't involve as much markup as Matthew's answer to my original question?


title: Algorithm2e and hanging captions

text: I'm having issues trying to **make the captions in Algorithn2e hang** , as in the table caption pictured below. I plan on using them together with `arsclassica`/`classicthesis`, but it seems neither of these packages affect the issue. ![enter image description here](http://i.stack.imgur.com/M0abZ.png) I have tried using `\usepackage[format=hang]{caption}` and `\captionsetup{format=hang}`, but `algorithm2e` seems not to be affected by them. The `classicthesis` style file seems to be achieving this effect exactly this way. The `algorithm2e` documentation doesn't mention hanging captions and I couldn't find anything (that I would decypher as caption code) in the style file either. Finally, google also didn't yield anything and I am finding myself a little bit out of depth with my latex skills here. Here's a MWE:               \documentclass{scrreprt}          \usepackage[american]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[algoruled]{algorithm2e}     %\usepackage{classicthesis}     %\usepackage{arsclassica}          % these two lines don't make a difference        \usepackage[format=hang]{caption}        \captionsetup{format=hang}          \begin{document}          \begin{algorithm}[htb]         \While{true}         {            }         \caption{Morbi blandit vehicula leo a consectetur. Aliquam a lacus posuere, consectetur tortor at, mollis erat.}     \end{algorithm}          \end{document}      I have been able to format the rest of the `algorithm2e` caption with some trial and error and hacking. I'm only interested in the hanging part of the problem here.


title: Large formula in align

text: I have a large formula in align:               \begin{align*}     log \mathcal{L}(\alpha,\beta,\mu,\delta|  l_1,...,l_n)&=\\\sum_{i=1}^n  \left( log \left(\frac{\sqrt{\alpha^2-\beta^2}}{2\alpha \delta K_1 (\delta\sqrt{\alpha^2-\beta^2})} exp\left(-\alpha\sqrt{\delta^2+(l-\mu)^2}+\beta(l-\mu)\right)\right) \right)      \end{align*}      Currently, this looks like ![te](http://i.stack.imgur.com/Ppsnc.png) But I want to have the first equation, the logL a bit pushed to the left. Now it is on the right side, what I don't like. I tried to insert a & before the exp to align it on that point, but this does not work.                \begin{align*}         log \mathcal{L}(\alpha,\beta,\mu,\delta|  l_1,...,l_n)&=\\\sum_{i=1}^n  \left( log \left(\frac{\sqrt{\alpha^2-\beta^2}}{2\alpha \delta K_1 (\delta\sqrt{\alpha^2-\beta^2})} &exp\left(-\alpha\sqrt{\delta^2+(l-\mu)^2}+\beta(l-\mu)\right)\right) \right)          \end{align*}      How can I get the first part of the equation aligned in the center?


title: How does minted work from a point of LaTeX-User?

text: The package `minted` is one of the most famous package for highlighting source code. But how does it work?


title: How to avoid link higlighting when using package hyperref?

text: I'd like to include some http links in my document. So i Included the hyperref package so that i can use the command `\url{}`               Microsoft Surface\footnote{\url{http://www.microsoft.com/surface}}      This works, but the problem is, that all the links in my document (also the ones created with `\ref{}` or `\cite{}` are highlighted. I want to avoid that. So i added:               \usepackage{hyperref}     \hypersetup{colorlinks=false}      But nothing changed. How can I avoid that all links are highlighted? I only want to enable URLs and nothing else.


title: Package not found while compiling my document

text: The package `paralist.sty` gave me a problem (as seen in the image below): ![p](http://i.stack.imgur.com/vmlCm.png) This occurred every time I compile my document, please can you provide a feedback?


title: hyperfootnotes=false removes link but superscripts still show up at bottom of table

text: I want to remove the hyperlinks to the footnotes associated with a table in my document. When I use `\usepackage[hyperfootnotes=false]{hyperref}`, the hyperlinking action is indeed removed; however, the superscripts still show up (with no link) at the bottom of my table. Here is screenshot of what I'm talking about, and the code that produces it: ![Footnote table example](http://i.stack.imgur.com/cmH6q.png)               \documentclass[12pt, oneside]{article}       \linespread{1.8}       \usepackage[margin=1in]{geometry}                                                        \usepackage{floatrow}     \usepackage[hyperfootnotes=false]{hyperref}     \floatsetup[table]{capposition=top}     \usepackage{pdflscape}      \usepackage{multirow}          \begin{document}          \begin{landscape}     \begin{table}     \centering     \small     \begin{tabular}{c p{2cm} p{2cm} c c c} & & & \multicolumn{3}{c}{Odds Ratio$^a$} \\      \cline{4-6}     \multicolumn{1}{c}{Column 1$^b$} & \centering Column 2 & \centering Column 3 & 0.25 & 1 & 2 \\      \cline{1-6}     \multicolumn{1}{c}{\centering Content} & \centering 70 & \centering\multirow{2}{*}{$A^c$} & Numbers & Numbers & Numbers \\     \multicolumn{1}{c}{} & & & (Numbers) & (Numbers) & (Numbers) \\     \multicolumn{1}{c}{} & & \centering \multirow{2}{*}{$B^c$} & Numbers & Numbers & Numbers \\     \multicolumn{1}{c}{} & & & (Numbers) & (Numbers) & (Numbers) \\     \footnote{~Footnote 1}     \footnote{~Footnote 2}     \footnote{~Footnote 3}     \end{tabular}       \end{table}     \end{landscape}          \end{document}      What I'm referring to are the italic a, b and c within the table in the lower left corner, above where the footnotes start - I don't want those there. Also, I want to say that I'm not interested in using `\sidewaystable` (I don't want the table rotated), if that somehow comes up.


title: How to draw/annotate with TikZ on molecules drawn with chemfig package?

text: I have just discovered the TikZ spin-off `chemfig` package for chemistry drawings. I just wanted to add some transparent box to highlight a certain region of the drawn molecule with some text using relative nodes with TikZ. The relativity is needed so that to keep everything in one piece when rotated. For this reason the molecule was drawn with relative angles instead of absolute ones. Another request, is how can I put large brackets instead of the shaded box idea, I mean just to put the shaded area in between two large brackets?   What I want looks like this image below: ![enter image description here](http://i.stack.imgur.com/u8fbk.png) Code for `chemfig`:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{chemfig}     \begin{document}     \setatomsep{2em}          \chemfig{[:-30]*5(-(=O)-N(-O-[::60]([::-60]--[::60]--[::60]--[::60]-(=[::-60]O)-[::60]O-#(,7pt)[::-60]*5(N-(=O)---(=O)-#(0,5pt)) )=[::60]O)-(=O)--)}          \end{document}


title: How to set font size for all verbatims in Beamer presentation?

text: I'm trying to read through the Beamer manual, but I don't even really know what I'm looking for, so please help. How do I change globally (but even if it is a per-frame, it will be still good) size of the verbatim blocks?


title: Subsections for theorems

text: \documentclass[14pt]{article}     \usepackage{amsmath,amsfonts,amssymb,amsthm}     \newtheorem{thm}{Theorem}[section]     \newtheorem{defn}[thm]{Definition}     \newtheorem{cor}[thm]{Corollary}     \newtheorem{lem}[thm]{Lemma}     \begin{document}     \section{Sample}          \begin{thm}\label{mmm}      qwerty     \end{thm}          \begin{defn}     \label{ppp}      qwerty     \end{defn}          Theorem \ref{mmm}          \end{document}        1. When implementing this code into LaTeX, my theorem and definition comes out as `Theorem 1.1.` and `Definition 1.2.` How can I remove the `.` at the end? So it would come out as `Theorem 1.1` and `Definition 1.2`?   2. `Theorem \ref{mmm}` would correctly as Theorem 1.1, but is there a way that would enable me to not have the need to type `Theorem` before the `\ref{mmm}`? I.E. I don't need to type `theorem` every time I want to reference to a theorem.


title: gnuplottex and lualatex

text: **EDIT:** This question covers a bug in `gnuplottex` which will be fixed in TeXLive 2013.If you still want to have the bug fixed, download the latest upstream version from CTAN and compile it yourself. * * * Let `gnu.tex`               \documentclass[border=3mm]{standalone}     \usepackage{gnuplottex} % use gnuplot     \usepackage{epstopdf} % convert resulting eps to pdf     \begin{document}          \begin{gnuplot}[terminal=epslatex,terminaloptions=color]         set xlabel '$x$'         set ylabel '$y$'         plot sin(x) title '$\sin x$'     \end{gnuplot}          \end{document}      I am now trying to compile with `lualatex`; unfortuantely this doesn't work. I called `lualatex` in the manner               $ lualatex --shell-escape gnu.tex      The log file reads               ...      \write18 enabled.     ...     Package gnuplottex Warning: Shell escape not enabled.     (gnuplottex)                You'll need to convert the graphs yourself..     ...      If I compile with `pdflatex` and the command line               $ pdflatex --shell-escape gnu.tex      it works just fine. **Summary:** Is `gnuplottex` incompatible with `lualatex`?


title: Adding styling to LaTeX produced by MATLAB

text: MATLAB has a function called `publish` which has the option to export a script and its output as LaTeX. It looks quite nice, although there are a few additional things that I would like to do to the output. As I cannot figure out how to make MATLAB emit arbitrary LaTeX when it is publishing, the next best thing is to apply it after the fact. MATLAB generates a complete file, ready to be fed to an interpreter. It has `\documentclass{article}` headers and everything; it looks much like the following:               % This LaTeX was auto-generated from an M-file by MATLAB.     % To make changes, update the M-file and republish this document.          \documentclass{article}     \usepackage{graphicx}     \usepackage{color}          \sloppy     \definecolor{lightgray}{gray}{0.5}     \setlength{\parindent}{0pt}          \begin{document}          % generated code here          \end{document}      Is there a way to include this file from another file that defines my own formatting? As a simple example, I would like to inject `\usepackage{fullpage}` into its output. As a last resort, I'm willing to involve `sed` or similar, but that's almost as bad as hacking the MATLAB generator, which is a solution I've seen recommended elsewhere on the web.


title: Rotate/align text on arrows in tikz

text: I am trying to draw state transitions using tikz, and place the reasons for those transitions on the arrows between states. The problem is that the text is not aligned on the arrows, and while in and of itself that is not terrible, things like the following happen (which are).               \documentclass[12pt]{article}         \usepackage{tikz}         \usetikzlibrary{automata,positioning,arrows}         \begin{document}             \begin{tikzpicture}[shorten >=2pt,node distance=4cm,on grid,auto]                 \node[state] (Rd) {Ready};                 \node[state] (Rn) [above right =of Rd] {Run};                 \node[state] (Bl) [below right =of Rd] {Blocked};                 \node[state] (Nr) [below right =of Rn] {Dead};                 \path[->]                 (Rd)    edge  node {Given a timeslice}     (Rn)                 (Rd)    edge  node  {Asks for I/O}         (Bl)                 (Rd)    edge  node {Gets killed by kernel} (Nr)                 (Bl)    edge  node {Out of memory}         (Nr);             \end{tikzpicture}         \end{document}      ![enter image description here](http://i.stack.imgur.com/k9eom.jpg) Adding the `[midway,sloped]` option to the path options gives the follow, so its closer, but still wrong: ![enter image description here](http://i.stack.imgur.com/fpl7J.jpg) How can I get the text to autmatically rotate to be "on" the arrow (just above or below and parallel, there will be no loops if that matters). I looked at Curved text (on multiple lines) within curved arrow using tikz, but was unable to get it to work in may case.


title: Using mathsf in a section title

text: I'm trying to use the mathsf font in a section title and it wont compile. Here is a MWE:               \documentclass{amsart}     \usepackage{verbatim, rotating, stmaryrd, bbm, pict2e, ytableau, mathrsfs, amssymb, mathtools}          \newcommand{\Dsg}[1]{{\mathsf{D}^b_\mathsf{sg}(#1)}}     \newcommand{\APC}[1]{{\underline{\mathsf{APC}}(#1)}}          \begin{document}          \tableofcontents          \section{$\APC{S} \simeq \Dsg{S}$}          hi          \end{document}      It works without the table of contents tag, but with it when I compile this I get an error:               Latex Error: ./temp.toc:1 \mathsf allowed only in math mode.      The ./temp.toc file consists of just one line:               \contentsline {section}{\tocsection {}{1}{${\relax $\@@underline {\hbox {\mathsf {APC}}}\mathsurround \z@ $\relax (S)} \simeq {\mathsf {D}^b_\mathsf {sg}(S)}$}}{1}      I'm not sure how to parse that to figure out what's wrong. Why can't I use \mathsf in math mode in a section title?


title: Table-of-Contents items appearing flush against the edge of the left margin

text: I am using `\documentclass{amsart}` and want my table of contents subsections to be indented slightly beneath the sections. Right now, all the sections and subsections are equally flush to the left side. I still want the page numbers to be aligned though. What is the proper code?


title: How to repeat the content of a quote (e.g. introduction+conclusion) without violating DRY

text: I'm writing the conclusion to a thesis and would like to repeat some the research questions I have formulated in the introduction. I wrapped each of the questions in a quote environment. My question is: How can I repeat this quote (including formatting) on in the conclusion, without repeating myself (and introducing a window for error)? I have found How to render some macro content twice? and How do I repeat a theorem number?, which seem to be variations on the same theme, but do not answer my question. Note that I'm not particularly attached to the quote environment and am open to alternatives if that makes it easier to solve the question.


title: How do I edit PDF files produced by LaTeX in Illustrator? Fonts are not found

text: When I try to use Adobe Illustrator (CS4) to edit a PDF file produced by LaTeX with several equations in it, Illustrator complains that it can't find the fonts:               The font CMBX10 is missing.  Affected text will be displayed using a substitute font.     The font CMMI10 is missing.  Affected text will be displayed using a substitute font.     The font CMMI6 is missing.  Affected text will be displayed using a substitute font.     The font CMMI7 is missing.  Affected text will be displayed using a substitute font.     The font CMMI8 is missing.  Affected text will be displayed using a substitute font.     The font CMMIB10 is missing.  Affected text will be displayed using a substitute font.     The font CMR10 is missing.  Affected text will be displayed using a substitute font.     The font CMR7 is missing.  Affected text will be displayed using a substitute font.     The font CMSY10 is missing.  Affected text will be displayed using a substitute font.     The font CMSY6 is missing.  Affected text will be displayed using a substitute font.     The font CMSY7 is missing.  Affected text will be displayed using a substitute font.     The font MSBM10 is missing.  Affected text will be displayed using a substitute font.     To preserve appearance, some text has been outlined.      How do I find & install the necessary fonts?