Skip to content
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

Raw citation option to directly cite a CSL entry in manual-references.json #62

Closed
dhimmel opened this issue Oct 5, 2018 · 2 comments
Closed

Comments

@dhimmel
Copy link
Member

dhimmel commented Oct 5, 2018

Currently, you can manually specify CSL for a reference in manual-references.json. However, the reference still has to be identified in terms of a standard identifier, such as a URL, DOI, or other resource ID.

This hasn't been a huge issue since most references have a URL of some sort. However, that may not always be the case, such as a personal communication or some physical resource. This issue proposes adding a way to add a "raw" citation that gets directly looked up in manual-references.json. Raw citations must have their CSL defined in manual-references.json.

One reason we didn't add this feature initially is that we wanted to encourage citing things by their standard identifiers. We didn't want users to fallback to citing things without standard identifiers. However, I think the benefits to raw citations outweigh. In addition to allowing citation of URL-less records, it could help us with testing, where we want to evaluate citation of many different types of CSL entries in manual-references.json.

Two citation string implementation come to mind: @raw:raw-id-here or @raw-id-here. The manual-references.json CSL would then have to set id: raw-id-here or standard_citation: "raw:raw-id-here".

@agitter what do you think?

@agitter
Copy link
Member

agitter commented Oct 5, 2018

I also see the need for a raw citation. Hopefully it would not be overused because the automated citation will still be more convenient for most types of references.

The citation string @raw:raw-id-here seems more natural to me in the context of the other types of citations. I also prefer standard_citation: "raw:raw-id-here" because manually overriding a reference also involves modifying the standard_citation key.

@dhimmel dhimmel mentioned this issue Oct 18, 2018
4 tasks
@dhimmel
Copy link
Member Author

dhimmel commented Oct 19, 2018

The citation string @raw:raw-id-here seems more natural to me in the context of the other types of citations. I also prefer standard_citation: "raw:raw-id-here" because manually overriding a reference also involves modifying the standard_citation key.

Okay, turns out the implementation of this method is rather straightforward. See #74

dhimmel added a commit that referenced this issue Oct 23, 2018
Merges #74
Closes #62

* Support raw citations where users must provide CSL JSON
* Pass manual references through citeproc_passthrough with CSL JSON Schema pruning
* Rename test_manubot.py since it tests manubot.process only
* Test raw citations in example manuscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants