[Top][All Lists]

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

Re: htmlize/Hrvoje Niksic

From: Rasmus
Subject: Re: htmlize/Hrvoje Niksic
Date: Fri, 15 Jan 2016 23:41:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

address@hidden (Phillip Lord) writes:

>  > Out of interest, was there a particular reson or feature which led you
>  > to use htmlize rather than htmlfontify (which has been merged for a
>  > while)?
>  > [ I am curious as I wrote htmlfontify, which can already choose the colours
>  >   emacs would use for a different display class, which sounds similar to
>  >   what you are describing here ]

So just to understand correctly, would htmlfontify be able to chose
correct colors for a buffer even if run via batch mode where text is not
colored?  Or would it "just" allow be to match against a style sheet?

> So, first, I didn't know about htmlfontify (or rather I didn't know what
> it did, even though I changed it recently!). I found out about it a
> couple of days ago on Emacs wiki, and was thinking of seeing whether it
> would serve.

I also hadn’t heard of it before now...

> The second reason is that org-mode uses htmlize, and it was for use
> within org-mode that I am interested. I don't know why it does this, esp
> given that htmlfontify is available.

It would be great to have a built-in alternative to htmlize in Org.  Just
today I ran into the issue of not having htmlize bundled...

> A quick investigation of htmlfontify suggests that it is missing two
> features. I need to be able to publish using inline fonts, and not CSS
> -- I need to produce HTML snippets that I am embedding in a page that I
> don't control. And, in term of org-mode, it uses htmlize-region, which
> at first glance htmlfontify lacks an equivalent for.

Thanks for checking this.  I agree that CSS declaration support is
important (see org-html-htmlize-output-type).  BTW: what you mean by
inline fonts?

As for htmlize-region, I guess it’s easy to replace using
with-temp-buffer, so I wouldn’t worry about it from the point of view of
Org, though it’s really handy to have in any case.

> The display class feature you describe would be useful: at the moment,
> running Emacs in batch generates the terminal fonts in html. But I'd
> also like to be able to say "this face is this colour, this face is
> that, and every other face just ignore". This is for when I am
> generating HTML to embed in a page I do not otherwise control, with a
> white background (I use dark).

I know you don’t want to use external files, but if you can relax this
requirement you could generate a stylesheet with


To err is human. To screw up 10⁶ times per second, you need a computer

reply via email to

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