Formating text

S

Stuck

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? .. :)
 
D

dorayme

Stuck said:
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;}
 
D

dorayme

dorayme said:
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
 
J

Jukka K. Korpela

Scripsit dorayme:
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.
 
R

rf

dorayme said:
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? :)
 
D

dorayme

"Jukka K. Korpela said:
Scripsit dorayme:


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:
....

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.
 
D

dorayme

it looks pretty good. Perhaps it is my beautiful writing style
with simple short English words or something?

The long words give you trouble? :)[/QUOTE]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top