From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Rick Frankel <rick@rickster.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: colorize html output when batch exporting
Date: Wed, 15 Jan 2014 09:04:20 +0100 [thread overview]
Message-ID: <m2d2jtn01n.fsf@polytechnique.org> (raw)
In-Reply-To: <456aae79ec3109523d0d19759b73b0eb@mail.rickster.com> (Rick Frankel's message of "Tue, 14 Jan 2014 13:25:07 -0500")
Quick summary: I'm now able to generate the css, but I don't understand
how it can change the colors.
Rick Frankel <rick@rickster.com> 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 -> expr
| expr_literal : literal -> expr
| expr_object : list (propname * propbody) -> expr
| expr_function : option string -> list string -> funcbody -> expr
| expr_access : expr -> expr -> expr
| expr_member : expr -> string -> expr
| expr_new : expr -> list expr -> expr
| expr_call : expr -> list expr -> expr
| expr_unary_op : unary_op -> expr -> expr
| expr_binary_op : expr -> binary_op -> expr -> expr
| expr_conditional : expr -> expr -> expr -> expr
| expr_assign : expr -> option binary_op -> expr -> 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
next prev parent reply other threads:[~2014-01-15 8:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 13:45 colorize html output when batch exporting Alan Schmitt
2014-01-14 18:25 ` Rick Frankel
2014-01-15 8:04 ` Alan Schmitt [this message]
2014-01-15 14:39 ` Rick Frankel
2014-01-15 15:24 ` Alan Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2d2jtn01n.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
--cc=rick@rickster.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).