ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] URL in footnote citation
@ 2024-06-19 22:03 Kip Warner
  2024-06-20 13:20 ` [NTG-context] " Alan Braslau via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Kip Warner @ 2024-06-19 22:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2086 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-20 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 22:03 [NTG-context] URL in footnote citation Kip Warner
2024-06-20 13:20 ` [NTG-context] " Alan Braslau via ntg-context
2024-06-20 18:03   ` Kip Warner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).