emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: rey-coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr>
To: emacs-orgmode@gnu.org
Subject: How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend.
Date: Fri, 02 Oct 2020 22:26:43 +0200	[thread overview]
Message-ID: <2d0b1df3720133e089e4e45af09f5faf1c21f4ac.camel@univ-rouen.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]


I'm trying to develop my own `publish.el` for some research project linked to reproductibility. 
I chose ox-slimhtml [0] as derived backend to limit and simplify the html/css outputs generated by vanilla html

Actually footnotes are not defined in ox-slimhtml, so as i read in the org documentation [1] ), 
i try to add this capacity by simply calling vanilla ox-html function org-html-footnote-reference into translate-alist :

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

Using the vanilla ox-html export function, everything is awesome and footnote appear in my html, normal.
:publishing-function org-blog-publish-to-html 

But if i switch to ":publishing-function ox-slimhtml-publish-to-html" the function 
org-html-footnote-reference is never called.

There is something i don't understand in the processing of "translate-alist", so perhaps if the derived backend doesn't
implement a footnote-reference function, i cannot extend it ?

If you have some higlight on this, or solution on this problem, i'm interested.

[0] https://github.com/balddotcat/ox-slimhtml
[1] https://orgmode.org/manual/Advanced-Export-Configuration.html


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-10-02 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 20:26 rey-coyrehourcq [this message]
2021-04-27 20:42 ` Bastien
2021-04-27 21:25 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d0b1df3720133e089e4e45af09f5faf1c21f4ac.camel@univ-rouen.fr \
    --to=sebastien.rey-coyrehourcq@univ-rouen.fr \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: How to reinject custom function into derived backend which doesn'\''t implement it, ex : footnote in ox-slimhtml backend.' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).