summaryrefslogtreecommitdiff
path: root/tests/typ/text/justify.typ
blob: 0cdef00007a229c7288a46da65fed55af09f3b2a (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
29
30
31
32

---
#set page(width: 180pt)
#set par(
  justify: true,
  indent: 14pt,
  spacing: 0pt,
  leading: 5pt,
)

This text is justified, meaning that spaces are stretched so that the text
forms a "block" with flush edges at both sides.

First line indents and hyphenation play nicely with justified text.

---
// Test that lines with hard breaks aren't justified.
#set par(justify: true)
A B C \
D

---
// Test that justificating chinese text is at least a bit sensible.
#set page(width: 200pt)
#set par(justify: true)
中文维基百科使用汉字书写,汉字是汉族或华人的共同文字,是中国大陆、新加坡、马来西亚、台湾、香港、澳门的唯一官方文字或官方文字之一。25.9%,而美国和荷兰则分別占13.7%及8.2%。近年來,中国大陆地区的维基百科编辑者正在迅速增加;

---
// Test that there are no hick-ups with justification enabled and
// basically empty paragraph.
#set par(justify: true)
{""}