Skip to content

Commit

Permalink
Accept lualatex and platex as a PDF builder
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Mar 6, 2019
1 parent 00c3e89 commit 6d7feea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guides/feature-flags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Available Flags

``USE_XELATEX_BINARY``: :featureflags:`USE_XELATEX_BINARY`

``USE_LUALATEX_BINARY``: :featureflags:`USE_LUALATEX_BINARY`

``USE_PLATEX_BINARY``: :featureflags:`USE_PLATEX_BINARY`

``ALLOW_DEPRECATED_WEBHOOKS``: :featureflags:`ALLOW_DEPRECATED_WEBHOOKS`

``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE`
Expand Down
4 changes: 4 additions & 0 deletions readthedocs/doc_builder/backends/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ def build(self):
# https://github.com/rtfd/readthedocs.org/issues/4454
if self.project.has_feature(Feature.USE_XELATEX_BINARY):
latex_cmd = 'xelatex'
elif self.project.has_feature(Feature.USE_LUALATEX_BINARY):
latex_cmd = 'lualatex'
elif self.project.has_feature(Feature.USE_PLATEX_BINARY):
latex_cmd = 'platex'
else:
latex_cmd = 'pdflatex'

Expand Down
4 changes: 4 additions & 0 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,13 +1314,17 @@ def add_features(sender, **kwargs):
DONT_SHALLOW_CLONE = 'dont_shallow_clone'
USE_TESTING_BUILD_IMAGE = 'use_testing_build_image'
USE_XELATEX_BINARY = 'use_xelatex_binary'
USE_LUALATEX_BINARY = 'use_lualatex_binary'
USE_PLATEX_BINARY = 'use_platex_binary'

FEATURES = (
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
(USE_SETUPTOOLS_LATEST, _('Use latest version of setuptools')),
(ALLOW_DEPRECATED_WEBHOOKS, _('Allow deprecated webhook views')),
(PIP_ALWAYS_UPGRADE, _('Always run pip install --upgrade')),
(USE_XELATEX_BINARY, _('Use "xelatex" binary to build PDF files')),
(USE_LUALATEX_BINARY, _('Use "lualatex" binary to build PDF files')),
(USE_PLATEX_BINARY, _('Use "platex" binary to build PDF files')),
(SKIP_SUBMODULES, _('Skip git submodule checkout')), (
DONT_OVERWRITE_SPHINX_CONTEXT,
_(
Expand Down

0 comments on commit 6d7feea

Please sign in to comment.