texlive[52142] Master/texmf-dist: filecontents (21sep19)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 21 23:51:43 CEST 2019


Revision: 52142
          http://tug.org/svn/texlive?view=revision&revision=52142
Author:   karl
Date:     2019-09-21 23:51:43 +0200 (Sat, 21 Sep 2019)
Log Message:
-----------
filecontents (21sep19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/filecontents/README
    trunk/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf
    trunk/Master/texmf-dist/source/latex/filecontents/filecontents.dtx
    trunk/Master/texmf-dist/source/latex/filecontents/filecontents.ins
    trunk/Master/texmf-dist/tex/latex/filecontents/filecontents.sty

Modified: trunk/Master/texmf-dist/doc/latex/filecontents/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/filecontents/README	2019-09-21 21:51:27 UTC (rev 52141)
+++ trunk/Master/texmf-dist/doc/latex/filecontents/README	2019-09-21 21:51:43 UTC (rev 52142)
@@ -36,7 +36,7 @@
 Copyright and license
 ---------------------
 
-Copyright (C) 2018 Scott Pakin, scott+fc at pakin.org
+Copyright (C) 2011-2019 Scott Pakin, scott+fc at pakin.org
 
 This package may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this

Modified: trunk/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/filecontents/filecontents.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/filecontents/filecontents.dtx	2019-09-21 21:51:27 UTC (rev 52141)
+++ trunk/Master/texmf-dist/source/latex/filecontents/filecontents.dtx	2019-09-21 21:51:43 UTC (rev 52142)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2018 Scott Pakin <scott+fc at pakin.org>
-% -------------------------------------------------------
+% Copyright (C) 2001-2019 Scott Pakin <scott+fc at pakin.org>
+% --------------------------------------------------------
 %
 % This package may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3c
@@ -22,11 +22,12 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{filecontents}
 %<*package>
-    [2018/05/30 v1.4 Create an external file from within a LaTeX document]
+    [2019/09/20 v1.5 Create an external file from within a LaTeX document]
 %</package>
 %
 %<*driver>
 \documentclass{ltxdoc}
+\usepackage{color}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -38,7 +39,7 @@
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-% \CheckSum{184}
+% \CheckSum{191}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -123,7 +124,22 @@
 %   }^^A
 % }
 %
+% \begin{center}
+%   \color{red}
+%   \fbox{^^A
+%     \begin{minipage}{0.75\linewidth}
+%       \centerline{\textsc{Notice}}
+%       \smallskip
+%       The version of \LaTeX\ released in Fall 2019 incorporates all of
+%       this package's functionality (and more) into the \LaTeX\ kernel
+%       itself.  As a result, there is no longer a need for the
+%       |filecontents| package.  Please use the new, built-in
+%       |filecontents| environment instead.
+%     \end{minipage}^^A
+%   }
+% \end{center}
 %
+%
 % \section{Introduction}
 %
 % \DescribeEnv{filecontents}
@@ -233,9 +249,9 @@
 %<*package>
 %    \end{macrocode}
 %
-% \begin{macro}{\filec at ntents}
+% \begin{macro}{\filec at ntents@old at kernel}
 % Except where indicated, the source---including comments---to the
-% |\filec at ntents| macro was taken verbatim from |ltclass.dtx|.
+% |\filec at ntents| macro---was taken verbatim from |ltclass.dtx|.
 %    \begin{macrocode}
 \begingroup%
 \catcode`\*=11 %
@@ -245,7 +261,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\gdef\filec at ntents#1{%
+\gdef\filec at ntents@old at kernel#1{%
   \openin\@inputcheck#1 %
 %    \end{macrocode}
 %
@@ -366,11 +382,10 @@
   \catcode`\^^M\active%
   \edef^^M##1^^M{%
     \noexpand\reserved at b##1\E\E\relax}}%
-\endgroup%
+\endgroup
 %    \end{macrocode}
 % \end{macro}
 %
-%
 % \begin{macro}{\fc at no@preamblecmds}
 % \LaTeXe\ declares |\filecontents|, |\filecontents*|, and all of the
 % related helper macros as |\@onlypreamble|, meaning they become invalid
@@ -383,11 +398,37 @@
 %    \begin{macrocode}
 \def\fc at no@preamblecmds#1\do\filecontents#2\do\filec at ntents#3\relax{%
   \gdef\@preamblecmds{#1#3}}
-\expandafter\fc at no@preamblecmds\@preamblecmds\relax
 %    \end{macrocode}
 % \end{macro}
 %
+% Newer \LaTeX\ kernels define a most sophisticated |filecontents|
+% environment than what this package provides.  We currently use the
+% existence of |\filec at ntents@opt| as indication that the new
+% |filecontents| environment is available.
+% \changes{v1.5}{2019/09/20}{Declare the package obsolete when running
+% under newer \LaTeX\ kernels}
 %    \begin{macrocode}
+\@ifundefined{filec at ntents@opt}{%
+%    \end{macrocode}
+% Older kernel: Install this package's version of the |filecontents|
+% environment.
+%    \begin{macrocode}
+  \let\filec at ntents=\filec at ntents@old at kernel
+  \expandafter\fc at no@preamblecmds\@preamblecmds\relax
+}{%
+%    \end{macrocode}
+% Newer kernel: Issue a warning and do not install this package's
+% version of |filecontents|.
+%    \begin{macrocode}
+  \PackageWarningNoLine{filecontents}{%
+    This package is obsolete.  Disabling it and\MessageBreak
+    passing control to the filecontents environment\MessageBreak
+    defined by the LaTeX kernel%
+  }%
+}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex/filecontents/filecontents.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/filecontents/filecontents.ins	2019-09-21 21:51:27 UTC (rev 52141)
+++ trunk/Master/texmf-dist/source/latex/filecontents/filecontents.ins	2019-09-21 21:51:43 UTC (rev 52142)
@@ -3,8 +3,8 @@
 %% driver files from the doc files in this package when run through
 %% LaTeX or TeX.
 %%
-%% Copyright (C) 2018 Scott Pakin <scott+fc at pakin.org>
-%% -------------------------------------------------------
+%% Copyright (C) 2011-2019 Scott Pakin <scott+fc at pakin.org>
+%% --------------------------------------------------------
 %%
 %% This package may be distributed and/or modified under the conditions
 %% of the LaTeX Project Public License, either version 1.3c of this
@@ -28,8 +28,8 @@
 
 This is a generated file.
 
-Copyright (C) 2018 Scott Pakin <scott+fc at pakin.org>
--------------------------------------------------------
+Copyright (C) 2011-2019 Scott Pakin <scott+fc at pakin.org>
+--------------------------------------------------------
 
 This package may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this

Modified: trunk/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/filecontents/filecontents.sty	2019-09-21 21:51:27 UTC (rev 52141)
+++ trunk/Master/texmf-dist/tex/latex/filecontents/filecontents.sty	2019-09-21 21:51:43 UTC (rev 52142)
@@ -8,8 +8,8 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2018 Scott Pakin <scott+fc at pakin.org>
-%% -------------------------------------------------------
+%% Copyright (C) 2011-2019 Scott Pakin <scott+fc at pakin.org>
+%% --------------------------------------------------------
 %% 
 %% This package may be distributed and/or modified under the conditions
 %% of the LaTeX Project Public License, either version 1.3c of this
@@ -23,13 +23,13 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{filecontents}
-    [2018/05/30 v1.4 Create an external file from within a LaTeX document]
+    [2019/09/20 v1.5 Create an external file from within a LaTeX document]
 \begingroup%
 \catcode`\*=11 %
 \catcode`\^^M\active%
 \catcode`\^^L\active\let^^L\relax%
 \catcode`\^^I\active%
-\gdef\filec at ntents#1{%
+\gdef\filec at ntents@old at kernel#1{%
   \openin\@inputcheck#1 %
   \ifeof\@inputcheck%
     \@latex at warning@no at line%
@@ -90,10 +90,19 @@
   \catcode`\^^M\active%
   \edef^^M##1^^M{%
     \noexpand\reserved at b##1\E\E\relax}}%
-\endgroup%
+\endgroup
 \def\fc at no@preamblecmds#1\do\filecontents#2\do\filec at ntents#3\relax{%
   \gdef\@preamblecmds{#1#3}}
-\expandafter\fc at no@preamblecmds\@preamblecmds\relax
+\@ifundefined{filec at ntents@opt}{%
+  \let\filec at ntents=\filec at ntents@old at kernel
+  \expandafter\fc at no@preamblecmds\@preamblecmds\relax
+}{%
+  \PackageWarningNoLine{filecontents}{%
+    This package is obsolete.  Disabling it and\MessageBreak
+    passing control to the filecontents environment\MessageBreak
+    defined by the LaTeX kernel%
+  }%
+}
 \endinput
 %%
 %% End of file `filecontents.sty'.



More information about the tex-live-commits mailing list