URL:
  <https://puszcza.gnu.org.ua/bugs/?663>

                 Summary: why tex4ht losses newlines in p{} columns in table
when using array?
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Mon Jul 28 02:21:45 2025
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Reference and screen shots at 

<https://tex.stackexchange.com/questions/748761/why-tex4ht-losses-newlines-in-p-columns-in-table-when-using-array>

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

In longtable, with p columns, and use array package in order to do custom
column specification. I noticed that now tex4ht no longer keeps the new lines
in the cell. It basically cloppers all content of the cell together, which
makes it very hard to read.

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

Here is MWE
----------------------
\documentclass[12pt]{book}
\usepackage{longtable}
\usepackage{array} % Required for custom column specifications
\begin{document}

\begin{longtable}[c]{|>{\footnotesize}p{1in}|p{3in}|p{.5in}|>{\small}p{.7in}|>{\small}p{.7in}|}\hline
date/time  & summary of changes   &  {\footnotesize number problems} &
{\footnotesize not solved} & {\footnotesize 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}
---------------

Compiling with lualatex gives this

enter image description here

Compiling with

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

gives

enter image description here

Notice how all the new lines are ignores in the HTML.

Now, if I remove the array package and remove all the |> from table columns
specs. then now it works OK.

-------------------------------
\documentclass[12pt]{book}
\usepackage{longtable}
\begin{document}

\begin{longtable}[c]{|p{1in}|p{3in}|p{.5in}|p{.7in}|p{.7in}|}\hline
date/time  & summary of changes   &  {\footnotesize number problems} &
{\footnotesize not solved} & {\footnotesize 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}
----------------------

Now lualatex gives same as before, but tex4ht now gives

enter image description here

How to make tex4ht not lose the newlines in p columns?

Thanks
--Nasser





    _______________________________________________________

Reply to this item at: <https://puszcza.gnu.org.ua/bugs/?663>

_______________________________________________
Message sent via/by Puszcza <https://puszcza.gnu.org.ua/>

Reply via email to