[-- Attachment #1: Type: text/plain, Size: 524 bytes --] Hi, 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 ? -- Fabrice [-- Attachment #2: Type: text/html, Size: 813 bytes --]
Hello Fabrice,
On Tue, Nov 06, 2012 at 04:14:10PM +0100, Fabrice Popineau wrote:
> Hi,
>
> 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).
>
Maybe this is what you are looking for?
org-emphasis-alist is a variable defined in `org.el'.
Its value is (("*" bold "<b>" "</b>")
("/" italic "<i>" "</i>")
("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
("=" org-code "<code>" "</code>" verbatim)
("~" org-verbatim "<code>" "</code>" verbatim)
("+"
(:strike-through t)
"<del>" "</del>"))
Documentation:
Special syntax for emphasized text.
Text starting and ending with a special character will be emphasized, for
example *bold*, _underlined_ and /italic/. This variable sets the marker
characters, the face to be used by font-lock for highlighting in Org-mode
Emacs buffers, and the HTML tags to be used for this.
For LaTeX export, see the variable `org-export-latex-emphasis-alist'.
For DocBook export, see the variable `org-export-docbook-emphasis-alist'.
Use customize to modify this, or restart Emacs after changing it.
GL
--
Suvayu
Open source is the future. It sets us free.
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 #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 --]