Skip to content

Commit

Permalink
Add contributor roles section
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Sep 5, 2024
1 parent 56f7446 commit 0512548
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 26 deletions.
28 changes: 28 additions & 0 deletions data/filters/prepare-credit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- Checks if any contributor information is available

roles = {
"conceptualization",
"data-curation",
"formal-analysis",
"funding-acquisition",
"investigation",
"methodology",
"project-administration",
"resources",
"software",
"supervision",
"validation",
"visualization",
"writing-original-draft",
"writing-review-editing"
}

function Meta (meta)
meta.hasRoles = false
for _, author in ipairs(meta.author or {}) do
if author.roles then
meta.hasRoles = true
end
end
return meta
end
9 changes: 9 additions & 0 deletions data/templates/default.latex
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,15 @@ $if(lof)$
$endif$
$body$

$if(hasRoles)$
\section{Author Contributions}
\begin{enumerate}
$for(authors)$
\item $authors.name$ - $author.roles$
$endfor$
\end{enumerate}
$endif$

$if(natbib)$
$if(bibliography)$
$if(biblio-title)$
Expand Down
98 changes: 72 additions & 26 deletions example/paper.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
---
title: >-
Article Writing with Markdown and the Open Journals publishing pipeline
Article Writing with Markdown and the Open Journals publishing pipeline
authors:
- name: Albert Krewinkel
email: [email protected]
affiliation: [1, 2, 4]
affiliation: [ 1, 2, 4 ]
orcid: 0000-0002-9455-0796
corresponding: true
roles:
- type: methodology
- name: Juanjo Bazán
orcid: 0000-0001-7699-3983
affiliation: [1]
affiliation: [ 1 ]
equal-contrib: true
roles:
- type: methodology
- name: Arfon M. Smith
orcid: 0000-0002-3957-2474
affiliation: [1, 3]
affiliation: [ 1, 3 ]
equal-contrib: true
roles:
- type: methodology
affiliations:
- index: 1
name: Open Journals
Expand Down Expand Up @@ -53,7 +59,6 @@ paper by @upper1974.

[YAML]: https://yaml.org


# Statement of Need

The journal publisher, in most cases where you'd be reading this, Open
Expand Down Expand Up @@ -84,21 +89,21 @@ The markup in Markdown should be semantic, not presentations. The table
below gives a small example.

+---------------------+-------------------------+-----------------------+
| Markup | Markdown example | Rendered output |
| Markup | Markdown example | Rendered output |
+:====================+:=======================:+:=====================:+
| emphasis | `*this*` | *this* |
| emphasis | `*this*` | *this* |
+---------------------+-------------------------+-----------------------+
| strong emphasis | `**that**` | **that** |
| strong emphasis | `**that**` | **that** |
+---------------------+-------------------------+-----------------------+
| strikeout | `~~not this~~` | ~~not this~~ |
| strikeout | `~~not this~~` | ~~not this~~ |
+---------------------+-------------------------+-----------------------+
| subscript | `H~2~O` | H~2~O |
| subscript | `H~2~O` | H~2~O |
+---------------------+-------------------------+-----------------------+
| superscript | `Ca^2+^` | Ca^2+^ |
| superscript | `Ca^2+^` | Ca^2+^ |
+---------------------+-------------------------+-----------------------+
| underline | `[underline]{.ul}` | [underline]{.ul} |
| underline | `[underline]{.ul}` | [underline]{.ul} |
+---------------------+-------------------------+-----------------------+
| inline code | `` `return 23` `` | `return 23` |
| inline code | `` `return 23` `` | `return 23` |
+---------------------+-------------------------+-----------------------+

: Basic inline markup and examples.
Expand Down Expand Up @@ -138,8 +143,7 @@ can sometimes be useful to give images an explicit height and/or width,
e.g. when adding an image as part of a paragraph. The Markdown `![Nyan
cat](nyan-cat.png){height="9pt"}` includes the image "nyan-cat.png"
![Nyan cat](images/nyan-cat.png){height="9pt"} while scaling it to a height of
9 pt.

9 pt.

![The "Mandrill" standard test image, sometimes erroneously called
"Baboon", is a popular sample photo and used in image processing
Expand Down Expand Up @@ -199,7 +203,7 @@ can be any sequence of characters, like `[^marker]`, but may not contain
whitespace characters.

[^markers]: Although it should be noted that some publishers prefer
symbols or letters as footnote markers.
symbols or letters as footnote markers.

The above example results in the following output:

Expand All @@ -208,7 +212,6 @@ The above example results in the following output:
>
> [^1]: An open license that allows reuse.

## Blocks

The larger components of a document are called "blocks".
Expand Down Expand Up @@ -241,7 +244,6 @@ discouraged.
Usually [lists], as described in the next section, should be preferred
over forth- and fifth-level headings.


### Lists

Bullet lists and numbered lists, a.k.a. enumerations, offer an
Expand All @@ -256,8 +258,8 @@ additional method to present sequential and hierarchical information.

- apples
- citrus fruits
- lemons
- oranges
- lemons
- oranges

Enumerations start with the number of the first item. Using the the
first two [laws of
Expand All @@ -282,7 +284,6 @@ Rendered:
gained as heat, $Q$, less the thermodynamic work, $W$, done by the
system on its surroundings. $$\Delta U = Q - W$$


# Article metadata

## Names
Expand Down Expand Up @@ -366,6 +367,8 @@ authors:
<!-- given-names: 瀧 -->
<!-- surname: 立花 -->

```

## Affiliations

Each affiliation requires an `index` and `name`.
Expand All @@ -390,6 +393,49 @@ affiliations:
ror: 04bs1pb34
```
## Contributor Roles
The [Contribution Role Taxonomy (CRediT)](https://credit.niso.org/contributor-roles) defines
fourteen standard roles of authors. Each author can be annotated with one or more contribution
roles.
1. [conceptualization](https://credit.niso.org/contributor-roles/conceptualization)
2. [data-curation](https://credit.niso.org/contributor-roles/data-curation)
3. [formal-analysis](https://credit.niso.org/contributor-roles/formal-analysis)
4. [funding-acquisition](https://credit.niso.org/contributor-roles/funding-acquisition)
5. [investigation](https://credit.niso.org/contributor-roles/investigation)
6. [methodology](https://credit.niso.org/contributor-roles/methodology)
7. [project-administration](https://credit.niso.org/contributor-roles/project-administration)
8. [resources](https://credit.niso.org/contributor-roles/resources)
9. [software](https://credit.niso.org/contributor-roles/software)
10. [supervision](https://credit.niso.org/contributor-roles/supervision)
11. [validation](https://credit.niso.org/contributor-roles/validation)
12. [visualization](https://credit.niso.org/contributor-roles/visualization)
13. [writing-original-draft](https://credit.niso.org/contributor-roles/writing-original-draft)
14. [writing-review-editing](https://credit.niso.org/contributor-roles/writing-review-editing)
For example, this can be used to identify which authors materially contributed to the paper,
such as through `formal-analysis` or `data-curation` and which authors contributed immaterially,
such as through `supervision`.

```yaml
authors:
- name: John Doe
affiliation: [ 1 ]
roles:
- type: 'formal-analysis'
- name: John Boss
affiliation: [ 1 ]
roles:
- type: 'funding-acquisition'
- type: 'supervision'
```

> **Why use a dictionary?**
> It might be valuable to extend role annotations in the future with qualifiers
> for impact such as `major` or `minor`, or something else entirely.

# Internal references

Markdown has no default mechanism to handle document internal
Expand Down Expand Up @@ -422,13 +468,13 @@ number of the referenced float. E.g., in this document
`\ref{proglangs}` gives "\ref{proglangs}".

: Comparison of programming languages used in the publishing tool.
[]{label="proglangs"}
[]{label="proglangs"}

| Language | Typing | Garbage Collected | Evaluation | Created |
| Language | Typing | Garbage Collected | Evaluation | Created |
|----------|:---------------:|:-----------------:|------------|---------|
| Haskell | static, strong | yes | non-strict | 1990 |
| Lua | dynamic, strong | yes | strict | 1993 |
| C | static, weak | no | strict | 1972 |
| Haskell | static, strong | yes | non-strict | 1990 |
| Lua | dynamic, strong | yes | strict | 1993 |
| C | static, weak | no | strict | 1972 |

## Equations

Expand Down

0 comments on commit 0512548

Please sign in to comment.