namer icon indicating copy to clipboard operation
namer copied to clipboard

Feature request: Optional parameter "chunkname"

Open sigbertklinke opened this issue 1 year ago • 0 comments

Hi,

instead of using the filename for the chunks, I wanted use the basename(dirname(filename)).

Therefore my suggestion:

name_chunks <- function (path, chunkname=NULL, unname = FALSE) {
...
  if (no_unnamed > 0) {
    if (is.null(chunkname)) {
      filename <- fs::path_ext_remove(path)
      filename <- fs::path_file(filename)
    } else {
      filename <- chunkname
    }
    filename <- namer:::clean_latex_special_characters(filename)
...

sigbertklinke avatar Jan 25 '24 11:01 sigbertklinke