emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Adding new switch or header


From: Phillip Lord
Subject: Re: [O] Adding new switch or header
Date: Tue, 03 Nov 2015 21:57:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric S Fraga <address@hidden> writes:

> On Tuesday,  3 Nov 2015 at 15:54, Phillip Lord wrote:
>> I am trying to implement a new backend based on the HTML export. I need
>> to do some post-processing to the source blocks that needs to be
>> optional. For some blocks I need to replace "[" with "\[" and for some I
>> don't.
>>
>> I am not sure whether to use headers or switches.
>
> What about neither?  Maybe something along #+ATTR_XXX: instead, where
> XXX is the name of your derived backend, along the lines of ATTR_HTML
> and ATTR_LATEX?
>
> Others may tell us that my suggestion is worse but I think playing
> around with the babel syntax is asking for trouble...

That's a good call, I think. The latex example is very clear, so I've
got that implemented now.

Are these form of attributes specific to the source block which they
precede? Or is it possible to do any kind of inheritance with them? For
my use case, all the code blocks inside a Header One block will behave
in the same way (either with \[ escaping or without).

Not a major problem if not, I can template it if not, but useful to
know.


Phil



reply via email to

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