Skip to content

Commit c9c1711

Browse files
committed
mdbook-latex: Add mdBook backend script.
1 parent 5bb65e2 commit c9c1711

File tree

4 files changed

+409
-3
lines changed

4 files changed

+409
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ the same protocol as the packages tree. For details, please read
77

88
## Building
99

10-
The [build.sh](./build.sh) script builds HTML and roff versions of the Void
11-
documentation and the `void-docs.7` man page. It requires the following
12-
dependencies:
10+
The [build.sh](./build.sh) script builds HTML, roff and PDF versions of the Void
11+
documentation and the `void-docs.7` man page. It requires the following Void
12+
packages:
1313

1414
- `mdBook`
1515
- `fd`
1616
- `pandoc`
17+
- `texlive`
18+
- `perl`
19+
- `perl-JSON`

book.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ title = "Void Linux Handbook"
77
[output.html]
88
theme = "src/theme"
99

10+
[output.latex]
11+
optional = true
12+
1013
[output.linkcheck]
1114
optional = true
1215
follow-web-links = true

build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3+
PATH="$PWD:$PATH"
4+
35
# Build HTML mdbook
46
echo "Building mdBook"
57
mdbook build
@@ -22,3 +24,7 @@ echo "Building void-docs man page"
2224
pandoc \
2325
-V "title=void-docs" -V "section=7" -V "header=Void Docs" -s \
2426
-o "void-docs.7" "void-docs.md"
27+
28+
# Build PDF
29+
pdflatex -output-directory=book/latex/ book/latex/handbook.tex
30+
pdflatex -output-directory=book/latex/ book/latex/handbook.tex

0 commit comments

Comments
 (0)