797887188c8c2b979002be8d9607b40ee77ede9a
[platform/upstream/groff.git] / contrib / mm / NOTES
1     Copyright (C) 1989-2014  Free Software Foundation, Inc.
2
3     Copying and distribution of this file, with or without modification,
4     are permitted in any medium without royalty provided the copyright
5     notice and this notice are preserved.
6
7 ######################################################################
8
9 Beware!
10 This may be old information. Trust only the source. :-)
11
12 Implementation notes. (Or how to make your own national mm)
13
14 Different commands:
15
16 COVER [arg]
17 MT [arg [addressee]]
18 The arg is part of a filename in mm/*.MT or mm/*.cov.
19 This file is read when the macro is executed. Therefore it must be
20 put before any text output.
21 In each file there are definitions of all extra macros needed for the
22 cover sheet. MT files is only for compatibility reasons, and has several
23 limits due to that it don't know when the cover starts, and cannot
24 change sizes. Use COVER for new coversheet macros.
25
26 But with MT it is possible to write all of the AT&T covers.
27 An example can be found in mm/0.MT.
28
29 When writing a new cover using COVER, have in mind that the cover
30 should print the page with the COVEND macro. This macro
31 should be defined by the new macrofile.
32
33 Here is a part of ms.cov:
34 > .\"-----------------
35 > .de COVEND
36 > .sp |4.2c
37 > .cov@print-title
38 > .cov@print-authors
39 > .cov@print-firm
40 > .cov@print-abstract
41 > .cov@print-date
42 This is important, since COVER disables the page header.
43 > .pg@enable-top-trap
44 Should begin with page one (normally).
45 > .bp 1
46 And enable the trap at the page footer.
47 > .pg@enable-trap
48 > ..
49
50 #########################
51
52 Variables for covers:
53 I = integer
54 S = string
55 D = diversion
56 M = macro
57
58 Name                    Type    Desc.
59 cov*au                  I       The number of authors.
60
61 cov*title               M       Title collected with .TL.
62
63 cov*au!x!y              S       Author(s) given to .AU
64 cov*at!x!y              S       Author(s) title given to .AT
65                                 x is the author-index [1-cov*au],
66                                 y is the argument-index [1-9].
67                                 Look at the table with indexes.
68
69 cov*firm                I       Author(s) firm.
70
71 cov*abs-arg             I       Argument to abstract.
72
73 cov*abs-ind             I       Indent for abstract.
74
75 cov*abs-name            S       The string 'ABSTRACT', changed with .AST
76
77 cov*abstract            M       The abstract.
78
79 cov*new-date            S       The date (todays date if ND is not used)
80
81 cov*mt-type             S       MT type
82 cov*mt-addresse         S       MT addressee
83
84
85 ##########################
86 Argument-index for cov*au:
87
88 Index           Desc.
89 1               name
90 2               initials
91 3               location
92 4               department
93 5               extension
94 6               room
95 7               arg 7
96 8               arg 8
97 9               arg 9
98
99 The location is set to the contents of string cov*location-xxxx
100 if location is equal to xxxx and cov*location-xxxx is defined
101 in the file locale.
102
103
104 Argument-index for cov*at:
105
106 Index           Desc.
107 1               title 1
108 .               .
109 .               .
110 9               title 9
111
112
113 ### Emacs settings
114 Local Variables:
115 mode: text
116 End: