New formats should be stored within a package and installed onto your local system. This allows the format to be provided to the document YAML. Assuming our example format
quarterly_report is in a package named mypackage, we can use it as follows:
--- title: "Habits" output: mypackage::quarterly_report: toc: true ---
This means to use the
quarterly_report() function defined in mypackage as the output format, and to pass
toc = TRUE as a parameter to the function.