Could someone say more about how to use the Extra field?

edited August 10, 2023
Is this right? . . . .

If I include
<text variable="note"/>
in my CSL, contents of the Extra field are printed. . . .

. . . unless the line begins with a lowercase word and a colon. Then (I think) Zotero removes that line and stores it internally as a key:value pair.

<text variable="note"/>
now returns the contents of the Extra field but without the line that began with lowercase word and a colon.

Zotero then looks to see if that lowercase word is a CSL parameter (as "annote" is). If it is, its presence can be tested with
<if variable="annote" match="all">
and its value can be accessed with
<text variable="annote"/>.

. . . unless that CSL field is of some particular interest, as "issued" is. If so, Zotero works some appropriate magic, such as overriding the date field with some formatted version of the value for which "issued" was the key in the Extra field.

But if that key is not a CSL parameter, it is unavailable in any bibliography or citation.
<text variable="myownparameter"/>,
for example, would not return anything.

Is all that correct? If so, it seems like a kludge . . . but a pretty reasonable one.

But while we are kludging, why limit the key-value pairs to just CSL parameters? Extractors are placing all kinds of key-value pairs in Extra. Why not make all of them available in one’s custom CSL?

If not, what is the thinking about how to access those values?


Sign In or Register to comment.