texlive[61349] Master/texmf-dist: minted <> fixes, tex4ht r1035

commits+karl at tug.org commits+karl at tug.org
Sun Dec 19 23:51:48 CET 2021


Revision: 61349
          http://tug.org/svn/texlive?view=revision&revision=61349
Author:   karl
Date:     2021-12-19 23:51:48 +0100 (Sun, 19 Dec 2021)
Log Message:
-----------
minted <> fixes, tex4ht r1035

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1035

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/minted.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2021-12-19 21:54:10 UTC (rev 61348)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2021-12-19 22:51:48 UTC (rev 61349)
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2021-12-19 21:54:10 UTC (rev 61348)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2021-12-19 22:51:48 UTC (rev 61349)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1034 2021-12-19 13:53:20Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1035 2021-12-19 22:26:51Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2021 TeX Users Group    
@@ -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.

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/minted.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/minted.4ht	2021-12-19 21:54:10 UTC (rev 61348)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/minted.4ht	2021-12-19 22:51:48 UTC (rev 61349)
@@ -1,4 +1,4 @@
-% minted.4ht (2020-09-28-13:52), generated from tex4ht-4ht.tex
+% minted.4ht (2021-12-19-14:41), generated from tex4ht-4ht.tex
 % Copyright 2020 TeX Users Group
 %
 % This work may be distributed and/or modified under the
@@ -16,7 +16,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2020-09-28-13:52}
+\immediate\write-1{version 2021-12-19-14:41}
 
 \NewConfigure{InlineCode}{2}
 
@@ -42,7 +42,17 @@
   }
   {\b:MintedColorbg\medskip\noindent}
 
+\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
+
+
+
 \Hinput{minted}
 \endinput
 



More information about the tex-live-commits mailing list.