Display mathematical notation using LaTeX.
- Name:
core/math - Category: text
- API Version: 3
- Block Type: Static (saved in post content)
- Keywords:
equation,formula,latex,mathematics
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
latex |
string |
— | Role: content |
mathML |
string |
— | Source: html. Selector: math |
Supports
Defined via the supports property in block.json.
anchor:truehtml:falsecolor:gradients:true
spacing:margin:truepadding:true
typography:fontSize:true
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:math {"latex":"x = \u005cfrac{-b \u005cpm \u005csqrt{b^2-4ac}}{2a}"} -->
<div class="wp-block-math"><math display="block"><semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}</annotation></semantics></math></div>
<!-- /wp:math -->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.