[EMAIL PROTECTED] wrote:
On Tue, 18 Sep 2007, Yann Disser wrote:

It would be nice if you considered implementing the possibility of cross-referencing to sections etc without the need of inserting ugly labels - the use of labels should in my opinion be reduced to an absolute minimum. My works are often full of labels for cross-referencing to other parts of themselves (and equations and figures and tables etc). This makes the text less readable.

Similar issues were discussed a while back. So as a user, I think your input would be appreciated. What's your tought on thinks like these:

* Is the problem that the labels are shown, or that they exist?
For me, the problem is the hassle of having to insert them. This is
very occationally useful, e.g. when referring to the fifth paragraph
of some section. It _may_ fall on another page than the section heading,
so it is then necessary to insert a label to get the page number right.

Visible labels is also a problem, but "auto-labels" for all
numbered entities should leave so few visible labels that we
probably want to have them.
* What would you think of an easy way to enable/disable the display
  of (all) labels?  Possibly something similar for other disturbing
  elements such as ERT insets.
No need - make LyX work (mostly) without inserted labels. LyX
can autogenerate a latex label during latex code export, when
some entity happens to have a reference.

* How do you envison a user referring to a section? This is the case when
  cross-referencing it without (exlicitly) using a label.
Insert->reference, using the normal dialog. But now the dialog
will list every referable entity in the entire document. I.e.
all headings, enumerations and so on.

Of course this could get a bit cluttered for a big book, so a nice implementation
ought to have buttons for turning categories on/off. Someone
who usually refer to sections will turn off display of headings
below section, as well as enums. There could be lots of enums,
so default them to off. This can probably be taken further,
but is merely UI refinement. For sectioning, the default could be to
display down to the sectioning level that actually will be numbered
in the output.


* Is it problematic having to come up with "names" for the labels?

* If labels are generated automatically, how should they get their "name"?
A LyX user won't see the label name at all, so it doesn't matter much.
For the benefit of latex users, perhaps some simple scheme based
on category, i.e. sect1, sect2, subsect5, part9, enum12, formula67, ...

* What should happen if for instance a label is automatically inserted in
a section heading based on the title of that heading, and the heading is
  subsequently deleted?
You can do that today with manual labels, and LyX will then leave a
xref to a label that doesn't exist. Latex will then print "??".
I wouldn't want auto-deletion of the xref, as I might want to
paste that heading somewhere else and still have it referenced.
Or even worse, if that section is deleted and another section is created
  later that happen to have the same heading?
I think an auto-label should behave very much like an explicit label,
except that you don't actally see it.  Well, LyX could put a tiny
label icon in the margin next to the heading to indicate the fact.
It might be useful, and won't clutter up the main window.

So, if the section is deleted, the label dies with it. If it is
pasted once, then the autolabel is pasted too. If it is
pasted more, then LyX should refrain from creating
an identical label. The easy way is to just drop the label then.
The advanced way will be to check if a reference exists
inside the pasted content, and then create a new
label/reference pair.  (Similiar to how spreadsheets
paste formulas with cell references.)  But this part can
wait, it is only UI refinement.

Finally, if a section is created manually with identical text to some
previous section, then of course no label is created.

Helge Hafting

Reply via email to