emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [ANN] Merge of new export framework on Wednesday


From: Sean O'Halpin
Subject: Re: [O] [ANN] Merge of new export framework on Wednesday
Date: Sat, 9 Feb 2013 18:14:37 +0000

On Sat, Feb 9, 2013 at 1:56 PM, Nicolas Goaziou <address@hidden> wrote:
> Hello,
>
> "Sean O'Halpin" <address@hidden> writes:
>
>> This raises another question which is more about Org document export
>> headers in general: why do we have specific document headers for LaTeX
>> and HTML? Because we need to able to insert raw markup at specific
>> points in the exported document. (We also have =html-preamble= and
>> =html-postamble= which act on every document.) But what about other
>> exporter back-ends? Say we get a native org to docbook exporter. What
>> would be the mechanism for inserting markup into the =<artheader>=?
>> Would there be a =#+DOCBOOK_HEADER=?
>>
>> Please forgive my meandering here. It's just struck me that we might
>> need a more general mechanism for document-level export directives
>> that will avoid multiplying the number of =#+HTML_= style directives
>> we already have. Perhaps something along the lines of:
>>
>>
>> #+BEGIN_SRC ORG
>> ,#+EXPORT html head <style .../>
>> ,#+EXPORT latex header \usepackage{xyz}
>> #+END_SRC
>>
>>
>> where =head= and =header= represent specific places in the exported
>> document that the exporter in question has defined as places you can
>> insert raw markup. So, Org would define the =#+EXPORT= protocol,
>> specific back-ends would define the names and places.
>
> Not every back-end has a concept of "head" (think about Markdown
> back-end). We don't need a general concept for something that isn't
> general.

I haven't made myself clear. I'm not suggesting a general concept of
"head". What I am suggesting is that the back-ends handle these
back-end specific concepts themselves, rather than add more buffer
keywords for every new exporter. The general concept is that we want
to communicate document level information to the back-end, in this
case, bits of text to insert at specific places which are dependent on
the specific back-end in question.

> Also, completely unifying every back-end is close to impossible, unless
> the same person writes every back-end[1]. Most of the options are
> shared, that's the goal of ox.el, but in the end, each back-end decides
> how it handles the others.

This would not require unifying every back-end at all. In fact, quite
the opposite. All you would need would be for the generic exporter
framework to provide the back-end a dictionary of key value pairs,
such as ((:head "<script.../>") ...), which the back-end would
interpret. You would avoid having to add document level keywords such
as HTML_STYLE and MAN_CLASS_OPTIONS for new exporters. It would be the
back-end's responsibility to validate and document these options. My
suggestion is really not so different from what the new exporter does
anyway. Where we now have =#+HTML_LINK_UP: "..."=, I'm suggesting we
have =#+EXPORT: html link-up "..."=.

Perhaps I'm just expressing a preference for fewer buffer-level
keywords - feel free to ignore the suggestion.

Regards,
Sean



reply via email to

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