emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Fabrice Popineau <fabrice.popineau@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Text attributes, exporting
Date: Tue, 6 Nov 2012 20:45:49 +0100	[thread overview]
Message-ID: <CAFgFV9PP_OPsQ67U-2SqAMAz3RtOsQNyVhxMUtNhvinMsj9=vQ@mail.gmail.com> (raw)
In-Reply-To: <87ip9i8yzf.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

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

Fabrice




2012/11/6 Nicolas Goaziou <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 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
>

[-- Attachment #2: Type: text/html, Size: 1993 bytes --]

      reply	other threads:[~2012-11-06 19: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
2012-11-06 19:45   ` Fabrice Popineau [this message]

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='CAFgFV9PP_OPsQ67U-2SqAMAz3RtOsQNyVhxMUtNhvinMsj9=vQ@mail.gmail.com' \
    --to=fabrice.popineau@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).