summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/filecontents
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-22 03:01:01 +0000
committerNorbert Preining <norbert@preining.info>2019-09-22 03:01:01 +0000
commit77cef1d14e947b4899f54ca0311ca5ce9d253164 (patch)
treeb641044ef8a3372df30ea6e27d7c822bccc58cb0 /macros/latex/contrib/filecontents
parent31d764f773a47d4d8cfa2cd2c0c3a4d5a7dff3e6 (diff)
CTAN sync 201909220301
Diffstat (limited to 'macros/latex/contrib/filecontents')
-rw-r--r--macros/latex/contrib/filecontents/README2
-rw-r--r--macros/latex/contrib/filecontents/filecontents.dtx61
-rw-r--r--macros/latex/contrib/filecontents/filecontents.ins8
-rw-r--r--macros/latex/contrib/filecontents/filecontents.pdfbin122585 -> 127330 bytes
4 files changed, 56 insertions, 15 deletions
diff --git a/macros/latex/contrib/filecontents/README b/macros/latex/contrib/filecontents/README
index 4c62bef626..e325af4476 100644
--- a/macros/latex/contrib/filecontents/README
+++ b/macros/latex/contrib/filecontents/README
@@ -36,7 +36,7 @@ information on installing packages.
Copyright and license
---------------------
-Copyright (C) 2018 Scott Pakin, scott+fc@pakin.org
+Copyright (C) 2011-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 of this
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}
diff --git a/macros/latex/contrib/filecontents/filecontents.ins b/macros/latex/contrib/filecontents/filecontents.ins
index 6471069dcf..70b05b0a13 100644
--- a/macros/latex/contrib/filecontents/filecontents.ins
+++ b/macros/latex/contrib/filecontents/filecontents.ins
@@ -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@pakin.org>
-%% -------------------------------------------------------
+%% Copyright (C) 2011-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 of this
@@ -28,8 +28,8 @@
This is a generated file.
-Copyright (C) 2018 Scott Pakin <scott+fc@pakin.org>
--------------------------------------------------------
+Copyright (C) 2011-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 of this
diff --git a/macros/latex/contrib/filecontents/filecontents.pdf b/macros/latex/contrib/filecontents/filecontents.pdf
index a2340ef345..bc264af7fd 100644
--- a/macros/latex/contrib/filecontents/filecontents.pdf
+++ b/macros/latex/contrib/filecontents/filecontents.pdf
Binary files differ