473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

"degrees" notation

What is the correct notation for the "degree" symbol as used for angular
measure?

--
Spartanicus
Jul 20 '05 #1
8 37178
"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
"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
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
"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
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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Martin | last post by:
Does the "imagerotate" function in PHP5 work correctly or am I doing something wrong? I'm using the code shown below to generate a simple rectangle and then to rotate it a specific number of...
28
by: petermichaux | last post by:
Hi, On my computer apache will see php in .php documents but not in .html documents. Can I configure apache to see php in .html documents? Or is this something that cannot be done at all? ...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
9
by: Lamont Sanford | last post by:
I'm reading a book on design patterns, and the author seems to enjoy using this word a lot. I've looked it up on Dictionary.com and still don't understand how it applies to the context of software...
30
by: seesaw | last post by:
Is it right thing to always avoid using "new" to create objects? What if after starting the application, then decide which and how many objects to create? (Seems like under such situation is there...
3
by: asognoth | last post by:
Hi... Does anybody have a clue how to solve this problem? the task is to change the following method in that manner that it draws the (calculated) image form left to right instead of from top...
19
by: hansBKK | last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning about PHP, mostly by researching, installing and playing with different scripts. I am looking for a host that will provide...
14
by: =?GB2312?B?zPC5zw==?= | last post by:
Howdy, I wonder why below does not work. a = object() a.b = 1 # dynamic bind attribute failed... To make it correct, we have to create a new class: class MyClass(object): pass a =...
3
by: Ty Oft | last post by:
Hello Bytes! Maybe my question seems a bit silly (as one could simply answer it "Well, what are you more passionate about?" or stuff like that - please don't answer like this), but I am in a bit...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.