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}
60 % \changes{v1.0h}{1994/05/21}{Use new error commands}
61 % \changes{v1.0n}{1994/11/17}
62 % {\cs{@tempa} to \cs{reserved@a}}
63 % \changes{v1.0u}{1995/07/13}{Updates to docu}
64 % \changes{v1.1m}{2015/02/21}
65 % {Removed autoload support}
67 % \section{File Handling}
69 % The following user commands are defined in this part:
71 % \DescribeMacro{\document} (ie |\begin{document}|)\\
72 % Reads in the .AUX files and |\catcode|'s |@| to 12.
74 % \DescribeMacro{\nofiles}\\
75 % Suppresses all file output by setting |\@filesw| false.
77 % \DescribeMacro{\includeonly}\marg{NAME1, ... ,NAMEn}\\
78 % Causes only parts NAME1, ... ,NAMEn to be read by
79 % their |\include| commands. Works by setting \@partsw true
80 % and setting |\@partlist| to NAME1, ... ,NAMEn.
82 % \DescribeMacro{\include}\marg{NAME}\\
83 % Does an |\input| NAME unless |\@partsw| is true and
84 % NAME is not in |\@partlist|. If |\@filesw| is true, then
85 % it directs .AUX output to NAME.AUX, including a
86 % checkpoint at the end.
88 % \DescribeMacro{\input}\marg{NAME}\\
89 % The same as TeX's |\input|, except it allows optional
90 % braces around the file name. In \LaTeXe, it also avoids
91 % the primitive `missing file' error, if the file can not be
94 % \DescribeMacro{\IfFileExists}\marg{NAME}\marg{then}\marg{else}\\
95 % If the file exists on the system, execute \emph{then} otherwise
96 % execute \emph{else}.
98 % \DescribeMacro{\InputIfFileExists}\marg{NAME}\marg{then}\marg{else}\\
99 % If the file exists on the system, execute \emph{then} and input
100 % \emph{NAME} otherwise execute \emph{else}.
104 % \changes{v1.0a}{1994/03/07}{Initial version, split from latex.dtx}
105 % \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
107 % \begin{oldcomments}
114 % VARIABLES, SWITCHES AND INTERNAL COMMANDS:
115 % \@mainaux : Output file number for main .AUX file.
116 % \@partaux : Output file number for current part's .AUX file.
117 % \@auxout : Either \@mainout or \@partout, depending on
118 % which .AUX file output goes to.
119 % \@input{foo} : If file foo exists, then \input's it,
120 % otherwise types a warning message.
121 % @filesw : Switch -- set false if no .AUX, .TOC, .IDX etc
122 % files are to be written
123 % @partsw : Set true by a \includeonly command.
124 % \@partlist : Set to the argument of the \includeonly command.
126 % \cp@FOO : The checkpoint for \include'd file FOO.TEX, written
127 % by \@writeckpt at the end of file FOO.AUX
130 % \includeonly{FILELIST} ==
133 % \@partlist := FILELIST
140 % then \immediate\write\@mainaux{\string\@input{FILE.AUX}}
143 % then \@tempswa := F
144 % \reserved@b == FILE
145 % for \reserved@a := \@partlist
146 % do if eval(\reserved@a) = eval(\reserved@b)
147 % then \@tempswa := T fi
152 % then \@auxout := \@partaux
154 % then \immediate\openout\@partaux{FILE.AUX}
155 % \immediate\write\@partaux{\relax}
160 % if @filesw then \closeout \@partaux fi
161 % \@auxout := \@mainaux
166 % \@writeckpt{FILE} ==
169 % \immediate\write on file \@partaux:
170 % \@setckpt{FILE}{ %% }
171 % for \reserved@a := \cl@@ckpt
172 % do \immediate\write on file \@partaux:
173 % \global\string\setcounter
174 % {eval(\reserved@a)}{eval(\c@eval(\reserved@a))}
176 % \immediate\write on file \@partaux: }
180 % \@setckpt{FILE}{LIST} ==
191 % \task{???}{Do we use @unused or mainaux?}
192 % \begin{macro}{\@inputcheck}
193 % \begin{macro}{\@unused}
194 % Allocate read stream for testing and output stream.
195 % \changes{v1.0l}{1994/11/07}
196 % {move here from ltdefns, remove duplicate \cs{@mainaux}}
204 % \begin{macro}{\@mainaux}
205 % \begin{macro}{\@partaux}
213 % \begin{macro}{\if@filesw}
214 % \begin{macro}{\if@partsw}
216 \newif\if@filesw \@fileswtrue
217 \newif\if@partsw \@partswfalse
222 % \begin{macro}{\@clubpenalty}
223 % This stores the current normal (non-infinite) value of
224 % \cs{clubpenalty}; it should therefore be reset whenever the
225 % normal value is changed (as in the bibliography in the standard
227 % \changes{v1.1h}{1996/10/05}{Added setting its value}
229 \newcount\@clubpenalty
230 \@clubpenalty \clubpenalty
234 % \begin{macro}{\document}
235 % \changes{v0.9e}{1993/12/09}{Hook added}
236 % Cancel the |\begingroup| from |\begin|
238 \def\document{\endgroup
240 % If some options on |\documentclass| haven't been used by any
241 % package we will now give a warning since this is most certainly a
244 \ifx\@unusedoptionlist\@empty\else
245 \@latex@warning@no@line{Unused global option(s):^^J%
246 \@spaces[\@unusedoptionlist]}%
249 \@colroom\textheight \vsize\textheight
250 \columnwidth\textwidth
251 \@clubpenalty\clubpenalty
253 \advance\columnwidth -\columnsep
254 \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
256 \hsize\columnwidth \linewidth\hsize
257 \begingroup\@floatplacement\@dblfloatplacement
258 \makeatletter\let\@writefile\@gobbletwo
260 % \changes{v1.1a}{1995/10/24}
261 % {Removed multiplelabels switch}
263 \global \let \@multiplelabels \relax
264 \@input{\jobname.aux}%
267 \immediate\openout\@mainaux\jobname.aux
268 \immediate\write\@mainaux{\relax}%
272 % Dateline 1991/03/26: FMi added |\process@table| to support NFSS;
273 % This will also work with old lfonts if no other style defines
274 % |\process@table|. The following line forces the initialization of
278 \let\glb@currsize\@empty %% Force math initialization.
280 % \changes{v0.9t}{1994/01/31}
281 % {set \cs{@normalsize} or \cs{normalsize} if necessary}
282 % \changes{v1.0d}{1994/03/28}
283 % {(DPC) remove \cs{@normalsize check}}
284 % \changes{v1.0d}{1994/03/28}
285 % {(DPC) Use \cs{normalsize} not \cs{@normalsize}}
286 % \changes{v1.0g}{1994/05/13}{Added execution of \cs{every@size}}
287 % \changes{v1.0m}{1994/11/07}{Renamed \cs{every@size} to
288 % \cs{every@math@size}.}
289 % \changes{v1.0q}{1995/04/25}
290 % {Removed execution of \cs{every@size} latex/1407}
296 % So that punctuation in headings is not disturbed by verbatim
297 % or other local changes to the space factor codes, save the document
298 % default here. This will be locally reset by the output routine.
299 % For special cases a class may want to define |\normalsfcodes|
300 % directly, in case that definition will be used.
301 % (This is an old bug, problem existed in \LaTeX2.0x and plain \TeX.)
302 % \changes{v1.1k}{1997/04/14}
303 % {Set the document space factor defaults. latex/2404}
305 \ifx\normalsfcodes\@empty
307 \let\normalsfcodes\frenchspacing
309 \let\normalsfcodes\nonfrenchspacing
313 % Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
314 % to true in the preamble and to false here.
315 % This was done to trap lists and related text in the preamble but it
316 % does not catch everything; hence Change 1.1g was introduced.
320 % \changes{v1.1a}{1995/10/24}
321 % {Removed refundefined switch}
323 \let \@refundefined \relax
325 % Just before disabling the preamble commands we execute the begin
326 % document hook which contains any code contributed by
327 % |\AtBeginDocument|. Also disable the gathering of the file list,
328 % if no |\listfiles| has been issued. |\AtBeginDocument| is redefined
329 % at this point so that and such commands that get into the hook do
330 % not chase their tail\ldots
331 % \changes{v1.1e}{1996/04/24}
332 % {(DPC) Reset \cs{AtBeginDocument} eg for latex/1297}
334 \let\AtBeginDocument\@firstofone
337 % Most of the following assignments will be done globally in case
338 % the user adds something like |\begin{multicols}| to the document
339 % hook, i.e. starts are group in |\begin{document}|.
340 % \changes{v1.0r}{1995/04/27}
341 % {Added \cs{global} to support groups in hook}
342 % \changes{v1.0c}{1994/03/16}
343 % {(DPC) directly add file list settings}
344 % \changes{v1.0v}{1995/08/16}{set \cs{topskip} globally}
345 % \changes{v1.0v}{1995/08/16}{set \cs{@maxdepth}}
347 % \changes{v1.0s}{1995/05/25}
348 % {Added check for \cs{topskip} zero}
349 % \changes{v1.0t}{1995/05/25}
351 % Since a value of exactly 0pt for \cs{topskip} causes
352 % \cs{twocolumn[]} to misbehave, we add this check, hoping
353 % that it will not cause any problems elsewhere.
355 \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
356 \global\@maxdepth\maxdepth
357 \global\let\@begindocumenthook\@undefined
358 \ifx\@listfiles\@undefined
359 \global\let\@filelist\relax
360 \global\let\@addtofilelist\@gobble
363 % At the very end we disable all preamble commands. This has to
364 % happen after the begin document hooks was executed so that this
365 % hook can still use such commands.
366 % \changes{v0.9o}{1994/01/15}
367 % {move \cs{@preamblecmds} after document hook}
368 % \changes{v1.0v}{1995/08/16}{set \cs{do} globally}
370 \gdef\do##1{\global\let ##1\@notprerr}%
373 % The next line saves tokens and also allows |\@nodocument| to be
374 % used directly to trap preamble errors.
375 % \changes{v1.1g}{1996/09/29}{Added disabling of \cs{@nodocument}}
377 \global\let \@nodocument \relax
379 % The next line is a pure safety measure in case a do list is ever
380 % expanded at the wrong place. In addition it will save a few
381 % tokens to get rid of the above definition.
383 \global\let\do\noexpand
385 % \changes{v1.1c}{1995/12/05}{\cs{ignorespaces} added for latex/1933}
386 % Use of |\AtBeginDocument| hook might mean that we are already in
387 % horizontal mode, so ignore the space after |\begin{document}|.
393 \@onlypreamble\document
397 % \begin{macro}{\normalsfcodes}
398 % \changes{v1.1k}{1997/04/14}
399 % {Macro added (from patch file) latex/2404}
400 % The setting of |\@empty| is just a flag. This command may be defined
401 % in a class or package file. If it is still |\@empty| at
402 % |\begin{document}| it will be defined to be |\frenchspacing| or
403 % |\nonfrenchspacing|, depending on which of those appears to be in
404 % effect at that point.
406 \let\normalsfcodes\@empty
410 % \begin{macro}{\nofiles}
411 % \changes{v1.0k}{1994/11/04}
412 % {Added setting of \cs{protected@write},
413 % \cs{makeindex} and \cs{makeglossary} to \cs{nofiles}. ASAJ.}
414 % \changes{v1.0o}{1994/11/30}
415 % {There is no \cs{@gobblethree}\ldots}
416 % \changes{v1.0t}{1995/05/25}
417 % {(CAR) added \cs{long}}
418 % \changes{v1.1f}{1996/05/17}
419 % {added \cs{write} to \cs{protected@write} for latex/2146}
420 % Set |\@fileswfalse| which suppresses the places where \LaTeX\ makes
421 % |\immediate| writes. The |\makeindex| and |\makeglossary| are
422 % disabled. |\protected@write| is redefined not to write to the file
423 % specified, but rather to write a blank line to the log file. This
424 % ensures that a \meta{whatsit} node is still created, and so spacing
425 % is not affected by the |\nofiles| command; to ensure this more
426 % generally, the |\if@nobreak| test is needed.
427 % \changes{v1.1i}{1996/11/05}
428 % {Standard \cs{if@nobreak} test added}
432 \typeout{No auxiliary output files.^^J}%
433 \long\def\protected@write##1##2##3%
434 {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
436 \let\makeglossary\relax}
437 \@onlypreamble\nofiles
442 % \begin{macro}{\protected@write}
443 % This takes three arguments: an output stream, some initialization
444 % code, and some text to write. It then writes this, with
445 % appropriate handling of |\protect| and |\thepage|.
446 % \changes{v1.0k}{1994/11/04}{Macro added ASAJ.}
447 % \changes{v1.0t}{1995/05/25}
448 % {(CAR) added \cs{long}}
450 \long\def \protected@write#1#2#3{%
454 \let\protect\@unexpandable@protect
455 \edef\reserved@a{\write#1{#3}}%
458 \if@nobreak\ifvmode\nobreak\fi\fi
464 \let\@auxout=\@mainaux
468 % \begin{macro}{\includeonly}
469 % \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
473 \edef\@partlist{\zap@space#1 \@empty}}
474 \@onlypreamble\includeonly
478 % \begin{macro}{\include}
479 % \changes{v0.9p}{1994/01/18}
480 % {Use \cs{@input@} so include files are listed.}
481 % In the definition of |\include|, |\def\reserved@b| changed to
482 % |\edef\reserved@b| to be consistent with the |\edef| in
484 % (Suggested by Rainer Sch\"opf \& Frank Mittelbach.
485 % Change made 20 Jul 88.)
487 % Changed definition of |\include| to allow space at end of file name
488 % --- otherwise, typing |\include{foo }| would cause \LaTeX\ to
489 % overwrite |foo.tex|. Change made 24 May 89, suggested by Rainer
490 % Sch\"opf and Frank Mittelbach
492 % Made |\include| check for being used inside an |\include|'d file, as
493 % this will not work and cause surprising results.
495 \def\include#1{\relax
496 \ifnum\@auxout=\@partaux
497 \@latex@error{\string\include\space cannot be nested}\@eha
498 \else \@include#1 \fi}
502 % \begin{macro}{\@include}
507 \immediate\write\@mainaux{\string\@input{#1.aux}}%
512 \edef\reserved@b{#1}%
513 \@for\reserved@a:=\@partlist\do
514 {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
517 \let\@auxout\@partaux
519 \immediate\openout\@partaux #1.aux
520 \immediate\write\@partaux{\relax}%
526 \immediate\closeout\@partaux
530 % If the file is not included, reset |\deadcycles|, so that a long
531 % list of non-included files does not generate an `Output loop'
533 % \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
538 \let\@auxout\@mainaux}
542 % \begin{macro}{\@writeckpt}
546 \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
547 {\let\@elt\@wckptelt \cl@@ckpt}%
548 \immediate\write\@partaux{\@charrb}%
553 % \begin{macro}{\@wckptelt}
556 \immediate\write\@partaux{%
557 \string\setcounter{#1}{\the\@nameuse{c@#1}}}}
561 % \begin{macro}{\@setckpt}
562 % RmS 93/08/31: introduced |\@setckpt|
564 \def\@setckpt#1{\global\@namedef{cp@#1}}
568 % \begin{macro}{\@charlb}
569 % \begin{macro}{\@charrb}
570 % The following defines |\@charlb| and |\@charrb| to be |{| and |}|,
571 % respectively with |\catcode| 11.
573 {\catcode`[=1 \catcode`]=2
574 \catcode`{=11 \catcode`}=11
583 % \subsection{Safe Input Macros}
585 % \begin{macro}{\IfFileExists}
586 % \changes{v0.9b}{1993/12/04}{Macro added}
587 % \changes{v0.9p}{1994/01/18}{New Definition}
588 % \changes{v1.0t}{1995/05/25}
589 % {(CAR) added \cs{long}}
592 \long\def \IfFileExists#1#2#3{%
593 \openin\@inputcheck#1 %
595 \ifx\input@path\@undefined
598 \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
602 \edef\@filef@und{#1 }%
608 % \begin{macro}{\@iffileonpath}
609 % If the file is not found by |\openin|, and |\input@path| is defined,
610 % look in all the directories specified in |\input@path|.
611 % \changes{v0.9p}{1994/01/18}{Macro added}
612 % \changes{v1.0f}{1994/05/02}
613 % {\cs{@break@loop} renamed to \cs{@break@tfor}}
614 % \changes{v1.0t}{1995/05/25}
615 % {(CAR) added \cs{long}}
616 % \changes{v1.1d}{1996/01/10}
617 % {Change argument handling to not require doubled hash. latex/2024}
619 \long\def\@iffileonpath#1{%
620 \let\reserved@a\@secondoftwo
621 \expandafter\@tfor\expandafter\reserved@b\expandafter
622 :\expandafter=\input@path\do{%
623 \openin\@inputcheck\reserved@b#1 %
624 \ifeof\@inputcheck\else
625 \edef\@filef@und{\reserved@b#1 }%
626 \let\reserved@a\@firstoftwo%
635 % \begin{macro}{\InputIfFileExists}
637 % {1993/12/04}{Macro added}
639 % {1994/01/18}{New Definition}
640 % \changes{v0.3b}{1994/03/13}
641 % {Use new cmd \cs{@addtofilelist}}
642 % Now define |\InputIfFileExists| to input |#1| if it seems to exist.
643 % Immediately prior to the input, |#2| is executed.
644 % If the file |#1| does not exist, execute `|#3|'.
645 % \changes{v1.0t}{1995/05/25}
646 % {(CAR) added \cs{long}}
648 \long\def \InputIfFileExists#1#2{%
650 {#2\@addtofilelist{#1}\@@input \@filef@und}}
654 % \begin{macro}{\input}
655 % Input a file: if the argument is given in braces use safe input
656 % macros, otherwise use \TeX's primitive |\input| command (which is
657 % called |\@@input| in \LaTeX).
658 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
660 \def\input{\@ifnextchar\bgroup\@iinput\@@input}
664 % \begin{macro}{\@iinput}
665 % Define |\@iinput| (i.e., |\input|) in terms of
666 % |\InputIfIfileExists|.
667 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
670 \InputIfFileExists{#1}{}%
671 {\filename@parse{#1}%
672 \edef\reserved@a{\noexpand\@missingfileerror
673 {\filename@area\filename@base}%
674 {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
679 % \begin{macro}{\@input}
680 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
681 % \changes{v0.9p}{1994/01/18}%
682 % {do not use a different definition for \cs{input@path}}
683 % Define |\@input| in terms of |\IfIfileExists|.
684 % So this is a `safe input' command, but the files input are not
685 % listed by |\listfiles|.
687 % We don't want |.aux|, |.toc| files etc be listed by |\listfiles|.
688 % However, something like |.bbl| probably should be listed and thus
689 % should be implemented not by |\@input|.
692 \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}}
696 % \begin{macro}{\@input@}
697 % \changes{v0.9p}{1994/01/18}{Macro added}
698 % \task{???}{share code with `@input ?}
699 % Version of |\@input| that does add the file to |\@filelist|.
701 \def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}}
705 % \begin{macro}{\@missingfileerror}
706 % This `error' command avoids \TeX's primitive missing file loop.
708 % Missing file error. Prompt for a new filename, offering a default
710 % \changes{LaTeX2e}{1993/11/21}
711 % {Stop infinite looping on \cs{@er@ext}}
712 % \changes{LaTeX2e}{1993/11/28}
713 % {Use filename parser from dircheck}
714 % \changes{LaTeX2e}{1994/03/15}
715 % {Quit on x or X just like a real error}
716 % \changes{LaTeX2e}{1994/05/26}
717 % {Modify message format}
718 % \changes{v1.0j}{1994/11/03}
719 % {Move here from ltclass}
720 % \changes{v1.0w}{1995/10/06}
723 \gdef\@missingfileerror#1#2{%
724 \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
725 Type X to quit or <RETURN> to proceed,^^J%
726 or enter new name. (Default extension: #2)^^J}%
727 \message{Enter file name: }%
729 \global\read\m@ne to\@gtempa}%
732 \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
733 \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
734 \filename@parse\@gtempa
736 \ifx\filename@ext\relax#2\else\filename@ext\fi}%
738 \noexpand\InputIfFileExists
739 {\filename@area\filename@base.\filename@ext}%
741 {\noexpand\@missingfileerror
742 {\filename@area\filename@base}{\filename@ext}}}%
748 % \begin{macro}{\@obsoletefile}
749 % For compatibility with \LaTeX~2.09 document styles, we distribute
750 % files called |article.sty|, |book.sty|, |report.sty|,
751 % |slides.sty| and |letter.sty|. These use the command
752 % |\@obsoletefile|, which produces a warning message.
753 % \changes{v0.9m}{1993/12/20}{Added this command, removed
755 % \changes{v1.0f}{1994/05/02}{Make \cs{@onlypreamble}}
757 \def\@obsoletefile#1#2{%
758 \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
759 \@onlypreamble\@obsoletefile
762 % \subsection{Listing files}
764 % \begin{macro}{\@filelist}
765 % A list of files input so far. The initial value of |\@gobble| eats
766 % the comma before the first file name.
768 \let\@filelist\@gobble
772 % \begin{macro}{\@addtofilelist}
773 % Add to the list of files input so far.
774 % \changes{LaTeX2e}{1994/03/13}
776 % \changes{LaTeX2e}{1995/10/01}
778 % This `real' definition is only used for `cfg' files during initex.
779 % An initial definition of |\@gobble| has already been set.
781 %\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}
785 % \begin{macro}{\listfiles}
786 % A preamble command to cause |\end{document}| to list files input
787 % from the main file.
788 % \changes{LaTeX2e}{1993/11/22}
789 % {Removed checking for \cs{@unknownversion}}
790 % \changes{LaTeX2e}{1994/01/17}
791 % {New Version, adds `.tex' if needed, and lines up columns}
792 % \changes{LaTeX2e}{1994/05/13}
793 % {Stop \cs{listfiles} being run twice}
794 % \changes{v1.0i}{1994/10/18}
795 % {code moved here from ltclass}
799 \def\@listfiles##1##2##3##4##5##6##7##8##9\@@{%
801 \@tfor\reserved@c:=##1##2##3##4##5##6##7##8\do{%
802 \ifx\reserved@c\reserved@d
803 \edef\filename@area{ \filename@area}%
807 % \changes{v1.0o}{1994/11/30}
808 % {Use \cs{@dofilelist}}
811 \typeout{^^J *File List*}%
812 \@for\@currname:=\@filelist\do{%
813 \filename@parse\@currname
816 \ifx\filename@ext\relax tex\else\filename@ext\fi}%
817 \expandafter\let\expandafter\reserved@b
818 \csname ver@\reserved@a\endcsname
819 \expandafter\expandafter\expandafter\@listfiles\expandafter
820 \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
822 \filename@area\reserved@a
823 \ifx\reserved@b\relax\else\@spaces\reserved@b\fi}}%
824 \typeout{ ***********^^J}}}
827 % \changes{LaTeX2e}{1994/03/13}
828 % {Reset \cs{@addtofilelist} at begin document}
829 % \changes{LaTeX2e}{1994/03/16}
830 % {Move this code directly into \cs{document}}
831 % The |\@filelist| will be de-activated if |\listfiles| does not
832 % appear in the preamble. |\begin{document}| contains code equivalent
836 % \ifx\@listfiles\@undefined
837 % \let\@filelist\relax
838 % \let\@addtofilelist\@gobble
842 \@onlypreamble\listfiles
846 % \begin{macro}{\@dofilelist}
847 % \changes{v1.0o}{1994/11/30}
850 \let\@dofilelist\relax