[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Re: Items in itemize-like environments

From: Ralf Angeli
Subject: [AUCTeX] Re: Items in itemize-like environments
Date: Tue, 11 Apr 2006 20:01:25 +0200

* Nikos Apostolakis (2006-04-11) writes:

> I am using the exam document class.  In that class there are two new 
> itemize-like environments defined, namely "questions" whith each item 
> called "question" and "parts" with each item called "part".  I would
> like to use the command "LaTeX-insert-item" to insert items for
> these environments.  By reading the info manual I concluded that
> this can be acomplished by setting the variable "LaTeX-item-list" 
> so I did
> (setq LaTeX-item-list
> '(("questions"  '(lambda () (insert "\\question")))
>   ("parts"  '(lambda () (insert "\\part")))))
> and it didn't work: when I type "C-c C-j" inside a "questions" 
> environment I just get "\item" just as before.  What did I do 
> wrong?

(add-to-list 'LaTeX-item-list
             '("questions" . (lambda () (insert "\\question"))))

Analogously for "parts".  You might also need to do
(LaTeX-add-environments '("questions" LaTeX-env-item))
and to adapt `LaTeX-item-regexp'.

It would probably be a good idea to create your own style file for
stuff like that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]