Efficiently Including PS and JPG Files in Latex: A How-To Guide

  • Context: LaTeX 
  • Thread starter Thread starter ed2288
  • Start date Start date
  • Tags Tags
    files Latex
Click For Summary

Discussion Overview

The discussion revolves around the inclusion of both .ps (PostScript) and .jpg (JPEG) files in LaTeX documents. Participants explore methods to avoid pixelation issues when converting images and seek solutions for error messages related to bounding boxes when attempting to include .jpg files directly.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses frustration with having to convert .jpg files to .ps format, resulting in pixelated images, and asks for a method to include both file types in the same LaTeX document.
  • Another participant suggests that the issue may stem from the use of the \include function, noting that .ps files are treated differently than .jpg files in LaTeX.
  • A third participant recommends using a program called ebb to extract bounding boxes, providing links for both Unix and Windows users.
  • A later reply indicates that converting .jpgs to .eps format has helped resolve similar issues, although the quality is not perfect.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best method to include both file types, and multiple approaches are discussed without resolving the underlying issues.

Contextual Notes

Some participants mention specific tools and packages, such as \usepackage{graphicx}, but the discussion does not clarify all assumptions or dependencies related to the methods proposed.

Who May Find This Useful

Users looking to include various image formats in LaTeX documents, particularly those encountering issues with bounding boxes or image quality.

ed2288
Messages
24
Reaction score
0
Hi everyone,

I was wondering if someone could clarify how to put both .ps and .jpg files in the same latex file.

At the minute I'm having to convert all my .jpgs to .ps using photoshop then compiling my latex file by going Latex->PS->PDF. However all my converted jpgs look all pixelated and frankly pretty rubbish.

*Surely* there must be a way to include both .jpgs and .ps files, people need to do this all the time.

When I try to include jpgs I get error messages saying no Bounding Box. Can anyone help me out?

Thanks
 
Physics news on Phys.org
When you say "include both .jpgs and .ps files" does that mean that you're actually using the \include function? If so, there's your problem: ps is postscript, which LaTeX will include in your actual document (it just so happens that your .ps codes for an image, so things happily chug along).

If so, take a look at some of the examples here:
http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics#Images_as_Figures

Don't forget to \usepackage{graphicx}!

If not, well, I've never run into that particular problem before--can you post the offending code?
 
Just want to post a quick thankyou to contributors in this thread. I've been having problems importing gifs into a pdf via latex and you have fixed my problem(s). I'm just converting jpgs to eps's and following what ed2288 and matlabdude suggest. The resultant image isn't perfect but is fit for purpose. Thanks.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
43K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 14 ·
Replies
14
Views
10K
  • · Replies 27 ·
Replies
27
Views
6K
  • · Replies 3 ·
Replies
3
Views
13K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K