Graphics, Figures & TablesInclusion of EPS Figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
peaches20
Posts: 9
Joined: Thu Oct 25, 2012 4:28 pm

Inclusion of EPS Figures

Post by peaches20 »

Hi,

I have a paper that has a number of EPS files and am having trouble running them on windows. I have MiKTeX 2.9. My sample code is like this.

Code: Select all

\documentclass[12pt]{article}      

\makeatletter\@addtoreset{equation}{section}
\def\theequation{\thesection.\arabic{equation}}

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amsxtra}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{bm}
\usepackage{topcapt}
\usepackage{booktabs}
\usepackage{stmaryrd}
\usepackage{hyperref}
and my input is

Code: Select all

\begin{figure}[h]
\includegraphics[width=8cm]{schemagen.eps}
\caption{Schemati}
\label{Gen}
\end{figure}
Any advice is welcome.

Thanks,

Peaches
Last edited by localghost on Thu Oct 25, 2012 5:53 pm, edited 2 times in total.

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inclusion of EPS Figures

Post by localghost »

You should specify this trouble. Are there any warnings or error messages? Note that EPS files are only accepted by LaTeX and XeLaTeX, not by PDFLaTeX. If you want to compile with the PDFTeX typesetting engine, you will need to convert the files to PDF. For conversion of those files "on the fly" load the epstopdf package and obey the instructions in its manual. As far as I know it will need Ghostscript installed. More specific solutions can be found by a Forum Search.

By the way, there is a much smarter method to get equations numbered by sections in the article class.

Code: Select all

%\makeatletter
%\@addtoreset{equation}{section}
%\makeatother
%\def\theequation{\thesection.\arabic{equation}}
\numberwithin{equaton}{section}   % provided by »amsmath«
Of course to be put after loading amsmath.


Best regards and welcome to the board
Thorsten
peaches20
Posts: 9
Joined: Thu Oct 25, 2012 4:28 pm

Inclusion of EPS Figures

Post by peaches20 »

Hi,

below are my errors.

Command Line: latex.exe --src --interaction=errorstopmode --synctex=-1 "deseri.tex"
Startup Folder: C:\Users

Code: Select all

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit)
entering extended mode
("C:\Users....."
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def")))
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsxtra.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\mathrsfs.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\base\latexsym.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\tools\bm.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\topcapt.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\booktabs\booktabs.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\stmaryrd\stmaryrd.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\url.sty"))

Package hyperref Message: Driver (default): hdvips.

("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hdvips.def"
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pdfmark.def"
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty")))
("C:\Users ... .aux")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
("C:\Users ... .out")
("C:\Users ... .out") [1]
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\ursfs.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ulasy.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\stmaryrd\ustmry.fd")

LaTeX Warning: No \author given.

[2] [3] [4] <sch.eps>

LaTeX Warning: `h' float specifier changed to `ht'.

[5]
Overfull \hbox (5.26198pt too wide) in paragraph at lines 455--458
\OT1/cmr/m/n/12 ma-tion of the ex-act in-com-press-ibil-ity con-straint, since 
$[] []([]) = [] []([]\OML/cmm/m/it/12 ; \OT1/cmr/m/n/12 0) +
[6] [7] <DoubleWell2.eps> [8] <Sc.eps> [9] [10] [11] [12] <str.eps>
<Dra.eps> <Thickness.eps> [13] [14] [15] [16] [17] [18] [19]
Overfull \hbox (0.8735pt too wide) in paragraph at lines 855--860
[]\OT1/cmr/bx/n/12 Acknowledgements \OT1/cmr/m/n/12 G. grate-fully ac-kno
wl-edges the 
[20] [21] [22] [23] [24]
("C:\Users....aux") )
(see the transcript file for additional information)
Output written on de.dvi (24 pages, 145048 bytes).
SyncTeX written on de.synctex.
Transcript written on de.log.
_____________________________________________________________________

LaTeX Compilation Report (Pages: 24)

Errors: 0 Warnings: 2 Bad Boxes: 2
_____________________________________________________________________
Attachments
de.log
(4.47 KiB) Downloaded 256 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inclusion of EPS Figures

Post by localghost »

peaches20 wrote:[…] below are my errors. […]
There are no errors, just warnings (and bad boxes). At the moment we have no appropriate description of the problem. Not to mention a proper minimal example. What is wrong with the output? At least the log file does not show any irregularities.
peaches20
Posts: 9
Joined: Thu Oct 25, 2012 4:28 pm

Inclusion of EPS Figures

Post by peaches20 »

I've gotten to the next step but am now encountering

Code: Select all

MiKTeX Problem Report
Message: Some PostScript specials could not be rendered.
Data: Error: /undefined in H.S
Operand stack:
   --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1914   1   3   %oparray_pop   1913   1   3   %oparray_pop   1897   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:95/300(L)--   --dict:17/200(L)--
Current allocation mode is local
MiKTeX GPL Ghostscript  9.00: Unrecoverable error, exit code 1

Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp
Line: 372
MiKTeX: 2.9
OS: Microsoft Windows 7 Enterprise Edition, 64-bit Service Pack 1 (build 7601)
Invokers: explorer/WinEdt
SystemAdmin: no
PowerUser: no
Root0: C:\Users\n\AppData\Roaming\MiKTeX\2.9
Root1: C:\Users\n\AppData\Local\MiKTeX\2.9
Root2: C:\ProgramData\MiKTeX\2.9
Root3: C:\Program Files\MiKTeX 2.9
UserInstall: C:\Users\n\AppData\Roaming\MiKTeX\2.9
UserConfig: C:\Users\n\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\n\AppData\Local\MiKTeX\2.9
CommonInstall: C:\Program Files\MiKTeX 2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9
CommonData: C:\ProgramData\MiKTeX\2.9
Any help appreciated.

Thanks,

Peaches
Last edited by cgnieder on Thu Oct 25, 2012 9:34 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Inclusion of EPS Figures

Post by Stefan Kottwitz »

Seeing the last error I guess the DVI viewer has problems with rendering PostScript. Though the DVI viewer can display some PostScript, it's not his job, so it can fail rendering . Use a PostScript viewer, such as gsview, or convert to PDF via dvips and ps2pdf (for example) and open the PDF output.

Stefan
LaTeX.org admin
Post Reply