16

I have been able to set up the dictionary in TeXstudio, however, when I ask for Thesaurus, it tells me Thesaurus database not found.

Can anyone please help?

enter image description here

  • Welcome to TeX.SX! Is guess you're on Ubuntu? How did you install TeXstudio? Did you fetch the optional dependencies? – TeXnician Aug 7 '17 at 7:16
  • If I remember correctly, I downloaded and ran the debian file. – Shihab Khan Aug 8 '17 at 8:57
  • @Troy I've already retracted the flag and forgot the auto-generated comment. – Stefan Braun Aug 20 '17 at 19:22
20

A tiny note:

I did this on Windows, but I don't see this being much different for whichever OS you are using (Ubuntu, from the comments?). Also for the record, this is on TeXstudio 2.12.6 (hg 6632:7777b2b8a906).

This solution is largely inspired by another one from StackOverflow, but I will supplement this with pictures, and to provide an answer here in TeX.SE. Hopefully this will be sufficient and clear enough to answer future questions about thesauruses in TeXstudio.


With that out of the way,

Step 1. Obtain the database files for the thesaurus of your desired language. Admittedly, this might be the harder step of the two due to the lack of thesaurus databases out there. TeXstudio suggests two sites to look at (these links are clickable from within TeXstudio's options as well):

If you already have a database (.dat file), then skip ahead to Step 2. If you can't find one in your language, I don't think there's much you can do except to create the database yourself?

Here I provide an example for English. As of August 2017, it seems that the most updated English database is one from LibreOffice, found here, last updated Jul 2017. (The official project website can be found here.)

oxt

(Yes, it does say that it is a dictionary, but it works fine as a thesaurus as well.)

Go ahead and download the .oxt file. If you extract this .oxt file, using 7Zip or the likes, you should see a th_en_US_v2.dat and th_en_US_v2.idx file.

extract

Step 2. Copy the .dat and .idx files to a convenient folder for you. I would recommend placing it in a folder named thesaurus within your TeXstudio folder, (for Windows)

~\AppData\Roaming\TeXstudio\thesaurus

To find this directory quickly, you can try these steps:

Step 2a. Under TeXstudio options, navigate to:

Configure TeXstudio -> Language Checking -> 'Spell Check' section 

and see the directory for your Spelling Dictionary Directories (indicated by the longer red box). By default, this should link you to a dictionaries folder within your TeXstudio parent folder.

folder

The end result should be the .dat and .idx files being in a particular folder (the texstudio\thesaurus folder, in my case).

folder 2

Step 3. The final step is to copy the directory of the thesaurus .dat file and paste into the Thesaurus Database entry in the TeXstudio options. Another (quicker) way is to click the icon (indicated by the small black box) in the above picture, and navigate to the folder containing the thesaurus files. Choose the .dat file, click ok and you're done!

Step 4. If you set everything up correctly, then it should work when you give it a test. See the following:

Right clicking on the word (in this case, happy) that you want to search the thesaurus for:

4a

and getting a window that pops up:

4b

An alternative (default) keyboard shortcut for this is Ctrl+Shift+F8, which opens up the same thesaurus window for the word your cursor is currently sitting on.

  • Thank you very much. It worked perfectly for me on Ubuntu. :) – Shihab Khan Aug 28 '17 at 6:39

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.