By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,226 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,226 IT Pros & Developers. It's quick & easy.

"degrees" notation

P: n/a
What is the correct notation for the "degree" symbol as used for angular
measure?

--
Spartanicus
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Spartanicus" <me@privacy.net> wrote in message
news:vn********************************@news.spart anicus.utvinternet.ie...
What is the correct notation for the "degree" symbol as used for angular
measure?

--
Spartanicus

&deg;

--
SamMan
Rip it to reply
Jul 20 '05 #2

P: n/a
"SamMan" <sa*@psfdevrip-it.com> wrote:
What is the correct notation for the "degree" symbol as used for
angular measure?
- - &deg;


Well, yes, that's a correct notation. Another one is the degree sign as
a character, properly encoded in whatever encoding you're using. And
° is yet another, and works marginally better than &deg; (mainly
in the sense that if you, for some odd reason, wish to use real XHTML,
then browsers are not required to know &deg;, and some of them actually
don't). - But this is mostly in the FAQ, is it not?

But the really nasty thing about the degree sign is that some browsers
have started implementing the worst part of Unicode line breaking
rules. This includes the possibility of breaking a line before or after
a character in situations where it makes no sense.

As far as I can, even IE 6 (which is notorious for breaking lines when
don't want that, see http://www.cs.tut.fi/~jkorpela/html/nobr.html )
does not break an expression like 90&deg;, so the OP's situation might
be good in this respect. But IE does break e.g. &deg;F into two
characters, the degree sign alone at the end of a line and the letter F
at the start of the next line. The most effective cure is
<nobr>&deg;F</nobr>. It's not allowed in any official HTML
specification, but the officially approved way is even more awkward:
<span style="white-space: nowrap">&deg;F</span>.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3

P: n/a
Jukka K. Korpela wrote:
As far as I can, even IE 6 (which is notorious for breaking lines when
don't want that, see http://www.cs.tut.fi/~jkorpela/html/nobr.html )
does not break an expression like 90&deg;, so the OP's situation might
be good in this respect. But IE does break e.g. &deg;F into two
characters, the degree sign alone at the end of a line and the letter F
at the start of the next line. The most effective cure is
<nobr>&deg;F</nobr>. It's not allowed in any official HTML
specification, but the officially approved way is even more awkward:
<span style="white-space: nowrap">&deg;F</span>.


This is probably a theoretical question, even if it is in (x)html specs,
but: aren't there such thing as empty characters which signify that
there should be no line-break between the characters they're adjacent to?
Jul 20 '05 #4

P: n/a
"Firas D." <fd********@firasd.org> wrote:
This is probably a theoretical question, even if it is in (x)html
specs, but: aren't there such thing as empty characters which
signify that there should be no line-break between the characters
they're adjacent to?


There are, but those characters are poorly supported by browsers, and
when they aren't supported, the situation gets bad since there are
spurious symbols like rectangles in the midst of strings. See
http://www.cs.tut.fi/~jkorpela/html/nobr.html#wj for details.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #5

P: n/a
In message <Xn*****************************@193.229.0.31>, Jukka K.
Korpela <jk******@cs.tut.fi> writes
And
° is yet another, and works marginally better than &deg; (mainly
in the sense that if you, for some odd reason, wish to use real XHTML,
then browsers are not required to know &deg;, and some of them actually
don't). - But this is mostly in the FAQ, is it not?


I don't think that's true: certainly a generic XML parser is not
required to validate, and is therefore not required to know about &deg;.
But a browser that claims to understand XHTML should be able to make use
of all of named entities, just as it must follow the XHTML specification
on the semantics of the elements and document structure.

That's my understanding anyway, and it doesn't change the reality of
some browsers not understanding &deg; or not understanding XHTML full
stop.

--
George Lund
Jul 20 '05 #6

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in
news:Xn*****************************@193.229.0.31:
"SamMan" <sa*@psfdevrip-it.com> wrote:
What is the correct notation for the "degree" symbol as used for
angular measure?
- -
&deg;

But the really nasty thing about the degree sign is that some browsers
have started implementing the worst part of Unicode line breaking
rules. This includes the possibility of breaking a line before or after
a character in situations where it makes no sense.

As far as I can, even IE 6 (which is notorious for breaking lines when
don't want that, see http://www.cs.tut.fi/~jkorpela/html/nobr.html )
does not break an expression like 90&deg;, so the OP's situation might
be good in this respect. But IE does break e.g. &deg;F into two
characters, the degree sign alone at the end of a line and the letter F
at the start of the next line.


And on our website(which by no means purports to be a good
example of how to code HTML ;-) we have the problem of
whether/how things like "50&deg;N 123&deg;W" will break :-)

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #7

P: n/a
Dave Patton <no**@none.com> wrote:
And on our website(which by no means purports to be a good
example of how to code HTML ;-) we have the problem of
whether/how things like "50&deg;N 123&deg;W" will break :-)


Actually I think the most correct notation would use a space between
the degree sign and the letter, since the degree sign associates with
the preceding number and the letter is a separate indicator:
50&deg; N 123&deg; W
This would give even more breaking opportunities, of course. But the
space could be made a no-break space, and it seems that even IE works
right then:
50&deg;&nbsp;N 123&deg;&nbsp;W
You could naturally turn the remaining space a no-break space too.

If the space looks too wide, you could try and make it narrower by
using the CSS property word-spacing with a negative value, though this
means extra markup, e.g.
<span class="coord">50&deg;&nbsp;N 123&deg;&nbsp;W</span>
with
.coord { word-spacing: -0.08em; }
If you do that, you might almost as well use normal spaces and just add
.coord { white-space: nowrap; }

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #8

P: n/a
It seems "Jukka K. Korpela" wrote in
comp.infosystems.www.authoring.html:
Actually I think the most correct notation would use a space between
the degree sign and the letter, since the degree sign associates with
the preceding number and the letter is a separate indicator:
50&deg; N 123&deg; W


I don't have a cite, but I'm pretty sure I've seen global
coordinates as 50N&nbsp;123W. Maybe in a military context?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.