quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.84k stars 311 forks source link

Feature request: support JATS license like pandoc #2691

Closed dragonstyle closed 1 year ago

dragonstyle commented 2 years ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/2690

Originally posted by **castedo** September 30, 2022 With the attached qmd file [license.qmd.txt](https://github.com/quarto-dev/quarto-cli/files/9688255/license.qmd.txt) I can do the following: ``` quarto pandoc license.qmd --from markdown -s --to jats 2> good.xml ``` but the following ``` quarto render license.qmd --to jats ``` fails with ``` ERROR: Validation of YAML front matter failed. ERROR: In file license.qmd (line 7, column 3 through line 11, column 26) Key license has value type: open-access link: "https://creativecommons.org/licenses/by/4.0/" ... This document is distributed under a Creative Commons Attribution 4.0 International license., which must be a string 6: license: 7: type: open-access ~~~~~~~~~~~~~~~~~ 8: link: "https://creativecommons.org/licenses/by/4.0/" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 10: This document is distributed under a Creative Commons Attribution 4.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11: International license. ~~~~~~~~~~~~~~~~~~~~~~~~~ 12: --- ✖ The value type: open-access link: "https://creativecommons.org/licenses/by/4.0/" ... This document is distributed under a Creative Commons Attribution 4.0 International license. is object. ℹ The error happened in location license. ERROR: Render failed due to invalid YAML. ``` That's with quarter version 1.1.251. The documentation of pandoc described the license key while the quarto JATS ref does not list support for this license key.
castedo commented 2 years ago

Thanks!

Here are some more details on the motivation for using pandoc's object-not-just-string license metadata.

It makes possible conforming to the JATS4R permissions recommendation for open licenses: https://doi.org/10.3789/niso-rp-37-2021

Precise details and background are in https://github.com/jgm/pandoc/pull/8041 and https://github.com/jgm/pandoc/issues/8042

I hope that having this information in JATS XML will facilitate automated reuse of open research outputs.