texlive[41927] Master/texmf-dist: comment (25aug16)

commits+karl at tug.org commits+karl at tug.org
Fri Aug 26 01:02:06 CEST 2016


Revision: 41927
          http://tug.org/svn/texlive?view=revision&revision=41927
Author:   karl
Date:     2016-08-26 01:02:05 +0200 (Fri, 26 Aug 2016)
Log Message:
-----------
comment (25aug16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/comment/README
    trunk/Master/texmf-dist/doc/latex/comment/comment.pdf
    trunk/Master/texmf-dist/doc/latex/comment/comment.tex
    trunk/Master/texmf-dist/tex/latex/comment/comment.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/comment/Makefile
    trunk/Master/texmf-dist/doc/latex/comment/comm_bug.tex
    trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf
    trunk/Master/texmf-dist/doc/latex/comment/comm_test.tex
    trunk/Master/texmf-dist/doc/latex/comment/comm_test_ivo.tex
    trunk/Master/texmf-dist/doc/latex/comment/comm_test_l.tex
    trunk/Master/texmf-dist/doc/latex/comment/comment_plain.tex
    trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf
    trunk/Master/texmf-dist/doc/latex/comment/t1test.tex
    trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf
    trunk/Master/texmf-dist/doc/latex/comment/writeup.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/comment/comm_latest.tex

Added: trunk/Master/texmf-dist/doc/latex/comment/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/Makefile	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,6 @@
+info :
+	@echo "there is nothing to make here"
+clean :
+	@/bin/rm -f *~ *.{aux,log,out} *.cut
+zip : clean
+	@cd .. ; zip comment.zip comment/*


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/comment/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/README	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/README	2016-08-25 23:02:05 UTC (rev 41927)
@@ -1,3 +1,7 @@
-files:
-comment.sty -- the latest version (August 1998)
-comm_latest.tex -- a LaTeX test file for comment.sty
+Files:
+- comment.sty : LaTeX comment style
+- comment_plain.tex : plain TeX version, no longer maintained
+- comment.{tex,pdf} : description of how the style works
+
+- comm_test.tex : illustrative test
+- t1test.tex : test of T1 non-ascii characters

Added: trunk/Master/texmf-dist/doc/latex/comment/comm_bug.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_bug.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_bug.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,32 @@
+\documentclass[12pt]{article}
+ 
+\usepackage{comment} 
+\excludecomment{conditional}
+ 
+\specialcomment{redcomment}{\begingroup\em\Large}{\endgroup\tiny}
+ 
+\begin{document}
+ 
+plain text.
+ 
+\newcommand{\Redcomment}[1]{Original Definition. (#1).}
+ 
+\begin{conditional}
+Conditional Text.
+ 
+More Conditional Text in next paragraph.
+ 
+\renewcommand{\Redcomment}[1]{Redefinition Worked! (#1).}
+\end{conditional}
+ 
+\begin{redcomment}
+the first redcomment paragraph.
+ 
+the second redcomment paragraph.
+\end{redcomment}
+ 
+Because redcomment has ended, this should be tiny.
+ 
+\Redcomment{This is the command line version.}
+ 
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comm_bug.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/comment/comm_latest.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_latest.tex	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_latest.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -1,81 +0,0 @@
-% An illustration of comment.sty by Victor Eijkhout,
-% version 3.4 and later.
-%
-% For use with LaTeX2.09, and LaTeX2e in compatibility mode.
-%
-\documentstyle{article}
-\begin{document}
-
-\input comment.sty
-
-\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
-\processcomment{countedcomment}
- {\comlines=0\relax
-  \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.
-
-\end{document}

Added: trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf	2016-08-25 23:02:05 UTC (rev 41927)

Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comm_test.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/comm_test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_test.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_test.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -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}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comm_test.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/comm_test_ivo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_test_ivo.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_test_ivo.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,32 @@
+\documentclass[12pt]{article}
+ 
+\usepackage{comment} 
+\excludecomment{conditional}
+ 
+\specialcomment{redcomment}{\em\Large}{\tiny}
+ 
+\begin{document}
+ 
+plain text.
+ 
+\newcommand{\Redcomment}[1]{Original Definition. (#1).}
+ 
+\begin{conditional}
+Conditional Text.
+ 
+More Conditional Text in next paragraph.
+ 
+\renewcommand{\Redcomment}[1]{Redefinition Worked! (#1).}
+\end{conditional}
+ 
+\begin{redcomment}
+the first redcomment paragraph.
+ 
+the second redcomment paragraph.
+\end{redcomment}
+ 
+Because redcomment has ended, this should be tiny.
+ 
+\Redcomment{This is the command line version.}
+ 
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comm_test_ivo.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/comm_test_l.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comm_test_l.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/comm_test_l.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,78 @@
+% An illustration of comment.sty by Victor Eijkhout.
+% This file belongs to comment.sty version 3.0 or later,
+% it is meant to be used with LaTeX
+
+\documentstyle[comment]{article}
+\begin{document}
+
+\excludecomment{begone}
+
+\includecomment{thisone}
+\excludecomment{notthisone}
+
+% under development \leveledcomment{maybethis}{1}
+
+\parskip=20pt
+This sentence
+\begin{comment}
+has
+\end{comment}
+no verb.
+
+Check for\begin{notthisone}
+superfluous
+\end{notthisone}
+spaces, and
+\begin{thisone}
+inclusion
+\end{thisone}
+of proper texts.
+
+% a test of the special comments
+\newcount\comlines
+\processcomment{countedcomment}
+ {\comlines=0\relax
+  \def\ThisComment##1{\global\advance\comlines1\relax}}
+ {}{\endgraf **Comment: \number\comlines\ line(s) removed**\endgraf}
+
+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
+
+Let's test paragraphs:
+\begin{notthisone}
+This one is missing.
+
+As is this one.
+\end{notthisone}
+For starters.
+
+On the other hand:
+\begin{thisone}
+This is one is present.
+
+As is this one.
+\end{thisone}
+And that's it.
+
+\begin{comment} % future project
+\maybethis 0
+Level zero.
+\endmaybethis
+\maybethis 1
+Level one.
+\endmaybethis
+\maybethis 2
+Level two.
+\endmaybethis
+\end{comment}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comm_test_l.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/comment/comment.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/comment/comment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comment.tex	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/comment.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -1,4 +1,4 @@
-\documentclass[parskip=false, DIV=8, headings=normal, pagesize=auto]{scrartcl}
+\documentclass[parskip=false, DIV=8, headings=normal, pagesize=auto]{artikel3}%{scrartcl}
 
 \usepackage{fixltx2e}
 \usepackage{etex}
@@ -27,11 +27,12 @@
 \newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
 \newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
 
-\addtokomafont{title}{\rmfamily}
+%\addtokomafont{title}{\rmfamily}
 
-\title{The \pkg{comment} package\thanks{This manual corresponds to \pkg{comment}~v3.6, dated~October 1999.}}
-\author{Victor Eijkhout\\\mail{victor at eijkhout.net}}
-\date{October 1999}
+\title{The \pkg{comment} package\thanks{This manual corresponds to
+    \pkg{comment}~v3.8 of July 2016.}}
+%
+\author{Victor Eijkhout\\\mail{victor at eijkhout.net}} \date{August 2016}
 
 
 \begin{document}
@@ -40,29 +41,27 @@
 
 \section{Purpose:}
 
-selectively in/exclude pieces of text: the user can define new
+Selectively in/exclude pieces of text: the user can define new
 comment versions, and each is controlled separately.
 Special comments can be defined where the user specifies the
 action that is to be taken with each comment line.
 
-This style can be used with plain \TeX\ or \LaTeX, and probably
-most other packages too.
+Plain \TeX\ support has been phased out.
 
+As of 3.8 the package will increasingly use e\TeX\ features, for
+instance to solve Unicode support issues.
 
 \section{Usage:}
 
+The `\env{comment}' environment is defined by default:
 all text included between
 %
 \begin{verbatim}
-\comment ... \endcomment
+\begin{comment}
+ ... 
+\end{comment}
 \end{verbatim}
 %
-or
-%
-\begin{verbatim}
-\begin{comment} ... \end{comment}
-\end{verbatim}
-%
 is discarded. 
 
 The opening and closing commands should appear on a line
@@ -81,27 +80,32 @@
 These environments are used as
 %
 \begin{verbatim}
-\versiona ... \endversiona
+\begin{versiona}
+ ... 
+\end{versiona}
 \end{verbatim}
 %
-or
-%
-\begin{verbatim}
-\begin{versiona} ... \end{versiona}
-\end{verbatim}
-%
 with the opening and closing commands again on a line of 
 their own.
 
-\pagebreak[1]
-
-\LaTeX\ users note: for an included comment, the
+Note: for an included comment, the
 \cmd{\begin} and \cmd{\end} lines act as if they don't exist.
 In particular, they don't imply grouping, so assignments 
 \&c are not local.
 
-\pagebreak[2]
+Trick for short in/exclude macros (such as \verb+\maybe{this snippet}+):
+%
+\begin{verbatim}
+\includecomment{cond}
+\newcommand{\maybe}[1]{}
+\begin{cond}
+\renewcommand{\maybe}[1]{#1}
+\end{cond}
+\end{verbatim}
 
+\section{Special comments}
+
+It is possible to make highly customized versions of the comment environment.
 Special comments are defined as
 %
 \begin{noverb}
@@ -111,9 +115,11 @@
 where the second and third arguments are executed before
 and after each comment block. You can use this for global
 formatting commands.
+
 To keep definitions \&c local, you can include \cmd{\begingroup}
 in the `\meta{before commands}' and \cmd{\endgroup} in the `\meta{after commands}'.
-ex:
+
+Example:
 %
 \begin{verbatim}
 \specialcomment{smalltt}
@@ -120,54 +126,120 @@
     {\begingroup\ttfamily\footnotesize}{\endgroup}
 \end{verbatim}
 %
-You do \emph{not} have to do an additional
-%
+Special comments are automatically included.
+
+The comment environments use two auxiliary commands. You can get
+nifty special effects by redefining them.
+
+\subsection{The cutfile}
+
+The commented text is written to an external file, the `cutfile'. Default definition:
 \begin{verbatim}
-\includecomment{smalltt}
+  \def\CommentCutFile{comment.cut}
 \end{verbatim}
-%
-To remove `\env{smalltt}' blocks, give \verb+\excludecomment{smalltt}+
-after the definition.
 
-Processing comments can apply processing to each line.
-%
-\begin{noverb}
-\cmd{\processcomment}\marg{name}\marg{each-line commands}\marg{before commands}\marg{after commands}
-\end{noverb}
-%
-By defining a control sequence
-%
+Included comments are processed like this:
 \begin{verbatim}
-\def\Thiscomment##1{...}
+  \def\ProcessCutFile{\input{\CommentCutFile}\relax}
 \end{verbatim}
-%
+  and excluded files have
+\begin{verbatim}
+  \def\ProcessCutFile{}
+\end{verbatim}
+
+\begin{itemize}
+\item By redefining the name of the cutfile, the value of the macro
+  \cmd{CommentCutFile}, it becomes possible to have nested comment environments.
+\item If you are writing a textbook, you could have the answers to
+  exercises in your source, but write them to file rather than
+  formatting them:
+\begin{verbatim}
+\generalcomment{answer}
+  {\begingroup
+   \edef\tmp{\def\noexpand\CommentCutFile
+                 {answers/\chapshortname-an\noexpand\arabic{excounter}.tex}}\tmp
+   \def\ProcessCutFile{}}
+  {\ifIncludeAnswers \begin{quote}
+   \leavevmode
+   \hbox{\kern-\unitindent 
+         \textbf Solution to exercise \arabic{chapter}.\arabic{excounter}.\hspace{1em}}%
+     \ignorespaces\it
+   \input{\CommentCutFile}
+   \end{quote}\fi
+   \endgroup}
+\end{verbatim}
+\end{itemize}
+
+\subsection{Comment inclusion}
+
+The inclusion of the comment is done
+by \cmd{\ProcessCutFile}, so you can redefine that:
+\begin{verbatim}
+  \specialcomment
+    {mathexamplewithcode}
+    {\begingroup\def\ProcessCutFile{}} % arg1
+    {\verbatiminput{\CommentCutFile}   % arg2
+     \endgroup
+     This gives:
+     \begin{equation} \input{\CommentCutFile} \end{equation}
+    }
+\end{verbatim}
+The idea here is to disable inclusion of the file,
+but include it in the after commands, in display math.
+
+\subsection{Processing each line}
+
+You can also apply processing to each line.
+By defining a control sequence 
+\begin{verbatim}
+  \def\Thiscomment##1{...}
+\end{verbatim}
 in the before commands the user can
-specify what is to be done with each comment line.
-BUG this does not work quite yet BUG
+specify what is to be done with each comment line. If something 
+needs to be written to file, use \verb+\WriteCommentLine{the stuff}+
+Example:
+\begin{verbatim}
+  \specialcomment
+    {underlinecomment}
+    {\def\ThisComment##1{\WriteCommentLine{\underline{##1}\par}}
+     \par}
+    {\par}
+\end{verbatim}
 
-Trick for short in/exclude macros (such as \verb+\maybe{this snippet}+):
-%
+\subsection{More examples}
+
 \begin{verbatim}
-\includecomment{cond}
-\newcommand{\maybe}[1]{}
-\begin{cond}
-\renewcommand{\maybe}[1]{#1}
-\end{cond}
+\newcount\comlines
+\specialcomment{countedcomment}
+ {\comlines=0\relax \def\ProcessCutFile{}%
+  \def\ThisComment##1{\global\advance\comlines1\relax}}
+ {**Comment: \number\comlines\ line(s) removed**}
 \end{verbatim}
 
+\begin{verbatim}
+\specialcomment
+    {underlinecomment}
+    {%
+      \def\ProcessCutFile{\input{\CommentCutFile}\relax}
+      \def\ThisComment##1{\WriteCommentLine{u: \underline{##1}\par}}
+      \par
+    }
+    {\par}
+\end{verbatim}
 
-\section{Basic approach of the implementation:}
+\section{Unicode support}
 
-to comment something out, scoop up  every line in verbatim mode
-as macro argument, then throw it away.
-For inclusions, in \LaTeX\ the block is written out to
-a file \cmd{\CommentCutFile} (default ``\texttt{comment.cut}''), which is
-then included.
-In plain \TeX\ (and other formats) both the opening and
-closing comands are defined as noop.
+Unicode support works if you use e\TeX, which is for instance the case
+if you use pdflatex. You need the following lines:
+\begin{verbatim}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\end{verbatim}
+in your preamble.
 
+\section{Change log}
 
-\section{Changes in version 3.1}
+\subsection{Changes in version 3.1}
 
 \begin{itemize}
 \item updated author's address
@@ -188,7 +260,7 @@
 \end{itemize}
 
 
-\section{Changes in 3.2}
+\subsection{Changes in 3.2}
 
 \begin{itemize}
 \item \cmd{\specialcomment} brought up to date (thanks to Ivo Welch).
@@ -195,7 +267,7 @@
 \end{itemize}
 
 
-\section{Changes in 3.3}
+\subsection{Changes in 3.3}
 
 \begin{itemize}
 \item updated author's address again
@@ -203,7 +275,7 @@
 \end{itemize}
 
 
-\section{Changes in 3.4}
+\subsection{Changes in 3.4}
 
 \begin{itemize}
 \item added GNU public license
@@ -212,7 +284,7 @@
 \end{itemize}
 
   
-\section{Changes in 3.5}
+\subsection{Changes in 3.5}
 
 \begin{itemize}
 \item corrected typo in header.
@@ -222,7 +294,7 @@
 \end{itemize}
 
 
-\section{Changes in 3.6}
+\subsection{Changes in 3.6}
 
 \begin{itemize}
 \item The `cut' file is now written more verbatim, using \cmd{\meaning};
@@ -232,11 +304,8 @@
 \end{itemize}
 
 
-\section{Known bugs:}
+\subsection{Changes in 3.8}
 
-\begin{itemize}
-\item \texttt{excludecomment} leads to one superfluous space
-\item \texttt{processcomment} leads to a superfluous line break
-\end{itemize}
+T1 font encoding is now supported. See t1test.tex.
 
 \end{document}

Added: trunk/Master/texmf-dist/doc/latex/comment/comment_plain.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/comment_plain.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/comment_plain.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,263 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Comment.sty   version 3.5, August 1998
+%
+% Purpose:
+% selectively in/exclude pieces of text: the user can define new
+% comment versions, and each is controlled separately.
+% Special comments can be defined where the user specifies the
+% action that is to be taken with each comment line.
+%
+% Author
+%    Victor Eijkhout
+%    Department of Computer Science
+%    University of Tennessee
+%    107 Ayres Hall
+%    Knoxville TN 37996
+%    USA
+%
+%    victor at eijkhout.net
+%
+% This program is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License
+% as published by the Free Software Foundation; either version 2
+% of the License, or (at your option) any later version.
+% 
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% For a copy of the GNU General Public License, write to the 
+% Free Software Foundation, Inc.,
+% 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA,
+% or find it on the net, for instance at
+% http://www.gnu.org/copyleft/gpl.html
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This style can be used with plain TeX or LaTeX, and probably
+% most other packages too.
+%
+% Usage: all text included between
+%    \comment ... \endcomment
+% or \begin{comment} ... \end{comment}
+% is discarded. 
+%
+% The opening and closing commands should appear on a line
+% of their own. No starting spaces, nothing after it.
+% This environment should work with arbitrary amounts
+% of comment, and the comment can be arbitrary text.
+%
+% Other `comment' environments are defined by
+% and are selected/deselected with
+% \includecomment{versiona}
+% \excludecoment{versionb}
+%
+% These environments are used as
+% \versiona ... \endversiona
+% or \begin{versiona} ... \end{versiona}
+% with the opening and closing commands again on a line of 
+% their own.
+%
+% LaTeX users note: for an included comment, the
+% \begin and \end lines act as if they don't exist.
+% In particular, they don't imply grouping, so assignments 
+% &c are not local.
+%
+% Special comments are defined as
+% \specialcomment{name}{before commands}{after commands}
+% where the second and third arguments are executed before
+% and after each comment block. You can use this for global
+% formatting commands.
+% To keep definitions &c local, you can include \begingroup
+% in the `before commands' and \endgroup in the `after commands'.
+% ex:
+% \specialcomment{smalltt}
+%     {\begingroup\ttfamily\footnotesize}{\endgroup}
+% You do *not* have to do an additional
+% \includecomment{smalltt}
+% To remove 'smalltt' blocks, give \excludecomment{smalltt}
+% after the definition.
+%
+% Processing comments can apply processing to each line.
+% \processcomment{name}{each-line commands}%
+%    {before commands}{after commands}
+% By defining a control sequence 
+% \def\Thiscomment##1{...} in the before commands the user can
+% specify what is to be done with each comment line.
+% BUG this does not work quite yet BUG
+%
+% Trick for short in/exclude macros (such as \maybe{this snippet}):
+%\includecomment{cond}
+%\newcommand{\maybe}[1]{}
+%\begin{cond}
+%\renewcommand{\maybe}[1]{#1}
+%\end{cond}
+%
+% Basic approach of the implementation:
+% to comment something out, scoop up  every line in verbatim mode
+% as macro argument, then throw it away.
+% For inclusions, in LaTeX the block is written out to
+% a file \CommentCutFile (default "comment.cut"), which is
+% then included.
+% In plain TeX (and other formats) both the opening and
+% closing comands are defined as noop.
+%
+% Changes in version 3.1
+% - updated author's address
+% - cleaned up some code
+% - trailing contents on \begin{env} line is always discarded
+%  even if you've done \includecomment{env}
+% - comments no longer define grouping!! you can even
+%   \includecomment{env}
+%   \begin{env}
+%   \begin{itemize}
+%   \end{env}
+%  Isn't that something ...
+% - included comments are written to file and input again.
+% Changes in 3.2
+% - \specialcomment brought up to date (thanks to Ivo Welch).
+% Changes in 3.3
+% - updated author's address again
+% - parametrised \CommentCutFile
+% Changes in 3.4
+% - added GNU public license
+% - added \processcomment, because Ivo's fix (above) brought an
+%   inconsistency to light.
+% Changes in 3.5
+% - corrected typo in header.
+% - changed author email
+% - corrected \specialcomment yet again.
+% - fixed excludecomment of an earlier defined environment.
+%
+% Known bugs:
+% - excludecomment leads to one superfluous space
+% - processcomment leads to a superfluous line break
+%
+\def\makeinnocent#1{\catcode`#1=12 }
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+\def\latexname{lplain}\def\latexename{LaTeX2e}
+\newwrite\CommentStream
+\def\CommentCutFile{comment.cut}
+
+\def\ProcessComment#1% start it all of
+   {\begingroup
+    \def\CurrentComment{#1}%
+    \let\do\makeinnocent \dospecials 
+    \makeinnocent\^^L% and whatever other special cases
+    \endlinechar`\^^M \catcode`\^^M=12 \xComment}
+%\def\ProcessCommentWithArg#1#2% to be used in \leveledcomment
+%   {\begingroup
+%    \def\CurrentComment{#1}%
+%    \let\do\makeinnocent \dospecials 
+%    \makeinnocent\^^L% and whatever other special cases
+%    \endlinechar`\^^M \catcode`\^^M=12 \xComment}
+{\catcode`\^^M=12 \endlinechar=-1 %
+ \gdef\xComment#1^^M{%
+    \expandafter\ProcessCommentLine}
+ \gdef\ProcessCommentLine#1^^M{\def\test{#1}
+      \csarg\ifx{End\CurrentComment Test}\test
+          \edef\next{\noexpand\EndOfComment{\CurrentComment}}%
+      \else \ThisComment{#1}\let\next\ProcessCommentLine
+      \fi \next}
+}
+
+% 3.1 change: in LaTeX and LaTeX2e prevent grouping
+\if 0%
+\ifx\fmtname\latexename 
+    0%
+\else \ifx\fmtname\latexname 
+          0%
+      \else 
+          1%
+\fi   \fi
+%%%%
+%%%% definitions for LaTeX
+%%%%
+\def\AfterIncludedComment
+   {\immediate\closeout\CommentStream
+    \input{\CommentCutFile}\relax
+    }%
+\def\TossComment{\immediate\closeout\CommentStream}
+\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}}
+\def\BeforeIncludedComment
+   {\immediate\openout\CommentStream=\CommentCutFile
+    \let\ThisComment\WriteCommentLine}
+\def\includecomment
+ #1{\message{Include comment '#1'}%
+    \csarg\let{After#1Comment}\AfterIncludedComment
+    \csarg\def{#1}{\BeforeIncludedComment
+        \ProcessComment{#1}}%
+    \CommentEndDef{#1}}
+\long\def\specialcomment
+ #1#2#3{\message{Special comment '#1'}%
+    % note: \AfterIncludedComment does \input, so #2 goes here!
+    \csarg\def{After#1Comment}{#2\AfterIncludedComment#3}%
+    \csarg\def{#1}{\BeforeIncludedComment\relax
+          \ProcessComment{#1}}%
+    \CommentEndDef{#1}}
+\long\def\processcomment
+ #1#2#3#4{\message{Lines-Processing comment '#1'}%
+    \csarg\def{After#1Comment}{#3\AfterIncludedComment#4}%
+    \csarg\def{#1}{\BeforeIncludedComment#2\relax
+          \ProcessComment{#1}}%
+    \CommentEndDef{#1}}
+\def\leveledcomment
+ #1#2{\message{Include comment '#1' up to level '#2'}%
+    %\csarg\newif{if#1IsStreamingComment}
+    %\csarg\newif{if#1IsLeveledComment}
+    %\csname #1IsLeveledCommenttrue\endcsname
+    \csarg\let{After#1Comment}\AfterIncludedComment
+    \csarg\def{#1}{\BeforeIncludedComment
+        \ProcessCommentWithArg{#1}}%
+    \CommentEndDef{#1}}
+\else 
+%%%%
+%%%%plain TeX and other formats
+%%%%
+\def\includecomment
+ #1{\message{Including comment '#1'}%
+    \csarg\def{#1}{}%
+    \csarg\def{end#1}{}}
+\long\def\specialcomment
+ #1#2#3{\message{Special comment '#1'}%
+    \csarg\newif{if#1IsStreamingComment}
+    \csarg\def{#1}{\def\ThisComment{}\def\AfterComment{#3}#2%
+           \ProcessComment{#1}}%
+    \CommentEndDef{#1}}
+\fi
+
+%%%%
+%%%% general definition of skipped comment
+%%%%
+\def\excludecomment
+ #1{\message{Excluding comment '#1'}%
+    \csarg\def{#1}{\let\AfterComment\relax
+           \def\ThisComment####1{}\ProcessComment{#1}}%
+    \csarg\let{After#1Comment}\TossComment
+    \CommentEndDef{#1}}
+
+\if 0%
+\ifx\fmtname\latexename 
+    0%
+\else \ifx\fmtname\latexname 
+          0%
+      \else 
+          1%
+\fi   \fi
+% latex & latex2e:
+\def\EndOfComment#1{\endgroup\end{#1}%
+    \csname After#1Comment\endcsname}
+\def\CommentEndDef#1{{\escapechar=-1\relax
+    \csarg\xdef{End#1Test}{\string\\end\string\{#1\string\}}%
+    }}
+\else
+% plain & other
+\def\EndOfComment#1{\endgroup\AfterComment}
+\def\CommentEndDef#1{{\escapechar=-1\relax
+    \csarg\xdef{End#1Test}{\string\\end#1}%
+    }}
+\fi
+
+\excludecomment{comment}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/comment_plain.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf	2016-08-25 23:02:05 UTC (rev 41927)

Property changes on: trunk/Master/texmf-dist/doc/latex/comment/t1test.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/t1test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/t1test.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/t1test.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,24 @@
+\documentclass{article}
+
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+
+\usepackage{comment}
+\includecomment{mention}
+
+%% set-language-environment UTF-8
+
+\begin{document}
+
+Yes:
+\begin{mention}
+Ð
+\end{mention}
+.
+
+No:
+\begin{comment}
+Ñ
+\end{comment}
+.
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/t1test.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf	2016-08-25 23:02:05 UTC (rev 41927)

Property changes on: trunk/Master/texmf-dist/doc/latex/comment/writeup.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/comment/writeup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/comment/writeup.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/comment/writeup.tex	2016-08-25 23:02:05 UTC (rev 41927)
@@ -0,0 +1,244 @@
+\documentclass[parskip=false, DIV=8, headings=normal, pagesize=auto]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{xspace}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{microtype}
+\usepackage[unicode=true]{hyperref}
+
+\newenvironment*{noverb}{%
+  \flushleft
+  \vskip\parskip
+  \parskip=0pt\relax
+}{%
+  \endflushleft
+}
+
+\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\env}[1]{\texttt{#1}}
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
+
+\addtokomafont{title}{\rmfamily}
+
+\title{The \pkg{comment} package\thanks{This manual corresponds to
+    \pkg{comment}~v3.8 of July 2016.}}
+%
+\author{Victor Eijkhout\\\mail{victor at eijkhout.net}} \date{August 2016}
+
+
+\begin{document}
+
+\maketitle
+
+\section{Purpose:}
+
+Selectively in/exclude pieces of text: the user can define new
+comment versions, and each is controlled separately.
+Special comments can be defined where the user specifies the
+action that is to be taken with each comment line.
+
+Plain \TeX\ support has been phased out.
+
+As of 3.8 the package will increasingly use e\TeX\ features, for
+instance to solve Unicode support issues.
+
+\section{Usage:}
+
+All text included between
+%
+\begin{verbatim}
+\begin{comment}
+ ... 
+\end{comment}
+\end{verbatim}
+%
+is discarded. 
+
+The opening and closing commands should appear on a line
+of their own. No starting spaces, nothing after it.
+This environment should work with arbitrary amounts
+of comment, and the comment can be arbitrary text.
+
+Other `\env{comment}' environments are defined by
+and are selected/deselected with
+%
+\begin{verbatim}
+\includecomment{versiona}
+\excludecoment{versionb}
+\end{verbatim}
+%
+These environments are used as
+%
+\begin{verbatim}
+\versiona ... \endversiona
+\end{verbatim}
+%
+or
+%
+\begin{verbatim}
+\begin{versiona} ... \end{versiona}
+\end{verbatim}
+%
+with the opening and closing commands again on a line of 
+their own.
+
+\pagebreak[1]
+
+\LaTeX\ users note: for an included comment, the
+\cmd{\begin} and \cmd{\end} lines act as if they don't exist.
+In particular, they don't imply grouping, so assignments 
+\&c are not local.
+
+\pagebreak[2]
+
+Special comments are defined as
+%
+\begin{noverb}
+\cmd{\specialcomment}\marg{name}\marg{before commands}\marg{after commands}
+\end{noverb}
+%
+where the second and third arguments are executed before
+and after each comment block. You can use this for global
+formatting commands.
+To keep definitions \&c local, you can include \cmd{\begingroup}
+in the `\meta{before commands}' and \cmd{\endgroup} in the `\meta{after commands}'.
+ex:
+%
+\begin{verbatim}
+\specialcomment{smalltt}
+    {\begingroup\ttfamily\footnotesize}{\endgroup}
+\end{verbatim}
+%
+You do \emph{not} have to do an additional
+%
+\begin{verbatim}
+\includecomment{smalltt}
+\end{verbatim}
+%
+To remove `\env{smalltt}' blocks, give \verb+\excludecomment{smalltt}+
+after the definition.
+
+Processing comments can apply processing to each line.
+%
+\begin{noverb}
+\cmd{\processcomment}\marg{name}\marg{each-line commands}\marg{before commands}\marg{after commands}
+\end{noverb}
+%
+By defining a control sequence
+%
+\begin{verbatim}
+\def\Thiscomment##1{...}
+\end{verbatim}
+%
+in the before commands the user can
+specify what is to be done with each comment line.
+BUG this does not work quite yet BUG
+
+Trick for short in/exclude macros (such as \verb+\maybe{this snippet}+):
+%
+\begin{verbatim}
+\includecomment{cond}
+\newcommand{\maybe}[1]{}
+\begin{cond}
+\renewcommand{\maybe}[1]{#1}
+\end{cond}
+\end{verbatim}
+
+
+\section{Basic approach of the implementation:}
+
+to comment something out, scoop up  every line in verbatim mode
+as macro argument, then throw it away.
+For inclusions, in \LaTeX\ the block is written out to
+a file \cmd{\CommentCutFile} (default ``\texttt{comment.cut}''), which is
+then included.
+In plain \TeX\ (and other formats) both the opening and
+closing comands are defined as noop.
+
+
+\section{Changes in version 3.1}
+
+\begin{itemize}
+\item updated author's address
+\item cleaned up some code
+\item trailing contents on \cmd{\begin}\marg{env} line is always discarded
+    even if you've done \cmd{\includecomment}\marg{env}
+\item comments no longer define grouping!! you can even
+  % 
+\begin{verbatim}
+\includecomment{env}
+\begin{env}
+\begin{itemize}
+\end{env}
+\end{verbatim}
+  % 
+  Isn't that something\ldots
+\item included comments are written to file and input again.
+\end{itemize}
+
+
+\section{Changes in 3.2}
+
+\begin{itemize}
+\item \cmd{\specialcomment} brought up to date (thanks to Ivo Welch).
+\end{itemize}
+
+
+\section{Changes in 3.3}
+
+\begin{itemize}
+\item updated author's address again
+\item parametrised \cmd{\CommentCutFile}
+\end{itemize}
+
+
+\section{Changes in 3.4}
+
+\begin{itemize}
+\item added GNU public license
+\item added \cmd{\processcomment}, because Ivo's fix (above) brought an
+  inconsistency to light.
+\end{itemize}
+
+  
+\section{Changes in 3.5}
+
+\begin{itemize}
+\item corrected typo in header.
+\item changed author email
+\item corrected \cmd{\specialcomment} yet again.
+\item fixed excludecomment of an earlier defined environment.
+\end{itemize}
+
+
+\section{Changes in 3.6}
+
+\begin{itemize}
+\item The `cut' file is now written more verbatim, using \cmd{\meaning};
+  some people reported having trouble with ISO~latin~1, or \texttt{umlaute.sty}.
+\item removed some \cmd{\newif} statements.
+  Has this suddenly become \cmd{\outer} again?
+\end{itemize}
+
+
+\section{Changes in 3.8}
+
+T1 font encoding is now supported. See t1test.tex.
+
+%% \section{Known bugs:}
+
+%% \begin{itemize}
+%% \item \texttt{excludecomment} leads to one superfluous space
+%% \item \texttt{processcomment} leads to a superfluous line break
+%% \end{itemize}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/comment/writeup.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/comment/comment.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/comment/comment.sty	2016-08-25 01:16:24 UTC (rev 41926)
+++ trunk/Master/texmf-dist/tex/latex/comment/comment.sty	2016-08-25 23:02:05 UTC (rev 41927)
@@ -1,6 +1,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Comment.sty   version 3.7, July 2009
-% copyright 1998-2009 Victor Eijkhout
+% Comment.sty   version 3.8, July 2016
+% copyright 1998-2016 Victor Eijkhout
 %
 % Purpose:
 % selectively in/exclude pieces of text: the user can define new
@@ -115,7 +115,7 @@
 % needs to be written to file, use \WriteCommentLine{the stuff}
 % Example:
 % \specialcomment{underlinecomment}
-%  {\def\ThisComment##1{\WriteCommentLine{\string\underline{##1}\string\par}}
+%  {\def\ThisComment##1{\WriteCommentLine{\underline{##1}\par}}
 %   \par}
 %  {\par}
 %
@@ -126,6 +126,9 @@
 %\renewcommand{\maybe}[1]{#1}
 %\end{cond}
 %
+% Changes in 3.8
+% - utf8 is now correctly handled, at least if you use eTeX.
+%   (Thanks Henry Gregory for the solution)
 % Changes in 3.7
 % - only LaTeX support from now on
 % - code cleanup, and improvements on \specialcomment
@@ -192,22 +195,37 @@
 
 %%
 %% Initial action: SetUpCutFile opens the CommentCutFile
+%% hook for initial actions: PrepareCutFile, default null
 %%
 \def\SetUpCutFile
-   {\immediate\openout\CommentStream=\CommentCutFile}
+   {\immediate\openout\CommentStream=\CommentCutFile
+    \PrepareCutFile}
+\def\PrepareCutFile{}
+
 %%
-%% Each line action: ThisComment, default: WriteCommentLine on line contents
+%% Each line action: ThisComment,
+%% default: WriteCommentLine on line contents
+%% version 3.8: write unexpanded if using eTeX
 %%
-\long\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}}
+\expandafter\ifx\csname eTeXversion\endcsname\relax
+    \long\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}}
+\else
+    \long\def\WriteCommentLine#1{\immediate\write\CommentStream{\unexpanded{#1}}}
+\fi
 \let\ThisComment\WriteCommentLine
+
 %%
 %% Final action: ProcessCutFile
+%% hook for final action before file closing: FinalizeCutFile, default null
+%%
 \def\ProcessCutFile
    {\message{Straight input of \CommentCutFile.}%
     \input{\CommentCutFile}\relax}
 \def\CloseAndInputCutFile
-   {\immediate\closeout\CommentStream
+   {\FinalizeCutFile
+    \immediate\closeout\CommentStream
     \ProcessCutFile}
+\def\FinalizeCutFile{}
 
 %%
 %% Define the different comment types



More information about the tex-live-commits mailing list