Show More
@@ -23,6 +23,12 b' import re' | |||||
23 | import subprocess |
|
23 | import subprocess | |
24 | import sys |
|
24 | import sys | |
25 |
|
25 | |||
|
26 | inkscape = 'inkscape' | |||
|
27 | if sys.platform == 'darwin': | |||
|
28 | inkscape = '/Applications/Inkscape.app/Contents/Resources/bin/inkscape' | |||
|
29 | if not os.path.exists(inkscape): | |||
|
30 | inkscape = None | |||
|
31 | ||||
26 | # From IPython |
|
32 | # From IPython | |
27 | from IPython.external import argparse |
|
33 | from IPython.external import argparse | |
28 | from IPython.nbformat import current as nbformat |
|
34 | from IPython.nbformat import current as nbformat | |
@@ -559,7 +565,7 b' class ConverterLaTeX(Converter):' | |||||
559 | def _svg_lines(self, img_file): |
|
565 | def _svg_lines(self, img_file): | |
560 | base_file = os.path.splitext(img_file)[0] |
|
566 | base_file = os.path.splitext(img_file)[0] | |
561 | pdf_file = base_file + '.pdf' |
|
567 | pdf_file = base_file + '.pdf' | |
562 |
subprocess.check_call([ |
|
568 | subprocess.check_call([ inkscape, '--export-pdf=%s' % pdf_file, | |
563 | img_file]) |
|
569 | img_file]) | |
564 | return self._img_lines(pdf_file) |
|
570 | return self._img_lines(pdf_file) | |
565 |
|
571 |
General Comments 0
You need to be logged in to leave comments.
Login now