Skip to content

Use Ubuntu 20.04, lualatex for readthedocs builds #9242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
version: 2

python:
version: 3.7
install:
- requirements: doc/en/requirements.txt
- method: pip
path: .

build:
os: ubuntu-20.04
tools:
python: "3.9"
apt_packages:
- inkscape

1 change: 1 addition & 0 deletions changelog/9242.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade readthedocs configuration to use a [newer Ubuntu version](https://blog.readthedocs.com/new-build-specification/) with better unicode support for PDF docs.
20 changes: 17 additions & 3 deletions doc/en/conf.py
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
import os
import shutil
import sys
from textwrap import dedent
from typing import List
from typing import TYPE_CHECKING

@@ -39,9 +40,22 @@
autodoc_typehints = "description"
todo_include_todos = 1

# Use a different latex engine due to possible Unicode characters in the documentation:
# https://docs.readthedocs.io/en/stable/guides/pdf-non-ascii-languages.html
latex_engine = "xelatex"
latex_engine = "lualatex"

latex_elements = {
"preamble": dedent(
r"""
\directlua{
luaotfload.add_fallback("fallbacks", {
"Noto Serif CJK SC:style=Regular;",
"Symbola:Style=Regular;"
})
}
\setmainfont{FreeSerif}[RawFeature={fallback=fallbacks}]
"""
)
}

# -- General configuration -----------------------------------------------------