citeproc-js: Referring to single vs. multiple paragraphs
This discussion was created from comments split from: Changing how citeproc (?) decides between 'single' and 'multiple'.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
If I refer to one paragraph or a paragraph range, the outcome is, for instance, "para. 5" or paras. "5-7", which is perfect. But if I want to refer to multiple paragraphs without it being a range, I (believe I) can only use the ampersand, to make the processor clear the context is plural, for instance, "paras. 5 & 8". unfortunately I prefer to use the word "and" instead of the ampersand. But if I do, the processor thinks its singular, for example, "para. 5 and 8".
How can I achieve a plural result using the word "and"? Is there, for example, a way to make the processor clear that the use of the word and in the input ("5 and 8") must generate the plural term (paras.)? Or, another idea, is there a way the processor turns the ampersand into an "and" (input: "5 & 8", output: "5 and 8")?
Many thanks for your assistance.
Willem
What are you thinking for a solution? I guess we can add localized "and" terms, but then how about "5 to 7" "5 through 7" and others that I am probably not thinking of? On the other hand, just taking everything that includes 2+ numbers as plural seems intuitively problematic, but maybe better?
In the meantime I will use "---" as a connector. It's a combination that is not used in my document so, after I'm finished (and unlinked), I can easily change all "---" with " and ". But I nevertheless look forward to the addition of "and", because I don't like to unlink (for some reason I always need to change some metadata after unlinking, which is a bugger).
@Adam, I've just tried "," and ";". It both triggers plural on the condition that a space follows (", " and "; "). Without the space the processor regards it as one paragraph, which I believe is correct behavior.
Thank you again for this new feature.
Willem
I'm heading to finish and turn in the PhD. If, by any chance, you were just about to release this update (the word "and" as a connector), I'll wait that little longer before unlinking. If, however, this update is not planned in the coming week, please do not mind me. I'll be fine. Do not get me wrong, no impatience here. I'm just asking to make sure I'm not missing out on it without knowing, you see.
Willem
- Simple, but a hack: parse only
- Flexible, but less portable: parse
Both approaches have their issues. The former abuses the "symbol" form of the term: if the style needs an actual localized ampersand elsewhere (seems unlikely, but all things can happen), the term may have the incorrect value. On the other hand, this approach would enforce style-driven consistency across the entire document, without editing individual citations.&
, but replace in output with the symbol form of "and" in the current locale if available, otherwise "&"; orand
,, and
as in en, as well as localized (so, et
andet
), and pass through the joiner unmodified.The latter approach does not involve tampering with the locale settings of the style, and gives the user greater control over content. On the other hand, there is potential for typos (using Oxford comma or not, mixing of "and" and "et"), and if a document uses localized "and", then switches the bib format to another locale, pluralization of those entries would break, and those citations would all need to be edited.
I think those are the only two options, without additions to the CSL language. I'm happy to go either way (I have code on hand to handle both). Let me know your own preference, and we should wait for input from @adamsmith and @bwiernik before making the jump.
I think “and” and “, and” and localized versions should also be parsed and passed through literally. The other options here would be to (1) localize any form of “and” using the style locale, or (2) change to symbol based on the style.
I can see a case for (1), but also it might be surprising for users to see their words changing. I’m leaning toward just passing literally and not localizing.
For (2), I don’t see a way to do this consistently for all styles without an “and” element being provided as part of the citation-locator node. I think we can leave it to users to choose long or symbol forms of and.
* Parse & as at present, but localizing if possible and falling back to &; and
* Recognize "and" in its en and non-en-locale forms, with or without comma, but to print the joining term and punctuation literally in that case.