Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Support footnotes ? #7

Open
reyman opened this issue Oct 2, 2020 · 3 comments
Open

Support footnotes ? #7

reyman opened this issue Oct 2, 2020 · 3 comments

Comments

@reyman
Copy link

reyman commented Oct 2, 2020

Hi @balddotcat ,

I'm using your light html export for a project, so first thank you for this work !

As i see, i don't found footnote support (:with-footnotes), very common in academic website.
Same with option org-html-footnotes-section

I also try this :

(org-export-define-derived-backend 'ox-slimhtml-publish-to-html 'slimhtml
  :translate-alist '((bold . ox-slimhtml-bold)
                     (footnote-definition . org-html-footnote-definition)
                     (footnote-reference . org-html-footnote-reference)
                     (special-block . org-html-special-block)))

Could you please add some paragraph of documentation to explain how users could expand ox-slimhtml to reinject ox-html missing part, like footnotes ?

Thanks,

@coldacid
Copy link

coldacid commented Nov 4, 2020

Similar for me, but with images.

@reyman
Copy link
Author

reyman commented Nov 6, 2020

I take some times to extend slim with footnotes, i try to share the content here during the next week, using pull request or directly here.

@balddotcat
Copy link
Owner

Thanks for your input, I am truly glad to see this bit of code getting good use!
My deepest apologies for being AWOL; I've no excuses, just life, work and all.

regarding extending the exporter;

@reyman, I think your pretty much on target, except you're probably confusing the exporter by utilizing the publishing function's name (ox-slimhtml-publish-to-html) as the name of your derived exporter. The first argument is just a string you define yourself.

Otherwise, expanding a derived exporter's functionality is as you've defined with 'special-block'; if you look at slimhtml's backend definition alist, (starting at line 472), you'll notice that for things like the 'item' element, I've just linked to the
original exporter, ie org-html-item.

Also, note that there's really no difference between an org-export-define-derived-backend, and org-export-define-backend definition - the former just gives you the opportunity to override a base implementation with specialized functionality.

regarding images and footnote references;

Thank you very much for looking into the footnotes - I'm certain many people will benefit from it!

Both of these items do seem to be a little hairier to implement cleanly, but all of the functionality is available in 'ox-html'; the trick is finding only what's most relevant to this minimalistic exporter. I have not utilized these, but they both seem to start from within 'org-html-paragraph'.

Again - many thanks - please let me know if this makes thing clearer, or if there's anything else I can help with.

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

No branches or pull requests

3 participants