diff --git a/nbconvert.py b/nbconvert.py
index 8ff6fb6..3b34a98 100755
--- a/nbconvert.py
+++ b/nbconvert.py
@@ -532,33 +532,21 @@ class ConverterRST(Converter):
def _unknown_lines(self, data):
return rst_directive('.. warning:: Unknown cell') + [data]
+ @DocInherit
def render_display_format_html(self, output):
- """render the html part of an output
-
- Returns list.
- """
return rst_directive('.. raw:: html', output.html)
+ @DocInherit
def render_display_format_latex(self, output):
- """render the latex part of an output
-
- Returns list.
- """
return rst_directive('.. math::', output.latex)
+ @DocInherit
def render_display_format_json(self, output):
- """render the json part of an output
-
- Returns list.
- """
return rst_directive('.. raw:: json', output.json)
+ @DocInherit
def render_display_format_javascript(self, output):
- """render the javascript part of an output
-
- Returns list.
- """
return rst_directive('.. raw:: javascript', output.javascript)
@@ -663,33 +651,20 @@ class ConverterMarkdown(Converter):
def _unknown_lines(self, data):
return ['Warning: Unknown cell', data]
+ @DocInherit
def render_display_format_html(self, output):
- """render the html part of an output
-
- Returns list.
- """
return [output.html]
+ @DocInherit
def render_display_format_latex(self, output):
- """render the latex part of an output
-
- Returns list.
- """
return ['LaTeX::', indent(output.latex)]
+ @DocInherit
def render_display_format_json(self, output):
- """render the json part of an output
-
- Returns list.
- """
return ['JSON:', indent(output.json)]
-
+ @DocInherit
def render_display_format_javascript(self, output):
- """render the javascript part of an output
-
- Returns list.
- """
return ['JavaScript:', indent(output.javascript)]
@@ -888,62 +863,38 @@ class ConverterHTML(Converter):
return ['
Warning:: Unknown cell
'] + self.in_tag('pre', data)
+ @DocInherit
def render_display_format_png(self, output):
- """render the png part of an output
-
- Returns list.
- """
return ['
' % output.png]
+ @DocInherit
def render_display_format_svg(self, output):
- """render the svg part of an output
-
- Returns list.
- """
return [output.svg]
+ @DocInherit
def render_display_format_jpeg(self, output):
- """render the jpeg part of an output
-
- Returns list.
- """
return ['
' % output.jpeg]
+ @DocInherit
def render_display_format_text(self, output):
- """render the text part of an output
-
- Returns list.
- """
return self._ansi_colored(output.text)
+ @DocInherit
def render_display_format_html(self, output):
- """render the html part of an output
-
- Returns list.
- """
return [output.html]
+ @DocInherit
def render_display_format_latex(self, output):
- """render the latex part of an output
-
- Returns list.
- """
return [output.latex]
+ @DocInherit
def render_display_format_json(self, output):
- """render the json part of an output
-
- Returns [].
- """
# html ignores json
return []
+ @DocInherit
def render_display_format_javascript(self, output):
- """render the javascript part of an output
-
- Returns list.
- """
return [output.javascript]
@@ -1120,36 +1071,24 @@ class ConverterLaTeX(Converter):
return lines
+ @DocInherit
def render_display_format_html(self, output):
- """render the html part of an output
-
- Returns [].
- """
return []
+ @DocInherit
def render_display_format_latex(self, output):
- """render the latex part of an output
-
- Returns list.
- """
if type(output.latex) == type([]):
return output.latex
return [output.latex]
+ @DocInherit
def render_display_format_json(self, output):
- """render the json part of an output
-
- Returns [].
- """
# latex ignores json
return []
+ @DocInherit
def render_display_format_javascript(self, output):
- """render the javascript part of an output
-
- Returns [].
- """
# latex ignores javascript
return []
@@ -1225,33 +1164,21 @@ class ConverterNotebook(Converter):
def render_display_format_text(self, output):
return [output.text]
+ @DocInherit
def render_display_format_html(self, output):
- """render the html part of an output
-
- Returns [].
- """
return [output.html]
+ @DocInherit
def render_display_format_latex(self, output):
- """render the latex part of an output
-
- Returns list.
- """
return [output.latex]
+ @DocInherit
def render_display_format_json(self, output):
- """render the json part of an output
-
- Returns [].
- """
return [output.json]
+ @DocInherit
def render_display_format_javascript(self, output):
- """render the javascript part of an output
-
- Returns [].
- """
return [output.javascript]
#-----------------------------------------------------------------------------