What is a "deserialisation error" and how do I resolve it?

I have got the bibliograhy working in my project with

#bibliography("bibliography.bib", style: "iso-690-author-date" )

However, I would like to use an alternative style which is not one of the styles incorporated in typst, e.g. “New Oxford Style Manual Author Date”. I have accessed the CSL style from the Zotero repository, and have uploaded it into an “Assets” folder within the project root.

If I modify the code like so:

#bibliography("bibliography.bib", style: "./Assets/new-oxford-style-manual-author-date.csl" )

the project fails to complie with the following error:

If I remove the .csl , it returns “Unknown style”.

Could someone please explain what a “deserialisation error” is and how to correct it… or to put it more generally how to get Typst to recognise a CSL style not incorporated in Typst.

:slight_smile:
Mark

I can reproduce your description with https://www.zotero.org/styles/new-oxford-style-manual-author-date.

This style is a dependent CSL style. Dependent CSL styles are aliases for independent styles, and Typst only supports independent styles.

This style contains the following line, so it’s an alias for https://www.zotero.org/styles/new-harts-rules-author-date. You can use that style instead. The output should be identical.

    <link href="http://www.zotero.org/styles/new-harts-rules-author-date" rel="independent-parent"/>

However, I agree that the error message can be improved. I’ve just opened Improve the error message for dependent CSL styles (v0.15 regression) · Issue #8695 · typst/typst · GitHub.

1 Like

Thanks
:slight_smile:
Mark