[tex4ht-commits] [SCM] tex4ht updated: r666 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Mon Feb 17 23:51:48 CET 2020
Author: michal_h21
Date: 2020-02-18 00:51:48 +0200 (Tue, 18 Feb 2020)
New Revision: 666
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
trunk/lit/tex4ht-sty.tex
Log:
Fixed support for command patching in the preamble
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2020-02-14 14:37:33 UTC (rev 665)
+++ trunk/lit/ChangeLog 2020-02-17 22:51:48 UTC (rev 666)
@@ -1,3 +1,11 @@
+2020-02-17 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-sty.tex (tex4ht.sty),
+ tex4ht-4ht.tex (usepackage-fontspec.4ht, usepackage.4ht): fixed support for
+ command patching in the document preamble. New command provided:
+ \:AtEndOfPackage.
+ https://puszcza.gnu.org.ua/bugs/?448
+
2020-02-14 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-html4.tex (html4.4ht): removed ignored letters from
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2020-02-14 14:37:33 UTC (rev 665)
+++ trunk/lit/tex4ht-4ht.tex 2020-02-17 22:51:48 UTC (rev 666)
@@ -879,15 +879,15 @@
\def\:temp{swpframe}\def\:tempa{#1}\ifx \:temp\:tempa
\ifx \GRAPHICSHP\:UnDef\else
\let\swp:GRAPHICSHP=\GRAPHICSHP
- \AtEndOfPackage{\let\GRAPHICSHP\swp:GRAPHICSHP}%
+ \:AtEndOfPackage{\let\GRAPHICSHP\swp:GRAPHICSHP}%
\fi
\ifx \graffile\:UnDef\else
\let\swp:graffile=\graffile
- \AtEndOfPackage{\let\graffile\swp:graffile}%
+ \:AtEndOfPackage{\let\graffile\swp:graffile}%
\fi
\ifx \GRAPHIC\:UnDef\else
\let\swp:GRAPHIC=\GRAPHIC
- \AtEndOfPackage{\let\GRAPHIC\swp:GRAPHIC}%
+ \:AtEndOfPackage{\let\GRAPHIC\swp:GRAPHIC}%
\fi
\fi
}
@@ -3437,7 +3437,7 @@
>>>
\<wait with xr\><<<
-\AtEndOfPackage{\let\XR:\XR@
+\:AtEndOfPackage{\let\XR:\XR@
\def\XR@[#1]#2{%
\Configure{AtBeginDocument}{\XR:[#1]{#2}}{}}%
}
@@ -3552,7 +3552,7 @@
it, so we can safely eat that.
\<wait with xr-hyper\><<<
-\AtEndOfPackage{\let\XR:\XR@
+\:AtEndOfPackage{\let\XR:\XR@
\def\XR@[#1][#2]#3{%
\AtBeginDocument{\XR:[#1][#2]{#3}}
}%
@@ -3594,7 +3594,7 @@
\def\:temp{expl3}\ifx \@currname\:temp
\ifdefined\XeTeXversion%
\xenunidelblock{Latin-expl3}%
-\AtEndOfPackage{\xeuniuseblock{Latin-expl3}}
+\:AtEndOfPackage{\xeuniuseblock{Latin-expl3}}
\fi
\fi
>>>
@@ -3626,7 +3626,7 @@
\<add to usepackage\><<<
\def\:temp{biblatex}\ifx \@currname\:temp
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\def\blx at mknoautolang{%
\blx at lbxinput{\blx at languagename}%
{}{}%
@@ -3674,7 +3674,7 @@
\<add to usepackage\><<<
\def\:temp{xeCJK}\ifx \@currname\:temp
\:dontusepackage{xeCJK}
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\RequirePackage{fontspec}
}
\DeclareDocumentCommand\setCJKmainfont{o m o}{}
@@ -3708,7 +3708,7 @@
\<add to usepackage\><<<
\def\:temp{polyglossia}\ifx \@currname\:temp
\ExplSyntaxOn
-\AtEndOfPackage{
+\:AtEndOfPackage{
\cs_set_eq:NN\orig_polyglossia at keys_define_lang:n\polyglossia at keys_define_lang:n
\cs_set_protected:Npn \polyglossia at keys_define_lang:n #1 {
@@ -3777,7 +3777,7 @@
\fi%
\PassOptionsToPackage{no-math}{fontspec}
\ExplSyntaxOn
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\tl_gset:Nx \l__fontspec_nfss_enc_tl {T1}
\tl_gset:Nx \g_fontspec_encoding_tl {T1}
\tl_gset:Nx \l__fontspec_ttfamily_encoding_tl {T1}
@@ -4047,7 +4047,7 @@
\<add to usepackage\><<<
\def\:temp{tikz}\ifx \@currname\:temp
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\let\use:tikzlibrary\usetikzlibrary
\def\find:externalize#1external#2\@nil{%
\if\relax#2\relax\else
@@ -4082,7 +4082,7 @@
\<add to usepackage\><<<
\def\:temp{pdfbase}\ifx\@currname\:temp
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\let\old:outputpage\@outputpage
\def\@outputpage{\old:outputpage{}}
}
@@ -11017,7 +11017,7 @@
\<add to usepackage\><<<
\def\:temp{caption}\ifx\@currname\:temp
-\AtEndOfPackage{%
+\:AtEndOfPackage{%
\long\def\caption at If@Package at Loaded#1[#2]#3#4{}
}
\fi
@@ -29681,7 +29681,7 @@
\<add to usepackage\><<<
\def\:temp{minted}\ifx\@currname\:temp
- \AtEndOfPackage{%
+ \:AtEndOfPackage{%
\define at booleankey{minted at opt@g}{breaklines}{}{}{}%
}
\fi
@@ -29700,7 +29700,7 @@
\<add to usepackage\><<<
\def\:temp{fancyhdr}\ifx\@currname\:temp
- \AtEndOfPackage{%
+ \:AtEndOfPackage{%
\def\ps at fancy{}%
}
\fi
Modified: trunk/lit/tex4ht-sty.tex
===================================================================
--- trunk/lit/tex4ht-sty.tex 2020-02-14 14:37:33 UTC (rev 665)
+++ trunk/lit/tex4ht-sty.tex 2020-02-17 22:51:48 UTC (rev 666)
@@ -591,16 +591,25 @@
\fi\fi
>>>
+Add support for package commands redefining
+
\<hook at usepackage\><<<
+\def\:AtEndOfPackage{\expandafter\g at addto@macro\csname pkg:end:hook:\@currname.sty\endcsname}
+\def\init:package:hooks#1{\expandafter\def\csname pkg:end:hook:#1\endcsname{}}
+\def\package:hooks#1{\csname pkg:end:hook:#1\endcsname}
+>>>
+
+\<hook at usepackage\><<<
\let\:onefilewithoptions\@onefilewithoptions
-\def\@onefilewithoptions#1[#2]{%
+\def\@onefilewithoptions#1[#2][#3]#4{%
+\init:package:hooks{#1.#4}%
\let\:temp\@reset at ptions
\def\@reset at ptions{%
\let\@reset at ptions\:temp
|<cats for usepackage|>\a:usepackage
|<recall usepackage cats|>}%
\def\:currentoptions{#2}
- \:onefilewithoptions#1[#2]}
+\:onefilewithoptions#1[#2][#3]{#4}\package:hooks{#1.#4}}
\def\a:usepackage{\input usepackage.4ht }
>>>
\<cats for usepackage\><<<
More information about the tex4ht-commits
mailing list.