I have a vignette for my package that compiles to a good PDF when compiling with Rscript -e 'rmarkdown::render("tmod.rmd")' . However, when I compile and install the package, run R and type vignette("mypackagename") , the browser window opens with an ugly HTML expression without a title, without a table of contents and without links.
However, if I compile the vignette manually in pdf format before creating the package, it displays just fine.
Something went wrong? Why is my PDF file not created automatically when compiling the package?
In the markdown file header I have
--- title: "foo foo foo" author: "Foofooary Finer" date: "`r Sys.Date()`" output: pdf_document: vignette: > %\VignetteIndexEntry{FooFoo} %\VignetteKeyword{foo} %\VignetteEngine{knitr::knitr} %\SweaveUTF8 \usepackage[utf8](inputenc) abstract: | foo foo foo foo foo toc: yes bibliography: bibliography.bib ---
In the package's DESCRIPTION file
VignetteBuilder: knitr Suggests: knitr
r pdf knitr vignette
January
source share