From jayhui@drongo.npac.syr.edu Tue Sep 20 17:13:50 1994
Date: Sun, 07 Aug 94 00:41:03 -0400
From: jayhui@drongo.npac.syr.edu
To: Paul Coddington <paulc@npac.syr.edu>
Subject: Re: hello again from the hater of latex 

Paul,
latex is all a hack! I figured out a hack at doing every thing. I think
I'll make that part of my project, hacking .ps files and hacking latex.

First of all.

To do a simple .ps figure in Latex, you create the Bounding box, easy?
Nope, the Latex refuess to recognize something like:

%%BoundingBox:    0 0 200 200

Nope, so I put it in a block of comments and it fixs it. 
Next hack is to run latex find out where the box appears in the text, then
use ghostview to physically move the .ps image to where the bounding box
appears in text. Of course if add text to your Latex document such that
the BB moves, you have to move every single figure again!. 

Now to solve the stupid text formatting, I tried to do this:

\begin{verbatim}
.
.
.
about 100 blank lines
.
.
.
\end{verbatim}

But nope, Latex complains that somthing somithing..
so I simply put a '.' there and Latex is happy!!!!! This hack forces Latex
to put it where I want it..after the figures...

So when I change my draft I'm going to have to spend 10 hours mucking
around with stuff that's horribly inept.  Microsoft probably wrote
MSWindows faster than I did to figure this stuff out. And of course MSWindows
is buggy...

Do we have some kind of alpha copy of Latex???

             |                     |    |          jayhui@npac.syr.edu
            /O\                    |    |
    .______{>*<}______.    o_______*/()\*_______o  Spectrum Holobyte
      + oo (___) oo +       + o:o {|\^^/|} o:o +   Falcon3.0 v3.02
             O                    [*]--[*]         Mig-29 v1.0

     General Dynamics         Mikoyan-Gurevich   Time to feed the worms,bud!
            F-16                   Mig-29
           FALCON                 FULCRUM          CHECK SIX!!!!

From jayhui@drongo.npac.syr.edu Tue Sep 20 17:14:02 1994
Date: Sun, 07 Aug 94 15:00:38 -0400
From: jayhui@drongo.npac.syr.edu
To: twillis@drongo.npac.syr.edu
Cc: jayhui@drongo.npac.syr.edu, reu94@drongo.npac.syr.edu
Subject: Re: hello again from the hater of latex 

Nope, that doesn't work, cause that 1) muffs up the figure that appears there,
and there is blank space after the last figure cause my figures do not all
fit on a whole page..i.e, my last figure only takes up half a page. So a
\clearpage would move the text to the next page.. I originally
tried to \begin{picture} cause a Latex book said \begin{picture} is supposed
to put the picture exactly where it appears in the .tex document, but NO,
the latex compiler just bugs out and crashes and burn like the horrible thing
it is. Even \vspace{xxin} doesn't do it, totally non-intuitive.
The only way it works is with \begin{verbatim}...\end{verbatim}
unless the figures fit nicely on a page, then one can use \clearpage.

You'd think that you should be able to tell Latex to put the picture HERE,
and not mess with it, but it wants to play big brother and put it whereever
it feels like it. 

Another thing, when I change my text, I'm going to have to mess around
with each and every .ps figure I include cause Latex will move the
Bounding box, therefore I have to TRANSLATE the .ps file to where the
bounding box it...

If this will help people, this is the garbage one goes through in setting
up .ps files (not encapsulated postscript files, which are a bit easier to
setup)

1) Create .eps file, hopefully, you'll be able to create an encapsulated
postscript and not a plain postscript, cause an .eps will put the
bounding box in the file already.  AVS doesn't do .eps :(

2) Edit fname.ps and put the following comments in:

%%Title:
%%Creator: AVS
%%CreationDate: Fri Aug  5 14:40:00 1994
%%For: jayhui@nova.npac.syr.edu (Jay)
%%BoundingBox: 0 0 200 200
%%Pages: 0
%%EndComments

at the top of the .ps file, the only real line that's important is the 
%%BoundingBox: 0 0 200 200
line, but for  some reason, Latex will not find it if the block is not there.
Obviously you can change the stuff to your username, your title, etc, but
not necessary.

3)Find the lines that look like:

0.5 0.5 scale
380.0 960.0 translate
%-90 rotate

or something. (Note I commented out the '-90 rotate' cause I don't want it
rotated..why it does this, who knows? it actually causes the image to be
flipped and rotated)
  a)the scale is intuitive (thank God..I mean Trang :) ) This basically
 causes the image to be scaled to 50% original size in horizontal and
 vertical direction

 b) translate simple moves that scale image on the page. +380 tells it
to move the image 380 "positions" to the right, 960 moves up, I assume
-380 would move to the left.  Another point to note is that the image
would appear on the lower left hand corner, hence to move it centered and
on top of the page, I moved this image 380 right and 960 up.
Also note that this placement is ***IRREGARDING*** Latex's \centerline
command, cause you can put it anywhere on the page you want to.. This
basically tells latex to SHUT THE HELL UP and I'm putting the latex picture
in myself, no thanks to you you gutless piece of programming hell.

c) of course if you want to rotate the image, use the rotate command..
   I don't know the coordinate system they use, but as I said the -90
flipped the image and rotated it counterclockwise???

4) Now that you have basically created an encapsulate PS manually, 
you need to include the figure in Latex... I used the following:

\begin{figure}[hbt]
\centerline{
\psfig{figure=stream2500.ps}}
\caption{Steam function as viewed in a contour map, of 50 levels. Shown at 2500 iterations.}
\end{figure}

Note that the \centerline *WILL* control where the caption is, but not the
image....

5) Now this is where the trial and error begins! Run it through Latex,
and find out how the bounding box is being treated by Latex. If you
don't put the BB stuff in, Latex will crash cause it wont find it. The BB
tells Latex how much space to leave for the figure, doesn't position the
figure though.

6) Go back to the .ps file you want loaded, edit the "translate" line
to move the image where the BB appears in the latex document. (you can
use xdvi on the .dvi image to find out where the BB is. You basically
want to move the image to the exact position on the Latex file you are
creating.  You can ghostview the image.ps file itself to show you where
on the page it has been translated.  For example, I wanted to put 
an image that BB was at the bottom of the page. So I went back to the
image.ps file and editted such that I moved the image to the correct location.
This was checked by doing a 'ghostview image.ps' and superimposing that image
on top of the actual Latex document.  If they don't superimpose correctly,
then go back and edit the image.ps file so that it does. This is the 
trial and error part.  Once you match up the image.ps with the proposal.dvi
you can go ahead and run the proposal through latex and convert to .ps and
use ghostview proposal.ps to make sure that the image is correctly placed.
In essence, you basically control where on the page you put the image, you
can easily put it over text, or even off the page, by using the translate 
command in postscript.  On the other side of the coin, if the bounding
box moves (say you add text which will move the BB), your picture
*WILL NOT* move with it, and one must go back and edit the postscript file
to move the image again...

Now that you have created and probably spent way too much time for one figure,
scream in absolute JOY and run around and Praise the latex gods for it's mercy
and jump and go out and get plastered, then come back and sit down to do the
20 other figures you need to put in...

Jay "Death to Latex" Hui

             |                     |    |          jayhui@npac.syr.edu
            /O\                    |    |
    .______{>*<}______.    o_______*/()\*_______o  Spectrum Holobyte
      + oo (___) oo +       + o:o {|\^^/|} o:o +   Falcon3.0 v3.02
             O                    [*]--[*]         Mig-29 v1.0

     General Dynamics         Mikoyan-Gurevich   Time to feed the worms,bud!
            F-16                   Mig-29
           FALCON                 FULCRUM          CHECK SIX!!!!

From jayhui@drongo.npac.syr.edu Tue Sep 20 17:14:07 1994
Date: Sun, 07 Aug 94 15:30:55 -0400
From: jayhui@drongo.npac.syr.edu
To: sfischer@drongo.npac.syr.edu
Cc: jayhui <jayhui@nova.npac.syr.edu>, reu94@drongo.npac.syr.edu,
    jayhui@drongo.npac.syr.edu
Subject: Re: hello again from the hater of latex 

susan et al,
isn't that what I just laid out? more or less, find out where the image
is placed, then place it yourself with the translate command?

    see where you WANT LaTex to put the picture (with 0 0 translate, it's
    in the lower left corner...)

Do you actually get Latex to put the picture in the bounding box? I found that
if you superimpose the ghostview of the image itself on top of the Latex
document, you get where the picture is going to be.  

Jay

             |                     |    |          jayhui@npac.syr.edu
            /O\                    |    |
    .______{>*<}______.    o_______*/()\*_______o  Spectrum Holobyte
      + oo (___) oo +       + o:o {|\^^/|} o:o +   Falcon3.0 v3.02
             O                    [*]--[*]         Mig-29 v1.0

     General Dynamics         Mikoyan-Gurevich   Time to feed the worms,bud!
            F-16                   Mig-29
           FALCON                 FULCRUM          CHECK SIX!!!!
