Article View: comp.text
Article #1024Re: Including Mac (postcript) files in LaTeX
From: Jingbai Wang
Date: Fri, 13 Oct 1989 15:59
Date: Fri, 13 Oct 1989 15:59
44 lines
3217 bytes
3217 bytes
In article <2454@mva.cs.liv.ac.uk> ian@mva.cs.liv.ac.uk writes:
>I'm trying to include Superpaint 2 documents in a LaTeX document, by
>generating postscript output (using Command-K) and then using a
>`\special{...}' to include it in the LaTeX document. I'm using a new(ish)
>LaserWriter (prep) with System 6 on the Mac, and I'm running LaTeX on a
>MicroVax. If I print the postscript file from the Vax, it prints perfectly but
>when I include it in the LaTeX document and print everything, it messes up
>completely. I assume that smething in the postscript prologue is interfering
>with the postscript generated by dvi2ps. I have successfully managed to
>include postscript screen dumps from a Xerox 1186 in LaTeX documents, so the
>principle is sound.
It depends on which dvi2ps you are using. I dare say that NONE of the existing
dvi->ps programs in the world offers perfect PostScript transparency, and
hence can be called a good PostScript binder. As you know I am one of the
dvi2ps hackers, and there is a version of dvi2ps from UNIX distribution that
carries my name. However, that w_dvi2ps also suffers from poor PostScript
transparency. Thus, there is a newer version obtainable from ~/tmp
june.cs.washington.edu through ftp (don't ask me to mail, I have great
difficulties in sending a big file that far).
The reasons? Most of the PostScript codes obtained through dumping or
some subroutines that come with some systems (like LPS40 Tektronics->
PS support routines) can be called poor or non-standard PostScript codes.
If the dumped is a bitmap image, it is fine, because it is very simple.
However, if the dumped is an object or stroking type, i.e., you see
a loop that tries to pull numbers from the PS stack to draw lines (it
is actually demonstrated in Adobe Illustrator), it will cause problems. The
reason is that when you shell into user's sub-page (coordinate system),
the stack might have something in there already. To draw something, you need
at least two numbers, i.e., x and y (for rlineto). Most of the
drawing procedures in such PostScript codes only checks if the stack is empty,
and not how many quantities are there. In the last draw, if there is only
one number left, then the procedure will overdraw the stack and causes
wrong type of argument to "restore" at the end.
Anyway, I have been doing a lot of PostScript programming and text formatter
development (the most recent ones are Chinese->PS formatter and driver
including Chinese TeX, Scribe and troff). For the little time I could spare,
I upgraded dvi2ps a little bit in \special and \psfig parts, and this version
is the one I mentioned above.
JB Wang
Technical Details
Message-ID:
<19992@unix.cis.pitt.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!cadre.dsl.pitt.edu!pitt!unix.cis.pitt.edu!jbwReferences:
<2454@mva.cs.liv.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!cadre.dsl.pitt.edu!pitt!unix.cis.pitt.edu!jbw From: jbw@unix.cis.pitt.edu (Jingbai Wang) Newsgroups: comp.text,comp.sys.mac,comp.sys.mac.programmer Subject: Re: Including Mac (postcript) files in LaTeX Message-ID: <19992@unix.cis.pitt.edu> Date: 13 Oct 89 15:59:32 GMT References: <2454@mva.cs.liv.ac.uk> Reply-To: jbw@unix.cis.pitt.edu (Jingbai Wang) Organization: Univ. of Pittsburgh, Comp & Info Services Lines: 44