.if "\nd"0" .nr m \n(mo-1
.if "\nm"0" .ds ]m January
.if "\nm"1" .ds ]m February
.if "\nm"7" .ds ]m August
.if "\nm"8" .ds ]m September
.if "\nm"9" .ds ]m October
.if "\nm"10" .ds ]m November
.if "\nm"11" .ds ]m December
. ie \nd .ds ]W Modified \nm/\nd/\ny
. el .ds ]W Printed \n(mo/\n(dy/\n(yr\}
.if t \{.ie \nd .ds ]W \*(]m \nd, 19\ny
. el .ds ]W \*(]m \n(dy, 19\n(yr\}
' # reset the basic page layout
'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
' # set type font and size
' # handle the head of the page
.tl @\\*(]H@\\*(]D@\\*(]H@
' # handle the foot of the page
' # no runout unless there was a .TH
' # set title and heading
.ds ]D UNIX Programmer's Manual
\&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
\&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
' # subroutine for section heading
' # end of SH (cf }X above and }N below)
.if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
.if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
.if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
' # combinations of Roman, italic, bold
.}S 1 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
.}S 1 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
.}S 2 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
.}S 2 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
.}S 3 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
.}S 3 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
' # make special case of shift out of italic
.if "\\$1"2" .if !"\\$5"" .ds ]F\^
.ie !"\\$4"" .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
.if !"\\$1"" .nr )P \\$1v
.if !"\\$1"" .nr )I \\$1n
.in \\n()Ru+\\n(INu+\\n()Iu
.if !"\\$1"" .nr )I \\$1n
' # end of TP (cf }N below)
.if !"\\$1"" .nr )I \\$1n
.in \\n()Ru+\\n(INu+\\n()Iu
.ie !\\n()Iu+\\n()Ru-\w@\\*(]X@u-3p \{\\*(]X
.el \\*(]X\h@|\\n()Iu+\\n()Ru@\c
' # handle end of 1-line features
' # increase relative indent
.ie !"\\$1"" .nr )R +\\$1n
' # decrease relative indent
.if !"\\$1"" \{.ie "\\$1"0" .nr )p 1 1