[Top][All Lists]

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

Re: [AUCTeX-devel] enumerate a kludge

From: Uwe Brauer
Subject: Re: [AUCTeX-devel] enumerate a kludge
Date: Tue, 21 Aug 2018 20:45:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>> "Arash" == Arash Esbati <address@hidden> writes:
Hi Arash

   > Uwe Brauer <address@hidden> writes:

   > Hi Uwe,

   > yes, some code is necessary as AUCTeX has no provisions to add a \label
   > after every \item in an enumerate environment.  I also think that is not
   > necessary, but that's only my opinion.

Right, I agree in general. But I am playing with Leslie Lamports proof
style since a couple of weeks. Finally I decided not to use it nor to
write up a auctex style file because:

    1. It is not on CTAN and Lamport told me that he does not want/know
       how to upload it.

    2. Redefines the proof environment so come into conflict with amsthm

    3. Has this particular reference/label system. The references are
       supported by reftex, as I learned from you, but the labels are
       not (see the problems with the ocgx package and its non standard
       label system)

However it is relatively easy to configure the enumitem package to
produce similar output as Lamport style.

An essential part is then, however ,to refer to the proof steps which are
label of the enumerate environment, and that is why I want automatic
inserted label, in the same way I want them for equations. 

   > My recommendation is to put something like this in your init file:

   > (with-eval-after-load "latex"
   >   (defun ub/LaTeX-item-enumerate ()
   >     (TeX-insert-macro "item")
   >     (save-excursion
   >       (LaTeX-label environment 'environment)))

   >   (add-to-list 'LaTeX-label-alist
   >                '("enumerate" . "item:")
   >                t)

   >   (add-to-list 'LaTeX-item-list
   >                '("enumerate" . ub/LaTeX-item-enumerate)
   >                t))

   > It should do the job.

Unfortunately it does not. The following does though.

(add-hook 'LaTeX-mode-hook 'my-LaTeX-TeX-add-symbols)
(defun my-LaTeX-TeX-add-symbols ()
   '("enumerate" LaTeX-enumerate-insert)))

(defun LaTeX-enumerate-insert (environment)     ;Version:1.20
  (LaTeX-insert-environment "enumerate")
  (and (LaTeX-label environment)

I also liked to have that LaTeX-insert-item inserts a label
automatically, fortunately cdlatex-item does.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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