-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.typ
58 lines (33 loc) · 1.33 KB
/
example.typ
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#set text(
font: ("Liberation Sans", "Noto Sans CJK JP")
) // Optional
#import "@preview/rubby:0.10.1": get-ruby
#let ruby = get-ruby()
```typst
#let ruby = get-ruby() // (1) Adds missing delimiter around every content/string
// or
#let ruby = get-ruby(auto-spacing: false) // (2) Logic from original project
```
#ruby[ふりがな][振り仮名]
#ruby[とう|きょう|こう|ぎょう|だい|がく][東|京|工|業|大|学]
#ruby[とうきょうこうぎょうだいがく][東京工業大学]
Next 2 lines look the same with (1) (default):
#let ruby = get-ruby()
#ruby[|きょうりょく|][|協力|]
#ruby[きょうりょく][協力]
But lines are being typeset differently if (2) is used:
#let ruby = get-ruby(auto-spacing: false)
#ruby[|きょうりょく|][|協力|]
#ruby[きょうりょく][協力] // Page boundaries are not honored
First 3 lines out of 4 look the same way with (1):
#let ruby = get-ruby()
#ruby[きゅう][九]#ruby[じゅう][十]
#ruby[きゅう|][九|]#ruby[|じゅう][|十]
#ruby[きゅう|じゅう][九|十]
#ruby[きゅうじゅう][九十]
Only 2nd and 3rd lines look the same way with (2):
#let ruby = get-ruby(auto-spacing: false)
#ruby[きゅう][九]#ruby[じゅう][十]
#ruby[きゅう|][九|]#ruby[|じゅう][|十]
#ruby[きゅう|じゅう][九|十]
#ruby[きゅうじゅう][九十]