Edit Links |
Mac /
MacSpellingCategories: Spellchecking, Mac << | Page list | >>Table of contents (hide) There are several solutions for spell-checking on Mac OS X. As of LyX 2.0, the built-in OS X spell-checker is supported, built on the open source Hunspell. Both spell-checking and thesaurus should work as-is if LyX is configured by the standard installer. One may alternatively perform a separate install of Hunspell or Aspell. (Hunspell is also the spell-checker for LibreOffice, and Aspell is produced by GNU.) 1. Installing Hunspell on Mac OS XPerhaps the easiest way to install Hunspell is with Mac Homebrew. To install Homebrew, see the homepage(approve sites) or type the following in the terminal command window (additional details here:
Then install hunspell with
Finally, set the appropriate spell-checker in LyX Preferences -> Language Settings -> Spellchecker. Hunspell can also be installed with MacPorts. 2. Installing aspell on Mac OS XThere are several ways to install aspell, including Homebrew, MacPorts, and CocoAspell. Homebrew and MacPorts will build aspell, and will take some extra effort. CocoAspell is compiled specifically for Mac, making it an easy solution, but has not been updated since 2009. To install, download CocoAspell first and then read the directions below. Here are instructions for building and installing aspell on Mac OS X. They apply, mutatis mutandis, to ispell, and hspell as well. If you use an open-source package system like Homebrew(approve sites), Fink, MacPorts, or Darwin Ports(approve sites), it is likely that aspell is already available to you as a ready-made package. Consult the appropriate website for information on installing those packages (don't forget to install the appropriate dictionary package as well). Otherwise, you'll have to download the source files, compile and install them. It's not quite as easy as using a pre-made package, but it's really not hard. Note: You must follow these instructions from an administrative account on your Mac, and you must have the developer tools installed. (Apple's most recent developer tools can be downloaded here; it's a large download, and you may want to use your OS X install CDs to install them instead.) Download both aspell itself and the dictionaries you want from http://aspell.sourceforge.net/. (For a list of supported languages, go here. Make sure these files are decompressed. (If you don't see folders with the appopriate names, doubleclick on the .gz files (and, if that only leaves you with .tar files, on these as well) until you have the folders.) To avoid errors, make sure that the total path to these folders do not include any spaces (e.g. do not put them into "
NOTE: In order to configure the files properly, and run the below "make" command, you need to have these packages installed first. You should install Xcode from connect.apple.com to get the gcc compilers.
You'll need to repeat steps 1-5 for each of the dictionaries you want to install. (You'll get separate folders for each.) That's it. Now from within LyX, select Tools > Reconfigure, restart LyX when it tells you to, double check that aspell is selected from LyX > Preferences > Spellchecker, make sure the space below that for designating a personal dictionary is blank (so you will get aspell's default), and you should be good to go. If at this point you are unable to save new words to the personal dictionary you will need to edit the file at /usr/local/etc/aspell.conf. Remove the line "home-dir $HOME/Library/Preferences/aspell" (line 38 including blanks), or disable it by adding a "#" sign at the begining. For those afraid of 3. Installing cocoAspellIf instead you download and install cocoAspell from http://cocoaspell.leuski.net/ you need to specify the exact path to the dictionary in LyX spellchecking preferences. For example paste the following line into the "Alternative language" field: /Library/Application Support/cocoAspell/aspell6-en-6.0-0/english.alias To use multiple dictionaries, navigate to /Library/Application Support/cocoAspell/aspell6-en-6.0-0/ , then inspect the .multi files (e.g. using TextEdit). Find one which is most similar to the selection you are after. Make a copy, then edit it. Add line(s), using syntax similar to the existing lines, with the file name of the relevant dictionary (e.g. "add en-variant_1.rws"). Select this modified .multi file in the LyX preference, e.g.: /Library/Application Support/cocoAspell/aspell6-en-6.0-0/mynewselection.multi If at this point you are unable to save new words to the personal dictionary you will need to edit the file at /usr/local/etc/aspell.conf. Remove the line "home-dir $HOME/Library/Preferences/aspell" (line 38 including blanks), or disable it by adding a "#" sign at the begining. If you are not sure how to edit or locate this file, check this link for a step-by-step guide using the terminal. Alternatively, to navigate into the invisible /usr/ folder in the Finder, select the menu item Go > Go to Folder…, then type in "/usr". Navigate to the relevant file, then drag it into the TextEdit application. |