diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/docmute')
-rw-r--r-- | Master/texmf-dist/tex/latex/docmute/docmute.sty | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/docmute/docmute.sty b/Master/texmf-dist/tex/latex/docmute/docmute.sty index 644178c3862..5bbaf7cd1a4 100644 --- a/Master/texmf-dist/tex/latex/docmute/docmute.sty +++ b/Master/texmf-dist/tex/latex/docmute/docmute.sty @@ -1,38 +1,38 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{docmute}[2009/10/08 v1.1 Input standalone documents] +\ProvidesPackage{docmute}[2010/04/12 v1.2 Input stand-alone documents] \def\docmute@docenv{document} \long\def\docmute@gobblepreamble#1\begin#2{% \def\docmute@thisenv{#2}% \ifx\docmute@thisenv\docmute@docenv - \docmute@afterpreamble + \begin{document}% \else \expandafter\docmute@gobblepreamble \fi } -\def\docmute@afterpreamble{% - \docmute@atbegindoc - \def\enddocument{% - \docmute@atenddoc - \aftergroup\ignorespaces - \endinput - }% - \ignorespaces -} \let\docmute@document=\document \let\docmute@enddocument=\enddocument -\let\docmute@atbegindoc=\relax -\def\docmute@atenddoc{% - \let\enddocument=\docmute@enddocument - \begingroup -} \let\docmute=\docmute@gobblepreamble \def\document{% \docmute@document + \countdef\docmute@nestinglevel=1 \let\documentclass=\docmute + \renewenvironment{document}{% + \endgroup + \advance \docmute@nestinglevel 1% + \ignorespaces + }{% + \advance \docmute@nestinglevel -1% + \ifnum\docmute@nestinglevel=0 + \docmute@enddocument + \else + \begingroup + \@ignoretrue + \def\@currenvir{document}% + \endinput + \fi + }% \ignorespaces } -\DeclareOption{nested}{% - \let\docmute@atbegindoc=\begingroup - \let\docmute@atenddoc=\relax -} +\DeclareOption{nested}{}% for backwards compatibility only \ProcessOptions + |