From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avdi Grimm Subject: Re: HTML Syntax Highlighting Questions Date: Wed, 8 Jun 2011 21:45:25 -0400 Message-ID: References: Reply-To: avdi@avdi.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUUJi-0002cu-5h for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 21:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUUJh-0002gP-0Y for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 21:45:50 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:59897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUUJg-0002gJ-SX for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 21:45:48 -0400 Received: by qyk30 with SMTP id 30so714091qyk.0 for ; Wed, 08 Jun 2011 18:45:47 -0700 (PDT) Received: by qyk2 with SMTP id 2so2705172qyk.0 for ; Wed, 08 Jun 2011 18:45:45 -0700 (PDT) In-Reply-To: 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: emacs-orgmode On Sun, May 29, 2011 at 8:50 PM, Avdi Grimm wrote: > How do I control syntax highlighting in HTML export? =A0Specifically, 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: org-export-htmlize-output-type >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, becau= se 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. --=20 Avdi Grimm http://avdi.org