[Wikipedia-l] Parsing TeX

Toby Bartels toby+wikipedia-l at math.ucr.edu
Mon Aug 5 06:08:14 UTC 2002


JeLuF wrote in part:

>$\sum_{i=1}$ and $$\sum_{i=1}$$ render to different images in TeX, for
>a good reason: keep lines with inline math as small as possible.
>[[math: ]]-Syntax currently renders everything in $$ ... $$ but displays
>it inline.

I'd rather default to rendering it in $ than rendering it in $$.

>So to get a display-formula you would have to do something like
>:[[math:\sum_{i=1}]]
>which is not realy a display formula, since the HTML generated is a 
><BLOCKQUOTE> and not a <CENTER> of the formula,

There are LaTeX styles that display formulas left justified and indented;
it's no shame if we're one of them.  There is shame in using <blockquote>
for formatting purposes, of course, but that's a long lost battle.

>The namespace "math" makes it easy for the casual reader of the source
>to recognize that the character garbage to follow has something to do
>with mathematical markup. This schema can easily be expanded to provide
>more than just math markup, e.g. something like
>  [[barchart:(1999,37) (2000,45) (2001,60)]]
>which would fit perfectly into [[image:, [[media:, [[math: ...

Interesting ideas, but we do want to keep the simple things easily edited.
[[math:\int_a^b f(x)\,dx]] will look horrid no matter how we encode it,
but [[math:x]] should not.

>This misuse of namespaces does not look very 'wiki'. 
>$ ... $ and $$ ... $$ look more similar to ''...'' and '''...'''.

I don't think that this is a misuse of namespaces at all.
The plan here is to draw up a PNG for each formula,
with some (like [[math:E = mc^2]]) used in several articles,
and this PNG will be a file on the server just like $$.
Why, we can even click the formula to ... I don't know what,
but maybe we'll think of something to do with it someday.

>I just took a look at MathML. May I assume that we are not wanting to write
>MathML to enter formulas instead of something TeXish?

It's worth remembering that MathML was never intended for human consumption.
When it's widely supported, then we can *output* it,
but we don't want to *input* it.


-- Toby Bartels
   <toby+wikipedia-l at math.ucr.edu>



More information about the Wikipedia-l mailing list