emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] colorize html output when batch exporting


From: Alan Schmitt
Subject: Re: [O] colorize html output when batch exporting
Date: Wed, 15 Jan 2014 09:04:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

Quick summary: I'm now able to generate the css, but I don't understand
how it can change the colors.

Rick Frankel <address@hidden> writes:

> Which version of emacs are you using? FWIW, I just had this problem
> yesterday (although it choked on a different face) in emacs trunk
> (24.4.x). But on my machine @work on (24.3.8) it is working fine.

I'm on 24.3.1.

> It seems that htmlize is choking on invalid face definitions.
> Somewhere you have a reference to a face "font-lock-comment" which
> does not exist (the correct definition in this case is
> "font-lock-comment-face"), so if you can find the customization that
> refers to "font-lock-comment" and fix it you should be able to
> generate the CSS.

Thank you for the suggestion. I had a quick look at what
org-html-htmlize-generate-css is doing, and it starts by building a
face-list which is used in my case. I thought the problem was that I had
been using this instance of emacs for too long (thus many faces where
loaded), but with a fresh emacs, I still have an error (this time for
`font-lock-pseudo-keyword-face`).

Loading an emacs with no configuration (except for org and htmlize), I'm
now able to generate the CSS. After loading the mode of interest, I now
know the names of the classes I should work with.

However, I still find there is a problem. Here is the html source
generated from a snippet of the file:

#+BEGIN_SRC html
<div class="org-src-container">

<pre class="src src-coq">Inductive expr :=
  | expr_this : expr
  | expr_identifier : string -&gt; expr
  | expr_literal : literal -&gt; expr
  | expr_object : list (propname * propbody) -&gt; expr
  | expr_function : option string -&gt; list string -&gt; funcbody -&gt; expr
  | expr_access : expr -&gt; expr -&gt; expr
  | expr_member : expr -&gt; string -&gt; expr
  | expr_new : expr -&gt; list expr -&gt; expr
  | expr_call : expr -&gt; list expr -&gt; expr
  | expr_unary_op : unary_op -&gt; expr -&gt; expr
  | expr_binary_op : expr -&gt; binary_op -&gt; expr -&gt; expr
  | expr_conditional : expr -&gt; expr -&gt; expr -&gt; expr
  | expr_assign : expr -&gt; option binary_op -&gt; expr -&gt; expr
</pre>
</div>
#+END_SRC

I don't understand how things are supposed to be colorized, as there is
no mention in the html of span elements to put color on. For instance,
"Inductive" is a keyword, and in a coq buffer it has face
"font-lock-keyword-face". Shouldn't it have class "org-keyword" in the
generated html?

Thanks,

Alan



reply via email to

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