From dbc80c1a6b5c28befbf7e791665d53de0f22c5f9 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel <albert@zeitkraut.de> Date: Mon, 4 Apr 2022 10:02:07 +0200 Subject: [PATCH] JATS template: allow multiple licenses to be given. The `license` metadata field can now be used to set the license of an article; a list can be used to add multiple license statements. --- data/templates/article.jats_publishing | 5 ++++ data/templates/default.jats_articleauthoring | 5 ++++ doc/jats.md | 29 ++++++++++++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/data/templates/article.jats_publishing b/data/templates/article.jats_publishing index 640e88572..68032992c 100644 --- a/data/templates/article.jats_publishing +++ b/data/templates/article.jats_publishing @@ -188,6 +188,11 @@ $if(copyright.text)$ <license-p>$copyright.text$</license-p> </license> $endif$ +$for(license)$ +<license$if(it.type)$ license-type="${it.type}"$endif$$if(it.link)$ xlink:href="${it.link}"$endif$> +<license-p>$if(it.text)$${it.text}$else$${it}$endif$</license-p> +</license> +$endfor$ </permissions> $endif$ $if(abstract)$ diff --git a/data/templates/default.jats_articleauthoring b/data/templates/default.jats_articleauthoring index 90d98f2bf..2c0de2775 100644 --- a/data/templates/default.jats_articleauthoring +++ b/data/templates/default.jats_articleauthoring @@ -65,6 +65,11 @@ $if(copyright.text)$ <license-p>$copyright.text$</license-p> </license> $endif$ +$for(license)$ +<license$if(it.type)$ license-type="${it.type}"$endif$$if(it.link)$ xlink:href="${it.link}"$endif$> +<license-p>$if(it.text)$${it.text}$else$${it}$endif$</license-p> +</license> +$endfor$ </permissions> $endif$ <abstract> diff --git a/doc/jats.md b/doc/jats.md index 9e9ab10fb..ddd6d989d 100644 --- a/doc/jats.md +++ b/doc/jats.md @@ -152,11 +152,13 @@ Metadata Values (if the latter is present). `copyright` -: Licensing and copyright information. This information is +: Copyright and licensing information. This information is rendered via the [`<permissions>`][elem:permissions] element. - The variables `type`, `link`, and `text` should always be used - together. + It is recommended to use the `license` field (described below) + for licensing information. If licensing information is + included below `copyright`, then the variables `type`, `link`, + and `text` should always be used together. `statement` : copyright notice or statement; used as content of the @@ -348,6 +350,27 @@ Metadata Values : place of publication. Used as the content of the [`<publisher-loc>`][elem:publisher-loc] element. +`license` +: Article licensing information. Each item of this field is + rendered as a `<license>` element within the + [`<permissions>`][elem:permissions] element. + + Item content should be either a single paragraph, or a map + with the fields listed below. + + `text` + : inline text describing a license under which the text is + published; included via the + [`<license-p>`][elem:copyright-holder] element. + + `type` + : type of the license; used as value of the + [`license-type`][attr:license-type] attribute. + + `link` + : external link describing the license; used as value of a + `xlink:href` attribute in the `<license>` element. + `notes` : Additional notes concerning the whole article. Added to the article's frontmatter via the [`<notes>`][elem:notes] element.