LaTeX forum ⇒ Graphics, Figures & TablesCannot create images Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Cannot create images

Postby chairmanwow » Sat Dec 15, 2012 6:31 pm

Hi,

I'm having real trouble in creating any images using LaTeX. My current issue is with the following example:

  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage{amsmath, amssymb, graphicx, setspace}
  3. \begin{document}
  4. \begin{figure}[hbtc]
  5. \centering
  6. \includegraphics{Fitness Landscape}
  7. \caption{Fitness Landscape}
  8. \end{figure}
  9. \end{document}


This particular example generates:

  1. ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
  2. [Loading MPS to PDF converter (version 2006.09.02).]
  3. )
  4.  
  5. ! LaTeX Error: File `FitnessLandscape' not found.
  6.  
  7. See the LaTeX manual or LaTeX Companion for explanation.
  8. Type H <return> for immediate help.
  9. ...
  10.  
  11. l.27 \includegraphics{FitnessLandscape}
  12.  
  13. ?



The image in question is in .eps from .jpg. In the entire document, I encounter further difficulties:

  1. LaTeX Warning: Citation `Red Queen' on page 3 undefined on input line 39.
  2.  
  3.  
  4. LaTeX Warning: Citation `Alice' on page 3 undefined on input line 40.
  5.  
  6.  
  7. Underfull \hbox (badness 10000) in paragraph at lines 39--42
  8.  
  9.  
  10. Underfull \hbox (badness 10000) in paragraph at lines 39--42
  11.  
  12. [3]
  13.  
  14. ! LaTeX Error: File `Fitness Landscape' not found.
  15.  
  16. See the LaTeX manual or LaTeX Companion for explanation.
  17. Type H <return> for immediate help.
  18. ...
  19.  
  20. l.54 \includegraphics{Fitness Landscape}
  21.  
  22. ?



Plus a load more similar citation error lines upwards.

I hope someone can help with my problem!

Thank you.
Last edited by Stefan Kottwitz on Sat Dec 15, 2012 6:35 pm, edited 1 time in total.
Reason: code marked

Tags:

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

Postby Stefan Kottwitz » Sat Dec 15, 2012 6:36 pm

Hi,

welcome to the board!

Compare your source code and the error message, there's a difference: the space in the file name is lost. Simply don't use spaces in file names to avoid such issues. Or load the package grffile, which can fix it, if you really need it.

Stefan
Site admin

chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Postby chairmanwow » Sat Dec 15, 2012 6:57 pm

Thanks for your reply.

I had corrected the space issue in simplifying the issue, but must have missed it in looking back at the original problem.

Having corrected this, I now obtain:

  1. ! LaTeX Error: File `FitnessLandscape' not found.
  2.  
  3. See the LaTeX manual or LaTeX Companion for explanation.
  4. Type H <return> for immediate help.
  5. ...
  6.  
  7. l.54 \includegraphics{FitnessLandscape}
Last edited by cgnieder on Sat Dec 15, 2012 7:38 pm, edited 1 time in total.
Reason: added code markup

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

Postby Stefan Kottwitz » Sat Dec 15, 2012 7:06 pm

Where is your image? Just put it into the same directory.

Stefan
Site admin

chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Postby chairmanwow » Sat Dec 15, 2012 7:15 pm

It is currently .esp in Downloads, though I don't have a program to open it. Do I need to move it somewhere else?

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

Postby Stefan Kottwitz » Sat Dec 15, 2012 7:22 pm

LaTeX needs to "find" it. The easiest way is to put it just into the same directory as your main document. LaTeX doesn't look in "Downloads" by default, but in the document folder, in path you specify and in the TeX directory structure.

Stefan
Site admin

chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Postby chairmanwow » Sat Dec 15, 2012 7:33 pm

I've moved the file to Documents, but still find the same issue.

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

Postby Stefan Kottwitz » Sat Dec 15, 2012 8:43 pm

Perhaps post your .log file as attachment here, the information in it might help.

Stefan
Site admin

chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Postby chairmanwow » Sat Dec 15, 2012 10:39 pm

This is the simplified problem:


  1. This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
  2. entering extended mode
  3. (C:/Users/User/Documents/untitled-4.tex
  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\ams\math\amsmath.sty"
  19. For additional information on amsmath, use the `?' option.
  20. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
  21. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))
  22. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")
  23. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))
  24. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
  25. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
  26. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
  27. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
  28. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
  29. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
  30. ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
  31. ("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
  32. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
  33. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
  34. ("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty")
  35. (C:\Users\User\Documents\untitled-4.aux)
  36. ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
  37. [Loading MPS to PDF converter (version 2006.09.02).]
  38. )
  39.  
  40. ! LaTeX Error: File `FitnessLandscape' not found.
  41.  
  42. See the LaTeX manual or LaTeX Companion for explanation.
  43. Type H <return> for immediate help.
  44. ...
  45.  
  46. l.8 \includegraphics{FitnessLandscape}
  47.  
  48. ?



And the full problem:


  1. This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
  2. entering extended mode
  3. ("C:/Users/User/Documents/Adaptive Dynamics.tex"
  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\ams\math\amsmath.sty"
  19. For additional information on amsmath, use the `?' option.
  20. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
  21. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))
  22. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")
  23. ("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))
  24. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
  25. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
  26. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
  27. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
  28. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
  29. ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
  30. ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
  31. ("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
  32. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
  33. ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
  34. ("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty")
  35. ("C:\Program Files\MiKTeX 2.9\tex\latex\fancyhdr\fancyhdr.sty")
  36. ("C:\Users\User\Documents\Adaptive Dynamics.aux")
  37. ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
  38. [Loading MPS to PDF converter (version 2006.09.02).]
  39. ) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
  40. ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd") [1{C:/ProgramData/Mi
  41. KTeX/2.9/pdftex/config/pdftex.map}]
  42.  
  43. LaTeX Warning: Citation `AEP' on page 2 undefined on input line 21.
  44.  
  45.  
  46. LaTeX Warning: Citation `TOE1' on page 2 undefined on input line 27.
  47.  
  48.  
  49. LaTeX Warning: Citation `TOE2' on page 2 undefined on input line 27.
  50.  
  51.  
  52. LaTeX Warning: Citation `Mendel' on page 2 undefined on input line 27.
  53.  
  54.  
  55. LaTeX Warning: Citation `Bishop' on page 2 undefined on input line 27.
  56.  
  57.  
  58. LaTeX Warning: Citation `Callender' on page 2 undefined on input line 27.
  59.  
  60.  
  61. LaTeX Warning: Citation `PG1' on page 2 undefined on input line 29.
  62.  
  63.  
  64. LaTeX Warning: Citation `PG3' on page 2 undefined on input line 29.
  65.  
  66.  
  67. LaTeX Warning: Citation `PG2' on page 2 undefined on input line 29.
  68.  
  69.  
  70. LaTeX Warning: Citation `QG1' on page 2 undefined on input line 29.
  71.  
  72.  
  73. LaTeX Warning: Citation `QG2' on page 2 undefined on input line 29.
  74.  
  75.  
  76. LaTeX Warning: Citation `EGT' on page 2 undefined on input line 29.
  77.  
  78.  
  79. LaTeX Warning: Citation `ABM' on page 2 undefined on input line 29.
  80.  
  81.  
  82. LaTeX Warning: Citation `CGT1' on page 2 undefined on input line 29.
  83.  
  84.  
  85. LaTeX Warning: Citation `CGT2' on page 2 undefined on input line 29.
  86.  
  87.  
  88. LaTeX Warning: Citation `CGT3' on page 2 undefined on input line 29.
  89.  
  90. [2]
  91.  
  92. LaTeX Warning: Citation `HH' on page 3 undefined on input line 33.
  93.  
  94.  
  95. LaTeX Warning: Citation `Red Queen' on page 3 undefined on input line 39.
  96.  
  97.  
  98. LaTeX Warning: Citation `Alice' on page 3 undefined on input line 40.
  99.  
  100.  
  101. Underfull \hbox (badness 10000) in paragraph at lines 39--42
  102.  
  103.  
  104. Underfull \hbox (badness 10000) in paragraph at lines 39--42
  105.  
  106. [3]
  107.  
  108. ! LaTeX Error: File `FitnessLandscape' not found.
  109.  
  110. See the LaTeX manual or LaTeX Companion for explanation.
  111. Type H <return> for immediate help.
  112. ...
  113.  
  114. l.54 \includegraphics{FitnessLandscape}
  115.  
  116. ?
Last edited by Stefan Kottwitz on Sat Dec 15, 2012 11:31 pm, edited 1 time in total.
Reason: log file marked as code

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

Postby Stefan Kottwitz » Sat Dec 15, 2012 10:45 pm

Logfiles are better posted as attachment, and code in code blocks, for better readability. Please think of this in further posts.

Usually LaTeX should find the image without file name extension. But you could try

  1. \includegraphics{FitnessLandscape.jpg}


Stefan
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests