home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
useful
/
text
/
tex
/
pastex
/
macros
/
latex2e
/
inputs
/
epsfig.sty
< prev
next >
Wrap
Text File
|
1994-01-27
|
49KB
|
1,338 lines
%----------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\def\fileversion{2}%
\def\filedate{1994/01/25}%
\ProvidesPackage{epsfig}[\filedate]
\message{ Epsfig }
% minimal reworking for LaTeX2e!
%
% this will be all be rewritten when the LaTeX2e includegraphics
% comes out.
%
% SPQR Jan 94
%
%%%--------------------------------------------------------------------
%%% psfig merged with EPSF = epsfig Release 1
%%% 1.0 November 91
%%% 1.1 Dec 91 fixed some bugs
%%% 1.2 Jan 92 fixed bug that it never stopped reading PS file until
%%% it reached the end! merged in changes from psfig1.8
%%% (plain TeX definition of \fbox, new code for rotation)
%%% 1.3 Jan 92 separated out \special code so that dvitops can be
%%% supported. use \psfigdriver{dvitops}%
%%% 1.4 Jan 92 fixed dvitops. need to input psfig at different point
%%% in dvips from dvitops. define \psfig@start and \psfig@end to cope
%%% with this
%%% 1.5 Jan 92 force use of psfig method if using dvitops
%%% 1.6 May 92 fixed bugs
%%% 1.7 Sep 92 added support for emtex, sort of. reads a .bb file
%%% and imports .pcx file. Boolean flag \epsfigdos used
%%% to indicate that we cannot have more than one . in the
%%% suffix (ie we will look at file.bb not file.eps.bb)
%%%
%%% 1.8 Sep 92 added support for OzTeX; fixed bugs in dvips support
%%% (including clipping to bounding box); removed use of dimen100.
%%%
%%% 1.9 Dec 92 cleaned up documentation again
%%% 1.10 Mar 93 cleaned up for plain TeX
%%% 1.11 Mar 93 merged in changes by Peter Galko (supplied by CERN) for
%%% use with Textures
%%% 1.12 Apr 93 actually *tested* the Textures additions, and so rewrote
%%% from scratch (borrowed an idea from psbox)
%%% 1.13 May 93 allow for file names with _ or $ in them in \psdraft, and
%%% fix problem that occurred with missing BoundingBox
%%% 1.14 May 93 allow for .z suffix
%%% 1.15 July 93 allow for .gz suffix
%%% use \leavevmode as appropriate
%%% fix plain \TeX mode
%%% (fixes from Peter-Klaus Schilling <R02SCH@DSYIBM.DESY.DE>)
%%% 1.16 August 93 [peta@mcrcim.mcgill.edu (Peter Whaite)]
%%% -- Implement Perl scripts to do compressed file inclusion and bb
%%% generation.
%%% -- Add \pscompress.
%%% -- Tidy up comments.
%%% 1.17 September 93 SPQR
%%% better code for literal name printing
%%% allowed for spaces around , and =
%%% 1.18 17.9.93
%%% updates to epsbb and epsfig from Peter W
%%% 1.19 14.11.93
%%% mistaken placement of calculation of EPS@Height resulted in errors
%%%
%--------------------------------------------------------
%%%
%%% code rearranged by Sebastian Rahtz (spqr@uk.ac.york.minster)
%%% from work by
%%% Trevor Darrell; Tom Rokicki; Daniel Smith; H. Payne, Robert Russell
%%%
%%% This is a version of Darrell's `psfig' macros which are designed
%%% to be used with dvips or dvitops, and the `epsf' macros (these are
%%% automaticaly included by the style file). I did this because the
%%% \special commands used by `epsf' appear to be more robust and
%%% portable than the raw \specials used by `psfig', but I preferred
%%% the psfig interface. This system preserves the psfig interface,
%%% but mainly uses epsf macros to carry out the job. The user
%%% interface is identical to \psfig, but you just use \epsfig
%%% instead. Rotation uses the original psfig macros: I could not work
%%% out how to do rotation with the epsf macros.
%%%
%%% The same applies to `rheight' and `rwidth'
%%%
%%% If you *really* want old psfig behaviour regardless, use \psfig. It is
%%% still there. Some of the features have gone, however. \figurepath
%%% seemed redundant, since it could be controlled by the TEXINPUTS
%%% variable anyway.
%%%
%%% As an added feature, if FILE cannot be found, a file called FILE.bb
%%% is searched for. This should simply contain a %%BoundingBox line. A perl
%%% script "epsbb" is provided to generate these automatically. It is
%%% assumed that if this exists, then the actual postscript is in UNIX
%%% compress format in FILE.Z or in GNU gzip format in FILE.gz or FILE.z.
%%%
%%% The macros then read the BB from FILE.bb, but insert "`epsfig FILE`" in
%%% the output for dvips to interpret (don't worry, it knows about this).
%%% "Epsfig" is another perl script which searches the TEXINPUTS path for
%%% FILE or FILE.{gz,z,Z}.
%%%
%%% As an added bonus if you say \pscompress the -c switch will be passed to
%%% epsfig, causing automatic FILE.bb generation and compression the first
%%% time dvips is run. Files in the system directories will NOT be
%%% compressed.
%%% If you are *not* on a Unix system and use this, deliberately or by
%%% mischance, you will have problems!
%%%
%%% This file can be included in a dumped format, or used as a LaTeX
%%% style file, or used in plain TeX. It does not load itself twice (I hope)
%%%
%--------------------------------------------------------------------
%--------------------------------------------------------------------
%%% previous notes. this copy of psfig.tex inherited from versions 1.8
%--------------------------------------------------------------------
%%% All psfig/tex software, documentation, and related files
%%% in this distribution of psfig/tex are
%%% Copyright 1987, 1988, 1991 Trevor J. Darrell
%
%%% Permission is granted for use and non-profit distribution of psfig/tex
%%% providing that this notice be clearly maintained. The right to
%%% distribute any portion of psfig/tex for profit or as part of any commercial
%%% product is specifically reserved for the author(s) of that portion.
%%%
%%% Thanks to Greg Hager (GDH) and Ned Batchelder for their contributions
%%% to this project.
%%%--------------------------------------------------------------------------
%%% GDH 7/26/87 -- changed so that it first looks in the local directory,
%%% then in a specified global directory for the ps file.
%%% SPQR 12/91 removed that last change. it follows TEXINPUTS anyway
%%% RPR 6/25/91 -- changed so that it defaults to user-supplied name if
%%% boundingbox info is specified, assuming graphic will be created by
%%% print time.
%%% SPQR 12/91 removed that last change. use LaTeX error message instead
%%% SPQR 12/91 -- `no file found' produces LaTeX error message.
%%% If you recover from that the file name is set in draft
%%% mode in place of the file.
%%%
%%% Modified by J. Daniel Smith on 9 October 1990 to accept the
%%% %%BoundingBox: comment with or without a space after the colon. Stole
%%% file reading code from Tom Rokicki's EPSF.TEX file (see below).
%%% --- SPQR 12.91 removed most of this to use epsf directly
%%%
%%% More modifications by J. Daniel Smith on 29 March 1991 to allow the
%%% the included PostScript figure to be rotated. The amount of
%%% rotation is specified by the "angle=" parameter of the \epsfig command.
%%%
%%% Modified by Robert Russell on June 25, 1991 to allow users to specify
%%% .ps filenames which don't yet exist, provided they explicitly provide
%%% boundingbox information via the \epsfig command. Note: This will only work
%%% if the "file=" parameter follows all four "bb???=" parameters in the
%%% command. This is due to the order in which psfig interprets these params.
%%% ---- SPQR 12.91 removed all this
%%%
%%% 3 Jul 1991 JDS check if file already read in once
%%%
%-----------------------------USAGE---------------------------------------
% From: gvr@cs.brown.edu (George V. Reilly)
%
% \psdraft draws an outline box, but doesn't include the figure
% in the DVI file. Useful for previewing.
%
% \psfull includes the figure in the DVI file (default).
%
% \psscalefirst width= or height= specifies the size of the figure
% before rotation.
% \psrotatefirst (default) width= or height= specifies the size of the
% figure after rotation. Asymetric figures will
% appear to shrink.
%
% usage: \epsfig{file=, figure=, height=, width=,
% bbllx=, bblly=, bburx=, bbury=,
% rheight=,