[links-list] Re: Rendering of SGML and super/subscripts

Steve White swhite at zipcon.net
Tue Aug 13 14:37:12 PDT 2002

>I agree with you about the "come on" part, but actually can this be done
>in one pass?
I'm not sure what you're asking.  The data goes through many 'passes'
through several kinds of processing before it's rendered.

In one sense, it's simpler to render superscripts offset than inline: 
if the superscript is renderd offset, the superscript needn't
alter the length of the text string. Offset, c<sup>2</sup> requires 
two horizontal characters, whereas if the superscript is indicated by 
a carat, it requires three.

However, the determination of line length and wrapping is done in a
separate step anyway, so it hardly matters code-wise.

The messy bit is in dealing with superscripts on subscripts and 
subscripts on subscripts, etc.  It strikes me that the in-line version 
is not only simpler to program, but is sometimes easier to read.
That is,



Well, it has been done with typewriters.

Let me point out that the way Lynx handles this currently is broken.  
Super and subscripts work only in certain cases, and are not nested 

>Hasn't lynx already output the text *so far* on the line when it runs
>into the superscript info?
Oh, I hope not, and doubt it.

Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the links-list mailing list