# Query regarding the output of --recorder?

Phelype Oleinik phe.h.o1 at gmail.com
Mon Feb 10 15:56:39 CET 2020

Hi Pablo,

> Hi, everybody, I have a little query regarding the output generated by
> '--recorder'. I know that in the .fls file the lines of the files read and
> written during the compilation of a document (one or more times) are added, my
> question is, why some lines are duplicated consecutively?

LaTeX's \input{...} is a wrapper around \InputIfFileExists, which
checks if the requested file exist by opening it with \openin and
then checking with \ifeof. If the file exists, it is first closed, and
then input with \@@input. From the perspective of the engine,
it is open twice. Compare the two lines in this example:

\begin{filecontents}{\jobname.example}
test
\end{filecontents}
\documentclass{article}
\begin{document}
% Once
% \input \jobname.example
% Twice
\InputIfFileExists{\jobname.example}{}{}
\end{document}

Best

Phelype