From 412bc778c8b559327e2af8518e7c15af2b01d5f6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 19 Dec 2021 22:51:48 +0000 Subject: minted <> fixes, tex4ht r1035 git-svn-id: svn://tug.org/texlive/trunk@61349 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 3 +++ .../texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'Master/texmf-dist/source/generic') 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 + * 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} +| \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. + +\<<< +\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. -- cgit v1.2.3