Skip to content

Commit

Permalink
also normalize fig.dev -> dev, fig.dpi -> dpi
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Aug 25, 2023
1 parent 0e6134f commit fd54730
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ fix_options = function(options) {
options[gsub('-', '.', dashes)] = options[dashes]
options[dashes] = NULL

# normalize aliases
aliases = c(fig.dev = 'dev', fig.dpi = 'dpi')
for (j in intersect(names(options), names(aliases))) {
options[[aliases[j]]] = options[[j]]
options[[j]] = NULL
}

# if you want to use subfloats, fig.show must be 'hold'
if (length(options$fig.subcap)) options$fig.show = 'hold'
# if the animation hook has been set, fig.show must be 'animate'
Expand Down

0 comments on commit fd54730

Please sign in to comment.