General ⇒ inserting JPEG image in MIKTEX
inserting JPEG image in MIKTEX
Here is my latex file commands
\documentclass{article}
\usepackage[pdftex]{graphicx}
\begin{document}
My Dog Krishna
\begin{figure}
\begin{center}
\includegraphics[scale=0.40]{C:/Documents and Settings/KRISHNA/My Documents/My Pictures/DSCN3118.JPG}
\end{center}
\end{figure}
\end{document}
when i do this I get only part of the figure. As you can see I have decreased the scale of the image to 40% to fit the page.
I have attached the zipped version of the pdf generated using MikteX (The pdf itself was larger than 256kb so cant attach it as it is)
Also the document shows the location of the image. how do i get rid of that.
what am I doing wrong?
- Attachments
-
- figure template.rar
- (253.51 KiB) Downloaded 811 times
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
inserting JPEG image in MIKTEX
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
inserting JPEG image in MIKTEX
I tried avoiding the blank spaces in the file path. i just changed the path fromlocalghost wrote:Avoid blank spaces in both the name and the path of file. You can omit the pdftex driver option for the graphicx package (not related to the problem).
Best regards
Thorsten¹
\includegraphics[scale=0.5]{C:/Documents and Settings/KRISHNA/My Documents/My Pictures/krishna/Krishna.JPG}
to
\includegraphics[scale=0.5]{C:/DocumentsandSettings/KRISHNA/MyDocuments/MyPictures/krishna/Krishna.JPG}
and now latex is not recognizing the location of the file. Is there a way to do it.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: inserting JPEG image in MIKTEX
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
inserting JPEG image in MIKTEX
I just want to annotate you may use \centering inside the figure environment instead of \begin{center} ... \end{center}. The latter may cause unwanted vertical space before and after.
Btw. you can read in the graphicx manual about inclusion of images.
Stefan
inserting JPEG image in MIKTEX
stefanStefan_K wrote:Hi rajaijah,
I just want to annotate you may use \centering inside the figure environment instead of \begin{center} ... \end{center}. The latter may cause unwanted vertical space before and after.
Btw. you can read in the graphicx manual about inclusion of images.
Stefan
the pdf file abt graphics solved my problem. I needed to include
\graphicspath
and specify the location in preamble
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
inserting JPEG image in MIKTEX
Why this command should not be used can be read in l2tabu.rajaijah wrote:the pdf file abt graphics solved my problem. I needed to include
\graphicspath
and specify the location in preamble
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10