Show More
@@ -1,61 +1,61 b'' | |||
|
1 | 1 | """ |
|
2 | 2 | Reveal slide show exporter. |
|
3 | 3 | """ |
|
4 | 4 | #----------------------------------------------------------------------------- |
|
5 | 5 | # Copyright (c) 2013, the IPython Development Team. |
|
6 | 6 | # |
|
7 | 7 | # Distributed under the terms of the Modified BSD License. |
|
8 | 8 | # |
|
9 | 9 | # The full license is in the file COPYING.txt, distributed with this software. |
|
10 | 10 | #----------------------------------------------------------------------------- |
|
11 | 11 | |
|
12 | 12 | #----------------------------------------------------------------------------- |
|
13 | 13 | # Imports |
|
14 | 14 | #----------------------------------------------------------------------------- |
|
15 | 15 | |
|
16 | 16 | from IPython.utils.traitlets import Unicode |
|
17 | 17 | from IPython.config import Config |
|
18 | 18 | |
|
19 | 19 | from .basichtml import BasicHTMLExporter |
|
20 | 20 | from IPython.nbconvert import transformers |
|
21 | 21 | |
|
22 | 22 | #----------------------------------------------------------------------------- |
|
23 | 23 | # Classes |
|
24 | 24 | #----------------------------------------------------------------------------- |
|
25 | 25 | |
|
26 | 26 | class RevealExporter(BasicHTMLExporter): |
|
27 | 27 | """ |
|
28 | 28 | Exports a Reveal slide show (.HTML) which may be rendered in a web browser. |
|
29 | 29 | """ |
|
30 | 30 | |
|
31 | 31 | file_extension = Unicode( |
|
32 | 32 | 'reveal.html', config=True, |
|
33 | 33 | help="Extension of the file that should be written to disk") |
|
34 | 34 | |
|
35 | 35 | template_file = Unicode( |
|
36 | 36 | 'reveal', config=True, |
|
37 | 37 | help="Name of the template file to use") |
|
38 | 38 | |
|
39 | 39 | def _register_transformers(self): |
|
40 | 40 | """ |
|
41 | 41 | Register all of the transformers needed for this exporter. |
|
42 | 42 | """ |
|
43 | 43 | |
|
44 | 44 | #Register the transformers of the base class. |
|
45 | 45 | super(RevealExporter, self)._register_transformers() |
|
46 | 46 | |
|
47 | 47 | #Register reveal help transformer |
|
48 | self.register_transformer(transformers.RevealHelpTransformer, True) | |
|
48 | self.register_transformer(transformers.RevealHelpTransformer, enabled=True) | |
|
49 | 49 | |
|
50 | 50 | @property |
|
51 | 51 | def default_config(self): |
|
52 | 52 | c = Config({ |
|
53 | 53 | 'CSSHTMLHeaderTransformer':{ |
|
54 | 54 | 'enabled':True |
|
55 | 55 | }, |
|
56 | 56 | 'RevealHelpTransformer':{ |
|
57 | 57 | 'enabled':True, |
|
58 | 58 | }, |
|
59 | 59 | }) |
|
60 | 60 | c.merge(super(RevealExporter,self).default_config) |
|
61 | 61 | return c |
@@ -1,45 +1,45 b'' | |||
|
1 | 1 | """ |
|
2 | 2 | Exporter for exporting notebooks to Sphinx 'HowTo' style latex. Latex |
|
3 | 3 | formatted for use with PDFLatex. |
|
4 | 4 | """ |
|
5 | 5 | #----------------------------------------------------------------------------- |
|
6 | 6 | # Copyright (c) 2013, the IPython Development Team. |
|
7 | 7 | # |
|
8 | 8 | # Distributed under the terms of the Modified BSD License. |
|
9 | 9 | # |
|
10 | 10 | # The full license is in the file COPYING.txt, distributed with this software. |
|
11 | 11 | #----------------------------------------------------------------------------- |
|
12 | 12 | |
|
13 | 13 | #----------------------------------------------------------------------------- |
|
14 | 14 | # Imports |
|
15 | 15 | #----------------------------------------------------------------------------- |
|
16 | 16 | |
|
17 | 17 | from IPython.utils.traitlets import Unicode |
|
18 | 18 | from IPython.config import Config |
|
19 | 19 | |
|
20 | 20 | # local import |
|
21 | 21 | from .latex import LatexExporter |
|
22 | 22 | |
|
23 | 23 | from IPython.nbconvert import transformers |
|
24 | 24 | |
|
25 | 25 | #----------------------------------------------------------------------------- |
|
26 | 26 | # Classes |
|
27 | 27 | #----------------------------------------------------------------------------- |
|
28 | 28 | |
|
29 | 29 | class SphinxHowtoExporter(LatexExporter): |
|
30 | 30 | """ |
|
31 | 31 | Exports Sphinx "HowTo" LaTeX documents. The Sphinx "HowTo" exporter |
|
32 | 32 | produces short document format latex for use with PDFLatex. |
|
33 | 33 | """ |
|
34 | 34 | |
|
35 | 35 | template_file = Unicode( |
|
36 | 36 | 'sphinx_howto', config=True, |
|
37 | 37 | help="Name of the template file to use") |
|
38 | 38 | |
|
39 | 39 | def _register_transformers(self): |
|
40 | 40 | |
|
41 | 41 | #Register the transformers of the base class. |
|
42 | 42 | super(SphinxHowtoExporter, self)._register_transformers() |
|
43 | 43 | |
|
44 | 44 | #Register sphinx latex transformer |
|
45 | self.register_transformer(transformers.SphinxTransformer, True) | |
|
45 | self.register_transformer(transformers.SphinxTransformer, enabled=True) |
General Comments 0
You need to be logged in to leave comments.
Login now