emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] markdown -like syntax for html classes?


From: Rasmus
Subject: Re: [O] markdown -like syntax for html classes?
Date: Thu, 02 Jul 2015 02:05:34 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Matt Price <address@hidden> writes:

> I have just been learning a very little bit about markdown, and love this
> syntax from markdown extra:
>
> ## Le Site ##    {.main .shine #the-site lang=fr}
>
> The curly braces contain html attributes which are applied to the
> current html object
> (in this case, an <h2>).
>
> Does org support a similarly convenient shorthand? To me this feels
> much easier than
>  #+ATTR+HTML:, though maybe it's just a personal preference.

Yes.  Org uses a traditional id and class system, though.  E.g. #+title is
assigned the title class (.title in CSS).  You can add a custom stylesheet
that changes how a .title is formatted.  You can use custom_id for further
customization as it assigns an id to the heading.  Then you can to

#custom_id.heading-lvl-2 {whatever:style;}

Or similar.

Hope it helps,
Rasmus

-- 
Spil noget med Slayer!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]