-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
58 lines (38 loc) · 2.34 KB
/
Copy pathREADME.Rmd
File metadata and controls
58 lines (38 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# qmdtemplate
## Installation
You can install the development version of `qmdtemplate` from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("elizabethjump/qmdtemplate")
```
You should also make sure you have an up to date version of Quarto (the program, not the package) installed. Download that [here](https://quarto.org/docs/blog/posts/2024-11-25-1.6-release/).
-------------------------------
## Overview
This R package has one function: `create_qmd()`. This function will create a new Quarto document that has been pre-formatted using Typst.
Usage:
```{r}
#| eval: false
library(qmdtemplate)
create_qmd(file_name = "Quarterly",
ext_type = "short_report_pdf")
```
You can watch this video to see the expected behavior. This GIF was made with an earlier version of the package that had an extension type of `"typst_pdf"`. That extension has been replaced with `"short_report_typst"`

If you'd like to create your own package that does something similar, you can copy the R code and folder structure from this package. The examples included here are all for Quarto documents formatted with Typst but you can adjust that as desired in your own copy. If you've never built an R package before, I suggest you follow the instructions in the [R Packages (2e)](https://r-pkgs.org/) book.
## Resources
* [Quarto and Typst](https://quarto.org/docs/output-formats/typst.html): Posit overview for formatting Quarto documents with Typst
* [Typst website](https://typst.app/docs/): has an overview of Typst, tutorials and guides to functions
* [Quarto Typst templates](https://github.com/quarto-ext/typst-templates): repo of Quarto Typst templates from the Typst team
* [SMC resources](https://github.com/San-Mateo-County-Health-Epidemiology/Helpful-Code-Bits/blob/main/typst/typst-template.typ.md): our repo we made with some lessons learned from formatting with Typst
## Attributions
Huge shoutout to Meghan Hall who did something similar and shared her work at [Posit::conf(2024)](https://www.youtube.com/watch?v=VJEBg1Ke0lE&feature=youtu.be). Her presentation is the inspiration for this project.