[tex4ht] [bug #584] Support for tabularray

Michal Hoftich puszcza-hackers at gnu.org.ua
Sun Nov 27 22:28:01 CET 2022


Follow-up Comment #1, bug #584 (project tex4ht):

Thanks for the report. This package seems to be huge, so it will be not easy
to fully support it. We need to patch the right commands to insert the HTML or
XML tags. I've already found which commands insert table rows and cells, but
the support for merged cells and rows, various styles of rules, and colors,
will be more complicated. 

Here is a basic configuration file, tabularray.4ht:

%%%%%%%%%%%%%%%%%%%%%%%%
\NewConfigure{tabularraycell}{2}
\NewConfigure{tabularrayrow}{2}

% disable rules
\special{t4ht at _}
\ExplSyntaxOn

\def\:tempa#1{\a:tabularrayrow\o:__tblr_build_row:N:{#1}\b:tabularrayrow }
\HLet\__tblr_build_row:N\:tempa

\def\:tempa#1#2{\a:tabularraycell\o:__tblr_build_cell:NN:{#1}{#2}\b:tabularraycell}
\HLet\__tblr_build_cell:NN\:tempa

\ExplSyntaxOff
 
% configure tags
\ConfigureEnv{tblr}
{\ifvmode\IgnorePar\fi\EndP\HCode{<table>}}
{\ifvmode\IgnorePar\fi\EndP\HCode{</table>}}{}{}
\Configure{tabularrayrow}{\HCode{<tr>}}{\HCode{</tr>}}
\Configure{tabularraycell}{\HCode{<td>}}{\HCode{</td>}}
%%%%%%%%%%%%%%%%%%%%%%%%%%


It just puts cells and rows to the correct HTML tags, nothing more. It cannot
detect merged cells and rows, or any fancy rules. I will take try to create
something more serious next week, hopefully.

    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?584>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



More information about the tex4ht mailing list.