# Documentation of GraphicP

Szabo Peter

<pts@fazekas.hu>

###### Abstract

This is the documentation of GraphicP, a system that provides an easy, fast and reliable method for including external images into LaTeX and plain TeX documents. The \includegraphics macro of GraphicP is a drop-in replacement of the same command of LaTeX graphics.sty and graphicx.sty, but with many enhancements. Input images are usually in EPS or PDF format. Drivers for xdvi, dvips, pdftex and divpdm are included. Perl scripts are provided for faster bounding box manipulations.

## 1 Availability and usage

You can download GraphicP from [http://www.inf.bme.hu/~pts/graphicp-latest.tar.gz](http://www.inf.bme.hu/~pts/graphicp-latest.tar.gz).

Load GraphicP with usepackage{graphicp} instead of \usepackage{graphicx}. Use the \includegraphics macro as usual, but beware of the differences.

## 2 Quick feature list

Features over LaTeX \usepackage{graphicx}:

* both plain TeX and LaTeX support
* specified width=... and height=... are strictly enforced, without rounding
* image scaling calculations are much more accurate
* works with _dvips -E_ bounding-box calculations, even with buggy dvips 5.86e
* doesn't have to open the.eps file for reading the bbox
* xdvi doesn't forcibly crop (clip) the image to the bbox
* Below feature: allows the image descend below the baseline (supports depth, not only width and height)
* drop dependency on Perl, parse Adobe DSC comments in EPS files
* non-standard, quick, DSC-like parsing for special PDF files
* an enhanced epstopdf utility
* the img_bbox.pl utility
* the pdfbboxes.pl utility
* voluntary clipping (cropping)
* all 8 mirror and rotate transformation (must be a multipe of 90 degrees)
* does not rely on the filename to determine the FileFormat
* embeds each image file only once with pdfteX and divpdm
* [long term plan] imtrix: unified PSTricks/PSFrag support for EPS and PDFFurther reading

The full documentation hasn't been written yet. See the file graphiccp.sty for more information.

To see samples, try the following compilation procedures:

 tex laltest # or: latex laltest  xdvi laltest  dvips -o laltest.ps laltest  dvipdfm -v laltest  xpdf laltest.pdf

 pdftex laltest # or: pdflatex laltest  xpdf laltest.pdf

 latex 'def\graphicPdriver{dvips}input laltest'  xdvi laltest  dvips -o laltest.ps laltest

 tex 'def\graphicPdriver{dvipdfm}input laltest'  dvipdfm -v laltest  xpdf laltest.pdf