Skip to content

Commit

Permalink
recommend SVG format for figures #105
Browse files Browse the repository at this point in the history
  • Loading branch information
huizezhang-sherry committed Oct 5, 2023
1 parent 3bb2a93 commit 0c86246
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ check_structure <- function(path) {
check_folder_structure <- function(path){
files <- list.files(path)
file_exts <- tools::file_ext(files)
img_exts <- c("jpeg", "jpg", "png", "gif", "tiff")
img_exts <- c("jpeg", "jpg", "png", "gif", "tiff", "svg")
img_files <- files[file_exts %in% img_exts]
if (length(img_files) != 0){
img_files <- paste0(img_files, collapse = ", ")
Expand Down
7 changes: 7 additions & 0 deletions R/submit-rjournal.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ submit_rjournal <- function(){
return(invisible())
}

if (!yesno(cli::cli_inform(
"The R Journal recommends the SVG format for figures since it is
vector-based and is easier for low vision readers than PNGs.
Have you converted your plots to SVGs?"))){
return(invisible())
}

if (!yesno(cli::cli_inform(
"Have you checked that the zip file size is less than 10 MB?"))){
return(invisible())
Expand Down

0 comments on commit 0c86246

Please sign in to comment.