R devtools: create both html and pdf vignettes

I wrote a vignette tutorial for one of my packages.

It works fine, but it only creates the html version of the vignette. Is there a way to create both html and pdf version of my vignettes?

I tried adding rmarkdown :: pdf to the output field of my .Rmd file, but this did not work.

+4
source share
1 answer

This is what I added to the title of my vignette.

output:
  knitr:::html_vignette:
    toc: true
    css: custom.css
    fig_caption: yes
  pdf_document:
    highlight: null
    number_sections: yes

and I used the hrbrmstr command above, which creates a PDF file.

rmarkdown::render("vignettes/itkr.Rmd", "all")
+3
source

All Articles