参考文献的作者数变成6

This commit is contained in:
wangjinlei
2026-08-07 17:51:18 +08:00
parent a1e151048c
commit f87057488b
10 changed files with 386 additions and 49 deletions

View File

@@ -651,7 +651,8 @@ function formateAuthor($list){
if(isset($list['given_name'])||isset($list['surname'])){
$flag = $list['given_name']." ".$list['surname'];
}
else if (count($list)<=3){
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
else if (count($list)<=6){
foreach ($list as $v){
$flag .= $v['given_name']." ".$v['surname'].", ";
}
@@ -904,12 +905,10 @@ function formateJournal($fullname)
function prgeAuthor($author)
{
$a = explode(',', $author);
if (count($a) < 7) {
return $author . '.';
} else {
return trim($a[0]) . ', ' . trim($a[1]) . ', ' . trim($a[2]) . ', et al.';
}
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
$formatted = \app\common\AuthorListFormatter::format($author);
return $formatted === '' ? '' : rtrim($formatted, '.') . '.';
}