LaTeX#
This component is also available in the classic reference.
The LaTeX pane allows rendering LaTeX equations. It uses either KaTeX or MathJax depending on the defined renderer.
Use pn.ui.LaTeX to create this component.
API#
.. py:class:: LaTeX(object=None, **params) :module: panel.pane.equation
The LaTeX pane allows rendering LaTeX equations. It uses either
KaTeX or MathJax depending on the defined renderer.
By default it will use the renderer loaded in the extension
(e.g. pn.extension('katex')), defaulting to KaTeX if both are loaded.
Reference: https://panel.holoviz.org/reference/panes/LaTeX.html
:Example:
pn.extension(‘katex’) LaTeX( … ‘The LaTeX pane supports two delimiters: $LaTeX$ and (LaTeX)’, … styles={‘font-size’: ‘18pt’}, width=800 … )
:Attributes:
**priority**
..
**renderer**
..
.. rubric:: Methods
.. autosummary::
applies
.. !! processed by numpydoc !!
Parameter Definitions
Parameters inherited from:
:class:`panel.viewable.Layoutable`: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visible
:class:`panel.viewable.Viewable`: loading
:class:`panel.pane.base.PaneBase`: margin, default_layout, object
renderer = Selector(allow_None=True, label='Renderer', names={}, objects=['katex', 'mathjax'])
The JS renderer used to render the LaTeX expression. Defaults to katex.
.. py:method:: LaTeX.applies(object: ~typing.Any) -> float | bool | None :module: panel.pane.equation :classmethod:
Returns boolean or float indicating whether the Pane
can render the object.
If the priority of the pane is set to
`None`, this method may also be used to define a float priority
depending on the object being rendered.
..
!! processed by numpydoc !!
.. py:attribute:: LaTeX.priority :module: panel.pane.equation :type: t.ClassVar[float | bool | None] :value: None