Open dananjohnson opened 6 years ago
Hi! Sorry for the late reply, for some reason I never get the notifications from this repo or I somehow lose them.
It's something that happened for us too at edsl, we solved it by just prefixing footnotes with the article name, so every footnote has a unique name for pandoc.
Dealing with this automatically would require to pre-process the sources to do something like we do at edsl, probably something like cycling through articles and applying a gsub to every footnote:\[\^[^\]]+\]
agh, ^enter sent the comment
something like this before concatenating posts:
posts.each do |post|
post.content.gsub! /\[\^([^\]]+)\]/, "[^#{post.slug}-$1]"
end
(i never remember the syntax for refering to a regex group in ruby)
@dananjohnson would you be able to send a patch?
btw i just pushed version 0.4.0 which only builds files when the sources change, would you give it a try? i've moved the repository to 0xacab, i won't be pushing changes here anymore
@fauno I missed the notifications about this! But that's great news on both fronts. Having it only build files when sources change will be a big help for us with the number of posts we have!
I can definitely create a patch for the duplicate note reference issue. I don't have much time for our project these days but as soon as I do, I will make that fix and send an MR to the new repo location.
Thanks for all your great work on this!
Generating outputs from
'categories'
or'full'
can lead to issues with duplicate note reference numbers when posts use footnotes.jekyll build
throws warnings like this:[pandoc warning] Duplicate note reference '1' "source" (line 1777, column 1)
A PDF outputted from this will show the wrong footnotes because it doesn't know which one to reference.
Is this an issue that the plugin could address? I'm thinking a unique ID would need to be created for each note reference. Or maybe Pandoc has a way to allow note numbers to reset at each post?