diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-20 16:17:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-20 16:17:14 +0000 |
commit | 8d133cf0c41d9f82c8ac5cda8f5ede55bf9650f7 (patch) | |
tree | aff19f726595f07629b5e681498e5da7e1ac4e94 /Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex | |
parent | edfe5c48243a9b148a99707e91049463d8c88e42 (diff) |
listings colors, tex4ht r1092; opensans install cleanup
git-svn-id: svn://tug.org/texlive/trunk@62824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index 12c7b8acded..f9edbd385b3 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 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} %%%%%%%%%%%%%%%%%%%%% |