home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 25.ddi / root.2 / usr / ucblib / doctools / tmac / exp.toc < prev    next >
Encoding:
Text File  |  1990-12-20  |  3.3 KB  |  142 lines

  1. '\"#ident    "@(#)//usr/ucblib/doctools/tmac/exp.toc.sl 1.1 4.0 12/08/90 48231 AT&T-USL"
  2. '\"        PROPRIETARY NOTICE (Combined)
  3. '\"
  4. '\"This source code is unpublished proprietary information
  5. '\"constituting, or derived under license from AT&T's UNIX(r) System V.
  6. '\"In addition, portions of such source code were derived from Berkeley
  7. '\"4.3 BSD under license from the Regents of the University of
  8. '\"California.
  9. '\"
  10. '\"
  11. '\"
  12. '\"        Copyright Notice 
  13. '\"
  14. '\"Notice of copyright on this source code product does not indicate 
  15. '\"publication.
  16. '\"
  17. '\"    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  18. '\"    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  19. '\"              All rights reserved.
  20. .    \" CE - table of contents entry
  21. .    \" $1: header type: C=Chapter A=Appendix N=NumHdr T=Table F=Figure
  22. .    \" $2: level number (not much use for tables and figures)
  23. .    \" $3: text 
  24. .    \" $4: page number
  25. .    \" $5: chapter number
  26. .    \" $6...: other numbers (table and figure number for example)
  27. .de CE
  28. .fi
  29. .na
  30. .nh
  31. .                    \" set up page number
  32. .ds rS \\$4
  33. .                    \" first level headers: bold numbers
  34. .if '\\$1'C' .ds rS \fB\\$4\fP
  35. .if '\\$1'A' .ds rS \fB\\$4\fP
  36. .if '\\$1'N' .if '\\$2'1' .ds rS \fB\\$4\fP
  37. .                    \" set up left string indents
  38. .rm lS
  39. .if '\\$1'N' \{\
  40. .    if '\\$2'2' .ds lS "    \\$5.\\$6.  
  41. .    if '\\$2'3' .ds lS "              
  42. .    if '\\$2'4' .ds lS "                  
  43. .    if '\\$2'5' .ds lS "                   
  44. .    nr tf 0
  45. .\}
  46. .if '\\$1'T' \{\
  47. .    ds lS Table
  48. .    nr tf 1
  49. .\}
  50. .if '\\$1'F' \{\
  51. .    ds lS Figure
  52. .    nr tf 1
  53. .\}
  54. .if \\n(tf=1 \{\
  55. .    if !\\$5\\*(oS .sp
  56. .    ds oS \\$5
  57. .    if !\\$50 .as lS " \\$5-\\$6\ \ 
  58. .    if \\$50 .as lS " \\$6\ \ 
  59. .    if '\\$1'F' .ds lS Figure \\$5-\\$6\ \ 
  60. .\}
  61. .nr NS 0
  62. .if '\\$1'C' .nr NS 1
  63. .if '\\$1'A' .nr NS 1
  64. .if !\\nH=1 .if \\n(NS=1 \{\
  65. .    if '\\$1'C' .ds lS \fBChapter \\$5\fP\ \ 
  66. .    if '\\$1'A' .ds lS \fBAppendix \\$5\fP\ \ 
  67. .    sp
  68. .\}
  69. .if \\nH=1 .if \\n(NS=1 \{\
  70. .    nr cF 1
  71. .    bp
  72. .    po \\n(POu
  73. .    PL LEFT
  74. .    \" lay down gray bar
  75. \!x P gsave
  76. \!x P 6.0 576 mul  0.0 moveto
  77. \!x P 8.5 576 mul  0.0 lineto
  78. \!x P 8.5 576 mul 11.0 576 mul lineto
  79. \!x P 6.0 576 mul 11.0 576 mul lineto
  80. \!x P 6.0 576 mul  0.0 lineto
  81. \!x P 0.99 setgray fill grestore
  82. .    \" lay down logo
  83. .    rs
  84. .    sp |9i-\\n(.vu
  85. .    ps 128
  86. \!x P gsave 0.70 setgray
  87. \h'5.5i'\(su
  88. \!x P grestore
  89. .    ps
  90. .    GB 0.75i 5.75i
  91. .    sp |2.0i-\\n(.vu
  92. \s36\l'5i'\s0
  93. .    sp |2.0i-0.125i-\\n(.vu
  94. .    ps 48
  95. .    ta \\n(LLuR
  96.     \&\\$5
  97. .    br
  98. .    ps 22
  99. .    vs 26
  100. .    sp |2.5i-4p-5.5p
  101. \&\\$3
  102. .    br
  103. .    rm lS
  104. .    ps 11
  105. .    vs
  106. .\}
  107. .                \" reduce line length (8n for now)
  108. .ll -8n
  109. .sp 3p
  110. .ne 3v
  111. .nr wN \\w\\*(lSu        \" wN = width of left indent string
  112. .in +\\n(wNu
  113. .ti -\\n(wNu            \" don't indent first line
  114. .if \\nH=1 .if \\n(NS=1 .sp |3.5i-3p-4p
  115. .                \" first level headers in larger point size
  116. .ds mS \\$3
  117. .if \\n(NS=1 .ds mS \s+1\\$3\s-1
  118. .if \\n(NS=1 .ds lS \s+1\\*(lS\s-1
  119. .if \\n(NS=1 .ds rS \s+1\\*(rS\s-1
  120. .                \" output left string (lS) and text (mS)
  121. \&\\*(lS\\*(mS
  122. .if \\nH=1 .if \\n(NS=1 .br
  123. .vs \\n(.sp+3p            \" normalize spacing
  124. .                \" need two lines for moving-backward hack
  125. .ne 2v
  126. .ll
  127. .in
  128. .                \" output leader & page number
  129. .nf                \" leaders only work right in no-fill mode!
  130. .                \" if last line broke, correct for indent:
  131. .if (\\w\\*(lS\\*(mSu)<=(\\n(.lu-\\n(.iu-8n) .nr wN 0
  132. .ll -\\n(wNu
  133. .ti +\\n(wNu
  134. .ie \w\\*(rSu>5n .ta \\n(.lu-\\n(.iu-\w\\*(rSu-1nR \\n(.lu-\\n(.iuR
  135. .el .ta \\n(.lu-\\n(.iu-5nR \\n(.lu-\\n(.iuR
  136. .sp -1v
  137. .vs
  138. \\h'|\\n(.nu+.5n'\s-3\a\s+3\t\\*(rS
  139. .if \\nH=1 .if \\n(NS=1 .sp 0.25i
  140. .ll
  141. ..
  142.