home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d162
/
flow2troff
/
flow2troff.doc
< prev
next >
Wrap
Text File
|
1988-10-02
|
4KB
|
131 lines
**************************************************************************
* Flow2Troff: Convert from New Horizons Software "FLOW" files to
* UNIX "troff" files, suitable for printing on any
* troff-compatible laser printer.
*
* Author: Daniel Barrett (barrett@cs.jhu.edu)
* Department of Computer Science
* The Johns Hopkins University
* Baltimore, MD 21218
*
* Status: Flow2Troff and Flow2Troff.c are in the PUBLIC DOMAIN.
* So is getopt.h, by "aklevin", to the best of my knowledge.
*
* Current version of Flow2Troff is 1.0.
**************************************************************************
CONTENTS
--------
How to invoke Flow2Troff
Detailed description of the options
Printing the final product
Playing with bold, italics & underline styles
Compiling Flow2Troff
How to invoke Flow2Troff
------------------------
If you just type "Flow2Troff", you'll get the following message:
Usage: Flow2Troff [options] Flow_file [Troff_file]
Options: -p# : Set troff point size (default 12)
-v# : Set troff vertical spacing (default 13)
-i# : Set indentation (default 3)
-d# : Print only to specified depth (default all)
-h : Permit hyphenation (default is none)
-t : Title the outline with "Flow_file"
Notes:
[options] refers to one or more of the listed options.
"Flow_File" is the Flow file used as input to the program.
"Troff_file" is the output file, containing troff code.
If not specified, Troff_file is written on standard output.
Detailed description of the options
-----------------------------------
Options may be given separately or combined, and in any order. For
options with arguments (all options except -h), you may separate the option
from its argument by a space, if you want.
The following two sets of options are exactly equivalent:
Flow2Troff -p18 -d3 -h Flow_file
Flow2Troff -hd3 -p 18 Flow_file
Here is a brief chart of what Flow2Troff's options do. It
helps if you know troff, but you can still use the program without that
knowledge.
Option Troff Equivalent Explanation
-------------------------------------------------------------------------
-p#, -p # .ps # Set your point size; how tall do
you want your characters?
-v#, -v # .vs # Vertical spacing; how much space
between lines of text?
-i#, -i # .in +# How many spaces is considered
one "indent"?
-d#, -d # <none> Print the outline only to the
specified depth. Try it a few
times and you'll see what it
does.
-h (removes Allow long words to be separated by
".nh") a hyphen at the end of a line.
Default: no hyphenation allowed.
-t .ce 1
.ft B Give your outline a title.
Flow_file The title is the name of the
.ft R input Flow file.
Playing with bold, italics, & underline styles
----------------------------------------------
Flow allows you to have simultaneous bold, italics, and underline
styles. Troff allows either bold or italics, not both, and has no
built-in ability for underlining. Flow2Troff has to obey the limits of
troff, by definition.
In Flow2Troff, you can have bold, italics, bold + underline,
italics + underline, or plain. If you Flow_file has a heading with
both bold and italics, then bold takes precedence.
Underlining is a real hack, but I don't know a better way
to do it in Troff.
Printing the Final Product
--------------------------
(1) Use FLOW to create an outline. Save in "normal" file format.
(2) Flow2Troff [options] Flow_file Troff_file.
(3) Transfer Troff_file to a UNIX machine.
(4) On a UNIX system, print Troff_file with the program "troff".
Exact syntax varies from system to system. You might want
to use the "-me" macro package (or similar) to introduce
page breaks; Flow2Troff DOES NOT CALCULATE PAGE BREAKS FOR YOU.
Compiling Flow2Troff
--------------------
Flow2Troff compiles & runs on both Amiga and 4.2BSD UNIX
systems. (I haven't tested it on other UNIX systems, but I see no
reason that Flow2Troff wouldn't work.)
AMIGA: I use MANX C V3.6. To compile, use the supplied Makefile,
or type:
cc Flow2Troff.c
ln Flow2Troff.o -lc
I would guess that Flow2Troff compiles fine under Lattice C also.
UNIX: Use the supplied Makefile.unix, or type:
cc -DUNIX Flow2Troff.c -o Flow2Troff