[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] html export with htmlized code blocks
From: |
Dirk-Jan C. Binnema |
Subject: |
[Orgmode] html export with htmlized code blocks |
Date: |
Tue, 19 May 2009 21:19:56 +0300 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi all,
I sometimes use blocks of code in my org-files; currently, to make them
look nice, I put the code in a buffer with their major mode (e.g, a blog
perl in a buffer with perl-mode), then convert it to html with htmlize,
and copy the result html back in an org-mode html block.
#+BEGIN_HTML
<pre></pre>
#+END_HTML
I seems that I should be able to automate that a bit... ie., maybe
something like:
#+BEGIN_CODE(perl)
print "hello, world!";
#+END_CODE
And *somehow* make that execute the steps I mentioned, and get something
like; so I'd need to cut-out only the stuff within <pre></pre> the
htmlize-generated html (it generates top-level html stuff which we
should ignore I guess).
<pre>
<span class="cperl-nonoverridable">print</span> <span class="string">"hello,
world!\n"</span>;</pre>
But I'm not really sure if that would be the best approach. Did anyone
do something like this before? Any tips?
Thanks,
Dirk.
--
Dirk-Jan C. Binnema Helsinki, Finland
e:address@hidden w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
- [Orgmode] html export with htmlized code blocks,
Dirk-Jan C. Binnema <=
- Re: [Orgmode] html export with htmlized code blocks, Dan Davison, 2009/05/19
- Re: [Orgmode] html export with htmlized code blocks [SOLVED], Dirk-Jan C. Binnema, 2009/05/19
- Re: [Orgmode] html export with htmlized code blocks [SOLVED, but...], Dirk-Jan C. Binnema, 2009/05/25
- Re: [Orgmode] html export with htmlized code blocks [SOLVED, but...], Sebastian Rose, 2009/05/25
- Re: [Orgmode] html export with htmlized code blocks [SOLVED, but...], Sebastian Rose, 2009/05/25
- Re: [Orgmode] html export with htmlized code blocks [SOLVED, but...], Sebastian Rose, 2009/05/25
- Re: [Orgmode] html export with htmlized code blocks [SOLVED], Dirk-Jan C. Binnema, 2009/05/20
- Re: [Orgmode] html export with htmlized code blocks, Sebastian Rose, 2009/05/19