Graphics, Figures & TablesProblem to insert a picture with Miktex.

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
fabro5
Posts: 2
Joined: Fri Jun 25, 2010 3:51 pm

Problem to insert a picture with Miktex.

Post by fabro5 »

Hi,

I'm sorry to ask a so easy question but I really do not manage to fix my problem.
I'm trying since yesterday to insert a picture. Just that, it does not work.
Here is my code:


\documentclass[11pt]{article}
\usepackage{graphics} % needed for including graphics e.g. EPS, PS
\topmargin -1.5cm % read Lamport p.163
\oddsidemargin -0.04cm % read Lamport p.163
\evensidemargin -0.04cm % same as oddsidemargin but for left-hand pages
\textwidth 16.59cm
\textheight 21.94cm
%\pagestyle{empty} % Uncomment if don't want page numbers
\parskip 7.2pt % sets spacing between paragraphs
%\renewcommand{\baselinestretch}{1.5} % Uncomment for 1.5 spacing between lines
\parindent 0pt % sets leading space for paragraphs

\begin{document}


salut


\begin{figure}[!t]

\includegraphics{untitled.ps}
\end{figure}

\end{document}

and here is the error message:


This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
("C:/Documents and Settings/AFA/Desktop/Essai/esaai.tex"
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
("C:\Program Files\MiKTeX 2.8\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.8\tex\latex\base\size11.clo"))
("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\graphics.cfg")
("C:\Program Files\MiKTeX 2.8\tex\latex\pdftex-def\pdftex.def"))
("C:\Documents and Settings\AFA\Desktop\Essai\esaai.aux")
("C:\Program Files\MiKTeX 2.8\tex\context\base\supp-pdf.tex"
[Loading MPS to PDF converter (version 2006.09.02).]
)

! LaTeX Error: Unknown graphics extension: .ps.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.21 \includegraphics{untitled.ps}

?

If you have any idee, could you please help me?
I installed today ghostcript and ghostview but it doesn't change anything.

Thanks a lot

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Problem to insert a picture with Miktex.

Post by josephwright »

LaTeX only accepts EPS files as graphics, pdfLaTeX accepts PDF and PNG files. Usually, you should not include any extension:

Code: Select all

\includegraphics{some-file-name}
so if you have both an EPS and a PDF file then the EPS will be used by LaTeX and the PDF by pdfLaTeX. What you can't do is us a PostScript file: you'll need to convert to EPS.
Joseph Wright
fabro5
Posts: 2
Joined: Fri Jun 25, 2010 3:51 pm

Re: Problem to insert a picture with Miktex.

Post by fabro5 »

Thanks for your answer. It even does not work with a picture as a .pdf.

Could you please tell me what I need to do to compile with Latex and not with pdfLatex?
Because in my Miktex version I don't have in "Typeset" the possibility to chose "Latex"

Thnaks a lot
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Problem to insert a picture with Miktex.

Post by josephwright »

This depends on which editor you use: MiKTeX itself includes both LaTeX and pdfLaTeX. Common editors include TeXniccenter, WinEdt, Kile, TeXshop, ...
Joseph Wright
Post Reply