BSD 4_2 development
[unix-history] / usr / man / man1 / checknr.1
CommitLineData
b6f64eb4
C
1.TH CHECKNR 1 "5 April 1980"
2.UC 4
3.SH NAME
4checknr \- check nroff/troff files
5.SH SYNOPSIS
6.B checknr
7[
8.B \-s
9] [
10.B \-f
11] [
12.BR \-a ".x1.y1.x2.y2. ... .xn.yn"
13] [
14.BR \-c ".x1.x2.x3 ... .xn"
15] [
16\fIfile\fP ...
17]
18.SH DESCRIPTION
19.I Checknr
20checks a list of
21.IR nroff (1)
22or
23.IR troff (1)
24input files for certain kinds of errors
25involving mismatched opening and closing delimiters
26and unknown commands.
27If no files are specified,
28.I checknr
29checks the standard input.
30Delimeters checked are:
31.IP (1)
32Font changes using \efx ... \efP.
33.IP (2)
34Size changes using \esx ... \es0.
35.IP (3)
36Macros that come in open ... close forms, for example,
37the .TS and .TE macros which must always come in pairs.
38.PP
39.I Checknr
40knows about the
41.IR ms (7)
42and
43.IR me (7)
44macro packages.
45.PP
46Additional pairs of macros can be added to the list using the
47.B \-a
48option.
49This must be followed by groups of six characters, each group defining
50a pair of macros.
51The six characters are
52a period,
53the first macro name,
54another period,
55and the second macro name.
56For example, to define a pair .BS and .ES, use \-\fBa\fP.BS.ES
57.PP
58The
59.B \-c
60option defines commands which would otherwise be complained about
61as undefined.
62.PP
63The
64.B \-f
65option requests
66.I checknr
67to ignore \ef font changes.
68.PP
69The
70.B \-s
71option requests
72.I checknr
73to ignore \es size changes.
74.PP
75.I Checknr
76is intended to be used on documents that are prepared with
77.I checknr
78in mind, much the same as
79.I lint.
80It expects a certain document writing style for \ef and \es commands,
81in that each \efx must be terminated with \efP and
82each \esx must be terminated with \es0.
83While it will work to directly go into the next font or explicitly
84specify the original font or point size,
85and many existing documents actually do this,
86such a practice will produce complaints from
87.I checknr.
88Since it is probably better to use the \efP and \es0 forms anyway,
89you should think of this as a contribution to your document
90preparation style.
91.SH SEE\ ALSO
92nroff(1), troff(1), checkeq(1), ms(7), me(7)
93.SH DIAGNOSTICS
94Complaints about unmatched delimiters.
95.br
96Complaints about unrecognized commands.
97.br
98Various complaints about the syntax of commands.
99.SH AUTHOR
100Mark Horton
101.SH BUGS
102There is no way to define a 1 character macro name using
103.BR \-a .
104.br
105Does not correctly recognize certain reasonable constructs,
106such as conditionals.