summaryrefslogtreecommitdiff
path: root/tests/typ/text/align.typ
blob: 27c650a493cab8be407f6a10ee5173e6d4e27d7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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]