New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header (title, author, date) and footnote not shown when using rmarkdown::html_vignette #470
Comments
I think that is simply due to the fact that Pandoc was not available when the vignette was built, in which case knitr falls back to R Markdown v1 (the vignette you showed on CRAN was built with v1). If you build the package inside RStudio, you should be fine; otherwise you will have to either make symlinks of RStudio's pandoc and pandoc-citeproc to your PATH, or install Pandoc separately. |
You might want to check your pandoc version. Pandoc v1.15.0.5 did "overaggressive CSS minimization" with --self_contained which was corrected in v1.15.0.6. (see here for more). |
-- great. I think so. It works well in RStudio (as the R Markdown V2 Vignette page said). Probably I should wait for CRAN to update its package building infrastructure, until then, I guess I might need to use some workaround. -- thanks for the information. That seems to be an interesting bug ... although the version of Pandoc I have is much lower (1.11.x). |
You don't need to wait for CRAN. CRAN uses whatever vignette output files you submitted in your source package. They don't rebuild vignettes. The problem must have come from your source package. As I said, if you build the package in RStudio, you should be fine, otherwise make sure |
@yihui -- yep. I finally figured it out. It's my problem -- installed Pandoc version was too old. The interesting part -- the reason why I didn't notice this: I thought I installed pandoc via Homebrew, which means it will get regular updates via It is also shocking for me to know that CRAN will not rebuild vignettes. I think a problem like this is exactly why they should rebuild vignettes. |
Personally I dare not suggest additional work to CRAN maintainers, so I think it is fine that they just use our pre-built vignettes, which saves trouble of both parties (package authors have control over what to display on CRAN, and CRAN maintainers don't need to install and maintain Pandoc). I just create symlinks of RStudio's pandoc and pandoc-citeproc to make sure the vignettes built from RStudio are consistent with those built outside RStudio: https://github.com/yihui/configuration/blob/master/configure#L5-L6 |
That's reasonable. It will not be easy to change this tradition, for both sides ... Thanks for sharing this. Since I did notice there were delicate differences between the rendered results of different Pandoc versions, I guess it's necessary to keep this in mind (also in configuration). I will mark this as closed. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
To reproduce:
Put the rmarkdown vignette skeleton (which has title, author, date and a footnote) in the
vignette
folder.Compile and install the package:
In R, open the vignette in browser:
Online Example: Rmd vignette source | Rendered result on CRAN
This behavior should be consistent with
knitr:::html_vignette
.The text was updated successfully, but these errors were encountered: