auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] insert a label with the file name as suffix.


From: Uwe Brauer
Subject: Re: [AUCTeX-devel] insert a label with the file name as suffix.
Date: Sat, 06 May 2017 13:52:35 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

    > Uwe Brauer <address@hidden> writes:

    > Hmm, I can't reproduce what you describe.  I started Emacs, eval'ed the
    > above code in scratch buffer, opened test-exam.tex like this:

    >     \documentclass[answers]{exam}

    >     \begin{document}
    >     \begin{questions}
    >     `C-c C-m titledquestion RET Title RET 10 RET' results in
    >     \titledquestion{Title}[10]\label{exm:exam-test:1}
    >     \end{questions}

    >     \end{document}

    > which is the correct result, I think.

It is the correct result, unfortunately I cannot repoduce it. With the
same steps as you indicated I end up with
\titledquestion{Title}[10]\label{exm:1}

So I presume it is my internal setting.
In order to check it

I generated a file

 my-ref.el which is 


(require 'reftex)

(with-eval-after-load "latex"
  (add-to-list 'LaTeX-label-alist '("titledquestion" . LaTeX-exam-label)))

(with-eval-after-load "tex-style"
  (add-to-list 'reftex-label-alist
               `("titledquestion" ?x
                 ,(concat LaTeX-exam-label "%f:")
                 "~\\ref{%s}" nil ("ejercicio") )))


Started emacs -Q (or -q) and loaded the file, however I obtained 
unknown function with-eval-after-load.

This function is defined in in subr which
Library is file /opt/emacs25/share/emacs/25.1.50/lisp/subr.elc

So I don't understand why it is not loaded while reftex is.


BTW when I just eval the expression 

(with-eval-after-load "tex-style"
  (add-to-list 'reftex-label-alist
               `("titledquestion" ?x
                 ,(concat LaTeX-exam-label "%f:")
                 "~\\ref{%s}" nil ("ejercicio") )))

And run describe-variable

Reftex-label-alist

It does not return anything about titledquestion!

Should I try to use customize-option?
Any suggestion how to proceed?

Thanks

Uwe 





reply via email to

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