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
Add YAML bibliography writer #9617
Comments
|
That it does! Mod the irrelevant annoyance that it also generates a |
One issue is that, as far as I know, CSL YAML isn't specified anywhere.
|
@bdarcus may be able to offer some illumination on the status of "CSL YAML." |
Unfortunately, its status is still really uncertain, along with everything else in the CSL 1.1 branch (this thread covers the questions we discussed in 2022 for those curious). But I can say this: These days, one can use JSON Schemas to validate YAML files. So the schema there is designed for both: https://github.com/citation-style-language/schema/blob/v1.1/schemas/input/csl-data.json It's just we have no process by which we actually approve and release that and the other changes. So in practice, CSL is frozen, and along with it CSL YAML/JSON. One could use the current JSON Schema for validating YAML, but it's less than ideal I think. PS - In my experimental radical rewrite of CSL, I also rewrote the input model; it borrows a few ideas from the 1.1 version (YAML example). |
Indeed, that's been a point of confusion for me, and one reason I've stuck to pretty-printing the CSL JSON. BTW, isn't |
Somewhere along the way, I got convinced to use |
It would be fairly trivial to modify the existing CslJson writer and reader to add readCslYaml and writeCslYaml (where these would just use YAML instead of JSON, everything else being the same). IF there is actually a demand for this... |
@bdarcus I even write my JSON schemas in YAML. I use a Perl script using YAML/JSON/JSON Schema modules available on CPAN to load both data and schemas and then validate. In fact it is possible to validate any data representable as JSON once you have it loaded into a Perl data structure! |
I started to do that with an experiment in that branch. https://github.com/citation-style-language/schema/blob/v1.1/schemas/input/csl-rich-text.yaml Definitely nicer. But the CSLN schemas are generated from the Rust models, and I use serde to read the JSON and YAML. |
Describe your proposed improvement and the problem it solves.
Given that pandoc expects in-frontmatter bibliography in YAML, it would make sense to have a
cslyaml
writer in addition to thecsljson
oneDescribe alternatives you've considered.
Given the suggestion in #8801, I've looked around for a YAML CSL style, but haven't found anything. Of course, there's always my current workaround of
but I'd prefer not to have to do this kind of postprocessing.
The text was updated successfully, but these errors were encountered: