From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: HTML Syntax Highlighting Questions Date: Mon, 30 May 2011 07:02:51 +0530 Message-ID: <81zkm5otvg.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQrM6-00015w-KK for emacs-orgmode@gnu.org; Sun, 29 May 2011 21:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQrM5-00047b-G1 for emacs-orgmode@gnu.org; Sun, 29 May 2011 21:33:18 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:35754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQrM5-00047X-96 for emacs-orgmode@gnu.org; Sun, 29 May 2011 21:33:17 -0400 Received: by pxi2 with SMTP id 2so1865230pxi.38 for ; Sun, 29 May 2011 18:33:16 -0700 (PDT) In-Reply-To: (Avdi Grimm's message of "Sun, 29 May 2011 20:50:05 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: avdi@avdi.org Cc: emacs-orgmode Avdi Grimm writes: > I feel like this is a stupid question, but I'm having trouble finding > the info I need. > > How do I control syntax highlighting in HTML export? Specifically, how can I: > > A. Disable syntax highlighting entirely Remove htmlize from your load path. > B. Switch from inline colors to semantic tagging that I can style with > a stylesheet? I could swear that I've seen instructions about this > somewhere in the past. Slightly off-topic. As part of my odt exporter work, I would very much want to have the exported code snippets marked up, well, differently. i.e., I need flexibility in *choosing* what the tag ought to be - what you call as semantic tagging. To illustrate, what gets emitted as ... in html export should in it's odt equivalent be emitted as .... I have emphasized it elsewhere, I think Org should use htmlfontify and not htmlize. The principle is that something that is right within the core should be given preference to that which is "3 rd party". Furthermore, htmlfontify can generate htmlized source code that is cross-referenced based on a etags database. If you browse to http://rtfm.etla.org/emacs/htmlfontify/src/htmlfontify.el.html and click on some of the links within the body text you would see that it jumps to their corresponding definitions. > > Bonus question: why would HTML syntax highlighting come out monochrome > (as seen here: http://avdi.org/devblog/wp-content/uploads/2011/05/html.png) > when the export is done in batch mode from the command line? And, more > importantly, how can I fix it to generate full-color highlighting in > batch mode? Let me guess - It is either htmlize not being in your load path during the batch run or font lock being not being explicity turned on during the batch run or font-locking simply not making sense during batch mode. Ultimately htmlize or for that matter htmlfontify seem to depend on the fontification done by the fontification engine. Jambunathan K. --