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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Sun Dec 19 23:26:51 CET 2021


Author: michal_h21
Date: 2021-12-19 22:26:51 +0000 (Sun, 19 Dec 2021)
New Revision: 1035

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
fixes for greaterthan and lessthan characters with Minted

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-12-19 13:53:20 UTC (rev 1034)
+++ trunk/lit/ChangeLog	2021-12-19 22:26:51 UTC (rev 1035)
@@ -1,5 +1,8 @@
 2021-12-19  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (minted.4ht): redefine Minted  commands that cause issues
+	with TeX4ht documentation.
+
 	* tex4ht-4ht.tex (backref.4ht): added support for the Backref package.
 	https://github.com/michal-h21/tex4ebook/issues/64
 

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2021-12-19 13:53:20 UTC (rev 1034)
+++ trunk/lit/tex4ht-4ht.tex	2021-12-19 22:26:51 UTC (rev 1035)
@@ -24540,11 +24540,30 @@
   }
   {\b:MintedColorbg\medskip\noindent}
 
+|<minted input fixes|>
 
 \Hinput{minted}
 \endinput
 >>> \AddFile{9}{minted}
 
+
+Minted sometimes produces unexpected results. For example, << characters 
+get translated to guilelemets. To prevent that, we define new configuration,
+mintedfixes, where we can redefine macrod used by Minted to produce correct
+results.
+
+\<minted input fixes\><<<
+\NewConfigure{mintedfixes}[1]{\concat:config\a:mintedfixes{#1}}
+\let\a:mintedfixes\empty
+
+\def\:tempa#1{\a:mintedfixes\o:minted at input:{#1}}
+
+\Configure{mintedfixes}{\def\PYGZlt{\textless}\def\PYGZgt{\textgreater}}
+
+\HLet\minted at input\:tempa
+
+>>>
+
 The breaklines option for Minted environments and commands causes source code
 lines to collapse into one line. We try to prevent that by basically disabling
 this option.



More information about the tex4ht-commits mailing list.