summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-11 23:11:32 +0000
committerKarl Berry <karl@freefriends.org>2010-09-11 23:11:32 +0000
commite16ae21498b4050f8b5da37be8d641b0bb82836d (patch)
tree867afababef7a86d3856c804d4c7407eb1a7a3b9 /Master/texmf-dist/source
parent0c1f6514a45df2435cee747b545af2116886bc1a (diff)
mylatexformat 2.9 (11aug10)
git-svn-id: svn://tug.org/texlive/trunk@19664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv6
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx167
-rw-r--r--Master/texmf-dist/source/latex/mylatexformat/mylatexformat.ins8
3 files changed, 86 insertions, 95 deletions
diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv
index f13e468aefe..14bd60fd51e 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 : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+%% mylatexformat : 2010/06/30 v2.1 - 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,8 +25,8 @@
%%
\edef\thisfile{\jobname}
\def\thisinfo{Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file}
-\def\thisdate{2010/06/20}
-\def\thisversion{2}
+\def\thisdate{2010/08/09}
+\def\thisversion{2.9}
\let\loadclass\LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
\documentclass[a4paper,oneside]{ltxdoc}
diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.dtx
index 0c50012e2db..aa2111d506a 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 : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file]
+% mylatexformat : 2010/08/09 v2.9 - 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 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
+\Msg{* Package 2010/08/09 v2.9 - 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 : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+mylatexformat : 2010/08/08 v2.9 - 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
@@ -70,7 +70,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\file{mylatexformat.ltx}{\from{mylatexformat.dtx}{package}}%
}
-%%\askforoverwritetrue
+\askforoverwritetrue
\generate{%
\file{mylatexformat.drv}{\from{mylatexformat.dtx}{driver}}%
}
@@ -98,8 +98,8 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%<*driver>
\edef\thisfile{\jobname}
\def\thisinfo{Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file}
-\def\thisdate{2010/06/20}
-\def\thisversion{2}
+\def\thisdate{2010/08/09}
+\def\thisversion{2.9}
\let\loadclass\LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
\documentclass[a4paper,oneside]{ltxdoc}
@@ -126,7 +126,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%</driver>
% \fi
%
-% \CheckSum{208}
+% \CheckSum{254}
%
% \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
@@ -226,6 +226,18 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \newcommand\reflinkcolor{\color{reflink}}\definecolor{reflink}{rgb}{0.49,0.00,0.00}
% \newrobustcmd\stform{\@ifnextchar*{\@stform[]\textasteriskcentered\@gobble}\@stform}
% \newrobustcmd\@stform[2][\string]{\textttbf{\rred#1#2}\xspace}
+% \newrobustcmd*\IMPLEMENTATION{%
+% \hypersetup{bookmarksopenlevel=1}
+% \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}}
+% \def\B{\MakeBraces[]}
+% \def\P{\MakeBraces()}
+% \def\M{\MakeBraces\{\}}
+% \def\MakeBraces#1#2{\@ifstar{\MakeBr@ces{#1}{#2}\@firstofone}{\MakeBr@ces{#1}{#2}\meta}}
+% \def\MakeBr@ces#1#2#3#4{\texttt{#1}#3{#4}\texttt{#2}}
%
% \makeatother
%
@@ -265,7 +277,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% The format is usually made from the preamble of a \xext{tex} file. But with
% \thispackage, you may stop the format at any point in the preamble
-% using the command \csbf[\rred]{endofdump} before \texttt{\cs{begin}\{document\}}.%
+% using the command \csbf[\rred]{endofdump} before \textttbf{\csbf{begin}\{document\}}.%
% \medskip
%
% As far as I am concerned, I'm using MikTeX and have not been able to test the
@@ -275,7 +287,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \medskip
%
% \thispackage was primarily a written from \Xpackage[carlisle]{mylatex.ltx}[ from David Carlisle (1994/09/27)],
-% but is very different in many points.
+% but is different in many points (see \ref{mylatex}).
%
% \end{abstract}
%
@@ -294,8 +306,6 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% ^^A\clearpage
% \MakeShortVerb{\+}
%
-% \def\B#1{\texttt{[}\meta{#1}\texttt{]}}
-%
% \section{Creating a format}
%
% \subsection{Using MikTeX}
@@ -352,8 +362,8 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% As I pointed out in the \texttt{abstract}, I have not been able to test the file on other distributions.
%
% \clearpage
-%
% \section[How does it work ? (and why it is different from mylatex.ltx)]{How does it work ? (and why it is different from \xpackage{mylatex.ltx})}
+% \label{mylatex}
%
% \xpackage{mylatex.ltx} has three important limitations:
% \begin{enumerate}[label=\arabic*)~]
@@ -373,11 +383,6 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% the format is not stopped at \verb+\begin{document}+ and an error occurs.
% \end{enumerate}
%
-% ^^AWith \xpackage{mylatexformat.ltx}, those limitations are lifted.
-% ^^A\begin{enumerate}[label=\arabic*)~]
-% ^^A\item Temporarily redefines \cs{begin} in order to check if its argument is \meta{document}.
-% ^^A\end{enumerate}
-%
% \begin{dblruled}[first=2pt,sep=1pt,second=.6pt,left=4pt]
% With \xpackage{mylatexformat.ltx}, those limitations are lifted.
%
@@ -407,11 +412,8 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \StopEventually{
% }
%
-% \begin{center}\vskip6pt$\star$\hskip4em\lower12pt\hbox{$\star$}\hskip4em$\star$\vadjust{\vskip12pt}\end{center}
-%
-% \hypersetup{bookmarksopenlevel=1}
-% \section{Implementation} \label{Implementation}
-% \csdef{HDorg@PrintMacroName}#1{\hbox to4em{\strut \MacroFont \string #1\ \hss}}
+% \clearpage
+% \IMPLEMENTATION
%
% \begin{macrocode}
%<*package>
@@ -419,7 +421,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%%% mylatexformat.ltx
%%% ^^^^^^^^^^^^^^^^^
%%% From an original idea by David Carlisle - mylatex.ltx 1994/09/27
-%%% © lppl 2010 - F Chervet - 2010/04/25
+%%% © lppl 2010 - F Chervet - 2010/08/09
%%% _____________________________________________________________________
%%%
%%% Use this file to make a format based on the preamble of any LaTeX
@@ -557,11 +559,9 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%% commands can be placed after such a comment and they will be
%% executed.
%% --------------------------------------------------------------------
-%
-%
-%
+%%
%%\RequirePackage{etex}% RequirePackage may be used before the class
-%\makeatletter
+%%
%% In principle \openout stream= filename need not be space terminated,
%% and need not be immediate, but this covers \makeindex \makeglossary
%% and index package's \newindex which are all the cases of \openout
@@ -574,22 +574,21 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\makeatletter
\let\etex@primitive@openout\openout
\let\ltx@listfiles\listfiles
-\def\openout#1 {\g@addto@macro\MYLATEXopens{\immediate\openout#1 }}
-\def\MYLATEXopens{%
+\def\openout#1 {\g@addto@macro\MYLATEX@opens{\immediate\openout#1 }}
+\def\MYLATEX@opens{%
\let\openout\etex@primitive@openout
- \let\etex@primitive@openout\ltx@undefined
-}% \MYLATEXopens
+ \let\etex@primitive@openout\@undefined
+}% \MYLATEX@opens
%% \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.)
-\let\MYLATEX@latex@begin\begin
-\def\begin#1{%
- \expandafter\ifx\csname#1\endcsname\document
- \expandafter\expandafter\expandafter\endofdump\expandafter\@gobble
- \else\expandafter\MYLATEX@latex@begin
- \fi{#1}}
+\let\MYLATEX@ltx@begin\begin
+\def\begin#1{\csname @\expandafter\ifx\csname#1\endcsname\document first\else second\fi oftwo\endcsname
+ \endofdump
+ {\MYLATEX@ltx@begin{#1}}%
+}% \begin
%% 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,
@@ -610,20 +609,20 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\ifdefined\tiny\tiny\fi
}}%
\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{}%
+ \let\begin\MYLATEX@ltx@begin
+ \let\MYLATEX@ltx@begin\@undefined
\makeatother
\everyjob\expandafter{\the\everyjob
\begingroup
\listfiles\let\listfiles\ltx@listfiles
\expandafter\MYLATEXcustomised\@dofilelist
- \endgroup}%
- \catcode`\\=13\relax%
+ \endgroup
+ \MYLATEX@scan@preamble
+ }%
\let\endofdump\relax
\dump
}
-% Banner for \everyjob.
+%% Banner for \everyjob.
\edef\MYLATEXcustomised#1#2#3\typeout#4{%
\noexpand\typeout{==============================================================================}%
\noexpand\typeout{JOB NAME\noexpand\@spaces\noexpand\@spaces\noexpand\space\noexpand\space:%
@@ -634,7 +633,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\noexpand\typeout{==============================================================================}%
\noexpand\typeout{(mylatexformat)Info: starting reading document%
\string"\noexpand\jobname\string"}%
-}
+}% \MYLATEXcustomised
%% While the preamble is being skipped (inside a group)
%% the EOL is active and defined to grab each line and
%% inspect it looking for :
@@ -647,49 +646,35 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%% 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`\/=0 %
- /catcode`\\=13 %
- /catcode`/& 8 %
- /gdef\{/catcode`/\=0 /catcode`/^^M=13 ^^M}% /catcode`/%=9 ^^M}%
-%%
- /long/gdef^^M{/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/def/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%
- /MYLATEXopens##2}%
- /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}%
+ \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}%
}% Leaving simple groupe (level 1) => start reading document
% \end{macrocode}
%
-%\begin{macro}{\AtEndOfDump}
-% This is just a hook to be executed when \cs{endofdump} is encoutered,
-% (or \cs{begin}\{document\}). Therefore, the code having been set \cs{AtEndOfDump}
-% is included in the format:
-% \begin{macrocode}
-\newtoks\MYLATEX@hook
-\def\AtEndOfDump{\addto@hook\MYLATEX@hook}
-\AtEndOfDump{\let\AtEndOfDump\@undefined}
-% \end{macrocode}
-%\end{macro}
-%
% \begin{macrocode}
%% Trick lookahead to allow mylatex.ltx and the document filename to be
%% given on the same command line. (initex &latex mylatex.ltx {abc.tex})
@@ -699,10 +684,16 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% \DeleteShortVerb{\+}^^A\UndefineShortVerb{\+}
% \begin{History}
-%
-% \begin{Version}{2010/06/20 v2}
-% \item Added: \cs{AtEndOfDump} macro to include some code in the format, just before \cs{dump}.
+%
+% \begin{Version}{2010/08/09 v2.9}
+% \item Modification of the macros that scan the preamble when the \xext{tex} file is compiled with its format.\\
+% It is now possible to start a file with \cs{begin}\texttt{\{document\}} just after the format specification (\texttt{\&myformat}).
+% \item[To do:] Command line to make the format on Linux (\texttt{-ini} instead of \texttt{-initialize} ???).
+% \end{Version}
+%
+% \begin{Version}{2010/06/30 v2.1}
% \item Added: \cs{listfiles} is now available in the preamble, after \cs{endofdump}, when the document is compiled with its format.
+% \item Documentation update.
% \end{Version}
%
% \begin{Version}{2010/05/20 v1.2}
@@ -715,7 +706,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \end{Version}
%
% \end{History}
-%
+% \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 646ea59b029..c6202b050b1 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 : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+%% mylatexformat : 2010/06/30 v2.1 - 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 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*}
+\Msg{* Package 2010/08/09 v2.9 - 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 : 2010/06/20 v2 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file
+mylatexformat : 2010/08/08 v2.9 - 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
@@ -60,7 +60,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\file{mylatexformat.ltx}{\from{mylatexformat.dtx}{package}}%
}
-%%\askforoverwritetrue
+\askforoverwritetrue
\generate{%
\file{mylatexformat.drv}{\from{mylatexformat.dtx}{driver}}%
}