From 342f5d25722f45c35ce52bfbb69ea25c5234ee58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 20 Jul 2021 20:35:55 +0200 Subject: Remove double period after author --- fref.lex | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/fref.lex b/fref.lex index 0541e1e..4a34aa8 100644 --- a/fref.lex +++ b/fref.lex @@ -166,14 +166,18 @@ harvard() /* Print authors. */ for(i = 0; i < e.a-2; i++) - printf("%s, ", e.au[i]); + pf("*, ", e.au[i]); if(i == e.a-2) - printf("%s %s ", e.au[i++], t->and); + pf("* * ", e.au[i++], t->and); if(i == e.a-1) - printf("%s", e.au[i]); + pf("*", e.au[i]); /* Print date. */ - (pf(" (%).\n", e.da) || (e.a ? pf(".\n") : 0)); + if(!pf(" (%).\n", e.da) && e.a){ + if(e.au[i][strlen(e.au[i])-1] != '.') + pf("."); + pf("\n"); + } /* Print title, book/journal. */ if(*e.bo || *e.jo){ @@ -188,7 +192,7 @@ harvard() /* Print pages, converting hyphens to en dashes. */ if(*e.pp){ - printf(", %s", strpbrk(e.pp, ",-") ? t->pp : t->p); + pf(", *", strpbrk(e.pp, ",-") ? t->pp : t->p); for(i = 0; i < strlen(e.pp); i++){ if(e.pp[i] == '-') putchar('\\'); putchar(e.pp[i]); -- cgit v1.2.3