From b5620ecca95ae9244e53ac09be667ebebb04a5b6 Mon Sep 17 00:00:00 2001 From: Thomas Kahle Date: Tue, 1 Apr 2025 09:57:24 +0200 Subject: [PATCH 1/3] Fix Oxford comma --- _layouts/bib.liquid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index f45fc1d22602..1ce1116c5e5b 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -79,8 +79,8 @@ {%- endif -%} {%- if forloop.length > 1 -%} - {% if forloop.first == false %}, {% endif %} - {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} + {% if forloop.first == false and forloop.last == false%}, {% endif %} + {%- if forloop.last and author_array_limit == author_array_size %} and {% endif -%} {% endif %} {%- if author_is_self -%} From 47427e19f49a1c98973f04c7a347cfa202790c39 Mon Sep 17 00:00:00 2001 From: Thomas Kahle Date: Wed, 2 Apr 2025 09:25:51 +0200 Subject: [PATCH 2/3] Fix comma in 2 author papers better. --- _layouts/bib.liquid | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index 1ce1116c5e5b..b87864e29941 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -79,8 +79,10 @@ {%- endif -%} {%- if forloop.length > 1 -%} - {% if forloop.first == false and forloop.last == false%}, {% endif %} - {%- if forloop.last and author_array_limit == author_array_size %} and {% endif -%} + {% if forloop.first == false -%} + {%- if forloop.length > 2 %}, {% elsif forloop.length == 2 -%} {% endif %} + {%- endif %} + {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} {% endif %} {%- if author_is_self -%} From 1eb6e898330df50d04ccc5406acdb286508a330e Mon Sep 17 00:00:00 2001 From: Thomas Kahle Date: Wed, 2 Apr 2025 14:50:54 +0200 Subject: [PATCH 3/3] Improve whitespace handling in bib.liquid --- _layouts/bib.liquid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index b87864e29941..1e2d0e0eb307 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -74,15 +74,15 @@ {% if coauthor.firstname contains author.first %} {%- assign coauthor_url = coauthor.url -%} {% break %} - {% endif %} + {%- endif -%} {% endfor %} {%- endif -%} {%- if forloop.length > 1 -%} {% if forloop.first == false -%} - {%- if forloop.length > 2 %}, {% elsif forloop.length == 2 -%} {% endif %} + {%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %} {%- endif %} - {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} + {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} {% endif %} {%- if author_is_self -%}