forked from Automattic/harper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(Automattic#230): add document with spelling mistakes in differe…
…nt contexts
- Loading branch information
1 parent
00623b0
commit 122436f
Showing
3 changed files
with
66 additions
and
3 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
63 changes: 63 additions & 0 deletions
63
harper-core/tests/test_sources/typst_spelling_mistakes.typ
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,63 @@ | ||
#set page( | ||
paper: "us-letter", | ||
columns: 2, | ||
) | ||
|
||
#let titleblock( | ||
title: "Defalt Title", | ||
authors: ("Author 1", "Author 2"), | ||
abstract: [*This is contnt*], | ||
) = { | ||
set page( | ||
header: context { | ||
if counter(page).get().first() > 1 [ | ||
#counter(page).get().first() of #counter(page).final().at(0) | ||
#h(1fr) | ||
#title | ||
] | ||
}, | ||
) | ||
place( | ||
top + center, | ||
float: true, | ||
scope: "parent", | ||
clearance: 2em, | ||
)[ | ||
#align(center, text(17pt)[ | ||
*#title* | ||
]) | ||
|
||
#let authors = authors.filter(x => x.len() > 0) | ||
#let count = authors.len() | ||
#let authors_slice = authors.slice(0, calc.min(count, 3)) | ||
_#if count > 3 { | ||
// et al. isn't parsed properly, but this isn't the fault of the typst | ||
// parser | ||
// authors_slice.push("et al.") | ||
authors_slice.join(", ") | ||
} else { | ||
authors_slice.join(", ", last: ", and ") | ||
} | ||
_ | ||
|
||
#par(justify: false)[ | ||
*Abstract* \ | ||
#abstract | ||
] | ||
] | ||
} | ||
|
||
#show: doc => [ | ||
#titleblock( | ||
title: "A fluid dynamic model for glaier flow", | ||
authors: ("Grant Lemons", "John Doe", "Jane Doe"), | ||
abstract: lorem(80) | ||
) | ||
#doc | ||
] | ||
|
||
= Introduction | ||
#lorem(300) | ||
|
||
= Related ork | ||
#lorem(200) |