emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* markdown -like syntax for html classes?
@ 2015-07-01 23:16 Matt Price
  2015-07-02  0:05 ` Rasmus
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2015-07-01 23:16 UTC (permalink / raw)
  To: Org Mode

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

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.

thx,

matt

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

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

* Re: markdown -like syntax for html classes?
  2015-07-01 23:16 markdown -like syntax for html classes? Matt Price
@ 2015-07-02  0:05 ` Rasmus
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2015-07-02  0:05 UTC (permalink / raw)
  To: emacs-orgmode

Matt Price <moptop99@gmail.com> 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!

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

end of thread, other threads:[~2015-07-02  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-01 23:16 markdown -like syntax for html classes? Matt Price
2015-07-02  0:05 ` Rasmus

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