[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Text attributes, exporting
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Text attributes, exporting |
Date: |
Tue, 06 Nov 2012 17:42:12 +0100 |
Hello,
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---
Regards,
--
Nicolas Goaziou