Commit | Line | Data |
---|---|---|
60b9c768 WJ |
1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)checknr.1 6.6 (Berkeley) 3/14/91 | |
33 | .\" | |
34 | .Dd March 14, 1991 | |
35 | .Dt CHECKNR 1 | |
36 | .Os BSD 4 | |
37 | .Sh NAME | |
38 | .Nm checknr | |
39 | .Nd check nroff/troff files | |
40 | .Sh SYNOPSIS | |
41 | .Nm checknr | |
42 | .Op Fl a Ns Ar \&.x1.y1.x2.y2. ... \&.xn.yn | |
43 | .Op Fl c Ns Ar \&.x1.x2.x3 ... \&.xn | |
44 | .Op Fl s | |
45 | .Op Fl f | |
46 | .Ar file | |
47 | .Sh DESCRIPTION | |
48 | .Nm Checknr | |
49 | checks a list of | |
50 | .Xr nroff 1 | |
51 | or | |
52 | .Xr troff 1 | |
53 | input files for certain kinds of errors | |
54 | involving mismatched opening and closing delimiters | |
55 | and unknown commands. | |
56 | If no files are specified, | |
57 | .Nm checknr | |
58 | checks the standard input. | |
59 | .Pp | |
60 | Options: | |
61 | .Bl -tag -width Ds | |
62 | .It Fl a | |
63 | Add additional pairs of macros to the list of known macros. | |
64 | This must be followed by groups of six characters, each group defining | |
65 | a pair of macros. | |
66 | The six characters are | |
67 | a period, | |
68 | the first macro name, | |
69 | another period, | |
70 | and the second macro name. | |
71 | For example, to define a pair .BS and .ES, use | |
72 | .Sq Li \-a.BS.ES | |
73 | .It Fl c | |
74 | Define commands which would otherwise be complained about | |
75 | as undefined. | |
76 | .It Fl f | |
77 | Request | |
78 | .Nm checknr | |
79 | to ignore | |
80 | .Ql\ef | |
81 | font changes. | |
82 | .It Fl s | |
83 | Ignore | |
84 | .Ql \es | |
85 | size changes. | |
86 | .El | |
87 | .Pp | |
88 | Delimeters checked are: | |
89 | .Bl -enum | |
90 | .It | |
91 | Font changes using \efx ... \efP. | |
92 | .It | |
93 | Size changes using \esx ... \es0. | |
94 | .It | |
95 | Macros that come in open ... close forms, for example, | |
96 | the .TS and .TE macros which must always come in pairs. | |
97 | .El | |
98 | .Pp | |
99 | .Nm Checknr | |
100 | is intended for use on documents that are prepared with | |
101 | .Nm checknr | |
102 | in mind, much the same as | |
103 | .Xr lint 1 . | |
104 | It expects a certain document writing style for | |
105 | .Ql \ef | |
106 | and | |
107 | .Ql \es | |
108 | commands, | |
109 | in that each | |
110 | .Ql \efx | |
111 | must be terminated with | |
112 | .Ql \efP | |
113 | and | |
114 | each | |
115 | .Ql \esx | |
116 | must be terminated with | |
117 | .Ql \es0 . | |
118 | While it will work to directly go into the next font or explicitly | |
119 | specify the original font or point size, | |
120 | and many existing documents actually do this, | |
121 | such a practice will produce complaints from | |
122 | .Nm checknr . | |
123 | Since it is probably better to use the | |
124 | .Ql \efP | |
125 | and | |
126 | .Ql \es0 | |
127 | forms anyway, | |
128 | you should think of this as a contribution to your document | |
129 | preparation style. | |
130 | .Pp | |
131 | .Nm Checknr | |
132 | knows about the | |
133 | .Xr ms 7 | |
134 | and | |
135 | .Xr me 7 | |
136 | macro packages. | |
137 | .Sh SEE ALSO | |
138 | .Xr nroff 1 , | |
139 | .Xr troff 1 , | |
140 | .Xr checkeq 1 , | |
141 | .Xr ms 7 , | |
142 | .Xr me 7 | |
143 | .Sh DIAGNOSTICS | |
144 | .Bd -ragged -compact | |
145 | Complaints about unmatched delimiters. | |
146 | Complaints about unrecognized commands. | |
147 | Various complaints about the syntax of commands. | |
148 | .Ed | |
149 | .Sh BUGS | |
150 | There is no way to define a 1 character macro name using | |
151 | .Fl a . | |
152 | .Pp | |
153 | Does not correctly recognize certain reasonable constructs, | |
154 | such as conditionals. | |
155 | .Sh HISTORY | |
156 | The | |
157 | .Nm | |
158 | command appeared in | |
159 | .Bx 4.0 . |