1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
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 [1997/10/06 v1.1l LaTeX Kernel (File Handling)]
37 \documentclass{ltxdoc}
38 \GetFileInfo{ltfiles.dtx}
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}
64 % \section{File Handling}
66 % The following user commands are defined in this part:
68 % \DescribeMacro{\document} (ie |\begin{document}|)\\
69 % Reads in the .AUX files and |\catcode|'s |@| to 12.
71 % \DescribeMacro{\nofiles}\\
72 % Suppresses all file output by setting |\@filesw| false.
74 % \DescribeMacro{\includeonly}\marg{NAME1, ... ,NAMEn}\\
75 % Causes only parts NAME1, ... ,NAMEn to be read by
76 % their |\include| commands. Works by setting \@partsw true
77 % and setting |\@partlist| to NAME1, ... ,NAMEn.
79 % \DescribeMacro{\include}\marg{NAME}\\
80 % Does an |\input| NAME unless |\@partsw| is true and
81 % NAME is not in |\@partlist|. If |\@filesw| is true, then
82 % it directs .AUX output to NAME.AUX, including a
83 % checkpoint at the end.
85 % \DescribeMacro{\input}\marg{NAME}\\
86 % The same as TeX's |\input|, except it allows optional
87 % braces around the file name. In \LaTeXe, it also avoids
88 % the primitive `missing file' error, if the file can not be
91 % \DescribeMacro{\IfFileExists}\marg{NAME}\marg{then}\marg{else}\\
92 % If the file exists on the system, execute \emph{then} otherwise
93 % execute \emph{else}.
95 % \DescribeMacro{\InputIfFileExists}\marg{NAME}\marg{then}\marg{else}\\
96 % If the file exists on the system, execute \emph{then} and input
97 % \emph{NAME} otherwise execute \emph{else}.
101 % \changes{v1.0a}{1994/03/07}{Initial version, split from latex.dtx}
102 % \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
104 % \begin{oldcomments}
107 %<*2ekernel|autoload>
111 % VARIABLES, SWITCHES AND INTERNAL COMMANDS:
112 % \@mainaux : Output file number for main .AUX file.
113 % \@partaux : Output file number for current part's .AUX file.
114 % \@auxout : Either \@mainout or \@partout, depending on
115 % which .AUX file output goes to.
116 % \@input{foo} : If file foo exists, then \input's it,
117 % otherwise types a warning message.
118 % @filesw : Switch -- set false if no .AUX, .TOC, .IDX etc
119 % files are to be written
120 % @partsw : Set true by a \includeonly command.
121 % \@partlist : Set to the argument of the \includeonly command.
123 % \cp@FOO : The checkpoint for \include'd file FOO.TEX, written
124 % by \@writeckpt at the end of file FOO.AUX
127 % \includeonly{FILELIST} ==
130 % \@partlist := FILELIST
137 % then \immediate\write\@mainaux{\string\@input{FILE.AUX}}
140 % then \@tempswa := F
141 % \reserved@b == FILE
142 % for \reserved@a := \@partlist
143 % do if eval(\reserved@a) = eval(\reserved@b)
144 % then \@tempswa := T fi
149 % then \@auxout := \@partaux
151 % then \immediate\openout\@partaux{FILE.AUX}
152 % \immediate\write\@partaux{\relax}
157 % if @filesw then \closeout \@partaux fi
158 % \@auxout := \@mainaux
163 % \@writeckpt{FILE} ==
166 % \immediate\write on file \@partaux:
167 % \@setckpt{FILE}{ %% }
168 % for \reserved@a := \cl@@ckpt
169 % do \immediate\write on file \@partaux:
170 % \global\string\setcounter
171 % {eval(\reserved@a)}{eval(\c@eval(\reserved@a))}
173 % \immediate\write on file \@partaux: }
177 % \@setckpt{FILE}{LIST} ==
188 % \task{???}{Do we use @unused or mainaux?}
189 % \begin{macro}{\@inputcheck}
190 % \begin{macro}{\@unused}
191 % Allocate read stream for testing and output stream.
192 % \changes{v1.0l}{1994/11/07}
193 % {move here from ltdefns, remove duplicate \cs{@mainaux}}
201 % \begin{macro}{\@mainaux}
202 % \begin{macro}{\@partaux}
210 % \begin{macro}{\if@filesw}
211 % \begin{macro}{\if@partsw}
213 \newif\if@filesw \@fileswtrue
214 \newif\if@partsw \@partswfalse
219 % \begin{macro}{\@clubpenalty}
220 % This stores the current normal (non-infinite) value of
221 % \cs{clubpenalty}; it should therefore be reset whenever the
222 % normal value is changed (as in the bibliography in the standard
224 % \changes{v1.1h}{1996/10/05}{Added setting its value}
226 \newcount\@clubpenalty
227 \@clubpenalty \clubpenalty
231 % \begin{macro}{\document}
232 % \changes{v0.9e}{1993/12/09}{Hook added}
233 % Cancel the |\begingroup| from |\begin|
235 \def\document{\endgroup
237 % If some options on |\documentclass| haven't been used by any
238 % package we will now give a warning since this is most certainly a
241 \ifx\@unusedoptionlist\@empty\else
242 \@latex@warning@no@line{Unused global option(s):^^J%
243 \@spaces[\@unusedoptionlist]}%
246 \@colroom\textheight \vsize\textheight
247 \columnwidth\textwidth
248 \@clubpenalty\clubpenalty
250 \advance\columnwidth -\columnsep
251 \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
253 \hsize\columnwidth \linewidth\hsize
254 \begingroup\@floatplacement\@dblfloatplacement
255 \makeatletter\let\@writefile\@gobbletwo
257 % \changes{v1.1a}{1995/10/24}
258 % {Removed multiplelabels switch}
260 \global \let \@multiplelabels \relax
261 \@input{\jobname.aux}%
264 \immediate\openout\@mainaux\jobname.aux
265 \immediate\write\@mainaux{\relax}%
269 % Dateline 1991/03/26: FMi added |\process@table| to support NFSS;
270 % This will also work with old lfonts if no other style defines
271 % |\process@table|. The following line forces the initialization of
275 \let\glb@currsize\@empty %% Force math initialization.
277 % \changes{v0.9t}{1994/01/31}
278 % {set \cs{@normalsize} or \cs{normalsize} if necessary}
279 % \changes{v1.0d}{1994/03/28}
280 % {(DPC) remove \cs{@normalsize check}}
281 % \changes{v1.0d}{1994/03/28}
282 % {(DPC) Use \cs{normalsize} not \cs{@normalsize}}
283 % \changes{v1.0g}{1994/05/13}{Added execution of \cs{every@size}}
284 % \changes{v1.0m}{1994/11/07}{Renamed \cs{every@size} to
285 % \cs{every@math@size}.}
286 % \changes{v1.0q}{1995/04/25}
287 % {Removed execution of \cs{every@size} latex/1407}
293 % So that punctuation in headings is not disturbed by verbatim
294 % or other local changes to the space factor codes, save the document
295 % default here. This will be locally reset by the output routine.
296 % For special cases a class may want to define |\normalsfcodes|
297 % directly, in case that definition will be used.
298 % (This is an old bug, problem existed in \LaTeX2.0x and plain \TeX.)
299 % \changes{v1.1k}{1997/04/14}
300 % {Set the document space factor defaults. latex/2404}
302 \ifx\normalsfcodes\@empty
304 \let\normalsfcodes\frenchspacing
306 \let\normalsfcodes\nonfrenchspacing
310 % Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
311 % to true in the preamble and to false here.
312 % This was done to trap lists and related text in the preamble but it
313 % does not catch everything; hence Change 1.1g was introduced.
317 % \changes{v1.1a}{1995/10/24}
318 % {Removed refundefined switch}
320 \let \@refundefined \relax
322 % Just before disabling the preamble commands we execute the begin
323 % document hook which contains any code contributed by
324 % |\AtBeginDocument|. Also disable the gathering of the file list,
325 % if no |\listfiles| has been issued. |\AtBeginDocument| is redefined
326 % at this point so that and such commands that get into the hook do
327 % not chase their tail\ldots
328 % \changes{v1.1e}{1996/04/24}
329 % {(DPC) Reset \cs{AtBeginDocument} eg for latex/1297}
331 \let\AtBeginDocument\@firstofone
334 % Most of the following assignments will be done globally in case
335 % the user adds something like |\begin{multicols}| to the document
336 % hook, i.e. starts are group in |\begin{document}|.
337 % \changes{v1.0r}{1995/04/27}
338 % {Added \cs{global} to support groups in hook}
339 % \changes{v1.0c}{1994/03/16}
340 % {(DPC) directly add file list settings}
341 % \changes{v1.0v}{1995/08/16}{set \cs{topskip} globally}
342 % \changes{v1.0v}{1995/08/16}{set \cs{@maxdepth}}
344 % \changes{v1.0s}{1995/05/25}
345 % {Added check for \cs{topskip} zero}
346 % \changes{v1.0t}{1995/05/25}
348 % Since a value of exactly 0pt for \cs{topskip} causes
349 % \cs{twocolumn[]} to misbehave, we add this check, hoping
350 % that it will not cause any problems elsewhere.
352 \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
353 \global\@maxdepth\maxdepth
354 \global\let\@begindocumenthook\@undefined
355 \ifx\@listfiles\@undefined
356 \global\let\@filelist\relax
357 \global\let\@addtofilelist\@gobble
360 % At the very end we disable all preamble commands. This has to
361 % happen after the begin document hooks was executed so that this
362 % hook can still use such commands.
363 % \changes{v0.9o}{1994/01/15}
364 % {move \cs{@preamblecmds} after document hook}
365 % \changes{v1.0v}{1995/08/16}{set \cs{do} globally}
367 \gdef\do##1{\global\let ##1\@notprerr}%
370 % The next line saves tokens and also allows |\@nodocument| to be
371 % used directly to trap preamble errors.
372 % \changes{v1.1g}{1996/09/29}{Added disabling of \cs{@nodocument}}
374 \global\let \@nodocument \relax
376 % The next line is a pure safety measure in case a do list is ever
377 % expanded at the wrong place. In addition it will save a few
378 % tokens to get rid of the above definition.
380 \global\let\do\noexpand
382 % \changes{v1.1c}{1995/12/05}{\cs{ignorespaces} added for latex/1933}
383 % Use of |\AtBeginDocument| hook might mean that we are already in
384 % horizontal mode, so ignore the space after |\begin{document}|.
390 \@onlypreamble\document
394 % \begin{macro}{\normalsfcodes}
395 % \changes{v1.1k}{1997/04/14}
396 % {Macro added (from patch file) latex/2404}
397 % The setting of |\@empty| is just a flag. This command may be defined
398 % in a class or package file. If it is still |\@empty| at
399 % |\begin{document}| it will be defined to be |\frenchspacing| or
400 % |\nonfrenchspacing|, depending on which of those appears to be in
401 % effect at that point.
403 \let\normalsfcodes\@empty
407 % \begin{macro}{\nofiles}
408 % \changes{v1.0k}{1994/11/04}
409 % {Added setting of \cs{protected@write},
410 % \cs{makeindex} and \cs{makeglossary} to \cs{nofiles}. ASAJ.}
411 % \changes{v1.0o}{1994/11/30}
412 % {There is no \cs{@gobblethree}\ldots}
413 % \changes{v1.0t}{1995/05/25}
414 % {(CAR) added \cs{long}}
415 % \changes{v1.1f}{1996/05/17}
416 % {added \cs{write} to \cs{protected@write} for latex/2146}
417 % Set |\@fileswfalse| which suppresses the places where \LaTeX\ makes
418 % |\immediate| writes. The |\makeindex| and |\makeglossary| are
419 % disabled. |\protected@write| is redefined not to write to the file
420 % specified, but rather to write a blank line to the log file. This
421 % ensures that a \meta{whatsit} node is still created, and so spacing
422 % is not affected by the |\nofiles| command; to ensure this more
423 % generally, the |\if@nobreak| test is needed.
424 % \changes{v1.1i}{1996/11/05}
425 % {Standard \cs{if@nobreak} test added}
429 \typeout{No auxiliary output files.^^J}%
430 \long\def\protected@write##1##2##3%
431 {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
433 \let\makeglossary\relax}
434 \@onlypreamble\nofiles
439 % \begin{macro}{\protected@write}
440 % This takes three arguments: an output stream, some initialization
441 % code, and some text to write. It then writes this, with
442 % appropriate handling of |\protect| and |\thepage|.
443 % \changes{v1.0k}{1994/11/04}{Macro added ASAJ.}
444 % \changes{v1.0t}{1995/05/25}
445 % {(CAR) added \cs{long}}
447 \long\def \protected@write#1#2#3{%
451 \let\protect\@unexpandable@protect
452 \edef\reserved@a{\write#1{#3}}%
455 \if@nobreak\ifvmode\nobreak\fi\fi
461 \let\@auxout=\@mainaux
465 % \begin{macro}{\includeonly}
466 % \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
470 \edef\@partlist{\zap@space#1 \@empty}}
471 \@onlypreamble\includeonly
475 % \begin{macro}{\include}
476 % \changes{v0.9p}{1994/01/18}
477 % {Use \cs{@input@} so include files are listed.}
478 % In the definition of |\include|, |\def\reserved@b| changed to
479 % |\edef\reserved@b| to be consistent with the |\edef| in
481 % (Suggested by Rainer Sch\"opf \& Frank Mittelbach.
482 % Change made 20 Jul 88.)
484 % Changed definition of |\include| to allow space at end of file name
485 % --- otherwise, typing |\include{foo }| would cause \LaTeX\ to
486 % overwrite |foo.tex|. Change made 24 May 89, suggested by Rainer
487 % Sch\"opf and Frank Mittelbach
489 % Made |\include| check for being used inside an |\include|'d file, as
490 % this will not work and cause surprising results.
492 \def\include#1{\relax
493 \ifnum\@auxout=\@partaux
494 \@latex@error{\string\include\space cannot be nested}\@eha
495 \else \@include#1 \fi}
499 % \begin{macro}{\@include}
504 \immediate\write\@mainaux{\string\@input{#1.aux}}%
509 \edef\reserved@b{#1}%
510 \@for\reserved@a:=\@partlist\do
511 {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
514 \let\@auxout\@partaux
516 \immediate\openout\@partaux #1.aux
517 \immediate\write\@partaux{\relax}%
523 \immediate\closeout\@partaux
527 % If the file is not included, reset |\deadcycles|, so that a long
528 % list of non-included files does not generate an `Output loop'
530 % \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
535 \let\@auxout\@mainaux}
539 % \begin{macro}{\@writeckpt}
543 \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
544 {\let\@elt\@wckptelt \cl@@ckpt}%
545 \immediate\write\@partaux{\@charrb}%
550 % \begin{macro}{\@wckptelt}
553 \immediate\write\@partaux{%
554 \string\setcounter{#1}{\the\@nameuse{c@#1}}}}
558 % \begin{macro}{\@setckpt}
559 % RmS 93/08/31: introduced |\@setckpt|
561 \def\@setckpt#1{\global\@namedef{cp@#1}}
565 % \begin{macro}{\@charlb}
566 % \begin{macro}{\@charrb}
567 % The following defines |\@charlb| and |\@charrb| to be |{| and |}|,
568 % respectively with |\catcode| 11.
570 {\catcode`[=1 \catcode`]=2
571 \catcode`{=11 \catcode`}=11
580 % \subsection{Safe Input Macros}
582 % \begin{macro}{\IfFileExists}
583 % \changes{v0.9b}{1993/12/04}{Macro added}
584 % \changes{v0.9p}{1994/01/18}{New Definition}
585 % \changes{v1.0t}{1995/05/25}
586 % {(CAR) added \cs{long}}
589 \long\def \IfFileExists#1#2#3{%
590 \openin\@inputcheck#1 %
592 \ifx\input@path\@undefined
595 \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
599 \edef\@filef@und{#1 }%
605 % \begin{macro}{\@iffileonpath}
606 % If the file is not found by |\openin|, and |\input@path| is defined,
607 % look in all the directories specified in |\input@path|.
608 % \changes{v0.9p}{1994/01/18}{Macro added}
609 % \changes{v1.0f}{1994/05/02}
610 % {\cs{@break@loop} renamed to \cs{@break@tfor}}
611 % \changes{v1.0t}{1995/05/25}
612 % {(CAR) added \cs{long}}
613 % \changes{v1.1d}{1996/01/10}
614 % {Change argument handling to not require doubled hash. latex/2024}
616 \long\def\@iffileonpath#1{%
617 \let\reserved@a\@secondoftwo
618 \expandafter\@tfor\expandafter\reserved@b\expandafter
619 :\expandafter=\input@path\do{%
620 \openin\@inputcheck\reserved@b#1 %
621 \ifeof\@inputcheck\else
622 \edef\@filef@und{\reserved@b#1 }%
623 \let\reserved@a\@firstoftwo%
632 % \begin{macro}{\InputIfFileExists}
634 % {1993/12/04}{Macro added}
636 % {1994/01/18}{New Definition}
637 % \changes{v0.3b}{1994/03/13}
638 % {Use new cmd \cs{@addtofilelist}}
639 % Now define |\InputIfFileExists| to input |#1| if it seems to exist.
640 % Immediately prior to the input, |#2| is executed.
641 % If the file |#1| does not exist, execute `|#3|'.
642 % \changes{v1.0t}{1995/05/25}
643 % {(CAR) added \cs{long}}
645 \long\def \InputIfFileExists#1#2{%
647 {#2\@addtofilelist{#1}\@@input \@filef@und}}
651 % \begin{macro}{\input}
652 % Input a file: if the argument is given in braces use safe input
653 % macros, otherwise use \TeX's primitive |\input| command (which is
654 % called |\@@input| in \LaTeX).
655 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
657 \def\input{\@ifnextchar\bgroup\@iinput\@@input}
661 % \begin{macro}{\@iinput}
662 % Define |\@iinput| (i.e., |\input|) in terms of
663 % |\InputIfIfileExists|.
664 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
667 \InputIfFileExists{#1}{}%
668 {\filename@parse{#1}%
669 \edef\reserved@a{\noexpand\@missingfileerror
670 {\filename@area\filename@base}%
671 {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
676 % \begin{macro}{\@input}
677 % \changes{v0.9b}{1993/12/04}{Macro reimplemented}
678 % \changes{v0.9p}{1994/01/18}%
679 % {do not use a different definition for \cs{input@path}}
680 % Define |\@input| in terms of |\IfIfileExists|.
681 % So this is a `safe input' command, but the files input are not
682 % listed by |\listfiles|.
684 % We don't want |.aux|, |.toc| files etc be listed by |\listfiles|.
685 % However, something like |.bbl| probably should be listed and thus
686 % should be implemented not by |\@input|.
689 \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}}
693 % \begin{macro}{\@input@}
694 % \changes{v0.9p}{1994/01/18}{Macro added}
695 % \task{???}{share code with `@input ?}
696 % Version of |\@input| that does add the file to |\@filelist|.
698 \def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}}
702 % \begin{macro}{\@missingfileerror}
703 % This `error' command avoids \TeX's primitive missing file loop.
705 % Missing file error. Prompt for a new filename, offering a default
707 % \changes{LaTeX2e}{1993/11/21}
708 % {Stop infinite looping on \cs{@er@ext}}
709 % \changes{LaTeX2e}{1993/11/28}
710 % {Use filename parser from dircheck}
711 % \changes{LaTeX2e}{1994/03/15}
712 % {Quit on x or X just like a real error}
713 % \changes{LaTeX2e}{1994/05/26}
714 % {Modify message format}
715 % \changes{v1.0j}{1994/11/03}
716 % {Move here from ltclass}
717 % \changes{v1.0w}{1995/10/06}
720 %<autoload>\def\@missingfileerror{\@autoerr\@missingfileerror}
721 %</2ekernel|autoload>
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}}}%
746 %<*2ekernel|autoload>
750 % \begin{macro}{\@obsoletefile}
751 % For compatibility with \LaTeX~2.09 document styles, we distribute
752 % files called |article.sty|, |book.sty|, |report.sty|,
753 % |slides.sty| and |letter.sty|. These use the command
754 % |\@obsoletefile|, which produces a warning message.
755 % \changes{v0.9m}{1993/12/20}{Added this command, removed
757 % \changes{v1.0f}{1994/05/02}{Make \cs{@onlypreamble}}
759 \def\@obsoletefile#1#2{%
760 \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
761 \@onlypreamble\@obsoletefile
764 % \subsection{Listing files}
766 % \begin{macro}{\@filelist}
767 % A list of files input so far. The initial value of |\@gobble| eats
768 % the comma before the first file name.
770 \let\@filelist\@gobble
774 % \begin{macro}{\@addtofilelist}
775 % Add to the list of files input so far.
776 % \changes{LaTeX2e}{1994/03/13}
778 % \changes{LaTeX2e}{1995/10/01}
780 % This `real' definition is only used for `cfg' files during initex.
781 % An initial definition of |\@gobble| has already been set.
783 %\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}
787 % \begin{macro}{\listfiles}
788 % A preamble command to cause |\end{document}| to list files input
789 % from the main file.
790 % \changes{LaTeX2e}{1993/11/22}
791 % {Removed checking for \cs{@unknownversion}}
792 % \changes{LaTeX2e}{1994/01/17}
793 % {New Version, adds `.tex' if needed, and lines up columns}
794 % \changes{LaTeX2e}{1994/05/13}
795 % {Stop \cs{listfiles} being run twice}
796 % \changes{v1.0i}{1994/10/18}
797 % {code moved here from ltclass}
801 \def\@listfiles##1##2##3##4##5##6##7##8##9\@@{%
803 \@tfor\reserved@c:=##1##2##3##4##5##6##7##8\do{%
804 \ifx\reserved@c\reserved@d
805 \edef\filename@area{ \filename@area}%
809 % \changes{v1.0o}{1994/11/30}
810 % {Use \cs{@dofilelist}}
813 \typeout{^^J *File List*}%
814 \@for\@currname:=\@filelist\do{%
815 \filename@parse\@currname
818 \ifx\filename@ext\relax tex\else\filename@ext\fi}%
819 \expandafter\let\expandafter\reserved@b
820 \csname ver@\reserved@a\endcsname
821 \expandafter\expandafter\expandafter\@listfiles\expandafter
822 \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
824 \filename@area\reserved@a
825 \ifx\reserved@b\relax\else\@spaces\reserved@b\fi}}%
826 \typeout{ ***********^^J}}}
829 % \changes{LaTeX2e}{1994/03/13}
830 % {Reset \cs{@addtofilelist} at begin document}
831 % \changes{LaTeX2e}{1994/03/16}
832 % {Move this code directly into \cs{document}}
833 % The |\@filelist| will be de-activated if |\listfiles| does not
834 % appear in the preamble. |\begin{document}| contains code equivalent
838 % \ifx\@listfiles\@undefined
839 % \let\@filelist\relax
840 % \let\@addtofilelist\@gobble
844 \@onlypreamble\listfiles
848 % \begin{macro}{\@dofilelist}
849 % \changes{v1.0o}{1994/11/30}
852 \let\@dofilelist\relax
857 %</2ekernel|autoload>