What is the correct way to force tex4ht to put the caption under the table like it shows in pdf?

The caption always comes out shifted to the edge, while the table is centered OK in the middle of the web page.

Here is a MWE


A & B \\\hline
853.075 (sec) & 43.711 (sec)\\\hline
14.218 (minutes) & 0.729 (minutes)\\\hline
\caption{Total real time used to solve all problems}


Compiled with lualatex foo.tex the output is as expected:

Mathematica graphics

Compiled with make4ht using make4ht -ulm default foo.tex "htm,mathjax" or just make4ht foo.tex "htm" gives

enter image description here

Using TL 2018, updated 2 months ago, on Linux Ubuntu under windows 10 subsystem


1 Answer 1


You can style the appearance of the generated document to your liking using CSS. The caption is contained in <div class="caption">, you can center it using the text-align property. Try the following configuration file:


The result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .