Re: Some idea about "\item".

"Adam Johnson" <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
>> I'm using the HA-Proper package for writing a presentation slides.
>>
>> With this package, the command "\item" has been redefined as "\xitem".
>>
>> However, everytime, when I use "C-c C-j", it only inserts "\item".  Is
>> there any possible method to let AUCTeX figure out I need insert
>> "\xitem" here instead of "\item" according to the current environment
>> or the package?
>>
>> Another idea is that, for the first entry in the current list
>> environment, if I input "\xitem", "\bibitem", etc., then from the
>> second entry, if I use "C-c C-j", AUCTeX can intelligently insert the
>> corresponding "\xitem", or "\bibitem", etc.
>
> You can have a look at the style file for beamer which uses its own
> function `LaTeX-item-beamer' for redefining the way \item's are
> inserted.  The regular functions for inserting items are defined in
> latex.el after the definition of the variable `LaTeX-item-list'.
>
> Preferably such specialities should go into a style file for
> HA-prosper.  There is some information about writing style files in
> the manual of AUCTeX.
>

Thanks.  This is one way to solve this problem.  However, this kinds of 
item-style issue are not very uncommon.  For example,  the "\li" command in 
"clrscode"  package behaves like "\item".  Therefore, is it possible to 
define a variable like "TeX-item-style-list" or something in AUCTeX, the 
users can define the list easily?  For example, add "\xitem", "\bibitem", 
"\li", etc. into this list.  If the user just inserted "\item" last time in 
an environment, then "C-c C-j" will insert "\item" in the same enviroment. 
If the user just used "\xitem" in this environment, then "C-c C-j" will 
insert "\xitem".  This property doesn't need be activated in default.  If a 
user need use it, he/she can activate it.


> -- 
> Ralf
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.