TeXpad

LaTeX error: File `….sty' not found

\usepackage{name} makes TeX look for name.sty. This error means no such file exists anywhere TeX searches: the TeX distribution, or the folder of your document.

! LaTeX Error: File `nonexistentpkgxyz.sty' not found.

Try it: this example has the error

Press Fix it in the error box, and it compiles to a PDF. What pdfTeX printed for it:

! LaTeX Error: File `nonexistentpkgxyz.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.3 \begin
or paste your own document

Ready. Press Compile (or Ctrl/Cmd + Enter).

Open in the full editor →

Common causes

How to fix it

  1. Check the spelling against the package documentation on CTAN.
  2. On a local install, add it with your package manager (tlmgr install name on TeX Live, the MiKTeX console on Windows).
  3. For a custom .sty, put it next to your document. In TeXpad, the Overleaf import keeps custom .sty and .cls files automatically.
  4. If you do not need it, remove the line. TeXpad offers that as a one-click fix.

Related errors