Closed Andrew15-5 closed 1 month ago
Hayagriva's data model is distinct from CSL because we expect to offer creating citation styles in Typst using it in the future.
@laurmaedje and I feel that CSL contains a few sub-par design choices which we do not want to grandfather into that system.
I don't think that number-of-pages
is a sub-par design choice. I think that it's more descriptive and slightly easier to understand what it refers to. But I at least expect to see a note about the CSL to Hayagriva field mapping in https://github.com/typst/hayagriva/blob/main/docs/file-format.md. This is so that CSL developers wouldn't fall into the same pitfall I did when started using Hayagriva.
It’s not about the naming page-total vs number-of-pages. It’s that hayagriva is a completely separate data model and it existed before the CSL integration and it will likely survive CSL being the main way to format bibliographies in Typst. Thus, we don’t want to rename things just to match CSL.
That aside, I think it’s good that the term starts with „page“ rather than „number“. In an ordered list, it is easier to find.
I would also like to note that your bold „at least“ comes across as quite entitled.
It’s not about the naming page-total vs number-of-pages. It’s that hayagriva is a completely separate data model and it existed before the CSL integration and it will likely survive CSL being the main way to format bibliographies in Typst. Thus, we don’t want to rename things just to match CSL.
I already forgot that CSL was integrated at some point. Yeah, I guess renaming is not the way.
That aside, I think it’s good that the term starts with „page“ rather than „number“. In an ordered list, it is easier to find.
You have a point there.
I would also like to note that your bold „at least“ comes across as quite entitled.
I think it's natural for people to have different expectations. I'm just putting stress at what I expect as a bare minimum solution/fix. I'm not sure what's entitled about that (or what it exactly mean here).
But regardless, what about the mapping? Was it even considered at some point? I think it's a good documentation improvement (from a migration/dev standpoint). I just don't know where else would be a good place to include such mapping notes other than directly in the list of fields defined as tables (so you would add another row to some fields).
In BibTeX it looks like there is only the
pages
field and in CSL there arepage
andnumber-of-pages
.When I was testing Hayagriva is Typst with a custom CSL style I noticed that apparently Hayagriva's
page-total
is mapped to CSL'snumber-of-pages
, butnumber-of-pages
directly in the YAML file is not accessible. I don't see a reason to create a 3rd name for the same thing just to confuse CSL style developers. Whypage-total
is not namednumber-of-pages
? I usedvolume
until this moment, because I thought thatnumber-of-pages
just isn't supported yet. But it is, you just have to use non-CSL-standardpage-total
.I want to either be allowed to use both fields (one is described here, and the other is inherited implicitly from CSL standard) that will map to the same CSL field/variable (i.e., aliases), or rename
page-total
tonumber-of-pages
.