Show More
@@ -172,7 +172,7 b' class Exporter(Configurable):' | |||||
172 | @property |
|
172 | @property | |
173 | def default_config(self): |
|
173 | def default_config(self): | |
174 | if self._default_config: |
|
174 | if self._default_config: | |
175 | return deepcopy(self._default_config) |
|
175 | return Config(deepcopy(self._default_config)) | |
176 | else : |
|
176 | else : | |
177 | return Config({}) |
|
177 | return Config({}) | |
178 |
|
178 |
@@ -21,6 +21,7 b' import os' | |||||
21 |
|
21 | |||
22 | # IPython imports |
|
22 | # IPython imports | |
23 | from IPython.utils.traitlets import Unicode |
|
23 | from IPython.utils.traitlets import Unicode | |
|
24 | from IPython.config import Config | |||
24 |
|
25 | |||
25 | # other libs/dependencies |
|
26 | # other libs/dependencies | |
26 | from jinja2 import Environment, FileSystemLoader |
|
27 | from jinja2 import Environment, FileSystemLoader | |
@@ -74,11 +75,10 b' class LatexExporter(exporter.Exporter):' | |||||
74 | #Extension that the template files use. |
|
75 | #Extension that the template files use. | |
75 | template_extension = Unicode(".tplx", config=True) |
|
76 | template_extension = Unicode(".tplx", config=True) | |
76 |
|
77 | |||
77 |
|
|
78 | _default_config = Config({ | |
78 | 'ExtractFigureTransformer' : { |
|
|||
79 | 'display_data_priority' : ['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text'], |
|
79 | 'display_data_priority' : ['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text'], | |
80 | 'extra_ext_map':{'svg':'pdf'} |
|
80 | 'extra_ext_map':{'svg':'pdf'}, | |
81 | } |
|
81 | 'ExtractFigureTransformer' : Config({'enabled':True}) | |
82 | }) |
|
82 | }) | |
83 |
|
83 | |||
84 | def __init__(self, transformers=None, filters=None, config=None, **kw): |
|
84 | def __init__(self, transformers=None, filters=None, config=None, **kw): | |
@@ -104,11 +104,11 b' class LatexExporter(exporter.Exporter):' | |||||
104 |
|
104 | |||
105 | c = self.default_config |
|
105 | c = self.default_config | |
106 | if config : |
|
106 | if config : | |
107 |
c. |
|
107 | c._merge(Config(config)) | |
108 |
|
108 | |||
109 | super(LatexExporter, self).__init__(transformers, filters, config=c, **kw) |
|
109 | super(LatexExporter, self).__init__(transformers, filters, config=c, **kw) | |
110 |
|
110 | |||
111 | self.extract_figure_transformer.extra_ext_map={'svg':'pdf'} |
|
111 | #self.extract_figure_transformer.extra_ext_map={'svg':'pdf'} | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | def _register_filters(self): |
|
114 | def _register_filters(self): |
@@ -43,7 +43,7 b' class RstExporter(exporter.Exporter):' | |||||
43 |
|
43 | |||
44 | c = self.default_config |
|
44 | c = self.default_config | |
45 | if config : |
|
45 | if config : | |
46 |
c. |
|
46 | c._merge(config) | |
47 |
|
47 | |||
48 | super(RstExporter, self).__init__(transformers=transformers, |
|
48 | super(RstExporter, self).__init__(transformers=transformers, | |
49 | filters=filters, |
|
49 | filters=filters, |
General Comments 0
You need to be logged in to leave comments.
Login now