##// END OF EJS Templates
Merge pull request #3504 from minrk/fixsession...
Merge pull request #3504 from minrk/fixsession don't use parent=self in handlers handlers aren't configurable, so shouldn't be passed as parent. closes #3502

File last commit:

r11089:45d39d22
r11106:94b50386 merge
Show More
sphinx_howto.py
54 lines | 1.8 KiB | text/x-python | PythonLexer
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677 """
Exporter for exporting notebooks to Sphinx 'HowTo' style latex. Latex
formatted for use with PDFLatex.
"""
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
#-----------------------------------------------------------------------------
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677 from IPython.utils.traitlets import Unicode
Bussonnier Matthias
fix non-existing directory
r10880 from IPython.config import Config
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677
Jonathan Frederic
Finished a rough draft of the exporters.
r10588 # local import
Brian E. Granger
Fixing import for nbconvert.
r11089 from .latex import LatexExporter
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677
Brian E. Granger
Fixing import for nbconvert.
r11089 from IPython.nbconvert import transformers
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677
Jonathan Frederic
Finished a rough draft of the exporters.
r10588 #-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
Brian E. Granger
Fixing import for nbconvert.
r11089 class SphinxHowtoExporter(LatexExporter):
Jonathan Frederic
Cleanup and refactor of API, almost complete....
r10677 """
Exports Sphinx "HowTo" LaTeX documents. The Sphinx "HowTo" exporter
produces short document format latex for use with PDFLatex.
"""
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")
Bussonnier Matthias
fix non-existing directory
r10880
Jonathan Frederic
Finished a rough draft of the exporters.
r10588 def _register_transformers(self):
#Register the transformers of the base class.
Jonathan Frederic
Made exporter names match template names.
r10639 super(SphinxHowtoExporter, 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
Brian E. Granger
Fixing import for nbconvert.
r11089 self.register_transformer(transformers.SphinxTransformer)
Matthias BUSSONNIER
fix config inheriting
r10963
@property
def default_config(self):
c = Config({
'SphinxTransformer': {'enabled':True}
})
c.merge(super(SphinxHowtoExporter,self).default_config)
return c
Jonathan Frederic
Finished a rough draft of the exporters.
r10588