-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkp/pkp-lib/issues/6201 DOIPubIdPlugin: add CitationStyleLanguagePlugin support #1035
Conversation
Thanks as always, @nongenti! @ewhanson, could you review the DOI-related aspects of this to see how they can be coordinated with your changes? |
(Actually, tagging @NateWr on this as well, since he's got pkp/citationStyleLanguage#84 (comment) on his list.) |
Hi @asmecher and @withanage, with my changes DOIs will no longer refer to The change from For the change in context initials going into For the adding of DOIs to citations, I would suggest waiting until pkp/pkp-lib#7014 has been merged and add the DOI fetching directly inside of the CitationStyleLanguage plugin (This is what's being done in OJS as well). Thanks! |
Sorry everyone, I've promised @nongenti a review of this but I haven't had time to get to it. I think the key change here is adapting the CSL plugin for OMP. The bulk of that work is here: https://github.com/pkp/citationStyleLanguage/pull/84/files @nongenti yes, DOIs are getting some heavy revision in 3.4, so it may make sense to wait on that until Erik has merged in #7014. But I think we can still move ahead with a merge of the OMP support for CSL in the meantime. I will try to get to it this week but I've been very backed up. |
Okay, I will add DOI support to the CitationStyleLanguage plugin after #7014 is merged. @NateWr I'm in vacation from December 10th - January 02th, so no stress, we can finish the CSL plugin next year. |
👍 That's great, @nongenti. I'll set a reminder to revisit this in the new year. |
@@ -375,7 +377,7 @@ public function addPublicationFormFields($hookName, $form) | |||
'value' => $form->publication->getData('pub-id::doi'), | |||
'prefix' => $prefix, | |||
'pattern' => $pattern, | |||
'contextInitials' => $form->submissionContext->getData('acronym', $form->submissionContext->getData('primaryLocale')) ?? '', | |||
'contextInitials' => PKPString::strtolower($form->submissionContext->getData('acronym', $form->submissionContext->getData('primaryLocale'))) ?? '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a necessary change? I don't think we want to enforce lower-case on DOIs, which are case-insensitive anyway.
$chapter = $ichapter; | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of searching for the chapter again here, add it to the data passed to the hook at HookRegistry::call('CitationStyleLanguage::citation',
.
Hi,
I add support for CitationStyleLanguagePlagin to DOIPubIdPlugin, that the DOI can be shown in the citation of books and chapters. I also changed the
PubIdPlugin
class to use the newsource_chapter_id
and not thechapter_id
.Thirdly I found a different result by creating an DOI for a publicaion between OMP 3.3 and OMP 3.4:
In OMP 3.3 (on our systems) the press initials in the DOIs are always lower case, but in OMP 3.4 the press initials are lower case for chapters but not for books. I didn't found the code, that changed this, but a way to fix it (DOIPubIDPlugin.inc.php line 380) .