From 4ea37220f304500ab9573224da04ca00682233e1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 14 Jan 2011 00:25:16 +0000 Subject: mylatexformat git-svn-id: svn://tug.org/texlive/trunk@21058 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/mylatexformat/mylatexformat.pdf | Bin 170080 -> 194534 bytes .../source/latex/mylatexformat/mylatexformat.drv | 24 +- .../source/latex/mylatexformat/mylatexformat.dtx | 433 ++++++++++++++------- .../source/latex/mylatexformat/mylatexformat.ins | 12 +- .../tex/latex/mylatexformat/mylatexformat.ltx | 106 +++-- 5 files changed, 387 insertions(+), 188 deletions(-) diff --git a/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf b/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf index 372b86928db..e5ebb97cfe7 100644 Binary files a/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf and b/Master/texmf-dist/doc/latex/mylatexformat/mylatexformat.pdf differ diff --git a/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv b/Master/texmf-dist/source/latex/mylatexformat/mylatexformat.drv index 14bd60fd51e..bcac910644c 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/30 v2.1 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +%% mylatexformat : 2011/01/12 v3.0 - 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 @@ -21,23 +21,31 @@ %% mylatexformat.ltx, mylatexformat.pdf, mylatexformat.ins %% %% mylatexformat - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file -%% Copyright (C) 2010 by Florent Chervet +%% Copyright (C) 2010-2011 by Florent Chervet %% \edef\thisfile{\jobname} -\def\thisinfo{Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file} -\def\thisdate{2010/08/09} -\def\thisversion{2.9} +\def\thisinfo{Make a format based on the preamble of any \texorpdfstring{\LaTeX{}}{LaTeX} file} +\def\thisdate{2011/01/12} +\def\thisversion{3.0} \let\loadclass\LoadClass \def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}} +\PassOptionsToPackage{svgnames}{xcolor} +\PassOptionsToPackage{hyperfootnotes}{hyperref} \documentclass[a4paper,oneside]{ltxdoc} +\AtBeginDocument{\DeleteShortVerb{\|}} \usepackage[latin1]{inputenc} \usepackage[american]{babel} \usepackage[T1]{fontenc} -\usepackage{etex,etoolbox,holtxdoc,geometry,lastpage,tocloft,graphicx,xspace,fancyhdr,color,bbding,embedfile,framed,keycommand,multirow,txfonts,makecell,enumitem,arydshln,atveryend} +\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{interfaces} +\usetikz{basic} +\csname endofdump\endcsname \CodelineNumbered -\usepackage{fancyvrb} +\usepackage{fancyvrb}\fvset{gobble=1,listparameters={\topsep=0pt}} \lastlinefit999 -\geometry{top=2cm,headheight=1cm,headsep=.3cm,bottom=1.4cm,footskip=.5cm,left=2.5cm,right=1cm} +\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=1.5cm} \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 aa2111d506a..8ea5e8082d6 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/08/09 v2.9 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file] +% mylatexformat : 2011/01/12 v3.0 - 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 @@ -22,7 +22,7 @@ % % Documentation: % (pdf)latex mylatexformat.dtx -% Copyright (C) 2010 by Florent Chervet +% Copyright (C) 2010-2011 by Florent Chervet %<*ignore> \begingroup \def\x{LaTeX2e}% @@ -36,7 +36,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package 2010/08/09 v2.9 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*} +\Msg{* Package 2011/01/12 v3.0 - 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/08/08 v2.9 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +mylatexformat : 2011/01/12 v3.0 - 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 @@ and the derived files mylatexformat.ltx, mylatexformat.pdf, mylatexformat.ins mylatexformat - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file -Copyright (C) 2010 by Florent Chervet +Copyright (C) 2010-2011 by Florent Chervet \endpreamble \let\MetaPrefix\DoubleperCent @@ -70,7 +70,7 @@ Copyright (C) 2010 by Florent Chervet \file{mylatexformat.ltx}{\from{mylatexformat.dtx}{package}}% } -\askforoverwritetrue +\askforoverwritefalse \generate{% \file{mylatexformat.drv}{\from{mylatexformat.dtx}{driver}}% } @@ -97,20 +97,28 @@ Copyright (C) 2010 by Florent Chervet % %<*driver> \edef\thisfile{\jobname} -\def\thisinfo{Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file} -\def\thisdate{2010/08/09} -\def\thisversion{2.9} +\def\thisinfo{Make a format based on the preamble of any \texorpdfstring{\LaTeX{}}{LaTeX} file} +\def\thisdate{2011/01/12} +\def\thisversion{3.0} \let\loadclass\LoadClass \def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}} +\PassOptionsToPackage{svgnames}{xcolor} +\PassOptionsToPackage{hyperfootnotes}{hyperref} \documentclass[a4paper,oneside]{ltxdoc} +\AtBeginDocument{\DeleteShortVerb{\|}} \usepackage[latin1]{inputenc} \usepackage[american]{babel} \usepackage[T1]{fontenc} -\usepackage{etex,etoolbox,holtxdoc,geometry,lastpage,tocloft,graphicx,xspace,fancyhdr,color,bbding,embedfile,framed,keycommand,multirow,txfonts,makecell,enumitem,arydshln,atveryend} +\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{interfaces} +\usetikz{basic} +\csname endofdump\endcsname \CodelineNumbered -\usepackage{fancyvrb} +\usepackage{fancyvrb}\fvset{gobble=1,listparameters={\topsep=0pt}} \lastlinefit999 -\geometry{top=2cm,headheight=1cm,headsep=.3cm,bottom=1.4cm,footskip=.5cm,left=2.5cm,right=1cm} +\geometry{top=0pt,includeheadfoot,headheight=7mm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=4cm,right=1.5cm} \hypersetup{% pdftitle={The mylatexformat package}, pdfsubject={Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file}, @@ -126,7 +134,7 @@ Copyright (C) 2010 by Florent Chervet % % \fi % -% \CheckSum{254} +% \CheckSum{-0} % % \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 @@ -168,18 +176,25 @@ Copyright (C) 2010 by Florent Chervet % \DoNotIndex{\maketitle,\parindent,\setbox,\x,\kernel@ifnextchar} % \DoNotIndex{\KVS@CommaComma,\KVS@CommaSpace,\KVS@EqualsSpace,\KVS@Equals,\KVS@Global,\KVS@SpaceEquals,\KVS@SpaceComma,\KVS@Comma} % \DoNotIndex{\DefineShortVerb,\DeleteShortVerb,\UndefineShortVerb,\MakeShortVerb,\endinput} -% ^^A\AfterLastShipout{\label{LastPage}}% +% % \let\ClearPage\clearpage % \makeatletter -% \MakeShortVerb{\+}\DeleteShortVerb{\|}\DefineShortVerb{\|} % \catcode`\§ \active \def§{\@ifnextchar §{\par\nobreak\vskip-2\parskip}{\par\nobreak\vskip-\parskip}} -% \def\thispackage{\xpackage{\thisfile}\xspace} +% \newrobustcmd\Xspace{\ifnum\catcode`\ =\active\else\expandafter\xspace\fi} +% \newrobustcmd*\stform{\ifincsname\else\expandafter\@stform\fi} +% \newrobustcmd*\@stform{\@ifnextchar*{\@@stform[]\textasteriskcentered\@gobble}\@@stform} +% \newrobustcmd*\@@stform[2][\string]{\textttbf{#1#2}\Xspace} +% +% \newrobustcmd*\thispackage{\@ifstar +% {\xpackage{{\thisfile}}\Xspace} +% {\xpackage{{\pkgcolor\thisfile}}\Xspace}} % \def\ThisPackage{\Xpackage{\thisfile}\xspace} % \def\Xpackage{\@dblarg\X@package} % \def\X@package[#1]#2{\@testopt{\X@@package{#1}{#2}}{}} % \def\X@@package#1#2[#3]{% % \xpackage{#2\footnote{\noindent\xpackage{#2}: \href{http://www.ctan.org/tex-archive/macros/latex/contrib/#1}{\nolinkurl{CTAN:macros/latex/contrib/#1}}#3}}} % \def\Underbrace#1_#2{$\underbrace{\vtop to2ex{}\hbox{#1}}_{\footnotesize\hbox{#2}}$} +% \newrobustcmd*\FC[1][\color{copper}]{{#1\usefont{T1}{fts}xn FC}} % % \parindent\z@\parskip.4\baselineskip\topsep\parskip\partopsep\z@ % \g@addto@macro\macro@font{\macrocodecolor\let\AltMacroFont\macro@font} @@ -195,15 +210,57 @@ Copyright (C) 2010 by Florent Chervet % \renewrobustcmd*\bf{\bfseries}\newcommand\nnn{\normalfont\mdseries\upshape}\newcommand\nbf{\normalfont\bfseries\upshape} % \newrobustcmd*\blue{\color{blue}}\newcommand*\red{\color{dr}}\newcommand*\green{\color{green}}\newcommand\rred{\color{red}} % \newrobustcmd\rrbf{\color{red}\bfseries} +% \newcommand\textt[1]{\texorpdfstring{\texttt{#1}}{#1}} +% \newrobustcmd\texttbf[1]{\textbf{\texttt{#1}}} +% \colorlet{pkgcolor}{teal}\def\pkgcolor{\color{pkgcolor}} % \definecolor{copper}{rgb}{0.67,0.33,0.00} \newcommand\copper{\color{copper}} % \definecolor{dg}{rgb}{0.16,0.33,0.00} \newcommand\dg{\color{dg}} % \definecolor{db}{rgb}{0,0,0.502} \newcommand\db{\color{db}} % \definecolor{dr}{rgb}{0.49,0.00,0.00} \let\dr\red +% \definecolor{lk}{rgb}{0.25,0.25,0.25} \newrobustcmd\lk{\color{lk}} % \newrobustcmd\bk{\color{black}}\newcommand\md{\mdseries} +% \def\M{\@ifstar{\M@i\@firstofone}{\M@i\meta}} +% \def\M@i#1{\@ifnextchar[^^A] +% {\M@square#1} +% {\@ifnextchar(^^A) +% {\M@paren#1} +% {\M@brace#1}}^^A +% } +% \def\M@square#1[#2]{\M@Bracket[{#1{#2}}]} +% \def\M@paren#1(#2){\M@Bracket({#1{#2}})} +% \def\M@brace#1#2{\M@Bracket\{{#1{#2}}\}} +% \def\M@Bracket#1#2#3{{\ttfamily#1#2#3}} +% \newrobustcmd*\thisyear{\begingroup +% \def\thisyear##1/##2\@nil{\endgroup +% \oldstylenums{\ifnum##1=2010\else 2010\,\textendash\,\fi ##1}^^A +% }\expandafter\thisyear\thisdate\@nil +% } +% +% \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 +% \expandafter\SpecialUsageIndex\csname #2\endcsname +% \raisedhyperdef[14pt]{declcs}{#2}{\cs[{#1}]{#2}}^^A +% }^^A +% \renewcommand\enddeclcs{% +% \crcr \hline +% \end{tabu}% +% \nobreak \par \nobreak +% \noindent +% \ignorespacesafterend +% } +% \newrobustcmd*\csref[2][]{\hyperref{}{declcs}{#2}{\cs[{#1}]{#2}}} +% +% % \DefineVerbatimEnvironment{Verb}{Verbatim}{gobble=1} % \DefineVerbatimEnvironment{VerbLines}{Verbatim}{gobble=1,frame=lines,framesep=6pt,fontfamily=txtt,fontseries=b} -% \DeleteShortVerb{\+} -%\newkeyenvironment+[\|]{dblruled}[first=.4pt,second=.4pt,sep=1pt,left=\z@]% +% \newkeyenvironment+[\|]{dblruled}[first=.4pt,second=.4pt,sep=1pt,left=\z@]% % {|\def\FrameCommand|{% % \vrule\@width\commandkey{first} % \hskip\commandkey{sep} @@ -213,97 +270,182 @@ Copyright (C) 2010 by Florent Chervet % }{% % |\endMakeFramed|% % } -% \fancyhf{}\fancyhead[L]{The \thispackage package -- \thisinfo} -% \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad[rev.\thisversion]\quad\copyright\oldstylenums{2010}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet} -% \fancyfoot[R]{\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}} -% \pagestyle{fancy} -% \fancypagestyle{plain}{% -% \let\headrulewidth\z@ -% \fancyhf{}% -% \fancyfoot[R]{\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}}} -% -% \newcommand\macrocodecolor{\color{macrocode}}\definecolor{macrocode}{rgb}{0.18,0.00,0.45} +% +% \colorlet{HeadBand}{BlanchedAlmond} +% \newcommand*\topheader{\tikz[remember picture,overlay]{ +% \coordinate (A) at (current page.north west); +% \coordinate (B) at ($(current page.north east)+(0cm,-\headheight)$); +% \fill [color=HeadBand,fill opacity=.6] (A) rectangle (B); +% }% +% } +% +% \pagesetup[plain]{ +% norules, +% foot/right=\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}, +% foot/font=\lk\scriptsize, +% foot/left/offset=3cm, +% foot/right/offset=1cm, +% foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\copyright\,\thisyear\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC\quad \xemail{florent.chervet at free.fr}}}}}, +% } +% \pagesetup{ +% foot/right={\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}}, +% foot/font=\lk\scriptsize, +% foot/left/offset=3cm, +% foot/right/offset=1cm, +% foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\copyright\,\thisyear\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC}}}}, +% head/font=\small\sffamily, +% head/right/offset=1cm, +% head/right=\noindent\raise.4ex\hbox{\thispackage : \thisinfo}, +% head/left=\topheader, +% } +% \sectionformat\section{ +% top=\medskipamount, +% bottom=.5\smallskipamount, +% bookmark={color=MidnightBlue}, +% } +% \sectionformat\subsubsection{ +% top=\smallskipamount,bottom=0pt, +% bookmark={color=lk}, +% } +% \bookmarksetup{openlevel=3} +% +% \newcommand\macrocodecolor{\color{macrocode}}\definecolor{macrocode}{rgb}{0.05,0.02,0.07} % \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}} +% \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} +% \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}} -% \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 % % \deffootnote{1em}{0pt}{\rlap{\textsuperscript{\thefootnotemark}}\kern1em} % -% \title{\vskip-18pt\mdseries The {\bfseries\ThisPackage}\kern.6em package} -% \author{\footnotesize\xemail{florent.chervet@free.fr}} -% \date{\thisdate~--~version \thisversion} -% \subtitle{Use {\db mylatexformat.ltx} to make a format based on the preamble of any LaTeX file} -% ^^A\subject{\thisinfo} +% \title{\vspace*{-28pt}\href{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/mylatexformat.html}{\HUGE\bfseries\sffamily\pkgcolor mylatexformat}\vspace*{6pt}} +% \date{} +% \subtitle{\LARGE\begin{tabu}{X[c]} +% Use \thispackage* to make a format \\ +% based on the preamble of any LaTeX file \\[-1ex] +% \small\FC +% \end{tabu} +% \vspace*{-12pt}} +% \author{\smaller\thisdate~--~\hyperref[\thisversion]{version \thisversion}} % % \maketitle % -% \makeatletter\begingroup\let\@thefnmark\@empty\let\@makefntext\@firstofone -% \footnotetext{\noindent -% This documentation is produced with the +DocStrip+ utility. -% \begin{tabbing} -% \qquad\=\smex\=To get the documentation, \= run (thrice):\quad\= \texttt{pdflatex \thisfile.dtx} \\ -% \qquad\>\>To get the index, \> run:\>\texttt{makeindex -s gind.ist \thisfile.idx} \\ -% \>\smex\>To get the package, \> run:\> \texttt{etex \thisfile.dtx} -% \end{tabbing}§ -% The \xext{dtx} file is embedded into this pdf file thank to \xpackage{embedfile} by H. Oberdiek.} -% \endgroup\makeatother +% {\makeatletter\let\@thefnmark\@empty\let\@makefntext\@firstofone +% \footnotetext{\noindent\parskip=0pt\scriptsize +% This documentation is produced with the \textt{DocStrip} utility.\par +% \begin{tabu}{X[-3]X[-1]X} +% \smex To get the package, &run: &\texttt{etex \thisfile.dtx} \\ +% \smex To get the documentation &run (thrice): &\textt{pdflatex \thisfile.dtx} \\ +% \leavevmode\hphantom\smex To get the index, &run: &\texttt{makeindex -s gind.ist \thisfile.idx} +% \end{tabu}§ +% The \xext{dtx} file is embedded into this pdf file thank to \Xpackage{embedfile} by H. Oberdiek.} +% } % % \deffootnote{1em}{0pt}{\rlap{\thefootnotemark.}\kern1em} % -% ^^A---------------------------------------------------------------------------- -% \vskip-48pt -% \begin{abstract}\parindent0pt\noindent\leftskip1cm\rightskip\leftskip\lastlinefit0% -% -% {\db\xpackage{mylatexformat.ltx}} can be used to make a format from any \LaTeX{} file. -% \medskip +% {\let\quotation\relax\let\endquotation\relax\vspace*{-1cm}% +% \begin{abstract}\parskip\smallskipamount\parindent0pt\lastlinefit0\leftskip.7cm\rightskip\leftskip % +% \thispackage can be used to make a format from the preamble of any \LaTeX{} file. % The use of formats helps to speed up compilations: packages which have been -% dumped in the format are loaded at very high speed. -% \medskip +% dumped in the format are loaded at very high speed. A format (also known as \emph{dump}) is therefore very suitable: +% \begin{itemize}[label=\textendash,leftmargin=3em] +% \item if you have many documents that shares the same preamble, +% \item if you have a document which loads a large amount of packages (like \xpackage{TikZ} graphics libraries). +% \end{itemize} % -% 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 \textttbf{\csbf{begin}\{document\}}.% % \medskip % -% As far as I am concerned, I'm using MikTeX and have not been able to test the -% file on other systems. However, the portability of \TeX{} documents is well known... +% \thispackage will dump all definitions until \cs{begin}\M*{document} or \csref{endofdump}, more precisely: +% +% \csdef{tabu*}{\begingroup\tabcolsep0pt\begin{tabu}} +% \csdef{endtabu*}{\end{tabu}\endgroup} +% \definecolor{ly}{rgb}{1,1,.35} +% +% \hskip-2em +% \begin{tabu}to \linewidth{XXX[1.2]} +% +% \fcolorbox{black}{ly}{% +% \begin{tabu*}{X} +% \cs{RequirePackage}\M*{...} \\ +% \cs{documentclass}\M*{...} \\ +% \cs{usepackage}\M*{...} \\ +% \noindent\,\,... \\ +% \noindent\,\,... \\ +% \csbf{begin}{\bfseries\M*{document}} +% \end{tabu*}} +% & +% \begin{tabu*}{X} +% \fcolorbox{black}{ly}{% +% \begin{tabu}{X} +% \cs{RequirePackage}\M*{...} \\ +% \cs{documentclass}\M*{...} \\ +% \cs{usepackage}\M*{...} \\ +% \csbf{endofdump} \\ +% \end{tabu}} \\ +% \noindent\,\, ... \\ +% \noindent\,\,\cs{begin}\M*{document} +% \end{tabu*} +% & +% \begin{tabu*}{X} +% \fcolorbox{black}{ly}{% +% \begin{tabu*}{X} +% \cs{RequirePackage}\M*{...} \\ +% \cs{documentclass}\M*{...} \\ +% \cs{usepackage}\M*{...} \\ +% \csbf{csname} \texttbf{endofdump}\csbf{endcsname} \\ +% \end{tabu*}} \\ +% \noindent\,\, ... \\ +% \noindent\,\,\cs{begin}\M*{document} +% \end{tabu*} +% \end{tabu} +% \medskip % -% I've been using \xpackage{mylatexformat.ltx} with \LaTeX{}, pdf\TeX{} and Xe\TeX{} and it worked fine... +% The colored parts correspond to the format. The \xext{log} file will report: +% +% \begin{tabu}{@{}X|[pkgcolor]X} +% \begin{tabu}{>{\ttfamily}X[l]} +% start reading document "my document" \\ +% on input line *** (\cs{begin}\M*{document}) +% \end{tabu} +% & +% \begin{tabu}{>{\ttfamily}X[l]} +% start reading document "my document" \\ +% on input line *** (\cs{endofdump}) +% \end{tabu} +% \end{tabu} % \medskip % -% \thispackage was primarily a written from \Xpackage[carlisle]{mylatex.ltx}[ from David Carlisle (1994/09/27)], -% but is different in many points (see \ref{mylatex}). +% \thispackage was primarily a written from \href{{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/mylatex.html}}{\xpackage{mylatex}} +% by David Carlisle, but it is different in many points (see \ref{mylatex}). In particular, \thispackage allows to put almost +% any package in the format, with one exception: the package \href{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/minitoc.html}{\xpackage{minitoc}} +% cannot be included in the format (you must use \csref{endofdump} before \cs{usepackage}\M*{minitoc}). % % \end{abstract} +% } % -% \DeleteShortVerb{\+}\enlargethispage{2\baselineskip} -% \cftbeforesecskip=4pt plus2pt minus2pt -% \cftbeforesubsecskip=0pt plus2pt minus2pt -% \renewcommand\contentsname{Contents\quad\leaders\vrule height3.4pt depth-3pt\hfill\null\kern0pt\vskip-6pt} -% ^^A\vskip-.8\baselineskip +% \tocsetup{ +% section/skip=4pt plus2pt minus2pt, +% subsection/skip=4pt plus2pt minus2pt, +% title=Contents, +% title/after={\pkgcolor\quad\leaders\vrule height3.4pt depth-3pt\hfill\null}, +% after=\leavevmode{\pkgcolor\hrule}, +% twocolumns, +% bookmark={text=Contents,bold}, +% } % \tableofcontents -% \leavevmode\leaders\vrule height3.4pt depth-3pt\hfill\null % \clearpage -% ^^A---------------------------------------------------------------------------- % -% \hypersetup{bookmarksopenlevel=3} % -% ^^A\clearpage % \MakeShortVerb{\+} % % \section{Creating a format} @@ -322,9 +464,8 @@ Copyright (C) 2010 by Florent Chervet % % Full example:§§ % \begin{VerbLines} -% etex -initialize -interaction=nonstopmode -% -save-size=20000 -stack-size=20000 -% -jobname="Mon Beau Format Perso" +% etex -initialize -save-size=20000 -stack-size=20000 +% -jobname="The-Name-Of-The-.fmt-File(without .fmt extension)" % "&pdflatex" mylatexformat.ltx """Mon Fichier TeX.tex""" % \end{VerbLines} % @@ -347,6 +488,10 @@ Copyright (C) 2010 by Florent Chervet % % As I pointed out in the \texttt{abstract}, I have not been able to test the file on other distributions. % +% Some users told me they typed the following command line: +% +% \quad+latex -ini -jobname="thenameoffmtfile" "&latex" mylatexformat.ltx """abc.tex"""+ +% % \section{Using a format} % % \subsection{Using MikTeX} @@ -375,7 +520,7 @@ Copyright (C) 2010 by Florent Chervet % the creation of the format (execution of \cs{dump}) at begin document. \\ % However, the \textbf{initial definition of the macro \csbf{document}} is saved % and reloaded after the format has been loaded. \\ -% Therefore, package that modifies this macro (such as \Xpackage[oberdiek/auxhook]{auxhook}[ H. Oberdiek] or +% Therefore, packages that modifies this macro (such as \Xpackage[oberdiek/auxhook]{auxhook}[ H. Oberdiek] or % \Xpackage{etoolbox}[ P. Lehman] cannot be included in the format! % \item If your document starts with :\\ % \verb+\begin{document}% commentary+ or with :\\ @@ -412,8 +557,7 @@ Copyright (C) 2010 by Florent Chervet % \StopEventually{ % } % -% \clearpage -% \IMPLEMENTATION +% \IMPLEMENTATION\DeleteShortVerb{\+} % % \begin{macrocode} %<*package> @@ -421,7 +565,7 @@ Copyright (C) 2010 by Florent Chervet %%% mylatexformat.ltx %%% ^^^^^^^^^^^^^^^^^ %%% From an original idea by David Carlisle - mylatex.ltx 1994/09/27 -%%% © lppl 2010 - F Chervet - 2010/08/09 +%%% © lppl 2010-2011 - F Chervet - 2011/01/12 %%% _____________________________________________________________________ %%% %%% Use this file to make a format based on the preamble of any LaTeX @@ -572,22 +716,37 @@ Copyright (C) 2010 by Florent Chervet %% %% Save the original definition. \makeatletter -\let\etex@primitive@openout\openout +\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.) -\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}}% +\let\MYLATEX@ltx@begin \begin +\def\begin#1{% + \expandafter \ifx\csname#1\endcsname\document + \expandafter\expandafter\expandafter\endofdump + \expandafter\@gobble + \else \expandafter\MYLATEX@ltx@begin + \fi{#1}% }% \begin %% The version of \document to use on the initex run. %% Just preloads some fonts, puts back \document and \openout, @@ -608,9 +767,10 @@ Copyright (C) 2010 by Florent Chervet \ifdefined\footnotesize\footnotesize\fi \ifdefined\tiny\tiny\fi }}% - \let\openout\etex@primitive@openout% just in case - normally not necessary - \let\begin\MYLATEX@ltx@begin - \let\MYLATEX@ltx@begin\@undefined + \let\openout \etex@primitive@openout% just in case - normally not necessary + \let\begin \MYLATEX@ltx@begin + \let\MYLATEX@ltx@begin \@undefined + \MYLATEX@cmap@hook \makeatother \everyjob\expandafter{\the\everyjob \begingroup @@ -624,14 +784,17 @@ Copyright (C) 2010 by Florent Chervet } %% Banner for \everyjob. \edef\MYLATEXcustomised#1#2#3\typeout#4{% - \noexpand\typeout{==============================================================================}% - \noexpand\typeout{JOB NAME\noexpand\@spaces\noexpand\@spaces\noexpand\space\noexpand\space:% + \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:}% #3% - \noexpand\typeout{==============================================================================}% - \noexpand\typeout{(mylatexformat)Info: starting reading document% + \noexpand\typeout{% + ==============================================================================}% + \noexpand\typeout{(mylatexformat)Info: start reading document \string"\noexpand\jobname\string"}% }% \MYLATEXcustomised %% While the preamble is being skipped (inside a group) @@ -646,33 +809,34 @@ Copyright (C) 2010 by Florent Chervet %% 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}% -}% Leaving simple groupe (level 1) => start reading document +\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 % \end{macrocode} % % \begin{macrocode} @@ -682,31 +846,38 @@ Copyright (C) 2010 by Florent Chervet % % \end{macrocode} % -% \DeleteShortVerb{\+}^^A\UndefineShortVerb{\+} +% \restoregeometry\pagesetup*{foot/left/offset+=1cm} % \begin{History} -% -% \begin{Version}{2010/08/09 v2.9} +% \sectionformat\subsection{font+=\smaller,bottom=\smallskipamount,top=\medskipamount} +% +% \begin{Version}{2011/01/12 v3.0}\HistLabel{3.0} +% \item Fix a problem with package \href{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/mylatexformat.html}{\xpackage{cmap}} which could not be +% included in the format. +% \item Documentation revisited after Users' feedback (and the \href{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/interfaces.html}{\xpackage{interfaces}} package). +% \end{Version} +% +% \begin{Version}{2010/08/09 v2.9}\HistLabel{2.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} +% +% \begin{Version}{2010/06/30 v2.1}\HistLabel{2.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} +% \begin{Version}{2010/05/20 v1.2}\HistLabel{1.2} % \item Fixed a bug in \cs{MYLATEXopens} \\ % (There was problems when including an index in the format for example...) % \end{Version} % -% \begin{Version}{2010/04/30 v1.0} +% \begin{Version}{2010/04/30 v1.0}\HistLabel{1.0} % \item First version. % \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 c6202b050b1..c68695a8993 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/30 v2.1 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +%% mylatexformat : 2011/01/12 v3.0 - 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 @@ -21,12 +21,12 @@ %% mylatexformat.ltx, mylatexformat.pdf, mylatexformat.ins %% %% mylatexformat - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file -%% Copyright (C) 2010 by Florent Chervet +%% Copyright (C) 2010-2011 by Florent Chervet %% \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package 2010/08/09 v2.9 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file*} +\Msg{* Package 2011/01/12 v3.0 - 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/08/08 v2.9 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +mylatexformat : 2011/01/12 v3.0 - 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 @@ -50,7 +50,7 @@ and the derived files mylatexformat.ltx, mylatexformat.pdf, mylatexformat.ins mylatexformat - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file -Copyright (C) 2010 by Florent Chervet +Copyright (C) 2010-2011 by Florent Chervet \endpreamble \let\MetaPrefix\DoubleperCent @@ -60,7 +60,7 @@ Copyright (C) 2010 by Florent Chervet \file{mylatexformat.ltx}{\from{mylatexformat.dtx}{package}}% } -\askforoverwritetrue +\askforoverwritefalse \generate{% \file{mylatexformat.drv}{\from{mylatexformat.dtx}{driver}}% } diff --git a/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx b/Master/texmf-dist/tex/latex/mylatexformat/mylatexformat.ltx index 3d1ce36b4fb..53947dad0f8 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/06/30 v2.1 - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file +%% mylatexformat : 2011/01/12 v3.0 - 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 @@ -21,13 +21,13 @@ %% mylatexformat.ltx, mylatexformat.pdf, mylatexformat.ins %% %% mylatexformat - Use mylatexformat.ltx to make a format based on the preamble of any LaTeX file -%% Copyright (C) 2010 by Florent Chervet +%% Copyright (C) 2010-2011 by Florent Chervet %% %%% _____________________________________________________________________ %%% mylatexformat.ltx %%% ^^^^^^^^^^^^^^^^^ %%% From an original idea by David Carlisle - mylatex.ltx 1994/09/27 -%%% © lppl 2010 - F Chervet - 2010/08/09 +%%% ^^a9 lppl 2010-2011 - F Chervet - 2011/01/12 %%% _____________________________________________________________________ %%% %%% Use this file to make a format based on the preamble of any LaTeX @@ -80,7 +80,7 @@ %%% -jobname="Mon Beau Format Perso" %%% "&pdflatex" mylatexformat.ltx "Mon Fichier TeX.tex" %%% -%%% "Mon Beau Format Perso.fmt" (en Français dans le texte) will be created +%%% "Mon Beau Format Perso.fmt" (en Fran^^e7ais dans le texte) will be created %%% (or overwritten) in the current working directory. %%% %%% Using the format --------------------------------------------------- @@ -178,22 +178,37 @@ %% %% Save the original definition. \makeatletter -\let\etex@primitive@openout\openout +\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.) -\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}}% +\let\MYLATEX@ltx@begin \begin +\def\begin#1{% + \expandafter \ifx\csname#1\endcsname\document + \expandafter\expandafter\expandafter\endofdump + \expandafter\@gobble + \else \expandafter\MYLATEX@ltx@begin + \fi{#1}% }% \begin %% The version of \document to use on the initex run. %% Just preloads some fonts, puts back \document and \openout, @@ -214,9 +229,10 @@ \ifdefined\footnotesize\footnotesize\fi \ifdefined\tiny\tiny\fi }}% - \let\openout\etex@primitive@openout% just in case - normally not necessary - \let\begin\MYLATEX@ltx@begin - \let\MYLATEX@ltx@begin\@undefined + \let\openout \etex@primitive@openout% just in case - normally not necessary + \let\begin \MYLATEX@ltx@begin + \let\MYLATEX@ltx@begin \@undefined + \MYLATEX@cmap@hook \makeatother \everyjob\expandafter{\the\everyjob \begingroup @@ -230,14 +246,17 @@ } %% Banner for \everyjob. \edef\MYLATEXcustomised#1#2#3\typeout#4{% - \noexpand\typeout{==============================================================================}% - \noexpand\typeout{JOB NAME\noexpand\@spaces\noexpand\@spaces\noexpand\space\noexpand\space:% + \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:}% #3% - \noexpand\typeout{==============================================================================}% - \noexpand\typeout{(mylatexformat)Info: starting reading document% + \noexpand\typeout{% + ==============================================================================}% + \noexpand\typeout{(mylatexformat)Info: start reading document \string"\noexpand\jobname\string"}% }% \MYLATEXcustomised %% While the preamble is being skipped (inside a group) @@ -252,33 +271,34 @@ %% 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}% -}% Leaving simple groupe (level 1) => start reading document +\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 %% 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