texlive[56601] Master/texmf-dist/tex/generic/tex4ht: new latex hook

commits+karl at tug.org commits+karl at tug.org
Thu Oct 8 23:48:27 CEST 2020


Revision: 56601
          http://tug.org/svn/texlive?view=revision&revision=56601
Author:   karl
Date:     2020-10-08 23:48:27 +0200 (Thu, 08 Oct 2020)
Log Message:
-----------
new latex hook mechanism, minted, catchfile, tex4ht r808-810

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

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/tex4ht/catchfile-sty-hooks.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/minted-sty-hooks.4ht

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/catchfile-sty-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/catchfile-sty-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/catchfile-sty-hooks.4ht	2020-10-08 21:48:27 UTC (rev 56601)
@@ -0,0 +1,35 @@
+% catchfile-sty-hook.4ht, generated from tex4ht-4ht.tex
+% Copyright 2020 TeX Users Group
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any
+% later version. The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions
+% of LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work
+% is the TeX4ht Project <http://tug.org/tex4ht>.
+%
+% If you modify this program, changing the
+% version identification would be appreciated.
+\immediate\write-1{version 2020-10-08-14:12}
+
+\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
+    }%
+  }%
+}
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/catchfile-sty-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/generic/tex4ht/minted-sty-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/minted-sty-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/minted-sty-hooks.4ht	2020-10-08 21:48:27 UTC (rev 56601)
@@ -0,0 +1,25 @@
+% minted-sty-hook.4ht, generated from tex4ht-4ht.tex
+% Copyright 2020 TeX Users Group
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any
+% later version. The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions
+% of LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work
+% is the TeX4ht Project <http://tug.org/tex4ht>.
+%
+% If you modify this program, changing the
+% version identification would be appreciated.
+\immediate\write-1{version 2020-10-08-14:12}
+
+\AddToHook{package/after/minted}{%
+\@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}
+\define at booleankey{minted at opt@g}{breaklines}{}{}{}%
+}
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/minted-sty-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2020-10-08 21:21:37 UTC (rev 56600)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2020-10-08 21:48:27 UTC (rev 56601)
@@ -1,7 +1,7 @@
 \ifnum\the\catcode`\%=14\else\expandafter\edef\csname
   \string:RestoreCatcodes\endcsname{\catcode`\%\the
   \catcode`\%}\catcode`\%14\fi
-% tex4ht.sty (2020-07-28-14:30), generated from tex4ht-sty.tex
+% tex4ht.sty (2020-10-08-14:12), generated from tex4ht-sty.tex
 % Copyright 2009-2020 TeX Users Group
 % Copyright 1996-2009 Eitan M. Gurari
 %
@@ -20,7 +20,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2020-07-28-14:30}
+\immediate\write-1{version 2020-10-08-14:12}
 
 
 \ifx  \Preamble\UnDef  \else
@@ -680,12 +680,16 @@
    \catcode`:=\the\catcode`:%
    \catcode`@=\the\catcode`@}%
 \catcode`\:=11 \catcode`\@=11
-\a:usepackage
+\a:usepackage%
+      \a:usepackage:lthooks{#1}{#4}
       \TivhTcats
 }%
       \def\:currentoptions{#2}
 \:onefilewithoptions#1[#2][#3]{#4}\package:hooks{#1.#4}}
 \def\a:usepackage{\input usepackage.4ht }
+\def\a:usepackage:lthooks#1#2{%
+  \IfFileExists{#1-#2-hooks.4ht}{\input #1-#2-hooks.4ht}{}%
+}
 
 
     \expandafter\ifx \csname tex4ht\endcsname\relax

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2020-10-08 21:21:37 UTC (rev 56600)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2020-10-08 21:48:27 UTC (rev 56601)
@@ -1,4 +1,4 @@
-% usepackage.4ht (2020-09-21-13:54), generated from tex4ht-4ht.tex
+% usepackage.4ht (2020-10-08-14:12), generated from tex4ht-4ht.tex
 % Copyright 2003-2009 Eitan M. Gurari
 % Copyright 2009-2020 TeX Users Group
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2020-09-21-13:54}
+\immediate\write-1{version 2020-10-08-14:12}
 
    \def\:temp{tex4ht}\ifx \:temp\@currname
    \:warning{\string\usepackage{tex4ht} again?}
@@ -33,7 +33,7 @@
 \fi
 
 \fi
-\gdef\a:usepackage{\use:package cleveref,xr,xr-hyper,eso-pic,showframe,expl3,savetrees,biblatex,xeCJK,ctex,polyglossia,fontspec,tikz,pdfbase,caption,graphics,xcolor,imakeidx,minted,fancyhdr,,!*?: }
+\gdef\a:usepackage{\use:package cleveref,xr,xr-hyper,eso-pic,showframe,expl3,savetrees,biblatex,xeCJK,ctex,polyglossia,fontspec,tikz,pdfbase,caption,graphics,xcolor,imakeidx,fancyhdr,,!*?: }
 \gdef\use:package#1,{%
    \if :#1:\def\:temp##1!*?: {}\else
       \def\:temp{#1}\ifx \@currname\:temp
@@ -143,22 +143,24 @@
 \def\:temp{polyglossia}\ifx \@currname\:temp
 \ExplSyntaxOn
 \:AtEndOfPackage{
-
+\ifdefined\orig_polyglossia at keys_define_lang:n\else
 \cs_set_eq:NN\orig_polyglossia at keys_define_lang:n\polyglossia at keys_define_lang:n
+%\let\orig_polyglossia at keys_define_lang:n\polyglossia at keys_define_lang:n
 \cs_set_protected:Npn \polyglossia at keys_define_lang:n #1 {
-  \orig_polyglossia at keys_define_lang:n{#1}
-  \keys_define:nn {polyglossia}{
-    #1 / direction
-    .  code:n = {},
-    #1 / script
-    .  code:n = {\ifdefined\XeTeXversion
-      \edef\:tempscript{\str_uppercase:f{\tl_head:n {#1}}\tl_tail:n{#1}}
-      \xeuniuseblock{#1}
-      \expandafter\xeuniuseblock\expandafter{\:tempscript}
-    \fi},
-  }
+   \orig_polyglossia at keys_define_lang:n{#1}
+   \keys_define:nn {polyglossia}{
+     #1 / direction
+     .  code:n = {},
+     #1 / script
+     .  code:n = {\ifdefined\XeTeXversion
+       \edef\:tempscript{\str_uppercase:f{\tl_head:n {#1}}\tl_tail:n{#1}}
+       \xeuniuseblock{#1}
+       \expandafter\xeuniuseblock\expandafter{\:tempscript}
+     \fi},
+   }
 }
 \def\RequireBidi{}%
+\fi
 }
 \ExplSyntaxOff
 \fi
@@ -217,11 +219,6 @@
 \def\:temp{imakeidx}\ifx\@currname\:temp
   \PassOptionsToPackage{noautomatic}{imakeidx}
 \fi
-\def\:temp{minted}\ifx\@currname\:temp
-  \:AtEndOfPackage{%
-    \define at booleankey{minted at opt@g}{breaklines}{}{}{}%
-  }
-\fi
 \def\:temp{fancyhdr}\ifx\@currname\:temp
   \:AtEndOfPackage{%
   \def\ps at fancy{}%



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