Uwe Brauer <o...@mat.ucm.es> writes: > > Uwe Brauer <o...@mat.ucm.es> writes: > > > Sigh, sorry, my bad. `LaTeX-exam-label' is not defined at that point of > > time. Please try this: > > > (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") ))) > > Well thanks, there is no error, but > > It still inserts only > > \titledquestion{Hello}[10]\label{exm:3} > > Instead of > > \titledquestion{Hello}[10]\label{exm:test-exam1:3}
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. Best, Arash _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel