New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape filename for pdflatex in nbconvert #3865
Conversation
We really shouldn't ever be building subcommands as a single string when we don't have to. Do you want to change the code so that the configurable is actually a list? Something like: command = List(["pdflatex", "{filename}"], config=True,...)
...
command = [ c.format(filename=input) for c in self.command ] |
@minrk - no problem, I'll see what I can do |
…-processor, which is a better way to avoid issues if there are spaces in the filename.
@minrk - I implement it the way you suggest, which I agree is cleaner. Would you prefer for me to rebase and squash the commits? |
@@ -30,7 +30,7 @@ class PDFPostProcessor(PostProcessorBase): | |||
How many times pdflatex will be called. | |||
""") | |||
|
|||
compiler = Unicode(u'pdflatex {0}', config=True, help=""" | |||
compiler = List(["pdflatex", "{filename}"], config=True, help=""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename 'compiler' to 'command'
No need to rebase. Rename 'compiler' to perhaps more accurate 'command', and it should be ready to go. |
Thanks! |
use `command` list instead of compiler string in PDFPostProcessor avoids issues with spaces
…-spaces use `command` list instead of compiler string in PDFPostProcessor avoids issues with spaces
This is a simple change, but it's needed otherwise filenames with spaces cause issues: