From 41041c6bdcedcc33698491c2caec4cd725a4fe97 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 18 Feb 2022 03:01:44 +0000 Subject: CTAN sync 202202180301 --- support/TeX4ht/source/ChangeLog | 11 +++++++++++ support/TeX4ht/source/tex4ht-4ht.tex | 16 ++++++++++++---- support/TeX4ht/source/tex4ht-html4.tex | 22 ++++++++++++---------- 3 files changed, 35 insertions(+), 14 deletions(-) (limited to 'support/TeX4ht/source') diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 8c0e114eb3..f6ae9d408d 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,14 @@ +2022-02-16 Michal Hoftich + + * tex4ht-html4.tex (html4.4ht): write CSS for table column width + only once. + * tex4ht-4ht.tex (listings.4ht): use normal space instead of \:nbsp, + in order to enable line breaking. + https://tex.stackexchange.com/a/634033/2891 + * tex4ht-4ht.tex (listings.4ht): load Xcolor with Listings to + prevent compilation errors with the syntax color detection. + * tex4ht-html4.tex (html4.4ht): use
 for Listings.
+
 2022-02-10  Michal Hoftich  
 
 	* tex4ht-4ht.tex (usepackage.4ht, breakurl-hooks.4ht): fixed
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 72be0a6972..40696a0a64 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1076 2022-02-10 16:55:31Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1079 2022-02-16 21:13:48Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2022 TeX Users Group    
@@ -30722,6 +30722,14 @@ d|\last:haddr
 \endinput
 >>>        \AddFile{9}{listings}
 
+We use Xcolor's features to extract color information for syntax highlighting.
+We need to load it if it isn't used  yet
+\<<<
+\@ifpackageloaded{xcolor}{}{%
+\RequirePackage{xcolor}
+}
+>>>
+
 For some reason we need the followng version of \`|\@makecaption| in order to
 get correct cross-references. There were duplicate IDs sometimes.
 
@@ -30833,14 +30841,14 @@ Configure list of listings
    \setbox\z@\hbox{{\lst@currstyle{\:tempc}}}%
    \lst@OutputBox\z@} 
 \HLet\lst@Kern\:tempa
-\NewConfigure{lst@Kern}{2}
-\Configure{lst@Kern}{0.499em}{0.1em}
 >>>
 
 Configure lst@Kern: character width, inter character space size
 
 \<<<
-\def\lst@outputspace{\:nbsp}
+\NewConfigure{lst@Kern}{2}
+\Configure{lst@Kern}{0.499em}{0.1em}
+\def\lst@outputspace{\HCode{ }}
 >>>
 
 Test cases:
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index ede8404fff..455078e9df 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1073 2022-02-06 19:29:41Z michal_h21 $
+% $Id: tex4ht-html4.tex 1080 2022-02-16 21:37:32Z michal_h21 $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
@@ -15269,12 +15269,12 @@ Configuration for the inline code
     \gHAdvance\listingN by 1
     \HCode{}%
     \gdef\start:LstLn{%
-       \HCode{
}% + \HCode{
}%
        \gdef\start:LstLn{|\HCode{
\Hnewline}}} \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{}}% + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{
}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} @@ -15284,7 +15284,7 @@ Configuration for the inline code {\egroup\par} {} {} \Css{.lstlisting .label{margin-right:0.5em; }} -\Css{div.lstlisting{font-family: monospace,monospace; white-space: nowrap; +\Css{pre.lstlisting{font-family: monospace,monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; }} >>> @@ -15293,7 +15293,7 @@ Configuration for the inline code \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% - \HCode{
}% + \HCode{
}%  
     \bgroup \tt %\special{t4ht@(}%  
        \Configure{listings}  
          {{\everypar{}\leavevmode}}  
@@ -15304,8 +15304,8 @@ Configuration for the inline code
    }  
    {%\special{t4ht@)}
     \egroup  
-    \ifvmode \IgnorePar\fi \EndP  \HCode{
}\par} -\Css{div.lstinputlisting{ + \ifvmode \IgnorePar\fi \EndP \HCode{}\par} +\Css{pre.lstinputlisting{ font-family: monospace,monospace; white-space: nowrap; }} @@ -19752,10 +19752,12 @@ changes. \:CheckOption{p-width} \if:Option |<10 em constant|> \Configure{HColWidth} - {\tmp:dim=\HColWidth \divide\tmp:dim by \ten:Em\relax + {\ifnum\HRow=1% output CSS only on the first row, to prevent duplication + \tmp:dim=\HColWidth \divide\tmp:dim by \ten:Em\relax \tmp:dim=10\tmp:dim - \Css{\#TBL-\TableNo-\HRow-\HCol - {width:\expandafter\x:Em \the\tmp:dim em;}}} + \Css{\#TBL-\TableNo-\HCol% CSS selects ID of the current table column + {width:\expandafter\x:Em \the\tmp:dim em;}} + \fi} \else \Log:Note{for width specifications of tabular p entries, use the `p-width' command line option or a configuration similar -- cgit v1.2.3