1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
31 %%% From File: ltfiles.dtx
34 \ProvidesFile{ltfiles.dtx}
35 [2015/02/21 v1.1m LaTeX Kernel (File Handling)]
37 \documentclass{ltxdoc}
38 \GetFileInfo{ltfiles.dtx}
51 \MaintainedByLaTeXTeam{latex}
59 % \changes{v1.0h}{1994/05/21}{Use new error commands}
60 % \changes{v1.0n}{1994/11/17}
61 % {\cs{@tempa} to \cs{reserved@a}}
62 % \changes{v1.0u}{1995/07/13}{Updates to docu}
63 % \changes{v1.1m}{2015/02/21}
64 % {Removed autoload support}
66 % \section{File Handling}
68 % The following user commands are defined in this part:
70 % \DescribeMacro{\document} (ie |\begin{document}|)\\
71 % Reads in the .AUX files and |\catcode|'s |@| to 12.
73 % \DescribeMacro{\nofiles}\\
74 % Suppresses all file output by setting |\@filesw| false.
76 % \DescribeMacro{\includeonly}\marg{NAME1, ... ,NAMEn}\\
77 % Causes only parts NAME1, ... ,NAMEn to be read by
78 % their |\include| commands. Works by setting \@partsw true
79 % and setting |\@partlist| to NAME1, ... ,NAMEn.
81 % \DescribeMacro{\include}\marg{NAME}\\
82 % Does an |\input| NAME unless |\@partsw| is true and
83 % NAME is not in |\@partlist|. If |\@filesw| is true, then
84 % it directs .AUX output to NAME.AUX, including a
85 % checkpoint at the end.
87 % \DescribeMacro{\input}\marg{NAME}\\
88 % The same as TeX's |\input|, except it allows optional
89 % braces around the file name. In \LaTeXe, it also avoids
90 % the primitive `missing file' error, if the file can not be
93 % \DescribeMacro{\IfFileExists}\marg{NAME}\marg{then}\marg{else}\\
94 % If the file exists on the system, execute \emph{then} otherwise
95 % execute \emph{else}.
97 % \DescribeMacro{\InputIfFileExists}\marg{NAME}\marg{then}\marg{else}\\
98 % If the file exists on the system, execute \emph{then} and input
99 % \emph{NAME} otherwise execute \emph{else}.
103 % \changes{v1.0a}{1994/03/07}{Initial version, split from latex.dtx}
104 % \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
106 % \begin{oldcomments}
113 % VARIABLES, SWITCHES AND INTERNAL COMMANDS:
114 % \@mainaux : Output file number for main .AUX file.
115 % \@partaux : Output file number for current part's .AUX file.
116 % \@auxout : Either \@mainout or \@partout, depending on
117 % which .AUX file output goes to.
118 % \@input{foo} : If file foo exists, then \input's it,
119 % otherwise types a warning message.
120 % @filesw : Switch -- set false if no .AUX, .TOC, .IDX etc
121 % files are to be written
122 % @partsw : Set true by a \includeonly command.
123 % \@partlist : Set to the argument of the \includeonly command.
125 % \cp@FOO : The checkpoint for \include'd file FOO.TEX, written
126 % by \@writeckpt at the end of file FOO.AUX
129 % \includeonly{FILELIST} ==
132 % \@partlist := FILELIST
139 % then \immediate\write\@mainaux{\string\@input{FILE.AUX}}
142 % then \@tempswa := F
143 % \reserved@b == FILE
144 % for \reserved@a := \@partlist
145 % do if eval(\reserved@a) = eval(\reserved@b)
146 % then \@tempswa := T fi
151 % then \@auxout := \@partaux
153 % then \immediate\openout\@partaux{FILE.AUX}
154 % \immediate\write\@partaux{\relax}
159 % if @filesw then \closeout \@partaux fi
160 % \@auxout := \@mainaux
165 % \@writeckpt{FILE} ==
168 % \immediate\write on file \@partaux:
169 % \@setckpt{FILE}{ %% }
170 % for \reserved@a := \cl@@ckpt
171 % do \immediate\write on file \@partaux:
172 % \global\string\setcounter
173 % {eval(\reserved@a)}{eval(\c@eval(\reserved@a))}
175 % \immediate\write on file \@partaux: }
179 % \@setckpt{FILE}{LIST} ==
190 % \task{???}{Do we use @unused or mainaux?}
191 % \begin{macro}{\@inputcheck}
192 % \begin{macro}{\@unused}
193 % Allocate read stream for testing and output stream.
194 % \changes{v1.0l}{1994/11/07}
195 % {move here from ltdefns, remove duplicate \cs{@mainaux}}
203 % \begin{macro}{\@mainaux}
204 % \begin{macro}{\@partaux}
212 % \begin{macro}{\if@filesw}
213 % \begin{macro}{\if@partsw}
215 \newif\if@filesw \@fileswtrue
216 \newif\if@partsw \@partswfalse
221 % \begin{macro}{\@clubpenalty}
222 % This stores the current normal (non-infinite) value of
223 % \cs{clubpenalty}; it should therefore be reset whenever the
224 % normal value is changed (as in the bibliography in the standard
226 % \changes{v1.1h}{1996/10/05}{Added setting its value}
228 \newcount\@clubpenalty
229 \@clubpenalty \clubpenalty
233 % \begin{macro}{\document}
234 % \changes{v0.9e}{1993/12/09}{Hook added}
235 % Cancel the |\begingroup| from |\begin|
237 \def\document{\endgroup
239 % If some options on |\documentclass| haven't been used by any
240 % package we will now give a warning since this is most certainly a
243 \ifx\@unusedoptionlist\@empty\else
244 \@latex@warning@no@line{Unused global option(s):^^J%
245 \@spaces[\@unusedoptionlist]}%
248 \@colroom\textheight \vsize\textheight
249 \columnwidth\textwidth
250 \@clubpenalty\clubpenalty
252 \advance\columnwidth -\columnsep
253 \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
255 \hsize\columnwidth \linewidth\hsize
256 \begingroup\@floatplacement\@dblfloatplacement
257 \makeatletter\let\@writefile\@gobbletwo
259 % \changes{v1.1a}{1995/10/24}
260 % {Removed multiplelabels switch}
262 \global \let \@multiplelabels \relax
263 \@input{\jobname.aux}%
266 \immediate\openout\@mainaux\jobname.aux
267 \immediate\write\@mainaux{\relax}%
271 % Dateline 1991/03/26: FMi added |\process@table| to support NFSS;
272 % This will also work with old lfonts if no other style defines
273 % |\process@table|. The following line forces the initialization of
277 \let\glb@currsize\@empty %% Force math initialization.
279 % \changes{v0.9t}{1994/01/31}
280 % {set \cs{@normalsize} or \cs{normalsize} if necessary}
281 % \changes{v1.0d}{1994/03/28}
282 % {(DPC) remove \cs{@normalsize check}}
283 % \changes{v1.0d}{1994/03/28}
284 % {(DPC) Use \cs{normalsize} not \cs{@normalsize}}
285 % \changes{v1.0g}{1994/05/13}{Added execution of \cs{every@size}}
286 % \changes{v1.0m}{1994/11/07}{Renamed \cs{every@size} to
287 % \cs{every@math@size}.}
288 % \changes{v1.0q}{1995/04/25}
289 % {Removed execution of \cs{every@size} latex/1407}
295 % So that punctuation in headings is not disturbed by verbatim
296 % or other local changes to the space factor codes, save the document
297 % default here. This will be locally reset by the output routine.
298 % For special cases a class may want to define |\normalsfcodes|
299 % directly, in case that definition will be used.
300 % (This is an old bug, problem existed in \LaTeX2.0x and plain \TeX.)
301 % \changes{v1.1k}{1997/04/14}
302 % {Set the document space factor defaults. latex/2404}
304 \ifx\normalsfcodes\@empty
306 \let\normalsfcodes\frenchspacing
308 \let\normalsfcodes\nonfrenchspacing
312 % Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
313 % to true in the preamble and to false here.
314 % This was done to trap lists and related text in the preamble but it
315 % does not catch everything; hence Change 1.1g was introduced.
319 % \changes{v1.1a}{1995/10/24}
320 % {Removed refundefined switch}
322 \let \@refundefined \relax
324 % Just before disabling the preamble commands we execute the begin
325 % document hook which contains any code contributed by
326 % |\AtBeginDocument|. Also disable the gathering of the file list,
327 % if no |\listfiles| has been issued. |\AtBeginDocument| is redefined
328 % at this point so that and such commands that get into the hook do
329 % not chase their tail\ldots
330 % \changes{v1.1e}{1996/04/24}
331 % {(DPC) Reset \cs{AtBeginDocument} eg for latex/1297}
333 \let\AtBeginDocument\@firstofone
336 % Most of the following assignments will be done globally in case
337 % the user adds something like |\begin{multicols}| to the document
338 % hook, i.e. starts are group in |\begin{document}|.
339 % \changes{v1.0r}{1995/04/27}
340 % {Added \cs{global} to support groups in hook}
341 % \changes{v1.0c}{1994/03/16}
342 % {(DPC) directly add file list settings}
343 % \changes{v1.0v}{1995/08/16}{set \cs{topskip} globally}
344 % \changes{v1.0v}{1995/08/16}{set \cs{@maxdepth}}
346 % \changes{v1.0s}{1995/05/25}
347 % {Added check for \cs{topskip} zero}
348 % \changes{v1.0t}{1995/05/25}
350 % Since a value of exactly 0pt for \cs{topskip} causes
351 % \cs{twocolumn[]} to misbehave, we add this check, hoping
352 % that it will not cause any problems elsewhere.
354 \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
355 \global\@maxdepth\maxdepth
356 \global\let\@begindocumenthook\@undefined
357 \ifx\@listfiles\@undefined
358 \global\let\@filelist\relax
359 \global\let\@addtofilelist\@gobble
362 % At the very end we disable all preamble commands. This has to
363 % happen after the begin document hooks was executed so that this
364 % hook can still use such commands.
365 % \changes{v0.9o}{1994/01/15}
366 % {move \cs{@preamblecmds} after document hook}
367 % \changes{v1.0v}{1995/08/16}{set \cs{do} globally}
369 \gdef\do##1{\global\let ##1\@notprerr}%
372 % The next line saves tokens and also allows |\@nodocument| to be
373 % used directly to trap preamble errors.
374 % \changes{v1.1g}{1996/09/29}{Added disabling of \cs{@nodocument}}
376 \global\let \@nodocument \relax
378 % The next line is a pure safety measure in case a do list is ever
379 % expanded at the wrong place. In addition it will save a few
380 % tokens to get rid of the above definition.
382 \global\let\do\noexpand
384 % \changes{v1.1c}{1995/12/05}{\cs{ignorespaces} added for latex/1933}
385 % Use of |\AtBeginDocument| hook might mean that we are already in
386 % horizontal mode, so ignore the space after |\begin{document}|.
392 \@onlypreamble\document
396 % \begin{macro}{\normalsfcodes}
397 % \changes{v1.1k}{1997/04/14}
398 % {Macro added (from patch file) latex/2404}
399 % The setting of |\@empty| is just a flag. This command may be defined
400 % in a class or package file. If it is still |\@empty| at
401 % |\begin{document}| it will be defined to be |\frenchspacing| or
402 % |\nonfrenchspacing|, depending on which of those appears to be in
403 % effect at that point.
405 \let\normalsfcodes\@empty
409 % \begin{macro}{\nofiles}
410 % \changes{v1.0k}{1994/11/04}
411 % {Added setting of \cs{protected@write},
412 % \cs{makeindex} and \cs{makeglossary} to \cs{nofiles}. ASAJ.}
413 % \changes{v1.0o}{1994/11/30}
414 % {There is no \cs{@gobblethree}\ldots}
415 % \changes{v1.0t}{1995/05/25}
416 % {(CAR) added \cs{long}}
417 % \changes{v1.1f}{1996/05/17}
418 % {added \cs{write} to \cs{protected@write} for latex/2146}
419 % Set |\@fileswfalse| which suppresses the places where \LaTeX\ makes
420 % |\immediate| writes. The |\makeindex| and |\makeglossary| are
421 % disabled. |\protected@write| is redefined not to write to the file
422 % specified, but rather to write a blank line to the log file. This
423 % ensures that a \meta{whatsit} node is still created, and so spacing
424 % is not affected by the |\nofiles| command; to ensure this more
425 % generally, the |\if@nobreak| test is needed.
426 % \changes{v1.1i}{1996/11/05}
427 % {Standard \cs{if@nobreak} test added}
431 \typeout{No auxiliary output files.^^J}%
432 \long\def\protected@write##1##2##3%
433 {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
435 \let\makeglossary\relax}
436 \@onlypreamble\nofiles
441 % \begin{macro}{\protected@write}
442 % This takes three arguments: an output stream, some initialization
443 % code, and some text to write. It then writes this, with
444 % appropriate handling of |\protect| and |\thepage|.
445 % \changes{v1.0k}{1994/11/04}{Macro added ASAJ.}
446 % \changes{v1.0t}{1995/05/25}
447 % {(CAR) added \cs{long}}
449 \long\def \protected@write#1#2#3{%
453 \let\protect\@unexpandable@protect
454 \edef\reserved@a{\write#1{#3}}%
457 \if@nobreak\ifvmode\nobreak\fi\fi
463 \let\@auxout=\@mainaux
467 % \begin{macro}{\includeonly}
468 % \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
472 \edef\@partlist{\zap@space#1 \@empty}}
473 \@onlypreamble\includeonly
477 % \begin{macro}{\include}
478 % \changes{v0.9p}{1994/01/18}
479 % {Use \cs{@input@} so include files are listed.}
480 % In the definition of |\include|, |\def\reserved@b| changed to
481 % |\edef\reserved@b| to be consistent with the |\edef| in
483 % (Suggested by Rainer Sch\"opf \& Frank Mittelbach.
484 % Change made 20 Jul 88.)
486 % Changed definition of |\include| to allow space at end of file name
487 % --- otherwise, typing |\include{foo }| would cause \LaTeX\ to
488 % overwrite |foo.tex|. Change made 24 May 89, suggested by Rainer
489 % Sch\"opf and Frank Mittelbach
491 % Made |\include| check for being used inside an |\include|'d file, as
492 % this will not work and cause surprising results.
494 \def\include#1{\relax
495 \ifnum\@auxout=\@partaux
496 \@latex@error{\string\include\space cannot be nested}\@eha
497 \else \@include#1 \fi}
501 % \begin{macro}{\@include}
506 \immediate\write\@mainaux{\string\@input{#1.aux}}%
511 \edef\reserved@b{#1}%
512 \@for\reserved@a:=\@partlist\do
513 {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
516 \let\@auxout\@partaux
518 \immediate\openout\@partaux #1.aux
519 \immediate\write\@partaux{\relax}%
525 \immediate\closeout\@partaux
529 % If the file is not included, reset |\deadcycles|, so that a long
530 % list of non-included files does not generate an `Output loop'
532 % \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
537 \let\@auxout\@mainaux}
541 % \begin{macro}{\@writeckpt}
545 \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
546 {\let\@elt\@wckptelt \cl@@ckpt}%
547 \immediate\write\@partaux{\@charrb}%
552 % \begin{macro}{\@wckptelt}
555 \immediate\write\@partaux{%
556 \string\setcounter{#1}{\the\@nameuse{c@#1}}}}
560 % \begin{macro}{\@setckpt}
561 % RmS 93/08/31: introduced |\@setckpt|
563 \def\@setckpt#1{\global\@namedef{cp@#1}}
567 % \begin{macro}{\@charlb}
568 % \begin{macro}{\@charrb}
569 % The following defines |\@charlb| and |\@charrb| to be |{| and |}|,
570 % respectively with |\catcode| 11.
572 {\catcode`[=1 \catcode`]=2
573 \catcode`{=11 \catcode`}=11
582 % \subsection{Safe Input Macros}
584 % \begin{macro}{\IfFileExists}
585 % \changes{v0.9b}{1993/12/04}{Macro added}
586 % \changes{v0.9p}{1994/01/18}{New Definition}
587 % \changes{v1.0t}{1995/05/25}
588 % {(CAR) added \cs{long}}
591 \long\def \IfFileExists#1#2#3{%
592 \openin\@inputcheck#1 %
594 \ifx\input@path\@undefined
597 \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
601 \edef\@filef@und{#1 }%
607 % \begin{macro}{\@iffileonpath}
608 % If the file is not found by |\openin|, and |\input@path| is defined,
609 % look in all the directories specified in |\input@path|.
610 % \changes{v0.9p}{1994/01/18}{Macro added}
611 % \changes{v1.0f}{1994/05/02}
612 % {\cs{@break@loop} renamed to \cs{@break@tfor}}
613 % \changes{v1.0t}{1995/05/25}
614 % {(CAR) added \cs{long}}
615 % \changes{v1.1d}{1996/01/10}
616 % {Change argument handling to not require doubled hash. latex/2024}
618 \long\def\@iffileonpath#1{%
619 \let\reserved@a\@secondoftwo
620 \expandafter\@tfor\expandafter\reserved@b\expandafter
621 :\expandafter=\input@path\do{%
622 \openin\@inputcheck\reserved@b#1 %
623 \ifeof\@inputcheck\else
624 \edef\@filef@und{\reserved@b#1 }%
625 \let\reserved@a\@firstoftwo%
634 % \begin{macro}{\InputIfFileExists}
636 % {1993/12/04}{Macro added}
638 % {1994/01/18}{New Definition}
639 % \changes{v0.3b}{1994/03/13}
640 % {Use new cmd \cs{@addtofilelist}}
641 % Now define |\InputIfFileExists| to input |#1| if it seems to exist.
642 % Immediately prior to the input, |#2| is executed.
643 % If the file |#1| does not exist, execute `|#3|'.
644 % \changes{v1.0t}{1995/05/25}
645 % {(CAR) added \cs{long}}
647 \long\def \InputIfFileExists#1#2{%
649 {#2\@addtofilelist{#1}\@@input \@filef@und}}
653 % \begin{macro}{\input}
654 % Input a file: if the argument is given in braces use safe input
655 % macros, otherwise use \TeX's primitive |\input| command (which is
656 % called |\@@input| in \LaTeX).
657 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
659 \def\input{\@ifnextchar\bgroup\@iinput\@@input}
663 % \begin{macro}{\@iinput}
664 % Define |\@iinput| (i.e., |\input|) in terms of
665 % |\InputIfIfileExists|.
666 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
669 \InputIfFileExists{#1}{}%
670 {\filename@parse{#1}%
671 \edef\reserved@a{\noexpand\@missingfileerror
672 {\filename@area\filename@base}%
673 {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
678 % \begin{macro}{\@input}
679 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
680 % \changes{v0.9p}{1994/01/18}%
681 % {do not use a different definition for \cs{input@path}}
682 % Define |\@input| in terms of |\IfIfileExists|.
683 % So this is a `safe input' command, but the files input are not
684 % listed by |\listfiles|.
686 % We don't want |.aux|, |.toc| files etc be listed by |\listfiles|.
687 % However, something like |.bbl| probably should be listed and thus
688 % should be implemented not by |\@input|.
691 \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}}
695 % \begin{macro}{\@input@}
696 % \changes{v0.9p}{1994/01/18}{Macro added}
697 % \task{???}{share code with `@input ?}
698 % Version of |\@input| that does add the file to |\@filelist|.
700 \def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}}
704 % \begin{macro}{\@missingfileerror}
705 % This `error' command avoids \TeX's primitive missing file loop.
707 % Missing file error. Prompt for a new filename, offering a default
709 % \changes{LaTeX2e}{1993/11/21}
710 % {Stop infinite looping on \cs{@er@ext}}
711 % \changes{LaTeX2e}{1993/11/28}
712 % {Use filename parser from dircheck}
713 % \changes{LaTeX2e}{1994/03/15}
714 % {Quit on x or X just like a real error}
715 % \changes{LaTeX2e}{1994/05/26}
716 % {Modify message format}
717 % \changes{v1.0j}{1994/11/03}
718 % {Move here from ltclass}
719 % \changes{v1.0w}{1995/10/06}
722 \gdef\@missingfileerror#1#2{%
723 \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
724 Type X to quit or <RETURN> to proceed,^^J%
725 or enter new name. (Default extension: #2)^^J}%
726 \message{Enter file name: }%
728 \global\read\m@ne to\@gtempa}%
731 \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
732 \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
733 \filename@parse\@gtempa
735 \ifx\filename@ext\relax#2\else\filename@ext\fi}%
737 \noexpand\InputIfFileExists
738 {\filename@area\filename@base.\filename@ext}%
740 {\noexpand\@missingfileerror
741 {\filename@area\filename@base}{\filename@ext}}}%
747 % \begin{macro}{\@obsoletefile}
748 % For compatibility with \LaTeX~2.09 document styles, we distribute
749 % files called |article.sty|, |book.sty|, |report.sty|,
750 % |slides.sty| and |letter.sty|. These use the command
751 % |\@obsoletefile|, which produces a warning message.
752 % \changes{v0.9m}{1993/12/20}{Added this command, removed
754 % \changes{v1.0f}{1994/05/02}{Make \cs{@onlypreamble}}
756 \def\@obsoletefile#1#2{%
757 \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
758 \@onlypreamble\@obsoletefile
761 % \subsection{Listing files}
763 % \begin{macro}{\@filelist}
764 % A list of files input so far. The initial value of |\@gobble| eats
765 % the comma before the first file name.
767 \let\@filelist\@gobble
771 % \begin{macro}{\@addtofilelist}
772 % Add to the list of files input so far.
773 % \changes{LaTeX2e}{1994/03/13}
775 % \changes{LaTeX2e}{1995/10/01}
777 % This `real' definition is only used for `cfg' files during initex.
778 % An initial definition of |\@gobble| has already been set.
780 %\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}
784 % \begin{macro}{\listfiles}
785 % A preamble command to cause |\end{document}| to list files input
786 % from the main file.
787 % \changes{LaTeX2e}{1993/11/22}
788 % {Removed checking for \cs{@unknownversion}}
789 % \changes{LaTeX2e}{1994/01/17}
790 % {New Version, adds `.tex' if needed, and lines up columns}
791 % \changes{LaTeX2e}{1994/05/13}
792 % {Stop \cs{listfiles} being run twice}
793 % \changes{v1.0i}{1994/10/18}
794 % {code moved here from ltclass}
798 \def\@listfiles##1##2##3##4##5##6##7##8##9\@@{%
800 \@tfor\reserved@c:=##1##2##3##4##5##6##7##8\do{%
801 \ifx\reserved@c\reserved@d
802 \edef\filename@area{ \filename@area}%
806 % \changes{v1.0o}{1994/11/30}
807 % {Use \cs{@dofilelist}}
810 \typeout{^^J *File List*}%
811 \@for\@currname:=\@filelist\do{%
812 \filename@parse\@currname
815 \ifx\filename@ext\relax tex\else\filename@ext\fi}%
816 \expandafter\let\expandafter\reserved@b
817 \csname ver@\reserved@a\endcsname
818 \expandafter\expandafter\expandafter\@listfiles\expandafter
819 \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
821 \filename@area\reserved@a
822 \ifx\reserved@b\relax\else\@spaces\reserved@b\fi}}%
823 \typeout{ ***********^^J}}}
826 % \changes{LaTeX2e}{1994/03/13}
827 % {Reset \cs{@addtofilelist} at begin document}
828 % \changes{LaTeX2e}{1994/03/16}
829 % {Move this code directly into \cs{document}}
830 % The |\@filelist| will be de-activated if |\listfiles| does not
831 % appear in the preamble. |\begin{document}| contains code equivalent
835 % \ifx\@listfiles\@undefined
836 % \let\@filelist\relax
837 % \let\@addtofilelist\@gobble
841 \@onlypreamble\listfiles
845 % \begin{macro}{\@dofilelist}
846 % \changes{v1.0o}{1994/11/30}
849 \let\@dofilelist\relax