summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/filecontents
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:55:44 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:55:44 +0000
commite4ede1dd7b2fd42f2d43561eb9a9239eca0180b3 (patch)
tree9ecb943ec75b4773b37518140b942570c37efa38 /Master/texmf-dist/tex/latex/filecontents
parent1532d9c81824c389182bbd6d69e3298e27e371f2 (diff)
filecontents
git-svn-id: svn://tug.org/texlive/trunk@914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/filecontents')
-rw-r--r--Master/texmf-dist/tex/latex/filecontents/filecontents.sty96
1 files changed, 96 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/filecontents/filecontents.sty b/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
new file mode 100644
index 00000000000..01a4b5be38d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/filecontents/filecontents.sty
@@ -0,0 +1,96 @@
+%%
+%% This is file `filecontents.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% filecontents.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2004 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.2
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filecontents}
+ [2004/08/16 v1.1 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{%
+ \openin\@inputcheck#1 %
+ \ifeof\@inputcheck%
+ \@latex@warning@no@line%
+ {Writing file `\@currdir#1'}%
+ \else
+ \@latex@warning@no@line%
+ {Overwriting file `\@currdir#1'}%
+ \fi
+ \chardef\reserved@c15 %
+ \ch@ck7\reserved@c\write%
+ \immediate\openout\reserved@c#1\relax%
+ \if@tempswa%
+ \immediate\write\reserved@c{%
+ \@percentchar\@percentchar\space%
+ \expandafter\@gobble\string\LaTeX2e file `#1'^^J%
+ \@percentchar\@percentchar\space generated by the %
+ `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+ \@percentchar\@percentchar\space from source `\jobname' on %
+ \number\year/\two@digits\month/\two@digits\day.^^J%
+ \@percentchar\@percentchar}%
+ \fi%
+ \let\do\@makeother\dospecials%
+ \count0=128\relax
+ \loop
+ \catcode\count0=11\relax
+ \advance\count0 by 1\relax
+ \ifnum\count0<256
+ \repeat
+ \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+ \edef\reserved@b{%
+ \def\noexpand\reserved@b%
+ ####1\E####2\E####3\relax}%
+ \reserved@b{%
+ \ifx\relax##3\relax%
+ \immediate\write\reserved@c{##1}%
+ \else%
+ \edef^^M{\noexpand\end{\@currenvir}}%
+ \ifx\relax##1\relax%
+ \else%
+ \@latex@warning{Writing text `##1' before %
+ \string\end{\@currenvir}\MessageBreak as last line of #1}%
+ \immediate\write\reserved@c{##1}%
+ \fi%
+ \ifx\relax##2\relax%
+ \else%
+ \@latex@warning{%
+ Ignoring text `##2' after \string\end{\@currenvir}}%
+ \fi%
+ \fi%
+ ^^M}%
+ \catcode`\^^L\active%
+ \let\L\@undefined%
+ \def^^L{\@ifundefined L^^J^^J^^J}%
+ \catcode`\^^I\active%
+ \let\I\@undefined%
+ \def^^I{\@ifundefined I\space\space}%
+ \catcode`\^^M\active%
+ \edef^^M##1^^M{%
+ \noexpand\reserved@b##1\E\E\relax}}%
+\endgroup%
+\def\fc@no@preamblecmds#1\do\filecontents#2\do\filec@ntents#3\relax{%
+ \gdef\@preamblecmds{#1#3}}
+\expandafter\fc@no@preamblecmds\@preamblecmds\relax
+\endinput
+%%
+%% End of file `filecontents.sty'.