From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Iverson Subject: Re: How to customize the org-mode's BEGIN_SRC HTML output Date: Mon, 23 Aug 2010 14:03:23 -0500 Message-ID: <4C72C5FB.2070700@ccbr.umn.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=50359 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OncIq-00039d-OG for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 15:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OncIp-0002zk-Cd for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 15:03:28 -0400 Received: from walleye.ccbr.umn.edu ([128.101.116.11]:4081) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OncIp-0002zd-1O for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 15:03:27 -0400 In-Reply-To: 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: =?UTF-8?B?5Y2T5by6IFdpbGwgWmh1bw==?= Cc: emacs-orgmode@gnu.org Hello Will, I assume you don't want the htmlize.el functionality, which syntax highlights the source code according to how you have it in Emacs? The way I ultimately ended up doing something similar was to post-process the html file generated by the export process, (there is probably a hook so you can do this automatically): My wants required: (while (re-search-forward "
 Hi,
>=20
> Recently I start blogging using org-mode, it works pretty well, except=20
> that I would like to customize its output somehow and don't know how to=
=20
> make it work.
>=20
> Here's one of the cusomization requirement:
>=20
> when putting source code in blog, I would like to use the plugin:=20
> http://alexgorbatchev.com/SyntaxHighlighter/ which is basicly a=20
> javascript frontend engine turning the following HTML to a nice looking=
=20
> code snippet on the web brower.
>=20
> 
>     /**
>      * SyntaxHighlighter
>      */
>     function foo()
>     {
>         if (counter <=3D 10)
>             return;
>         // it works!
>     }
> 
> =20 > I would like to make my code snippets in the org files exporting exactl= y=20 > what SyntaxHighlighter required (with a
 name)> tag and plain source code in it only escape the special char)
>=20
> However, I could not find a way:
> using #+BEGIN_EXAMPLE give me a 
 tag with class=3D"example" and so=
me=20
>  tag
>=20
> using #+BEGIN_SRC give me a 
 tag with class=3D"src src-%(lanangue=20
> name)" and a bunch of  in the code itself.
>=20
> using #+BEGIN_HTML give me nothing and it does not escape special chars=
=20
> like "<>" either.
>=20
> And there seems no custmized variable which could control the "class" o=
f=20
> the 
 tag.
>=20
> My questions are:
> Is there some way to achive this?
> If it need hack , where should I modify el files to be able to get the=20
> BEGIN_SRC works as my expected?
> Generally, how should one do this kind of customization and how to even=
=20
> add another export format, is there any tutorial to startup ?
>=20
> thanks for your help,
> ZHUO,Qiang
>=20
>=20
> -----------------------------------------------------------------------=
-
>=20
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode