MANUAL.mac
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:8k
开发平台:

MultiPlatform

  1. %hoffset=-0.5truemm
  2. %voffset=0.5truecm
  3. %hsize=16truecm
  4. %vsize=23.5truecm
  5. %hsize=13.3truecm
  6. %vsize=19.8truecm
  7. baselineskip 14pt
  8. spaceskip  .4em plus .25em minus .25em
  9. xspaceskip .65em
  10. parskip 11pt plus 1pt minus 1pt
  11. parindent 0pt
  12. defmanual{footnotesize}
  13. def3{ss{}}
  14. defboxit#1{vbox{hrulehbox{vrulekern3ptvbox{#1}kern3ptvrule}hrule}}
  15. defco{hbox{tt // }}
  16. def'{hbox{tt "}}
  17. def<{hbox{tt <}}
  18. def>{hbox{tt >}}
  19. defCC{Craise.08exhbox{tt ++ }}
  20. defCCC{Craise.08exhbox{tt ++}}
  21. defgg{ghbox{tt ++ }}
  22. defnat{hbox{rmvrulekern-0.045em N}}
  23. defreal{hbox{rmvrulekern-0.035em R}}
  24. deftildeop{tilde{}}
  25. def'{^prime}
  26. def+{$+$}
  27. newdimentypewidth
  28. typewidth=2.5cm
  29. newdimencallwidth
  30. callwidth=4.5cm
  31. newdimencallwidthl
  32. callwidthl=textwidth 
  33. advancecallwidthl -typewidth
  34. advancecallwidthl -0.5cm
  35. newdimencreatewidth
  36. createwidth=textwidth
  37. advancecreatewidth -1cm
  38. newdimencreatetextwidth
  39. createtextwidth=textwidth
  40. advancecreatetextwidth -3cm
  41. newdimendescriptwidth
  42. descriptwidth=textwidth
  43. advancedescriptwidth -typewidth
  44. advancedescriptwidth -callwidth
  45. advancedescriptwidth -0.5cm
  46. defsetopdims #1 #2   {typewidth=#1cm
  47.                         callwidth=#2cm
  48.                         descriptwidth=textwidth
  49.                         advancedescriptwidth-typewidth
  50.                         advancedescriptwidth-callwidth
  51.                         advancedescriptwidth-0.5cm
  52.                         callwidthl=textwidth 
  53.                         advancecallwidthl-typewidth
  54.                         advancecallwidthl-0.5cm
  55.                         }
  56. defmanpage #1 #2 #3 {section{#3 (#1)} label{#3}%
  57.                        defparams{#2}ifxparamsempty%
  58.                        gdefname{hbox{$#1$}}%
  59.                        elsegdefname{hbox{$#1${tt <}$#2${tt >}}}%
  60.                        fi }
  61. defdefinition       {bigskippagebreak[1]
  62.                        {bf 1. Definition}
  63.                        parnopagebreak }
  64. defcreation #1      {gdefvar {$#1$}
  65.                        bigskippagebreak[1]
  66.                        {bf 2. Creation}
  67.                        parnopagebreak }
  68. defoperations #1 #2 {bigskippagebreak[1]
  69.                        {bf 3. Operations}
  70.                        setopdims #1 #2
  71.                        parnopagebreak }
  72. defimplementation   {bigskippagebreak[1]
  73.                        {bf 4. Implementation}
  74.                        parnopagebreak }
  75. defexample          {bigskippagebreak[1]
  76.                        {bf 5. Example}
  77.                        parnopagebreak }
  78. defcreate #1 #2     { mbox{name  var$#1$;}par
  79.                        hspace*{1cm}hfill
  80.        parbox[t]{createtextwidth}{sloppy #2}par
  81.                        bigskip }
  82. defop #1 #2 #3 #4    {smallskip
  83.                        parbox[t]{typewidth}{sloppy $#1$}
  84.        parbox[t]{callwidth}{sloppy var.#2$#3$}hfill
  85.                        parbox[t]{descriptwidth}{sloppy #4}hfillpar
  86.                        smallskip}
  87. defopl #1 #2 #3 #4   {smallskip
  88.                        parbox[t]{typewidth}{sloppy $#1$}
  89.        parbox[t]{callwidthl}{sloppy var.#2$#3$}hfillpar
  90.                        hspace*{1cm}hfill
  91.        parbox[t]{descriptwidth}{sloppy #4}hfillpar
  92.                        smallskip}
  93. deffunc #1 #2 #3 #4  {smallskip
  94.                        parbox[t]{typewidth}{sloppy $#1$}
  95.        parbox[t]{callwidth}{sloppy #2$#3$}hfill
  96.        parbox[t]{descriptwidth}{sloppy #4}hfillpar
  97.                        smallskip}
  98. deffuncl #1 #2 #3 #4 {smallskip
  99.                        parbox[t]{typewidth}{sloppy $#1$}
  100.        parbox[t]{callwidthl}{sloppy #2$#3$}hfillpar
  101.                        hspace*{1cm}hfill
  102.        parbox[t]{descriptwidth}{sloppy #4}hfillpar
  103.                        smallskip}
  104. %binary operator function
  105. defbinopfunc #1 #2 #3{smallskip
  106.                        parbox[t]{typewidth}{sloppy $#1$}
  107.        parbox[t]{callwidthl}{sloppy $#2$}hfillpar
  108.                        hspace*{1cm}hfill
  109.        parbox[t]{descriptwidth}{sloppy #3}hfillpar
  110.                        smallskip}
  111. %binary operator
  112. defbinop #1 #2 #3 #4 {smallskip
  113.                         parbox[t]{typewidth}{sloppy $#1$}
  114.         parbox[t]{callwidth}{sloppy var  $#2  #3$}hfill
  115.                         parbox[t]{descriptwidth}{sloppy #4}hfillpar
  116.                         smallskip}
  117. %unary operator
  118. defunop #1 #2 #3    {smallskip
  119.                         parbox[t]{typewidth}{sloppy $#1$}
  120.         parbox[t]{callwidth}{sloppy $#2$ var}hfill
  121.                         parbox[t]{descriptwidth}{sloppy sloppy #3}hfillpar
  122.                         smallskip}
  123. defpostunop #1 #2 #3 {smallskip
  124.                         parbox[t]{typewidth}{sloppy $#1$}
  125.         parbox[t]{callwidth}{sloppy var $#2$}hfill
  126.                         parbox[t]{descriptwidth}{sloppy sloppy #3}hfillpar
  127.                         smallskip}
  128. %operator[]
  129. defarrop #1 #2 #3    {smallskip
  130.                         parbox[t]{typewidth}{sloppy $#1$}
  131.         parbox[t]{callwidth}{sloppy var $[#2]$}hfill
  132.                         parbox[t]{descriptwidth}{sloppy #3}hfillpar
  133.                         smallskip}
  134. %%operator()
  135. deffunop #1 #2 #3    {smallskip
  136.                         parbox[t]{typewidth}{sloppy $#1$}
  137.         parbox[t]{callwidth}{sloppy var $(#2)$}hfill
  138.                         parbox[t]{descriptwidth}{sloppy #3}hfillpar
  139.                         smallskip}
  140. %stream operator
  141. defstrop #1 #2 #3 #4 {smallskip
  142.                         parbox[t]{typewidth}{sloppy $#1$}
  143.         parbox[t]{callwidth}{sloppy $#3  #2$  var}hfill
  144.                         parbox[t]{descriptwidth}{sloppy #4}hfillpar
  145.                         smallskip}
  146. letManpage           manpage
  147. letMdefinition       definition
  148. letMcreation         creation
  149. letMoperations       operations
  150. letMimplementation   implementation
  151. letMexample          example
  152. letMcreate           create
  153. letMop               footnotesize
  154. letMopl              footnotesize
  155. letMfunc             footnotesize
  156. letMfuncl            footnotesize
  157. letMbinop            footnotesize
  158. letMarrop            footnotesize
  159. letMfunop            footnotesize
  160. letMunop             footnotesize
  161. letMbinopfunc        footnotesize
  162. letMunopfunc         footnotesize
  163. defprecond {{it Precondition}: }
  164. defIf       {{bf if} }
  165. defFi       {{bf fi} }
  166. defThen     {{bf then} }
  167. defElse     {{bf else} }
  168. defDo       {{bf do} }
  169. defOd       {{bf od} }
  170. defFor      {{bf for} }
  171. defWhile    {{bf while} }
  172. defReturn   {{bf return} }
  173. defBreak    {{bf return} }
  174. defContinue {{bf continue} }
  175. defCase     {{bf case} }
  176. defSwitch   {{bf switch} }
  177. defClass    {{bf class} }
  178. defStruct   {{bf struct} }
  179. defPublic   {{bf public} }
  180. defFriend   {{bf friend} }
  181. defTypedef  {{bf typedef} }
  182. defn {backslash n}
  183. defLabs  #1  {hbox{$|#1|$}}
  184. defLitem #1  {hbox{{tt <}$#1${tt >} }}
  185. defLvert {|}
  186. % LEDA macros:
  187. defForall         {{bf forall} }
  188. defForallnodes    {{bf forall_nodes} }
  189. defForalledges    {{bf forall_edges} }
  190. defForalladjnodes {{bf forall_adj_nodes} }
  191. defForalladjedges {{bf forall_adj_edges} }
  192. % verbatim
  193. fontttbig= cmtt10 scaled magstephalf
  194. chardefother=12
  195. defttverbatim {
  196. parskip 5pt
  197. catcode`&=other catcode`{=other catcode`}=other
  198. %catcode'\=other 
  199. catcode`$=other catcode`&=other
  200. catcode`#=other catcode`%=other catcode`~=other
  201. catcode`_=other catcode`^=other
  202. obeyspaces obeylines}
  203. % usage:
  204. %
  205. %begingroup
  206. % ttbig
  207. % {obeyspacesgdef { }}
  208. % ttverbatim
  209. %
  210. % ...
  211. %
  212. %endgroup