get_output_format.Rd
This function checks the current environment to determine whether the code is being run in an interactive session (like RStudio), or as part of rendering an HTML or PDF document.
get_output_format(manual_format = NULL)
A string indicating the detected format: "studio" for interactive sessions, "html" for HTML output, or "pdf" for PDF output.
# Automatic detection
get_output_format()
#> [1] "studio"
# Manual override
get_output_format("pdf")
#> [1] "pdf"