| 1 |
.TH "LaCheck" "1" "2019-07-09" "Release @REV@ (TeX Live)" |
| 2 |
.SH NAME |
| 3 |
lacheck - a consistency checker for LaTeX documents |
| 4 |
.SH SYNOPSIS |
| 5 |
.B lacheck |
| 6 |
.IR filename [ \fB.tex\fP ] |
| 7 |
.SH DESCRIPTION |
| 8 |
LaCheck is a general purpose consistency checker for LaTeX documents. |
| 9 |
It reads a LaTeX document and displays warning messages, if it finds |
| 10 |
bad sequences. It should be noted, that the badness is |
| 11 |
.I very |
| 12 |
subjective. LaCheck is designed to help find common mistakes in LaTeX |
| 13 |
documents, especially those made by beginners. |
| 14 |
.LP |
| 15 |
The things checked are: |
| 16 |
.LP |
| 17 |
Mismatched groups (braces), environments and math mode |
| 18 |
delimiters. When a mismatch is found, line numbers for |
| 19 |
.I "both" |
| 20 |
start and end of the mismatch is given. The error messages comes in |
| 21 |
pairs, one for the end match and one for the beginning, marked with |
| 22 |
\`<-\' and \`->\' respectively. |
| 23 |
.LP |
| 24 |
Bad spacing including missing a \`\\ \' after an abbreviation, missing |
| 25 |
an \`\\@\' before a punctuation mark in a paragraph that is ended by |
| 26 |
an capital letter, double spaces like \` \~\', bad usage of ellipsis |
| 27 |
(like using ... instead of \\ldots, or using \\ldots where \\cdots |
| 28 |
should be used), missing \~ before a \\cite or \\ref commands, space |
| 29 |
before footnotes, italic corrections before comma, point, or italic |
| 30 |
text, italic correction after normal text, missing italic correction |
| 31 |
when switching from italic to normal text, and double italic |
| 32 |
correction. |
| 33 |
.LP |
| 34 |
Badly placed punctuation marks around end of math mode |
| 35 |
delimiters. This is, punctuation placed right after display math end |
| 36 |
or punctuation placed right before text math end. Sequences of |
| 37 |
whitespace followed by punctuation marks are also caught. |
| 38 |
.LP |
| 39 |
Bad use of quotation characters, i.e. constructs like "\'word" or |
| 40 |
"word\`" are warned about, tabs in verbatim environments are caught, |
| 41 |
certain TeX primitives are frowned upon, attempts to give font |
| 42 |
specifiers arguments such as \\em{text} are noted, and use of @ in |
| 43 |
LaTeX macros are reported. |
| 44 |
.LP |
| 45 |
LaCheck will read files that are input using \\input or \\include. |
| 46 |
Files with suffix \`.sty\' are omitted, as they probably will cause |
| 47 |
LaCheck to crash. |
| 48 |
.LP |
| 49 |
LaCheck may be invoked from within emacs(1) using M-x compile. |
| 50 |
To run: |
| 51 |
.B "M-x compile RET lacheck RET" |
| 52 |
, and then |
| 53 |
.B "C-x `" |
| 54 |
to parse the messages |
| 55 |
|
| 56 |
.SH OUTPUT |
| 57 |
The output is UNIX-error like, and may be parsed using Emacs(1) |
| 58 |
compile mode. Here is a sample: |
| 59 |
|
| 60 |
.PD 0 |
| 61 |
lacheck compiler |
| 62 |
.TP |
| 63 |
"/usr/mef/compiler.tex", line 34: missing \`\\\\\\\\ \' after "etc." |
| 64 |
.TP |
| 65 |
"/usr/mef/compiler.tex", line 179: double space at " ~" |
| 66 |
.TP |
| 67 |
"/usr/mef/compiler.tex", line 186: <- unmatched "}" |
| 68 |
.TP |
| 69 |
"/usr/mef/compiler.tex", line 181: -> unmatched "$$" |
| 70 |
.PD 1 |
| 71 |
.LP |
| 72 |
A control space \`\\ \' should be inserted at line 34, to prevent an |
| 73 |
end-of-sentence space. |
| 74 |
Also, at line 179, the first space of the sequence " ~" should |
| 75 |
probably be deleted. |
| 76 |
The last two lines is an example, where the user mistyped, and |
| 77 |
probably inserted an extra "}" somewhere. |
| 78 |
|
| 79 |
.SH DIAGNOSTICS |
| 80 |
Some special cases should be explained. In cases where a sentence ends |
| 81 |
with something that LaCheck thinks is an abbreviation an missing \`\\ |
| 82 |
\' error may also occur, if the following sentence begins with a |
| 83 |
lowercase letter. |
| 84 |
.LP |
| 85 |
A mismatch error may cause more to follow, due to the lack of good |
| 86 |
error recovery. In such cases, just correct the first |
| 87 |
error and run LaCheck again. |
| 88 |
.LP |
| 89 |
Braces, environments and math mode must be balanced within a file. |
| 90 |
.LP |
| 91 |
LaCheck may be confused by unmatched stuff placed inside verbatim-like |
| 92 |
environments called something else than exactly \`verbatim\'. |
| 93 |
.SH SEE ALSO |
| 94 |
tex(1), emacs(1), latex(1) |
| 95 |
.SH BUGS |
| 96 |
LaCheck gets confused by advanced macros, is fooled by simple macros, |
| 97 |
can't figure out if you use a non-standard way to switch italic on or |
| 98 |
off, does not like TeX at all, does not provide any options to turn |
| 99 |
off specific warnings, and is at best a crude approximation. |
| 100 |
.LP |
| 101 |
Ideas for improvements and bug reports are very welcome. Such |
| 102 |
should be directed to the maintainers; please email [email protected]. |
| 103 |
.SH AUTHOR |
| 104 |
Kresten Krab Thorup with modifications by Per Abrahamsen. |
| 105 |
Currently maintained as part of TeX Live (https://tug.org/texlive). |