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, PDF, Typst, or Word document.
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, PDF, Typst, or Word document.