emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] How to customize the org-mode's BEGIN_SRC HTML output


From: 卓强 Will Zhuo
Subject: [Orgmode] How to customize the org-mode's BEGIN_SRC HTML output
Date: Mon, 23 Aug 2010 17:41:23 +0800

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.

<pre class="brush: js">
    /**
     * SyntaxHighlighter
     */
    function foo()
    {
        if (counter <= 10)
            return;
        // it works!
    }
</pre>
 
I would like to make my code snippets in the org files exporting exactly what SyntaxHighlighter required (with a <pre class="brush: %(lanangue name)> tag and plain source code in it only escape the special char)

However, I could not find a way:
using #+BEGIN_EXAMPLE give me a <pre> tag with class="example" and some <span> tag

using #+BEGIN_SRC give me a <pre> tag with class="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 variable which could control the "class" of the <pre> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]