[Bioc-devel] Conflict between BiocStyle and the verbatim package

Martin Morgan mtmorgan at fhcrc.org
Tue Dec 3 21:50:19 CET 2013


On 12/03/2013 12:30 PM, Nicolas Delhomme wrote:
> Hej Martin!
>
> I’d like to have multi-line comments in my vignette and the easiest way I know is to use the “comment” environment from the verbatim package - i.e. \begin{comment}…\end{comment}. However, when I do this, i.e. load the verbatim package after having “sourced” the BiocStyle package, generating the pdf just fails without any error message.
>
> Here’s a tiny .Rnw example of how to reproduce the error:
>
> \documentclass[11pt,a4paper]{article}
> % Bioc style
> <<style, eval=TRUE, echo=FALSE, results=tex>>=
> BiocStyle::latex()
> @
> \usepackage{verbatim}
> \begin{document}
> Some text
> \begin{comment}
> some comments not to be seen by the user
> \end{comment}
> Some more text
> \end{document}
>
> The generated pdf stops after the text “Some text”. I tried to track it down, but I’m out of my depth in latex style file. Do you have any idea what is happening? And do you have any suggestion of how I could go around this other than using % on every comment line?
>

If I take your file and

   R CMD Sweave Nico.Rnw
   pdflatex Nico.tex

I get

! Undefined control sequence.
\f at ncyolh ->\thetitle
                       \strut
l.15 \end{document}

?

which is because the vignette needs to have a title, e.g., in the preamble

\usepackage{verbatim}
\title{My amazing document}
\begin{document}

If I add this, then things seem to work fine.

The undefined control sequence doesn't sound like what you saw, so maybe more 
details are needed? I'm using

$ R --vanilla --slave -e "R.version.string"
[1] "R Under development (unstable) (2013-12-01 r64371)"

$ pdflatex --version
pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)

Martin

> Cheers,
>
> Nico
>
> ---------------------------------------------------------------
> Nicolas Delhomme
>
> Nathaniel Street Lab
> Department of Plant Physiology
> Umeå Plant Science Center
>
> Tel: +46 90 786 7989
> Email: nicolas.delhomme at umu.se
> SLU - Umeå universitet
> Umeå S-901 87 Sweden
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-devel mailing list