| 1 |
% An illustration of comment.sty by Victor Eijkhout, |
| 2 |
% version 3.4 and later. |
| 3 |
% |
| 4 |
\documentclass{article} |
| 5 |
|
| 6 |
\usepackage{comment} |
| 7 |
|
| 8 |
\begin{document} |
| 9 |
|
| 10 |
\includecomment{thisone} |
| 11 |
\excludecomment{notthisone} |
| 12 |
|
| 13 |
This sentence |
| 14 |
\begin{comment} |
| 15 |
has |
| 16 |
\end{comment} |
| 17 |
no verb. |
| 18 |
|
| 19 |
Check for\begin{notthisone} |
| 20 |
superfluous |
| 21 |
\end{notthisone} |
| 22 |
spaces (there should be none between `for' and `spaces'), |
| 23 |
and around |
| 24 |
\begin{thisone} |
| 25 |
inclusion |
| 26 |
\end{thisone} |
| 27 |
of proper texts (one space between `around' and `inclusion', |
| 28 |
and one between `inclusion' and `of'). |
| 29 |
|
| 30 |
Als check for |
| 31 |
\begin{thisone} |
| 32 |
multiple paragraphs. |
| 33 |
|
| 34 |
Such as |
| 35 |
\end{thisone} |
| 36 |
here. (`Such as' should be a new paragraph.) |
| 37 |
|
| 38 |
% a test of the special comments |
| 39 |
\specialcomment{smallfry}{\begingroup\rmfamily\footnotesize}{\endgroup} |
| 40 |
%\tracingmacros=2 \tracingcommands=2 |
| 41 |
This text is |
| 42 |
\begin{smallfry} |
| 43 |
rather small |
| 44 |
\end{smallfry} |
| 45 |
don't you think? (The `rather small' should be footnotesize.) |
| 46 |
|
| 47 |
And now we disable |
| 48 |
\excludecomment{smallfry} |
| 49 |
\begin{smallfry} |
| 50 |
the special comment |
| 51 |
\end{smallfry} |
| 52 |
environment |
| 53 |
(in between `disable' and `environment' is some excluded material). |
| 54 |
|
| 55 |
% test of weird grouping |
| 56 |
We switch to |
| 57 |
\begin{thisone} |
| 58 |
\bf bold face |
| 59 |
\end{thisone} |
| 60 |
inside \rm a comment. (The phrase `bold face inside' should be bold.) |
| 61 |
|
| 62 |
\newcount\comlines |
| 63 |
\specialcomment{countedcomment} |
| 64 |
{\comlines=0\relax \def\ProcessCutFile{}% |
| 65 |
\def\ThisComment##1{\global\advance\comlines1\relax}} |
| 66 |
{**Comment: \number\comlines\ line(s) removed**} |
| 67 |
|
| 68 |
This is a line of text |
| 69 |
\begin{countedcomment} |
| 70 |
Oneline |
| 71 |
\end{countedcomment} |
| 72 |
another line of text |
| 73 |
\begin{countedcomment} |
| 74 |
One line |
| 75 |
Two line |
| 76 |
Three line |
| 77 |
\end{countedcomment} |
| 78 |
last line of text. |
| 79 |
|
| 80 |
\specialcomment |
| 81 |
{underlinecomment} |
| 82 |
{% |
| 83 |
\def\ProcessCutFile{\input{\CommentCutFile}\relax}% Bug! this |
| 84 |
% should not be necessary. |
| 85 |
\def\ThisComment##1{\WriteCommentLine{u: \underline{##1}\par}} |
| 86 |
\par |
| 87 |
} |
| 88 |
{\par} |
| 89 |
|
| 90 |
A block of two underlined lines in between this line |
| 91 |
\begin{underlinecomment} |
| 92 |
line 1 |
| 93 |
line 2 |
| 94 |
\end{underlinecomment} |
| 95 |
and before this line. |
| 96 |
|
| 97 |
\end{document} |