From 9ef193b3c64071aa07d8ef5df74e08c0e910cb90 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 17 Sep 2021 22:53:36 +0000 Subject: floating listings, tex4ht r982; listings support for odt, tex4ht r983 git-svn-id: svn://tug.org/texlive/trunk@60530 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 7 +++++ .../source/generic/tex4ht/tex4ht-html4.tex | 10 ++++--- .../source/generic/tex4ht/tex4ht-ooffice.tex | 32 +++++++++++++------- Master/texmf-dist/tex/generic/tex4ht/html4.4ht | 12 ++++---- Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht | 34 ++++++++++++++-------- 5 files changed, 63 insertions(+), 32 deletions(-) diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 738ecdbd7c6..d4d252102dc 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,10 @@ +2021-09-17 Michal Hoftich + + * tex4ht-html4.tex (html4.4ht): fixed support for floating listings. + https://tex.stackexchange.com/a/615703/2891 + * tex4ht-ooffice.tex (ooffice.4ht): fixed listings support in the ODT + format. + 2021-09-14 Michal Hoftich * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): fixed TOC support for \exp diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index 0108f2d289d..5dfb67b428f 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 978 2021-09-12 21:26:18Z michal_h21 $ +% $Id: tex4ht-html4.tex 982 2021-09-17 12:20:37Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -15254,15 +15254,17 @@ Configuration for the inline code \gdef\start:LstLn{% \HCode{
}% \gdef\start:LstLn{|\HCode{
\Hnewline}}} - \bgroup + \bgroup% + % we put the closing
here in order to support floating listings + % https://tex.stackexchange.com/a/615703/2891 + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} {\start:LstLn \HCode{}} {\HCode{}}% } - {\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\egroup\par} {} {} \Css{.lstlisting .label{margin-right:0.5em; }} \Css{div.lstlisting{font-family: monospace,monospace; white-space: nowrap; diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex index 71b3105795f..1eac5065436 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 977 2021-09-09 13:53:34Z michal_h21 $ +% $Id: tex4ht-ooffice.tex 983 2021-09-17 14:27:15Z michal_h21 $ % compile 3 times: latex tex4ht-ooffice % htlatex tex4ht-ooffice "xhtml,4,sections+" % @@ -10446,15 +10446,21 @@ Y{0178}\i{00EF}% \ConfigureEnv{lstlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% - \HCode{}% - \bgroup \special{t4ht@(}% + % \HCode{}% + \bgroup % + \gdef\start:LstLn{% + \ifvmode\IgnorePar\fi\EndP\HCode{}% + \ht:special{t4ht@(}\ttfamily% + \gdef\start:LstLn{\HCode{}}} + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} - {\HCode{}}{}% + {\start:LstLn}{}% } - {\special{t4ht@)}\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\ht:special{t4ht@)}\egroup + % \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + \par} {} {} >>> @@ -10462,16 +10468,20 @@ Y{0178}\i{00EF}% \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% - \HCode{}% - \bgroup \tt \special{t4ht@(}% + % \HCode{}% + \bgroup% + \gdef\start:LstLn{% + \ifvmode\IgnorePar\fi\EndP\HCode{}% + \ht:special{t4ht@(}\ttfamily% + \gdef\start:LstLn{\HCode{}}} + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} - {\HCode{}} + {\start:LstLn} {\HCode{}}% } - {\special{t4ht@)}\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\special{t4ht@)}\egroup\par} >>> diff --git a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht index 326305474a5..5e391f1c08c 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 (2021-09-12-15:34), generated from tex4ht-html4.tex +% html4.4ht (2021-09-17-15:30), generated from tex4ht-html4.tex % Copyright 2009-2021 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 2021-09-12-15:34} +\immediate\write-1{version 2021-09-17-15:30} \exit:ifnot{8859-6,% CJK,% @@ -37320,15 +37320,17 @@ description">}% \HCode{
}% \gdef\start:LstLn{\:nbsp% \HCode{
\Hnewline}}} - \bgroup + \bgroup% + % we put the closing
here in order to support floating listings + % https://tex.stackexchange.com/a/615703/2891 + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} {\start:LstLn \HCode{}} {\HCode{}}% } - {\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\egroup\par} {} {} \Css{.lstlisting .label{margin-right:0.5em; }} \Css{div.lstlisting{font-family: monospace,monospace; white-space: nowrap; diff --git a/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht b/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht index f9387235466..b8606ad9c47 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 (2021-09-10-08:38), generated from tex4ht-ooffice.tex +% ooffice.4ht (2021-09-17-15:31), generated from tex4ht-ooffice.tex % Copyright 2009-2021 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 2021-09-10-08:38} +\immediate\write-1{version 2021-09-17-15:31} \exit:ifnot{Preamble,% algorithmicx,% @@ -19322,29 +19322,39 @@ Y{0178}\i{00EF}% \ConfigureEnv{lstlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% - \HCode{}% - \bgroup \special{t4ht@(}% + % \HCode{}% + \bgroup % + \gdef\start:LstLn{% + \ifvmode\IgnorePar\fi\EndP\HCode{}% + \ht:special{t4ht@(}\ttfamily% + \gdef\start:LstLn{\HCode{}}} + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} - {\HCode{}}{}% + {\start:LstLn}{}% } - {\special{t4ht@)}\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\ht:special{t4ht@)}\egroup + % \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + \par} {} {} \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% - \HCode{}% - \bgroup \tt \special{t4ht@(}% + % \HCode{}% + \bgroup% + \gdef\start:LstLn{% + \ifvmode\IgnorePar\fi\EndP\HCode{}% + \ht:special{t4ht@(}\ttfamily% + \gdef\start:LstLn{\HCode{}}} + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} - {\HCode{}} + {\start:LstLn} {\HCode{}}% } - {\special{t4ht@)}\egroup - \ifvmode \IgnorePar\fi \EndP \HCode{}\par} + {\special{t4ht@)}\egroup\par} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3