Formating text

Formating text

am 07.07.2007 10:19:14 von stuckish

Is it possible to set some CSS property so that text get formated just
like in a book. I mean so that the spacing between word is dynamic and
the last letter of each word on each line always ends at the same
place? Are you with me? .. :)

Re: Formating text

am 07.07.2007 10:21:04 von dorayme

In article
<1183796354.445282.38400@k79g2000hse.googlegroups.com>,
Stuck wrote:

> Is it possible to set some CSS property so that text get formated just
> like in a book. I mean so that the spacing between word is dynamic and
> the last letter of each word on each line always ends at the same
> place? Are you with me? .. :)

You mean justified text?

div {text-align: justify;}

--
dorayme

Re: Formating text

am 07.07.2007 10:30:23 von dorayme

In article
,
dorayme wrote:

> In article
> <1183796354.445282.38400@k79g2000hse.googlegroups.com>,
> Stuck wrote:
>
> > Is it possible to set some CSS property so that text get formated just
> > like in a book. I mean so that the spacing between word is dynamic and
> > the last letter of each word on each line always ends at the same
> > place? Are you with me? .. :)
>
> You mean justified text?
>
> div {text-align: justify;}

Come to think of it, it used to look terrible when I tried it but
I just was reminded to have a go again just now and with Safari,
it looks pretty good. Perhaps it is my beautiful writing style
with simple short English words or something?

http://tinyurl.com/25vztl

--
dorayme

Re: Formating text

am 07.07.2007 14:47:22 von jkorpela

Scripsit dorayme:

>> You mean justified text?
>>
>> div {text-align: justify;}
>
> Come to think of it, it used to look terrible when I tried it

It mostly looks terrible or very terrible. My old dusty page on
justification,
http://www.cs.tut.fi/~jkorpela/www/justify.html
is probably _a little_ too pessimistic, since many browser bugs have been
fixed. However, the basic problems still remain:

1) The results depend on the line length (column width), font size, and
other factors. If authors try to "fix" this by setting those parameters to
fixed values, they create further problems.

2) Browsers (normally) achieve the justification by increasing word spacing,
whereas in book typography, character spacing within words may get adjusted,
too. This may result in awfully large gaps between words.

3) Browsers normally don't split a word across lines, and they have no
automatic word division (as typesetting software and even word processors
have). Helping them with ­ is almost safe these days but very clumsy and
does not help on Firefox. This creates serious problems especially when the
document contains long words (which are common in many languages).

> but I just was reminded to have a go again just now and with Safari,
> it looks pretty good. Perhaps it is my beautiful writing style
> with simple short English words or something?
>
> http://tinyurl.com/25vztl

It's not that bad on IE or Firefox either. But it's largely because the line
length is relatively large, as compared with the use of mostly short words.

Yet, if you look e.g. at the start of the 3rd paragraph ("He asked the camel
hire..."), you'll notice that word spacing is disturbingly larger than on
the page as a whole. This would not happen in good book typography.

Besides, if you wish to imitate print typography by using justification, the
effect is odd when you let browsers use "engineering paragraphs" (with empty
lines between paragraphs) instead of "literary paragraphs" (first-line
indents, with no vertical spacing between paragraphs) and you have "computer
quotes" (Ascii quotation marks) instead of proper quotation marks. And Arial
is really a simplistic modern font rather than a typographically stylistic
font.

What I mean is that you have a mix of "engineering style" and "literary
style". Many people are used to seeing and reading both of them, but not as
mixtures.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Re: Formating text

am 07.07.2007 14:48:14 von rf

"dorayme" wrote in message
news:doraymeRidThis-482D1E.18302307072007@news-vip.optusnet. com.au...
> In article
> ,
> dorayme wrote:
>
>> In article
>> <1183796354.445282.38400@k79g2000hse.googlegroups.com>,
>> Stuck wrote:
>>
>> > Is it possible to set some CSS property so that text get formated just
>> > like in a book. I mean so that the spacing between word is dynamic and
>> > the last letter of each word on each line always ends at the same
>> > place? Are you with me? .. :)
>>
>> You mean justified text?
>>
>> div {text-align: justify;}
>
> Come to think of it, it used to look terrible when I tried it but
> I just was reminded to have a go again just now and with Safari,
> it looks pretty good. Perhaps it is my beautiful writing style
> with simple short English words or something?

The long words give you trouble? :-)

--
Richard.

Re: Formating text

am 08.07.2007 01:10:10 von dorayme

In article ,
"Jukka K. Korpela" wrote:

> Scripsit dorayme:
>
> >> You mean justified text?
> >>
> >> div {text-align: justify;}
> >
> > Come to think of it, it used to look terrible when I tried it
>
> It mostly looks terrible or very terrible. My old dusty page on
> justification,
> http://www.cs.tut.fi/~jkorpela/www/justify.html
> is probably _a little_ too pessimistic, since many browser bugs have been
> fixed. However, the basic problems still remain:
>
....
> >
> > http://tinyurl.com/25vztl
>
> It's not that bad on IE or Firefox either. But it's largely because the line
> length is relatively large, as compared with the use of mostly short words.
>
> Yet, if you look e.g. at the start of the 3rd paragraph ("He asked the camel
> hire..."), you'll notice that word spacing is disturbingly larger than on
> the page as a whole. This would not happen in good book typography.
>

You are right. It is barely passable even in good circumstances
and is not to be recommended generally. I was just a little
surprised that browser justification had improved from the last
time I looked years back.

Must be a hard technical problem to write code for a browser that
uses more than brutal word spacing? But there are quite some
inherently difficult requirements to satisfy in a general
algorithmic way. In the url I provide above, if the window is
narrowed a lot, the text that runs down the side of the picture
could be better done.

Frankly, I find it hard to fan any slight desire for justified
text.

The only circumstance I can think of for now would be trick texts
that the reader is required to read both from left to right and
from right to left on alternate lines.

--
dorayme

Re: Formating text

am 08.07.2007 05:01:46 von dorayme

In article ,
"rf" wrote:

> > it looks pretty good. Perhaps it is my beautiful writing style
> > with simple short English words or something?
>
> The long words give you trouble? :-)

As it happens, these stories come from my very important
historical work on ancient texts, my publisher requires that my
translations are kept very simple. For a sample of the deep
scholarly work I do:

http://tinyurl.com/ym2slq

--
dorayme