{"id":16366416,"date":"2025-12-02T20:00:00","date_gmt":"2025-12-02T20:00:00","guid":{"rendered":"https:\/\/wordpress.org\/documentation\/?post_type=helphub_article&#038;p=16366416"},"modified":"2026-06-08T01:57:27","modified_gmt":"2026-06-08T01:57:27","slug":"math-block","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/math-block\/","title":{"rendered":"Math block"},"content":{"rendered":"\n<p class=\"has-text-align-right has-small-font-size wp-block-paragraph\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/blocks\/\">Go back to the list of Blocks<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Math block lets you display mathematical notation in your content. You can enter formulas using LaTeX or MathML and show them as a standalone block or inline within text. Inline math formatting is also available in rich text fields such as Paragraphs, Headings, Lists, and Table cells.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Requirements<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress 6.9 or later.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Add a Math block<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open a post or page in the editor.<\/li>\n\n\n\n<li>Place your cursor where you want the formula to appear.<\/li>\n\n\n\n<li>Open the Block Inserter (+) in the top toolbar, search for \u201cMath,\u201d and select the Math block.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You can also type <code>\/math<\/code> in the block editor and press Enter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"568\" height=\"243\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-inserter-e1778724596347.png\" alt=\"Math block is highlighted in the modal that appears when typing the command forward slash and &quot;math&quot; in the block editor\" class=\"wp-image-16367770\" style=\"width:363px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-inserter-e1778724596347.png 568w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-inserter-e1778724596347-300x128.png 300w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/figure>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/adding-a-new-block\/\">Read detailed instructions on adding blocks.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enter a formula<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"524\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-equation-e1778728517841.png\" alt=\"Example LaTeX formula\" class=\"wp-image-16367780\" style=\"aspect-ratio:1.6254826254826256;width:541px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-equation-e1778728517841.png 926w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-equation-e1778728517841-300x170.png 300w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-equation-e1778728517841-768x435.png 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><figcaption class=\"wp-element-caption\">Example output of a LaTeX formula using the Math block<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click inside the Math block to edit.<\/li>\n\n\n\n<li>Type or paste your formula using LaTeX (for example, <code>\\frac{a}{b}, E=mc^2, \\int_0^\\infty e^{-x} dx<\/code>) or valid MathML markup.<\/li>\n\n\n\n<li>Exit the block to preview the rendered result in the editor.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Add inline math inside text<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add or select a text block (for example, Paragraph, Heading, List item, or Table cell).<\/li>\n\n\n\n<li>Select the portion of text where the formula should appear.<\/li>\n\n\n\n<li>Use the Inline math formatting option in the text toolbar, then type or paste your LaTeX or MathML. The expression will render inline with your text.<\/li>\n<\/ol>\n\n\n\n\t\t<figure class=\"wp-block-jetpack-videopress jetpack-videopress-player\" style=\"\" >\n\t\t\t<div class=\"jetpack-videopress-player__wrapper\"> <iframe loading=\"lazy\" title=\"VideoPress Video Player\" aria-label=\"VideoPress Video Player\" width=\"500\" height=\"257\" src=\"https:\/\/videopress.com\/embed\/8iY56ms8?cover=1&amp;autoPlay=0&amp;controls=1&amp;loop=0&amp;muted=0&amp;persistVolume=1&amp;playsinline=0&amp;preloadContent=metadata&amp;useAverageColor=1&amp;posterUrl=https%3A%2F%2Fwordpress.org%2Fdocumentation%2Ffiles%2F2026%2F06%2Fmath-block-inline-formula_mp4_hd.original.jpg&amp;hd=0\" frameborder=\"0\" allowfullscreen data-resize-to-parent=\"true\" allow=\"clipboard-write\"><\/iframe><script src='https:\/\/v0.wordpress.com\/js\/next\/videopress-iframe.js?m=1770107250'><\/script><\/div>\n\t\t\t<figcaption><\/figcaption>\n\t\t\t\n\t\t<\/figure>\n\t\t\n\n\n<h2 class=\"wp-block-heading\">Block toolbar<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"398\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-toolbar-editor.png\" alt=\"Math block toolbar including transform, move, and more option controls.\" class=\"wp-image-16367774\" style=\"aspect-ratio:1.623125170439051;width:367px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-toolbar-editor.png 646w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-toolbar-editor-300x185.png 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><figcaption class=\"wp-element-caption\">Math block toolbar<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Each block toolbar comes with different options that let you customize or modify the block in the editor. To view the Math block toolbar, select the block and it will show a list of toolbar options.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Math block has the following options: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transform to<\/li>\n\n\n\n<li>Moving handles<\/li>\n\n\n\n<li>More options<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Transform to<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"514\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-transform-to-1.png\" alt=\"Math block transform dropdown menu showing Columns, Group, and Details blocks.\" class=\"wp-image-16367776\" style=\"aspect-ratio:1.28798751950078;width:368px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-transform-to-1.png 662w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-transform-to-1-300x233.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Transform to tool allows you to convert the Math block into the following blocks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Columns<\/li>\n\n\n\n<li>Group<\/li>\n\n\n\n<li>Details<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Moving handles<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"348\" height=\"122\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-moving-handles.png\" alt=\"\" class=\"wp-image-16367777\" style=\"width:260px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-moving-handles.png 348w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-moving-handles-300x105.png 300w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><figcaption class=\"wp-element-caption\">Move controls in the block toolbar<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To move a Math block, select the block in the editor. Use the Move up or Move down arrows in the block toolbar to move it one position at a time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also click and hold the Drag icon, which looks like six dots, to drag the block to a new location.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a rel=\"noreferrer noopener\" href=\"https:\/\/wordpress.org\/documentation\/article\/moving-blocks\/\" target=\"_blank\">Get more information about moving a block within the editor.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">More options<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These controls give you the option to copy, duplicate, remove, lock, and other standard actions. <\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/more-options\/\">Read about these and other settings.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Block settings <\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"453\" height=\"104\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/block-settings-7-0-1.png\" alt=\"Settings icon highlighted next to the Save\/Publish button in the top toolbar in the block editor.\" class=\"wp-image-16367741\" style=\"aspect-ratio:4.35634400308523;width:423px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/block-settings-7-0-1.png 453w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/block-settings-7-0-1-300x69.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><figcaption class=\"wp-element-caption\">Settings icon in the top toolbar of the editor<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to the block toolbar, each block has specific options in the Settings sidebar on the right side of the editor. To view Math block settings, select the Math block. If the sidebar is closed, click the <strong>Settings button<\/strong> next to the Save\/Publish button in the top toolbar.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"670\" src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations-1024x670.png\" alt=\"\" class=\"wp-image-16367874\" style=\"aspect-ratio:1.528383508431182;width:627px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations-1024x670.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations-300x196.png 300w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations-768x503.png 768w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations-1536x1006.png 1536w, https:\/\/wordpress.org\/documentation\/files\/2025\/12\/math-block-example-customizations.png 1778w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Block settings panel open in the Math block<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of the Math block settings options:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Color<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">With the Color settings, you can customize content in the Math block by applying text and background colors. You can also add gradients as a background color. The color selections vary depending on your active theme.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details, refer to this support article:&nbsp;<a href=\"https:\/\/wordpress.org\/documentation\/article\/colors-settings-overview\/\">Color Settings overview<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Typography<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Typography settings enable you to customize the font size of content in the Math block. For example, you may want to increase the font size of a complex math equation so it&#8217;s more easily readable. <\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details, refer to this support article: <a href=\"https:\/\/wordpress.org\/documentation\/article\/typography-settings-overview\/\">Typography settings overview<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dimensions <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Math block provides dimension settings options to add padding and margin to control the space around the block, and the space between the block and its edges. <\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details, refer to this support article:&nbsp;<a href=\"https:\/\/wordpress.org\/documentation\/article\/dimension-controls-overview\/\">Dimension settings overview<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Borders<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Math block provides border settings options to add border color, width, and radius.&nbsp;<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details, refer to this support article: <a href=\"https:\/\/wordpress.org\/documentation\/article\/border-settings-overview\/\">Border &amp; Shadow settings overview<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Math block provides the following Advanced settings options: HTML Anchor, Additional CSS Class(es), and Styles.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/advanced-settings-overview\/\">Learn more about advanced settings<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Demo<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"2160\" style=\"aspect-ratio: 3840 \/ 2160;\" width=\"3840\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2025\/11\/6-9-math-i3.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use block display for large equations or multi-line expressions; use inline display for short formulas inside sentences.<\/li>\n\n\n\n<li>Keep LaTeX simple and standard. Complex packages or custom macros may not be supported.<\/li>\n\n\n\n<li>Prefer MathML output for improved accessibility where possible; include explanatory text nearby for readers using assistive technologies.<\/li>\n\n\n\n<li>Save commonly used formulas as Patterns to reuse across posts.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Which syntax should I use?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">LaTeX is often easiest to type; MathML is a web standard that supports accessibility. The block supports both.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can I number equations or add references?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress doesn\u2019t include built-in equation numbering. You can add labels in surrounding text or use patterns to keep numbering consistent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can I use inline math everywhere text appears?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inline math works in most rich text fields, including Paragraphs, Headings, Lists, and Table cells.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>My formula isn\u2019t rendering:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check for typos or unmatched braces in LaTeX.<\/li>\n\n\n\n<li>If using MathML, ensure tags are valid and properly nested.<\/li>\n\n\n\n<li>Switch the input format in settings to match what you typed (LaTeX or MathML).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Characters are being escaped or removed:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Paste plain text (not rich text) to avoid hidden formatting.<\/li>\n\n\n\n<li>In MathML, angle brackets and entity references must be valid HTML; ensure your content isn\u2019t stripped by another plugin.<\/li>\n<\/ul>\n\n\n\n<div id=\"changelog\" class=\"wp-block-group changelog has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#dce5ec;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<h2 class=\"wp-block-heading has-medium-font-size\">Changelog<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Updated 2026-05-24 (props to @awetz583 @kjoyner)\n<ul class=\"wp-block-list\">\n<li>Updated &#8220;Advanced&#8221; section to refer to new overview&nbsp;page<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2026-05-19 (props to @ellatrix @joen)\n<ul class=\"wp-block-list\">\n<li>Updated screenshots and refactored Block Settings section for WordPress 7.0 changes.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2026-05-13 (props to @awetz583 @aialvi)\n<ul class=\"wp-block-list\">\n<li>Added links to list of blocks, instructions on adding blocks, moving blocks, and more options settings.<\/li>\n\n\n\n<li>Added screenshots for a LaTeX formula example, block toolbar options, transform to options, and moving handles.<\/li>\n\n\n\n<li>Added video of how to add inline Math equations in the Paragraph block<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Created 2025-12-02 <\/li>\n<\/ul>\n<\/div>\n\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Go back to the list of Blocks The Math block lets you display mathematical notation in your content. You can enter formulas using LaTeX or MathML and show them as a standalone block or inline within text. Inline math formatting is also available in rich text fields such as Paragraphs, Headings, Lists, and Table cells. [&hellip;]<\/p>\n","protected":false},"author":13782018,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false},"category":[80,85],"class_list":["post-16366416","helphub_article","type-helphub_article","status-publish","hentry","category-customization","category-text-blocks"],"revision_note":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/16366416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles"}],"about":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/types\/helphub_article"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/users\/13782018"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/comments?post=16366416"}],"version-history":[{"count":29,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/16366416\/revisions"}],"predecessor-version":[{"id":16368825,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/16366416\/revisions\/16368825"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/media?parent=16366416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/category?post=16366416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}