summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-21 21:51:43 +0000
committerKarl Berry <karl@freefriends.org>2019-09-21 21:51:43 +0000
commitc359016aa35ad35afb7a7012ed858c14db227cb5 (patch)
treec72ab32f18b178926c0c11b912660e340cf67da3
parent16a23d05b33971b49be19b173560d5850872bb4a (diff)
filecontents (21sep19)
git-svn-id: svn://tug.org/texlive/trunk@52142 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/filecontents/README2
-rw-r--r--Master/texmf-dist/doc/latex/filecontents/filecontents.pdfbin122585 -> 127330 bytes
-rw-r--r--Master/texmf-dist/source/latex/filecontents/filecontents.dtx61
-rw-r--r--Master/texmf-dist/source/latex/filecontents/filecontents.ins8
-rw-r--r--Master/texmf-dist/tex/latex/filecontents/filecontents.sty21
5 files changed, 71 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/filecontents/README b/Master/texmf-dist/doc/latex/filecontents/README
index 4c62bef6267..e325af4476d 100644
--- a/Master/texmf-dist/doc/latex/filecontents/README
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf b/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf
index a2340ef3453..bc264af7fdf 100644
--- a/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf
+++ b/Master/texmf-dist/doc/latex/filecontents/filecontents.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/filecontents/filecontents.dtx b/Master/texmf-dist/source/latex/filecontents/filecontents.dtx
index 0fc96c45a10..40ad96f26dc 100644
--- a/Master/texmf-dist/source/latex/filecontents/filecontents.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/filecontents/filecontents.ins b/Master/texmf-dist/source/latex/filecontents/filecontents.ins
index 6471069dcf5..70b05b0a139 100644
--- a/Master/texmf-dist/source/latex/filecontents/filecontents.ins
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/tex/latex/filecontents/filecontents.sty b/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
index a8190ab6eca..b97b143e30d 100644
--- a/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
+++ b/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
@@ -8,8 +8,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
@@ -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@ntents#1{%
+\gdef\filec@ntents@old@kernel#1{%
\openin\@inputcheck#1 %
\ifeof\@inputcheck%
\@latex@warning@no@line%
@@ -90,10 +90,19 @@
\catcode`\^^M\active%
\edef^^M##1^^M{%
\noexpand\reserved@b##1\E\E\relax}}%
-\endgroup%
+\endgroup
\def\fc@no@preamblecmds#1\do\filecontents#2\do\filec@ntents#3\relax{%
\gdef\@preamblecmds{#1#3}}
-\expandafter\fc@no@preamblecmds\@preamblecmds\relax
+\@ifundefined{filec@ntents@opt}{%
+ \let\filec@ntents=\filec@ntents@old@kernel
+ \expandafter\fc@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'.