emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: emacs-orgmode@gnu.org
Subject: Re: Adding new switch or header
Date: Tue, 03 Nov 2015 21:57:49 +0000	[thread overview]
Message-ID: <87r3k6vj8i.fsf@russet.org.uk> (raw)
In-Reply-To: <87d1vrhvf4.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Tue, 3 Nov 2015 16:58:23 +0000")

Eric S Fraga <e.fraga@ucl.ac.uk> 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	other threads:[~2015-11-03 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 15:54 Adding new switch or header Phillip Lord
2015-11-03 16:58 ` Eric S Fraga
2015-11-03 21:57   ` Phillip Lord [this message]
2015-11-04  9:05     ` Eric S Fraga
2015-11-04 17:24       ` Phillip Lord
2015-11-04 22:50       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3k6vj8i.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).