summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/commtest.tex
blob: 6eb0ce3d02e959e83c4271f2d6d5b4cb76fbfc90 (plain)
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
% An illustration of comment.sty by Victor Eijkhout.
% This file belongs to comment.sty version 3.0 or later,
% it is both plain TeX and LaTeX compatible.

\def\plainname{plain}
\ifx\fmtname\plainname
    \input comment.sty
\else
    \documentstyle[comment]{article}
    \begin{document}
\fi

\includecomment{thisone}
\excludecomment{notthisone}

This sentence
\comment
has
\endcomment
no verb.

Check for\notthisone
superfluous
\endnotthisone
spaces, and
\thisone
inclusion
\endthisone
of proper texts.

% a test of the special comments
\newcount\comlines
\specialcomment{countedcomment}
 {\comlines=-1\relax %note that the rest of the first line is also comment
  \def\ThisComment##1{\global\advance\comlines1\relax}}
 {\endgraf **Comment: \number\comlines\ line(s) removed**\endgraf}

This is a line of text
\countedcomment
Oneline
\endcountedcomment
another line of text
\countedcomment
One line
Two line
Three line
\endcountedcomment
last line of text

\edef\byebye{
\if\fmtname\plainname
    \noexpand\csname bye\noexpand\endcsname
\else
    \noexpand\end{document}
\fi}
\byebye