xref: /minix3/usr.bin/checknr/checknr.1 (revision 0c745990d9e6f87621e2c2d849c15464859a9430)
1*0c745990SThomas Cort.\"	$NetBSD: checknr.1,v 1.15 2004/07/09 11:40:00 wiz Exp $
2*0c745990SThomas Cort.\"
3*0c745990SThomas Cort.\" Copyright (c) 1980, 1990, 1993
4*0c745990SThomas Cort.\"	The Regents of the University of California.  All rights reserved.
5*0c745990SThomas Cort.\"
6*0c745990SThomas Cort.\" Redistribution and use in source and binary forms, with or without
7*0c745990SThomas Cort.\" modification, are permitted provided that the following conditions
8*0c745990SThomas Cort.\" are met:
9*0c745990SThomas Cort.\" 1. Redistributions of source code must retain the above copyright
10*0c745990SThomas Cort.\"    notice, this list of conditions and the following disclaimer.
11*0c745990SThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright
12*0c745990SThomas Cort.\"    notice, this list of conditions and the following disclaimer in the
13*0c745990SThomas Cort.\"    documentation and/or other materials provided with the distribution.
14*0c745990SThomas Cort.\" 3. Neither the name of the University nor the names of its contributors
15*0c745990SThomas Cort.\"    may be used to endorse or promote products derived from this software
16*0c745990SThomas Cort.\"    without specific prior written permission.
17*0c745990SThomas Cort.\"
18*0c745990SThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19*0c745990SThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*0c745990SThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*0c745990SThomas Cort.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22*0c745990SThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23*0c745990SThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24*0c745990SThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25*0c745990SThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26*0c745990SThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27*0c745990SThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*0c745990SThomas Cort.\" SUCH DAMAGE.
29*0c745990SThomas Cort.\"
30*0c745990SThomas Cort.\"     @(#)checknr.1	8.1 (Berkeley) 6/6/93
31*0c745990SThomas Cort.\"
32*0c745990SThomas Cort.Dd January 21, 2002
33*0c745990SThomas Cort.Dt CHECKNR 1
34*0c745990SThomas Cort.Os
35*0c745990SThomas Cort.Sh NAME
36*0c745990SThomas Cort.Nm checknr
37*0c745990SThomas Cort.Nd check nroff/troff files
38*0c745990SThomas Cort.Sh SYNOPSIS
39*0c745990SThomas Cort.Nm
40*0c745990SThomas Cort.Op Fl fs
41*0c745990SThomas Cort.Op Fl a Ns Ar \&.x1.y1.x2.y2. ... \&.xn.yn
42*0c745990SThomas Cort.Op Fl c Ns Ar \&.x1.x2.x3 ... \&.xn
43*0c745990SThomas Cort.Ar file
44*0c745990SThomas Cort.Sh DESCRIPTION
45*0c745990SThomas Cort.Nm
46*0c745990SThomas Cortchecks a list of
47*0c745990SThomas Cort.Xr nroff 1
48*0c745990SThomas Cortor
49*0c745990SThomas Cort.Xr troff 1
50*0c745990SThomas Cortinput files for certain kinds of errors
51*0c745990SThomas Cortinvolving mismatched opening and closing delimiters
52*0c745990SThomas Cortand unknown commands.
53*0c745990SThomas CortIf no files are specified,
54*0c745990SThomas Cort.Nm
55*0c745990SThomas Cortchecks the standard input.
56*0c745990SThomas Cort.Pp
57*0c745990SThomas CortRecognized options are:
58*0c745990SThomas Cort.Bl -tag -width xxx -compact -offset indent
59*0c745990SThomas Cort.It Fl a
60*0c745990SThomas CortAdd additional pairs of macros to the list of known macros.
61*0c745990SThomas CortThis must be followed by groups of six characters, each group defining
62*0c745990SThomas Corta pair of macros.
63*0c745990SThomas CortThe six characters are
64*0c745990SThomas Corta period,
65*0c745990SThomas Cortthe first macro name,
66*0c745990SThomas Cortanother period,
67*0c745990SThomas Cortand the second macro name.
68*0c745990SThomas CortFor example, to define a pair .BS and .ES, use
69*0c745990SThomas Cort.Sq Li \-a.BS.ES .
70*0c745990SThomas Cort.It Fl c
71*0c745990SThomas CortDefine commands which would otherwise be complained about
72*0c745990SThomas Cortas undefined.
73*0c745990SThomas Cort.It Fl f
74*0c745990SThomas CortRequest
75*0c745990SThomas Cort.Nm
76*0c745990SThomas Cortto ignore
77*0c745990SThomas Cort.Ql \ef
78*0c745990SThomas Cortfont changes.
79*0c745990SThomas Cort.It Fl s
80*0c745990SThomas CortIgnore
81*0c745990SThomas Cort.Ql \es
82*0c745990SThomas Cortsize changes.
83*0c745990SThomas Cort.El
84*0c745990SThomas Cort.Pp
85*0c745990SThomas CortDelimiters checked are:
86*0c745990SThomas Cort.Bl -enum -compact -offset indent
87*0c745990SThomas Cort.It
88*0c745990SThomas CortFont changes using \efx ... \efP.
89*0c745990SThomas Cort.It
90*0c745990SThomas CortSize changes using \esx ... \es0.
91*0c745990SThomas Cort.It
92*0c745990SThomas CortMacros that come in open ... close forms, for example,
93*0c745990SThomas Cortthe .TS and .TE macros which must always come in pairs.
94*0c745990SThomas Cort.El
95*0c745990SThomas Cort.Pp
96*0c745990SThomas Cort.Nm
97*0c745990SThomas Cortis intended for use on documents that are prepared with
98*0c745990SThomas Cort.Nm
99*0c745990SThomas Cortin mind, much the same as
100*0c745990SThomas Cort.Xr lint 1 .
101*0c745990SThomas CortIt expects a certain document writing style for
102*0c745990SThomas Cort.Ql \ef
103*0c745990SThomas Cortand
104*0c745990SThomas Cort.Ql \es
105*0c745990SThomas Cortcommands,
106*0c745990SThomas Cortin that each
107*0c745990SThomas Cort.Ql \efx
108*0c745990SThomas Cortmust be terminated with
109*0c745990SThomas Cort.Ql \efP
110*0c745990SThomas Cortand
111*0c745990SThomas Corteach
112*0c745990SThomas Cort.Ql \esx
113*0c745990SThomas Cortmust be terminated with
114*0c745990SThomas Cort.Ql \es0 .
115*0c745990SThomas CortWhile it will work to directly go into the next font or explicitly
116*0c745990SThomas Cortspecify the original font or point size,
117*0c745990SThomas Cortand many existing documents actually do this,
118*0c745990SThomas Cortsuch a practice will produce complaints from
119*0c745990SThomas Cort.Nm .
120*0c745990SThomas CortSince it is probably better to use the
121*0c745990SThomas Cort.Ql \efP
122*0c745990SThomas Cortand
123*0c745990SThomas Cort.Ql \es0
124*0c745990SThomas Cortforms anyway,
125*0c745990SThomas Cortyou should think of this as a contribution to your document
126*0c745990SThomas Cortpreparation style.
127*0c745990SThomas Cort.Pp
128*0c745990SThomas Cort.Nm
129*0c745990SThomas Cortknows about the
130*0c745990SThomas Cort.Xr ms 7
131*0c745990SThomas Cortand
132*0c745990SThomas Cort.Xr me 7
133*0c745990SThomas Cortmacro packages,
134*0c745990SThomas Cortas well as the macros from
135*0c745990SThomas Cort.Xr mdoc 7 .
136*0c745990SThomas Cort.Sh DIAGNOSTICS
137*0c745990SThomas Cort.Bd -ragged -compact
138*0c745990SThomas CortComplaints about unmatched delimiters.
139*0c745990SThomas CortComplaints about unrecognized commands.
140*0c745990SThomas CortVarious complaints about the syntax of commands.
141*0c745990SThomas Cort.Ed
142*0c745990SThomas Cort.Sh SEE ALSO
143*0c745990SThomas Cort.Xr nroff 1 ,
144*0c745990SThomas Cort.Xr troff 1 ,
145*0c745990SThomas Cort.Xr mdoc 7 ,
146*0c745990SThomas Cort.Xr me 7 ,
147*0c745990SThomas Cort.Xr ms 7
148*0c745990SThomas Cort.Sh HISTORY
149*0c745990SThomas CortThe
150*0c745990SThomas Cort.Nm
151*0c745990SThomas Cortcommand appeared in
152*0c745990SThomas Cort.Bx 4.0 .
153*0c745990SThomas CortBasic
154*0c745990SThomas Cort.Xr mdoc 7
155*0c745990SThomas Cortsupport appeared in
156*0c745990SThomas Cort.Nx 1.6 .
157*0c745990SThomas Cort.Sh BUGS
158*0c745990SThomas CortThere is no way to define a 1 character macro name using
159*0c745990SThomas Cort.Fl a .
160*0c745990SThomas Cort.Pp
161*0c745990SThomas CortDoes not correctly recognize certain reasonable constructs,
162*0c745990SThomas Cortsuch as conditionals.
163*0c745990SThomas Cort.Pp
164*0c745990SThomas Cort.Xr mdoc 7
165*0c745990SThomas Cortmacros that are not at the beginning of the line are not recognized.
166*0c745990SThomas CortAmong others, this results in too many
167*0c745990SThomas Cort.Ql Unmatched Zz
168*0c745990SThomas Corterrors.
169