参考文献的作者数变成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

@@ -163,12 +163,9 @@ class JournalArticle
}
$sDoi = empty($v['doi']) ? '' : self::$sDoiUrl.$v['doi'];
//作者
$aAuthorInfo = empty($v['abbr']) ? [] : explode(', ', str_replace([', ',','], ', ', $v['abbr']));
if(count($aAuthorInfo) > 3){
$sAuthorInfo = implode(', ', array_slice($aAuthorInfo,0,3)).", et al.";
}else{
$sAuthorInfo = empty($aAuthorInfo) ? '' : implode(', ', $aAuthorInfo).'.';
}
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
$sAuthorInfo = empty($v['abbr']) ? '' : \app\common\AuthorListFormatter::format($v['abbr']);
$sAuthorInfo = $sAuthorInfo === '' ? '' : $sAuthorInfo.'.';
$sArticleInfo .= $i.'. Article Title: '.$v['title'].'<br>Author(s): '.$sAuthorInfo.'<br>Link or DOI: '.$sDoi.'<br><br>';
$i++;
}