pandoc / scholarly-metadata

Descriptions, schemata, and tools to use scholarly article metadata with pandoc.
MIT License
13 stars 2 forks source link

Singular, plural, or both #6

Open tarleb opened 4 years ago

tarleb commented 4 years ago

Pandoc, by default, uses singular fields like author and institute, while manubot uses plural names like authors and affiliations, and JOSS uses a mix (authors, affiliations at the top level, affiliation as an author property).

My suggestion would be to declare both versions valid, with the singular field taking precedence if both are given. So all of the following would be equivalent:

author:
  - name: John Doe
    affiliation: 1
authors:
  - name: John Doe
    affiliations: 1
authors:
  - name: John Doe
    affiliation: 1
    affiliations: this is ignored
jcolomb commented 4 years ago

make sense, maybe we should add aff as that is the one used in jats?

jcolomb commented 4 years ago

For author, I would also like to see contriband contibutorand contributors.

But maybe this is worth investing some thinking if the goal is also to get contributors who are not authors (contrib-type is not author in jats) with the same schema ?

nathanlesage commented 4 years ago

Great idea! Sounds like a job for a precompiler, so to speak, which tries to guess as many of the YAML fields as possible and translates them in the correct JOSS-format? I mean, after all it would be great to have something like this for everything in YAML frontmatter (even for Pandoc itself), something like "natural language processor" -- then not only keywords would work, but also tags, for instance ... this would emphasize that the YAML frontmatters are less perfect configuration files as you'd expect them from developers, and more the things you'd expect from writers who use frontmatters for metadata!