Hello list, I am trying to get my references that have URLs to automatically set the entry title to the URL and not print the URL after it. Here is a minimal: \startbuffer[testdata] @Article{wikipedia2024_depeche_mode_sounds_of_the_universe, author = {{Wikipedia contributors}}, title = {Sounds of the Universe}, year = {2024}, url = {https://en.wikipedia.org/w/index.php?title=Sounds_of_the_Universe&oldid=1224785220}, note = "[Online; accessed 20-May-2024]" } \stopbuffer % Setup bibliography... % Select References.bib and name it the main database... \usebtxdataset[main][testdata.buffer] % Citation style... \usebtxdefinitions[apa] % Use our main dataset for citations... \setupbtx[dataset=main] \definebtxrendering[main][apa][dataset=main] \setupbtxrendering[main][ pagestate=start, continue=yes, numbering=yes] % Macro to put the citations as footnotes... \unexpanded\def\footnotecite{\dodoubleempty\domycite} \def\domycite[#1][#2]% {\ifsecondargument \footnote{\alwayscite[alternative=entry,#1][main::#2]}% \else \footnote{\alwayscite[alternative=entry][main::#1]}% \fi} \starttext Some footnote.\footnotecite[wikipedia2024_depeche_mode_sounds_of_the_universe] \stoptext The footnote renders like so: Wikipedia contributors (2024). Sounds of the Universe. Retrieved from https://en.wikipedia.org/w/index.php?title=Sounds_of_the_Universe&oldid =1224785220 ([Online; accessed 20-May-2024]) It would look much better if it looked like so: Wikipedia contributors (2024). Sounds of the Universe. ([Online; accessed 20-May-2024]) ...where "Sounds of the Universe" is linked to the URL in the BibTeX database. Is this possible to do? -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
Putting the URL as a hyperlink on the cite title is possible. Note that is is not what APA specifies. To do this, you need to modify the rendering definitions. Alan On 20/06/24 20/06/24, 00:03, Kip Warner wrote:
Hello list,
I am trying to get my references that have URLs to automatically set the entry title to the URL and not print the URL after it.
Here is a minimal:
\startbuffer[testdata] @Article{wikipedia2024_depeche_mode_sounds_of_the_universe, author = {{Wikipedia contributors}}, title = {Sounds of the Universe}, year = {2024}, url = {https://en.wikipedia.org/w/index.php?title=Sounds_of_the_Universe&oldid=1224785220}, note = "[Online; accessed 20-May-2024]" } \stopbuffer
% Setup bibliography...
% Select References.bib and name it the main database... \usebtxdataset[main][testdata.buffer]
% Citation style... \usebtxdefinitions[apa]
% Use our main dataset for citations... \setupbtx[dataset=main]
\definebtxrendering[main][apa][dataset=main]
\setupbtxrendering[main][ pagestate=start, continue=yes, numbering=yes]
% Macro to put the citations as footnotes... \unexpanded\def\footnotecite{\dodoubleempty\domycite} \def\domycite[#1][#2]% {\ifsecondargument \footnote{\alwayscite[alternative=entry,#1][main::#2]}% \else \footnote{\alwayscite[alternative=entry][main::#1]}% \fi}
\starttext Some footnote.\footnotecite[wikipedia2024_depeche_mode_sounds_of_the_universe] \stoptext
The footnote renders like so:
Wikipedia contributors (2024). Sounds of the Universe. Retrieved from https://en.wikipedia.org/w/index.php?title=Sounds_of_the_Universe&oldid =1224785220 ([Online; accessed 20-May-2024])
It would look much better if it looked like so:
Wikipedia contributors (2024). Sounds of the Universe. ([Online; accessed 20-May-2024])
...where "Sounds of the Universe" is linked to the URL in the BibTeX database. Is this possible to do?
___________________________________________________________________________________ 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 ___________________________________________________________________________________
On Thu, 2024-06-20 at 15:20 +0200, Alan Braslau wrote:
Putting the URL as a hyperlink on the cite title is possible. Note that is is not what APA specifies.
To do this, you need to modify the rendering definitions.
Thanks Alan. I've tried in the past but I really struggle with the ConTeXt documentation. If you have a minimal you could share, I'd be much obliged. -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
participants (2)
-
Alan Braslau
-
Kip Warner