Skip to content

Commit

Permalink
Improvements to #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mvuorre committed Aug 29, 2024
1 parent 19568ab commit 10f59a2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _extensions/preprint/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: Preprint
author: Matti Vuorre
version: 0.9.0
version: 0.9.2
quarto-required: ">=1.5.47"
contributes:
formats:
Expand Down
4 changes: 2 additions & 2 deletions _extensions/preprint/typst-show.typ
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ $endif$
$if(toc_indent)$
toc_indent: "$toc_indent$",
$endif$
$if(columns)$
cols: $columns$,
$if(cols)$
cols: $cols$,
$endif$
$if(col-gutter)$
col-gutter: $col-gutter$,
Expand Down
7 changes: 4 additions & 3 deletions _extensions/preprint/typst-template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
if authors != none {
for a in authors {
let author_string = [
#a.name#super[#a.affiliation]#if a.keys().contains("email") {[\*]}
// Solo manuscripts don't have institutional id
#a.name#if authors.len() > 1 [#super[#a.affiliation]]#if a.keys().contains("email") {[\*]}
#if a.keys().contains("orcid") {
box(
height: 1em,
Expand All @@ -59,7 +60,7 @@
}
]
if a.keys().contains("email") {
authornote = [\*Corresponding author: #a.name, #a.email.\ #authornote]
authornote = [\*Send correspondence to: #a.name, #a.email.\ #authornote]
}
author_strings.push(author_string)
}
Expand Down Expand Up @@ -199,7 +200,7 @@
titleblock(
weight: "regular", size: 1.1em, below: 2em,
for a in affiliations [
#super[#a.id]#a.name#if a.keys().contains("department") [, #a.department] \
#if authors.len() > 1 [#super[#a.id]]#a.name#if a.keys().contains("department") [, #a.department] \
]
)
}
Expand Down
2 changes: 2 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ bibliography-style: "apa"
margin:
x: 1cm
y: 3cm
cols: 1
```

- leading
Expand All @@ -290,6 +291,7 @@ margin:
- <https://typst.app/docs/reference/text/text/#parameters-region>
- bibliography-title: "References"
- bibliography-style: "apa"
- cols: columns in the main document (experimental)

# Example content

Expand Down

0 comments on commit 10f59a2

Please sign in to comment.