diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-09-02 20:43:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 18:43:59 +0000 |
| commit | cfde809feb33bc057e860c5128c74fb9df6f030c (patch) | |
| tree | 5b367da382b9dab2840ce99ec05bad03f3039168 /tests/suite/styling | |
| parent | 9fd796e0e24ef9a76f8f7328e0a1eed350e91320 (diff) | |
New realization / Text show rules now work across elements (#4876)
Diffstat (limited to 'tests/suite/styling')
| -rw-r--r-- | tests/suite/styling/show-text.typ | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/suite/styling/show-text.typ b/tests/suite/styling/show-text.typ index 56b659b2..d073f72e 100644 --- a/tests/suite/styling/show-text.typ +++ b/tests/suite/styling/show-text.typ @@ -131,3 +131,66 @@ Heya #show "Heya": set text(red) #show "yaho": set text(weight: "bold") Heyaho + +--- show-text-smartquote --- +#show "up,\" she": set text(red) +"What's up," she asked. + +--- show-text-apostrophe --- +#show regex("Who's|We've"): highlight +Who's got it? \ +We've got it. + +--- show-text-citation --- +#show "hey": [@arrgh] +@netwok hey + +#show bibliography: none +#bibliography("/assets/bib/works.bib") + +--- show-text-list --- +#show "hi": [- B] +- A +hi +- C + +--- show-text-citation-smartquote --- +#show "hey \"": [@arrgh] +#show "dis": [@distress] +@netwok hey " dis + +#show bibliography: none +#bibliography("/assets/bib/works.bib") + +--- show-text-linebreak --- +#show "lo\nwo": set text(red) +Hello #[ ] \ +#[ ] #[ ] world! + +--- show-text-after-normal-show --- +#show rect: "world" +#show "lo wo": set text(red) +hello #rect() + +--- show-text-space-collapsing --- +#show "i ther": set text(red) +hi#[ ]#[ ]the#"re" + +--- show-text-style-boundary --- +#show "What's up": set text(blue) +#show "your party": underline +What's #[ ] up at #"your" #text(red)[party?] + +--- show-text-within-par --- +#show "Pythagoras'": highlight +$a^2 + b^2 = c^2$ is Pythagoras' theorem. + +--- show-text-outer-space --- +// Spaces must be interior to strong textual elements for matching to work. +// For outer spaces, it is hard to say whether they would collapse. +#show "a\n": set text(blue) +#show "b\n ": set text(blue) +#show " c ": set text(blue) +a \ #h(0pt, weak: true) +b \ #h(0pt, weak: true) +$x$ c $y$ |
