18.3 Using a new format

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 formatquarterly_report is in a package namedmypackage, we can use it as follows:

---title: "Habits"output:  mypackage::quarterly_report:    toc: true---

This means to use thequarterly_report() function defined inmypackage as the output format, and to passtoc = TRUE as a parameter to the function.