From: Eric Schulte <eric.schulte@gmx.com>
To: Giovanni Moretti <g.moretti@massey.ac.nz>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to activate pre.src in org-babel html output? Can only get class=example
Date: Sat, 18 Feb 2012 08:03:08 -0700 [thread overview]
Message-ID: <87mx8gtasa.fsf@gmx.com> (raw)
In-Reply-To: 4F388BE0.3040306@massey.ac.nz
Hi Giovanni,
When I export the following code block
,----
| #+begin_src emacs-lisp :exports both
| :foo
| #+end_src
`----
it generates the following HTML.
,----
| <pre class="src src-emacs-lisp"><span style="color: #d0d0ff;">:foo</span>
| </pre>
|
|
| <pre class="example">
| :foo
| </pre>
`----
My guess is that during export you get a message along the lines of
"htmlize is required for export". Try explicitly loading htmlize.el (in
the contrib/lisp directory of org) and then re-exporting and you should
get the desired output.
Best,
Giovanni Moretti <g.moretti@massey.ac.nz> writes:
> 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
--
Eric Schulte
http://cs.unm.edu/~eschulte/
next prev parent reply other threads:[~2012-02-18 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-02-20 0:12 ` Giovanni Moretti
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=87mx8gtasa.fsf@gmx.com \
--to=eric.schulte@gmx.com \
--cc=emacs-orgmode@gnu.org \
--cc=g.moretti@massey.ac.nz \
/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).