1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
% 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}
|