emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "卓强 Will Zhuo" <zhuo.qiang@gmail.com>
To: emacs-orgmode@gnu.org
Subject: How to customize the org-mode's BEGIN_SRC HTML output
Date: Mon, 23 Aug 2010 17:41:23 +0800	[thread overview]
Message-ID: <AANLkTinXuWJ3fUw+ePP31UDCEjds_MYX3umHbmHPN4n2@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1567 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1923 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

             reply	other threads:[~2010-08-23  9:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23  9:41 卓强 Will Zhuo [this message]
2010-08-23 19:03 ` How to customize the org-mode's BEGIN_SRC HTML output Erik Iverson
2010-08-26  3:22   ` Andrei Jirnyi
  -- strict thread matches above, loose matches on Subject: below --
2010-08-24 13:39 Benjamin Beckwith
2010-08-25  2:36 ` Rafael
2010-08-25  3:32 Benjamin Beckwith
2010-08-25  8:30 ` Eric S Fraga
2010-08-25 12:23   ` Rafael
2010-08-25 12:51     ` Puneeth
2010-08-26  1:54       ` Rafael
2010-08-29  9:37       ` Puneeth
2010-08-29 18:18         ` Rafael
2010-09-01 10:42           ` Puneeth
2010-09-01 14:38             ` Rafael

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=AANLkTinXuWJ3fUw+ePP31UDCEjds_MYX3umHbmHPN4n2@mail.gmail.com \
    --to=zhuo.qiang@gmail.com \
    --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).