Graphics, Figures & Tables ⇒ Importing pictures/graphics
Importing pictures/graphics
I am having problems importing pictures to my Latex document. What confuses me is that I managed to import the first picture saved in a folder called "images" but for the second one I get the following message:
LaTeX error: File '2' not found.
How is it possible that using the same set of commands:
\begin{figure}
\centering
\includegraphics[width=1\textwidth]{1}
\caption{The pairs uniquely determine the transformation.}
\label{fig:1}
\end{figure}
with 2 instead of 1 (the names of the pdf documents imported)
works for 1 but does not work for 2. They are located in the same folder and the path has been shown at the beginning of the document:
\graphicspath{C:/Users/User/Desktop/LaTex/LaTexdoc/images}
Your advices will be highly appreciated. Thank you!!
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
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Importing pictures/graphics
This is wrong. The manual explains:florin wrote: \graphicspath{C:/Users/User/Desktop/LaTex/LaTexdoc/images}
I've made the relevant sentence, you've missed, bold. So a correct setting would could be, e.g.,\graphicspath{〈dir-list〉}
This optional declaration may be used to specify a list of directories in which to search for graphics files. The format is the same as for the LaTeX2ε primitive\input@path
. A list of directories, each in a{}
group (even if there is only onein the list). For example:would cause the system to look in the subdirectoriesCode: Select all
\graphicspath{{eps/}{tiff/}}
eps
andtiff
of the current directory. (All modern TeX systems use/
as the directory separator, even on Windows.)
Code: Select all
\graphicspath{{C:/Users/User/Desktop/LaTex/LaTexdoc/images}}
BTW: Please always try to show a

Code
button in the toolbar or selecting TeX (LaTeX)
from the Select code
selector.