From 561fcb992168b483eb1143e850096c550bc3c4bf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 28 Apr 2022 21:49:35 +0000 Subject: longtable captions and ooffice fix, tex4ht r1121-2 git-svn-id: svn://tug.org/texlive/trunk@63170 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 9 +++++++++ .../source/generic/tex4ht/tex4ht-4ht.tex | 22 +++++++++++++++++++++- .../source/generic/tex4ht/tex4ht-html4.tex | 5 ++++- .../source/generic/tex4ht/tex4ht-ooffice.tex | 5 +++-- Master/texmf-dist/tex/generic/tex4ht/html4.4ht | 7 +++++-- Master/texmf-dist/tex/generic/tex4ht/longtable.4ht | 12 ++++++------ Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht | 14 ++++++++------ 7 files changed, 56 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist') 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 + + * 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 * 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 +>>> + + +\<<< +% 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 + +\<<< +\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{}\par\ShowPar\HCode{}}{:\ }{\HCode{}}{\HCode{}\ifvmode\IgnorePar\fi\EndP\HCode{}} + +\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{}} {\HCode{}} - {\HCode{1 table:number-columns-spanned="\HMultispan"\fi \space table:style-name="TBL-\TableNo-\HRow-\HCol" >}|% |\PushStack\Table:Stck\TableNo} diff --git a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht index c6747362b82..414ad4c1838 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht @@ -1,4 +1,4 @@ -% html4.4ht (2022-04-27-13:58), generated from tex4ht-html4.tex +% html4.4ht (2022-04-28-13:47), generated from tex4ht-html4.tex % Copyright 2009-2022 TeX Users Group % Copyright 1997-2009 Eitan M. Gurari % @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2022-04-27-13:58} +\immediate\write-1{version 2022-04-28-13:47} \exit:ifnot{8859-6,% CJK,% @@ -21092,6 +21092,9 @@ Y{0178}\i{00EF}% \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{}\par\ShowPar\HCode{}}{:\ }{\HCode{}}{\HCode{}\ifvmode\IgnorePar\fi\EndP\HCode{}} + +\Css{caption.longtable .id{font-weight:bold;}} \fi \:CheckOption{pic-longtable} \if:Option diff --git a/Master/texmf-dist/tex/generic/tex4ht/longtable.4ht b/Master/texmf-dist/tex/generic/tex4ht/longtable.4ht index 3e9772e5488..f4d4dc781c6 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/longtable.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/longtable.4ht @@ -1,6 +1,6 @@ -% longtable.4ht (2021-09-26-14:15), generated from tex4ht-4ht.tex +% longtable.4ht (2022-04-28-13:47), generated from tex4ht-4ht.tex % Copyright 1997-2009 Eitan M. Gurari -% Copyright 2009-2021 TeX Users Group +% Copyright 2009-2022 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-09-26-14:15} +\immediate\write-1{version 2022-04-28-13:47} \def\:tempc[#1]#2{% \gHAdvance\float:cnt 1 @@ -226,10 +226,10 @@ \o:noalign:\bgroup \gHAdvance\TitleCount 1 \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} \HLet\LT@caption\:tempc +\NewConfigure{longtablecaption}{4} \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: - \endgraf\vskip\baselineskip}}}} + \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 \def\:tempc#1[#2]#3{% \LT@makecaption#1\fnum@table{#3}% diff --git a/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht b/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht index cd47a0a9b65..9336a937b22 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht @@ -1,4 +1,4 @@ -% ooffice.4ht (2022-04-05-13:34), generated from tex4ht-ooffice.tex +% ooffice.4ht (2022-04-28-13:47), generated from tex4ht-ooffice.tex % Copyright 2009-2022 TeX Users Group % Copyright 2001-2009 Maarten Wisse, James Naughton, Eitan M. Gurari % @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2022-04-05-13:34} +\immediate\write-1{version 2022-04-28-13:47} \exit:ifnot{Preamble,% algorithmicx,% @@ -8652,7 +8652,8 @@ Y{0178}\i{00EF}% {\HCode{}} {\HCode{}} - {\HCode{1 table:number-columns-spanned="\HMultispan"\fi \space table:style-name="TBL-\TableNo-\HRow-\HCol" >}\SaveEndP % @@ -13173,8 +13174,6 @@ Y{0178}\i{00EF}% - - @@ -13321,6 +13320,7 @@ Y{0178}\i{00EF}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{apacite} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -19947,6 +19947,8 @@ Y{0178}\i{00EF}% + + @@ -20049,6 +20051,7 @@ Y{0178}\i{00EF}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{soul} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -20195,7 +20198,6 @@ Y{0178}\i{00EF}% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3