Open cittadhammo opened 1 month ago
I think it would be easy from the markdown side, but what should they be converted to on the mdbook side? I don't think mdbook supports footnotes but perhaps I am mistaken.
Yes sorry, there is an explanation here for example https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/
or here https://rust-lang.github.io/mdBook/format/markdown.html#:~:text=Footnotes,a%20caret%20at%20the%20front. for mdbook proper
My workflow is to write a book. So far, I have used a mdbook to latex converter, but when I saw your project, I thought I could give it a try. It works very well, the only thing missing is that the footnote should be nicely integrated on the footer of the page where they appear, Latex is very good at this.
What do you think?
Yeah, it should be a straightforward addition. I won't be able to get to it for a couple of weeks due to travel but I can do it when I get back if you don't take a crack at it before then!
@LegNeato Good, thank you, I have never coded in rust, but I will have a look at your code and why not do a PR if I can ;-)
Working on this, should have it done in the next week
So the annoying part of doing this is we'll have to buffer the entire document to support these, as the footnote links can be anywhere in the document.
Yes, this is why I added this other function to store the references of the footnotes: https://github.com/LegNeato/mdbook-typst/pull/16/commits/d1aa4ba4eefac7557ad5e48f1d1ed2b04827dcea
it is still very fast, even for my 300+ pages project.
Would it be possible to add footnote support: