Sphinx PDF build with tectonic
ΒΆ
Uses tectonic
to build a PDF after generating the .tex
file with Sphinx
(https://tectonic-typesetting.github.io/en-US/)
See the issue https://github.com/readthedocs/readthedocs.org/issues/9598
Read the Docs configuration file
1version: 2
2
3build:
4 # tectonic requires an older version of libssl
5 # We cannot upgrade to 22.04
6 os: ubuntu-20.04
7 tools:
8 python: "3"
9 jobs:
10 post_build:
11 # https://tectonic-typesetting.github.io/en-US/install.html
12 - curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net |sh
13 - python -m sphinx -T -E -j auto -b latex -d _build/doctrees -D language=en docs/ _readthedocs/latex
14 - ./tectonic -X compile _readthedocs/latex/$READTHEDOCS_PROJECT.tex
15 - mkdir --parents _readthedocs/pdf
16 - mv _readthedocs/latex/$READTHEDOCS_PROJECT.pdf _readthedocs/pdf/$READTHEDOCS_PROJECT.pdf
17
18sphinx:
19 configuration: docs/conf.py
20
21python:
22 install:
23 - requirements: requirements.txt
Sphinx configuration file used to build this docs (see full file),
1# Default settings
2project = 'test-builds'
3extensions = [
4 'sphinx_autorun',
5]
6
7# Include all your settings here
8html_theme = 'sphinx_rtd_theme'
9
10
11
12
>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow() # UTC
datetime.datetime(2023, 1, 31, 12, 37, 35, 216153)