Skip to content

Commit

Permalink
add check for xelatex executable
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Sep 26, 2019
1 parent 736aca0 commit 194c78e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sphinxcontrib/jupyter/builders/jupyterpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from sphinx.util import logging
import pdb
import shutil
from distutils.spawn import find_executable

class JupyterpdfBuilder(Builder):
"""
Expand All @@ -34,6 +35,11 @@ class JupyterpdfBuilder(Builder):
logger = logging.getLogger(__name__)

def init(self):
if not find_executable('xelatex'):
self.logger.warning(
"Cannot find xelatex executable for pdf compilation"
)
exit(1)
### initializing required classes
self._execute_notebook_class = ExecuteNotebookWriter(self)
self._pdf_class = MakePdfWriter(self)
Expand Down

0 comments on commit 194c78e

Please sign in to comment.