# how to make arraystretch work in tex4ht? It has no effect now

I need a bit more extra vertical space between rows of a longtable. But \renewcommand\arraystretch{3} has no effect on the HTML output compare to PDF.

MWE

\documentclass[11pt]{article}%
\usepackage{longtable}
\renewcommand\arraystretch{3}
\begin{document}

\begin{longtable}{p{1in}|p{5in}}
1625 & Pietro Mengoli Alternative proof that harmonic series diverges\\
1638 & James Gregory. Born in Drumoak, United Kingdom. Scottish mathematician. Taylor series\\
\end{longtable}

\end{document}


Output of lualatex foo.tex is

But output of make4ht foo.tex "htm,mathjax" is

Since I want this vertical spacing for this table in this file only, without affecting other latex files, what is the correct way to do this and why is arraystretch is not having an effect?

I found this method after some trial and error. I am sure there is a better way, but it seems to work so far.

\documentclass[11pt]{article}%
\usepackage{longtable}

\ifdefined\HCode
\AtBeginDocument{%
\Css{td {
}}
}
\else
\renewcommand\arraystretch{3}
\fi

\begin{document}

\begin{longtable}{p{1in} p{5in}}
1625 & Pietro Mengoli Alternative proof that harmonic series diverges\\
1638 & James Gregory. Born in Drumoak, United Kingdom. Scottish mathematician. Taylor series\\
\end{longtable}

\end{document}


And now make4ht foo.tex "htm,mathjax" gives something similar to PDF. More vertical space between rows of table.

• this is the correct way. Only change that I would do, is that I would put it in a .cfg file – michal.h21 Jan 3 at 7:42