-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.spellcheck
31 lines (22 loc) · 1.31 KB
/
README.spellcheck
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
In the Makefile there is the 'spellcheck' target. This is meant pretty much for
non-interactive runs (e.g. via Travis). For spell checking, aspell is used.
The spell checking works by transforming the file via m4 (using macros.m4)
and sed (using spellfilter.sed).
The sed filters are not very smart, especially they cannot deal with multi line
LateX commands. For those, wrap the lines inside the ifdef, like so:
ifdef([[[NOSPELLCHECK]]], [[[
\texttt{void \funnm{err}(int \emph{status},
const char *\emph{fmt}, ...);}
]]])
The [[[ and ]]] character sequences are left and right quotation marks,
respectively (see macros.m4) not to interfere with LateX quotation.
There is a personal dictionary in unix_dict.txt. Try not to add too much stuff
there, especially names of functions, headers, varibles, constants etc. as these
should be eradicated using either m4 or sed.
Sometimes it is not obvious from the output from the 'spellcheck' makefile
target where particular problem is. To do that it is necessary to enter
interactive mode on file processed by m4/sed and then run aspell with the
'check' command (that requires file name as argument) in one terminal window and
edit the original .tex file in another window. For example:
$ m4 files.tex | sed -E -f spellfilter.sed > /tmp/p
$ aspell -t --personal=./unix_dict.txt -c /tmp/p