[OS X TeX] install spell checking dictionary for Bulgarian

Roussanka Loukanova rl.stpuu at gmail.com
Sat Jun 5 23:06:01 CEST 2021


Hi Dick,

I'm not sure whether I understand the details of your explanation, but
clearly: it's you who should write the code that you describe.

Until then, shall I go and download cocoAspell and try the Applescript
Macro provided by herb and Micheal Sharpe. I'm a little bit worried about
mixing up some of the settings of Mac Spelling and  TeXShop. And this is
just for a single file of 3 pages in Bulgarian. (the Ministry of Education
and Sciences of Bulgaria wants it in Bulgarian, instead in English!) Few
months ago I tried to spell check another .tex file with  Bulgarian text
and, during the process, I deleted cocoAspell. That messed up the spelling
in TeXShop and in Aquamacs. Win Treese helped me to restore the default
spelling by NSSpellChecker: and that was not easy.

Actually, what I want with the bg... (bulgarian) dictionaries, for this
.tex file of 3 pages in the typeset pdf, is hyphenation provided by these
dictionaries, hopefully. The three pages of the typeset pdf now look very
ugly, with heavily rugged right-hand sides. I guess I can manage the spell
checking from Word, even if I'm clumsy with it.

But better we get the ispell dictionaries to work with TexShop. And also
with cocoAspell. I'll start reading Herb's instructions and will try to
download cocoAspell. Maybe, until i manage, meanwhile you'll get the code
that you describe :)

Best Regards,
Roussanka
t




On Sat, Jun 5, 2021 at 10:27 PM Richard Koch <koch at uoregon.edu> wrote:

> Folks,
>
> In macOS, there is a "class library" called Cocoa. Most macOS programs are
> written in Cocoa.
>
> TeXShop is written in Cocoa, and thus its editor is written using the
> NSTextEdit class in Cocoa. This NSTextEdit in turn calls the Cocoa class
> NSSpellChecker to spell check text.
>
> NSSpellCheck onsults Cocoa dictionaries to spell check words. However,
> NSSpellCheck has hooks which allow it to be overridden so it uses different
> dictionaries and different ways to search them. This is transparent to the
> user; if NSSpellCheck is overridden, then ALL Cocoa programs use the new
> spell check methods.
>
> CocoAspell by Anton Leuski is an example of this approach. It overrides
> NSSpellCheck to call its own dictionaries, and is LaTeX aware and HTML
> aware. CocoAspell comes with a control panel to activate or deactivate it.
> Cocoa programs are completely unaware of this overriding. So for example,
> TeXShop calls NSSpellCheck and that's all it knows; it doesn't know if
> NSSpellCheck itself or some other overriding program like cocoAspell does
> the spell checking.
>
> Therefore it is misleading to say that TeXShop or any other program "uses
> the standard macOS spelling program via NSSpellChecker" because maybe that
> standard code is used directly, or maybe it has been overridden by
> something else.
>
> It is also possible for Cocoa programmers to completely ignore
> NSSpellCheck and invent their own spell checking procedure, but this is
> hard work and prone to error. TeXShop actually provides this; under the
> Source tab of TeXShop Preferences, the three "Spell Checking" items at
> bottom right activate forms of this alternate way to spell check. However,
> I do not recommend using these commands (!!!)
>
> Installing the Unix code for ispell or aspell, or a dictionary for one of
> these, will not affect a Cocoa program like TeXShop unless code is added to
> the program to use this extraneous spell checker. That is not an easy task.
>
> The preferable approach is to write code which hooks into NSSpellCheck and
> overrides it, and then calls the Unix ispell to spell check. That isn't an
> easy task either, but once it is done, then ALL Cocoa programs can use the
> new spell checking method without adding a line of code to them.
>
> Richard Koch
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
>                 https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20210605/8ea56f58/attachment-0001.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list.