Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aipna!rjc From: rjc@aipna.ed.ac.uk (Richard Caley) Newsgroups: comp.text.tex Subject: Re: Ignoring text in LaTeX Message-ID: <2216@aipna.ed.ac.uk> Date: 12 Apr 90 10:58:52 GMT References: <7147@cps3xx.UUCP> Reply-To: rjc@aipna.ed.ac.uk (Richard Caley) Organization: Dept of AI, Edinburgh University, UK. Lines: 28 Summary: Dragon: Orm Embar In article <7147@cps3xx.UUCP> smithda@cpsvax.cps.msu.edu (J. Daniel Smith) writes: >Has anyone written a "comment" environment for LaTeX? The text >between "\begin{comment}" and "\end{comment}" would not be typeset by >LaTeX. I use the following, it is probably not the best way to do it, seems to work. Basically it sets the comment in italics in narrow margins for drafts but ignores it for polished versions. It decides you a producing a draft if you have the overfull marker set, the draft style option does this. % comments - there are either ignored or set as a 'setcomment' % depending on whether the draft option was selected. \ifdim \overfullrule =0pt \def\comment{\@swallowall} \else\def\comment{\setcomment} \fi \ifdim \overfullrule =0pt \def\endcomment{\@endswallowall} \else\def\endcomment{\endsetcomment} \fi \newsavebox{\@rubishbin} \newenvironment{@swallow}{\setbox\@rubishbin\vbox\bgroup}{\egroup} \newenvironment{setcomment}{\list{}{\advance\leftmargin 5em \rightmargin\leftmargin}\item[] \em}{\endlist}