## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ What am I doing wrong. I thought .eps was a valid graphics extension?

Information and discussion about graphics, figures & tables in LaTeX documents.
HaLes297
Posts: 1
Joined: Sun Jul 01, 2018 8:55 am

### What am I doing wrong. I thought .eps was a valid graphics extension?

Hello,

I am getting invalid graphics extension when trying to use \centerline{\includegraphics[height=2.8in]{2D3D.eps}}

I have this at the front of the document:

\documentclass[12pt, doublespace]{article}
\usepackage{graphicx}

What am I doing wrong. I thought .eps was a valid graphics extension?

Thanks,

Johannes_B
Site Moderator
Posts: 3790
Joined: Thu Nov 01, 2012 4:08 pm
`\centerline` is not valid LaTeX. Use either `\centering` or the `center` environment.

Omit the file extension and only give the base name. LaTeX will figure out the rest.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8945
Joined: Mon Mar 10, 2008 9:44 pm
.eps is valid with LaTeX in DVI mode. With pdfLaTeX (PDF mode) only .png, .jpg and .pdf are valid.

So compile with LaTeX instead of pdfLaTeX. That gives a DVI file, that can be converted to PDF (via dvips and ps2pdf or dvipdfmx, for example, a LaTeX editor can have a profile for this).

Stefan