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

  1. '\"#ident    "@(#)//usr/ucblib/doctools/tmac/boston.toc.sl 1.1 4.0 12/08/90 13663 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. .\" @(#)boston.toc 1.2 86/04/28 SMI; Sun's macro package for Boston
  21. .    \"  CE - table of contents entry
  22. .    \"  $1 : header type: C = Chapter, A = Appendix, N = Numbered Heading,
  23. .    \"                    T = Table, F = Figure
  24. .    \"  $2 : level number (not much use for tables and figures)
  25. .    \"  $3 : text 
  26. .    \"  $4 : page number
  27. .    \"  $5 : chapter number
  28. .    \"  $6 ... : other numbers -- table and figure number for example
  29. .de CE
  30. .ll \\n(LLu
  31. .fi
  32. .na
  33. .nh
  34. .                    \"  set up page number
  35. .ds rS \\$4
  36. .                    \"  first level headers: bold numbers
  37. .if '\\$1'C' .ds rS \fB\\$4\fP
  38. .if '\\$1'A' .ds rS \fB\\$4\fP
  39. .if '\\$1'N' .if '\\$2'1' .ds rS \fB\\$4\fP
  40. .                    \"  set up left string indents
  41. .rm lS
  42. .if '\\$1'N' \{\
  43. .if '\\$2'2'  .ds  lS  "    
  44. .if '\\$2'3'  .if \\nB .ds  lS  "          
  45. .if '\\$2'3'  .if \\nU .ds  lS  "              
  46. .if '\\$2'4'  .ds  lS  "                  
  47. .if '\\$2'5'  .ds  lS  "                   
  48. .nr tf 0 \}
  49. .if '\\$1'T' \{\
  50. .ds lS Table
  51. .nr tf 1 \}
  52. .if '\\$1'F' \{\
  53. .ds lS Figure
  54. .nr tf 1 \}
  55. .if \\n(tf=1 \{\
  56. .    if !\\$5\\*(oS .sp
  57. .    ds oS \\$5
  58. .if !\\$50 .as lS " \\$5-\\$6\ \ 
  59. .if \\$50 .as lS " \\$6\ \ 
  60. .if '\\$1'F' .ds lS Figure \\$5-\\$6\ \  \}
  61. .nr NS 0
  62. .if '\\$1'C' .nr NS 1
  63. .if '\\$1'A' .nr NS 1
  64. .if !\\nH=1 .if '\\$1'U' .if '\\$2'1' .sp
  65. .if !\\nH=1 .if \\n(NS=1 \{\
  66. .if '\\$1'C' .ds lS \fBChapter \\$5\fP\ \ 
  67. .if '\\$1'A' .ds lS \fBAppendix \\$5\fP\ \ 
  68. .sp \}
  69. .if \\nH=1 .if \\n(NS=1 \{\
  70. .nr cF 1
  71. .  \".pn \\$4-2
  72. .  \".nr PN \\$4-2
  73. .bp
  74. .rs
  75. .CB "\\$3"  "\\$5"
  76. .SL 8.0i-\\n(.vu  4.0i  32  0.70
  77. .rm lS
  78. . \}
  79. .                \"  Reduce line length
  80. .sp 3p
  81. .ne 3v
  82. .nr wN \\w\\*(lSu        \"  wN = width of left indent string
  83. .ll -8n  \"try 8 ens for now
  84. .in +\\n(wNu
  85. .ti -\\n(wNu            \"  don't indent first line
  86. .if \\nH=1 .if \\n(NS=1 .sp |3.5i-3p-4p
  87. .                \"  First level headers in larger point size
  88. .ds mS \\$3
  89. .if \\n(NS=1 .if \\nB .ds mS \\s11\\$3\\s0
  90. .if \\n(NS=1 .if \\nB .ds lS \\s11\\*(lS\\s0
  91. .if \\n(NS=1 .if \\nB .ds rS \\s11\\*(rS\\s0
  92. .if \\n(NS=1 .if \\nU .ds mS \\s12\\$3\\s0
  93. .if \\n(NS=1 .if \\nU .ds lS \\s12\\*(lS\\s0
  94. .if \\n(NS=1 .if \\nU .ds rS \\s12\\*(rS\\s0
  95. .                \"  Output indent string (lS) and
  96. .                \"  text ($3) with short line length
  97. \&\\*(lS\\*(mS
  98. .if \\nH=1 .if \\n(NS=1 .br
  99. .vs \\n(.sp+3p            \"  normalize spacing
  100. .                \"  We need at least two lines for this
  101. .                \"  'moving-backward' hack to work:
  102. .ne 2v
  103. .                \"  Restore line length and indent
  104. .ll
  105. .in
  106. .                \"  Go back to previous line, output leader & page number:
  107. .nf                \"  leaders only work right in no-fill mode!
  108. .                \"  If last line broke, correct for indent:
  109. .if (\\w\\*(lS\\*(mSu)<=(\\n(.lu-\\n(.iu-8n) .nr wN 0
  110. .ll -\\n(wNu
  111. .ti +\\n(wNu
  112. .ta \\n(.lu-\\n(.iu-5nR \\n(.lu-\\n(.iuR
  113. .sp -1v
  114. .vs                \"(now can restore original vertical spacing)
  115. \\h'|\\n(.nu+.5n'\s-3\a\s+3\t\\*(rS
  116. .if \\nH=1 .if \\n(NS=1 .sp 0.25i
  117. .                \"Restore line length (again):
  118. .ll
  119. ..
  120.