简体   繁体   中英

Why is my vignette html and not pdf?

I'm confused as to why my R package's vignette is in HTML on CRAN and not a pdf.

I followed the advice at Enforce PDF package vignette with knitr and used

%\VignetteEngine{knitr::rmarkdown}

to generate the vignette, but there it is, a pdf. The full header of one of the files is

---
title: "wCorr Formulas"
author: "Paul Bailey, Ahmad Emad, Ting Zhang, Qingshu Xie"
date: '`r Sys.Date()`'
output:
  pdf_document: default
vignette: |
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteIndexEntry{wCorr Formulas}
  \usepackage[utf8]{inputenc}
  \usepackage{amssymb}
---

you can see the whole package at https://github.com/cran/wCorr or, before it gets built at https://github.com/ahmademad/wCorr

You are including copies of the HTML output (presumably from an earlier version) in inst/doc .

This might not have been intentional; I believe devtools::build_vignettes might do it to work around a bug in R: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17416 . But there are better workarounds, eg described here: https://github.com/yihui/knitr/issues/1540 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM