Skip to content

Commit 06039f7

Browse files
committed
book.toml: switch from latex to typst for pdf output
1 parent 560bded commit 06039f7

2 files changed

Lines changed: 86 additions & 114 deletions

File tree

book.toml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[book]
22
authors = ["The Void Linux Team"]
33
src = "src"
4-
title = "Void Linux Handbook"
4+
title = "The Void Linux Handbook"
55

66
[output.html]
77
theme = "src/theme"
@@ -15,9 +15,43 @@ edit-url-template = "https://github.com/void-linux/void-docs/edit/master/{path}"
1515
"/config/gnupg.html" = "/config/openpgp.html#gnupg"
1616
"/installation/guides/arm-devices/platforms.html" = "/installation/guides/arm-devices/raspberry-pi.html"
1717

18-
[output.latex]
18+
[output.typst]
1919
optional = true
2020

21+
[output.typst.output]
22+
format = "pdf"
23+
24+
[output.typst.style]
25+
paper = "us-letter"
26+
text-font = "Libertinus Serif"
27+
link-color = "black"
28+
29+
[output.typst.advanced]
30+
typst-markup-header = """
31+
#let voidgreen = rgb("#478061")
32+
#set page(paper: "us-letter")
33+
#align(center + horizon)[
34+
#image("handbook-cover.svg")
35+
#title()
36+
]
37+
#pagebreak()
38+
#set page(
39+
header: [_The Void Linux Handbook_],
40+
numbering: "1",
41+
)
42+
#set par(justify: true)
43+
#set table(
44+
stroke: (x, y) => if y != 0 { 0.5pt } else { voidgreen },
45+
fill: (x, y) => if y == 0 { voidgreen },
46+
)
47+
#show table.cell.where(y: 0): it => {
48+
set text(white)
49+
strong(it)
50+
}
51+
#show raw.where(block: false): box.with(fill: luma(240), inset: (x: 3pt, y: 0pt), outset: (y: 3pt), radius: 2pt)
52+
#show raw.where(block: true): box.with(fill: luma(240), inset: 8pt, radius: 3pt)
53+
"""
54+
2155
[output.gemini]
2256
optional = true
2357

res/handbook-cover.svg

Lines changed: 50 additions & 112 deletions
Loading

0 commit comments

Comments
 (0)