# \AtEndOfEveryFile is executed in \begin{itemize}

I was quite surprised that the \AtEndOfEveryFile hook defined by the filehook package is executed in \begin{itemize}.

Is this behaviour intended? If not, how and where do I file a bug report?

\documentclass{article}
\usepackage{filehook}

\AtEndOfEveryFile{(eof)}

\begin{document}
\begin{itemize}
\item a
\item b
\end{itemize}
\end{document}


It's not a bug. When you use itemize LaTeX has to load a font file that contains the \textbullet symbol (texmf-dist/tex/latex/base/omscmr.fd), so the hook is applied right before the symbol is typeset. You get the same output if you use \textbullet outside itemize:
\documentclass{article}

• indeed, it is not related to \begin{itemize}. If I replace the content with \item[-] a eof is not printed. Thank you. – jakun Mar 18 '19 at 20:45