summaryrefslogtreecommitdiff
path: root/Build/source/utils/lacheck/lacheck.hlp
blob: b99a0e91a47f1a3ec4e98fdc4711b54a1537f627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
1  LaCheck

A consistency checker for LaTeX documents.

	LaCheck filename[.tex]

2 DESCRIPTION

LaCheck is a general purpose consistency checker for LaTeX documents.
It reads a LaTeX document and displays warning messages, if it finds
bad sequences. It should be noted, that the badness is  very
subjective.  LaCheck is designed to help find common mistakes in LaTeX
documents, especially those made by beginners.

The things checked are: Mismatched groups (braces), environments and
math mode delimiters.  When a mismatch is found, line numbers for
"both"  start and end of the mismatch is given. The error messages
comes in pairs, one for the end match and one for the beginning,
marked with `<-' and `->' respectively.

Bad spacing including missing a `\' after an abbreviation, missing an
`\@' before a punctuation mark in a paragraph that is ended by an
capital letter, double spaces like ` ~', bad usage of ellipsis (like
using ... instead of \ldots, or using \ldots where \cdots should be
used), missing \~ before a \cite or \ref commands, space before
footnotes, italic corrections before comma, point, or italic text,
italic correction after normal text, missing italic correction when
switching from italic to normal text, and double italic correction.

Badly placed punctuation marks around end of math mode delimiters.
This is, pucktuation placed right after display math end or
punctuation placed right before text math end.  Sequences of
whitespace followed by punctuation marks are also caught. Bad use of
quotation characters, i.e. constructs like "\'word" or "word\`" are
warned about, tabs in verbatim environments are caught, certain TeX
primitives are frowned upon, attempts to give font specifiers
arguments such as \em{text} are noted, and use of @ in LaTeX macros
are reported.

LaCheck will read files that are input using \input or \include. Files
with suffix `.sty' are omitted, as they probably will cause LaCheck to
crash.

2 USAGE

	LaCheck filename[.tex]

LaCheck may be invoked from within Emacs using compile:

To run:  
"M-x compile RET lacheck RET"
, and then 
"C-x `"
to parse the messages

2 OUTPUT 

The output is UNIX-error like, and may be parsed using Emacs compile
mode. Here is a sample:

0
lacheck compiler

"/usr/mef/compiler.tex", line 34: missing `\' after "etc."

"/usr/mef/compiler.tex", line 179: double space at " ~"

"/usr/mef/compiler.tex", line 186: <- unmatched "}"

"/usr/mef/compiler.tex", line 181: -> unmatched "$$"
1

A control space `\\ ' should be inserted at line 34, to prevent an
end-of-sentence space. 
Also, at line 179, the first space of the sequence " ~" should
probably be deleted.
The last two lines is an example, where the user mistyped, and
probably inserted an extra "}" somewhere.

2 DIAGNOSTICS 

Some special cases should be explained. In cases where a sentence ends
with something that LaCheck thinks is an abbreviation an missing `\\'
error may also occur, if the following sentence begins with a
lowercase letter.

A mismatch error may cause more to follow, due to the chosen
algorithm. In such cases just correct the "first" error and run
LaCheck again

Braces, environments and math mode must be balanced within a file.

LaCheck may be confused by unmatched stuff placed inside verbatim-like
environments called something else than exactly `verbatim'.

2 FILES

Source:		TEX_DISK:[TEX.TEX__SOURCE.LACHECK]

Executable:	TEX_EXE:LACHECK.EXE

SEE ALSO
TeX, emacs, LaTeX

2 BUGS

LaCheck gets confused by advanced macros, is fooled by simple macros,
can't figure out if you use a non-standard way to switch italic on or
off, does not like TeX at all, does not provide any options to turn
off specific warnings, and is at best a crude approximation.

Ideas for improvements and bug reports are very welcome.  Such should
be directed to the maintainers, their email address is
<auc-tex_mgr@iesd.auc.dk>.

2 AUTHOR
Kresten Krab Thorup with modifications by Per Abrahamsen.