summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-html4.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-html4.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-html4.tex25
1 files changed, 24 insertions, 1 deletions
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index d5e99670d7..8fa3360507 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1323 2023-04-12 14:01:16Z michal_h21 $
+% $Id: tex4ht-html4.tex 1325 2023-04-21 13:23:46Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -15385,6 +15385,29 @@ Configuration for listings with colored backgrounds
>>>
+%%%%%%%%%%%%%%%%%%%%
+\subsection{piton}
+%%%%%%%%%%%%%%%%%%%%
+
+\<configure html4 piton\><<<
+% handle \color commands
+% piton already uses hexadecimal colors, so we don't need to convert them for use in CSS
+\def\:endundeclaredcolor{\HCode{</span>}}
+\def\:undeclaredcolor[#1]#2{\o:@undeclaredcolor:[#1]{#2}
+\HCode{<span style="color:\##2">}\aftergroup\:endundeclaredcolor
+}
+
+\Configure{piton}{%
+ \ifvmode\IgnorePar\fi\EndP\HCode{<pre class="piton">}\HtmlParOff\NoFonts%
+ \Configure{newline}{\HCode{\Hnewline}}% don't insert any special tags for newlines, only newline characters
+}
+{\EndNoFonts\HCode{</pre>}\HtmlParOn}
+
+\Configure{pitonline}{\HLet\@undeclaredcolor\:undeclaredcolor}{\HCode{<code style="white-space:pre">}}{\HCode{</code>}}
+\Configure{pitonnumber}{\HCode{<span class="linenumber">}}{\HCode{</span>}}
+\Css{pre.piton{font-family: monospace,monospace; font-size:1rem; text-align:left; clear:both; }}
+\Css{.piton .linenumber{font-size: small; margin-right: 1em;}}
+>>>
%%%%%%%%%%%%%%%%%%%%
\subsection{pythontex}