0

So I'm just trying to load an image into my document, and I know that the image has to be in the same path as my TeX file and it is, so I have no idea what's wrong with what I'm doing. I don't know if maybe it's my computer, my TeXstudio, or maybe some obvious error in my code, or something else. I'm aware that this question has been asked too many times, but no solution I found fixed my problem. This is the code that I have:

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document} 
\begin{figure}
\centering
\includegraphics{figure3.png}
\caption*{Stopping voltage as a function of frequency}
\end{figure}
\end{document}

I'm new at LaTeX by the way, so I don't know if I included everything, but I think I covered everything.

I'm trying to load the figure3.png into the experiment4.tex file, and unless I'm losing it, they're in the same folder. Also, when I hover my cursor over the line

\includegraphics{figure3.png}

It shows the image that I want to put into the document, so I know that it knows that the image exists.

Another thing, I copied and pasted code that worked from another file("document") and used the other file "atom", but now that doesn't work anymore either, so something obviously changed.

Any help would be appreciated, I'm pretty desperate at this point.

Edit: Posting the whole log file

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7200 64-bit) (preloaded format=pdflatex 2019.9.17)  14 DEC 2019 01:52
entering extended mode
**./texstudio_tUGAhy.tex
(texstudio_tUGAhy.tex
LaTeX2e <2018-12-01>
("D:\Program Files\MiKTeX\tex/latex/base\article.cls"
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class
("D:\Program Files\MiKTeX\tex/latex/base\size12.clo"
File: size12.clo 2019/08/27 v1.4j Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("D:\Program Files\MiKTeX\tex/latex/graphics\graphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)

("D:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
("D:\Program Files\MiKTeX\tex/latex/graphics\graphics.sty"
Package: graphics 2019/07/20 v1.3b Standard LaTeX Graphics (DPC,SPQR)

("D:\Program Files\MiKTeX\tex/latex/graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("D:\Program Files\MiKTeX\tex/latex/graphics-cfg\graphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.

("D:\Program Files\MiKTeX\tex/latex/graphics-def\pdftex.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(texstudio_tUGAhy.aux)
\openout1 = `texstudio_tUGAhy.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.

("D:\Program Files\MiKTeX\tex/context/base/mkii\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count88
\scratchdimen=\dimen105
\scratchbox=\box27
\nofMPsegments=\count89
\nofMParguments=\count90
\everyMPshowfont=\toks15
\MPscratchCnt=\count91
\MPscratchDim=\dimen106
\MPnumerator=\count92
\makeMPintoPDFobject=\count93
\everyMPtoPDFconversion=\toks16
) ("D:\Program Files\MiKTeX\tex/latex/oberdiek\epstopdf-base.sty"
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf

("D:\Program Files\MiKTeX\tex/generic/oberdiek\infwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("D:\Program Files\MiKTeX\tex/latex/oberdiek\grfext.sty"
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)

("D:\Program Files\MiKTeX\tex/generic/oberdiek\kvdefinekeys.sty"
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)

("D:\Program Files\MiKTeX\tex/generic/oberdiek\ltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)))
("D:\Program Files\MiKTeX\tex/latex/oberdiek\kvoptions.sty"
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)

("D:\Program Files\MiKTeX\tex/generic/oberdiek\kvsetkeys.sty"
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

("D:\Program Files\MiKTeX\tex/generic/oberdiek\etexcmds.sty"
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)

("D:\Program Files\MiKTeX\tex/generic/oberdiek\ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
))))
("D:\Program Files\MiKTeX\tex/latex/pdftexcmds\pdftexcmds.sty"
Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO
)

("D:\Program Files\MiKTeX\tex/generic/iftex\iftex.sty"
Package: iftex 2019/11/07 v1.0c TeX engine tests
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext)             [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 456.
)
! Undefined control sequence.
\Ginclude@graphics ...\Ginput@path \set@curr@file 
                                                  {#1}\edef \uq@curr@file {\...
l.6         \includegraphics{figure3.png}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\Ginclude@graphics ...e \expandafter {\@curr@file 
                                                  }}\expandafter \filename@p...
l.6         \includegraphics{figure3.png}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<recently read> \unquote@name 

l.6         \includegraphics{figure3.png}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<recently read> \quote@name 

l.6         \includegraphics{figure3.png}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<recently read> \quote@name 

l.6         \includegraphics{figure3.png}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: File `figure3.png' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.6         \includegraphics{figure3.png}

I could not locate the file with any of these extensions:
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2,.eps
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

[1{C:/Users/Amanda/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(texstudio_tUGAhy.aux) ) 
Here is how much of TeX's memory you used:
 1478 strings out of 492895
 20716 string characters out of 3137684
 81633 words of memory out of 3000000
 5399 multiletter control sequences out of 15000+200000
 3938 words of font info for 15 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 41i,4n,25p,285b,155s stack positions out of 5000i,500n,10000p,200000b,50000s
<D:/Program Files/MiKTeX/fonts/type1/public/amsfonts/cm
/cmr12.pfb>
Output written on texstudio_tUGAhy.pdf (1 page, 13527 bytes).
PDF statistics:
 10 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
  • 3
    What you posted here is obviously not your document because it doesn't have \documentclass, etc. so there is no way that can work. You have to include the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See minimal working example (MWE). – Henri Menke Dec 14 '19 at 6:11
  • 1
    Thank you, I'll edit my post and put that in, like I said, I'm new, so I'll take any corrections :) – astrocat1701 Dec 14 '19 at 6:15
  • 1
    Welcome to TeX.SE... What command you execute to run the TeX file? If you are using PDF or JPG or PNG images, then you should run PDFLaTeX, or XELaTeX or LuaLaTeX, etc... – MadyYuvi Dec 14 '19 at 6:18
  • I think it's PDFLaTeX, but I'm not sure how to check – astrocat1701 Dec 14 '19 at 6:21
  • 2
    Just wondering, why are the files you are working on under program files and not say your normal documents? Also please post the full log of wha you get when you compile this particular mwe (the contents of the generated log file not the "log" texstudio shows you) – daleif Dec 14 '19 at 6:37
1

Your miktex is not correctly updated.

Make sure to update your miktex in both miktex 6ser mode and in miktex admin mode (not related to Windows admin)

Several latex bundles are currently being reorganised and miktex often has issues with these reorganisations, so remember to always update miktex correctly.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.