From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Extending the Org syntax by a custom exporter - how to do it? Date: Sun, 16 Mar 2014 11:16:03 +0100 Message-ID: <874n2ysb30.fsf@gmail.com> References: <20140315111059.00d3b8e0@aga-netbook> <20140315222244.5eee2361@aga-netbook> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WP86Y-0003zl-KL for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 06:15:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WP86T-0000in-0F for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 06:15:42 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:51908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WP86S-0000ig-J7 for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 06:15:36 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi5so1069429wib.11 for ; Sun, 16 Mar 2014 03:15:35 -0700 (PDT) In-Reply-To: <20140315222244.5eee2361@aga-netbook> (Marcin Borkowski's message of "Sat, 15 Mar 2014 22:22:44 +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: Marcin Borkowski Cc: emacs-orgmode@gnu.org Hello, Marcin Borkowski writes: > OK, so I did some research, and I found out that "special blocks" are > probably the best idea. So, items with checkboxes whose :parent is a > special block like "MCT" or "SCT" could behave accordingly. Still, I > can't see in the docs any mentions about possible properties of special > blocks. Is it possible to make an exporter so that I could say > > #+BEGIN_ANSWER :lines 2 > This is an answer. > #+END_ANSWER > > so that I could use the property :lines in org-special-block? I don't > want to utilize #+ATTR_LATEX, since I'm aiming at extensions to both > LaTeX and HTML exporters recognizing this thing. What about #+attr_yourbackend ? E.g., #+attr_yourbackend: :type mct - answer a - answer b - answer c or, #+attr_yourbackend: :lines 2 #+begin_answer This is an answer. #+end_answer Another, more advanced option, is to use a parse tree filter to create pseudo-types, i.e., element or object types that don't exist in regular Org syntax. See `math-block' type in "ox-latex.el", in particular `org-latex-math-block-tree-filter'. Regards, -- Nicolas Goaziou