all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Rendering HTML
Date: Sat, 18 Sep 2010 22:06:18 +0200	[thread overview]
Message-ID: <m3fwx624w5.fsf@quimbies.gnus.org> (raw)

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




             reply	other threads:[~2010-09-18 20:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18 20:06 Lars Magne Ingebrigtsen [this message]
2010-09-18 20:12 ` Rendering HTML 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3fwx624w5.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.