Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm sort of stumped on this one. I'm trying to include some graphics that I created with Stata in a document. I'm using pdfLaTeX and graphicx. When I try to compile, I get the error message:

ERROR: Text line contains an invalid character.

--- TeX said ---
l.1 ^^@
           ^^PJFIF^^@^^A^^A^^A^^A,^^A,^^@^^@^^@C^^@^^A^^A^^A^^A^^A^^A^^A^^..."

My file is very simple:

\documentclass{article}
\usepackage{graphicx}
\usepackage{graphicx}
\begin{document}

\input{jpeg/math.eps.jpeg}
\end{document}

I've tried using EPS, JPEG and PDF with the pdftex option for graphicx.

Any ideas?

share|improve this question
3  
Use \includegraphics{...}, not \input{..}. And also remove the dot between math and eps in the file name. –  Ulrike Fischer Mar 20 '12 at 15:18
    
I knew I was doing something stupid. Thank you. The dot I think is ok because that's the file name. –  PaulB Mar 20 '12 at 15:19
    
nope, you were right - it doesn't like the .eps.jpeg file name. –  PaulB Mar 20 '12 at 15:21
    
Why are you calling graphicx twice? Also, with an up-to-date system, you usually don't need to include a pdftex option or the like; I think there might actually be reasons not to do it. –  doncherry Mar 20 '12 at 16:44
    
It is useful to read the package documentation (or at least open it). You can find the documentation file at the web address ctan.org/pkg/<package_name> so for graphicx it is ctan.org/pkg/graphicx –  tohecz Mar 21 '12 at 0:13

1 Answer 1

As Ulrike Fisher points out in comments: Use \includegraphics{...}, not \input{..}. And also remove the dot between math and eps in the file name.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.