Skip to content

Commit

Permalink
Enable documentmode metadata setting
Browse files Browse the repository at this point in the history
  • Loading branch information
mvuorre committed May 6, 2024
1 parent f52778b commit bbfbcfb
Show file tree
Hide file tree
Showing 14 changed files with 508 additions and 632 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ example.typ
template_files/
example_files/
*_cache
tmp.png
tmp.png
/.luarc.json
25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
all: manuscript document journal
SOURCE = example

manuscript: example.qmd
quarto render example.qmd --to apaish-manuscript-typst \
--output example-manuscript.pdf
all: man doc jou

document: example.qmd
quarto render example.qmd --to apaish-document-typst \
--output example-document.pdf
man: $(SOURCE).qmd
quarto render $< --to apaish-typst \
--output $(SOURCE)-$@.pdf \
-M documentmode:$@

journal: example.qmd
quarto render example.qmd --to apaish-journal-typst \
--output example-journal.pdf
doc: $(SOURCE).qmd
quarto render $< --to apaish-typst \
--output $(SOURCE)-$@.pdf \
-M documentmode:$@

jou: $(SOURCE).qmd
quarto render $< --to apaish-typst \
--output $(SOURCE)-$@.pdf \
-M documentmode:$@
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ quarto add mvuorre/quarto-apaish
In your manuscript's Quarto source document, add the following YAML

```yaml
format: apaish-manuscript-typst
format: apaish-typst
```
This creates a "[manuscript]((https://github.com/mvuorre/quarto-apaish/releases/latest/download/example-manuscript.pdf))" PDF. To create a "[document](https://github.com/mvuorre/quarto-apaish/releases/latest/download/example-document.pdf)" PDF, specify
```yaml
format: apaish-document-typst
format:
apaish-typst:
documentmode: doc
```
And to create a "[journal](https://github.com/mvuorre/quarto-apaish/releases/latest/download/example-journal.pdf)" PDF (for preprints etc), specify
```yaml
format: apaish-journal-typst
format:
apaish-typst:
documentmode: jou
```
Quarto documents use YAML metadata to control the document output. See the [example .qmd file](https://github.com/mvuorre/quarto-apaish/blob/main/example.qmd) for examples.
Expand Down
64 changes: 0 additions & 64 deletions _extensions/apaish-document/typst-show.typ

This file was deleted.

155 changes: 0 additions & 155 deletions _extensions/apaish-document/typst-template.typ

This file was deleted.

10 changes: 0 additions & 10 deletions _extensions/apaish-journal/_extension.yml

This file was deleted.

64 changes: 0 additions & 64 deletions _extensions/apaish-journal/typst-show.typ

This file was deleted.

Loading

0 comments on commit bbfbcfb

Please sign in to comment.