hayagriva icon indicating copy to clipboard operation
hayagriva copied to clipboard

Issue with CSL Rendering (OSCOLA no ibid Style)

Open daniel-eder opened this issue 1 year ago • 2 comments

Description

OSCOLA style should have a comma between the edition and the publisher.

A valid rendering from https://editor.citationstyles.org/visualEditor/ (using this csl json to get the citation example): image

Compared to the rendering in typst.app: image

Notice the missing comma.

The CSL style is https://github.com/citation-style-language/styles/blob/master/oscola-no-ibid.csl

Reproduction URL

https://typst.app/project/rY0Nmyq6PphmJZy877_lLT

Operating system

Web app, Windows

Typst version

  • [X] I am using the latest version of Typst

daniel-eder avatar Dec 15 '23 09:12 daniel-eder

Might be related to https://github.com/typst/hayagriva/issues/107

daniel-eder avatar Dec 15 '23 11:12 daniel-eder

I found the error: The rendering of group containing choose is wrong:

In hayagriva, a Choose element has a delimiter. This is wrong; according to the specification, this is not a valid attribute on choose.

The rendering done in https://github.com/DerDrodt/hayagriva/blob/219a4cf76ee54247ec2deca4a80661da4f15f003/src/csl/rendering/mod.rs#L644-L656 is therefore wrong.

Instead of the rendering of Choose rendering its children, it should "return" a list of children, which are then properly formatted by Group.

Fixing this will take time, and I am not too familiar with the rendering. Someone else should probably fix this.

DerDrodt avatar Dec 15 '23 14:12 DerDrodt