This document tracks verified Hayagriva bugs relevant to this template, the CSL APA style, and BibLaTeX interoperability.
Summary
Related
Hayagriva:
CSL:
BibLaTeX:
Details
institution Field Mapping for Theses and Reports
Ancillary:
BibLaTeX institution maps to Hayagriva organization → CSL authority, but CSL styles expect institution data in publisher for thesis and report entries. This affects @thesis, @phdthesis, @mastersthesis, @report, and @techreport.
Root cause: In interop.rs, institution → organization. In taxonomy.rs, organization → CSL authority. But CSL styles use publisher for thesis/report institutions, so the data ends up in a field that gets ignored.
Hayagriva YAML workaround: Use publisher for institution and archive for database/repository:
eg-thesis:
type: thesis
author: Person, Example G.
title: A thesis title
genre: Doctoral dissertation
publisher: Some University
archive: SU Repository
url: https://repo.some.edu/handle/10150/620615
date: 2001
BibLaTeX has no workaround. The field mapping in interop.rs needs to be fixed for thesis/report types.
type Field Rendered Literally
No specific upstream issue tracks this bug.
Ancillary:
Relevant code: src/interop.rs (BibLaTeX → Hayagriva translation). BibLaTeX type key values are passed through to genre without translation.
The BibLaTeX type field maps to Hayagriva genre. This creates a BibLaTeX interoperability bug: in BibLaTeX, the type value acts as a dictionary key that maps to a localized string, e.g.:
@thesis: phdthesis → "Doctoral dissertation", mathesis → "Master's thesis"
@report: techreport → "Technical report"
But Hayagriva renders genre values as literal (sentence-cased) strings, so type = {phdthesis} becomes "[Phdthesis]" instead of "[Doctoral dissertation]".
Note: When using the specific entry types (@phdthesis, @mastersthesis, @techreport) without a type field, Hayagriva correctly defaults the genre (NB capitalization inconsistency):
@phdthesis → "Doctoral dissertation"
@mastersthesis → "Master's thesis"
@techreport → "technical report"
BibLaTeX input:
@thesis{eg-thesis,
author = {Person, Example G.},
title = {A thesis title},
type = {phdthesis},
publisher = {Some University},
date = {2001}
}
Actual output:
Person, E. G. (2001). A thesis title [Phdthesis]. Some University.
Expected output:
Person, E. G. (2001). A thesis title [Doctoral dissertation]. Some University.
N.B. Since this is specific to the type field bug, the expected output inherits the "Thesis Institution Placement" bug. To be BibLaTeX interoperable and APA7 compliant, both the type bug and the institution placement bug would need to be rectified.
Workaround:
(i) Use the specific entry type (@phdthesis, @mastersthesis, @techreport) without specifying a type, e.g.
@phdthesis{eg-thesis,
author = {Person, Example G.},
title = {A thesis title},
publisher = {Some University},
date = {2001}
}
or
(ii) Use a literal string for the type value, e.g.
@thesis{eg-thesis,
author = {Person, Example G.},
title = {A thesis title},
type = {Doctoral dissertation},
publisher = {Some University},
date = {2001}
}
@collection/@incollection CSL Mapping
Affects template entries: Lobsang2023 (edited volume, uses @book workaround), Issa1963 (book chapter, uses @inbook workaround)
BibLaTeX @collection and @incollection map to incorrect CSL types:
| BibLaTeX |
Hayagriva |
CSL actual |
CSL expected |
Problem |
@collection |
Anthology |
collection |
book |
Incorrect [Archival collection] annotation |
@incollection |
Anthos |
(none) |
chapter |
Title duplication |
The term collection has different semantics in BibLaTeX and CSL:
- BibLaTeX: "A single-volume collection with multiple, self-contained contributions by distinct authors...usually has an editor" (i.e., an edited volume)
- CSL: Archival materials (physical archives, museum holdings)
The type mappings are defined in src/interop.rs (TryFrom<&tex::Entry> implementation for BibLaTeX → Hayagriva) and src/csl/taxonomy.rs (matches_entry_type() for Hayagriva → CSL). The Anthos type has no match in any matches_entry_type() branch, so it receives no CSL type designation.
BibLaTeX input:
@collection{CollectionMapping,
editor = {Smith, John},
title = {Handbook of Cognitive Science},
date = {2020},
publisher = {Academic Press}
}
Actual output:
Smith, J. (Ed.). (2020, ). Handbook of Cognitive Science [Archival collection]. Academic Press.
Expected output:
Smith, J. (Ed.). (2020). Handbook of Cognitive Science. Academic Press.
Workaround: Use @book with editor field for @collection, and @inbook for @incollection
@incollection Title Duplication
Related to the CSL mapping issue above: @incollection entries have the parent book title duplicated.
Cause: For Anthos > Anthology entries, both CSL variables resolve to the parent anthology title (see StandardVariable::ContainerTitle and StandardVariable::VolumeTitle in src/csl/taxonomy.rs):
ContainerTitle uses get_container() → parent title
VolumeTitle has explicit selector (Anthos > ("p":Anthology)) → parent title
APA style uses both variables, causing the title to appear twice.
BibLaTeX input:
@incollection{IncollectionDuplication,
title = {Chapter in Edited Volume},
author = {Author, Test},
editor = {Editor, Test},
booktitle = {The Edited Volume Title},
date = {2020},
publisher = {Academic Press}
}
Actual output:
Author, T. (2020). Chapter in Edited Volume. In T. Editor (Ed.), The Edited Volume Title: The Edited Volume Title. Academic Press.
Expected output:
Author, T. (2020). Chapter in Edited Volume. In T. Editor (Ed.), The Edited Volume Title. Academic Press.
Workaround: Use @inbook instead. Trade-off: may lose "(Ed.)" designation in some cases
Trailing Comma in Dates
Erroneous trailing comma appears in date formatting "(2020, )" in multiple contexts:
1. @collection entries (year-only dates):
Smith, J. (Ed.). (2020, ). Handbook of Cognitive Science [Archival collection]. Academic Press.
2. @online entries with urldate:
@online{DateUrldate,
author = {Webber, Site},
title = {Article With Both Dates},
url = {https://www.example.com/dated},
date = {2021},
urldate = {2025-04-30}
}
Actual output:
Webber, S. (2021, ). Article With Both Dates. https://www.example.com/dated
Expected output:
Webber, S. (2021). Article With Both Dates. https://www.example.com/dated
Workaround: For @online, omit urldate when date is present. For @collection, use @book workaround
Narrative Citations Use & Instead of and
Typst input:
#cite(<NarrativeCitation>, form: "prose")
Actual output:
Expected output (APA):
Kheiri and Keedwell (2015)
Workaround:
#show cite.where(form: "prose"): it => {
show "&": "and"
it
}
Prose Citations Don't Collapse
Typst input:
#cite(<ProseCollapse1>, form: "prose") #cite(<ProseCollapse2>, form: "prose")
Actual output:
Jones (2000); Jones (2005)
Expected output:
Workaround: None
Issue Number Formatting When Volume Missing
Note: Labeled csl-upstream — this is a bug in the APA CSL style, not Hayagriva.
BibLaTeX input:
@article{MissingVolume,
author = {Volume, Missing},
title = {Article Without Volume},
journaltitle = {Journal of Missing Data},
number = {13},
date = {2020},
pages = {1--10}
}
Actual output:
Volume, M. (2020). Article Without Volume. Journal of Missing Data, 13, 1–10.
Expected output (APA):
Volume, M. (2020). Article Without Volume. Journal of Missing Data, (13), 1–10.
Issue number should be in parentheses when volume is missing.
Workaround: None
Publisher Field Parsing with "and"
BibLaTeX input:
@book{PublisherAnd,
author = {Writer, Test},
title = {Book With And Publisher},
publisher = {Canada Mortgage and Housing Corporation},
date = {2020}
}
Actual output:
Writer, T. (2020). Book With And Publisher. Canada Mortgage, Housing Corporation.
Expected output:
Writer, T. (2020). Book With And Publisher. Canada Mortgage and Housing Corporation.
Workaround: Protect with braces, e.g.
publisher = {Canada Mortgage {and} Housing Corporation}
Title Case Not Applied Automatically
Typst renders titles exactly as stored, without style-specific case conversion.
BibLaTeX input:
@book{TitleCaseTest,
author = {Caser, Title},
title = {This Is An Incredible Book With Title Case},
publisher = {Test Press},
date = {2023}
}
Actual output:
Caser, T. (2023). This Is An Incredible Book With Title Case. Test Press.
Expected output (APA sentence case):
Caser, T. (2023). This is an incredible book with title case. Test Press.
Workaround: Store titles in sentence case in .bib file
UTF-8/Non-ASCII Sorting
Ancillary:
Non-ASCII characters sorted by Unicode code points, not linguistic rules.
Test entries:
@book{Utf8SortPolish,
author = {Łakomy, Henryk},
title = {Polish Author Book},
publisher = {Polish Press},
date = {2006}
}
@book{Utf8SortFrench,
author = {Roux, François},
title = {French Author Book},
publisher = {French Press},
date = {2010}
}
Actual citation order:
(Roux, 2010; Łakomy, 2006)
Actual bibliography order: Łakomy appears at the very end (after all ASCII entries).
Expected: Łakomy should sort near "L" entries alphabetically.
Workaround: None
This document tracks verified Hayagriva bugs relevant to this template, the CSL APA style, and BibLaTeX interoperability.
Summary
institutionfield mappingtypefield rendered literally@collection/@incollectionCSL mapping@book/@inbook@incollectiontitle duplication@inbook&vsand{and}Related
Hayagriva:
CSL:
csl-upstreamin Hayagriva originate hereBibLaTeX:
Details
institutionField Mapping for Theses and ReportsAncillary:
BibLaTeX
institutionmaps to Hayagrivaorganization→ CSLauthority, but CSL styles expect institution data inpublisherfor thesis and report entries. This affects@thesis,@phdthesis,@mastersthesis,@report, and@techreport.Root cause: In
interop.rs,institution→organization. Intaxonomy.rs,organization→ CSLauthority. But CSL styles usepublisherfor thesis/report institutions, so the data ends up in a field that gets ignored.Hayagriva YAML workaround: Use
publisherfor institution andarchivefor database/repository:BibLaTeX has no workaround. The field mapping in
interop.rsneeds to be fixed for thesis/report types.typeField Rendered LiterallyNo specific upstream issue tracks this bug.
Ancillary:
number→serial-numbermapping; PR #296 addedtype→genremapping as a secondary fix, but doesn't address literal rendering)genrefield support in YAML; doesn't address BibLaTeXtypekey translation)Relevant code:
src/interop.rs(BibLaTeX → Hayagriva translation). BibLaTeXtypekey values are passed through togenrewithout translation.The BibLaTeX
typefield maps to Hayagrivagenre. This creates a BibLaTeX interoperability bug: in BibLaTeX, thetypevalue acts as a dictionary key that maps to a localized string, e.g.:@thesis:phdthesis→ "Doctoral dissertation",mathesis→ "Master's thesis"@report:techreport→ "Technical report"But Hayagriva renders
genrevalues as literal (sentence-cased) strings, sotype = {phdthesis}becomes "[Phdthesis]" instead of "[Doctoral dissertation]".Note: When using the specific entry types (
@phdthesis,@mastersthesis,@techreport) without atypefield, Hayagriva correctly defaults the genre (NB capitalization inconsistency):@phdthesis→ "Doctoral dissertation"@mastersthesis→ "Master's thesis"@techreport→ "technical report"BibLaTeX input:
Actual output:
Expected output:
N.B. Since this is specific to the
typefield bug, the expected output inherits the "Thesis Institution Placement" bug. To be BibLaTeX interoperable and APA7 compliant, both thetypebug and the institution placement bug would need to be rectified.Workaround:
(i) Use the specific entry type (
@phdthesis,@mastersthesis,@techreport) without specifying atype, e.g.or
(ii) Use a literal string for the
typevalue, e.g.@collection/@incollectionCSL Mapping@collection/@incollectionmapped to Hayagriva and CSL types incorrectly typst/hayagriva#437Affects template entries:
Lobsang2023(edited volume, uses@bookworkaround),Issa1963(book chapter, uses@inbookworkaround)BibLaTeX
@collectionand@incollectionmap to incorrect CSL types:@collectionAnthologycollectionbook[Archival collection]annotation@incollectionAnthoschapterThe term
collectionhas different semantics in BibLaTeX and CSL:The type mappings are defined in
src/interop.rs(TryFrom<&tex::Entry>implementation for BibLaTeX → Hayagriva) andsrc/csl/taxonomy.rs(matches_entry_type()for Hayagriva → CSL). TheAnthostype has no match in anymatches_entry_type()branch, so it receives no CSL type designation.BibLaTeX input:
Actual output:
Expected output:
Workaround: Use
@bookwitheditorfield for@collection, and@inbookfor@incollection@incollectionTitle Duplication@collection/@incollectionmapped to Hayagriva and CSL types incorrectly typst/hayagriva#437Related to the CSL mapping issue above:
@incollectionentries have the parent book title duplicated.Cause: For
Anthos > Anthologyentries, both CSL variables resolve to the parent anthology title (seeStandardVariable::ContainerTitleandStandardVariable::VolumeTitleinsrc/csl/taxonomy.rs):ContainerTitleusesget_container()→ parent titleVolumeTitlehas explicit selector(Anthos > ("p":Anthology))→ parent titleAPA style uses both variables, causing the title to appear twice.
BibLaTeX input:
Actual output:
Expected output:
Workaround: Use
@inbookinstead. Trade-off: may lose "(Ed.)" designation in some casesTrailing Comma in Dates
urldate)@collection/@incollectionmapped to Hayagriva and CSL types incorrectly typst/hayagriva#437 (trailing comma with@collection; also covers CSL mapping issues)Erroneous trailing comma appears in date formatting "(2020, )" in multiple contexts:
1.
@collectionentries (year-only dates):2.
@onlineentries withurldate:Actual output:
Expected output:
Workaround: For
@online, omiturldatewhendateis present. For@collection, use@bookworkaroundNarrative Citations Use
&Instead ofand&instead ofandtypst/hayagriva#188Typst input:
Actual output:
Expected output (APA):
Workaround:
Prose Citations Don't Collapse
Typst input:
Actual output:
Expected output:
Workaround: None
Issue Number Formatting When Volume Missing
Note: Labeled
csl-upstream— this is a bug in the APA CSL style, not Hayagriva.BibLaTeX input:
Actual output:
Expected output (APA):
Issue number should be in parentheses when volume is missing.
Workaround: None
Publisher Field Parsing with "and"
BibLaTeX input:
Actual output:
Expected output:
Workaround: Protect with braces, e.g.
publisher = {Canada Mortgage {and} Housing Corporation}Title Case Not Applied Automatically
Typst renders titles exactly as stored, without style-specific case conversion.
BibLaTeX input:
Actual output:
Expected output (APA sentence case):
Workaround: Store titles in sentence case in
.bibfileUTF-8/Non-ASCII Sorting
Ancillary:
Non-ASCII characters sorted by Unicode code points, not linguistic rules.
Test entries:
Actual citation order:
Actual bibliography order: Łakomy appears at the very end (after all ASCII entries).
Expected: Łakomy should sort near "L" entries alphabetically.
Workaround: None