MCPcopy Create free account
hub / github.com/ipython/ipython / LatexFormatter

Class LatexFormatter

IPython/core/formatters.py:791–805  ·  view source on GitHub ↗

A LaTeX formatter. To define the callables that compute the LaTeX representation of your objects, define a :meth:`_repr_latex_` method or use the :meth:`for_type` or :meth:`for_type_by_name` methods to register functions that handle this. The return value of this formatter shou

Source from the content-addressed store, hash-verified

789
790
791class LatexFormatter(BaseFormatter):
792 """A LaTeX formatter.
793
794 To define the callables that compute the LaTeX representation of your
795 objects, define a :meth:`_repr_latex_` method or use the :meth:`for_type`
796 or :meth:`for_type_by_name` methods to register functions that handle
797 this.
798
799 The return value of this formatter should be a valid LaTeX equation,
800 enclosed in either ```$```, ```$$``` or another LaTeX equation
801 environment.
802 """
803 format_type = Unicode('text/latex')
804
805 print_method = ObjectName('_repr_latex_')
806
807
808class JSONFormatter(BaseFormatter):

Callers 1

_repr_latex_Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected