[LyX/master] New attempt on #9906: allow following hyperlinks via context menu.
Jürgen Spitzmüller
spitz at lyx.org
Wed Aug 19 08:04:36 UTC 2020
Am Dienstag, den 18.08.2020, 22:06 +0200 schrieb Pavel Sanda:
> On Tue, Aug 18, 2020 at 09:23:08AM +0200, Jürgen Spitzmüller wrote:
> > > Item "Settings...|S" "inset-settings"
> > > + Item "Open citation content|O" "inset-edit"
> >
> > This should be an OptItem, and the function should be disabled if
> > the
> > citation in question does not have a target to follow.
>
> Not easy, you don't know the result of external script. Calling it
> by default and implementing return values looks like going too far.
I meant if getLocators() return nothing for all fields (if the
citation[s] in question neither has url nor another field which is
considered).
> > Also, we use Title Casing in menus.
>
> Fixed.
Thanks.
> > > + doi = operator[]("doi");
> > > + if (!doi.empty() && !prefixIs(doi,from_ascii("http")))
> > > + doi = "https://doi.org/" + doi;
> > > + url = operator[]("url");
> > > + file = operator[]("file");
> >
> > Biblatex also has eprint (a template identifier that can point to
> > arxiv, jstor etc., which is indicated by the eprinttype field). A
> > bit
> > harder to resolve, but possible at least for the default
> > eprinttypes as
> > preset by Biblatex). See Biblatex manual, 3.13.7.
>
> I implemented all types listed in the manual. Does it work for you?
Yes. Thanks.
>
> > > + //TODO I have no clue about non-bibtex cases
> >
> > This is the bibliography environment. All you could do here is let
> > LyX
> > scan the entry for URL or HRef insets. But I'm not sure it's worth
> > it.
>
> I added your comment ATM. If someone asks we can add it.
Fair enough.
> > > +
> > > +void showTarget(string const & target){
> > > + lyxerr<<"Showtarget:" << target << "\n";
> >
> > You will want to remove this debug msg, or make it a proper dbg
> > message.
>
> Sure, oversight.
Thanks,
Jürgen
>
> Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200819/c9c2f170/attachment-0001.asc>
More information about the lyx-devel
mailing list