Skip to content

Commit

Permalink
Merge pull request ipython#3865 from astrofrog/fix-nbconvert-pdflatex…
Browse files Browse the repository at this point in the history
…-spaces

use `command` list instead of compiler string in PDFPostProcessor

avoids issues with spaces
  • Loading branch information
minrk committed Aug 1, 2013
2 parents 31c9d5a + 2bc1b27 commit 48f69a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions IPython/nbconvert/post_processors/pdf.py
Expand Up @@ -16,7 +16,7 @@
import subprocess
import os

from IPython.utils.traitlets import Integer, Unicode, Bool
from IPython.utils.traitlets import Integer, List, Bool

from .base import PostProcessorBase

Expand All @@ -30,7 +30,7 @@ class PDFPostProcessor(PostProcessorBase):
How many times pdflatex will be called.
""")

compiler = Unicode(u'pdflatex {0}', config=True, help="""
command = List(["pdflatex", "{filename}"], config=True, help="""
Shell command used to compile PDF.""")

verbose = Bool(False, config=True, help="""
Expand All @@ -42,8 +42,8 @@ def call(self, input):
Consume and write Jinja output a PDF.
See files.py for more...
"""
command = self.compiler.format(input)
self.log.info("Building PDF: `%s`", command)
command = [c.format(filename=input) for c in self.command]
self.log.info("Building PDF: `%s`", ' '.join(command))
for index in range(self.iteration_count):
if self.verbose:
subprocess.Popen(command, shell=True)
Expand Down

0 comments on commit 48f69a2

Please sign in to comment.