[Bioc-devel] BiocStyle for styling Sweave (and other?) vignettes

Robert Castelo robert.castelo at upf.edu
Tue Jul 16 15:43:50 CEST 2013


hi Martin,

i have tried it out by simply adding the code snippet you specify below 
to the preamble of one of the vignettes of 'qpgraph', concretely the one 
entitled 'qpTxRegNet.Rnw' and once the .tex is generated, the processing 
with LaTeX gives the following error:

=================

(/opt/R/R-3.0.0/lib64/R/develLibrary/BiocStyle/sty/Bioconductor.sty

LaTeX Warning: You have requested package 
`/opt/R/R-3.0.0/lib64/R/develLibrary/
BiocStyle/sty/Bioconductor',
                but the package provides `Bioconductor'.

(/soft/texlive/2011/texmf-dist/tex/latex/graphics/color.sty
(/soft/texlive/2011/texmf-dist/tex/latex/latexconfig/color.cfg)
(/soft/texlive/2011/texmf-dist/tex/latex/graphics/dvipsnam.def))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
  ...

l.30 \pdfpageattr
                  {/Group << /S /Transparency /I true /CS /DeviceRGB>>} 
%fixe...

? X
No pages of output.
Transcript written on qpTxRegNet.log.

================

the offending line in the .tex file seems to be this one:

\usepackage{/opt/R/R-3.0.0/lib64/R/develLibrary/BiocStyle/sty/Bioconductor}

because if i comment it then it works, but of course this is *the line* 
that would give the BioC look and feel to the vignette.

i can reproduce this error in my linux box with R 3.0.0 and pdflatex 
version:

$ pdflatex --version
pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011)
kpathsea version 6.0.1
Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.2; using libpng 1.5.2
Compiled with zlib 1.2.5; using zlib 1.2.5
Compiled with xpdf version 3.02pl5

and in my mac osx laptop with R 3.0.1 and pdflatex version:

pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012)
kpathsea version 6.1.0
Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.10; using libpng 1.5.10
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with xpdf version 3.03


one of the things i was curious about is how the style handles R code 
and its output, since i cannot see it at the moment, and neither in the 
BiocStyle vignette, i just give my $0.02 about two aspects that i think 
should be discussed:

1. should the plus signs "+" from wrapped code line be removed? they 
make copy & pasting a wrapped line of R code more difficult.

2. should we consider highlighting R code from output. i'm not referring 
to highlighting individual keywords, but simply putting in different 
color or shade input R code from its output. see for instance, the 
qpgraphSimulate.pdf vignette, i think it's helpful to avoid copying & 
pasting output lines by mistake.


cheers,

robert.

On 07/14/2013 05:23 PM, Martin Morgan wrote:
> Developers --
>
> Sweave-style vignettes often include copy-pasted versions of basic LaTeX
> macros and other commands. We've created the BiocStyle package to make
> it easy to add these macros, and a consistent style, to Bioconductor
> vignettes -- just add Suggests: BiocStyle to your package DESCRIPTION,
> and the following lines inside the preamble (between
> \documentclass{article} and \begin{document}) of your vignette
>
> <<style, eval=TRUE, echo=FALSE, results=tex>>=
> BiocStyle::latex()
> @
>
> Details, including illustration of macros and styles, are in the package
> vignette
>
>
> http://bioconductor.org/packages/devel/bioc/vignettes/BiocStyle/inst/doc/LatexStyle.pdf
>
>
> and on the ?latex help page. Suggestions welcome. Perhaps this can be
> extended for non-Sweave vignettes.
>
> Martin

-- 
Robert Castelo, PhD
Associate Professor
Dept. of Experimental and Health Sciences
Universitat Pompeu Fabra (UPF)
Barcelona Biomedical Research Park (PRBB)
Dr Aiguader 88
E-08003 Barcelona, Spain
telf: +34.933.160.514
fax: +34.933.160.550



More information about the Bioc-devel mailing list