Skip to content

Commit

Permalink
Merge pull request #4 from Andrew15-5/match-output
Browse files Browse the repository at this point in the history
fix: made Typst examples output exact same thing
  • Loading branch information
grantlemons authored Jan 16, 2025
2 parents de61c4c + 9a3dfb8 commit b496854
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions harper-typst/tests/test_sources/complex_document.typ
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
title: "Default Title",
authors: ("Author 1", "Author 2"),
abstract: [*This is content*],
body,
) = {
set document(date: none)
set par(justify: true)
set page(
header: context {
if counter(page).get().first() > 1 [
Expand Down Expand Up @@ -45,15 +48,16 @@
#abstract
]
]
body
}

#show: doc => [
#titleblock(
title: "A fluid dynamic model for glacier flow",
authors: ("Grant Lemons", "John Doe", "Jane Doe"),
abstract: lorem(80)
abstract: lorem(80),
doc,
)
#doc
]

= Introduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
title: "Defalt Title",
authors: ("Author 1", "Author 2"),
abstract: [*This is contnt*],
body,
) = {
set document(date: none)
set par(justify: true)
set page(
header: context {
if counter(page).get().first() > 1 [
Expand Down Expand Up @@ -45,15 +48,16 @@
#abstract
]
]
body
}

#show: doc => [
#titleblock(
title: "A fluid dynamic model for glaier flow",
authors: ("Grant Lemons", "John Doe", "Jane Doe"),
abstract: lorem(80)
abstract: lorem(80),
doc,
)
#doc
]

= Introduction
Expand Down
4 changes: 2 additions & 2 deletions harper-typst/tests/test_sources/simplified_document.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
abstract: [*This is content*],
body,
) = {
set document(date: none)
set par(justify: true)
set page(
paper: "us-letter",
Expand All @@ -20,8 +21,7 @@
scope: "parent",
clearance: 2em,
)[
#show heading: set text(17pt)
= #title
#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
Expand Down

0 comments on commit b496854

Please sign in to comment.