all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to activate pre.src in org-babel html output? Can only get class=example
@ 2012-02-13  4:04 Giovanni Moretti
  2012-02-18 15:03 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Moretti @ 2012-02-13  4:04 UTC (permalink / raw)
  To: emacs-orgmode

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

Using org-babel, I'm wanting to output Python fragments along with the resultant 
output to HTML.

That bit's easy, and the following works as expected:

    #+options: toc:nil num:nil
    * Using Python interactively
    Any commands typed into the console executed immediately.

    #+begin_src python :results output :exports both
    print 355/113

    print 17/2
    print 17/2.0
    #+end_src python

However, although I find references to various styling mechanisms (e.g 
*pre.src*) in the orgmode documentation, I can't find any way to get any more 
CSS selectors on both the src and output blocks. The only one that ever appears 
is "example" as shown here:

    <pre class="example">print 355/113
    print 17/2
    print 17/2.0
    </pre>
    <pre class="example">
       3
       8
       8.5
    </pre>
    </div>

If I can find out how to make "pre.src" appear (hopefully only on the source 
block) , then I can change the background colours or fonts to make the output 
visibly distinct from the source code.

The full HTML output I get is at 
http://dl.dropbox.com/u/2671560/org-py-babel.html contains lots of CSS 
selectors, and I can easily include my my own using #+STYLE lines, but I need 
some way to differentiate the two blocks.

I'm using Emacs 23.1.50.1 and the lastest orgmode  commit 
b5082974c83a3a4838db86025edce857b11e5847 (Fri Feb 3 15:18:05 2012 +0100)

Any tips?

Thanks
Giovanni

-- 
======================================================================
Dr Giovanni Moretti | School of Engineering and Advanced Technology
Senior Lecturer     | Massey University, Palmerston North, New Zealand
Computer Science    | Ph +64-6-3505799x2474  Fax +64-6-3502259 - ZL2GX
======================================================================
http://seat.massey.ac.nz/moretti                G.Moretti@massey.ac.nz



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

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

end of thread, other threads:[~2012-02-20  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13  4:04 How to activate pre.src in org-babel html output? Can only get class=example Giovanni Moretti
2012-02-18 15:03 ` Eric Schulte
2012-02-20  0:12   ` Giovanni Moretti

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.