emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Text attributes, exporting
@ 2012-11-06 15:14 Fabrice Popineau
  2012-11-06 16:39 ` Suvayu Ali
  2012-11-06 16:42 ` Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Popineau @ 2012-11-06 15:14 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Text attributes, exporting
  2012-11-06 15:14 Text attributes, exporting Fabrice Popineau
@ 2012-11-06 16:39 ` Suvayu Ali
  2012-11-06 16:42 ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Suvayu Ali @ 2012-11-06 16:39 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Text attributes, exporting
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-11-06 16:42 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Text attributes, exporting
  2012-11-06 16:42 ` Nicolas Goaziou
@ 2012-11-06 19:45   ` Fabrice Popineau
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Popineau @ 2012-11-06 19:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-06 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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