LaTeXML
view release on metacpan or search on metacpan
lib/LaTeXML/Post/MathML.pm view on Meta::CPAN
my $cs = $col->getAttribute('colspan');
my $rs = $col->getAttribute('rowspan');
my @cell = filter_row(map { pmml($_) } element_nodes($col));
if ($rs || $cs) { # Note following cells to be omitted from MathML
for (my $i = 0 ; $i < ($cs || 1) ; $i++) {
$spanned[$nc - 1 + $i] = ($rs || 1); } }
push(@cols, ['m:mtd', { ($a && ($a ne 'center')
? (columnalign => $a, class => 'ltx_align_' . $a) : ()),
($c || $cl ? (class => ($c && $cl ? "$c $cl" : $c || $cl)) : ()),
($cs ? (columnspan => $cs) : ()),
($rs ? (rowspan => $rs) : ()) },
@cell]); }
$ncols = $nc if $nc > $ncols;
push(@rows, ['m:mtr', {}, @cols]); }
$rowsep = undef if $nrows < 2;
$colsep = undef if $ncols < 2;
my $result = ['m:mtable', { ($vattach ne 'axis' ? (align => $vattach) : ()),
($rowsep ? (rowspacing => $rowsep) : ()),
($colsep ? (columnspacing => $colsep) : ()),
($width ? (width => $width) : ()),
t/math/sampler.tex view on Meta::CPAN
% m:multiscripts, m:prescripts, m:none
\begin{equation}
{}_p F_q,\qquad
\sideset{_a^b}{^c_d}{\sum}
\end{equation}
\section{Tabular Math}
Some basic tabular math (\mml{mtable}, \mml{mtr}, \mml{mtd});
many combinations of row and column spacing and spans
(\attr{rowspacing}, \attr{columnspacing}, \attr{columnspan}, \attr{rowspan})
are not currently tested.
%m:mtable, @rowspacing, @columnspacing, @width
%m:mtr
%m:mtd, @columnalign, @columnspan, @rowspan
\begin{equation}
\begin{matrix} -1 & 3 \\ 2 & -4 \end{matrix}
,\qquad
\begin{matrix*}[r] -1 & 3 \\ 2 & -4 \end{matrix*}
,\qquad
\begin{Vmatrix} -1 & 3 \\ 2 & -4 \end{Vmatrix}
,\qquad
\begin{Vmatrix*}[r] -1 & 3 \\ 2 & -4 \end{Vmatrix*}
\end{equation}
t/math/sampler.xml view on Meta::CPAN
<section inlist="toc" xml:id="S4">
<tags>
<tag>4</tag>
<tag role="refnum">4</tag>
<tag role="typerefnum">§4</tag>
</tags>
<title><tag close=" ">4</tag>Tabular Math</title>
<para xml:id="S4.p1">
<p>Some basic tabular math (<text font="typewriter">m:mtable</text>, <text font="typewriter">m:mtr</text>, <text font="typewriter">m:mtd</text>);
many combinations of row and column spacing and spans
(<text font="typewriter">@rowspacing</text>, <text font="typewriter">@columnspacing</text>, <text font="typewriter">@columnspan</text>, <text font="typewriter">@rowspan</text>)
are not currently tested.</p>
</para>
<para xml:id="S4.p2">
<equation xml:id="S4.E22">
<tags>
<tag>(22)</tag>
<tag role="refnum">22</tag>
</tags>
<Math mode="display" tex="\begin{matrix}-1&3\\ 2&-4\end{matrix},\qquad\begin{matrix}[r]-1&3\\ 2&-4\end{matrix},\qquad\begin{Vmatrix}-1&3\\ 2&-4\end{Vmatrix},\qquad\begin{Vmatrix}[r]-1&3\\ 2&-4\e...
<XMath>
( run in 0.308 second using v1.01-cache-2.11-cpan-94b05bcf43c )