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.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy