emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Extending the Org syntax by a custom exporter - how to do it?


From: Marcin Borkowski
Subject: Re: [O] Extending the Org syntax by a custom exporter - how to do it?
Date: Sun, 16 Mar 2014 12:18:32 +0100

Dnia 2014-03-16, o godz. 11:16:03
Nicolas Goaziou <address@hidden> napisaƂ(a):

> Hello,
> 
> Marcin Borkowski <address@hidden> 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

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,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]