0

So I write in LaTeX about Tolkien and as you might know words like Númenor with some special keys are often used.

So now I would like to write Numenor and rightclick this word where I can now choose Númenor from.

So I already tried to copy/paste Númenor, right-click it and add it to the dictionary. But when I now write Numenor and right-click it I don't get Númenor as suggested word. I cannot really understand.

So what would be the best way for this? And maybe why is my added word not shown in the suggested word list?

  • Wouldn't it be as simple and swift to directly type Númenor on your keyboard? – Bernard Apr 26 '15 at 11:23
  • 1
    You could add a macro (in TeXstudio, not in TeX) that replaces Numenor with Númenor on-the-fly without you needing to interact with it. If you want this not only in your TeX editor but system-wide take a look at AutoHotkey. – Qrrbrbirlbel Apr 26 '15 at 11:54
  • 1
    @kwoxer How many words do you have that needs replacing? You could use the Replace function of any editor and maybe again AutoHotkey with a list of words. I don't really know the best way here either … – Qrrbrbirlbel Apr 26 '15 at 12:52
  • 1
    Are you aware that you can change your keybard layout to use "dead keys"? Thïs ĩs thê nørmàl wáÿ to tỹpê açceñtéð characters.... Surely way easier than creating ad hoc macros for every Tolkien-based word that contains accents. – jon Apr 28 '15 at 19:43
  • 1
    Ah, okay then. A concern about spelling seems surprising since that's a "risc" for even everyday words. But to each their own. – jon Apr 28 '15 at 20:06
1

TeXstudio uses Hunspell as spelling engine. Replacement proposals come from there.

It appears, that Hunspell does not consider Númenor a replacement for Numenor. In contrast, Númeno will have a suggestion for Númenor. This is beyond the control of TeXstudio.

@Qrrbrbirlbel: Your information concerning "Add to dictionary" behaving like "Ignore this word for spellchecking" is somewhat outdated. This was the case in older versions of TXS. By now, user words are added to the Hunspell-Dictionary at runtime using the Hunspell_add() method (and still stored in a .ign file on disk). As far as I know, this is equivalent to having the words in the dictionary in the first place.

Back to a solution: As pointed out in the comments, you really don't want to replace every occurence manually using the context menu. A macro is the way to go. For just a few words, one macro per word is fine. If you have more, you could write a generic script, that checks the last word against a list of possible replacements. This script for autocompletion may serve as a starting point. It does not exactly do what you want, but the logic is quite similar and should be easily adaptable to your problem.

  • Yeah that comes closer to a solution. But let's take the Numenor example again. When I write "N" the next sign would be the special one. So having a completion means that I now have a push a combo to run the macro? Could you maybe give a step-by-step tutorial or just say how I can imagine it to be. That would really help me as I never used macros until now. Thank you. – kwoxer Apr 28 '15 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.