unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Rendering HTML
@ 2010-09-18 20:06 Lars Magne Ingebrigtsen
  2010-09-18 20:12 ` Benjamin Hawkes-Lewis
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-18 20:06 UTC (permalink / raw)
  To: emacs-devel

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.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-09-22 15:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-18 20:06 Rendering HTML Lars Magne Ingebrigtsen
2010-09-18 20:12 ` Benjamin Hawkes-Lewis
2010-09-22 13:54   ` Mario Lang
2010-09-22 15:56     ` T.V. Raman
2010-09-19 12:14 ` joakim
2010-09-19 12:15 ` joakim
2010-09-19 13:39   ` Chad Brown
2010-09-19 13:43     ` Lars Magne Ingebrigtsen
2010-09-20 16:14 ` Chong Yidong
2010-09-21 14:37   ` Lars Magne Ingebrigtsen
2010-09-21 22:08     ` Andy Moreton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).