-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: rename typst tests and add simplified document
Co-authored-by: Andrew Voynov <[email protected]>
- Loading branch information
1 parent
628c2ed
commit 7cb7b25
Showing
4 changed files
with
58 additions
and
2 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
File renamed without changes.
File renamed without changes.
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 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, | ||
)[ | ||
#show heading: set text(17pt) | ||
= #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) |