Open raphinesse opened 7 years ago
Is it the tags that you want to exclude or argument of something like \todo
? Tags with backlashes should already be ignored.
Sorry for being unclear. The tag itself is, as you say, already excluded from spell checking. I wanted the arguments of certain tags to be excluded.
However, having continued my work after starting this issue, there are even more contexts where I would like to turn off spell checking (or maybe switch language?). In my case I use English language in algorithmic
environments while my main document is written in German.
I'll think about the argument option. It may take a bit of time, since that is not currently an easy fix.
My goal is to eventually support multiple embedded language selection based on babel, etc. Please note that you can specify multiple languages with %!TeX spellcheck = de-DE,en-US
. This method is not intelligent enough to know where en-US is used, but hunspell will word break according to de-DE and use en-US as a final check word list.
I tried the method with multiple languages before, but it does not seem to work properly. At first it just caused an error, stating that I didn't have the dictionary de-DE,en-US
installed (of course I do not :grin:), then when I tried it again after your reply above, it would seem to work at first, and then after a few seconds marked everything German as wrong, suggesting English fixes for the words. I didn't have time to investigate further, so I stuck with the German only option for now.
Edit: After reading your previous post again, I'm not quite sure what the option with multiple dictionaries is supposed to do. I expected it to check everything for German spelling and try English if it absolutely cannot make any sense of a word. Is that correct?
You are correct. That is my understanding of hunspell's function. Can you attach a sample document so I can experiment a little?
When I want to add some remarks, I often add
\todo{stuff I still have to do}
to the document. The contents of these tags often are in a different language than the document, make use of abbreviations or have formulas that are not correctly formulated in math mode yet, etc. ...This causes a lot of spell check warnings to be shown which is undesirable for me. Consequently I would like to somehow exclude some tags from spell checking.