diff options
author | Norbert Preining <norbert@preining.info> | 2022-03-22 03:01:37 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-03-22 03:01:37 +0000 |
commit | 51119d11f3700a5be7da086dacad56dd219a5c90 (patch) | |
tree | 004fca9000d3b9524fc2dad4bb7e01c45eb25665 /support/TeX4ht/source/tex4ht-html4.tex | |
parent | 418f27fe2e2b233c282c7388ed4f2bf3461a958f (diff) |
CTAN sync 202203220301
Diffstat (limited to 'support/TeX4ht/source/tex4ht-html4.tex')
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index 12c7b8acde..f9edbd385b 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1087 2022-03-08 09:45:01Z michal_h21 $ +% $Id: tex4ht-html4.tex 1093 2022-03-20 16:15:35Z karl $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -15222,10 +15222,13 @@ Configuration for the inline code \subsection{Listings} %%%%%%%%%%%%%%%%%%%%% +Inline listings snippets + \<configure html4 listings\><<< \Configure{lstinline} - {\HCode{<span class="lstinline">}} - {\HCode{</span>}} + {\HCode{<code class="lstinline">}\NoFonts} + {\EndNoFonts\HCode{</code>}} +\Css{code.lstinline{font-family:monospace,monospace;}} >>> \<configure html4 listings\><<< @@ -15307,18 +15310,19 @@ Configuration for the inline code \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{<!--l. \the\inputlineno-->}% - \HCode{<pre class="lstinputlisting">}% - \bgroup \tt %\special{t4ht@(}% - \Configure{listings} - {{\everypar{}\leavevmode}} - {{\everypar{}\leavevmode}} + \gHAdvance\listingN by 1% + \HCode{<pre class="lstinputlisting" id="listing-\listingN">}% + \bgroup\ttfamily%\special{t4ht@(}% + \Configure{listings}% + {{\everypar{}\leavevmode}}% + {{\everypar{}\leavevmode}}% {|<nbsp|>% - \HCode{<br />\Hnewline<span class="label">}} + \HCode{<br />\Hnewline<span class="label">}}% {\HCode{</span>}}% } {%\special{t4ht@)} - \egroup - \ifvmode \IgnorePar\fi \EndP \HCode{</pre>}\par} + \egroup% + \ifvmode \IgnorePar\fi \EndP \HCode{</pre>}\par}% \Css{pre.lstinputlisting{ font-family: monospace,monospace; white-space: nowrap; @@ -15354,6 +15358,28 @@ Support for colors in listings \HCode{<span style="color:\#\html@color">}}% init >>> +Support for background and border color + +\<configure html4 listings\><<< +\lst@AddToHook{Init}{% +\bgroup% + % handle backround color and border in listings + \ifx\lst@fillcolor\@empty\else% + \lst@fillcolor% + \extractcolorspec{.}\html@fillcolor% + \expandafter\convertcolorspec\html@fillcolor{HTML}\html@fillcolor% + \Css{\#listing-\listingN{background-color:\#\html@fillcolor;}}% + \fi% + \ifx\lst@rulecolor\@empty\else% + \lst@rulecolor% + \extractcolorspec{.}\html@rulecolor% + \expandafter\convertcolorspec\html@rulecolor{HTML}\html@rulecolor% + \Css{\#listing-\listingN{border: 1px solid \#\html@rulecolor;}}% + \fi% +\egroup% +} +>>> + %%%%%%%%%%%%%%%%%%%%% \subsection{Verbatim} %%%%%%%%%%%%%%%%%%%%% |