🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #616

Re: Multi-Line comments wanted...

#616
From: Marcel Heemskerk
Date: Fri, 31 Jul 1992 15:38
68 lines
2749 bytes

The best answer I got from Sherif El-Kassas, elkassas@eb.ele.tue.nl :


---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---

% Save file as: COMMENT.STY            Source: FILESERV@SHSU.BITNET  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Comment.sty   version 1.0 2 November 1990
% to be used with plain TeX or LaTeX
%
% Author
%    Victor Eijkhout
%    Center for Supercomputing Research and Development
%    University of Illinois at Urbana-Champaign
%    305 Talbot Lab
%    104 South Wright Street
%    Urbana, Illinois 61801, USA
%
%    eijkhout@csrd.uiuc.edu
%
% Usage: all text included in between
%    \comment ... \endcomment
% or \begin{comment} ... \end{comment}
% is discarded. The closing command should appear on a line
% of its own. No starting spaces, nothing after it.
% This environment should work with arbitrary amounts
% of comment.
%
% Basic approach: take every line in verbatim mode as macro
% argument, then don't do nothing with.

\def\makeinnocent#1{\catcode`#1=12 }

\def\comment{\begingroup
    \let\do\makeinnocent \dospecials
    \makeinnocent\^^L % and whatever other special cases
    \endlinechar`\^^M \catcode`\^^M=12 \xcomment}
{\catcode`\^^M=12 \endlinechar=-1 %
 \gdef\xcomment#1^^M{\def\test{#1}
      \ifx\test\plainendcommenttest
          \let\next\endgroup
      \else\ifx\test\lalaendcommenttest
          \def\next{\endgroup\end{comment}}
      \else
          \let\next\xcomment
      \fi \fi \next}
}

{\escapechar=-1
 \xdef\plainendcommenttest{\string\\endcomment}
 \xdef\lalaendcommenttest{\string\\end\string\{comment\string\}}
}

\endinput
---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---


   _ __ __                       
  ' )  )  )                   /                Department of No Engineering
   /  /  /  __.  __  _. _.   /                 Techn.University of Eindhoven
  /  '  (__(_/|_/ (_(__(<___<_                 The Netherlands
                                               speech-phone: (0)40 - 456491
    _     ,                                    E-mail: tnnvmgh@urc.tue.nl
   ' )   /                    /         /
    /---/  _.  _.  ____  _   /, _. __  /,      'I intend to live forever or
  ./   (_ (<__(<__/ / <_/_)_/<_(<_/ (_/<_       die in the attempt'
Technical Details
Message-ID: <rcbamgh.712597117@rw8.urc.tue.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!rw8.urc.tue.nl!rcbamgh
References: <1992Jul29.131459.1@urc.tue.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!rw8.urc.tue.nl!rcbamgh
From: rcbamgh@rw8.urc.tue.nl (Marcel Heemskerk)
Newsgroups: comp.text.tex
Subject: Re: Multi-Line comments wanted...
Message-ID: <rcbamgh.712597117@rw8.urc.tue.nl>
Date: 31 Jul 92 15:38:37 GMT
References: <1992Jul29.131459.1@urc.tue.nl>
Sender: root@tuegate.tue.nl
Reply-To: rcbamgh@urc.tue.nl
Lines: 70