Skip to content
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

Fix BiocStyle & pkgdown interaction #108

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

zeehio
Copy link

@zeehio zeehio commented Jun 2, 2024

pkgdown https://pkgdown.r-lib.org/ is an R package to build static websites from package documentation and vignettes.

pkgdown evaluates the output format of the vignettes, but it does not use it, since it generates html documents.

However, BiocStyle manually sets the out.format to "latex". This makes pkgdown generate an html file that then is passed to pdflatex, giving an error "\begin{document}" not found. The temporary .tex file contains an html version of the vignette.

imatge

It seems the only reason BiocStyle sets "out.format" to "latex" is to call knit_theme$get(thm)$highlight, by setting "out.format" to its former value everything seems to keep working.

This change restores "out.format", so pkgdown is still able to generate the html files. pdf vignettes still work as expected.

out.format needs to be set for knit_theme$get(thm) to work.

However, when building a pkgdown article based on a vignette
that uses BiocStyle::pdf_document, the out.format is forced
to be html, and hardcoding this knit option clashes with
pkgdown.

By setting and restoring the output format, things keep
working as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant