Graphics, Figures & TablesCannot create images

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

Cannot create images

Post by chairmanwow »

Hi,

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

Code: Select all

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath, amssymb, graphicx, setspace}
\begin{document}
\begin{figure}[hbtc]
\centering
\includegraphics{Fitness Landscape}
\caption{Fitness Landscape}
\end{figure}
\end{document}
This particular example generates:

Code: Select all

("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
)

! LaTeX Error: File `FitnessLandscape' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.27 \includegraphics{FitnessLandscape}
                                       
? 

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

Code: Select all

LaTeX Warning: Citation `Red Queen' on page 3 undefined on input line 39.


LaTeX Warning: Citation `Alice' on page 3 undefined on input line 40.


Underfull \hbox (badness 10000) in paragraph at lines 39--42


Underfull \hbox (badness 10000) in paragraph at lines 39--42

[3]

! LaTeX Error: File `Fitness Landscape' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.54 \includegraphics{Fitness Landscape}
                                        
? 

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.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Cannot create images

Post by Stefan Kottwitz »

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
LaTeX.org admin
chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Cannot create images

Post by chairmanwow »

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:

Code: Select all

! LaTeX Error: File `FitnessLandscape' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.54 \includegraphics{FitnessLandscape}
Last edited by cgnieder on Sat Dec 15, 2012 7:38 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Cannot create images

Post by Stefan Kottwitz »

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

Stefan
LaTeX.org admin
chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Re: Cannot create images

Post by chairmanwow »

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: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Cannot create images

Post by Stefan Kottwitz »

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
LaTeX.org admin
chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Re: Cannot create images

Post by chairmanwow »

I've moved the file to Documents, but still find the same issue.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Cannot create images

Post by Stefan Kottwitz »

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

Stefan
LaTeX.org admin
chairmanwow
Posts: 6
Joined: Sat Dec 15, 2012 6:15 pm

Cannot create images

Post by chairmanwow »

This is the simplified problem:

Code: Select all

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode
(C:/Users/User/Documents/untitled-4.tex
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\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\amsfonts\amssymb.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
("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\pdftex-def\pdftex.def"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty")
(C:\Users\User\Documents\untitled-4.aux)
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
)

! LaTeX Error: File `FitnessLandscape' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.8 \includegraphics{FitnessLandscape}
                                      
? 

And the full problem:

Code: Select all

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode
("C:/Users/User/Documents/Adaptive Dynamics.tex"
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\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\amsfonts\amssymb.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
("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\pdftex-def\pdftex.def"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\fancyhdr\fancyhdr.sty")
("C:\Users\User\Documents\Adaptive Dynamics.aux")
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd") [1{C:/ProgramData/Mi
KTeX/2.9/pdftex/config/pdftex.map}]

LaTeX Warning: Citation `AEP' on page 2 undefined on input line 21.


LaTeX Warning: Citation `TOE1' on page 2 undefined on input line 27.


LaTeX Warning: Citation `TOE2' on page 2 undefined on input line 27.


LaTeX Warning: Citation `Mendel' on page 2 undefined on input line 27.


LaTeX Warning: Citation `Bishop' on page 2 undefined on input line 27.


LaTeX Warning: Citation `Callender' on page 2 undefined on input line 27.


LaTeX Warning: Citation `PG1' on page 2 undefined on input line 29.


LaTeX Warning: Citation `PG3' on page 2 undefined on input line 29.


LaTeX Warning: Citation `PG2' on page 2 undefined on input line 29.


LaTeX Warning: Citation `QG1' on page 2 undefined on input line 29.


LaTeX Warning: Citation `QG2' on page 2 undefined on input line 29.


LaTeX Warning: Citation `EGT' on page 2 undefined on input line 29.


LaTeX Warning: Citation `ABM' on page 2 undefined on input line 29.


LaTeX Warning: Citation `CGT1' on page 2 undefined on input line 29.


LaTeX Warning: Citation `CGT2' on page 2 undefined on input line 29.


LaTeX Warning: Citation `CGT3' on page 2 undefined on input line 29.

[2]

LaTeX Warning: Citation `HH' on page 3 undefined on input line 33.


LaTeX Warning: Citation `Red Queen' on page 3 undefined on input line 39.


LaTeX Warning: Citation `Alice' on page 3 undefined on input line 40.


Underfull \hbox (badness 10000) in paragraph at lines 39--42


Underfull \hbox (badness 10000) in paragraph at lines 39--42

[3]

! LaTeX Error: File `FitnessLandscape' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.54 \includegraphics{FitnessLandscape}
                                       
?
Last edited by Stefan Kottwitz on Sat Dec 15, 2012 11:31 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Cannot create images

Post by Stefan Kottwitz »

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

Code: Select all

\includegraphics{FitnessLandscape.jpg}
Stefan
LaTeX.org admin
Post Reply