From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: New html exporter and filters Date: Thu, 07 Mar 2013 01:15:50 +0530 Message-ID: <87d2vccnwx.fsf@gmail.com> References: <20130304205818.GB89075@BigDog.local> <87y5e2tg6n.fsf@gmail.com> <20130305230504.GA6181@BigDog.local> <8762144v46.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDKHu-0006fa-76 for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 14:46:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDKHn-0003BA-Ig for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 14:46:06 -0500 Received: from mail-pb0-f47.google.com ([209.85.160.47]:60291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDKHn-0003AQ-6L for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 14:45:59 -0500 Received: by mail-pb0-f47.google.com with SMTP id rp2so6484097pbb.20 for ; Wed, 06 Mar 2013 11:45:58 -0800 (PST) In-Reply-To: <8762144v46.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 06 Mar 2013 17:07:29 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rick Frankel Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Here is a quick patch. Not meant to be applied but meant for testing purpose only. So there is a html backend which doesn't add divs and there is a HTML backend that adds divs. (The difference is between html and HTML, in capslock). The `org-export-dispatch' uses HTML backend, while you can continue to derive from html backend and add divs of your own. Try this patch and let me know what you find. Or you can circulate a make-shift patch which improves the attached version to suit your needs. I can formalize this patch once I get a go ahead from you. --=-=-= Content-Type: diff Content-Disposition: attachment Content-Transfer-Encoding: base64 Content-Description: ox-html.el.diff ZGlmZiAtLWdpdCBhL2xpc3Avb3gtaHRtbC5lbCBiL2xpc3Avb3gtaHRtbC5lbAppbmRleCA1ZTU1 MzkxLi5hODk4OWYyIDEwMDY0NAotLS0gYS9saXNwL294LWh0bWwuZWwKKysrIGIvbGlzcC9veC1o dG1sLmVsCkBAIC0xMDMsMTQgKzEwMyw2IEBACiAgIDpleHBvcnQtYmxvY2sgIkhUTUwiCiAgIDpm aWx0ZXJzLWFsaXN0ICgoOmZpbHRlci1vcHRpb25zIC4gb3JnLWh0bWwtaW5mb2pzLWluc3RhbGwt c2NyaXB0KQogCQkgICg6ZmlsdGVyLWZpbmFsLW91dHB1dCAuIG9yZy1odG1sLWZpbmFsLWZ1bmN0 aW9uKSkKLSAgOm1lbnUtZW50cnkKLSAgKD9oICJFeHBvcnQgdG8gSFRNTCIKLSAgICAgICgoP0gg IkFzIEhUTUwgYnVmZmVyIiBvcmctaHRtbC1leHBvcnQtYXMtaHRtbCkKLSAgICAgICAoP2ggIkFz IEhUTUwgZmlsZSIgb3JnLWh0bWwtZXhwb3J0LXRvLWh0bWwpCi0gICAgICAgKD9vICJBcyBIVE1M IGZpbGUgYW5kIG9wZW4iCi0JICAgKGxhbWJkYSAoYSBzIHYgYikKLQkgICAgIChpZiBhIChvcmct aHRtbC1leHBvcnQtdG8taHRtbCB0IHMgdiBiKQotCSAgICAgICAob3JnLW9wZW4tZmlsZSAob3Jn LWh0bWwtZXhwb3J0LXRvLWh0bWwgbmlsIHMgdiBiKSkpKSkpKQogICA6b3B0aW9ucy1hbGlzdAog ICAoKDpodG1sLWV4dGVuc2lvbiBuaWwgbmlsIG9yZy1odG1sLWV4dGVuc2lvbikKICAgICg6aHRt bC1saW5rLWhvbWUgIkhUTUxfTElOS19IT01FIiBuaWwgb3JnLWh0bWwtbGluay1ob21lKQpAQCAt MTI5LDYgKz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IAogUmV0dXJuIG91dHB1dCBmaWxlIG5hbWUuIgotICAob3JnLXB1Ymxpc2gtb3Jn LXRvICdodG1sIGZpbGVuYW1lICIuaHRtbCIgcGxpc3QgcHViLWRpcikpCisgIChvcmctcHVibGlz aC1vcmctdG8gJ0hUTUwgZmlsZW5hbWUgIi5odG1sIiBwbGlzdCBwdWItZGlyKSkKIAogCiAMCg== --=-=-= Content-Type: text/plain Jambunathan K writes: > The
aren't really content elements but merely structuring > or styling elements. > > I think there should be a clear separation between contents and how it > is wrapped. The base HTML exporter should just generate content with no > divs at all. There could be a fancy HTML exporter which does generate > divs. > > I can think of "splitting" the current HTML exporter in to a base-html > backend and an fancy-html backend. Rick can derive from base-html > backend instead of fancy-html. > > The current HTML exporter is one in the circle. > > --------- > ---/ \--- > -/ \- > / \ > / Org Factory HTML \ Deck HTML > / (adds factory divs) \ | > / | \ | > | | +-----------+-------------+ > | | | | > | V V | > \ Base HTML / > \ (no divs) / > \ / > \ / > -\ /- > ---\ /--- > --------- > > > The problem here is much similar to what Torrey was saying in other > thread wrt to TOC "pseudo"-elements [1]. The Id property is not the TOC > itself but enhances (or particularizes) that specific transoding. > > Nicolas, > Let me work with Rick Frankel on this. I will take over this thread. > > Jambunathan K. > > > Rick Frankel writes: > >> On Tue, Mar 05, 2013 at 09:16:16AM +0100, Nicolas Goaziou wrote: >>> Rick Frankel writes: >> >>> > 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 "
>> > generation. This would add flexibility for inherited backends as well >>> > as allow for more "html5ish" structures (e.g.,
and
>>> > instead of generic ). >>> >>> 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? >> >> Well, `org-html-headline' does a lot and I'm trying to rewrite as >> little as possible. Actually, i already wrap `org-html-headline', so i >> could fix the :CUSTOM_ID on the way in. I think i was looking for a >> solution to both the wrapper element and id in the same place (a >> filter). >> >>> 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? >> >> What I think is missing is a way to customize the element used for the >> wrapper, and possiblly the id/class prefixes. The simple solution >> would be to add an `org-headline-wrapper-element' customization >> (defaulting to "div"), or if allowing change to the id and class: >> >> '("div" "outline-container-%s" "outline-%d"). >> >> If you were to over-engineer it,something along the lines of the way >> the latex exporter specifies the headline hierarchies for one of the >> document classes would work :} >> >> Likewise, it would make sense for the `org-html-divs' to become a list >> of '(element . class) instead of a list of just classes. e.e.g >> >> (defcustom org-html-divs '(("header" . "preamble") >> ("section" . "content") >> ("footer" . "postamble")) >> >> Rick >> >> -- --=-=-=--