Bump hayagriva to 0.9.1 and fix citation supplement comparison#6171
Bump hayagriva to 0.9.1 and fix citation supplement comparison#6171laurmaedje merged 27 commits intotypst:mainfrom
Conversation
c5153d1 to
a56c22e
Compare
0f001df to
758168f
Compare
3744ecc to
d7b420c
Compare
eba872c to
06de54c
Compare
|
Thanks! In order to merge this, we'll need some unit tests. Do you have some sample styles we can use to test? You can make a test and paste a simple style inline (with |
|
I've added a test for supplement equality (where supplement is text-only). Do we need more? We could also add tests with more complex supplements, but I suppose that content equality is not specified by the language and we should not assume anything about it. Maybe we should even compare I've started with https://github.com/citation-style-language/styles/blob/master/polish-legal.csl <?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" default-locale="pl-PL">
<info>
<title>Example citation style</title>
<id>http://www.example.com/</id>
</info>
<macro name="locator">
<group delimiter=" ">
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</macro>
<citation>
<sort>
<key variable="title"/>
<key variable="issued"/>
</sort>
<layout>
<choose>
<if position="first">
<group delimiter=", ">
<text variable="title"/>
<text macro="locator"/>
</group>
</if>
<else-if position="ibid-with-locator">
<group delimiter=", ">
<text term="ibid"/>
<text macro="locator"/>
</group>
</else-if>
<else-if position="ibid">
<text term="ibid"/>
</else-if>
<else-if position="subsequent">
<group delimiter=", ">
<text variable="title"/>
<text macro="locator"/>
</group>
</else-if>
</choose>
</layout>
</citation>
<bibliography>
<sort>
<key variable="title"/>
</sort>
<layout>
<text variable="title"/>
</layout>
</bibliography>
</style>Any style that handles |
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
PgBiel
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
|
After updating to Hayagriva 0.9.1 one test fails.
|
|
Probably a consequence of typst/hayagriva#400, seems expected in principle. I'd update the test. |
|
Thanks! Tip: Instead of copying reference images from the output directory manually, you can use |


Fixes typst/hayagriva#280
See typst/hayagriva#299 (comment) for more context.
Current status
This PR is ready to review. It only waits (therefore draft status of PR) for merging Hayagriva PR — and then — for next release of Hayagriva, so that we can remove [patch.crates-io] section that overrides Hayagriva version.
We can discuss whether using
plain_text()for supplement discrimination is the right choice. I think it is much better than current version and the one that introduces the least complexity.