## TEI-L@LISTSERV.BROWN.EDU

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Ignoring Record Ends

From:

Date:

Thu, 2 Feb 1995 12:54:30 CST

Content-Type:

text/plain

Parts/Attachments:

 text/plain (57 lines)
   This is a response to the query: ---------------------------------------------------------------------- Is there anything in SGML equivalent to TeX's ability to say somthing like:         \imprint{%           \pubisher{%               {\bf Our Name here}   where the "%" suppresses the newline, and where all blank space at the beginning of the line is ignored?   Thanks, David M. MacMillan [log in to unmask] ---------------------------------------------------------------------- recently posted to the TEI list.   An answer to this question is found on page 353 of the SGML Handbook. Recall that an entity reference has an optional reference end (production [61] of the standard) which consists either of a refc (i.e. a semicolon) or a RE (record end). Thus following &word we have when parsing not an RE but the letter 'w'. Goldfarb writes (loc cit) "As it is unlikely an entity reference will show up whjust when you need it, the recommended practice is to define an entity whose replacement text is an empty string, just for the purpose of using it to suppress record ends." There is no way in SGML to remove the leading spaces from the content, short of defining custom short references.   David also writes: ----------------------------------------------------------------------                                 Of course, this data gets passed on to CoST, and subsequently to TeX. TeX very pleasantly ignores this, but it still produces a very messy .tex file. More importantly, in the future I may be translating this document into languages other than TeX which do not handle this so gracefully. ---------------------------------------------------------------------- where "this data" is the spaces and record ends in his nicely laid out file that is passed through to the formatting application. I like to hear TeX praised, but I am not sure that the standard tools will give a good result when applied to something like         one two         buckle my shoe         threefour         close the door because of the anarchic (authors are like that) distribution of space characters. This example is taken from the talk I gave at Bridewell on January 19th, which has been mentioned on this list.   best regards Jonathan Fine   P.S. I find that greater than the cost of buying the SGML Handbook is the cost of reading it. However, the reward is also great.