R
function to detect output format
#3278
-
Hi, Is there an rmarkdown::default_output_format(knitr::current_input())$name Use-case: my Did I miss something? If not, do you think that this feature could be implemented? Thanks a lot for your work on this great project! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
First of, And since Quarto is using |
Beta Was this translation helpful? Give feedback.
-
Thanks, that's useful. But is there a more general solution to also detect markdown, word, and other output formats? |
Beta Was this translation helpful? Give feedback.
-
Again, since Quarto is using You can also have access to all YAML metadata using |
Beta Was this translation helpful? Give feedback.
-
Yep, that should work. Thanks a lot @mcanouil |
Beta Was this translation helpful? Give feedback.
Again, since Quarto is using
knitr
, if you want the output format passed to Pandoc, thenknitr::pandoc_to()
.You can also have access to all YAML metadata using
rmarkdown::metadata
list, e.g.,rmarkdown::metadata[["format"]]
.