Renders a file ("chapter") or subdirectory
("part") of a Quarto book
project to the specified profile. Convenience wrapper around quarto::quarto_render(), which by default renders the file that is currently active in
RStudio.
Note that this function is not very useful for output_format = "pdf" because Quarto can only build the whole PDF at once, not individual pages only, hence
no partial rendering is possible.
Usage
render_partly(
path = rstudioapi::getActiveDocumentContext()$path,
profile = default_profiles(),
output_format = "html",
execute = TRUE,
execute_daemon_restart = FALSE,
execute_debug = FALSE,
use_freezer = FALSE,
cache_refresh = FALSE,
debug = FALSE,
quiet = FALSE,
pandoc_args = NULL,
as_job = getOption("quarto.render_as_job", default = interactive() &&
rstudioapi::isAvailable())
)Arguments
- path
Path to a file ("chapter") or subdirectory ("part") of a Quarto book project.
- profile
Quarto project profile(s) to use. Either a character vector of profile names or
NULLto use the default profile.- output_format
Target output format (defaults to
"html"). The option"all"will render all formats defined within the file or project.- execute
Whether to execute embedded code chunks.
- execute_daemon_restart
Restart keepalive Jupyter kernel before render. Note this option is only applicable for rendering Jupyter notebooks or Jupyter markdown.
- execute_debug
Show debug output for Jupyter kernel.
- use_freezer
Force use of frozen computations for an incremental file render.
- cache_refresh
Force refresh of execution cache.
- debug
Leave intermediate files in place after render.
- quiet
Suppress warning and other messages, from R and also Quarto CLI (i.e
--quietis passed as command line).quarto.quietR option orR_QUARTO_QUIETenvironment variable can be used to globally override a function call (This can be useful to debug tool that callsquarto_*functions directly).On Github Actions, it will always be
quiet = FALSE.- pandoc_args
Additional command line arguments to pass on to Pandoc.
- as_job
Render as an RStudio background job. Default is
"auto", which will render individual documents normally and projects as background jobs. Use thequarto.render_as_jobR option to control the default globally.
Details
This function is registered as an RStudio add-in, allowing RStudio users to assign a custom shortcut to it and to invoke it from the command palette. Note that the default path = rstudioapi::getActiveDocumentContext()$path does only work when called via a
keyboard shortcut, not when called from the command palette. This is because the command palette steals focus and in consequence the document underneath is
not considered currently active anymore as long as the command palette is opened.