I would like to use bookdown
features like Figures numbering, label/section/... referencing (via \@ref()
) when creating a vignette via pkgdown
.
It looks like this is possible via vignette's YAML (myvignette.Rmd
):
---
title: "My Title"
author: "John Doe"
date: "`r Sys.Date()`"
output:
bookdown::html_document2:
base_format: rmarkdown::html_vignette
toc: true
toc_depth: 2
number_sections: false
fig_caption: true
vignette: >
%\VignetteIndexEntry{My Title}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
and the as_is
field in _pkgdown.yml
(see the manual here)
pkgdown:
as_is: true
I have tried on my own package and when I knit locally I get the TOC, Figures numbers
and referenced figures:
but when built and deploy it, these things are not there.
See it live here or in the snapshot below:
Anybody has ever succeeded in having bookdown
features working in vignette production?
Thanks a lot in advance for any hints, helps.