[Top][All Lists]

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

Re: [O] HTML Syntax Highlighting Questions

From: Avdi Grimm
Subject: Re: [O] HTML Syntax Highlighting Questions
Date: Wed, 8 Jun 2011 21:45:25 -0400

On Sun, May 29, 2011 at 8:50 PM, Avdi Grimm <address@hidden> wrote:
> How do I control syntax highlighting in HTML export?  Specifically, how can I:
> A. Disable syntax highlighting entirely
> 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.

Aha! I revisited this question, and I found the relevant setting:

>From the docs:

   Output type to be used by htmlize when formatting code snippets.
   Choices are `css', to export the CSS selectors only, or `inline-css', to
   export the CSS attribute values inline in the HTML.  We use as default
   `inline-css', in order to make the resulting HTML self-containing.

   However, this will fail when using Emacs in batch mode for export, because
   then no rich font definitions are in place.  It will also not be good if
   people with different Emacs setup contribute HTML files to a website,
   because the fonts will represent the individual setups.  In these cases,
   it is much better to let Org/Htmlize assign classes only, and to use
   a style file to define the look of these classes.
   To get a start for your css file, start Emacs session and make sure that
   all the faces you are interested in are defined, for example by loading files
   in all modes you want.  Then, use the command
   M-x org-export-htmlize-generate-css to extract class definitions.

Avdi Grimm

reply via email to

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