* Add custom CSS class to code section?
@ 2015-09-30 16:50 Williams, Ken
2015-10-01 9:22 ` Christian Moe
0 siblings, 1 reply; 2+ messages in thread
From: Williams, Ken @ 2015-09-30 16:50 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1758 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Add custom CSS class to code section?
2015-09-30 16:50 Add custom CSS class to code section? Williams, Ken
@ 2015-10-01 9:22 ` Christian Moe
0 siblings, 0 replies; 2+ messages in thread
From: Christian Moe @ 2015-10-01 9:22 UTC (permalink / raw)
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 <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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-01 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 16:50 Add custom CSS class to code section? Williams, Ken
2015-10-01 9:22 ` Christian Moe
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).