LaTeX forum ⇒ Graphics, Figures & TablesWhat 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?

Postby HaLes297 » Sun Jul 01, 2018 11:30 am

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,

User avatar
Johannes_B
Site Moderator
Posts: 3790
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Jul 01, 2018 11:43 am

\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.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8946
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jul 01, 2018 12:09 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
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Baidu [Spider] and 7 guests