diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-06-11 17:01:36 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-06-11 17:01:36 -0700 |
commit | 5bbaedac57d656d3f38a574763b2ab5451a20158 (patch) | |
tree | 2adbefdfd33556a13ca2c7e975799ce1cf51f4c8 /data/templates/default.jats | |
parent | f7c0d2fb3f9ba8ac6c20ea03a2dbe0709c0d026f (diff) | |
download | pandoc-5bbaedac57d656d3f38a574763b2ab5451a20158.tar.gz |
JATS writer: ensure validity of pub-date.
We try to parse the date and convert to year, month, day,
as expected in pub-date. We also add an iso-8601-date attribute
if possible.
Diffstat (limited to 'data/templates/default.jats')
-rw-r--r-- | data/templates/default.jats | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/data/templates/default.jats b/data/templates/default.jats index 966da5c29..5fd3590a5 100644 --- a/data/templates/default.jats +++ b/data/templates/default.jats @@ -120,22 +120,14 @@ $endif$ </author-notes> $endif$ $if(date)$ -$if(date.iso-8601)$ -<pub-date pub-type="epub" iso-8601-date="$date.iso-8601$"> -$else$ -<pub-date pub-type="epub"> -$endif$ +<pub-date pub-type="epub"$if(date.iso-8601)$ iso-8601-date="$date.iso-8601$"$endif$> $if(date.day)$ -<day>$pub-date.day$</day> +<day>$date.day$</day> $endif$ $if(date.month)$ -<month>$pub-date.month$</month> -$endif$ -$if(date.year)$ -<year>$pub-date.year$</year> -$else$ -<string-date>$date$</string-date> +<month>$date.month$</month> $endif$ +<year>$date.year$</year> </pub-date> $endif$ $if(article.volume)$ |