This is would be handy in my opinion.

But, I would like to point out that the current automatic label is not quite
unique enough. For example, just today I inserted a label for a section
called "Summary". The default label was "sec:Summary". Problem is, I have a
"Summary" section in several chapters and so I had to manually edit it to be
"sec:Ch3Summary". Luckily I spotted this, as LyX doesn't seem to notice
whether you have duplicate labels. If you do have more than one label of the
same name then LaTeX appears to use the last one that was defined. At least
this was for MikTex and I don't know if this is standard behavior or not.

It occurs to me that the "outline" panel has lists of sections, figures, and
tables. Perhaps that could be used somehow?

On 10/31/07, Helge Hafting <[EMAIL PROTECTED]> wrote:
>
> Well - I have the hope that we can get rid making the labels instead.
> After all, LyX already knows about sections, subsections,
> footnotes, formulas and the other referencable things.
>
> So we should be able to insert a reference without having
> to make a label first - LyX should then create a label automatically for
> us.
>
> This approach helps a lot when referencing something that isn't
> visible already. I do a lot of that.  Optimizations for the
> case where you want to reference something that is visible
> above or below should be possible for this case too.
>
> Perhaps something like:
> 1. Press some hotkey for inserting a cross reference by pointing.
>     The reference will be inserted where the text cursor is
>     at that moment.
> 2. The mouse pointer changes to an arrow with "ref" written
>     under it, to indicate this new mode of operation.
>     You can still use the scrollbar or arrows/pgup/pgdown to
>     scroll the document.
> 3. Click on whatever you want to refer to.  Could be a section heading,
>     could be somewhere in the text, could be a footnote, a figure,
>     a formula, . . .
>
> 4. Wherever you clicked, LyX checks for an existing label
>    and uses that. If there is none, LyX auto-inserts a new label.
>     A reference to that
>     label happens in the original cursor location. The
>     mouse pointer goes back to normal. The cursor remains
>     at the reference, so you can keep writing.
>     Perhaps the view scrolls
>     back to the cursor - perhaps not - I am not sure what is best.
>     One might want to check visually that the label happened
>     in the correct place, and any typing should bring us back
>     to the cursor anyway.
>
> 5. There is probably no need to pop up a dialog - the user can
>     click the inserted reference if he need to set a ref style.
>     Usually, documents have lots of references of the same
>     kind, so just use whatever style the user used the last time.
>
>
> This way we can insert the label and the reference at the
> same time, and usually no dialogs involved. Of course
> we still need a dialog for referencing stuff that is
> "too far away" to look up directly, but this is a nice optimization
> for the common case of referencing the nearest floats.
>
> Helge Hafting
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to