[comp.text.desktop] Sun + Mac + Laserwriter

news@sun.uucp (news) (08/14/87)

We have just acquired a Sun which we hope to use with
our Apple Laserwriter (also newly acquired).  We'd
also like to use a MacIntosh Plus with the Laserwriter.
The Sun will be on an Ethernet, and the Mac will
be on an Appletalk network.

We felt that we could probably use a mechanical switch
to switch the Laserwriter between the serial port
on the Sun and a serial port on the Mac.  However,
we wondered if there were not some more elegant
way of sharing the Laserwriter.
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun
Chuq Von Rospach	chuq@sun.COM		Delphi: CHUQ

We live and learn, but not the wiser grow -- John Pomfret (1667-1703)

montnaro%sprite.tcpip@csbvax (Skip Montanaro) (08/18/87)

We have a LaserWriter attached to the serial port of a Sun and to our
locl pbx. One port uses the nine pin serial port (AppleTalk?) and the
other uses the 25 pin serial port. Presumably the LaserWriter has the
smarts to hold off one port while accepting input from the other. 
-- 
Skip Montanaro (montanaro@ge-crd.arpa or uunet!steinmetz!desdemona!montanaro)
"Believing I had supernatural powers, I slammed into a brick wall." -- P. Simon
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun

bangs%husc8@harvard.harvard.edu (Alex Bangs) (08/18/87)

We have found some problems with connecting both simultaneously. If someone
comes and uses the Mac (you have to turn the switch from 9600 to Appletalk),
the printer is not the same afterward (even with turning the switch back),
and the Sun cannot print. We have adopted the following protocol to avoid
this problem (assuming normally connected to the Sun):

* Disconnect RS232 cable from the printer.
* Turn the printer off.
* Move the switch from the 9600 position to the Appletalk position.
* Turn printer on, wait for start page to print out
* Connect the Appletalk cable, do your Mac printing.
When finished with Mac printing:
* Disconnect the Appletalk cable from the printer
* Turn the printer off
* Move the switch from the Appletalk to the 9600 position
* Turn the printer on, wait for the start page to print out
* Connect the RS232 cable.

Hope this helps. It works well for us where little Appletalk use is needed;
I generally use a script to download and print Postscript files directly
from the Mac.

Alex
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun
Chuq Von Rospach	chuq@sun.COM		Delphi: CHUQ

We live and learn, but not the wiser grow -- John Pomfret (1667-1703)

sca%tut.cis.ohio-state.edu@osu-eddie.UUCP (Stanley C. Ahalt) (08/20/87)

We are running a network of Suns with an attatched Laserwriter.  Of
course, I have a Mac at home.  Most of my word-processing is done
in TeX, and I would dearly love to be able to embed my graphics 
(in postscript form) in my TeX documents.

So, at home, I use MacDraw to produce the graphics (although doing the
graphics on the Sun would make a lot of sense, I have neither seen nor
heard of an equivalent program for the Sun).  Use command-k to generate
the ps file, and ship the file to my Unix machine. 

If I lw the ps file, the graphics print out just fine.  However, if I
embed the file in the TeX source, and use the PrintChart command supplied
by ArborText to print the file, nothing at all prints!  I have concluded
that there is some incompatability between the environment set-up
by ArborText's dvips and the LaserPrep file (version 65) supplied by Apple.

Does anyone have any suggestions, recommendations, or words of encouragement?

Thanks

Stan Ahalt
Department of Electrical Engineering
Ohio State University
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun
Chuq Von Rospach	chuq@sun.COM		Delphi: CHUQ

We live and learn, but not the wiser grow -- John Pomfret (1667-1703)

dboyes@uoregon%tektronix.tek.com (David Boyes) (09/09/87)

Stanley C. Ahalt writes:
>If I lw the ps file, the graphics print out just fine.  However, if I
>embed the file in the TeX source, and use the PrintChart command supplied
>by ArborText to print the file, nothing at all prints!  I have concluded
>that there is some incompatability between the environment set-up
>by ArborText's dvips and the LaserPrep file (version 65) supplied by Apple.

YES! The Apple LaserPrep mutilates the current environment so badly that
TeX can't get anything to work. As I understand it, LaserPrep is simply
a set of PS macros that establish an environment very similar to a Mac
screen and then the Mac just spews QuickDraw-type calls out to the
printer for evaluation. Icky. You might try looking at the file with
MicroEMACS or the like and removing all the environment setting cr*p
that Apple includes.
-- 
David Boyes                   ARPA: 556%OREGON1.BITNET@WISCVM.WISC.EDU
Systems Division              BITNET: 556@OREGON1
University of Oregon Computing Center   UUCP: dboyes@uoregon.UUCP
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun
Chuq Von Rospach	chuq@sun.COM		Delphi: CHUQ

We live and learn, but not the wiser grow -- John Pomfret (1667-1703)

peterb@dsiramd.nz (Peter Burgess) (09/09/87)

Stanley C. Ahalt writes:
>We are running a network of Suns with an attatched Laserwriter.  Of
>course, I have a Mac at home.  Most of my word-processing is done
>in TeX, and I would dearly love to be able to embed my graphics 
>(in postscript form) in my TeX documents.

>If I lw the ps file, the graphics print out just fine.  However, if I
>embed the file in the TeX source, and use the PrintChart command supplied
>by ArborText to print the file, nothing at all prints!  I have concluded
>that there is some incompatability between the environment set-up
>by ArborText's dvips and the LaserPrep file (version 65) supplied by Apple.

We have had a similar problem.  Although, we do not have Macs ourselves we some
times want to be able to print Mac-Draw files for other people.

I think the problem you are having is probably due to the LaserWriter running
out of memory. What happens is that there is a file called dvips.opt which the
ArborText driver looks at to determine what sort of printer you have and how
much memory is available.  The figure in this file will not take into account
all the memory used by the Mac-Draw macros.

Another problem is that the Laser-Prep macros actually check to see what fonts
are available in the printer when they are downloaded and allocate memory for
each font.  This means that if some of the TeX fonts have been downloaded then
more memory will be used unnecessarily.

One way to fix the problem might be to reduce the figure in dvips.opt.

What we do is to permanently download a version of the Laser-Prep macros
as soon as the printer is switched on.  To do this you need to get hold of a
version of the file (extracting it from the front of a Mac-Draw file is
probably the safest way).  You then insert the following PostScript at the
front:

% Control-D
(about to load md) ==
% Control-D
%%This MacDraw prolog was constructed by CLN and RDB with the latest files that
%% could be found. It seems to be able to coexist with DVIPS.PRO .
%%This version 4-Nov-1986
/md where
  {pop
   (This MacDraw download is unnecessary as it has already been done.\n) print
   flush currentdict begin}
  {0 serverdict begin exitserver}
  ifelse
/md where {pop} {userdict begin} ifelse
/md where
  {pop}
  {/md 250 dict def}
  ifelse
md begin
%--------- End of our prolog.

You may need to put the following in as well unless your Laser-Prep file
already has it at the front:

systemdict /currentpacking known{currentpacking true setpacking}if
/LW{save statusdict /product get(LaserWriter)anchorsearch exch pop{length 0 eq{1
}{2}ifelse}{0}ifelse exch restore}bind def
/LW+{LW 2 eq}bind def
/ok{systemdict /statusdict known dup{LW 0 gt and}if}bind def
 ok{statusdict begin 9 sccinteractive 3 ne exch
 0 ne or{9 0 3 setsccinteractive}if waittimeout 300 lt{/waittimeout 300 def}if
 end}if
            
% Laser-Prep stuff for Mac-Draw goes here.

At the end of the Laser-Prep you have:

end
pop % cln
% Control-D
(md loaded) ==
% Control-D

This file should be printed first before other permanently downloaded stuff.

After the ArborText stuff has been printed you should find out the amount
of memory left and adjust the dvips.opt file accordingly.  Here is some
PostScript which prints the memory usage:

%Control-D
/nstr 8 string def
/Helvetica-Bold findfont 20 scalefont setfont
100 700 moveto
( Postscript version  ) show version show
100 650 moveto
( Total virtual memory  ) show
vmstatus 
nstr cvs show
100 600 moveto ( Virtual memory used  ) show
nstr cvs show
100 500 moveto ( Nesting level  ) show
nstr cvs show
100 550 moveto ( Virtual memory available ) show
vmstatus exch sub nstr cvs show
showpage
%Control-D

Peter Burgess,
Applied Mathematics Division,
New Zealand Govt. Dept. of Scientific and Industrial Research.

UUCP: ...!seismo!uunet!vuwcomp!dsiramd.nz!peterb
ACSNET: peterb@dsiramd.nz
----------------------------------------
Submissions to:   desktop%plaid@sun.com -OR- sun!plaid!desktop
Administrivia to: desktop-request%plaid@sun.com -OR- sun!plaid!desktop-request
Paths:  {ihnp4,decwrl,hplabs,seismo,ucbvax}!sun
Chuq Von Rospach	chuq@sun.COM		Delphi: CHUQ

We live and learn, but not the wiser grow -- John Pomfret (1667-1703)