ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Specify separator within setupbtx for custom bibliography rendering
Date: Fri, 21 Jun 2024 18:13:43 +0200	[thread overview]
Message-ID: <3595744.NnENhoQgcM@falbala> (raw)
In-Reply-To: <39399069.10thIPus4b@falbala>


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

Am Samstag, 1. Juni 2024, 16:16:38 MESZ schrieb Gerion Entrup:
> Hi,
> 
> according to the section "Custom citation renderings" in the bibliography manual, I have specified an own setup for citation rendering.
> However, this seems only to work for single citations (of one source). I want to also specify the separator but did not get it to run.
> 
> Here is a minimal example:
> ```
> \setupinteraction[state=start]
> 
> \startbuffer[testdata]
> @Book{knuth1,
> 	author = {Donald E. Knuth},
> 	title = {TEX and METAFONT. New directions in typesetting},
> 	year = {1979},
> 	publisher = {Addison-Wesley},
> }
> @Article{someother,
> 	author = {Some Person and Some Otherperson},
> 	title = {Another title},
> 	year = {1900},
> }
> \stopbuffer
> 
> % enable tracing
> \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings]
> 
> \usebtxdataset[main][testdata.buffer]
> \usebtxdefinitions[aps]
> \setupbtx[dataset=main]
> \definebtxrendering[bibrendering][aps][dataset=main, numbering=short]
> \setupbtxlist[aps][
>   alternative=b,
>   distance=.5em,
> ]
> 
> \definebtx[aps:cite:special][aps:cite][
> 	left={((},
> 	right={))},
> 	separator:2={sfd},
> 	separator:3={sfd},
> 	separator:4={sfd},
> ]
> 
> \startsetups btx:aps:cite:special
> 	% just a dummy
> 	\btxcitereference
> 	\currentbtxtag
> \stopsetups
> 
> \setupbtx[aps:cite][
> 	alternative=special,
> ]
> 
> \starttext
> 
> Both said something~\cite[knuth1, someother].
> 
> \placelistofpublications[bibrendering]
> 
> \stoptext
> ```
> 
> The output of this is:
> 
> > Both said something ((knuth1someother)).
> 
> How can I get the separator to work? My expectation would be:
> 
> > Both said something ((knuth1sfdsomeother)).
> 
> or
> 
> > Both said something ((knuth1sfd someother)).

I got some understanding of the underlying code now.
This setup solves the above issue:

```
\startsetups btx:aps:cite:special
    % just a dummy
    \fastsetup{btx:cite:concat}
    \btxcitereference
    \currentbtxtag
\stopsetups
```

Gerion

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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-21 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01 14:16 [NTG-context] " Gerion Entrup
2024-06-21 16:13 ` Gerion Entrup [this message]

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=3595744.NnENhoQgcM@falbala \
    --to=gerion.entrup@flump.de \
    --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).