Showing posts with label Emacs. Show all posts
Showing posts with label Emacs. Show all posts

Wednesday, December 23, 2009

LaTeX+Emacs on Ubuntu Karmic

I am used to LaTeX + Aquamacs for writing papers.  I tried to reproduce the same environment on Ubuntu Karmic.  The easiest way to do that:

This is a hell of a download (~500MB) so wait.
To enable Reftex and Flyspell in emacs add the folowing to ~/.emacs file:

and this is pretty much it.  Now when you open a .tex in Emacs file you will see LaTeX and Ref menu.

BTW, gedit is not bad for editing LaTeX files too but not as many features as Emacs has and no in-text preview of the formulas.
Reblog this post [with Zemanta]

Friday, December 18, 2009

Really cool command in Emacs

Today in Emacs I have uncovered a really cool mode: "Alt+x query-replace-regexp". This will open a small window in which you type a regexp.  Emacs will be showing matches in the currently open file as you type. After that do ^C^W^C^Q to copy the regexp and close builder. Next Ctrl-Alt-% and paste the regexp into the buffer.  Before using regexp remove enclosing double-quotes.

This is really useful. I am a Perl person and for me Emacs regexp symbols are sort-of familiar but I can never remember the right ones. With instant feedback I can reuse my perlified brain to create rather sophisticated regexps in Emacs.  Too bas that I've learned about this feature only today.