Show More
@@ -73,6 +73,13 b' class LatexExporter(exporter.Exporter):' | |||||
73 |
|
73 | |||
74 | #Extension that the template files use. |
|
74 | #Extension that the template files use. | |
75 | template_extension = Unicode(".tplx", config=True) |
|
75 | template_extension = Unicode(".tplx", config=True) | |
|
76 | ||||
|
77 | _default_config = Config({ | |||
|
78 | 'ExtractFigureTransformer' : { | |||
|
79 | 'display_data_priority' : ['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text'], | |||
|
80 | 'extra_ext_map':{'svg':'pdf'} | |||
|
81 | } | |||
|
82 | }) | |||
76 |
|
83 | |||
77 | def __init__(self, transformers=None, filters=None, config=None, **kw): |
|
84 | def __init__(self, transformers=None, filters=None, config=None, **kw): | |
78 | """ |
|
85 | """ | |
@@ -82,7 +89,7 b' class LatexExporter(exporter.Exporter):' | |||||
82 | ---------- |
|
89 | ---------- | |
83 | transformers : list[of transformer] |
|
90 | transformers : list[of transformer] | |
84 | Custom transformers to apply to the notebook prior to engaging |
|
91 | Custom transformers to apply to the notebook prior to engaging | |
85 |
the Jinja template engine. Any transformers specified here |
|
92 | the Jinja template engine. Any transformers specified here | |
86 | will override existing transformers if a naming conflict |
|
93 | will override existing transformers if a naming conflict | |
87 | occurs. |
|
94 | occurs. | |
88 | filters : list[of filter] |
|
95 | filters : list[of filter] | |
@@ -94,9 +101,13 b' class LatexExporter(exporter.Exporter):' | |||||
94 | """ |
|
101 | """ | |
95 |
|
102 | |||
96 | #Call base class constructor. |
|
103 | #Call base class constructor. | |
97 | super(LatexExporter, self).__init__(transformers, filters, config, **kw) |
|
104 | ||
|
105 | c = self.default_config | |||
|
106 | if config : | |||
|
107 | c.update(config) | |||
|
108 | ||||
|
109 | super(LatexExporter, self).__init__(transformers, filters, config=c, **kw) | |||
98 |
|
110 | |||
99 | self.extract_figure_transformer.display_data_priority = ['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text'] |
|
|||
100 | self.extract_figure_transformer.extra_ext_map={'svg':'pdf'} |
|
111 | self.extract_figure_transformer.extra_ext_map={'svg':'pdf'} | |
101 |
|
112 | |||
102 |
|
113 | |||
@@ -123,4 +134,4 b' class LatexExporter(exporter.Exporter):' | |||||
123 |
|
134 | |||
124 | #Register latex transformer |
|
135 | #Register latex transformer | |
125 | self.register_transformer(LatexTransformer) |
|
136 | self.register_transformer(LatexTransformer) | |
126 | No newline at end of file |
|
137 |
General Comments 0
You need to be logged in to leave comments.
Login now