[lltx] spell checking TeX files

Pander pander at users.sourceforge.net
Mon Oct 8 10:36:47 CEST 2012


On 2012-10-04 18:31, Aditya Mahajan wrote:
> On Thu, 4 Oct 2012, Stephan Hennig wrote:
> 
>> Am 03.10.2012 22:15, schrieb Aditya Mahajan:
>>
>>> FWIW, you can also look at how ConTeXt implements the on the fly spell
>>> checking:
>>>
>>> http://wiki.contextgarden.net/Spellchecker
>>>
>>> The implementation details are in lang-wrd.mkiv.
>>
>> Anyway, thanks for the pointer!  I knew the wiki page, but didn't find
>> the code.  Looking at lang-wrd.lua, I can barely see any comments.  Is
>> there any code documentation somewhere?
> 
> Not that I know of.
> 
>> BTW, the ConTeXt way of spell checking is exactly how I wouldn't do it.
>> A static white list doesn't work too well for, e.g., the German
>> language.
> 
> I personally don't know anything about spell checking, so I won't
> comment. But my impression is that the code is meant as a proof of
> concept only (and hence the experimental status).

I do know something about spell checking and using a static list is
certainly way too simple. The best spell checking engine is Hunspell. It
has an API and can also be used via Enchant. Please use that in the
implementation.

>> And colouring words doesn't work well in colourful documents,
>> e.g., presentations.  A red wavy line is a quasi standard in text
>> processors and is much closer to the way errors are marked by hand
>> (usually by a plain red line in Germany).  Well, since underlining is
>> much harder to implement than text colouring, I'll likely start with the
>> text colouring, too. :)
> 
> Ideally, the user should be able to specify the command used for
> highlighting bad words.
> 
> Aditya



More information about the lualatex-dev mailing list