Skip to content

Commit

Permalink
Allow other compilers, like luatex
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Mar 15, 2015
1 parent 844aa3a commit 2f168a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pylatex/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def generate_tex(self, filename=''):
with open(filename + '.tex', 'w') as newf:
self.dump(newf)

def generate_pdf(self, filename='', clean=True):
def generate_pdf(self, filename='', clean=True, compiler='pdflatex'):
"""Generates a .pdf file.
:param filename: the name of the file
Expand All @@ -122,7 +122,8 @@ def generate_pdf(self, filename='', clean=True):

self.generate_tex(filename)

command = 'pdflatex --jobname="' + filename + '" "' + filename + '.tex"'
command = compiler + ' --jobname="' + filename + '" "' + \
filename + '.tex"'

subprocess.check_call(command, shell=True)

Expand Down

0 comments on commit 2f168a5

Please sign in to comment.