[comp.text.tex] Large comments / temporarily remove text

irani@umn-cs.cs.umn.edu (Erach Irani) (10/17/90)

Hi,
	How do I get large comments / blanked out text 3-20 pages long.
It's ok with UNIX in the department but I'm using a 386 P.C with sbtex
or emtex and it runs out of memory on the comment. blatex is too slow on
my box.

	Thanks in advance, 
	erach (irani@cs.umn.edu)

-- 
Phone : (Home) (612) 378-2336     Work : (612) 627-4850 
InterNet : irani@cs.umn.edu       UUCP: uunet!umn-cs!irani
Postal Address: Erach A.Irani; 1717, Rollins Ave.; Minneapolis, MN 55414.

smithda@buster.cps.msu.edu (J. Daniel Smith) (10/18/90)

In article <1990Oct17.090826.10399@cs.umn.edu> irani@umn-cs.cs.umn.edu (Erach Irani) writes:
>Hi,
>	How do I get large comments / blanked out text 3-20 pages long.
>It's ok with UNIX in the department but I'm using a 386 P.C with sbtex
>or emtex and it runs out of memory on the comment. blatex is too slow on
>my box.
If I understand this correctly, it sounds like a request for a comment
environment.  I wrote one a few months ago modeled after LaTeX's
"verbatim".  To avoid the memory problem mentioned here, I turn the
\catcode of most characters to that of "comment".  This causes TeX to
ignore most of the line, instead of making it part of the argument.

   Dan
%
% J. Daniel Smith
% 7 April 1990
%
% comment.sty
%
% All text between \begin{comment} and \end{comment} is ignored by
% LaTeX.  Modified from the verbatim macros of LaTeX.
%
\typeout{Document Style option `comment' <7 Apr 90>.}
%
\catcode`@=11
%
\def\c@tend{\catcode`@=14\catcode``=14}
\def\c@mmentcat{
        \let\c@=\catcode
	\c@`!=14 \c@`"=14 \c@`\#=14
	\c@`\$=14 \c@`\&=14 \c@`'=14 \c@`(=14
	\c@`)=14 \c@`*=14 \c@`+=14 \c@`,=14 \c@`-=14
	\c@`.=14 \c@`/=14 \c@`0=14 \c@`1=14 \c@`2=14
	\c@`3=14 \c@`4=14 \c@`5=14 \c@`6=14 \c@`7=14
	\c@`8=14 \c@`9=14 \c@`:=14 \c@`;=14 \c@`<=14
	\c@`==14 \c@`>=14 \c@`?=14 \c@`@=14 \c@`A=14
	\c@`B=14 \c@`C=14 \c@`D=14 \c@`E=14 \c@`F=14
	\c@`G=14 \c@`H=14 \c@`I=14 \c@`J=14 \c@`K=14
	\c@`L=14 \c@`M=14 \c@`N=14 \c@`O=14 \c@`P=14
	\c@`Q=14 \c@`R=14 \c@`S=14 \c@`T=14 \c@`U=14
	\c@`V=14 \c@`W=14 \c@`X=14 \c@`Y=14 \c@`Z=14
	\c@`[=14 \c@`]=14 \c@`^=14 \c@`_=14
	\c@`a=14 \c@`f=14 \c@`g=14 \c@`h=14 \c@`i=14
	\c@`j=14 \c@`k=14 
	\c@`q=14 \c@`s=14
	\c@`u=14 \c@`v=14 \c@`w=14 \c@`x=14
	\c@`y=14 \c@`z=14 \c@`|=14
	\c@`~=14 \c@` =14\c@tend}
%
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |long|gdef|@xcomment#1\end{comment}[|end[comment]]
|endgroup

\def\@comment{\let\do\@makeother \dospecials\c@mmentcat}

\let\endc@mment=\endtrivlist
%\newenvironment{comment}{\@comment\@xcomment}{\endc@mment}
\newenvironment{comment}{\@comment\@xcomment}{}
%
\catcode`@=12
--
J. Daniel Smith                  Internet: dsmith@applga.aa.cad.slb.com
Schlumberger CAD/CAM	           BITNET: smithdan@msuegr
Ann Arbor, Michigan	           Usenet: uunet!sharkey!applga!dsmith
				    SINet: AAACA1::SMITH

myers@ut-emx.uucp (Eric Myers) (10/18/90)

In article <1990Oct17.090826.10399@cs.umn.edu> irani@umn-cs.cs.umn.edu
(Erach Irani) writes: 
>Hi,
>	How do I get large comments / blanked out text 3-20 pages long.
>It's ok with UNIX in the department but I'm using a 386 P.C with sbtex
>or emtex and it runs out of memory on the comment. blatex is too slow on
>my box.

I'm not sure if this will work for such large comments, but TeXsis uses
the following:

%--------------------------------------------------*
% COMMENTS.
%
% Use \comment to turn most anything into nothing (must have balanced {}!).
% Usage:
%   \comment/* <text to be ignored> */      % the /* and */ are required!

\long\def\comment#1/*#2*/{\endcomment}  % lets you do stuff afterwards
\def\endcomment{\relax}                 % but for now just do nothing 



-- 
Eric Myers		"Frankie say '\relax'"

Center for Relativity, Department of Physics, University of Texas at Austin
myers@emx.utexas.edu  |   myers@utaphy.bitnet   |   myers@ut-emx.UUCP