emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Text attributes, exporting
Date: Tue, 06 Nov 2012 17:42:12 +0100	[thread overview]
Message-ID: <87ip9i8yzf.fsf@gmail.com> (raw)
In-Reply-To: <CAFgFV9ONknnrp5Mi1Zs0n0KBaHYb39abbW-j6YoSKP8egW1Kdg@mail.gmail.com> (Fabrice Popineau's message of "Tue, 6 Nov 2012 16:14:10 +0100")


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 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

  parent reply	other threads:[~2012-11-06 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 15:14 Text attributes, exporting Fabrice Popineau
2012-11-06 16:39 ` Suvayu Ali
2012-11-06 16:42 ` Nicolas Goaziou [this message]
2012-11-06 19:45   ` Fabrice Popineau

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:

  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=87ip9i8yzf.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.popineau@gmail.com \


* 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


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).