bugtex4ht - Bugs: bug #477, Support for new LaTeX hook...

 
 
Show feedback again

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

bug #477: Support for new LaTeX hook management

Submitted by:  Michal Hoftich <michal_h21>
Submitted on:  Thu Jul 23 13:24:20 2020  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

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

Wed Oct 4 12:57:33 2023, comment #13:

I've disabled the \DocumentMetadata command in tex4ht.sty. Thich change needs the development version of make4ht because in the stable version, tex4ht.sty is not loaded before \documentclass, where \DocumentMetadata should be used. The options passed to this command are saved in the \:DocumentMetadata command, so it should be possible to process them later.

This change is necessary to prevent a fatal clash between LaTeX's tagging support and TeX4ht.

Michal Hoftich <michal_h21>
Project Member
Tue Apr 18 11:07:48 2023, comment #12:

There is some discussion about the new LaTeX tagging project and TeX4ht: https://github.com/latex3/latex2e/discussions/1019

We will need to make some changes to TeX4ht sources to support the metadata block used before \documentclass, because TeX4ht is inactive at that moment, so it doesn't track loaded files. It caused problems with my tests, namely because it loaded the Amsmath package. There can be potentially much more problems.

Michal Hoftich <michal_h21>
Project Member
Tue Jul 5 21:56:54 2022, comment #11:

Most excellent, Michal. I pushed everything to TL, r63816.

Karl Berry <karl>
Project Administrator
Tue Jul 5 09:41:08 2022, comment #10:

Karl found that the a recent LaTeX kernel update broke TeX4ht support for the \chapter command. We got compilation errors about missing \endcsname when it was used.

I've found that the issue was caused by TeX4ht redefinition of the \MakeUppercase command. It was a quite old code, and for some reason, it handled also the \@tabacckludge command, which is used for accented characters. It seems that the recent LaTeX update broke it completely, so even the test uppercasing stopped to work. For this reason, I've removed these redefinitions completely. I think that the reason why this code was used no longer applies, as accented words work fine even after the removal.

Michal Hoftich <michal_h21>
Project Member
Wed Mar 23 21:41:54 2022, comment #9:

I am posting this just as a reminder that new features are coming to LaTeX: https://www.latex-project.org//news/2022/03/21/latex-dev-2022-1/

Some notable changes:

- new handling of utf-8 characters in PDFLaTeX
- new interface for declaring document metadata

Ad characters: I've tested some basic accents used in Czech, and it seems that it works well. So I hope that nothing breaks in this regard.

Ad metadata: this could be useful for getting metadata that are required by some XML formats, as well as for HTML

Michal Hoftich <michal_h21>
Project Member
Sun Jan 24 17:12:04 2021, comment #8:

I've found that we are missing support for \AddToHook{env/name/before} and other hooks for environments. I've just fixed that in the sources.

Michal Hoftich <michal_h21>
Project Member
Tue Oct 6 20:23:10 2020, comment #7:

The big update of LaTeX kernel is now in TeX Live. It seems that it didn't broke TeX4ht, which is nice :)

Here are the news: https://www.latex-project.org/news/latex2e-news/ltnews32.pdf

Michal Hoftich <michal_h21>
Project Member
Tue Sep 22 13:28:57 2020, comment #6:

It seems that patching depended on exact definition of \@textsuperscript and \@textsubscript in LaTeX core. I don't know why, probably for some historical reasons. I've removed the conditions and it seems to work in LaTeX-dev and normal LaTeX without issues.

Michal Hoftich <michal_h21>
Project Member
Tue Sep 22 12:47:08 2020, comment #5:

It seems that also \textsuperscript and \textsubscript is missing in LaTeX-dev. Respectivelly that we need to patch different macros.

Michal Hoftich <michal_h21>
Project Member
Wed Sep 2 21:29:05 2020, comment #4:

It might be worth asking the latexers for advice. Maybe they have some idea of how to profile. Since tex4ht didn't change (I presume), the slowdown in latex is surely not desirable from their point of view either.

Also, maybe try running just one of the latex invocations, instead of the whole make4ht or htlatex sequence. That seems like what would be needed to debug, anyway.

Karl Berry <karl>
Project Administrator
Wed Sep 2 19:38:44 2020, comment #3:

I've installed the new LaTeX-dev update and found that the use of Fontspec in a document caused fatal error. It was just necessary to remove \RequirePackage{expl3} from usepackage-fontspec.4ht and it works again.

One thing I noticed is that the compilation is much slower with LaTeX-dev. My simple test document went from 4 seconds to almost 8 :/

Michal Hoftich <michal_h21>
Project Member
Wed Jul 29 07:58:20 2020, comment #2:

We will also need to support new hooks in environment handling and probably others. It should be handled before hooks are added to the main LaTeX kernel.

Michal Hoftich <michal_h21>
Project Member
Tue Jul 28 13:16:38 2020, comment #1:

I've updated TeX4ht sources for the upcoming changes. I want to thank Frank Mittelbach for help and suggestions, it would take me much longer to find the solution.

In the future, we will need to adapt more TeX4ht functionality for the new hook system, especially the LaTeX environment handling.

Michal Hoftich <michal_h21>
Project Member
Thu Jul 23 13:24:20 2020, original submission:

The development version of LaTeX changes some internal code related to the hook management. It will be more adjustable, but it can break older code. As you may suspect, it breaks TeX4ht.

See this thread for details: https://listserv.uni-heidelberg.de/cgi-bin/wa?A2=LATEX-L;88a2d211.2007&S=

I think we identified the issues, thanks to Joseph Wright and Frank Mittelbach. I've already found fixes, but we will make more tests and try to identify the potential issues with the new implementation.

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

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jul 29 07:58:20 2020michal_h21Open/ClosedClosed=>Open
    Tue Jul 28 13:16:38 2020michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray