summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/docmute
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-11 00:13:29 +0000
committerKarl Berry <karl@freefriends.org>2009-10-11 00:13:29 +0000
commitedff6978ed8be78204ec233620efc63086eedf27 (patch)
tree90a1f0e537e3708f4a9d8cfbfc73bb3e7c8159e8 /Master/texmf-dist/tex/latex/docmute
parent877d502987bffe40d605f5da99e2e7ee7105a5d1 (diff)
new latex package docmute (10oct09)
git-svn-id: svn://tug.org/texlive/trunk@15754 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/docmute')
-rw-r--r--Master/texmf-dist/tex/latex/docmute/docmute.sty38
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/docmute/docmute.sty b/Master/texmf-dist/tex/latex/docmute/docmute.sty
new file mode 100644
index 00000000000..644178c3862
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/docmute/docmute.sty
@@ -0,0 +1,38 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{docmute}[2009/10/08 v1.1 Input standalone documents]
+\def\docmute@docenv{document}
+\long\def\docmute@gobblepreamble#1\begin#2{%
+ \def\docmute@thisenv{#2}%
+ \ifx\docmute@thisenv\docmute@docenv
+ \docmute@afterpreamble
+ \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
+ \let\documentclass=\docmute
+ \ignorespaces
+}
+\DeclareOption{nested}{%
+ \let\docmute@atbegindoc=\begingroup
+ \let\docmute@atenddoc=\relax
+}
+\ProcessOptions