[mod.recipes] Software: here are the programs to unpack and print recipes

reid@glacier.ARPA (Brian Reid) (11/30/85)

Here is the first version of the software that collects and prints the 
#! /bin/sh
: This is a shar archive.  Extract with sh, not csh.
echo x - README
This is the directory of programs that work with mod.recipes files, to make
the USENET cookbook.

To install it at your site, edit the Makefile so that it reflects your site's
configuration information. If you don't have the "less" program, you will
probably want to edit rcshow.X so that it pipes the output of $TROFF
through "ul" before piping it into $PAGER. If you don't understand what that
means, then don't worry about it--the consequences are not grave.

Once you have edited your Makefile, then type
	make configure
which will produce configured executable versions of the cookbook software in
your current directory. Once you have satisfied yourself that it is not a
trojan horse, then type
	make install
which will copy the executable programs to the directory you have chosen for
them (we put them in /usr/local/bin) and copy the manual pages to
/usr/man/man1 and /usr/man/man5. You needn't be root to install, you only
need to be a user who has write permission in the bin and man directories.

Once you've done that, go read the man pages, then go play with "rn" and have
fun printing cookbooks. This will also work with readnews; I don't know from
notesfiles, and I have never tried it with vnews or yarn or any of those
other programs.

Here are the program names and what they do:

rcbook.n	make a cookbook with nroff
rcbook.t	make a cookbook with troff
rcextract	extract a recipe from a news article (called by rctypeset)
rcindex		produce an index of saved recipes (called by rcbook)
rcintro		generate the introduction to the cookbook (called by rcbook)
rckeep		keep a recipe
rcnroff		run one recipe through nroff
rcshow		show one recipe on the screen
rctypeset	run one recipe through troff

	Brian Reid	{sun,decwrl,hplabs}!glacier!reid
	Stanford	reid@SU-Glacier.ARPA
			reid@Glacier.stanford.edu
10450!Richard!Nixon!
echo x - Makefile
cat > Makefile << '10450!Richard!Nixon!'
# mod.recipes software Makefile. To install, edit the following variables,
# then type "make install"
#
# Where are the object files for the recipe software kept?
OBJDIR=/usr/local/bin

# Where is the news spooling directory?
NEWSDIR=/usr/spool/news

# What is the default "keep" directory. If you want a per-person keep
# directory, put $$HOME/something; if you want a systemwide keep directory
# (to save disk space), then put an absolute pathname here.
DEFDIR=$$HOME/Recipes

# What PATH do you want used inside the shell scripts? At the very least,
# it must contain $OBJDIR
DEFPATH=:$(OBJDIR):/usr/stanford/bin:/usr/ucb:/usr/bin:/bin:

# What version of TRoff works best at your site, and with what options does it
# do its best job on the Unix manual pages macros?
DEFTROFF=ptroff -man

# What is your favorite pager and what are its options?
DEFPAGER=less -sme
############################################################################

OBJECTS=rcbook.t rcbook.n rcextract rcindex rckeep rcnroff rcshow rctypeset \
	rcintro

configure: Makefile 
	sh configure.sh $(OBJDIR) $(NEWSDIR) '$(DEFDIR)' $(DEFPATH) \
		'$(DEFTROFF)' '$(DEFPAGER)'

install:
	cp $(OBJECTS) $(OBJDIR)
	cp cookbook.1 /usr/man/man1
	cp recipes.5 /usr/man/man5

distribution:
	shar README Makefile *.X configure.sh tmac.recip > distrib.shar
10450!Richard!Nixon!
echo x - cookbook.1.X
cat > cookbook.1.X << '10450!Richard!Nixon!'
.TH COOKBOOK 1 "27 Nov 85" "USENET Cookbook"
.SH NAME
rckeep, rcbook.t, rcbook.n, rctypeset, rcnroff \- Store and print the mod.recipes USENET Cookbook
.SH SYNOPSIS
.B rckeep
<
NEWSDIR/mod/recipes/?
(or 
.B s\ |rckeep
from a news-reading program.)
.br
.B rcbook.t
to typeset a cookbook from saved recipes
.br
.B rcbook.n
to nroff a cookbook from saved recipes
.SH DESCRIPTION
The USENET Cookbook is an online database distributed in the 
.B mod.recipes
newsgroup. This software makes it easy for you to clip recipes that interest
you, to store them in your own directory, and to make printed cookbooks from
those stored recipes.
.SH SAVING RECIPES
.PP
Read the news with your favorite news reading program. If you don't have a
favorite, try 
.B rn.
When you see a recipe that interests you, type
.br
.B 	s |rckeep
.br
The ``s'' command means ``save''; the vertical bar means ``save into a
program''. 
.B rckeep
is the program that keeps recipes. It will save recipes into a directory
named Recipes, and it will create that directory for you if it does not
currently exist. If you would like recipes saved in some other place, you can
type
.br
.B 	s |rckeep PartyRecipes
.br
.B 	s |rckeep ~/PartyRecipes
.br
.B 	s |rckeep /usr/local/lib/Recipes
.br
and so forth.
From time to time, an entry will come through in mod.recipes that is labeled
PATCH. This is not a recipe, but an update to a previously-posted recipe. If
you use 
.B rckeep
in the regular way, i.e. type
.B s\ |rckeep,
it will apply the
.B patch(1)
program to update your stored copy of the recipe.
.SH HOW RECIPES ARE SAVED
Every recipe is given a code word by the editor of mod.recipes. That code
word is contained in the first few lines of the article body. The 
.B rckeep
program uses the code word as a file name in your keep directory. For
example, if you are saving a recipe whose 1-line description is
.br
.B 	PHEASANT-PERRY - Pheasant for Thanksgiving
.br
it will be saved in your keep directory under the filename ``pheasant-perry''.
These filenames are forced to lower case by
.B rckeep.
.SH MAKING A COOKBOOK

To typeset a cookbook, just type
.br
.B 	rcbook.t
.br
and all of the recipes in your keep directory will be typeset in alphabetical
order, with an index, introduction, and title page added. If you don't have a
typesetter or if you don't have the
.B troff(1)
program, then use ``\fBrcbook.n\fR'' instead; it uses 
.B nroff(1).
.PP
If you have more than one keep directory, for specialty cookbooks of
different types, you can give rcbook a directory name as an argument, e.g.:
.br
.B	rcbook.t /usr/local/lib/Recipes
.SH FILES
.ta 3i
NEWSDIR/mod/recipes	USENET recipe directory
.br
DEFDIR	Your keep directory (saved recipes)
.br
OBJDIR/rc*	The recipe software
.SH SEE ALSO
recipes(5), rn(1), patch(1), 
.SH AUTHOR
Brian K. Reid, Stanford University
10450!Richard!Nixon!
echo x - rcbook.n.X
cat > rcbook.n.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcbook.n - make a cookbook with nroff
#
# Brian Reid, November 1985
#
TROFF="nroff -man"
PATH=DEFPATH
export PATH
TMAC=/tmp/tmac.$$
INDEX=/tmp/Index.$$
trap "rm -f $TMAC $INDEX" 0 1 2 3 15
case $1 in
	"") KEEPDIR=$HOME/Recipes;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo Your keep directory $KEEPDIR does not seem to exist.
	exit 1
fi;
cd $KEEPDIR
rcindex
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
set `date`
TODAY="$3 $2 $6"
sed -e "s/DATE/$TODAY/" > $INDEX << 'Index'
.RH MOD.RECIPES-SOURCE INDEX Recipes DATE 
.ll 6.5i
.nf
.br
.de XX
.tr ~ 
.ta 2.4iR 2.6i 5.3i
	\\$1~~~~~\\$2	\\$3 \\$4	\\$5
..
.so INDEX
Index
rcintro > Introduction
$TROFF $TMAC Introduction $INDEX [a-z]* > Cookbook.nr
echo $KEEPDIR/Cookbook.nr created
10450!Richard!Nixon!
echo x - rcbook.t.X
cat > rcbook.t.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcbook.t - make a cookbook for the typesetter
#
# Brian Reid, November 1985
#
TROFF="DEFTROFF"
PATH=DEFPATH
export PATH
TMAC=/tmp/tmac.$$
INDEX=/tmp/Index.$$
trap "rm -f $TMAC $INDEX" 0 1 2 3 15
case $1 in
	"") KEEPDIR=$HOME/Recipes;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo Your keep directory $KEEPDIR does not seem to exist.
	exit 1
fi;
cd $KEEPDIR
rcindex -t
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
set `date`
TODAY="$3 $2 $6"
sed -e "s/DATE/$TODAY/" > $INDEX << 'Index'
.RH MOD.RECIPES-SOURCE INDEX Recipes DATE 
.ll 6.5i
.nf
.br
.de XX
.tr ~ 
.ta 2.4iR 2.6i 5.3i
	\\$1~~~~~\\$2	\\$3 \\$4	\\$5
..
.so INDEX
Index
rcintro > Introduction
$TROFF $TMAC Introduction $INDEX [a-z]*
10450!Richard!Nixon!
echo x - rcextract.X
cat > rcextract.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcextract - extract article from mod.recipes
#
# This shell script extracts the portion of a mod.recipes
# article that is supposed to be fed into xroff. It strips off the
# article header and any signature, and sends the resulting text to stdout.
#
# Brian Reid, November 1985

PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
trap "rm -f $TMPFILE" 0 1 2 3 15
cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
awk -f $TMPFILE
10450!Richard!Nixon!
echo x - rcindex.X
cat > rcindex.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcindex - produce index of recipes
#
# usage:
#   rcindex  [ -options ] [ keepdir ]
#
# This shell script produces an index of all recipes in a keep directory.
# That index is an nroff/troff document that will be used as a part
# of the book produced from that directory.
#
# If you don't specify a keep directory, it will use DEFDIR, which
# is as good a place as any.
#
# Brian Reid, November 1985
#
PATH=DEFPATH
export PATH
case $1 in
	-*) OPTIONS=$1; shift;;
	*) OPTIONS=;;
esac
case $1 in
	"") KEEPDIR=DEFDIR;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo Your keep directory $KEEPDIR does not seem to exist.
	exit 1
fi;
cd $KEEPDIR
grep \^.RZ [a-z]* |\
  sed -e 's/\: *.RZ //' |\
  awk -F\" '{print $1,$4}' |\
  ptx -f -r $OPTIONS |\
  sed -e 's/^\.xx/.XX/' > INDEX
10450!Richard!Nixon!
echo x - rcintro.X
cat > rcintro.X << '10450!Richard!Nixon!'
#! /bin/sh
cat << 'YumYumEatemup'
.RH MOD.RECIPES-SOURCE INTRODUCTION M "27 Nov 85"
.SH "\s16THE USENET COOKBOOK\s10"
USENET is the Unix community's communication network. It is used
for communicating all manner of information among Unix computer sites
worldwide. The USENET cookbook is a collection of recipes that were
contributed by USENET participants, transmitted electronically to the editor
in California, and then distributed via USENET to thousands of sites.
.PP
The USENET cookbook is a database and not just a book. The paper copy that you
are holding was printed from a copy of the online database at some USENET
site, but even as you are reading it, new recipes are being added to that
database, and perhaps old tired ones are being abandoned.
.PP
The USENET cookbook is distributed with software that enables every user to
make his own customized edition of it, leaving out the recipes that he has no
interest in, and perhaps adding a few of his own that he hasn't yet submitted
to the network. There will be hundreds, or even thousands, of different
versions and editions of it, all with the same title.
.SH THE EDITOR
The editor of the USENET cookbook is Brian Reid, of Stanford University. Like
the editor of any publication, he did not do a majority of the writing. He
has contributed a few of his own recipes, but his contribution is primarily
that he organized the cookbook venture, that he wrote the software that
publishes the cookbook from the online database, and he edits and takes final
responsibility for the appearance and content of recipes that are put into
the database. He does not test every recipe, though he is an experienced cook
and he reads them all carefully for problems.
.SH INGREDIENTS
The USENET cookbook is distributed in the newsgroup named ``mod.recipes''.
You will need to get that newsgroup at your site.
A package of software for dealing with mod.recipes, including troff macros,
extraction programs, indexing programs, and this introduction, is posted from
time to time into mod.recipes and net.sources. Get that software and install
it on your machine.
.SH PROCEDURE
To submit a recipe to the USENET cookbook, just mail its text to the
newsgroup moderator, glacier!mod-recipes by uucp or
mod-recipes@glacier.stanford.edu by internet. The netnews software on most
machines will do this automatically if you try to post to mod.recipes
.PP
You can also submit evaluations, modifications, suggestions, or bug-fixes to
existing recipes.
.SH NOTES
It's important that you tell us where you got the recipe from. It's ok if you
cribbed it from a book or magazine or newspaper, but if you copy exactly the
words that you found there, there might be a problem with copyright violation.
.PP
While the main purpose of the USENET cookbook is to let us all make our own
custom cookbooks, we can't ignore the reality of the copyright law. Surely
you have noticed that every modern book says ``\fINo part of this publication
may be reproduced, stored in a retrieval system, or transmitted, in any form
or by any means, electronic, ..., or otherwise without the prior written
permission of the publisher.\fR''
.PP
Copyright law is complex, and only a lawyer
can reliably advise you on whether or not you are violating it, but in
general if you rewrite a recipe, in your own words, even if you don't change
the recipe, then you are not infringing the copyright by submitting that
recipe to the network. The copyright is on the words that explain the recipe,
and not the recipe itself.
.PP
.WR
Brian Reid, glacier!reid, reid@glacier.stanford.edu
Stanford University, Computer Systems Laboratory
'YumYumEatemup'
10450!Richard!Nixon!
echo x - rckeep.X
cat > rckeep.X << '10450!Richard!Nixon!'
#! /bin/sh
# rckeep - keep a recipe by adding it to a keep directory
#
# usage:
#   rckeep [ keepdir ]  [ filename ]
#
# This program lets you snatch recipes out of newsgroups and store them in
# a "keep" directory. They are stored in a file name that matches the 
# recipe id, which is found in the .RH command in the recipe.
#
# If you don't specify a keep directory, it will use $HOME/Recipes, which
# is as good a place as any. You can use ~/ to stand for $HOME/ if you want.
#
# Brian Reid, November 1985
#
PATH=DEFPATH
export PATH
TEMPFILE=/tmp/rckeep.$$
case $1 in
	"") KEEPDIR=$HOME/Recipes;;
	~/*) KEEPDIR=$HOME/`expr $1 : '~/\(.*\)'`;;
	~*) echo Sorry, I cannot process ~ notation, except for ~/...;
	       exit 1;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo Creating new keep directory $KEEPDIR;
	mkdir $KEEPDIR;
fi;
case $2 in
	"") rcextract > $TEMPFILE;;
	*) rcextract < $2 > $TEMPFILE;;
esac
IDLINE=`awk '{print $2,$3; exit;}' < $TEMPFILE | tr "A-Z" "a-z" `
case $IDLINE in
    "") echo This is not a mod.recipes datafile. I do not know what to do with it.
	exit 1;;
esac
set $IDLINE
KEEPNAME=$2
FILETYPE=$1
case $FILETYPE in
    mod.recipes-source) if [ -f $KEEPDIR/$KEEPNAME ]; then
	echo Overwriting previous version of `basename $KEEPNAME`
	fi
	mv $TEMPFILE $KEEPDIR/$KEEPNAME
	echo Saved as $KEEPDIR/$KEEPNAME;;
    mod.recipes-patch) if [ -f $KEEPDIR/$KEEPNAME ]; then
	echo Updating old version of $KEEPNAME
	patch -s $KEEPDIR/$KEEPNAME < $TEMPFILE
	    else
	echo Sorry, but the recipe $KEEPNAME is not there. I cannot patch it.
	fi;;
    *) echo This is not a mod.recipes datafile. I do not know what to do with it.;
       exit 1;;
esac
10450!Richard!Nixon!
echo x - rcnroff.X
cat > rcnroff.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcnroff - nroff a recipe
#
# This shell script extracts a recipe from a mod.recipes netnews article and 
# nroffs that recipe to the standard output.
#
# Brian Reid, November 1985
#
TROFF="DEFTROFF"
PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
TMAC=/tmp/tmac.$$
trap "rm -f $TMPFILE $TMAC" 0 1 2 3 15
cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
awk -f $TMPFILE |\
  $TROFF $TMAC -
10450!Richard!Nixon!
echo x - rcshow.X
cat > rcshow.X << '10450!Richard!Nixon!'
#! /bin/sh
# rcshow - show a recipe
#
# This shell script extracts a recipe from a mod.recipes netnews article and 
# nroffs it for display on the screen. This differs slightly from "nrecipe"
# in that it is not page-oriented. Actually, this program is almost too slow
# to use, because it has to run nroff every time.
#
# Brian Reid, November 1985
#
# If you don't have "less", you will want to 
# add "ul" to the pipeline to get the underlines right.
TROFF="nroff -man"
PAGER="DEFPAGER"

PATH=.:/usr/local/bin:/usr/stanford/bin:/usr/ucb:/usr/bin:/bin:
export PATH
TMPFILE=/tmp/xart.$$
TMAC=/tmp/tmac.$$
trap "rm -f $TMPFILE $TMAC" 0 1 2 3 15
cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
awk -f $TMPFILE |\
  $TROFF $TMAC - | $PAGER
10450!Richard!Nixon!
echo x - rctypeset.X
cat > rctypeset.X << '10450!Richard!Nixon!'
#! /bin/sh
# rctypeset - typeset a recipe
#
# This shell script extracts a recipe from a mod.recipes netnews article and 
# typesets it with troff. TRoff sends directly to the typesetter; if you
# don't have a typesetter, or have more than one, please consult your site
# administrators to find out what to do.
#
# Brian Reid, November 1985
#
TROFF="DEFTROFF"
PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
TMAC=/tmp/tmac.$$
trap "rm -f $TMPFILE $TMAC" 0 1 2 3 15
cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
awk -f $TMPFILE |\
  $TROFF $TMAC -
10450!Richard!Nixon!
echo x - recipes.5.X
cat > recipes.5.X << '10450!Richard!Nixon!'
.TH RECIPES 5 "27 Nov 85" "USENET Cookbook"
.SH NAME
mod.recipes \- USENET Cookbook recipe format and submitting procedure.
.SH SYNOPSIS
Use the manual macros.
Mail your recipe to mod-recipes@glacier. Try not to plagiarize.
.SH DESCRIPTION
The way you submit to mod.recipes is to mail the recipe to the
moderator. The moderator's mailbox is
.br
	glacier!mod-recipes.UUCP,
.br
if you believe in that kind of address, or
.br
	{hplabs, decwrl, bellcore, sun}!glacier!mod-recipes
.br
if you believe in the other kind of address. The addresses
.br
	mod-recipes@Glacier.ARPA 
and	mod-recipes@Glacier.STANFORD.EDU
.br
also work, if you know how to mail to them.
.PP
If your netnews administrator has set things up properly and if you are
running the right news software, you can just post to mod.recipes as you
would any other group, but your posting will be mailed to the moderator
insted of being placed directly in the newsgroup.
.SH HOW TO STRUCTURE A RECIPE
Every recipe that goes out will be formatted with a small set of troff
commands. If you don't know any troff, then just send the text of your
recipe. If you can do the formatting yourself, then great! That will save 
the editor a lot of time. Some hints for how to do it are in a later section
of this documentation.
If you don't know about xroff/troff/nroff but you do want to be helpful,
then you can help a lot by doing this:
.PP
.IP 1 5
Put your recipe in the standard sequence:
.RS 10
- Title and 1-line description
.br
- Introductory commentary, explaining (if possible) where you got
the recipe from. 
.br
- list of ingredients, using "Tbsp.", "tsp.", "cup", "oz", and "lb",
.br
- Numbered sequence of recipe steps.
.br
- Notes (if any). Comments on how you like to make it, or ingredient
availability, etc.
.br
- your signature file. I'll put as much of it as will fit into
the outgoing recipe.
.RE
.IP 2 5
Don't put any tab characters (^I) in the file. They confuse troff
something terrible, and I'll just have to take them out.
.IP 3 5
If you are a troff wizard, please don't use any of that wizardry in these
recipes. If you stick to the set of commands used in the Unix manual macros
(see \fIman(7)\fR), and the set of commands that are part of the USENET
Cookbook package (see following section), then things should work.
.RE
.PP
You can also submit evaluations, modifications, suggestions, or bug-fixes to
existing recipes.
.SH COPYRIGHT NOTES
It's important that you tell us where you got the recipe from. It's ok if you
cribbed it from a book or magazine or newspaper, but if you copy exactly the
words that you found there, there might be a problem with copyright violation.
.PP
While the main purpose of the USENET cookbook is to let us all make our own
custom cookbooks, we can't ignore the reality of the copyright law. Surely
you have noticed that every modern book says ``\fINo part of this publication
may be reproduced, stored in a retrieval system, or transmitted, in any form
or by any means, electronic, ..., or otherwise without the prior written
permission of the publisher.\fR''
.PP
Copyright law is complex, and only a lawyer
can reliably advise you on whether or not you are violating it, but in
general if you rewrite a recipe, in your own words, even if you don't change
the recipe, then you are not infringing the copyright by submitting that
recipe to the network. The copyright is on the words that explain the recipe,
and not the recipe itself.
.SH DO YOUR OWN FORMATTING
If you put formatting commands in the recipes that you submit, they will go
out more quickly, since the editor won't have to do it.
It's easy to learn how. 
.PP
The basic principle is to use as few commands as possible, and in general to
use only commands that are defined in the manual macros or the recipe macro
package. Various processing programs search through these files and look for
string matches on things like ".IG" and ".RZ".
Print out a few of the recipe source files from NEWSDIR/mod/recipes,
and then use OBJDIR/rctypeset or OBJDIR/rcnroff to produce 
formatted versions of them. Have that at hand when you are formatting
your recipe. You can test your formatting by using rctypeset or rcnroff on
your draft versions before you submit the recipe.
.PP
A ``skeleton'' recipe follows. .RH is the recipe header command; it must be
the first line of each recipe and it must have 4 arguments. 
"RECIPE-ID" is the file name under which the recipe will be stored; it must
be 14 characters or less. The "?" is a "what kind of recipe" code from the
code table below.
.nf
.ta 3i
.RS 4
\&.RH MOD.RECIPES-SOURCE RECIPE-ID ? "22 Dec 83" 
\&.RZ "RECIPE TITLE" "One-line description of it"
Introductory comments; use .PP for new paragraph.
\&.IH "Serves 13"	<-- Ingredients Header
\&.IG "1/2 cup" "butter"	<-- Ingredient (please use quotes)
\&.IG "1" "onion"
(medium to large, chopped fine. Don't try to use instant onion
in this recipe)
\&.PH	<-- Procedure header
\&.SK 1	<-- Procedure step
Preheat oven to 600 degrees	<-- Text for that step
\&.SK 2	<-- and so forth.
\&.NX	<-- Notes header
Notes (commentary) goes here; use .PP to separate paragraphs.
\&.WR	<-- Wrapup
Signature information goes here. A copy of your .signature file is OK,
but remember that there will already be one at the end of your message,
so if that's what you want, then just put the word ".signature" here.
.RE 4
.fi
You can also use the following -man macros; see \fIman(7)\fR for the complete
list.
.nf
.RS 4
.ta 3i
\&.I "italic words"
\&.B "boldface words"
\&.SM "small words"
\&.PP	<-- paragraph break
\&.PD <distance>	<-- paragraph distance
\&.IP "indented paragraph".
\&.RS	<-- relative start: move things to the right
\&.RE	<-- relative end: move things left again
.RE 4
.fi
You can also use these nroff/troff commands:
\&.if, 
\&.ds,
\&.br,
\&.nf,
\&.fi,
and .ta,
.SH CATEGORY CODES
.nf
.ta .4i 1i 3i 3.6i
	M	Main dish	SL	Salad
	A	Appetizer or snack	SP	Soup
	B	Bread/cake/pasta	D	Dessert
	L	Beverage (Liquid)
.fi
The suffix ``V'' on any category means that it is vegetarian; for example, a
vegetarian main dish recipe would be marked ``MV''.
.SH SEE ALSO
cookbook(1), rn(1)
10450!Richard!Nixon!
echo x - configure.sh
cat > configure.sh << '10450!Richard!Nixon!'
#! /bin/sh 
# Script to configure and install the other shell scripts.
#
OBJDIR="$1"
NEWSDIR="$2"
DEFDIR="$3"
DEFPATH="$4"
DEFTROFF="$5"
DEFPAGER="$6"
for i in *.X
do
    j=`basename $i .X`
    echo Processing $i into $j
    sed -e "s+OBJDIR+$OBJDIR+" \
        -e "s+NEWSDIR+$NEWSDIR+" \
	-e "s+DEFDIR+$DEFDIR+" \
	-e "s+DEFPATH+$DEFPATH+" \
	-e "s+DEFPAGER+$DEFPAGER+" \
	-e '/^TMAC.RECIP$/r tmac.recip' \
	-e '/^TMAC.RECIP$/d' \
	-e "s+DEFTROFF+$DEFTROFF+" < $i > $j
    chmod 755 $j
done
10450!Richard!Nixon!
echo x - tmac.recip
cat > tmac.recip << '10450!Richard!Nixon!'
'	# Recipe Heading
.de RH
.TH \\$2 "\\$3" "\\$4" "mod.recipes" "USENET Cookbook"
.ds ]H \\$2
..
.de RZ
.SH \\s14\\$1
\\*(]H \- \\$2
.PP
..
' 	# Ingredient
.de IG
.TP 10
\&\\$1
.I \\$2
..
'	# Step
.de SK
.IP "(\\$1)" 5n
..
'	# Ingredient header
.de IH
.SH INGREDIENTS (\\$1)
.PD 0
..
'	# Procedure header
.de PH
.PD
.SH PROCEDURE
.RS 5
..
'	# Notes
.de NX
.PD
.SH NOTES
..
'	# Wrapup
.de WR
.RE 5
.PD
.SH CONTRIBUTOR
.nf
..
10450!Richard!Nixon!