[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] reftex patch to support resolved labels
From: |
Ralf Angeli |
Subject: |
Re: [AUCTeX-devel] reftex patch to support resolved labels |
Date: |
Mon, 27 Oct 2008 19:08:26 +0100 |
* Tim Toolan (2008-10-27) writes:
> Quoting "Ralf Angeli" <address@hidden>:
>
>> This looks like an interesting feature. Something like that might also
>> be useful when displaying labels in the table of contents (`C-c =').
>
> It could be useful there, but one thing to consider is that labels are
> not "required" for anything, and the only things that can be resolved
> are things that have a label. For instance, if there is a section 3,
> but it is not referenced in the document, and the writer decided not
> to label it, there will be no resolved label for it.
The TOC usually does not show labels, only if you type <l>. That's
what I was referring to.
>> While the display of typeset label numbers might be a good hint when
>> trying to identify the right label, I think the primary way to select
>> them should still be based on labels as they are written in the LaTeX
>> sources. First, a user should not be required to run LaTeX or look at
>> the typeset document to identify a label,
>
> True. Maybe when the .aux files are not present, instead of
> presenting question marks for all labels, it should not display
> anything at all.
That's also what I'd prefer.
>> second, the label name in the
>> sources often carries more information than the typeset one and
>
> That is true, but I am thinking of how I write, and when I reference
> an equation, I am almost always looking at in the typeset document,
> and my mind says something like
> "combining (17) and (18), we get"
> instead of
> "combining (\ref{eq:blah1}) and (\ref{eq:blah2}), we get".
This doesn't address my argument. (c: If you didn't select a specific
label type when making a reference with RefTeX, then "17" could relate
to a section, an equation, a figure, etc. The prefix of the label in
the LaTeX source and a descriptive name (if present) of the label make
it much easier to identify the right one.
Anyway, I think we are in agreement that both use cases (referencing by
source and by typeset labels) are valid ones.
>> third,
>> the selection from a list (<n>, <p>, <RET> or point and click) is mostly
>> more convenient than having to type a string with completion. (The
>> latter argument is obviously subjective and represents my personal
>> preference.) In the label selection process at it is now one can
>> activate a prompt for typing a label name with completion by pressing
>> <TAB>. One could either allow completion on typeset labels here as well
>> or provide a key to activate a dedicated prompt for asking for the
>> typeset label name.
>
> That is actually exactly how the patch behaves if
> `reftex-ref-start-in-filter-mode' is set to nil.
Oh, perhaps I should try that. (c:
>> The patch also contained some changes where I am not sure if they are
>> necessary or good, like commented `message' calls or `defvar' statements
>> to silence the byte compiler. But before talking about those (and me
>> looking deeper into the code) we should agree on the user interface.
>
> I agree about the defvar statements. I saw in reftex-sel.el that the
> same thing was done for the same reason, so I duplicated it, but it
> was probably a bad idea.
Yeah, it's likely better to either use a global variable or pass the
respective value as an argument to the functions where you need it.
> One additional thing that must be addressed before this patch can be
> applied is the compatibility with preview-latex. The reason for this
> is that I made the assumption that the .aux files will be consistent
> with the output that the user is looking at. Normally, it is very
> unusual that the .aux files will not be consistent, but in the case of
> preview-latex they will never be consistent because preview-latex
> doesn't seem to create .aux files. The .aux file information must be
> available in some way for this to work with it.
I have no idea about how preview-latex handles .aux files. Perhaps
David can comment.
--
Ralf