3

When a LaTeX command is written incorrectly, the document does not compile and the workflow is interrupted. In most cases, this is due to a typo, such as writing \foornote{} instead of footnote{}.

Are there any editors that use an auto-correct for situations like this?

The algorithm for doing the auto-correct, I guess, would be similar to the auto-correct for spelling as found in MS Word, which changes things like neccessary to necessary on-the-fly without users even noticing.

4
  • Take a look at faq Q's LaTeX Editors/IDEs and choose yours. Commented Apr 24, 2013 at 18:04
  • @texenthusiast The list doesn't specify the feature I'm looking for, and researching each one would be a considerable task. (Note, at this point, I'm not sure the feature exists at all).
    – User 17670
    Commented Apr 24, 2013 at 18:07
  • 2
    May be you are right, see syntax checking package \usepackage{syntonly} \syntaxonly Commented Apr 24, 2013 at 18:15
  • In vim, you can use :imap or IMAP(..) (the latter is part of vim-latex-suite) to do auto-correct on the fly (but you'll have to build the database of auto-correction yourself.
    – Aditya
    Commented Apr 24, 2013 at 22:24

1 Answer 1

7

TeXstudio (Sourceforge / tex.sx) doesn’t have autocorrect (built in, cf. Qrrbrbirlbel’s comment), but it marks unrecognized macros with a red background:

unrecognized macro highlighting
\foornote vs. \footnote

In order for this to make sense, TeXstudio notices which packages you are using and automatically tries to determine which macros are defined by them, mostly sucessfully so (if it should fail, you could complement macros manually):

with lipsum loaded without lipsum loaded
lipsum loaded vs. lipsum not loaded

However, when you’re using TeXstudio (or just about any editor with decent autocompletion, you’re not going to need this too often because \footnote will be suggested to you as an autocomplete option:

autocomplete autocomplete suggestions for \foo

3
  • Similar features are available for auctex in emacs. Commented Apr 24, 2013 at 18:53
  • Yes, TeXstudio has Auto-Correct (“Macros”) but you have to feed it manually. Commented Apr 24, 2013 at 20:05
  • @Qrrbrbirlbel You mean you can program it to replace \foornote with \footnote? I guess that counts, yeah. I think MS Word’s replacement mechanism also relies on a hard-coded list of common typos. Why don’t you add an answer about TeXstudio’s macros?
    – doncherry
    Commented Apr 24, 2013 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .