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: Nicolas Goaziou
Subject: Re: [O] Extending the Org syntax by a custom exporter - how to do it?
Date: Sun, 16 Mar 2014 11:16:03 +0100

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

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



reply via email to

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