I was looking for an Latex editor that has an auto completion function. Is there any available?
I thought about auto complete suggestion for common commands like for example defining chapters and sections etc.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI was looking for an Latex editor that has an auto completion function. Is there any available?
I thought about auto complete suggestion for common commands like for example defining chapters and sections etc.
Here is a list of LaTeX IDEs
While emacs+AucTeX doesn't have "autocompletion" per se but it does have something that performs the same role, and performs it better (obviously).
Let's take the example of adding section headings. With autocompletion I start writing \sec...
and then press TAB or some such autocomplete key.
With emacs, you press Ctrl+C and then Ctrl+S and emacs asks you what level of sectioning you want. You type sec...
and then TAB to autocomplete. Then emacs asks you how you'd like to label that section (I want to call this section foo
). It automatically adds a \label{sec:foo}
below your \section
command.
Fine. But here's the really useful part. Let's say you want an environment: Ctrl+C then Ctrl+E. Then emacs asks you what kind of environment you want. And if you tell it you want an environment emacs understands, like minipage
it will ask you for its compulsory arguments (width, for minipage). It will then create the environment and put you between the \begin
and \end
tags.
More cool features of emacs: abbrev-mode
which is basically auto-complete on magic!
And the smart ` : Typing ` then a gives you \alpha
likewise for other greek letters. ` then pressing the right arrow key gives you \rightarrow
Likewise for other arrow directions...
Also, you get like, 100 geek points just for using emacs. Fact.
abbrev mode
(ie. autocompletion) will complete any word, not just LaTeX macros, which is very handy if you use a lot of long words. Its sibling, dabbrev mode
, can automatically fix typos like "teh" and do other useful and fully automatic text replacement.
Mar 11, 2011 at 14:16
TeXworks has some builtin autocompletion, but take a look at the script autocompleteForTexworks. The script can perform completion on long words earlier used in your document, labels and filenames for \input
, \include
and \includegraphics
macros.
There is a video of it in action on youtube.
Guide to use.
Disclaimer: I'm author of the autocomplete script.
TexnicCenter in windows also has a completion function with Ctrl+space and additional custom commands can be added in xml files in the TexnicCenter program folder
You did not specify your OS, but if you're running GNU/Linux, you should have a look at Kile, which does that to some extent. Here's a screenshot illustrating that feature.
Multiplatform TeXworks has autocomplete (using tab). Texmaker and TeXlipse (Ctrl+space) have it and are multiplatform as well. I am hard pressed to think of any that do not offer it.
Atom is a text editor that can be extended with packages. People have made a wide range of these, giving you latex compilation, syntax highlighting, autocompletion and practically anything else that might be useful.
Plus, if it doesn't exist already, there's always the option to write the package yourself. You can then publish it, so everyone can access it.
Edit: I wrote an autocomplete package for it. It's highly customisable, and suggestions for features / improvements are welcome.