From aabb4b5ecf67a5b51b0e550f0b06087465f4ba75 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 15 Feb 2024 10:41:27 +0100 Subject: Better quote selection (#3422) --- tests/ref/text/quote-nesting.png | Bin 0 -> 14034 bytes tests/typ/text/quote-nesting.typ | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/ref/text/quote-nesting.png create mode 100644 tests/typ/text/quote-nesting.typ (limited to 'tests') diff --git a/tests/ref/text/quote-nesting.png b/tests/ref/text/quote-nesting.png new file mode 100644 index 00000000..fb16002d Binary files /dev/null and b/tests/ref/text/quote-nesting.png differ diff --git a/tests/typ/text/quote-nesting.typ b/tests/typ/text/quote-nesting.typ new file mode 100644 index 00000000..381aaa56 --- /dev/null +++ b/tests/typ/text/quote-nesting.typ @@ -0,0 +1,27 @@ +// Test quote nesting. + +--- +// Test quote selection. +#set page(width: auto) +#set text(lang: "en") +=== EN +#quote[An apostroph'] \ +#quote[A #quote[nested] quote] \ +#quote[A #quote[very #quote[nested]] quote] + +#set text(lang: "de") +=== DE +#quote[Satz mit Apostroph'] \ +#quote[Satz mit #quote[Zitat]] \ +#quote[A #quote[very #quote[nested]] quote] + +#set smartquote(alternative: true) +=== DE Alternative +#quote[Satz mit Apostroph'] \ +#quote[Satz mit #quote[Zitat]] \ +#quote[A #quote[very #quote[nested]] quote] + +--- +// With custom quotes. +#set smartquote(quotes: (single: ("<", ">"), double: ("(", ")"))) +#quote[A #quote[nested] quote] -- cgit v1.2.3