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

Add 'multibib-renumber.lua' filter #18

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

Conversation

wlupton
Copy link
Member

@wlupton wlupton commented Dec 15, 2024

The initial version is just code that has been removed from PR #8.

The initial version is just code that has been removed from
pandoc-ext#8.
@wlupton
Copy link
Member Author

wlupton commented Dec 16, 2024

I believe that I've fixed at least some of the problems reported by @jerome-white, in that multiple citations per cite should now work (not sure whether that will fix the range problem... probably not), and links should work.

This is quite messy, because the only way that I see to fix the citation numbers is to do string processing on the cite text (this text covers all the cite's citations). I have currently assumed that the citation numbers in the bibliography are in square brackets.

This is largely untested but at least it works for the test input (which I have modified). Obviously the tests need expanding to test across a variety of conditions.

Feedback welcome!

@wlupton
Copy link
Member Author

wlupton commented Dec 16, 2024

Re this:

The citation may list "4-7", for example, when in fact it should be "31-34".

I don't think this will have been fixed, because this is presumably part of the cite text (in this case the cite will have four citations and they'll be consecutively numbered and therefore run together into a range). So the parse would have to be more elaborate. But is this really the right thing to do? I have my doubts.

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.

1 participant