plain ASCII output (was Re: Jade Backends (from The DSSSList Digest V2 #120))

Subject: plain ASCII output (was Re: Jade Backends (from The DSSSList Digest V2 #120))
From: Louis-Dominique Dubeau <ldd@xxxxxxxxxxx>
Date: 27 Aug 1998 09:07:51 -0400
MARK.WROTH@xxxxxxxxxxx (Wroth, Mark) writes:

> 	BTW, a decent plain ASCII (i.e. emailable in an SMTP message as
> formatted but not marked up plain text) would be even more useful.
> There are obvious issues with such functionality (what does one do with
> non-ASCII characters, for example).  My current approach to this one is
> to use the RTF backend and then save the resulting file as text, which
> sort of works but is less than totally satisfactory.

I use a different approach for that.  I use the SGML backend and
output the contents without any kind of SGML contstructs (except two
special tags).  The only SGML thing I output is <sp> and <nl> which
are replaced by a very simple perl script to spaces and newlines
respectively.  (I started using <sp> and <nl> at a time when my
knowledge of dsssl was very thin... I might be able to do without them
now.)  I also pipe the thing through the fmt command to do word-wrap.

This approach has the following advantages:

- The ASCII layout doesn't have to be tied to the RTF layout.  For
  example you might want to wrap emphasized words with "*" (like
  *this*) in the ASCII output while using bold or italics in the 
  RTF output.

- You don't need an RTF-aware wordprocessor to convert to ASCII.  (I'm using
  Linux so that means I don't have to reboot in Windows.)

- It can be done in batch mode.

It has the disadvantage though that you need to maintain at least 2
dsssl files: one for RTF output and one for ASCII output.  I actually
maintain 3 files: one common library of definitions and rules, one
dsssl file for RTF and one dsssl file for ASCII.

I do not consider this to be a permanent solution to ASCII output
though.  I'd rather have a real ASCII backend.

	Regards,
	ldd


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • RE: Jade Backends (from The DSSSList Digest V2 #120)
    • Wroth, Mark - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA03582Wed, 26 Aug 1998 14:15:03 -0400 (EDT)
      • Louis-Dominique Dubeau - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA27440Thu, 27 Aug 1998 09:14:28 -0400 (EDT) <=
      • <Possible follow-ups>
      • James Tauber - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA12581Wed, 26 Aug 1998 16:39:28 -0400 (EDT)
      • Jean-Baptiste Nivoit - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id VAA06774Wed, 26 Aug 1998 21:51:08 -0400 (EDT)
        • Adam P. Harris - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA28139Thu, 27 Aug 1998 09:34:18 -0400 (EDT)
      • Frank A. Christoph - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id CAA13933Thu, 27 Aug 1998 02:57:14 -0400 (EDT)