emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: markdown -like syntax for html classes?
Date: Thu, 02 Jul 2015 02:05:34 +0200	[thread overview]
Message-ID: <87k2ujv2y9.fsf@gmx.us> (raw)
In-Reply-To: CAN_Dec_SCic=b36kKH5SAhJ2epJUk8S_4x6odzF1DM5TTSR5Ew@mail.gmail.com

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!

      reply	other threads:[~2015-07-02  0:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 23:16 markdown -like syntax for html classes? Matt Price
2015-07-02  0:05 ` Rasmus [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=87k2ujv2y9.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /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).