[net.micro.atari16] Scribe -> Proff

RDROYA01@ULKYVX.BITNET (Robert Royar) (10/22/86)

A week or so ago I posted a program to convert scribble formatted
files to proff.  Actually the native format is that used by Perfest
Software's old Perfect Formatter program, but close enough.  Since
then I've made a number of improvements to it.  The following commands
have been added:

case:     Include a paragraph if a switch variable is defined.
device:   Choose one of the pre-defined printer types and use
          its escape codes to underline, bold and super/subscript.
note:     Make an endnote and place a note number in the text.
cite:     Make an MLA style endnote and turn on the bibliography
          functions.

Other functions that deal with variables and file inclusion have also
been added.  But I would like to say more about 'cite' and the
bibliography functions.

Let us supposed that you have a source text file called CHAPTER1.MSS.
In the same directory, you have an additional file called
CHAPTER1.BIB.  If CHAPTER1.BIB is an ASCII file of the following format:

~TYPE   :BOOK (OR JOURNAL, MAGAZINE, INBOOK)
@TAG    :UNIQUEWORD
@AUTHOR :Fred Jones (used for the endnote)
@BIB    :Jones, Fred (this is for the bibliography)
@TITLE  :The world is your oyster (except for the months with an R in them)
@PUBL   :Random House
@CITY   :New York
@DATE   :1985
@PAGE   :20-40 (ignored by cite but may be used by bibdump)
@MEMO   :(completely ignored, but can be used to write summaries)
` <-- that's the data terminator an accent grave.

And then suppose you've got 30 or so of these entries each of a
similar format.  The first time the program sees '@cite(UNIQUEWORD)'
(UNIQUEWORD matches the tag field of an entry) . . .  The first time
@cite() comes along, the program reads the biblio file and installs
the values into a structure for each tagged entry.  From then on in
the document any time it sees @cite(), it searches the structures
(dynamically allocated doubly-linked circular list) for whatever tag
is between the fences in the @cite() command.  When it finds an entry,
it creates an endnote for that entry, formatted according to the type.
(i.e. if it's a book, the publisher and city are included.  If the
editor field or translator field is defined, then her name is
included).  At the end of processing all of the tags are placed in a
large array (allocated by malloc at runtime, based on the total number
of entries actually in the bibliography file).  The array is passed to
qsort and then the sorted bibliography is dumped to the output file,
again in MLA format.  To change formats all you need to do is change
the routines that write the notes and the bib.  I think it's a handy
little program, and if anyone is interested, I'm willing to mail
source and docs in arc/shar format.  I would send uuencoded binaries,
but I can't find uuencode anywhere.

Finally, if you requested this software earlier, but haven't heard
from me, please send another request.  Our system has been having air
conditioner problems lately and is in the habit of "forgetting" how to
reply to mail.  Even though we are a BITNET site, ARPA addresses seem
to be accepted much easier by our mailer.

Robert Royar

rdroya01@ulkyvx.bitnet