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

Alternate {:footnotes} behavior #208

Closed
Tuckie opened this Issue Jan 15, 2015 · 9 comments

Comments

4 participants
@Tuckie

Tuckie commented Jan 15, 2015

I'm currently working with some long form markdown, and I was wondering if it would be possible to have an option for alternate {:footnotes} behavior (originally introduced here)?

What I would like is {:footnotes} (on a list, of course) to display the footnotes thus far, and reset all footnote variables. This would allow one to place footnotes for a section / chapter of the text, rather than having them so far removed from the original material.

@gettalong gettalong self-assigned this Jan 21, 2015

@gettalong gettalong added the question label Jan 21, 2015

@gettalong

This comment has been minimized.

Show comment
Hide comment
@gettalong

gettalong Jan 21, 2015

Owner

I don't think that this is easily possible with the current code - I will have a look at it.

What you could do is split the document into several standalone documents, render them and then concatenate the result together.

Owner

gettalong commented Jan 21, 2015

I don't think that this is easily possible with the current code - I will have a look at it.

What you could do is split the document into several standalone documents, render them and then concatenate the result together.

@Tuckie

This comment has been minimized.

Show comment
Hide comment
@Tuckie

Tuckie Jan 21, 2015

Thank you for taking a look!

I'm currently using this with middleman, so I hope we can come up with a way that doesn't require custom render helpers for every page.

Tuckie commented Jan 21, 2015

Thank you for taking a look!

I'm currently using this with middleman, so I hope we can come up with a way that doesn't require custom render helpers for every page.

@Tuckie

This comment has been minimized.

Show comment
Hide comment
@Tuckie

Tuckie Jan 27, 2015

I was thinking about how to tackle this after looking through the code...

I believe that the main issue would be determining how to group footnotes before we know how the {:footnote} sections break the footnotes up. I would suggest pushing the @footnote* variables into a corresponding array every time we encounter a new {:footnote}. Then we just iterate through the array(s) to insert each footnote section during convert_root.

The other issue that jumps out would searching through the other sections to resolve name (ID) conflicts (but I imagine we would do this the same way we increment headers)

Tuckie commented Jan 27, 2015

I was thinking about how to tackle this after looking through the code...

I believe that the main issue would be determining how to group footnotes before we know how the {:footnote} sections break the footnotes up. I would suggest pushing the @footnote* variables into a corresponding array every time we encounter a new {:footnote}. Then we just iterate through the array(s) to insert each footnote section during convert_root.

The other issue that jumps out would searching through the other sections to resolve name (ID) conflicts (but I imagine we would do this the same way we increment headers)

@gettalong

This comment has been minimized.

Show comment
Hide comment
@gettalong

gettalong Feb 28, 2015

Owner

I'm open for a pull request!

Yes, every time a list with {:footnotes} is encountered, its location needs to be stored and all footnotes encountered so far associated with it. Footnote numbering would be continuous, though.

Also, entries after the last list with {:footnotes} must not be forgotten and should probably be added to the last footnotes location.

Owner

gettalong commented Feb 28, 2015

I'm open for a pull request!

Yes, every time a list with {:footnotes} is encountered, its location needs to be stored and all footnotes encountered so far associated with it. Footnote numbering would be continuous, though.

Also, entries after the last list with {:footnotes} must not be forgotten and should probably be added to the last footnotes location.

@Tuckie

This comment has been minimized.

Show comment
Hide comment
@Tuckie

Tuckie Mar 10, 2015

Valid point on the ending footnotes. I'll probably tackle this in the next month.

Tuckie commented Mar 10, 2015

Valid point on the ending footnotes. I'll probably tackle this in the next month.

@larissa

This comment has been minimized.

Show comment
Hide comment
@larissa

larissa Jul 16, 2015

@Tuckie are you still working on this? I'd like to give it a go.

larissa commented Jul 16, 2015

@Tuckie are you still working on this? I'd like to give it a go.

@Tuckie

This comment has been minimized.

Show comment
Hide comment
@Tuckie

Tuckie Jul 16, 2015

@larissa I have not yet had a chance to start. Thank you for checking!

Edit: I would be happy to test!

Tuckie commented Jul 16, 2015

@larissa I have not yet had a chance to start. Thank you for checking!

Edit: I would be happy to test!

@arthurattwell

This comment has been minimized.

Show comment
Hide comment
@arthurattwell

arthurattwell Jul 1, 2016

+1 This would be a very useful feature.

I use Jekyll to generate book content for print/web/epub, and with all footnotes gathered in one place, I can't use markdown footnotes for footnotes that should appear on the same page as the footnote reference.

This enhancement would let me use {:footnotes} to place and float footnotes on a particular page.

A simpler alternative for my use case might be a kramdown option that creates a footnote list element wherever footnote text appears in the markdown, rather than collecting them at the end of the document.

arthurattwell commented Jul 1, 2016

+1 This would be a very useful feature.

I use Jekyll to generate book content for print/web/epub, and with all footnotes gathered in one place, I can't use markdown footnotes for footnotes that should appear on the same page as the footnote reference.

This enhancement would let me use {:footnotes} to place and float footnotes on a particular page.

A simpler alternative for my use case might be a kramdown option that creates a footnote list element wherever footnote text appears in the markdown, rather than collecting them at the end of the document.

@gettalong

This comment has been minimized.

Show comment
Hide comment
@gettalong

gettalong Nov 5, 2016

Owner

Closed because feature request issues are now tracked through a dedicated project - see https://github.com/gettalong/kramdown/projects/1

Owner

gettalong commented Nov 5, 2016

Closed because feature request issues are now tracked through a dedicated project - see https://github.com/gettalong/kramdown/projects/1

@gettalong gettalong closed this Nov 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment