[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
smime.p7s
Description: S/MIME cryptographic signature
- change $$ to equations with automatic labels,
Uwe Brauer <=