forked from pingcap/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_pdf.sh
More file actions
executable file
·29 lines (23 loc) · 800 Bytes
/
generate_pdf.sh
File metadata and controls
executable file
·29 lines (23 loc) · 800 Bytes
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
#!/bin/bash
set -e
# test passed in pandoc 1.19.1
MAINFONT="WenQuanYi Micro Hei"
MONOFONT="WenQuanYi Micro Hei Mono"
# MAINFONT="Tsentsiu Sans HG"
# MONOFONT="Tsentsiu Sans Console HG"
#_version_tag="$(date '+%Y%m%d').$(git rev-parse --short HEAD)"
_version_tag="$(date '+%Y%m%d')"
# default version: `pandoc --latex-engine=xelatex doc.md -s -o output2.pdf`
# used to debug template setting error
pandoc -N --toc --smart --latex-engine=xelatex \
--template=templates/template.tex \
--columns=80 \
--listings \
-V title="TiDB Documentation" \
-V author="PingCAP Inc." \
-V date="${_version_tag}" \
-V CJKmainfont="${MAINFONT}" \
-V fontsize=12pt \
-V geometry:margin=1in \
-V include-after="\\input{templates/copyright.tex}" \
doc.md -s -o output.pdf