bugtex4ht - Bugs: bug #496, Sub- and sup-scripts do not work

 
 
Show feedback again

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

bug #496: Sub- and sup-scripts do not work

Submitted by:  Matteo <matteo88>
Submitted on:  Thu Dec 31 17:07:00 2020  
 
Category: NonePriority: 5 - Normal
Severity: 8 - BlockerStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Fri Jan 8 12:17:33 2021, comment #6:

That's great! I will close this issue now.

Best regards,
Michal

Michal Hoftich <michal_h21>
Project Member
Fri Jan 8 12:01:00 2021, comment #5:

Thank you very much! I confirm that sub- and sup-scripts work again as expected now!
I think the bug can be closed. Should I do it? If so, how?
Thank you again,
Matteo

Matteo <matteo88>
Sat Jan 2 11:03:47 2021, comment #4:

I've found what the issue was. When \AtBeginDocument was used in .4ht files, the TeX4ht hooks that are executed at this moment were executed twice. It should be fixed in the sources now.

Michal Hoftich <michal_h21>
Project Member
Sat Jan 2 00:24:01 2021, comment #3:

I can already say that this issue happens to all .4ht files that use \AtBeginDocument, for example Biblatex. It is necessary to change it to \Configure{AtBeginDocument}{code}{}.

Michal Hoftich <michal_h21>
Project Member
Sat Jan 2 00:08:39 2021, comment #2:

This was really complicated issue. I am not sure that I fixed it completely. \AtBeginDocument command is not available at the moment when .4ht files are processed anymore. It seems that every time it is used, it causes loss of sub and superscripts. I haven't found why, maybe later.

For now, I've fixed this issue for Hyperref, so it compiles correctly for your document.

Michal Hoftich <michal_h21>
Project Member
Thu Dec 31 19:58:42 2020, comment #1:

Hi Matteo,

I've found that the issue is caused by the Hyperref packages (and Bookmark, which loads Hyperref). I will look at this issue later this week.

In the meantime, you can disable the offending packages with TeX4ht, as they are not that useful in HTML anyway. Put this into your document preamble:

\ifdefined\HCode\else
\usepackage{bookmark}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=[rgb]{1,0,0}}
\fi

It will use these packages only in the PDF mode.

BTW, you can use make4ht instead of htlatex, because it fixes some issues in MathML that are not possible to fix in the LaTeX backend:

make4ht -c mi.cfg sub-sup.tex

Michal Hoftich <michal_h21>
Project Member
Thu Dec 31 17:07:00 2020, original submission:

Hi all,

Today I updated my texlive 2020 installation and I compiled a LaTeX document to HTML discovering that all subscripts and all supscripts in math where broken, in the sense that were on the same line as the base.

My system is configured to store 1 backup version of texlive packages, so I restore tex4ht to the version I had available:

tlmgr restore tex4ht 57127

I compiled the documents again and sub-/sup- script are working again.
I use the following command to compile

htlatex "sub-sup.tex" "mi" " -cunihtf" " -cvalidate" "-halt-on-error -interaction=nonstopmode"

I am attaching the LaTeX example file and the configuration file.

With latest version:
<!--l. 39--><p class="noindent" ><!--l. 39--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mi

>a</mi><mi
>b</mi></math>

</p>

With version 57127:
<!--l. 39--><p class="noindent" ><!--l. 39--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><msub><mrow

><mi
>a</mi></mrow><mrow
><mi
>b</mi></mrow></msub
></math>

</p>

Matteo <matteo88>

 

Attached Files
file #395:  sub-sup.tex added by matteo88 (820B - text/x-tex)
file #396:  mi.cfg added by matteo88 (2kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by matteo88 (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):

     

     

    3 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jan 8 12:17:33 2021michal_h21Open/ClosedOpen=>Closed
    Thu Dec 31 17:07:00 2020matteo88Attached File-=>Added sub-sup.tex, #395
      Attached File-=>Added mi.cfg, #396
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray