##// END OF EJS Templates
Merge pull request #5694 from jgoppert/latex-eq-fit...
Merge pull request #5694 from jgoppert/latex-eq-fit Limit latex equations to page width for nbconvert.

File last commit:

r16847:973a2f6d
r17401:9443f6a9 merge
Show More
notebook.py
21 lines | 640 B | text/x-python | PythonLexer
Jonathan Frederic
Address final comments
r16847 """NotebookExporter class"""
Julia Evans
Add IPython Notebook exporter
r16822
Julia Evans
Use new license
r16823 # Copyright (c) IPython Development Team.
Julia Evans
Add IPython Notebook exporter
r16822 # Distributed under the terms of the Modified BSD License.
from .exporter import Exporter
from IPython.nbformat import current as nbformat
class NotebookExporter(Exporter):
"""
Exports an IPython notebook.
"""
def _file_extension_default(self):
return 'ipynb'
output_mimetype = 'application/json'
def from_notebook_node(self, nb, resources=None, **kw):
nb_copy, resources = super(NotebookExporter, self).from_notebook_node(nb, resources, **kw)
output = nbformat.writes_json(nb_copy)
return output, resources