-
Notifications
You must be signed in to change notification settings - Fork 5
Add 'multibib-renumber.lua' filter #18
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
base: main
Are you sure you want to change the base?
Conversation
The initial version is just code that has been removed from pandoc-ext#8.
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! |
Re this:
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. |
@tarleb and everyone, any thoughts on this? Thanks. |
Apologies, I had lost track of this. I'll take a look first thing tomorrow morning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. I haven't fully made up my mind yet about whether this should be a separate extension, or whether it's fine to include here.
local script_dir = require('pandoc.path').directory(PANDOC_SCRIPT_FILE) | ||
package.path = string.format('%s/?.lua;%s/../?.lua;%s/../scripts/?.lua;%s', | ||
script_dir, script_dir, script_dir, package.path) | ||
local logging = require 'logging' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logging library should probably be a "soft" dependency:
local logging = require 'logging' or
{ __index = function () return (function () end) end }
@Nie72, @Bel | ||
[see @Nie72, Section 1], [@Bel] | ||
|
||
[@Knu86; @Bae] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep at least one citation as "nocite-only".
Let me know. I could go either way on this. Do any other extensions provide multiple filters? (I guess the philosophical question is whether an extension name relates to a topic or specifically to a filter.) |
Conceptually it seems fine to have multiple filters. The reason that I'm a bit hesitant is that the code is very specific (for certain CSL styles) and I'm slightly worried that it would become a maintenance burden. OTOH, this kind of functionality is certainly needed, and there aren't any alternatives that I know of, so it would be great to offer this in a prominent place. |
If you make a decision I will go with it. Clearly it's easier to leave it as is! I'll address the other points anyway. |
The initial version is just code that has been removed from PR #8.