-
Notifications
You must be signed in to change notification settings - Fork 181
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
Contributor Roles Taxonomy #491
Comments
I like that tabular display. Perhaps that could be logged as a future Manubot feature idea? For now, it is possible to use the metadata file to track CRediT roles and list them in a regular table after the manuscript. We did that in https://github.com/greenelab/covid19-review See the |
For now I manually generated a table in Markdown, but having the contributions tracked in the metadata file and automatically generating them from there is so much nicer. |
As suggested here: manubot/rootstock#491 (comment) For the moment, we display it as manually generated table in 05.credit.md
Just noting what we did for author roles at greenelab/xswap-manuscript@ad40823 and greenelab/xswap-manuscript@2a8cc8f. Here's the markdown / jinja2 template for generating a contribution summary based on metadata roles: Author contributions are noted here according to [CRediT](https://credit.niso.org/) (Contributor Roles Taxonomy).
{%- set roles = {} -%}
{%- for author in manubot.authors -%}
{% for role in author.get('roles', []) -%}
{%- if role in roles -%}
{% set _ = roles[role].append(author.initials) %}
{%- else -%}
{% set _ = roles.update({role: [author.initials]}) %}
{%- endif -%}
{%- endfor -%}
{%- endfor %}
{% for role, author_initials in roles.items() -%}
{% if author_initials|length > 2 %}
{{- role }} by {{ ', '.join(author_initials[:-1]) }}, and {{ author_initials[-1] }}.
{% elif author_initials|length == 2 %}
{{- role }} by {{ ' and '.join(author_initials) }}.
{% else %}
{{- role }} by {{ author_initials[0] }}.
{%- endif -%}
{%- endfor %} Which rendered as:
|
I'm preparing a document in which I'd like to add the CRediT.
I'm adding the roles as a small table, based on the display here: https://github.com/Pseudomanifold/latex-credits
It would be
nicecool, if the CRediT roles could be put into the author metadata file somehow.The text was updated successfully, but these errors were encountered: