r""" Args: formula: The formula to embed, using LaTeX format (use raw strings) caption: A caption to display below the Formula (optional) name: A unique name for the block to reference when adding text or embedding (optional) label: A label use
(self, formula: str, caption: str = None, name: BlockId = None, label: str = None)
| 155 | _tag = "Formula" |
| 156 | |
| 157 | def __init__(self, formula: str, caption: str = None, name: BlockId = None, label: str = None): |
| 158 | r""" |
| 159 | Args: |
| 160 | formula: The formula to embed, using LaTeX format (use raw strings) |
| 161 | caption: A caption to display below the Formula (optional) |
| 162 | name: A unique name for the block to reference when adding text or embedding (optional) |
| 163 | label: A label used when displaying the block (optional) |
| 164 | |
| 165 | !!! note |
| 166 | LaTeX commonly uses special characters, hence prefix your formulas with `r` to make them raw strings, e.g. `r"\frac{1}{\sqrt{x^2 + 1}}"` |
| 167 | |
| 168 | Under the hood we use MathJAX to render the equations in the browser and not a full TeX engine. This means that some of your TeX input may not be rendered correctly on our system - read the MathJAX documentation for more info. |
| 169 | """ |
| 170 | super().__init__(content=formula, caption=caption, name=name, label=label) |
| 171 | |
| 172 | |
| 173 | class Embed(EmbeddedTextBlock): |