r - Enforce PDF package vignette with knitr -


i have vignette package compiles nice pdf when compiled rscript -e 'rmarkdown::render("tmod.rmd")'. however, when compile , install package, start r , type vignette("mypackagename"), browser window opens ugly looking html, without title, without table of contents , without references.

however, if compile vignette manually pdf before creating package, shows fine.

what went wrong? why pdf not generated automatically when compile package?

in markdown file header, 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 package description file, have

vignettebuilder: knitr suggests: knitr 

when asked same question on knitr google group, yihui xie (author of knitr) replied:

use vignette engine knitr::rmarkdown instead of knitr::knitr.

i'm not entirely sure understand why, works. here link discussion on knitr google group.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -