# Script to create the manual for COHERENT X
#
OUTPUT=/tmp/doc/x
SRC=/v/doc/coherent/x

cd $SRC

rm pgn.r x.x index.r contents.r $OUTPUT/*

# introduction
troff -p -Z10 -mcohtext ../top.r ../fonts.r \
	$SRC/text/intro.r \
	2> intro.x \
	> $OUTPUT/intro.p
tail -1 intro.x > pgn.r

# installation notes
#troff -p -Z10 -mcohtext ../top.r ../fonts.r pgn.r \
#	$SRC/text/install.r \
#	2> install.x \
#	> $OUTPUT/install.p
#tail -1 install.x > pgn.r

# tutorial on X and twm
troff -p -Z10 -mcohtext ../top.r ../fonts.r pgn.r \
	$SRC/text/using.r \
	2> using.x \
	> $OUTPUT/using.p
tail -1 using.x > pgn.r

# introduce the X utilities
troff -p -Z10 -mcohtext ../top.r ../fonts.r pgn.r \
	$SRC/text/clients.r \
	2> clients.x \
	> $OUTPUT/clients.p
tail -1 clients.x > pgn.r

# discuss compiling an X application
troff -p -Z10 -mcohtext ../top.r ../fonts.r pgn.r \
	$SRC/text/compile.r \
	2> compile.x \
	> $OUTPUT/compile.p
tail -1 compile.x > pgn.r

# introduce the Lexicon
troff -p -Z10 -mcohtext ../top.r ../fonts.r pgn.r \
	$SRC/text/lexicon.r \
	2> lexicon.x \
	> $OUTPUT/lexicon.p
tail -1 lexicon.x > pgn.r

# lexicon pages
troff -p -Z3 -mcohlex ../top.r ../fonts.r pgn.r `ls lx/[a-z]*` \
	2> lx.x \
	> $OUTPUT/lx.p

# generate miscellaneous stuff
#Run.xmisc
