[tex4ht-commits] [SCM] tex4ht updated: r809 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Thu Oct 8 18:28:22 CEST 2020
Author: michal_h21
Date: 2020-10-08 19:28:22 +0300 (Thu, 08 Oct 2020)
New Revision: 809
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
Fix for catchfile package error
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2020-10-08 15:37:27 UTC (rev 808)
+++ trunk/lit/ChangeLog 2020-10-08 16:28:22 UTC (rev 809)
@@ -1,3 +1,13 @@
+2020-10-08 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-sty.tex (tex4ht.sty): new mechanism for early package
+ redefinitions.
+ * tex4ht-4ht.tex (usepackage.4ht,
+ minted-sty-hooks.4ht,
+ catchfile-sty-hooks.4ht): added early package redefinitions for Minted
+ and Catchfile packages.
+ https://puszcza.gnu.org.ua/bugs/?486
+
2020-10-05 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (biblatex.4ht): fix for ithenelse patching error.
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2020-10-08 15:37:27 UTC (rev 808)
+++ trunk/lit/tex4ht-4ht.tex 2020-10-08 16:28:22 UTC (rev 809)
@@ -23947,8 +23947,54 @@
\endinput
>>> \AddFile{9}{minted}
+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.
+As it can be declared in the preamble, we must patch the usepackage code.
+
+\<minted-sty-hooks.4ht\><<<
+% minted-sty-hook.4ht, generated from |jobname.tex
+% Copyright 2020 TeX Users Group
+|<TeX4ht license text|>
+\AtBeginDocument{%
+\@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}
+}
+\AddToHook{package/after/minted}{%
+\define at booleankey{minted at opt@g}{breaklines}{}{}{}%
+}
+>>>
+\AddFile{9}{minted-sty-hooks}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\Section{catchfile}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Catchfile package adds quoted file to @addtofilelist.
+This causes compilation error. I don't know what it is
+even useful for, but this fix should work.
+
+\<catchfile-sty-hooks.4ht\><<<
+% catchfile-sty-hook.4ht, generated from |jobname.tex
+% Copyright 2020 TeX Users Group
+|<TeX4ht license text|>
+\AddToHook{package/after/catchfile}{
+ \def\CatchFile at CheckFileExists#1{%
+ \IfFileExists{#1}{%
+ \expandafter\CatchFile at DefFile\@filef at und\@nil
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname @addtofilelist\endcsname\relax
+ \else
+ \@addtofilelist{#1}
+ \fi
+ }{%
+ \let\CatchFile at File\relax
+ }%
+ }%
+}
+>>> \AddFile{9}{catchfile-sty-hooks}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{pythontex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -29871,28 +29917,7 @@
\EndList
-%%%%%%%%%%%%%%%%%%%
-\Section{minted}
-%%%%%%%%%%%%%%%%%%%
-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.
-
-As it can be declared in the preamble, we must patch the usepackage code.
-
-\<use package\><<<
-minted,>>>
-
-
-\<add to usepackage\><<<
-\def\:temp{minted}\ifx\@currname\:temp
- \:AtEndOfPackage{%
- \define at booleankey{minted at opt@g}{breaklines}{}{}{}%
- }
-\fi
->>>
-
%%%%%%%%%%%%%%%%%%%
\Section{fancyhdr}
%%%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list.