Is it possible to add some configuration somewhere in order to have LaTeX list, such as:
\begin{customlist}
\item[keyword1] Description.
\item[keyword2] Another description.
\item[keyword3] Yet another.
\end{customlist}
formated as an HTML table by tex4ht, something like:
<table>
<tr><td>keyword1</td><td>Description.</td></tr>
<tr><td>keyword2</td><td>Another description.</td></tr>
<tr><td>keyword3</td><td>Yet another.</td></tr>
</table>
?
Before you tell me that if I want a table I should use tabular
, I'll say that I'm trying to adapt an old LaTeX document by modifying the .sty
files, introducing as few changes as possible in the .tex
. The customlist
environment is defined as a list, introducing some kind of header, so the LaTeX output already looks a bit like a table.
My main problem with tex4t
is that the descriptions are not the argument to any command, so I don't know how to introduce the </td></tr>
part at the end of each row. The rest would probably be something along the lines of:
\ConfigureList{customlist}{\Tg<table>}{\Tg</table>}{\Tg<tr>\Tg<td>}{\Tg</td><td>}
But of course, that does not create a valid table (at least not in XHTML, which is what I'd prefer).
Something that formats the list as a tabular in LaTeX would be welcome too.
</td></tr>
are optional in HTML, it is valid, and parses the same way, without them. – David Carlisle Aug 14 '13 at 18:38\ConfigureList{customlist} {\Tg<table>\def\trtdend{}} {\Tg</table>} {\trtdend\HCode{<tr><td>}\def\trtdend{\HCode{</td></tr>}}} {\Tg</td><td>}
– michal.h21 Aug 14 '13 at 19:13\trtdend
before the</table>
too, but it seems to do the work. – Jellby Aug 14 '13 at 19:22