[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] 27.0.50; Wrong parsing of key-val labels
From: |
Arash Esbati |
Subject: |
[AUCTeX-devel] 27.0.50; Wrong parsing of key-val labels |
Date: |
Sat, 23 Feb 2019 14:17:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 |
Hi all,
Please consider the following LaTeX code in a buffer where RefTeX is
enabled:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[
caption = Some caption ,
label = lst:1 %
]
foo
\end{lstlisting}
\begin{lstlisting}[
caption = {[Short caption]Long caption},
label = lst:2
]
bar
\end{lstlisting}
\begin{lstlisting}[
language = {[LaTeX]TeX} ,
frame = single ,
caption = {[Short caption]\textit{L\textbf{o}ng} caption} ,
label = lst:3 ]
foobar
\end{lstlisting}
\end{document}
--8<---------------cut here---------------end--------------->8---
When hitting `C-u C-c )' in order to add a \ref, RefTeX fails to see the
last 2 labels. For the first one, it inserts
\ref{lst:1 %
}
The is due to the second regexp in `reftex-label-regexps'. Please find
attached a patch fixing this issue. Any comments welcome.
Best, Arash
0001-Improve-matching-of-key-val-labels.patch
Description: Text Data
- [AUCTeX-devel] 27.0.50; Wrong parsing of key-val labels,
Arash Esbati <=