- AUCTex: Emacs package for editing LaTeX documents
- ESS: Emacs Speaks Statistics: Interactive R and S-PLUS sessions in Emacs
- UltraTex and Lightning Completion: more on LaTeX in Emacs
General Note (by Jenny Bryan): Everything like this has a learning curve, but, for all of the above, the ultimate benefits make this painful phase worth enduring.
External Resources
AUCTeX: editing LaTeX files in Emacs
AUCTeX is an Emacs package that makes editing LaTeX documents so much easier. It has been installed and configured on StatNet servers (as of November 1, 2005). However, if you want to use it on your own computer, you'll need to download the package and install it yourself (it doesn't come with Emacs by default).
When emacs opens a file with a .tex extension, the additional menus are named LaTeX and Command
- From the LaTeX menu you can select many environments without typing them (e.g. begin{enumerate} ... end{enumerate}). There are also convenient shortcuts to make typing mouse-free and even faster (e.g. C-c C-e to insernt an environment).
- From the Command menu, you can run the latex, xdvi and pdflatex programs, etc, and do a spell check that ignores latex commands. Shortcuts are also available and are, in fact, quite smart: it only takes a couple of rounds of C-c C-c to compile the file and open the result in xdvi.
This tip is provided by Harry Joe. Seconded by Mike Danilov.
ESS: Emacs Speaks Statistics
ESS a GNU Emacs and XEmacs mode for interactive statistical programming and data analysis. It is particulary good for R and S-PLUS. It has been installed and configured on StatNet servers (as of November 1, 2005) but you'll need to install it yourself if you want to use it on your own computer.
ESS can be used to save/edit interactive sessions in Splus and R (as well as SAS, stata and other statistical packages).
- To start R in emacs, type: Alt-X R (assuming Alt is your Meta key).
- Within the R command prompt, hit Alt-P to access previous R commands and Alt-N to access next R commands (which can then be edited); the list of previous commands is cyclic, so the first hit of Alt-N will lead to the first command of your present session. Note: in a properly configured environment Shift-UpArrow and Shift-DownArrow work as well.
- Requesting help on a function will bring the help documentation in a split screen, so that you can copy and paste the examples to run etc
- There is function name completion with TAB (similar to command/filename completion in the bash shell)
- more details about ESS, consult the help ess info within emacs (Crtl-h m, when in ESS)
This tip is provided by Harry Joe. Seconded by Jenny Bryan and Mike Danilov.
UltraTex and Lightning Completion
The UltraTex and Lightning Completion packages (play very nicely with AucTeX) will also really speed up writing LaTeX and will make it virtually impossible to have mismatched parentheses, opened/closed environments, references to non-existent figures/table/sections, etc. (and many other maddening mistakes).
This tip is provided by Jenny Bryan.