summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/docmute
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-14 00:26:30 +0000
committerKarl Berry <karl@freefriends.org>2010-04-14 00:26:30 +0000
commita6245664998d01f3d861b64a3df3a6e429d1a049 (patch)
tree59ffa3d46b20f5eee92ddceeb6036e2760161039 /Master/texmf-dist/tex/latex/docmute
parent724018f893698d0a71294ce43f49ce39184056bf (diff)
docmute 1.2 (13apr10)
git-svn-id: svn://tug.org/texlive/trunk@17851 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/docmute')
-rw-r--r--Master/texmf-dist/tex/latex/docmute/docmute.sty40
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
+