home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / extensions / PEX / SI / ex.toc < prev    next >
Encoding:
Text File  |  1991-07-24  |  4.5 KB  |  167 lines

  1. \."
  2. \." $XConsortium: ex.toc,v 5.2 91/07/24 16:20:51 rws Exp $
  3. \."
  4. \." 
  5. \." Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
  6. \." 
  7. \."                         All Rights Reserved
  8. \." 
  9. \." Permission to use, copy, modify, and distribute this software and its 
  10. \." documentation for any purpose and without fee is hereby granted, 
  11. \." provided that the above copyright notice appear in all copies and that
  12. \." both that copyright notice and this permission notice appear in 
  13. \." supporting documentation, and that the names of Sun Microsystems,
  14. \." the X Consortium, and MIT not be used in advertising or publicity 
  15. \." pertaining to distribution of the software without specific, written 
  16. \." prior permission.  
  17. \." 
  18. \." SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
  19. \." INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  20. \." EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. \." CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. \." USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. \." OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  24. \." PERFORMANCE OF THIS SOFTWARE.
  25. . \"@(#)exp.toc 1.11 89/07/05 SMI; The Sun Macro Package
  26. .    \" CE - table of contents entry
  27. .    \" $1: header type: C=Chapter A=Appendix N=NumHdr T=Table F=Figure
  28. .    \" $2: level number (not much use for tables and figures)
  29. .    \" $3: text 
  30. .    \" $4: page number
  31. .    \" $5: chapter number
  32. .    \" $6...: other numbers (table and figure number for example)
  33. .de CE
  34. .fi
  35. .na
  36. .nh
  37. .        \" page number (level 1 bold)
  38. .ds rS \\$4
  39. .if !'\\$1'T' .if !'\\$1'F' .if '\\$2'1' .ds rS \fB\\$4\fP
  40. .rm lS
  41. .        \" left string indents
  42. .\" 10-27-90: To get third-level entries indented properly, we
  43. .\" need to fox around a little.  The macro "Az"
  44. .\" recursively defines a string "Aw" of "\0" characters
  45. .\" that is the equivalent width of arguments 5, 6, and two periods.
  46. .\" (We assume that a single \0 is the equivalent of two periods.)
  47. .\" -- JH
  48. .if '\\$1'N' .if !'\\$5'' .if !'\\$6'' \{\
  49. .nr Aw (\w\\$5.\\$6./\w\0) 1
  50. .ds Aw "\0
  51. .Az
  52. .\}
  53. .        \" left string indents
  54. .if '\\$1'N' \{\
  55. .    if '\\$2'2' .ds lS "    \\$5.\\$6.  
  56. .    if '\\$2'3' .ds lS "    \\*(Aw  \\$5.\\$6.\\$7.  
  57. .    if '\\$2'4' .ds lS "                  
  58. .    if '\\$2'5' .ds lS "                   
  59. .    if '\\$2'2' .if \\nM>1 .ds lS "    \\$6.  
  60. .    nr tf 0
  61. .\}
  62. .if '\\$1'T' \{\
  63. .    ds lS Table
  64. .    nr tf 1
  65. .\}
  66. .if '\\$1'F' \{\
  67. .    ds lS Figure
  68. .    nr tf 1
  69. .\}
  70. .if \\n(tf=1 \{\
  71. .    if !\\$5\\*(oS .sp
  72. .    ds oS \\$5
  73. .    if !\\$50 .as lS " \\$5-\\$6\ \ 
  74. .    if \\$50 .as lS " \\$6\ \ 
  75. .    if '\\$1'F' .ds lS Figure \\$5-\\$6\ \ 
  76. .\}
  77. .nr NS 0
  78. .if \\$3\fBIndex\f1 .sp
  79. .if '\\$1'C' .nr NS 1
  80. .if '\\$1'A' .nr NS 1
  81. .if !\\nH=1 .if \\n(NS=1 \{\
  82. .    if '\\$1'C' .ds lS \fBChapter \\$5\fP\ \ 
  83. .    if '\\$1'A' .ds lS \fBAppendix \\$5\fP\ \ 
  84. .    sp
  85. .\}
  86. .if \\nH=1 .if \\n(NS=1 \{\
  87. .    nr cH 1
  88. .    bp
  89. .    po \\n(POu
  90. .    PL LEFT
  91. .    \" lay down gray bar
  92. \!x P gsave
  93. \!x P 6.0 576 mul  0.0 moveto
  94. \!x P 8.5 576 mul  0.0 lineto
  95. \!x P 8.5 576 mul 11.0 576 mul lineto
  96. \!x P 6.0 576 mul 11.0 576 mul lineto
  97. \!x P 6.0 576 mul  0.0 lineto
  98. \!x P 0.99 setgray fill grestore
  99. .    \" lay down logo
  100. .    rs
  101. .    sp |9i-\\n(.vu
  102. .    ps 128
  103. \!x P gsave 0.70 setgray
  104. \h'5.5i'\(su
  105. \!x P grestore
  106. .    ps
  107. .    GB 0.75i 5.75i
  108. .    sp |2.0i-\\n(.vu
  109. \s36\l'5i'\s0
  110. .    sp |2.0i-0.125i-\\n(.vu
  111. .    ps 48
  112. .    ta \\n(LLuR
  113.     \&\\$5
  114. .    br
  115. .    ps 22
  116. .    vs 26
  117. .    sp |2.5i-4p-5.5p
  118. \&\\$3
  119. .    br
  120. .    rm lS
  121. .    ps 11
  122. .    vs
  123. .\}
  124. .                \" reduce line length (8n for now)
  125. .ll -8n
  126. .sp 3p
  127. .ne 3v
  128. .nr wN \\w\\*(lSu        \" wN = width of left indent string
  129. .in +\\n(wNu
  130. .ti -\\n(wNu            \" don't indent first line
  131. .if \\nH=1 .if \\n(NS=1 .sp |3.5i-3p-4p
  132. .                \" first level headers in larger point size
  133. .ds mS \\$3
  134. .if \\n(NS=1 .ds mS \s+1\\$3\s-1
  135. .if \\n(NS=1 .ds lS \s+1\\*(lS\s-1
  136. .if \\n(NS=1 .ds rS \s+1\\*(rS\s-1
  137. .                \" output left string (lS) and text (mS)
  138. \&\\*(lS\\*(mS
  139. .if \\nH=1 .if \\n(NS=1 .br
  140. .vs \\n(.sp+3p            \" normalize spacing
  141. .                \" need two lines for moving-backward hack
  142. .ne 2v
  143. .ll
  144. .in
  145. .                \" output leader & page number
  146. .nf                \" leaders only work right in no-fill mode!
  147. .                \" if last line broke, correct for indent:
  148. .if (\\w\\*(lS\\*(mSu)<=(\\n(.lu-\\n(.iu-8n) .nr wN 0
  149. .ll -\\n(wNu
  150. .ti +\\n(wNu
  151. .ie \w\\*(rSu>5n .ta \\n(.lu-\\n(.iu-\w\\*(rSu-1nR \\n(.lu-\\n(.iuR
  152. .el .ta \\n(.lu-\\n(.iu-5nR \\n(.lu-\\n(.iuR
  153. .sp -1v
  154. .vs
  155. \\h'|\\n(.nu+.5n'\s-3\a\s+3\t\\*(rS
  156. .if \\nH=1 .if \\n(NS=1 .sp 0.25i
  157. .ll
  158. ..
  159. .\"
  160. .\" Define Macro Az to help in aligning third-level entries.
  161. .de Az
  162. 'if \\n-(Aw \{\
  163. 'as Aw \0
  164. 'Az
  165. '\}
  166. ..
  167.