
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]Although powerful and easy to use, SunWrite lacks a built-in equation formatting facility. The best method I've found for working around this problem is to use SunDraw to draw an equation and then paste the resulting graphic image into SunWrite. This is a lot easier than it sounds at first and the results are quite good.
Creating an equation in SunDraw for use in a SunWrite document involves several steps.
This method allows you to edit each of your equations easily and separately from your SunWrite document. By default SunWrite will re-read the graphics image of each of your equations whenever you start up SunWrite. To see how this technique works, I'll show you each of the steps it took to produce this equation:
equation shown
Start-up SunDraw as you usually do. With SunDraw open, begin by using the text tool to type in the base characters and symbols you'll need for your equation. In this screen shot, I have created several of the textual parts of the equation. You need not put them in their final location just yet.
screen dump shown
Next, I typed in the symbols and brackets needed. Greek symbols and other characters can be found on the Symbol and Zapf Dingbats fonts. The keys you need to type to produce these symbols can be found in the table on page 179 of the SunDraw User's Guide, ECN #724.
To get the superscripted '2', I used the text tool to type in a '2' in a smaller point size, positioned it next to the 'b' and then used the "Group" selection from the "Arrange" menu to collect the 'b' and its superscript together into one unit. Grouping things together preserves their alignment and makes them easier to move. Here's my screen with the symbols added:
screen dump shown
To get the bar and square root symbol, I used the line tool in SunDraw and drew my own. I used one of the sets of symbols I typed in earlier to judge how high to make the square root symbol. You can adjust the size of the symbol later by clicking on the symbol and pulling on the handles which appear on the surrounding box. Here's my screen as I am adjusting the size of the square root symbol:
screen dump shown
Now I have all the pieces I need, so I'll start positioning them together:
screen dump shown
At this point, I've found that I needed a larger summation symbol
and bigger brackets. To get these I click on them and stretch
them out as I would other SunDraw objects:
screen dump shown
After a final few adjustments, the equation is ready:
screen dump shown
Save It Twice
In order to save a copy of your equation which you can edit again
later as well as include into a SunWrite document, you need to
save the equation in two formats.
First, select "Save/Open..." from the "File" menu and click on
the push pin to lock the dialog box on screen. Click on the
"Draw" button. This sets the format of the saved file to Draw
which you will be able to edit again later. Type in a filename on
the line for filename and click on the "Save" button.
screen dump shown
Next, click on the "EPS" button. This sets the format of the
saved file to Encapsulated PostScript. This format is not
editable by SunDraw, but it is readable by SunWrite. Now go to
the "Edit" menu and select "Select All". This will make the
handles around all the objects in your equation appear. This is
an important step, as the EPS filetype only saves those picture
elements which are selected. Type in a different filename on the
line for filename and click on the "Save" button. Double click on
the push pin to make the dialog box disappear.
screen dump shown
You now have two files. The first one you saved is an editable
version of your equation. You can use SunDraw to modify or
correct it. The second file can be loaded easily into SunWrite.
Importing into SunWrite
The final part of this process involves importing the completed
equation into SunWrite. This takes two steps.
First select a new frame from the "Objects" submenu of the
"Props" menu.
screen dump shown
Next, draw a frame for the equation to be placed into. The text
that was underneath the frame will "scoot" out of the way.
Select "Import..." from the "File" menu. Type in the name of the
file in which you saved your equation in Encapsulated PostScript.
Click on the boxes for "Graphics" and "Postscript". Click on the
import button.
screen dump showm
Your cursor will change into a pen. This indicates that SunWrite
is ready to import the file. Point the cursor inside the frame
you drew and click. Your equation will appear in the frame.
screen dump showm
You may find that you need to adjust the position and size of the
equation now that it is in SunWrite. You can modify the position
by aiming the cursor inside the frame, holding down the left
mouse button and "dragging" the image around the frame. You can
modify the size by selecting "Frame..." from the "Props" menu and
adjusting the "Scale" parameters at the bottom of the dialog box.
With the equation properly placed you can save and print your
SunWrite document. By default, SunWrite saves the text of your
document and re-reads each graphic when it is restarted. This
allows you to edit and update your equations separately. In order
for your changes to show up in your SunWrite document, you must
alter your editable file and then save the changed equation into
the ESP file and reload it into SunWrite. Rereading of the
altered ESP file will take place if you restart SunWrite or you
can select the frame where the equation is to appear and reimport
the EPS file.
Hints and Tips