emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* html export with htmlized code blocks
@ 2009-05-19 18:19 Dirk-Jan C. Binnema
  2009-05-19 19:10 ` Dan Davison
  2009-05-19 20:20 ` html export with htmlized code blocks Sebastian Rose
  0 siblings, 2 replies; 9+ messages in thread
From: Dirk-Jan C. Binnema @ 2009-05-19 18:19 UTC (permalink / raw)
  To: emacs-orgmode

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:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

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

end of thread, other threads:[~2009-05-25 20:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-19 18:19 html export with htmlized code blocks Dirk-Jan C. Binnema
2009-05-19 19:10 ` Dan Davison
2009-05-19 20:04   ` html export with htmlized code blocks [SOLVED] Dirk-Jan C. Binnema
2009-05-19 20:07   ` Dirk-Jan C. Binnema
2009-05-25 18:04     ` html export with htmlized code blocks [SOLVED, but...] Dirk-Jan C. Binnema
2009-05-25 18:33       ` Sebastian Rose
2009-05-25 18:35       ` Sebastian Rose
2009-05-25 20:03       ` Sebastian Rose
2009-05-19 20:20 ` html export with htmlized code blocks Sebastian Rose

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).