texlive[72446] Master/texmf-dist: piton load xcolor if not already
commits+karl at tug.org
commits+karl at tug.org
Tue Oct 1 22:55:18 CEST 2024
Revision: 72446
https://tug.org/svn/texlive?view=revision&revision=72446
Author: karl
Date: 2024-10-01 22:55:17 +0200 (Tue, 01 Oct 2024)
Log Message:
-----------
piton load xcolor if not already loaded, tex4ht r1569; avoid visible space chars by default, tex4ht r1570
Revision Links:
--------------
https://tug.org/svn/texlive?view=revision&revision=1569
https://tug.org/svn/texlive?view=revision&revision=1570
Modified Paths:
--------------
trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
trunk/Master/texmf-dist/tex/generic/tex4ht/piton.4ht
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2024-10-01 20:00:43 UTC (rev 72445)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2024-10-01 20:55:17 UTC (rev 72446)
@@ -1,3 +1,10 @@
+2024-10-01 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (piton.4ht): prevent default use of visible space
+ characters.
+
+ * tex4ht-4ht.tex (piton.4ht): load Xcolor if not already loaded.
+
2024-09-30 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (colortbl-hooks.4ht, colortbl.4ht): added support
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2024-10-01 20:00:43 UTC (rev 72445)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2024-10-01 20:55:17 UTC (rev 72446)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1568 2024-09-30 10:54:58Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1570 2024-10-01 16:06:59Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2024 TeX Users Group
@@ -26492,10 +26492,12 @@
\<piton.4ht\><<<
% piton.4ht (|version), generated from |jobname.tex
-% Copyright 2023 TeX Users Group
+% Copyright 2023-2024 TeX Users Group
|<TeX4ht license text|>
\ExplSyntaxOn
+|<piton xcolor|>
+|<piton spaces|>
|<piton env|>
|<piton inlines|>
\ExplSyntaxOff
@@ -26503,6 +26505,51 @@
\endinput
>>> \AddFile{9}{piton}
+If Xcolor is not loaded earlier, Piton loads it in the begindocument/before hook.
+It leads to a compilation error caused by catcodes mismatch. We can prevent it
+by loading Xcolor earlier.
+
+\<piton xcolor\><<<
+\IfPackageLoadedTF{xcolor}{}{\RequirePackage{xcolor}}
+>>>
+
+The current version of Piton started to show visible space character (U+2423) instead
+of spaces even if they are not requested using the show-spaces option. This code should
+prevent that.
+
+\<piton spaces\><<<
+\def\:pitonvisiblespace{ \HCode{\string&\#x2423;} }
+\cs_new_protected:Npn \:__piton_replace_spaces:n #1
+ {
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \bool_if:NTF \l__piton_show_spaces_bool
+ {
+ \tl_set:Nn \l__piton_space_tl {\:pitonvisiblespace} % U+2423
+ \regex_replace_all:nnN { \x20 } {\c{:pitonvisiblespace}} \l_tmpa_tl
+ }
+ {
+ \bool_if:NTF \l__piton_break_lines_in_Piton_bool
+ {
+ \regex_replace_all:nnN
+ { \x20 }
+ { \c { __piton_breakable_space: } }
+ \l_tmpa_tl
+ \regex_replace_all:nnN
+ { \c { l__piton_space_tl } }
+ { \c { __piton_breakable_space: } }
+ \l_tmpa_tl
+ }
+ {
+ \regex_replace_all:nnN { \x20 } { \x20 } \l_tmpa_tl
+ }
+ }
+ \l_tmpa_tl
+ }
+
+
+\HLet\__piton_replace_spaces:n\:__piton_replace_spaces:n
+>>>
+
\<piton env\><<<
\NewConfigure{pitonline}{3}
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/piton.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/piton.4ht 2024-10-01 20:00:43 UTC (rev 72445)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/piton.4ht 2024-10-01 20:55:17 UTC (rev 72446)
@@ -1,5 +1,5 @@
-% piton.4ht (2023-10-13-14:15), generated from tex4ht-4ht.tex
-% Copyright 2023 TeX Users Group
+% piton.4ht (2024-10-01-13:46), generated from tex4ht-4ht.tex
+% Copyright 2023-2024 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -16,11 +16,44 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2023-10-13-14:15}
+\immediate\write-1{version 2024-10-01-13:46}
\ExplSyntaxOn
+\IfPackageLoadedTF{xcolor}{}{\RequirePackage{xcolor}}
+\def\:pitonvisiblespace{ \HCode{\string&\#x2423;} }
+\cs_new_protected:Npn \:__piton_replace_spaces:n #1
+ {
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \bool_if:NTF \l__piton_show_spaces_bool
+ {
+ \tl_set:Nn \l__piton_space_tl {\:pitonvisiblespace} % U+2423
+ \regex_replace_all:nnN { \x20 } {\c{:pitonvisiblespace}} \l_tmpa_tl
+ }
+ {
+ \bool_if:NTF \l__piton_break_lines_in_Piton_bool
+ {
+ \regex_replace_all:nnN
+ { \x20 }
+ { \c { __piton_breakable_space: } }
+ \l_tmpa_tl
+ \regex_replace_all:nnN
+ { \c { l__piton_space_tl } }
+ { \c { __piton_breakable_space: } }
+ \l_tmpa_tl
+ }
+ {
+ \regex_replace_all:nnN { \x20 } { \x20 } \l_tmpa_tl
+ }
+ }
+ \l_tmpa_tl
+ }
+
+
+\HLet\__piton_replace_spaces:n\:__piton_replace_spaces:n
+
+
\NewConfigure{pitonline}{3}
\NewConfigure{pitonnumber}{2}
\protected\def\:tempa #1\__piton_end_line:{
More information about the tex-live-commits
mailing list.