PDF forced vinyl wrapping with ketter

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 
+6
r pdf knitr vignette
source share
1 answer

When I asked the same question in the goitr google group, Yihui Xie (author of knitr) answered:

Use the screw mechanism knitr :: rmarkdown instead of knitr :: knitr.

I'm not quite sure I understand why, but it works. Here is a link to discuss the goart google group.

+2
source share

All Articles