Help with United Nations style
Hi everyone,
I created a custom style that follows the guidelines of the United Nations (well, mostly). It's a work in progress but I'm stuck on one specific requirement. When citing UN published works, we must append "Sales No. #.##.##.##.#" to the end of the citation.
Since the UN publication can be of different types (book, chapter, report, etc), I can't use the publication type as a conditional. I used to test against the existence of anything in 'note' (the extra field). But since "extra" is used for so many things, I wanted to improve on this.
I read the documentation for using the "extra" field (https://www.zotero.org/support/kb/item_types_and_fields#citing_fields_from_extra).
Here is the point: The "extra" field may have multiple entries as shown the example:
DOI: 10.1128/AEM.02591-07
Original Date: 1824
PMCID: PMC3531190
Using this example, I want to add one using this format:
DOI: 10.1128/AEM.02591-07
Original Date: 1824
PMCID: PMC3531190
Sales No.: #.##.##.##.#
In my style I want to test for and use only the "Sales No." in a conditional. Is there a way to do this in CSL? Or is there a smarter way to achieve this?
Thanks!
I created a custom style that follows the guidelines of the United Nations (well, mostly). It's a work in progress but I'm stuck on one specific requirement. When citing UN published works, we must append "Sales No. #.##.##.##.#" to the end of the citation.
Since the UN publication can be of different types (book, chapter, report, etc), I can't use the publication type as a conditional. I used to test against the existence of anything in 'note' (the extra field). But since "extra" is used for so many things, I wanted to improve on this.
I read the documentation for using the "extra" field (https://www.zotero.org/support/kb/item_types_and_fields#citing_fields_from_extra).
Here is the point: The "extra" field may have multiple entries as shown the example:
DOI: 10.1128/AEM.02591-07
Original Date: 1824
PMCID: PMC3531190
Using this example, I want to add one using this format:
DOI: 10.1128/AEM.02591-07
Original Date: 1824
PMCID: PMC3531190
Sales No.: #.##.##.##.#
In my style I want to test for and use only the "Sales No." in a conditional. Is there a way to do this in CSL? Or is there a smarter way to achieve this?
Thanks!
So, you cannot just "invent" new CSL variables.
However, could you use "number: #.##.##.##.#"?
That's the number you see for item type
report
.Also, you'll find this handy: https://aurimasv.github.io/z2csl/typeMap.xml
The specific UN formatting is triggered by the author/publisher being the UN, not by item type. This is why I'm having a difficult time. I need a conditional that would be specific to the UN alone and that would trigger a specific UN-only format for all types (books, reports, UN resolutions, etc).
Sadly we cannot test for the actual content of variables.