Skip to content

Conversation

Drodt
Copy link
Contributor

@Drodt Drodt commented Jul 2, 2025

Fixes typst/hayagriva#340.

One test fails. Someone needs to explain to me why 21:4-21:6 should be parsed as the range 4..6. That loses information and makes no sense to me.

@PgBiel
Copy link
Contributor

PgBiel commented Jul 4, 2025

One test fails. Someone needs to explain to me why 21:4-21:6 should be parsed as the range 4..6. That loses information and makes no sense to me.

I think it's treated as just a prefix. What is the usual meaning of this syntax?
In principle, page ranges that aren't parsed need to be handled by Hayagriva, but we need to make sure they can be used meaningfully. However, of course, one could also argue that they should be displayed verbatim.

@Drodt
Copy link
Contributor Author

Drodt commented Jul 4, 2025

I think it's treated as just a prefix. What is the usual meaning of this syntax? In principle, page ranges that aren't parsed need to be handled by Hayagriva, but we need to make sure they can be used meaningfully. However, of course, one could also argue that they should be displayed verbatim.

It is for journal articles where the first number stands for the article number, the second for the page number; each article starts with its own page 1. However, this was not properly handled. There was no check that the prefix remains the same and the article number was removed.

Then I think, this PR handles this correctly now. More complex parsing should be left up to users.

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.

Pages field with alphanumeric values like "1A1" is truncated in bibliography output
2 participants