使用 LaTeX 显示数学符号。

  • 名称: core/math
  • 类别: 文本
  • API 版本: 3
  • 块类型: 静态(保存在帖子内容中)
  • 关键词: equation, formula, latex, mathematics

属性

通过块.json 中的 attributes 属性定义。

属性类型默认值描述
latexstring—来源: text。 选择器: math annotation[encoding="application/x-tex"]。 角色: content
mathMLstring—来源: html。 选择器: math

支持

通过块.json 中的 supports 属性定义。

块标记

这是一个 静态块。标记直接保存在帖子内容中。

<!-- 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 -->

来源