Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (490)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Use "columnwidth" for Cross Formula Alignment
How to align columns cross multiple <mtable> elements?
✍: FYIcenter.com
If you have multiple equations with labels in a page,
and want to align labels cross all equations,
you can use the "columnwidth" attribute in <mtable> tags.
Here is an example:
To simply the following equation:
<math display="inline" displaystyle="normal">
<mtable columnwidth="500px auto" columnspacing="0.1in" columnalign="left">
<mtr>
<mtd><mi>y</mi><mo>=</mo><mfrac>
<mrow> <msup><mi>x</mi><mn>2</mn></msup> <mo>−</mo> <mn>4</mn> </mrow>
<mrow> <mi>x</mi><mo>−</mo><mn>2</mn> </mrow>
</mfrac> </mtd>
<mtd><mtext>(1)</mtext></mtd>
</mtr>
</mtable>
</math>
we can factoring the Numerator first:
<math display="inline" displaystyle="normal">
<mtable columnwidth="500px auto" columnspacing="0.1in" columnalign="left">
<mtr>
<mtd><mi>y</mi><mo>=</mo><mfrac>
<mrow>
<mo>(</mo> <mi>x</mi><mo>+</mo><mn>2</mn> <mo>)</mo> <mo>⁢</mo>
<mo>(</mo> <mi>x</mi><mo>−</mo><mn>2</mn> <mo>)</mo>
</mrow>
<mrow> <mi>x</mi><mo>−</mo><mn>2</mn> </mrow>
</mfrac></mtd>
<mtd><mtext>(2)</mtext></mtd>
</mtr>
</mtable>
</math>
then cancel out the common factor:
<math display="inline" displaystyle="normal">
<mtable columnwidth="500px auto" columnspacing="0.1in" columnalign="left">
<mtr>
<mtd><mi>y</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>2</mn></mtd>
<mtd><mtext>(3)</mtext></mtd>
</mtr>
</mtable>
</math>
The output may not be displayed correctly in some browsers:
To simply the following equation:
we can factoring the Numerator first:
then cancel out the common factor:
But the output in MathJax Live Editor looks good:
By the way, this is a good workaround to replace the <mlabeledtr> element, which is deprecated now.
⇒ Use "mspace" instead of "columnwidth"
⇐ Use "mtable" for Linebreaking and Indentation
2026-10-17, ∼1914🔥, 0💬
Popular Posts:
Why am I getting the "Spawn Failed: Server at http://127.0.0.1:47353/u ser/fyicenter/didn't respond ...
How do I tell what version of Outlook my computer is using? You can determine the version number of ...
How to remove Microsoft Teams form my Windows 7 system? I don't want it any more. You can remove Mic...
Where to find answers to frequently asked questions on Facebook? I want to know how to know how to u...
Where to find answers to frequently asked questions on Microsoft Skype? I want to know how to know h...