diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/comment/comment.sty')
-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 |