emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] HTML Syntax Highlighting Questions


From: Jambunathan K
Subject: Re: [O] HTML Syntax Highlighting Questions
Date: Mon, 30 May 2011 07:02:51 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Avdi Grimm <address@hidden> 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 <span>...</span>
in html export should in it's odt equivalent be emitted as
<text:span>...</text:span>.

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.
-- 



reply via email to

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