From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Extending the Org syntax by a custom exporter - how to do it? Date: Tue, 25 Nov 2014 21:46:47 -0500 Message-ID: References: <20140315111059.00d3b8e0@aga-netbook> <20140315222244.5eee2361@aga-netbook> <874n2ysb30.fsf@gmail.com> <874mtnezx9.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]:56051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtSd8-0005ck-P1 for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 21:47:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtSd1-0005fH-7W for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 21:46:58 -0500 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:55006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtSd1-0005fB-2m for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 21:46:51 -0500 Received: by mail-qg0-f41.google.com with SMTP id j5so1460204qga.14 for ; Tue, 25 Nov 2014 18:46:50 -0800 (PST) In-Reply-To: <874mtnezx9.fsf@wmi.amu.edu.pl> (Marcin Borkowski's message of "Tue, 25 Nov 2014 22:25:00 +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 Could you remind us of what you are trying to do? It seems like you may not necessarily need custom elements (although that could be useful). For example, you can put a lot of information in properties of a headline. You might be interested in this: http://kitchingroup.cheme.cmu.edu/blog/2014/11/23/Machine-gradable-quizzes-in-emacs+org-modex/ I recently used this is in my class of 58 students (who all used emacs and org-mode to take a quiz!). Marcin Borkowski writes: > Hello there, > > this is close to necromancy, but let me revive this old thread. > > On 2014-03-16, at 11:16, Nicolas Goaziou wrote: > >> 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'. > > Now that I actually started work on my exporter, I'd like to investigate > this further. The thing is, I'm not sure where to start. First of all, > I have a bit old Org-mode (without latex-math-blocks); I guess I'll just > have to update it (I'll try to do an Elpa update in a minute). But my > question is: > > 1. Is it a good idea to instrument `org-latex--wrap-latex-math-block' > for Edebug to learn what's happening? > > 2. Is there any other (possibly simpler) instance of pseudo-blocks I > could study? It seems to me (from the docstring) that latex-math-blocks > are a bit tricky; what I'm interested in is more like creating a new > element similar to e.g. italics. > > (Reagrdless of the answer, I'll try with Edebug, but I'm a bit afraid > that I won't understand what's going on). > > Also, if (when?) I "get it", I'm going to describe the process of adding > a pseudo-object somewhere (I consider my blog, or maybe I could upload > it to Worg?), so that other people can learn it easier. But for now, I > might need help. > > Best, -- ----------------------------------- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu