Alfredo Braunstein wrote:
Hi,

I agree with Christian's objections/comments in general.

What would be the problem of having normal labels automatically
inserted by LyX when one refers to a section etc in an appropriately
enhanced insert->cross-reference dialog?

In this way, 1) one doesn't have to insert them manually 2) LyX comes
up with a good name 3) no artificial strange copy-paste semantics is
needed, they are just normal labels.

Additionally, a) an easy way to go to referers of a label and b)
missing label latex warnings being catch by the errorlist, would make
working with cross references much nicer.

Sorry if some/everything of this was already proposed :-}
Excellent idea - auto-inserting a LyX label simplifies things a lot.

So the design will be something like this:
1. Insert->Label is kept, as some entities can span several pages.
   But it will rarely be needed now.
2. The cross reference dialog will list everything that _can_ be
   referenced (sections, enumerations, formulas, ...)
   If something without an existing label is referenced,
   a LyX label will be created automatically at the beginning of the
   referenced entity.

All changes is then confined to the cross reference dialog.
It must list many more options than before, and it must
insert autolabels when necessary.

UI fine tuning:
A large document will have _lots_ of referencable stuff, so some filtering
of the referencable entities is useful. There should be a slider
for deciding how deep the sectioning is listed, with the default being the
same as the last level to have printed numbers.  A reference to
subsubsection 1.2.3.4 is probably not much used if only
the sections and chapters have printed numbers.
Simple on/off switches should be provided for other referencable stuff.
Enumerations & footnotes should probably default off - there can be lots and lots
of those. The list should indicate what kind of object is referenced,
as a footnote and a section could have similiar text.

More UI fine tuning:
The current labels are big and clunky, and breaks up the text when there
are many of them. Some ideas:
* Collapse the label into only a label icon (same icon as on the toolbar)
  This is much smaller.
* For a label that is at the very start of the referencable entity
  (true for all auto-inserted labels) display the icon in the margin
  so we don't mess up reading of the text.


The text problem:
What to display in the cross reference dialog for something that
doesn't have an existing label?

This is easy enough for sectioning, enumerations & footnotes - just print
the first few normal words. A user who wants better than that
can insert his own labels.

But how about formulas? I guess showing pieces of math in the
xref dialog is too tricky?  One could list the latex math, but not
all our users know latex.  Another option is to give up on this and
just list formula1,formula2,..., and let the user insert his own labels
if he wants more meaningful entries.

Also, a footnote/section/whatever can be "empty", i.e. no normal text.
A footnote can be completely empty, a section heading may
consist of only math or only a picture. In such cases, fall
back on footnote5, section23 and so on.

Helge Hafting

Reply via email to