Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up

File not found: fixing a missing package or image in LaTeX

LaTeX tells you it cannot find a file — most often a package (.sty) or an image. The message always names the file it was looking for.

Log
! LaTeX Error: File `paralist.sty' not found.

! Package pdftex.def Error: File `figure1.png' not found.

Case 1: a missing package (.sty)

A \usepackage{…} points to a package the distribution does not know. First check the spelling. If the package is truly deprecated, look for its modern equivalent rather than installing it (see Old packages).

Case 2: a missing image

With \includegraphics{figure1}, the image file must be uploaded and the name must be exact (case included). On sarmate.net, upload the image into the same folder as your .tex file.

The reflex The name between the backticks in the message is exactly what LaTeX is looking for. Compare it character by character with your \usepackage / \includegraphics.

Try it yourself

This example compiles. Add a line \usepackage{packagexyz} and recompile to see "File `packagexyz.sty' not found".

The method

  1. Read the file name between the backticks in the message.
  2. Does it end in .sty? Check the \usepackage spelling or find the modern equivalent.
  3. Is it an image? Upload the file and write the exact name (case included).
  4. Avoid spaces and accents in file names — a common cause.
sarmate.net tip Our online editor reads the compilation log and tells you the likely cause in plain words, so you unblock without guessing.

An AI can help — directly in your code

AI assistants (Claude, Gemini, ChatGPT…) know LaTeX very well: show them the message and they find the typo or the package's modern equivalent. The usual drawback is the back-and-forth — copy, paste, repeat.

sarmate.net removes this round-trip with its MCP server: you connect the AI directly to your online editor. It reads your files, compiles them, analyzes the error log and fixes the code in place, with no copy-paste. You stay in control: nothing is changed without your approval.

Write and compile LaTeX online

Full editor, instant compilation (pdfLaTeX/XeLaTeX/LuaLaTeX), nothing to install.

Open the online editor