I'd like to find out whether tex4ht and make4ht can be customized to allow for very precise table construction in odt files, specifically, manually specified column widths (p{x dim}
). This question is similar to but extends to odt/docx compilation:
- tex4ht: How to create fixed width table columns
- and the interesting workaround for html files, but not odt or docx files, in one of my previous questions (Can \pbox{max width}{text} be used in tex4ht)
Over my time with tex4ht implementations, I've had solutions come from:
- patches to packages (i.e. the cleveref patch provided: Are htlatex (TeX4HT) and cleveref compatible?)
- macros / commands tweaks
- CSS customizations to config file customization (Using ODT styles in a reference template to format make4ht)
- and the incredibly impressive make4ht build/make files (Nest tables in tex4ht as in latex)
- and even the combination of multiple of these (Customizing ODT output from mk4ht oolatex)
The following MWE compiles fine with xelatex and make4ht, but fails to actually implement the parameter that I'd like to control (p{x dim}
).
\documentclass{article}
\begin{document}
Test
\begin{tabular}{l p{1 cm} }
A1 & B1 \\
A2 & B2 \\
A3 & B3 \\
\end{tabular}
\begin{tabular}{ l p{3cm}}
\hline
Outer column & Detail column\\
\hline
a &
\begin{tabular}{c c }
A1 & B1 \\
A2 & B2 \\
A3 & B3 \\
\end{tabular}
\\
\hline
b
&
\begin{tabular}{c c }
A1 & B1 \\
A2 & B2 \\
A3 & B3 \\
\end{tabular}
\\
\hline
d & etc \\
\hline
\end{tabular}
\end{document}
I think the make4ht makefile has great potential, but when I unzip my successfully created word file I'm unable to track down the tables in xml that I'm hoping to control. My thinking was to write a lua function in the make file to replace the xml string defining the table, but this relied on table creation to be done in a single place, and the preservation of an annotation making the p width request that could be parsed out of a comment or something.
Any thoughts, suggestions, or starting points I might explore to add this control capability to odt/docx column widths?