Graphics, Figures & Tables ⇒ .JPG and .eps images in the same file.
.JPG and .eps images in the same file.
Hello guys,
I have problems including figures in my document. I found configuration that allowed me to make either .jpg or .eps work. But not the two formats at the same time.
I browsed the forum and I saw many suggestions and many solutions. I tried all of them without success. Now I am a bit confused.
I am using Texnic Centre 1.0 with MiKTeX 2.7
Can you suggest a valid configuration if existing?
Thanks
I have problems including figures in my document. I found configuration that allowed me to make either .jpg or .eps work. But not the two formats at the same time.
I browsed the forum and I saw many suggestions and many solutions. I tried all of them without success. Now I am a bit confused.
I am using Texnic Centre 1.0 with MiKTeX 2.7
Can you suggest a valid configuration if existing?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.

.JPG and .eps images in the same file.
Tell us specifically what you've tried and how it didn't work, or else, obviously, we'll just repeat the same unhelpful advice.feddozz wrote: I browsed the forum and I saw many suggestions and many solutions. I tried all of them without success. Now I am a bit confused.
Re: .JPG and .eps images in the same file.
I managed to obtain some improvements. I am almost there.
I use:
- Latex => pdf
- The following packages: \usepackage[pdftex]{graphicx} and \usepackage{epstopdf}
- --enable-write18 as a command line argument for the compiler.
Now I get all the figs in the .pdf. There is only one problem. The .eps get trimmed in the conversion and I lose a piece of the picture. I guess they get trimmed as big as an A4. Do you know how to fix it?
Now it should be more specific.
Thanks
I use:
- Latex => pdf
- The following packages: \usepackage[pdftex]{graphicx} and \usepackage{epstopdf}
- --enable-write18 as a command line argument for the compiler.
Now I get all the figs in the .pdf. There is only one problem. The .eps get trimmed in the conversion and I lose a piece of the picture. I guess they get trimmed as big as an A4. Do you know how to fix it?
Now it should be more specific.
Thanks
.JPG and .eps images in the same file.
Try scaling the image using the scale, and or width, height and keepaspect options to includegraphics, e.g.:
\includegraphics[scale=0.5]{myepsfile}
(makes it half size)
\includegraphics[width=4in,keepaspectratio]{myepsfile}
(makes it 4 inches wide, with whatever length then becomes appropriate to keep the aspect ratio)
Modify as needed.
\includegraphics[scale=0.5]{myepsfile}
(makes it half size)
\includegraphics[width=4in,keepaspectratio]{myepsfile}
(makes it 4 inches wide, with whatever length then becomes appropriate to keep the aspect ratio)
Modify as needed.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
.JPG and .eps images in the same file.
To me it seems that the bounding box of the conderned EPS files is the cause. Perhaps you can attach one of those problematic files to your next post. Then we would be able to do some tests.feddozz wrote:[…] Now I get all the figs in the .pdf. There is only one problem. The .eps get trimmed in the conversion and I lose a piece of the picture. I guess they get trimmed as big as an A4. Do you know how to fix it? […]
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: .JPG and .eps images in the same file.
Thanks for the help guys. I was already using scaling factors and so on but it doesn't work.
It seems to me that I should specify a non-fixed dimension for the pdf page. Is it possible to specify that somewhere?
Anyway I'm sending the files, if you can find a solution that would be really appreciated.
P.s. remember I am compiling using Latex=>pdf.
Thanks!
It seems to me that I should specify a non-fixed dimension for the pdf page. Is it possible to specify that somewhere?
Anyway I'm sending the files, if you can find a solution that would be really appreciated.
P.s. remember I am compiling using Latex=>pdf.
Thanks!
- Attachments
-
- abc.zip
- (4.89 KiB) Downloaded 226 times
Re: .JPG and .eps images in the same file.
Yeah, the .eps file itself extends beyonds its own dimensions. There might be a way around this with epstopdf.sty, but I didn't find its documentation useful... so I converted the .eps to a .pdf file without using the package, and made the appropriate changes to your file. See the attached bundle.
- Attachments
-
- abcd.zip
- (5.41 KiB) Downloaded 220 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
.JPG and .eps images in the same file.
I corrected the bounding box with a simple text editor and then converted to PDF with the epstopdf command line tool. The result is attached.
- Attachments
-
- A.pdf
- The submitted diagram corrected and converted.
- (21.31 KiB) Downloaded 316 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
.JPG and .eps images in the same file.
It's great. Obviously I am looking for a way of converting the .eps automatically.frabjous wrote:Yeah, the .eps file itself extends beyonds its own dimensions. There might be a way around this with epstopdf.sty, but I didn't find its documentation useful... so I converted the .eps to a .pdf file without using the package, and made the appropriate changes to your file. See the attached bundle.
Ok, I opened for the first time an eps with a text editor. I found the bounding box line. Again I am looking for an automatic pocess, otherwise I can convert from eps to jpg and solve all the probs, but that would be a long process. My eps are generated with gnuplot. Is there a way of correcting the prob from the source (I know this is not a gnoplot forum, but you know...since we are discussing about it...localghost wrote:I corrected the bounding box with a simple text editor and then converted to PDF with the epstopdf command line tool. The result is attached.

Thanks for the help guys!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
.JPG and .eps images in the same file.
You can convert the files "on the fly" with the epstopdf package.feddozz wrote:It's great. Obviously I am looking for a way of converting the .eps automatically. [...]
Usually GnuPlot sets the right bounding box. But I don't know which terminal you are using for the output. When I used it to get my data sets plotted, I set the terminal to postscript.feddozz wrote:[...] Ok, I opened for the first time an eps with a text editor. I found the bounding box line. Again I am looking for an automatic pocess, otherwise I can convert from eps to jpg and solve all the probs, but that would be a long process. My eps are generated with gnuplot. Is there a way of correcting the prob from the source (I know this is not a gnoplot forum, but you know...since we are discussing about it [...]
Code: Select all
set term post eps enhanced
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10