> Hi Laurent, Martin, > > thank you for bringing this up! As pointed out by Martin, currently > the 'helvet' package gets overridden by Sweave, so this setting > affects only the knitr output. > > My feeling is that the default font style should be the same > regardless of the engine used. Too keep thing simple, I would suggest > removing from Bioconductor.sty the following line forcing a particular > font: > \RequirePackage{helvet} > > It doesn't help in case of Sweave documents anyway, and setting a > different font in knitr (e.g. helvetica) is straightforward and can be > done manually by simply adding \usepackage{helvet} to the vignette > source if desired. > > When it comes to font styles, that's of course a matter of taste and I > don't want to start a war here. However, I think the Latex already > provides a decent default sans serif font and there is no particular > need for BiocStyle to override it.
Definitely. The difference in fonts is what prompted my enquiry in the first place, not the choice of font per se. Best wishes, Laurent > Cheers, > Andrzej > > > On Wed, Mar 12, 2014 at 1:58 AM, Martin Morgan <mtmor...@fhcrc.org> wrote: >> On 03/11/2014 10:38 AM, Laurent Gatto wrote: >>> >>> >>> Dear all, >>> >>> Compiling the following with Sweave >>> >>> \documentclass{article} >>> <<style, eval=TRUE, echo=FALSE, results=tex>>= >>> BiocStyle::latex() >>> @ >>> \bioctitle{Hello world} >>> \begin{document} >>> \maketitle >>> \section{Section} >>> Some text >>> <<pxdata>>= >>> print("Hello world") >>> @ >>> \end{document} >>> >>> $ R CMD Sweave --engine=utils::Sweave --pdf test.Rnw >>> >>> and this one with knitr >>> >>> \documentclass{article} >>> <<style, eval=TRUE, echo=FALSE, results='asis'>>= >>> BiocStyle::latex() >>> @ >>> \bioctitle{Hello world} >>> \begin{document} >>> \maketitle >>> \section{Section} >>> Some text >>> <<pxdata>>= >>> print("Hello world") >>> @ >>> \end{document} >>> >>> $R CMD Sweave --engine=knitr::knitr --pdf test.Rnw >>> >>> produces two pdf documents with different fonts. >>> >>> As a positive control, using the two engines without BiocStyle result in >>> pdf files with identical fonts. >>> >>> Is this a documented side effect of BiocStyle? >> >> >> Hi Laurent -- >> >> Here's a latex document to play with, via R CMD Sweave --pdf test.Rnw >> >> \documentclass{article} >> \usepackage{helvet} >> \renewcommand{\familydefault}{\sfdefault} >> \usepackage[noae]{Sweave} >> >> \title{Hello world} >> \begin{document} >> \maketitle >> \section{Section} >> Some text >> \end{document} >> >> Seems like an interaction between the 'helvet' package (used by BiocStyle) >> and the 'ae' package (used by Sweave). Get knitr-like output with either >> \usepackage[noae]{Sweave} or by placing \usepackage{Sweave} before >> \usepackage{helvet} (i.e., before the BiocStyle() chunk). >> >> I think the ae package forces use of sans serif computer modern fonts, which >> you can 'see' from the output of pdflatex test.tex with ae >> >> ... >> >> [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./sweave.aux) >> )</usr/sh >> are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb></usr/share/te >> xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss12.pfb></usr/share/texlive/ >> texmf-dist/fonts/type1/public/amsfonts/cm/cmss17.pfb></usr/share/texlive/texmf- >> dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb> >> >> versus without >> >> [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./sweave.aux) >> ){/usr/sh >> are/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/share/texlive/texmf-di >> st/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/share/texlive/texmf-dist/fonts/typ >> e1/urw/helvetic/uhvr8a.pfb> >> >> Not really sure where that takes us; the helvetica fonts look better IMO. >> >> Martin >> >> >>> >>> Thank you very much in advance. >>> >>> Best wishes, >>> >>> Laurent >>> >>> _______________________________________________ >>> Bioc-devel@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 >> >> >> _______________________________________________ >> Bioc-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/bioc-devel _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel