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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________