summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-13 23:32:50 +0000
committerKarl Berry <karl@freefriends.org>2011-02-13 23:32:50 +0000
commit0fe0153ae1f041e1e5e21dc0079587f5dc9612c2 (patch)
tree0796bff32d697b34ba3dccf8865bf706d3e0a521 /Master
parent8c01e7e9bb109cc006bac6234088ef1c55a7d072 (diff)
mylatexformat 3.4 (13feb11)
git-svn-id: svn://tug.org/texlive/trunk@21392 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdfbin201710 -> 201411 bytes
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv17
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx357
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins6
-rw-r--r--Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx199
5 files changed, 331 insertions, 248 deletions
diff --git a/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf b/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf
index c29cc3a6bfa..76b9f41f618 100644
--- a/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf
+++ b/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv
index 59ddbe0e637..7877865ec3e 100644
--- a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv
+++ b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% mylatexformat : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+%% mylatexformat : 2011/02/12 v3.4 - 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
@@ -25,27 +25,34 @@
%%
\edef\thisfile{\jobname}
\def\thisinfo{Make a format based on the preamble of any \texorpdfstring{\LaTeX{}}{LaTeX} file}
-\def\thisdate{2011/01/19}
-\def\thisversion{3.3}
+\def\thisdate{2011/02/12}
+\def\thisversion{3.4}
\let\loadclass\LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
+{\makeatletter{\endlinechar`\^^J\obeyspaces
+ \gdef\ErrorUpdate#1=#2,{\@ifpackagelater{#1}{#2}{}{\let\CheckDate\errmessage\toks@\expandafter{\the\toks@
+ \thisfile-documentation: updates required !
+ package #1 must be later than #2
+ to compile this documentation.}}}}%
+ \gdef\CheckDate#1{{\let\CheckDate\relax\toks@{}\@for\x:=#1\do{\expandafter\ErrorUpdate\x,}\CheckDate\expandafter{\the\toks@}}}}
+\AtBeginDocument{\DeleteShortVerb{\|}\CheckDate{interfaces=2011/01/26,tabu=2011/01/26}}
\PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToPackage{hyperfootnotes}{hyperref}
\documentclass[a4paper,oneside]{ltxdoc}
-\AtBeginDocument{\DeleteShortVerb{\|}}
\usepackage[latin1]{inputenc}
\usepackage[american]{babel}
\usepackage[T1]{fontenc}
\usepackage{etex,etoolbox,geometry,lastpage,xspace,xcolor,bbding,txfonts,atveryend,moresize,relsize}
\usepackage{tocloft,titlesec,graphicx,fancyhdr,framed,multirow,makecell,tabu,enumitem,needspace}
\usepackage{holtxdoc,bookmark,embedfile,tabu,keycommand}
+\usepackage{microtype}
\usepackage{interfaces}
\usetikz{basic}
\csname endofdump\endcsname
\CodelineNumbered
\usepackage{fancyvrb}\fvset{gobble=1,listparameters={\topsep=0pt}}
\lastlinefit999
-\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=1.5cm}
+\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=14mm}
\hypersetup{%
pdftitle={The mylatexformat package},
pdfsubject={Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file},
diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx
index 7c9845faa66..05d5d7e8cd0 100644
--- a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx
+++ b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-% mylatexformat : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file]
+% mylatexformat : 2011/02/12 v3.4 - 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
@@ -36,7 +36,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
+\Msg{* Package 2011/02/12 v3.4 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
\Msg{************************************************************************}
\keepsilent
@@ -47,7 +47,7 @@
This is a generated file.
-mylatexformat : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+mylatexformat : 2011/02/12 v3.4 - 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
@@ -98,27 +98,34 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%<*driver>
\edef\thisfile{\jobname}
\def\thisinfo{Make a format based on the preamble of any \texorpdfstring{\LaTeX{}}{LaTeX} file}
-\def\thisdate{2011/01/19}
-\def\thisversion{3.3}
+\def\thisdate{2011/02/12}
+\def\thisversion{3.4}
\let\loadclass\LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
+{\makeatletter{\endlinechar`\^^J\obeyspaces
+ \gdef\ErrorUpdate#1=#2,{\@ifpackagelater{#1}{#2}{}{\let\CheckDate\errmessage\toks@\expandafter{\the\toks@
+ \thisfile-documentation: updates required !
+ package #1 must be later than #2
+ to compile this documentation.}}}}%
+ \gdef\CheckDate#1{{\let\CheckDate\relax\toks@{}\@for\x:=#1\do{\expandafter\ErrorUpdate\x,}\CheckDate\expandafter{\the\toks@}}}}
+\AtBeginDocument{\DeleteShortVerb{\|}\CheckDate{interfaces=2011/01/26,tabu=2011/01/26}}
\PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToPackage{hyperfootnotes}{hyperref}
\documentclass[a4paper,oneside]{ltxdoc}
-\AtBeginDocument{\DeleteShortVerb{\|}}
\usepackage[latin1]{inputenc}
\usepackage[american]{babel}
\usepackage[T1]{fontenc}
\usepackage{etex,etoolbox,geometry,lastpage,xspace,xcolor,bbding,txfonts,atveryend,moresize,relsize}
\usepackage{tocloft,titlesec,graphicx,fancyhdr,framed,multirow,makecell,tabu,enumitem,needspace}
\usepackage{holtxdoc,bookmark,embedfile,tabu,keycommand}
+\usepackage{microtype}
\usepackage{interfaces}
\usetikz{basic}
\csname endofdump\endcsname
\CodelineNumbered
\usepackage{fancyvrb}\fvset{gobble=1,listparameters={\topsep=0pt}}
\lastlinefit999
-\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=1.5cm}
+\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=14mm}
\hypersetup{%
pdftitle={The mylatexformat package},
pdfsubject={Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file},
@@ -134,7 +141,7 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%</driver>
% \fi
%
-% \CheckSum{313}
+% \CheckSum{317}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -237,27 +244,39 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
% }\expandafter\thisyear\thisdate\@nil
% }
%
+% \def\declmargin{\hspace*\declmarginwidth }
+% \def\declmarginwidth{\dimexpr -\leftmargini +\arrayrulewidth +\tabcolsep\relax}
% \renewrobustcmd\declcs[2][]{^^A
% \if@nobreak \par\nobreak
% \else \par\addvspace\parskip
-% \needspace{\bottomtitlespace}\fi
-% \noindent\changefont{size+=2.5pt,spread=1,fam=\ttdefault}^^A
-% \hspace{-\leftmargini}^^A
-% \def\*{\unskip\,\texttt{*}}^^A
-% \begin{tabu}{|l|}^^A
-% \hline
+% \Needspace{.08\textheight}\fi
+% \changefont{size+=2.5pt,spread=1,fam=\ttdefault}^^A
+% \newcommand*\csanchor[2][]{\raisedhyperdef[14pt]{declcs}{##2}{\cs[{##1}]{##2}}}^^A
+% \def\*{\unskip\,\texttt{*}}\noindent
+% \hskip-\leftmargini
+% \begin{tabu}{|l|}\hline
% \expandafter\SpecialUsageIndex\csname #2\endcsname
-% \raisedhyperdef[14pt]{declcs}{#2}{\cs[{#1}]{#2}}^^A
-% }^^A
+% \csanchor[{#1}]{#2}}
% \renewcommand\enddeclcs{%
-% \crcr \hline
-% \end{tabu}%
-% \nobreak \par \nobreak
-% \noindent
+% \crcr \hline \end{tabu}\nobreak
+% \par \nobreak \noindent
% \ignorespacesafterend
% }
% \newrobustcmd*\csref[2][]{\hyperref{}{declcs}{#2}{\cs[{#1}]{#2}}}
%
+% \let\plainllap\llap
+% \newrobustcmd\macro@llap[1]{{\global\let\llap\plainllap
+% \setbox0=\hbox\bgroup \raisedhyperdef{macro}{\saved@macroname}{#1}\egroup
+% \ifdim\wd0>2.4cm
+% \hbox to\z@ \bgroup\hss \hbox to2.4cm{\unhcopy0\hss}\egroup
+% \edef\@tempa{\hskip\dimexpr\the\wd0-2.4cm}\global\everypar\expandafter{\the\expandafter\everypar
+% \@tempa \global\everypar{}}^^A
+% \else \llap{\unhbox0}\fi}}
+% \pretocmd\macro{\if@nobreak\else\Needspace{2\baselineskip}\fi
+% \MacrocodeTopsep\z@skip \MacroTopsep\z@skip \parsep\z@ \topsep\z@ \itemsep\z@ \partopsep\z@
+% \let\llap\macro@llap}{}{}
+% \apptocmd\endmacro{\goodbreak\vskip.3\parskip}{}{}
+% \newrobustcmd\macroref[2][]{\hyperref{}{macro}{#2}{\cs[{#1}]{#2}}}
%
% \DefineVerbatimEnvironment{Verb}{Verbatim}{gobble=1}
% \DefineVerbatimEnvironment{VerbLines}{Verbatim}{gobble=1,frame=lines,framesep=6pt,fontfamily=txtt,fontseries=b}
@@ -315,14 +334,10 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
% \newrobustcmd*\IMPLEMENTATION{%
% \bookmarksetup{openlevel=1}
% ^^A\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=1.5cm}
-% \newgeometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=3cm,right=2mm}
+% \newgeometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=3cm,right=5mm}
% \pagesetup*{left/offset-=1cm,right/offset-=1.5cm-2mm}
% \section{Implementation} \label{sec:implementation}
% }
-% \renewrobustcmd*\PrintMacroName[1]{%
-% \setbox0\hbox{\MacroFont \strut \string #1\ }%
-% \global\labelsep\dimexpr\wd0-3em\relax\global\itemindent\labelsep
-% \hbox to4em{\box0\hss}}
%
% \makeatother
%
@@ -438,8 +453,9 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
% section/skip=4pt plus2pt minus2pt,
% subsection/skip=4pt plus2pt minus2pt,
% title=Contents,
+% title/skip=2pt,
% title/after={\pkgcolor\quad\leaders\vrule height3.4pt depth-3pt\hfill\null},
-% after=\leavevmode{\pkgcolor\hrule},
+% multicols/afterend=\leavevmode{\pkgcolor\hrule},
% twocolumns,
% bookmark={text=Contents,bold},
% }
@@ -491,7 +507,7 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%
% Some users told me they typed the following command line:
%
-% \quad+latex -ini -jobname="thenameoffmtfile" "&latex" mylatexformat.ltx """abc.tex"""+
+% +latex -ini -jobname="fmt-file-name" "&latex" mylatexformat.ltx """abc.tex"""+
%
% \section{Using a format}
%
@@ -566,7 +582,7 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%%% mylatexformat.ltx
%%% ^^^^^^^^^^^^^^^^^
%%% From an original idea by David Carlisle - mylatex.ltx 1994/09/27
-%%% © lppl 2010-2011 - F Chervet - 2011/01/19 v3.3
+%%% © lppl 2010-2011 - F Chervet - 2011/02/12 v3.4
%%% _____________________________________________________________________
%%%
%%% Use this file to make a format based on the preamble of any LaTeX
@@ -714,96 +730,174 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%% Thanks to Ross Moore for pointing out \AtBeginDocument is too late
%% eg changebar package *closes* the stream in \AtBeginDocument, so need
%% to make sure it is opened before that. Make a special purpose hook.
-%%
-%% Save the original definition.
\makeatletter
-\let\etex@primitive@openout \openout
-\let\ltx@listfiles\listfiles
-\def\openout#1 {\g@addto@macro\MYLATEX@opens{\immediate\openout#1 }}
-\def\MYLATEX@opens{%
- \let\openout\etex@primitive@openout
- \let\etex@primitive@openout\@undefined
-}% \MYLATEX@opens
-\def\MYLATEX@cmap@hook{%
- {\@for\x:={lae,lfe,lgr,ot1,ot1tt,ot6,t1,t2a,t2b,t2c,t5}\do{%
- \expandafter\MYLATEX@cmap@h@@k \x\@nil
- \uppercase\expandafter{\expandafter\MYLATEX@cmap@h@@k \x\@nil}}}%
- \global\let\MYLATEX@cmap@h@@k \@undefined
- \global\let\MYLATEX@cmap@hook \@undefined
-}% \MYLATEX@cmap@hook
-\def\MYLATEX@cmap@h@@k #1\@nil{%
- \ifcsname cmap@set@#1\endcsname
- \global\expandafter\let\csname cmap@set@#1\endcsname \@undefined
- \fi
-}% \MYLATEX@cmap@h@@k
+% \end{macrocode}
+%
+%
+% \begin{macro}{\begin}
+%
+% \cs{begin} is overloaded in order to stop \cs{dump} at begin document
+% if the macro \cs{endofdump} is not given somewhere in the preamble.
+% Rem: it is NOT POSSIBLE to redefine \cs{document}, for the macro
+% \cs{document} is changed or patched by some classes or packages
+% (\xpackage{auxhook}, \xpackage{etoolbox} etc.)
+%
+% With \Xpackage{etoolbox} version \textt{2.1} and earlier, \cs{begin} is patched,
+% in order to insert the hooks \cs{AtBeginEnvironment} and \cs{AtEndEnvironment}.
+%
+% Therefore, it's not possible to restore, at end of dump, the orginal definition
+% of \cs{begin} in the \LaTeX{} kernel. Instead, \thispackage inserts a reversible
+% patch of the \cs{begin} command: the patched is reversed at end of dump by
+% \macroref{MYLATEX@cleanup}.
+%
+% \begin{macrocode}
%% \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
%% \document is changed or patched by some classes or packages
%% (auxhook, etoolbox etc.)
-{
- \def\x #1{\gdef\begin ##1{\MYLATEX@StopAtdocument{##1}#1}%
- }\expandafter\x\expandafter{\begin{#1}}%
-}
-\def\MYLATEX@restore@begin{%
- \long\def\MYLATEX@restore@begin##1\MYLATEX@StopAtdocument##2##3\@nil{%
- \gdef\begin ####1{##1##3}%
- }\expandafter\MYLATEX@restore@begin\begin{##1}\@nil
- \global\let\MYLATEX@restore@begin \@undefined
- \global\let\MYLATEX@StopAtdocument \@undefined
-}% \MYLATEX@restore@begin
-\def\MYLATEX@StopAtdocument#1{%
- \expandafter\ifx\csname#1\endcsname\document
- \expandafter\endofdump\fi
+\begingroup \def\x #1{\endgroup
+ \gdef\begin ##1{\MYLATEX@StopAtdocument{##1}#1}
+}\expandafter\x\expandafter{\begin{#1}}
+\def\MYLATEX@StopAtdocument #1{\expandafter
+ \ifx\csname #1\endcsname\document \expandafter\endofdump \fi
}% \MYLATEX@StopAtdocument
-%% The version of \document to use on the initex run.
-%% Just preloads some fonts, puts back \document and \openout,
-%% sets up the banner to display the file list of files preloaded,
-%% then sets up some special catcodes so the preamble will be
-%% skipped on normal runs with the new format.
-\def\endofdump{%
-%% Force some font preloading.
- {\setbox\z@\hbox{%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\openout}
+%
+% Files cannot be opened out during the building of the format.
+% Instead, \cs{openout} is delayed until the end of the dump.
+%
+% \begin{macrocode}
+\let\MYLATEX@openout \openout
+\def\openout#1 {\g@addto@macro\MYLATEX@opens{\immediate\openout#1 }}
+\def\MYLATEX@opens {\let\MYLATEX@opens \@undefined}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MYLATEX@cleanup}
+%
+% Final clean up done at \cs{endofdump}: reverse the path for \cs{begin}
+% and restores \cs{openout} primitive.
+%
+% \begin{macrocode}
+\def\MYLATEX@cleanup {\let\MYLATEX@cleanup \@undefined
+ \def\MYLATEX@StopAtdocument ##1\MYLATEX@StopAtdocument ##2##3\@nil{%
+ \gdef\begin ####1{##1##3}%
+ }\expandafter\MYLATEX@StopAtdocument \begin{##1}\@nil
+ \let\openout \MYLATEX@openout
+ \let\MYLATEX@openout \@undefined
+ \let\MYLATEX@StopAtdocument \@undefined
+}% \MYLATEX@cleanup
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\MYLATEX@fontpreloading}
+%
+% Some font can be preloaded: this gives an advantage to the format.
+%
+% A hook for \CTANpackage{cmap} is necessary.
+%
+% \begin{macrocode}
+\def\MYLATEX@fontpreloading{\let\MYLATEX@fontpreloading \@undefined
+ \begingroup \setbox0=\hbox {%
$$% math (not bold, some setups don't have \boldmath)
- \normalfont% normal
- {\bfseries\itshape}{\itshape}\ttfamily\sffamily
- \ifdefined\large\large\fi
- \ifdefined\Large\Large\fi
- \ifdefined\LARGE\LARGE\fi
- \ifdefined\Huge\Huge\fi
- \ifdefined\small\small\fi
- \ifdefined\footnotesize\footnotesize\fi
- \ifdefined\tiny\tiny\fi
- }}%
- \let\openout \etex@primitive@openout% just in case - normally not necessary
- \MYLATEX@restore@begin
- \MYLATEX@cmap@hook
+ \def\x {\bfseries\itshape}{\itshape}\ttfamily\sffamily
+ \normalfont \x
+ \ifdefined\large \large \x \fi
+ \ifdefined\Large \Large \x \fi
+ \ifdefined\LARGE \LARGE \x \fi
+ \ifdefined\Huge \Huge \x \fi
+ \ifdefined\small \small \x \fi
+ \ifdefined\footnotesize \footnotesize \x \fi
+ \ifdefined\tiny \tiny \x \fi}%
+ \@for\x:={lae,lfe,lgr,ot1,ot1tt,ot6,t1,t2a,t2b,t2c,t5}\do{%
+ \ifcsname cmap@set@\x\endcsname \global\expandafter
+ \let\csname cmap@set@\x\endcsname \@undefined \fi
+ \uppercase\expandafter{\expandafter\def\expandafter\x\expandafter{\x}}%
+ \ifcsname cmap@set@\x\endcsname \global\expandafter
+ \let\csname cmap@set@\x\endcsname \@undefined \fi}%
+ \endgroup
+}% \MYLATEX@fontpreloading
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\endofdump}
+%
+%
+% \begin{macrocode}
+\let\MYLATEX@listfiles \listfiles
+\def\endofdump{\let\endofdump \relax
+ \MYLATEX@cleanup
+ \MYLATEX@fontpreloading
\makeatother
\everyjob\expandafter{\the\everyjob
- \begingroup
- \listfiles\let\listfiles\ltx@listfiles
- \expandafter\MYLATEXcustomised\@dofilelist
- \endgroup
- \MYLATEX@scan@preamble
- }%
- \let\endofdump\relax
+ \let\MYLATEX@temp \listfiles
+ {%
+ \MYLATEX@listfiles
+ \global\let\MYLATEX@listfiles \@undefined
+ \expandafter\MYLATEX@banner \@dofilelist
+ }%
+ \let\listfiles \MYLATEX@temp % to be able to used \listfiles once after the format
+ \let\MYLATEX@temp \@undefined
+ \MYLATEX@scanpreamble}%
\dump
- }
+}% \endofdump
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\MYLATEX@banner}
+% \begin{macro}{\MYLATEX@start}
+%
+% Set to be expanded at \cs{everyjob}: displays a banner in the log file.
+%
+% \begin{macrocode}
%% Banner for \everyjob.
-\edef\MYLATEXcustomised#1#2#3\typeout#4{%
- \noexpand\typeout{%
- ==============================================================================}%
- \noexpand\typeout{%
- JOB NAME\noexpand\@spaces\noexpand\@spaces\noexpand\space\noexpand\space:%
- \string"\noexpand\jobname\string"}%
- \noexpand\typeout{CUSTOMISED FORMAT :\string"\jobname\string"}%
- \noexpand\typeout{PRELOADED FILES:}%
+{\@makeother\" % just in case
+\xdef\MYLATEX@banner #1#2#3\typeout #4{%
+ \global\let\noexpand\MYLATEX@banner \noexpand\@undefined
+ \newlinechar`\noexpand\^^J\message{%
+ ==============================================================================^^J%
+ JOB NAME\@spaces\@spaces\space: "\noexpand\jobname"^^J%
+ CUSTOMISED FORMAT: "\jobname"^^J%
+ PRELOADED FILES:^^J}%
#3%
- \noexpand\typeout{%
+ \message{%
+ ==============================================================================}%
+}% \MYLATEX@banner
+\long\gdef\MYLATEX@start #1#2{\global\let\MYLATEX@start \@undefined
+ \message{%
+ (mylatexformat)Info: start reading document "\jobname"^^J%
+ (mylatexformat)\@spaces\space\on@line.
+ (\ifcase#1 \string\endofdump\else\string\begin{document}\fi)^^J%
==============================================================================}%
- \noexpand\typeout{(mylatexformat)Info: start reading document
- \string"\noexpand\jobname\string"}%
-}% \MYLATEXcustomised
+ \endgroup
+ \MYLATEX@opens\relax #2%
+}% \MYLATEX@start
+}% \catcode group
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\MYLATEX@scanpreamble}
+%
+% While the preamble is being skipped (inside a group)
+% the EOL is active and defined to grab each line and
+% inspect it looking for :
+% \begin{Verbatim}
+% \endofdump
+% or \csname endofdump\endcsname
+% or \begin{document}
+% \end{Verbatim}
+%
+% \begin{macrocode}
%% While the preamble is being skipped (inside a group)
%% the EOL is active and defined to grab each line and
%% inspect it looking for :
@@ -815,36 +909,28 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
%% first TeX command in the file, so as to avoid problems with
%% the special processing that TeX does on the first line, choosing
%% the format, or the file name etc.
-{% Entering simple groupe (level 1) => skip the preamble
-\catcode`\^^M=\active
-\catcode`\& 8 %
-\long\gdef\MYLATEX@start#1#2{%
- \typeout{(mylatexformat)\@spaces\space\on@line.\space(%
- \ifcase#1 \string\endofdump\else\string\begin{document}\fi)}%
- \typeout{%
- ==============================================================================}%
- \endgroup%
- \catcode`\^^M=5\relax \let^^M\par%
- \MYLATEX@opens#2%
-}% \MYLATEX@start
-\long\gdef\MYLATEX@scan@preamble{\catcode`\^^M=13\relax%
- \begingroup%
- \long\def\MYLATEX@endofdump##1\endofdump##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@endofdump@cs##1\csname endofdump\endcsname##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@document ##1document##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@begindocument##1\begin##2##3\MYLATEX##4{%
- \MYLATEX@document ##2document&&{\MYLATEX@start1{##4}}{^^M}\MYLATEX}%
- \long\gdef^^M##1^^M{%
- \MYLATEX@endofdump##1\endofdump&&%
- {\MYLATEX@start0{##1}}%
- {\MYLATEX@endofdump@cs##1\csname endofdump\endcsname&&%
- {\MYLATEX@start0{##1}}%
- {\MYLATEX@begindocument##1\begin\relax\MYLATEX{##1}}%
- \MYLATEX}%
- \MYLATEX}%
-^^M}% \MYLATEX@scan@preamble
-}% Leaving simple group (level 1) => start reading document
+{% catcode group
+\catcode`\^^M=13 \catcode`\& =8 %
+\long\gdef\MYLATEX@scanpreamble {%
+ \begingroup \catcode`\^^M=13%
+ \long\def\MYLATEX@endofdump ##1\endofdump##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@csendofdump ##1\csname endofdump\endcsname##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@document ##1document##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@begindocument ##1\begin##2##3\MYLATEX##4{%
+ \MYLATEX@document ##2document&&{\MYLATEX@start1{##4}}{^^M}\MYLATEX}%
+ \long\def^^M##1^^M{%
+ \MYLATEX@endofdump##1\endofdump&&%
+ {\MYLATEX@start 0{##1}}%
+ {\MYLATEX@csendofdump ##1\csname endofdump\endcsname&&%
+ {\MYLATEX@start 0{##1}}%
+ {\MYLATEX@begindocument ##1\begin\relax\MYLATEX{##1}}%
+ \MYLATEX}%
+ \MYLATEX}%
+ ^^M%
+}% \MYLATEX@scanpreamble
+}% catcode group
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%% Trick lookahead to allow mylatex.ltx and the document filename to be
@@ -857,6 +943,10 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
% \begin{History}
% \sectionformat\subsection{font+=\smaller,bottom=\smallskipamount,top=\medskipamount}
%
+% \begin{Version}{2011/02/12 v3.4}\HistLabel{3.4}
+% \item Reorganisation of the code + optimisation.
+% \end{Version}
+%
% \begin{Version}{2011/01/19 v3.3}\HistLabel{3.3}
% \item Modification of the code for \cs{begin} in order to keep the patching introduced by
% \CTANpackage{etoolbox} version \textt{2.1} for the hooks \cs{AtBeginEnvironment}...\cs{AtEndEnvironement}.
@@ -895,6 +985,7 @@ Copyright (C) 2010-2011 by Florent Chervet <florent.chervet@free.fr>
% \end{History}
%
% ^^A\restoregeometry\pagesetup*{left/offset+=1cm,right/offset+=1.5cm-2mm}
+% \clearpage
% \PrintIndex
%
% \Finale \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins
index d393483482e..ad2cf3196d5 100644
--- a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins
+++ b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% mylatexformat : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+%% mylatexformat : 2011/02/12 v3.4 - 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
@@ -26,7 +26,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
+\Msg{* Package 2011/02/12 v3.4 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
\Msg{************************************************************************}
\keepsilent
@@ -37,7 +37,7 @@
This is a generated file.
-mylatexformat : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+mylatexformat : 2011/02/12 v3.4 - 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
diff --git a/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx b/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx
index 629824038d0..cb5a76ae676 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 : 2011/01/19 v3.3 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+%% mylatexformat : 2011/02/12 v3.4 - 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
@@ -27,7 +27,7 @@
%%% mylatexformat.ltx
%%% ^^^^^^^^^^^^^^^^^
%%% From an original idea by David Carlisle - mylatex.ltx 1994/09/27
-%%% ^^a9 lppl 2010-2011 - F Chervet - 2011/01/19 v3.3
+%%% ^^a9 lppl 2010-2011 - F Chervet - 2011/02/12 v3.4
%%% _____________________________________________________________________
%%%
%%% Use this file to make a format based on the preamble of any LaTeX
@@ -175,96 +175,90 @@
%% Thanks to Ross Moore for pointing out \AtBeginDocument is too late
%% eg changebar package *closes* the stream in \AtBeginDocument, so need
%% to make sure it is opened before that. Make a special purpose hook.
-%%
-%% Save the original definition.
\makeatletter
-\let\etex@primitive@openout \openout
-\let\ltx@listfiles\listfiles
-\def\openout#1 {\g@addto@macro\MYLATEX@opens{\immediate\openout#1 }}
-\def\MYLATEX@opens{%
- \let\openout\etex@primitive@openout
- \let\etex@primitive@openout\@undefined
-}% \MYLATEX@opens
-\def\MYLATEX@cmap@hook{%
- {\@for\x:={lae,lfe,lgr,ot1,ot1tt,ot6,t1,t2a,t2b,t2c,t5}\do{%
- \expandafter\MYLATEX@cmap@h@@k \x\@nil
- \uppercase\expandafter{\expandafter\MYLATEX@cmap@h@@k \x\@nil}}}%
- \global\let\MYLATEX@cmap@h@@k \@undefined
- \global\let\MYLATEX@cmap@hook \@undefined
-}% \MYLATEX@cmap@hook
-\def\MYLATEX@cmap@h@@k #1\@nil{%
- \ifcsname cmap@set@#1\endcsname
- \global\expandafter\let\csname cmap@set@#1\endcsname \@undefined
- \fi
-}% \MYLATEX@cmap@h@@k
%% \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
%% \document is changed or patched by some classes or packages
%% (auxhook, etoolbox etc.)
-{
- \def\x #1{\gdef\begin ##1{\MYLATEX@StopAtdocument{##1}#1}%
- }\expandafter\x\expandafter{\begin{#1}}%
-}
-\def\MYLATEX@restore@begin{%
- \long\def\MYLATEX@restore@begin##1\MYLATEX@StopAtdocument##2##3\@nil{%
- \gdef\begin ####1{##1##3}%
- }\expandafter\MYLATEX@restore@begin\begin{##1}\@nil
- \global\let\MYLATEX@restore@begin \@undefined
- \global\let\MYLATEX@StopAtdocument \@undefined
-}% \MYLATEX@restore@begin
-\def\MYLATEX@StopAtdocument#1{%
- \expandafter\ifx\csname#1\endcsname\document
- \expandafter\endofdump\fi
+\begingroup \def\x #1{\endgroup
+ \gdef\begin ##1{\MYLATEX@StopAtdocument{##1}#1}
+}\expandafter\x\expandafter{\begin{#1}}
+\def\MYLATEX@StopAtdocument #1{\expandafter
+ \ifx\csname #1\endcsname\document \expandafter\endofdump \fi
}% \MYLATEX@StopAtdocument
-%% The version of \document to use on the initex run.
-%% Just preloads some fonts, puts back \document and \openout,
-%% sets up the banner to display the file list of files preloaded,
-%% then sets up some special catcodes so the preamble will be
-%% skipped on normal runs with the new format.
-\def\endofdump{%
-%% Force some font preloading.
- {\setbox\z@\hbox{%
+\let\MYLATEX@openout \openout
+\def\openout#1 {\g@addto@macro\MYLATEX@opens{\immediate\openout#1 }}
+\def\MYLATEX@opens {\let\MYLATEX@opens \@undefined}
+\def\MYLATEX@cleanup {\let\MYLATEX@cleanup \@undefined
+ \def\MYLATEX@StopAtdocument ##1\MYLATEX@StopAtdocument ##2##3\@nil{%
+ \gdef\begin ####1{##1##3}%
+ }\expandafter\MYLATEX@StopAtdocument \begin{##1}\@nil
+ \let\openout \MYLATEX@openout
+ \let\MYLATEX@openout \@undefined
+ \let\MYLATEX@StopAtdocument \@undefined
+}% \MYLATEX@cleanup
+\def\MYLATEX@fontpreloading{\let\MYLATEX@fontpreloading \@undefined
+ \begingroup \setbox0=\hbox {%
$$% math (not bold, some setups don't have \boldmath)
- \normalfont% normal
- {\bfseries\itshape}{\itshape}\ttfamily\sffamily
- \ifdefined\large\large\fi
- \ifdefined\Large\Large\fi
- \ifdefined\LARGE\LARGE\fi
- \ifdefined\Huge\Huge\fi
- \ifdefined\small\small\fi
- \ifdefined\footnotesize\footnotesize\fi
- \ifdefined\tiny\tiny\fi
- }}%
- \let\openout \etex@primitive@openout% just in case - normally not necessary
- \MYLATEX@restore@begin
- \MYLATEX@cmap@hook
+ \def\x {\bfseries\itshape}{\itshape}\ttfamily\sffamily
+ \normalfont \x
+ \ifdefined\large \large \x \fi
+ \ifdefined\Large \Large \x \fi
+ \ifdefined\LARGE \LARGE \x \fi
+ \ifdefined\Huge \Huge \x \fi
+ \ifdefined\small \small \x \fi
+ \ifdefined\footnotesize \footnotesize \x \fi
+ \ifdefined\tiny \tiny \x \fi}%
+ \@for\x:={lae,lfe,lgr,ot1,ot1tt,ot6,t1,t2a,t2b,t2c,t5}\do{%
+ \ifcsname cmap@set@\x\endcsname \global\expandafter
+ \let\csname cmap@set@\x\endcsname \@undefined \fi
+ \uppercase\expandafter{\expandafter\def\expandafter\x\expandafter{\x}}%
+ \ifcsname cmap@set@\x\endcsname \global\expandafter
+ \let\csname cmap@set@\x\endcsname \@undefined \fi}%
+ \endgroup
+}% \MYLATEX@fontpreloading
+\let\MYLATEX@listfiles \listfiles
+\def\endofdump{\let\endofdump \relax
+ \MYLATEX@cleanup
+ \MYLATEX@fontpreloading
\makeatother
\everyjob\expandafter{\the\everyjob
- \begingroup
- \listfiles\let\listfiles\ltx@listfiles
- \expandafter\MYLATEXcustomised\@dofilelist
- \endgroup
- \MYLATEX@scan@preamble
- }%
- \let\endofdump\relax
+ \let\MYLATEX@temp \listfiles
+ {%
+ \MYLATEX@listfiles
+ \global\let\MYLATEX@listfiles \@undefined
+ \expandafter\MYLATEX@banner \@dofilelist
+ }%
+ \let\listfiles \MYLATEX@temp % to be able to used \listfiles once after the format
+ \let\MYLATEX@temp \@undefined
+ \MYLATEX@scanpreamble}%
\dump
- }
+}% \endofdump
%% Banner for \everyjob.
-\edef\MYLATEXcustomised#1#2#3\typeout#4{%
- \noexpand\typeout{%
- ==============================================================================}%
- \noexpand\typeout{%
- JOB NAME\noexpand\@spaces\noexpand\@spaces\noexpand\space\noexpand\space:%
- \string"\noexpand\jobname\string"}%
- \noexpand\typeout{CUSTOMISED FORMAT :\string"\jobname\string"}%
- \noexpand\typeout{PRELOADED FILES:}%
+{\@makeother\" % just in case
+\xdef\MYLATEX@banner #1#2#3\typeout #4{%
+ \global\let\noexpand\MYLATEX@banner \noexpand\@undefined
+ \newlinechar`\noexpand\^^J\message{%
+ ==============================================================================^^J%
+ JOB NAME\@spaces\@spaces\space: "\noexpand\jobname"^^J%
+ CUSTOMISED FORMAT: "\jobname"^^J%
+ PRELOADED FILES:^^J}%
#3%
- \noexpand\typeout{%
+ \message{%
+ ==============================================================================}%
+}% \MYLATEX@banner
+\long\gdef\MYLATEX@start #1#2{\global\let\MYLATEX@start \@undefined
+ \message{%
+ (mylatexformat)Info: start reading document "\jobname"^^J%
+ (mylatexformat)\@spaces\space\on@line.
+ (\ifcase#1 \string\endofdump\else\string\begin{document}\fi)^^J%
==============================================================================}%
- \noexpand\typeout{(mylatexformat)Info: start reading document
- \string"\noexpand\jobname\string"}%
-}% \MYLATEXcustomised
+ \endgroup
+ \MYLATEX@opens\relax #2%
+}% \MYLATEX@start
+}% \catcode group
+
%% While the preamble is being skipped (inside a group)
%% the EOL is active and defined to grab each line and
%% inspect it looking for :
@@ -276,35 +270,26 @@
%% first TeX command in the file, so as to avoid problems with
%% the special processing that TeX does on the first line, choosing
%% the format, or the file name etc.
-{% Entering simple groupe (level 1) => skip the preamble
-\catcode`\^^M=\active
-\catcode`\& 8 %
-\long\gdef\MYLATEX@start#1#2{%
- \typeout{(mylatexformat)\@spaces\space\on@line.\space(%
- \ifcase#1 \string\endofdump\else\string\begin{document}\fi)}%
- \typeout{%
- ==============================================================================}%
- \endgroup%
- \catcode`\^^M=5\relax \let^^M\par%
- \MYLATEX@opens#2%
-}% \MYLATEX@start
-\long\gdef\MYLATEX@scan@preamble{\catcode`\^^M=13\relax%
- \begingroup%
- \long\def\MYLATEX@endofdump##1\endofdump##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@endofdump@cs##1\csname endofdump\endcsname##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@document ##1document##2##3&##4##5##6\MYLATEX{##5}%
- \long\def\MYLATEX@begindocument##1\begin##2##3\MYLATEX##4{%
- \MYLATEX@document ##2document&&{\MYLATEX@start1{##4}}{^^M}\MYLATEX}%
- \long\gdef^^M##1^^M{%
- \MYLATEX@endofdump##1\endofdump&&%
- {\MYLATEX@start0{##1}}%
- {\MYLATEX@endofdump@cs##1\csname endofdump\endcsname&&%
- {\MYLATEX@start0{##1}}%
- {\MYLATEX@begindocument##1\begin\relax\MYLATEX{##1}}%
- \MYLATEX}%
- \MYLATEX}%
-^^M}% \MYLATEX@scan@preamble
-}% Leaving simple group (level 1) => start reading document
+{% catcode group
+\catcode`\^^M=13 \catcode`\& =8 %
+\long\gdef\MYLATEX@scanpreamble {%
+ \begingroup \catcode`\^^M=13%
+ \long\def\MYLATEX@endofdump ##1\endofdump##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@csendofdump ##1\csname endofdump\endcsname##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@document ##1document##2##3&##4##5##6\MYLATEX {##5}%
+ \long\def\MYLATEX@begindocument ##1\begin##2##3\MYLATEX##4{%
+ \MYLATEX@document ##2document&&{\MYLATEX@start1{##4}}{^^M}\MYLATEX}%
+ \long\def^^M##1^^M{%
+ \MYLATEX@endofdump##1\endofdump&&%
+ {\MYLATEX@start 0{##1}}%
+ {\MYLATEX@csendofdump ##1\csname endofdump\endcsname&&%
+ {\MYLATEX@start 0{##1}}%
+ {\MYLATEX@begindocument ##1\begin\relax\MYLATEX{##1}}%
+ \MYLATEX}%
+ \MYLATEX}%
+ ^^M%
+}% \MYLATEX@scanpreamble
+}% catcode group
%% 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%