emacs-devel
[Top][All Lists]
Advanced

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

Rendering HTML


From: Lars Magne Ingebrigtsen
Subject: Rendering HTML
Date: Sat, 18 Sep 2010 22:06:18 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

The next think I thought I'd tackle (after a couple more weeks of
polishing up the recent changes to Gnus) is writing a very simple HTML
renderer for Emacs.

I'm not very ambitious here at all -- just something that will make
simple, non-CSS-ey HTML (like what you find in emails and RSS entries)
look OK.

Since we have the HTML parser in Emacs, most of the HTML rendering is
trivial (I mean, doing stuff like <a href>, <img>, <br>, etc).  The one
challenging (well, challenging to me) thing is actually how to do
tables.

You have stuff like

<table>
<tr>
<td width=30%>
<table>
<tr>
<td width=40px rowspan=2>
...

So you have all these boxes inside of boxes, with some constraints that
are absolute, and others that are relative (% and getting the width of a
box depending on what it contains and how you break the text in the
box), and so on.

So before I give my brain a strain trying to think about this, has
anybody else done something like this?  Either code that can be included
in Emacs, or other Lisp code that I can peek at, or, failing all that,
just somebody who has written something about how to approach this?

-- 
(domestic pets only, the antidote for overdose, milk.)
  address@hidden * Lars Magne Ingebrigtsen




reply via email to

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