emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: "Williams, Ken" <Ken.Williams@windlogics.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Add custom CSS class to code section?
Date: Thu, 01 Oct 2015 11:22:38 +0200	[thread overview]
Message-ID: <m2612r0wpt.fsf@christianmoe.com> (raw)
In-Reply-To: <D2317D16.1266C%ken.williams@windlogics.com>


Hi,

#+BEGIN_foo
#+BEGIN_SRC R 
  system.time( result <- doSomething() )
#+END_SRC
#+END_foo

will wrap your code section in a <div class="foo"> element.

Yours,
Christian

Williams, Ken writes:

> Hi,
>
> In http://orgmode.org/manual/CSS-support.html , I can see how to style Org-Mode's existing CSS classes in my exported HTML document.  What I can’t see is how to add a custom class to a code section, something like this:
>
> #+BEGIN_SRC R :class foo
> system.time( result <- doSomething() )
> #+END_SRC
>
> I want this because I’m trying to style some code blocks differently than others – specifically, I want some to be default-collapsed in my HTML output, and some to be default-expanded.
>
> *Ideally* this would actually be controlled by highjacking the existing ":exports" header argument, but I don’t know how to do that either.
>
> Any tips?
>
>  -Ken
>
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

      reply	other threads:[~2015-10-01  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 16:50 Add custom CSS class to code section? Williams, Ken
2015-10-01  9:22 ` Christian Moe [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=m2612r0wpt.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=Ken.Williams@windlogics.com \
    --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).