From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Subject: Re: How to customize the org-mode's BEGIN_SRC HTML output Date: Tue, 24 Aug 2010 21:36:40 -0500 Message-ID: <87bp8rwh8n.fsfhello@somewhere.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=50238 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oo5uI-0007v9-U3 for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 22:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oo5uH-0002Ry-Sn for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 22:40:06 -0400 Received: from lo.gmane.org ([80.91.229.12]:50383) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oo5uH-0002Rn-Mc for emacs-orgmode@gnu.org; Tue, 24 Aug 2010 22:40:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oo5uF-0007pL-4u for emacs-orgmode@gnu.org; Wed, 25 Aug 2010 04:40:03 +0200 Received: from 201.114.240.40 ([201.114.240.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Aug 2010 04:40:03 +0200 Received: from rvf0068 by 201.114.240.40 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Aug 2010 04:40:03 +0200 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 Benjamin Beckwith writes: > Hi, I also was interested in posting these blocks (through org2blog in > wordpress). The code I posted below is added to > 'org-export-preprocess-hooks' where it looks for BEGIN_SRC blocks as > well as ':' blocks of code. > > In the case of BEGIN_SRC blocks, I add a header option, :syntaxhl where > I can pass in additional settings to the syntaxhighlighter code. > > The code below uses Wordpress shortcodes, but I am sure that you can > adapt for your own purposes. Thanks! that seems to almost work for me, if I replace your penultimate line: > (concat "\n\n[" lang syntaxhl "]\n" body "[/" lang "]\n") by (concat "\n\n[sourcecode language=\"" lang syntaxhl "\"]\n" body "[/sourcecode]\n") but then the line breaks are lost, and the latex exporter tries to be too smart and replace the code.. Please see http://rvftestblog.wordpress.com/2010/08/24/code-blocks-again/ which was intended as a result of posting the following: #+POSTID: 17 #+DATE: [2010-08-24 Tue 20:43] #+OPTIONS: toc:nil num:nil todo:nil pri:nil tags:nil ^:{} #+DESCRIPTION: Testing #+KEYWORDS: test #+TITLE: Code blocks again A perl example: #+BEGIN_SRC perl for (my $i = 0; $i != 10; ++i) { print "hello, world!\n"; } #+END_SRC another #+BEGIN_SRC latex \begin{theorem} \label{theorem:1} {\normalfont (Augmentation Theorem)} Let $M=(S,I)$ be a matroid, and $X,Y\subseteq I$ with $|X|<|Y|$. Then there is $Z\subseteq Y\setminus X$ such that $|X\cup Z|=|Y|$ and $X\cup Z\in I$. \end{theorem} #+END_SRC update 8: let's see if it works now...