tmac.q2 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. .\" MACROES FOR POINTS (file tmac.q2)
  2. .\"
  3. .\" Th.A. Zoethout
  4. .\"
  5. .de PM \" DEFINE POINT MARKER
  6. .\" .PM [$1]
  7. . \" $1 = default marker for .PS { - }
  8. .ie \\n(.$>0 .ds Pm \\$1
  9. .el .ds Pm -
  10. ..
  11. .de PS \" LISTS OF POINTS
  12. .\" .PS [ $1 [ $2 [ [$3] $4 ] ] ]
  13. . \" $1 = marker or conversion with .af { \*(Pm }
  14. . \" conversions: 1 i I a A (- denotes marker from .PM)
  15. . \" $2 = indentation {\n(IN }
  16. . \" $3 = point prefix { }
  17. . \" $4 = point suffix { }
  18. .ie \\n(PS=9 .Er W ".PS: maximum nesting is 9
  19. .el \{\
  20. .nr PS +1
  21. .ie \\n(.$>0 .ds P\\n(PS \\$1
  22. .el .ds P\\n(PS -
  23. .nr P\\n(PS 0
  24. .if \&\\*(P\\n(PS\&1\& .nr P\\n(PS 1
  25. .if \&\\*(P\\n(PS\&i\& .nr P\\n(PS 1
  26. .if \&\\*(P\\n(PS\&I\& .nr P\\n(PS 1
  27. .if \&\\*(P\\n(PS\&a\& .nr P\\n(PS 1
  28. .if \&\\*(P\\n(PS\&A\& .nr P\\n(PS 1
  29. .if \&\\*(P\\n(PS\&-\& .ds P\\n(PS \\*(Pm
  30. .nr P\\n(PS -1
  31. .if \\n(P\\n(PS=0 .nr P\\n(PS 0 1
  32. .af P\\n(PS \\*(P\\n(PS
  33. .nr I\\n(PS \\n(IN
  34. .if \\n(.$>1 .if !\&\\$2\&-\& .nr I\\n(PS \\$2n
  35. .ds I\\n(PS "
  36. .ds M\\n(PS "
  37. .if \\n(.$=3 .ds M\\n(PS \\$3
  38. .if \\n(.$=4 .ds I\\n(PS \\$3
  39. .if \\n(.$=4 .ds M\\n(PS \\$4
  40. .ch Id
  41. .in +\\n(I\\n(PSu \}
  42. ..
  43. .de PT \" A HANGING POINT
  44. .\" .PT [ $1 ... ]
  45. . \" $1 = substitute for specification with .PS and .PM
  46. .ie \\n(PS=0 .Er W ".PT: no matching .PS
  47. .el \{\
  48. .ie \\n(.$>0 .Ct \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  49. .el .ie \\n(P\\n(PS<0 .ds St \\*(I\\n(PS\\*(P\\n(PS\\*(M\\n(PS
  50. .el \{\
  51. .af P\\n(PS \\*(P\\n(PS
  52. .ds St \\*(I\\n(PS\\n+(P\\n(PS\\*(M\\n(PS
  53. .af P\\n(PS 1\}
  54. .ch Id
  55. .if \\n(NS=0 .sp \\n(VPu
  56. .nr NS 0
  57. .ne \\n(NDv+1v
  58. .ti -\\n(I\\n(PSu
  59. .ie (\\w\&\\*(St\&)>(\\n(I\\n(PS) \{\
  60. \&\\*(St
  61. .br \}
  62. .el \&\\*(St\h#\\n(I\\n(PSu-\w\&\\*(St\&u#\c
  63. .rs
  64. .rm St \}
  65. ..
  66. .de PI \" AN INDENTED POINT
  67. .\" .PI [ $1 ... ]
  68. . \" $1 = substitute for specification with .PS and .PM
  69. .ie \\n(PS=0 .Er W ".PI: no matching .PS
  70. .el \{\
  71. .ie \\n(.$>0 .Ct \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  72. .el .ie \\n(P\\n(PS<0 .ds St \\*(I\\n(PS\\*(P\\n(PS\\*(M\\n(PS
  73. .el \{\
  74. .af P\\n(PS \\*(P\\n(PS
  75. .ds St \\*(I\\n(PS\\n+(P\\n(PS\\*(M\\n(PS
  76. .af P\\n(PS 1\}
  77. .ch Id
  78. .if \\n(NS=0 .sp \\n(VPu
  79. .nr NS 0
  80. .ne \\NDv
  81. \&\\*(St\ \ \c
  82. .nr Id \w\&\\*(St\ \ \&
  83. .ie !\&\\n(.z\&\& .dt \\n(.du+1v Id
  84. .el .wh \\n(nlu+1v Id
  85. .rs
  86. .rm St \}
  87. ..
  88. .de PE \" END LIST OF POINTS
  89. .\" .PE [$1]
  90. . \" $1 = ending vertical spacings { n\(Ps }
  91. .ie \\n(PS=0 .Er W ".PE: no matching .PS
  92. .el \{\
  93. .in -\\n(I\\n(PSu
  94. .rr P\\n(PS
  95. .rr I\\n(PS
  96. .rm P\\n(PS
  97. .rm M\\n(PS
  98. .rm I\\n(PS
  99. .nr PS -1
  100. .ie \\n(.$>0 .sp \\$1v
  101. .el .sp \\n(VPu \}
  102. .ch Id
  103. ..
  104. .de Pe \" end all point levels
  105. .if \\n(PS>0 \{\
  106. .PE 0
  107. .Pe \}
  108. ..
  109. .de Id \" trap macro for indented points
  110. \\*(Ncti \\n(.iu+\\n(Idu \" This calls ti
  111. .ie !\&\\n(.z\&\& .dt
  112. .el .ch Id
  113. ..
  114. . \" INITIALIZATION
  115. .ds Pm -
  116. .\*($0
  117. .rm $0