From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: How do I set a class for a paragraph in HTML export? Date: Tue, 02 Dec 2014 02:10:39 +0100 Message-ID: <871toihn5c.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvbzZ-0008VP-Jf for emacs-orgmode@gnu.org; Mon, 01 Dec 2014 20:11:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvbzT-0000ZM-PC for emacs-orgmode@gnu.org; Mon, 01 Dec 2014 20:11:01 -0500 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:36429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvbzT-0000Z8-IN for emacs-orgmode@gnu.org; Mon, 01 Dec 2014 20:10:55 -0500 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id C545042068 for ; Tue, 2 Dec 2014 02:10:53 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JYJ4yWC3HQrb for ; Tue, 2 Dec 2014 02:10:53 +0100 (CET) Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 772BD42061 for ; Tue, 2 Dec 2014 02:10:53 +0100 (CET) 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: Org-Mode mailing list Hi all, I'd like to get something like this:

Hello world

What should I write in the Org file? Looking at org-html-paragraph, I'm afraid that it's currently impossible. If this is indeed the case, what do I do to change it? A natural idea is that I could define an org-my-html-paragraph and plug it into a custom exporter. However, I do not want to repeat the whole code of org-html-paragraph, which I don't even fully understand (it would take me some time to digest it...). Two ideas that come to me are: either use an #+ATTR_MY_HTML line (or similar), or enclose my paragraph in #+BEGIN_MYCLASS ... #+END_MYCLASS and detect this (I already have this: (defun org-edu-html-check-for-block-type (element block-type) "Check whether ELEMENT is inside a BLOCK-TYPE (which is a string) special block." (let ((parent (org-export-get-parent element))) (cond ((and (eq (car parent) 'special-block) (string= (org-element-property :type parent) block-type)) t) (parent (org-edu-html-check-for-block-type parent block-type))))) so that I can do that easily). However, it seems that if I take this route, I will loose all bells and whistles of org-html-paragraph anyway. Any suggestions? -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University