styles
styles copied to clipboard
1.0.2: Update `event` to `event-title`
Zotero has now started exporting its data with event-title instead of event, so APA and other styles including event information need to be updated.
I'm not sure the data status for other CSL implementations, so what do we think is the best approach here?
I see 3 options:
- Manually update individual styles, starting with high priority major ones
- Do a batch update via regex to change
"event"to"event-title" - Do a batch update, but replace
"event"with a conditional to show"event-title"but"event"if"event-title"is not present.
I lean toward (2). To limit pain points for other implementations, we can add a check to citeproc-js (@retorquere @larsgw) to replace "event" with "event-title" in input data.
What do you think? @adam3smith @POBrien333
Do a batch update via regex to change
"event"to"event-title"
There's also stuff like this (surprisingly a lot of styles use this, I'm assuming that was all copied from one style):
<if variable="event version" type="speech" match="none">
Do a batch update, but replace
"event"with a conditional to show"event-title"but"event"if"event-title"is not present.
(3) would make CSL 1.0.2 data & styles compatible with CSL 1.0.1 processors.
To limit pain points for other implementations, we can add a check to citeproc-js to replace "event" with "event-title" in input data.
I think it's better to copy "event" to "event-title" instead of replacing it, since the CSL implementation could then also still be used with CSL 1.0.1 data and styles.
I think it's better to copy "event" to "event-title" instead of replacing it, since the CSL implementation could then also still be used with CSL 1.0.1 data and styles.
Ah, yes. Agreed
Let's say Mendeley doesn't update their CSL processor for 6 months, a lot of people will have issues.
Could we not build in the conditional as per (3) and then, in a few months, remove the conditional and just leave event-title? Is this automatable and easy enough to do?
Okay, to that end, let's use this macro so that we can find it easily later:
<macro name="event-title">
<choose>
<!-- TODO: We expect "event-title" to be used,
but processors and applications may not be updated yet.
This macro ensures that either "event" or "event-title" can be accpeted.
Remove if procesor logic and application adoption can handle this. -->
<if variable="event-title">
<text variable="event-title"/>
</if>
<else>
<text variable="event"/>
</else>
</choose>
</macro>
This one is relatively trivial (various):
<if variable="event version" type="speech" match="none">
But this one maybe not (united-states-international-trade-commission.csl):
<else-if type="speech" match="all" variable="event event-place">
Hmm, match="all" is tricky
In the latest Zotero beta, we're now automatically substituting event-title for event in all styles that don't include event-title. This will be in Zotero 6.0.12 soon.
Thanks!