%% This is file `xcomment.sty' generated
%% on <1992/5/8> with the docstrip utility (v1.1k). 
%% 
%% The original source file was `xcomment.doc'.
%% 
\def\fileversion{v0.9b}
\def\filedate{91/09/04}
\def\docdate{91/09/04}
%%
%% Style option `xcomment' for use with LaTeX v2.09.
%% This is a style for comment and "inverse" comment environments.
%%
%% COPYRIGHT 1992, by Timothy Van Zandt, tvz@Princeton.EDU
%%
%% Input file:                  xcomment.sty.
%% Typeset documentation:       xcomment.dvi.
%% Documented code:             xcomment.doc.
%% For printing documentation:  xcommnet.man
%%
%% Copying of part or all of any file in the xcomment.sty package
%% is allowed under the following conditions only:
%% (1) You may freely distribute unchanged copies of the files. Please
%%     include the documentation when you do so.
%% (2) You may modify a renamed copy of any file, but only for personal
%%     use or use within an organization.
%% (3) You may copy fragments from the files, for personal use or for use
%%     in a macro package for distribution, as long as credit is given
%%     where credit is due.
%%
%% You are NOT ALLOWED to take money for the distribution or use of
%% these files or modified versions or fragments thereof, except for
%% a nominal charge for copying etc.
%% \CheckSum{582}
%% \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
%%   Lower-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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\@ifundefined{xcomment@@@}{}{\endinput}
\typeout{Style-Option: `xcomment' \fileversion \space <\filedate> (tvz) }
\def\newxcomment{\@ifnextchar [{\@newxcommentwitharg}%
  {\@newxcomment}}
\def\@newxcomment#1{%
  \expandafter\def\csname #1\endcsname##1{\@xcomment{#1}{##1}}%
  \expandafter\let\csname end#1\endcsname\relax}%
\def\@newxcommentwitharg[#1]#2{%
  \expandafter\def\csname #2\endcsname{\@xcomment{#2}{#1}}%
  \expandafter\let\csname end#2\endcsname\relax}
\newxcomment{xcomment}
\def\envirsep{\par}
\def\rescanfile#1{\def\@rescanfile{#1}} \rescanfile{\jobname.tmp}
\def\norescanfile{\rescanfile{bounce}}
\def\@nofloat#1{\hrule height\z@\nobreak\vfill\vbox\bgroup\def\@captype{#1}}
\def\end@nofloat{\egroup\nobreak\vfill\nobreak\hrule height\z@\medbreak}
\def\nofloat#1{\@for\@tempa:=#1\do{\@namedef{#1}{\@nofloat{#1}}%
  \@namedef{end#1}{\end@nofloat}}}
\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
\def\test@string#1#2{\edef\@@tempa{#1}\edef\@@tempb{#2}%
  \ifx\@@tempa\@@tempb \@testtrue \else \@testfalse \fi}
\def\test@member#1#2{%
  \edef\@tempg{,#2,#1,}%
\edef\@temph{####1,#1,}%
\expandafter\def\expandafter\@temph\@temph##2\@nil{%
  \def\@tempg{##2}%
\ifx\@tempg\@empty\@testfalse\else\@testtrue\fi}%
\expandafter\@temph\@tempg\@nil}
\def\@afterspaces#1{\@ifnextchar+{#1}{#1}}
\def\xc@makeother#1{%
  \ifnum\the\catcode`#1=0\catcode`#112%
  \else \ifnum\the\catcode`#1=1\catcode`#112%
    \else \ifnum\the\catcode`#1=2\catcode`#112%
      \else \ifnum\the\catcode`#1=6\catcode`#112%
  \fi\fi\fi\fi\relax}
\newwrite\tokout
\newread\tokin
\def\rescan#1{%
  \test@string{\@rescanfile}{bounce}\if@test
  \else \test@string{\@rescanfile}{trash}\if@test #1{}%
  \else
    \immediate\openout\tokout=\@rescanfile
    \immediate\write\tokout{{\the#1}\relax}%
    \immediate\closeout\tokout
    \openin\tokin=\@rescanfile
    \read\tokin to\@tempd
    \closein\tokin
    \expandafter#1\@tempd%
    \fi\fi}
\def\@xcomment#1#2{%
  \ifx\@preamblecmds\@notprerr
    \def\xc@csname{#1}%
    \edef\xc@envirlist{#2}%
    \ifx\xc@envirlist\@empty \@bsphack \else
      \begingroup
      \def\@envirsep{}%
      \@ifundefined{normal@begin}{\let\normal@begin\begin}{}%
      \@ifundefined{normal@end}{\let\normal@end\end}{}%
      \def\begin##1{\do@begin{##1}\normal@begin{##1}}%
      \def\end##1{\normal@end{##1}\do@end}%
      \def\do@begin##1{\@ifundefined{##1}{}{\def\do@end{}}}%
      \let\do@end\xc@begin
    \fi
    \let\next\xc@begin
  \else
    \expandafter\def\expandafter\document\expandafter{%
      \document\relax\@xcomment{#1}{#2}}%
    \let\next\relax
  \fi
  \next}
\def\end@xcomment{\ifx\xc@envirlist\@empty \@esphack \else \endgroup \fi}%
\def\xc@begin{\begingroup
    \let\do\xc@makeother\dospecials\catcode`\^^M\active
  \xcomment@}
\@ifundefined{vrb@catcodes}%
  {\def\vrb@catcodes{%
     \catcode`\!12\catcode`\[12\catcode`\]12}}{}
\begingroup
\vrb@catcodes
\lccode`\!=`\\ \lccode`\[=`\{ \lccode`\]=`\}
\catcode`\~=\active \lccode`\~=`\^^M
\lowercase{%
\gdef\xcomment@#1~{\xcomment@@#1\@nnil!\@nil}%
  \gdef\xcomment@@#1!{\xcomment@@@}%
  \gdef\xcomment@@@#1{%
    \ifx \@nil#1\relax \let\next\xcomment@
    \else \ifx b#1\count@=0\@testfalse\let\next\xc@testbegin%
    \else \ifx e#1\count@=0\@testtrue\let\next\xc@testend%
    \else \let\next\xcomment@@
    \fi\fi\fi
    \next}%
  \gdef\xc@testend#1{%
    \ifx !#1\let\next\xcomment@@@
    \else \let\next\xcomment@@
      \ifcase\count@ \ifx n#1\advance\count@ by 1 \let\next\xc@testend \fi
      \or \ifx d#1\def\next{\@afterspaces\xc@checklbrace}\fi
    \fi\fi
    \next}%
    \gdef\xc@testbegin#1{%
    \ifx !#1\let\next\xcomment@@@
    \else \let\next\xcomment@@
      \ifcase\count@ \ifx e#1\advance\count@ by 1 \let\next\xc@testbegin \fi
      \or \ifx g#1\advance\count@ by 1 \let\next\xc@testbegin\fi
      \or \ifx i#1\advance\count@ by 1 \let\next\xc@testbegin\fi
      \or \ifx n#1\def\next{\@afterspaces\xc@checklbrace}\fi
    \fi\fi
    \next}%
    \gdef\xc@checklbrace#1{%
    \ifx#1[\toks@{}\def\next{\@afterspaces\xc@gather}%
    \else \ifx#1!\let\next\xcomment@@@
    \else \let\next\xcomment@@
    \fi\fi
    \next}%
    \gdef\xc@gather#1{%
    \ifx#1
    \def\next{\@afterspaces\xc@checkrbrace}%
    \else \ifx#1]\let\next\xc@checkname
      \else \ifx#1!\let\next\xcomment@@@
        \else \ifx#1\@nnil \let\next\xcomment@@
          \else \addto@hook\toks@{#1}\let\next\xc@gather
    \fi\fi\fi\fi
    \next}%
    \gdef\xc@checkrbrace#1{%
    \ifx#1]\let\next\xc@checkname
    \else \ifx#1!\let\next\xcomment@@@
      \else \let\next\xcomment@@
    \fi\fi
    \next}%
    \gdef\xc@checkname{%
  \let\next\xcomment@@
    \if@test
      \test@string{\the\toks@}{document}
      \if@test \def\next{\endgroup\end@xcomment\end{document}}\fi
      \test@string{\the\toks@}{\xc@csname}
      \if@test \let\next\end@@xcomment \fi
    \else
    \@for\@tempa:=\xc@envirlist\do{\test@string{\@tempa}{\the\toks@}%
      \if@test \let\next\xc@end \fi}%
    \fi
    \next}%
  \gdef\end@@xcomment#1\@nnil!\@nil{%
    \xdef\@gtempb{\xc@csname}%
    \endgroup
    \toks@{#1 }\rescan{\toks@}%
    \edef\next{\noexpand\end@xcomment\noexpand\end{\@gtempb}\the\toks@}%
    \next}%
  \gdef\xc@end#1\@nnil!\@nil{%
    \xdef\@gtempb{\the\toks@}%
    \endgroup
    \@envirsep \let\@envirsep\envirsep
    \toks@{#1 }\rescan{\toks@}%
    \edef\next{\noexpand\normal@begin{\@gtempb}\the\toks@}%
    \next}%
  }%  END OF LOWERCASE
\endgroup
\endinput
%% 
%% End of file `xcomment.stp'.
