emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: djcb@djcbsoftware.nl
Cc: emacs-orgmode@gnu.org
Subject: Re: html export with htmlized code blocks
Date: Tue, 19 May 2009 22:20:18 +0200	[thread overview]
Message-ID: <87octolu9p.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <20090519181956.GD6662@mindcrime> (Dirk-Jan C. Binnema's message of "Tue, 19 May 2009 21:19:56 +0300")

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" <djcb.bulk@gmail.com> 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
> <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.

      parent reply	other threads:[~2009-05-19 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Sebastian Rose [this message]

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=87octolu9p.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=djcb@djcbsoftware.nl \
    --cc=emacs-orgmode@gnu.org \
    /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).