From bfbbe8dcf8881d276c3db05aea99f7da915edde2 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 3 Apr 2021 20:54:18 +0200 Subject: =?UTF-8?q?Better=20paragraph=20layout=20tests=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/typ/text/align.typ | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/typ/text/align.typ (limited to 'tests/typ/text/align.typ') diff --git a/tests/typ/text/align.typ b/tests/typ/text/align.typ new file mode 100644 index 00000000..27c650a4 --- /dev/null +++ b/tests/typ/text/align.typ @@ -0,0 +1,28 @@ +// Test text alignment. + +--- +// Test that alignment depends on the paragraph's full width. +#rect[ + Hello World \ + #align(right)[World] +] + +--- +// Test that a line with multiple alignments respects the paragraph's full +// width. +#rect[ + Hello #align(center)[World] \ + Hello from the World +] + +--- +// Test that `start` alignment after `end` alignment doesn't do anything until +// the next line break ... +L #align(right)[R] R + +// ... but make sure it resets to left after the line break. +L #align(right)[R] \ L + +--- +// FIXME: There should be a line break opportunity on alignment change. +LLLLLLLLLLLLL#align(center)[CCCC] -- cgit v1.2.3