texlive[57302] Master/texmf-dist/tex/generic/tex4ht: \AtBeginDocument

commits+karl at tug.org commits+karl at tug.org
Sat Jan 2 23:38:43 CET 2021


Revision: 57302
          http://tug.org/svn/texlive?view=revision&revision=57302
Author:   karl
Date:     2021-01-02 23:38:43 +0100 (Sat, 02 Jan 2021)
Log Message:
-----------
\AtBeginDocument fixes, tex4ht r857-859

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

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

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

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht	2021-01-02 22:38:43 UTC (rev 57302)
@@ -0,0 +1,29 @@
+% hyperref-hooks.4ht (2021-01-02-13:53), generated from tex4ht-4ht.tex
+% Copyright 2021 TeX Users Group
+% Copyright 2009-2021 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.
+\:AtEndOfPackage{%
+\@ifpackageloaded{nameref}{}
+{%
+   \let\sv:label\label
+   \RequirePackage{nameref}%
+   \let\label\sv:label
+   %\input nameref.4ht
+}}
+
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht	2021-01-02 22:23:23 UTC (rev 57301)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht	2021-01-02 22:38:43 UTC (rev 57302)
@@ -1,6 +1,6 @@
-% hyperref.4ht (2019-09-14-15:17), generated from tex4ht-4ht.tex
+% hyperref.4ht (2021-01-02-13:53), generated from tex4ht-4ht.tex
 % Copyright 1999-2009 Eitan M. Gurari
-% Copyright 2009-2019 TeX Users Group
+% Copyright 2009-2021 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,16 +17,9 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2019-09-14-15:17}
+\immediate\write-1{version 2021-01-02-13:53}
 
 \csname end:hyperref\endcsname
-\@ifpackageloaded{nameref}{}
-{
-   \let\sv:label\label
-   \RequirePackage{nameref}%
-   \let\label\sv:label
-   \input nameref.4ht
-}
 
 \expandafter\ifx \csname ifHy at texht\endcsname\relax
    \expand:after{\expandafter

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht	2021-01-02 22:23:23 UTC (rev 57301)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht	2021-01-02 22:38:43 UTC (rev 57302)
@@ -1,6 +1,6 @@
-% nameref.4ht (2019-12-23-13:36), generated from tex4ht-4ht.tex
+% nameref.4ht (2021-01-02-13:53), generated from tex4ht-4ht.tex
 % Copyright 2005-2009 Eitan M. Gurari
-% Copyright 2009-2019 TeX Users Group
+% Copyright 2009-2021 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2019-12-23-13:36}
+\immediate\write-1{version 2021-01-02-13:53}
 
    \let\NR:Type\relax
 \let\ltx at label\label
@@ -110,8 +110,10 @@
     \o:NRorg at begintheorem{#1}{#2}%
   }%
 
-\AtBeginDocument{%
-  \@ifpackageloaded{listings}{%
+% I don't know if this was useful for anything
+% but we cannot use it anymore
+% \AtBeginDocument{%
+\@ifpackageloaded{listings}{%
       \def\:tempc#1{%
          \gdef\NR:Title{\a:newlabel{listing}}%
          \gdef\NR:Type{lstlisting}%
@@ -118,14 +120,14 @@
          \o:NROrg at lst@MakeCaption:{#1}%
          \gdef\@currentlabelname{listing}}
       \HLet\NROrg at lst@MakeCaption\:tempc
-  }{}%
+}{}%
   % bug [348]
-  \def\:tempams{%
+\def\:tempams{%
     \gdef\NR:Title{\a:newlabel{equation}}%
     \gdef\NR:Type{equation}%
     \gdef\@currentlabelname{equation}%
-  }
-  \@ifpackageloaded{amsmath}{%
+}
+\@ifpackageloaded{amsmath}{%
      \Configure{@begin}{align}{\:tempams}
      \Configure{@begin}{multline}{\:tempams}
      \Configure{@begin}{equation}{\:tempams}
@@ -150,7 +152,6 @@
      \Configure{@begin}{equation}{\:tempams}
 }
 
-}
 \let\T:ref=\::ref
 \def\::ref{\protect\T at ref}
 \def\T at ref#1{%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2021-01-02 22:23:23 UTC (rev 57301)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2021-01-02 22:38:43 UTC (rev 57302)
@@ -1,8 +1,8 @@
 \ifnum\the\catcode`\%=14\else\expandafter\edef\csname
   \string:RestoreCatcodes\endcsname{\catcode`\%\the
   \catcode`\%}\catcode`\%14\fi
-% tex4ht.sty (2020-12-25-13:59), generated from tex4ht-sty.tex
-% Copyright 2009-2020 TeX Users Group
+% tex4ht.sty (2021-01-02-13:53), generated from tex4ht-sty.tex
+% Copyright 2009-2021 TeX Users Group
 % Copyright 1996-2009 Eitan M. Gurari
 %
 % This work may be distributed and/or modified under the
@@ -20,12 +20,17 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2020-12-25-13:59}
+\immediate\write-1{version 2021-01-02-13:53}
 
 
 \ifx  \Preamble\UnDef  \else
+   % fix for LaTeX hook system, \AtBeginDocument is not available at this moment
+   \let\origatbegindocument\AtBeginDocument
+   \def\AtBeginDocument#1{\AddToHook{begindocument/end}{#1}}
    \csname expand:after\endcsname{\csname
        BeforeTeXIVht\endcsname\let\BeforeTeXIVht\UnDef}
+   \let\AtBeginDocument\origatbegindocument
+
 \fi
 \def\writesixteen#1{\immediate\write99999{#1}}
 \expandafter\edef\csname :RestoreCatcodes\endcsname{%
@@ -171,13 +176,6 @@
      \global\let\ht:empty\empty \gdef\empty{}%
 \fi\fi
 %
-   %\expandafter\let\csname enddocument\endcsname\empty
-   %\end{document}%
-   \let\:begindocumenthook\@begindocumenthook
-\def\@begindocumenthook{\csname a:AtBeginDocument\endcsname
-\:begindocumenthook \csname b:AtBeginDocument\endcsname }%
-%
-   %\let\document\o:document
    \ifdefined\AddToHook%
       \def\document{\endgroup\o:document}%
       % use new LaTeX hook system to execute \Configure{AtBeginDocument}
@@ -184,6 +182,13 @@
       \AddToHook{begindocument/before}[tex4ht]{\csname a:AtBeginDocument\endcsname}
       \AddToHook{begindocument/end}[tex4ht]{\csname b:AtBeginDocument\endcsname}
    \else%
+      %\expandafter\let\csname enddocument\endcsname\empty
+      %\end{document}%
+      %\let\document\o:document
+      \let\:begindocumenthook\@begindocumenthook
+\def\@begindocumenthook{\csname a:AtBeginDocument\endcsname
+\:begindocumenthook \csname b:AtBeginDocument\endcsname }%
+%
       \let\document\o:document%
    \fi%
    \let\:latex at error\@latex at error



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