|
From: | Delia Fara |
Subject: | Re: [AUCTeX] Automatic \item with C-c C-e |
Date: | Mon, 8 Jun 2015 15:02:11 -0400 (EDT) |
User-agent: | Alpine 1.00 (OSX 882 2007-12-20) |
Thanks, Mos? I've just written it as a LaTeX macro using "\newenvironment", put it in a .tex file and enable it using "\input{}". The point of the list is to have the labels be numbers in parentheses that don't start over with "(1)" with each \begin{}... \end{} pair. ------------------------------- \newcounter{running} \newenvironment{runninglist} {% \begin{list}{\refstepcounter{running}(\arabic{running})} {\renewcommand{\makelabel}[1]{ ##1} \settowidth{\labelwidth}{(999)} \setlength{\leftmargin}{0in} \addtolength{\leftmargin}{\labelwidth} \addtolength{\leftmargin}{\labelsep} \rightmargin=\leftmargin} } {\end{list}} \newcommand{\rlabel}[1]% {\addtocounter{running}{-1}\refstepcounter{running}\label{#1}} -------------------------------- I'm not very sophisticated, so maybe I should just leave things atthat. Thanks for your response! Cheers, Delia On Mon, 8 Jun 2015, Mosè Giordano wrote:
Hi Delia, 2015-06-08 18:25 GMT+02:00 Delia G. Fara <address@hidden>:Hi there, I've written a customized list environment. I would like it to automatically offer "\item" when I call it with C-c C-e, the way it works with itemize and enumerate. How can I do that?Where do you define this environment? In a custom style file? In that case, you should write your own .el style file (see https://gnu.org/software/auctex/manual/auctex.html#Style-Files for more information) and add (LaTeX-add-environments '("YOURENVIRONMENT" LaTeX-env-item)) inside the style hook. Replace "YOURENVIRONMENT" with your environment name (case sensitive, with quotes). Bye, Mosè
[Prev in Thread] | Current Thread | [Next in Thread] |