lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev missing 'space' before a pre block?


From: Klaus Weide
Subject: Re: lynx-dev missing 'space' before a pre block?
Date: Tue, 24 Aug 1999 03:05:04 -0500 (CDT)

On Mon, 23 Aug 1999, Larry W. Virden wrote:

> On another mailing list someone mentioned this html:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
> <html>
> <head>
> <title></title>
> </head>
> <body>
> <p>normal text</p>
> <pre>this is pre text</pre>
> </body>
> </html>
> 
> 
> Other browsers show a blank line between normal text and the pre text.
> Lynx doesn't.  

On the other hand I've seen complaints that other browsers put an empty
line before a list (UL etc.).  Lynx doesn't.  In that similar case (i.e.
"<p>normal text</p><ul><li>...") Lynx's handling seems to be preferred.
It is questionable whether PRE should be different from UL in this aspect
(and after all PRE already explicitly allows adding spacing).

> The user was asking on the list how to code this
> html so that any modern browser - gui or non - would leave a blank line
> between the text.

There is no way to "force" this kind of appearance on "any [modern] browser"
(i.e. all of them).  It is a style question.

> Any suggestions?

For what?

For anwering that user's authoring question?  There are various ways that
aren't hard to find.  P's, BR's, PRE, posssibly combined with &nbsp; etc.

For changing lynx (what this list is about)?   Yes, change DefaultStyle.c.

>  This is with Lynx Version 2.8.3dev.6, ncurses 5.0 beta,
> and Sparc Solaris 2.6  / Sun compiler. I _think_ it's the same for older
> variations as well.

Actually, in TagSoup mode lynx does insert an extra empty line.  That
means older versions (pre-SortaSGML) do it always.

But that only happens because tagsoup parsing doesn't really understand
P as an element with content, and treats an explicit </P> as a <P>, which
is not the Right Thing.  It should make no difference whether the </P>
is explicitly given or implied, so SortaSGML has to treat both cases the
same way.  Either </P> (whether given or implied) always creates an empty
line, or it doesn't.  The current choice is it doesn't (but <P> does).
(There are some specific exceptions when P is found within specific
container blocks.)  The place to change it is the already mentioned
DefaultStyle.c.  Either change the 'after' space for P to 1, or change
the 'before' space for PRE to 1, or both.

This has been discussed before.

   Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]