bugtex4ht - Bugs: bug #378, Wrong MathML output for numbers

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #378: Wrong MathML output for numbers

Submitted by:  Michal Hoftich <michal_h21>
Submitted on:  Thu 01 Feb 2018 01:40:06 AM EET  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Wed 14 Feb 2018 12:28:38 PM EET, comment #3:

I've created a new library for make4ht, `make4ht-domfilter`. It can modify the document's DOM using Lua functions. The <mn> as well as <span> issue can be fixed using `joincharacters` filter:

It can be also requested on the command line using

Michal Hoftich <michal_h21>
Project Member
Fri 02 Feb 2018 01:41:42 AM EET, comment #2:

It comes from tex4ht-mathml.tex, line 3149:

\Configure{MathClass}{7}{*}{<\a:mathml mn>}{</\a:mathml mn>}{0123456789}

This configuration creates template that is passed to the DVI file and tex4ht applies it to math class 7. I don't know what \Configure{FormulaClass} does, this whole business is really mysterious to me.

Michal Hoftich <michal_h21>
Project Member
Fri 02 Feb 2018 01:19:49 AM EET, comment #1:

I'm sorry, I don't understand yet. Do you know where the "<mn>" string actually gets emitted? Because "mn" only occurs as a word in a few places anywhere in the *.tex files (and not in tex4ht-c.tex), none of which looks especially relevant to the creation of the <mn>1</mn> to me.

Anyway, in tex4ht-mathltx.tex, there are some \Configure commands for some, but not all, of the numerals, starting around line 2245. Only 0..6 are configured there, and only 4..5 with the "mathltx-" option (whatever that is). What happens with 7..9? Does any of this make sense to you?

I wonder if Eitan provided an option for determining the behavior of the numerals in math mode. So wish he were still here ...

Karl Berry <karl>
Project Administrator
Thu 01 Feb 2018 01:40:06 AM EET, original submission:

User reported on TeX.sx [1] an issue with number handling in the MathML output. The issue is that $14$ produces <mn>1</mn><mn>5</mn> instead of <mn>15</mn>.

The number markup is inserted by tex4ht in the DVI processing stage, so it is necessary to fix this issue in tex4ht-c.tex.

[1] https://tex.stackexchange.com/q/413033/2891

Michal Hoftich <michal_h21>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray