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