[comp.text] are you tired of this question yet?

rusty@GARNET.BERKELEY.EDU (11/12/88)

How can I print (include) a MacDraw file in a latex file?  I did the
command-K thing and couldn't even get that to print from a sun using
lpr.  I also have some software that I think I got from
sally.utexas.edu, called macfilter, which prepends the correct
laserprep file from a file generated from command-F, but that doesn't
print either.  E.g., I used

	macfilter PostScript0 | lpr -Plw

I feel that if I can just get the file to print using lpr then I can
get it to print in my latex document (I'm already including postscript
stuff in my latex file that I made with Poskanzer's pbm programs).

ralph@laas.laas.fr (Ralph P. Sobek) (11/24/88)

> print either.  E.g., I used
> 
> 	macfilter PostScript0 | lpr -Plw
> 

I've gotten this to work.  Basically my macfilter, would prepend a slightly
edited version of `LaserPrep', Mac's adorable file.  To run from Unix, some
of the privileged initializations have to be removed.  Then you just
have your macfilter send out the modified LaserPrep and your
PostScript0 file should be generated by command-F (only the file in
PostScript).  Here's the beginning of my LaserPrep file, nothing else
was modified: 

%!
%%Title: "Laser Prep -- The Apple PostScript Dictionary (md)"
%%Creator: Apple Software Engineering
%%CreationDate: Thursday, March 19, 1987
%{appledict version #67 0
% ) CopyRight Apple Computer, Inc. 1984,1985,1986,1987 All Rights Reserved.
%%EndComments
%%BeginProcSet: "(AppleDict md)" 67 0
% userdict /md known {stop} if
% serverdict begin 0000 exitserver
% statusdict begin waittimeout 300 lt {0 60 300 setdefaulttimeouts} if end
( Starting load of Mac LaserPrep.ps ) print
currentfile statusdict begin serverdict begin product (LaserWriter II NT) eq revision 1 eq and {/setrealdevice {//setrealdevice exec 31 sendpcmd 4 eq tonerlight} bind def

> I feel that if I can just get the file to print using lpr then I can
> get it to print in my latex document (I'm already including postscript
> stuff in my latex file that I made with Poskanzer's pbm programs).

Unfortunately, my conclusion for now is IMPOSSIBLE.  The best that
I've been able to do is to get a Mac image inserted in LaTeX on a page
by itself, with no control left to dvi2ps to number or title the page.
I still haven't been able to eliminate the `showpage' command that's
hidden under LaserPrep's `cp' command.  I believe that the problem
requires an expert of LaserPrep and PostScript.

If anybody has succeeded I'd love to hear about it.

Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.laas.fr			   Addresses are ordered by importance.
ralph@lasso.uucp, or ...!uunet!mcvax!lasso!ralph	If all else fails, try:
SOBEK@FRMOP11.BITNET				      sobek@eclair.Berkeley.EDU

decouty@irisa.UUCP (Bertrand Decouty) (11/24/88)

In article <249@laas.laas.fr> ralph@laas.laas.fr (Ralph P. Sobek) writes:
|> print either.  E.g., I used
|> 
|> 	macfilter PostScript0 | lpr -Plw
|> 
|
|I've gotten this to work.  Basically my macfilter, would prepend a slightly
|edited version of `LaserPrep', Mac's adorable file.  To run from Unix, some
|of the privileged initializations have to be removed.  Then you just
|have your macfilter send out the modified LaserPrep and your
|PostScript0 file should be generated by command-F (only the file in

	Yes, but the two laserprep (the one used by macfilter and the one
used on the mac) MUST have the same revision/version  number. I have succeeded
in printing, using lpr, a macdraw file with laserprep 4.0 ( appledict version #65). 
Only one line has to be commented, the one calling ok procedure.

|> I feel that if I can just get the file to print using lpr then I can
|> get it to print in my latex document (I'm already including postscript
|> stuff in my latex file that I made with Poskanzer's pbm programs).
|
|Unfortunately, my conclusion for now is IMPOSSIBLE.  The best that
|I've been able to do is to get a Mac image inserted in LaTeX on a page
|by itself, with no control left to dvi2ps to number or title the page.
|I still haven't been able to eliminate the `showpage' command that's
|hidden under LaserPrep's `cp' command.  I believe that the problem
|requires an expert of LaserPrep and PostScript.
|
|If anybody has succeeded I'd love to hear about it.
|
|Ralph P. Sobek			  Disclaimer: The above ruminations are my own.

Yes, I have! I used laserprep 4.0, a modified psfig (from Trevor Darrell), 
dvi2ps (or now dvips from Rockiki) and all is OK on our Laserwriter IINT.
We work on Sun 3. Mac test file was a Macdraw file.

To eliminate showpage action, insert:
/showpage {} def

This is done in psfig.pro (which works for all ps files, not only mac), 
together with a 
/cp {pop pop} bind def
in dvi(2)ps.pro

I can send you my stuff, you are not very far -)-)

    ----- Bertrand DECOUTY @ INRIA-IRISA (Centre de Rennes) -----
+------------------------------+----------------------------------------------+
| IRISA - INRIA                |  EMAIL : decouty@irisa.fr                    |
| Campus de Beaulieu           |  					      |
| F-35042 Rennes Cedex         |  UUCP  : {uunet,mcvax,inria}!irisa!decouty   |
| FRANCE                       |          decouty@irisa.UUCP                  |
+--------------------------+---+--------------------+-------------------------+
| PHONE : +33  99 36 20 00 | TELEX : 950473 UNIRISA | FAX  : +33  99 38 38 32 |
+--------------------------+------------------------+-------------------------+