From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?5Y2T5by6IFdpbGwgWmh1bw==?= Subject: How to customize the org-mode's BEGIN_SRC HTML output Date: Mon, 23 Aug 2010 17:41:23 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2001266565==" Return-path: Received: from [140.186.70.92] (port=59846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnTX2-0003f0-Ee for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 05:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnTWz-0007Qm-R2 for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 05:41:31 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:39842) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnTWz-0007QI-Ja for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 05:41:29 -0400 Received: by wyg36 with SMTP id 36so7231810wyg.0 for ; Mon, 23 Aug 2010 02:41:25 -0700 (PDT) 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: emacs-orgmode@gnu.org --===============2001266565== Content-Type: multipart/alternative; boundary=0016367fbb6baf22b6048e7a73cf --0016367fbb6baf22b6048e7a73cf Content-Type: text/plain; charset=UTF-8 Hi, Recently I start blogging using org-mode, it works pretty well, except that I would like to customize its output somehow and don't know how to make it work. Here's one of the cusomization requirement: when putting source code in blog, I would like to use the plugin: http://alexgorbatchev.com/SyntaxHighlighter/ which is basicly a javascript frontend engine turning the following HTML to a nice looking code snippet on the web brower.
    /**
     * SyntaxHighlighter
     */
    function foo()
    {
        if (counter <= 10)
            return;
        // it works!
    }
I would like to make my code snippets in the org files exporting exactly what SyntaxHighlighter required (with a
 tag

using #+BEGIN_SRC give me a 
 tag with class="src src-%(lanangue name)"
and a bunch of  in the code itself.

using #+BEGIN_HTML give me nothing and it does not escape special chars like
"<>" either.

And there seems no custmized variable which could control the "class" of the
 tag.

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
BEGIN_SRC works as my expected?
Generally, how should one do this kind of customization and how to even add
another export format, is there any tutorial to startup ?

thanks for your help,
ZHUO,Qiang

--0016367fbb6baf22b6048e7a73cf
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

Recently I start blogging using org-mode, it works pretty well, = except that I would like to customize its output somehow and don't know= how to make it work.

Here's one of the cusomization requirement= :

when putting source code in blog, I would like to use the plugin: http://alexgorbatchev.c= om/SyntaxHighlighter/ which is basicly a javascript frontend engine tur= ning the following HTML to a nice looking code snippet on the web brower.
<pre class=3D"brush: js">
=C2=A0=C2=A0=C2=A0 /**
= =C2=A0=C2=A0=C2=A0=C2=A0 * SyntaxHighlighter
=C2=A0=C2=A0=C2=A0=C2=A0 */=
=C2=A0=C2=A0=C2=A0 function foo()
=C2=A0=C2=A0=C2=A0 {
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (counter <=3D 10)
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return;
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // it works!
=C2=A0=C2=A0=C2=A0 }
&= lt;/pre>
=C2=A0
I would like to make my code snippets in the org files exporting = exactly what SyntaxHighlighter required (with a <pre class=3D"brush= : %(lanangue name)> tag and plain source code in it only escape the spec= ial char)

However, I could not find a way:
using #+BEGIN_EXAMPLE give me a <= ;pre> tag with class=3D"example" and some <span> tag
=
using #+BEGIN_SRC give me a <pre> tag with class=3D"src src-= %(lanangue name)" and a bunch of <span> in the code itself.

using #+BEGIN_HTML give me nothing and it does not escape special chars= like "<>" either.

And there seems no custmized vari= able which could control the "class" of the <pre> tag.

My questions are:
Is there some way to achive this?
If it need ha= ck , where should I modify el files to be able to get the BEGIN_SRC works a= s my expected?
Generally, how should one do this kind of customization a= nd how to even add another export format, is there any tutorial to startup = ?

thanks for your help,
ZHUO,Qiang
--0016367fbb6baf22b6048e7a73cf-- --===============2001266565== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============2001266565==--