[Tex/LaTex] How to configure the dictionary-path for TeXworks @ TeX Live portable

dictionariesinstallingspellingtexlivetexworks

I want to use spell-checking with TeXworks under TeXlive (portable) under Windows XP.

  1. Is it possible to use the dictionaries of Mozilla, e.g. en-GB.aff
    and en-GB.dic?
  2. Where do I place the dictionaries? Maybe C:\TeXlive2011\tlpkg\texworks\dictionaries\ ?
  3. How do I configure TeXworks to use these dictionaries?

a) adding TW_DICPATH=C:\TeXlive2011\tlpkg\texworks\dictionaries\ to texworks-setup.ini did not work

b) adding it in TeXworks > Preferences > Typesetting > Paths did not work

c) adding it in Start > configuration > control > system > expanded > environmental variables > user variables did not work

d) ... > system variables did not work

Best Answer

An e-mail of Stefan Löffler from the TeXworks team was forwarded to me. Translated into English it says:

I want to start by saying that the version of TeXworks, which is included in TeXLive (and other TeX distributions), is sometimes modified (for example, to adapt the paths to the respective distribution). [...] Yes, TeXworks supports [.dic and .aff] file formats (with the hunspell library). [...] Typically, the files should be installed into the resource folder of TeXworks. By default this is C:\Documents and Settings\<username>\TeXworks\ (see http://code.google.com/p/texworks/wiki/TipsAndTricks#Locating_and_customizing_TeXworks_resources), but as mentioned, I suppose TeXLive moved it elsewhere. From the comments on http://code.google.com/p/texworks/wiki/SpellingDictionaries I deduce that it is C:\TeXlive2011\texmf-config\texworks\ (i.e., the dictionaries should be placed into C:\TeXlive2011\texmf-config\texworks\dictionaries). To be safe, you can try the menu item "Scripts > Scripting TeXworks > Show Scripts Folder" and then navigate to the parent folder.

The TW_DICPATH environment variable is only supported on Linux.

Please also note that you must restart TeXworks to update the dictionary list.

Therefore:

ad 1.: Yes, it is possible to use those dictionaries.

ad 2.: For TeXlive2011 portable: To find out where to place the dictionaries, in TeXworks call Scripts > TeXworks skripts > show scripts directory (or whatever the menus are named in English). In that directory create a subdirectory dictionaries and copy the dictionaries in that dictionaries directory. (Possibly C:\TeXlive2011\texmf-config\texworks\dictionaries, depending where TeXlive was installed.)

For TeXlive2012 portable: In TeXworks call Scripts > TeXworks skripts > show scripts directory (or whatever it is in English). Go to its parent directory. There should be directories "completion", "configuration", "scripts" (of course), "translations", and "TUG" inside. In that directory create a subdirectory "dictionaries" and copy the dictionaries in that dictionaries directory. (Possibly C:\TeXlive2012\texmf-config\texworks\dictionaries, depending where TeXlive was installed.)

For current, non-portable TeXworks ChrisS provides the correct answer at https://tex.stackexchange.com/a/238852/6865.

ad 3.: Exit TeXworks. When the programme is started again, the dictionaries should be available. Go to the menue "Edit > Options > Editor > Language for spell check" and choose a language. Go to the menue "Edit > Spell check" and choose a language.