使用 LaTeX 显示数学符号。
属性
通过块.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
latex | string | — | 来源: text。 选择器: math annotation[encoding="application/x-tex"]。 角色: content |
mathML | string | — | 来源: html。 选择器: math |
支持
通过块.json 中的 supports 属性定义。
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
块标记
这是一个 静态块。标记直接保存在帖子内容中。
<!-- 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 -->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。