Skip to content

File tree

7 files changed

+1481
-0
lines changed

7 files changed

+1481
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ book/
22
mandoc/
33
res/void-docs
44
res/void-docs.1
5+
res/handbook-cover.png

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Void packages:
1717
- `texlive`
1818
- `perl`
1919
- `perl-JSON`
20+
- `librsvg-utils`
2021

2122
In order to build and install these files, set the `PREFIX` and `DESTDIR`
2223
environment variables to appropriate values and run `res/build.sh` followed by

res/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The original cover variants, as suggested by @argosatcore on GitHub,
2+
are available in the `handbook-cover-variants.svg` file.

res/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,25 @@ sed -e "s,@PREFIX@,$PREFIX," res/void-docs.in > res/void-docs
2828
sed -e "s,@PREFIX@,$PREFIX," res/void-docs.1.in > res/void-docs.1
2929

3030
# Build PDF
31+
3132
echo "Building PDF"
33+
34+
## Temporarily add OpenType version of Latin Modern to font cache.
35+
36+
mkdir -p ~/.fonts
37+
TMP_FONTDIR=$(mktemp -d -p ~/.fonts)
38+
cp /usr/share/texmf-dist/fonts/opentype/public/lm/* $TMP_FONTDIR
39+
fc-cache
40+
41+
## Create cover page using Latin Modern text.
42+
43+
rsvg-convert \
44+
--dpi-x 300 \
45+
--dpi-y 300 \
46+
res/handbook-cover.svg > res/handbook-cover.png
47+
3248
## Letter version
49+
3350
pdflatex \
3451
-output-directory=book/latex/ \
3552
-jobname=handbook-letter \
@@ -40,7 +57,9 @@ pdflatex \
4057
-jobname=handbook-letter \
4158
book/latex/handbook.tex \
4259
>/dev/null
60+
4361
## A4 version
62+
4463
sed -ie "s/\\documentclass\[letterpaper\]{article}/\\documentclass[a4paper]{article}/" \
4564
book/latex/handbook.tex
4665
pdflatex -output-directory=book/latex/ \
@@ -51,3 +70,8 @@ pdflatex -output-directory=book/latex/ \
5170
-jobname=handbook-a4 \
5271
book/latex/handbook.tex \
5372
>/dev/null
73+
74+
## Remove temporary font directory
75+
76+
rm -rf $TMP_FONTDIR
77+
fc-cache

0 commit comments

Comments
 (0)