-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for specifying affiliation ROR identifiers (#72)
- Loading branch information
Showing
7 changed files
with
144 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- This filter rewrites the affiliation list inside the | ||
-- author dictionary to contain all the information, not | ||
-- just the index in the global affiliation list | ||
|
||
function Meta (meta) | ||
-- note that there's a difference between meta.authors (the original) | ||
-- and meta.author (the processed one) | ||
for _, author in ipairs(meta.authors or {}) do | ||
local xml = "<affiliations>" | ||
for i, affiliation_list in ipairs(author.affiliation) do | ||
local index = tonumber(affiliation_list[1].text) | ||
local affiliation = meta.affiliations[index] | ||
xml = xml.. "\n <institution><institution_name>" | ||
for _, v in ipairs(affiliation.name) do | ||
if v.text then | ||
xml = xml .. v.text | ||
else | ||
xml = xml .. " " | ||
end | ||
end | ||
xml = xml .. "</institution_name>" | ||
if affiliation.ror then | ||
xml = xml .. "<institution_id type=\"ror\">https://ror.org/" .. affiliation.ror[1].text .. "</institution_id>" | ||
end | ||
xml = xml.. "</institution>" | ||
end | ||
xml = xml .. "\n</affiliations>" | ||
-- afxml - (af)filiation xml | ||
author.afxml = pandoc.RawInline('html', xml) | ||
end | ||
return meta | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ title: >- | |
authors: | ||
- name: Albert Krewinkel | ||
email: [email protected] | ||
affiliation: [1, 2] | ||
affiliation: [1, 2, 4] | ||
orcid: 0000-0002-9455-0796 | ||
corresponding: true | ||
- name: Juanjo Bazán | ||
|
@@ -22,6 +22,9 @@ affiliations: | |
name: Pandoc Development Team | ||
- index: 3 | ||
name: GitHub | ||
- index: 4 | ||
name: Technische Universitaet Hamburg | ||
ror: 04bs1pb34 | ||
date: 2022-06-29 | ||
bibliography: paper.bib | ||
tags: | ||
|
@@ -363,6 +366,29 @@ authors: | |
<!-- given-names: 瀧 --> | ||
<!-- surname: 立花 --> | ||
|
||
## Affiliations | ||
|
||
Each affiliation requires an `index` and `name`. | ||
|
||
Optionally, the Research Organization Registry (ROR) identifier for the top-level | ||
organization can be annotated with the `ror` key. Note that ROR does not include | ||
departments in its [scope](https://ror.org/registry/#scope-and-criteria-for-inclusion), | ||
so ROR annotations are typically made to the top-level organization. | ||
|
||
```yaml | ||
authors: | ||
- name: Albert Krewinkel | ||
affiliation: [ 1, 2, 3 ] | ||
affiliations: | ||
- index: 1 | ||
name: Open Journals | ||
- index: 2 | ||
name: Pandoc Development Team | ||
- index: 3 | ||
name: Technische Universitaet Hamburg | ||
ror: 04bs1pb34 | ||
``` | ||
|
||
# Internal references | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ publishing pipeline</article-title> | |
<email>[email protected]</email> | ||
<xref ref-type="aff" rid="aff-1"/> | ||
<xref ref-type="aff" rid="aff-2"/> | ||
<xref ref-type="aff" rid="aff-4"/> | ||
<xref ref-type="corresp" rid="cor-1"><sup>*</sup></xref> | ||
</contrib> | ||
<contrib contrib-type="author" equal-contrib="yes"> | ||
|
@@ -65,6 +66,12 @@ publishing pipeline</article-title> | |
<institution>GitHub</institution> | ||
</institution-wrap> | ||
</aff> | ||
<aff id="aff-4"> | ||
<institution-wrap> | ||
<institution>Technische Universitaet Hamburg</institution> | ||
<institution-id institution-id-type="ROR">04bs1pb34</institution-id> | ||
</institution-wrap> | ||
</aff> | ||
</contrib-group> | ||
<author-notes> | ||
<corresp id="cor-1">* E-mail: <email>[email protected]</email></corresp> | ||
|
@@ -513,6 +520,30 @@ Software should use an OSI-approved license. | |
<p> </p> | ||
</sec> | ||
</sec> | ||
<sec id="affiliations"> | ||
<title>Affiliations</title> | ||
<p>Each affiliation requires an <monospace>index</monospace> and | ||
<monospace>name</monospace>.</p> | ||
<p>Optionally, the Research Organization Registry (ROR) identifier | ||
for the top-level organization can be annotated with the | ||
<monospace>ror</monospace> key. Note that ROR does not include | ||
departments in its | ||
<ext-link ext-link-type="uri" xlink:href="https://ror.org/registry/#scope-and-criteria-for-inclusion">scope</ext-link>, | ||
so ROR annotations are typically made to the top-level | ||
organization.</p> | ||
<code language="yaml">authors: | ||
- name: Albert Krewinkel | ||
affiliation: [ 1, 2, 3 ] | ||
|
||
affiliations: | ||
- index: 1 | ||
name: Open Journals | ||
- index: 2 | ||
name: Pandoc Development Team | ||
- index: 3 | ||
name: Technische Universitaet Hamburg | ||
ror: 04bs1pb34</code> | ||
</sec> | ||
</sec> | ||
<sec id="internal-references"> | ||
<title>Internal references</title> | ||
|