head	2.1;
access;
symbols
	fourth_edition:2.1;
locks
	grog:2.1; strict;
comment	@# @;


2.1
date	97.12.07.08.34.53;	author grog;	state Exp;
branches;
next	1.1;

1.1
date	96.06.26.11.38.44;	author grog;	state Exp;
branches;
next	;


desc
@Extract the Chapter number headings and titles from chapters and
appendices, and create variables for the chapter number and title
@


2.1
log
@Base second edition
@
text
@#!/bin/sh
#
# Extract the Chapter number headings and titles from chapters and
# appendices, and create variables for the chapter number and title
#
# Greg Lehey, 6 April 1996
#
# $Id: getch,v 1.1 1996/06/26 11:38:44 grog Exp grog $
#
# $Log: getch,v $
# Revision 1.1  1996/06/26 11:38:44  grog
# Initial revision
#
# Revision 1.2  1996/05/06  08:58:31  grog
# Minor mods
#
# Revision 1.1  1996/04/06  12:30:52  grog
# Initial revision
#
length=$1
shift
echo .\\\" Chapters
echo .nr CN 0 1
cat $* | ../tools/stripcond $length | egrep '^\.Chapter' | sed 's:^.*\[n\(.*\)\] *"\(.*\)":.ds n\1 \\n+(CN\
.ds \1 Chapter \\\*\[n\1], \\fI\2\\fP:'
echo .\\\" Appendices
echo .nr AN 64 1
cat $* | ../tools/stripcond $length | egrep '^\.Appendix' | sed 's:^.*\[n\(.*\)\] *"\(.*\)":.ds n\1 \\N\'\'\\\\n+[AN]\''\
.ds \1 Appendix \\\*\[n\1], \\fI\2\\fP:'
@


1.1
log
@Initial revision
@
text
@d8 5
a12 1
# $Id: getchapternumbers,v 1.2 1996/05/06 08:58:31 grog Exp grog $
a13 1
# $Log: getchapternumbers,v $
@
