diff options
author | Karl Berry <karl@freefriends.org> | 2022-04-28 21:49:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-04-28 21:49:35 +0000 |
commit | 561fcb992168b483eb1143e850096c550bc3c4bf (patch) | |
tree | 9f13f120db6dbc900ba0a77ef92456a17f28b1ff /Master/texmf-dist/source/generic/tex4ht | |
parent | 5ec893be9430a2f8907a1553f8ca24db9fc3d7b2 (diff) |
longtable captions and ooffice fix, tex4ht r1121-2
git-svn-id: svn://tug.org/texlive/trunk@63170 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/tex4ht')
4 files changed, 37 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 58146aa1e3f..a4f4595666b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,12 @@ +2022-04-28 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-ooffice.tex (ooffice.4ht): added dummy definition of + \cell:style:name to prevent compilation error with longtable. + * tex4ht-4ht.tex (longtable.4ht), + * tex4ht-html4.tex (html4.4ht): fixed support for longtable + captions. + https://tex.stackexchange.com/a/642350/2891 + 2022-04-27 Michal Hoftich <michal.h21@gmail.com> * tex4ht-html4.tex (html4.4ht): corrected class names for Ulem diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index eb4ca2f77d8..700179e6c11 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1119 2022-04-26 15:53:45Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1121 2022-04-28 13:36:29Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -10150,6 +10150,12 @@ Fix for the \Link[https://puszcza.gnu.org.ua/bugs/?437]{}{}starred linebreak iss \o:noalign:\bgroup \gHAdvance\TitleCount 1 \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} \HLet\LT@caption\:tempc +>>> + + +\<old longtable makecaption\><<< +% this code is not used anymore, it produces spurious table cells, +% resulting in wrong structure \def\:tempc#1#2#3{% \LT@mcol\LT@cols c{\hbox{\parbox[t]\LTcapwidth{% \cptA: #1{\cap:ref{#2}}\if\relax\detokenize{#1}\relax\else\cptB:\fi\cptC:#3\cptD: @@ -10157,6 +10163,20 @@ Fix for the \Link[https://puszcza.gnu.org.ua/bugs/?437]{}{}starred linebreak iss \HLet\LT@makecaption\:tempc >>> +Captions in Longtable are placed inside of the table structure. +We need to use special configuration to produce correct rendering, +normal code for caption will not work. + +\Link[https://tex.stackexchange.com/a/642350/2891] More details\EndLink + +\<longtable captions\><<< +\NewConfigure{longtablecaption}{4} +\def\:tempc#1#2#3{% + \a:longtablecaption #1{\cap:ref{#2}}\if\relax\detokenize{#1}\relax\else\b:longtablecaption\fi\c:longtablecaption#3\d:longtablecaption + \endgraf\vskip\baselineskip} +\HLet\LT@makecaption\:tempc +>>> + \Link[https://puszcza.gnu.org.ua/bugs/?313] Write table info to the LOT \EndLink diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index cd6cf2992e4..72577ab6966 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1120 2022-04-27 10:47:56Z michal_h21 $ +% $Id: tex4ht-html4.tex 1121 2022-04-28 13:36:29Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -8169,6 +8169,9 @@ and the same for pic tabular. Why? \Css{div.longtable{text-align:center;}} \Css{table.longtable{margin-left:auto; margin-right: auto;}} \Configure{longtableparbox}{\IgnorePar\leavevmode\ShowPar\par} +\Configure{longtablecaption}{\ifvmode\IgnorePar\fi\EndP\HCode{<caption class="longtable">}\par\ShowPar\HCode{<span class="id">}}{:\ }{\HCode{</span><span class="content">}}{\HCode{</span>}\ifvmode\IgnorePar\fi\EndP\HCode{</caption>}} + +\Css{caption.longtable .id{font-weight:bold;}} >>> diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex index eebe62995fd..8e86f7e9565 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-ooffice.tex 1108 2022-04-05 15:59:08Z michal_h21 $ +% $Id: tex4ht-ooffice.tex 1122 2022-04-28 15:04:04Z michal_h21 $ % compile 3 times: latex tex4ht-ooffice % htlatex tex4ht-ooffice "xhtml,4,sections+" % @@ -11976,7 +11976,8 @@ OO doesn't seem to hono mfenced {\HCode{<table:table-row \Hnewline}\halignTR\HCode{ table:style-name="TBL-\TableNo-\HRow-">}} {\HCode{</table:table-row>}} - {\HCode{<table:table-cell + {\edef\cell:style:name{}% suppress compilation error + \HCode{<table:table-cell \ifnum \HMultispan>1 table:number-columns-spanned="\HMultispan"\fi \space table:style-name="TBL-\TableNo-\HRow-\HCol" ><text:p>}|<td save EndP|>% |<start array par box|>\PushStack\Table:Stck\TableNo} |