0

I have a strange graphics loading problem which I can't explain. I have this simple file docs/paper.tex

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./docs/}}
\includegraphics[scale=0.40]{teapot}
\end{document}

In the same directory as docs/paper.tex I have a file called docs/teapot.png. In my project root directory I call pdflatex:

$ /usr/bin/pdflatex docs/paper.tex

It works fine. However, if I call latex:

$ /usr/bin/latex docs/paper.tex
...
! LaTeX Error: File `teapot' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.656   \includegraphics[scale=0.40]{teapot}

Why does pdflatex and latex work differently here? And what is the right way to do it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.