text#

Text-related models

class Ascii(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Render mathematical content using AsciiMath notation.

class MathML(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Render mathematical content using MathML notation.

See Mathematical notation in the user guide for more information.

class MathText(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Base class for renderers of mathematical content.

Note

This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

class PlainText(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Represents plain text in contexts where text parsing is allowed.

class TeX(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Render mathematical content using LaTeX notation.

See Mathematical notation in the user guide for more information.

Note

Bokeh uses MathJax to render text containing mathematical notation.

MathJax only supports math-mode macros (no text-mode macros). You can see more about differences between standard TeX/LaTeX and MathJax here: https://docs.mathjax.org/en/latest/input/tex/differences.html

inline#

Whether the math text is inline display or not (for TeX input). Default is False.

macros#

User defined TeX macros.

This is a mapping from control sequence names (without leading backslash) to either replacement strings or tuples of a replacement string and a number of arguments.

Example:

TeX(text=r"\R \rightarrow \R^2", macros={"RR": r"{\bf R}"})