Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Optional parameter "chunkname" #38

Open
sigbertklinke opened this issue Jan 25, 2024 · 0 comments
Open

Feature request: Optional parameter "chunkname" #38

sigbertklinke opened this issue Jan 25, 2024 · 0 comments

Comments

@sigbertklinke
Copy link

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)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant