-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #391 from grantlemons/typst-fixes
Typst Test Fixes
- Loading branch information
Showing
5 changed files
with
99 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#let template( | ||
title: "Default Title", | ||
authors: ("Author 1", "Author 2"), | ||
abstract: [*This is content*], | ||
body, | ||
) = { | ||
set document(date: none) | ||
set par(justify: true) | ||
set page( | ||
paper: "us-letter", | ||
columns: 2, | ||
number-align: top, | ||
numbering: (..n) => if n.pos().first() > 1 { | ||
n.pos().map(str).join(" of ") + h(1fr) + title | ||
}, | ||
) | ||
|
||
place( | ||
top + center, | ||
float: true, | ||
scope: "parent", | ||
clearance: 2em, | ||
)[ | ||
#text(17pt, strong(title)) | ||
|
||
#let authors-line = if authors.len() > 3 { | ||
// "et al." isn't parsed properly, but this isn't the fault of the Typst | ||
// parser. | ||
// authors-max3.push("et al.") | ||
authors => authors.join(", ") | ||
} else { | ||
authors => authors.join(", ", last: ", and ") | ||
} | ||
#emph(authors-line(authors.slice(0, calc.min(authors.len(), 3)))) | ||
|
||
#par(justify: false)[ | ||
*Abstract* \ | ||
#abstract | ||
] | ||
] | ||
|
||
body | ||
} | ||
|
||
#show: template.with( | ||
title: "A fluid dynamic model for glacier flow", | ||
authors: ("Grant Lemons", "John Doe", "Jane Doe"), | ||
abstract: lorem(80), | ||
) | ||
|
||
= Introduction | ||
#lorem(300) | ||
|
||
= Related Work | ||
#lorem(200) |