From b3ba42c57f43aa4acf39c30b4fc092ffdbf63269 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 12 Jun 2010 00:10:19 +0000 Subject: mylatexformat 2 (11jun10) git-svn-id: svn://tug.org/texlive/trunk@18899 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/mylatexformat/mylatexformat.ltx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/latex/mylatexformat') diff --git a/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx b/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx index 02454aaeec3..90656e39f6b 100644 --- a/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx +++ b/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% mylatexformat : 2010/04/30 v1.0 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +%% mylatexformat : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -177,8 +177,12 @@ %% Save the original definition. \makeatletter \let\etex@primitive@openout\openout -\def\openout#1 {\g@addto@macro\MYLATEXopens{\immediate\etex@primitive@openout#1 }} -\let\MYLATEXopens\@empty +\let\ltx@listfiles\listfiles +\def\openout#1 {\g@addto@macro\MYLATEXopens{\immediate\openout#1 }} +\def\MYLATEXopens{% + \let\openout\etex@primitive@openout + \let\etex@primitive@openout\ltx@undefined +}% \MYLATEXopens %% \begin is overloaded in order to stop \dump at begin document %% if the macro \endofdump is not given somewhere in the preamble. %% Rem: it is NOT POSSIBLE to redefine \document, for the macro @@ -209,14 +213,14 @@ \ifdefined\footnotesize\footnotesize\fi \ifdefined\tiny\tiny\fi }}% - \let\openout\etex@primitive@openout - \let\etex@primitive@openout\@undefined + \let\openout\etex@primitive@openout% just in case - normally not necessary \let\begin\MYLATEX@latex@begin \let\MYLATEX@latex@begin\@undefined + \the\MYLATEX@hook\MYLATEX@hook{}% \makeatother \everyjob\expandafter{\the\everyjob \begingroup - \listfiles + \listfiles\let\listfiles\ltx@listfiles \expandafter\MYLATEXcustomised\@dofilelist \endgroup}% \catcode`\\=13\relax% @@ -276,6 +280,9 @@ /MYLATEX}% ^^M}% }% Leaving simple groupe (level 1) => start reading document +\newtoks\MYLATEX@hook +\def\AtEndOfDump{\addto@hook\MYLATEX@hook} +\AtEndOfDump{\let\AtEndOfDump\@undefined} %% Trick lookahead to allow mylatex.ltx and the document filename to be %% given on the same command line. (initex &latex mylatex.ltx {abc.tex}) \expandafter\input\endinput% -- cgit v1.2.3