Page MenuHomePhabricator

TeX to HTML misplaces <sup> tag
Closed, ResolvedPublic

Description

Author: timwi

Description:
BUG MIGRATED FROM SOURCEFORGE
http://sourceforge.net/tracker/index.php?func=detail&aid=969549&group_id=34373&atid=411192
Originally submitted by Nobody/Anonymous - nobody 2004-06-09 14:16

See
http://meta.wikipedia.org/wiki/MediaWiki_feature_requests_and_bug_reports#TeX_Markup_Bug
about
http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Mathematics#Typesetting_of_mathematical_formulas.

Now e' and -x' are placed properly, but `2' is placed
erroneously. The HTML produced is:

<tbody><tr align="center" valign="bottom">
<td></td>
<td></td>
</tr>
<tr align="center">
<td><font size="+2"></font></td>
<td><i>e</i> <sup>-
<i>x</i></sup>2&nbsp;<i>d</i><i>x</i></td>

</tr>
<tr align="center" valign="top">
<td>0</td>
<td></td>
</tr>
</tbody>

where instead of <sup>, a </sup> is produced before the
`2.'

  • Additional comments ------------------------

Date: 2004-06-09 14:17
Sender: nobody
Logged In: NO

Oops, forgot to include:

bug submitted by Paddu

(http://en.wikipedia.org/wiki/User_talk:Paddu).

Date: 2004-08-07 04:08
Sender: SF user vibber

Put easier to reach sample at:
http://meta.wikimedia.org/wiki/Sandbox/TeX_bits


Version: unspecified
Severity: normal

Details

Reference
bz108

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:44 PM
bzimport added a project: Math.
bzimport set Reference to bz108.
bzimport added a subscriber: Unknown Object (MLST).

rowan.collins wrote:

*** Bug 140 has been marked as a duplicate of this bug. ***

timwi wrote:

It would be really nice if someone could provide a sample TeX input string that
produces the bug. Please don't link to wiki pages because they tend to change.

Created attachment 11
Simplified test case

Here's the TeX bit:
<math>a^{b^c}</math>

As you can see the PNG shows both exponents nicely. But the HTML output is
this:

<span class="texhtml"><i>a</i><sup><i>b</i></sup><i>c</i></span>

The inner exponent isn't <sup>'d. (Rendering tested on meta.wikimedia.org)

Attached:

tex-abc.png (20×27 px, 315 B)

j.niesen wrote:

This seems to be the same as bug 599: texmf transforms

<math>a^{b^c}</math>

to

<i>a</i><sup><i>b</i><sup><i>c</i></sup></sup>

and tidy messes up the nested sup tags, transforming it to

<i>a</i><sup><i>b</i></sup><i>c</i>

If this analysis is correct, then the same fix as in 599 (upgrading tidy) applies.

j.niesen wrote:

*** This bug has been marked as a duplicate of 599 ***