Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

firefox 3.5 broke css :first-letter

40 views
Skip to first unread message

Xah Lee

unread,
Jul 24, 2009, 4:13:47 PM7/24/09
to
looks like fx 3.5 broke this css:

div.nav:first-letter {font-size:3ex;color:#b22222}

The first letter is not colored or bigger.

(Example of this can be seen on my website.)

Xah
http://xahlee.org/


Johannes Koch

unread,
Jul 25, 2009, 6:33:24 AM7/25/09
to
Harlan Messinger schrieb:

> Are you sure they didn't refine the definition of "letter"? A summation
> symbol isn't a letter. What happens when you substitute an actual letter?

Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jonathan N. Little

unread,
Jul 25, 2009, 8:05:39 AM7/25/09
to
Johannes Koch wrote:
> Harlan Messinger schrieb:
>
>> Are you sure they didn't refine the definition of "letter"? A
>> summation symbol isn't a letter. What happens when you substitute an
>> actual letter?
>
> Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?
>

Exactly! The Greek capital does, but the summation symbol does not.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="content-language" content="en-us">

<title>template</title>

<style type="text/css">


div.nav:first-letter {font-size:3ex;color:#b22222}

</style>

</head>
<body>
<div class="nav">&#0931; First letter as a Greek capital should be
larger and red</div>
</body>
</html>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Harlan Messinger

unread,
Jul 25, 2009, 8:57:37 AM7/25/09
to
Johannes Koch wrote:
> Harlan Messinger schrieb:
>
>> Are you sure they didn't refine the definition of "letter"? A
>> summation symbol isn't a letter. What happens when you substitute an
>> actual letter?
>
> Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?

It's "N-ARY SUMMATION". I checked (I copied the character into my
clipboard and pasted it into the expression

javascript:alert(escape("∑"))

in my browser's Address field and got character %u2211.

Xah Lee

unread,
Jul 28, 2009, 9:09:17 AM7/28/09
to
On Jul 25, 5:05 am, "Jonathan N. Little" <lws4...@centralva.net>
wrote:

> Johannes Koch wrote:
> > Harlan Messinger schrieb:
>
> >> Are you sure they didn't refine the definition of "letter"? A
> >> summation symbol isn't a letter. What happens when you substitute an
> >> actual letter?
>
> > Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?
>
> Exactly! The Greek capital does, but the summation symbol does not.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
> <meta http-equiv="content-language" content="en-us">
>
> <title>template</title>
>
> <style type="text/css">
> div.nav:first-letter {font-size:3ex;color:#b22222}
> </style>
>
> </head>
> <body>
> <div class="nav">&#0931; First letter as a Greek capital should be
> larger and red</div>
> </body>
> </html>

Thanks all! (didn't see replies in google groups)

Yes it's n-ary summation.

Interesting. Seems Firefox 3.5 only apply the css to letters and not
other chars?

All other browser of current version seems to do the summation sign.
Which behavior is correct?

According to Wikipedia,
http://en.wikipedia.org/wiki/Acid3

Safari is the browser that passes acid3. Should i wait for Firefox to
change behavior or should i change my website?

Xah
http://xahlee.org/


Swifty

unread,
Jul 28, 2009, 10:03:17 AM7/28/09
to
Xah Lee wrote:
> Interesting. Seems Firefox 3.5 only apply the css to letters and not
> other chars?
>
> All other browser of current version seems to do the summation sign.
> Which behavior is correct?

That will come down to your interpretation of the word "letter".

Is "A" a letter?
Is "8" a letter?
if "+" a letter?

I would say "yes" to only the first. The others are characters. Or symbols.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Harlan Messinger

unread,
Jul 28, 2009, 11:41:43 AM7/28/09
to

The behavior exhibited by Firefox 3.5. (After all, that's why it's
called "first-letter", not "first-character" or "first-symbol". The
specification even calls for special treatment, consistent with
traditional treatment in the print world, for first letters that are
preceded by punctuation, and so forth. See

http://www.w3.org/TR/CSS2/selector.html#first-letter

> According to Wikipedia,
> http://en.wikipedia.org/wiki/Acid3
>
> Safari is the browser that passes acid3. Should i wait for Firefox to
> change behavior or should i change my website?

Why do you assume that Firefox's score has anything to do with
first-letter compliance *or* non-compliance? Why would you expect
Firefox to change its behavior if they just got through correcting it?

Jukka K. Korpela

unread,
Jul 28, 2009, 12:25:57 PM7/28/09
to
Swifty wrote:

> Xah Lee wrote:
>> Interesting. Seems Firefox 3.5 only apply the css to letters and not
>> other chars?
>>
>> All other browser of current version seems to do the summation sign.
>> Which behavior is correct?
>
> That will come down to your interpretation of the word "letter".

In part, yes. The CSS "specifications" are vague in this matter. In a sense,
the meaning of "letter" might be the easiest part. The "specs" (CSS 2.0
which is official but not recommended by anyone; CSS 2.1 which is often
cited as de-facto standar but itself forbids that, nominally; and the excuse
for a draft sketch CSS 3.0 Selectors, all saying essentially the same in
this matter) refer to Unicode properties in the discussion of punctuation
characters. Thus, it would be very natural to interpret the word "letter" as
referring to the Unicode characters that have a General Category value
beginning with "L", for "Letter", thus including ideographs, syllable
characters, and far more characters than most of us ever heard of. The
summation sign is surely not a letter in that sense; its General Category is
"Symbol, Math".

> Is "A" a letter?
> Is "8" a letter?
> if "+" a letter?
>
> I would say "yes" to only the first.

That is correct. And "8" is a digit. But what other letters and digits are
there?

The additional difficulties include these:

1) The CSS "specs" say that :first-letter also includes any leading
punctuation character, which is somewhat odd - if a line begins with a
quotation mark and a letter, then these two are included into the
pseudo-element :first-letter.

2) The CSS "specs" also say:
"The ':first-letter' also applies if the first letter is in fact a digit,
e.g., the "6" in "67 million dollars is a lot of money.""
That's weird, really, and it raises the question what constitutes a digit.
(Anything with General Category value beginning with "N", for "Number" -
which is a lot more than most of us would think.)

3) For further confusion, they say:
"Some languages may have specific rules about how to treat certain letter
combinations. In Dutch, for example, if the letter combination "ij" appears
at the beginning of a word, both letters should be considered within the
:first-letter pseudo-element."
That's really wild. It makes things language-dependent and even language
version dependent; e.g., it's an open question whether "ch" in Spanish is
one letter in some sense. (And what about English "th"?) And it leaves
things wide open - are browsers really supposed to know the rules of all
written languages in such matters? What _are_ the rules, really?

Let's end this with one more foolishness:

"If the letters that would form the first-letter are not in the same
element, such as "'T" in <p>'<em>T..., the UA may create a first-letter
pseudo-element from one of the elements, both elements, or simply not create
a pseudo-element."

Is that just idle babbling, or is it supposed to be part of a specification?

Oh, wait... they also "specify":

"The :first-letter pseudo-element must select the first letter of the first
line of a block, if it is not preceded by any other content (such as images
or inline tables) on its line"

So if we have
#%&*Foo
at the start of a line, then :first-letter is the "F", right? Is this
supposed to be useful?

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Xah Lee

unread,
Jul 28, 2009, 12:30:55 PM7/28/09
to
Xah Lee wrote:

«looks like fx 3.5 broke this css:


div.nav:first-letter {font-size:3ex;color:#b22222}

The first letter is not colored or bigger.»

> >> Johannes Koch wrote:
> >>> Harlan Messinger schrieb:

> > "Jonathan N. Little" wrote

> >>> Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?

> > Seems Firefox 3.5 only apply the css to letters and not
> > other chars?


> > All other browser of current version seems to do the summation sign.
> > Which behavior is correct?
>
> The behavior exhibited by Firefox 3.5. (After all, that's why it's
> called "first-letter", not "first-character" or "first-symbol". The
> specification even calls for special treatment, consistent with
> traditional treatment in the print world, for first letters that are
> preceded by punctuation, and so forth. See
>
> http://www.w3.org/TR/CSS2/selector.html#first-letter

The spec above doesn't seems to be absolutely clear on whether non-
letter chars should not be applied when using first-letter.

I kinda think it's better if it applies to all unicode chars.

Here's a test template:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/


TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

<title>ttt</title>
<style type="text/css">
div.nav {padding:.5ex;clear:both;font-family:serif} /* nav bar */
div.nav:first-letter {font-size:7ex;color:#b22222}
</style>
</head>
<body>

<div class="nav">☄ comet</div>
<div class="nav">∑ summation</div>
<div class="nav">♥ heart</div>
<div class="nav">★ star</div>
<div class="nav">ψ psi</div>
<div class="nav">x normal x</div>

</body>
</html>


Xah
http://xahlee.org/


Xah Lee

unread,
Jul 28, 2009, 12:39:12 PM7/28/09
to

Great analysis. Thanks.

Xah

Harlan Messinger

unread,
Jul 28, 2009, 2:11:47 PM7/28/09
to
Xah Lee wrote:
> Xah Lee wrote:
>
> «looks like fx 3.5 broke this css:
> div.nav:first-letter {font-size:3ex;color:#b22222}
> The first letter is not colored or bigger.»
>
>>>> Johannes Koch wrote:
>>>>> Harlan Messinger schrieb:
>>> "Jonathan N. Little" wrote
>
>>>>> Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"?
>>> Seems Firefox 3.5 only apply the css to letters and not
>>> other chars?
>
>
>>> All other browser of current version seems to do the summation sign.
>>> Which behavior is correct?
>> The behavior exhibited by Firefox 3.5. (After all, that's why it's
>> called "first-letter", not "first-character" or "first-symbol". The
>> specification even calls for special treatment, consistent with
>> traditional treatment in the print world, for first letters that are
>> preceded by punctuation, and so forth. See
>>
>> http://www.w3.org/TR/CSS2/selector.html#first-letter
>
> The spec above doesn't seems to be absolutely clear on whether non-
> letter chars should not be applied when using first-letter.

It's very clear that not all characters are considered "letters" for
this purpose. The name of the pseudo-element is another really good clue
to this.

> I kinda think it's better if it applies to all unicode chars.

The practice that the feature is meant to support wouldn't work right if
it did. The purpose is to support the very specific case of an existing
style of printing where the first letter of each paragraph or section of
a text is written as a "raised cap" or "drop cap", whatever that
*letter* may be, and with such adjustments as applying the same special
format to preceding punctuation--without requiring extra markup (span or
whatever) to make this happen.

If your purpose is to make a particular symbol larger, then style that
symbol. It's no different a situation than the symbol you want to apply
a special style doesn't happen to be the first character in a block.

Jukka K. Korpela

unread,
Jul 28, 2009, 2:33:45 PM7/28/09
to
Harlan Messinger wrote:

> It's very clear that not all characters are considered "letters" for
> this purpose.

That much is clear, but it is much more difficult to tell which characters
are considered as letters.

> The name of the pseudo-element is another really good
> clue to this.

No, CSS names are so often clueless that none of them is a good clue to
anything. If you read any semantics from an alphabetic string occurring in a
selector, a property, or a property value, you do that on your own risk and
often go all wrong.

For example, the white-space property looks like affecting white space
handling, but in fact, by the specs and by implementations, it also affects
the rendering of a string that contains no whitespace characters.

You could deduce from the name that the letter-spacing property affects
spacing between letters. In fact, it affects the spacing between characters
in general, whether they are letters or not.

Or you might think that text-decoration is something decorative, but it
isn't.

There's no hint in the name :link that this pseudo-class only applies to
_unvisited_ links.

You might naively think that foo:before refers to a fictional element before
foo, but it's really something _inside_ foo, just appearing before any
content proper.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Xah Lee

unread,
Jul 28, 2009, 2:38:29 PM7/28/09
to
On Jul 28, 11:11 am, Harlan Messinger

getting philosophical, i disagree with your view here.

Jukka K Korpela gives a good analysis of the problems of the w3c spec.

Newsgroups: comp.infosystems.www.authoring.stylesheets
Date: Tue, 28 Jul 2009 19:25:57 +0300
Subject: Re: firefox 3.5 broke css :first-letter
http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets/msg/0127e580135738bb

To me, emulating the traditional publication behavior is quite vague
and problematic. For example, the spec says if the first letter is a
double quote, then that double quote should also be cap'd alone with
the letter after the double quote. Also, it says if the first char is
digits such as 3, it should be cap'd too.

These are problematic and inconsistant. If emulating tradition is
focused, then digit chars shouldn't appy. But, to me, including the
quotation char as part of the “first-letter” is also problematic,
because it breaks simplicity and consistency. In this regard, the
quotation char isn't first letter as implied in the name of the tag
“first-letter”.

It would be much simpler and consistant, and probably more applicable
to today's digital world, if first-letter is named first-char, and
behave as applying to just the first char. For those who needs to cap
the first punctuation char alone with the letter that follows, they
might as well do special css for those cases, or, w3c really should
have tags like second-letter, last-letter (for last punctuation,
usually closing quotation char.).

i put some summary and my opinion on this issue here:

• What's a Letter in CSS's first-letter Pseudo-element?
http://xahlee.org/js/css_first_letter.html

test page here:

• test
http://xahlee.org/js/css_first_letter_test.html

Xah
http://xahlee.org/


Harlan Messinger

unread,
Jul 28, 2009, 3:46:34 PM7/28/09
to
Xah Lee wrote:
> On Jul 28, 11:11 am, Harlan Messinger
> <hmessinger.removet...@comcast.net> wrote:
>> Xah Lee wrote:
>>> I kinda think it's better if it applies to all unicode chars.
>> The practice that the feature is meant to support wouldn't work right if
>> it did. The purpose is to support the very specific case of an existing
>> style of printing where the first letter of each paragraph or section of
>> a text is written as a "raised cap" or "drop cap", whatever that
>> *letter* may be, and with such adjustments as applying the same special
>> format to preceding punctuation--without requiring extra markup (span or
>> whatever) to make this happen.
>>
>> If your purpose is to make a particular symbol larger, then style that
>> symbol. It's no different a situation than the symbol you want to apply
>> a special style doesn't happen to be the first character in a block.
>
> getting philosophical, i disagree with your view here.

OK, but I don't see what there is to disagree with. You are choosing to
place a specially styled sigma at the beginning of these headings. You
aren't making it big *because* it's the first character in these
headings. Those are different things.

Ben C

unread,
Jul 28, 2009, 5:05:08 PM7/28/09
to
On 2009-07-28, Jukka K. Korpela <jkor...@cs.tut.fi> wrote:
> Harlan Messinger wrote:
>
>> It's very clear that not all characters are considered "letters" for
>> this purpose.
>
> That much is clear, but it is much more difficult to tell which characters
> are considered as letters.
>
>> The name of the pseudo-element is another really good
>> clue to this.
>
> No, CSS names are so often clueless that none of them is a good clue to
> anything. If you read any semantics from an alphabetic string occurring in a
> selector, a property, or a property value, you do that on your own risk and
> often go all wrong.
>
> For example, the white-space property looks like affecting white space
> handling, but in fact, by the specs and by implementations, it also affects
> the rendering of a string that contains no whitespace characters.

In what way? Are you thinking of line-breaking other than at whitespace?

> You could deduce from the name that the letter-spacing property affects
> spacing between letters. In fact, it affects the spacing between characters
> in general, whether they are letters or not.
>
> Or you might think that text-decoration is something decorative, but it
> isn't.
>
> There's no hint in the name :link that this pseudo-class only applies to
> _unvisited_ links.
>
> You might naively think that foo:before refers to a fictional element before
> foo, but it's really something _inside_ foo, just appearing before any
> content proper.

You might think that position: absolute positioned a box absolutely, but
instead that's what position: fixed does.

Or you might think that position: relative positioned a box relative to
its container, but that's what position: absolute does.

Jon Fairbairn

unread,
Jul 29, 2009, 5:30:26 AM7/29/09
to
"Jukka K. Korpela" <jkor...@cs.tut.fi> writes:

> The additional difficulties include these:
>
> 1) The CSS "specs" say that :first-letter also includes any
> leading punctuation character, which is somewhat odd - if a
> line begins with a quotation mark and a letter, then these
> two are included into the pseudo-element :first-letter.

That's typographically justifiable. The problem is that (as with
so much of the specification HTML+CSS) they are trying to
specify how things behave based on a (necessarily incomplete)
knowledge of typography. It would be far better to specify
something that was technically well defined and sufficiently
general to let the web author define the behaviour that [s]he
wants.

> 3) For further confusion, they say:
> "Some languages may have specific rules about how to treat
> certain letter combinations. In Dutch, for example, if the
> letter combination "ij" appears at the beginning of a word,
> both letters should be considered within the :first-letter
> pseudo-element."
> That's really wild. It makes things language-dependent and
> even language version dependent; e.g., it's an open question
> whether "ch" in Spanish is one letter in some sense.

If I remember correctly, it (along with ll) was, but now isn't
in some official sense, though I've no idea what the
typographical conventions were/are.

> (And what about English "th"?)

No. We don't regard that as one letter (in "The" with a drop
cap, it would always be just the "T".) It's a bit of a shame we
stopped using þ and ð ;-)

> And it leaves things wide open - are browsers really supposed
> to know the rules of all written languages in such matters?
> What _are_ the rules, really?

That's it exactly.

> Let's end this with one more foolishness:
>
> "If the letters that would form the first-letter are not in
> the same element, such as "'T" in <p>'<em>T..., the UA may
> create a first-letter pseudo-element from one of the
> elements, both elements, or simply not create a
> pseudo-element."
>
> Is that just idle babbling, or is it supposed to be part of a specification?

I've never been sure where the transitions between one and the
other are in the w3 specs. When Phil Wadler made a formal
definition of something for them (to do with XML, IIRC), they
made the English description normative, not the formal spec,
thus favouring legalistic argumentation over mathematical
precision.

--
Jón Fairbairn Jon.Fa...@cl.cam.ac.uk

Andreas Prilop

unread,
Jul 29, 2009, 10:34:13 AM7/29/09
to
On Tue, 28 Jul 2009, Ben C wrote:

>> For example, the white-space property looks like affecting white space
>> handling, but in fact, by the specs and by implementations, it also affects
>> the rendering of a string that contains no whitespace characters.
>
> In what way? Are you thinking of line-breaking other than at whitespace?

Breaking at *any* character:
<news:Ov2Kl.6154$b04....@uutiset.elisa.fi>
http://groups.google.co.uk/group/comp.infosystems.www.authoring.html/msg/fde00a3c454fdecc

--
In memoriam Alan J. Flavell
http://groups.google.co.uk/groups/search?q=author:Alan.J.Flavell

Jukka K. Korpela

unread,
Jul 29, 2009, 3:50:31 PM7/29/09
to
Jon Fairbairn wrote:

>> 1) The CSS "specs" say that :first-letter also includes any
>> leading punctuation character, which is somewhat odd - if a
>> line begins with a quotation mark and a letter, then these
>> two are included into the pseudo-element :first-letter.
>
> That's typographically justifiable.

Typograhically, yes. My words "somewhat odd" were meant to point out that it
is CSS-wise odd to define a pseudo-element so that both its name and its
short description suggest that its content is the first _letter_, then
divert to something else. And the statement about digits being taken as
letters doesn't make much sense either way - I don't think I've ever seen a
digit styled (as drop-cap or otherwise special) at the start of a text block
in print media (or elsewhere). It's not normal to start a paragraph with a
digit, and it would be much more abnormal to style that digit the way first
letters are often styled.

> The problem is that (as with
> so much of the specification HTML+CSS) they are trying to
> specify how things behave based on a (necessarily incomplete)
> knowledge of typography.

Indeed. It's really worse than DWIM (Do What I Mean) - it's DWSM (Do What
Someone Means). It would be understandable in preliminary discussions when
designing a style sheet language (we have those typographic ideas, how about
incorporating them, somehow?) but it's horrible in something presented as a
specification.

> It would be far better to specify
> something that was technically well defined and sufficiently
> general to let the web author define the behaviour that [s]he
> wants.

Right. And the :first-letter pseudo-element, no matter what the original
motives were, is part of CSS and will be used for various other purposes as
well. For example, if you have an alphabetic list where you wish to
highlight the "A" of the first word beginning with "A" etc., then it's very
natural to use :first-letter instead of extra markup.

>> That's really wild. It makes things language-dependent and
>> even language version dependent; e.g., it's an open question
>> whether "ch" in Spanish is one letter in some sense.
>
> If I remember correctly, it (along with ll) was, but now isn't
> in some official sense, though I've no idea what the
> typographical conventions were/are.

Typography tends to be conservative, and so do people - it typically takes
two generations (60 years) to have an orthography reform really carried out.
(You need schoolteachers that have learned the new system as natural.) So
it's conceivable that they could treat "ch" as a single letter in
typography, even though it's officially two letters, even in alphabetic
ordering.

My example of "th" in English was not a particularly good one, and neither
would "sh" be. But "sh" in Finnish, when used as a substitute for the
recommended s with caron (still often difficult to produce for various
reasons), would be a different matter - a digraph used as substitute for a
single character for technical reasons really has some of the nature of a
single character. We could ask similar questions about the use of "ae",
"oe", "ue", and "oe" as substitutes for different characters (like "ä", "æ",
etc.) in some languages. This is really not something that should be left to
browser vendors to decide - but that's what CSS "specs" do.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Joshua Cranmer

unread,
Jul 29, 2009, 5:38:03 PM7/29/09
to
Jon Fairbairn wrote:
> That's typographically justifiable. The problem is that (as with
> so much of the specification HTML+CSS) they are trying to
> specify how things behave based on a (necessarily incomplete)
> knowledge of typography.

I remember the discussion about first-letter in the CSS mailing list
specifically sending people scurrying to find what their typography
books said. In particular, the argument was actually over digits in
:first-letter.

> I've never been sure where the transitions between one and the
> other are in the w3 specs. When Phil Wadler made a formal
> definition of something for them (to do with XML, IIRC), they
> made the English description normative, not the formal spec,
> thus favouring legalistic argumentation over mathematical
> precision.

Theoretically, informative sections should be marked as such in the
specs. The reason for making the prose normative instead of the formal
grammar is that not everything can be specified with formal grammar. It
is also rather difficult to cover all possible cases with mathematical
precision--this came up with implementing display: run-in recently.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth

Jon Fairbairn

unread,
Jul 30, 2009, 4:03:47 AM7/30/09
to
Joshua Cranmer <Pidg...@verizon.invalid> writes:

> Jon Fairbairn wrote:
>> I've never been sure where the transitions between one and the
>> other are in the w3 specs. When Phil Wadler made a formal
>> definition of something for them (to do with XML, IIRC), they
>> made the English description normative, not the formal spec,
>> thus favouring legalistic argumentation over mathematical
>> precision.
>
> Theoretically, informative sections should be marked as such
> in the specs. The reason for making the prose normative
> instead of the formal grammar is that not everything can be
> specified with formal grammar.

I don't accept that. Certain things can't be specified with
formal grammar, but everything relevant (as far as grammar
is concerned) can be. There's no way to write a web browser
that reads something that can't be specified with formal
grammar. Or to put it another way, you /can/ specify
anything computable using formal grammar, and web browsers
can't do anything that's not computable. I'm not saying that
grammar per se is the best way of specifying things -- it's
usually better to separate lexical syntax, syntax and
semantics, but all of these can be specified formally.

> It is also rather difficult to cover all possible cases with
> mathematical precision

Difficult is not the same as impossible. If it's difficult
to do mathematically, any prose description is most likely
incomplete, misleading or wrong. Covering all cases is
something that mathematics does very well.

>--this came up with implementing display: run-in recently.

Given that the absence of mathematical precision runs
throughout the "specs", I'm not terribly surprised that
there's difficulty with particular parts of it. You can't
erect a monolith on quicksand.


--
Jón Fairbairn Jon.Fa...@cl.cam.ac.uk

0 new messages