bugtex4ht - Bugs: bug #639, ltugboat.cls is incompatible with...

 
 
Show feedback again

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

bug #639: ltugboat.cls is incompatible with tex4ht

Submitted by:  Boris Veytsman <boris>
Submitted on:  Sat Oct 12 19:19:40 2024  
 
Category: NonePriority: 5 - Normal
Severity: 7 - ImportantStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

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

Mon Oct 14 19:34:38 2024, comment #7:

Thanks Michal! I pushed the change to TL as usual. I'm impressed no other changes were needed.

Closing this, in hopes ...

Karl Berry <karl>
Project Administrator
Mon Oct 14 09:25:50 2024, comment #6:

Thanks, Karl. It seems to compile almost perfectly. The only issue I found is that the TUGBoat volume and number were printed on each generated page (for example, for footnotes), and it incorrectly handled paragraphs. I've fixed this issue; it is now printed only on the first generated page.

Michal Hoftich <michal_h21>
Project Member
Sun Oct 13 20:58:42 2024, comment #5:

Thanks Michal!

Well, I have thousands of examples of TUGboat article sources :). But maybe the place to start is the template article, at https://tug.org/TUGboat/sampleart.ltx.

If that works, next could be the TUGboat documentation,
at https://github.com/TeXUsersGroup/tugboat/blob/trunk/latex/ltubguid.ltx.

Both files are self-contained, I believe.

Let me know if questions or problems, of course. Thanks again (everyone).

Karl Berry <karl>
Project Administrator
Sun Oct 13 17:57:36 2024, comment #4:

I've updated latex.4ht to support cmd hooks for \@sect and \@ssect, so your MWE now compiles without errors. The updated file is attached.

Do you have a full example document that shows use of the class? I think we should add a proper support for it.

(file #543)

Michal Hoftich <michal_h21>
Project Member
Sat Oct 12 22:01:53 2024, comment #3:

To answer Karl's question. I used 2023 TL because it was in my command history (`export PATH=...`), and I just repeated it. Recently I noticed that I should to change to 2024, and immediately got errors.

Boris Veytsman <boris>
Project Member
Sat Oct 12 21:50:32 2024, comment #2:

I think we should add support for hooks. It seems we could use something like:

\NewHookWithArguments{cmd/@sect/before}{8}
\NewReversedHookWithArguments{cmd/@sect/after}{8}
\NewHookWithArguments{cmd/@ssect/before}{5}
\NewReversedHookWithArguments{cmd/@ssect/after}{5}

And then use something like this in our redefinitions of \@sect and \@ssect:

\UseHookWithArguments{cmd/@sect/before}{8}{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}%

I've added this code and it seems to suppress the error and also execute the hooks.

Michal Hoftich <michal_h21>
Project Member
Sat Oct 12 20:40:54 2024, comment #1:

The use of LaTeX hooks in ltugboat hasn't changed since 2023-08-05, so I would guess this has to be something recent in tex4ht?

Ulrike gave me a recipe then for getting the current label name (I don't really understand it), which is used iff \fmtversion is later than 2023-06-01. I always use the latest latex-dev, so the ltugboat code has been getting exercised since it was put in.

Unless ... Boris, were you using an older LaTeX before now, e.g., with the hefferon review you just did a few days ago?

Michal, if it helps, the calls in ltugboat look like
```
\AddToHookWithArguments{cmd/@sect/before}
\AddToHookWithArguments{cmd/@ssect/before}
```

I hope you have some idea ...

Karl Berry <karl>
Project Administrator
Sat Oct 12 19:19:40 2024, original submission:

tex4ht seems to be incompatible with ltugboat.cls

Minimal example

```
\documentclass[final]{ltugboat}

\begin{document}
Example

\end{document}
```

Compilation command
```
htlatex example.tex "xhtml,html5,charset=utf-8,fn-in" " -cunihtf -utf8"
```

Error message:
```
! LaTeX hooks Error: Generic hooks cannot be added to '\@sect'.

For immediate help type H <return>.
...

l.4 \begin{document}

?
! Emergency stop.
...

l.4 \begin{document}

No pages of output.
Transcript written on example.log
```

The log is attached

Boris Veytsman <boris>
Project Member

 

Attached Files
file #543:  latex.4ht added by michal_h21 (76kB - application/octet-stream)
file #541:  example.tex added by boris (82B - application/octet-stream)
file #542:  example.log added by boris (17kB - 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 karl (Posted a comment)
  • -unavailable- added by boris (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 Oct 14 19:34:38 2024karlOpen/ClosedOpen=>Closed
    Sun Oct 13 17:57:36 2024michal_h21Attached File-=>Added latex.4ht, #543
    Sat Oct 12 19:19:40 2024borisAttached File-=>Added example.tex, #541
      Attached File-=>Added example.log, #542
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray