aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-12-23 08:45:39 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-12-23 09:11:54 +0100
commitddd1b856087b7620d9b314026a76dd53d52d65b6 (patch)
tree9cf87aa2e1a1f1c69c1005985af0f9de19db0a09
parent7954070b0141700e17b6bc986d134fed90de7a02 (diff)
downloadpandoc-ddd1b856087b7620d9b314026a76dd53d52d65b6.tar.gz
JATS templates: fix affiliation tagging in articleauthoring output
Affiliations were `xlink`ed even in the articleauthoring tag set, but `<aff>` are not allowed as children of `contrib-group` elements in that tag set. Each affiliation must be listed directly in the contrib element.
-rw-r--r--data/templates/affiliations.jats42
-rw-r--r--data/templates/article.jats_publishing12
-rw-r--r--data/templates/default.jats_articleauthoring3
-rw-r--r--doc/jats.md19
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)$
<aff id="aff-$affiliation.id$">
$-- wrap affiliation if it has a known institution identifier
-$if(affiliation.group)$
-<institution content-type="group">$affiliation.group$</institution>
+$if(it.group)$
+<institution content-type="group">${it.group}</institution>
$endif$
-$if(affiliation.department)$
-<institution content-type="dept">$affiliation.department$</institution>
+$if(it.department)$
+<institution content-type="dept">${it.department}</institution>
$endif$
<institution-wrap>
-$if(affiliation.organization)$
-<institution>$affiliation.organization$</institution>
+$if(it.organization)$
+<institution>${it.organization}</institution>
$else$
-<institution>$affiliation.name$</institution>
+<institution>${it.name}</institution>
$endif$
-$if(affiliation.isni)$
-<institution-id institution-id-type="ISNI">$affiliation.isni$</institution-id>
+$if(it.isni)$
+<institution-id institution-id-type="ISNI">${it.isni}</institution-id>
$endif$
-$if(affiliation.ringgold)$
-<institution-id institution-id-type="Ringgold">$affiliation.ringgold$</institution-id>
+$if(it.ringgold)$
+<institution-id institution-id-type="Ringgold">${it.ringgold}</institution-id>
$endif$
-$if(affiliation.ror)$
-<institution-id institution-id-type="ROR">$affiliation.ror$</institution-id>
+$if(it.ror)$
+<institution-id institution-id-type="ROR">${it.ror}</institution-id>
$endif$
-$for(affiliation.pid)$
-<institution-id institution-id-type="$affiliation.pid.type$">$affiliation.pid.id$</institution-id>
+$for(it.pid)$
+<institution-id institution-id-type="${it.type}">${it.id}</institution-id>
$endfor$
-</institution-wrap>$if(affiliation.street-address)$,
-$for(affiliation.street-address)$
-<addr-line>$affiliation.street-address$</addr-line>$sep$,
+</institution-wrap>$if(it.street-address)$,
+$for(it.street-address)$
+<addr-line>${it}</addr-line>$sep$,
$endfor$
-$else$$if(affiliation.city)$, <city>$affiliation.city$</city>$endif$$endif$$if(affiliation.country)$,
-<country$if(affiliation.country-code)$ country="$affiliation.country-code$"$endif$>$affiliation.country$</country>$endif$
+$else$$if(it.city)$, <city>$it.city$</city>$endif$$endif$$if(it.country)$,
+<country$if(it.country-code)$ country="$it.country-code$"$endif$>$it.country$</country>$endif$
</aff>
-$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)$
<email>$author.email$</email>
$endif$
+$-- if affiliations are listed separately, then create links. Otherwise
+$-- include them here.
+$if(affiliation)$
$for(author.affiliation)$
<xref ref-type="aff" rid="aff-$author.affiliation$"/>
$endfor$
+$else$
+$for(author.affiliation)$
+${ it:affiliations.jats() }
+$endfor$
+$endif$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
-${ affiliations.jats() }
+$for(affiliation)$
+${ it:affiliations.jats() }
+$endfor$
</contrib-group>
$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)$
<email>$author.email$</email>
$endif$
$for(author.affiliation)$
-<xref ref-type="aff" rid="aff-$author.affiliation$"/>
+${ it:affiliations.jats() }
$endfor$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
-${ affiliations.jats() }
</contrib-group>
$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