I would like to import JPG file into my document in LaTeX. The code below works but only for EPS files, but I need JPG. How can I fix it?
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{image}
\end{document}
I would like to import JPG file into my document in LaTeX. The code below works but only for EPS files, but I need JPG. How can I fix it?
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{image}
\end{document}
You need to use pdflatex
to compile it, which support jpg
images. Check out here for more info.
Update: as commented by @daleif, MPS
, i.e. metapost eps can also be included via pdflatex
without the need of conversion.
I generally convert the filename.eps
or .jpg
or .png
or whatever to PDF, rename the filename.pdf
to filename_converted_to.pdf
and insert filename.eps
in the \includegraphics
command..
It's what's done during the pdflatex compilation process.
You'll have something like that:
\includegraphics{./imgs/filename.jpg}
latex
or rather for pdflatex
?
Commented
Jan 26, 2014 at 20:50