LaTeX forum ⇒ Graphics, Figures & TablesInclusion of EPS Figures

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

Inclusion of EPS Figures

Postby peaches20 » Thu Oct 25, 2012 4:43 pm

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.

  1. \documentclass[12pt]{article}
  2.  
  3. \makeatletter\@addtoreset{equation}{section}
  4. \def\theequation{\thesection.\arabic{equation}}
  5.  
  6. \usepackage{graphicx}
  7. \usepackage{xcolor}
  8. \usepackage{amsmath}
  9. \usepackage{amsxtra}
  10. \usepackage{amssymb}
  11. \usepackage{amsfonts}
  12. \usepackage{mathrsfs}
  13. \usepackage{latexsym}
  14. \usepackage{bm}
  15. \usepackage{topcapt}
  16. \usepackage{booktabs}
  17. \usepackage{stmaryrd}
  18. \usepackage{hyperref}


and my input is

  1. \begin{figure}[h]
  2. \includegraphics[width=8cm]{schemagen.eps}
  3. \caption{Schemati}
  4. \label{Gen}
  5. \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.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).

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

Postby localghost » Thu Oct 25, 2012 4:52 pm

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.
  1. %\makeatletter
  2. %\@addtoreset{equation}{section}
  3. %\makeatother
  4. %\def\theequation{\thesection.\arabic{equation}}
  5. \numberwithin{equaton}{section} % provided by »amsmath«

Of course to be put after loading amsmath.


Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

peaches20
Posts: 9
Joined: Thu Oct 25, 2012 4:28 pm

Postby peaches20 » Thu Oct 25, 2012 5:23 pm

Hi,

below are my errors.

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

  1. This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit)
  2. entering extended mode
  3. ("C:\Users....."
  4. LaTeX2e <2011/06/27>
  5. Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
  6. abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
  7. croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
  8. lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
  9. ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
  10. vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
  11. an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
  12. romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
  13. sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
  14. senglishmax, welsh, loaded.
  15. ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
  16. Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
  17. ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
  18. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
  19. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
  20. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
  21. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
  22. ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
  23. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def")))
  24. ("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
  25. ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
  26. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"
  27. For additional information on amsmath, use the `?' option.
  28. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
  29. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))
  30. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")
  31. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))
  32. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsxtra.sty")
  33. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
  34. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
  35. ("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\mathrsfs.sty")
  36. ("C:\Program Files\MiKTeX 2.9\tex\latex\base\latexsym.sty")
  37. ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\bm.sty")
  38. ("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\topcapt.sty")
  39. ("C:\Program Files\MiKTeX 2.9\tex\latex\booktabs\booktabs.sty")
  40. ("C:\Program Files\MiKTeX 2.9\tex\latex\stmaryrd\stmaryrd.sty")
  41. ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
  42. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
  43. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
  44. ("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
  45. ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
  46. ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
  47. ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
  48. ("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\url.sty"))
  49.  
  50. Package hyperref Message: Driver (default): hdvips.
  51.  
  52. ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hdvips.def"
  53. ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pdfmark.def"
  54. ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty")))
  55. ("C:\Users ... .aux")
  56. ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
  57. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
  58. ("C:\Users ... .out")
  59. ("C:\Users ... .out") [1]
  60. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
  61. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")
  62. ("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\ursfs.fd")
  63. ("C:\Program Files\MiKTeX 2.9\tex\latex\base\ulasy.fd")
  64. ("C:\Program Files\MiKTeX 2.9\tex\latex\stmaryrd\ustmry.fd")
  65.  
  66. LaTeX Warning: No \author given.
  67.  
  68. [2] [3] [4] <sch.eps>
  69.  
  70. LaTeX Warning: `h' float specifier changed to `ht'.
  71.  
  72. [5]
  73. Overfull \hbox (5.26198pt too wide) in paragraph at lines 455--458
  74. \OT1/cmr/m/n/12 ma-tion of the ex-act in-com-press-ibil-ity con-straint, since
  75. $[] []([]) = [] []([]\OML/cmm/m/it/12 ; \OT1/cmr/m/n/12 0) +
  76. [6] [7] <DoubleWell2.eps> [8] <Sc.eps> [9] [10] [11] [12] <str.eps>
  77. <Dra.eps> <Thickness.eps> [13] [14] [15] [16] [17] [18] [19]
  78. Overfull \hbox (0.8735pt too wide) in paragraph at lines 855--860
  79. []\OT1/cmr/bx/n/12 Acknowledgements \OT1/cmr/m/n/12 G. grate-fully ac-kno
  80. wl-edges the
  81. [20] [21] [22] [23] [24]
  82. ("C:\Users....aux") )
  83. (see the transcript file for additional information)
  84. Output written on de.dvi (24 pages, 145048 bytes).
  85. SyncTeX written on de.synctex.
  86. Transcript written on de.log.

_____________________________________________________________________

LaTeX Compilation Report (Pages: 24)

Errors: 0 Warnings: 2 Bad Boxes: 2
_____________________________________________________________________
Attachments
de.log
(4.47 KiB) Downloaded 123 times

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

Postby localghost » Thu Oct 25, 2012 5:33 pm

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.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

peaches20
Posts: 9
Joined: Thu Oct 25, 2012 4:28 pm

Postby peaches20 » Thu Oct 25, 2012 8:17 pm

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

  1. MiKTeX Problem Report
  2. Message: Some PostScript specials could not be rendered.
  3. Data: Error: /undefined in H.S
  4. Operand stack:
  5. --nostringval-- PermitFileReading --nostringval-- PermitFileWriting --nostringval--
  6. Execution stack:
  7. %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--
  8. Dictionary stack:
  9. --dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)-- --dict:95/300(L)-- --dict:17/200(L)--
  10. Current allocation mode is local
  11. MiKTeX GPL Ghostscript 9.00: Unrecoverable error, exit code 1
  12.  
  13. Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp
  14. Line: 372
  15. MiKTeX: 2.9
  16. OS: Microsoft Windows 7 Enterprise Edition, 64-bit Service Pack 1 (build 7601)
  17. Invokers: explorer/WinEdt
  18. SystemAdmin: no
  19. PowerUser: no
  20. Root0: C:\Users\n\AppData\Roaming\MiKTeX\2.9
  21. Root1: C:\Users\n\AppData\Local\MiKTeX\2.9
  22. Root2: C:\ProgramData\MiKTeX\2.9
  23. Root3: C:\Program Files\MiKTeX 2.9
  24. UserInstall: C:\Users\n\AppData\Roaming\MiKTeX\2.9
  25. UserConfig: C:\Users\n\AppData\Roaming\MiKTeX\2.9
  26. UserData: C:\Users\n\AppData\Local\MiKTeX\2.9
  27. CommonInstall: C:\Program Files\MiKTeX 2.9
  28. CommonConfig: C:\ProgramData\MiKTeX\2.9
  29. 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.
Reason: added code markup

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

Postby Stefan Kottwitz » Thu Oct 25, 2012 8:44 pm

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
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 5 guests