diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-06-14 10:49:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 08:49:44 +0000 |
| commit | 9a45d948f99410292f212d3c51539fee9d0e95ad (patch) | |
| tree | 093bf4bf3249566a6d686894106f10168f799b86 /tests/suite | |
| parent | 6f9855a8c39bea36a06496a34a9083a12c93308b (diff) | |
Paragraph spacing property (#4390)
Diffstat (limited to 'tests/suite')
| -rw-r--r-- | tests/suite/introspection/query.typ | 2 | ||||
| -rw-r--r-- | tests/suite/layout/container.typ | 15 | ||||
| -rw-r--r-- | tests/suite/layout/inline/justify.typ | 3 | ||||
| -rw-r--r-- | tests/suite/model/list.typ | 2 | ||||
| -rw-r--r-- | tests/suite/model/outline.typ | 2 | ||||
| -rw-r--r-- | tests/suite/model/par.typ | 12 | ||||
| -rw-r--r-- | tests/suite/model/quote.typ | 8 | ||||
| -rw-r--r-- | tests/suite/styling/set.typ | 2 |
8 files changed, 31 insertions, 15 deletions
diff --git a/tests/suite/introspection/query.typ b/tests/suite/introspection/query.typ index 6cdd4bab..76ecc913 100644 --- a/tests/suite/introspection/query.typ +++ b/tests/suite/introspection/query.typ @@ -85,7 +85,7 @@ #set text(size: 12pt, weight: "regular") #outline( - title: "Chapter outline", + title: none, indent: true, target: heading .where(level: 1) diff --git a/tests/suite/layout/container.typ b/tests/suite/layout/container.typ index b6d30f30..2c68099a 100644 --- a/tests/suite/layout/container.typ +++ b/tests/suite/layout/container.typ @@ -43,13 +43,26 @@ First! ] --- block-spacing-basic --- -#set block(spacing: 10pt) +#set par(spacing: 10pt) Hello There #block(spacing: 20pt)[Further down] +--- block-above-below-context --- +#context test(block.above, auto) +#set block(spacing: 20pt) +#context test(block.above, 20pt) +#context test(block.below, 20pt) + +--- block-spacing-context --- +// The values for `above` and `below` might be different, so we cannot retrieve +// `spacing` directly +// +// Error: 16-23 function `block` does not contain field `spacing` +#context block.spacing + --- block-spacing-table --- // Test that paragraph spacing loses against block spacing. #set block(spacing: 100pt) diff --git a/tests/suite/layout/inline/justify.typ b/tests/suite/layout/inline/justify.typ index e1e15578..b35ff1fd 100644 --- a/tests/suite/layout/inline/justify.typ +++ b/tests/suite/layout/inline/justify.typ @@ -1,7 +1,6 @@ --- justify --- #set page(width: 180pt) -#set block(spacing: 5pt) -#set par(justify: true, first-line-indent: 14pt, leading: 5pt) +#set par(justify: true, first-line-indent: 14pt, spacing: 5pt, leading: 5pt) This text is justified, meaning that spaces are stretched so that the text forms a "block" with flush edges at both sides. diff --git a/tests/suite/model/list.typ b/tests/suite/model/list.typ index e37fa65d..4d3f402d 100644 --- a/tests/suite/model/list.typ +++ b/tests/suite/model/list.typ @@ -129,7 +129,7 @@ More. --- list-wide-cannot-attach --- // Test that wide lists cannot be ... -#set block(spacing: 15pt) +#set par(spacing: 15pt) Hello - A diff --git a/tests/suite/model/outline.typ b/tests/suite/model/outline.typ index d8fc1a43..085e06ed 100644 --- a/tests/suite/model/outline.typ +++ b/tests/suite/model/outline.typ @@ -118,6 +118,7 @@ Ok ... } #outline(indent: auto) +#v(1.2em, weak: true) #set text(8pt) #show heading: set block(spacing: 0.65em) @@ -142,6 +143,7 @@ Ok ... #counter(page).update(3) #outline(indent: auto, fill: repeat[--]) +#v(1.2em, weak: true) #set text(8pt) #show heading: set block(spacing: 0.65em) diff --git a/tests/suite/model/par.typ b/tests/suite/model/par.typ index 65779f6a..f07c4c6c 100644 --- a/tests/suite/model/par.typ +++ b/tests/suite/model/par.typ @@ -19,17 +19,19 @@ heaven Would through the airy region stream so bright That birds would sing and think it were not night. See, how she leans her cheek upon her hand! O, that I were a glove upon that hand, That I might touch that cheek! ---- par-leading-and-block-spacing --- +--- par-leading-and-spacing --- // Test changing leading and spacing. -#set block(spacing: 1em) -#set par(leading: 2pt) +#set par(spacing: 1em, leading: 2pt) But, soft! what light through yonder window breaks? It is the east, and Juliet is the sun. +--- par-spacing-context --- +#set par(spacing: 10pt) +#context test(par.spacing, 10pt) + --- par-first-line-indent --- -#set par(first-line-indent: 12pt, leading: 5pt) -#set block(spacing: 5pt) +#set par(first-line-indent: 12pt, spacing: 5pt, leading: 5pt) #show heading: set text(size: 10pt) The first paragraph has no indent. diff --git a/tests/suite/model/quote.typ b/tests/suite/model/quote.typ index 446784ee..d71eeeab 100644 --- a/tests/suite/model/quote.typ +++ b/tests/suite/model/quote.typ @@ -29,7 +29,7 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum]. #set text(8pt) #quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.] -#set text(0pt) +#show bibliography: none #bibliography("/assets/bib/works.bib") --- quote-cite-format-label-or-numeric --- @@ -38,7 +38,7 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum]. #set quote(block: true) #quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.] -#set text(0pt) +#show bibliography: none #bibliography("/assets/bib/works.bib", style: "ieee") --- quote-cite-format-note --- @@ -47,7 +47,7 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum]. #set quote(block: true) #quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.] -#set text(0pt) +#show bibliography: none #bibliography("/assets/bib/works.bib", style: "chicago-notes") --- quote-cite-format-author-date --- @@ -56,7 +56,7 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum]. #set quote(block: true) #quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.] -#set text(0pt) +#show bibliography: none #bibliography("/assets/bib/works.bib", style: "apa") --- quote-nesting --- diff --git a/tests/suite/styling/set.typ b/tests/suite/styling/set.typ index a31cd165..ca080977 100644 --- a/tests/suite/styling/set.typ +++ b/tests/suite/styling/set.typ @@ -21,7 +21,7 @@ Hello *#x* --- set-text-override --- // Test that that block spacing and text style are respected from // the outside, but the more specific fill is respected. -#set block(spacing: 4pt) +#set par(spacing: 4pt) #set text(style: "italic", fill: eastern) #let x = [And the forest #parbreak() lay silent!] #text(fill: forest, x) |
