From 57b6bdd7ce9155595f073c8e3c1a689a14f89e6a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 25 Dec 2007 19:55:32 +0000
Subject: gmdoc update (19nov07)

git-svn-id: svn://tug.org/texlive/trunk@5905 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty | 92 +++++++++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty

(limited to 'Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty')

diff --git a/Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty b/Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty
new file mode 100644
index 00000000000..e4bcc16cbf5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/gmdoc/gmoldcomm.sty
@@ -0,0 +1,92 @@
+%
+% \GetFileInfo{gmoldcomm.sty}
+% \title{The \pk{gmoldcomm} Package\thfileinfo}
+% \author{Natror (Grzegorz Murzynowski)}
+% \date{\today}
+% \maketitle
+%
+%
+% This is a~package
+% for handling the old comments in \LaTeXe\ Source Files when \LaTeX^^B
+% ing them with the \pk{gmdoc} package. 
+%
+% Written by Natror (Grzegorz Murzynowski) 2007/11/10.
+%
+% It's a~part of the \pk{gmdoc} bundle and as such a~subject to the
+% \LaTeX\ Project Public License.
+%
+% 
+% \stanza
+% Scan CSs and put them in tt. If at beginning of line, precede them
+% with |%|. Obey lines in the commentary.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmoldcomm}
+         [2007/11/10 v0.99 LaTeX old comments handling (GM)]
+
+\newenvironment{oldcomments}{%
+  \catcode`\\=\active
+  \let\do\@makeother
+  \do\$% Not only CSs but also special chars happen in the old comments.
+  \do\|\do\#\do\{\do\}\do\^\do\_\do\&%
+  \gmoc@defbslash
+  \obeylines
+  \StoreMacro\finish@macroscan
+  \def\finish@macroscan{%
+    \@xa\gmd@ifinmeaning\macro@pname\of\gmoc@notprinted%
+    {}{{\tt\ifvmode\%\fi\bslash\macro@pname}}%
+    \gmoc@checkenv
+  }%
+}{}
+
+{\escapechar\m@ne
+\xdef\gmoc@notprinted{\string\begin,\string\end}}
+
+\def\gmoc@maccname{macrocode}
+\def\gmoc@ocname{oldcomments}
+
+
+\foone{%
+  \catcode`\[=1 \catcode`\]=2
+  \catcode`\{=12 \catcode`\}=12 }
+[\def\gmoc@checkenv[%
+  \@ifnextchar{%^^A}
+    [\gmoc@checkenvinn][]]%
+%
+\def\gmoc@checkenvinn{#1}[%
+  \def\gmoc@resa[#1]%
+  \ifx\gmoc@resa\gmoc@maccname
+    \def\next[%
+      \begingroup
+      \def\@currenvir[macrocode]%
+      \RestoreMacro\finish@macroscan
+      \catcode`\\=\z@
+      \catcode`\{=1 \catcode`\}=2
+      \macrocode]%
+  \else
+    \ifx\gmoc@resa\gmoc@ocname
+      \def\next[\end[oldcomments]]%
+    \else
+      \def\next[%
+        % ^^A        \typeout[**** detected environment [#1]]%
+        \{#1\}%
+        % ^^A  \show\relax
+      ]%
+    \fi
+  \fi
+  \next]%
+]
+
+\foone{%
+  \catcode`\/=\z@
+  \catcode`\\=\active}
+% \CodeEscapeChar\/
+{/def/gmoc@defbslash{%
+    /let\/scan@macro}}
+% \CodeEscapeChar\\
+
+\def\task#1#2{}
+
+\endinput
+
+%\NoEOF
-- 
cgit v1.2.3

