How to typeset interactive, hyphenated URLs in a bibliography?

Hello, I'd like the URL to link to the webpage rather than what it currently links to: `hyphenatedurl#https://example.com/this-is-a-really-long-slug/for-example-purposes-only/` Kind regards, Riviera Running LuaMetaTeX, Version 2.11.07 (Functionality : level 20250226) MWE: \startbuffer[default] @website{smith2025, title = {Bob Smith's Website}, author = {Smith, Bob}, year = {2025}, urlkey = {bobsmith}, howpublished = {https://example.com/this-is-a-really-long-slug/for-example-purposes-only/} } \stopbuffer \savebuffer[list=default,file=default.bib,prefix=no] \startbuffer[bib_env] \usebtxdefinitions[default] \definebtxrendering[default] [default=, specification=default, sorttype=authoryear, numbering=no, criterium=all, method=global, dataset=default, group=default ] \setupbtxlist[default] [alternative=paragraph, margin=3\emwidth, before=\blank, after=\blank, align={normal,tolerant}, interaction=start, state=start, symbol=none, hang=yes, distance={-6\emwidth}] \definebtx[default] [default=, specification=default, authorconversion=normal] \definebtxdataset[default] \definebtx[default:cite] [default=, specification=default, separator:2={ and }, otherstext={\btxspace\em{et al.}}, etallimit=3, ] \definebtx[default:cite:author] [default:cite] \definebtx[default:list] [default] \definebtx[default:list:website] [default:list] \setupbtx[default:cite] [alternative=authoryear] \setupbtx[default:list] [alternative=authoryear,authorconversion=invertedshort] \usebtxdataset[default][default.bib] \startsetups btx:default:list:website \btxdoif{author} {\btxflush{author}\btxspace} \btxdoif{year} {\btxleftparenthesis\btxflush{year}\btxrightparenthesis} \btxdoif{title} {{\em{\btxflush{title}}}\btxperiod} \btxdoif{howpublished} { Available at: \goto{\btxflush{howpublished}}[url(\hyphenatedurl{\btxflush{howpublished}})] \btxleftparenthesis {Accessed}\btxspace{April 6 2025} \btxrightparenthesis } \btxperiod \removeunwantedspaces \stopsetups \stopbuffer \savebuffer[list=bib_env,file=bib_env.tex,prefix=no] \startbuffer[text] \quote{Welcome to my website} \cite[smith2025]. \stopbuffer \savebuffer[list=text,file=text.tex,prefix=no] \starttext \setupinteraction[state=start,color=black] \environment bib_env \enabledirectives[hyphenators.urls.packslashes] \sethyphenatedurlbefore{/} \startsectionlevel[title={Text}] \input text \stopsectionlevel \startsectionlevel[title={Bibliography}] \placebtxrendering[default] \stopsectionlevel \stoptext

On 4/6/25 18:25, Riviera Taylor wrote:
Hello,
I'd like the URL to link to the webpage rather than what it currently links to: `hyphenatedurl#https://example.com/this-is-a-really-long-slug/for-example-purposes-only/`
Hi Riviera, this seems to work for me: \btxdoif{howpublished} { Available at:\btxspace \goto{\btxflush{howpublished}}[url(\btxflush{howpublished})] \btxleftparenthesis {Accessed}\btxspace{April 6 2025} \btxrightparenthesis } Just add a space before and add \hyphenatedurl in the first pair of braces (not in the parentheses for url). I hope it helps, Pablos

Hi Pablo,
That works for me, thanks for clarifying!
Riviera
On Sun, 6 Apr 2025 at 18:50, Pablo Rodriguez via ntg-context
On 4/6/25 18:40, Pablo Rodriguez via ntg-context wrote:
[...] \goto{\btxflush{howpublished}}[url(\btxflush{howpublished})]
Sorry, Riviera, this line just should read:
\goto{\hyphenatedurl{\btxflush{howpublished}}} [url(\btxflush{howpublished})]
I hope it is clear now,
Pablo ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
participants (2)
-
Pablo Rodriguez
-
Riviera Taylor