答案1
下面的代码似乎有效:
\def\vs#1{\Tg<menclose notation="verticalstrike">#1\Tg</menclose>}
\Css{.array mtd{padding-top: 0em; padding-bottom:0em;}}
\begin{equation}
\begin{pmatrix}
\vs{a+b} & 12 & a+b+c\\
\vs{c-d} & \gamma^2 & 0\\
\vs{a} & \alpha-\beta & abc\\
\vs{c-d} & \psi_n & d\\
\end{pmatrix}
\end{equation}
如果您有一个可以使用的 TeX4ht 版本,您将获得以下 MathML 输出:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"
class="equation">
<mfenced separators="" open="(" close=")">
<mrow>
<mtable style="text-align:axis;" equalrows="false"
columnlines="none none none none none none none none none"
equalcolumns="false" class="array">
<mtr>
<mtd class="array" columnalign="center">
<menclose notation="verticalstrike">
<mi>a</mi>
<mo class="MathClass-bin">+</mo>
<mi>b</mi>
</menclose>
</mtd>
<mtd class="array" columnalign="center">
<mn>1</mn>
<mn>2</mn>
</mtd>
<mtd class="array" columnalign="center">
<mi>a</mi>
<mo class="MathClass-bin">+</mo>
<mi>b</mi>
<mo class="MathClass-bin">+</mo>
<mi>c</mi>
</mtd>
</mtr>
<mtr>
<mtd class="array" columnalign="center">
<menclose notation="verticalstrike">
<mi>c</mi>
<mo class="MathClass-bin">-</mo>
<mi>d</mi>
</menclose>
</mtd>
<mtd class="array" columnalign="center">
<msup>
<mrow>
<mi>γ</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
</mtd>
<mtd class="array" columnalign="center">
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd class="array" columnalign="center">
<menclose notation="verticalstrike">
<mi>a</mi>
</menclose>
</mtd>
<mtd class="array" columnalign="center">
<mi>α</mi>
<mo class="MathClass-bin">-</mo>
<mi>β</mi>
</mtd>
<mtd class="array" columnalign="center">
<mi>a</mi>
<mi>b</mi>
<mi>c</mi>
</mtd>
</mtr>
<mtr>
<mtd class="array" columnalign="center">
<menclose notation="verticalstrike">
<mi>c</mi>
<mo class="MathClass-bin">-</mo>
<mi>d</mi>
</menclose>
</mtd>
<mtd class="array" columnalign="center">
<msub>
<mrow>
<mi>ψ</mi>
</mrow>
<mrow>
<mi>n</mi>
</mrow>
</msub>
</mtd>
<mtd class="array" columnalign="center">
<mi>d</mi>
</mtd>
</mtr>
<mtr>
<mtd class="array" columnalign="center"></mtd>
</mtr>
</mtable>
</mrow>
</mfenced>
</math>
上述 MathML 在 Firefox 中的呈现形式为