From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Rendering quoted HTML outside the last headline's HTML. Date: Sun, 08 Nov 2015 23:51:00 +0100 Message-ID: <87611cw1ez.fsf@gmx.us> References: <20151108193229.2829ac7e@nadia> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvYnq-0006pC-GQ for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 17:51:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvYnm-0003j6-Gj for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 17:51:14 -0500 Received: from plane.gmane.org ([80.91.229.3]:53066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvYnm-0003ip-AQ for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 17:51:10 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZvYnk-000133-KU for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 23:51:08 +0100 Received: from 46.166.188.208 ([46.166.188.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2015 23:51:08 +0100 Received: from rasmus by 46.166.188.208 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2015 23:51:08 +0100 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: emacs-orgmode@gnu.org Hi, Emanuele Santoro writes: > Hi there! > > I render the org-mode project of my website using HTML export > functions. > > I created a three-columns layout by using the Bootstrap > (http://getbootstrap.com/) and by wrapping the first three columns > within a div element of class "row". > > I do this by prepending and appending some static html via the #+HTML > directive, as in: > > #+HTML:
> > and > > #+HTML:
> > Also, I set the HTML_CONTAINER variable to use proper css classes: > > #+HTML_CONTAINER: div class="col-md-4" Does this do what you want? * h :PROPERTIES: :HTML_CONTAINER_CLASS: col-md-4 :END: p > Now the problems arise: > > 1) I have noticed that when closing the headline tag, org will generate > a syntactically wrong tag. Most browser will > ignore such mistakes but it's still annoying. > > 2) Everything works okay if there are three or less columns. When > adding another column, I close the "row" container and open another > one, by adding > > #+HTML: > #+HTML:
> > But this code is rendered within the HTML code of the previous > headline. > In general, it is not clear "where" a piece of HTML will be rendered. > Is there a way to specify that? Is there a way to say, like: "this piece > of HTML is not part of the current headline and should be rendered after > the last headline has been rendered" ? I guess you could use a filter. Perhaps the cleanest way would be to do something like the following and use a filter to clean up row. Perhaps you could use a function similar to org-export-ignore-headlines in ox-extra in contrib. * row :PROPERTIES: :HTML_CONTAINER_CLASS: row :END: ** h :PROPERTIES: :HTML_CONTAINER_CLASS: col-md-4 :END: p ** h :PROPERTIES: :HTML_CONTAINER_CLASS: col-md-4 :END: p ** h :PROPERTIES: :HTML_CONTAINER_CLASS: col-md-4 :END: p Hope it helps, Rasmus -- May contains speling mistake