Skip to content

Commit 0780750

Browse files
committed
Fix et al. usage when max.names=1; close #56
1 parent 3df019a commit 0780750

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

R/05makeBibLatex.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,14 @@ MakeBibLaTeX <- function(docstyle = "text", authortitle = FALSE) {
200200
}
201201
if (nnames == 2L){
202202
if (max.n < 2L){
203-
out <- paste0(out, ', et al.')
203+
out <- paste0(out, ' et al.')
204204
}else{
205205
out <- paste(out, shortName(res[-1L]), sep = ' and ')
206206
}
207207
}else if (nnames > 2L){
208208
if (nnames > max.n){
209209
if (max.n <= 1L){
210-
out <- paste0(out, ', et al.')
210+
out <- paste0(out, ' et al.')
211211
}else{
212212
out <- paste0(paste(out, paste0(vapply(res[2L:max.n],
213213
shortName, ""),

R/07makeBibLatexAuthoryear.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ MakeAuthorYear <- function(docstyle = "text"){
142142
out <- shortNameLF(res[1L])
143143
if (nnames == 2L){
144144
if (max.n < 2L){
145-
out <- paste0(out, ', et al.')
145+
out <- paste0(out, ' et al.')
146146
}else{
147-
out <- paste(out, shortName(res[-1L]), sep = ' and ')
147+
out <- paste(out, shortName(res[-1L]), sep = ' and ')
148148
}
149149
}else if (nnames > 2L){
150150
if (nnames > max.n){
151151
if (max.n <= 1L){
152-
out <- paste0(out, ', et al.')
152+
out <- paste0(out, ' et al.')
153153
}else{
154154
out <- paste0(paste(out, paste0(vapply(res[2L:max.n],
155155
shortName, ""),
156156
collapse = ", "), sep = ', '),
157-
', et al.')
157+
', et al.')
158158
}
159159
}else{
160160
out <- paste(paste(out, paste0(vapply(res[-c(1L, length(res))],

0 commit comments

Comments
 (0)