diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-19 22:51:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-19 22:51:48 +0000 |
commit | 412bc778c8b559327e2af8518e7c15af2b01d5f6 (patch) | |
tree | 6c4045a8ff22b7788924dc790c956248e1babfa4 /Master | |
parent | d0d64b0d56bd771d290b0f5abc225508e50ce6f0 (diff) |
minted <> fixes, tex4ht r1035
git-svn-id: svn://tug.org/texlive/trunk@61349 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/ChangeLog | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/minted.4ht | 14 |
3 files changed, 35 insertions, 3 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. diff --git a/Master/texmf-dist/tex/generic/tex4ht/minted.4ht b/Master/texmf-dist/tex/generic/tex4ht/minted.4ht index 1b6880474a6..1d6f709606c 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/minted.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/minted.4ht @@ -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,6 +42,16 @@ } {\b:MintedColorbg\medskip\noindent} +\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 + + \Hinput{minted} \endinput |