|
|
Can I include a JPEG (jpg) graphic file directly into TeX or LaTeX? | |||
| [Answer Title and Options] | [Edit Answer Permissions] | |||
| [Duplicate Answer] | [Move Answer] | [Trash Answer] | [Convert to Category] | |
| [Insert Text Here] | [Insert Uploaded Text Here] | |||
| [Edit This Text] | If you want it to be portable, probably not. So you can either convert it
to encapsulated postscript (eps) using a graphics program like Gimp, or use a program called jpeg2ps, which puts
an eps wrapper on the jpeg file. This means you can treat it like a postscript
file (as long as you have at least postscript 2, which is pretty much everywhere
these days). So this is essentially like putting it directly in.
The source code (it's in C) for jpeg2ps is available from http://www.pdflib.com/jpeg2ps/.
Here is a Linux executable
(right-click on the link and save it to a file called jpeg2ps):
</~ntg/download/jpeg2ps> (of version 1.8; check the link above for updates). To create file.eps from file.jpg, the command is: jpeg2ps -o file.eps file.jpgor jpeg2ps file.jpg > file.eps 2002-Apr-02 8:19am furnstahl.1@osu.edu | |||
| [Duplicate This Text] | ||||
| [Remove This Text] | ||||
| [Upload New Bag Here] | ||||
| [Insert Text Here] | [Insert Uploaded Text Here] | |||
| [Edit This Text] | You can find out the options to jpeg2ps by just typing it with no arguments:
jpeg2psand you'll get a list of options. I find the -a (auto rotate) option to be very useful. It automatically switches to landscape mode if the jpeg width is greater than the height. If the picture is too big to fit on a page, it will scale it appropriately. 2002-Apr-02 8:17am furnstahl.1@osu.edu | |||
| [Duplicate This Text] | ||||
| [Remove This Text] | ||||
| [Upload New Bag Here] | ||||
| [Insert Text Here] | [Insert Uploaded Text Here] | |||
| [Append to This Answer] | ||||
| 2002-Apr-02 8:19am | ||||
| Previous: |
|
| Next: |
|
| ||||||||||