* [NTG-context] Specify separator within setupbtx for custom bibliography rendering
@ 2024-06-01 14:16 Gerion Entrup
2024-06-21 16:13 ` [NTG-context] " Gerion Entrup
0 siblings, 1 reply; 2+ messages in thread
From: Gerion Entrup @ 2024-06-01 14:16 UTC (permalink / raw)
To: ntg-context mailing list
[-- Attachment #1.1: Type: text/plain, Size: 1613 bytes --]
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)).
Best,
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* [NTG-context] Re: Specify separator within setupbtx for custom bibliography rendering
2024-06-01 14:16 [NTG-context] Specify separator within setupbtx for custom bibliography rendering Gerion Entrup
@ 2024-06-21 16:13 ` Gerion Entrup
0 siblings, 0 replies; 2+ messages in thread
From: Gerion Entrup @ 2024-06-21 16:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-21 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-01 14:16 [NTG-context] Specify separator within setupbtx for custom bibliography rendering Gerion Entrup
2024-06-21 16:13 ` [NTG-context] " Gerion Entrup
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).