RE two PREs

Dave_Raggett <>
From: Dave_Raggett <>
Message-id: <>
Subject:  RE two PREs
Date: Mon, 21 Jun 93 9:50:26 BST
Mailer: Elm [revision:]

> Presently in xmosaic PRE is presented in a typewriter font; this is okay
> for code examples (unless you have in-line annotations that you want 
> distinguished from the code) but not for all forms of text that should
> be displayed verbatim (poetry).  So either two PREs are needed, or the
> font change in PRE should be invoked specifically, perhaps by using
> CODE inside PRE.

HTML+ has a style attribute for the PRE tag with just such ideas in mind:

<!-- Preformatted text with fixed pitch font,
     respecting original spacing and newlines.
     The style attribute allows authors to specify
     alternative styles, e.g. "poem" which browsers
     could render in a proportional font.
<!ELEMENT PRE - - (%text;)+>
    id      ID      #IMPLIED -- link destination --
    style   CDATA   #IMPLIED -- various styles --
    width   NUMBER  #IMPLIED -- e.g. 40, 80, 132 -->

My expectation is there are a small number of useful styles for which we can
agree on the names and how to render them. One problem with using a CDATA
(free text) field for style names is that browsers may not recognise less
common ones. It seems to me that it is worth breaching the principle of
presentation independence slightly to include some rendering hints to allow
for graceful degradation. With this in mind I am now considering adding a
justification attribute to the paragraph tag <P>, e.g. <P CENTER>, together
with a line break tag <BR>.

A wider issue is changing character sets, e.g. from Latin-1 to Old English
(or at a more mundane level to Asian character sets).

Switching to 16 bit fonts will help (at least for extant languages). However,
I see no real alternative in the longer term to building in support for
outline fonts, e.g. TrueType, together with full support for the ISO entity

Dave Raggett