bug-auctex
[Top][All Lists]
Advanced

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

bug#36111: Support cleveref labels in AUCTeX and RefTeX


From: Ryan Kavanagh
Subject: bug#36111: Support cleveref labels in AUCTeX and RefTeX
Date: Wed, 5 Jun 2019 20:29:08 -0400
User-agent: NeoMutt/20180716

Package: auctex
Severity: wishlist

I use the cleveref package, which allows annotating \label commands with
an optional argument. Unfortunately, this prevents both AUCTeX and
RefTeX from detecting those labels.

To illustrate, here is some LaTeX code from which AUCTeX and RefTeX fail
to extract the label "eq:23":

    \usepackage{cleveref}
    \crefname{diagram}{diagram}{diagrams}
    % ...
    \begin{equation}
      \label[diagram]{eq:23}
      1 = 1
    \end{equation}

This is problematic, because the function reftex-label will reuse the
label "eq:23".

I am not sufficiently familiar with emacs lisp to submit a patch, but I
think I have found some of the places that should be updated:

* The variable LaTeX-auto-label-regexp-list in latex.el

* The function reftex-parse-from-file hardcodes the prefix "\\label{".
  Perhaps this could be a customizable regexp?

More details can be found in this question:
https://tex.stackexchange.com/q/494337/6128 .

Please add support for cleveref labels to AUCTeX and RefTeX.

Best,
Ryan

-- 
|)|/  Ryan Kavanagh      | GPG: 4E46 9519 ED67 7734 268F
|\|\  https://rak.ac     |      BD95 8F7B F8FC 4A11 C97A

Attachment: signature.asc
Description: PGP signature


reply via email to

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