On Tue, Apr 23, 2013 at 11:32 AM, Jean-Marc Lasgouttes
<lasgout...@lyx.org> wrote:
> Le 20/04/2013 09:06, Jürgen Spitzmüller a écrit :
>
>> Scott Kostyshak wrote:
>>>
>>> Do you think it's better to add \hyperlink support to the label inset
>>> or to make a separate, collapsable hypertarget inset? \hypertarget
>>> takes two arguments: the name and the text. The name could be set in
>>> the settings, and the text in the collapsable inset.
>>
>>
>> I'd prefer not to add too many different insets for similar functions. But
>> the
>> collapsable solution adds some convenience.
>
>
> We could maybe have an inset that is only a button when no extra text is
> needed and a collapsablme inset otherwise. Somethin in between InsetCommand
> and InsetCollapsable.

I find this very interesting. If I understand correctly, it would work
like this:

When I go to insert > label, it inserts a button and everything works
exactly as it does now, except that if I click on the "hypertarget"
checkbox in the label settings dialog, the button is now a collapsable
inset. And if there is a selection, insert > label can default to
having the hypertarget checkbox checked and having that text put in
the collapsable box. The current behavior when there is text selected
is for the text to be deleted.

Would we also want to do this for the cross ref inset? It could work
in a similar way: there is a checkbox for "hyperlink". If checked, the
inset becomes a collapsable inset. Note that in this case more is done
if hyperlinkCB is checked: the hypertargets would be shown along with
the labels, either in the same tree widget (perhaps we could give the
hypertargets a prefix so that when grouped it's easy to navigate) or
there could be a split tree widget, more clearly separating labels
from hypertargets.

Jürgen, do you still prefer to have the cross ref code copied over to
the hyperref inset? My hesitation is that there would be a lot of
duplicate code. Also, I think that the text hyperlinks have more in
common with references than they do with hrefs to web, emails, and
files. However, I think your argument is that overloading the cross
ref dialog would make the user experience more complicated and there
would be a larger chance of a regression for this important part of
the code. This makes sense to me also.

Scott

Reply via email to