On 5/5/2013 6:40 PM, Benoit Jacob wrote:
Well, I have written hundreds of pages of TeX; for sure, some large
equations would expand over more than one line of TeX, but I can't remember
going over more than 5 lines of TeX source (without custom helper macros)
per actual line of output, that that would be a really unusual case ---
while the MathML example above has a ratio of 30 source lines to 1 output
line.
For what it's worth, to compare the TeX to that MathML properly, you'd
have to count, e.g., \frac{a}{b} as three lines:
\frac
{a}
{b}
An example I have of several lines of TeX-per-output-line is the
following (some Big-Step semantics rules):
\frac{\langle b,\sigma\rangle \Downarrow \mathtt{true}\quad
\langle \text{$s$ while ($b$) $s$},\sigma\rangle\Downarrow
\langle t, \sigma_1\rangle}
{\langle \text{while ($b$) $s$},\sigma\rangle \Downarrow
\langle t, \sigma_1\rangle}
The rendered output of this would be (hopefully the MathML makes it
through):
〈 b , σ 〉 ⇓ true 〈 s while (b) s , σ 〉 ⇓ 〈 t , σ 1 〉 〈 while (b) s , σ 〉
⇓ 〈 t , σ 1 〉
Entering one of the lines in MathML in a more compact representation
comes out to:
<mo>〈</mo><mtext>while (<mi>b</mi>)
<mi>s</mi></mtext><mo>,</mo><mi>σ</mi><mo>〉</mo><mo>⇓</mo
So it's not a factor of 30-to-1 in verbosity, more like a factor of
2-to-1 or 3-to-1. Certainly the same order of magnitude. You might argue
that I'm cheating by using Unicode characters instead of entities, but
the LaTeX-to-MathML conversion tools I've seen all output UTF-8, and
UTF-8 is generally much more well supported by browsers than in TeX
processors, so it's not an unrealistic assumption for how the text looks.
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform