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 14:33:18 +0100 Message-ID: <20140316143318.7de989b7@aga-netbook> References: <20140315111059.00d3b8e0@aga-netbook> <20140315222244.5eee2361@aga-netbook> <874n2ysb30.fsf@gmail.com> <20140316121832.2bc543c1@aga-netbook> <87zjkqqrsy.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]:59531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPBIS-0001Bd-JX for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 09:40:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPBIN-00047F-8S for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 09:40:12 -0400 Received: from pp.amu.edu.pl ([150.254.65.67]:56744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPBIN-00042j-2S for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 09:40:07 -0400 Received: from pp.amu.edu.pl (localhost [127.0.0.1]) by pp.amu.edu.pl (Postfix) with ESMTP id 9F659AA3D8 for ; Sun, 16 Mar 2014 14:35:05 +0100 (CET) Received: from aga-netbook (99-234.echostar.pl [213.156.99.234]) by pp.amu.edu.pl (Postfix) with ESMTPSA id 78859AA344 for ; Sun, 16 Mar 2014 14:35:05 +0100 (CET) In-Reply-To: <87zjkqqrsy.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: emacs-orgmode@gnu.org Dnia 2014-03-16, o godz. 12:57:49 Nicolas Goaziou napisa=C5=82(a): > Marcin Borkowski writes: >=20 > > 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? >=20 > Of course. You decide, at the backend level, what attributes are read. > For example, "ox-beamer.el" reads both "ATTR_LATEX" and "ATTR_BEAMER", > when it makes sense. Thanks again! The more I look into docs and sources of the exporter(s), the less intimidated I feel. (Still, there are quite a few mysteries there, but I seem to get the basic ideas.) And the more I look at all this stuff, the more awe I feel... So basically I can attach #+ATTR_WHATEVER attributes also to lists, paragraphs and other elements? Even list items? (This would mean that I could mark the "correct" answer using that syntax - but I think this would be too verbose. I can't see any harm in abusing checkboxes for that, though I [[http://xkcd.com/292/][might be mistaken]];)) > > (Anyway, options after #+BEGIN_MYBLOCK would be a bit nicer, since > > the user would not have to type /that/ much.) >=20 > This is backend specific data. It would not be nice to hide that fact. >=20 > Options on the same line as the block opening string should be > reserved for backend agnostic data. There is none for special blocks > at the moment. I see. (OTOH, special blocks get translated to LaTeX environments and
s in HTML, and are ignored in some other backends - but maybe that's correct and I just was misled by this. Never mind.) > > 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? >=20 > IIRC the feature is in master, not in maint, so upgrading through ELPA > won't help. But you can browse the repository online. I see. Well, I guess I'll go with the attributes (especially that I won't need special blocks for that anyway); in some Spare Time=E2=84=A2 I'll update my git clone of Org and look at it. > Regards, Thanks a lot! --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University --=20 Marcin Borkowski room B3-46, phone no +48 61 829 5375 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University