[tex4ht-commits] [SCM] tex4ht updated: r1570 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Oct 1 18:06:59 CEST 2024


Author: michal_h21
Date: 2024-10-01 16:06:59 +0000 (Tue, 01 Oct 2024)
New Revision: 1570

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
prevent default use of visible space characters

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-10-01 15:04:12 UTC (rev 1569)
+++ trunk/lit/ChangeLog	2024-10-01 16:06:59 UTC (rev 1570)
@@ -1,5 +1,8 @@
 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>

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2024-10-01 15:04:12 UTC (rev 1569)
+++ trunk/lit/tex4ht-4ht.tex	2024-10-01 16:06:59 UTC (rev 1570)
@@ -26497,6 +26497,7 @@
 
 \ExplSyntaxOn
 |<piton xcolor|>
+|<piton spaces|>
 |<piton env|>
 |<piton inlines|>
 \ExplSyntaxOff
@@ -26512,6 +26513,43 @@
 \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}



More information about the tex4ht-commits mailing list.