line breaks vs. line elements (comments on XHTML 2.0 text module)

There has been some discussion recently about the plan to deprecate the <br />
tag in XHTML 2.0 (http://www.w3.org/TR/xhtml2/mod-text.html#sec_8.5.). At the
time, I had an uneasy felling that while the intentions were valid and laudable,
there were likely some cases where the difference in behavior would be
important--but I couldn't think of any at the time.

But I think I've found a good reason for keeping <br />. In writing content that
has images, equations, or other figures embedded inside a paragraph (where said
figure takes up the entire column width), there is a need to force a linebreak
to make sure that space is left for the figure and so that text justification
may occur. A line element will not work here, because it forces you to know in
advance where the preceding automatic line break is, so that you can enclose the
appropriate range of text in the line element--not desireable or possible when
the content can reflow whenever the UA's window is resized.

For example, consider the following (I came across this while trying to typeset
an article from NASA Tech Briefs [Sep. 1999, p.52], in a test of using XHTML +
MathML + SVG.)

----------------------------------------------
     The displacements of the membrane
under load are described by the equations

[two fancy math expressions were here]

where r is the radial coordinate, a is the
radius of the clamping edge, w is the
transverse...
----------------------------------------------

So, in XHTML, this would be:

<p>The displacements of the membrane
under load are described by the equations<br />
<math>
[two fancy math expressions were here]
</math>
where r is the radial coordinate, a is the
radius of the clamping edge, w is the
transverse...</p>

In the printed version of the article, the text before the equations are printed
as two lines, but since you can't know that in advance for the XHTML version, I
don't see how the <line> element could ever duplicate this behavior.

Received on Thursday, 7 November 2002 12:39:03 UTC