From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Williams, Ken" Subject: Add custom CSS class to code section? Date: Wed, 30 Sep 2015 16:50:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_D2317D161266Ckenwilliamswindlogicscom_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhKuc-00029e-L4 for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 13:11:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhKuX-0002AZ-MS for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 13:11:26 -0400 Received: from owa.windlogics.com ([216.245.170.169]:25705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhKuX-0002AQ-HS for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 13:11:21 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" --_000_D2317D161266Ckenwilliamswindlogicscom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable 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=92t s= ee 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=92m trying to style some code blocks differently than= others =96 specifically, I want some to be default-collapsed in my HTML ou= tput, and some to be default-expanded. *Ideally* this would actually be controlled by highjacking the existing ":e= xports" header argument, but I don=92t know how to do that either. Any tips? -Ken ________________________________ CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the inte= nded recipient(s) and may contain confidential and privileged information. = Any unauthorized review, use, disclosure or distribution of any kind is str= ictly prohibited. If you are not the intended recipient, please contact the= sender via reply e-mail and destroy all copies of the original message. Th= ank you. --_000_D2317D161266Ckenwilliamswindlogicscom_ Content-Type: text/html; charset="Windows-1252" Content-ID: <235B8689D8BB364B96D4121049C15BB6@windlogics.com> Content-Transfer-Encoding: quoted-printable
Hi,

In http://= orgmode.org/manual/CSS-support.html , I can see how to style Org-M= ode's existing CSS classes in my exported HTML document.  What I can= =92t 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=92m trying to style some code blocks differently= than others =96 specifically, I want some to be default-collapsed in my HT= ML output, and some to be default-expanded.  

*Ideally* this would actually be controlled by highjacking the existin= g ":exports" header argument, but I don=92t know how to do that e= ither.

Any tips?

 -Ken




CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the inte= nded recipient(s) and may contain confidential and privileged information. = Any unauthorized review, use, disclosure or distribution of any kind is str= ictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and des= troy all copies of the original message. Thank you.
--_000_D2317D161266Ckenwilliamswindlogicscom_-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Add custom CSS class to code section? Date: Thu, 01 Oct 2015 11:22:38 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zha4c-00077M-7V for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 05:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zha4X-0005gU-7v for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 05:22:46 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:49018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zha4X-0005fu-1C for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 05:22:41 -0400 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Williams, Ken" Cc: "emacs-orgmode@gnu.org" Hi, #+BEGIN_foo #+BEGIN_SRC R system.time( result <- doSomething() ) #+END_SRC #+END_foo will wrap your code section in a
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.