ignoring white-space

Subject: ignoring white-space
From: David Megginson <dmeggins@xxxxxxxxxx>
Date: Mon Mar 31 06:26:25 1997 EST
Russell Senior writes:

 > I am experimenting with Jade 0.5 to format some SGML of mine.  The
 > SGML was marked up using PSGML in GNU Emacs and I have noticed a
 > little problem.  Default indentation in sgml-mode in Emacs results in
 > the #PCDATA being nicely indented within its tags.  This makes the
 > SGML look great, but when this stuff gets run through the TeX or RTF
 > backends the leading spaces from each line are retained in the
 > output.  This is not a problem when using the TeX backend since TeX
 > eats the extra white-space, but RTF does not.

In this context the behaviour of the TeX is, unfortunately, a bug
rather than a feature.  If you don't want whitespace to be
significant, try this on your root element:

  (element DOC
    (make simple-page-sequence
      input-whitespace-treatment: 'collapse

When you do need it to be significant, you can override the value

  (element LISTING
    (make paragraph
      input-whitespace-treatment: 'preserve
      lines: 'asis

All the best,


- -- 
David Megginson                 ak117@xxxxxxxxxxxxxxxxxxx
Microstar Software Ltd.         dmeggins@xxxxxxxxxxxxx
University of Ottawa            dmeggins@xxxxxxxxxx

Current Thread