bugtex4ht - Bugs: bug #508, Error after loading hyperref from...

 
 
Show feedback again

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

bug #508: Error after loading hyperref from a class file

Submitted by:  Ulrich Müller <ulm>
Submitted on:  Tue Apr 27 09:11:34 2021  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed Apr 28 10:51:30 2021, comment #2:

Thank you, this has fixed the original bug.

Unfortunately, a new issue with hyperref has surfaced. I've filed bug #510 for it.

Ulrich Müller <ulm>
Tue Apr 27 13:02:02 2021, comment #1:

This is caused by the fact that TeX4ht is not active in the class file, and it doesn't include hyperref-hooks.4ht file. It seems that it works when I move code from hyperref-hooks.4ht to hyperref.4ht, so I will update the sources and it should fix the issue.

In the meantime, you can try the following bugclass.4ht file:

\@ifpackageloaded{nameref}{}
{%
\let\sv:label\label
\RequirePackage{nameref}%
\let\label\sv:label
}
\endinput

This is the code from hyperref-hooks.4ht

Michal Hoftich <michal_h21>
Project Member
Tue Apr 27 09:11:34 2021, original submission:

When loading the hyperref package from a class file, I get the following error when the first \label is encountered:

! Argument of \strip@prefix has an extra }.
<inserted text>
\par
l.3 \label{foo}

To reproduce, run "mk4ht xhlatex bug" with the attached bug.tex and bugclass.cls. The full log file is attached too.

I see this problem with TeX Live 2021 but not with 2020.

As a workaround, I postpone loading of hyperref:
\g@addto@macro\@documentclasshook{\RequirePackage{hyperref}}
So looks like load order matters.

Ulrich Müller <ulm>

 

Attached Files
file #408:  bug.tex added by ulm (74B - text/x-tex)
file #409:  bugclass.cls added by ulm (96B - text/x-tex)
file #410:  bug.log added by ulm (20kB - text/x-log)

 

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

     

     

    4 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Sep 27 12:34:04 2021michal_h21Open/ClosedOpen=>Closed
    Tue Apr 27 09:11:34 2021ulmAttached File-=>Added bug.tex, #408
      Attached File-=>Added bugclass.cls, #409
      Attached File-=>Added bug.log, #410
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray