From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: New html exporter and filters Date: Wed, 06 Mar 2013 17:07:29 +0530 Message-ID: <8762144v46.fsf@gmail.com> References: <20130304205818.GB89075@BigDog.local> <87y5e2tg6n.fsf@gmail.com> <20130305230504.GA6181@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDCfE-0003h3-Qm for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 06:37:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDCfD-0007cr-Ba for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 06:37:40 -0500 Received: from mail-pb0-f42.google.com ([209.85.160.42]:36602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDCfD-0007ck-5A for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 06:37:39 -0500 Received: by mail-pb0-f42.google.com with SMTP id xb4so5883225pbc.29 for ; Wed, 06 Mar 2013 03:37:38 -0800 (PST) In-Reply-To: <20130305230504.GA6181@BigDog.local> (Rick Frankel's message of "Tue, 5 Mar 2013 18:05:05 -0500") 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org 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 > > --