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