Edit Vancouver with Brackets Style to include PMIDS from Pubmed
Hi Everyone:
I have a library patron who has written some book chapters for publication and used Zotero for citations and bibliography. Upon submission of the manuscripts, they were instructed to include pmids from Pubmed with the citations in the bibliography.
It looks like the pmids are stored in the Extra field in the Zotero citation Info pane. What is the best way to achieve this? The style used is Vancouver (brackets)--I guess the style needs to be edited to add the Extra field?
Thank you!
I have a library patron who has written some book chapters for publication and used Zotero for citations and bibliography. Upon submission of the manuscripts, they were instructed to include pmids from Pubmed with the citations in the bibliography.
It looks like the pmids are stored in the Extra field in the Zotero citation Info pane. What is the best way to achieve this? The style used is Vancouver (brackets)--I guess the style needs to be edited to add the Extra field?
Thank you!
https://www.zotero.org/styles?q=id:national-library-of-medicine-grant-proposals
i took this from the nlm grant style (changing the macro to get pmid first and alternatively PMCID):
<macro name="pmid">
<text variable="PMID" prefix=" PMID: "/>
<choose>
<if variable="PMID" match="none">
<text variable="PMCID" prefix=" PMCID: "/>
</if>
</choose>
</macro>
and inserted it into the vancouver brackets style in notepad++. i saved it as csl. When i try to install it in my zotero standalone (the new beta version)--i get this message:
Install style "Vancouver (brackets) with pmid" from (null)?
If i click install i get this message:
"%S" is not a valid CSL 1.0.1 style file, and may not work properly with Zotero...are you sure you want to continue?
i finally got it to save in zotero after several tries but it is not inserting the pmid into bibliography! I'm sure of done something wrong!
<macro name="pmid">
<text variable="PMID" prefix=" PMID: "/>
<choose>
<if variable="PMID" match="none">
<text variable="PMCID" prefix=" PMCID: "/>
</if>
</choose>
</macro>
macro name="pmid"
text variable="PMID" prefix=" PMID: "/
choose
if variable="PMID" match="none"
text variable="PMCID" prefix=" PMCID: "/
/if
/choose
/macro
<code> </ code>
brackets for it to render. But the %S suggests something more fundamentally is going wrong. Have you tested the style in the editing pane? https://www.zotero.org/support/dev/citation_styles/reference_test_paneThank you for the test pane suggestion---It helped to test it and I think the style is working now. I looked in more detail in the xml and had left out a line further into the style. Adding that line--text macro="pmid"/--to the csl file makes it insert the pmid into the references in the bibliography.
I still get those messages though when I load the csl file into Zotero! Even though it seems to be working ok---do you think those messages might still mean something is wrong?
here is the github link:
https://gist.github.com/anonymous/c09dba7377e4de96aeb23a851e811262
Specifically, I edited lines:
3-4 (added the text "with pmid")
283-290 inserted these lines from the NLM grant style you suggested. Changed the original macro by changing PMCID to PMID so that it would insert PMID first then PMCID
362 changed the text macro from pmcid to pmid
I really appreciate you looking at this!
and I would keep ID and self-link as: ...vancouver-brackets-with-pmid (not sure if it allows spaces, but they should match anyway)