auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [problems with TeX-arg-ref]


From: Uwe Brauer
Subject: Re: [AUCTeX-devel] [problems with TeX-arg-ref]
Date: Wed, 16 Nov 2016 19:44:11 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

   > Hi Uwe,
   > 2016-11-16 18:20 GMT+01:00 Uwe Brauer <address@hidden>:

   > I suspect you may want to use something like the `LaTeX-label'
   > function, or ultimately call

   >     (funcall LaTeX-label-function arg

   > if using `LaTeX-label' is not possible, but I still don't know exactly
   > what you want to do.

Ok, here is a simple situation. With all my reftex setting, I hit

 C-c C-c
 RET
 equation
 and voila I obtain automatically without and prompt

\begin{equation}
  \label{eq:exam-templ:1}
  
\end{equation}



The prefix, eq: and exam-templ: are a result by my configuration, the
number is generated automatically by reftex. This is the behavior I am
looking for and the code

    '("titledquestion" "Title" ["Points"] reftex-label)

Does precisely what I want. But I was advised not using this function.
Fine, but I want a solution so that RefTeX users will benefit from RefTeX
automatic label system, and no RefTeX users will suffer from the lack of it.

That is why I proposed to use

(defvar exam-use-reftex nil
  "Variable which controls whether to use `reftex-label' or `TeX-arg-ref'. 
Default is to use `TeX-arg-literal'.") ; or LaTeX-label


(if exam-use-reftex
    (defalias 'TeX-arg-literal 'reftex-label)) ; or 
    (defalias 'LaTeX-label 'reftex-label)) ;

I admit I don't like me solution very much but cannot come up with
something else.


Uwe 



reply via email to

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