summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/comment/comm_test.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/comment/comm_test.tex')
-rw-r--r--macros/latex/contrib/comment/comm_test.tex97
1 files changed, 97 insertions, 0 deletions
diff --git a/macros/latex/contrib/comment/comm_test.tex b/macros/latex/contrib/comment/comm_test.tex
new file mode 100644
index 0000000000..ec1feb3a51
--- /dev/null
+++ b/macros/latex/contrib/comment/comm_test.tex
@@ -0,0 +1,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}