Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Including eps in LaTeX file

  1. #11
    Join Date
    Jan 2007
    Beans
    Hidden!

    Question Including eps in LaTeX file revisited

    Hello. I thought I'd continue in the same thread with a related question on including eps figures in LaTex.

    I've recently moved from Windows MikTeX to TeXlive and I am using code that used to work there:

    \usepackage{epsf} %in preamble

    \begin{figure} %in body
    \begin{center}
    \epsfxsize=70mm
    \epsfbox{pb.eps}
    \end{center}
    \caption{Caption text}
    \end{figure}

    As I "latex document-name.tex" I get the following error:

    (pb.eps
    ! Could not open file pb.eps, ignoring it.
    \epsfgetbb ...Could not open file #1, ignoring it}
    \else {\chardef \other = 1...
    l.45 \epsfbox{pb.eps}

    The file pb.eps is of course in the same folder as document-name.tex and I can view it perfectly using the viewer.

    Any ideas why it cannot be opened?

    Thank you in advance. --LJM

  2. #12
    Join Date
    Oct 2006
    Beans
    24

    Re: Including eps in LaTeX file

    Sorry, can't help with the above, but maybe you should be using the graphics or graphicx packages instead of epsf. (I use \usepackage[dvips]{graphicx} for everything.
    epsf is very old now, and graphicx has many great options. Check out the document l2tabuen.pdf (google for it), which gives lists of "old" packages, and their suggested modern replacements.

    By the way, jpeg2ps is great for converting from jpg to .ps also.

  3. #13
    Join Date
    Jan 2007
    Beans
    Hidden!

    Problem solved yet puzzled

    Thanks for the hints. I had no idea the epsf package was dated. I replaced it with the graphicx one, as you said, and by compiling to dvi it worked alright. Thanks! (By the way, what does "[dvips]" do when you include the package? What if one doesn't add that option?)

    There's still something that puzzles me, though. As I make a pdf file from the dvi one using dvipdf at the terminal and then open it with Document Viewer, it will show the picture alright, but it says that the document's format is dvi--but it's not, it's pdf!

    What's going on?

  4. #14
    Join Date
    Nov 2005
    Location
    127.0.0.1
    Beans
    354
    Distro
    Ubuntu Development Release

    Re: Including eps in LaTeX file

    Quote Originally Posted by lwr View Post
    Thanks for that. All works well. The graphic seems to be of a lower quliaty in the pdf, but I guess that's something to do with it no longer being a PostScript file. Thanks again for all you help.

    Luke
    if you like a printout then print the ps file rather than the pdf. ps might look bad on the screen but good on paper.

    to generate diagrams, you can use openoffice draw, inkscape ....both can directly make eps.... matlab can generate eps too...but one word of advise...

    always save a copy of matlab plot - mygraph.fig from which you saved as mygraph.eps.

  5. #15
    Join Date
    Nov 2005
    Location
    127.0.0.1
    Beans
    354
    Distro
    Ubuntu Development Release

    Re: Problem solved yet puzzled

    Quote Originally Posted by LJM View Post
    Thanks for the hints. I had no idea the epsf package was dated. I replaced it with the graphicx one, as you said, and by compiling to dvi it worked alright. Thanks! (By the way, what does "[dvips]" do when you include the package? What if one doesn't add that option?)

    There's still something that puzzles me, though. As I make a pdf file from the dvi one using dvipdf at the terminal and then open it with Document Viewer, it will show the picture alright, but it says that the document's format is dvi--but it's not, it's pdf!

    What's going on?
    good. generally do not include the eps file extension when you call the figure while using graphicx package.

    try deleting the dvi before you open the pdf ???
    and may be include the extension while opening the pdf?
    just dumb questions

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •