Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sorting citation by citation number #168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lluchs
Copy link

@lluchs lluchs commented May 16, 2024

Citations with citation numbers currently aren't sorted properly, for example output from the test in the second commit:

Expected:
[1]–[4]
[1]–[4]

Got:
[1]–[4]
[2], [1], [4], [3]

This PR defers sorting the citations until finish is called and the citation numbers are determined.

We need to defer sorting the citations until the citation numbers are
assigned.

Fixes typst#115
Citation number sorting is coverd in the test suite only by CITATIONS
tests which we do not support. This commit adds support for local test
cases and adapts one such test to use CITATION-ITEMS.
@AnsgarLichter
Copy link

I just wondered why my citations are not sorted properly and I have these weird combinations sometimes. Thanks for your PR, now I know that I should have configured my CSL in the right way. Hope this gets merged soon 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants