From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: Extending the Org syntax by a custom exporter - how to do it? Date: Sun, 16 Mar 2014 12:18:32 +0100 Message-ID: <20140316121832.2bc543c1@aga-netbook> References: <20140315111059.00d3b8e0@aga-netbook> <20140315222244.5eee2361@aga-netbook> <874n2ysb30.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WP95Y-0001ZI-5V for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 07:18:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WP95S-00032N-Cj for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 07:18:44 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:54080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WP95S-0002xx-6H for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 07:18:38 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id B11D142063 for ; Sun, 16 Mar 2014 12:18:34 +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 Mmpeo7kKEsqs for ; Sun, 16 Mar 2014 12:18:34 +0100 (CET) Received: from aga-netbook (99-234.echostar.pl [213.156.99.234]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 8489142062 for ; Sun, 16 Mar 2014 12:18:34 +0100 (CET) In-Reply-To: <874n2ysb30.fsf@gmail.com> 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 Dnia 2014-03-16, o godz. 11:16:03 Nicolas Goaziou napisa=C5=82(a): > Hello, >=20 > Marcin Borkowski writes: >=20 > > 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. >=20 > What about #+attr_yourbackend ? E.g., >=20 > #+attr_yourbackend: :type mct > - answer a > - answer b > - answer c >=20 > or, >=20 > #+attr_yourbackend: :lines 2 > #+begin_answer > This is an answer. > #+end_answer I thought about it. But, as I said, I'm going to have two backends, one for LaTeX, one for HTML. WOuld it be possible to have e.g. #+ATTR_TEST working for both? (Anyway, options after #+BEGIN_MYBLOCK would be a bit nicer, since the user would not have to type /that/ much.) > 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'. Thanks, I'll look into this! I tried to look for math-block in ox-latex.el, but did not find it. I have Org-mode from Elpa, org-version gives: Org-mode version 8.2.5f (8.2.5f-elpa @ /home/marcin/.emacs.d/elpa/org-20140116/) Should I upgrade? > Regards, Best, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University