Hi,
I am trying to use BiocStyle to create vignette in R markdown. I read the instructions but i dont get the results i want so I was wondering what I have done wrong. I dont understand where I should place the first chuck which loads latex2. If i do it this way i get two pages with double author etc.
---
title: "pkg"
author: "author"
date: "`r doc_date()`"
package: "`r BiocStyle::pkg_ver('pkg')`"
output:
BiocStyle::pdf_document2
vignette: >
%\VignetteIndexEntry{pkg}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r style,eval=TRUE,echo=FALSE,results='hide'}
BiocStyle::latex2()
```
<!-- Title -->
\bioctitle[pkg]{long pkg name}
\author{author {\email{author mail}}}
\date{`r Sys.Date()`}
\maketitle
Best
hi, thanks for the answer.
I know, but if I dont do that then i cannot use :\bioctitle[pkg]{long pkg name} and the package will only have a sort name
actually i cannot use any of the biocstyle options in the yalm since biocstyle has to be loaded after the yalm. Therefore everythink is doubled.
In an .Rmd document, you don't need the code chunk which calls
BiocStyle::latex2()
, as the setup is already done by specifyingoutput: BiocStyle::pdf_document2
in the document header. The short/long titles in r markdown are currently not implemented, for now you can only have one title specified in document header. However, I might add this in near future, so stay tuned.Cheers,
Andrzej
Ok thanks.
One last question, i try to add email etc in yaml but it doesn't appear on the pdf:
Any solution to that?
Best
Try the following:
In case you missed it, the devel version of
BiocStyle::pdf_document2
supports now theshorttitle
yaml option for specifying headers.