% An illustration of comment.sty by Victor Eijkhout, % version 3.4 and later. % \documentclass{article} \usepackage{comment} \begin{document} \includecomment{thisone} \excludecomment{notthisone} This sentence \begin{comment} has \end{comment} no verb. Check for\begin{notthisone} superfluous \end{notthisone} spaces (there should be none between `for' and `spaces'), and around \begin{thisone} inclusion \end{thisone} of proper texts (one space between `around' and `inclusion', and one between `inclusion' and `of'). Als check for \begin{thisone} multiple paragraphs. Such as \end{thisone} here. (`Such as' should be a new paragraph.) % a test of the special comments \specialcomment{smallfry}{\begingroup\rmfamily\footnotesize}{\endgroup} %\tracingmacros=2 \tracingcommands=2 This text is \begin{smallfry} rather small \end{smallfry} don't you think? (The `rather small' should be footnotesize.) And now we disable \excludecomment{smallfry} \begin{smallfry} the special comment \end{smallfry} environment (in between `disable' and `environment' is some excluded material). % test of weird grouping We switch to \begin{thisone} \bf bold face \end{thisone} inside \rm a comment. (The phrase `bold face inside' should be bold.) \newcount\comlines \specialcomment{countedcomment} {\comlines=0\relax \def\ProcessCutFile{}% \def\ThisComment##1{\global\advance\comlines1\relax}} {**Comment: \number\comlines\ line(s) removed**} This is a line of text \begin{countedcomment} Oneline \end{countedcomment} another line of text \begin{countedcomment} One line Two line Three line \end{countedcomment} last line of text. \specialcomment {underlinecomment} {% \def\ProcessCutFile{\input{\CommentCutFile}\relax}% Bug! this % should not be necessary. \def\ThisComment##1{\WriteCommentLine{u: \underline{##1}\par}} \par } {\par} A block of two underlined lines in between this line \begin{underlinecomment} line 1 line 2 \end{underlinecomment} and before this line. \end{document}