| 1 |
% tabu.4ht (2023-11-02-13:26), generated from tex4ht-4ht.tex |
| 2 |
% Copyright 2018-2023 TeX Users Group |
| 3 |
% |
| 4 |
% This work may be distributed and/or modified under the |
| 5 |
% conditions of the LaTeX Project Public License, either |
| 6 |
% version 1.3c of this license or (at your option) any |
| 7 |
% later version. The latest version of this license is in |
| 8 |
% http://www.latex-project.org/lppl.txt |
| 9 |
% and version 1.3c or later is part of all distributions |
| 10 |
% of LaTeX version 2005/12/01 or later. |
| 11 |
% |
| 12 |
% This work has the LPPL maintenance status "maintained". |
| 13 |
% |
| 14 |
% The Current Maintainer of this work |
| 15 |
% is the TeX4ht Project <http://tug.org/tex4ht>. |
| 16 |
% |
| 17 |
% If you modify this program, changing the |
| 18 |
% version identification would be appreciated. |
| 19 |
\immediate\write-1{version 2023-11-02-13:26} |
| 20 |
|
| 21 |
% we must suppress \everyrow redefintion by tabu, so some macro patching is necessary |
| 22 |
\def\tabu@AtBeginDocument{ |
| 23 |
\ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi |
| 24 |
\ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi |
| 25 |
\let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ |
| 26 |
% \everyrow{}% |
| 27 |
} |
| 28 |
|
| 29 |
\let\orig:hline\hline |
| 30 |
\def\tabu@firstline{\orig:hline} |
| 31 |
\def\tabu@firsthline{\orig:hline} |
| 32 |
\def\tabu@lastline {\orig:hline} |
| 33 |
\def\tabu@lasthline {\orig:hline} |
| 34 |
% there is a clash between tabu and tex4ht on \hline handling |
| 35 |
% we will just use \cr in place of \hline |
| 36 |
\def\tabu@hline {\cr}% \tabu@hline |
| 37 |
|
| 38 |
% this is basically a rewrite of the \tabu@select macro |
| 39 |
% the original code just crashed everything |
| 40 |
\def\tabu@select {% |
| 41 |
\expandafter \tabuthepreamble |
| 42 |
}% \tabu@select |
| 43 |
|
| 44 |
|
| 45 |
\def\tabu@setup{\tabu@alloc@ |
| 46 |
\ifcase \tabu@nested |
| 47 |
\ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ |
| 48 |
\let\tabu@afterendpar \par |
| 49 |
\fi\fi\fi |
| 50 |
\def\tabu@aligndefault{c} |
| 51 |
\tabu@init |
| 52 |
\tabu@indent |
| 53 |
\else % <nested tabu> |
| 54 |
\def\tabu@aligndefault{t} |
| 55 |
\let\tabudefaulttarget \linewidth |
| 56 |
\fi |
| 57 |
\let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined |
| 58 |
\edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% |
| 59 |
%\everycr{} % don't let tabu redefine \everycr |
| 60 |
\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... |
| 61 |
\let\@endpbox \tabu@endpbox % idem " " " " " " |
| 62 |
\let\@tabarray \tabu@tabarray % idem " " " " " " |
| 63 |
\tabu@setcleanup |
| 64 |
% \tabu@setreset % this causes issues |
| 65 |
}% \tabu@setup |
| 66 |
|
| 67 |
\def\:tempa#1#{% |
| 68 |
\setbox\z@=\hbox#1{}% this is necessary to support \begin{tabu} to 7cm{...} |
| 69 |
\ifvmode\IgnorePar\fi\EndP\let\endtabu\endtabularx\tabularx{\textwidth}% |
| 70 |
} |
| 71 |
\HLet\tabu\:tempa |
| 72 |
|
| 73 |
\Hinput{tabu} |
| 74 |
\endinput |
| 75 |
|