Re-organize doc building
* Split out PDF building into a separate tox target * Run HTML builder the same way as by Infra * Omit Latex builder as it's not used Change-Id: Idae8ce297fdcc05141749d31f343cb29ce89ca66
This commit is contained in:
parent
29a7ad7fce
commit
f9d4e0e078
@ -170,39 +170,39 @@
|
||||
|
||||
toc7:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 120
|
||||
|
||||
toc8:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 140
|
||||
|
||||
toc9:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc10:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc11:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc12:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc13:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc14:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
toc15:
|
||||
parent: toc
|
||||
leftIndent: 100
|
||||
leftIndent: 160
|
||||
|
||||
footer:
|
||||
parent: normal
|
||||
@ -320,7 +320,7 @@
|
||||
parent: heading
|
||||
fontName: stdBold
|
||||
textColor: #D32F1A
|
||||
fontSize: 200%
|
||||
fontSize: 250%
|
||||
spaceBefore: 30
|
||||
spaceAfter: 30
|
||||
|
||||
@ -328,20 +328,21 @@
|
||||
parent: heading
|
||||
fontName: stdBold
|
||||
textColor: #D32F1A
|
||||
fontSize: 150%
|
||||
fontSize: 180%
|
||||
spaceBefore: 20
|
||||
spaceAfter: 14
|
||||
|
||||
heading3:
|
||||
parent: heading
|
||||
fontName: stdBold
|
||||
fontSize: 125%
|
||||
fontSize: 140%
|
||||
spaceBefore: 12
|
||||
spaceAfter: 8
|
||||
|
||||
heading4:
|
||||
parent: heading
|
||||
fontName: stdBold
|
||||
fontSize: 115%
|
||||
spaceBefore: 12
|
||||
spaceBefore: 8
|
||||
|
||||
@ -481,6 +482,7 @@
|
||||
|
||||
table-body:
|
||||
parent : normal
|
||||
fontSize: 8
|
||||
|
||||
dedication:
|
||||
parent : normal
|
||||
|
@ -432,3 +432,5 @@ pdf_use_numbered_links = False
|
||||
|
||||
# Background images fitting mode
|
||||
pdf_fit_background_mode = 'scale'
|
||||
|
||||
pdf_default_dpi = 72
|
||||
|
11
tools/build_pdf.sh
Executable file
11
tools/build_pdf.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
# copy sources to temporary folder
|
||||
TEMP_DIR="$(mktemp -d)"
|
||||
cp -r doc/source/* ${TEMP_DIR}
|
||||
|
||||
# convert SVG to PNG
|
||||
find ${TEMP_DIR} -name *svg | sed "s/\.svg$//" | xargs -I% cairosvg "%.svg" -f pdf -o "%.pdf"
|
||||
|
||||
# run Sphinx
|
||||
sphinx-build -b pdf ${TEMP_DIR} doc/build/pdf
|
14
tox.ini
14
tox.ini
@ -25,9 +25,17 @@ commands = flake8
|
||||
|
||||
[testenv:docs]
|
||||
commands =
|
||||
sphinx-build -b html doc/source/ doc/build/html
|
||||
sphinx-build -b latex doc/source/ doc/build/latex
|
||||
sphinx-build -b pdf doc/source/ doc/build/pdf
|
||||
python setup.py build_sphinx
|
||||
|
||||
[testenv:pdf]
|
||||
deps =
|
||||
cairosvg
|
||||
lxml
|
||||
tinycss
|
||||
cssselect
|
||||
rst2pdf
|
||||
whitelist_externals = bash
|
||||
commands = bash tools/build_pdf.sh
|
||||
|
||||
[flake8]
|
||||
show-source = true
|
||||
|
Loading…
Reference in New Issue
Block a user