##// END OF EJS Templates
Change hardcoded functions to use reflection instead.
Change hardcoded functions to use reflection instead.

File last commit:

r10630:d5a4e2e2
r10633:183c8cfe
Show More
sphinx.py
34 lines | 1.3 KiB | text/x-python | PythonLexer
Jonathan Frederic
Finished a rough draft of the exporters.
r10588
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# local import
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 import latex
from IPython.utils.traitlets import Unicode
Jonathan Frederic
Got RST exporting to work... Sort of.
r10626 from nbconvert.transformers.sphinx import SphinxTransformer
Jonathan Frederic
Finished a rough draft of the exporters.
r10588 #-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 class SphinxExporter(latex.LatexExporter):
Jonathan Frederic
Finished a rough draft of the exporters.
r10588
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 template_file = Unicode(
Jonathan Frederic
Almost have nbconvert working again...
r10630 'sphinx_howto', config=True,
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 help="Name of the template file to use")
Jonathan Frederic
Finished a rough draft of the exporters.
r10588
def _register_transformers(self):
#Register the transformers of the base class.
Jonathan Frederic
Almost have nbconvert working again...
r10630 super(SphinxExporter, self)._register_transformers()
Jonathan Frederic
Finished a rough draft of the exporters.
r10588
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 #Register sphinx latex transformer
self.register_transformer(SphinxTransformer)
Jonathan Frederic
Finished a rough draft of the exporters.
r10588