[Top][All Lists]

[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 14:03:27 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>>> "Uwe" == Uwe Brauer <address@hidden> writes:

    >> 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

    > 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.

Ok that error I resolved (on my Ubuntu machine there is still a emacs 24

So I tried out emacs 25 (and 26) -Q or -q

And loaded the following file
| (setq load-path (cons (expand-file-name 
"~/emacs/site-lisp/packages/auctex-git")  load-path))
| (setq load-path (cons (expand-file-name 
"~/emacs/site-lisp/packages/auctex-git/auctex")  load-path))
| (load "auctex.el" nil t t)
| (load "preview-latex.el" nil t t)
| (require 'tex-site)
| (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") )))

Then I open a exam file such as you said, when running 
-c C-m titledquestion RET Title RET 10 RET'
I am *asked* for a label, *but* 

Is inserted and not the file name. I am puzzled.
I will pull again the latest git  auctex compile and install it.


reply via email to

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