anchors and tooltips for sections with math in titles
Status: Beta
Brought to you by:
worden
When a section heading includes some math, for instance
== The $$\phi=0$$ case ==
WW displays the math correctly in the heading itself, and in its entry in the page's table of contents. It leaves its internal token "UNIQ-WW-...-QINU" in the name of the HTML anchor and in the tooltip that appears when you hover over the edit link for the section. This is because those strings are stored as attributes in HTML tags - something like
<span id="The UNIQ-WW-84374873-QINU case">...</span> -
and you can't put a bunch of MathML markup in there without breaking the page. But this is unsightly and confusing (though the anchors do work). It should do something better.
Anonymous
It would be great to put the original wikitext there, like
(with appropriate escaping, of course).
I guess this would be a matter of sorting out what the parser makes the id and mw:editsection from, and doing something smart around replace_inlines() to get the un-expanded code in there, exempt from the transformation from $$...$$ to <source-file filename="ww-internal-whatever.tex" standalone=true>...</source-file>.
I wonder what the Math extension does about this?
Since it only implements the <math>...</math> construct, maybe you just can't use it in section headings...
From another ticket:
Last edit: Lee Worden 2013-03-08
Maybe I could get replace_inlines() to run a bit later, like after the parser makes the anchors and mw:editsections, and do the expansion only in the appropriate places...