ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Kip Warner <kip@thevertigo.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] URL in footnote citation
Date: Wed, 19 Jun 2024 15:03:24 -0700	[thread overview]
Message-ID: <ac5d2df86c3d4b13fb423c9c7f5b89ab322d08d0.camel@thevertigo.com> (raw)


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

             reply	other threads:[~2024-06-19 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 22:03 Kip Warner [this message]
2024-06-20 13:20 ` [NTG-context] " Alan Braslau via ntg-context
2024-06-20 18:03   ` Kip Warner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac5d2df86c3d4b13fb423c9c7f5b89ab322d08d0.camel@thevertigo.com \
    --to=kip@thevertigo.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).