From ddd1b856087b7620d9b314026a76dd53d52d65b6 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 23 Dec 2021 08:45:39 +0100 Subject: JATS templates: fix affiliation tagging in articleauthoring output Affiliations were `xlink`ed even in the articleauthoring tag set, but `` are not allowed as children of `contrib-group` elements in that tag set. Each affiliation must be listed directly in the contrib element. --- data/templates/affiliations.jats | 42 +++++++++++++--------------- data/templates/article.jats_publishing | 12 +++++++- data/templates/default.jats_articleauthoring | 3 +- doc/jats.md | 19 ++++++++++--- 4 files changed, 47 insertions(+), 29 deletions(-) diff --git a/data/templates/affiliations.jats b/data/templates/affiliations.jats index 93238d22e..2df99d75e 100644 --- a/data/templates/affiliations.jats +++ b/data/templates/affiliations.jats @@ -1,38 +1,36 @@ $-- $-- Affiliations $-- -$for(affiliation)$ $-- wrap affiliation if it has a known institution identifier -$if(affiliation.group)$ -$affiliation.group$ +$if(it.group)$ +${it.group} $endif$ -$if(affiliation.department)$ -$affiliation.department$ +$if(it.department)$ +${it.department} $endif$ -$if(affiliation.organization)$ -$affiliation.organization$ +$if(it.organization)$ +${it.organization} $else$ -$affiliation.name$ +${it.name} $endif$ -$if(affiliation.isni)$ -$affiliation.isni$ +$if(it.isni)$ +${it.isni} $endif$ -$if(affiliation.ringgold)$ -$affiliation.ringgold$ +$if(it.ringgold)$ +${it.ringgold} $endif$ -$if(affiliation.ror)$ -$affiliation.ror$ +$if(it.ror)$ +${it.ror} $endif$ -$for(affiliation.pid)$ -$affiliation.pid.id$ +$for(it.pid)$ +${it.id} $endfor$ -$if(affiliation.street-address)$, -$for(affiliation.street-address)$ -$affiliation.street-address$$sep$, +$if(it.street-address)$, +$for(it.street-address)$ +${it}$sep$, $endfor$ -$else$$if(affiliation.city)$, $affiliation.city$$endif$$endif$$if(affiliation.country)$, -$affiliation.country$$endif$ +$else$$if(it.city)$, $it.city$$endif$$endif$$if(it.country)$, +$it.country$$endif$ -$endfor$ diff --git a/data/templates/article.jats_publishing b/data/templates/article.jats_publishing index bb69404c2..47ab8f197 100644 --- a/data/templates/article.jats_publishing +++ b/data/templates/article.jats_publishing @@ -106,15 +106,25 @@ $endif$ $if(author.email)$ $author.email$ $endif$ +$-- if affiliations are listed separately, then create links. Otherwise +$-- include them here. +$if(affiliation)$ $for(author.affiliation)$ $endfor$ +$else$ +$for(author.affiliation)$ +${ it:affiliations.jats() } +$endfor$ +$endif$ $if(author.cor-id)$ * $endif$ $endfor$ -${ affiliations.jats() } +$for(affiliation)$ +${ it:affiliations.jats() } +$endfor$ $endif$ $if(article.author-notes)$ diff --git a/data/templates/default.jats_articleauthoring b/data/templates/default.jats_articleauthoring index 8cf89fa68..29abe86c5 100644 --- a/data/templates/default.jats_articleauthoring +++ b/data/templates/default.jats_articleauthoring @@ -40,14 +40,13 @@ $if(author.email)$ $author.email$ $endif$ $for(author.affiliation)$ - +${ it:affiliations.jats() } $endfor$ $if(author.cor-id)$ * $endif$ $endfor$ -${ affiliations.jats() } $endif$ $if(copyright)$ diff --git a/doc/jats.md b/doc/jats.md index 7eca75c8e..9b8351840 100644 --- a/doc/jats.md +++ b/doc/jats.md @@ -45,10 +45,21 @@ Metadata Values element. `affiliation` - : list of affiliation identifiers; marks the organizations - with which an author is affiliated. Each identifier in this - list must also occur as the `id` of an affiliation listed in - the top-level `affiliation` list. + : either full affiliation entries as described in field + `affiliation`, or a list of affiliation identifiers. + + The identifiers link to the organizations with which an + author is affiliated. Each identifier in this list must + also occur as the `id` of an affiliation listed in the + top-level `affiliation` list. + + If the top-level `affiliation` field is set, then this + entry assumed to be a list of identifiers, and a list of + full entries if that field is unset. + + Full entries must be given if the articleauthoring tag + set it used, as affiliation links are not allowed in that + schema. `equal-contrib` : boolean attribute used to mark authors who contributed -- cgit v1.2.3