FormaTeX
FatalFiles & Resources

File Not Found

! LaTeX Error: File 'XXX' not found.

What this error means

LaTeX tried to read a file (via \input{}, \include{}, \includegraphics{}, or similar) but couldn't locate it. LaTeX searches the current directory and its TeX installation paths.

Common causes

  • The file path is wrong or contains a typo
  • The file is in a different directory and the path isn't specified
  • The file extension is wrong or missing
  • For \includegraphics: the graphics package isn't loaded, or the image format isn't supported

How to fix it

Use the full relative path from the .tex file location. For images, ensure the file extension matches exactly. When using \includegraphics, place images in the same folder as the .tex file or specify the path explicitly.

Code examples

Causes the error
\documentclass{article}
\usepackage{graphicx}
\begin{document}

\includegraphics{logo}         % File 'logo' not found
\input{chapters/intro}         % Wrong path

\end{document}
Fixed
\documentclass{article}
\usepackage{graphicx}
\begin{document}

\includegraphics{images/logo.png}   % Correct path + extension
\input{chapters/intro.tex}          % Correct path

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

Una cosa rápida

Registramos el uso anónimo — visitas a páginas, uso de funciones, eventos de compilación — para entender qué funciona y qué no. Sin publicidad, sin datos personales, sin compartir con terceros.

Política de cookies