I am compiling a very simple document, embedding one EPS image. Latex converts this image to PDF and the file shows up in the directory - so far, so good. However, then I get the error "Missing $ inserted" and the image does not show up in the document (although the document does get compiled). What could be the problem?
\documentclass{article}
\usepackage{graphicx}
\newcommand*\myphone{\vcenter{\hbox{\includegraphics{smartphone.eps}}}}
\begin{document}
Hello World! \myphone
\end{document}
and the relevant portion from the log file:
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
)
! Missing $ inserted.
<inserted text>
$
l.8 Hello World! \myphone
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 8.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 8.
Package epstopdf Info: Source file: <smartphone.eps>
(epstopdf) date: 2018-08-15 09:42:54
(epstopdf) size: 5318 bytes
(epstopdf) Output file: <smartphone-eps-converted-to.pdf>
(epstopdf) date: 2018-08-15 09:51:21
(epstopdf) size: 3698 bytes
(epstopdf) Command: <epstopdf --outfile=smartphone-eps-converted-to
.pdf smartphone.eps>
(epstopdf) \includegraphics on input line 8.
Package epstopdf Info: Output file is already uptodate.
<smartphone-eps-converted-to.pdf, id=1, 175.65625pt x 315.1775pt>
File: smartphone-eps-converted-to.pdf Graphic file (type pdf)
<use smartphone-eps-converted-to.pdf>
Package pdftex.def Info: smartphone-eps-converted-to.pdf used on input line 8.
(pdftex.def) Requested size: 175.6558pt x 315.17673pt.
! Missing $ inserted.
<inserted text>
$
l.9
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.


\raisebox{-0.5\height}{...}. Adjust the factor so that it fits. – Ulrike Fischer Aug 15 '18 at 08:46