3

I am absolutely new to Emacs and lisp, but I am considering a possibility to start using it for LaTeX code editing.

What I have learned about Emacs (and it fascinated me) is that it has almost unlimited possibilities to modify it according to your needs. Before jumping into learning progress I need to clarify few things. One of the most important features that I need for my editor is possibility to create advanced highlighting schemes. Part of my work is rewriting LaTeX code to make it suitable for certain type of conversion to HTML. Visual emphasis of some parts in the code makes my work much easier. So the questions are:

  1. Is it possible in Emacs, to highlight certain commands only if they are in some kind of environment?
  2. Can I define highlighting priorities in case they overlap.
  3. Can I tell Emacs to highlight certain phrases only if they follow after some set (containing symbols or words)?
  4. Can I define different highlighting modes for math and text modes?
4
  • 4
    Without reading the question I am sure the answer is yes to all.
    – percusse
    Nov 3, 2012 at 11:50
  • 1
    Take a look at AUCTeX, maybe you should swing by emacswiki.org and take a look
    – Munken
    Nov 3, 2012 at 12:49
  • The first two comments to your question answer it pretty well. 1. Yes (or at least probably) all these things are possible with some use of Elisp. 2. Definately investigate AUCTeX.
    – verdammelt
    Nov 3, 2012 at 19:50
  • I agree with all the comments above. Emacs and Lisp are a pathway to many abilities some consider to be... ekhm... unnatural.
    – mbork
    Dec 17, 2012 at 13:15

1 Answer 1

1

I tend to answer in the way radio Yerevan used to answer:

Yes, this seems perfectly possible. You just have to learn elisp (500 pages manual...). Besides that, if you give Emacs a try, write your functions in a way that does not interfere with AUCTeX.

Ok, my message is: What can be done by coding elisp, is possible.

1
  • Joking aside, this shouldn't also be that difficult. Depending on your programming background, you might want/need to read the "An Introduction to Programming in Emacs Lisp" or not (which is rather a light read), and then follow with elisp manual, reading through .el source code files (installing all of them is a must!) and asking on stackoverflow or elsewhere. A good advice I got some time ago is to start with emacs mode or command doing something similar to what you want to achieve, and tinker with it. You will be addicted before you can notice it;).
    – mbork
    Dec 17, 2012 at 13:21

You must log in to answer this question.

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