wallyqs / org-ruby

An Org mode parser written in Ruby.
216 stars 50 forks source link

Support footnotes #2

Open nomicode opened 10 years ago

nomicode commented 10 years ago

I would love to be able to use footnotes with Org on Github. How feasible is this?

wallyqs commented 10 years ago

There is already some footnotes support in the parser, can you give some feedback on which parts of footnotes support needs improvement? I will also revisit the feature as well with latest Org mode changes.. https://github.com/wallyqs/org-ruby/blob/master/spec/html_examples/footnotes.org

nomicode commented 10 years ago

Oh wow, this is awesome. I think I was missing the OPTIONS block. (I am still very new to Org.) Is there any way to remove the ":" from the automatically generated "Footnotes:" header?

wallyqs commented 10 years ago

Not at this moment, this is also based from the original Org mode implementation, though there the test used can be customized to accomodate users of other languages. https://github.com/wallyqs/org-ruby/blob/master/lib/org-ruby/html_output_buffer.rb#L201 https://github.com/jwiegley/org-mode/blob/master/lisp/ox-html.el#L588

I suppose we could add a special option to be able to change it #+footnotes_title, what do you think?

nomicode commented 10 years ago

Ah, okay. Well, as much as I would like to customise it, if you introduce that change, your implementation diverges from the main one. That seems unwise. A document that displays in one way on Github, say, would display in another way in a different context.

wallyqs commented 10 years ago

Yes, so a bit tricky to be able to modify that default in the context of sites like Github. A setting like this would make more sense to be considered as part of the export options: https://github.com/wallyqs/org-ruby/blob/master/lib/org-ruby/parser.rb#L303 Then when using it with Jekyll for example, it could be possible to add the export option: to_html(:footnotes_title => "Footnotes").

maxnikulin commented 1 month ago

There is already some footnotes support in the parser, can you give some feedback on which parts of footnotes support needs improvement?