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 |
— | Source: text. Selector: math annotation[encoding="application/x-tex"]. Role: content |
mathML |
string |
— | Source: html. Selector: math |
Supports
Defined via the supports property in block.json.
anchor:truehtml:falsebackground:backgroundImage:truebackgroundSize:truegradient:true
color:gradients:true
dimensions:minHeight:trueminWidth:true
shadow:truespacing:margin:truepadding:true
typography:fontSize:true
interactivity:clientNavigation:true
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:math -->
<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 the
editandsavesource files,index.php, and more.