diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2022-03-22 14:38:52 +0100 |
|---|---|---|
| committer | Albert Krewinkel <albert@zeitkraut.de> | 2022-03-22 15:09:14 +0100 |
| commit | 4394fdf59c05b35d294eb67c4fab619687191ca7 (patch) | |
| tree | 644164b4b4872e450e94a85b9a89ad72630abae3 /src/Text | |
| parent | 9053214fba2b4be05102f2f46157733e63947f92 (diff) | |
JATS writer: encode author "others" as `<etal/>`
Citeproc adopted the BibTeX convention to use the author name "others"
when there are additional authors that are not named. JATS uses the
`<etal>` element for this.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Writers/JATS/References.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/JATS/References.hs b/src/Text/Pandoc/Writers/JATS/References.hs index 49ddaf276..382931a86 100644 --- a/src/Text/Pandoc/Writers/JATS/References.hs +++ b/src/Text/Pandoc/Writers/JATS/References.hs @@ -144,7 +144,9 @@ toNameElements :: Name -> Doc Text toNameElements name = if not (isEmpty nameTags) then inTags' "name" [] nameTags - else nameLiteral name `inNameTag` "string-name" + else if nameLiteral name == Just "others" -- indicates an "et al." + then "<etal/>" + else nameLiteral name `inNameTag` "string-name" where inNameTag mVal tag = case mVal of Nothing -> empty |
