0

For example, I use 'the' frequently, but mistype it as 'teh' and MS word automatically corrects such words without me having to right-click the incorrect word and select the correct spelling. Similar examples are 'completoin' for 'completion', 'nad' for 'and', etc. MS Word automatically corrects the spelling of such common mistakes on-the-fly, but TexStudio just gives a red wiggly line without correcting it on-the-fly.

I have checked the below link and it hasn't helped me. The link below contains information on how to create Macros for the usage of abbreviations, which isn't what I want. Also, it contains information on auto-correct multiple capital letters and auto-completion of technical words, which again is not what I want.

NOTE: This is NOT a duplicate of the below question.

Is there an Autocorrect feature in TeXStudio 2.6.2?

2
  • 2.6.2 is outdated. current version (as of 09.06.2019) is 2.12.16. also, see this post here, for further info to your problem: tex.stackexchange.com/questions/150877/…
    – naphaneal
    Jun 9, 2019 at 18:26
  • The above link does not solve my problem. I've looked at it. I didn't mention the version of Texstudio in my question. Thanks.
    – mnatch
    Jun 9, 2019 at 18:29

1 Answer 1

1

Grammar checking and spell checking are slightly different in tex editors compared to text editors. Many are / work similar to a programmers IDE where syntax checking is more important than grammatical errors.

TeXstudio prides itself on the ability to autocheck and autocomplete. However it holds back 1 step from auto correction. (Unless you install the supported Language Tool enhancement)

You may wish to call a variable \teh to represent tertiary elemental holding Teh last thing you want is an overzealous grammatical checker saying "fumble figures" and changing it behind your back.

However there have been changes since the previous answer

notably you can add as a first line

% !TeX spellcheck = en_GB

TeXstudio will automatically load the specified dictionary for on-the-fly spell checking. This allows to easily work with files in different languages without the need to manually switch the spellchecker for every document.

So with or without that first line setting I automatically get a red wibbly line under teh and if I right click the dictionary offers a first suggestion as the so auto spell check is on by default and in my case my default language is en_GB

Grammatical Auto-correction can be almost simulated by means of personal auto-completion files or scripts where a tab or ctrl-space can add or be used to change a LaTeX entry such as \theat allows me to (by default) correct first to \theequation or any other choice I might add.

The full language grammar checker (with Auto Correct) is based on the standard http API of LanguageTool, and requires a separate installation of LanguageTool and java.

Note You need TeXstudio 2.12.2 or later to work with LT 3.6 or later
see http://wiki.languagetool.org/checking-la-tex-with-languagetool

Your install will need to provide a Web type HTTP server. By default, it will use port 8081, which is also the default for TXS.

Note that the following feedback from my TeXstudio implies I cannot show you any grammar examples since my security is set to "Not allow java" Note that LT is "Served" as a java driven service on an open communication port.

LT Report where java: JAVA: java -version
Real-time checking is enabled.
Grammar checking is enabled.
Tries to start automatically.
LT current status: error

1
  • Thanks. So the only other way to make this work is to combine Tex editor with a Text editor like Emacs which can do on-the-fly spell-checking?
    – mnatch
    Jun 9, 2019 at 19:38

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.