summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-19 22:51:48 +0000
committerKarl Berry <karl@freefriends.org>2021-12-19 22:51:48 +0000
commit412bc778c8b559327e2af8518e7c15af2b01d5f6 (patch)
tree6c4045a8ff22b7788924dc790c956248e1babfa4 /Master/texmf-dist/source/generic
parentd0d64b0d56bd771d290b0f5abc225508e50ce6f0 (diff)
minted <> fixes, tex4ht r1035
git-svn-id: svn://tug.org/texlive/trunk@61349 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog3
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex21
2 files changed, 23 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index 2320f31c9f4..faf48e2b6b5 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,5 +1,8 @@
2021-12-19 Michal Hoftich <michal.h21@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
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 6356f9a08e5..1ba356792b4 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
@@ -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 @@ of LaTeX. The \''\:gobbleII' is for getting rid of the
}
{\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@input:{#1}}
+
+\Configure{mintedfixes}{\def\PYGZlt{\textless}\def\PYGZgt{\textgreater}}
+
+\HLet\minted@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.