Indeed, one does not need the comma, it is programmed in the style.
You can see this in the manual, on p. 43 documenting citations.

The style is setup to put the righttext inside the parenthesis for alternative=authoryear and outside of the year parenthesis for alternative=authoryears.

I looked carefully in the APA Style Guide and did not find any suggestion that one should use Knuth (1984, p. 3). The variant (Knuth, 1984, p. 3) is documented.

You can make the following changes (untested)
\setupbtx [apa:cite:author:years] [right=]
\setupbtx [apa:cite:authoryears] [right={)}]
to get the other behavior.

--
Alan


On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote:
Thank you, Alan for the suggestion.

I tried as you said: \cite[alternative=authoryears,righttext={{, p. 3}}][Knuth1984].

Yet the result is this: Knuth (1984), , p. 3

If I leave out the first comma, the result is: Knuth (1984), p. 3

Righttext probably refers to the text outside the parentheses.

Thank you in advance,

Robert.


Op 1 aug. 2023, om 22:42 heeft Alan Braslau <alan.bras...@icloud.com> het volgende geschreven:

Using the APA specification:

\usebtxdefinitions
   [apa]


you can then

\cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984]
mentions ….


The tricky part concerning righttext= is the double {{ }}, needed because the text contains a comma. The reason for this is simple, as righttext is a comma-separated list, where each entry corresponds to a cited reference, as in \cite[righttext={a,b}] [ref1,ref2]
so a is associated with ref1 and b is associated with ref2.

Alan



On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote:
Dear List members,
For my academic work with context I need the following cite according to Apa standards:
Knuth (1984, p. 12) mentions ….
The matrix is this:
AUTHOR (YYYY, p.~n).
I reckon this can somehow be accomplished with the \setupbtx command.
(Standard these and other variants are possible: AUTHOR (YYYY) and AUTHOR YYYY, p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result.
Thank you for any suggestions.
Regards,
Robert
@article{Knuth1984,
author={Knuth, Donald E.},
title={Literate Programming},
journal={The Computer Journal}, Volume={27}, Number={2}, year={1984},
Pages={97--111},
}

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to