diff options
Diffstat (limited to 'support/TeX4ht')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 16 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 12 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 16 |
3 files changed, 34 insertions, 10 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 0c86afa705..097f725fbc 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,13 @@ +2022-02-01 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-html4.tex (html4.4ht): added support for colors in + listings. + https://tex.stackexchange.com/a/632286/2891 + + * tex4ht-4ht.tex (color.4ht): don't redefine \@undeclaredcolor, in + order to preserve setting of the current color by the Color package. + https://tex.stackexchange.com/a/632286/2891 + 2022-01-30 Michal Hoftich <michal.h21@gmail.com> * tex4ht-fonts-noncjk.tex ( @@ -17,6 +27,12 @@ * tex4ht-html5.tex: 2022. * Makefile (diff-*): report targets. +2022-01-21 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (latex.4ht): use global definition for current + label, in order to support labels inside groups. + https://github.com/michal-h21/tex4ebook/issues/91 + 2022-01-20 Karl Berry <karl@freefriends.org> * update-htfonts: new script to compare/update htfonts from diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index 8f26f8c411..4a9bbabb84 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1063 2022-01-28 13:22:45Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1067 2022-02-01 16:25:25Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -1583,7 +1583,7 @@ How about within pictures? |<def :currentlabel for refstepcounter|>% \anc:lbl r{#1}} \def\anc:lbl#1#2{% - \html:addr \edef\cur:th{|<haddr prefix|>\last:haddr #1}% + \html:addr \xdef\cur:th{|<haddr prefix|>\last:haddr #1}% \ifx \EndPicture\:UnDef {\let\leavevmode|=\empty \cur:lbl{#2}% \Make:Label{\cur:th\:currentlabel}{}}% @@ -26661,12 +26661,8 @@ Was \`'\def\color@setgroup{\begingroup \ht:special {color push >>> \<fix color\><<< -\def\@undeclaredcolor[#1]#2{\a:color{#1 #2}% - \@ifundefined{color@#1}% - {\@latex@error{Undefined color model `#1'}\@ehd}% - {\csname color@#1\endcsname\current@color{#2}% - \set@color}% - \ignorespaces} +\def\:tempa[#1]#2{\a:color{#1 #2}\o:@undeclaredcolor:[#1]{#2}} +\HLet\@undeclaredcolor\:tempa \pend:defI\@declaredcolor{\a:color{##1}} >>> diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index 2a0568c96f..afb66c00be 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1011 2021-11-09 09:00:24Z michal_h21 $ +% $Id: tex4ht-html4.tex 1068 2022-02-01 16:56:15Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -15291,7 +15291,7 @@ Configuration for the inline code {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} {|<nbsp|>% - \HCode{<br /><span class="label">}} + \HCode{<br />\Hnewline<span class="label">}} {\HCode{</span>}}% } {%\special{t4ht@)} @@ -15320,6 +15320,18 @@ Configuration for the inline code % \ifvmode \IgnorePar\fi \EndP \HCode{</div>}\par} +Support for colors in listings + +\<configure html4 listings\><<< +\lst@AddToHook{PostOutput}{\HCode{</span>}}% + +\lst@AddToHook{OutputBox}{% + % get current color in the CSS form + \extractcolorspec{.}\html@color% + \expandafter\convertcolorspec\html@color{HTML}\html@color% + \HCode{<span style="color:\#\html@color">}}% init +>>> + %%%%%%%%%%%%%%%%%%%%% \subsection{Verbatim} %%%%%%%%%%%%%%%%%%%%% |