[OS X TeX] Spelling weirdness in TeXShop
koch at math.uoregon.edu
Sun May 25 18:51:36 CEST 2014
On May 25, 2014, at 2:24 AM, Frank STENGEL <fstengel at mac.com> wrote:
> Here is what happens:
> 1. I have two editor windows opened and the language for spelling is, say French and I am merrily typing away in window 1
> 2. I suddenly decide I want to change the spelling language to say English. I use the spelling panel found in the Edit menu to change, and while typing everything works well, and my French is appropriately flagged.
> 3. I click on window 2 and the spelling language reverts to French
> 4. I click on window 1 and the language remains French. Thus all my English is now flagged as incorrect.
> Is that normal ? It actually took me a long time to have the spelling language be the one I want: starting TeXShop, selecting the language then quitting to have it stick... While I can understand that it would be difficult to have one language per window, I find it weird tat the language resets itself to the language use at the time one last quit TeXShop.
> Frank STENGEL (fstengel<at>mac.com)
This is normal, the result of very recent code changes.
Until recently, TeXShop relied on making spell language changes using
Apple’s System Preferences, in the
Keyboard —> Text
panel. This panel sets a global dictionary for all of your programs. You could
use the Spell and Grammar panel to change the dictionary in TeXShop,
but TeXShop didn’t remember this change when quitting.
Recently the code changed and now TeXShop remembers any change you
make in the Spelling and Grammar panel. This change affects all TeXShop
But recall that TeXShop also has a way to set the dictionary for a particular
file in the header. For example:
% !TEX spellcheck = de-DE
In the first version of the changed code, I ignored this and users objected.
So currently this choice overrides the spelling choice via the Spelling and Grammar
panel.Thus if you have selected a dictionary in Spelling and Grammar, this dictionary
will be used by default in any source file you open which DOES NOT have a
"% !TEX spellcheck = de-DE” in the header. If, however, you open a file which has
this in the header, then "% !TEX spellcheck = de-DE” overrides the default choice.
TeXShop should switch correctly as particular source files are brought to the front.
For example, if your default dictionary is English but you have a source file in French
with an appropriate header, then clicking on the French file should convert the Spell and Grammar
choice to French, but clicking on an ordinary source should switch Spell and Grammar
back to the default English.
Long ago, I decided to save straight source files without any “secret information” that I’d
strip away, or secret information hidden in a resource fork. So it isn’t possible to set a dictionary
on a file-by-file basis WITHOUT using headers.
This still leaves some “edge cases.” Do changes in Spelling and Grammar affect already
open files? What if you are using a file with a header choice for dictionary,
and you change the dictionary in the Spelling and Grammar panel?
Please avoid such edge cases. Start TeXShop with a default source or no source. Select
the dictionary you want to use most of the time. Quit TeXShop. Then when you write
in another language, put a dictionary header at the top of that file.
More information about the macostex-archives