.de book_setup
.nr nH 0	\" no numbered paragraphs
.hy 14	\" don't hyphenate last line of pg; don't split last 2 chars of a word
.hlm 2	\" don't hyphenate more than two lines in a row
.nr FF 4	\" use symbols (asterisk, dagger, etc) for footnotes
.ad b
.nr AD \\n[.j]
.\"
.\" ############ DEFINITIONS FOR FOLLOWING
.\"		"ext" measures are from edge of physical sheet on which troff prints
.\"		"int" measures are from cutmarks
.\"		"body" refers to main text body rectangle, exclusive of header/footer
.\"
.\" ############ PRIMARY PAGE PARAMETERS
.nr pg_length_ext 11i	\" length of troff page, top to bottom
.nr pg_width_ext 8.5i	\" width of troff page, left to right
.nr top_off_ext .875i	\" from top edge of troff page to top cutmark
.nr bot_off_ext .9375i	\" from bottom edge of troff page to bottom cutmark
.nr left_off_ext .75i	\" from left edge of troff page to left cutmark
.nr right_off_ext .75i	\" from right edge of troff page to right cutmark
.nr top_off_int 1i+20p	\" from top cutmark to baseline of first body text
.nr bot_off_int .875i	\" from bottom cutmark to baseline of lowest body text
.nr left_off_int .875i	\" from left cutmark to left edge of body text
.nr body_width 5.25i		\" width of body text
.\".nr hdr_vertoff_int 0i	\" None#from top cutmark to baseline of main header text
.nr hdr_vertoff_int 1i-6p  \" None#from top cutmark to baseline of main header text
.nr ftr_vertoff_int 0.5i	\" from bottom cutmark to baseline of main footer text
.nr hdr_leftoff 0	\" offset relative to left body margin (positive to right)
.nr hdr_rightoff 0	\" offset relative to right body margin (positive to right)
.nr ftr_leftoff 0			\" ditto
.nr ftr_rightoff 0			\" ditto
.\".nr chap_num_off 1.15i		\" from header text to chapter number (baselines)
.nr chap_num_off .25i      \" from header text to chapter number (baselines)
.\".nr chap_hdr_off .85i		\" from chapter number to chapter head (baselines)
.nr chap_hdr_off 15p       \" from chapter number to chapter head (baselines)
.nr chap_hdr_vs 32p		\" leading for multi-line chapter headings
.nr chap_text_prespace 1.51i	\" from chap title to 1st text (baselines)
.\"
.\" ############ MISCELLANEOUS SPACING PARAMETERS
.\" unless otherwise indicated, spaces are baseline-to-baseline
.nr PD 18p			\" space between paragraphs
.nr VS 13p				\" text spacing, baseline to baseline
.nr list_prespace 1v	  		\" additional space before first item of list
.nr list_itemspace 1.5v		\" space preceding list items
.nr list_postspace 1v		\" space following last list item
.nr sidebar_postspace 2P	\"space following sidebar
.nr sidebar_prespace 2.2P		\"space before sidebar
.nr Ah_need 5				\" for .ne cmd preceding Ahead
.nr Bh_need 5				\" for .ne cmd preceding Bhead
.nr Ch_need 4				\" for .ne cmd preceding Chead
.nr Ah_prespace 31p		\" space preceding Ahead
.nr Bh_prespace 25p		\" space preceding Bhead
.nr Ch_prespace 25p		\" space preceding Chead
.nr Ah_postspace 1.5v		\" space following Ahead
.nr Bh_postspace 1.5v		\" space following Bhead
.nr Ch_postspace 0		\" space following Chead
.nr Fs_prespace 2P			\" space preceding a figure
.nr Fc_prespace .208i			\" space preceding a figure caption
.nr Fe_postspace 2P			\" space following a figure
.nr Ns_prespace 2v			\" space preceding a note
.nr Nc_postspace 2P-6p		\" space following note heading
.nr Ne_postspace 2v			\" space following a note
.nr Ns_need 5				\" for .ne cmd preceding note
.nr Ps_prespace 1.5v		\" space preceding a screen display
.nr Pe_postspace 1.5v		\" space following a screen display
.nr Ts_prespace 32p		\" space preceding a table
.nr Tc_postspace 1P		\" space following a table caption
.nr Te_postspace 2v		\" space following a table
.nr Xs_prespace 1.5v		\" space preceding an example
.nr Xc_postspace 1.2v		\" space following an example caption
.nr Xe_postspace 1.5v		\" space following an example
.\" the standard spacings given immediately above may need to be modified for
.\" particular combinations of format elements.  To define a spacing for a
.\" particular element combination, just assign the desired spacing to a number
.\" register whose name consists of <comma><1st element>-<comma><2nd element>
.nr ,Fe-,LP 2P				\" space between figure end and new paragraph
.nr ,SB2-,LP 2P
.nr ,SB2-,Ah 2P
.nr ,B1-,Ch .25i
.\"
.\" ############ INDENTATION PARAMETERS
.nr PI 0	\" indent for first line of paragraph; default indent for RS, IP
.nr Nh_space 2n			\" indent from para number to paragraph heading
.nr Ns_indent 18p			\" indent for note
.nr list_indent_outer 0\"	XX indent from current left margin to bullet/num
.nr list_indent_inner .25i		\" indent from bullet/number to list item text
.nr varlist_indent 15n		\" indent for hanging label list
.nr Ps_indent 15p			\" indent for screen displays
.nr Xs_indent 0u			\" indent for examples
.nr Ts_indent 0u			\" indent for tables
.\"
.\" ############ FONT PARAMETERS
.nr PS 11				\" font size for main text
.nr hdr_ps 10			\" font size for page header
.ds hdr_ft BKI\"		XX font for page header
.nr footer_ps 10		\" font size for page footer
.ds footer_ft CP3\"		XX font for page footer
.nr sidebartitle_ps 14		\" font size for page footer
.nr sidebartitle_vs 16		\" font size for page footer
.ds sidebartitle_ft BKBI\"		XX font for page footer
.ds chap_num_ft CP3\"		XX font for chapter number on title page
.nr chap_num_ps 14		\" font size of chapter number on title page
.ds chap_hdr_ft BKBI\"	XX font for chapter header on title page
.nr chap_hdr_ps 30		\" font size for chapter header on title page
.ds spec_name_ft BKB\"		XX font for chapter number on title page
.nr spec_name_ps 14		\" font size of chapter number on title page
.ds Ah_ft BKB\"		XX font for Aheads
.nr Ah_ps 16			\" font size for Aheads
.nr Ah_vs 18p			\" space between baselines of multiline Ahead
.ds Bh_ft BKBI\"		XX font for Bheads
.nr Bh_ps 12			\" font size for Bheads
.nr Bh_vs 13p			\" space between baselines of multiline Bhead
.ds Ch_ft BKB\"		XX font for Cheads
.nr Ch_ps 11			\" font size for Cheads
.nr Ch_vs 13p			\" space between baselines of multiline Chead
.ds Fe_num_ft CP3\"			XX font for figure caption number 
.nr Fe_ps 10			\" font size for figure caption number and text
.ds Fe_cap_ft BKI\"			XX font for figure caption text
.nr Fe_cap_vs 12			\" leading for figure caption text
.ds Xs_num_ft CP3\"			XX font for figure caption number 
.nr Xs_ps 10			\" font size for figure caption number and text
.ds Xs_cap_ft BKI\"			XX font for figure caption text
.nr Xs_cap_vs 12			\" leading for figure caption text
.ds QP_ft BKI\"			XX font for quoted paragraphs
.nr QS_ps 11			\" font size for quoted sections
.nr QS_vs 13			\" space between baselines of quoted sections
.ds QS_ft BKI\"			XX font for quoted sections
.ds Ta_num_ft CP3\"			XX font for table caption number
.ds Ta_cap_ft BKBI\"			XX font for table caption text
.nr Ta_ps 10			\" font size for table caption number and text
.nr Ta_vs 12p			\" space between baselines for tables
.nr Ps_ps 8			\" font size for screen display text
.nr Ps_vs 10p			\" space between baselines of display text
.ds FAM BK\" 	XX font family for main text
.ds cw_font_fam C\" constant width font family:  Courier
.ds special_font_fam WDO\" special font family:  Zapf-Dingbats
.\"
.\" ############ DERIVATIVE PARAMETERS
.nr LL \\n[body_width]u	\" line length for body text
.nr LT \\n[LL]			\" length for .tl use (not necessarily used in hdrs)
.nr HM \\n[top_off_ext]+\\n[top_off_int]		\" header margin
.nr FM \\n[bot_off_ext]+\\n[bot_off_int]+1		\" footer margin
.nr PO \\n[left_off_ext]+\\n[left_off_int]		\" page offset
.ds NN \\\\n[PN]
.ds RF \\\\*[NN]
.nr hdr_vertoff \\n[top_off_ext]u+\\n[hdr_vertoff_int]u
.\" ##############TOC PARAMETERS
.nr toc_header_margin 2i
.nr toc_title_margin 1.667i+\\n[top_off_ext]u
.ds toc_font_fam BK 
.ds toc_header_font MDR
.ds toc_second_header_font WDO
.ds toc_body_font BKR
.nr toc_body_leading 14p 
.ds toc_chapter_font BKB
.nr toc_chapter_leading 14p
.nr toc_header_fontsize 14
.nr toc_chapter_fontsize 12 
.nr toc_chapter_leading 14p
.nr toc_body_fontsize 11 
.nr toc_header_to_entry 1.234i
.nr toc_chapter_prespace 2P 
.nr toc_chapter_postspace 6p
.nr toc_body_prespace 6p
.nr toc_ahead_indent 2P
.nr toc_bhead_indent 3n
.nr toc_chead_indent 6n
.nr toc_dhead_indent 6n
..
.\" ####################FOOTNOTE STUFF
.am par@init \" because FL=LL in fn defaults to 5/6th of LL
.nr FL \\n[body_width]u
.nr FPS 9
.nr FVS \\n[FPS]+1
.nr FI 0
..
.de SPEC	\" section; $1 = section number; $2 = section name; 
.		\" $3 = 2nd part of two part title $4 = 3rd part of 3 part title
.book_setup		\" set major format parameters
.set_fmt_params		\" set secondary format parameters
.ft BKR
.nr fG 0				\" initialize figure counter
.nr xG 0				\" initialize example counter
.nr tB 0				\" initialize table counter
.nr speclist 0 1
.nr newspecpage 1 		\"tell PT we're on a new specpage
.rr sE
.\".\".if !"\\$1"" .nr sE \\$1
.\".\".if !"\\$1"" .if !\\n[sE] .aton \\$1 sE\" convert alphabetical char to number
.if "\\$2"Preface" .af PN i
.if "\\$2"Foreword" .af PN i
.\".\".ie "\\g(sE"A" .dT .tC A \\$1 "\\$2 \\$3 \\$4"
.dT .tC C \\$1 "\\$2 \\$3 \\$4"
.par@finish
.@error-recover	\" kill any diversions, keeps, nested environments (tmac.gs)
.rs
\&
.if !\\n[nl]=\\n[HM] \{\
.nr newspecpage 0
.bp
.NU\}
.rs
.ds RH \\$1
.if \\n[nH] .NHx 0
.nf
.ft \\*[spec_name_ft]
.ps \\n[spec_name_ps]
.ie o \{\ 
.SP_ABS \\n[top_off_ext]u+\\n[hdr_vertoff_int]u+\\n[chap_num_off]u
.ta (\\n[LL]u-\\w\\$1\\h'.287i'u)
	\&\\$1
.fi
.ad r
.sp -.35i
.ll \\n[body_width]u-.187i
.shaded_box .062i .25i 0
.sp -2p 
.ll \\n[body_width]u
.ad l
\h'-.125i'\v'2p'\l'\\n[body_width]u'
.ps \\n[chap_hdr_ps]
.vs \\n[chap_hdr_vs]u
.ft \\*[chap_hdr_ft]
.ta \\n[LL]uR
.vs \\n[Ah_vs]u
.ad b
.NU\}
.el \{\
.SP_ABS \\n[top_off_ext]u+\\n[hdr_vertoff_int]u+\\n[chap_num_off]u
.fi
.ad l
.sp -.55i
\h'-13p'\v'13p'
.shaded_box .062i .25i 0
.sp 1v
\0\\$1
.sp -2p-1v
.ll \\n[body_width]u
\h'-.125i'\v'2p'\l'\\n[body_width]u'
.ps \\n[chap_hdr_ps]
.vs \\n[chap_hdr_vs]u
.ft \\*[chap_hdr_ft]
.ta \\n[LL]uR
.vs \\n[Ah_vs]u
.ad b
.NU\}
.RT
.SP_ABS \\n[top_off_ext]u+\\n[hdr_vertoff_int]u+\\n[chap_num_off]u+\\n[chap_hdr_off]u
.ns
..
.\" LSV should save line length and fill mode and reset them in /LSV!!
.de LSV	\" Start variable list: hanging indents; $1=other than default indent
.br
.SP? \\n[list_prespace]u LSV
.nr saved_linelength \\n[LL]u
.nr saved_fillmode \\n[.u]
.nr varlist_context 0
.nr varlist_count_pars 0 1
.nr varlist_localindent 0
.nr varlistitem_postspace 5p 
.nr speclist +1
.RS
..
.de /LSV	\" end variable list; $1=other than default space
.Le \\$1
.de P \"redefine par to itself
.LP
.nr title_context 2
\\..
.nr LL \\n[saved_linelength]u
.ll \\n[LL]u
.ie \\n[saved_fillmode] .fi
.el .nf
.if \\n[speclist]=2 \l'\\n[body_width]u'
..
.de LIT
.if \\n[speclist]=1 \{\
.Nd 2v
.rs
.sp 3p 
.ps 8p
.vs 12
.po 1.5i
.nr LL 1.5i
.ll \\n(LLu
.ad r
.ft CP1
.di listerm 
.NU\}
.if \\n[speclist]=2 \{\
.Nd 2.1v
.rs
.\".sp 3p
.ft CP1
.ps 8p
.nr varlist_count_terms +1
.\".if !"\\$1"" .nr varlist_localindent \\$1
.if \\n[varlist_count_terms]>1 .LP
.if \\n[varlist_count_terms]>1 .SP! 1v
.di varlist_term_div
.NU\}
.if \\n[speclist]>2 \{\
.Nd 2.1v
.nr varlist_count_terms +1
.\".if !"\\$1"" .nr varlist_localindent \\$1
.if \\n[varlist_count_terms]>1 .LP
.if \\n[varlist_count_terms]>1 .SP! 1v
.di varlist_term_div
.NU\}
..
.de /LIT
.if \\n[speclist]=1 \{\
.br
.di
.ft R
.nf
.listerm
.fi
.po
.NU\}
.if \\n[speclist]>1 \{\
.di
.ie \\n[varlist_localindent] .IP "\\*[varlist_term_div]" "\\n[varlist_localindent]u"
.el .IP "\\*[varlist_term_div]" "\\n[varlist_indent]u" 
.ie \\n[varlistitem_postspace] .SP! -\\n[varlistitem_postspace]u
.el .SP! -\\n[list_itemspace]u
.NU\}
..
.de gff_spec_hack
./LSV
.LSV
.nr varlist_indent 10n
..
.de LI
.if \\n[speclist]=1 \{\
.br
.nr LL 3.5i 
.ad l
.ps 10
.ft BKR
.ll \\n(LLu 
.po 3.25i
.sp -1v
.di listitem
.NU\}
.if \\n[speclist]=2 \{\
.if \\n[varlist_context] \{\
.sp -1v
.ps 10 
.vs 12
.NU\}
.if \\n[itemlist_context] \{\
.Li \\$1
.SP! -1v
.de P
.nr itemlist_count_pars +1
.ie \\n[itemlist_count_pars]>1 .SP! \\n[list_itemspace]u
.el .NU 
\\..
.NU\}
.if \\n[orlist_context] .Li \\$1
.NU\}
.if \\n[speclist]>2 \{\
.if \\n[varlist_context] \{\
.SP! -1v
.NU\}
.if \\n[itemlist_context] \{\
.Li \\$1
.SP! -1v
.de P
.nr itemlist_count_pars +1
.ie \\n[itemlist_count_pars]>1 .SP! \\n[list_itemspace]u
.el .NU 
\\..
.NU\}
.if \\n[orlist_context] .Li \\$1
.NU\}
..
.de /LI 
.if \\n[speclist]=1 \{\
.br
.di
.nf
.listitem
.fi
.po
.ie \\n[varlistitem_postspace] .SP! -\\n[varlistitem_postspace]u
.el .SP! -\\n[list_itemspace]u
.NU\}
.if \\n[speclist]>1 \{\
.if \\n[itemlist_context] .nr itemlist_count_pars 0
.NU\}
..
.de PT
.ev pt
.po \\n(POu+\\n[hdr_leftoff]u+\\n[hdr_rightoff]u
.in 0
.ft \\*[hdr_ft]
.ps \\n[hdr_ps]
.lt \\n[LT]u
.SP_ABS \\n[top_off_ext]u+\\n[hdr_vertoff_int]u
.if \\n[newspecpage] \{\
.ie o .tl \s12\f[BKBI]\\*[RH] (cont'd)\fR\s0
.el .tl \s12\f[BKBI]\\*[RH] (cont'd)\fR\s0
\v'-7p'\l'\\n[body_width]u'
.br
.NU\}
.nr newspecpage +1
.ft R
.fl
.po
.ev
.if \\n[cM] .CM pagetop
..
