LateX : cannot display any figures

Discussion in 'Mac Programming' started by OneDreamCloser, Apr 17, 2010.

  1. OneDreamCloser macrumors member

    Joined:
    Jun 16, 2008
    #1
    hello all,

    i am writing my thesis in latex, but i cannot display any figures.

    attached is a .zip file containing a master latex document (thesis.tex),
    if you open, for example, the Appendix.tex file and UNcomment line14,
    and run the script that i have made, named [typeset],
    you will see what i mean ...

    i would appreciate any help from you, because time is pressing me very much,
    thank you.
     

    Attached Files:

    • TeX.zip
      File size:
      918.4 KB
      Views:
      78
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    Just post the headers of your document here and/or answer the following questions:
    -Are you using the graphics/graphicsx packages?
    -Are the image files in .eps format?
    -Are the images in the same directory as your .tex file?
     
  3. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
    #3
    PACKAGES:
    \usepackage{graphicx}
    \usepackage{wrapfig}
    \usepackage{color}

    \usepackage{epsfig}
    \usepackage[T1]{fontenc}
    \usepackage{float}
    \usepackage{amsthm}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{algorithm}
    \usepackage{algorithmic}

    \floatplacement{figure}{H}
    \floatplacement{table}{H}

    FORMAT:
    yes, it is .eps files located in subdirectory _img

    COMMAND:
    \begin{figure}
    \centering
    \includegraphics{_img/mem_arch.eps}
    \caption{Internal architecture of a typical memory.}
    \label{img:mem_arch}
    \end{figure}
    \noindent

    thanx for your interest
     
  4. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #4
    I don't think that's the right path. Try something like

    Code:
    \includegraphics{~/_img/mem_arch.eps}
    or

    Code:
    \includegraphics{~/Desktop/_img/mem_arch.eps}
    ...or better yet just put the .tex file and the eps image in the same directory. That'll make your life a lot easier.
     
  5. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
    #5
    i have already tried both recommendations before, but no luck.
     
  6. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #6
    Ok, I typeset your document on my machine and the smaller images work fine. Are you sure that they'll fit on the page? Try something like
    Code:
    \includegraphics[width=0.5\textwidth]{_img/image.eps}
    edit: oops, never mind. I hadn't un-commented the necessary lines :p Will look at this later.
     
  7. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
  8. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #8
    One thing you should try is to typeset each document separately (you'll need to put the necessary \includes statements) to see if the problem is localized.
     
  9. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
  10. JoshDC macrumors regular

    Joined:
    Apr 8, 2009
    #10
    Try using the epstopdf package. Your problem (at least as it seems for me) is that it doesn't like eps files. Adding this package fixes it for me.
     
  11. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
    #11
    thank you for the tip,
    the preamble now contains has "\usepackage{epstopdf}"
    but, did you used also anything different such as \DeclareGraphics{...}
    or did you change the \includegraphics command at all,
    it seems i am not able to make it display ...

    thanx

    PS. did you manage to display the figure A.1 ?
     
  12. JoshDC macrumors regular

    Joined:
    Apr 8, 2009
    #12
    Apologies, epstopdf requires pdf(la)tex to work. If you have pdflatex (I guess you do) you can replace all occurrences of latex with pdflatex in your makefile. Even then it seems to have trouble with your traffic_model.eps image for some reason. I would recommend using pdf files instead of eps files.
     
  13. OneDreamCloser thread starter macrumors member

    Joined:
    Jun 16, 2008
    #13
    i figure out the problem eventually,
    some .eps files do not have a specified BoundingBox,
    that why they do not appear at all whatever the format is.

    now, the question is;
    how do i create a BoundingBox in a .eps file ?
     
  14. vocaro macrumors regular

    Joined:
    Mar 5, 2004
    #14
    Do you have to use EPS figures? Why not convert them to PDF and use pdflatex? It's so much easier...
     

Share This Page