-
Notifications
You must be signed in to change notification settings - Fork 523
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
Building vignettes breaks down on Windows using rticles::jss_article if a plot is present #528
Comments
I believe this is not an issue with This is directly related to rstudio/rmarkdown#2024 where Definitely something we should fix somehow. As a workaround for you need, you can customize the fig path in a setup chunk ```{r include = FALSE}
knitr::opts_chunk$set(
fig.path = "figures/"
)
``` This will correctly use relative paths, and should not be a problem. Though you need to pay attention to chunk name for figures if you have several Rmds and one global folder, or use something like I'll add more insight in rstudio/rmarkdown#2024 based on this report as I see vignettes issue more clearly now. Thanks for the report. i'll close as we need to handle this in rmarkdown BTW about vignette building See this discussion r-lib/devtools#2488 where This doesn't solve the issue but could be helpful with resources handling. |
Thank you! The workaround works like a charm! |
Great. You just need to make sure that resources in HTML vignettes does not have such issue because images are embeded inside the HTML and not are external resources |
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. |
Hi, first of all, thanks for the great package! It is really convenient.
We were about to submit our package to the CRAN, so we tested on different platforms and realized that
devtools::build_vignettes()
was not working on Windows. We managed to identify the problem. Our vignette usesrticles::jss_article
as the output type. It fails as soon as there is a plot in the vignette. We looked at the generated .tex file: the default Windows path style is used (C:\foo\bar), breaking the LaTeX command displaying the figure.This seems like an easy fix, and I would be happy to provide a PR for it, but I would need assistance finding what part of the code is responsible for that.
Reproducible example
Running
devtools::build_vignettes()
produces an error with the previous vignette.Session info
xfun::session_info()
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: