xref: /netbsd-src/usr.bin/checknr/checknr.1 (revision 9e492da4c176e8deb3db11bd6f268ac4eb9f1718)
1*9e492da4Swiz.\"	$NetBSD: checknr.1,v 1.15 2004/07/09 11:40:00 wiz Exp $
2e91ed174Sglass.\"
3e91ed174Sglass.\" Copyright (c) 1980, 1990, 1993
4e91ed174Sglass.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
1489aaa1bbSagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
30e91ed174Sglass.\"     @(#)checknr.1	8.1 (Berkeley) 6/6/93
3161f28255Scgd.\"
32782f0d51Swiz.Dd January 21, 2002
3361f28255Scgd.Dt CHECKNR 1
349e44e9b5Sgarbled.Os
3561f28255Scgd.Sh NAME
3661f28255Scgd.Nm checknr
3761f28255Scgd.Nd check nroff/troff files
3861f28255Scgd.Sh SYNOPSIS
395c1befb6Slukem.Nm
40*9e492da4Swiz.Op Fl fs
4161f28255Scgd.Op Fl a Ns Ar \&.x1.y1.x2.y2. ... \&.xn.yn
4261f28255Scgd.Op Fl c Ns Ar \&.x1.x2.x3 ... \&.xn
4361f28255Scgd.Ar file
4461f28255Scgd.Sh DESCRIPTION
455c1befb6Slukem.Nm
4661f28255Scgdchecks a list of
4761f28255Scgd.Xr nroff 1
4861f28255Scgdor
4961f28255Scgd.Xr troff 1
5061f28255Scgdinput files for certain kinds of errors
5161f28255Scgdinvolving mismatched opening and closing delimiters
5261f28255Scgdand unknown commands.
5361f28255ScgdIf no files are specified,
545c1befb6Slukem.Nm
5561f28255Scgdchecks the standard input.
5661f28255Scgd.Pp
57782f0d51SwizRecognized options are:
58782f0d51Swiz.Bl -tag -width xxx -compact -offset indent
5961f28255Scgd.It Fl a
6061f28255ScgdAdd additional pairs of macros to the list of known macros.
6161f28255ScgdThis must be followed by groups of six characters, each group defining
6261f28255Scgda pair of macros.
6361f28255ScgdThe six characters are
6461f28255Scgda period,
6561f28255Scgdthe first macro name,
6661f28255Scgdanother period,
6761f28255Scgdand the second macro name.
6861f28255ScgdFor example, to define a pair .BS and .ES, use
69782f0d51Swiz.Sq Li \-a.BS.ES .
7061f28255Scgd.It Fl c
7161f28255ScgdDefine commands which would otherwise be complained about
7261f28255Scgdas undefined.
7361f28255Scgd.It Fl f
7461f28255ScgdRequest
755c1befb6Slukem.Nm
7661f28255Scgdto ignore
7761f28255Scgd.Ql \ef
7861f28255Scgdfont changes.
7961f28255Scgd.It Fl s
8061f28255ScgdIgnore
8161f28255Scgd.Ql \es
8261f28255Scgdsize changes.
8361f28255Scgd.El
8461f28255Scgd.Pp
8541954280SjtcDelimiters checked are:
86782f0d51Swiz.Bl -enum -compact -offset indent
8761f28255Scgd.It
8861f28255ScgdFont changes using \efx ... \efP.
8961f28255Scgd.It
9061f28255ScgdSize changes using \esx ... \es0.
9161f28255Scgd.It
9261f28255ScgdMacros that come in open ... close forms, for example,
9361f28255Scgdthe .TS and .TE macros which must always come in pairs.
9461f28255Scgd.El
9561f28255Scgd.Pp
965c1befb6Slukem.Nm
9761f28255Scgdis intended for use on documents that are prepared with
985c1befb6Slukem.Nm
9961f28255Scgdin mind, much the same as
10061f28255Scgd.Xr lint 1 .
10161f28255ScgdIt expects a certain document writing style for
10261f28255Scgd.Ql \ef
10361f28255Scgdand
10461f28255Scgd.Ql \es
10561f28255Scgdcommands,
10661f28255Scgdin that each
10761f28255Scgd.Ql \efx
10861f28255Scgdmust be terminated with
10961f28255Scgd.Ql \efP
11061f28255Scgdand
11161f28255Scgdeach
11261f28255Scgd.Ql \esx
11361f28255Scgdmust be terminated with
11461f28255Scgd.Ql \es0 .
11561f28255ScgdWhile it will work to directly go into the next font or explicitly
11661f28255Scgdspecify the original font or point size,
11761f28255Scgdand many existing documents actually do this,
11861f28255Scgdsuch a practice will produce complaints from
119990562bfSwiz.Nm .
12061f28255ScgdSince it is probably better to use the
12161f28255Scgd.Ql \efP
12261f28255Scgdand
12361f28255Scgd.Ql \es0
12461f28255Scgdforms anyway,
12561f28255Scgdyou should think of this as a contribution to your document
12661f28255Scgdpreparation style.
12761f28255Scgd.Pp
1285c1befb6Slukem.Nm
12961f28255Scgdknows about the
13061f28255Scgd.Xr ms 7
13161f28255Scgdand
13261f28255Scgd.Xr me 7
133782f0d51Swizmacro packages,
134782f0d51Swizas well as the macros from
135782f0d51Swiz.Xr mdoc 7 .
13661f28255Scgd.Sh DIAGNOSTICS
13761f28255Scgd.Bd -ragged -compact
13861f28255ScgdComplaints about unmatched delimiters.
13961f28255ScgdComplaints about unrecognized commands.
14061f28255ScgdVarious complaints about the syntax of commands.
14161f28255Scgd.Ed
142e2946f01Swiz.Sh SEE ALSO
143e2946f01Swiz.Xr nroff 1 ,
144e2946f01Swiz.Xr troff 1 ,
145782f0d51Swiz.Xr mdoc 7 ,
146e2946f01Swiz.Xr me 7 ,
147e2946f01Swiz.Xr ms 7
148e2946f01Swiz.Sh HISTORY
149e2946f01SwizThe
150e2946f01Swiz.Nm
151e2946f01Swizcommand appeared in
152e2946f01Swiz.Bx 4.0 .
153782f0d51SwizBasic
154782f0d51Swiz.Xr mdoc 7
155782f0d51Swizsupport appeared in
156782f0d51Swiz.Nx 1.6 .
15761f28255Scgd.Sh BUGS
15861f28255ScgdThere is no way to define a 1 character macro name using
15961f28255Scgd.Fl a .
16061f28255Scgd.Pp
16161f28255ScgdDoes not correctly recognize certain reasonable constructs,
16261f28255Scgdsuch as conditionals.
163782f0d51Swiz.Pp
164782f0d51Swiz.Xr mdoc 7
165782f0d51Swizmacros that are not at the beginning of the line are not recognized.
166782f0d51SwizAmong others, this results in too many
167782f0d51Swiz.Ql Unmatched Zz
168782f0d51Swizerrors.
169