From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: Text attributes, exporting Date: Tue, 6 Nov 2012 20:45:49 +0100 Message-ID: References: <87ip9i8yzf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636ef04198a99cd04cdd8da4d Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVp6C-0001tD-6m for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 14:46:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVp6B-0006YG-2N for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 14:46:12 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:50271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVp6A-0006Y5-Rw for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 14:46:10 -0500 Received: by mail-wi0-f171.google.com with SMTP id hj13so3337170wib.12 for ; Tue, 06 Nov 2012 11:46:10 -0800 (PST) In-Reply-To: <87ip9i8yzf.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" --001636ef04198a99cd04cdd8da4d Content-Type: text/plain; charset=ISO-8859-1 Perfect. Thanks a lot. I knew I read about this. This is good for me. Fabrice 2012/11/6 Nicolas Goaziou > Hello, > > Fabrice Popineau 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_{} > > > > This is closer to what I would like. Something like > > class_{} > > that would get exported to \{} > > or to
body
(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:
class="something">$1
@@ > > This is an example: {{{my-mod(text)}}}. > --8<---------------cut here---------------end--------------->8--- > > > Regards, > > -- > Nicolas Goaziou > --001636ef04198a99cd04cdd8da4d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Perfect. Thanks a lot. I knew I read about this. This is good for me.
<= br>
Fabrice




2012/11/6 Nicolas Goaziou <= span dir=3D"ltr"><n.goaziou@gmail.com>
Hello,

Fabrice Popineau <fabrice.= popineau@gmail.com> writes:

> Maybe this is a silly question but who knows.
> Htmlize is able to tag elemnts in src blocks and wrap them with classe= s.
> I'd like to be able to do it for normal text too.
>
> There is // ++ =3D=3D ** but I would like to define personalized modif= iers.
> There is also the ability to inline src blocks like :
> =A0src_<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=3D"<name"> body </div> (LaTe= X or HTML).
>
> Any chance ?

I would say export-snippets + macros. The former allows to gene= rate 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=3D"so= mething">$1</div>@@

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


Regards,

--
Nicolas Goaziou

--001636ef04198a99cd04cdd8da4d--