Skip to content
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

Support footnotes #2

Open
nomicode opened this issue Feb 16, 2014 · 6 comments
Open

Support footnotes #2

nomicode opened this issue Feb 16, 2014 · 6 comments

Comments

@nomicode
Copy link

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

@wallyqs
Copy link
Owner

wallyqs commented Feb 17, 2014

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
Copy link
Author

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
Copy link
Owner

wallyqs commented Feb 20, 2014

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?

@wallyqs wallyqs closed this as completed Feb 20, 2014
@wallyqs wallyqs reopened this Feb 20, 2014
@nomicode
Copy link
Author

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
Copy link
Owner

wallyqs commented Feb 20, 2014

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
Copy link

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

  • Text of inline footnotes is duplicated outside of definitions
    ** Heading
    Paragraph[fn:1: An inline footnote]
    
    https://gist.github.com/maxnikulin/9aee674785dc909649be232ca834cd4e#file-issue-footnotes-org
  • Definitions of inline footnotes are added to each following section.
    ** Heading
    Paragraph.[fn:1: An inline footnote]
    ** Another heading
    Another paragraph.
    
  • The existing "Footnotes" heading is not used as the place where all definitions should appear.
  • Label names are not replaced by numbers.
    Text[fn:name]
    
  • Multiple references to the same footnote[fn:name] have the same <a name="..."> attribute.
    ** Heading
    Paragraph.[fn:1]
    
    Another paragraph.[fn:1]
    
    ** Footnotes
    [fn:1] An inline footnote
    
  • Anonymous footnotes are not supported
    Text.[fn:: Anonymous footnote]
    
  • Footnotes references and definitions are not skipped when export of footnotes is disabled
    #+options: f:nil
    
    Instead they are exported literally.
  • Footnotes are not enabled by default and unlike in Emacs Org mode requires explicit
    #+options: f:t
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants