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:  Wed Jan 31 23:40:06 2018  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Aug 19 01:23:54 2019, comment #4:

i guess this workaround for <mn> is all that's viable to do for now, closing.

Karl Berry <karl>
Project Administrator
Wed Feb 14 10:28:38 2018, 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
Thu Feb 1 23:41:42 2018, 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
Thu Feb 1 23:19:49 2018, 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
Wed Jan 31 23:40:06 2018, 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):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Aug 19 01:23:54 2019karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray