Re: Multiple spaces converted into one

I thank you for your comments, but I disagree on a couple of points.

On 03-09-2006 02:43, Robin Whittle wrote:

>Thanks Chris for your response.  You wrote:
>
>  
>
>>Although I agree with the stylistic practice of placing a
>>double space at the end of a sentence, I would argue against
>>Amaya doing this as a matter of course.
>>    
>>
>
>I wasn't suggesting that Amaya or that a CSS function insert spaces or
>do anything at all.
>  
>

Which languages use that "stylistic practice" ? I have only encountered 
it on a few  occasions, and that was in some old (pre 1900) english 
texts. To my knowledge it was not common practice in texts from that 
time, and most of the texts from that time I have seen did not use that 
practice.

>  
>
>>This is a matter of style, not content.
>>    
>>
>
>I think it is content.  If I say the space is part of my semantic
>content, I don't think anyone else should say it is simply a
>presentational "style".  An example would be poetry or prose, in which
>spaces between words can be an important part of the poem itself, as it
>appears on the page.  Multiple spaces can also be important in technical
>data, including program code, data etc.
>  
>

The (X)HTML tags [pre] and [code] preserves the number of spaces (and 
all other formatting in the source text), and they accurately describes 
the two types of situations where multiple spaces could be necessary in 
correct (X)HTML syntax, without the need for artificial modifications 
like converting spaces to non-breaking spaces.

>If text is typed or pasted from somewhere else, I think the natural
>behavior of Amaya or any other HTML editor should be to ensure that it
>is reproduced in any HTML viewer, complete with multiple spaces.
>
>If two spaces between sentences was regarded as a "style" and the second
>space implemented by some CSS function, then there is a reasonable
>chance that a copy to clipboard operation on the text would result in
>only single spaces being copied.
>
>Some HTML editors, such as Mozilla Composer, do what I want.  They
>insert non-breaking spaces when the user types or pastes text with two
>or more consecutive spaces.  When that part of the document is viewed
>with Composer or with any other HTML viewer, a copy to clipboard from
>that area results in the original sequence of ordinary spaces.
>  
>

I would say that Amaya should act according to the (X)HTML standard, 
that is, outside of [pre] and [code] sections, multiple spaces should be 
considered one space if typed or pasted into the formatted view in 
Amaya. Of course, anything pasted or typed into the source view should 
be preserved as it is.

>This means that the complete system, made of three tools - HTML editor,
>HTML file and HTML viewer - behaves as a black box which imposes no
>distortions between what the user puts in, what is represented on screen
>whilst editing and what is represented on any HTML viewer.  There is a
>distortion, of course, imposed on the input material in converting it to
>HTML, because of HTML's stipulation of collapsing multiple whitespaces
>into one.  HTML has a non-breaking space construct so that it's internal
>whitespace rules need not impose any distortion on the communication
>between author and reader.
>
>I am suggesting that the following change be made to Amaya:
>
>Rather than collapsing multiple spaces in typed or pasted text, that the
>second and subsequent spaces be converted to non-breaking spaces.
>
>I don't think this needs to be an option - I think this should be
>Amaya's normal behavior.  It doesn't impose any burden on users, as far
>as I can see, since those who want one space between sentences will type
>or paste one space.
>
>  - Robin
>
>
>  
>

If you take a look at any reasonably structured (X)HTML page, you will 
find many spaces in the source code that are not supposed to be 
displayed when the page is viewed. My own homepage is just one example: 
http://home20.inet.tele.dk/craebild/

In my opinion, the only "burden" that should be imposed on Amaya users 
is that they should be typing or pasting standards compliant (X)HTML, 
and the only modifications Amaya should do to what is typed or pasted 
should be conversions to standards compliant (X)HTML. In my opinion, 
Amaya should not convert any spaces in typed or pasted text to   
entities, it should preserve them as space characters (ASCII 32), and 
then treat them as space characters (ASCII 32) are treated according to 
the relevant (X)HTML DTD.

Of course, that is just my opinion. If the prevalent opinion of Amaya 
users and developers is that multiple space characters (ASCII 32) should 
be converted to   entities, then I can live with having to delete 
multiple   entities.

-- 
Med venlig hilsen / Best regards / Mit freundlichen Grüßen
Christian Rębild / Christian Raebild

Received on Sunday, 3 September 2006 06:40:54 UTC