[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] New html exporter and filters
From: |
Nicolas Goaziou |
Subject: |
Re: [O] New html exporter and filters |
Date: |
Tue, 05 Mar 2013 09:16:16 +0100 |
Hello,
Rick Frankel <address@hidden> writes:
> I seem to have reached the limit of my emacs-fu. I am looking at
> adding XOXO output to the S5 exporter (S5 has built-in support for
> XOXO structured documents) and was trying to use an element (headline)
> filter to modify the document structure. I am also trying to change
> the div id to make them more friendly to the deck.js goto function
> (which accumulates and displays the ids as a menu).
I'm not sure about what you mean here.
> When i look at the `contents' passed to the filter in edebug, i can see
> the element properties (level, raw-title, etc) in the output but I
> cannot figure out how to access them.
You cannot access them. You have access to the full parse tree with
(plist-get info :parse-tree), but not to the parsed current headline.
Filters only give you access to strings produced by the back-end.
Anyway, you still can modify headline div attributes from there.
> On the other hand, it would be easier if ox-html were modified so that
> org-html-headline uses a variable (or callback) for the format of the
> wrapper (currently "<div id=\"%s...") and a callback for the div id
> generation. This would add flexibility for inherited backends as well
> as allow for more "html5ish" structures (e.g., <section> and <article>
> instead of generic <divs>).
Wouldn't it be simpler to just fork `org-html-headline' in your back-end
in order to replace the divs with something you need?
On the other hand, there are a couple of variables providing a way to
modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may
be even better to collect them in a single defcustom.
What do you think?
Regards,
--
Nicolas Goaziou