auctex-devel
[Top][All Lists]
Advanced

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

change $$ to equations with automatic labels


From: Uwe Brauer
Subject: change $$ to equations with automatic labels
Date: Wed, 12 Jan 2022 09:18:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hi all

I am using the following code

(defun my-change-dollar-to-equation ()
  (interactive)
  (save-excursion
  (replace-regexp "\\$\\$\\(\\(.\\|\n\\)*?\\)\\$\\$"
                  "\\\\begin{equation}\\1\\\\end{equation}")))

But realized it would be nice to have for every changed equation, a
label. I tend to use reftex-label for that purpose. But to include the
automatic labeling in that simple function is beyond me, I am afraid.

Can any of the elips gurus help?

Thanks

Uwe Brauer 

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


reply via email to

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