However, self.et_al_subsequent_min and/or self.et_al_subsequent_use_first may be None, resulting in citationberg never suppresses authors. Hence the typst bug.
I purpose the following change:
let (et_al_min, et_al_use_first) = if is_subsequent {
- (self.et_al_subsequent_min, self.et_al_subsequent_use_first)
+ (self.et_al_subsequent_min.or(self.et_al_min), self.et_al_subsequent_use_first.or(self.et_al_use_first)
} else {
(self.et_al_min, self.et_al_use_first)
};
If dev would agree, I can potentially open PR and/or add testings. @reknih
Related to typst/hayagriva#141 which is in turn related typst/typst#3699.
The bug seems to be because the citation try to be different in the first and subsequent cases. See https://github.com/typst/citationberg/blob/778a5da601c615960e2dbe2153a33cd2c09ab1a8/src/lib.rs#L2450-L2467
However,
self.et_al_subsequent_min
and/orself.et_al_subsequent_use_first
may beNone
, resulting in citationberg never suppresses authors. Hence the typst bug.I purpose the following change:
If dev would agree, I can potentially open PR and/or add testings. @reknih