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 14:33:18 +0100

Dnia 2014-03-16, o godz. 12:57:49
Nicolas Goaziou <address@hidden> napisał(a):

> Marcin Borkowski <address@hidden> writes:
> 
> > 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?
> 
> 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.)
> 
> This is backend specific data. It would not be nice to hide that fact.
> 
> 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
<div>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?
> 
> 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™ I'll
update my git clone of Org and look at it.

> Regards,

Thanks a lot!

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

-- 
Marcin Borkowski
room B3-46, phone no +48 61 829 5375
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

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