150 lines
		
	
	
	
		
			3.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			150 lines
		
	
	
	
		
			3.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
.\"	MACROES FOR DISPLAYS (file tmac.q3)
 | 
						||
.\"
 | 
						||
.\"		Th.A. Zoethout
 | 
						||
.\"
 | 
						||
.de DB			\" SET DISPLAY [NO-]BREAK DEFAULT
 | 
						||
.\"	.DB [$1]
 | 
						||
.			\" $1 = display mode Break, No break. { B }
 | 
						||
.			\" initially display mode is N
 | 
						||
.ie \&\\$1\&N\& .nr DB 0
 | 
						||
.el .nr DB 1
 | 
						||
..
 | 
						||
.de DS			\" START DISPLAY
 | 
						||
.\"	.DS [ [$1] $2 [ $3 [$4] ] ] [ $5 [ $6 [$7] ] [$8]
 | 
						||
.			\" $1 = mark for Marked and boXed display { | }
 | 
						||
.			\" $2 = Marked or boXed display { - }
 | 
						||
.			\" $3 = Left indent (L1) Marked and boXed display { 0 }
 | 
						||
.			\" $4 = Right indent (R1) boXed display { L1 }
 | 
						||
.			\" $5 = Indented or Quoted display { - }
 | 
						||
.			\"	{ M implies I, X implies Q }
 | 
						||
.			\" $6 = Left indent (L2) for I and Q { -:0, IQ:\n(IN }
 | 
						||
.			\" $7 = Right indent (R2) for Q { L2 }
 | 
						||
.			\" $8 = [No-] break { \n(DB }
 | 
						||
.ie \\n(DS=1 .Er W ".DS: nested displays are not allowed
 | 
						||
.el \{\
 | 
						||
.nr DS 1
 | 
						||
.ds D1 \\$1
 | 
						||
.ds D2 \\$1
 | 
						||
.ds D3 \\$1
 | 
						||
.ds D4 \\$1
 | 
						||
.nr DE 0
 | 
						||
.if \&\\$2\&M\& .nr DE 1
 | 
						||
.if \&\\$2\&X\& .nr DE 1
 | 
						||
.if \\n(DE=0 \{\
 | 
						||
.ds D1 \&
 | 
						||
.ds D2 \(ul
 | 
						||
.ds D3 \(br
 | 
						||
.ds D4 \z\(br\}
 | 
						||
.Dt 0 0 0 0 0 0
 | 
						||
.ie \&\\$\\n(DE\&M\& .Dt 1 1 0 \\n(IN 0 0
 | 
						||
.el .if \&\\$\\n(DE\&X\& .Dt 2 2 0 \\n(IN \\n(IN 0
 | 
						||
.if \\n(Dt>0 .if \\n(DE<=\\n(.$ .if (\\$\\n(DE)=(\\$\\n(DE) \{\
 | 
						||
.nr D1 \\$\\n(DEn
 | 
						||
.nr DE +1 \}
 | 
						||
.if \\n(Dt=2 .nr D4 \\n(D1
 | 
						||
.if \\n(Dt=2 .if \\n(DE<=\\n(.$ .if (\\$\\n(DE)=(\\$\\n(DE) \{\
 | 
						||
.nr D4 \\$\\n(DEn
 | 
						||
.nr DE +1 \}
 | 
						||
.ie \&\\$\\n(DE\&I\& .Dt \\n(Dt 1 \\n(D1 \\n(IN 0 \\n(D4
 | 
						||
.el .if \&\\$\\n(DE\&Q\& .Dt \\n(Dt 2 \\n(D1 \\n(IN \\n(IN \\n(D4
 | 
						||
.if \\n(Da>0 .if \\n(DE<=\\n(.$ .if (\\$\\n(DE)=(\\$\\n(DE) \{\
 | 
						||
.nr D2 \\$\\n(DEn
 | 
						||
.nr DE +1 \}
 | 
						||
.if \\n(Da=2 .nr D3 \\n(D2
 | 
						||
.if \\n(Da=2 .if \\n(DE<=\\n(.$ .if (\\$\\n(DE)=(\\$\\n(DE) \{\
 | 
						||
.nr D3 \\$\\n(DEn
 | 
						||
.nr DE +1 \}
 | 
						||
.nr DE \\n(.u
 | 
						||
.ie \\n(Da<2 .nf
 | 
						||
.el .fi
 | 
						||
.if \&\\$\\n(.$\&B\& .nr Da 1
 | 
						||
.if \&\\$\\n(.$\&N\& .nr Da 0
 | 
						||
.if \&\\$\\n(.$\&\& .nr Da \\n(DB
 | 
						||
.if \\n(Dt=0 .Dt 0 \\n(Da \\n(D2 0 0 \\n(D3
 | 
						||
.if \\n(NS=0 .sp \\n(VSu
 | 
						||
.nr NS 0
 | 
						||
.ch Id
 | 
						||
.ne \\n(NDv
 | 
						||
.nr Dx \\n(.i
 | 
						||
.nr Dy \\n(.l
 | 
						||
.in 0
 | 
						||
.ti \\n(.iu
 | 
						||
.ll \\n(Dyu-\\n(D1u-\\n(D2u-\\n(D3u-\\n(D4u-\\n(Dtn
 | 
						||
.di Dx \}
 | 
						||
..
 | 
						||
.de DE			\" DISPLAY END
 | 
						||
.\"	.DE [$1]
 | 
						||
.			\" $1 = succeeding vertical spacing { \n(VS }
 | 
						||
.ie \\n(DS=0 .Er W ".DE: no matching .DS
 | 
						||
.el \{\
 | 
						||
.br
 | 
						||
.di
 | 
						||
.nf
 | 
						||
.ll +\\n(D2u
 | 
						||
.ie \\n(Dt>0 .ds Da \&\\*(D3\h#\\n(D2u#
 | 
						||
.el .ds Da \&
 | 
						||
.nr Dm \\n(dn 1v
 | 
						||
.nr D2 0 1v
 | 
						||
.ev 0
 | 
						||
.di Dy
 | 
						||
.if \\n(Dt=2 \&\\*(D1\l#\\n(Dyu-\\n(Dxu-\\n(D1u-\\n(D4u-2u*\w'\\*(D1'u\&\\*(D2#\\*(D1
 | 
						||
.if \\n(Dt=2 .mc \\*(D3 \\n(D3u+1n
 | 
						||
.cc 
 | 
						||
Dm
 | 
						||
Dx
 | 
						||
cc
 | 
						||
.rm Dx
 | 
						||
.mc
 | 
						||
.if \\n(Dt=2 \&\\*(D4\l#\\n(Dyu-\\n(Dxu-\\n(D1u-\\n(D4u-2u*\w'\\*(D4'u\&\\*(D2#\\*(D4
 | 
						||
.di
 | 
						||
.ev
 | 
						||
.in \\n(Dxu+\\n(D1u
 | 
						||
.ll \\n(Dyu-\\n(D4u
 | 
						||
.if \\n(Da=0 .if \\n(dn>\\n(.t .bp
 | 
						||
.Dy
 | 
						||
.ie \\n(.$>0 .sp \\$1v
 | 
						||
.el .sp \\n(VSu
 | 
						||
.rs
 | 
						||
.in \\n(Dxu
 | 
						||
.ll \\n(Dyu
 | 
						||
.nr DS 0
 | 
						||
.if \\n(DE>0 .fi
 | 
						||
.ch Id
 | 
						||
.rr DE
 | 
						||
.rr D1
 | 
						||
.rr D2
 | 
						||
.rr D3
 | 
						||
.rr D4
 | 
						||
.rr Da
 | 
						||
.rr Dm
 | 
						||
.rr Dt
 | 
						||
.rr Dx
 | 
						||
.rr Dy
 | 
						||
.rm D1
 | 
						||
.rm D2
 | 
						||
.rm D3
 | 
						||
.rm D4
 | 
						||
.rm Da
 | 
						||
.rm Dy \}
 | 
						||
..
 | 
						||
.de Dt			\" set display parameters
 | 
						||
.			\" $1 = type
 | 
						||
.			\" $2 = mode
 | 
						||
.			\" $3 $4 $5 $6 = D1 D2 D3 D4
 | 
						||
.nr Dt \\$1
 | 
						||
.nr Da \\$2
 | 
						||
.nr D1 \\$3
 | 
						||
.nr D2 \\$4
 | 
						||
.nr D3 \\$5
 | 
						||
.nr D4 \\$6
 | 
						||
.nr DE +1
 | 
						||
..
 | 
						||
.de Dm			\" marking or protecting lines in second diversion
 | 
						||
\\*(Da\c
 | 
						||
ie \\n-(Dm>0 dt \\n+(D2u Dm
 | 
						||
el dt
 | 
						||
..
 | 
						||
.			\" INITIALIZATION
 | 
						||
.nr DB 0
 | 
						||
.\*($0
 | 
						||
.rm $0
 |