Re: Typesetting email automatically (macro package?)
- From: rf10@xxxxxxxxxxxx (Robin Fairbairns)
- Date: 12 May 2007 23:24:49 GMT
Daniel Barrett <dbarrett@xxxxxxxxxxxxxxx> writes:
I need to typeset several thousand email messages "nicely" for a book.
Is there a macro package that makes this easy, say, typesetting quoted
replies in italics, suppressing uninteresting headers (like
"Received:"), bolding the mail header keywords (To, From, etc), and so
on? My fantasy is:
\begin{email}
[insert entire email message, unedited]
\end{email}
the problem is, that email messages are enormously variable.
first, the headers: i've just looked at one from the upload system at
the tug box ... 52 lines of headers. what of that lot is important?
second, the mime structure: lots of exciting differences here,
including in-line images, etc., and of course the actual text bodies
may be in plain text, html, or both (in different mime parts).
third, encodings: you have to guess, for example, whether the encoding
that claims to be iso-latin-1 is in fact micro$'s corrupt version of
it, and you have to deal with all the myriad m$ code pages and the old
national encodings, too, as well as the iso 8-bit codes and the
various unicode encodings (i've had several mails that are unicode but
some encoding other than utf-8).
fourth, content transfer encodings: you have to deal with quoted
printable, base64, and all that sort of thing.
and fifth (the last one i can currently think of), how are quotations
within mails to be recognised? i have at least 4 different quoting
styles among my regular correspondents.
Editing each message by hand doesn't seem fun....
A combination of programs or scripts would also be fine, e.g., feeding
the output of an email pretty-printer (or whatever) into something
else, ultimately producing something close to what I want. I can
write Perl scripts if needed.
I looked on CTAN & Google a bit, but "email" is such a common word
that it's hard to narrow the search.
with a preparatory script to sort out the encodings and insert some
sort of basic sanity, the listings package can probably be tricked
into making sense of mails, but html mail will be a killer (largely
because it's usually such *awful* html).
i think i'm saying, "email" isn't well-specified: without a clear
specification of the input format, no-one can hope to format it
automatically, unless serious randomness is acceptable.
--
Robin Fairbairns, Cambridge
.
- Follow-Ups:
- Re: Typesetting email automatically (macro package?)
- From: Daniel Barrett
- Re: Typesetting email automatically (macro package?)
- References:
- Typesetting email automatically (macro package?)
- From: Daniel Barrett
- Typesetting email automatically (macro package?)
- Prev by Date: Re: Typesetting email automatically (macro package?)
- Next by Date: Re: CTAN has a new package: linux-libertine
- Previous by thread: Re: Typesetting email automatically (macro package?)
- Next by thread: Re: Typesetting email automatically (macro package?)
- Index(es):
Relevant Pages
|