1

Something seems to have changed in tex4ht. I am using TL 2025, installed fresh one week ago on new Linux

Found that Adding array package, causes tex4ht to clopper all content of table cell, ignoring new lines, even though cell has p column specs.

Also, adding colortbl package does the same thing.

Also, adding makecell package does the same thing.

This makes it very hard to read the tables now, since content loses new lines.

This did not used to be like this before, else I would have noticed it. This seems to be recent change?

Here is a MWE.

\documentclass[12pt]{book} \usepackage{longtable} %Adding ANY one of these will cause tex4ht to lose newlines %this \usepackage{array} %OR %\usepackage{makecell} %OR %\usepackage{xcolor} %\usepackage{colortbl} \begin{document} \begin{longtable}[c]{|p{1in}|p{3in}|p{.5in}|p{.7in}|p{.7in}|}\hline date/time & summary of changes & number problems & not solved & solved but not verified \\\hline %%%%%%%%%%%%%%%% Sunday July,27 2025. 9PM& line here line here line here &20,151& 1046\newline 5.198\% & NA \\ \hline \end{longtable} \end{document} \end{document} 

Compiling with lualatex gives

enter image description here

Compiling with tex4ht

 make4ht -ulm default -a debug foo.tex "mathjax,htm" 

gives

enter image description here

Notice how all the new lines are gone. Removing the array package and recompiling now gives this

enter image description here

Adding colortbl or makecell causes same problem.

So for now, I have removed all these packages when compiling with tex4ht.

Why adding array package or adding colortbl package or adding makecell package causes newlines to be ignored in tex4ht?

Reference tex4ht tracking 663

1 Answer 1

1

Yes, this seems like a regression. Try this config file, it should restore support for paragraphs in table cells:

\Preamble{xhtml} \makeatletter \let\@startpbox@action\@startpbox \Css{table.longtable p{margin: 0;}} \makeatother \begin{document} \EndPreamble 

This is the result:

fixed table

4
  • Thanks Michal for the fix. I just did TL update (August 16, 2025) and saw it update tex4ht. But when I run the same code above, using the same exact command, the problem is still there. Does this mean your fix is not in TL sources? I check your log file here ctan.math.utah.edu/ctan/tex-archive/support/TeX4ht/source/… and it says your fixed was there on 8/14/2025. So I am little confused. Should I just wait a week or so to see the fix show in in TL update? I do not really know how all of this work, so I just try. Commented Aug 17 at 4:12
  • This is what TL update said [14/15, 00:40/00:44] update: tex4ht [2737k] (75947 -> 76061) ... done Commented Aug 17 at 4:12
  • @Nasser I think it isn't i TL yet, but I don't know when it will be. Maybe Karl is on vacation? Commented Aug 17 at 11:53
  • OK, no problem, will try again next week. I just thought since it shows on your log file, it means it is in TL sources already. Commented Aug 17 at 17:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.