styles
styles copied to clipboard
APA CSL uses an "&" rather than an "and" for in-text citations
The APA CSL uses an "&" rather than an "and" for in-text citations. For example, "Foo & Bar (1999)" rather than "Foo and Bar (1999)". Is there a way to use "and" (or, similarly, "et", "und", "y", etc.) rather than "&"? I am using the latest version of the APA CSL with pandoc (2.3.1) and pandoc-citeproc (0.14.5). Here is an example:
Input (input.md):
---
references:
- id: foo1999
title: A title
author:
- family: Foo
- family: Bar
type: manuscript
issued:
year: 1999
---
@foo1999
Output (pandoc -f markdown -t plain input.md --csl apa.csl --filter pandoc-citeproc
):
Foo & Bar (1999)
Thanks.
This requires a modified APA citation style. Changing all instances of and="symbol"
with and="text"
should do the trick. See the entry for "and" at http://docs.citationstyles.org/en/stable/specification.html#name.
Note that & is correct for standard APA citations (Smith & Meyer, 1981). CSL doesn't allow to specify out-of-parentheses citations with a different format as APA prescribes.
Thanks, @rmzelle and @adam3smith. It is too bad CSL does not allow for independent parenthetical and non-parenthetical citation formatting. I will just use this Pandoc lua filter to replace "&" with "and" for non-parenthetical citations:
function Cite(elem)
if elem.citations[1].mode == "AuthorInText" then
elem.content = pandoc.walk_inline(elem, {
Str = function(el)
return pandoc.Str(string.gsub(el.text, "&", "and"))
end})
end
return pandoc.Cite(elem.content, elem.citations, elem.tag)
end
Note that to use this filter with Pandoc, this filter needs to be saved to a file, probably in the current directory (Below it is apa_and.lua) and the filter needs to come after citeproc like:
pandoc --filter pandoc-citeproc --lua-filter=apa_and.lua Input.md -s -o Output.docx
I am currently working with this issue in Quarto, and I am having trouble getting it to work. I've followed the Quarto instructions to set up a filter, and it runs but doesn't make the prescribed changes. I'm not knowledgeable of this syntax, so I was wondering if anyone's worked with this more recently and/or in Quarto?
@dwbatten,
I adapted @samueldodson's code for apaquarto, a Quarto extension for APA manuscripts. I added support for other languages (e.g., "and" becomes "y" in Spanish). I also added the ability to make "possessive citations." For example, @schneider2024 ['s] argument is that ...
becomes "Schneider's (2024) argument is that ..."
The filter is here.
Note that CSL 1.1/2.0 will support separate narrative citation forms. The above solution is great for users of pandoc in the mean time.