Set knitr.graphics.rel_path = FALSE to opt-out inadequate path processing #2508
Closed
cderv wants to merge 8 commits intor-lib:mainfrom
Closed
Set knitr.graphics.rel_path = FALSE to opt-out inadequate path processing #2508cderv wants to merge 8 commits intor-lib:mainfrom
knitr.graphics.rel_path = FALSE to opt-out inadequate path processing #2508cderv wants to merge 8 commits intor-lib:mainfrom
Conversation
For some unknown reason, `knitr_print()` methods sometimes produces paths are relative to the input directory, rather than to the output directory. This PR re-parents those to paths to be relative to the output directory making them work again. Fixes r-lib#2334. Fixes r-lib#2341.
And resolve issue with using tempdir
…ve path processing. This processing is by default, and paths are made relative to input directory and not output. It should be fixed in later knitr version yihui/knitr#2171
Contributor
Author
|
I need to use main as base branch to have the test running. I force-pushed some edits to trigger CI |
Contributor
Author
|
So I'll still look into this as knitr keeps creating some undesired path here.... 👀 |
Contributor
Author
|
So the problem with the path fixing here was in fact due to the regression in R Markdown 2.26. Fixing it solves the issue. So solution is indeed,
#2502 will handle it, setting the knitr option differently, so I'll close this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This complements #2502 by reverting the new path handling in pkgdown to set the option instead.
It solves fixes #2334 and fixes #2341 too.
#2341 about gganimate also requires rmarkdown 2.25 or future patch version with regression from 2.26 fixed (rstudio/rmarkdown#2554).
I did not change the tests from #2502 to verify it passes correctly. On my local windows, it works ok.