
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]Attention OpenWindows users! Have you ever been working on your resume or some other troff document and printed it out again and again until it was perfect? Unless running back and forth to the printer is your only form of exercise, now is definitely the time to switch to a more efficient, environmentally conscious tool on OpenWindows called suntroff. This tool will let you see what your output looks like before you print it. But before we learn about suntroff, let's first find out a few basics about files and OpenWindows.
Type "/usr/openwin/bin/openwin" to call up OpenWindows.
When it starts up, you will see the File Manager base window, which contains icons representing the files in your system. You can open a file by double-clicking on it with the left mouse key.
Under the File Menu are options for creating new folders (directories) and files. You can name the file by clicking the left mouse key on the word NewDocument, which appears under the new icon. Delete the name NewDocument and type the name that you want. Then hit return.
Before you close a window of a file that you are editing, be sure to save any changes that you have made. Do this by calling up the Text Pane menu in the Text Editor window with the right mouse key. Choose File, drag the mouse across, and choose Save Current File from the submenu.
Along with the File Manager base window, the Wastebasket icon also appears when you begin OpenWindows. You can move files to the Wastebasket by selecting them one at a time with the left mouse key and dragging them to the wastebasket icon. To see what is in the wastebasket, open the the Wastebasket icon. If you want to move a file out of the Wastebasket, simply drag the icon from the Wastebasket Window to the File Manager Window. To empty the wastebasket follow this procedure:
In the Wastebasket window, bring up a menu with the right mouse key and choose Select All.
Call up a menu in the Wastebasket window. Choose Cut and then choose Really Delete from its submenu.
OpenWindows will ask you if you are sure that you want to remove the file(s). Click the left mouse key on Yes if you are absolutely sure that you want the files deleted.
Suntroff will read your troff file and display the output (i.e. that which would be printed) in a window on the screen of the Sun workstation. The fonts used by suntroff are close to those that will be printed in the final output, so this is a very good way of examining your document without printing it each time you make a small change.
In a shelltool or commandtool window while in the directory which contains the document that you wish to preview, enter the command "suntroff". A Suntroff Window will pop up.
Click on the "Ok" button with the left mouse key.
(window section shown here)
Call up the menu inside the window with the right mouse key and choose "Show Status". The Status and Command Panel will pop up.
In this window, click on the button which says "Specify Formatting Command".
At the space below, where it says "enter formatting command here," type: "nmt -Tpsc filename" where filename is the name of the file that you wish to view. If your file involves any of the special DWB tools, you will need to add an option after the -Tpsc. These options are easy enough to remember and are as follows:
grap -g
eqn -e
pic -p
tbl -t
For example a document which involves a table would require a command line like the one following: "nmt -Tpsc -t filename".
Click on the "rerasterize" button. Your document will appear in a window.
To move the page around in the window, hold the middle mouse key down while you move the mouse.
If you call up the menu inside the window with your document you will see the options of Previous Page and Next Page. You can use these to see the rest of your document if it is longer than one page.
To print a document, first make sure that you have specified a printer in the appropriate space in the Status and Command Panel. Then click on either the Print Page button or the Print Document button. The output will be sent to the printer that you have specified.
To exit suntroff, call up a menu via the title bar (top strip) of the suntroff window with the right mouse key and choose "Quit".
All the above has documentation that comes with it or is online. All work with System 7.0 (although I have had problems with Temperament and Greg's buttons). Some may not work with System 6.X. Send e-mail to "info-mac" for any additional questions, comments, or information.