bugtex4ht - Bugs: bug #226, Spurious elements in mathml output...

 
 
Show feedback again

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

bug #226: Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc

Submitted by:  Michal Hoftich <michal_h21>
Submitted on:  Thu 31 Jul 2014 08:49:24 PM EEST  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sat 14 Feb 2015 02:39:39 AM EET, comment #4:

Installed patch, thanks as always, but leaving open since other issues remain (I believe).

Karl Berry <karl>
Project Administrator
Wed 11 Feb 2015 04:49:44 PM EET, comment #3:

Here is a patch to output `<mi mathvariant="...">`.

(file #195)

Michal Hoftich <michal_h21>
Project Member
Wed 04 Feb 2015 02:29:40 AM EET, comment #2:

for the record, further discussion in the thread starting at http://tug.org/pipermail/tex4ht/2014q3/001002.html.

Karl Berry <karl>
Project Administrator
Tue 05 Aug 2014 01:48:18 AM EEST, comment #1:

hi michal - i see \\pausemathclass is used in a number of places in the sources. i have no particular insight into why eitan removed it for \mathit, etc. (if i'm understanding your note correctly). i think we should try making the change, unless CVR chimes in with some reason not to.

thanks,
k

Karl Berry <karl>
Project Administrator
Thu 31 Jul 2014 08:49:24 PM EEST, original submission:

As was pointed out by David Carlisle, there are spurious `<mi>` elements in the output of $\mathit{hello }\mathbf{world}$ when converted to mathml:

<math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mstyle mathvariant="italic"><mi

>h</mi><mi
>e</mi><mi
>l</mi><mi
>l</mi><mi
>o</mi></mstyle>...


it should be

<mstyle mathvariant="italic">hello</mstyle>

configuration of these commands is as follows:

\Configure{mathit}%
{\bgroup \Tg<\a:mathml mstyle mathvariant="\ifx
\bold:version\math@version bold-\fi italic">}%
{\Tg</\a:mathml mstyle>\egroup }%

I've found that generation of these spurious `<mi>` elements can be suppressed with `\PauseMathClass` command. There is Eitan's comment in tex4ht-mathml.tex:

-----------
Used to be

\begin{verbatim}
\Configure{mathrm}{\Tg<\a:mathml mi \mml:class="mathrm">\PauseMathClass}%
{\EndPauseMathClass\Tg</\a:mathml mi>}%
\Configure{mathbf}{\Tg<\a:mathml mi \mml:class="mathbf"
mathvariant="bold">\PauseMathClass}%
{\EndPauseMathClass\Tg</\a:mathml mi>}%
\end{verbatim}
------------

so it seems that `\PauseMathClass` was used in the past, but for some reason it is not now.

I created config file with `\PauseMathClass` in configuration of `\math...` commands, which converts example correctly to:

------------
<math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mstyle mathvariant="italic">hello</mstyle><mstyle mathvariant="bold">world</mstyle></math>
------------

If no issues are found and we don't find why `\PauseMathChar` isn't used in the configurations, when it was used in the past, I will make patch for the literary sources.

Michal Hoftich <michal_h21>
Project Member

 

Attached Files
file #195:  mathml.patch added by michal_h21 (2kB - text/x-patch)
file #179:  pause.cfg added by michal_h21 (879B - application/octet-stream)

 

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):

     

     

    5 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 14 Feb 2015 02:39:39 AM EETkarlSummarySpurious elements in mathml output of \\mathit, \\mathrm, \\mathbf etc=>Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc
    Wed 11 Feb 2015 04:49:44 PM EETmichal_h21Attached File-=>Added mathml.patch, #195
    Wed 04 Feb 2015 02:29:40 AM EETkarlSummarySpurious elements in mathml output of \\mathit, \\mathrm, \\mathbf etc=>Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc
    Tue 05 Aug 2014 01:48:18 AM EESTkarlSummarySpurious elements in mathml output of \\mathit, \\mathrm, \\mathbf etc=>Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc
    Thu 31 Jul 2014 08:49:24 PM EESTmichal_h21Attached File-=>Added pause.cfg, #179
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray