[Top][All Lists]

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

Re: [O] Text attributes, exporting

From: Fabrice Popineau
Subject: Re: [O] Text attributes, exporting
Date: Tue, 6 Nov 2012 20:45:49 +0100

Perfect. Thanks a lot. I knew I read about this. This is good for me.


2012/11/6 Nicolas Goaziou <address@hidden>

Fabrice Popineau <address@hidden> writes:

> Maybe this is a silly question but who knows.
> Htmlize is able to tag elemnts in src blocks and wrap them with classes.
> I'd like to be able to do it for normal text too.
> There is // ++ == ** but I would like to define personalized modifiers.
> There is also the ability to inline src blocks like :
>  src_<language>{<body>}
> This is closer to what I would like. Something like
> class_<name>{<body>}
> that would get exported to \<name>{<body>}
> or to <div class="<name"> body </div> (LaTeX or HTML).
> Any chance ?

I would say export-snippets + macros. The former allows to generate raw
code geared towards latex or html back-ends while the latter introduces
syntactic sugar.

For example:

--8<---------------cut here---------------start------------->8---
#+MACRO: my-mod @@e-latex:\something{$1}@@@@e-html:<div class="something">$1</div>@@

This is an example: {{{my-mod(text)}}}.
--8<---------------cut here---------------end--------------->8---


Nicolas Goaziou

reply via email to

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