-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
YAML bibliographies should accept list format, currently requires a dictionary with references
#11656
Comments
Example from pandoc's citeproc library showing CSL JSON / citeproc JSON without a top-level Here's the JSON Schema for CSL Data noting: "type": "array",
"items": {
"type": "object", |
I can reproduce this warning with pure Pandoc, so I don't think this is on Quarto:
I'm going to go ahead and close this one, but feel free to reopen it if I've missed something. |
Thanks @cscheid for the insight that this occurs in pandoc, which I've confirmed on my original example with: quarto pandoc --from=markdown --to=html --output=document.html --citeproc document.qmd Now if I switch the bibliography to JSON like: [
{
"id": "osmnx",
"DOI": "10.1016/j.compenvurbsys.2017.05.004",
"type": "article-journal",
"title": "OSMnx: New methods for acquiring, constructing, analyzing, and visualizing complex street networks",
"author": [
{
"given": "Geoff",
"family": "Boeing"
}
]
}
] there is no problem with citeproc loading the reference metadata. @jgm looping you in here. Is it intentional that the same bibliographic payload works in JSON but fails in YAML? I don't remember this being the case in the past with |
Not really intentional, nor unintentional. I reused a function yamlToRefs that is defined in the Markdown reader. This is what the Markdown reader uses to extract references from the metadata, and obviously it needs to look for a Feel free to open an issue in pandoc. |
Thanks @cscheid and @jgm. Noting yaml array bibliography support was added upstream in jgm/pandoc@d04e490. |
Thanks, @dhimmel - we'll pick this up when the fix shows up in a release. |
Define the following two files.
document.qmd
:bibliography.yml
:Run:
Note the logged error:
Prepending the following to
bibliography.yml
solves the issue:references:
IIRC Pandoc accepts CSL JSON (as JSON or YAML) when formatted a list of dictionaries rather than a top-level dictionary with a
references
key.The text was updated successfully, but these errors were encountered: