3

I've been using LaTeX and TeXstuido 3.1.2 for quite a while but always for English text. For English, my spellchecking etc. works fine, but I just can't figure out how to get German spellchecking to work. I'm looking for a simple, German-specific solution (similar to what's available for Italian).

I checked TeXstudio > Options > Configure > Spellcheck. There's an option "standard language", which is currently set to US English: enter image description here The dropdown menu allows selecting other English variants but not German.

I've tried following this answer to download a German dictionary for OpenOffice/LibreOffice. The search function is horrible, there are multiple German dictionaries that I found (not sure which one to select?). I downloaded the .oxt file and clicked "Import dictionary" in the TexStuio options, which always gives me a warning that the file does not include a "Hunspell"-dictionary: enter image description here When selecting, "Yes", ie, still import, nothing happens. There's still no option to select German as default language for spell checking and it's still not checked...

I spent way too much time googling and trying different approaches already. Can't believe how difficult this is... If someone has a simple and specific solution, that would be really great!

doncherry
  • 54,637
  • 1
    Try downloading the de_DE (or AT or CH) files from https://github.com/texstudio-org/texstudio/tree/master/utilities/dictionaries (most importantly .dic and .aff) and put them in C:\Program Files (x86)\TeXstudio\dictionaries (or wherever you've installed TeXstudio). After a restart of TeXstudio you should see the dictionary language in the options. – doncherry Jun 07 '21 at 19:16
  • It turns out that the de_DE files (eg, .dic and .aff) are already in that directory! But still, German doesn't show as default language option in Configure > Spell Checking. Or am I looking at the wrong place? Or should I simply replace them? – stefanbschneider Jun 07 '21 at 19:30
  • 1
    Just guessing here, but try changing the dictionary path in the settings to only the specific directory where your files are. Or (with the program closed) remove (cut and paste somewhere else) the en_US files and see what happens – does TeXstudio still list the dictionary? Try a totally different language (installing the Breton dictionary the way I described worked for me). – doncherry Jun 07 '21 at 19:45
  • Hm, strange. Your tips helped me figure out what works, but I don't fully understand it yet: My dictionary folder in the settings is set to C:\Users\MyUsername\AppData\Roaming\texstudio\dictionaries;[txs-settings-dir]/dictionaries. [txs-settings-dir] points to the folder in C:\Program Files..., which is where all the dictionary files (incl German) are. It seems like the dictionaries there are completely ignored. If I copy the German dictionary files to C:\Users\MyUsername\AppData\Roaming\texstudio\dictionaries, the dictionary is listed and it works! – stefanbschneider Jun 07 '21 at 20:00
  • What I don't understand is that this still holds if I remove C:\Users\MyUsername\AppData\Roaming\texstudio\dictionaries from the dictionary path, just leaving [txs-settings-dir]/dictionaries. Do you know why? For me, it'd seem "cleaner" to have the dictionaries under program files with the program, not under app data, but either way works! So feel free to add your tips as answer and I'll accept it. Thanks! :) – stefanbschneider Jun 07 '21 at 20:02
  • Actually, I'm not sure to where [txs-settings-dir] points. I don't know where this is configured. Maybe that's wrong? But if I click the folder icon, it opens at program files. – stefanbschneider Jun 07 '21 at 20:08
  • 1
    Glad to hear it works! It seems [txs-settings-dir]/dictionaries doesn't work here. If I put just that in, my Breton dictionary disappears. So just use C:/Program Files (x86)/TeXstudio/dictionaries instead and you should be able to keep your dictionaries in program files. That does seem to be the current place for them: These dictionary files are recent (2020), whereas those at AppData are a lot older (2013–15) in my case. – doncherry Jun 07 '21 at 20:09
  • [txs-settings-dir] should point to the "Location of the settings file (texstudio.ini)", but perhaps just for commands. – doncherry Jun 07 '21 at 20:12
  • 1
    Perfect, thanks. That resolves my last questions and my problem :) – stefanbschneider Jun 07 '21 at 20:12

1 Answers1

3

Change the dictionaries path (Wörterbuch-Verzeichnisse) to C:/Program Files (x86)/TeXstudio/dictionaries. The dictionary files of the language you want might already be there. If not, you can also get them from https://github.com/texstudio-org/texstudio/tree/master/utilities/dictionaries (download all files for the language you want).

More info on dictionaries in the TeXstudio user manual, section 1.4.1 Configuring the spell checker.

doncherry
  • 54,637
  • 1
    May I add that for users whose TeXstudio is in Program Files (i.e. the 64 bit folder) rather than Program Files (x86) (the 32 bit folder), it works the same except with the other folder: C:/Program Files/TeXstudio/dictionaries. If in doubt, check the folders for the dictionary folder and then use the appropriate one. – Markus G. Jun 10 '21 at 10:43