From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: html export with htmlized code blocks Date: Tue, 19 May 2009 22:20:18 +0200 Message-ID: <87octolu9p.fsf@kassiopeya.MSHEIMNETZ> References: <20090519181956.GD6662@mindcrime> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6Vjt-0006NT-L8 for emacs-orgmode@gnu.org; Tue, 19 May 2009 16:16:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6Vjp-0006N2-8l for emacs-orgmode@gnu.org; Tue, 19 May 2009 16:16:41 -0400 Received: from [199.232.76.173] (port=58062 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6Vjp-0006Mw-3A for emacs-orgmode@gnu.org; Tue, 19 May 2009 16:16:37 -0400 Received: from mail.gmx.net ([213.165.64.20]:43020) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M6Vjo-0002mJ-Hf for emacs-orgmode@gnu.org; Tue, 19 May 2009 16:16:36 -0400 In-Reply-To: <20090519181956.GD6662@mindcrime> (Dirk-Jan C. Binnema's message of "Tue, 19 May 2009 21:19:56 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: djcb@djcbsoftware.nl Cc: emacs-orgmode@gnu.org Hi Dirk, if you _really_ do this (it's not first of april, is it?) it's about time to join this list ;-) ...and take a look into * the great Org-mode manual: http://orgmode.org/manual/HTML-export.html#HTML-export http://orgmode.org/manual/Publishing.html#Publishing * the tutorials on Worg: http://orgmode.org/worg/ http://orgmode.org/worg/org-tutorials/ http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php * and type `M-x org-export-htmlize-generate-css RET' Regards Sebastian "Dirk-Jan C. Binnema" writes: > 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 >

> #+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 
 the
> htmlize-generated html (it generates top-level html stuff which we
> should ignore I guess).
>  
> 
> print "hello, world!\n";
> > > But I'm not really sure if that would be the best approach. Did anyone > do something like this before? Any tips? > > Thanks, > Dirk.