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: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________________
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 via email to