Show More
@@ -16,7 +16,7 b' Contains writer for writing nbconvert output to PDF.' | |||||
16 | import subprocess |
|
16 | import subprocess | |
17 | import os |
|
17 | import os | |
18 |
|
18 | |||
19 |
from IPython.utils.traitlets import Integer, |
|
19 | from IPython.utils.traitlets import Integer, List, Bool | |
20 |
|
20 | |||
21 | from .base import PostProcessorBase |
|
21 | from .base import PostProcessorBase | |
22 |
|
22 | |||
@@ -30,7 +30,7 b' class PDFPostProcessor(PostProcessorBase):' | |||||
30 | How many times pdflatex will be called. |
|
30 | How many times pdflatex will be called. | |
31 | """) |
|
31 | """) | |
32 |
|
32 | |||
33 |
com |
|
33 | command = List(["pdflatex", "{filename}"], config=True, help=""" | |
34 | Shell command used to compile PDF.""") |
|
34 | Shell command used to compile PDF.""") | |
35 |
|
35 | |||
36 | verbose = Bool(False, config=True, help=""" |
|
36 | verbose = Bool(False, config=True, help=""" | |
@@ -42,8 +42,8 b' class PDFPostProcessor(PostProcessorBase):' | |||||
42 | Consume and write Jinja output a PDF. |
|
42 | Consume and write Jinja output a PDF. | |
43 | See files.py for more... |
|
43 | See files.py for more... | |
44 | """ |
|
44 | """ | |
45 | command = self.compiler.format(input) |
|
45 | command = [c.format(filename=input) for c in self.command] | |
46 | self.log.info("Building PDF: `%s`", command) |
|
46 | self.log.info("Building PDF: `%s`", ' '.join(command)) | |
47 | for index in range(self.iteration_count): |
|
47 | for index in range(self.iteration_count): | |
48 | if self.verbose: |
|
48 | if self.verbose: | |
49 | subprocess.Popen(command, shell=True) |
|
49 | subprocess.Popen(command, shell=True) |
General Comments 0
You need to be logged in to leave comments.
Login now