Tommaso Cucinotta wrote:
Richard Heck ha scritto:
do something like hold down control+shift and click on a label to insert a reference to that label at the current cursor position.
I'd like to suggest an alternative usage paradigm for this, conditioned to
the implementation of context-sensitive menus. The idea is:

1. right-click on a label, numbered equation or section/paragraph
2. select a menu entry "copy reference"
3. then simply paste wherever you want in the document, and you get
   a reference to the label.

So many times I have the label just a few lines above (because I just inserted a table, picture, or formula), and I need to refer to it, but the process for doing it is really boring (I wish I could even "drag" the label into a text position).
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