[Top][All Lists]

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

Re: [AUCTeX-devel] change \eqref to (\ref)

From: Uwe Brauer
Subject: Re: [AUCTeX-devel] change \eqref to (\ref)
Date: Tue, 21 Feb 2017 13:07:20 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

   > Hi Uwe,
   > Uwe Brauer <address@hidden> writes:

   > I would do something like this:

   >     (defun my-eqref-2-ref ()
   >       (interactive)
   >       (save-excursion
   >         ;; Optional:
   >         (goto-char (point-min))
   >         ;;
   >         (query-replace-regexp
   >          "\\\\eqref{\\([^}]+\\)}"
   >          "(\\\\ref{\\1})")))

   > It should cover most cases.  latex.el does this for \label:

   >     "\\\\label{\\([^\n\r%\\{}]+\\)}"

Cool thanks, maybe this way, one day finally I master regexp :-D


reply via email to

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