auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] TeX-toggle-debug-warnings on: TeX-next-error jumps to


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] TeX-toggle-debug-warnings on: TeX-next-error jumps to undefined ref, but not to duplicated labels
Date: Thu, 23 Jul 2015 10:42:52 +0200

Hi Uwe,

2015-07-22 13:39 GMT+02:00 Uwe Brauer <address@hidden>:
>
>
> Hello
>
> It is great that TeX-next-error is able to jump to undefined references,
> when  TeX-toggle-debug-warnings is on as in the following short document.
>
> However this document contains another error: duplicated labels.
>
>
>  TeX-next-error however just jumps to the aux file  but not to the
>  problematic labels or do I miss something?
>
>
> If not, could such a feature be implemented, please?
>
>
> regards
>
> Uwe Brauer
>
>
> \documentclass[12pt]{article}
>
> \begin{document}
> \begin{equation}
> \label{eq:testref:1}
> \int
> \end{equation}
>
> \begin{equation}
> \label{eq:testref:1}
> \int
> \end{equation}
>
>
> (\ref{eq:testref:3})
> \end{document}

AUCTeX simply parses the compilation log and there you can find

--8<---------------cut here---------------start------------->8---
(./test.aux

LaTeX Warning: Label `eq:testref:1' multiply defined.

)
--8<---------------cut here---------------end--------------->8---

That warning is reported in the .aux file, our parser does its job
well.  We _could_ in addition search for the second occurrence of
"\label{eq:testref:1}" in the document, but there are many problems
with that:

- what to do when the document is split over different files?  RefTeX
has `reftex-isearch-minor-mode', AUCTeX doesn't;

- what to do when labels aren't defined with "\label{labelname}"?

- what to do when the label is defined more than twice?  The log
reports this warning only once in that case, AUCTeX can't know how
many times the label has been defined, without reading the whole
document (see above points).

Your request is meaningful, but I don't think AUCTeX can do better
than what it does now, what should be improved (if possible) is the
compilation log.  For the record, also Texworks, TeXstudio and
Texmaker behaves like AUCTeX.

Bye,
Mosè



reply via email to

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