diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-25 23:02:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-25 23:02:05 +0000 |
commit | b4ca047b96a502350b025c4541bc5d479b2f86f3 (patch) | |
tree | ebab119783c535c852bcae9886832cae878436b5 /Master/texmf-dist/tex/latex/comment | |
parent | fea2f0eb388007dabe52654e6355a8448c929e55 (diff) |
comment (25aug16)
git-svn-id: svn://tug.org/texlive/trunk@41927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/comment')
-rw-r--r-- | Master/texmf-dist/tex/latex/comment/comment.sty | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/comment/comment.sty b/Master/texmf-dist/tex/latex/comment/comment.sty index 7f7c2be5a98..84aa9074e55 100644 --- a/Master/texmf-dist/tex/latex/comment/comment.sty +++ b/Master/texmf-dist/tex/latex/comment/comment.sty @@ -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 |