Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exportsrv/cslstyles/agu.csl
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@
</sort>
<layout>
<group suffix=".">
<group delimiter=" ">
<text macro="author"/>
<text macro="author" suffix=" "/>
<group delimiter=". ">
<text macro="issued"/>
<text macro="title-plus-extra"/>
<text macro="container"/>
Expand Down
4 changes: 2 additions & 2 deletions exportsrv/cslstyles/ams.csl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
<text macro="title" prefix=" "/>
</group>
<group prefix=" " suffix="" delimiter=" ">
<text variable="container-title" form="short" font-style="italic" suffix=","/>
<text variable="container-title" font-style="italic" suffix=","/>
<group delimiter=", ">
<text variable="volume" font-weight="bold"/>
<text variable="page"/>
Expand All @@ -249,7 +249,7 @@
<text macro="title" prefix=" "/>
</group>
<group prefix=" " suffix="" delimiter=" ">
<text variable="container-title" form="short" font-style="italic" suffix=","/>
<text variable="container-title" font-style="italic" suffix=","/>
<group delimiter=", ">
<text variable="volume" font-weight="bold"/>
<text variable="page"/>
Expand Down
11 changes: 11 additions & 0 deletions exportsrv/formatter/cslFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,17 @@ def __update_data(self):
for data in self.for_cls:
if len(data.get('DOI', '')) > 0:
data['DOI'] = data['DOI'].lstrip('doi:')
# make sure the author list has a final period (if there's a given name, it'll get a period when the name is
# converted to initials - this counts as the final period; we need to account for the situation where a
# period is not introduced at that point)
if self.csl_style == 'agu':
for data in self.for_cls:
author = data.get('author')
if author:
last = author[-1]
if "family" in last and "given" not in last:
if not last["family"].endswith("."):
last["family"] += "."
# remove MathML markup
elif (self.csl_style == 'ieee'):
for data in self.for_cls:
Expand Down
Loading