bugtex4ht - Bugs: bug #219, tex4ht mathml invalid text-align...

 
 
Show feedback again

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

bug #219: tex4ht mathml invalid text-align css attribute value

Submitted by:  Chris Horler <chorler>
Submitted on:  Mon Jun 23 23:01:32 2014  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri Jun 27 01:09:29 2014, comment #4:

hi chris - thanks for doing all the work. i installed the patch and updated the tex4ht and tex live repositories.

the | is set to be an escape character (catcode 0) in that context. (in other places, ` is an escape.) all unnecessarily arcane as far as i can tell, but that's how it appears to be.

karl

Karl Berry <karl>
Project Administrator
Thu Jun 26 17:53:20 2014, comment #3:

I've added a patch, I've tested what I believe to be the equivalent changes on my installed system (successfully) - but I haven't built the SVN tree to know if the patch is valid (I'm not exactly sure what the pipe symbol means in the patched area of code, so I left it in place)

Chris Horler <chorler>
Wed Jun 25 22:56:45 2014, comment #2:

Having investigated a bit and read Michals email and devised a new test case - see new attachment. The quickest fix appears to be the following:

replace
{t}{\ifmathltx \HCode{ style="text-align:top;" }\fi}
{b}{\ifmathltx \HCode{ style="text-align:baseline;" }\fi}
{c}{\ifmathltx \HCode{ style="text-align:axis;" }\fi}
with
{t}{\ifmathltx \HCode{ align="baseline 1" }\fi}
{b}{\ifmathltx \HCode{ align="baseline -1" }\fi}
{c}{\ifmathltx \HCode{ align="axis" }\fi}

tested in Firefox 30, the result is comparible to what is produced by PDFLatex - baselines of text appear to be aligned the same.

Chris Horler <chorler>
Mon Jun 23 23:26:25 2014, comment #1:

thanks for the report. any suggestions on what should be used instead of text-align:axis nowadays? or just delete it? this should be trivial to change once we figure out what to do.

Karl Berry <karl>
Project Administrator
Mon Jun 23 23:01:32 2014, original submission:

using the command (as per guidelines on the website for producing html/mathml output)

chorler@linux-foxtrot:~/tex4ht-text-align> htlatex tftalign.tex "xhtml,mathml,mozilla" -cmozhtf -cvalidate

the resulting html / xml file has elements within with style attribute css of "text-align:axis;"

The W3 CSS validator reports this as an invalid value for text-align (and I confirmed this by checking the spec and various mailing list archives).

I'm attaching a simple example latex file that exhibits the problem (cut down from a much larger document with several occurences of the problem, I can upload this on request).

The two files of interest in the distribution appear to be:

chorler@linux-foxtrot:~/tex4ht-text-align> rpm -ql texlive-tex4ht | xargs -I {} grep -l 'text-align:axis' {}
/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht
/usr/share/texmf/tex/generic/tex4ht/mathltx.4ht

chorler@linux-foxtrot:~/tex4ht-text-align> grep -n 'text-align:axis' /usr/share/texmf/tex/generic/tex4ht/html-mml.4ht /usr/share/texmf/tex/generic/tex4ht/mathltx.4ht
/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht:96: {c}{\ifmathml \HCode{ style="text-align:axis;\border:lines
/usr/share/texmf/tex/generic/tex4ht/mathltx.4ht:151: {c}{\ifmathltx \HCode{ style="text-align:axis;" }\fi}
chorler@linux-foxtrot:~/tex4ht-text-align>

Chris Horler <chorler>

 

Attached Files
file #172:  svn-mathml-align-fix.diff added by chorler (1kB - text/x-patch - SVN diff (untested))
file #171:  tftalign_v2.tex added by chorler (944B - text/x-tex - more clearly demonstrates the required behaviour)
file #169:  tftalign.tex added by chorler (489B - text/x-tex)
file #170:  tftalign.xml added by chorler (3kB - text/xml)

 

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 chorler (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
    Fri Jun 27 01:09:29 2014karlOpen/ClosedOpen=>Closed
    Thu Jun 26 17:50:12 2014chorlerAttached File-=>Added svn-mathml-align-fix.diff, #172
    Wed Jun 25 22:39:45 2014chorlerAttached File-=>Added tftalign_v2.tex, #171
    Mon Jun 23 23:01:32 2014chorlerAttached File-=>Added tftalign.tex, #169
      Attached File-=>Added tftalign.xml, #170
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray