typst / hayagriva

Rusty bibliography management.
Apache License 2.0
320 stars 48 forks source link

CSL styles not including annotations #91

Closed K3das closed 1 day ago

K3das commented 10 months ago

Trying the following entry with chicago-annotated-bibliography.csl results in no annotation being rendered, whereas the CSL editor renders this annotation.

@article{kameny_ladder,
    title = {Does Research Into Homosexuality Matter?},
    volume = {9},
    url = {https://digitalassets.lib.berkeley.edu/sfbagals/The_Ladder/1965_Ladder_Vol09_No08_May.pdf},
    pages = {14--21},
    number = {8},
    journaltitle = {The Ladder},
    author = {Kameny, Franklin},
    date = {1965-05},
    note = {Annotation test string},
}

Here's an example project for reference

The Citation Styles Visual Editor renders an annotation like so: image

Yet Typst has no annotation: image

DerDrodt commented 10 months ago

The problem is that the translation from BibLaTeX to hayagriva throws out the note. When converting a biblatex::Entry to a hayagriva::Entry, it does the following:

if let Some(note) = map_res(entry.how_published())?.map(Into::into) {
    if let Some(parent) = book(&mut item, parent) {
        parent.set_note(note);
    } else {
        item.set_note(note);
    }
}

At no other point is note set.

The question therefore is, how to handle "how published": Give it its own hayagriva field or append it to the note?

EpicEricEE commented 1 day ago

I believe this should be fixed with #220. It now renders as

image