Helge Hafting wrote:
Abdelrazak Younes wrote:
José Matos wrote:
On Friday 01 August 2008 12:12:55 Abdelrazak Younes wrote:
Hello,

Anybody has an idea how to solve this bug?

http://bugzilla.lyx.org/show_bug.cgi?id=5108

Abdel.

Without looking into the bug report and just judging the bug by the title, my initial reaction is "But it isn't how latex formatted references work?".

When lyx uses pretty references we use the prettyref latex package that labels
to use that form.

 From the prettyref documentation:
http://www.ctan.org/tex-archive/help/Catalogue/entries/prettyref.html#Docs

Labels in the document must be of the form format:name where the string
format is used to determine the format. Do not use the character : anywhere within the label except to separate format from name. format:name must be
unique for it is used as the label.
I understand that. The bug is that the document won't compile if you remove the first three letters before the ':' and the typical user (me :-)) has no idea how to solve this. I never came across this bug because I always let LyX name the label, still that's the first compilation problem this new user trying LyX came across... :-(

I also have been told that LateX experts say that prettyref is a not a good package. Do we have an alternative?

Don't know about alternatives, but here is an idea for a solution:

When prettyref is used, force the user to use a valid prefix (fig: or whatever) by displaying a set of radio buttons in the labelname dialog.
The user cannot make a label without a format then, because the format
part is added to the string by the radio buttons. You may also want to
outlaw extra ":" in the label text.

It seems to me that LyX ought just to handle this transparently. The user should be able to enter "mylabel", and then LyX will transform it to "sec:mylabel", or whatever, as necessary, on output. Then the user doesn't have to know what to put for subsections---which LyX will not do for her, if it used to be a section but is now a subsection. This shouldn't be terribly difficult, and it would make moving over to the refstyle package a bit easier.

Richard

Reply via email to