diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-22 03:01:01 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-22 03:01:01 +0000 |
commit | 77cef1d14e947b4899f54ca0311ca5ce9d253164 (patch) | |
tree | b641044ef8a3372df30ea6e27d7c822bccc58cb0 /macros/latex/contrib/filecontents/filecontents.dtx | |
parent | 31d764f773a47d4d8cfa2cd2c0c3a4d5a7dff3e6 (diff) |
CTAN sync 201909220301
Diffstat (limited to 'macros/latex/contrib/filecontents/filecontents.dtx')
-rw-r--r-- | macros/latex/contrib/filecontents/filecontents.dtx | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/macros/latex/contrib/filecontents/filecontents.dtx b/macros/latex/contrib/filecontents/filecontents.dtx index 0fc96c45a1..40ad96f26d 100644 --- a/macros/latex/contrib/filecontents/filecontents.dtx +++ b/macros/latex/contrib/filecontents/filecontents.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % -% Copyright (C) 2018 Scott Pakin <scott+fc@pakin.org> -% ------------------------------------------------------- +% Copyright (C) 2001-2019 Scott Pakin <scott+fc@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,6 +124,21 @@ % }^^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} % @@ -233,9 +249,9 @@ %<*package> % \end{macrocode} % -% \begin{macro}{\filec@ntents} +% \begin{macro}{\filec@ntents@old@kernel} % Except where indicated, the source---including comments---to the -% |\filec@ntents| macro was taken verbatim from |ltclass.dtx|. +% |\filec@ntents| macro---was taken verbatim from |ltclass.dtx|. % \begin{macrocode} \begingroup% \catcode`\*=11 % @@ -245,7 +261,7 @@ % \end{macrocode} % % \begin{macrocode} -\gdef\filec@ntents#1{% +\gdef\filec@ntents@old@kernel#1{% \openin\@inputcheck#1 % % \end{macrocode} % @@ -366,11 +382,10 @@ \catcode`\^^M\active% \edef^^M##1^^M{% \noexpand\reserved@b##1\E\E\relax}}% -\endgroup% +\endgroup % \end{macrocode} % \end{macro} % -% % \begin{macro}{\fc@no@preamblecmds} % \LaTeXe\ declares |\filecontents|, |\filecontents*|, and all of the % related helper macros as |\@onlypreamble|, meaning they become invalid @@ -383,10 +398,36 @@ % \begin{macrocode} \def\fc@no@preamblecmds#1\do\filecontents#2\do\filec@ntents#3\relax{% \gdef\@preamblecmds{#1#3}} -\expandafter\fc@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@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@ntents@opt}{% +% \end{macrocode} +% Older kernel: Install this package's version of the |filecontents| +% environment. +% \begin{macrocode} + \let\filec@ntents=\filec@ntents@old@kernel + \expandafter\fc@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} |