Open ashprice opened 3 months ago
OK, I don't know if this is a preferred solution but I tracked down the issue. Anthos isn't given the CSL type for chapter, as I suspected. Still not sure I really understand 'what' is happening there, I don't know rust (although I wish to learn) and I am a relative beginner at all things code.
A fix, whether hacky or not, is to simply use the selector to select anthos and make it into a chapter for CSL. See the commit here: https://github.com/ashprice/hayagriva/commit/49d88b2d37d1e9b72e115bd675ccaaf87bee4101
diff --git a/src/csl/taxonomy.rs b/src/csl/taxonomy.rs
index c691ed3..e3108b7 100644
--- a/src/csl/taxonomy.rs
+++ b/src/csl/taxonomy.rs
@@ -564,7 +564,8 @@ impl EntryLike for Entry {
!(is_periodical || is_collection)
}
Kind::Chapter => {
- select!(Chapter > (Book | Anthology | Proceedings)).matches(self)
+ select!((Chapter | Anthos) > (Book | Anthology | Proceedings))
+ .matches(self)
}
Kind::Entry | Kind::EntryDictionary | Kind::EntryEncyclopedia => {
if kind == Kind::EntryDictionary {
I can make this into a PR, but I am not sure that this is the preferred way to deal with this. FWIW, we are dealing here with a regular book that contains a series of chapters with different authors, I am not quite sure I would call that an anthology
to begin with, but I am guessing that the type exists to differentiate it from chapters with the same authors...
Hello, I am trying to format a bibliography in typst.
Consider the following biblatex reference:
And the following CSL:
This will print a blank line:
Its type inside hayagriva (after conversion from a
.bib
file) is given asanthos
, and the parent reference has the typeanthology
(not sure this is what I would call it, but whatever).I can get it to print using the CSL by eg. within the CSL, calling all reference types, matching for references that have titles, etc. But I cannot call it by
type="chapter"
, while this should be possible, and such works using other tools that use CSL.Not sure if this is a bug, or if I am making a mistake. Thank you for any help & let me know what further info I can provide.