add argument/usage message, correct exit status
[unix-history] / usr / src / usr.bin / checknr / checknr.1
CommitLineData
f7a60349
KB
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
9138d903 3.\"
f7a60349
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)checknr.1 6.3 (Berkeley) %G%
9138d903 17.\"
dafc988e 18.TH CHECKNR 1 ""
9138d903
KM
19.UC 4
20.SH NAME
21checknr \- check nroff/troff files
22.SH SYNOPSIS
23.B checknr
24[
25.B \-s
26] [
27.B \-f
28] [
29.BR \-a ".x1.y1.x2.y2. ... .xn.yn"
30] [
31.BR \-c ".x1.x2.x3 ... .xn"
e94dc177 32] [
9138d903 33\fIfile\fP ...
e94dc177 34]
9138d903
KM
35.SH DESCRIPTION
36.I Checknr
37checks a list of
38.IR nroff (1)
39or
40.IR troff (1)
41input files for certain kinds of errors
42involving mismatched opening and closing delimiters
43and unknown commands.
e94dc177
KM
44If no files are specified,
45.I checknr
46checks the standard input.
9138d903
KM
47Delimiters checked are:
48.IP (1)
49Font changes using \efx ... \efP.
50.IP (2)
51Size changes using \esx ... \es0.
52.IP (3)
53Macros that come in open ... close forms, for example,
54the .TS and .TE macros which must always come in pairs.
55.PP
56.I Checknr
57knows about the
58.IR ms (7)
59and
60.IR me (7)
61macro packages.
62.PP
63Additional pairs of macros can be added to the list using the
64.B \-a
65option.
66This must be followed by groups of six characters, each group defining
67a pair of macros.
68The six characters are
69a period,
70the first macro name,
71another period,
72and the second macro name.
73For example, to define a pair .BS and .ES, use \-\fBa\fP.BS.ES
74.PP
75The
76.B \-c
77option defines commands which would otherwise be complained about
78as undefined.
79.PP
80The
81.B \-f
82option requests
83.I checknr
84to ignore \ef font changes.
85.PP
86The
87.B \-s
88option requests
89.I checknr
90to ignore \es size changes.
91.PP
92.I Checknr
93is intended to be used on documents that are prepared with
94.I checknr
95in mind, much the same as
96.I lint.
97It expects a certain document writing style for \ef and \es commands,
98in that each \efx must be terminated with \efP and
99each \esx must be terminated with \es0.
100While it will work to directly go into the next font or explicitly
101specify the original font or point size,
102and many existing documents actually do this,
103such a practice will produce complaints from
104.I checknr.
105Since it is probably better to use the \efP and \es0 forms anyway,
106you should think of this as a contribution to your document
107preparation style.
108.SH SEE\ ALSO
e94dc177 109nroff(1), troff(1), checkeq(1), ms(7), me(7)
9138d903
KM
110.SH DIAGNOSTICS
111Complaints about unmatched delimiters.
112.br
113Complaints about unrecognized commands.
114.br
115Various complaints about the syntax of commands.
9138d903
KM
116.SH BUGS
117There is no way to define a 1 character macro name using
e94dc177
KM
118.BR \-a .
119.br
120Does not correctly recognize certain reasonable constructs,
121such as conditionals.