3.4 Using the graphics-bundle with LATEX

The packages in the LATEX graphics bundle (color.sty, graphics.sty, graphicx.sty, ...) make extensive use of \special commands. PyX defines a clean set of such commands to fit the needs of the LATEX graphics bundle. This is done via the pyx.def driver file, which tells the graphics bundle about the syntax of the \special commands as expected by PyX. You can install the driver file pyx.def into your LATEX search path and add the content of both files color.cfg and graphics.cfg to your personal configuration files.3.1 After you have installed the cfg files, please use the text module with unset pyxgraphics keyword argument which will switch off a convenience hack for less experienced LATEX users. You can then import the LATEX graphics bundle packages and related packages (e.g. rotating, ...) with the option pyx, e.g. \usepackage[pyx]{color,graphicx}. Note that the option pyx is only available with unset pyxgraphics keyword argument and a properly installed driver file. Otherwise, omit the specification of a driver when loading the packages.

When you define colors in LATEX via one of the color models gray, cmyk, rgb, RGB, hsb, then PyX will use the corresponding values (one to four real numbers). In case you use any of the named colors in LATEX, PyX will use the corresponding predefined color (see module color and the color table at the end of the manual). The additional LATEX color model pyx allows to use a PyX color expression, such as color.cmyk(0,0,0,0) directly in LaTeX. It is passed to PyX.

When importing Encapsulated PostScript files (eps files) PyX will rotate, scale and clip your file like you expect it. Other graphic formats can not be imported via the graphics package at the moment.

For reference purpose, the following specials can be handled by PyX at the moment:

PyX:color_begin (model) (spec)
starts a color. (model) is one of gray, cmyk, rgb, hsb, texnamed, or pyxcolor. (spec) depends on the model: a name or some numbers
PyX:color_end
ends a color.
PyX:epsinclude file= llx= lly= urx= ury= width= height= clip=0/1
includes an Encapsulated PostScript file (eps files). The values of llx to ury are in the files' coordinate system and specify the part of the graphics that should become the specified width and height in the outcome. The graphics may be clipped. The last three parameters are optional.
PyX:scale_begin (x) (y)
begins scaling from the current point.
PyX:scale_end
ends scaling.
PyX:rotate_begin (angle)
begins rotation around the current point.
PyX:rotate_end
ends rotation.



Footnotes

... files.3.1
If you do not know what this is all about, you can just ignore this paragraph. But be sure that the pyxgraphics keyword argument is always set!