4d42034432
This commit proposes PDF generation with pdflatex. Executing Sphinx with latex option generates .tex files will be performed first, and pdflatex converts from .tex to .pdf files. More details are as followings: - Adds texlive related package binary dependency (>= Trusty) : inkscape texlive-latex-base texlive-latex-extra texlive-fonts-recommended - build-rst.sh: --pdf option is added - install-guide PDF support using --pdf option - PDF support for serveral documents : arch-design, cli-reference, ha-guide, ops-guide, user-guide, networking-guide, arch-design-draft (testable using like "tox -e build -- networking-guide --pdf") - Intermidiate files for building .tex (required for converting into .pdf) are stored in "build/pdf" folder. Change-Id: I66242f44bb13f1a09be0904a491c84f42f25c3a2 Implements: blueprint build-pdf-from-rst-guides
49 lines
1.5 KiB
Bash
Executable File
49 lines
1.5 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
mkdir -p publish-docs
|
|
|
|
LINKCHECK=""
|
|
if [[ $# > 0 ]] ; then
|
|
if [ "$1" = "--linkcheck" ] ; then
|
|
LINKCHECK="$1"
|
|
fi
|
|
fi
|
|
|
|
PDF_OPTION="--pdf"
|
|
|
|
# PDF targets for Install guides are dealt in build-install-guides-rst.sh
|
|
PDF_TARGETS=( 'arch-design' 'arch-design-draft' 'cli-reference'\
|
|
'ha-guide' 'networking-guide'\
|
|
'ops-guide' 'user-guide' )
|
|
|
|
for guide in admin-guide arch-design cli-reference contributor-guide \
|
|
ha-guide image-guide ops-guide user-guide; do
|
|
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target $guide $LINKCHECK $PDF_OPTION
|
|
else
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target $guide $LINKCHECK
|
|
fi
|
|
done
|
|
|
|
# Draft guides
|
|
# This includes guides that we publish from stable branches
|
|
# as versioned like the networking-guide.
|
|
for guide in networking-guide arch-design-draft config-reference; do
|
|
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target "draft/$guide" $LINKCHECK $PDF_OPTION
|
|
else
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target "draft/$guide" $LINKCHECK
|
|
fi
|
|
done
|
|
|
|
tools/build-install-guides-rst.sh $LINKCHECK
|
|
|
|
# This marker is needed for infra publishing.
|
|
# Note for stable branches, this needs to be the top of each manual.
|
|
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID Revision: $ZUUL_NEWREV"
|
|
echo $MARKER_TEXT > publish-docs/.root-marker
|