Skip to content

Commit 6d7feea

Browse files
committed
Accept lualatex and platex as a PDF builder
1 parent 00c3e89 commit 6d7feea

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

docs/guides/feature-flags.rst

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Available Flags
1818

1919
``USE_XELATEX_BINARY``: :featureflags:`USE_XELATEX_BINARY`
2020

21+
``USE_LUALATEX_BINARY``: :featureflags:`USE_LUALATEX_BINARY`
22+
23+
``USE_PLATEX_BINARY``: :featureflags:`USE_PLATEX_BINARY`
24+
2125
``ALLOW_DEPRECATED_WEBHOOKS``: :featureflags:`ALLOW_DEPRECATED_WEBHOOKS`
2226

2327
``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE`

readthedocs/doc_builder/backends/sphinx.py

+4
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,10 @@ def build(self):
395395
# https://github.com/rtfd/readthedocs.org/issues/4454
396396
if self.project.has_feature(Feature.USE_XELATEX_BINARY):
397397
latex_cmd = 'xelatex'
398+
elif self.project.has_feature(Feature.USE_LUALATEX_BINARY):
399+
latex_cmd = 'lualatex'
400+
elif self.project.has_feature(Feature.USE_PLATEX_BINARY):
401+
latex_cmd = 'platex'
398402
else:
399403
latex_cmd = 'pdflatex'
400404

readthedocs/projects/models.py

+4
Original file line numberDiff line numberDiff line change
@@ -1314,13 +1314,17 @@ def add_features(sender, **kwargs):
13141314
DONT_SHALLOW_CLONE = 'dont_shallow_clone'
13151315
USE_TESTING_BUILD_IMAGE = 'use_testing_build_image'
13161316
USE_XELATEX_BINARY = 'use_xelatex_binary'
1317+
USE_LUALATEX_BINARY = 'use_lualatex_binary'
1318+
USE_PLATEX_BINARY = 'use_platex_binary'
13171319

13181320
FEATURES = (
13191321
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
13201322
(USE_SETUPTOOLS_LATEST, _('Use latest version of setuptools')),
13211323
(ALLOW_DEPRECATED_WEBHOOKS, _('Allow deprecated webhook views')),
13221324
(PIP_ALWAYS_UPGRADE, _('Always run pip install --upgrade')),
13231325
(USE_XELATEX_BINARY, _('Use "xelatex" binary to build PDF files')),
1326+
(USE_LUALATEX_BINARY, _('Use "lualatex" binary to build PDF files')),
1327+
(USE_PLATEX_BINARY, _('Use "platex" binary to build PDF files')),
13241328
(SKIP_SUBMODULES, _('Skip git submodule checkout')), (
13251329
DONT_OVERWRITE_SPHINX_CONTEXT,
13261330
_(

0 commit comments

Comments
 (0)