[Top][All Lists]

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

reftex-reference and insert \eqref{} not (\ref{})

From: Uwe Brauer
Subject: reftex-reference and insert \eqref{} not (\ref{})
Date: Mon, 02 Dec 2019 10:09:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)


I have not used eqref for ages, but I just learned

does some nice magic, in the sense that it will automatically enumerate
only these equations which have a reference. That is the option most
journals, alas, require.

So I tried to play around with the reftex reference style menu but
reftex-reference always inserts (\ref{}) not \eqref{}

My settting is 
(setq reftex-label-alist
        '(("equation"  ?e "eq:%f:" "~(\\ref{%s})" t
           ("Equation" "Eq." "Eqn." "Gleichung"  "Gl."))
          ("enumerate" ?i "item:%f:" "~\\ref{%s}" item
           (regexp "Items?" "Punkte?"))
          ;;           ("\\step{*}{}"       ?P "st:" "~\\stepref{%s}" 2 ("Step" 
          ;;           ("\\begin{step+}{*}" ?P "st:" "~\\stepref{%s}" 1000)
          ("neweq"  ?e "eq:%f:" "~(\\ref{%s})" t
           ("Equation" "Eq." "Eqn." "Gleichung"  "Gl."))
          ("newequation"  ?e "eq:%f:" "~(\\ref{%s})" t
           ("Equation" "Eq." "Eqn." "Gleichung"  "Gl."))
          ("axiom"   ?a "ax:%f:"  "~\\ref{%s}" nil ("Axiom"   "Ax."))
          ("func"   ?F "fnc:%f:"  "~\\ref{%s}" nil ("funci\'on"  "Fnc"))
          ("fact"   ?C "fct:%f:"  "~\\ref{%s}" nil ("Fact"   "Fct"))
          ("script"   ?T "scpt:%f:"  "~\\ref{%s}" nil ("Script"   "scpt"))
          ("titledquestion" ?x "exm:%f:"  "~\\ref{%s}" nil ("ejercicio"  ))
                                        ;                  ("titledquestion" ?x 
          ;;           `("titledquestion" ?x
          ;;             ,(concat LaTeX-exam-label "%f:")
          ;;             "~\\ref{%s}" nil ("ejercicio") )
          ("claim" ?k "clm:%f:" "~\\ref{%s}" t   ("Claim" "claim" ))
          ("thm" ?h "thr:%f:" "~\\ref{%s}" t   ("Theorem" "Theor." "Th."))
          ("example" ?E "ex:%f:" "~\\ref{%s}" t   ("Example" "Ejemplo"))
          ("ex" ?A "ex:%f:" "~\\ref{%s}" t   ("Ejercicio" "ejercicio"))
          ("cor" ?c "cor:%f:" "~\\ref{%s}" t   ("Corollary" "Cor." "C."))
          ("rem" ?R "rem:%f:" "~\\ref{%s}" t   ("Remark" "rem." "R."))
          ("SaveListing" ?V "SvL:%f:" "~\\ref{%s}" t   ("SaveL" )-1)
          ;;          ("prac" ?P "prac:%f:" "~\\ref{%s}" t   ("Practica" 
"prac." "P."))
          ("prop" ?p "prop:%f:" "~\\ref{%s}" t   ("Proposicion" "proposition" 
"prop." "P."))
          ("sol" ?O "sol:%f:" "~\\ref{%s}" t   ("Solucion" "sol." "S."))
          ("lstlisting" ?G "lstl:%f:" "~\\ref{%s}" t   ("lstlisting" "lst." 
          ("lem" ?L "lem:%f:" "~\\ref{%s}" nil   ("Lemma" "Lema" ))
          ("slide" ?l "slide:%f:" "~\\ref{%s}" t   ("slide" ))
          ("Slide" ?S "slide:%f:" "~\\ref{%s}" t   ("slide" ))
          ("prop" ?M "prop:%f:" "~\\ref{%s}" t   ("Proposicion" "prop." "P."))
          ("\\myfig" ?f "fig:%f:" nil          2)
          ("defn" ?D "def:%f:" "~\\ref{%s}" nil   ("Definition" "Definici'on"))
          ;;           ("enumerate" ?i "item:%f:" "~\\ref{%s}" item
          ;;            (regexp "Items?" "Punkte?"))
          ("enumerate" ?i "item:%f:" "~\\ref{%s}" nil
           (regexp "Items?" "Punkte?"))
          (AMSTeX      "amsmath with eqref macro"
                 ((nil ?e nil "~\\eqref{%s}")

But it does not work as expected. Anybody has an idea?


Uwe Brauer 

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

reply via email to

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