diff options
Diffstat (limited to 'tests/typ/text')
| -rw-r--r-- | tests/typ/text/deco.typ | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/tests/typ/text/deco.typ b/tests/typ/text/deco.typ index f3be17e7..b79b80b2 100644 --- a/tests/typ/text/deco.typ +++ b/tests/typ/text/deco.typ @@ -20,14 +20,40 @@ --- #let redact = strike.with(stroke: 10pt, extent: 0.05em) -#let highlight = strike.with(stroke: 10pt + rgb("abcdef88"), extent: 0.05em) +#let highlight-custom = strike.with(stroke: 10pt + rgb("abcdef88"), extent: 0.05em) // Abuse thickness and transparency for redacting and highlighting stuff. Sometimes, we work #redact[in secret]. -There might be #highlight[redacted] things. - underline() +There might be #highlight-custom[redacted] things. --- // Test stroke folding. #set underline(stroke: 2pt, offset: 2pt) #underline(text(red, [DANGER!])) + +--- +// Test highlight. +This is the built-in #highlight[highlight with default color]. +We can also specify a customized value +#highlight(fill: green.lighten(80%))[to highlight]. + +--- +// Test default highlight bounds. +#highlight[ace], +#highlight[base], +#highlight[super], +#highlight[phone #sym.integral] + +--- +// Test a tighter highlight. +#set highlight(top-edge: "x-height", bottom-edge: "baseline") +#highlight[ace], +#highlight[base], +#highlight[super], +#highlight[phone #sym.integral] + +--- +// Test a bounds highlight. +#set highlight(top-edge: "bounds", bottom-edge: "bounds") +#highlight[abc] +#highlight[abc #sym.integral] |
