Esempio n. 1
0
 def _repr_html_(self):
     # Bit crude. Hide ourselves to the notebook viewer, since we'll
     # have been shown already anyway.
     # Nicer solutions are afaict infeasible.
     return markdown2html(
         '> **Figure (<a name="fig:{label:s}">{label:s}</a>)**: {caption:s}'
         .format(label=self.label, caption=self.caption))
Esempio n. 2
0
 def _repr_html_(self):
     txt = markdown2html(self.data)
     if self._center:
         return '<center>{0}</center>'.format(txt)
     else:
         return '{0}'.format(txt)
Esempio n. 3
0
 def _repr_html_(self):
     return markdown2html(
         '> **Figure (<a name="fig:{label:s}">{label:s}</a>)**: {caption:s}'
         .format(label=self.label,
                 caption=self.caption)) + '\n' + self.data._repr_html_()