Skip to content

Adding PMID macro to AMA.csl #7488

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

Closed
wants to merge 2 commits into from

Conversation

wmhorne
Copy link
Contributor

@wmhorne wmhorne commented Mar 19, 2025

AMA allows PMIDs to be included in references when desired.

This PR attempts to add a PMID to the end of the reference when a PMID is present.

In Zotero, this works as expected:

Screenshot 2025-03-19 at 3 47 51 PM

Copy link

Awesome! You just created a pull request to the Citation Styles Language styles repository. One of our human volunteers will try to get in touch soon (usually within a week). In the meantime, I will run some automated checks. You should be notified of the results in a few minutes.

If you haven't done so yet, please make sure your style validates and follows all our other Style Requirements.

To update this pull request, visit the "Files changed" tab above, click on the ellipsis button in the top-right corner of your style, and then select "Edit file" to start editing:

If you have any questions, please leave a comment and we'll get back to you. While we usually respond in English, feel free to write in whatever language you're most comfortable.

Copy link

😃 Your submission passed all our automated tests.

Below are some sample citations generated based on your proposed changes:

american-medical-association.csl (modified style; unchanged output for sample items)
1,2
3,4

1.Hancké B, Rhodes M, Thatcher M, eds. Beyond Varieties of Capitalism: Conflict, Contradiction, and Complementarities in the European Economy. Oxford University Press; 2007.
2.CSL search by example. Citation Style Editor. 2012. Accessed December 15, 2012. http://editor.citationstyles.org/searchByExample/
3.Mares I. Firms and the welfare state: When, why, and how does social policy matter to employers? In: Hall PA, Soskice D, eds. Varieties of Capitalism. The Institutional Foundations of Comparative Advantage. Oxford University Press; 2001:184-213.
4.Fenner M, Crosas M, Grethe JS, et al. A data citation roadmap for scholarly data repositories. Sci Data. 2019;6(1):28. doi:10.1038/s41597-019-0031-8

@bwiernik
Copy link
Member

Can you quote the manual where it talks about including PMID? I don't currently have access to a copy of the AMA manual

@github-actions github-actions bot added the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Mar 19, 2025
@wmhorne
Copy link
Contributor Author

wmhorne commented Mar 19, 2025

@bwiernik While not exactly a rule, it's mentioned under the Electronic References section:

Screenshot 2025-03-19 at 3 51 53 PM Screenshot 2025-03-19 at 3 58 08 PM Screenshot 2025-03-19 at 3 51 57 PM

Additionally, it's visible in this example citation when searching the AMA site:

Screenshot 2025-03-19 at 4 00 53 PM

@github-actions github-actions bot removed the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Mar 19, 2025
@adam3smith
Copy link
Member

Thanjs for this! We certainly shouldn't take this as part of the main AMA style -- that's used for lots of journals and I've never seen PMIDs in those style guides.
I also think it's pretty clear from the AMA guide that you screenshot that PMIDs are not to be included -- they say they are usually used behind the scenes. If there's a clear general use case, I think we can consider a variant, but I'd want to see the need (as opposed to preferences) clearly established. FWIW, I don't think anyone has ever asked for or about this

@github-actions github-actions bot added the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Mar 19, 2025
@wmhorne
Copy link
Contributor Author

wmhorne commented Mar 20, 2025

@adam3smith makes sense—I will make this change in a custom csl.

For what it's worth, does the approach I took seem like a good way to do it?

@github-actions github-actions bot removed the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Mar 20, 2025
@adam3smith
Copy link
Member

Yes, that will work perfectly. FWIW, you can do this in a single line with exactly same output:

<text variable="PMID" prefix=". PMID:"/>

@github-actions github-actions bot added the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Mar 20, 2025
@bwiernik bwiernik closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants