Closed petrbouchal closed 1 year ago
Should be fixed now. Thanks for the report!
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.
When setting a device document-wide, the
dev.args
only has effect if passed in the form ofdev.args = list(device_name = list(option_1 = "x"))
; when set asdev.args = list(option_1 = "x")
, the argument is ignored.This applies also when only one device is set in
dev
.This is surprising given that the documenation states the former usage as necessary only when multiple devices are used (and can be interpreted that when multiple devices are set, the
dev.args
list would apply to both devices unless set as list(dev_1 = list(...), dev_2 = list(...))).The reprex below explores the resulting files when
dev.args
is set without the list structure (dev.args
is ignored)dev.args
is a list with one element, named after the single device (this works)Reprex
Set
dev.args
as named list for the single deviceMake plot
Render plot
Inspect resulting file
Note the font-related lines that have appeared on lines 5-6 because the argument has been passed through
dev.args
Now set
dev.args
as a list of optionsRender file
Inspect resulting file - note no font-related lines here
Pass the argument directly to the device
Inspect the file
Again, the arguments have an effect
Same without the argument
Inspect the file
Here, the font lines do not appear, as expected
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. 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('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.